{"release_id":"01a1998d-9802-0000-b0f7-33a23307f4ed","chunk_id":"01a1998d-9932-7f81-905f-9614c0039f07","file":"DcmYbxn9.mjs","mappings":"wVASO,MAAMA,EAAkB,EAClBC,EAAkB,EAClBC,EAAoB,CAAC,EAAG,GAAI,EAAE,EAG9BC,EAAe,EACfC,EAAe,GACfC,EAAgB,IAChBC,EAAe,IACfC,EAAe,GAEfC,EAAqB,GAE3B,SAASC,EAAWC,EAA8C,CACxE,OAAOA,GAAW,WAAW,QAAQ,EAAIF,EAAqBD,CAC/D,CAEO,MAAMI,EAAS,CACrB,MAAO,GACP,KAAM,GACN,OAAQ,GACR,UAAW,GACX,QAAS,IACT,WAAY,GACZ,UAAW,CACZ,EAEaC,EAAsB,IACtBC,EAAyB,GAGzBC,EAA2D,CACvE,CAAE,IAAK,aAAc,KAAMC,EAAI,YAAY,EAAG,IAAKA,EAAI,2BAA2B,CAAA,EAClF,CAAE,IAAK,aAAc,KAAMA,EAAI,YAAY,EAAG,IAAKA,EAAI,kCAAkC,CAAA,EACzF,CAAE,IAAK,QAAS,KAAMA,EAAI,OAAO,EAAG,IAAKA,EAAI,sBAAsB,CAAA,EACnE,CACC,IAAK,YACL,KAAMA,EAAI,oBAAoB,EAC9B,IAAKA,EAAI,mCAAmC,CAAA,EAE7C,CAAE,IAAK,QAAS,KAAMA,EAAI,QAAQ,EAAG,IAAKA,EAAI,mBAAmB,CAAA,CAClE","names":["TOD_MAX_PLAYERS","TOD_MIN_PLAYERS","TOD_ROUND_OPTIONS","TOD_SPIN_SEC","TOD_PICK_SEC","TOD_TRUTH_SEC","TOD_DARE_SEC","TOD_VOTE_SEC","TOD_VOTE_VIDEO_SEC","todVoteSec","mediaMime","TOD_XP","TOD_TRUTH_MAX_CHARS","TOD_DARE_VIDEO_MAX_SEC","TOD_BADGES","msg"],"sources":["../../../../../../src/lib/types/tod.ts"],"sourcesContent":["/** Truth or Dare — shared constants + view types (client + server). */\n\nimport { msg } from '$lib/i18n/mark';\n\nexport type TodSpice = 'spicy' | 'x';\nexport type TodStatus = 'lobby' | 'live' | 'over' | 'dissolved';\nexport type TodPhase = 'spin' | 'pick' | 'task' | 'vote';\nexport type TodChoice = 'truth' | 'dare';\n\nexport const TOD_MAX_PLAYERS = 8;\nexport const TOD_MIN_PLAYERS = 3;\nexport const TOD_ROUND_OPTIONS = [8, 16, 24] as const;\n\n/** seconds */\nexport const TOD_SPIN_SEC = 5; // the bottle animation, everyone sees the same roll\nexport const TOD_PICK_SEC = 20;\nexport const TOD_TRUTH_SEC = 120;\nexport const TOD_DARE_SEC = 300; // players asked: specific dares need more than 3 min\nexport const TOD_VOTE_SEC = 15;\n/** A video dare streams slower than a photo; the table gets longer to see it before voting closes. */\nexport const TOD_VOTE_VIDEO_SEC = 30;\n/** Seconds of vote for a delivered round, by its media. */\nexport function todVoteSec(mediaMime: string | null | undefined): number {\n\treturn mediaMime?.startsWith('video/') ? TOD_VOTE_VIDEO_SEC : TOD_VOTE_SEC;\n}\n\nexport const TOD_XP = {\n\ttruth: 15,\n\tdare: 40,\n\tnailed: 20, // majority \"nailed it\"\n\tfullMatch: 25, // 8 players, everyone, at the end\n\tchicken: -10,\n\tstreakStep: 0.2, // every consecutive dare adds ×0.2, capped at ×2\n\tstreakMax: 2\n} as const;\n\nexport const TOD_TRUTH_MAX_CHARS = 280;\nexport const TOD_DARE_VIDEO_MAX_SEC = 20;\nexport const TOD_MEDIA_TTL_HOURS = 48;\n\nexport const TOD_BADGES: { key: string; name: string; how: string }[] = [\n\t{ key: 'first_dare', name: msg('first dare'), how: msg('your first delivered dare') },\n\t{ key: 'no_chicken', name: msg('no chicken'), how: msg('a full match without backing out') },\n\t{ key: 'glass', name: msg('glass'), how: msg('the glass shot, done') },\n\t{\n\t\tkey: 'host_full',\n\t\tname: msg('host with the most'),\n\t\thow: msg('3 matches hosted that filled to 8')\n\t},\n\t{ key: 'top10', name: msg('top 10'), how: msg('week board finish') }\n];\n\nexport interface TodPerson {\n\tuserId: string;\n\tnickname: string | null;\n\tavatarPath: string | null;\n}\n\nexport interface TodPlayerView extends TodPerson {\n\txp: number;\n\ttruths: number;\n\tdares: number;\n\tchickens: number;\n\tstreak: number;\n\tisHost: boolean;\n\tleft: boolean;\n}\n\nexport interface TodRoundView {\n\tid: string;\n\troundNo: number;\n\tplayer: TodPerson;\n\tchoice: TodChoice | null;\n\tprompt: { title: string | null; text: string; tier: string } | null;\n\tanswerText: string | null;\n\t/** signed, match-only, only once delivered */\n\tmediaUrl: string | null;\n\tmediaMime: string | null;\n\tstatus: 'open' | 'delivered' | 'chicken';\n\tvotesUp: number;\n\tvotesDown: number;\n\txp: number;\n\t/** the viewer's own vote on this round */\n\tmyVote: boolean | null;\n}\n\nexport interface TodMatchView {\n\tid: string;\n\tcode: string;\n\tname: string;\n\tspice: TodSpice;\n\tisPublic: boolean;\n\troundsTotal: number;\n\troundNo: number;\n\tstatus: TodStatus;\n\tphase: TodPhase | null;\n\tphaseEndsAt: string | null;\n\thost: TodPerson;\n\troomId: string | null;\n\troomCode: string | null;\n\tplayers: TodPlayerView[];\n\tcurrent: TodRoundView | null;\n\t/** last few finished rounds, newest first */\n\thistory: TodRoundView[];\n\tviewer: { userId: string | null; isPlayer: boolean; isHost: boolean; isUp: boolean };\n\t/** at 'over': badges earned in this match */\n\tbadges: { userId: string; key: string }[];\n\t/** lobby with the minimum: when it starts itself if the host doesn't first */\n\tautoStartAt: string | null;\n\tcreatedAt: string;\n\tstartedAt: string | null;\n\tendedAt: string | null;\n}\n\nexport interface TodEventView {\n\tactive: boolean;\n\tstartsAt: string | null;\n\tendsAt: string | null;\n}\n"],"version":3}