PageSourceSearch

https://mostreams-com.lovable.app/assets/discs-BOacs8R-.js

js mostreams-com.lovable.app collected 2026-10-03 03:35:37 UTC 7,952 bytes, 1 lines download raw bytes

1import{bz as M,bV as D,y as _,r as i,j as e,bA as V,L as l,bo as L,p as A,a2 as P,i as u,t as R,P as C,V as E,a7 as I}from"./index-BNrdOJig.js";import{D as T}from"./DiscBrandLockup-C2-1e4VH.js";import{D as $}from"./DiscJukebox-D12w_wYM.js";import{V as z}from"./VaultItemCard-D96mLgVi.js";import{a as B}from"./limitedEditions-b5ZKNg4A.js";import{g as F,a as U}from"./vaultMixtapes-C7Kd3uiJ.js";import{l as O}from"./modisc.functions-YskwSfYf.js";import{T as y}from"./ticket-DY92lRWa.js";import{S as Y}from"./store-D5pbI_Li.js";import{C as q}from"./calendar-days-ChavMRYP.js";import"./discLibrary.functions-XplYfHC1.js";import"./shuffle-DL0EvDul.js";import"./input-CwAqzCK4.js";import"./CertifiedDisc-BuYG59mB.js";import"./qr-CA5yO7Ro.js";import"./browser-DT_WFUyo.js";import"./file-text-av3IHVAy.js";import"./plus-BewcIKll.js";import"./tag-Bcn_qsQe.js";function me(){const o=M(),a=D.useSearch(),c=_(O),[d,g]=i.useState([]),[n,f]=i.useState([]),[m,N]=i.useState([]),[x,v]=i.useState(!0);i.useEffect(()=>{(async()=>{try{const[s,r]=await Promise.all([B().catch(()=>[]),c().catch(()=>[])]);g(s),N(r);const t=await F(s).catch(()=>new Map);f(U(s,t))}finally{v(!1)}})()},[]);const w=i.useMemo(()=>a.artist?n.filter(s=>s.artist?.handle===a.artist):n,[n,a.artist]),p=d.length+m.length,k=d.filter(s=>s.serial_number<=10).length;function S(s){g(r=>r.map(t=>t.id===s.id?s:t)),f(r=>r.map(t=>({...t,items:t.items.map(j=>j.id===s.id?s:j)})))}return e.jsx(V,{profile:o,title:"My Discs",subtitle:"Everything you own on MO STREAMS",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 pb-5 border-b border-border",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(T,{}),e.jsx("h1",{className:"text-2xl sm:text-3xl font-black mt-2",children:"My Discs"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1 max-w-2xl",children:"Your shelf. Every disc here is a numbered copy that belongs to you — play it, pull the WAV or MP3, open the booklet, or download the ownership certificate."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(l,{to:"/redeem",className:"inline-flex items-center gap-2 text-sm font-bold px-3.5 py-2 rounded-lg bg-primary text-primary-foreground hover:opacity-90",children:[e.jsx(y,{className:"w-4 h-4"})," Redeem a code"]}),e.jsxs(l,{to:"/vault",className:"inline-flex items-center gap-2 text-sm font-semibold px-3 py-2 rounded-lg border border-border hover:bg-muted",children:[e.jsx(L,{className:"w-4 h-4"})," Mixtape builder"]})]})]}),a.claimed&&e.jsxs("div",{className:"rounded-2xl border border-primary/40 bg-primary/10 p-4 flex items-start gap-3",children:[e.jsx(A,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0 text-sm",children:[e.jsxs("div",{className:"font-bold",children:["Unlocked — “",a.claimed,"” is yours."]}),e.jsx("p",{className:"text-muted-foreground",children:"It's on your shelf below with your own serial number. Nobody else has that copy."})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(b,{label:"Discs owned",value:p}),e.jsx(b,{label:"Artists collected",value:n.length}),e.jsx(b,{label:"First press (#1–#10)",value:k})]}),x&&e.jsxs("div",{className:"py-16 text-center text-muted-foreground",children:[e.jsx(P,{className:"w-5 h-5 mx-auto animate-spin mb-2"})," Loading your shelf…"]}),!x&&p===0&&e.jsxs("div",{className:"rounded-2xl border border-dashed border-border p-10 text-center",children:[e.jsx(u,{className:"w-8 h-8 mx-auto mb-3 text-muted-foreground"}),e.jsx("h2",{className:"text-lg font-bold mb-1",children:"Your shelf is empty"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto mb-4",children:"Got a card from a show? Redeem the code and the disc lands here instantly. Or browse the drops and grab a numbered copy."}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[e.jsxs(l,{to:"/redeem",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground font-bold px-4 py-2.5 rounded-lg hover:opacity-90",children:[e.jsx(y,{className:"w-4 h-4"})," Redeem a code"]}),e.jsxs(l,{to:"/modiscs",className:"inline-flex items-center gap-2 border border-border font-bold px-4 py-2.5 rounded-lg hover:bg-muted",children:[e.jsx(u,{className:"w-4 h-4"})," Browse drops"]})]})]}),!x&&p>0&&e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-4",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.18em] text-muted-foreground mb-3",children:"Disc player · plays only what you own"}),e.jsx($,{})]}),m.length>0&&e.jsxs("section",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm font-black uppercase tracking-[0.18em] text-muted-foreground",children:"Redeemed discs"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:m.map(s=>{const r=s.collection;if(!r)return null;const t=Number(s.token_id);return e.jsxs(l,{to:"/modisc/$slug",params:{slug:r.slug},className:"group rounded-xl bg-card border border-border overflow-hidden hover:border-primary/60 transition-colors",children:[e.jsxs("div",{className:"aspect-square bg-background overflow-hidden relative",children:[r.cover_art_url?e.jsx("img",{src:R(r.cover_art_url,960),alt:`${r.title} disc cover`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"w-full h-full grid place-items-center",children:e.jsx(u,{className:"w-8 h-8 text-muted-foreground"})}),t>0&&t<=10&&e.jsx("span",{className:"absolute top-2 left-2 rounded-full bg-primary text-primary-foreground text-[10px] font-black uppercase tracking-wider px-2 py-0.5",children:"First press"})]}),e.jsxs("div",{className:"p-3",children:[e.jsx("div",{className:"text-sm font-bold truncate",children:r.title}),e.jsxs("div",{className:"text-[11px] text-muted-foreground truncate",children:["#",s.token_id," / ",r.edition_size," ·"," ",r.artist?.display_name??r.artist?.handle??""]}),e.jsxs("div",{className:"mt-2 inline-flex items-center gap-1 text-[11px] font-bold uppercase tracking-wider text-primary",children:[e.jsx(C,{className:"w-3 h-3"})," Unlocked"]})]})]},s.id)})})]}),w.map(s=>e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("h2",{className:"text-sm font-black uppercase tracking-[0.18em] text-muted-foreground truncate",children:[s.artist?.display_name??s.artist?.handle??"Artist"," · ",s.items.length," ",s.items.length===1?"disc":"discs"]}),s.artist?.handle&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[e.jsx(h,{to:"/artist/$handle",handle:s.artist.handle,icon:E,label:"Videos"}),e.jsx(h,{to:"/store/$handle",handle:s.artist.handle,icon:Y,label:"Merch"}),e.jsx(h,{to:"/book/$handle",handle:s.artist.handle,icon:q,label:"Book"})]})]}),e.jsx("div",{className:"grid gap-4 lg:grid-cols-2",children:s.items.map(r=>e.jsxs("div",{className:"relative",children:[r.serial_number<=10&&e.jsxs("span",{className:"absolute z-10 top-3 right-3 rounded-full bg-primary text-primary-foreground text-[10px] font-black uppercase tracking-wider px-2 py-0.5 inline-flex items-center gap-1",children:[e.jsx(I,{className:"w-3 h-3"})," First press"]}),e.jsx(z,{item:r,onChange:S})]},r.id))})]},s.artistId))]})})}function h({to:o,handle:a,icon:c,label:d}){return e.jsxs(l,{to:o,params:{handle:a},className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border border-border hover:bg-muted",children:[e.jsx(c,{className:"w-3 h-3"})," ",d]})}function b({label:o,value:a}){return e.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsx("div",{className:"text-2xl font-black",children:a}),e.jsx("div",{className:"text-[10px] uppercase tracking-[0.18em] text-muted-foreground mt-0.5",children:o})]})}export{me as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.