"use strict"; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { ANIMALS: () => ANIMALS, zodiac: () => zodiac_default }); module.exports = __toCommonJS(src_exports); // src/constants/index.ts var ANIMALS = [ { name: "rat", mate: ["dragon", "monkey"], traits: ["Intelligent", "Adaptable", "Quick-witted", "Charming", "Artistic", "Sociable"] }, { name: "ox", mate: ["snake", "rooster"], traits: ["Loyal", "Reliable", "Thorough", "Strong", "Reasonable", "Steady", "Determined"] }, { name: "tiger", mate: ["horse", "dog"], traits: ["Enthusiastic", "Courageous", "Ambitious", "Leadership", "Confidence", "Charismatic"] }, { name: "rabbit", mate: ["sheep", "pig"], traits: ["Trustworthy", "Empathic", "Modest", "Diplomatic", "Sincere", "Sociable", "Caretakers"], alias: "cat" // Vietnamese }, { name: "dragon", mate: ["rat", "monkey"], traits: ["Lucky", "Flexible", "Eccentric", "Imaginative", "Artistic", "Spiritual", "Charismatic"] }, { name: "snake", mate: ["ox", "rooster"], traits: ["Philosophical", "Organized", "Intelligent", "Intuitive", "Elegant", "Attentive", "Decisive"] }, { name: "horse", mate: ["tiger", "dog"], traits: ["Adaptable", "Loyal", "Courageous", "Ambitious", "Intelligent", "Adventurous", "Strong"] }, { name: "sheep", mate: ["rabbit", "pig"], traits: ["Tasteful", "Crafty", "Warm", "Elegant", "Charming", "Intuitive", "Sensitive", "Calm"] }, { name: "monkey", mate: ["dragon", "monkey"], traits: ["Quick-witted", "Charming", "Lucky", "Adaptable", "Bright", "Versatile", "Lively", "Smart"] }, { name: "rooster", mate: ["ox", "snake"], traits: ["Honest", "Energetic", "Intelligent", "Flamboyant", "Flexible", "Diverse", "Confident"] }, { name: "dog", mate: ["tiger", "horse"], traits: ["Loyal", "Sociable", "Courageous", "Diligent", "Steady", "Lively", "Adaptable", "Smart"] }, { name: "pig", mate: ["rabbit", "sheep"], traits: ["Honorable", "Philanthropic", "Determined", "Optimistic", "Sincere", "Sociable"] } ]; // src/zodiac.ts var import_lunar_date_fns2 = require("@kabeep/lunar-date-fns"); // src/utils/get-december-days.ts var import_lunar_date_fns = require("@kabeep/lunar-date-fns"); function getDecemberDays(year, isLeap) { return isLeap ? (0, import_lunar_date_fns.getLeapMonthDays)(year) : (0, import_lunar_date_fns.getMonthDays)(year, 12); } var get_december_days_default = getDecemberDays; // src/utils/normalize.ts function normalize(value) { return value === -1 ? new Date(Number.NaN) : value; } var normalize_default = normalize; // src/zodiac.ts function zodiac(date) { const lunarDate = (0, import_lunar_date_fns2.toLunar)(date); if (lunarDate === -1) return -1; const { year } = lunarDate; const record = ANIMALS[(year - 4) % 12]; const leapMonth = (0, import_lunar_date_fns2.getLeapMonth)(year); const isLastLeapMonth = leapMonth === 12; const from = normalize_default((0, import_lunar_date_fns2.toSolar)({ year, month: 1, day: 1, isLeapMonth: leapMonth === 1 })); const to = normalize_default( (0, import_lunar_date_fns2.toSolar)({ year, month: 12, day: get_december_days_default(year, isLastLeapMonth), isLeapMonth: isLastLeapMonth }) ); return __spreadProps(__spreadValues(__spreadValues({}, record), lunarDate), { from, to }); } var zodiac_default = zodiac; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { ANIMALS, zodiac });