kaabalah 5.5.0 → 5.6.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.
Files changed (54) hide show
  1. package/README.md +25 -0
  2. package/dist/{chunk-T67M2WBD.js → chunk-3HYK4Q4B.js} +263 -50
  3. package/dist/chunk-3HYK4Q4B.js.map +1 -0
  4. package/dist/{chunk-5ID55YUP.mjs → chunk-3SFBJHP2.mjs} +3 -3
  5. package/dist/{chunk-5ID55YUP.mjs.map → chunk-3SFBJHP2.mjs.map} +1 -1
  6. package/dist/chunk-4NMXTZX4.mjs +525 -0
  7. package/dist/chunk-4NMXTZX4.mjs.map +1 -0
  8. package/dist/{chunk-ZZ3YMT2R.js → chunk-EVQ432JA.js} +23 -23
  9. package/dist/{chunk-ZZ3YMT2R.js.map → chunk-EVQ432JA.js.map} +1 -1
  10. package/dist/{chunk-2J6CVLH2.mjs → chunk-IHQPXEB7.mjs} +263 -51
  11. package/dist/chunk-IHQPXEB7.mjs.map +1 -0
  12. package/dist/{chunk-M7XQFDS4.mjs → chunk-OGWTKRJK.js} +236 -43
  13. package/dist/chunk-OGWTKRJK.js.map +1 -0
  14. package/dist/{chunk-XSAXO3D2.mjs → chunk-S6BFRUJQ.mjs} +3 -3
  15. package/dist/{chunk-XSAXO3D2.mjs.map → chunk-S6BFRUJQ.mjs.map} +1 -1
  16. package/dist/{chunk-G5BG73Y5.js → chunk-U3JFWP24.mjs} +225 -46
  17. package/dist/chunk-U3JFWP24.mjs.map +1 -0
  18. package/dist/chunk-XB6PXEKO.js +529 -0
  19. package/dist/chunk-XB6PXEKO.js.map +1 -0
  20. package/dist/{chunk-2WENLHIP.js → chunk-XTVGQXCL.js} +4 -4
  21. package/dist/{chunk-2WENLHIP.js.map → chunk-XTVGQXCL.js.map} +1 -1
  22. package/dist/cli.js +1061 -126
  23. package/dist/cli.js.map +1 -1
  24. package/dist/{registry-DOiHyH-r.d.mts → constants-DbFwuCjR.d.mts} +1 -177
  25. package/dist/{registry-DOiHyH-r.d.ts → constants-DbFwuCjR.d.ts} +1 -177
  26. package/dist/core/index.d.mts +66 -3
  27. package/dist/core/index.d.ts +66 -3
  28. package/dist/core/index.js +55 -39
  29. package/dist/core/index.mjs +2 -2
  30. package/dist/correspondence-model-D8c42J4c.d.mts +281 -0
  31. package/dist/correspondence-model-DhmBYoMf.d.ts +281 -0
  32. package/dist/gematria/index.d.mts +2 -1
  33. package/dist/gematria/index.d.ts +2 -1
  34. package/dist/gematria/index.js +5 -5
  35. package/dist/gematria/index.mjs +2 -2
  36. package/dist/index.d.mts +4 -3
  37. package/dist/index.d.ts +4 -3
  38. package/dist/index.js +111 -71
  39. package/dist/index.mjs +5 -5
  40. package/dist/numerology/index.js +18 -18
  41. package/dist/numerology/index.mjs +3 -3
  42. package/dist/tarot/index.d.mts +64 -2
  43. package/dist/tarot/index.d.ts +64 -2
  44. package/dist/tarot/index.js +30 -4
  45. package/dist/tarot/index.mjs +3 -1
  46. package/package.json +1 -1
  47. package/dist/chunk-2J6CVLH2.mjs.map +0 -1
  48. package/dist/chunk-AD7T42HJ.js +0 -4
  49. package/dist/chunk-AD7T42HJ.js.map +0 -1
  50. package/dist/chunk-G5BG73Y5.js.map +0 -1
  51. package/dist/chunk-M7XQFDS4.mjs.map +0 -1
  52. package/dist/chunk-RFSO3JRG.mjs +0 -3
  53. package/dist/chunk-RFSO3JRG.mjs.map +0 -1
  54. package/dist/chunk-T67M2WBD.js.map +0 -1
