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E,IAAAA,EAAE,YAAY,EAA8B,IAAAA,EAAE,OAAO,EAGrD,IAAAA,EAAE,mCAAmC,EAyBpC,IAAAA,EAAE,cAAc,EAOhB,IAAAiB,EAAAmG,EAAW,EAAG,EAAIpH,EAAE,iBAAgB,CAAI,IAAGoH,EAAW,CAAA,CAAA,EAAMpH,EAAE,aAAa,EAS5E,IAAAiB,EAAAkG,EAAY,EAAGnH,EAAE,cAAc,EAAIA,EAAE,sBAAsB,IArC3DkB,EAAA,UAAAiX,EAOY/O,GAAM,CACbA,EAAE,MAAQ,SAASwC,GAAS,CACjC,CAAC,KATDuM,EAAA,IAAAlX,EAEYgG,EAAO,OAAPA,GAAO5F,CAAA,CAAA,YAenBoX,EAAA,IAEezT,EAAQ,OAAO,CAAA,EAI9B9D,EAAA,QAAAyX,GAEShN,EAAS,EAOnBzK,EAAA,QAAA2X,EAESjN,EAAS,MArDpB0L,CAAO,YArcJrW,EAAA0F,EAAmB,EAAApG,EAAAwY,EAAA,EAAA9X,EAUdwC,EAAI,IAAK,mBAqWTA,EAAI,IAAK,YAAWlD,EAAAyY,GAAA,CAAA,EAAA/X,EA8BpBwC,EAAI,IAAK,QAAOlD,EAAA0Y,GAAA,CAAA,EAAAhY,EAsDhBwC,EAAI,IAAK,cAAYlD,EAAA2Y,GAAA,CAAA,iBAhkBvB","names":["checked","$.state","button","$.first_child","fragment_1","div","$.sibling","div_1","div_2","h3","p","div_3","label","input","$.child","$.remove_input_defaults","span","t","$.index","$$anchor","part","i","span_1","root_3","$$render","consequent","button_1","text_3","$.reset","button_2","text_4","$.set_attribute","$0","$1","$.get","$.delegated","$$args","$.bind_checked","$$value","$.set","working","$.proxy","workingPhoto","$.user_effect","$$props","AXIS_VALUES","a","done","$.snapshot","root_1","h2","p_1","ArenaIdentityPicker","node_1","next","div_4","text_2","fade","fly","cubicOut","fileToDataUrl","file","resolve","reject","reader","dataUrlToFile","dataUrl","name","type","base64","binary","bytes","supabase","createSupabaseBrowserClient","step","deployMsg","showUpgradeModal","submittedId","showFeedPrompt","didCrosspost","boosting","boosted","boostExpiresAt","showConsentModal","shareCopied","navigatingToArena","goToArena","goto","writeToClipboard","text","ta","ok","copyShareLink","url","page","boostSubmission","r","setStep","newStep","replaceState","dragOver","selectedFile","savePhoto","animatable","selectedMediaType","uploadError","uploadedImagePath","isAnonymous","postToFeed","selectedCategories","identity","prefillIdentity","identityPayload","one","whoamiSheetOpen","whoamiSummary","$.derived","v","valueLabel","c","ARENA_CATEGORY_LABELS","whoamiCount","n","csamAck","oauthResumeIncoming","clearOauthResumeFlag","previewUrl","email","emailError","emailSending","otpCode","otpError","otpVerifying","otpCooldown","otpResendCount","cooldownInterval","submitting","submitError","MAX_IMAGE_BYTES","MAX_DIMENSION","MAX_VIDEO_BYTES","MAX_VIDEO_SECONDS","VIDEO_MIME","IMAGE_MIME","startOtpCooldown","seconds","compressImage","img","w","h","scale","canvas","quality","blob","validateVideoDuration","handleFile","heicToJpeg","detachIfImage","err","fail","pickFailure","analytics.trackUploadFail","analytics.trackPhotoUpload","useSavedPhoto","handleDrop","e","uploadImage","urlRes","urlResult","storageError","isStaleFileError","callAction","action","fields","fd","key","value","response","deserialize","handleConsentConfirm","analytics.trackArenaConsent","proceedToSubmit","goFromSettings","prepareOAuthRedirect","fileDataUrl","saveResume","onMount","resume","consumeResume","axis","x","deployToArena","askAge","openAgeGate","requireAge","path","verifyResult","result","analytics.trackArenaSubmit","data","d","AGE_REQUIRED","submitEmail","analytics.trackEmailSubmit","resendOtp","verifyOtp","error","analytics.trackOtpVerify","analytics.trackSignInComplete","onDestroy","$.head","UpgradeModal","node","ArenaConsentModal","ArenaIdentitySheet","node_2","root_2","$.template_effect","$.set_text","root_4","span_2","span_3","span_4","$.append","alternate","root_5","PostToFeedCta","node_6","consequent_1","div_5","node_5","node_7","text_7","text_8","consequent_2","alternate_1","p_2","node_8","text_10","text_11","consequent_3","alternate_2","consequent_4","section","root_10","div_6","p_3","text_12","section_1","root_11","div_7","div_8","root_12","p_4","StepIndicator","node_11","text_13","consequent_6","h1","fragment_5","span_5","text_14","p_5","h1_1","fragment_6","text_17","span_6","p_6","consequent_7","alternate_3","div_9","node_12","div_10","arenaUpload","div_11","root_16","node_14","video","root_17","img_1","root_18","consequent_8","alternate_4","button_3","button_4","fragment_8","div_12","p_7","p_8","span_7","text_21","p_9","div_13","div_14","p_10","p_11","$.event","consequent_9","alternate_5","node_13","ReusePhoto","node_15","analytics.trackSavePhotoToggle","openAuthSheet","button_5","root_20","span_8","span_9","consequent_10","div_15","button_6","fragment_9","span_10","span_11","text_27","span_12","text_28","consequent_11","alternate_6","span_13","span_14","span_15","button_7","span_16","span_17","span_18","span_19","button_8","span_20","span_21","span_22","text_33","span_23","span_24","root_24","consequent_12","$.set_class","msg","item","div_16","root_26","div_17","svg","path_1","div_18","p_12","p_13","consequent_13","alternate_7","p_14","root_27","consequent_14","p_15","root_28","consequent_15","div_19","root_29","button_9","text_41","consequent_16","section_2","root_30","div_20","text_42","span_25","div_21","p_16","p_17","section_3","root_31","div_22","div_23","p_18","node_24","h2_1","span_26","text_47","p_19","div_24","OAuthButtonRow","div_25","input_1","node_26","p_20","root_32","consequent_19","div_26","button_10","text_51","button_11","text_52","section_4","root_33","div_27","div_28","p_21","node_27","h2_2","span_27","text_54","p_22","span_28","text_56","div_29","input_2","node_28","p_23","root_34","consequent_21","div_30","button_12","text_59","button_13","text_60","button_14","text_61","consequent_5","consequent_18","consequent_20","consequent_22"],"sources":["../../../../../../src/lib/components/arena/ArenaConsentModal.svelte","../../../../../../src/lib/components/arena/ArenaIdentitySheet.svelte","../../../../../../src/routes/a/submit/+page.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\tinterface Props {\n\t\topen: boolean;\n\t\tonconfirm: () => void;\n\t\toncancel: () => void;\n\t}\n\n\tlet { open, onconfirm, oncancel }: Props = $props();\n\n\tlet checked = $state(false);\n</script>\n\n{#if open}\n\t<button\n\t\tclass=\"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm\"\n\t\tonclick={oncancel}\n\t\taria-label={t('Close')}\n\t></button>\n\t<div class=\"fixed inset-0 z-[101] flex items-center justify-center p-5\" role=\"dialog\" aria-modal=\"true\" aria-label={t('Consent')}>\n\t\t<div class=\"w-full max-w-sm rounded-2xl border border-border bg-bg p-6 shadow-2xl\">\n\t\t\t<div class=\"text-center\">\n\t\t\t\t<div class=\"mx-auto flex h-12 w-12 items-center justify-center rounded-xl border border-orange/20 bg-orange/5\">\n\t\t\t\t\t<svg class=\"h-5 w-5 text-orange\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1.5\">\n\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.047 8.287 8.287 0 009 9.601a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z\" />\n\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 18a3.75 3.75 0 00.495-7.468 5.99 5.99 0 00-1.925 3.547 5.975 5.975 0 01-2.133-1.001A3.75 3.75 0 0012 18z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"mt-4 font-display text-xl font-bold tracking-tight\">{t('enter the arena')}</h3>\n\t\t\t\t<p class=\"mt-1.5 text-[13px] leading-relaxed text-muted\">\n\t\t\t\t\t{t('your photo will be visible to other arena users. they can vote and react. you can remove it anytime.')}\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<div class=\"mt-6 rounded-xl border border-border bg-surface p-4\">\n\t\t\t\t<label class=\"flex cursor-pointer items-start gap-3\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tbind:checked\n\t\t\t\t\t\tclass=\"mt-0.5 h-4 w-4 rounded border-border bg-bg text-orange focus:ring-orange/30\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span class=\"text-[13px] leading-relaxed text-muted\">\n\t\t\t\t\t\t{#each t('I confirm I am {age} and consent to this photo appearing in the public arena. I understand other users will see and react to it.').split('{age}') as part, i (i)}{#if i}<span class=\"font-semibold text-text\">18+</span>{/if}{part}{/each}\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t</div>\n\n\t\t\t<button\n\t\t\t\tclass=\"mt-5 w-full rounded-xl bg-orange py-3 font-display text-sm font-semibold text-white transition-all hover:bg-orange-dark active:scale-[0.98] disabled:opacity-40\"\n\t\t\t\tdisabled={!checked}\n\t\t\t\tonclick={onconfirm}\n\t\t\t>\n\t\t\t\t{t(\"let's go\")}\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\tclass=\"mt-3 w-full text-center text-xs font-medium text-muted/30 transition-colors hover:text-muted\"\n\t\t\t\tonclick={oncancel}\n\t\t\t>\n\t\t\t\t{t('nevermind')}\n\t\t\t</button>\n\t\t</div>\n\t</div>\n{/if}\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\t// RAT-426 (C1): the submit-side \"who i am\" bottom sheet. Same chrome + batching\n\t// as the category picker — picks are held in a working copy and committed once\n\t// on \"done\" (the trigger button shows a summary, so the sheet only opens on tap).\n\t// Wraps ArenaIdentityPicker (whoami) WITH photo tags, so this single sheet\n\t// replaces the old separate \"categories\" picker.\n\timport { fade, fly } from 'svelte/transition';\n\timport { cubicOut } from 'svelte/easing';\n\timport ArenaIdentityPicker from './ArenaIdentityPicker.svelte';\n\timport { AXIS_VALUES } from '$lib/types/arena-identity';\n\n\tinterface Props {\n\t\topen: boolean;\n\t\tvalue: Record<string, string[]>;\n\t\tphoto: string[];\n\t\tonclose: () => void;\n\t\toncommit: (value: Record<string, string[]>, photo: string[]) => void;\n\t}\n\n\tlet { open, value, photo, onclose, oncommit }: Props = $props();\n\n\tlet working = $state<Record<string, string[]>>({});\n\tlet workingPhoto = $state<string[]>([]);\n\t$effect(() => {\n\t\tif (open) {\n\t\t\tworking = Object.fromEntries(Object.keys(AXIS_VALUES).map((a) => [a, [...(value[a] ?? [])]]));\n\t\t\tworkingPhoto = [...photo];\n\t\t}\n\t});\n\n\tfunction done() {\n\t\toncommit($state.snapshot(working), $state.snapshot(workingPhoto));\n\t\tonclose();\n\t}\n</script>\n\n{#if open}\n\t<div class=\"fixed inset-0 z-[100] flex items-end justify-center sm:items-center\" role=\"dialog\" aria-modal=\"true\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"absolute inset-0 cursor-default bg-black/70 backdrop-blur-sm\"\n\t\t\tonclick={done}\n\t\t\taria-label={t('close')}\n\t\t\ttransition:fade={{ duration: 180 }}\n\t\t></button>\n\n\t\t<div\n\t\t\tclass=\"relative flex max-h-[85vh] w-full max-w-md flex-col rounded-t-2xl border-x border-t border-border bg-bg sm:rounded-2xl sm:border\"\n\t\t\ttransition:fly={{ y: 80, duration: 240, easing: cubicOut }}\n\t\t>\n\t\t\t<div class=\"shrink-0 px-5 pt-5\">\n\t\t\t\t<div class=\"mx-auto mb-4 h-1 w-10 rounded-full bg-border sm:hidden\"></div>\n\t\t\t\t<h2 class=\"font-display text-lg font-bold\">{t('who i am')}</h2>\n\t\t\t\t<p class=\"mt-0.5 text-[11px] tracking-wide text-muted/50 uppercase\">\n\t\t\t\t\t{t('optional · helps the right people find you')}\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<div class=\"min-h-0 flex-1 overflow-y-auto px-5 py-4\">\n\t\t\t\t<ArenaIdentityPicker\n\t\t\t\t\tvariant=\"whoami\"\n\t\t\t\t\tvalue={working}\n\t\t\t\t\tphoto={workingPhoto}\n\t\t\t\t\tonchange={(next, p) => {\n\t\t\t\t\t\tworking = next;\n\t\t\t\t\t\tworkingPhoto = p;\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<div class=\"shrink-0 px-5 pt-2 pb-7\">\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"w-full cursor-pointer rounded-xl bg-orange py-3 font-display text-[14px] font-semibold text-white transition-colors hover:bg-orange-dark\"\n\t\t\t\t\tonclick={done}\n\t\t\t\t>\n\t\t\t\t\t{t('done')}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{/if}\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport { msg } from '$lib/i18n/mark';\n\timport { goto, replaceState } from '$app/navigation';\n\timport { page } from '$app/state';\n\timport { deserialize } from '$app/forms';\n\timport { onDestroy, onMount } from 'svelte';\n\timport { browser } from '$app/environment';\n\timport StepIndicator from '$lib/components/StepIndicator.svelte';\n\timport UpgradeModal from '$lib/components/UpgradeModal.svelte';\n\timport ArenaConsentModal from '$lib/components/arena/ArenaConsentModal.svelte';\n\timport ArenaIdentitySheet from '$lib/components/arena/ArenaIdentitySheet.svelte';\n\timport { AXIS_VALUES, valueLabel, type ArenaAxis } from '$lib/types/arena-identity';\n\timport { prefillIdentity } from '$lib/quiz/engine';\n\timport OAuthButtonRow from '$lib/components/auth/OAuthButtonRow.svelte';\n\timport PostToFeedCta from '$lib/components/post/PostToFeedCta.svelte';\n\timport ReusePhoto from '$lib/components/ReusePhoto.svelte';\n\timport { createSupabaseBrowserClient } from '$lib/supabase';\n\timport { openAuthSheet } from '$lib/stores/authSheet';\n\timport { openAgeGate, requireAge } from '$lib/stores/ageGate';\n\timport { AGE_REQUIRED } from '$lib/age-gate';\n\timport * as analytics from '$lib/analytics';\n\timport { saveResume, consumeResume } from '$lib/oauth-resume';\n\timport { heicToJpeg } from '$lib/utils/heic-to-jpeg';\n\timport { detachIfImage, isStaleFileError, pickFailure } from '$lib/utils/stale-file';\n\timport {\n\t\tARENA_CATEGORY_LABELS,\n\t\tMAX_CATEGORIES_PER_SUBMISSION,\n\t\ttype ArenaCategory\n\t} from '$lib/types/arena';\n\n\t// /a/submit is auth-gated all the way: /api/arena/upload-url returns\n\t// 401 unless a session exists, so we cannot upload BEFORE the OAuth\n\t// redirect (the user isn't authed yet). Instead we serialize the picked\n\t// file to a base64 data URL, stash it with the settings, and reconstruct\n\t// + upload + submit AFTER auth lands. localStorage caps at ~5 MB on most\n\t// browsers — fine for the 4 MB image cap; videos (up to 50 MB) won't\n\t// fit and fall back to email-OTP only (the OAuth row is hidden then).\n\ttype ArenaResume = {\n\t\tfileDataUrl: string;\n\t\tfileName: string;\n\t\tfileType: string;\n\t\tmediaType: 'image' | 'video';\n\t\tisAnonymous: boolean;\n\t\tcategories: ArenaCategory[];\n\t\t/** RAT-648: the \"who i am\" picks (a quiz or kink list prefills them),\n\t\t *  so a Google sign-in doesn't post the card without them. */\n\t\tidentity?: Record<string, string[]>;\n\t};\n\n\tfunction fileToDataUrl(file: File): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst reader = new FileReader();\n\t\t\treader.onload = () => resolve(reader.result as string);\n\t\t\treader.onerror = () => reject(reader.error);\n\t\t\treader.readAsDataURL(file);\n\t\t});\n\t}\n\n\tfunction dataUrlToFile(dataUrl: string, name: string, type: string): File {\n\t\tconst [, base64] = dataUrl.split(',');\n\t\tconst binary = atob(base64);\n\t\tconst bytes = new Uint8Array(binary.length);\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n\t\treturn new File([bytes], name, { type });\n\t}\n\n\tlet { data } = $props();\n\tconst supabase = createSupabaseBrowserClient();\n\n\t// RAT-170: 'settings' merged into 'upload' — when a file is selected,\n\t// the upload page reveals settings (anonymous + visibility) inline\n\t// + a deploy button. Cuts the flow from 5 steps to 4 (3 user-facing).\n\ttype Step = 'upload' | 'deploying' | 'email' | 'verify-otp';\n\tlet step = $state<Step>('upload');\n\tlet deployMsg = $state(t('uploading photo...'));\n\tlet showUpgradeModal = $state(false);\n\t// RAT-271: after the submission lands we surface a \"share to feed?\"\n\t// prompt instead of redirecting straight to /a. Holds the new\n\t// submission id so PostToFeedCta can target it.\n\tlet submittedId = $state<string | null>(null);\n\tlet showFeedPrompt = $state(false);\n\t// RAT-446: whether the server auto-crossposted this submission to /f (the\n\t// default-on toggle). Drives the post-deploy modal — a crossposted upload\n\t// hides the redundant \"post to your feed\" CTA and confirms it's on the feed.\n\tlet didCrosspost = $state(false);\n\t// Post-deploy arena boost (5 tokens → 24h spotlight in the swipe deck).\n\tlet boosting = $state(false);\n\tlet boosted = $state(false);\n\tlet boostExpiresAt = $state<string | null>(null);\n\tlet showConsentModal = $state(false);\n\t// RAT-330: copy/share the public submission link from the post-deploy\n\t// prompt so the user can spread it on socials for more votes → matches.\n\tlet shareCopied = $state(false);\n\t// RAT-459: the post-deploy modal's skip / post buttons wire straight to\n\t// goto('/a'), and /a's server load fires ~8 parallel queries — on a cold\n\t// function that's a 1–3s stall (the CLAUDE.md warning) during which the\n\t// modal sits frozen and the user rage-clicks. Flip a navigating flag the\n\t// instant they tap so the button shows a spinner + disables while /a loads,\n\t// instead of looking dead. Cleared on unmount by the navigation itself.\n\tlet navigatingToArena = $state(false);\n\tfunction goToArena() {\n\t\tif (navigatingToArena) return;\n\t\tnavigatingToArena = true;\n\t\t// On success the page unmounts mid-navigation; only the rare reject path\n\t\t// needs to un-stick the button so the user can retry rather than stare at\n\t\t// a permanent spinner.\n\t\tgoto('/a').catch(() => (navigatingToArena = false));\n\t}\n\n\t// RAT-330: clipboard-only, mirroring ShareButton (RAT-301). The earlier\n\t// shareOrCopy() path opened the native share sheet; picking \"Copy\" there\n\t// pasted the share `text` after the URL, so the copied link became\n\t// \"/a/s/<id> swipe on my arena shot 👀\" and 500'd on the UUID cast.\n\t// A direct clipboard.writeText guarantees a clean, pasteable link.\n\tasync function writeToClipboard(text: string): Promise<boolean> {\n\t\tif (navigator.clipboard?.writeText) {\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(text);\n\t\t\t\treturn true;\n\t\t\t} catch {\n\t\t\t\t/* fall through to legacy */\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tconst ta = document.createElement('textarea');\n\t\t\tta.value = text;\n\t\t\tta.style.position = 'fixed';\n\t\t\tta.style.opacity = '0';\n\t\t\tdocument.body.appendChild(ta);\n\t\t\tta.focus();\n\t\t\tta.select();\n\t\t\tconst ok = document.execCommand('copy');\n\t\t\tdocument.body.removeChild(ta);\n\t\t\treturn ok;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tasync function copyShareLink() {\n\t\tif (!submittedId) return;\n\t\tconst url = `${page.url.origin}/arena/s/${submittedId}`;\n\t\tconst ok = await writeToClipboard(url);\n\t\tif (ok) {\n\t\t\tshareCopied = true;\n\t\t\tsetTimeout(() => (shareCopied = false), 2000);\n\t\t}\n\t}\n\n\t// RAT-446: token-boost the fresh submission straight from the post-deploy\n\t// modal (5 tokens → 24h, 3x visibility in the swipe deck). Reuses the live\n\t// /api/arena/boost endpoint; insufficient balance opens the upgrade modal.\n\tasync function boostSubmission() {\n\t\tif (!submittedId || boosting || boosted) return;\n\t\tif (data.tokens < 5) {\n\t\t\tshowUpgradeModal = true;\n\t\t\treturn;\n\t\t}\n\t\tboosting = true;\n\t\ttry {\n\t\t\tconst res = await fetch('/api/arena/boost', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({ submissionId: submittedId })\n\t\t\t});\n\t\t\tconst r = await res.json();\n\t\t\tif (r?.error === 'insufficient_tokens') {\n\t\t\t\tshowUpgradeModal = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (r?.ok) {\n\t\t\t\tboosted = true;\n\t\t\t\tboostExpiresAt = r.expiresAt ?? null;\n\t\t\t}\n\t\t} finally {\n\t\t\tboosting = false;\n\t\t}\n\t}\n\n\tfunction setStep(newStep: Step) {\n\t\tstep = newStep;\n\t\tconst url = new URL(page.url);\n\t\tif (newStep === 'upload') url.searchParams.delete('step');\n\t\telse url.searchParams.set('step', newStep);\n\t\treplaceState(url, {});\n\t}\n\n\t// File state\n\tlet dragOver = $state(false);\n\tlet selectedFile = $state<File | null>(null);\n\tlet savePhoto = $state(true);\n\t// Photo animation opt-in — default on; only shown for image submissions.\n\tlet animatable = $state(true);\n\tlet selectedMediaType = $state<'image' | 'video'>('image');\n\tlet uploadError = $state('');\n\tlet uploadedImagePath = $state<string | null>(null);\n\n\t// Settings state. The displayed nickname is always data.userNickname — server\n\t// is the source of truth for it (RAT-15), profile is auto-populated for every\n\t// user, and edits live on /profile.\n\tlet isAnonymous = $state(false);\n\t// RAT-446: default-on \"show on the feed too\" — the server auto-crossposts\n\t// the submission to /f as a creator_post. Anonymous uploads can't crosspost\n\t// (feed posts carry the handle), so the toggle is moot while anonymous.\n\tlet postToFeed = $state(true);\n\tlet selectedCategories = $state<ArenaCategory[]>([]);\n\t// RAT-426 (C1): \"who i am\" identity axes. The picker stores each axis as a\n\t// string[] (single-select axes hold length ≤ 1); flattened to the server\n\t// payload on submit. Photo tags stay on selectedCategories above.\n\t// RAT-648: a quiz result links here with ?role=&position=&kinks= and those\n\t// picks start selected (validated, kinks capped); all of them stay editable.\n\tlet identity = $state<Record<string, string[]>>(prefillIdentity(page.url.searchParams));\n\tfunction identityPayload() {\n\t\tconst one = (a: string[]) => a[0] ?? null;\n\t\treturn {\n\t\t\trole: one(identity.role),\n\t\t\torientation: one(identity.orientation),\n\t\t\tgender: one(identity.gender),\n\t\t\tposition: one(identity.position),\n\t\t\tage: one(identity.age),\n\t\t\tbody: identity.body,\n\t\t\tkinks: identity.kinks,\n\t\t\tethnicity: identity.ethnicity\n\t\t};\n\t}\n\t// RAT-426: the single \"who i am\" trigger (identity axes + photo tags in one\n\t// sheet). The button shows a summary + count of everything picked.\n\tlet whoamiSheetOpen = $state(false);\n\tconst whoamiSummary = $derived(\n\t\t[\n\t\t\t...(Object.keys(AXIS_VALUES) as ArenaAxis[]).flatMap((a) =>\n\t\t\t\t(identity[a] ?? []).map((v) => valueLabel(a, v))\n\t\t\t),\n\t\t\t...selectedCategories.map((c) => ARENA_CATEGORY_LABELS[c])\n\t\t].join(', ')\n\t);\n\tconst whoamiCount = $derived(\n\t\t(Object.keys(AXIS_VALUES) as ArenaAxis[]).reduce((n, a) => n + (identity[a]?.length ?? 0), 0) +\n\t\t\tselectedCategories.length\n\t);\n\t// RAT-272 follow-up: per-upload csamAck checkbox dropped. Audit row\n\t// still writes server-side.\n\tconst csamAck = true;\n\n\t// RAT-165: server-aware OAuth resume probe via URL flag.\n\tlet oauthResumeIncoming = $state(page.url.searchParams.get('oauth_resume') === '1');\n\tfunction clearOauthResumeFlag() {\n\t\tif (!browser) return;\n\t\tconst url = new URL(page.url);\n\t\tif (!url.searchParams.has('oauth_resume')) return;\n\t\turl.searchParams.delete('oauth_resume');\n\t\treplaceState(url, {});\n\t}\n\n\tconst previewUrl = $derived(selectedFile ? URL.createObjectURL(selectedFile) : null);\n\n\t// Auth state\n\tlet email = $state('');\n\tlet emailError = $state('');\n\tlet emailSending = $state(false);\n\tlet otpCode = $state('');\n\tlet otpError = $state('');\n\tlet otpVerifying = $state(false);\n\tlet otpCooldown = $state(0);\n\tlet otpResendCount = $state(0);\n\tlet cooldownInterval: ReturnType<typeof setInterval> | null = null;\n\n\t// Submit state\n\tlet submitting = $state(false);\n\tlet submitError = $state('');\n\n\tconst MAX_IMAGE_BYTES = 4 * 1024 * 1024;\n\tconst MAX_DIMENSION = 4000;\n\tconst MAX_VIDEO_BYTES = 500 * 1024 * 1024; // RAT-437: raised from 50 MB\n\tconst MAX_VIDEO_SECONDS = 600; // RAT-437: 10 min (was 30s)\n\tconst VIDEO_MIME = ['video/mp4', 'video/webm', 'video/quicktime'];\n\tconst IMAGE_MIME = ['image/jpeg', 'image/png', 'image/webp'];\n\n\tfunction startOtpCooldown() {\n\t\tconst seconds = 60 + Math.min(otpResendCount, 3) * 30;\n\t\totpCooldown = seconds;\n\t\tif (cooldownInterval) clearInterval(cooldownInterval);\n\t\tcooldownInterval = setInterval(() => {\n\t\t\totpCooldown--;\n\t\t\tif (otpCooldown <= 0) {\n\t\t\t\totpCooldown = 0;\n\t\t\t\tif (cooldownInterval) clearInterval(cooldownInterval);\n\t\t\t\tcooldownInterval = null;\n\t\t\t}\n\t\t}, 1000);\n\t}\n\n\tasync function compressImage(file: File): Promise<File> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst img = new Image();\n\t\t\tconst url = URL.createObjectURL(file);\n\t\t\timg.onload = async () => {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t\tlet { naturalWidth: w, naturalHeight: h } = img;\n\t\t\t\tif (w > MAX_DIMENSION || h > MAX_DIMENSION) {\n\t\t\t\t\tconst scale = MAX_DIMENSION / Math.max(w, h);\n\t\t\t\t\tw = Math.round(w * scale);\n\t\t\t\t\th = Math.round(h * scale);\n\t\t\t\t}\n\t\t\t\tconst canvas = document.createElement('canvas');\n\t\t\t\tcanvas.width = w;\n\t\t\t\tcanvas.height = h;\n\t\t\t\tconst ctx = canvas.getContext('2d')!;\n\t\t\t\tctx.drawImage(img, 0, 0, w, h);\n\t\t\t\tlet quality = 0.85;\n\t\t\t\tlet blob: Blob | null = null;\n\t\t\t\twhile (quality > 0.3) {\n\t\t\t\t\tblob = await new Promise<Blob | null>((r) => canvas.toBlob(r, 'image/jpeg', quality));\n\t\t\t\t\tif (blob && blob.size <= MAX_IMAGE_BYTES) break;\n\t\t\t\t\tquality -= 0.1;\n\t\t\t\t}\n\t\t\t\tif (blob)\n\t\t\t\t\tresolve(new File([blob], file.name.replace(/\\.[^.]+$/, '.jpg'), { type: 'image/jpeg' }));\n\t\t\t\telse resolve(file);\n\t\t\t};\n\t\t\timg.onerror = () => {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t\tresolve(file);\n\t\t\t};\n\t\t\timg.src = url;\n\t\t});\n\t}\n\n\tfunction validateVideoDuration(file: File): Promise<boolean> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst url = URL.createObjectURL(file);\n\t\t\tconst v = document.createElement('video');\n\t\t\tv.preload = 'metadata';\n\t\t\tv.onloadedmetadata = () => {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t\tresolve(v.duration <= MAX_VIDEO_SECONDS);\n\t\t\t};\n\t\t\tv.onerror = () => {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t\tresolve(false);\n\t\t\t};\n\t\t\tv.src = url;\n\t\t});\n\t}\n\n\tasync function handleFile(file: File | undefined) {\n\t\tif (!file) return;\n\t\tuploadError = '';\n\n\t\t// HEIC pre-pass: transparently convert iphone HEIC → JPEG so the\n\t\t// downstream mime allowlist accepts it and compressImage can decode.\n\t\t// `detachIfImage` reads the bytes now so the OS handle can't die during\n\t\t// the login flow, and skips videos — reading a 500 MB clip into memory\n\t\t// here would take the tab down before the size check below ever runs\n\t\t// (see $lib/utils/stale-file). A file that can't be read at all throws in\n\t\t// these reads — said under the picker, not dropped (see pickFailure).\n\t\ttry {\n\t\t\tfile = await heicToJpeg(await detachIfImage(file));\n\t\t} catch (err) {\n\t\t\tconst fail = pickFailure(err);\n\t\t\tanalytics.trackUploadFail({ error: fail.error, context: 'arena_pick', stale: fail.stale });\n\t\t\tuploadError = fail.message;\n\t\t\treturn;\n\t\t}\n\n\t\tif (VIDEO_MIME.includes(file.type)) {\n\t\t\tif (file.size > MAX_VIDEO_BYTES) {\n\t\t\t\tuploadError = t('video too large. max 500mb.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst ok = await validateVideoDuration(file);\n\t\t\tif (!ok) {\n\t\t\t\tuploadError = t('video too long. keep it under 10 min.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tselectedMediaType = 'video';\n\t\t\tselectedFile = file;\n\t\t} else if (IMAGE_MIME.includes(file.type)) {\n\t\t\tselectedMediaType = 'image';\n\t\t\tselectedFile = await compressImage(file);\n\t\t} else {\n\t\t\tuploadError = t('unsupported file. jpeg, png, webp, mp4, webm, mov only.');\n\t\t\treturn;\n\t\t}\n\n\t\tanalytics.trackPhotoUpload('arena');\n\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\t// File picked → settings reveal inline on the same page (no step change).\n\t}\n\n\t// Photo reuse: pull the saved photo down as a File and run the normal flow.\n\tasync function useSavedPhoto() {\n\t\tif (!data.lastPhotoUrl) return;\n\t\ttry {\n\t\t\tconst res = await fetch(data.lastPhotoUrl);\n\t\t\tconst blob = await res.blob();\n\t\t\tselectedMediaType = 'image';\n\t\t\tselectedFile = new File([blob], 'reused.jpg', { type: blob.type || 'image/jpeg' });\n\t\t\tanalytics.trackPhotoUpload('arena');\n\t\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\t} catch {\n\t\t\tuploadError = t('could not load your saved photo — upload a new one.');\n\t\t}\n\t}\n\n\tasync function handleDrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\tdragOver = false;\n\t\tawait handleFile(e.dataTransfer?.files[0]);\n\t}\n\n\tasync function uploadImage(): Promise<string | null> {\n\t\tif (!selectedFile) return null;\n\n\t\t// Two-step upload to dodge Vercel's 4.5 MB function-body cap: ask the\n\t\t// server for a one-time signed URL, then PUT the file straight to\n\t\t// Supabase Storage. Bucket-level limits (size + MIME) still apply.\n\t\tconst urlRes = await fetch('/api/arena/upload-url', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\tbody: JSON.stringify({ mimeType: selectedFile.type, size: selectedFile.size })\n\t\t});\n\t\tconst urlResult = await urlRes.json();\n\t\tif (!urlRes.ok || !urlResult.path || !urlResult.token) {\n\t\t\tconsole.error('Upload URL failed:', urlResult.error);\n\t\t\tanalytics.trackUploadFail({\n\t\t\t\terror: urlResult.error || `upload-url ${urlRes.status}`,\n\t\t\t\tcontext: 'arena',\n\t\t\t\tstale: false\n\t\t\t});\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { error: storageError } = await supabase.storage\n\t\t\t.from('arena-photos')\n\t\t\t.uploadToSignedUrl(urlResult.path, urlResult.token, selectedFile, {\n\t\t\t\tcontentType: selectedFile.type,\n\t\t\t\tupsert: false\n\t\t\t});\n\t\tif (storageError) {\n\t\t\tconsole.error('Storage upload failed:', storageError);\n\t\t\tanalytics.trackUploadFail({\n\t\t\t\terror: storageError.message,\n\t\t\t\tcontext: 'arena',\n\t\t\t\tstale: isStaleFileError(storageError)\n\t\t\t});\n\t\t\treturn null;\n\t\t}\n\t\treturn urlResult.path as string;\n\t}\n\n\tasync function callAction(action: string, fields: Record<string, string>) {\n\t\tconst fd = new FormData();\n\t\tfor (const [key, value] of Object.entries(fields)) fd.append(key, value);\n\t\tconst response = await fetch(`/a/submit?/${action}`, { method: 'POST', body: fd });\n\t\treturn deserialize(await response.text());\n\t}\n\n\n\tfunction handleConsentConfirm() {\n\t\tanalytics.trackArenaConsent();\n\t\tshowConsentModal = false;\n\t\tproceedToSubmit();\n\t}\n\n\tasync function goFromSettings() {\n\t\tif (!data.session) {\n\t\t\tshowConsentModal = true;\n\t\t\treturn;\n\t\t}\n\t\tshowConsentModal = true;\n\t}\n\n\t// RAT-165: OAuth resume for arena submission. Pre-redirect: SERIALIZE\n\t// the file (we're not auth'd yet, so /api/arena/upload-url would 401);\n\t// post-redirect: deserialize, do the actual upload + submit via\n\t// deployToArena now that we have a session.\n\tasync function prepareOAuthRedirect(): Promise<boolean | { ok: boolean; reason?: string }> {\n\t\tif (!selectedFile) {\n\t\t\tsetStep('upload');\n\t\t\treturn false;\n\t\t}\n\t\t// Clear any stale email-path error, then hand refusal reasons back to\n\t\t// OAuthButtonRow so it renders them under the Google button (a single\n\t\t// voice) instead of setting a separate emailError.\n\t\temailError = '';\n\t\t// Hard size guard: localStorage tops out around 5 MB on most browsers,\n\t\t// and base64 inflates by ~33%. Bail out cleanly on videos that would\n\t\t// blow the quota — those users keep email-OTP as the path.\n\t\tif (selectedFile.size > 3 * 1024 * 1024) {\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\treason: 'this file is too big for one-tap sign-in. use email below instead.'\n\t\t\t};\n\t\t}\n\t\ttry {\n\t\t\tconst fileDataUrl = await fileToDataUrl(selectedFile);\n\t\t\tconst ok = saveResume<ArenaResume>('arena-submit', {\n\t\t\t\tfileDataUrl,\n\t\t\t\tfileName: selectedFile.name,\n\t\t\t\tfileType: selectedFile.type,\n\t\t\t\tmediaType: selectedMediaType,\n\t\t\t\tisAnonymous,\n\t\t\t\tcategories: selectedCategories,\n\t\t\t\tidentity: $state.snapshot(identity)\n\t\t\t});\n\t\t\tif (!ok) {\n\t\t\t\treturn { ok: false, reason: t(\"couldn't prepare for sign-in (storage full?). try email.\") };\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.error('prepareOAuthRedirect failed', err);\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\treason: 'something went wrong preparing the file. try again or use email.'\n\t\t\t};\n\t\t}\n\t}\n\n\tonMount(async () => {\n\t\t// Hard-reload guard: bounce to upload step if state is gone and the\n\t\t// user is on a downstream step they can't actually proceed from.\n\t\tif (!data.session && (step === 'email' || step === 'verify-otp') && !selectedFile) {\n\t\t\tsetStep('upload');\n\t\t\treturn;\n\t\t}\n\t\tif (!data.session) {\n\t\t\toauthResumeIncoming = false;\n\t\t\tclearOauthResumeFlag();\n\t\t\treturn;\n\t\t}\n\t\tconst resume = consumeResume<ArenaResume>('arena-submit');\n\t\tif (!resume) {\n\t\t\toauthResumeIncoming = false;\n\t\t\tclearOauthResumeFlag();\n\t\t\treturn;\n\t\t}\n\t\t// Reconstruct the File from the saved data URL, then run the normal\n\t\t// deploy path — now that we have a session, /api/arena/upload-url\n\t\t// will accept the upload.\n\t\ttry {\n\t\t\tselectedFile = dataUrlToFile(resume.fileDataUrl, resume.fileName, resume.fileType);\n\t\t} catch (err) {\n\t\t\tconsole.error('OAuth resume: dataUrlToFile failed', err);\n\t\t\toauthResumeIncoming = false;\n\t\t\tclearOauthResumeFlag();\n\t\t\tsubmitError = t('something went wrong restoring your file. try again.');\n\t\t\treturn;\n\t\t}\n\t\tselectedMediaType = resume.mediaType;\n\t\tisAnonymous = resume.isAnonymous;\n\t\tselectedCategories = Array.isArray(resume.categories) ? resume.categories : [];\n\t\tif (resume.identity && typeof resume.identity === 'object') {\n\t\t\t// only the axes this page knows, only string picks; the server\n\t\t\t// sanitizes the payload again on submit\n\t\t\tfor (const axis of Object.keys(identity)) {\n\t\t\t\tconst v = resume.identity[axis];\n\t\t\t\tif (Array.isArray(v)) identity[axis] = v.filter((x) => typeof x === 'string');\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tawait deployToArena();\n\t\t} finally {\n\t\t\t// deployToArena drives `step` to 'deploying' then navigates to /a.\n\t\t\t// If something errored along the way, bring the UI back so the user\n\t\t\t// can retry instead of looking at a stuck loader.\n\t\t\tif (submitError) oauthResumeIncoming = false;\n\t\t}\n\t});\n\n\tasync function proceedToSubmit() {\n\t\tif (data.session) {\n\t\t\tawait deployToArena();\n\t\t\treturn;\n\t\t}\n\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\tsetTimeout(() => setStep('email'), 300);\n\t}\n\n\t/** RAT-641: the age check, then this deploy again. */\n\tfunction askAge() {\n\t\topenAgeGate({ surface: 'publish_arena', mode: 'publish', onPass: () => void deployToArena() });\n\t}\n\n\tasync function deployToArena() {\n\t\t// RAT-641: a signed-in account without the age check takes it first. Right\n\t\t// after an email sign-in the page data may not know the account yet; the\n\t\t// server answers AGE_REQUIRED then, handled below.\n\t\tif (\n\t\t\tpage.data.user &&\n\t\t\t!requireAge(page.data, {\n\t\t\t\tsurface: 'publish_arena',\n\t\t\t\tmode: 'publish',\n\t\t\t\tonPass: () => void deployToArena()\n\t\t\t})\n\t\t)\n\t\t\treturn;\n\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\tsetStep('deploying');\n\t\tdeployMsg = t('uploading photo...');\n\t\tsubmitError = '';\n\n\t\ttry {\n\t\t\t// 1. Upload\n\t\t\tif (!uploadedImagePath) {\n\t\t\t\tconst path = await uploadImage();\n\t\t\t\tif (!path) {\n\t\t\t\t\tsubmitError = t('upload failed. try a different file or check your connection.');\n\t\t\t\t\tsetStep('upload');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tuploadedImagePath = path;\n\t\t\t}\n\n\t\t\t// 2. Verify content with AI\n\t\t\tdeployMsg = t('verifying content...');\n\t\t\ttry {\n\t\t\t\tconst verifyRes = await fetch('/api/arena/verify', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\t\tbody: JSON.stringify({ imagePath: uploadedImagePath })\n\t\t\t\t});\n\t\t\t\tconst verifyResult = await verifyRes.json();\n\t\t\t\tif (!verifyResult.ok) {\n\t\t\t\t\tsubmitError = verifyResult.reason || t(\"this photo doesn't meet arena requirements.\");\n\t\t\t\t\tsetStep('upload');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// If verification fails, still allow submission (fail open)\n\t\t\t}\n\n\t\t\t// 3. Submit\n\t\t\tdeployMsg = t('deploying to arena...');\n\t\t\tconst result = await callAction('submit', {\n\t\t\t\timagePath: uploadedImagePath,\n\t\t\t\tmediaType: selectedMediaType,\n\t\t\t\tisAnonymous: String(isAnonymous),\n\t\t\t\tpostToFeed: String(postToFeed && !isAnonymous),\n\t\t\t\tcategories: selectedCategories.join(','),\n\t\t\t\tidentity: JSON.stringify(identityPayload()),\n\t\t\t\tconsent: 'true',\n\t\t\t\tsavePhoto: savePhoto ? 'true' : 'false',\n\t\t\t\tanimatable: animatable ? 'true' : 'false',\n\t\t\t\tcsamAck: String(csamAck)\n\t\t\t});\n\n\t\t\tif (result.type === 'success') {\n\t\t\t\tanalytics.trackArenaSubmit(selectedMediaType);\n\t\t\t\tdeployMsg = t(\"you're live!\");\n\t\t\t\t// Show the share-to-feed prompt instead of an immediate\n\t\t\t\t// redirect. User either posts (PostToFeedCta.onposted →\n\t\t\t\t// goto /a) or skips (manual goto). The submission\n\t\t\t\t// itself is already complete on the server side. Defensive\n\t\t\t\t// fallback: if the server didn't echo an id back, just\n\t\t\t\t// navigate so the user isn't stuck on the spinner.\n\t\t\t\tconst data = result.data as\n\t\t\t\t\t| { submissionId?: string; crossposted?: boolean; bonusSwipes?: number }\n\t\t\t\t\t| undefined;\n\t\t\t\t// RAT-532: the first photo tops the day's swipes back up — say so.\n\t\t\t\tif ((data?.bonusSwipes ?? 0) > 0) {\n\t\t\t\t\tdeployMsg = t(\"you're live — {n} swipes are back\", { n: data?.bonusSwipes ?? '' });\n\t\t\t\t}\n\t\t\t\tsubmittedId = data?.submissionId ?? null;\n\t\t\t\tdidCrosspost = !!data?.crossposted;\n\t\t\t\t// RAT-446: always show the post-deploy modal (boost + share). When\n\t\t\t\t// the server already auto-crossposted, the modal hides the\n\t\t\t\t// redundant \"post to your feed\" CTA and confirms it's on the feed\n\t\t\t\t// — but the boost + copy-link (external share) still matter.\n\t\t\t\tif (submittedId) {\n\t\t\t\t\tshowFeedPrompt = true;\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(() => goto('/a'), 800);\n\t\t\t\t}\n\t\t\t} else if (result.type === 'failure') {\n\t\t\t\tconst d = result.data as Record<string, unknown> | undefined;\n\t\t\t\tif (d?.error === 'insufficient_tokens') {\n\t\t\t\t\tshowUpgradeModal = true;\n\t\t\t\t\tsetStep('upload');\n\t\t\t\t} else if (d?.error === AGE_REQUIRED) {\n\t\t\t\t\t// the upload is kept (uploadedImagePath): the retry only submits\n\t\t\t\t\tsetStep('upload');\n\t\t\t\t\taskAge();\n\t\t\t\t} else {\n\t\t\t\t\tsubmitError = (d?.error as string) || t('something went wrong');\n\t\t\t\t\tsetStep('upload');\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t// Without this, an unhandled rejection (network error mid-upload, JSON\n\t\t\t// parse on a non-JSON edge response, etc.) leaves the user staring at\n\t\t\t// the deploying spinner forever. Surface and bounce back to settings.\n\t\t\tconsole.error('deployToArena failed:', err);\n\t\t\tsubmitError = t('upload failed. try a different file or check your connection.');\n\t\t\tsetStep('upload');\n\t\t}\n\t}\n\n\tasync function submitEmail() {\n\t\temailError = '';\n\t\tif (!email || !email.includes('@')) {\n\t\t\temailError = t('please enter a valid email address.');\n\t\t\treturn;\n\t\t}\n\n\t\tanalytics.trackEmailSubmit('arena');\n\t\temailSending = true;\n\n\t\ttry {\n\t\t\t// Don't upload here — /api/arena/upload-url is auth-gated and the user\n\t\t\t// isn't authed yet. Send the OTP first; the actual upload runs from\n\t\t\t// deployToArena() once verifyOtp lands a session.\n\t\t\tconst result = await callAction('sendOtp', { email });\n\n\t\t\tif (result.type === 'success') {\n\t\t\t\tstartOtpCooldown();\n\t\t\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\t\t\tsetStep('verify-otp');\n\t\t\t} else if (result.type === 'failure') {\n\t\t\t\tconst d = result.data as Record<string, unknown> | undefined;\n\t\t\t\temailError = (d?.error as string) || t('something went wrong. try again.');\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('submitEmail failed:', err);\n\t\t\temailError = t('upload failed. try a different file or check your connection.');\n\t\t} finally {\n\t\t\temailSending = false;\n\t\t}\n\t}\n\n\tasync function resendOtp() {\n\t\totpError = '';\n\t\tconst result = await callAction('resendOtp', { email });\n\t\tif (result.type === 'success') {\n\t\t\totpResendCount++;\n\t\t\tstartOtpCooldown();\n\t\t} else if (result.type === 'failure') {\n\t\t\tconst d = result.data as Record<string, unknown> | undefined;\n\t\t\totpError = (d?.error as string) || t('failed to resend code.');\n\t\t}\n\t}\n\n\tasync function verifyOtp() {\n\t\totpError = '';\n\t\tif (!otpCode || otpCode.length < 6) {\n\t\t\totpError = t('enter the 6-digit code from your email.');\n\t\t\treturn;\n\t\t}\n\n\t\totpVerifying = true;\n\t\tconst { error } = await supabase.auth.verifyOtp({ email, token: otpCode, type: 'email' });\n\t\totpVerifying = false;\n\n\t\tif (error) {\n\t\t\totpError = t('invalid or expired code. check your email and try again.');\n\t\t\treturn;\n\t\t}\n\n\t\tanalytics.trackOtpVerify('arena');\n\t\tanalytics.trackSignInComplete();\n\t\tawait deployToArena();\n\t}\n\n\tonDestroy(() => {\n\t\tif (cooldownInterval) clearInterval(cooldownInterval);\n\t});\n</script>\n\n<svelte:head>\n\t<title>{t('enter the arena — ratemyd.')}</title>\n</svelte:head>\n\n<UpgradeModal open={showUpgradeModal} onclose={() => (showUpgradeModal = false)} feature=\"arena\" />\n<ArenaConsentModal\n\topen={showConsentModal}\n\tonconfirm={handleConsentConfirm}\n\toncancel={() => (showConsentModal = false)}\n/>\n<ArenaIdentitySheet\n\topen={whoamiSheetOpen}\n\tvalue={identity}\n\tphoto={selectedCategories}\n\toncommit={(v, p) => {\n\t\tidentity = v;\n\t\tselectedCategories = p as ArenaCategory[];\n\t}}\n\tonclose={() => (whoamiSheetOpen = false)}\n/>\n\n<!-- RAT-271: post-to-feed prompt after arena submission lands. Wrapper sits\n\t at z-[200] so the PostToFeedCta modal (z-[210]) stacks above when the\n\t user opens it. onposted + skip both navigate to /a. -->\n{#if showFeedPrompt && submittedId}\n\t<div class=\"fixed inset-0 z-[200] flex items-center justify-center bg-bg/90 backdrop-blur-sm p-4\">\n\t\t<div class=\"w-full max-w-md bg-surface border border-border rounded-2xl shadow-soft p-6 text-center\">\n\t\t\t<div class=\"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-orange/15 text-orange\">\n\t\t\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"/>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<h3 class=\"font-display text-lg font-semibold\">\n\t\t\t\t{didCrosspost ? t(\"you're in the arena — and on your feed\") : t(\"you're in the arena\")}\n\t\t\t</h3>\n\t\t\t<p class=\"mt-2 text-sm text-muted\">\n\t\t\t\t{didCrosspost\n\t\t\t\t\t? t('now get more eyes on it — boost it, or drop the link on your socials.')\n\t\t\t\t\t: t('want more eyeballs? boost it, post it to your feed, or share the link.')}\n\t\t\t</p>\n\n\t\t\t<!-- RAT-446: token boost — 5 tokens → 24h spotlight (3x visibility) in\n\t\t\t\t the swipe deck. Live /api/arena/boost endpoint. -->\n\t\t\t<div class=\"mt-5\">\n\t\t\t\t{#if boosted}\n\t\t\t\t\t<div class=\"flex items-center justify-center gap-2.5 rounded-xl border border-orange/25 bg-orange/10 px-4 py-3\">\n\t\t\t\t\t\t<svg class=\"h-5 w-5 text-orange\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M13 10V3L4 14h7v7l9-11h-7z\"/></svg>\n\t\t\t\t\t\t<span class=\"font-display text-sm font-bold text-orange\">{t('boost active — 24h of 3x visibility')}</span>\n\t\t\t\t\t</div>\n\t\t\t\t{:else}\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonclick={boostSubmission}\n\t\t\t\t\t\tdisabled={boosting || navigatingToArena}\n\t\t\t\t\t\tclass=\"flex w-full items-center gap-3 rounded-xl border border-orange/30 bg-orange/5 px-4 py-3 text-left transition-colors hover:border-orange/50 disabled:opacity-60\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-orange/25 bg-orange/10\">\n\t\t\t\t\t\t\t<svg class=\"h-5 w-5 text-orange\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M13 10V3L4 14h7v7l9-11h-7z\"/></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t<span class=\"block font-display text-sm font-bold text-text\">{boosting ? t('boosting…') : t('boost for 24h')}</span>\n\t\t\t\t\t\t\t<span class=\"mt-0.5 block text-[11px] text-muted\">{t('3x visibility in the arena — more eyes = more votes')}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"shrink-0 rounded-md border border-orange/25 bg-orange/10 px-2 py-0.5 text-[11px] font-bold text-orange\">{t('5 tokens')}</span>\n\t\t\t\t\t</button>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t{#if !didCrosspost}\n\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t<PostToFeedCta\n\t\t\t\t\t\tkind=\"arena_submission\"\n\t\t\t\t\t\tsourceContentId={submittedId}\n\t\t\t\t\t\tvariant=\"block\"\n\t\t\t\t\t\tlabel={t('post this to your feed')}\n\t\t\t\t\t\tonposted={goToArena}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t{/if}\n\n\t\t\t<!-- RAT-330: shareable public link → socials for more votes/matches. -->\n\t\t\t<div class=\"mt-3\">\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonclick={copyShareLink}\n\t\t\t\t\tdisabled={navigatingToArena}\n\t\t\t\t\tclass=\"flex w-full items-center justify-center gap-2 rounded-xl border border-border bg-surface-2 px-4 py-3 font-display text-sm font-semibold text-text transition-colors hover:border-muted disabled:opacity-60\"\n\t\t\t\t>\n\t\t\t\t\t{#if shareCopied}\n\t\t\t\t\t\t<svg width=\"15\" height=\"15\" viewBox=\"0 0 14 14\" fill=\"none\" class=\"text-green\">\n\t\t\t\t\t\t\t<path d=\"M3 7l3 3 5-5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t{t('link copied')}\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n\t\t\t\t\t\t\t<path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t{t('copy link')}\n\t\t\t\t\t{/if}\n\t\t\t\t</button>\n\t\t\t\t<p class=\"mt-2 text-[11px] leading-relaxed text-muted/60\">\n\t\t\t\t\t{t('drop it on your socials — every upvote is a shot at a match.')}\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={goToArena}\n\t\t\t\tdisabled={navigatingToArena}\n\t\t\t\tclass=\"mt-4 inline-flex items-center justify-center gap-2 text-xs text-muted hover:text-text underline disabled:no-underline disabled:opacity-70\"\n\t\t\t>\n\t\t\t\t{#if navigatingToArena}\n\t\t\t\t\t<span class=\"h-3 w-3 animate-spin rounded-full border-2 border-muted/40 border-t-muted\"></span>\n\t\t\t\t\t{t('entering the arena…')}\n\t\t\t\t{:else}\n\t\t\t\t\t{t('skip — go to the arena')}\n\t\t\t\t{/if}\n\t\t\t</button>\n\t\t</div>\n\t</div>\n{/if}\n\n{#if oauthResumeIncoming}\n\t<!-- OAuth resume bridge — see /rate for rationale. -->\n\t<section class=\"relative flex min-h-screen items-center justify-center overflow-hidden px-5 text-center\">\n\t\t<div class=\"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(255,255,255,.006)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.006)_1px,transparent_1px)] bg-[size:60px_60px]\"></div>\n\t\t<div class=\"relative\">\n\t\t\t<div class=\"mx-auto h-12 w-12 animate-spin rounded-full border-4 border-border border-t-orange\"></div>\n\t\t\t<p class=\"mt-6 font-display text-sm tracking-wider uppercase text-muted\">{t('deploying to arena…')}</p>\n\t\t</div>\n\t</section>\n\n{:else if step === 'upload'}\n\t<!-- ============ UPLOAD + INLINE SETTINGS (RAT-170) ============ -->\n\t<!-- The previous separate 'settings' step was removed. After file pick the\n\t\t left column flips from drop-zone to preview, the right column flips\n\t\t from how-it-works to settings, and a deploy CTA appears at the bottom.\n\t\t Same screen, no extra navigation. -->\n\t<section class=\"relative min-h-screen overflow-hidden px-5 pt-20 pb-20 md:pt-28 md:pb-28\">\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(255,255,255,.006)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.006)_1px,transparent_1px)] bg-[size:60px_60px]\"\n\t\t></div>\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute -top-40 -right-40 hidden h-[500px] w-[500px] rounded-full bg-orange/5 blur-[150px] md:block\"\n\t\t></div>\n\n\t\t<div class=\"relative mx-auto max-w-5xl\">\n\t\t\t{#if !selectedFile}\n\t\t\t\t<div class=\"mb-6 flex items-center gap-4\">\n\t\t\t\t\t<p class=\"text-xs font-medium tracking-widest text-muted uppercase\">{t('step 01')}</p>\n\t\t\t\t\t<StepIndicator currentStep={1} totalSteps={2} mode=\"arena\" />\n\t\t\t\t</div>\n\t\t\t{/if}\n\n\t\t\t{#if selectedFile}\n\t\t\t\t<h1 class=\"font-display text-3xl font-bold tracking-tighter md:text-4xl\">\n\t\t\t\t\t{t('almost')} <span class=\"text-orange\">{t('live.')}</span>\n\t\t\t\t</h1>\n\t\t\t\t<p class=\"mt-2 max-w-md text-sm leading-relaxed text-muted\">{t('quick check, then deploy.')}</p>\n\t\t\t{:else}\n\t\t\t\t<h1\n\t\t\t\t\tclass=\"font-display text-[clamp(2.8rem,9vw,7rem)] leading-[0.9] font-bold tracking-tighter\"\n\t\t\t\t>\n\t\t\t\t\t{t('enter the')}<br />\n\t\t\t\t\t<span class=\"text-orange\">{t('arena')}</span>\n\t\t\t\t</h1>\n\t\t\t\t<p class=\"mt-5 max-w-md text-sm leading-relaxed text-muted\">\n\t\t\t\t\t{t('drop your shot — photo or video. crowd swipes. crowd judges. honest reactions from strangers.')}\n\t\t\t\t</p>\n\t\t\t{/if}\n\n\t\t\t<div class=\"mt-5 grid gap-4 md:mt-10 md:gap-8 md:grid-cols-[1fr_1fr]\">\n\t\t\t\t<!-- LEFT: drop zone (no file) OR preview (file selected) -->\n\t\t\t\t<div>\n\t\t\t\t\t{#snippet arenaUpload()}\n\t\t\t\t\t{#if selectedFile && previewUrl}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"relative mx-auto aspect-[3/4] w-full max-w-[170px] overflow-hidden rounded-2xl border border-border bg-surface md:max-w-none\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if selectedMediaType === 'video'}\n\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\tsrc={previewUrl}\n\t\t\t\t\t\t\t\t\tautoplay\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\t\t\tplaysinline\n\t\t\t\t\t\t\t\t\tclass=\"h-full w-full object-cover\"\n\t\t\t\t\t\t\t\t></video>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<img src={previewUrl} alt={t('Preview')} class=\"h-full w-full object-cover\" />\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclass=\"absolute top-2 right-2 flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-black/60 text-white/60 backdrop-blur-sm transition-all hover:bg-black/80 hover:text-white\"\n\t\t\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\t\t\tselectedFile = null;\n\t\t\t\t\t\t\t\t\tuploadedImagePath = null;\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-label={t('Change media')}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tclass=\"h-3.5 w-3.5\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t><path\n\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\td=\"M6 18L18 6M6 6l12 12\"\n\t\t\t\t\t\t\t\t\t/></svg\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tclass=\"group relative flex min-h-[360px] w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border-2 border-dashed transition-all duration-300 {dragOver\n\t\t\t\t\t\t\t\t? 'scale-[1.02] border-orange bg-orange/5'\n\t\t\t\t\t\t\t\t: 'border-border hover:border-orange/40 hover:bg-surface/50'}\"\n\t\t\t\t\t\t\tondragover={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tdragOver = true;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tondragleave={() => (dragOver = false)}\n\t\t\t\t\t\t\tondrop={handleDrop}\n\t\t\t\t\t\t\tonclick={() => document.getElementById('arena-file-input')?.click()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"flex flex-col items-center gap-3 text-muted transition-colors group-hover:text-orange/70\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tclass=\"h-12 w-12\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\td=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<p class=\"font-display text-sm font-bold\">{t('drag & drop or tap to upload')}</p>\n\t\t\t\t\t\t\t\t<p class=\"text-[11px] text-muted/50\">\n\t\t\t\t\t\t\t\t\t{t('jpeg, png, webp')} <span class=\"text-orange/70\">{t('· mp4, webm, mov')}</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p class=\"text-[10px] text-muted/40\">{t('photo max 5mb · video max 50mb · 30s')}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<!-- Video boost hint (only when no file selected) -->\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"mt-3 flex items-start gap-2.5 rounded-lg border border-orange/20 bg-orange/[.04] px-3 py-2.5\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"mt-0.5 h-4 w-4 shrink-0 text-orange\"\n\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path d=\"M13 10V3L4 14h7v7l9-11h-7z\" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<p class=\"font-display text-[12px] font-bold text-orange\">\n\t\t\t\t\t\t\t\t\t{t('video gets 2× the eyeballs.')}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p class=\"mt-0.5 text-[10px] leading-relaxed text-muted/70\">\n\t\t\t\t\t\t\t\t\t{t('first 24h the feed pushes video twice as hard. then it forgets you.')}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\n\t\t\t\t\t<!-- File input always rendered so handleFile keeps wiring even\n\t\t\t\t\t     when the drop-zone is replaced by the preview. -->\n\t\t\t\t\t<input\n\t\t\t\t\t\tid=\"arena-file-input\"\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\taccept=\"image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif,video/mp4,video/webm,video/quicktime\"\n\t\t\t\t\t\tclass=\"hidden\"\n\t\t\t\t\t\tonchange={(e) => handleFile((e.target as HTMLInputElement).files?.[0])}\n\t\t\t\t\t/>\n\t\t\t\t\t{/snippet}\n\n\t\t\t\t\t<ReusePhoto\n\t\t\t\t\t\tloggedIn={!!data.session}\n\t\t\t\t\t\tlastPhotoUrl={data.lastPhotoUrl ?? null}\n\t\t\t\t\t\tothers=\"Duel\"\n\t\t\t\t\t\tuseBtnClass=\"bg-orange text-white\"\n\t\t\t\t\t\ttoggleOnClass=\"bg-orange\"\n\t\t\t\t\t\tsaveMode={selectedFile && selectedMediaType === 'video'\n\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t: data.session\n\t\t\t\t\t\t\t\t? 'toggle'\n\t\t\t\t\t\t\t\t: 'signup'}\n\t\t\t\t\t\thasSelection={!!selectedFile}\n\t\t\t\t\t\tbind:save={savePhoto}\n\t\t\t\t\t\tonToggle={(v) => analytics.trackSavePhotoToggle(v)}\n\t\t\t\t\t\tonSignUp={() => {\n\t\t\t\t\t\t\t// A file is already staged: the AuthSheet's Google button does a\n\t\t\t\t\t\t\t// full-page redirect and never writes this page's `arena-submit`\n\t\t\t\t\t\t\t// resume entry, so the user would land back on `?oauth_resume=1`\n\t\t\t\t\t\t\t// with consumeResume() -> null and the picked file gone. Stay on\n\t\t\t\t\t\t\t// the page's own resume-backed path (consent -> step 02, whose\n\t\t\t\t\t\t\t// OAuthButtonRow runs prepareOAuthRedirect). The sheet is only\n\t\t\t\t\t\t\t// safe when there is nothing to lose.\n\t\t\t\t\t\t\tif (selectedFile) goFromSettings();\n\t\t\t\t\t\t\telse openAuthSheet(undefined, 'arena_reuse');\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonBack={() => {\n\t\t\t\t\t\t\tselectedFile = null;\n\t\t\t\t\t\t\tuploadedImagePath = null;\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonUseSaved={useSavedPhoto}\n\t\t\t\t\t\tupload={arenaUpload}\n\t\t\t\t\t/>\n\t\t\t\t\t{#if selectedFile && selectedMediaType === 'image'}\n\t\t\t\t\t\t<!-- photo animation opt-out (default on) -->\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonclick={() => (animatable = !animatable)}\n\t\t\t\t\t\t\tclass=\"mt-2 flex items-center gap-2 text-left text-xs text-muted transition-colors hover:text-text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"flex h-5 w-5 shrink-0 items-center justify-center rounded-md border text-[10px] font-bold {animatable\n\t\t\t\t\t\t\t\t\t? 'border-orange bg-orange text-white'\n\t\t\t\t\t\t\t\t\t: 'border-border bg-bg text-transparent'}\">✓</span\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>{t('let others animate this photo (AI clip — you earn tokens on unlocks)')}</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- RIGHT: how-it-works (no file) OR settings (file selected) -->\n\t\t\t\t<div class=\"flex flex-col gap-4\">\n\t\t\t\t\t{#if selectedFile}\n\t\t\t\t\t\t<!-- Identity: post-as name + anonymous toggle, combined into one row -->\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"flex w-full cursor-pointer items-center justify-between gap-3 rounded-xl border border-border bg-surface p-4 text-left transition-colors hover:border-muted\"\n\t\t\t\t\t\t\tonclick={() => (isAnonymous = !isAnonymous)}\n\t\t\t\t\t\t\trole=\"switch\"\n\t\t\t\t\t\t\taria-checked={isAnonymous}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"min-w-0\">\n\t\t\t\t\t\t\t\t<span class=\"block font-display text-sm font-bold\">\n\t\t\t\t\t\t\t\t\t{#if isAnonymous}\n\t\t\t\t\t\t\t\t\t\t{t('posting anonymously')}\n\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t{t('posting as')} <span class=\"text-orange\">{data.userNickname}</span>\n\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"mt-0.5 block text-[11px] text-muted/50\">\n\t\t\t\t\t\t\t\t\t{isAnonymous ? t('your identity stays hidden') : t('tap to hide your identity')}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"relative h-7 w-12 shrink-0 rounded-full transition-colors {isAnonymous\n\t\t\t\t\t\t\t\t\t? 'bg-orange'\n\t\t\t\t\t\t\t\t\t: 'bg-border'}\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"absolute top-0.5 left-0.5 h-6 w-6 rounded-full bg-white shadow transition-transform {isAnonymous\n\t\t\t\t\t\t\t\t\t\t? 'translate-x-5'\n\t\t\t\t\t\t\t\t\t\t: 'translate-x-0'}\"\n\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<!-- RAT-446: default-on feed crosspost. Anonymous uploads can't go\n\t\t\t\t\t\t     to the feed (posts carry the handle) so the row disables +\n\t\t\t\t\t\t     reads why while the anonymous toggle is on. -->\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"flex w-full items-center justify-between gap-3 rounded-xl border border-border bg-surface p-4 text-left transition-colors {isAnonymous\n\t\t\t\t\t\t\t\t? 'cursor-not-allowed opacity-50'\n\t\t\t\t\t\t\t\t: 'cursor-pointer hover:border-muted'}\"\n\t\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\t\tif (!isAnonymous) postToFeed = !postToFeed;\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trole=\"checkbox\"\n\t\t\t\t\t\t\taria-checked={!isAnonymous && postToFeed}\n\t\t\t\t\t\t\taria-disabled={isAnonymous}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"min-w-0\">\n\t\t\t\t\t\t\t\t<span class=\"block font-display text-sm font-bold\">{t('show on the feed too')}</span>\n\t\t\t\t\t\t\t\t<span class=\"mt-0.5 block text-[11px] text-muted/50\">\n\t\t\t\t\t\t\t\t\t{isAnonymous\n\t\t\t\t\t\t\t\t\t\t? t('anonymous clips stay arena-only')\n\t\t\t\t\t\t\t\t\t\t: t('your clip also lands on /f — more eyes, more votes, more matches')}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"flex h-6 w-6 shrink-0 items-center justify-center rounded-md {!isAnonymous && postToFeed\n\t\t\t\t\t\t\t\t\t? 'bg-orange text-bg'\n\t\t\t\t\t\t\t\t\t: 'border border-border bg-surface-2 text-transparent'}\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<svg width=\"13\" height=\"13\" viewBox=\"0 0 14 14\" fill=\"none\">\n\t\t\t\t\t\t\t\t\t<path d=\"M3 7l3 3 5-5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t<!-- who i am (RAT-426 / C1) — ONE sheet on tap: identity axes + photo\n\t\t\t\t\t\t     tags. Trigger shows a summary + count, like the old categories\n\t\t\t\t\t\t     picker did (which this replaces). -->\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"flex w-full cursor-pointer items-center justify-between rounded-xl border border-border bg-surface p-4 text-left transition-colors hover:border-muted\"\n\t\t\t\t\t\t\tonclick={() => (whoamiSheetOpen = true)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t<span class=\"block font-display text-sm font-bold\">\n\t\t\t\t\t\t\t\t\t{t('who i am')}\n\t\t\t\t\t\t\t\t\t<span class=\"ml-1 text-[10px] font-medium tracking-wide text-muted/50 uppercase\">\n\t\t\t\t\t\t\t\t\t\t{t('optional')}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"mt-0.5 block truncate text-[11px] {whoamiCount > 0\n\t\t\t\t\t\t\t\t\t? 'text-orange'\n\t\t\t\t\t\t\t\t\t: 'text-muted/50'}\">\n\t\t\t\t\t\t\t\t\t{whoamiCount > 0 ? whoamiSummary : t('role · body · into · photo tags — tap to pick')}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{#if whoamiCount > 0}\n\t\t\t\t\t\t\t\t<span class=\"ml-3 shrink-0 font-display text-[11px] tabular-nums text-orange\">\n\t\t\t\t\t\t\t\t\t{whoamiCount}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"ml-2 h-4 w-4 shrink-0 text-muted/40\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-width=\"1.5\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path d=\"M4 6l4 4 4-4\" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t{#each [{ icon: 'M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5', title: msg('post your shot'), desc: msg('photo or video. goes live. strangers swipe.') }, { icon: 'M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z', title: msg('free to enter'), desc: msg(\"posting's free. truth costs tokens. that's the gimmick.\") }, { icon: 'M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z', title: msg('18+ only'), desc: msg('tick the box. arena lurkers only.') }] as item (item.title)}\n\t\t\t\t\t\t\t<div class=\"flex items-start gap-3.5\">\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-surface\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 text-orange\"\n\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\tstroke-width=\"1.5\"\n\t\t\t\t\t\t\t\t\t\t><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d={item.icon} /></svg\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<p class=\"font-display text-[13px] font-bold\">{t(item.title)}</p>\n\t\t\t\t\t\t\t\t\t<p class=\"mt-0.5 text-[11px] leading-relaxed text-muted/50\">{t(item.desc)}</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{#if uploadError}\n\t\t\t\t<p class=\"mt-4 text-sm text-red-400\">{uploadError}</p>\n\t\t\t{/if}\n\t\t\t{#if submitError}\n\t\t\t\t<p class=\"mt-4 text-sm text-red-400\">{submitError}</p>\n\t\t\t{/if}\n\n\t\t\t<!-- Deploy CTA — only when a file is staged -->\n\t\t\t{#if selectedFile}\n\t\t\t\t<div class=\"mt-8 flex max-w-md\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"flex-1 cursor-pointer rounded-xl bg-orange py-3.5 font-display text-[15px] font-semibold text-white transition-all hover:bg-orange-dark active:scale-[0.98] disabled:opacity-50\"\n\t\t\t\t\t\tonclick={goFromSettings}\n\t\t\t\t\t\tdisabled={submitting}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t('deploy to arena')}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</div>\n\t</section>\n{:else if step === 'deploying'}\n\t<!-- ============ DEPLOYING ============ -->\n\t<section\n\t\tclass=\"relative flex min-h-[85vh] flex-col items-center justify-center overflow-hidden px-5 text-center\"\n\t>\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(255,255,255,.006)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.006)_1px,transparent_1px)] bg-[size:60px_60px]\"\n\t\t></div>\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute top-1/2 left-1/2 hidden h-[600px] w-[600px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-orange/5 blur-[180px] md:block\"\n\t\t></div>\n\n\t\t<div class=\"relative flex flex-col items-center\">\n\t\t\t<div class=\"h-14 w-14 animate-spin rounded-full border-4 border-border border-t-orange\"></div>\n\n\t\t\t<h2\n\t\t\t\tclass=\"mt-8 font-display text-[clamp(1.6rem,5vw,2.5rem)] leading-[1] font-bold tracking-tighter\"\n\t\t\t>\n\t\t\t\t{t('deploying to the')}<br /><span class=\"text-orange\">{t('arena.')}</span>\n\t\t\t</h2>\n\n\t\t\t<div class=\"mt-4 h-5\">\n\t\t\t\t<p class=\"text-sm text-muted\">{deployMsg}</p>\n\t\t\t</div>\n\n\t\t\t<p class=\"mt-6 text-xs text-muted/30\">\n\t\t\t\t{t(\"this usually takes a few seconds. don't close this tab.\")}\n\t\t\t</p>\n\t\t</div>\n\t</section>\n{:else if step === 'email'}\n\t<!-- ============ EMAIL ============ -->\n\t<section class=\"relative min-h-screen overflow-hidden px-5 pt-20 pb-20 md:pt-28 md:pb-28\">\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute -top-40 -right-40 hidden h-[500px] w-[500px] rounded-full bg-orange/5 blur-[150px] md:block\"\n\t\t></div>\n\n\t\t<div class=\"relative mx-auto max-w-md\">\n\t\t\t<div class=\"mb-6 flex items-center gap-4\">\n\t\t\t\t<p class=\"text-xs font-medium tracking-widest text-muted uppercase\">{t('step 02')}</p>\n\t\t\t\t<StepIndicator currentStep={2} totalSteps={2} mode=\"arena\" />\n\t\t\t</div>\n\n\t\t\t<h2 class=\"font-display text-3xl font-bold tracking-tight\">\n\t\t\t\t{t('quick')} <span class=\"text-orange\">{t('verify')}</span>\n\t\t\t</h2>\n\t\t\t<p class=\"mt-2 max-w-xs text-sm text-muted\">{t('one tap with google, or use email below.')}</p>\n\n\t\t\t<div class=\"mt-8\">\n\t\t\t\t<OAuthButtonRow next=\"/a/submit\" beforeRedirect={prepareOAuthRedirect} />\n\t\t\t</div>\n\n\t\t\t<div class=\"mt-6\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"email\"\n\t\t\t\t\tbind:value={email}\n\t\t\t\t\tplaceholder=\"your@email.com\"\n\t\t\t\t\tclass=\"w-full rounded-xl border border-border bg-surface px-4 py-3.5 text-sm text-text placeholder-muted/40 transition-colors outline-none focus:border-orange/50\"\n\t\t\t\t\tonkeydown={(e) => {\n\t\t\t\t\t\tif (e.key === 'Enter') submitEmail();\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{#if emailError}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-red-400\">{emailError}</p>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<div class=\"mt-6 flex gap-3\">\n\t\t\t\t<button\n\t\t\t\t\tclass=\"rounded-xl border border-border px-5 py-3 text-sm font-medium text-muted transition-all hover:text-text\"\n\t\t\t\t\tonclick={() => setStep('upload')}\n\t\t\t\t>\n\t\t\t\t\t{t('back')}\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"flex-1 rounded-xl bg-orange py-3.5 font-display text-[15px] font-semibold text-white transition-all hover:bg-orange-dark active:scale-[0.98] disabled:opacity-50\"\n\t\t\t\t\tonclick={submitEmail}\n\t\t\t\t\tdisabled={emailSending}\n\t\t\t\t>\n\t\t\t\t\t{emailSending ? t('sending...') : t('send code')}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n{:else if step === 'verify-otp'}\n\t<!-- ============ OTP ============ -->\n\t<section class=\"relative min-h-screen overflow-hidden px-5 pt-20 pb-20 md:pt-28 md:pb-28\">\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute -top-40 -right-40 hidden h-[500px] w-[500px] rounded-full bg-orange/5 blur-[150px] md:block\"\n\t\t></div>\n\n\t\t<div class=\"relative mx-auto max-w-md\">\n\t\t\t<div class=\"mb-6 flex items-center gap-4\">\n\t\t\t\t<p class=\"text-xs font-medium tracking-widest text-muted uppercase\">{t('step 02')}</p>\n\t\t\t\t<StepIndicator currentStep={2} totalSteps={2} mode=\"arena\" />\n\t\t\t</div>\n\n\t\t\t<h2 class=\"font-display text-3xl font-bold tracking-tight\">\n\t\t\t\t{t('check your')} <span class=\"text-orange\">{t('inbox')}</span>\n\t\t\t</h2>\n\t\t\t<p class=\"mt-2 text-sm text-muted\">\n\t\t\t\t{t('enter the 6-digit code we sent to')} <span class=\"text-text\">{email}</span>\n\t\t\t</p>\n\n\t\t\t<div class=\"mt-8\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tbind:value={otpCode}\n\t\t\t\t\tplaceholder=\"000000\"\n\t\t\t\t\tmaxlength={6}\n\t\t\t\t\tinputmode=\"numeric\"\n\t\t\t\t\tclass=\"w-full rounded-xl border border-border bg-surface px-4 py-3.5 text-center font-display text-2xl tracking-[0.3em] text-text placeholder-muted/20 transition-colors outline-none focus:border-orange/50\"\n\t\t\t\t\tonkeydown={(e) => {\n\t\t\t\t\t\tif (e.key === 'Enter') verifyOtp();\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t{#if otpError}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-red-400\">{otpError}</p>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<div class=\"mt-4 flex items-center justify-between text-xs text-muted\">\n\t\t\t\t<button\n\t\t\t\t\tclass=\"transition-colors hover:text-text disabled:opacity-30\"\n\t\t\t\t\tonclick={() => setStep('email')}\n\t\t\t\t>\n\t\t\t\t\t{t('wrong email?')}\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"transition-colors hover:text-orange disabled:opacity-30\"\n\t\t\t\t\tonclick={resendOtp}\n\t\t\t\t\tdisabled={otpCooldown > 0}\n\t\t\t\t>\n\t\t\t\t\t{otpCooldown > 0 ? t('resend in {n}s', { n: otpCooldown }) : t('resend code')}\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<button\n\t\t\t\tclass=\"mt-6 w-full rounded-xl bg-orange py-3.5 font-display text-[15px] font-semibold text-white transition-all hover:bg-orange-dark active:scale-[0.98] disabled:opacity-50\"\n\t\t\t\tonclick={verifyOtp}\n\t\t\t\tdisabled={otpVerifying || otpCode.length < 6}\n\t\t\t>\n\t\t\t\t{otpVerifying ? t('verifying...') : t('verify & enter arena')}\n\t\t\t</button>\n\t\t</div>\n\t</section>\n{/if}\n"],"version":3}