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GAAG,CACtB,CAEO,SAASC,EAAcC,EAAiC,CAC9D,MAAMC,EAAMN,EAAA,EACZ,GAAI,CAACK,EAAO,OAAOC,EACnB,UAAWC,KAASF,EAAM,MAAM,GAAG,EAAG,CACrC,KAAM,CAACpB,EAAMuB,CAAI,EAAID,EAAM,MAAM,GAAG,EAChC,CAACtB,GAAQ,CAACuB,GACT3B,EAAwCI,CAAI,IAChDqB,EAAIrB,CAAiB,EAAIO,EAAUP,EAAmBuB,EAAK,MAAM,GAAG,CAAC,EAEvE,CACA,OAAOF,CACR","names":["PRIMARY_AXES","SECONDARY_AXES","ROLES","ORIENTATIONS","GENDERS","POSITIONS","BODY_TYPES","AGE_BRACKETS","ETHNICITIES","KINKS","AXIS_MAX","PHOTO_MAX","AXIS_VALUES","k","AXIS_LABELS","valueLabel","axis","value","ALLOWED","a","cleanValue","v","t","cleanList","input","max","seen","raw","c","sanitizeIdentity","o","emptySeek","seekToParam","seek","parts","seekFromParam","param","out","chunk","vals"],"sources":["../../../../../../src/lib/types/arena-identity.ts"],"sourcesContent":["// RAT-426 (Epic C / C1): arena identity + \"who i am / show me\" matching axes.\n// Two mirror surfaces share this taxonomy: the submit flow tags the submission\n// (\"who i am\", supply) and the feed filter picks preferences (\"show me\", demand).\n// Matching is SOFT — picks float matching cards to the front by match-count; nothing\n// is hidden, empty selection = everyone. See C1 for the full spec.\n\nexport type ArenaAxis =\n\t| 'role'\n\t| 'orientation'\n\t| 'gender'\n\t| 'position'\n\t| 'body'\n\t| 'kinks'\n\t| 'age'\n\t| 'ethnicity';\n\n// Single-select on the \"who i am\" side (one value per card); multi (\"any\") on the\n// filter side. The rest are multi on both.\nexport const SINGLE_AXES: ArenaAxis[] = ['role', 'orientation', 'gender', 'position'];\nexport const MULTI_AXES: ArenaAxis[] = ['body', 'kinks', 'age', 'ethnicity'];\n\n// Primary = always visible; secondary = behind a \"more · optional\" disclosure.\n// IDENTICAL on both surfaces so every declared axis is also filterable (matches close).\nexport const PRIMARY_AXES: ArenaAxis[] = ['role', 'orientation', 'gender', 'body', 'kinks'];\nexport const SECONDARY_AXES: ArenaAxis[] = ['position', 'age', 'ethnicity'];\n\nexport const ROLES = ['dominant', 'submissive', 'switch'] as const;\nexport const ORIENTATIONS = ['gay', 'bi', 'curious', 'straight'] as const;\nexport const GENDERS = ['guy', 'woman', 'trans', 'femboy', 'femme'] as const; // NO default\nexport const POSITIONS = ['top', 'bottom', 'vers'] as const;\nexport const BODY_TYPES = ['twink', 'bear', 'otter', 'muscle', 'hung', 'slim', 'thick', 'daddy'] as const;\nexport const AGE_BRACKETS = ['18-24', '25-34', '35-44', '45+'] as const; // adult only\nexport const ETHNICITIES = ['white', 'black', 'latino', 'asian', 'mena', 'south-asian', 'mixed'] as const;\n\n// Kink (\"into\") match-type drives the deck weighting later:\n//  symmetric  = mutual act, full match weight\n//  directional = role/position resolves who gives/receives\n//  solo       = interest signal only, low weight (not a real pairing signal)\nexport type KinkMatchType = 'symmetric' | 'directional' | 'solo';\n\nexport const KINKS: { key: string; label: string; type: KinkMatchType }[] = [\n\t{ key: 'cum', label: 'cum/loads', type: 'symmetric' },\n\t{ key: 'feet', label: 'feet', type: 'symmetric' },\n\t{ key: 'breed', label: 'breed/raw', type: 'symmetric' },\n\t{ key: 'watersports', label: 'watersports', type: 'symmetric' },\n\t{ key: 'pup', label: 'pup', type: 'symmetric' },\n\t{ key: 'spanking', label: 'spanking', type: 'symmetric' },\n\t{ key: 'bondage', label: 'bondage', type: 'symmetric' },\n\t{ key: 'gear', label: 'leather/gear', type: 'symmetric' },\n\t{ key: 'rimming', label: 'rimming', type: 'symmetric' },\n\t{ key: 'fisting', label: 'fisting', type: 'symmetric' },\n\t{ key: 'sph', label: 'SPH', type: 'directional' },\n\t{ key: 'daddyboy', label: 'daddy/boy', type: 'directional' },\n\t{ key: 'humiliation', label: 'humiliation', type: 'directional' },\n\t{ key: 'chastity', label: 'chastity', type: 'directional' },\n\t{ key: 'worship', label: 'worship', type: 'directional' },\n\t{ key: 'exhibitionist', label: 'exhibitionist', type: 'directional' },\n\t{ key: 'ms', label: 'M/s', type: 'directional' },\n\t{ key: 'cuck', label: 'cuck', type: 'directional' },\n\t{ key: 'sissy', label: 'sissy', type: 'directional' },\n\t{ key: 'findom', label: 'findom', type: 'directional' },\n\t{ key: 'voyeur', label: 'voyeur', type: 'directional' },\n\t{ key: 'edging', label: 'edging/denial', type: 'solo' },\n\t{ key: 'goon', label: 'gooning', type: 'solo' }\n];\n\n// RAT-426: per-axis selection caps on the SUBMIT side (\"who i am\") so a card can't\n// tag everything and match every filter (spam visibility). Single axes are 1 by\n// nature. The \"show me\" filter side is NOT capped — a viewer narrowing their own\n// deck harms no one. Photo tags cap = PHOTO_MAX (matches the old category limit).\nexport const AXIS_MAX: Record<'body' | 'kinks' | 'ethnicity', number> = {\n\tbody: 3,\n\tkinks: 3,\n\tethnicity: 2\n};\nexport const PHOTO_MAX = 3;\n\nexport const AXIS_VALUES: Record<ArenaAxis, readonly string[]> = {\n\trole: ROLES,\n\torientation: ORIENTATIONS,\n\tgender: GENDERS,\n\tposition: POSITIONS,\n\tbody: BODY_TYPES,\n\tkinks: KINKS.map((k) => k.key),\n\tage: AGE_BRACKETS,\n\tethnicity: ETHNICITIES\n};\n\nexport const AXIS_LABELS: Record<ArenaAxis, string> = {\n\trole: 'role',\n\torientation: 'orientation',\n\tgender: 'gender',\n\tposition: 'position',\n\tbody: 'body',\n\tkinks: 'into',\n\tage: 'age',\n\tethnicity: 'ethnicity'\n};\n\nexport function valueLabel(axis: ArenaAxis, value: string): string {\n\tif (axis === 'kinks') return KINKS.find((k) => k.key === value)?.label ?? value;\n\tif (axis === 'ethnicity' && value === 'mena') return 'MENA';\n\treturn value;\n}\n\nconst ALLOWED = new Map<ArenaAxis, Set<string>>(\n\t(Object.keys(AXIS_VALUES) as ArenaAxis[]).map((a) => [a, new Set(AXIS_VALUES[a])])\n);\n\n// \"who i am\" — single axes keep one value, multi axes keep a de-duped list.\nexport interface ArenaIdentity {\n\trole: string | null;\n\torientation: string | null;\n\tgender: string | null;\n\tposition: string | null;\n\tbody: string[];\n\tkinks: string[];\n\tage: string | null; // your own bracket = single\n\tethnicity: string[];\n}\n\nexport function emptyIdentity(): ArenaIdentity {\n\treturn { role: null, orientation: null, gender: null, position: null, body: [], kinks: [], age: null, ethnicity: [] };\n}\n\nfunction cleanValue(axis: ArenaAxis, v: unknown): string | null {\n\tif (typeof v !== 'string') return null;\n\tconst t = v.trim().toLowerCase();\n\treturn ALLOWED.get(axis)?.has(t) ? t : null;\n}\n\nfunction cleanList(axis: ArenaAxis, input: unknown, max = Infinity): string[] {\n\tif (!Array.isArray(input)) return [];\n\tconst seen = new Set<string>();\n\tfor (const raw of input) {\n\t\tconst c = cleanValue(axis, raw);\n\t\tif (c) seen.add(c);\n\t\tif (seen.size >= max) break;\n\t}\n\treturn Array.from(seen);\n}\n\n// Sanitize the \"who i am\" payload from the submit form — tamper-safe.\nexport function sanitizeIdentity(input: unknown): ArenaIdentity {\n\tconst o = (input && typeof input === 'object' ? input : {}) as Record<string, unknown>;\n\treturn {\n\t\trole: cleanValue('role', o.role),\n\t\torientation: cleanValue('orientation', o.orientation),\n\t\tgender: cleanValue('gender', o.gender),\n\t\tposition: cleanValue('position', o.position),\n\t\tbody: cleanList('body', o.body, AXIS_MAX.body),\n\t\tkinks: cleanList('kinks', o.kinks, AXIS_MAX.kinks),\n\t\tage: cleanValue('age', o.age),\n\t\tethnicity: cleanList('ethnicity', o.ethnicity, AXIS_MAX.ethnicity)\n\t};\n}\n\n// \"show me\" — every axis is a multi-select preference (\"any of these\").\nexport type ArenaSeek = Record<ArenaAxis, string[]>;\n\nexport function emptySeek(): ArenaSeek {\n\treturn { role: [], orientation: [], gender: [], position: [], body: [], kinks: [], age: [], ethnicity: [] };\n}\n\nexport function sanitizeSeek(input: unknown): ArenaSeek {\n\tconst o = (input && typeof input === 'object' ? input : {}) as Record<string, unknown>;\n\tconst out = emptySeek();\n\tfor (const axis of Object.keys(out) as ArenaAxis[]) out[axis] = cleanList(axis, o[axis]);\n\treturn out;\n}\n\nexport function seekIsEmpty(seek: ArenaSeek): boolean {\n\treturn (Object.keys(seek) as ArenaAxis[]).every((a) => seek[a].length === 0);\n}\n\n// URL round-trip for the deck query (?seek=role:submissive;body:twink,hung).\nexport function seekToParam(seek: ArenaSeek): string {\n\tconst parts: string[] = [];\n\tfor (const axis of Object.keys(seek) as ArenaAxis[]) {\n\t\tif (seek[axis].length) parts.push(`${axis}:${seek[axis].join(',')}`);\n\t}\n\treturn parts.join(';');\n}\n\nexport function seekFromParam(param: string | null): ArenaSeek {\n\tconst out = emptySeek();\n\tif (!param) return out;\n\tfor (const chunk of param.split(';')) {\n\t\tconst [axis, vals] = chunk.split(':');\n\t\tif (!axis || !vals) continue;\n\t\tif ((AXIS_VALUES as Record<string, unknown>)[axis]) {\n\t\t\tout[axis as ArenaAxis] = cleanList(axis as ArenaAxis, vals.split(','));\n\t\t}\n\t}\n\treturn out;\n}\n\n// The card's declared identity, as stored on arena_submission.\nexport interface CardIdentity {\n\trole?: string | null;\n\torientation?: string | null;\n\tgender?: string | null;\n\tposition?: string | null;\n\tbody?: string[] | null;\n\tkinks?: string[] | null;\n\tage?: string | null;\n\tethnicity?: string[] | null;\n}\n\n// SOFT match: count how many of the viewer's picks the card satisfies. Unset axes\n// on either side are neutral (never penalized). Empty seek → score 0 everywhere.\n// Solo kinks count at reduced weight — an interest signal, not a pairing signal.\nexport function matchScore(seek: ArenaSeek, card: CardIdentity): number {\n\tlet score = 0;\n\tfor (const axis of Object.keys(seek) as ArenaAxis[]) {\n\t\tconst picks = seek[axis];\n\t\tif (!picks.length) continue;\n\t\tconst cardVal = (card as Record<string, unknown>)[axis];\n\t\tfor (const pick of picks) {\n\t\t\tlet hit = false;\n\t\t\tif (Array.isArray(cardVal)) hit = cardVal.includes(pick);\n\t\t\telse if (typeof cardVal === 'string') hit = cardVal === pick;\n\t\t\tif (!hit) continue;\n\t\t\tif (axis === 'kinks' && KINKS.find((k) => k.key === pick)?.type === 'solo') score += 0.25;\n\t\t\telse score += 1;\n\t\t}\n\t}\n\treturn score;\n}\n"],"version":3}