@@ -1,4 +1,5 @@
1
- 'use strict';
1
+ import { getCanonicalTree } from './chunk-4NMXTZX4.mjs';
2
+ import { id, parseId } from './chunk-IHQPXEB7.mjs';
2
3
 
3
4
  // src/tarot/index.ts
4
5
  var majorArcana = [
@@ -275,7 +276,7 @@ var ARKANNUS = [
275
276
  number: 27,
276
277
  tarotCard: "Ace of Wands",
277
278
  tarotCardFilename: "ace_wands",
278
- egyptianCardName: "The Unexpected",
279
+ egyptianCardName: "Initiation",
279
280
  meaning: "Ignite the flames of ideals, Trust in your inner divinity",
280
281
  papusMeaning: "Commencement of an enterprise.",
281
282
  type: "minor",
@@ -286,7 +287,7 @@ var ARKANNUS = [
286
287
  number: 28,
287
288
  tarotCard: "Two of Wands",
288
289
  tarotCardFilename: "2_wands",
289
- egyptianCardName: "Uncertainty",
290
+ egyptianCardName: "Desolation",
290
291
  meaning: "Formulate a strategy to use your own talents",
291
292
  papusMeaning: "Opposition to the commencement of the enterprise. The enterprise is commenced when an unexpected obstacle suddenly prevents its execution.",
292
293
  type: "minor",
@@ -297,7 +298,7 @@ var ARKANNUS = [
297
298
  number: 29,
298
299
  tarotCard: "Three of Wands",
299
300
  tarotCardFilename: "3_wands",
300
- egyptianCardName: "Domesticity",
301
+ egyptianCardName: "Innovation",
301
302
  meaning: "Keep going despite losing something apparently important",
302
303
  papusMeaning: "Realization of the commencement of the enterprise. The basis of the work is now definitely established, and the undertaking can be fearlessly continued.",
303
304
  type: "minor",
@@ -308,7 +309,7 @@ var ARKANNUS = [
308
309
  number: 30,
309
310
  tarotCard: "Four of Wands",
310
311
  tarotCardFilename: "4_wands",
311
- egyptianCardName: "Exchange",
312
+ egyptianCardName: "Alliance",
312
313
  meaning: "Work in teams",
313
314
  papusMeaning: "Obstacles to the enterprise.",
314
315
  type: "minor",
@@ -319,7 +320,7 @@ var ARKANNUS = [
319
320
  number: 31,
320
321
  tarotCard: "Five of Wands",
321
322
  tarotCardFilename: "5_wands",
322
- egyptianCardName: "Impediment",
323
+ egyptianCardName: "Magnificence",
323
324
  meaning: "Strengthen the root chakra, overcome internal fears",
324
325
  papusMeaning: "Opposition to the obstacles. Victory after surmounting them.",
325
326
  type: "minor",
@@ -330,7 +331,7 @@ var ARKANNUS = [
330
331
  number: 32,
331
332
  tarotCard: "Six of Wands",
332
333
  tarotCardFilename: "6_wands",
333
- egyptianCardName: "Magnificence",
334
+ egyptianCardName: "Impediment",
334
335
  meaning: "External victory, internal lack of internal self realization",
335
336
  papusMeaning: "Realization of the opposition. At last the obstacles succeed. Failure of the enterprise in the midst of its execution.",
336
337
  type: "minor",
@@ -341,7 +342,7 @@ var ARKANNUS = [
341
342
  number: 33,
342
343
  tarotCard: "Seven of Wands",
343
344
  tarotCardFilename: "7_wands",
344
- egyptianCardName: "Alliance",
345
+ egyptianCardName: "Exchange",
345
346
  meaning: "Face competitors in an ethical and loyal way",
346
347
  papusMeaning: "Certain success to the enterprise.",
347
348
  type: "minor",
@@ -352,7 +353,7 @@ var ARKANNUS = [
352
353
  number: 34,
353
354
  tarotCard: "Eight of Wands",
354
355
  tarotCardFilename: "8_wands",
355
- egyptianCardName: "Innovation",
356
+ egyptianCardName: "Domesticity",
356
357
  meaning: "Travel to the center of peace and intelligence",
357
358
  papusMeaning: "Opposition to its success. The enterprise will only partially succeed.",
358
359
  type: "minor",
@@ -363,7 +364,7 @@ var ARKANNUS = [
363
364
  number: 35,
364
365
  tarotCard: "Nine of Wands",
365
366
  tarotCardFilename: "9_wands",
366
- egyptianCardName: "Desolation",
367
+ egyptianCardName: "Uncertainty",
367
368
  meaning: "Obstacle that precedes total victory, gather hidden forces",
368
369
  papusMeaning: "Realization of success. Success is continued.",
369
370
  type: "minor",
@@ -374,7 +375,7 @@ var ARKANNUS = [
374
375
  number: 36,
375
376
  tarotCard: "Ten of Wands",
376
377
  tarotCardFilename: "10_wands",
377
- egyptianCardName: "Initiation",
378
+ egyptianCardName: "The Unexpected",
378
379
  meaning: "Get out of apathy, create a new tree of life using the Lightning Path",
379
380
  papusMeaning: "Uncertainty in the management of the enterprise.",
380
381
  type: "minor",
@@ -431,7 +432,7 @@ var ARKANNUS = [
431
432
  number: 41,
432
433
  tarotCard: "Ace of Cups",
433
434
  tarotCardFilename: "ace_cups",
434
- egyptianCardName: "Dissension",
435
+ egyptianCardName: "Attraction",
435
436
  meaning: "Renewal or new affection, alternative treatment for health",
436
437
  papusMeaning: "Commencement of a love affair.",
437
438
  type: "minor",
@@ -442,7 +443,7 @@ var ARKANNUS = [
442
443
  number: 42,
443
444
  tarotCard: "Two of Cups",
444
445
  tarotCardFilename: "2_cups",
445
- egyptianCardName: "Preeminence",
446
+ egyptianCardName: "Versatility",
446
447
  meaning: "Do not poison yourself or the other person",
447
448
  papusMeaning: "Opposition to this commencement. Unimportant obstacles raised by one of the lovers.",
448
449
  type: "minor",
@@ -453,7 +454,7 @@ var ARKANNUS = [
453
454
  number: 43,
454
455
  tarotCard: "Three of Cups",
455
456
  tarotCardFilename: "3_cups",
456
- egyptianCardName: "Delusion",
457
+ egyptianCardName: "Consummation",
457
458
  meaning: "Harmony between instinct and emotion, Be discreet",
458
459
  papusMeaning: "Realization of this commencement. The love is mutual.",
459
460
  type: "minor",
@@ -464,7 +465,7 @@ var ARKANNUS = [
464
465
  number: 44,
465
466
  tarotCard: "Four of Cups",
466
467
  tarotCardFilename: "4_cups",
467
- egyptianCardName: "Expressiveness",
468
+ egyptianCardName: "Conjecture",
468
469
  meaning: "Abundance in emotional life, do not listen to slander",
469
470
  papusMeaning: "Serious obstacles to the love. They arise from other persons, not from the lovers.",
470
471
  type: "minor",
@@ -475,7 +476,7 @@ var ARKANNUS = [
475
476
  number: 45,
476
477
  tarotCard: "Five of Cups",
477
478
  tarotCardFilename: "5_cups",
478
- egyptianCardName: "Regeneration",
479
+ egyptianCardName: "Patrimony",
479
480
  meaning: "Do not break your spiritual commitment (your purpose)",
480
481
  papusMeaning: "Opposition to the obstacles. Victory over the obstacles after a struggle.",
481
482
  type: "minor",
@@ -486,7 +487,7 @@ var ARKANNUS = [
486
487
  number: 46,
487
488
  tarotCard: "Six of Cups",
488
489
  tarotCardFilename: "6_cups",
489
- egyptianCardName: "Patrimony",
490
+ egyptianCardName: "Regeneration",
490
491
  meaning: "Do not have self-pity",
491
492
  papusMeaning: "The obstacles triumph. Love destroyed in the midst of happiness. Widowhood.",
492
493
  type: "minor",
@@ -497,7 +498,7 @@ var ARKANNUS = [
497
498
  number: 47,
498
499
  tarotCard: "Seven of Cups",
499
500
  tarotCardFilename: "7_cups",
500
- egyptianCardName: "Conjecture",
501
+ egyptianCardName: "Expressiveness",
501
502
  meaning: "Gestations, related to The Star",
502
503
  papusMeaning: "Success assured to the lovers.",
503
504
  type: "minor",
@@ -508,7 +509,7 @@ var ARKANNUS = [
508
509
  number: 48,
509
510
  tarotCard: "Eight of Cups",
510
511
  tarotCardFilename: "8_cups",
511
- egyptianCardName: "Consummation",
512
+ egyptianCardName: "Delusion",
512
513
  meaning: "Reflect on your emotional life after 18 hours",
513
514
  papusMeaning: "Partial failure of love. Love only partially succeeds.",
514
515
  type: "minor",
@@ -519,7 +520,7 @@ var ARKANNUS = [
519
520
  number: 49,
520
521
  tarotCard: "Nine of Cups",
521
522
  tarotCardFilename: "9_cups",
522
- egyptianCardName: "Versatility",
523
+ egyptianCardName: "Preeminence",
523
524
  meaning: "Reconciliations and forgiveness",
524
525
  papusMeaning: "Motherhood.",
525
526
  type: "minor",
@@ -530,7 +531,7 @@ var ARKANNUS = [
530
531
  number: 50,
531
532
  tarotCard: "Ten of Cups",
532
533
  tarotCardFilename: "10_cups",
533
- egyptianCardName: "Attraction",
534
+ egyptianCardName: "Dissension",
534
535
  meaning: "Marriage of the spirit with the soul, Alchemical Weddings",
535
536
  papusMeaning: "Uncertainty in the management of the love affair.",
536
537
  type: "minor",
@@ -587,7 +588,7 @@ var ARKANNUS = [
587
588
  number: 55,
588
589
  tarotCard: "Ace of Swords",
589
590
  tarotCardFilename: "ace_swords",
590
- egyptianCardName: "Contrition",
591
+ egyptianCardName: "Vehemence",
591
592
  meaning: "Conflicts before victory",
592
593
  papusMeaning: "Commencement of enmity.",
593
594
  type: "minor",
@@ -598,7 +599,7 @@ var ARKANNUS = [
598
599
  number: 56,
599
600
  tarotCard: "Two of Swords",
600
601
  tarotCardFilename: "2_swords",
601
- egyptianCardName: "Pilgrimage",
602
+ egyptianCardName: "Communion",
602
603
  meaning: "Traumas and conflicts to be overcome",
603
604
  papusMeaning: "Opposition to this commencement. The enmity does not last.",
604
605
  type: "minor",
@@ -609,7 +610,7 @@ var ARKANNUS = [
609
610
  number: 57,
610
611
  tarotCard: "Three of Swords",
611
612
  tarotCardFilename: "3_swords",
612
- egyptianCardName: "Rivalry",
613
+ egyptianCardName: "Proscription",
613
614
  meaning: "Death of yang, Fire, tendencies to depression",
614
615
  papusMeaning: "Realization of the enmity. Hatred.",
615
616
  type: "minor",
@@ -620,7 +621,7 @@ var ARKANNUS = [
620
621
  number: 58,
621
622
  tarotCard: "Four of Swords",
622
623
  tarotCardFilename: "4_swords",
623
- egyptianCardName: "Meditation",
624
+ egyptianCardName: "Solitude",
624
625
  meaning: "Reflection, related to The Hermit",
625
626
  papusMeaning: "Opposition to the hatred. Success against the enemy.",
626
627
  type: "minor",
@@ -631,7 +632,7 @@ var ARKANNUS = [
631
632
  number: 59,
632
633
  tarotCard: "Five of Swords",
633
634
  tarotCardFilename: "5_swords",
634
- egyptianCardName: "Revelation",
635
+ egyptianCardName: "Evolution",
635
636
  meaning: "Healthy self-challenge, Self-demands",
636
637
  papusMeaning: "Opposition to this opposition. The enemy triumphs at the moment one fancies the victory is secured.",
637
638
  type: "minor",
@@ -642,7 +643,7 @@ var ARKANNUS = [
642
643
  number: 60,
643
644
  tarotCard: "Six of Swords",
644
645
  tarotCardFilename: "6_swords",
645
- egyptianCardName: "Evolution",
646
+ egyptianCardName: "Revelation",
646
647
  meaning: "External daily strategies, Future perspectives",
647
648
  papusMeaning: "Equilibrium of the opposition. The enemy is rendered powerless at last.",
648
649
  type: "minor",
@@ -653,7 +654,7 @@ var ARKANNUS = [
653
654
  number: 61,
654
655
  tarotCard: "Seven of Swords",
655
656
  tarotCardFilename: "7_swords",
656
- egyptianCardName: "Solitude",
657
+ egyptianCardName: "Meditation",
657
658
  meaning: "Internal nocturnal strategies, related to The Hermit",
658
659
  papusMeaning: "Success assured to the enemy.",
659
660
  type: "minor",
@@ -664,7 +665,7 @@ var ARKANNUS = [
664
665
  number: 62,
665
666
  tarotCard: "Eight of Swords",
666
667
  tarotCardFilename: "8_swords",
667
- egyptianCardName: "Proscription",
668
+ egyptianCardName: "Rivalry",
668
669
  meaning: "Appeal to superior forces, Internal and external conflicts",
669
670
  papusMeaning: "Partial opposition to this success. The enemy only partially triumphs.",
670
671
  type: "minor",
@@ -675,7 +676,7 @@ var ARKANNUS = [
675
676
  number: 63,
676
677
  tarotCard: "Nine of Swords",
677
678
  tarotCardFilename: "9_swords",
678
- egyptianCardName: "Communion",
679
+ egyptianCardName: "Pilgrimage",
679
680
  meaning: "The problems being imagined will never happen",
680
681
  papusMeaning: "Certain duration of the hatred.",
681
682
  type: "minor",
@@ -686,7 +687,7 @@ var ARKANNUS = [
686
687
  number: 64,
687
688
  tarotCard: "Ten of Swords",
688
689
  tarotCardFilename: "10_swords",
689
- egyptianCardName: "Vehemence",
690
+ egyptianCardName: "Contrition",
690
691
  meaning: "Death and rebirth, related to Death and The Tower",
691
692
  papusMeaning: "Uncertainty in the enmity.",
692
693
  type: "minor",
@@ -743,7 +744,7 @@ var ARKANNUS = [
743
744
  number: 69,
744
745
  tarotCard: "Ace of Pentacles",
745
746
  tarotCardFilename: "ace_pentacles",
746
- egyptianCardName: "The Unforeseen",
747
+ egyptianCardName: "Rebirth",
747
748
  meaning: "Rebirth through a single material goal, Form clear material goals",
748
749
  papusMeaning: "Commencement of fortune. Inheritance. Gifts. Economy.",
749
750
  type: "minor",
@@ -754,7 +755,7 @@ var ARKANNUS = [
754
755
  number: 70,
755
756
  tarotCard: "Two of Pentacles",
756
757
  tarotCardFilename: "2_pentacles",
757
- egyptianCardName: "Cooperation",
758
+ egyptianCardName: "Confusion",
758
759
  meaning: "Light forming shadows, Duality asking for synthesis in the trinity, Don't put all the eggs in the same basket",
759
760
  papusMeaning: "Opposition to this commencement. Difficulty in well establishing the first landmarks of good fortune.",
760
761
  type: "minor",
@@ -765,7 +766,7 @@ var ARKANNUS = [
765
766
  number: 71,
766
767
  tarotCard: "Three of Pentacles",
767
768
  tarotCardFilename: "3_pentacles",
768
- egyptianCardName: "Avarice",
769
+ egyptianCardName: "The Provider",
769
770
  meaning: "Light forming sound, Establish balance through the trinity becoming a great dispenser, Verbalize what should be done, Do not settle for the first results",
770
771
  papusMeaning: "Realization of this commencement of fortune. A small sum.",
771
772
  type: "minor",
@@ -776,7 +777,7 @@ var ARKANNUS = [
776
777
  number: 72,
777
778
  tarotCard: "Four of Pentacles",
778
779
  tarotCardFilename: "4_pentacles",
779
- egyptianCardName: "Purification",
780
+ egyptianCardName: "Generosity",
780
781
  meaning: "Avoid avarice / greed",
781
782
  papusMeaning: "Opposition of fortune. Loss of money.",
782
783
  type: "minor",
@@ -787,7 +788,7 @@ var ARKANNUS = [
787
788
  number: 73,
788
789
  tarotCard: "Five of Pentacles",
789
790
  tarotCardFilename: "5_pentacles",
790
- egyptianCardName: "Love and Desire",
791
+ egyptianCardName: "Offering",
791
792
  meaning: "Only order will bring progress, Do not kick the barn without having something concrete in front of you",
792
793
  papusMeaning: "Opposition to this opposition. A success coming which will balance the low.",
793
794
  type: "minor",
@@ -798,7 +799,7 @@ var ARKANNUS = [
798
799
  number: 74,
799
800
  tarotCard: "Six of Pentacles",
800
801
  tarotCardFilename: "6_pentacles",
801
- egyptianCardName: "Offering",
802
+ egyptianCardName: "Love and Desire",
802
803
  meaning: "Act with prudence",
803
804
  papusMeaning: "Realization of the opposition. Ruin.",
804
805
  type: "minor",
@@ -809,7 +810,7 @@ var ARKANNUS = [
809
810
  number: 75,
810
811
  tarotCard: "Seven of Pentacles",
811
812
  tarotCardFilename: "7_pentacles",
812
- egyptianCardName: "Generosity",
813
+ egyptianCardName: "Purification",
813
814
  meaning: "Don't boast about your proposal or project",
814
815
  papusMeaning: "Success assured. A large fortune.",
815
816
  type: "minor",
@@ -820,7 +821,7 @@ var ARKANNUS = [
820
821
  number: 76,
821
822
  tarotCard: "Eight of Pentacles",
822
823
  tarotCardFilename: "8_pentacles",
823
- egyptianCardName: "The Provider",
824
+ egyptianCardName: "Avarice",
824
825
  meaning: "Keep doing what you always did",
825
826
  papusMeaning: "Partial success. Great loss of money at the moment apparently of definitely securing the fortune.",
826
827
  type: "minor",
@@ -831,7 +832,7 @@ var ARKANNUS = [
831
832
  number: 77,
832
833
  tarotCard: "Nine of Pentacles",
833
834
  tarotCardFilename: "9_pentacles",
834
- egyptianCardName: "Confusion",
835
+ egyptianCardName: "Cooperation",
835
836
  meaning: "Work with what you like and earn something with it",
836
837
  papusMeaning: "Equilibrium of equilibrium. A durable fortune.",
837
838
  type: "minor",
@@ -842,7 +843,7 @@ var ARKANNUS = [
842
843
  number: 78,
843
844
  tarotCard: "Ten of Pentacles",
844
845
  tarotCardFilename: "10_pentacles",
845
- egyptianCardName: "Rebirth",
846
+ egyptianCardName: "The Unforeseen",
846
847
  meaning: "Prosperity, Prosperous inheritance",
847
848
  papusMeaning: "Uncertainty in the fortune. Great success and great reverses.",
848
849
  type: "minor",
@@ -874,9 +875,187 @@ async function shuffleTarotDeck(cards, includeInvertedCards = false, shuffleCoun
874
875
  }
875
876
  return shuffledCards;
876
877
  }
878
+ var TAROT_IMAGE_BASE_URL = "https://kaabalah-app.s3.us-east-1.amazonaws.com/tarot";
879
+ var TAROT_DECK_METADATA = [
880
+ {
881
+ id: "papus_pt",
882
+ label: "Papus Kaabalistic",
883
+ imagePath: "major",
884
+ descriptiveDataKey: "PAPUS_KAABALISTIC"
885
+ },
886
+ {
887
+ id: "papus",
888
+ label: "Papus Divinatory",
889
+ imagePath: "major",
890
+ descriptiveDataKey: "PAPUS_DIVINATORY"
891
+ },
892
+ {
893
+ id: "mythic",
894
+ label: "Mythic",
895
+ imagePath: "major"
896
+ },
897
+ {
898
+ id: "egyptian",
899
+ label: "Egyptian",
900
+ imagePath: "major",
901
+ descriptiveDataKey: "KIER_EGYPTIAN"
902
+ },
903
+ {
904
+ id: "rider-waite",
905
+ label: "Rider Waite",
906
+ imagePath: "major"
907
+ }
908
+ ];
909
+ var MAJOR_ARCANA_CARDS = ARKANNUS.filter(
910
+ (card) => card.type === "major" && majorArcana.includes(card.tarotCardFilename)
911
+ );
912
+ var tarotArchetypeCache;
913
+ function normalizePathSlug(pathSlug) {
914
+ return pathSlug.trim().replace(/^\/?path\//i, "").toLowerCase();
915
+ }
916
+ function toAstrologyCorrespondence(node) {
917
+ return {
918
+ type: node.type,
919
+ id: node.id,
920
+ label: parseId(node.id)
921
+ };
922
+ }
923
+ function buildDescriptionsByDeck(tarotArkAnnu) {
924
+ const descriptions = {};
925
+ for (const deck of TAROT_DECK_METADATA) {
926
+ if (!deck.descriptiveDataKey) {
927
+ continue;
928
+ }
929
+ const description = tarotArkAnnu.data?.descriptiveData?.[deck.descriptiveDataKey];
930
+ if (!description) {
931
+ continue;
932
+ }
933
+ descriptions[deck.id] = { ...description };
934
+ }
935
+ return descriptions;
936
+ }
937
+ function getTarotArchetypeCache() {
938
+ if (tarotArchetypeCache) {
939
+ return tarotArchetypeCache;
940
+ }
941
+ const tree = getCanonicalTree({
942
+ system: "kaabalah",
943
+ parts: ["westernAstrology", "tarot"]
944
+ });
945
+ const archetypes = MAJOR_ARCANA_CARDS.map((card) => {
946
+ const pathId = id("path" /* PATH */, card.number);
947
+ const path = tree.getNode(pathId);
948
+ const hebrewLetter = tree.getCorrespondences(pathId, {
949
+ type: "hebrewLetter" /* HEBREW_LETTER */,
950
+ limit: 1
951
+ })[0]?.node;
952
+ const tarotArkAnnu = tree.getCorrespondences(pathId, {
953
+ type: "tarotArkAnnu" /* TAROT_ARK_ANNU */,
954
+ limit: 1
955
+ })[0]?.node;
956
+ if (!path || !hebrewLetter || !tarotArkAnnu) {
957
+ throw new Error(
958
+ `Missing canonical tarot archetype metadata for ${pathId}.`
959
+ );
960
+ }
961
+ const astrology = tree.getCorrespondences(pathId, {
962
+ type: [
963
+ "westernElement" /* WESTERN_ELEMENT */,
964
+ "planet" /* PLANET */,
965
+ "westernZodiacSign" /* WESTERN_ZODIAC_SIGN */
966
+ ]
967
+ }).map(
968
+ ({ node }) => toAstrologyCorrespondence(
969
+ node
970
+ )
971
+ );
972
+ const descriptionsByDeck = buildDescriptionsByDeck(tarotArkAnnu);
973
+ return {
974
+ canonicalId: pathId,
975
+ kind: "major",
976
+ pathId,
977
+ pathNumber: card.number,
978
+ pathSlug: parseId(hebrewLetter.id).toLowerCase(),
979
+ hebrewLetterId: hebrewLetter.id,
980
+ hebrewLetter: parseId(hebrewLetter.id),
981
+ pathMeaning: path.data?.meaning,
982
+ tarotArkAnnuId: tarotArkAnnu.id,
983
+ tarotCardNumber: card.number,
984
+ tarotCardName: parseId(tarotArkAnnu.id),
985
+ tarotCardFilename: card.tarotCardFilename,
986
+ tarotMeaning: descriptionsByDeck.papus_pt?.meaning ?? card.meaning,
987
+ astrology,
988
+ availableDeckIds: TAROT_DECK_METADATA.map((deck) => deck.id),
989
+ descriptionsByDeck
990
+ };
991
+ });
992
+ tarotArchetypeCache = {
993
+ archetypes,
994
+ byPathId: new Map(archetypes.map((archetype) => [archetype.pathId, archetype])),
995
+ byPathSlug: new Map(
996
+ archetypes.map((archetype) => [archetype.pathSlug, archetype])
997
+ ),
998
+ byTarotCardFilename: new Map(
999
+ archetypes.map((archetype) => [archetype.tarotCardFilename, archetype])
1000
+ ),
1001
+ byTarotCardNumber: new Map(
1002
+ archetypes.map((archetype) => [archetype.tarotCardNumber, archetype])
1003
+ )
1004
+ };
1005
+ return tarotArchetypeCache;
1006
+ }
1007
+ function buildTarotRepresentation(archetype, deck) {
1008
+ const description = archetype.descriptionsByDeck[deck.id];
1009
+ const imageUrl = `${TAROT_IMAGE_BASE_URL}/${deck.id}/${deck.imagePath}/${archetype.tarotCardFilename}.jpg`;
1010
+ return {
1011
+ archetype,
1012
+ deck: { id: deck.id, label: deck.label },
1013
+ imageUrl,
1014
+ label: `${archetype.tarotCardName} - ${deck.label}`,
1015
+ altText: `${archetype.tarotCardName} - ${deck.label}`,
1016
+ cardLabel: description?.name ?? archetype.tarotCardName,
1017
+ description
1018
+ };
1019
+ }
1020
+ function listTarotDecks() {
1021
+ return TAROT_DECK_METADATA.map(({ id: id2, label }) => ({ id: id2, label }));
1022
+ }
1023
+ function getTarotArchetype(lookup) {
1024
+ const cache = getTarotArchetypeCache();
1025
+ if ("pathSlug" in lookup) {
1026
+ return cache.byPathSlug.get(normalizePathSlug(lookup.pathSlug));
1027
+ }
1028
+ if ("pathId" in lookup) {
1029
+ return cache.byPathId.get(String(lookup.pathId));
1030
+ }
1031
+ if ("tarotCardFilename" in lookup) {
1032
+ return cache.byTarotCardFilename.get(
1033
+ lookup.tarotCardFilename.toLowerCase()
1034
+ );
1035
+ }
1036
+ return cache.byTarotCardNumber.get(lookup.tarotCardNumber);
1037
+ }
1038
+ function getTarotRepresentations(lookup) {
1039
+ const archetype = getTarotArchetype(lookup);
1040
+ if (!archetype) {
1041
+ return [];
1042
+ }
1043
+ return TAROT_DECK_METADATA.map(
1044
+ (deck) => buildTarotRepresentation(archetype, deck)
1045
+ );
1046
+ }
1047
+ function getTarotRepresentation(lookup, deckId) {
1048
+ const archetype = getTarotArchetype(lookup);
1049
+ const deck = TAROT_DECK_METADATA.find((candidate) => candidate.id === deckId);
1050
+ if (!archetype || !deck) {
1051
+ return void 0;
1052
+ }
1053
+ return buildTarotRepresentation(archetype, deck);
1054
+ }
1055
+ function resolveTarotImageUrl(lookup, deckId) {
1056
+ return getTarotRepresentation(lookup, deckId)?.imageUrl;
1057
+ }
877
1058
 
878
- exports.ARKANNUS = ARKANNUS;
879
- exports.majorArcana = majorArcana;
880
- exports.shuffleTarotDeck = shuffleTarotDeck;
881
- //# sourceMappingURL=chunk-G5BG73Y5.js.map
882
- //# sourceMappingURL=chunk-G5BG73Y5.js.map
1059
+ export { ARKANNUS, TAROT_IMAGE_BASE_URL, getTarotArchetype, getTarotRepresentation, getTarotRepresentations, listTarotDecks, majorArcana, resolveTarotImageUrl, shuffleTarotDeck };
1060
+ //# sourceMappingURL=chunk-U3JFWP24.mjs.map
1061
+ //# sourceMappingURL=chunk-U3JFWP24.mjs.map