PageSourceSearch

https://voicerankings.com/_nuxt/CgpsZGFB.js

js voicerankings.com collected 2026-10-02 01:48:17 UTC 92,548 bytes, 14 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./va9UNPRb.js","./JPKKIjon.js","./entry._ONP7ng-.css"])))=>i.map(i=>d[i]);
2import{_ as lt,aD as at,aX as nt,H as bt,r as p,b5 as It,b as ce,U as J,bc as Lt,d as it,e as c,o as d,g as h,l as S,f as e,p as x,n as U,k as be,j as k,t as R,x as O,F as te,i as pe,h as ze,J as ft,z as Pt,cm as wt,D as st,q as rt,s as dt,y as ct,cl as ut,m as pt,C as Ie,bB as jt,b4 as Bt,L as yt,b2 as At,V as Qe,M as mt,w as kt,R as Ot,N as Le,aS as Ze,aT as Et,E as Ct,c$ as qt,d0 as zt,ck as Ft,u as Ht,b7 as qe,X as ot,aI as Ut,aJ as Dt,bu as Nt,Y as Wt,Z as Gt,as as Zt,$ as Qt,a0 as Jt,T as Yt,bJ as Kt,d1 as Xt,W as eo,aZ as to,G as _t}from"./JPKKIjon.js";import{_ as oo}from"./CYY3KInl.js";import{_ as so}from"./C_Yyvc6G.js";import{a as lo,_ as ao}from"./BpnsnKwJ.js";import{_ as no}from"./BCseVfxl.js";import{_ as io}from"./D_dcqQj8.js";import{_ as ro}from"./H8na4a6W.js";import{_ as co}from"./D-KC81cE.js";import{_ as uo}from"./C8PW84Ur.js";import{_ as po}from"./UZHrbFSL.js";import{C as vo}from"./va9UNPRb.js";import{_ as go}from"./vup59dQO.js";import{_ as ho}from"./BlEdy9BH.js";import{_ as xo}from"./BJ_YBrpe.js";const fo=["disabled"],mo={class:"p-2 w-[400px] bg-white rounded-xl shadow-2xl border border-gray-100 flex flex-col gap-1 z-[60] relative overflow-hidden"},_o={key:0},bo={class:"px-2 pt-1 mb-2"},wo={class:"flex bg-gray-100/80 p-1 rounded-xl gap-1"},yo={class:"px-3 py-1 flex items-center justify-between border-b border-gray-50 mb-1"},ko={class:"text-xs font-black uppercase tracking-widest text-gray-400 leading-none mb-1"},Co={class:"text-[10px] text-gray-500 font-medium"},$o={key:0,class:"py-6 flex justify-center"},So={key:1,class:"py-8 px-4 text-center"},Mo={key:2,class:"max-h-[280px] overflow-y-auto custom-scrollbar flex flex-col gap-0.5"},Vo=["onClick"],Ro=["onKeydown"],To=["onClick"],Io={key:1,class:"flex items-center gap-1 group/title w-full"},Lo={class:"text-xs font-bold text-gray-900 group-hover:text-indigo-600 transition-colors line-clamp-1 capitalize"},Po=["onClick"],jo=["onClick"],Bo=["onClick"],Ao={class:"text-[10px] text-gray-500 italic w-full line-clamp-1 break-words leading-tight pr-6"},Oo={key:1,class:"py-6 px-4 text-center"},Eo={class:"mt-1 flex flex-col pt-1 border-t border-gray-50 bg-gray-50/50 -mx-2 px-2 -mb-2"},qo={key:0,class:"absolute inset-0 bg-white/50 backdrop-blur-sm z-50 flex items-center justify-center"},zo={class:"p-6 md:p-8"},Fo={key:0,class:"max-h-[60vh] overflow-y-auto pr-2 custom-scrollbar"},Ho={class:"mt-8 flex items-center justify-between border-t border-slate-100 pt-6"},Uo={class:"flex items-center gap-2"},Do={__name:"SharedSoundRanksMenu",emits:["open-create"],setup(Ve,{emit:ue}){const ne=at(),E=nt(),{userProfile:he,isUserLogged:se,openLoginModal:C}=bt(),D=p(!1),b=p([]),v=p(!1),B=p(!1),T=p("personal"),N=p(null),oe=p(""),f=p(!1),Z=p(null),L=p(!1),we=ue;async function Ce(_){const l=_.voice_perfect_match_short_id;if(l){D.value=!1,L.value=!0;try{const P=await $fetch(`/api/v1/voice/soundranks/profile/${l}`);Z.value=P,f.value=!0}catch(P){console.error("Error loading SoundRanks profile:",P)}finally{L.value=!1}}}const Y=It(),{isAnalyzing:q}=Y;async function W(){v.value=!0;try{const _=await $fetch("/api/v1/app/matches");b.value=_.perfect_matches||[],b.value.some(P=>!P.voice_perfect_match_user_defaults)||(T.value="examples")}catch(_){console.error("Failed to load past SoundRanks:",_)}finally{v.value=!1}}const ye=ce(()=>b.value.filter(_=>!_.voice_perfect_match_user_defaults)),z=ce(()=>b.value.filter(_=>_.voice_perfect_match_user_defaults)),xe=ce(()=>T.value==="personal"?ye.value:z.value);J(D,_=>{_&&b.value.length===0&&W(),_||setTimeout(()=>{N.value=null},200)});function $e(_){if(N.value)return;D.value=!1;const l={...E.query,soundranks:_};ne.push({query:l})}async function Re(_){if(window.confirm("Are you sure you want to delete this SoundRank?"))try{await $fetch("/api/v1/app/matches",{method:"DELETE",body:{id:_}}),b.value=b.value.filter(l=>l.voice_perfect_match_id!==_)}catch(l){console.error("Failed to delete SoundRank:",l),alert("Failed to delete SoundRank.")}}function re(_){N.value=_.voice_perfect_match_id,oe.value=_.voice_perfect_match_title||"Custom Ranking"}async function M(_){if(!oe.value.trim()){N.value=null;return}try{await $fetch("/api/v1/app/matches",{method:"PATCH",body:{id:_.voice_perfect_match_id,title:oe.value.trim()}}),_.voice_perfect_match_title=oe.value.trim(),N.value=null}catch(l){console.error("Failed to update SoundRank title:",l),alert("Failed to update title.")}}const I=ce(()=>se.value&&he.value?.account_level>0);function A(){D.value=!0}function Q(_){if(!_||N.value===_.voice_perfect_match_id)return"";const l=_.voice_perfect_match_reasoning||"AI-optimized voice ranking based on your requirements.",P=jt.parse(l,{breaks:!0,gfm:!0}),K=_.voice_perfect_match_text||"Custom prompt";return`
3    <div class='p-4 flex flex-col gap-3'>
4      <h3 class="text-xs font-black uppercase tracking-widest text-gray-400 leading-none mb-1">Rank Reasoning</h3>
5      <div class='text-[13px] font-medium text-gray-900 leading-snug line-clamp-10 reasoning-markdown'>
6        ${P}
7      </div>
8      <div class='text-[10px] text-gray-400 bg-gray-50/50 p-2.5 rounded-2xl italic border border-gray-100 overflow-hidden line-clamp-2 relative'>
9        <span class='opacity-50 text-[12px] absolute left-1 top-0'>&ldquo;</span>
10        <span class='px-2'>${K}</span>
11        <span class='opacity-50 text-[12px] absolute right-1 bottom-0'>&rdquo;</span>
12      </div>
13    </div>
14  `}function ie(){D.value=!1,we("open-create")}return(_,l)=>{const P=Lt("VDropdown"),K=wt,ke=pt,ve=it("tooltip");return d(),c(te,null,[h(P,{shown:D.value,"onUpdate:shown":l[10]||(l[10]=r=>D.value=r),triggers:["click"],"auto-hide":!N.value,distance:10,flip:!1,placement:"bottom-end"},{popper:S(()=>[e("div",mo,[e("button",{onClick:l[1]||(l[1]=r=>D.value=!1),class:"absolute top-2 right-2 p-1.5 hover:bg-gray-100 rounded-lg text-gray-400 hover:text-gray-600 transition-all z-10",title:"Close Menu"},[...l[17]||(l[17]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M18 6 6 18"}),e("path",{d:"m6 6 12 12"})],-1)])]),I.value||z.value.length>0?(d(),c("div",_o,[e("div",null,[e("div",bo,[e("div",wo,[I.value?(d(),c("button",{key:0,onClick:l[2]||(l[2]=r=>T.value="personal"),class:U(["flex-1 py-1.5 text-[10px] font-black uppercase tracking-widest rounded-lg transition-all",T.value==="personal"?"bg-white text-indigo-600 shadow-sm":"text-gray-500 hover:text-gray-700"])}," My Rankings ",2)):k("",!0),e("button",{onClick:l[3]||(l[3]=r=>T.value="examples"),class:U(["flex-1 py-1.5 text-[10px] font-black uppercase tracking-widest rounded-lg transition-all",T.value==="examples"?"bg-white text-indigo-600 shadow-sm":"text-gray-500 hover:text-gray-700"])}," Examples ",2)])]),e("div",yo,[e("div",null,[e("h3",ko,R(T.value==="personal"?"Your SoundRanks":"AI Examples"),1),e("p",Co,R(T.value==="personal"?"Custom sorting algorithms":"Pre-defined intelligent filters"),1)]),I.value&&T.value==="personal"?(d(),c("button",{key:0,onClick:be(ie,["stop"]),class:"bg-indigo-50 hover:bg-indigo-100 text-indigo-600 text-[10px] font-black uppercase tracking-wider px-2.5 py-1.5 rounded-md transition-colors flex items-center gap-1 mr-1"},[...l[18]||(l[18]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M5 12h14"}),e("path",{d:"M12 5v14"})],-1),O(" Create ",-1)])])):k("",!0)]),v.value?(d(),c("div",$o,[...l[19]||(l[19]=[e("svg",{class:"animate-spin h-5 w-5 text-indigo-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):b.value.length===0?(d(),c("div",So,[...l[20]||(l[20]=[e("div",{class:"bg-green-50 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-green-600"},[e("path",{d:"M2 12h4l3-9 5 18 3-9h5"})])],-1),e("p",{class:"text-sm text-gray-600 font-medium"},"No SoundRanks yet",-1),e("p",{class:"text-[10px] text-gray-400 mt-1 leading-relaxed"},"Create a custom AI prompt sequence to filter voices to your exact needs.",-1)])])):(d(),c("div",Mo,[(d(!0),c(te,null,pe(xe.value,r=>ze((d(),c("div",{key:r.voice_perfect_match_id,onClick:o=>$e(r.voice_perfect_match_short_id),class:"flex flex-col items-start px-3 py-2.5 cursor-pointer hover:bg-gray-50 rounded-lg transition-colors group relative"},[e("div",{class:U(["flex items-center justify-between w-full mb-0.5",(r.voice_perfect_match_user_defaults,"pr-14")])},[N.value===r.voice_perfect_match_id&&!r.voice_perfect_match_user_defaults?(d(),c("div",{key:0,class:"flex items-center gap-1 w-full",onClick:l[6]||(l[6]=be(()=>{},["stop"]))},[ze(e("input",{"onUpdate:modelValue":l[4]||(l[4]=o=>oe.value=o),class:"text-xs font-bold text-indigo-600 border-b border-indigo-400 outline-none w-full bg-transparent capitalize",onKeydown:[ft(o=>M(r),["enter"]),l[5]||(l[5]=ft(o=>N.value=null,["escape"]))],autofocus:""},null,40,Ro),[[Pt,oe.value]]),e("button",{onClick:o=>M(r),class:"p-1 text-green-500 hover:bg-green-50 rounded",title:"Save"},[...l[21]||(l[21]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M20 6 9 17l-5-5"})],-1)])],8,To)])):(d(),c("div",Io,[e("span",Lo,R(r.voice_perfect_match_title||"Custom Ranking"),1),r.voice_perfect_match_user_defaults?k("",!0):(d(),c("button",{key:0,onClick:be(o=>re(r),["stop"]),class:"opacity-0 group-hover/title:opacity-100 p-1 text-gray-300 hover:text-indigo-500 transition-all",title:"Edit Title"},[...l[22]||(l[22]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})],-1)])],8,Po))]))],2),e("div",{class:"absolute top-2.5 right-2 flex items-center gap-1",onClick:l[7]||(l[7]=be(()=>{},["stop"]))},[e("button",{onClick:o=>Ce(r),class:"p-1 px-1.5 text-blue-400 hover:text-blue-600 hover:bg-blue-50 rounded-md transition-all opacity-0 group-hover:opacity-100 flex items-center gap-1 text-[9px] font-black uppercase tracking-tighter",title:"View Ideal Profile Blueprint"},[...l[23]||(l[23]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),e("span",null,"Blueprint",-1)])],8,jo),r.voice_perfect_match_user_defaults?k("",!0):(d(),c("button",{key:0,onClick:o=>Re(r.voice_perfect_match_id),class:"p-1 text-gray-300 hover:text-red-500 hover:bg-red-50 rounded-md transition-all opacity-0 group-hover:opacity-100",title:"Delete SoundRank"},[...l[24]||(l[24]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M3 6h18"}),e("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}
14),e("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),e("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),e("line",{x1:"14",y1:"11",x2:"14",y2:"17"})],-1)])],8,Bo))]),e("div",Ao,R(r.voice_perfect_match_text||"AI Sort"),1)],8,Vo)),[[ve,{placement:"left",theme:"soundrank-summary",html:!0,content:Q(r),delay:{show:300,hide:0},disabled:!!N.value}]])),128))]))])])):(d(),c("div",Oo,[l[25]||(l[25]=e("div",{class:"bg-indigo-50 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-indigo-600"},[e("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})])],-1)),l[26]||(l[26]=e("h3",{class:"text-sm font-bold text-gray-900 mb-1"},"Unlock Custom Rankings",-1)),l[27]||(l[27]=e("p",{class:"text-[10px] text-gray-500 mb-4 leading-relaxed px-2"},"Create custom AI sorting algorithms that find exact voice matches for your specific requirements.",-1)),e("button",{onClick:l[8]||(l[8]=r=>x(C)({title:"Pro Feature: My SoundRanks",description:"Upgrade to create custom AI sorting algorithms.",benefits:["Create custom search prompts","Save your favorite ranking parameters","Find the perfect voice faster"]})),class:"inline-flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white text-[10px] font-black uppercase tracking-widest rounded-lg transition-all shadow-md"}," Upgrade to Pro ")])),e("div",Eo,[e("button",{onClick:l[9]||(l[9]=be(r=>B.value=!0,["stop"])),class:"w-full flex items-center justify-between px-3 py-3 hover:bg-indigo-50/80 group transition-all"},[...l[28]||(l[28]=[e("div",{class:"flex items-center gap-2"},[e("div",{class:"w-7 h-7 rounded-lg bg-white border border-gray-100 flex items-center justify-center text-indigo-500 group-hover:bg-indigo-50 transition-colors shadow-sm"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("circle",{cx:"12",cy:"12",r:"10"}),e("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),e("path",{d:"M12 17h.01"})])]),e("div",{class:"text-left"},[e("p",{class:"text-[11px] font-bold text-gray-900 leading-tight"},"How it Works"),e("p",{class:"text-[9px] text-gray-500 font-medium"},"Learn about the AI engine")])],-1),e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"text-gray-300 group-hover:text-indigo-400 group-hover:translate-x-1 transition-all"},[e("path",{d:"m9 18 6-6-6-6"})],-1)])])])])]),default:S(()=>[e("button",{onClick:l[0]||(l[0]=be(r=>D.value?null:A(),["prevent"])),class:U(["flex items-center gap-1.5 px-3 py-2 bg-gradient-to-r from-green-600 to-teal-500 hover:from-green-700 hover:to-teal-600 active:bg-green-800 text-white rounded-lg text-xs font-medium transition-all shadow-sm hover:shadow-md appearance-none cursor-pointer border border-transparent",{"opacity-50 cursor-not-allowed":x(q)}]),disabled:x(q)},[...l[16]||(l[16]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M3 3v18h18"}),e("path",{d:"m19 9-5 5-4-4-3 3"}),e("path",{d:"m19 9-3 0"}),e("path",{d:"m19 9 0 3"})],-1),e("span",null,"My SoundRanks",-1)])],10,fo)]),_:1},8,["shown","auto-hide"]),h(K,{modelValue:B.value,"onUpdate:modelValue":l[11]||(l[11]=r=>B.value=r)},null,8,["modelValue"]),h(x(Ie),{open:f.value,"onUpdate:open":l[15]||(l[15]=r=>f.value=r)},{default:S(()=>[h(x(st),{class:"sm:max-w-[425px] md:max-w-[700px] lg:max-w-[800px] p-0 overflow-hidden rounded-3xl border-slate-200 bg-slate-50/95 backdrop-blur-xl"},{default:S(()=>[L.value?(d(),c("div",qo,[...l[29]||(l[29]=[e("svg",{class:"animate-spin h-8 w-8 text-blue-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):k("",!0),l[34]||(l[34]=e("div",{class:"h-1.5 w-full bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500"},null,-1)),e("div",zo,[h(x(rt),{class:"mb-6"},{default:S(()=>[l[31]||(l[31]=e("div",{class:"flex items-center gap-2 mb-2"},[e("div",{class:"px-2 py-0.5 rounded bg-blue-500 text-[10px] font-black uppercase tracking-widest text-white"}," SoundRanks Blueprint ")],-1)),h(x(dt),{class:"text-2xl md:text-3xl font-black tracking-tight text-slate-900"},{default:S(()=>[O(R(Z.value?.title||"Ideal Voice Profile"),1)]),_:1}),h(x(ct),{class:"text-slate-500 text-sm"},{default:S(()=>[...l[30]||(l[30]=[O(" Technical specifications generated by Sound
14Ranks AI matching engine. ",-1)])]),_:1})]),_:1}),Z.value?(d(),c("div",Fo,[h(ut,{analysis:Z.value.analysis},null,8,["analysis"])])):k("",!0),e("div",Ho,[e("button",{onClick:l[12]||(l[12]=r=>{B.value=!0,f.value=!1}),class:"flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-slate-400 hover:text-indigo-600 transition-colors group"},[...l[32]||(l[32]=[e("svg",{class:"w-4 h-4 text-slate-300 group-hover:text-indigo-500 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),O(" Learn how it works ",-1)])]),e("div",Uo,[h(ke,{to:`/filters?soundranks=${Z.value?.id||""}&sample_text=${encodeURIComponent(Z.value?.sample_text||"")}`,onClick:l[13]||(l[13]=r=>{f.value=!1,D.value=!1}),class:"px-6 py-2 bg-indigo-600 text-white text-xs font-black uppercase tracking-widest rounded-xl hover:bg-indigo-700 transition-all shadow-lg active:scale-95"},{default:S(()=>[...l[33]||(l[33]=[O(" View Ranking ",-1)])]),_:1},8,["to"]),e("button",{onClick:l[14]||(l[14]=r=>f.value=!1),class:"px-6 py-2 bg-slate-900 text-white text-xs font-black uppercase tracking-widest rounded-xl hover:bg-slate-800 transition-all shadow-lg active:scale-95"}," Close Blueprint ")])])])]),_:1})]),_:1},8,["open"])],64)}}},No=lt(Do,[["__scopeId","data-v-322f3b1d"]]),Wo={id:"VoicesContent",class:"bg-white rounded-b-2xl shadow border border-gray-100 min-h-24 flex flex-col relative pb-0"},Go={id:"voice-list-container"},Zo={key:0,class:"absolute inset-0 z-[100] bg-white/60 backdrop-blur-[2px] transition-all duration-300 flex justify-center"},Qo={key:0,class:"mb-6 px-2 sm:px-4 py-3 bg-white border-b border-gray-100 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 transition-all"},Jo={class:"flex flex-col gap-1"},Yo={class:"flex items-center gap-2 flex-wrap"},Ko={class:"text-xl sm:text-2xl font-bold tracking-tight text-slate-800 flex items-center gap-2"},Xo={key:0,class:"text-xs text-slate-500 max-w-2xl font-normal"},es={key:0,class:"flex items-center flex-shrink-0 self-end sm:self-center"},ts=["disabled"],os={key:0,class:"animate-spin w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},ss={key:1,class:"w-3.5 h-3.5 opacity-70 group-hover:opacity-100 transition-opacity",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ls={key:1,class:"mb-6 px-2 sm:px-4 py-3 bg-white border-b border-gray-100 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 transition-all"},as={class:"flex items-center gap-2 flex-wrap"},ns={class:"text-xl sm:text-2xl font-bold tracking-tight text-slate-800 flex items-center gap-2"},is={class:"flex items-center flex-shrink-0 self-end sm:self-center gap-2"},rs={key:2,class:"py-10 text-center text-gray-500"},ds={key:3,class:"gap-10 sm:grid-cols-1 xl:grid-cols-2 3xl:grid-cols-3 grid"},cs={key:0,class:"col-span-full xl:hidden -mx-2 sm:mx-0"},us={key:1,class:"col-span-full hidden xl:block 3xl:hidden"},ps={key:2,class:"col-span-full hidden 3xl:block"},vs={key:4,class:"border-t border-gray-200"},gs={class:"min-w-full divide-y divide-gray-200"},hs={class:"bg-gray-50 sticky top-[52px] md:top-[60px] lg:top-[74px] z-10"},xs={class:"text-left uppercase text-xs font-medium text-gray-500 px-1 py-3"},fs={class:"bg-white divide-y divide-gray-200"},ms={key:0},_s={colspan:"4",class:"px-0 sm:px-4 py-8 bg-slate-50/50"},bs={class:"sticky bottom-0 left-0 right-0 px-1 sm:px-6 py-3 bg-white border-t border-gray-100 shadow-lg z-[90]"},ws={class:"grid gap-4 py-4"},ys={class:"p-6"},ks={class:"flex items-center justify-between mb-6 pb-4 border-b border-gray-100"},Cs={class:"flex items-center gap-3"},$s={class:"text-lg font-bold text-gray-900"},Ss={class:"p-6 text-center"},Ms={class:"text-left text-sm text-slate-600 mb-8 bg-slate-50 p-5 rounded-2xl border border-slate-100 shadow-inner mx-auto relative overflow-hidden"},Vs={class:"flex flex-col gap-2"},Rs={class:"inline-flex self-start"},Ts={class:"inline-flex items-center gap-1 px-2.5 py-0.5 bg-amber-50 border border-amber-200 rounded-xl text-amber-700 font-bold text-xs select-none shadow-sm"},Is={class:"font-mono text-[10px] tracking-wider"},Ls={__name:"VoicesMain",async setup(Ve){let ue,ne;
14const{activeVoiceInPlayer:E,audioUrl:he,isPlaying:se,playVoice:C,closePlayer:D,dismissRating:b}=Bt(),v=nt(),B=at(),T=yt();bt();const{openSidebar:N,startNewSession:oe}=At(),{voiceFilterOptions:f,voiceFilterUpdatesCounter:Z,currentSampleText:L,defaultSampleText:we,voiceSelected:Ce,updateSelectedVoice:Y,voiceShowFavoritesOn:q,voiceShowCreatedOn:W,updateViewMode:ye,updateVoiceVotedRating:z,updateVoiceGeneratedTTS:xe,updateRouteQuery:$e,currentVoicesList:Re}=T,re=p("list");v.query.sample_text&&(L.value=v.query.sample_text);const M=p([]),I=p(0),A=p(25),Q=p(0),ie=p(!1),_=p(""),l=p(null),P=p(null),K=p(!1);v.query.sort_by&&(_.value=v.query.sort_by);function ke(){const a=parseInt(v.query.page||"1",10);I.value=(a-1)*A.value}ke(),J(()=>v.query.page,()=>{ke()}),J(xe,a=>{if(a&&a.voice_tts_uuid&&a.voice_id){const s=M.value.findIndex(g=>g.voice_id===a.voice_id);s>-1&&(M.value[s].voice_tts_uuid=a.voice_tts_uuid)}}),J(z,a=>{if(a&&a.voice_id){const s=M.value.findIndex(g=>g.voice_id===a.voice_id);s>-1&&(M.value[s].has_voted_rating=a.has_voted_rating),E.value&&E.value.voice_id===a.voice_id&&(E.value.has_voted_rating=a.has_voted_rating)}});const ve=p(!0),r=p(!0);Qe(()=>{setTimeout(()=>{r.value=!1},500)}),mt(()=>{ve.value=!1}),J(()=>T.ssrDefaultVoiceQuery.value,a=>{!v.query.sample_text&&a&&a.sample_text&&L.value!==a.sample_text&&(L.value=a.sample_text)},{immediate:!0}),J(re,a=>{a==="grid"&&D()});const o=(a,s,g)=>{const V={},X=g[`${a}_min`],ae=g[`${a}_max`],me=X?parseInt(X):s?.min??0,Me=ae?parseInt(ae):s?.max??10;return me>0&&(V[`${a}_min`]=me),Me<10&&(V[`${a}_max`]=Me),V};function $(){const s=(parseInt(v.query.page||"1",10)-1)*A.value,g=v.query.wpm_min||f.value?.wpmRange?.min||60,V=v.query.wpm_max||f.value?.wpmRange?.max||400,X=v.query.pitch_min||f.value?.pitchRange?.min||60,ae=v.query.pitch_max||f.value?.pitchRange?.max||500,me=v.query.price_min||f.value?.priceRange?.min||0,Me=v.query.price_max||f.value?.priceRange?.max||500,ee=T.ssrDefaultVoiceQuery.value||{};let _e;return v.query.sample_text?_e=v.query.sample_text:ee.sample_text?_e=ee.sample_text:L.value!=we.value&&(_e=L.value),{...{voice_text:_e,service:v.query.service||f.value.service,gender:v.query.gender||ee.gender||f.value.gender,age_estimate:v.query.age_estimate||f.value.age_estimate,language:v.query.language||f.value.languageCode,accent:v.query.accent||f.value.accent,country:v.query.country||f.value.countryCode,collection_id:v.query.collection_id||f.value.collectionId,limit:A.value,offset:s,sort_by:v.query.sort_by||"",creator:v.query.creator||null,soundranks:v.query.soundranks||ee.soundranks||null,wpm_min:g,wpm_max:V,pitch_min:X,pitch_max:ae,price_min:me,price_max:Me,archetype:v.query.archetype||f.value.archetype,texture:v.query.texture||f.value.texture,emotion:v.query.emotion||f.value.emotion,show_created_only:v.query.show_created==="true"||W.value,show_favorites_only:v.query.show_favorites==="true"||q.value,categories:v.query.categories||f.value.categories,tag:v.query.tag||null,search:v.query.search||""},...o("expressiveness",f.value?.expressivenessRange,v.query),...o("roughness",f.value?.roughnessRange,v.query),...o("projection",f.value?.projectionRange,v.query),...o("tempo",f.value?.tempoRange,v.query),...o("brightness",f.value?.brightnessRange,v.query),...o("instability",f.value?.instabilityRange,v.query),...o("articulation",f.value?.articulationRange,v.query),...o("accent_strength",f.value?.accentStrengthRange,v.query),...o("perceived_age",f.value?.perceivedAgeRange,v.query)}}const G=v.path==="/",i=void 0,{data:y,pending:Pe,refresh:je}=([ue,ne]=kt(async()=>Ot("voices-list",async()=>{const a=v.path;if(!(a==="/"||a==="/filters"))return console.log("[Main.vue] Skipping fetch - navigating away from voices list"),null;let g=null;const V=v.query.collection_id||f.value.collectionId;if(V)try{const{collection:ee}=await $fetch("/api/v1/collections/details",{params:{collection_id:V},headers:i});g=ee}catch(ee){console.error("Failed to fetch collection details:",ee)}const X=$(),ae=Object.fromEntries(Object.entries(X).filter(([ee,_e])=>_e!=null&&_e!=="")),Me=`/api/v1/voice/list?${new URLSearchParams(ae).toString()}`;try{const ee=await $fetch(Me,{headers:i});return{voices:ee.voices||[],total:ee.total||0,viewMode:ee.viewMode,collectionDetail
14s:g,matchContext:ee.matchContext}}catch(ee){return console.error("❌ [Main.vue] Exception during fetch:",ee),{voices:[],total:0,viewMode:"grid",collectionDetails:null,matchContext:null}}},{watch:[()=>v.query,Z,q,W,L],server:!G,lazy:G,default:G?()=>null:void 0})),ue=await ue,ne(),ue);J(Pe,a=>{ie.value=a},{immediate:!0}),J(y,a=>{a&&(M.value=a.voices,Re.value=a.voices,Q.value=a.total,localStorage.setItem("viewMode",a.viewMode),l.value=a.collectionDetails,P.value=a.matchContext||null,console.log("[Main.vue] ✅ Received Collection Owner Status:",a.collectionDetails?.is_owner))},{immediate:!0});async function Je(){await je()}function Be({voiceId:a,ttsUuid:s,finalAudioUrl:g}){const V=M.value.findIndex(X=>X.voice_id===a);V>-1&&(M.value[V].voice_tts_uuid=s,M.value[V].voice_text_generated=!0,M.value[V].has_voted_rating=null),E.value&&E.value.voice_id===a&&(E.value.voice_tts_uuid=s,g&&(he.value=g))}function Fe({voiceId:a}){const s=M.value.findIndex(g=>g.voice_id===a);s>-1&&(M.value[s].has_voted_rating=null,M.value[s].voice_tts_uuid=null,M.value[s].voice_text_generated=!1)}async function He({voiceId:a,rating:s}){const g=M.value.findIndex(V=>V.voice_id===a);g>-1&&(M.value[g].has_voted_rating=s),E.value&&E.value.voice_id===a&&(E.value.has_voted_rating=s)}async function Ue(a){const s=f.value.collectionId||v.query.collection_id;if(!l.value?.is_owner||!s)return;const g=M.value.findIndex(V=>V.voice_id===a);g>-1&&(M.value.splice(g,1),Q.value--);try{await $fetch("/api/v1/collections/remove",{method:"POST",body:{collection_id:s,voice_id:a}})}catch(V){console.error("Failed to remove voice:",V),alert("Could not remove voice."),Je()}}async function Ye(a){I.value=a;const s=a/A.value+1;$e({page:s>1?String(s):void 0}),n()}function n(){if(!ve.value||r.value)return;const a=v.path;(a==="/"||a==="/filters")&&setTimeout(()=>{if(!ve.value)return;const g=document.getElementById("voice-list-container");g&&(g.scrollTop=0);const V=document.getElementById("SampleTextCombo");V?V.scrollIntoView({behavior:"smooth",block:"start"}):window.scrollY>100&&window.scrollTo({top:100,behavior:"smooth"})},100)}J(()=>Z.value,()=>{n()}),J(()=>q.value,()=>{n()});const t=ce(()=>M.value.map((a,s)=>{const g={...a};if(g.voice_language_codes=g.voice_language_codes&&g.voice_language_codes.length>0?g.voice_language_codes:[g.voice_language_code],f.value.languageCode&&f.value.languageCode!=="all"){let V=f.value.languageCode;f.value.countryCode&&f.value.countryCode!=="all"&&f.value.countryCode!=="unknown"&&(V+=`-${f.value.countryCode}`);const X=g.voice_language_codes.find(ae=>ae&&ae.toLowerCase().startsWith(V.toLowerCase()));if(X)g.voice_language_code=X;else{const ae=g.voice_language_codes.find(me=>me&&me.toLowerCase().startsWith(f.value.languageCode.toLowerCase()));ae&&(g.voice_language_code=ae)}}return g.voice_text_generated===void 0&&(g.voice_text_generated=!1),g.voice_speed=1,g.audioModeOpened=!1,g.audioBlobURL=null,Ce.value.voice_id===""&&s===0&&I.value===0&&Y(g),g}));function m(a,s=null){M.value&&M.value[a]&&(M.value[a].voice_favorite_id=s)}const w=p(!1),j=p(!1),F=p(""),le=p({}),de=p([]);function De(){w.value=!1,F.value&&F.value!==window.location.pathname?window.history.pushState({},"",F.value):!F.value&&window.location.pathname!=="/"&&window.history.pushState({},"","/")}async function Ae(a,s=!0){if(s){F.value=window.location.pathname;let g=`/voice/${a.voice_service}/${a.voice_gender}/${a.voice_speaker_id}/`;a.view&&a.view!=="generate"&&(g+=""+a.view),le.value.view=a.view,window.history.pushState({modalOpen:!0},"",g)}w.value=!0,j.value=!0;try{const{data:g,error:V}=await Ct("/api/v1/voice/get-overview",{params:{voice_service:a.voice_service,voice_name:a.voice_name,voice_gender:a.voice_gender,voice_speaker_id:a.voice_speaker_id}},"$FJLeX8-fcz");g.value?(le.value=g.value.voice||{},le.value.view=a.view,Y(le.value),de.value=g.value.snippets||[],j.value=!1):(le.value={},de.value=[])}catch(g){console.error("Exception fetching overview:",g),le.value={},de.value=[]}}let Oe=null;Qe(()=>{const a=window.location.pathname.split("/");a.length===5&&a[1]==="voice"&&Ae({voice_service:a[2],voice_gender:a[3],voice_speaker_id:a[4]},!1),Oe=s=>{if(w.value&&(!s.state||!s.state.modalOpen))De();else if(!w.value&&s.state&&s.state.modalOpen){const g=window.location.pathname.split("/");g.length===5&&g[1]==="voice"&&Ae({voice_service:g[2],voice_gender:g[3],voice_speaker_id:g[4]},!1)}},window.addEventListener("popstate",Oe),window.addEventListener("click",vt)}),mt(()=>{Oe&&window.removeEventListener("popstate",Oe),window.removeEventListener("click",vt)});function Ke(a){$e({sort_by:a||void 0,page:void 0})}
14async function Xe(){if(!l.value?.is_owner)return alert("Permission denied.");if(confirm(`Delete "${l.value.collection_name}"?`)){K.value=!0;try{await $fetch("/api/v1/collections/collection",{method:"DELETE",body:{collection_id:l.value.collection_id}}),alert("Collection deleted successfully."),f.value.collectionId="",l.value=null,B.push({path:v.path,query:{}})}catch(a){console.error(a),alert(a.data?.message||"Error deleting collection.")}finally{K.value=!1}}}const u=ce(()=>l.value?.is_owner??!1);J(()=>v.query,a=>{const s=a.sort_by||"";_.value!==s&&(_.value=s);const V=(parseInt(a.page||"1",10)-1)*A.value;I.value!==V&&(I.value=V)},{deep:!0,immediate:!0});const H=p(null),fe=p(!1),Ee=p(null);let Se=null;const Ne=p(!1);function vt(a){fe.value&&(fe.value=!1,Ne.value=!1,setTimeout(()=>{fe.value||(H.value=null,Ee.value=null)},300))}function $t(a,s){Se&&(clearTimeout(Se),Se=null),s&&s.currentTarget?Ee.value=s.currentTarget:s&&s.target&&(Ee.value=s.target.closest("tr")),H.value=a,fe.value=!0}function St(){Se=setTimeout(()=>{Ne.value||(fe.value=!1,setTimeout(()=>{fe.value||(H.value=null,Ee.value=null)},200))},150)}function Mt(){Ne.value=!0,Se&&(clearTimeout(Se),Se=null)}function Vt(){Ne.value=!1,Se=setTimeout(()=>{fe.value=!1,setTimeout(()=>{fe.value||(H.value=null,Ee.value=null)},200)},150)}function gt(a){const{voice:s,audioUrl:g,text:V,snippetId:X}=a;C(s,g,V||L.value,X||s.voice_snippet_id||null)}const et=p(!1),We=p(!1),Ge=ce(()=>{const a=v.query.soundranks;if(a)return Array.isArray(a)?a[0]:a;const s=T.ssrDefaultVoiceQuery.value?.soundranks;return s?Array.isArray(s)?s[0]:s:null}),Rt=()=>{We.value=!0},Tt=()=>{We.value=!1,oe();const a=Ge.value||"top-100",s=new URLSearchParams(v.query).toString(),g=`[Top Matches](soundranks:${a}?${s})`;N(),qt.value=`${g} Ask me anything about this list...`};return(a,s)=>{const g=no,V=io,X=ro,ae=co,me=uo,Me=po,ee=Et,_e=ut,tt=lo,ht=it("tooltip");return d(),c(te,null,[h(g,{documentContentId:"VoicesContent"}),h(V,{voice:H.value,visible:fe.value,"trigger-element":Ee.value,onMouseenter:Mt,onMouseleave:Vt},null,8,["voice","visible","trigger-element"]),e("div",Wo,[e("div",Go,[ie.value?(d(),c("div",Zo,[...s[5]||(s[5]=[e("div",{class:"sticky top-[45vh] h-fit flex flex-col items-center justify-center space-y-4 p-6 rounded-2xl"},[e("div",{class:"relative w-10 h-10"},[e("div",{class:"absolute inset-0 border-4 border-gray-200 rounded-full"}),e("div",{class:"absolute inset-0 border-4 border-blue-500 rounded-full border-t-transparent animate-spin"})])],-1)])])):k("",!0),e("div",{class:U(["py-8 pb-32",[re.value==="list"?"px-0":"sm:px-6 px-1 "]])},[l.value?(d(),c("div",Qo,[e("div",Jo,[e("div",Yo,[e("h1",Ko,R(l.value.collection_name),1),s[6]||(s[6]=e("span",{class:"px-2 py-0.5 bg-indigo-50 border border-indigo-100 text-indigo-600 text-[11px] font-semibold rounded-full"}," Collection ",-1))]),l.value.collection_description?(d(),c("p",Xo,R(l.value.collection_description),1)):k("",!0)]),l.value.is_owner?(d(),c("div",es,[e("button",{onClick:Xe,disabled:K.value,class:"group flex items-center gap-1.5 px-3 py-1.5 bg-white hover:bg-red-50 border border-transparent hover:border-red-200 text-red-600 text-xs font-medium rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed"},[K.value?(d(),c("svg",os,[...s[7]||(s[7]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(d(),c("svg",ss,[...s[8]||(s[8]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"},null,-1)])])),e("span",null,R(K.value?"Deleting...":"Delete Collection"),1)],8,ts)])):k("",!0)])):k("",!0),P.value&&Ge.value?(d(),c("div",ls,[e("div",as,[e("h1",ns,R(P.value.title||"SoundRanks Blueprint"),1),s[9]||(s[9]=e("span",{class:"px-2 py-0.5 bg-purple-50 border border-purple-100 text-purple-600 text-[11px] font-semibold rounded-full"}," SoundRanks ",-1))]),e("div",is,[e("button",{onClick:Rt,class:"group relative flex items-center gap-2 px-3 py-1.5 text-xs font-bold border border-indigo-200 text-indigo-700 bg-indigo-50 rounded-md hover:bg-indigo-100 hover:border-indigo-300 transition-colors shadow-sm"},[...s[10]||(s[10]=[e("span",{class:"text-[12px]"},"⚡",-1),O(" Ask AI to filter ",-1)])]),e("button",{onClick:s[0]||(s[0]=ge=>et.value=!0),class:"group relative flex items-center gap-2 px-3 py-1.5 text-xs font-semibold border border-indigo-200 text-indigo-600 bg-indigo-50 rounded-md hover:bg-indigo-100 hover:border-indigo-300 transition-colors"},[h(x(vo),{class:"w-3.5 h-3.5"}),s[11]||(s[11]=O(" View Blueprint ",-1))])])])):k("",!0),x(y)!==null&&t.value.length===0&&!ie.value?(d(),c("div",rs,[...s[12]||(s[12]=[e("svg",{class:"h-16 w-16 mx-auto mb-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1),e("p",{class:"text-lg font-medium"},"No voices found",-1),e("p",{class:"mt-1"},"Try adjusting your filter options",-1)])])):re.value==="grid"?(d(),c("div",ds,[(d(!0),c(te,null,pe(t.value,(ge,Te)=>(d(),c(te,{key:ge.voice_id},[Te===6&&I.value===0?(d(),c("div",cs,[h(X,{"sample-text":x(L)},null,8,["sample-text"])])):k("",!0),Te===8&&I.value===0?(d(),c("div",us,[h(X,{"sample-text":x(L)},null,8,["sample-text"])])):k("",!0),Te===6&&I.value===0?(d(),c("div",ps,[h(X,{"sample-text":x(L)},null,8,["sample-text"])])):k("",!0),h(ae,{"view-mode":re.value,voice:ge,index:Te,offset:I.value,"is-collection-owner":u.value,"current-sample-text":x(L),"favorite-change":m,"active-voice-id":x(E)?.voice_id,"global-is-playing":x(se),onOpenVoiceModal:Ae,onRateVoice:He,onVoiceGenFail:Fe,onRemoveVoice:Ue,onVoiceGenerated:Be,onPlayAudio:gt},null,8,["view-mode","voice","index","offset","is-collection-owner","current-sample-text","active-voice-id","global-is-playing"])],64))),128))])):re.value==="list"?(d(),c("div",vs,[e("table",gs,[e("thead",hs,[e("tr",null,[s[13]||(s[13]=e("th",{scope:"col",class:"hidden lg:table-cell w-32 px-4 py-3"},null,-1)),s[14]||(s[14]=e("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-full"}," Voice Name ",-1)),ze(e("th",xs," Service ",512),[[ht,"Service"]]),s[15]||(s[15]=e("th",{scope:"col",class:"relative px-4 py-3 w-16"},null,-1))])]),e("tbody",fs,[(d(!0),c(te,null,pe(t.value,(ge,Te)=>(d(),c(te,{key:ge.voice_id},[Te===8&&I.value===0?(d(),c("tr",ms,[e("td",_s,[h(X,{"sample-text":x(L)},null,8,["sample-text"])])])):k("",!0),h(ae,{"view-mode":re.value,voice:ge,index:Te,offset:I.value,"is-collection-owner":u.value,"favorite-change":m,"active-voice-id":x(E)?.voice_id,"global-is-playing":x(se),onOpenVoiceModal:Ae,onRateVoice:He,onVoiceGenFail:Fe,onRemoveVoice:Ue,onVoiceGenerated:Be,onMouseenter:xt=>$t(ge,xt),onMouseleave:s[1]||(s[1]=xt=>St()),onPlayAudio:gt},null,8,["view-mode","voice","index","offset","is-collection-owner","active-voice-id","global-is-playing","onMouseenter"])],64))),128))])])])):k("",!0)],2),e("div",bs,[h(me,{"current-offset":I.value,limit:A.value,"total-items":Q.value,"onUpdate:offset":Ye,"onUpdate:sort":Ke,"onUpdate:viewMode":x(ye),"view-mode":re.value,"current-sort":_.value,"show-quick-list-opt":!0,"show-sort":!0,"show-view-mode-opt":!0,"sort-options":[{value:"",label:"Sort by"},{value:"newest-desc",label:"Newest Voices"},{value:"samples-generated",label:"Generated Samples"},{value:"name-asc",label:"Name (A-Z)"},{value:"name-desc",label:"Name (Z-A)"},{value:"expressiveness-desc",label:"Expressiveness (High)"},{value:"expressiveness-asc",label:"Expressiveness (Low)"},{value:"brightness-desc",label:"Brightness (High)"},{value:"brightness-asc",label:"Brightness (Low)"},{value:"tempo-desc",label:"Tempo (Fast)"},{value:"tempo-asc",label:"Tempo (Slow)"},{value:"roughness-desc",label:"Roughness (High)"},{value:"roughness-asc",label:"Roughness (Low)"},{value:"projection-desc",label:"Projection (High)"},{value:"projection-asc",label:"Projection (Low)"},{value:"articulation-desc",label:"Articulation (High)"},{value:"articulation-asc",label:"Articulation (Low)"},{value:"instability-desc",label:"Instability (High)"},{value:"instability-asc",label:"Instability (Low)"},{value:"accent_strength-desc",label:"Accent Strength (High)"},{value:"accent_strength-asc",label:"Accent Strength (Low)"},{value:"pitch-desc",label:"Pitch (High)"},{value:"pitch-asc",label:"Pitch (Low)"},{value:"price-asc",label:"Price (Lowest)"},{value:"price-desc",label:"Price (Highest)"},{value:"wpm-desc",label:"WPM (High)"},{value:"wpm-asc",label:"WPM (Low)"}]},null,8,["current-offset","limit","total-items","onUpdate:viewMode","view-mode","current-sort"])])]),h(Me,{onDismiss:x(b),onRate:s[2]||(s[2]=ge=>{x(E)&&(x(E).has_voted_rating=ge.rating)})},null,8,["onDismiss"]),h(x(Ie),{open:w.value,"onUpdate:open":De},{default:S(()=>[h(x(Ze),{class:"sm:max-w-[1200px]"},{default:S(()=>[e("div",ws,[h(ee,{preloading:j.value,voice:le.value,"is-modal":!0,snippets:de.value},null,8,["preloading","voice","snippets"])])]),_:1})]),_:1},8,["open"]),h(x(Ie),{open:et.value,"onUpdate:open":s[3]||(s[3]=ge=>et.value=!1)},{default:S(()=>[h(x(Ze),{class:"sm:max-w-[1000px] bg-white"},{default:S(()=>[e("div",ys,[e("div",ks,[e("div",Cs,[s[17]||(s[17]=e("div",{class:"bg-purple-500 text-white rounded-full p-2.5 shadow-sm"},[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})])],-1)),e("div",null,[e("h3",$s,R(P.value?.title||"SoundRanks Blueprint"),1),s[16]||(s[16]=e("p",{class:"text-xs text-gray-500"},"AI Ideal Acoustic & Perceptual Target Profiles",-1))])])]),P.value?.analysis?(d(),Le(_e,{key:0,analysis:P.value.analysis},null,8,["analysis"])):k("",!0)])]),_:1})]),_:1},8,["open"]),h(x(Ie),{open:We.value,"onUpdate:open":s[4]||(s[4]=ge=>We.value=!1)},{default:S(()=>[h(x(Ze),{class:"sm:max-w-[500px] bg-white"},{default:S(()=>[e("div",Ss,[s[23]||(s[23]=e("div",{class:"mx-auto flex items-center justify-center h-14 w-14 roun
14ded-full bg-indigo-50 mb-5 border border-indigo-100/50 shadow-sm"},[e("span",{class:"text-2xl"},"⚡")],-1)),s[24]||(s[24]=e("h3",{class:"text-2xl font-black text-slate-900 mb-2 tracking-tight"},"AI Casting Assistant",-1)),s[25]||(s[25]=e("p",{class:"text-sm text-slate-600 mb-6 leading-relaxed max-w-[360px] mx-auto font-medium"}," Ask for top voices that match your script, brand, or scene vision. ",-1)),e("div",Ms,[s[20]||(s[20]=e("div",{class:"absolute top-0 right-0 w-24 h-24 bg-indigo-500/5 rounded-bl-full pointer-events-none"},null,-1)),s[21]||(s[21]=e("p",{class:"font-bold text-[10px] text-slate-400 uppercase tracking-widest mb-3"},"Example Prompt",-1)),e("div",Vs,[e("div",Rs,[e("span",Ts,[s[18]||(s[18]=O(" SoundRanks: ",-1)),e("span",Is,R(Ge.value?Ge.value.substring(0,8):"top-100"),1)])]),s[19]||(s[19]=e("span",{class:"text-slate-700 leading-relaxed font-medium italic mt-1"},` "I'm writing a commercial for a luxury car brand. Here is the script: [Script]. Which voice on this list has the best pacing and brightness for this?" `,-1))])]),e("button",{onClick:Tt,class:"group w-full flex justify-center items-center gap-2 px-6 py-3.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl font-black text-[14px] transition-all shadow-lg shadow-indigo-500/20 active:scale-95"},[...s[22]||(s[22]=[e("span",null,"Ask or chat about this list",-1),e("svg",{class:"w-4 h-4 transition-transform group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M14 5l7 7m0 0l-7 7m7-7H3"})],-1)])])])]),_:1})]),_:1},8,["open"]),P.value?(d(),Le(tt,{key:0,"match-context":P.value},null,8,["match-context"])):(d(),Le(tt,{key:1}))])],64)}}},Ps=lt(Ls,[["__scopeId","data-v-06a6c619"]]),js={class:"bg-white shadow-sm z-10 transition-all duration-200"},Bs={class:"px-6 py-3 flex justify-between items-start"},As={class:"flex items-center gap-2 mb-3 text-md"},Os={class:"text-md font-bold text-gray-900 truncate max-w-[400px]"},Es={key:0,class:"px-6 pb-4 pt-1 bg-indigo-50/10 min-h-[120px]"},qs={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},zs={class:"text-xs leading-relaxed text-gray-600"},Fs={class:"pl-3 border-l-2 border-indigo-300 min-h-[40px]"},Hs={class:"mt-1 text-gray-600 leading-relaxed line-clamp-4"},Us={class:"text-xs text-gray-600"},Ds={class:"pl-3 border-l-2 border-amber-300 min-h-[40px]"},Ns={key:0,class:"mt-1.5 space-y-1"},Ws={class:"text-[9px] font-bold text-amber-500 w-3 shrink-0"},Gs={class:"font-medium text-gray-800 truncate"},Zs={class:"text-[9px] text-gray-400 shrink-0"},Qs={key:1,class:"mt-1 text-gray-400 italic"},Js={class:"flex flex-1 overflow-hidden"},Ys={class:"w-64 bg-white border-r flex flex-col z-0"},Ks={class:"p-3 border-b flex gap-2 bg-gray-50"},Xs=["onClick"],el={class:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar"},tl=["onClick"],ol={key:0,class:"text-[10px] text-gray-400 group-hover:text-gray-600 bg-gray-100 px-1.5 rounded-full"},sl={key:1,class:"w-3 h-3 text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ll={class:"flex-1 overflow-y-auto bg-gray-50 p-6"},al={key:0,class:"flex items-center justify-center h-full"},nl={key:1,class:"space-y-6 pb-20"},il={class:"flex items-baseline justify-between mb-2"},rl={class:"text-2xl font-bold text-gray-900"},dl={class:"text-xs text-gray-500"},cl={key:0,class:"flex items-center justify-center py-20"},ul={key:1,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4"},pl=["onClick","onMouseenter","onMouseleave"],vl=["src"],gl={key:1,class:"absolute top-2 left-2 z-40 pointer-events-none"},hl={class:"bg-black/50 backdrop-blur-md p-1.5 rounded-lg border border-white/20 shadow-md"},xl={key:0,class:"w-3.5 h-3.5 text-white animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},fl={key:1,class:"w-3.5 h-3.5 text-white",fill:"currentColor",viewBox:"0 0 24 24"},ml=["src","onTimeupdate","onPlay","onPause","onWaiting","onPlaying"],_l={key:3,class:"absolute inset-x-2 bottom-6 z-20 flex items-center justify-center pointer-events-none"},bl={class:"text-xl sm:text-2xl font-extrabold text-white text-center uppercase tracking-tight leading-tight break-words drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",style:{"-webkit-text-stroke":"1px black","text-shadow":"2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"}},wl={class:"absolute inset-0 p-4 flex flex-col justify-end"},yl={class:"text-white font-bold text-sm leading-tight shadow-sm line-clamp-2"},kl={class:"flex items-center gap-2 mt-1.5"},Cl={class:"text-[10px] text-gray-200 italic leading-snug line-clamp-3"},$l={class:"absolute top-2 left-2 z-20 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},Sl={class:"inline-flex rounded-md shadow-sm",role:"group"},Ml=["onClick"],Vl=["onClick"],Rl={class:"absolute top-2 right-2 z-20 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},Tl=["onClick"],Il={key:2,class:"flex flex-col items-center justify-center h-full text-gray-400"},Ll={key:0,class:"absolute inset-0 bg-white/50 backdrop-blur-sm z-50 flex items-center justify-center"},Pl={class:"p-6 md:p-8"},jl={key:0,class:"max-h-[60vh] overflow-y-auto pr-2 custom-scrollbar"},Bl={class:"mt-8 flex items-center justify-between border-t border-slate-100 pt-6"},Al={class:"flex items-center gap-2"},Ol={__name:"SharedBrowseAllModal",props:["isOpen"],emits:["update:isOpen","select"],setup(Ve,{emit:ue}){const ne=["Calm","Energetic","Friendly","Authoritative","Warm","Serious","Upbeat","Empathetic","Playful","Confident","Introspective","Dramatic","Inspirational","Relaxed","Conversational","Professional","Announcer","Storytelling","Robotic / Synthetic","Whispered"],E=["Narration","Commercial","News","Audiobook","Documentary","Public Service / PSA","Character / Animated","Gaming","Meditation","Educational","E-learning","Training","Tutorial","Customer Support","IVR (Interactive Voice Response)","Advert
14ising","Product Demo","Explainer Video","Podcast"],he=Ve,se=ue,C=p({}),D=p(!1),b=p({}),v=p(!1),B=p("Core"),T=p(""),N=p(null),oe=p({}),f=p(!1),Z=p(!1),L=p(null),we=p(!1);async function Ce(r){const o=r.short_id;if(o){we.value=!0;try{const $=await $fetch(`/api/v1/voice/soundranks/profile/${o}`);L.value=$,f.value=!0}catch($){console.error("Error loading SoundRanks profile:",$)}finally{we.value=!1}}}const Y=p(null),q=p({}),W=p({});let ye={};const z=p({}),xe=p({});function $e(r){N.value=r,Object.keys(xe.value).forEach(o=>{clearTimeout(xe.value[o]),delete xe.value[o]}),Object.keys(z.value).forEach(o=>{z.value[o]&&o!==r.short_id&&(z.value[o].pause(),z.value[o].currentTime=0,W.value[o]=!1)}),q.value={},r.voice_perfect_match_video_url&&(xe.value[r.short_id]=setTimeout(()=>{if(Y.value=r.short_id,q.value[r.short_id]=null,r.voice_perfect_match_video_tts_word_times&&!ye[r.short_id]){let o=r.voice_perfect_match_video_tts_word_times;if(typeof o=="string")try{o=JSON.parse(o)}catch{o=[]}ye[r.short_id]=re(o)}Ft(async()=>{const{nextTick:o}=await import("./va9UNPRb.js").then($=>$.v);return{nextTick:o}},__vite__mapDeps([0,1,2]),import.meta.url).then(({nextTick:o})=>{o(()=>{const $=z.value[r.short_id];$&&($.currentTime=0)})})},300))}function Re(r){N.value=null,Y.value=null,q.value[r.short_id]="",W.value[r.short_id]=!1;const o=z.value[r.short_id];o&&o.pause()}function re(r){if(!r||!Array.isArray(r))return[];const o=[];let $=[],G=0;for(let i=0;i<r.length;i++){const y=r[i];$.length===0&&(G=y.startTime),$.push(y.word);const Pe=y.word.replace(/[^a-zA-Z0-9]/g,"");let je=!1;(y.duration>300&&Pe.length>3||$.length>=2)&&(je=!0),je&&(o.push({text:$.join(" "),startTime:G,endTime:y.startTime+y.duration}),$=[])}if($.length>0){const i=r[r.length-1];o.push({text:$.join(" "),startTime:G,endTime:i.startTime+i.duration})}for(let i=0;i<o.length-1;i++)o[i].endTime=o[i+1].startTime;return o.length>0&&(o[o.length-1].endTime+=1e3),o}function M(r,o){if(!o.voice_perfect_match_video_tts_word_times)return;const $=r.target.currentTime*1e3,i=(ye[o.short_id]||[]).find(y=>$>=y.startTime&&$<=y.endTime);i?q.value[o.short_id]!==i.text&&(q.value[o.short_id]=i.text):q.value[o.short_id]!==null&&(q.value[o.short_id]=null)}function I(r,o){r&&(z.value[o]=r)}J(()=>he.isOpen,async r=>{r&&Object.keys(C.value).length===0&&await A()});async function A(){D.value=!0;try{const r=await $fetch("/api/v1/showcase/all?mode=categories");if(r?.data){const o={},$={};for(const G of r.data)o[G.category_filter]=G,G.match_count!=null&&($[G.category_filter]=G.match_count);C.value=o,oe.value=$,!T.value&&l.value.length>0&&await ie(l.value[0])}}catch(r){console.error("Failed to load categories",r)}finally{D.value=!1}}async function Q(r){if(!b.value[r]){v.value=!0;try{const o=await $fetch(`/api/v1/showcase/all?mode=list&category=${encodeURIComponent(r)}&limit=100`);o?.data&&(b.value[r]=o.data)}catch(o){console.error(`Failed to load items for category: ${r}`,o),b.value[r]=[]}finally{v.value=!1}}}async function ie(r){T.value=r,N.value=null,await Q(r)}const _=ce(()=>Object.keys(C.value).sort()),l=ce(()=>_.value.filter(r=>B.value==="Core"?ne.includes(r):B.value==="Application"?E.includes(r):!1)),P=ce(()=>T.value?b.value[T.value]||[]:[]),K=ce(()=>N.value?N.value:P.value.length>0?P.value[0]:T.value&&C.value[T.value]?C.value[T.value]:null);J(B,async()=>{l.value.length>0?await ie(l.value[0]):T.value=""});const ke=async r=>{await ie(r)},ve=(r,o=null)=>{const $={...r};$.gender=o||r.gender||void 0,se("select",$),se("update:isOpen",!1)};return Qe(()=>{he.isOpen&&A()}),(r,o)=>{const $=pt,G=it("tooltip");return d(),c(te,null,[h(x(Ie),{open:Ve.isOpen,"onUpdate:open":o[0]||(o[0]=i=>se("update:isOpen",i))},{default:S(()=>[h(x(st),{class:"max-w-6xl h-[90vh] flex flex-col p-0 overflow-hidden bg-gray-50/50"},{default:S(()=>[e("div",js,[e("div",Bs,[o[9]||(o[9]=e("div",null,[e("h2",{class:"text-xl font-bold text-gray-900"},"SoundRanks Matches"),e("p",{class:"text-xs text-gray-400 mt-0.5 whitespace-nowrap overflow-hidden text-ellipsis max-w-[280px] sm:max-w-none"},"AI-curated style recommendations.")],-1)),e("div",As,[o[6]||(o[6]=e("span",{class:"text-md font-bold uppercase tracking-wider text-indigo-500"},"Analysis Brief",-1)),o[7]||(o[7]=e("span",{class:"text-gray-300"}
14,"|",-1)),e("span",Os,R(K.value?.title),1)]),h(x(zt),{class:"text-gray-400 hover:text-gray-600"},{default:S(()=>[...o[8]||(o[8]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),_:1})]),K.value?(d(),c("div",Es,[e("div",qs,[e("div",zs,[e("div",Fs,[o[10]||(o[10]=e("span",{class:"px-1.5 py-0.5 bg-indigo-50 text-indigo-600 rounded text-[9px] font-bold uppercase"},"Overview",-1)),e("p",Hs,R(K.value.overview_reasoning||K.value.reasoning?.male||"No analysis overview available."),1)])]),e("div",Us,[e("div",Ds,[o[11]||(o[11]=e("span",{class:"px-1.5 py-0.5 bg-amber-50 text-amber-600 rounded text-[9px] font-bold uppercase"},"Top Matches",-1)),K.value.top5?.length?(d(),c("ol",Ns,[(d(!0),c(te,null,pe(K.value.top5.slice(0,5),(i,y)=>(d(),c("li",{key:i.voice_id||y,class:"flex items-center gap-2"},[e("span",Ws,"#"+R(y+1),1),e("span",Gs,R(i.voice_name),1),e("span",Zs,R(i.voice_service_alias||i.voice_service),1)]))),128))])):(d(),c("p",Qs,"No ranking data available."))])])])])):k("",!0)]),e("div",Js,[e("aside",Ys,[e("div",Ks,[(d(),c(te,null,pe(["Core","Application"],i=>e("button",{key:i,onClick:y=>B.value=i,class:U(["flex-1 py-1.5 text-xs font-bold rounded-md transition-all text-center",B.value===i?"bg-white shadow text-indigo-600 ring-1 ring-black/5":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"])},R(i),11,Xs)),64))]),e("div",el,[(d(!0),c(te,null,pe(l.value,i=>(d(),c("button",{key:i,onClick:y=>ke(i),class:U(["w-full text-left px-3 py-2.5 rounded-lg text-xs font-medium transition-colors flex justify-between items-center group",T.value===i?"bg-indigo-600 text-white shadow-md":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"])},[O(R(i)+" ",1),T.value!==i?(d(),c("span",ol,R(oe.value[i]??b.value[i]?.length??""),1)):k("",!0),T.value===i?(d(),c("svg",sl,[...o[12]||(o[12]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])])):k("",!0)],10,tl))),128))])]),e("main",ll,[D.value?(d(),c("div",al,[...o[13]||(o[13]=[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"},null,-1)])])):T.value&&(v.value||P.value.length>0)?(d(),c("div",nl,[e("div",il,[e("h3",rl,R(T.value),1),e("span",dl,R(v.value?"Loading...":`${P.value.length} Voices Found`),1)]),v.value?(d(),c("div",cl,[...o[14]||(o[14]=[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"},null,-1)])])):(d(),c("div",ul,[(d(!0),c(te,null,pe(P.value,i=>(d(),c("div",{key:i.id,onClick:y=>ve(i),onMouseenter:y=>$e(i),onMouseleave:y=>Re(i),class:"group relative aspect-[3/4] max-h-80 rounded-xl overflow-hidden cursor-pointer border-2 transition-all duration-300 bg-gray-900 border-transparent hover:border-indigo-500 hover:scale-[1.02] shadow-sm hover:shadow-xl hover:z-10"},[i.image_url?(d(),c("img",{key:0,src:i.image_url,class:U(["absolute inset-0 w-full h-full object-cover transition-all duration-700",Y.value===i.short_id&&i.voice_perfect_match_video_url&&W.value[i.short_id]?"opacity-0 scale-100 duration-500":"group-hover:scale-110 opacity-80"])},null,10,vl)):k("",!0),i.voice_perfect_match_video_url&&!W.value[i.short_id]?(d(),c("div",gl,[e("div",hl,[Y.value===i.short_id?(d(),c("svg",xl,[...o[15]||(o[15]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(d(),c("svg",fl,[...o[16]||(o[16]=[e("path",{d:"M23 7l-7 5 7 5V7z"},null,-1),e("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"},null,-1)])]))])])):k("",!0),Y.value===i.short_id&&i.voice_perfect_match_video_url?(d(),c("video",{key:2,ref_for:!0,ref:y=>I(y,i.short_id),src:i.voice_perfect_match_video_url,autoplay:"",muted:"",playsinline:"",loop:"",class:U(["absolute inset-0 w-full h-full object-cover z-0 transition-opacity duration-500 bg-gray-900",W.value[i.short_id]?"opacity-100":"opacity-0"]),onTimeupdate:y=>M(y,i),onPlay:y=>W.value[i.short_id]=!0,onPause:y=>W.value[i.short_id]=!1,onWaiting:y=>W.value[i.short_id]=!1,onPlaying:y=>W.value[i.short_id]=!0},null,42,ml)):k("",!0),Y.value===i.short_id&&i.voice_perfect_match_video_url&&q.value[i.short_id]&&W.value[i.short_id]?(d(),c("div",_l,[e("span",bl,R(q.value[i.short_id]),1)])):k("",!0),e("div",{class:U(["absolute inset-0 bg-gradient-to-t from-gray-900 via-black/20 to-transparent transition-opacity",Y.value===i.short_id&&i.voice_perfect_match_video_url&&W.value[i.short_id]?"opacity-40 line-clamp-1 bg-gradient-to-t from-black/80 to-transparent":"opacity-90"])},null,2),e("div",wl,[e("div",{class:U(["transform transition-transform duration-300",Y.value===i.short_id&&i.voice_perfect_match_video_url&&W.value[i.short_id]?"translate-y-[150%] opacity-0":"group-hover:-translate-y-16"])},[e("p",yl,R(i.title),1),e("div",kl,[i.gender?(d(),c("span",{key:0,class:U(["px-1.5 py-0.5 rounded text-[8px] uppercase tracking-wider font-bold bg-white/10 backdrop-blur-sm",i.gender==="male"?"text-blue-200":"text-pink-200"])},R(i.gender),3)):k("",!0)])],2),e("div",{class:U(["absolute inset-x-0 bottom-0 p-4 opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 ease-out delay-75 pointer-events-none",{hidden:Y.value===i.short_id&&i.voice_perfect_match_video_url&&W.value[i.short_id]}])},[o[17]||(o[17]=e("p",{class:"text-[9px] text-indigo-300 font-mono uppercase mb-0.5 font-bold"},"Preview",-1)),e("p",Cl,'"'+R(i.sample_text)+'"',1)],2),e("div",$l,[e("div",Sl,[ze(e("button",{onClick:be(y=>ve(i,"female"),["stop"]),type:"button",class:"px-2.5 py-1 text-[10px] font-bold text-pink-100 bg-gray-900/60 border border-gray-600 rounded-l-lg hover:bg-pink-600 hover:text-white hover:border-pink-500 focus:z-10 focus:ring-2 focus:ring-pink-500 transition-colors backdrop-blur-sm"}," F ",8,Ml),[[G,"Female voices"]]),ze(e("button",{onClick:be(y=>ve(i,"male"),["stop"]),type:"button",class:"px-2.5 py-1 text-[10px] font-bold text-blue-100 bg-gray-900/60 border border-gray-600 border-l-0 rounded-r-lg hover:bg-blue-600 hover:text-white hover:border-blue-500 focus:z-10 focus:ring-2 focus:ring-blue-500 transition-colors backdrop-blur-sm"}
14," M ",8,Vl),[[G,"Male voices"]])])]),e("div",Rl,[ze(e("button",{onClick:be(y=>Ce(i),["stop"]),class:"flex items-center gap-1.5 px-2.5 py-1 text-[9px] font-black uppercase tracking-widest text-blue-100 bg-blue-600/80 border border-blue-400/50 rounded-lg hover:bg-blue-600 hover:text-white hover:scale-105 active:scale-95 transition-all backdrop-blur-md shadow-lg"},[...o[18]||(o[18]=[e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),O(" Blueprint ",-1)])],8,Tl),[[G,"View Ideal Profile Blueprint"]])])])],40,pl))),128))]))])):(d(),c("div",Il,[...o[19]||(o[19]=[e("svg",{class:"w-12 h-12 mb-2 opacity-20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})],-1),e("p",{class:"text-sm"},"Select a style category to view voices",-1)])]))])])]),_:1})]),_:1},8,["open"]),h(x(Ie),{open:f.value,"onUpdate:open":o[4]||(o[4]=i=>f.value=i)},{default:S(()=>[h(x(st),{class:"sm:max-w-[425px] md:max-w-[700px] lg:max-w-[800px] p-0 overflow-hidden rounded-3xl border-slate-200 bg-slate-50/95 backdrop-blur-xl"},{default:S(()=>[we.value?(d(),c("div",Ll,[...o[20]||(o[20]=[e("svg",{class:"animate-spin h-8 w-8 text-blue-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):k("",!0),o[25]||(o[25]=e("div",{class:"h-1.5 w-full bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500"},null,-1)),e("div",Pl,[h(x(rt),{class:"mb-6"},{default:S(()=>[o[22]||(o[22]=e("div",{class:"flex items-center gap-2 mb-2"},[e("div",{class:"px-2 py-0.5 rounded bg-blue-500 text-[10px] font-black uppercase tracking-widest text-white"}," SoundRanks Blueprint ")],-1)),h(x(dt),{class:"text-2xl md:text-3xl font-black tracking-tight text-slate-900"},{default:S(()=>[O(R(L.value?.title||"Ideal Voice Profile"),1)]),_:1}),h(x(ct),{class:"text-slate-500 text-sm"},{default:S(()=>[...o[21]||(o[21]=[O(" Technical specifications generated by SoundRanks AI matching engine. ",-1)])]),_:1})]),_:1}),L.value?(d(),c("div",jl,[h(ut,{analysis:L.value.analysis},null,8,["analysis"])])):k("",!0),e("div",Bl,[e("button",{onClick:o[1]||(o[1]=i=>{Z.value=!0,f.value=!1}),class:"flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-slate-400 hover:text-indigo-600 transition-colors group"},[...o[23]||(o[23]=[e("svg",{class:"w-4 h-4 text-slate-300 group-hover:text-indigo-500 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),O(" Learn how it works ",-1)])]),e("div",Al,[h($,{to:`/filters?soundranks=${L.value?.id||""}&sample_text=${encodeURIComponent(L.value?.sample_text||"")}`,onClick:o[2]||(o[2]=i=>{f.value=!1,se("update:isOpen",!1)}),class:"px-6 py-2 bg-indigo-600 text-white text-xs font-black uppercase tracking-widest rounded-xl hover:bg-indigo-700 transition-all shadow-lg active:scale-95"},{default:S(()=>[...o[24]||(o[24]=[O(" View Ranking ",-1)])]),_:1},8,["to"]),e("button",{onClick:o[3]||(o[3]=i=>f.value=!1),class:"px-6 py-2 bg-slate-900 text-white text-xs font-black uppercase tracking-widest rounded-xl hover:bg-slate-800 transition-all shadow-lg active:scale-95"}," Close Blueprint ")])])])]),_:1})]),_:1},8,["open"]),h(wt,{modelValue:Z.value,"onUpdate:modelValue":o[5]||(o[5]=i=>Z.value=i)},null,8,["modelValue"])],64)}}},El={class:"p-8 md:p-10"},ql={__name:"SharedWelcomeDirectorModal",props:{isOpen:Boolean},emits:["update:isOpen"],setup(Ve,{emit:ue}){const ne=ue,E=()=>ne("update:isOpen",!1),he=()=>{E(),setTimeout(()=>{const se=document.getElementById("MainContent");se&&se.scrollIntoView({behavior:"smooth",block:"start"})},300)};return(se,C)=>(d(),Le(x(Ie),{open:Ve.isOpen,"onUpdate:open":C[0]||(C[0]=D=>ne("update:isOpen",D))},{default:S(()=>[h(x(Ze),{class:"sm:max-w-[520px] p-0 overflow-hidden rounded-[2.5rem] border-slate-200 bg-white shadow-2xl transition-all duration-500"},{default:S(()=>[C[7]||(C[7]=e("div",{class:"h-1.5 w-full bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-500 animate-gradient-x",style:{"background-size":"200% 100%"}},null,-1)),e("div",El,[h(x(rt),{class:"mb-6"},{default:S(()=>[C[3]||(C[3]=e("div",{class:"flex items-center gap-2 mb-5"},[e("div",{class:"px-2.5 py-1 rounded-lg bg-indigo-600 text-[10px] font-black uppercase tracking-[0.15em] text-white flex items-center gap-1.5 shadow-lg shadow-indigo-100"},[e("svg",{class:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M13 10V3L4 14h7v7l9-11h-7z"})]),O(" VoiceRankings ")])],-1)),h(x(dt),{class:"text-3xl md:text-4xl font-black tracking-tight text-slate-900 leading-[0.95]"},{default:S(()=>
14[...C[1]||(C[1]=[O(" Welcome to the",-1),e("br",null,null,-1),O("Studio, ",-1),e("span",{class:"text-indigo-600"},"Director.",-1)])]),_:1}),h(x(ct),{class:"text-slate-500 text-base md:text-lg mt-4 font-medium leading-relaxed"},{default:S(()=>[...C[2]||(C[2]=[O(" Join a community of voice directors discovering, ranking, and shaping the future of AI voice casting. ",-1)])]),_:1})]),_:1}),C[5]||(C[5]=e("div",{class:"space-y-3 mb-8"},[e("div",{class:"flex gap-3 items-start p-3.5 bg-indigo-50/60 rounded-2xl border border-indigo-100/60"},[e("div",{class:"w-9 h-9 rounded-xl bg-indigo-600 flex items-center justify-center shrink-0 shadow-md shadow-indigo-200"},[e("svg",{class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"m21 21-4.3-4.3"})])]),e("div",null,[e("p",{class:"text-sm font-black text-slate-900 leading-tight"},"Discover & Rank"),e("p",{class:"text-sm text-slate-500 font-medium mt-0.5 leading-snug"},"Tag and rate voices to help the community find the perfect match.")])]),e("div",{class:"flex gap-3 items-start p-3.5 bg-indigo-50/60 rounded-2xl border border-indigo-100/60"},[e("div",{class:"w-9 h-9 rounded-xl bg-amber-600 flex items-center justify-center shrink-0 shadow-md shadow-amber-200"},[e("svg",{class:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})])]),e("div",null,[e("p",{class:"text-sm font-black text-slate-900 leading-tight"},"Earn & Level Up"),e("p",{class:"text-sm text-slate-500 font-medium mt-0.5 leading-snug"},"Every tag earns you voice credits—climb the Voice Director leaderboard.")])])],-1)),e("button",{onClick:he,class:"w-full bg-slate-900 hover:bg-black text-white font-black uppercase tracking-[0.2em] text-xs py-5 rounded-[1.5rem] transition-all shadow-2xl flex items-center justify-center gap-3 active:scale-[0.98]"},[...C[4]||(C[4]=[O(" Start Discovering ",-1),e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M13 7l5 5m0 0l-5 5m5-5H6"})],-1)])]),C[6]||(C[6]=e("p",{class:"text-center mt-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest"}," Community-powered AI voice discovery ",-1))])]),_:1})]),_:1},8,["open"]))}},zl=lt(ql,[["__scopeId","data-v-f2561929"]]),Fl={class:"relative overflow-hidden bg-gradient-to-br from-[#1e1b4b] via-[#4338ca] to-[#7c3aed] text-white pb-8"},Hl={class:"relative z-0 max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8 pt-0 sm:pt-0"},Ul={class:"text-center"},Dl={class:"max-w-screen-2xl mx-auto mb-8 sm:mb-10 mt-0 shadow-sm relative z-20"},Nl={class:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-4 py-2.5 rounded-b-2xl bg-white/5 border rounded-t-none border-t-0 border-white/5 hover:bg-white/10 transition-all duration-300 backdrop-blur-xl group"},Wl={class:"flex items-center relative shrink-0"},Gl={label:"Core Styles",class:"text-slate-900 font-bold bg-white"},Zl=["value"],Ql={label:"Application Styles",class:"text-slate-900 font-bold bg-white"},Jl=["value"],Yl={class:"max-w-screen-2xl mx-auto px-4 mb-20 relative z-10"},Kl={class:"mt-12 mb-14"},Xl={class:"mt-6 inline-flex items-center gap-2.5 px-5 py-2.5 rounded-full bg-gradient-to-r from-indigo-500/20 to-purple-500/20 border border-indigo-400/20 text-[10px] sm:text-xs font-bold text-indigo-200/90 uppercase tracking-widest shadow-lg backdrop-blur-sm"},ea={class:"max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8 -mt-16 pb-16"},ta={class:"bg-white sticky rounded-2xl shadow-lg border border-gray-100"},oa={class:"bg-gray-100 pt-2 pb-2 px-4 sm:px-6 border-b rounded-t-2xl border-gray-100"},sa={class:"flex justify-between items-center mb-2"},la={class:"flex items-center gap-1 overflow-hidden scrollbar-hide no-scrollbar pb-1 pr-4"},aa=["onClick"],na={class:"flex items-center gap-1.5 opacity-80 shrink-0 ml-3"},ia={class:"flex flex-col sm:flex-row gap-4"},ra={class:"shrink-0 w-full sm:w-40 flex flex-col gap-2"},da={class:"flex-1 min-w-0"},ca={key:0,class:"flex gap-4 overflow-hidden"},ua=["onClick","onMouseenter","onMouseleave"],pa={key:0,class:"absolute top-0 left-0 z-30 bg-indigo-600 text-white text-[9px] font-bold px-1.5 py-0.5 rounded-tl-lg rounded-br-lg shadow-sm"},va={class:"bg-black/50 backdrop-blur-md p-1.5 rounded-lg border border-white/20 shadow-md"},ga={key:0,class:"w-3.5 h-3.5 text-white animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}
14,ha={key:1,class:"w-3.5 h-3.5 text-white",fill:"currentColor",viewBox:"0 0 24 24"},xa={class:"relative flex-1 overflow-hidden w-full"},fa=["src"],ma=["src","onTimeupdate","onPlay","onPause","onWaiting","onPlaying","onEnded"],_a={key:1,class:"absolute inset-x-2 bottom-6 z-20 flex items-center justify-center pointer-events-none"},ba={class:"text-xl sm:text-2xl font-extrabold text-white text-center uppercase tracking-tight leading-tight break-words drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",style:{"-webkit-text-stroke":"1px black","text-shadow":"2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"}},wa={class:"absolute inset-0 p-4 flex flex-col justify-end"},ya={class:"text-white font-bold text-sm leading-tight shadow-sm"},ka={class:"flex flex-wrap gap-1 mt-2 opacity-100 transition-opacity duration-200"},Ca={key:0,class:"text-[9px] text-gray-200 bg-white/20 px-1.5 py-0.5 rounded backdrop-blur-sm"},$a={class:"text-xs text-gray-100 italic leading-snug line-clamp-3"};const Sa={class:"flex flex-col items-center gap-4 m-3 flex-wrap"},Ma={class:"w-full sm:w-full lg:hidden"},Va={class:"hidden sm:flex items-center gap-4 w-full translate-y-2"},Ra={class:"text-left flex-grow"},Ta={class:"text-sm text-gray-500"},Ia={class:"flex items-center gap-2"},La={class:"flex items-center gap-1 px-1 py-0.5 bg-gray-50 border border-gray-200 rounded-lg shadow-sm"},Pa={key:0,class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-gray-800 text-[9px] text-white font-bold rounded shadow-lg whitespace-nowrap z-50"},ja={class:"relative flex items-center gap-2 px-2.5 py-2 bg-gradient-to-r from-indigo-50/50 to-transparent rounded-xl border border-indigo-100/40 group/studio shadow-[0_2px_10px_-4px_rgba(99,102,241,0.1)]"},Ba={class:"flex-1 min-w-[200px] w-full",id:"sample-text-area"},Aa={class:"flex justify-center items-center"},Oa={class:"relative flex-1"},Ea={id:"MainContent"},qa="vr_welcome_seen",en={__name:"VoiceFiltersHome",props:{redirectPath:{type:String,default:null}},emits:["open-sidebar"],async setup(Ve,{emit:ue}){let ne,E;Ht({title:"VoiceRankings — Discover the best AI voices on the web",meta:[{name:"description",content:"The definitive index for creators. Search, compare, and rate 3,000+ top-tier AI voices from every major provider in one place."},{property:"og:title",content:"VoiceRankings — Discover the best AI voices on the web"},{property:"og:description",content:"The definitive index for creators. Search, compare, and rate 3,000+ top-tier AI voices from every major provider in one place."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}]});const he=ue,se=p(null),C=nt(),D=at(),b=yt(),{viewMode:v,currentSampleText:B,currentVoicesList:T}=b;J(()=>C.query.sample_text,n=>{n||(B.value=qe)},{immediate:!0});function N(n){const t=n.target.value;t&&(D.push(`/leaderboards/${to(t)}`),n.target.value="")}const oe=p(!1),f=p(null),Z=ce(()=>C.query.soundranks?C.query.soundranks:b.ssrDefaultVoiceQuery.value?.soundranks?b.ssrDefaultVoiceQuery.value.soundranks:null),{data:L,pending:we}=([ne,E]=kt(()=>Ct("/api/v1/showcase/list","$0k5IN-zTH5")),ne=await ne,E(),ne),Ce=p("Featured"),Y=p(!1),q=p(!1),W=["Featured","Customer Support","Podcast","Commercial","Educational","Documentary","Public Service / PSA","Professional","IVR (Interactive Voice Response)"];async function ye(n){Ce.value=n;const t=n==="Featured"?{}:{category_filter:n};Y.value=!0;try{z.value=[];const m=await $fetch("/api/v1/showcase/list",{params:t});m&&m.data&&(z.value=m.data)}catch(m){console.error("Failed to fetch showcase items",m)}finally{Y.value=!1}}const z=p(L.value?.data||[]);J(L,n=>{n?.data&&(z.value=[...n.data])});const xe=ce(()=>(we.value||Y.value)&&z.value.length===0);function $e(){oe.value=!0}function Re(n){b.updateRouteQuery({sample_text:n.sample_text,soundranks:n.short_id,gender:n.genderRecommendation?n.genderRecommendation.toLowerCase():void 0,page:void 0}),setTimeout(()=>{const t=document.getElementById("SampleTextCombo");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},100)}function re(n){const t=z.value.findIndex(w=>w.short_id===n.short_id);let m=0;if(t!==-1)m=t;else{const w={...n,id:n.id||`temp-${n.short_id}`,tags:n.tags||[n.category_filter]};z.value.unshift(w),m=0}_t(()=>{f.value&&f.value.carouselApi&&f.value.carouselApi.scrollTo(m)}),b.updateRouteQuery({sample_text:n.sample_text,soundranks:n.short_id,gender:n.gender?n.gender.toLowerCase():void 0,page:void 0}),oe.value=!1,setTimeout(()=>{const w=document.getElementById("SampleTextCombo");w&&w.scrollIntoView({behavior:"smooth",block:"start"})},100)}J(()=>C.query,n=>{if(n.sample_text&&n.sample_text!==B.value?B.value=n.sample_text:n.sample_text||b.ssrDefaultVoiceQuery.value?.sample_text||(B.value=qe),Object.keys(n).length===0&&!b.ssrDefaultVoiceQuery.value){b.resetFilterOptions();return}b.ssrDefaultVoiceQuery.value&&Object.keys(n).some(le=>!["page","sample_text","soundranks"].includes(le))&&(b.ssrDefaultVoiceQuery.value=null);const t={...b.voiceFilterOptions.value};let m=!1;const w=(j,F,le="")=>{const de=n[j]||le;de!==t[F]&&(t[F]=de,m=!0)};w("categories","categories",null),w("gender","gender",""),w("service","service",""),w("age_estimate","age_estimate",""),w("language","languageCode","en"),w("country","countryCode","all"),w("accent","accent","all"),w("archetype","archetype",""),w("texture","texture",""),w("emotion","emotion",""),w("tag","tag",""),w("collection_id","collectionId",""),m&&b.updateFilterOptions(t),n.show_created==="true"?b.voiceShowCreatedOn.value||(b.voiceShowCreatedOn.value=!0):b.voiceShowCreatedOn.value&&(b.voiceShowCreatedOn.value=!1),n.show_favorites==="true"?b.voiceShowFavoritesOn.value||(b.voiceShowFavoritesOn.value=!0):b.voiceShowFavoritesOn.value&&(b.voiceShowFavoritesOn.value=!1)},{immediate:!0,deep:!0});const M=p(null),I=p({}),A=p({}),Q=p({});let ie={};const _=p({}),l=p({});function P(n){n.voice_perfect_match_video_url&&(Object.keys(l.value).forEach(t=>{clearTimeout(l.value[t]),delete l.value[t]}),Object.keys(_.value).forEach(t=>{_.value[t]&&t!==n.short_id&&(_.value[t].pause(),_.value[t].currentTime=0,A.value[t]=!1,Q.value[t]=!1)}),A.value[n.short_id]=!1,Q.value[n.short_id]=!1,I.value={},l.value[n.short_id]=setTimeout(()=>{if(M.value=n.short_id,I.value[n.short_id]=null,n.voice_perfect_match_video_tts_word_times&&
14!ie[n.short_id]){let t=n.voice_perfect_match_video_tts_word_times;if(typeof t=="string")try{t=JSON.parse(t)}catch{t=[]}ie[n.short_id]=ke(t)}_t(()=>{const t=_.value[n.short_id];t&&(t.currentTime=0,t.play().catch(()=>{}))})},300))}function K(n){if(Z.value===n.short_id)return;Object.keys(l.value).forEach(m=>{clearTimeout(l.value[m]),delete l.value[m]}),M.value=null,I.value[n.short_id]="",A.value[n.short_id]=!1,Q.value[n.short_id]=!1;const t=_.value[n.short_id];t&&t.pause()}function ke(n){if(!n||!Array.isArray(n))return[];const t=[];let m=[],w=0;for(let j=0;j<n.length;j++){const F=n[j];m.length===0&&(w=F.startTime),m.push(F.word);const le=F.word.replace(/[^a-zA-Z0-9]/g,"");let de=!1;(F.duration>300&&le.length>3||m.length>=2)&&(de=!0),de&&(t.push({text:m.join(" "),startTime:w,endTime:F.startTime+F.duration}),m=[])}if(m.length>0){const j=n[n.length-1];t.push({text:m.join(" "),startTime:w,endTime:j.startTime+j.duration})}for(let j=0;j<t.length-1;j++)t[j].endTime=t[j+1].startTime;return t.length>0&&(t[t.length-1].endTime+=1e3),t}function ve(n,t){if(!t.voice_perfect_match_video_tts_word_times)return;const m=n.target.currentTime*1e3,j=(ie[t.short_id]||[]).find(F=>m>=F.startTime&&m<=F.endTime);j?I.value[t.short_id]!==j.text&&(I.value[t.short_id]=j.text):I.value[t.short_id]!==null&&(I.value[t.short_id]=null)}function r(n,t){n&&(_.value[t]=n)}function o(n){return(M.value===n.short_id||Z.value===n.short_id)&&n.voice_perfect_match_video_url}J(z,n=>{const t=Object.keys(C.query).length>0;if(n&&n.length>0&&!C.query.soundranks&&!t){const m=n[0];if(b.ssrDefaultVoiceQuery.value={soundranks:m.short_id,sample_text:m.sample_text,gender:m.genderRecommendation?m.genderRecommendation.toLowerCase():""},!C.query.sample_text&&m.sample_text&&(b.currentSampleText.value=m.sample_text),m.voice_perfect_match_video_url&&(M.value=m.short_id,m.voice_perfect_match_video_tts_word_times)){let w=m.voice_perfect_match_video_tts_word_times;if(typeof w=="string")try{w=JSON.parse(w)}catch{w=[]}ie[m.short_id]=ke(w)}}},{immediate:!0}),J(()=>b.ssrDefaultVoiceQuery.value,n=>{n===null&&(M.value=null,Object.keys(A.value).forEach(t=>{A.value[t]=!1,Q.value[t]=!1}))});const $=p(!1);function G(){const n=window.location.href;navigator.clipboard.writeText(n).then(()=>{$.value=!0,setTimeout(()=>$.value=!1,2e3)})}const i=p(!1);J(i,n=>{if(!n)try{localStorage.setItem(qa,"true")}catch{}});const y=p(!1),Pe=p(null);function je(n){Pe.value=n,y.value=!0}const Je=p(null);Qe(async()=>{try{const n=await $fetch("/api/v1/tags/activity",{params:{limit:4,sample_text:qe}});if(n.activities){const t=n.activities.slice(0,5).map(m=>({user_avatar_url:m.user_avatar_url,username:m.username}));Je.value={recentRaters:t,totalRatings:t.length,sample_text:qe,title:"Personal Assistant"}}}catch(n){console.error("Failed to fetch PA stats:",n)}});const Be=p(!1),Fe=p(null),He=n=>{Fe.value=n,Be.value=!0},Ue=({item:n})=>{n&&(n.comment_count=(n.comment_count||0)+1)};function Ye(){b.updateRouteQuery({sample_text:qe}),B.value=qe}return(n,t)=>{const m=pt,w=No,j=oo,F=so,le=ao,de=Ps,De=Ol,Ae=go,Oe=ho,Ke=xo,Xe=eo;return d(),c(te,null,[e("div",null,[e("div",Fl,[e("div",Hl,[e("div",Ul,[e("div",Dl,[e("div",Nl,[t[12]||(t[12]=ot('<div class="flex items-center gap-3 sm:gap-4 flex-1 min-w-0"><div class="flex items-center gap-2 shrink-0"><div class="w-6 h-6 sm:w-7 sm:h-7 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center group-hover:bg-white/10 transition-all"><svg class="w-3.5 h-3.5 sm:w-4 sm:h-4 text-white/40 group-hover:text-white/80 transition-colors" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path></svg></div><span class="text-[11px] sm:text-xs font-black text-white/70 uppercase tracking-widest group-hover:text-white/90 transition-colors">Voice Leaderboards</span></div><div class="hidden lg:block w-px h-4 bg-white/10 shrink-0"></div><div class="hidden lg:flex flex-1 items-center gap-2 lg:gap-3 min-w-0 opacity-100 group-hover:opacity-100 transition-opacity text-[10px] lg:text-[11px] uppercase tracking-wider text-white/40"> Community-rated top voices across every category. </div></div>',1)),e("div",Wl,[e("select",{class:"bg-white/10 border border-white/20 hover:bg-white/20 transition-colors text-white text-[10px] sm:text-[11px] font-bold uppercase tracking-widest rounded-lg pl-3 pr-8 py-1.5 focus:outline-none focus:ring-2 focus:ring-emerald-500/50 appearance-none cursor-pointer",onChange:N},[t[10]||(t[10]=e("option",{value:"",disabled:"",selected:"",class:"text-slate-900"},"Explore Leaderboards",-1)),e("optgroup",Gl,[(d(!0),c(te,null,pe(x(Ut),u=>(d(),c("option",{key:u,value:u,class:"font-normal"},R(u),9,Zl))),128))]),e("optgroup",Ql,[(d(!0),c(te,null,pe(x(Dt),u=>(d(),c("option",{key:u,value:u,class:"font-normal"},R(u),9,Jl))),128))])],32),t[11]||(t[11]=e("svg",{class:"w-3.5 h-3.5 text-emerald-100 absolute right-2.5 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M19 9l-7 7-7-7"})],-1))])])]),e("div",Yl,[e("div",Kl,[t[14]||(t[14]=e("h1",{class:"text-4xl sm:text-5xl lg:text-4xl xl:text-[40px] lg:whitespace-nowrap px-2 font-black text-white tracking-tight drop-shadow-2xl mb-4 sm:mb-5 font-outfit leading-none"},[O(" Discover the best AI voices "),e("br",{class:"sm:hidden"}),e("span",{class:"text-indigo-300"},"on the web.")],-1)),t[15]||(t[15]=e("p",{class:"text-sm sm:text-base md:text-lg font-medium text-indigo-100/90 max-w-3xl mx-auto leading-relaxed px-4"}," The definitive voice index for creators. Compare, filter, and rate top-tier voices. ",-1)),e("div",Xl,[h(x(Nt),{class:"w-4 h-4 text-indigo-300 shrink-0"}),t[13]||(t[13]=O(" Search & audition 3,000+ voices across 30+ models instantly ",-1))])])]),t[16
14]||(t[16]=e("div",{class:"flex items-center justify-center gap-4 mt-6 opacity-10"},[e("div",{class:"h-[1px] w-12 bg-white"}),e("span",{class:"text-[7px] font-black uppercase tracking-[0.4em]"},"Casting Assistant Active"),e("div",{class:"h-[1px] w-12 bg-white"})],-1))])])]),e("div",ea,[e("div",ta,[e("div",oa,[e("div",sa,[e("div",la,[(d(),c(te,null,pe(W,u=>e("button",{key:u,onClick:H=>ye(u),class:U(["text-[10px] font-bold uppercase tracking-widest px-2 py-0.5 rounded transition-colors whitespace-nowrap flex-shrink-0",Ce.value===u?"text-blue-600 bg-blue-50 border border-blue-200":"text-gray-400 hover:text-blue-600 hover:bg-blue-50"])},R(u),11,aa)),64))]),e("div",na,[t[18]||(t[18]=e("svg",{class:"w-3.5 h-3.5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)),h(m,{to:"/top-100",class:"text-[10px] font-bold text-blue-600 uppercase tracking-widest"},{default:S(()=>[...t[17]||(t[17]=[O("SoundRanks Top 100",-1)])]),_:1})])]),e("div",ia,[e("div",ra,[e("div",{onClick:$e,class:"w-full flex-[1] rounded-xl bg-white border border-gray-200 flex items-center justify-center hover:bg-indigo-50 hover:border-indigo-200 hover:text-indigo-600 transition-all shadow-sm group cursor-pointer"},[...t[19]||(t[19]=[ot('<div class="flex items-center gap-2"><span class="text-[10px] sm:text-xs font-bold text-gray-700 group-hover:text-indigo-600 uppercase tracking-wider flex items-center gap-2"> Browse All <svg class="w-3 h-3 group-hover:translate-x-0.5 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></span><div class="p-0.5 bg-indigo-500 rounded text-[7px] text-white"><svg class="w-2 h-2" fill="currentColor" viewBox="0 0 24 24"><path d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></div></div>',1)])]),e("div",{onClick:t[0]||(t[0]=u=>q.value=!0),class:"w-full flex-[2] rounded-xl bg-[#0f172a] flex flex-col relative overflow-hidden group shadow-sm transition-all duration-500 cursor-pointer border border-white/5 hover:border-indigo-500/50 hover:shadow-indigo-500/10"},[...t[20]||(t[20]=[ot('<div class="absolute top-0 right-0 w-32 h-32 bg-indigo-600/20 blur-[60px] -mr-16 -mt-16 group-hover:bg-indigo-500/40 transition-colors duration-500"></div><div class="absolute bottom-0 left-0 w-24 h-24 bg-purple-600/10 blur-[50px] -ml-12 -mb-12 group-hover:bg-purple-500/30 transition-colors duration-500"></div><div class="relative w-full h-full p-4 flex flex-col justify-between z-10"><div class="flex items-center justify-between transition-opacity duration-300 group-hover:opacity-0"><div class="px-1.5 py-0.5 rounded bg-indigo-500/10 backdrop-blur-md border border-indigo-500/20 text-[8px] font-black uppercase tracking-widest text-indigo-400"> SoundRanks </div><div class="w-5 h-5 rounded-full border border-white/10 flex items-center justify-center text-white/40 group-hover:text-indigo-400 group-hover:border-indigo-500/50 transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"></path></svg></div></div><div class="flex-1 flex flex-col justify-center transition-all duration-500 group-hover:-translate-y-4 group-hover:opacity-0"><div class="text-[9px] font-bold text-white/50 uppercase tracking-[0.2em] mb-1">Casting Studio</div><div class="text-xl font-black text-white leading-[1.1] tracking-tight"> Custom<br>Ranking </div></div><div class="flex items-center gap-2 transition-opacity duration-300 group-hover:opacity-0"><div class="px-2 py-1 rounded bg-indigo-500/10 border border-indigo-500/20 text-[8px] font-black uppercase tracking-widest text-indigo-300 flex items-center gap-1.5 shadow-sm"><svg class="w-2.5 h-2.5 text-indigo-400" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2L14.5 9L22 11.5L14.5 14L12 21L9.5 14L2 11.5L9.5 9L12 2Z"></path></svg> Create Now </div><div class="h-px flex-1 bg-white/5"></div></div><div class="absolute inset-0 bg-[#0f172a] p-5 flex flex-col items-center justify-center text-center opacity-0 group-hover:opacity-100 transition-all duration-300 z-20 translate-y-4 group-hover:translate-y-0"><div class="w-10 h-10 rounded-full bg-indigo-600 flex items-center justify-center mb-3 shadow-lg shadow-indigo-500/40 group-hover:scale-110 transition-transform duration-500"><svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
14<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M12 4v16m8-8H4"></path></svg></div><p class="text-xs font-black text-white uppercase tracking-widest mb-2">Create New</p><p class="text-[9px] text-slate-400 font-medium leading-relaxed px-2">Launch the AI analyzer to rank voices against your custom script or intent.</p></div></div>',3)])])]),e("div",da,[xe.value?(d(),c("div",ca,[(d(),c(te,null,pe(4,u=>e("div",{key:u,class:"w-64 h-64 bg-gray-900/50 rounded-xl animate-pulse shrink-0 border border-white/5 flex flex-col overflow-hidden"},[...t[21]||(t[21]=[e("div",{class:"flex-1 bg-gray-800/40 m-3 rounded-lg"},null,-1),e("div",{class:"h-10 bg-gray-950 border-t border-white/10"},null,-1)])])),64))])):(d(),Le(x(Jt),{key:1,ref_key:"carouselComponentRef",ref:f,opts:{align:"start"},class:"w-full group/carousel"},{default:S(()=>[h(x(Wt),{class:"-ml-3"},{default:S(()=>[(d(!0),c(te,null,pe(z.value,u=>(d(),Le(x(Gt),{key:u.id,class:"pl-3 3xl:basis-1/5 2xl:basis-1/4 md:basis-1/3 basis-1/2"},{default:S(()=>[e("div",{onClick:H=>Re(u),onMouseenter:H=>P(u),onMouseleave:H=>K(u),class:U(["group relative rounded-xl overflow-hidden cursor-pointer border-2 transition-all duration-300 bg-gray-900 flex flex-col h-64",Z.value===u.short_id?"border-indigo-500 ring-2 ring-indigo-500/50":"border-transparent hover:border-indigo-300"])},[Z.value===u.short_id?(d(),c("div",pa,[...t[22]||(t[22]=[e("svg",{viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"w-3 h-3"},[e("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.2287 6.60355C21.6193 6.99407 21.6193 7.62723 21.2287 8.01776L10.2559 18.9906C9.86788 19.3786 9.23962 19.3814 8.84811 18.9969L2.66257 12.9218C2.26855 12.5349 2.26284 11.9017 2.64983 11.5077L3.35054 10.7942C3.73753 10.4002 4.37067 10.3945 4.7647 10.7815L9.53613 15.4677L19.1074 5.89644C19.4979 5.50592 20.1311 5.50591 20.5216 5.89644L21.2287 6.60355Z"})],-1)])])):k("",!0),u.voice_perfect_match_video_url&&!A.value[u.short_id]?(d(),c("div",{key:1,class:U(["absolute top-2 left-2 z-40 pointer-events-none",{"left-8":Z.value===u.short_id}])},[e("div",va,[M.value===u.short_id?(d(),c("svg",ga,[...t[23]||(t[23]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(d(),c("svg",ha,[...t[24]||(t[24]=[e("path",{d:"M23 7l-7 5 7 5V7z"},null,-1),e("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"},null,-1)])]))])],2)):k("",!0),u.short_id?(d(),Le(m,{key:2,to:`/top-100/${u.short_id}`,onClick:t[1]||(t[1]=be(()=>{},["stop"])),class:"absolute top-2 right-2 z-40 flex items-center gap-1.5 pl-2.5 pr-2 py-1 bg-black/40 hover:bg-black/70 backdrop-blur-sm rounded-full text-white/90 hover:text-white transition-all opacity-0 group-hover:opacity-100"},{default:S(()=>[...t[25]||(t[25]=[e("span",{class:"text-[9px] font-bold uppercase tracking-wide leading-none pt-[1px]"},"Top 100",-1),e("svg",{class:"w-3 h-3 block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)])]),_:1},8,["to"])):k("",!0),e("div",xa,[e("img",{src:u.image_url,class:U(["absolute inset-0 w-full h-full object-cover transition-all duration-700",o(u)&&Q.value[u.short_id]?"opacity-0 scale-100 duration-500":"group-hover:scale-110 opacity-90"])},null,10,fa),o(u)?(d(),c("video",{key:0,ref_for:!0,ref:H=>r(H,u.short_id),src:u.voice_perfect_match_video_url,autoplay:"",muted:"",playsinline:"",loop:"",class:U(["absolute inset-0 w-full h-full object-cover z-0 transition-opacity duration-500 bg-gray-900",A.value[u.short_id]?"opacity-100":"opacity-0"]),onTimeupdate:H=>ve(H,u),onPlay:H=>{A.value[u.short_id]=!0,Q.value[u.short_id]=!0},onPause:H=>A.value[u.short_id]=!1,onWaiting:H=>A.value[u.short_id]=!1,onPlaying:H=>{A.value[u.short_id]=!0,Q.value[u.short_id]=!0},onEnded:H=>Q.value[u.short_id]=!0},null,42,ma)):k("",!0),o(u)&&I.value[u.short_id]&&A.value[u.short_id]?(d(),c("div",_a,[e("span",ba,R(I.value[u.short_id]),1)])):k("",!0),e("div",{class:U(["absolute inset-0 bg-gradient-to-t from-gray-900 via-black/20 to-transparent transition-opacity",o(u)&&Q.value[u.short_id]?"opacity-40 bg-gradient-to-t from-black/80 to-transparent":"opacity-90"])},null,2),e("div",wa,[e("div",{class:U(["transform transition-transform duration-300",o(u)&&Q.value[u.short_id]?"translate-y-[150%] opacity-0":"group-hover:-translate-y-20"])}
14,[e("p",ya,R(u.title),1),e("div",ka,[u.tags.length?(d(),c("span",Ca,R(u.tags[0]),1)):k("",!0)])],2),e("div",{class:U(["absolute inset-x-0 bottom-0 p-4 opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 ease-out",{hidden:o(u)&&Q.value[u.short_id]}])},[t[26]||(t[26]=e("p",{class:"text-[9px] text-indigo-300 font-mono uppercase mb-1 font-bold"},"Sample Script",-1)),e("p",$a,' "'+R(u.sample_text)+'" ',1)],2)])]),k("",!0)],42,ua)]),_:2},1024))),128))]),_:1}),h(x(Zt),{class:"-left-4 bg-white hover:bg-gray-50 border-gray-200 text-gray-700 shadow-md disabled:hidden disabled:opacity-0 transition-opacity"}),h(x(Qt),{class:"-right-4 bg-white hover:bg-gray-50 border-gray-200 text-gray-700 shadow-md disabled:hidden disabled:opacity-0 transition-opacity"})]),_:1},512))])])]),e("div",Sa,[e("div",Ma,[e("button",{ref_key:"openSidebarButtonRef",ref:se,onClick:t[2]||(t[2]=u=>he("open-sidebar")),class:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors shadow-sm font-medium"},[...t[28]||(t[28]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})],-1),e("span",null,"Find voices with filters",-1)])],512)]),e("div",Va,[e("div",Ra,[e("div",Ta,[e("div",Ia,[t[32]||(t[32]=e("span",{class:"text-indigo-600 font-bold flex items-center gap-1"},"Sample Text",-1)),e("div",La,[e("button",{onClick:Ye,class:"text-[10px] text-gray-500 hover:text-indigo-600 transition-colors font-bold px-1.5 py-0.5 rounded hover:bg-white active:scale-95"}," Reset "),t[31]||(t[31]=e("div",{class:"w-px h-3 bg-gray-200 mx-0.5"},null,-1)),e("button",{onClick:G,class:"relative flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-bold text-gray-500 hover:text-indigo-600 transition-colors rounded hover:bg-white active:scale-95"},[t[29]||(t[29]=e("svg",{class:"w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})],-1)),t[30]||(t[30]=e("span",null,"Share",-1)),h(Yt,{name:"fade"},{default:S(()=>[$.value?(d(),c("div",Pa,"Copied!")):k("",!0)]),_:1})])])])])]),e("div",ja,[t[33]||(t[33]=e("div",{class:"absolute -top-2.5 left-3 px-2 py-0.5 bg-white border border-indigo-200/60 rounded-full text-[7px] font-black uppercase tracking-[0.2em] text-indigo-600 shadow-sm whitespace-nowrap flex items-center gap-1 group-hover/studio:border-indigo-400 group-hover/studio:text-indigo-700 transition-all"},[e("span",{class:"animate-pulse"},"✨"),O(" Studio Tools ")],-1)),h(w,{onOpenCreate:t[3]||(t[3]=u=>q.value=!0)}),h(j,{voices:x(T),currentText:x(B)},null,8,["voices","currentText"]),h(F,{voices:x(T),currentText:x(B)},null,8,["voices","currentText"])])]),e("div",Ba,[e("div",Aa,[e("div",Oa,[h(le,{defaultSampleText:n.defaultSampleText,modelValue:x(B),"onUpdate:modelValue":t[4]||(t[4]=u=>Kt(B)?B.value=u:null),placeholder:"Enter custom text to test with voices...",class:"w-full"},null,8,["defaultSampleText","modelValue"])])])])]),e("div",Ea,[h(de,{"sample-text":x(B),"view-mode":x(v)},null,8,["sample-text","view-mode"])])])]),h(De,{isOpen:oe.value,"onUpdate:isOpen":t[5]||(t[5]=u=>oe.value=u),onSelect:re},null,8,["isOpen"]),h(Ae,{isOpen:q.value,"onUpdate:isOpen":t[6]||(t[6]=u=>q.value=u)},null,8,["isOpen"]),h(zl,{isOpen:i.value,"onUpdate:isOpen":t[7]||(t[7]=u=>i.value=u)},null,8,["isOpen"]),h(Xt,{"is-open":y.value,"onUpdate:isOpen":t[8]||(t[8]=u=>y.value=u),item:Pe.value,onReply:He},null,8,["is-open","item"])]),h(Oe),h(Ke),h(Xe,{"is-open":Be.value,"onUpdate:isOpen":t[9]||(t[9]=u=>Be.value=u),item:Fe.value,onReplied:Ue},null,8,["is-open","item"])],64)}}};export{en as _};

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.