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AG,aAGHI,EAAKC,EAAA,EAALD,EAAK,MAAA,YAALA,EAAK,MAAA,GAAAE,EAAA,KAAA,EAAA,QAAA,EAALH,EAAAC,MAAoEb,EAAQ,CAAA,CAAA,QAA5Ea,CAAK,WAJFd,EAAS,EAAAiB,EAAAC,CAAA,EAAAD,EAAAE,EAAA,EAAA,2BAcbC,EAAGC,EAAA,WAAHD,EAAG,MAAAJ,EAAA,GAAA,EAAHJ,EAAAQ,QAAelB,GAAG,EAAlBU,EAAAQ,EAAG,UAA0BjB,EAAK,EAAG,QAAU,MAAM,EAArDS,EAAAQ,EAAG,gBAAmEjB,EAAK,EAAG,OAAS,MAAM,EAA7FU,EAAAO,MAAuHnB,EAAQ,CAAA,CAAA,QAA/HmB,CAAG,WArBAhB,EAAI,EAAAa,EAAAK,CAAA,EAMCvB,EAAI,IAAK,QAAOkB,EAAAM,EAAA,CAAA,EAAAN,EAAAO,EAAA,EAAA,UARlB","names":["UNTITLED_ALBUM","isUntitledAlbum","title","clipLength","sec","s","albumCountLabel","album","photos","bits","ALBUM_TAG_GROUPS","ALBUM_TAGS","g","MAX_TAGS_PER_ALBUM","ALBUM_TAG_LABELS","CREATOR_ONLY_TAGS","AI_TAG","AI_MADE_LABEL","isAiAlbum","tags","t","kind","posterUrl","imgClass","alt","eager","gate","surface","span","root_1","GatedMedia","node_1","img","root_3","$.set_attribute","$.set_class","video","root_4","$$props","$$render","consequent_1","alternate","img_1","root_5","consequent","consequent_2","alternate_1"],"sources":["../../../../../../src/lib/types/album.ts","../../../../../../src/lib/types/album-tags.ts","../../../../../../src/lib/components/album/AlbumCoverMedia.svelte"],"sourcesContent":["// Paid photo/video album types — shared between server load and components.\n\nexport type AlbumStatus = 'draft' | 'published' | 'archived';\n\n/** Media kind for an album item. Videos reuse the same bucket + unlock gate. */\nexport type AlbumMediaKind = 'image' | 'video';\n\n/** The title a new album starts with. Publishing needs a real one (RAT-605):\n *  177 albums went live as \"untitled album\", which is what the card, the\n *  feed post and search all showed. */\nexport const UNTITLED_ALBUM = 'untitled album';\n\nexport function isUntitledAlbum(title: string | null | undefined): boolean {\n\tconst t = (title ?? '').trim().toLowerCase();\n\treturn t === '' || t === 'untitled' || t === UNTITLED_ALBUM;\n}\n\n/** Compact creator identity carried on every album surface. avatarPath is\n *  resolved to a URL client-side via getAvatarUrl (public avatars bucket). */\nexport interface AlbumCreator {\n\tid: string;\n\tnickname: string | null;\n\tavatarPath: string | null;\n\tisRater?: boolean;\n\tisCreator?: boolean;\n\tisVerified?: boolean;\n\tisSubscriber?: boolean;\n}\n\n/** Grid / feed card. coverUrl is a signed URL (private bucket) or null. */\nexport interface AlbumCard {\n\tid: string;\n\ttitle: string;\n\tpriceTokens: number;\n\tphotoCount: number;\n\tpreviewCount: number;\n\tunlockCount: number;\n\tstatus: AlbumStatus;\n\t/** Fixed-vocabulary content tags (album-tags.ts), creator-picked, max 4. */\n\ttags: string[];\n\t/** How many of photoCount are video clips (photoCount counts BOTH). */\n\tvideoCount: number;\n\t/** The clips' running time added up, in seconds (RAT-621); 0 when a\n\t *  clip's length isn't known. */\n\tvideoSec: number;\n\tcoverUrl: string | null;\n\t/** Kind of the cover media — 'video' covers render a poster frame + play badge. */\n\tcoverKind: AlbumMediaKind;\n\t/** Signed poster frame for a video cover (instant thumbnail). Null otherwise. */\n\tcoverPosterUrl: string | null;\n\tcreator: AlbumCreator;\n\t/** Viewer has unlocked this album (or owns it). */\n\tunlocked: boolean;\n\t/** Viewer is the creator. */\n\tisOwner: boolean;\n\t/** RAT-641: set when the viewer hasn't passed the age check; coverUrl and\n\t *  coverPosterUrl then both hold the blurred stand-in (or null). */\n\tgate?: 'blur' | 'uploader';\n}\n\n/** A single photo in the detail view. `url` is null for locked (non-preview,\n *  not-unlocked) photos — the gate is real, no URL is ever emitted. */\nexport interface AlbumPhotoView {\n\tid: string;\n\turl: string | null;\n\t/** Signed poster frame for video items (instant thumbnail). Null for images. */\n\tposterUrl: string | null;\n\tkind: AlbumMediaKind;\n\t/** Clip length in seconds (video only). */\n\tdurationSec: number | null;\n\twidth: number | null;\n\theight: number | null;\n\tisPreview: boolean;\n\t/** True when this photo is gated for the viewer (no url emitted). */\n\tlocked: boolean;\n\t/** A blurred stand-in can be drawn for it (/album/[id]/blur/[photo].jpg):\n\t *  every image, and a clip with a poster. */\n\tblurrable?: boolean;\n\t/** RAT-641: a free (or unlocked) item the viewer can't see sharp until they\n\t *  pass the age check: `url` is the blurred stand-in, `posterUrl` null. */\n\tgate?: 'blur' | 'uploader';\n}\n\n/** Full album viewer payload (/album/[id]). */\nexport interface AlbumDetail extends AlbumCard {\n\tdescription: string | null;\n\tstatus: AlbumStatus;\n\tcreatedAt: string;\n\t/** First publish; null for a draft. */\n\tpublishedAt: string | null;\n\t/** The creator is banned or under review: only past buyers still see it. */\n\toffShelf: boolean;\n\tphotos: AlbumPhotoView[];\n}\n\n/** Owner-side editor row — every photo always carries a signed url. */\nexport interface AlbumEditorPhoto {\n\tid: string;\n\turl: string | null;\n\tkind: AlbumMediaKind;\n\tdurationSec: number | null;\n\twidth: number | null;\n\theight: number | null;\n\tisPreview: boolean;\n\tdisplayOrder: number;\n\tisCover: boolean;\n}\n\nexport interface AlbumEditor {\n\tid: string;\n\ttitle: string;\n\tdescription: string | null;\n\tpriceTokens: number;\n\ttags: string[];\n\t/** The creator set the tags by hand: the AI tagger leaves them alone. */\n\ttagsByUser: boolean;\n\t/** The creator says it was made with AI (kept apart from `tags` here). */\n\taiMade: boolean;\n\tstatus: AlbumStatus;\n\tphotoCount: number;\n\tpreviewCount: number;\n\tunlockCount: number;\n\tcoverPath: string | null;\n\tphotos: AlbumEditorPhoto[];\n}\n\n/** \"45s\", \"12 min\": how long an album's clips run together. */\nexport function clipLength(sec: number): string {\n\tconst s = Math.max(0, Math.round(sec));\n\treturn s < 60 ? `${s}s` : `${Math.round(s / 60)} min`;\n}\n\n/**\n * \"2 clips · 12 min · 9 photos\": photoCount counts every item, videoCount the\n * clips. The clips lead (RAT-621), so a set with video says so on the card\n * even when its cover is a photo.\n */\nexport function albumCountLabel(\n\talbum: Pick<AlbumCard, 'photoCount' | 'videoCount'> & { videoSec?: number }\n): string {\n\tconst photos = Math.max(0, album.photoCount - album.videoCount);\n\tconst bits: string[] = [];\n\tif (album.videoCount > 0) {\n\t\tbits.push(`${album.videoCount} ${album.videoCount === 1 ? 'clip' : 'clips'}`);\n\t\tif (album.videoSec) bits.push(clipLength(album.videoSec));\n\t}\n\tif (photos > 0) bits.push(`${photos} ${photos === 1 ? 'photo' : 'photos'}`);\n\treturn bits.join(' · ') || '0 photos';\n}\n","// Album tags — a FIXED, curated vocabulary (the arena-categories pattern),\n// deliberately not the community niche table: chips must never point at an\n// empty or hibernated bucket, and a browse filter needs a stable, short list.\n// Creators pick up to MAX_TAGS_PER_ALBUM in the editor; the /albums browse\n// page filters on them client-side (the whole catalog is already loaded).\n//\n// Grouped: WHO is in it (the top-level browse axis — guys, girls, couples,\n// trans), what it LOOKS like, the VIBE, and the KINK formats the /sph pages\n// list (RAT-617). Female-creator content is first class: tits/ass/lingerie/\n// cosplay etc. sit beside the dick vocabulary.\n\nexport type AlbumTag =\n\t// who\n\t| 'guys'\n\t| 'girls'\n\t| 'couples'\n\t| 'trans'\n\t// looks\n\t| 'big'\n\t| 'thick'\n\t| 'hard'\n\t| 'soft'\n\t| 'hairy'\n\t| 'shaved'\n\t| 'uncut'\n\t| 'tits'\n\t| 'ass'\n\t| 'pussy'\n\t| 'curvy'\n\t| 'petite'\n\t| 'milf'\n\t| 'bbc'\n\t| 'ebony'\n\t| 'latina'\n\t| 'asian'\n\t| 'tattoos'\n\t// vibe\n\t| 'solo'\n\t| 'cumshot'\n\t| 'blowjob'\n\t| 'anal'\n\t| 'toys'\n\t| 'closeup'\n\t| 'lingerie'\n\t| 'cosplay'\n\t| 'outdoor'\n\t| 'kinky'\n\t| 'feet'\n\t| 'video'\n\t| 'funny'\n\t// kink (RAT-617): what the /sph pages list\n\t| 'sph'\n\t| 'joi'\n\t| 'captions'\n\t| 'small'\n\t// made with AI: the album says so on its card and in its tags\n\t| 'ai';\n\nexport const ALBUM_TAG_GROUPS: { label: string; tags: AlbumTag[] }[] = [\n\t{ label: \"who's in it\", tags: ['guys', 'girls', 'couples', 'trans'] },\n\t{\n\t\tlabel: 'looks',\n\t\ttags: [\n\t\t\t'big',\n\t\t\t'thick',\n\t\t\t'hard',\n\t\t\t'soft',\n\t\t\t'hairy',\n\t\t\t'shaved',\n\t\t\t'uncut',\n\t\t\t'tits',\n\t\t\t'ass',\n\t\t\t'pussy',\n\t\t\t'curvy',\n\t\t\t'petite',\n\t\t\t'milf',\n\t\t\t'bbc',\n\t\t\t'ebony',\n\t\t\t'latina',\n\t\t\t'asian',\n\t\t\t'tattoos'\n\t\t]\n\t},\n\t{\n\t\tlabel: 'vibe',\n\t\ttags: [\n\t\t\t'solo',\n\t\t\t'cumshot',\n\t\t\t'blowjob',\n\t\t\t'anal',\n\t\t\t'toys',\n\t\t\t'closeup',\n\t\t\t'lingerie',\n\t\t\t'cosplay',\n\t\t\t'outdoor',\n\t\t\t'kinky',\n\t\t\t'feet',\n\t\t\t// no 'video': whether an album has clips comes from what's in it, and\n\t\t\t// the album browser's switch asks that (RAT-621). Albums that wear the\n\t\t\t// tag keep it; nobody picks it any more.\n\t\t\t'funny'\n\t\t]\n\t},\n\t{ label: 'kink', tags: ['sph', 'joi', 'captions', 'small', 'ai'] }\n];\n\nexport const ALBUM_TAGS: AlbumTag[] = ALBUM_TAG_GROUPS.flatMap((g) => g.tags);\n\nexport const MAX_TAGS_PER_ALBUM = 4;\n\nexport const ALBUM_TAG_LABELS: Record<AlbumTag, string> = {\n\tguys: 'guys',\n\tgirls: 'girls',\n\tcouples: 'couples',\n\ttrans: 'trans',\n\tbig: 'big',\n\tthick: 'thick',\n\thard: 'hard',\n\tsoft: 'soft',\n\thairy: 'hairy',\n\tshaved: 'shaved',\n\tuncut: 'uncut',\n\ttits: 'tits',\n\tass: 'ass',\n\tpussy: 'pussy',\n\tcurvy: 'curvy',\n\tpetite: 'petite',\n\tmilf: 'milf',\n\tbbc: 'bbc',\n\tebony: 'ebony',\n\tlatina: 'latina',\n\tasian: 'asian',\n\ttattoos: 'tattoos',\n\tsolo: 'solo',\n\tcumshot: 'cumshot',\n\tblowjob: 'blowjob',\n\tanal: 'anal',\n\ttoys: 'toys',\n\tcloseup: 'close-up',\n\tlingerie: 'lingerie',\n\tcosplay: 'cosplay',\n\toutdoor: 'outdoor',\n\tkinky: 'kinky',\n\tfeet: 'feet',\n\tvideo: 'video',\n\tfunny: 'funny',\n\tsph: 'SPH',\n\tjoi: 'JOI',\n\tcaptions: 'captions',\n\tsmall: 'small',\n\tai: 'AI-made'\n};\n\n/** Tags only the creator may set (RAT-617). Whether a scene is SPH or JOI\n *  can't be seen in three stills, nobody's size gets labelled \"small\" by a\n *  model, and whether an album is AI-made is the creator's to declare. */\nexport const CREATOR_ONLY_TAGS: readonly AlbumTag[] = ['sph', 'joi', 'small', 'ai'];\n\n/** The \"made with AI\" mark. It is stored with the tags (browse filters, the\n *  /sph lists and the watch title all read it there) but it is not one of the\n *  creator's four: the editor has its own switch for it, it never counts\n *  against MAX_TAGS_PER_ALBUM, and the auto-tagger keeps it. */\nexport const AI_TAG: AlbumTag = 'ai';\nexport const AI_MADE_LABEL = 'AI-made';\n\nexport function isAiAlbum(tags: readonly string[] | null | undefined): boolean {\n\treturn !!tags?.includes(AI_TAG);\n}\n\n/** The tags without the AI mark: what the picker shows and the limit counts. */\nexport function contentTags<T extends string>(tags: readonly T[]): T[] {\n\treturn tags.filter((t) => t !== AI_TAG);\n}\n\n/** Content tags (capped) plus the AI mark when set: what gets stored. */\nexport function withAiMark(tags: readonly AlbumTag[], aiMade: boolean): AlbumTag[] {\n\tconst content = contentTags(tags).slice(0, MAX_TAGS_PER_ALBUM);\n\treturn aiMade ? [...content, AI_TAG] : content;\n}\n\n/** What the AI tagger may pick from. */\nexport const AI_ALBUM_TAGS: AlbumTag[] = ALBUM_TAGS.filter((t) => !CREATOR_ONLY_TAGS.includes(t));\n\n/** `max` caps the count — the editor passes MAX_TAGS_PER_ALBUM (a card can't\n *  wear every tag); browse filters pass nothing (uncapped, harms no one). */\nexport function sanitizeAlbumTags(input: unknown, max = Infinity): AlbumTag[] {\n\tif (!Array.isArray(input)) return [];\n\tconst allowed = new Set<string>(ALBUM_TAGS);\n\tconst seen = new Set<AlbumTag>();\n\tfor (const raw of input) {\n\t\tif (typeof raw !== 'string') continue;\n\t\tconst v = raw.trim().toLowerCase();\n\t\tif (!allowed.has(v)) continue;\n\t\tseen.add(v as AlbumTag);\n\t\tif (seen.size >= max) break;\n\t}\n\treturn [...seen];\n}\n","<script lang=\"ts\">\n\timport type { AlbumMediaKind } from '$lib/types/album';\n\timport GatedMedia from '$lib/components/GatedMedia.svelte';\n\timport type { AgeGateSurface } from '$lib/age-gate';\n\n\t// Renders an album cover that may be an image OR a video clip. Video covers\n\t// show the first frame as a static poster (#t=0.1 forces it to decode) with a\n\t// play badge so the card reads as \"this set has clips\". The class is shared\n\t// with the <img> so the cover fills the card identically either way.\n\t// RAT-641: with `gate` set, `url` is the server's blurred stand-in (or null)\n\t// and the cover renders as GatedMedia: a tap asks for the age check instead\n\t// of following the card's link.\n\tlet {\n\t\turl,\n\t\tkind = 'image',\n\t\tposterUrl = null,\n\t\timgClass = '',\n\t\talt = '',\n\t\teager = false,\n\t\tgate = undefined,\n\t\tsurface = 'album'\n\t}: {\n\t\turl: string | null;\n\t\tkind?: AlbumMediaKind;\n\t\tposterUrl?: string | null;\n\t\timgClass?: string;\n\t\talt?: string;\n\t\t/** First card(s) of a rail: load now, at high priority, instead of lazily. */\n\t\teager?: boolean;\n\t\tgate?: 'blur' | 'uploader';\n\t\tsurface?: AgeGateSurface;\n\t} = $props();\n</script>\n\n{#if gate}\n\t<!-- Fills the cover box: GatedMedia's own size and position beat the\n\t\t utility classes, so the box is set on this wrapper. -->\n\t<span class=\"absolute inset-0 block\">\n\t\t<GatedMedia src={url} {gate} {surface} />\n\t</span>\n{:else if kind === 'video'}\n\t{#if posterUrl}\n\t\t<img src={posterUrl} {alt} loading={eager ? 'eager' : 'lazy'} fetchpriority={eager ? 'high' : 'auto'} decoding=\"async\" class={imgClass} />\n\t{:else}\n\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t<video src=\"{url}#t=0.1\" preload=\"metadata\" muted playsinline class={imgClass}></video>\n\t{/if}\n\t<span class=\"pointer-events-none absolute inset-0 grid place-items-center\" aria-hidden=\"true\">\n\t\t<span class=\"grid h-10 w-10 place-items-center rounded-full bg-black/55 backdrop-blur-sm\">\n\t\t\t<svg class=\"ml-0.5 h-5 w-5 text-white\" viewBox=\"0 0 24 24\" fill=\"currentColor\"\n\t\t\t\t><path d=\"M8 5v14l11-7z\" /></svg\n\t\t\t>\n\t\t</span>\n\t</span>\n{:else}\n\t<img src={url} {alt} loading={eager ? 'eager' : 'lazy'} fetchpriority={eager ? 'high' : 'auto'} decoding=\"async\" class={imgClass} />\n{/if}\n"],"version":3}