{"release_id":"01a1998d-9802-0000-b0f7-33a23307f4ed","chunk_id":"01a1998d-993a-7f93-bd69-389dd7df11d8","file":"L4XeHVei.mjs","mappings":"wVAsCO,MAAMA,EAAaC,EAAqB,IAAI,EA2B7CC,EAAuD,CAG5D,MAAO,CACN,SAAU,QACV,OAAQ,qBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,KAAM,CACL,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,MAAO,CACN,SAAU,QACV,OAAQ,qBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAGV,QAAS,CACR,SAAU,QACV,OAAQ,qBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,iBAAkB,CACjB,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,KAAM,CACL,SAAU,OACV,OAAQ,oBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,MAAO,CACN,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,KAAM,CACL,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,YAAa,CACZ,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,KAAM,CACL,SAAU,OACV,OAAQ,oBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,OAAQ,CACP,SAAU,OACV,OAAQ,oBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,KAAM,CACL,SAAU,OACV,OAAQ,oBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAEV,OAAQ,CACP,SAAU,QACV,OAAQ,qBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAGV,QAAS,CACR,SAAU,QACV,OAAQ,qBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAGV,SAAU,CACT,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAKV,OAAQ,CACP,SAAU,UACV,OAAQ,uBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAGV,OAAQ,CACP,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAIV,KAAM,CACL,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,EAGV,IAAK,CACJ,SAAU,SACV,OAAQ,sBACR,IAAK,UACL,QAAS,UACT,SAAU,YACV,QAAS,EAAA,CAEX,EAIMC,EAA6BD,EAAQ,QAEpC,SAASE,EAAcC,EAA8B,CAC3D,OAAOA,EAAOH,EAAQG,CAAI,EAAIF,CAC/B,CAMO,MAAMG,EAAiBL,EAA4B,IAAI,EAKvD,SAASM,EAAgBC,EAAaC,EAAcC,EAA0B,CACpF,MAAMC,EAAQ,IAAI,IAAI,CAAC,QAAS,SAAU,OAAQ,QAAS,SAAU,SAAU,OAAQ,OAAQ,MAAM,CAAC,EACtG,MAAO,CACN,SAAUA,EAAM,IAAIH,CAAG,EAAIA,EAAM,QACjC,OAAQG,EAAM,IAAIH,CAAG,EAAI,eAAeA,CAAG,IAAMC,EACjD,IAAKA,EACL,QAASC,EACT,SAAU,GAAGD,CAAI,KACjB,QAASD,IAAQ,UAAYA,IAAQ,SAAWA,IAAQ,QAAUA,IAAQ,MAAA,CAE5E","names":["activeMode","writable","ACCENTS","DEFAULT_ACCENT","getModeAccent","mode","accentOverride","nicheAccentSpec","key","base","dark","known"],"sources":["../../../../../../src/lib/stores/activeMode.ts"],"sourcesContent":["import { writable } from 'svelte/store';\n\n/** Global accent mode override for navbar/footer.\n *\n * Three groups live here:\n *  - **Rating sub-modes** (`'roast' | 'hype' | 'rater'`) — flipped inside the\n *    `/rate` flow when the user picks a mode. They predate the per-module\n *    chrome (RAT-327).\n *  - **Module modes** (`'profile' | 'public-profile' | 'duel' | 'arena' |\n *    'beat' | 'leaderboard' | 'chat' | 'niches' | 'feed' | 'raters'`) —\n *    each top-level module sets its own value on mount so the nav chrome\n *    follows the route. See `getModeAccent` for the color binding.\n *  - `null` — no accent set; navbar/footer fall back to coral default\n *    (same as `'profile'`). Used by static / marketing pages that don't\n *    claim a module.\n */\nexport type ActiveMode =\n\t| 'roast'\n\t| 'hype'\n\t| 'rater'\n\t| 'profile'\n\t| 'public-profile'\n\t| 'duel'\n\t| 'arena'\n\t| 'beat'\n\t| 'leaderboard'\n\t| 'chat'\n\t| 'niches'\n\t| 'feed'\n\t| 'raters'\n\t| 'contest'\n\t| 'roleplay'\n\t| 'albums'\n\t| 'mythos'\n\t| 'clan'\n\t| 'tod'\n\t| null;\n\nexport const activeMode = writable<ActiveMode>(null);\n\n/** One config blob per accent — every chrome surface (Navbar, BottomNav,\n *  Footer, theme-color meta) reads from here so a new mode means one\n *  edit, not five.\n *\n *  `tailwind` is the bare color name (Tailwind v4 auto-derives `bg-{name}`,\n *  `text-{name}`, `hover:bg-{name}-dark`, …). `cssVar` is the raw token for\n *  places that style with inline `style=\"color: var(...)\"` (BottomNav center\n *  button, theme-color meta).\n *\n *  `onLight` flips the button text from white to bg when the accent is a\n *  light fill (yellow / green / lime → dark text reads better against them).\n */\nexport type AccentSpec = {\n\ttailwind: string;\n\tcssVar: string;\n\thex: string;\n\t/** -dark variant for hover states. */\n\thexDark: string;\n\t/** Alpha tint for backgrounds (the existing token convention is solid+20%). */\n\thexLight: string;\n\t/** Light fills (yellow / green / lime) need dark-bg text to read; the rest\n\t *  take white. Flips Navbar btnText + BottomNav createIconDark. */\n\tonLight: boolean;\n};\n\nconst ACCENTS: Record<NonNullable<ActiveMode>, AccentSpec> = {\n\t// rating sub-modes (share their color with the top-level module that\n\t// owns the same token — see RAT-327 ticket body).\n\troast: {\n\t\ttailwind: 'coral',\n\t\tcssVar: 'var(--color-coral)',\n\t\thex: '#ff4d6d',\n\t\thexDark: '#d93254',\n\t\thexLight: '#ff4d6d20',\n\t\tonLight: false\n\t},\n\thype: {\n\t\ttailwind: 'yellow',\n\t\tcssVar: 'var(--color-yellow)',\n\t\thex: '#ffe500',\n\t\thexDark: '#d4c000',\n\t\thexLight: '#ffe50020',\n\t\tonLight: true\n\t},\n\trater: {\n\t\ttailwind: 'green',\n\t\tcssVar: 'var(--color-green)',\n\t\thex: '#22c55e',\n\t\thexDark: '#16a34a',\n\t\thexLight: '#22c55e20',\n\t\tonLight: true\n\t},\n\t// module modes\n\tprofile: {\n\t\ttailwind: 'coral',\n\t\tcssVar: 'var(--color-coral)',\n\t\thex: '#ff4d6d',\n\t\thexDark: '#d93254',\n\t\thexLight: '#ff4d6d20',\n\t\tonLight: false\n\t},\n\t'public-profile': {\n\t\ttailwind: 'indigo',\n\t\tcssVar: 'var(--color-indigo)',\n\t\thex: '#6366f1',\n\t\thexDark: '#4f46e5',\n\t\thexLight: '#6366f120',\n\t\tonLight: false\n\t},\n\tduel: {\n\t\ttailwind: 'blue',\n\t\tcssVar: 'var(--color-blue)',\n\t\thex: '#3b82f6',\n\t\thexDark: '#2563eb',\n\t\thexLight: '#3b82f620',\n\t\tonLight: false\n\t},\n\tarena: {\n\t\ttailwind: 'orange',\n\t\tcssVar: 'var(--color-orange)',\n\t\thex: '#f97316',\n\t\thexDark: '#ea580c',\n\t\thexLight: '#f9731620',\n\t\tonLight: false\n\t},\n\tbeat: {\n\t\ttailwind: 'yellow',\n\t\tcssVar: 'var(--color-yellow)',\n\t\thex: '#ffe500',\n\t\thexDark: '#d4c000',\n\t\thexLight: '#ffe50020',\n\t\tonLight: true\n\t},\n\tleaderboard: {\n\t\ttailwind: 'purple',\n\t\tcssVar: 'var(--color-purple)',\n\t\thex: '#7c3aed',\n\t\thexDark: '#6d28d9',\n\t\thexLight: '#7c3aed20',\n\t\tonLight: false\n\t},\n\tchat: {\n\t\ttailwind: 'cyan',\n\t\tcssVar: 'var(--color-cyan)',\n\t\thex: '#06b6d4',\n\t\thexDark: '#0891b2',\n\t\thexLight: '#06b6d420',\n\t\tonLight: false\n\t},\n\tniches: {\n\t\ttailwind: 'lime',\n\t\tcssVar: 'var(--color-lime)',\n\t\thex: '#84cc16',\n\t\thexDark: '#65a30d',\n\t\thexLight: '#84cc1620',\n\t\tonLight: true\n\t},\n\tfeed: {\n\t\ttailwind: 'pink',\n\t\tcssVar: 'var(--color-pink)',\n\t\thex: '#ec4899',\n\t\thexDark: '#db2777',\n\t\thexLight: '#ec489920',\n\t\tonLight: false\n\t},\n\traters: {\n\t\ttailwind: 'green',\n\t\tcssVar: 'var(--color-green)',\n\t\thex: '#22c55e',\n\t\thexDark: '#16a34a',\n\t\thexLight: '#22c55e20',\n\t\tonLight: true\n\t},\n\t// RAT-382: weekly contest — coral, matching the approved /contest mockup.\n\tcontest: {\n\t\ttailwind: 'coral',\n\t\tcssVar: 'var(--color-coral)',\n\t\thex: '#ff4d6d',\n\t\thexDark: '#d93254',\n\t\thexLight: '#ff4d6d20',\n\t\tonLight: false\n\t},\n\t// Roleplay marketplace — purple (imaginative; shares the token with /l).\n\troleplay: {\n\t\ttailwind: 'purple',\n\t\tcssVar: 'var(--color-purple)',\n\t\thex: '#7c3aed',\n\t\thexDark: '#6d28d9',\n\t\thexLight: '#7c3aed20',\n\t\tonLight: false\n\t},\n\t// Paid photo albums — fuchsia (its own premium/exclusive hue). Distinct from\n\t// purple (/l + roleplay) and pink (/f feed) so album surfaces read as their\n\t// own content type across the green /r and pink /f they get injected into.\n\talbums: {\n\t\ttailwind: 'fuchsia',\n\t\tcssVar: 'var(--color-fuchsia)',\n\t\thex: '#d946ef',\n\t\thexDark: '#c026d3',\n\t\thexLight: '#d946ef20',\n\t\tonLight: false\n\t},\n\t// the secret mythos altar — purple chrome to match the mythic medal theme.\n\tmythos: {\n\t\ttailwind: 'purple',\n\t\tcssVar: 'var(--color-purple)',\n\t\thex: '#a855f7',\n\t\thexDark: '#7c2bd0',\n\t\thexLight: '#a855f720',\n\t\tonLight: false\n\t},\n\t// Clans (/k — clan mode). Violet, distinct from purple (/l + roleplay +\n\t// mythos) and blue (/d duel).\n\tclan: {\n\t\ttailwind: 'violet',\n\t\tcssVar: 'var(--color-violet)',\n\t\thex: '#7c5cff',\n\t\thexDark: '#6a45ff',\n\t\thexLight: '#7c5cff20',\n\t\tonLight: false\n\t},\n\t// truth or dare week shares the arena orange\n\ttod: {\n\t\ttailwind: 'orange',\n\t\tcssVar: 'var(--color-orange)',\n\t\thex: '#f97316',\n\t\thexDark: '#ea580c',\n\t\thexLight: '#f9731620',\n\t\tonLight: false\n\t}\n};\n\n/** Default accent when no mode is set — same as /p. Coral is also the\n *  rating-flow `roast` fallback and the landing CTA color. */\nconst DEFAULT_ACCENT: AccentSpec = ACCENTS.profile;\n\nexport function getModeAccent(mode: ActiveMode): AccentSpec {\n\treturn mode ? ACCENTS[mode] : DEFAULT_ACCENT;\n}\n\n/** Per-entity accent that wins over the mode accent while set — a niche's\n *  owner-picked colour takes over the whole chrome (navbar, bottom nav,\n *  announcement bar, footer, selection) on the niche's pages. Pages set it\n *  on mount and clear it on unmount. */\nexport const accentOverride = writable<AccentSpec | null>(null);\n\n/** Build an AccentSpec from a niche palette entry. `tailwind` must be one of\n *  the names the chrome components have class rows for; 'mono' has none, so\n *  it falls back to coral there while the hex vars still apply everywhere. */\nexport function nicheAccentSpec(key: string, base: string, dark: string): AccentSpec {\n\tconst known = new Set(['coral', 'violet', 'cyan', 'green', 'yellow', 'orange', 'pink', 'blue', 'lime']);\n\treturn {\n\t\ttailwind: known.has(key) ? key : 'coral',\n\t\tcssVar: known.has(key) ? `var(--color-${key})` : base,\n\t\thex: base,\n\t\thexDark: dark,\n\t\thexLight: `${base}20`,\n\t\tonLight: key === 'yellow' || key === 'green' || key === 'lime' || key === 'mono'\n\t};\n}\n"],"version":3}