PageSourceSearch

https://solmi.ai/assets/Songs-DrLVgYS7.js

js solmi.ai collected 2026-10-04 13:47:52 UTC 48,936 bytes, 2 lines download raw bytes

1import{r,j as e}from"./react-vendor-BJZmbzdX.js";import{m as xs,u as ms,d as hs,F as fs,t as p,e as c,C as g,Q as k,ac as I,$ as y,A as bs,U as Ss,X as ke,aB as ys,K as $,S as ae,P as le,V as Ie,W as ne,a1 as ie,a2 as oe,a3 as re,a4 as ce,a5 as x,R as js,N as de,ay as ws}from"./index-DPRF0uuc.js";import{P as Ae}from"./PublishModal-bDquLDsq.js";import{U as Ee}from"./UnpublishModal-D-irz7QT.js";import{D as vs}from"./DeleteModal-BxpY0wRi.js";import{F as Ns,a as Cs,b as Us,r as Le,s as Ps}from"./FreeDownloadPrompt-DgwUdN5L.js";import{G as Ds}from"./posthog-vendor-maum7j4M.js";import{A as Vs,L as Re}from"./AddToPlaylistDialog-Crdb08v7.js";import{V as Ms}from"./VideoWithLyrics-qbSaaBSZ.js";import{N as Ts}from"./NowPlayingLyricsSidebar-BO1J8pXe.js";import{u as ks}from"./i18n-vendor-CoycF_BS.js";import{D as F}from"./download-Cik6sn1q.js";import{H as Is}from"./headphones-DV7Gv_CX.js";import{T as As}from"./thumbs-up-DmCZKlzd.js";import{E as ge}from"./ellipsis-vertical-DzuITo42.js";import{T as $e}from"./trash-2-Chx0378q.js";import{P as Es}
1from"./pencil-CWez6f32.js";import"./runtime-vendor-CqkleIqs.js";import"./trpc-vendor-DUA-G94H.js";import"./ui-vendor-C7vRqiTp.js";import"./heart-CLVdh2qr.js";import"./thumbs-down-DqFldVzv.js";function lt(){const{t:i}=ks();xs({title:"My Songs - Solmi AI Library",description:"Manage your generated AI songs, AI covers, and AI music videos in your Solmi AI library.",keywords:["my ai songs","solmi library","ai music history","manage ai covers","ai music dashboard"]});const{user:ue,isAuthenticated:m}=ms(),{navigate:u,withLanguagePath:j}=hs(),[h,O]=r.useState("ai-video"),[Fe,U]=r.useState(!1),[B,pe]=r.useState(!1),[xe,me]=r.useState(null);r.useEffect(()=>{console.log("[Download] Upgrade modal state changed:",B)},[B]);const[P,z]=r.useState(null),[W,_]=r.useState(null),[G,H]=r.useState(null),[D,Q]=r.useState(null),[V,Y]=r.useState(null),[q,J]=r.useState(null),[f,K]=r.useState(null),[he,M]=r.useState(null),[A,v]=r.useState(""),[fe,E]=r.useState(new Set),L=r.useRef(null),[Oe,be]=r.useState(null),{playTrack:Se,currentTrack:T,isPlaying:w,togglePlayPause:ye}=fs(),b=p.useUtils(),{data:R,isLoading:X}=p.payment.getSubscription.useQuery(void 0,{enabled:m}),je=m&&!X&&R&&(R.plan!=="free"||!!R.hasPurchasedCredits),Be=s=>!!(!s||s.includes("replicate.delivery")||s.includes("pbxt.replicate.delivery")),{data:we=[],isLoading:ze}=p.music.getHistory.useQuery(void 0,{enabled:m&&h==="ai-music",refetchInterval:s=>{const t=s.state.data;return Array.isArray(t)&&t.some(l=>l.status==="pending"||l.status==="processing")?5e3:!1},refetchOnWindowFocus:!1}),{data:ve=[],isLoading:We}=p.voiceCover.getUserCovers.useQuery(void 0,{enabled:m&&h==="ai-cover",refetchInterval:s=>{const t=s.state.data;return Array.isArray(t)&&t.some(l=>l.status==="pending"||l.status==="processing")?5e3:!1},refetchOnWindowFocus:!1}),{data:Ne=[],isLoading:_e}=p.aiVideo.list.useQuery(void 0,{enabled:m&&h==="ai-video",refetchInterval:s=>{const t=s.state.data;return Array.isArray(t)&&t.some(l=>l.status==="processing")?5e3:!1},refetchOnWindowFocus:!1}),{data:Ge=[]}=p.director.listProjects.useQuery(void 0,{enabled:m&&h==="ai-video",staleTime:3e4}),Z=Ge.filter(s=>!(s.step==="complete"||s.status==="exported"||s.exportVideoUrl)).slice(0,6),Ce=p.music.publish.useMutation({onSuccess:()=>{c.success("Song published successfully!"),b.music.getHistory.invalidate(),z(null)}}),Ue=p.music.unpublish.useMutation({onSuccess:()=>{c.success("Song unpublished successfully!"),b.music.getHistory.invalidate(),_(null)}}),N=p.music.delete.useMutation({onSuccess:()=>{H(null),c.success("Song deleted successfully!");try{b.music.getHistory.invalidate()}catch(s){console.warn("[Songs] Failed to invalidate history cache:",s)}}});r.useEffect(()=>{N.error&&(console.error("Delete error:",N.error),c.error(N.error.message||"Failed to delete song"))},[N.error]);const He=p.music.toggleLike.useMutation({onSuccess:()=>{b.music.getHistory.invalidate()}}),Qe=p.music.incrementPlayCount.useMutation({onSuccess:()=>{b.music.getHistory.invalidate()}}),Pe=p.aiVideo.publish.useMutation({onSuccess:()=>{c.success("Video published successfully!"),b.aiVideo.list.invalidate(),Y(null)}}),De=p.aiVideo.unpublish.useMutation({onSuccess:()=>{c.success("Video unpublished successfully!"),b.aiVideo.list.invalidate(),J(null)}}),ee=p.aiVideo.updateTitle.useMutation({onSuccess:()=>{c.success("Video title updated!"),b.aiVideo.list.invalidate(),M(null),v("")}}),C=p.aiVideo.burnSubtitles.useMutation({onSuccess:()=>{c.dismiss("burn-subtitles"),c.success("Subtitles burned into video successfully!"),b.aiVideo.list.invalidate()}});r.useEffect(()=>{C.error&&(c.dismiss("burn-subtitles"),c.error(C.error.message||"Failed to burn subtitles"))},[C.error]);const Ye=s=>{s.status==="completed"&&s.audioUrl&&Qe.mutate({id:s.id}),T?.id===s.id&&w?ye():Se({id:s.id,title:s.title||"Untitled",artist:"AI Music",audioUrl:s.audioUrl,thumbnailUrl:s.imageUrl})},qe=(s,t)=>{t&&(t.preventDefault(),"stopPropagation"in t&&t.stopPropagation()),s.published?_(s):z(s)},Je=s=>{P&&Ce.mutate({id:P.id,publishedTitle:s})},Ke=()=>{W&&Ue.mutate({id:W.id})},Xe=(s,t)=>{t.preventDefault(),t.stopPropagation(),He.mutate({id:s.id})},Ze=(s,t)=>{t&&(t.preventDefault(),"stopPropagation"in t&&t.stopPropagation());const l={prompt:s.prompt||"",style:s.style||"",title:s.title||"",instrumental:s.instrumental==="yes"};sessionStorage.setItem("reuseSongData",JSON.stringify(l)),u(j("/ai-music-generator"))},es=(s,t)=>{t&&(t.preventDefault(),"stopPropagation"in t&&t.stopPropagation()),H(s)},ss=()=>
1{G&&N.mutate({id:G.id})},ts=(s,t)=>{t&&(t.preventDefault(),"stopPropagation"in t&&t.stopPropagation()),c.info("Cover publishing coming soon")},as=(s,t)=>{t&&(t.preventDefault(),"stopPropagation"in t&&t.stopPropagation()),c.info("Cover deletion coming soon")},ls=s=>{T?.id===s.id&&w?ye():Se({id:s.id,title:s.songTitle||s.voiceModelName,artist:s.voiceModelName,audioUrl:s.convertedAudioUrl,thumbnailUrl:s.avatarUrl})},Ve=async(s,t)=>{if(console.log("[Download] handleDownload called",{isAuthenticated:m,subscriptionLoading:X,hasPaidPlan:je,subscription:R}),!m){console.log("[Download] User not authenticated, showing auth modal"),U(!0);return}if(!X&&!je){if(Ps()){me({audioUrl:s,fileName:t});return}Le(),Ds.capture("download_personal_free",{source:"songs",via:"direct"})}await Me(s,t)},Me=async(s,t)=>{const l=`/api/download?url=${encodeURIComponent(s)}&filename=${encodeURIComponent(t)}`;try{const a=await fetch(l);if(!a.ok){const S=await a.json().catch(()=>({error:"Download failed"}));a.status===403?(c.error(S.error||"Download is only available for paid plans. Please upgrade."),u(j("/pricing"))):c.error(S.error||"Download failed. Please try again.");return}const o=await a.blob(),n=window.URL.createObjectURL(o),d=document.createElement("a");d.href=n,d.download=t,document.body.appendChild(d),d.click(),d.remove(),window.URL.revokeObjectURL(n)}catch(a){console.error("Download error:",a),c.error("Download failed. Please try again.")}},Te=async(s,t)=>{try{const l=await fetch(s);if(!l.ok)throw new Error("Download failed");const a=await l.blob(),o=URL.createObjectURL(a),n=document.createElement("a");n.href=o,n.download=`${t}.mp4`,document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(o),c.success("Video downloaded successfully!")}catch(l){console.error("Video download error:",l),c.error("Failed to download video. Please try again.")}},se=async(s,t)=>{const l=`${window.location.origin}${j(`/song/${s}`)}`;try{await navigator.clipboard.writeText(l),c.success("Copied successfully!")}catch(a){console.error("Error copying link:",a),c.error("Failed to copy link")}},te=s=>{switch(s){case"completed":return null;case"processing":return e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:485",className:"px-2 py-0.5 text-[9px] font-medium rounded-full bg-blue-500/10 text-blue-200/70 border border-blue-400/20",children:"Processing"});case"pending":return e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:487",className:"px-2 py-0.5 text-[9px] font-medium rounded-full bg-amber-500/10 text-amber-200/70 border border-amber-400/20",children:"Pending"});case"failed":return e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:489",className:"px-2 py-0.5 text-[9px] font-medium rounded-full bg-rose-500/10 text-rose-200/70 border border-rose-400/20",children:"Failed"});default:return e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:491",className:"px-2 py-0.5 text-[9px] font-medium rounded-full bg-white/5 text-muted-foreground border border-white/10",children:s})}},ns=s=>new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),is=()=>ze?e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:506",className:"flex items-center justify-center py-20",children:e.jsx($,{"data-loc":"client/src/pages/Songs.tsx:507",className:"h-8 w-8 animate-spin text-primary","aria-hidden":"true"})}):m?we.length===0?e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:536",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:537",className:"director-card p-12 max-w-md",children:[e.jsx(k,{"data-loc":"client/src/pages/Songs.tsx:538",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:539",className:"director-section-title mb-3",children:i("library.emptyStates.noMusic",{defaultValue:"No AI Music Yet"})}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:540",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:i("library.emptyStates.noMusicDescription",{defaultValue:"Start creating your first AI-generated song"})}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:543",onClick:()=>u("/"),className:"gradient-accent glow-hover rounded-full px-8",children:[e.jsx(k,{"data-loc":"client/src/pages/Songs.tsx:547",className:"h-4 w-4 mr-2"}),i("library.createButtons.createMusic",{defaultValue:"Create Music"})]})]})}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:556",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:we.map((s,t)=>{const l=fe.has(s.id),a=T?.id===s.id,o=a&&w;return e.jsx(le,{"data-loc":"client/src/pages/Songs.tsx:562",className:"director-card p-6 cursor-pointer",style:{animationDelay:`${t*.1}s`},onClick:n=>{if(n.defaultPrevented)return;const d=n.target;if(n.nativeEvent,d.closest("[data-button-container]")!==null||d.closest("[data-dropdown-container]")!==null||d.closest("button")!==null||d.tagName==="BUTTON"||d.parentElement&&d.parentElement.tagName==="BUTTON"||L.current===s.id){L.current=null;return}l||d.closest('[role="menuitem"]')||d.closest("[data-radix-popper-content-wrapper]")||d.closest('[data-slot="dropdown-menu-content"]')||u(`/song/${s.id}`)},children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:604",className:"flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:605",className:"relative flex-shrink-0",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:606",className:"w-24 h-24 gradient-card rounded-2xl flex items-center justify-center overflow-hidden relative",children:[e.jsx(k,{"data-loc":"client/src/pages/Songs.tsx:607",className:"h-10 w-10 text-primary"}),s.imageUrl&&s.imageUrl.startsWith("http")&&!Be(s.imageUrl)&&e.jsx("img",{"data-loc":"client/src/pages/Songs.tsx:609",src:s.imageUrl,alt:s.title||"Track",className:"w-full h-full object-cover absolute inset-0",onError:n=>{n.currentTarget.style.display="none"}}),o&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:619",className:"absolute inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center pointer-events-none",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:620",className:"wave-bars",children:[e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:621",className:"wave-bar"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:622",className:"wave-bar"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:623",className:"wave-bar"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:624",className:"wave-bar"})]})}),s.status==="completed"&&s.audioUrl&&e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:629",onClick:n=>{n.preventDefault(),n.stopPropagation(),Ye(s)},"data-button-container":!0,className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 h-9 w-9 rounded-full bg-black/60 hover:bg-black/75 text-white flex items-center justify-center shadow-md transition-colors z-10 ${a?"ring-2 ring-primary/70":""}`,"aria-label":a&&w?"Pause":"Play",children:a&&w?e.jsx(Ie,{"data-loc":"client/src/pages/Songs.tsx:642",className:"h-4 w-4 text-white drop-shadow-lg","aria-hidden":"true"}):e.jsx(ne,{"data-loc":"client/src/pages/Songs.tsx:644",className:"h-4 w-4 text-white drop-shadow-lg ml-0.5","aria-hidden":"true"})})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:651",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:652",className:"flex items-start justify-between gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:653",className:"font-bold text-sm sm:text-base truncate flex-1",children:s.title||"Untitled"}),!!s.published&&e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:655",className:"hidden md:inline-flex px-2 py-0.5 text-[9px] font-medium rounded-full border bg-emerald-500/10 text-emerald-200/70 border-emerald-400/20",children:i("library.published",{defaultValue:"Published"})})]}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:660",className:"text-sm mb-3 line-clamp-2",style:{color:"var(--d-fg-dim)"},children:s.description||i("library.noDescription",{defaultValue:"No description"})}),s.status!=="completed"&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:664",className:"flex items-center justify-between mb-2",children:te(s.status)}),s.status==="completed"&&s.audioUrl&&e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:669",className:"flex items-center gap-4 mt-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:670",className:"flex items-center gap-1 text-xs",style:{color:"var(--d-fg-dim)"},children:[e.jsx(Is,{"data-loc":"client/src/pages/Songs.tsx:671",className:"h-3 w-3","aria-hidden":"true"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:672",children:s.playCount||0})]}),e.jsxs("button",{"data-loc":"client/src/pages/Songs.tsx:674",onClick:n=>Xe(s,n),className:"flex items-center gap-1 text-xs hover:text-primary transition-colors",style:{color:"var(--d-fg-dim)"},"aria-label":`Like, ${s.likeCount||0} likes`,children:[e.jsx(As,{"data-loc":"client/src/pages/Songs.tsx:680",className:"h-3 w-3","aria-hidden":"true"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:681",children:s.likeCount||0})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:687",className:"flex flex-col gap-2","data-button-container":!0,onMouseDown:n=>{n.stopPropagation()},onClick:n=>{n.stopPropagation()},onPointerDown:n=>{n.stopPropagation()},children:[s.status==="completed"&&s.audioUrl&&s.userId===ue?.id&&e.jsxs(e.Fragment,{children:[e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:702",size:"sm",variant:"ghost",className:"director-icon-btn p-0",onClick:n=>{n.preventDefault(),n.stopPropagation(),Ve(s.audioUrl,`${s.title||"Untitled"}.mp3`)},"aria-label":i("common.download",{defaultValue:"Download"}),children:e.jsx(F,{"data-loc":"client/src/pages/Songs.tsx:713",className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:715",size:"sm",variant:"ghost",className:"director-icon-btn p-0",onClick:n=>{n.preventDefault(),n.stopPropagation(),se(s.id,s.title||"Untitled")},"aria-label":"Share",children:e.jsx(ie,{"data-loc":"client/src/pages/Songs.tsx:726",className:"h-4 w-4","aria-hidden":"true"})})]}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:730","data-dropdown-container":!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Songs.tsx:731",open:l,onOpenChange:n=>{E(d=>{const S=new Set(d);return n?S.add(s.id):S.delete(s.id),S})},children:[e.jsx(re,{"data-loc":"client/src/pages/Songs.tsx:745",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:746",className:"director-icon-btn p-0","aria-label":"More options",children:e.jsx(ge,{"data-loc":"client/src/pages/Songs.tsx:750",className:"h-4 w-4","aria-hidden":"true"})})}),e.jsxs(ce,{"data-loc":"client/src/pages/Songs.tsx:753",align:"end",className:"bg-gray-900 border-gray-700",style:{background:"#16161f",border:"1px solid rgba(255,255,255,0.10)",boxShadow:"0 24px 70px rgba(0,0,0,0.72)",zIndex:1e4},children:[e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:763",onSelect:n=>{n.preventDefault(),Q({id:s.id,title:s.title||"Untitled"})},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(Re,{"data-loc":"client/src/pages/Songs.tsx:770",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Add to Playlist"]}),s.status==="completed"&&s.audioUrl&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:774",onSelect:n=>{n.preventDefault();const d=encodeURIComponent(s.audioUrl),S=encodeURIComponent(s.title||"Song"),ps=encodeURIComponent(s.id);u(j(`/ai-music-video-generator?audioUrl=${d}
1&audioName=${S}&trackId=${ps}`))},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:784",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Create Music Video"]}),e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:788",onSelect:n=>{n.preventDefault(),Ze(s,n)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(js,{"data-loc":"client/src/pages/Songs.tsx:795",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Reuse"]}),s.status==="completed"&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:799",onSelect:n=>{n.preventDefault(),qe(s,n)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(de,{"data-loc":"client/src/pages/Songs.tsx:806",className:"h-4 w-4 mr-2","aria-hidden":"true"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:807",className:"flex-1",children:s.published?i("library.unpublish",{defaultValue:"Unpublish"}):i("songs.publish",{defaultValue:"Publish"})}),!!s.published&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:809",className:"ml-2 w-10 h-5 bg-green-500 rounded-full relative",children:e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:810",className:"absolute right-0.5 top-0.5 w-4 h-4 bg-white rounded-full"})})]}),e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:815",onSelect:n=>{n.preventDefault(),es(s,n)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx($e,{"data-loc":"client/src/pages/Songs.tsx:822",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Delete"]})]})]})})]})]})},s.id)})}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:514",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:515",className:"director-card p-12 max-w-md",children:[e.jsx(ae,{"data-loc":"client/src/pages/Songs.tsx:516",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:517",className:"director-section-title mb-3",children:"Sign in to view your library"}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:520",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:"Create an account to save and manage your AI-generated music"}),e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:523",className:"gradient-accent glow-hover rounded-full px-8",onClick:()=>U(!0),children:"Sign In"})]})}),os=()=>We?e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:840",className:"flex items-center justify-center py-20",children:e.jsx($,{"data-loc":"client/src/pages/Songs.tsx:841",className:"h-8 w-8 animate-spin text-primary","aria-hidden":"true"})}):m?ve.length===0?e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:870",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:871",className:"director-card p-12 max-w-md",children:[e.jsx(I,{"data-loc":"client/src/pages/Songs.tsx:872",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:873",className:"director-section-title mb-3",children:i("library.emptyStates.noCovers",{defaultValue:"No AI Covers Yet"})}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:874",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:i("library.emptyStates.noCoversDescription",{defaultValue:"Start creating your first AI voice cover"})}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:877",onClick:()=>u("/ai-cover"),className:"gradient-accent glow-hover rounded-full px-8",children:[e.jsx(I,{"data-loc":"client/src/pages/Songs.tsx:881",className:"h-4 w-4 mr-2"}),i("library.createButtons.createCover",{defaultValue:"Create Cover"})]})]})}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:890",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:ve.map((s,t)=>e.jsx(le,{"data-loc":"client/src/pages/Songs.tsx:892",className:"director-card p-6 cursor-pointer",style:{animationDelay:`${t*.1}s`},onClick:()=>u(j(`/voice-cover/${s.id}`)),children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:898",className:"flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:899",className:"relative flex-shrink-0 group",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:900",className:"w-24 h-24 rounded-2xl flex items-center justify-center overflow-hidden relative bg-white/6 border border-white/10",children:[s.avatarUrl&&s.avatarUrl.startsWith("http")?e.jsx("img",{"data-loc":"client/src/pages/Songs.tsx:902",src:s.avatarUrl,alt:s.voiceModelName,className:"w-full h-full object-cover",onError:l=>{l.currentTarget.style.display="none"}}):e.jsx(I,{"data-loc":"client/src/pages/Songs.tsx:911",className:"h-10 w-10 text-primary"}),s.status==="completed"&&s.convertedAudioUrl&&e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:914",onClick:l=>{l.preventDefault(),l.stopPropagation(),ls(s)},className:"absolute inset-0 bg-black/40 hover:bg-black/60 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity","aria-label":T?.id===s.id&&w?"Pause":"Play",children:T?.id===s.id&&w?e.jsx(Ie,{"data-loc":"client/src/pages/Songs.tsx:924",className:"h-8 w-8 text-white drop-shadow-lg","aria-hidden":"true"}):e.jsx(ne,{"data-loc":"client/src/pages/Songs.tsx:926",className:"h-8 w-8 text-white drop-shadow-lg ml-0.5","aria-hidden":"true"})})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:933",className:"flex-1 min-w-0",children:[e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:934",className:"font-bold text-sm sm:text-base mb-1 truncate",children:s.songTitle||s.voiceModelName}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:937",className:"text-sm mb-3",style:{color:"var(--d-fg-dim)"},children:s.songTitle?s.voiceModelName:i("aiCover.voiceCoverLabel",{defaultValue:"AI Voice Cover"})}),s.status!=="completed"&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:941",className:"flex items-center justify-between",children:te(s.status)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:947",className:"flex flex-col gap-2",children:[s.status==="completed"&&s.convertedAudioUrl&&s.userId===ue?.id&&e.jsxs(e.Fragment,{children:[e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:950",size:"sm",variant:"ghost",className:"director-icon-btn p-0",onClick:l=>{l.stopPropagation(),Ve(s.convertedAudioUrl,`${s.songTitle||s.voiceModelName} (${s.voiceModelName}).mp3`)},"aria-label":"Download",children:e.jsx(F,{"data-loc":"client/src/pages/Songs.tsx:960",className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:962",size:"sm",variant:"ghost",className:"director-icon-btn p-0",onClick:l=>{l.stopPropagation(),se(s.id,s.songTitle||s.voiceModelName||"Untitled")},"aria-label":"Share",children:e.jsx(ie,{"data-loc":"client/src/pages/Songs.tsx:972",className:"h-4 w-4","aria-hidden":"true"})})]}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:976","data-dropdown-container":!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Songs.tsx:977",onOpenChange:l=>{E(l?a=>
1new Set(a).add(s.id):a=>{const o=new Set(a);return o.delete(s.id),o})},children:[e.jsx(re,{"data-loc":"client/src/pages/Songs.tsx:990",asChild:!0,children:e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:991",size:"sm",variant:"ghost",className:"director-icon-btn p-0",onClick:l=>l.stopPropagation(),"aria-label":"More options",children:e.jsx(ge,{"data-loc":"client/src/pages/Songs.tsx:998",className:"h-4 w-4","aria-hidden":"true"})})}),e.jsxs(ce,{"data-loc":"client/src/pages/Songs.tsx:1001",align:"end",className:"bg-gray-900 border-gray-700",style:{background:"#16161f",border:"1px solid rgba(255,255,255,0.10)",boxShadow:"0 24px 70px rgba(0,0,0,0.72)",zIndex:1e4},children:[e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1011",onSelect:l=>{l.preventDefault(),Q({id:s.id,coverId:s.id,title:s.songTitle||s.voiceModelName||"Untitled"})},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(Re,{"data-loc":"client/src/pages/Songs.tsx:1022",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Add to Playlist"]}),s.status==="completed"&&s.convertedAudioUrl&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1026",onSelect:l=>{l.preventDefault();const a=encodeURIComponent(s.convertedAudioUrl),o=encodeURIComponent(s.songTitle||s.voiceModelName||"Cover");u(j(`/ai-music-video-generator?audioUrl=${a}&audioName=${o}`))},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1035",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Create Music Video"]}),s.status==="completed"&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1040",onSelect:l=>{l.preventDefault(),ts(s,l)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(de,{"data-loc":"client/src/pages/Songs.tsx:1047",className:"h-4 w-4 mr-2","aria-hidden":"true"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1048",className:"flex-1",children:"Publish"})]}),e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1051",onSelect:l=>{l.preventDefault(),as(s,l)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx($e,{"data-loc":"client/src/pages/Songs.tsx:1058",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Delete"]})]})]})})]})]})},s.id))}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:848",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:849",className:"director-card p-12 max-w-md",children:[e.jsx(ae,{"data-loc":"client/src/pages/Songs.tsx:850",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:851",className:"director-section-title mb-3",children:"Sign in to view your library"}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:854",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:"Create an account to save and manage your AI voice covers"}),e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:857",className:"gradient-accent glow-hover rounded-full px-8",onClick:()=>U(!0),children:"Sign In"})]})}),rs=({video:s,isHovered:t})=>{const l=r.useRef(null);return r.useEffect(()=>{const a=l.current;!a||!s.videoUrl||(t&&s.status==="completed"?(a.currentTime=0,a.play().catch(()=>{})):(a.pause(),a.currentTime=0))},[t,s.videoUrl,s.status]),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1091",className:"relative flex-shrink-0 group",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1092",className:"w-full aspect-square gradient-card rounded-2xl flex items-center justify-center overflow-hidden relative",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1093",className:"h-10 w-10 text-primary"}),s.status==="completed"&&s.videoUrl?e.jsxs(e.Fragment,{children:[!t&&s.thumbnailUrl&&s.thumbnailUrl.startsWith("http")&&e.jsx("img",{"data-loc":"client/src/pages/Songs.tsx:1098",src:s.thumbnailUrl,alt:s.title||"Video",className:"w-full h-full object-cover absolute inset-0",onError:a=>{a.currentTarget.style.display="none"}}),e.jsx("video",{"data-loc":"client/src/pages/Songs.tsx:1108",ref:l,src:s.videoUrl,className:"w-full h-full object-cover absolute inset-0",muted:!0,loop:!0,playsInl
1ine:!0,preload:"metadata",style:{display:t?"block":"none"}}),e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:1119",onClick:a=>{a.preventDefault(),a.stopPropagation(),K(s)},className:"absolute inset-0 flex items-center justify-center bg-black/0 hover:bg-black/30 transition-all duration-200 z-10","aria-label":"Play video",children:e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1128",className:`w-14 h-14 rounded-full bg-white/90 flex items-center justify-center shadow-lg transition-all duration-200 ${t?"scale-100 opacity-100":"scale-90 opacity-70"}`,children:e.jsx(ne,{"data-loc":"client/src/pages/Songs.tsx:1129",className:"h-7 w-7 text-gray-900 ml-1",fill:"currentColor"})})})]}):s.thumbnailUrl&&s.thumbnailUrl.startsWith("http")&&e.jsx("img",{"data-loc":"client/src/pages/Songs.tsx:1135",src:s.thumbnailUrl,alt:s.title||"Video",className:"w-full h-full object-cover absolute inset-0",onError:a=>{a.currentTarget.style.display="none"}})]})})},cs=()=>e.jsxs("section",{"data-loc":"client/src/pages/Songs.tsx:1151",className:"mb-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1152",className:"mb-3 flex items-center justify-between",children:[e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1153",className:"director-section-title text-base",children:i("library.pendingProjects.title",{defaultValue:"In progress"})}),e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:1156",type:"button",onClick:()=>u("/projects"),className:"text-sm hover:underline",style:{color:"var(--d-fg-dim)"},children:i("library.pendingProjects.viewAll",{defaultValue:"All projects →"})})]}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1165",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Z.map(s=>{const t=s.exportThumbnailUrl||s.firstStoryboardImageUrl||s.firstWideReferenceImageUrl||s.characterImageUrl||null,l=s.title?.trim()||i("library.pendingProjects.untitled",{defaultValue:"Untitled project"}),a=String(s.status||s.step||"draft").replace(/[-_]/g," ");return e.jsxs("button",{"data-loc":"client/src/pages/Songs.tsx:1178",type:"button",onClick:()=>u(`/ai-music-video/${s.id}`),className:"director-card flex items-center gap-3 p-3 text-left",children:[e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1184",className:"flex h-14 w-24 shrink-0 items-center justify-center overflow-hidden rounded-md bg-white/5",children:t?e.jsx("img",{"data-loc":"client/src/pages/Songs.tsx:1186",src:t,alt:"",loading:"lazy",className:"h-full w-full object-cover"}):e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1188",className:"h-5 w-5",style:{color:"var(--d-fg-dim)"}})}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1191",className:"min-w-0 flex-1",children:[e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1192",className:"truncate text-sm font-semibold",children:l}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1193",className:"mt-0.5 text-xs capitalize",style:{color:"var(--d-fg-dim)"},children:[a," · ",ns(s.updatedAt??s.createdAt??new Date)]})]}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1197",className:"text-xs font-semibold",style:{color:"var(--d-accent)"},children:i("library.pendingProjects.continue",{defaultValue:"Continue"})})]},s.id)})})]}),ds=()=>_e?e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1210",className:"flex items-center justify-center py-20",children:e.jsx($,{"data-loc":"client/src/pages/Songs.tsx:1211",className:"h-8 w-8 animate-spin text-primary","aria-hidden":"true"})}):m?Ne.length===0?Z.length>0?null:e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1241",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1242",className:"director-card p-12 max-w-md",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1243",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1244",className:"director-section-title mb-3",children:i("library.emptyStates.noVideos",{defaultValue:"No AI Videos Yet"})}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:1245",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:i("library.emptyStates.noVideosDescription",{defaultValue:"Start creating your first AI music video"})}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1248",onClick:()=>u("/ai-music-video-generator"),className:"gradient-accent glow-hover rounded-full px-8",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1252",className:"h-4 w-4 mr-2"}),i("library.createButtons.createVideo",{defaultValue:"Create Video"})]})]})}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1261",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Ne.map((s,t)=>{const l=fe.has(s.id);return e.jsx(le,{"data-loc":"client/src/pages/Songs.tsx:1265",className:"director-card p-6 cursor-pointer",style:{animationDelay:`${t*.1}s`},onMouseEnter:()=>be(s.id),onMouseLeave:()=>be(null),onClick:a=>{if(a.defaultPrevented)return;const o=a.target;if(o.closest("[data-button-container]")!==null||o.closest("[data-dropdown-container]")!==null||o.closest("button")!==null||o.tagName==="BUTTON"||o.parentElement&&o.parentElement.tagName==="BUTTON"||L.current===s.id){L.current=null;return}l||o.closest('[role="menuitem"]')||o.closest("[data-radix-popper-content-wrapper]")||o.closest('[data-slot="dropdown-menu-content"]')||s.status==="completed"&&s.videoUrl&&u(j(`/video/${s.id}`))},children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1311",className:"flex flex-col gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1313",className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1314",className:"font-bold text-sm truncate flex-1",children:s.title||i("videoDetail.untitledVideo",{defaultValue:"Untitled Video"})}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1315",className:"flex items-center gap-2 flex-shrink-0",children:[s.status==="completed"&&!!s.published&&e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1317",className:"hidden md:inline-flex px-2 py-0.5 text-[9px] font-medium rounded-full border bg-emerald-500/10 text-emerald-200/70 border-emerald-400/20",children:i("library.published",{defaultValue:"Published"})}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1321","data-dropdown-container":!0,onClick:a=>a.stopPropagation(),onMouseDown:a=>a.stopPropagation(),children:e.jsxs(oe,{"data-loc":"client/src/pages/Songs.tsx:1326",open:l,onOpenChange:a=>{E(o=>{const n=new Set(o);return a?n.add(s.id):n.delete(s.id),n})},children:[e.jsx(re,{"data-loc":"client/src/pages/Songs.tsx:1340",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:1341",className:"director-icon-btn p-0","aria-label":"More options",children:e.jsx(ge,{"data-loc":"client/src/pages/Songs.tsx:1345",className:"h-4 w-4","aria-hidden":"true"})})}),e.jsxs(ce,{"data-loc":"client/src/pages/Songs.tsx:1348",align:"end",className:"bg-gray-900 border-gray-700",style:{background:"#16161f",border:"1px solid rgba(255,255,255,0.10)",boxShadow:"0 24px 70px rgba(0,0,0,0.72)",zIndex:1e4},children:[s.status==="completed"&&s.videoUrl&&e.jsxs(e.Fragment,{children:[e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1360",onSelect:a=>{a.preventDefault(),Te(s.videoUrl,s.title||"video")},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(F,{"data-loc":"client/src/pages/Songs.tsx:1367",className:"h-4 w-4 mr-2","aria-hidden":"true"}),i("common.download",{defaultValue:"Download"})]}),e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1370",onSelect:a=>{a.preventDefault(),se(s.id,s.title||"Untitled Video")},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(ie,{"data-loc":"client/src/pages/Songs.tsx:1377",className:"h-4 w-4 mr-2","aria-hidden":"true"}),i("common.share",{defaultValue:"Share"})]})]}),e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1382",onSelect:a=>{a.preventDefault(),M({id:s.id,title:s.title||""}),v(s.title||"")},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(Es,{"data-loc":"client/src/pages/Songs.tsx:1390",className:"h-4 w-4 mr-2","aria-hidden":"true"}),"Edit Title"]}),s.status==="completed"&&s.lyrics&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1394",onSelect:a=>{a.preventDefault(),c.loading("Burning subtitles into video…",{id:"burn-subtitles"}),C.mutate({videoId:s.id})},className:"cursor-pointer text-white hover:bg-gray-800",disabled:C.isPending,children:[e.jsx(ws,{"data-loc":"client/src/pages/Songs.tsx:1403",className:"h-4 w-4 mr-2","aria-hidden":"true"}),C.isPending?"Burning…":"Burn Subtitles"]}),s.status==="completed"&&e.jsxs(x,{"data-loc":"client/src/pages/Songs.tsx:1408",onSelect:a=>{a.preventDefault(),s.published?J(s):Y(s)},className:"cursor-pointer text-white hover:bg-gray-800",children:[e.jsx(de,{"data-loc":"client/src/pages/Songs.tsx:1419",className:"h-4 w-4 mr-2","aria-hidden":"true"}),s.published?i("library.unpublish",{defaultValue:"Unpublish"}):i("songs.publish",{defaultValue:"Publish"})]})]})]})})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1430",className:"w-full aspect-[4/5] relative [&_video::-webkit-media-controls-time-remaining-display]:hidden [&_video::-webkit-media-controls-current-time-display]:hidden",children:e.jsx(rs,{"data-loc":"client/src/pages/Songs.tsx:1431",video:s,isHovered:Oe===s.id})}),s.status!=="completed"&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1439",className:"flex items-center justify-between",children:te(s.status)})]})},s.id)})}):e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1218",className:"flex flex-col items-center justify-center py-20 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1219",className:"director-card p-12 max-w-md",children:[e.jsx(ae,{"data-loc":"client/src/pages/Songs.tsx:1220",className:"h-12 w-12 mb-4 mx-auto",style:{color:"var(--d-accent)"}}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1221",className:"director-section-title mb-3",children:"Sign in to view your library"}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:1224",className:"mb-6",style:{color:"var(--d-fg-dim)"},children:"Create an account to save and manage your AI-generated videos"}),e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:1227",className:"gradient-accent glow-hover rounded-full px-8",onClick:()=>U(!0),children:"Sign In"})]})}),gs=s=>{V&&Pe.mutate({id:V.id,publishedTitle:s})},us=()=>{q&&De.mutate({id:q.id})};return e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1483",className:"director-surface flex flex-col min-h-screen",children:[e.jsx("header",{"data-loc":"client/src/pages/Songs.tsx:1485",className:"relative px-6 md:px-10 pt-10 pb-8",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1486",className:"max-w-[1280px] mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1487",className:"flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1488",children:[e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1489",className:"director-eyebrow mb-3",children:i("library.title",{defaultValue:"Your library"})}),e.jsxs("h1",{"data-loc":"client/src/pages/Songs.tsx:1492",className:"director-hero text-5xl md:text-7xl",children:["Your creative ",e.jsx("em",{"data-loc":"client/src/pages/Songs.tsx:1493",children:"masterpieces."})]}),e.jsx("p",{"data-loc":"client/src/pages/Songs.tsx:1495",className:"mt-4 text-base md:text-lg",style:{color:"var(--d-fg-dim)",fontStyle:"italic",fontFamily:"Instrument Serif, serif"},children:"Everything you've generated — music, covers, and videos."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1502",className:"flex flex-nowrap items-center gap-2 sm:gap-3 w-full sm:w-auto overflow-x-auto sm:overflow-visible scrollbar-hide",children:[e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1503",variant:"outline",size:"sm",onClick:()=>u("/ai-music-generator"),className:"rounded-full border-primary/30 hover:border-primary hover:bg-primary/10 text-[11px] sm:text-sm px-3 py-1.5 sm:px-4 sm:py-2 whitespace-nowrap",children:[e.jsx(k,{"data-loc":"client/src/pages/Songs.tsx:1509",className:"h-3 w-3 mr-1.5 sm:h-4 sm:w-4 sm:mr-2"}),i("library.createButtons.createMusic",{defaultValue:"Create Music"})]}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1512",variant:"outline",size:"sm",onClick:()=>u("/ai-cover"),className:"rounded-full border-accent/30 hover:border-accent hover:bg-accent/10 text-[11px] sm:text-sm px-3 py-1.5 sm:px-4 sm:py-2 whitespace-nowrap",children:[e.jsx(I,{"data-loc":"client/src/pages/Songs.tsx:1518",className:"h-3 w-3 mr-1.5 sm:h-4 sm:w-4 sm:mr-2"}),i("library.createButtons.createCover",{defaultValue:"Create Cover"})]}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1521",variant:"outline",size:"sm",onClick:()=>u("/ai-music-video-generator"),className:"rounded-full border-primary/30 hover:border-primary hover:bg-primary/10 text-[11px] sm:text-sm px-3 py-1.5 sm:px-4 sm:py-2 whitespace-nowrap",children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1527",className:"h-3 w-3 mr-1.5 sm:h-4 sm:w-4 sm:mr-2"}),i("library.createButtons.createMusicVideo",{defaultValue:"Create MV"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1534",className:"flex flex-wrap items-center gap-2 mt-8 w-full sm:w-fit",children:[e.jsxs("button",{"data-loc":"client/src/pages/Songs.tsx:1535",onClick:()=>O("ai-music"),className:`director-chip flex items-center gap-2${h==="ai-music"?" is-active":""}`,children:[e.jsx(k,{"data-loc":"client/src/pages/Songs.tsx:1539",className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1540",children:i("library.tabs.aiMusic",{defaultValue:"AI Music"})})]}),e.jsxs("button",{"data-loc":"client/src/pages/Songs.tsx:1542",onClick:()=>O("ai-cover"),className:`director-chip flex items-center gap-2${h==="ai-cover"?" is-active":""}`,children:[e.jsx(I,{"data-loc":"client/src/pages/Songs.tsx:1546",className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1547",children:i("library.tabs.aiCover",{defaultValue:"AI Cover"})})]}),e.jsxs("button",{"data-loc":"client/src/pages/Songs.tsx:1549",onClick:()=>O("ai-video"),className:`director-chip flex items-center gap-2${h==="ai-video"?" is-active":""}`,children:[e.jsx(y,{"data-loc":"client/src/pages/Songs.tsx:1553",className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),e.jsx("span",{"data-loc":"client/src/pages/Songs.tsx:1554",children:i("library.tabs.aiMusicVideo",{defaultValue:"AI MV"})})]})]})]})}),e.jsx("main",{"data-loc":"client/src/pages/Songs.tsx:1561",className:"relative flex-1 px-6 md:px-10 py-6 pb-24",children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1562",className:"max-w-[1280px] mx-auto xl:flex xl:items-start xl:gap-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1563",className:"min-w-0 flex-1",children:[h==="ai-video"&&Z.length>0?cs():null,h==="ai-music"?is():h==="ai-cover"?os():ds()]}),h==="ai-music"&&e.jsx(Ts,{"data-loc":"client/src/pages/Songs.tsx:156
17"})]})}),e.jsx(bs,{"data-loc":"client/src/pages/Songs.tsx:1572",open:Fe,onClose:()=>U(!1)}),e.jsx(Ae,{"data-loc":"client/src/pages/Songs.tsx:1575",open:!!P,onClose:()=>z(null),onPublish:Je,currentTitle:P?.title||"",imageUrl:P?.imageUrl,isPublishing:Ce.isPending}),e.jsx(Ee,{"data-loc":"client/src/pages/Songs.tsx:1585",open:!!W,onClose:()=>_(null),onUnpublish:Ke,isUnpublishing:Ue.isPending}),e.jsx(Ae,{"data-loc":"client/src/pages/Songs.tsx:1593",open:!!V,onClose:()=>Y(null),onPublish:gs,currentTitle:V?.title||"",imageUrl:V?.thumbnailUrl,isPublishing:Pe.isPending}),e.jsx(Ee,{"data-loc":"client/src/pages/Songs.tsx:1603",open:!!q,onClose:()=>J(null),onUnpublish:us,isUnpublishing:De.isPending}),e.jsx(vs,{"data-loc":"client/src/pages/Songs.tsx:1611",open:!!G,onClose:()=>H(null),onDelete:ss,isDeleting:N.isPending}),e.jsx(Vs,{"data-loc":"client/src/pages/Songs.tsx:1618",open:!!D,onOpenChange:s=>{s||Q(null)},trackId:D?.coverId?void 0:D?.id,coverId:D?.coverId,trackTitle:D?.title}),e.jsx(Ss,{"data-loc":"client/src/pages/Songs.tsx:1630",open:B,onClose:()=>pe(!1),trigger:Cs,description:Ns}),e.jsx(Us,{"data-loc":"client/src/pages/Songs.tsx:1636",open:xe!==null,onClose:()=>me(null),source:"songs",onDownload:()=>{const s=xe;s&&(Le(),Me(s.audioUrl,s.fileName))},onUpgrade:()=>pe(!0)}),f&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1651",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4",onClick:()=>K(null),children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1655",className:"relative flex flex-col items-center max-w-full max-h-full",onClick:s=>s.stopPropagation(),children:[e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:1660",onClick:()=>K(null),className:"absolute -top-12 right-0 p-2 text-white/70 hover:text-white transition-colors z-10","aria-label":"Close",children:e.jsx(ke,{"data-loc":"client/src/pages/Songs.tsx:1665",className:"h-8 w-8","aria-hidden":"true"})}),e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1669",className:"relative rounded-2xl overflow-hidden bg-black shadow-2xl max-h-[80vh]",children:e.jsx(Ms,{"data-loc":"client/src/pages/Songs.tsx:1670",videoUrl:f.videoUrl,lyrics:f.lyrics||void 0,className:"w-auto max-h-[80vh]",poster:f.thumbnailUrl||void 0,autoPlay:!0})}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1680",className:"mt-3 flex items-center justify-between w-full gap-3 flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1681",className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1682",className:"font-semibold text-lg text-white truncate",children:f.title||"Untitled Video"}),e.jsxs("span",{"data-loc":"client/src/pages/Songs.tsx:1685",className:"px-3 py-1 text-xs font-medium rounded-full bg-gradient-to-r from-green-500/20 to-emerald-500/20 text-green-400 border border-green-500/30 flex items-center gap-2 shrink-0",children:[e.jsx(ys,{"data-loc":"client/src/pages/Songs.tsx:1686",className:"h-3 w-3"}),"Completed"]}),e.jsxs("span",{"data-loc":"client/src/pages/Songs.tsx:1689",className:"text-sm shrink-0",style:{color:"var(--d-fg-dim)"},children:[f.resolution||"480p"," • ",f.durationSeconds?`${Math.floor(f.durationSeconds)}s`:""]})]}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1693",variant:"outline",className:"border-white/30 text-white hover:bg-white/10 shrink-0",onClick:()=>Te(f.videoUrl,f.title||"video"),children:[e.jsx(F,{"data-loc":"client/src/pages/Songs.tsx:1698",className:"mr-2 h-4 w-4"}),"Download"]})]})]})}),he&&e.jsx("div",{"data-loc":"client/src/pages/Songs.tsx:1708",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4",onClick:()=>{M(null),v("")},children:e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1715",className:"relative w-full max-w-md bg-gray-900 rounded-2xl p-6 shadow-2xl border border-gray-700",onClick:s=>s.stopPropagation(),children:[e.jsx("button",{"data-loc":"client/src/pages/Songs.tsx:1719",onClick:()=>{M(null),v("")},className:"absolute top-4 right-4 p-1 text-white/70 hover:text-white transition-colors","aria-label":"Close",children:e.jsx(ke,{"data-loc":"client/src/pages/Songs.tsx:1727",className:"h-5 w-5","aria-hidden":"true"})}),e.jsx("h3",{"data-loc":"client/src/pages/Songs.tsx:1730",className:"text-xl font-semibold text-white mb-4",children:"Edit Video Title"}),e.jsx("input",{"data-loc":"client/src/pages/Songs.tsx:1732",type:"text",value:A,onChange:s=>v(s.target.value),placeholder:"Enter video title",className:"w-full px-4 py-3 bg-gray-800 border border-gray-600 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-primary mb-4",maxLength:100,autoFocus:!0}),e.jsxs("div",{"data-loc":"client/src/pages/Songs.tsx:1742",className:"flex gap-3 justify-end",children:[e.jsx(g,{"data-loc":"client/src/pages/Songs.tsx:1743",variant:"outline",onClick:()=>{M(null),v("")},className:"border-gray-600 text-white hover:bg-gray-800",children:"Cancel"}),e.jsxs(g,{"data-loc":"client/src/pages/Songs.tsx:1753",onClick:()=>{A.trim()&&ee.mutate({id:he.id,title:A.trim()})},disabled:!A.trim()||ee.isPending,className:"bg-primary hover:bg-primary/90",children:[ee.isPending?e.jsx($,{"data-loc":"client/src/pages/Songs.tsx:1766",className:"h-4 w-4 animate-spin mr-2","aria-hidden":"true"}):null,"Save"]})]})]})})]})}export{lt as default};
2//# sourceMappingURL=Songs-DrLVgYS7.js.map

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.