{"release_id":"01a1998d-9802-0000-b0f7-33a23307f4ed","chunk_id":"01a1998d-9955-7420-952e-0a29555af96e","file":"gLPEbfRJ.mjs","mappings":"wVA2BO,MAAMA,EAAiC,CAC7C,CAAE,GAAI,SAAU,OAAQ,GAAI,WAAY,IAAK,MAAO,iBAAkB,MAAO,WAAA,EAC7E,CACC,GAAI,UACJ,OAAQ,GACR,WAAY,IACZ,MAAO,cACP,MAAO,gBACP,QAAS,EAAA,EAEV,CAAE,GAAI,WAAY,OAAQ,IAAK,WAAY,KAAM,MAAO,eAAgB,MAAO,WAAA,EAC/E,CAAE,GAAI,QAAS,OAAQ,IAAK,WAAY,KAAM,MAAO,YAAa,MAAO,SAAU,MAAO,EAAA,CAC3F,EAKaC,EAAgC,CAC5C,GAAI,UACJ,OAAQ,GACR,WAAY,IACZ,MAAO,cACP,MAAO,wBACP,QAAS,EACV,EAIaC,EAAc,CAAC,EAAG,GAAI,GAAI,GAAG,EAW7BC,EAA0BC,EAAI,yBAAyB,EAavDC,EAAsB,IAGE,CAAC,GAAGL,CAA+B,EAIvEA,EAAe,KAAMM,GAAMA,EAAE,OAAO,GAAKN,EAAe,CAAC,EAMnD,SAASO,EAAYC,EAAuB,CAClD,MAAO,KAAKA,EAAQ,KAAK,QAAQ,CAAC,CAAC,EACpC","names":["TOKEN_PACKAGES","STARTER_PACKAGE","TIP_PRESETS","TRIBUTE_REPLY_RATE_COPY","msg","GIFT_PRO_TOKEN_COST","p","formatPrice","cents"],"sources":["../../../../../../src/lib/token-packages.ts"],"sourcesContent":["/** Token packages — the one-time purchasable token bundles users spend on\n *  livecam tips/boosts, AI ratings, arena actions, etc. Client-safe (no db/stripe\n *  imports) so the modal, /pricing and the homepage can all render the same list.\n *  The server validates a purchase against THIS list (never trusts a client price).\n */\n\nimport { msg } from '$lib/i18n/mark';\n\nexport type TokenPackage = {\n\tid: string;\n\ttokens: number;\n\tpriceCents: number;\n\tlabel: string;\n\tblurb: string;\n\t/** the highlighted \"most popular\" everyday pack — the conversion anchor. */\n\tpopular?: boolean;\n\t/** the biggest pack — the whale tier, styled as the top \"best value\". */\n\twhale?: boolean;\n\t/** one-time first-purchase-only offer; NOT part of the standard grid.\n\t *  Eligibility (never bought tokens before) is enforced server-side. */\n\tstarter?: boolean;\n};\n\n// matches the live Stripe products (amounts + names). Checkout uses inline\n// price_data keyed off this list, so no pre-created Stripe price IDs are needed.\n// Value ladder: ¢/token drops monotonically 20.0 → 16.6 → 14.3 → 12.5 as the pack\n// grows; the whale tier ($49.99) opens an intensity rung for heavy spenders.\nexport const TOKEN_PACKAGES: TokenPackage[] = [\n\t{ id: 'dipper', tokens: 25, priceCents: 499, label: 'the toe dipper', blurb: 'dip a toe' },\n\t{\n\t\tid: 'regular',\n\t\ttokens: 60,\n\t\tpriceCents: 999,\n\t\tlabel: 'the regular',\n\t\tblurb: 'best for most',\n\t\tpopular: true\n\t},\n\t{ id: 'obsessed', tokens: 140, priceCents: 1999, label: 'the obsessed', blurb: 'go deeper' },\n\t{ id: 'whale', tokens: 400, priceCents: 4999, label: 'the whale', blurb: 'all in', whale: true }\n];\n\n/** One-time, first-purchase-only starter — 2× the entry pack's value (10¢/token).\n *  Shown only to users who have never completed a token purchase; the checkout\n *  endpoint re-checks eligibility so it can't be replayed. */\nexport const STARTER_PACKAGE: TokenPackage = {\n\tid: 'starter',\n\ttokens: 30,\n\tpriceCents: 299,\n\tlabel: 'the starter',\n\tblurb: 'first time · 2× value',\n\tstarter: true\n};\n\n/** In-chat tip presets (tokens). Shared by the chat tip picker and the /api/gift\n *  validator so the client can never tip an arbitrary amount. */\nexport const TIP_PRESETS = [5, 15, 50, 150] as const;\n\n/** RAT-462: the line under the tribute option on the profile message sheet.\n *\n *  PROVISIONAL — REVISIT. Measured 2026-07-25 over all history: 26 of 27 cold\n *  threads opened with a gift got a human reply (96.3%), against 71.7% across\n *  19 459 threads opened without one. The direction has been consistent, but\n *  n=27 is far too small to treat as stable — the 96% could move several points\n *  either way. The profile is ~16 000 thread starts a month, so even a 2% attach\n *  rate reaches a few hundred cases in 2–4 weeks. Recompute then and put the\n *  real number here (the query lives in the RAT-462 thread). */\nexport const TRIBUTE_REPLY_RATE_COPY = msg('96% of them got a reply');\n\n/** Short \"what you can spend tokens on\" list — shown on the top-up surface. */\nexport const TOKEN_SPENDS: string[] = [\n\t'super emotes — get noticed',\n\t'tip live raters & creators',\n\t'unlock locked pics & albums',\n\t'boosts & reveals',\n\t'AI ratings & enhances',\n\t'gift Pro or tokens to anyone'\n];\n\n/** Token cost to gift another user 30 days of Pro (mirrors GIFT_SUB_COST server-side). */\nexport const GIFT_PRO_TOKEN_COST = 175;\n\n/** Every purchasable package, including the gated starter — used for validation. */\nconst ALL_PACKAGES: TokenPackage[] = [...TOKEN_PACKAGES, STARTER_PACKAGE];\n\n/** The recommended pack — used as the quick-offer when a user is short on tokens. */\nexport const POPULAR_PACKAGE: TokenPackage =\n\tTOKEN_PACKAGES.find((p) => p.popular) ?? TOKEN_PACKAGES[1];\n\nexport function findPackage(id: string): TokenPackage | null {\n\treturn ALL_PACKAGES.find((p) => p.id === id) ?? null;\n}\n\nexport function formatPrice(cents: number): string {\n\treturn `$${(cents / 100).toFixed(2)}`;\n}\n\n/** ¢-per-token, for a \"best value\" comparison line. */\nexport function centsPerToken(p: TokenPackage): number {\n\treturn p.priceCents / p.tokens;\n}\n"],"version":3}