{"release_id":"01a1c502-4ad1-0000-ec62-adc54d3c69aa","chunk_id":"01a1c502-4c0f-7931-8112-4d2c8cfaa172","file":"ClXsVYTR.mjs","mappings":"mVAUO,SAASA,EAAgBC,EAAqC,CACpE,GAAI,CAACA,GAAQ,OAAOA,GAAS,SAAU,OAAO,KAC9C,KAAM,CAAE,KAAAC,EAAM,SAAAC,EAAU,QAAAC,EAAS,QAAAC,GAAYJ,EAC7C,GAAIC,IAAS,iBAAkB,OAAO,KACtC,MAAMI,EACLF,IAAY,QACT,EAAE,oBAAoB,EACtBA,IAAY,UACX,EAAE,oBAAoB,EACtBA,IAAY,OACX,EAAE,oBAAoB,EACtBD,IAAa,MACZ,EAAE,qBAAqB,EACvB,EAAE,uBAAuB,EAC1BI,EACLJ,IAAa,MAAQ,EAAE,2BAA2B,EAAI,EAAE,4BAA4B,EACrF,MAAO,CACN,KAAM,GAAGG,CAAI,IAAIC,CAAI,GACrB,QAASF,IAAY,eAAiBA,IAAY,SAAWA,IAAY,MAAQA,EAAU,IAAA,CAE7F,CAIO,SAASG,EAAaC,EAAwB,CACpD,OAAOA,IAAS,QACb,EAAE,8BAA8B,EAChCA,IAAS,MACR,EAAE,8BAA8B,EAChC,EAAE,8BAA8B,CACrC,CAIO,SAASC,EAAaD,EAAwB,CACpD,OAAOA,IAAS,QACb,EAAE,6BAA6B,EAC/BA,IAAS,MACR,EAAE,6BAA6B,EAC/B,EAAE,6BAA6B,CACpC","names":["wrongCategoryOf","body","code","category","subject","suggest","what","rule","throwAsLabel","kind","startAsLabel"],"sources":["../../../../../../src/lib/components/beat/wrong-category.ts"],"sourcesContent":["// Epic R: the words for an upload that beat me's boobs or ass category refused\n// (server: beat-category.ts): what the picture is, the rule, and the category\n// it fits instead.\n\nimport { t } from '$lib/i18n';\nimport type { BeatKind } from '$lib/types/beat';\n\nexport type WrongCategory = { text: string; suggest: BeatKind | null };\n\n/** The refusal in the viewer's language, or null for any other response. */\nexport function wrongCategoryOf(body: unknown): WrongCategory | null {\n\tif (!body || typeof body !== 'object') return null;\n\tconst { code, category, subject, suggest } = body as Record<string, unknown>;\n\tif (code !== 'wrong_category') return null;\n\tconst what =\n\t\tsubject === 'penis'\n\t\t\t? t(\"that's a dick pic.\")\n\t\t\t: subject === 'breasts'\n\t\t\t\t? t(\"that's a boob pic.\")\n\t\t\t\t: subject === 'butt'\n\t\t\t\t\t? t(\"that's an ass pic.\")\n\t\t\t\t\t: category === 'ass'\n\t\t\t\t\t\t? t('no ass in that one.')\n\t\t\t\t\t\t: t('no boobs in that one.');\n\tconst rule =\n\t\tcategory === 'ass' ? t('ass beats are asses only.') : t('boob beats are boobs only.');\n\treturn {\n\t\ttext: `${what} ${rule}`,\n\t\tsuggest: suggest === 'cockcompare' || suggest === 'boobs' || suggest === 'ass' ? suggest : null\n\t};\n}\n\n/** The button on the create form that throws the same picture in again, in\n *  the category it fits. */\nexport function throwAsLabel(kind: BeatKind): string {\n\treturn kind === 'boobs'\n\t\t? t('throw it in as a boob beat →')\n\t\t: kind === 'ass'\n\t\t\t? t('throw it in as an ass beat →')\n\t\t\t: t('throw it in as a dick beat →');\n}\n\n/** The link from someone else's beat to starting one in the category the\n *  picture fits. */\nexport function startAsLabel(kind: BeatKind): string {\n\treturn kind === 'boobs'\n\t\t? t('start a boob beat instead →')\n\t\t: kind === 'ass'\n\t\t\t? t('start an ass beat instead →')\n\t\t\t: t('start a dick beat instead →');\n}\n"],"version":3}