PageSourceSearch

https://criticdb.com/_nuxt/Btm7SnyR.js

js criticdb.com collected 2026-09-25 06:11:38 UTC 16,373 bytes, 1 lines download raw bytes

1import{_ as V}from"./_dk6PrHP.js";import{K as A,y as G,E as H,o as K,c as a,a as e,b as o,d,aF as Y,m as p,s as r,F as $,r as B,v as J,t as l,_ as O,g as i,S as Q,e as x,f as m,q as P}from"./DVPCUeIP.js";import{_ as W}from"./BO8Qif3j.js";import{L as N}from"./KUHPhEpx.js";import{u as Z}from"./CY9Mo8zb.js";const ee={class:"leaderboard-page min-h-screen relative py-8 sm:py-12 overflow-hidden"},te={class:"fixed inset-0 z-0"},se={class:"relative z-10"},le={key:0,class:"space-y-8"},oe={class:"space-y-3"},ae={key:1,class:"text-center py-20 bg-red-500/5 rounded-3xl border border-red-500/10 backdrop-blur-md"},re={class:"text-gray-400 mb-6"},ne={key:2},ie={key:0,class:"mb-16 relative"},de={class:"flex flex-col sm:flex-row justify-center items-end gap-6 sm:gap-4 md:gap-8"},ue={key:0,class:"order-2 sm:order-1 w-full sm:w-1/3 flex flex-col items-center group"},ce={class:"relative mb-4"},xe={class:"w-20 h-20 sm:w-24 sm:h-24 rounded-2xl overflow-hidden border-4 border-gray-300 shadow-[0_0_20px_rgba(209,213,219,0.3)] transform group-hover:scale-105 transition-transform duration-300"},ve=["src","alt"],fe={key:1,class:"w-full h-full bg-gray-800 flex items-center justify-center text-xl font-bold text-gray-400"},me={class:"w-full bg-gradient-to-t from-gray-800/80 to-gray-800/40 backdrop-blur-md border border-gray-700/50 rounded-t-3xl p-6 text-center relative overflow-hidden h-48 sm:h-56 flex flex-col justify-start pt-8"},ge={class:"text-2xl font-black text-gray-300 mb-2"},pe={class:"mt-auto flex justify-center gap-3 text-xs text-gray-400"},be={class:"flex items-center gap-1"},_e={class:"flex items-center gap-1"},he={key:1,class:"order-1 sm:order-2 w-full sm:w-1/3 flex flex-col items-center z-10 group"},we={class:"relative mb-6"},ye={class:"absolute -top-12 left-1/2 transform -translate-x-1/2 animate-bounce-slow"},ke={class:"w-28 h-28 sm:w-32 sm:h-32 rounded-2xl overflow-hidden border-4 border-yellow-400 shadow-[0_0_30px_rgba(250,204,21,0.4)] transform group-hover:scale-105 transition-transform duration-300 ring-4 ring-yellow-400/20"},je=["src","alt"],Le={key:1,class:"w-full h-full bg-gray-800 flex items-center justify-center text-2xl font-bold text-gray-400"},ze={class:"w-full bg-gradient-to-t from-gray-800/90 to-gray-800/50 backdrop-blur-md border border-yellow-500/30 rounded-t-3xl p-6 text-center relative overflow-hidden h-56 sm:h-64 flex flex-col justify-start pt-10 shadow-[0_-10px_40px_-10px_rgba(0,0,0,0.5)]"},Pe={class:"text-3xl sm:text-4xl font-black text-yellow-400 mb-3 drop-shadow-sm"},Ue={class:"mt-auto flex justify-center gap-4 text-sm text-gray-300"},Xe={class:"flex flex-col items-center"},Ce={class:"font-bold text-white"},Se={class:"flex flex-col items-center"},$e={class:"font-bold text-white"},Be={key:2,class:"order-3 w-full sm:w-1/3 flex flex-col items-center group"},Ne={class:"relative mb-4"},Ee={class:"w-20 h-20 sm:w-24 sm:h-24 rounded-2xl overflow-hidden border-4 border-orange-400 shadow-[0_0_20px_rgba(251,146,60,0.3)] transform group-hover:scale-105 transition-transform duration-300"},Fe=["src","alt"],Ie={key:1,class:"w-full h-full bg-gray-800 flex items-center justify-center text-xl font-bold text-gray-400"},Me={class:"w-full bg-gradient-to-t from-gray-800/80 to-gray-800/40 backdrop-blur-md border border-gray-700/50 rounded-t-3xl p-6 text-center relative overflow-hidden h-48 sm:h-56 flex flex-col justify-start pt-8"},Re={class:"text-2xl font-black text-orange-300 mb-2"},Te={class:"mt-auto flex justify-center gap-3 text-xs text-gray-400"},qe={class:"flex items-center gap-1"},De={class:"flex items-center gap-1"},Ve={class:"space-y-3 relative z-0"},Ae={class:"flex items-center gap-4 sm:gap-6"},Ge={class:"w-8 sm:w-12 text-center flex-shrink-0"},He={class:"text-xl sm:text-2xl font-bold text-gray-500 group-hover:text-white transition-colors font-mono"},Ke={class:"w-12 h-12 sm:w-14 sm:h-14 rounded-xl overflow-hidden ring-2 ring-white/10 group-hover:ring-teal-500/50 transition-all"},Ye=["src","alt"],Je={key:1,class:"w-full h-full bg-gray-700 flex items-center justify-center"},Oe={class:"flex-1 min-w-0"},Qe={class:"flex flex-col sm:flex-row sm:items-center justify-between gap-2"},We={class:"flex items-center gap-3 text-xs sm:text-sm text-gray-400 mt-0.5"},Ze={key:0,class:"flex items-center gap-1 text-orange-400"},et={class:"hidden sm:flex items-center gap-6 text-sm text-gray-400"},tt={class:"text-center"},st={class:"font-bold text-white"},lt={class:"text-center"},ot={class:"font-bold text-white"},at={class:"text-right min-w-[80px] sm:min-w-[100px]"},rt={class:"text-lg sm:text-xl font-black text-white group-hover:text-teal-400 transition-colors"},nt={key:1,class:"text-center pt-10 pb-6"},it={key:2,class:"text-center py-12"},dt={key:0,class:"fixed bottom-0 left-0 right-0 z-50 p-4 pointer-events-none"},ut={class:"bg-gray-900/90 backdrop-blur-xl border border-teal-500/30 rounded-2xl p-4 shadow-2xl shadow-black/50 flex items-center justify-between gap-4 ring-1 ring-teal-500/20"},ct={class:"flex items-center gap-4"},xt={class:"hidden sm:block"},vt={class:"text-2xl font-black text-white"},ft={class:"sm:hidden text-xl font-black text-white"},mt={class:"flex items-center gap-3"},gt={class:"font-bold text-white"},pt={class:"text-xs text-gray-400"}
1,U=50,bt={__name:"leaderboard",setup(_t){G({title:"Leaderboard - Top Players | CriticDB",meta:[{name:"description",content:"See the top players on CriticDB ranked by experience points and level."}]});const{fetchLeaderboard:X,formatXP:b,userStats:g,fetchUserStats:E}=Z(),F=H(),c=p([]),_=p(!0),k=p(!1),h=p(null),w=p(1),y=p(null),s=P(()=>c.value.slice(0,3)),I=P(()=>c.value.slice(3)),M=P(()=>c.value.length>=w.value*U),C=async()=>{_.value=!0,h.value=null;try{const u=await X(U);c.value=u||[]}catch{h.value="Failed to load leaderboard"}finally{_.value=!1}},R=async()=>{k.value=!0,w.value++;try{const u=await X(U*w.value);c.value=u||[]}catch{}finally{k.value=!1}},T=()=>{w.value=1,C()},q=()=>{if(!g.value||!c.value.length)return;const u=g.value.total_xp,t=c.value.findIndex(L=>L.total_xp<=u);y.value=t===-1?c.value.length+1:t+1},j=u=>u?u.substring(0,2).toUpperCase():"?";return K(async()=>{await C(),F.value&&(await E(),q())}),(u,t)=>{const L=V,v=J,z=O,f=Q,S=W;return r(),a("div",ee,[e("div",te,[o(L,{src:"/game-covers-backdrop.jpg.png",alt:"Leaderboard background",class:"w-full h-full object-cover opacity-40",format:"webp",quality:"80",loading:"eager",preload:""}),t[0]||(t[0]=e("div",{class:"absolute inset-0 bg-gradient-to-b from-gray-900 via-gray-900/95 to-gray-900"},null,-1)),t[1]||(t[1]=e("div",{class:"absolute top-0 left-1/4 w-96 h-96 bg-teal-500/20 rounded-full blur-[128px] pointer-events-none"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute bottom-0 right-1/4 w-96 h-96 bg-blue-600/20 rounded-full blur-[128px] pointer-events-none"},null,-1))]),e("div",se,[o(S,{class:"max-w-5xl"},{default:d(()=>[t[27]||(t[27]=e("div",{class:"text-center mb-12 sm:mb-16 relative"},[e("h1",{class:"text-4xl sm:text-5xl md:text-6xl font-black text-transparent bg-clip-text bg-gradient-to-r from-white via-gray-200 to-gray-400 tracking-tight mb-4 drop-shadow-lg"}," Global Legends "),e("p",{class:"text-lg text-gray-400 max-w-2xl mx-auto font-medium"}," The most dedicated critics and gamers in our community. ")],-1)),_.value?(r(),a("div",le,[t[3]||(t[3]=e("div",{class:"flex flex-col sm:flex-row justify-center items-end gap-4 sm:gap-8 mb-12 h-[400px] sm:h-[350px]"},[e("div",{class:"w-full sm:w-1/3 h-64 bg-gray-800/40 rounded-t-3xl animate-pulse"}),e("div",{class:"w-full sm:w-1/3 h-80 bg-gray-800/40 rounded-t-3xl animate-pulse"}),e("div",{class:"w-full sm:w-1/3 h-64 bg-gray-800/40 rounded-t-3xl animate-pulse"})],-1)),e("div",oe,[(r(),a($,null,B(5,n=>e("div",{key:n,class:"h-20 bg-gray-800/40 rounded-xl animate-pulse"})),64))])])):h.value?(r(),a("div",ae,[o(v,{name:"i-heroicons-exclamation-triangle",class:"w-16 h-16 text-red-500 mx-auto mb-4"}),t[5]||(t[5]=e("h3",{class:"text-xl font-bold text-white mb-2"},"Failed to load leaderboard",-1)),e("p",re,l(h.value),1),o(z,{onClick:T,color:"white",variant:"solid"},{default:d(()=>[...t[4]||(t[4]=[i("Try Again",-1)])]),_:1})])):(r(),a("div",ne,[s.value.length?(r(),a("div",ie,[e("div",de,[s.value[1]?(r(),a("div",ue,[e("div",ce,[t[7]||(t[7]=e("div",{class:"absolute inset-0 bg-gray-300/20 blur-xl rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-500"},null,-1)),o(f,{to:`/${s.value[1].profiles?.username}`,class:"relative block"},{default:d(()=>[e("div",xe,[s.value[1].profiles?.avatar_url?(r(),a("img",{key:0,src:s.value[1].profiles.avatar_url,alt:s.value[1].profiles?.username,class:"w-full h-full object-cover"},null,8,ve)):(r(),a("div",fe,l(j(s.value[1].profiles?.username)),1))]),t[6]||(t[6]=e("div",{class:"absolute -bottom-3 -right-3 w-8 h-8 bg-gray-300 rounded-full flex items-center justify-center text-gray-900 font-bold shadow-lg border-2 border-gray-900"}," 2 ",-1))]),_:1},8,["to"])]),e("div",me,[t[9]||(t[9]=e("div",{class:"absolute top-0 inset-x-0 h-1 bg-gradient-to-r from-transparent via-gray-400 to-transparent opacity-50"},null,-1)),o(f,{to:`/${s.value[1].profiles?.username}`,class:"text-lg font-bold text-white hover:text-teal-400 transition-colors truncate w-full mb-1"},{default:d(()=>[i(l(s.value[1].profiles?.username||"Unknown"),1)]),_:1},8,["to"]),e("div",ge,[i(l(x(b)(s.value[1].total_xp))+" ",1),t[8]||(t[8]=e("span",{class:"text-xs font-medium text-gray-500 align-middle"},"XP",-1))]),e("div",pe,[e("span",be,[o(v,{name:"i-heroicons-list-bullet",class:"w-3 h-3"}),i(" "+l(s.value[1].lists_created||0),1)]),e("span",_e,[o(v,{name:"i-heroicons-pencil-square",class:"w-3 h-3"}),i(" "+l(s.value[1].reviews_created||0),1)])])])])):m("",!0),s.value[0]?(r(),a("div",he,[e("div",we,[e("div",ye,[o(v,{name:"i-heroicons-crown",class:"w-12 h-12 text-yellow-400 drop-shadow-[0_0_15px_rgba(250,204,21,0.6)]"})]),t[11]||(t[11]=e("div",{class:"absolute inset-0 bg-yellow-400/20 blur-2xl rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-500"},null,-1)),o(f,{to:`/${s.value[0].profiles?.username}`,class:"relative block"},{default:d(()=>[e("div",ke,[s.value[0].profiles?.avatar_url?(r(),a("img",{key:0,src:s.value[0].profiles.avatar_url,alt:s.value[0].profiles?.username,class:"w-full h-full object-cover"},null,8,je)):(r(),a("div",Le,l(j(s.value[0].profiles?.username)),1))]),t[10]||(t[10]=e("div",{class:"absolute -bottom-4 -right-4 w-10 h-10 bg-yellow-400 rounded-full flex items-center justify-center text-yellow-900 font-black text-lg shadow-lg border-2 border-gray-900"}," 1 ",-1))]),_:1},8,["to"])]),e("div",ze,[t[16]||(t[16]=e("div",{class:"absolute top-0 inset-x-0 h-1 bg-gradient-to-r from-transparent via-yellow-400 to-transparent"},null,-1)),t[17]||(t[17]=e("div",{class:"absolute inset-0 bg-gradient-to-b from-yellow-400/5 to-transparent pointer-events-none"},null,-1)),o(f,{to:`/${s.value[0].profiles?.username}`,class:"text-xl sm:text-2xl font-bold text-white hover:text-yellow-400 transition-colors truncate w-full mb-1"},{default:d(()=>[i(l(s.value[0].profiles?.username||"Unknown"),1)]),_:1},8,["to"]),e("div",Pe,[i(l(x(b)(s.value[0].total_xp))+" ",1),t[12]||(t[12]=e("span",{class:"text-sm font-bold text-yellow-600/80 align-middle"},"XP",-1))]),e("div",Ue,[e("div",Xe,[e("span",Ce,l(s.value[0].lists_created||0),1),t[13]||(t[13]=e("span",{class:"text-meta uppercase tracking-wider text-gray-500"},"Lists",-1))]),t[15]||(t[15]=e("div",{class:"w-px h-8 bg-gray-700"},null,-1)),e("div",Se,[e("span",$e,l(s.value[0].reviews_created||0),1),t[14]||(t[14]=e("span",{class:"text-meta uppercase tracking-wider text-gray-500"},"Reviews",-1))])])])])):m("",!0),s.value[2]?(r(),a("div",Be,[e("div",Ne,[t[19]||(t[19]=e("div",{class:"absolute inset-0 bg-orange-400/20 blur-xl rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-500"},null,-1)),o(f,{to:`/${s.value[2].profiles?.username}`,class:"relative block"},{default:d(()=>[e("div",Ee,[s.value[2].profiles?.avatar_url?(r(),a("img",{key:0,src:s.value[2].profiles.avatar_url,alt:s.value[2].profiles?.username,class:"w-full h-full object-cover"},null,8,Fe)):(r(),a("div",Ie,l(j(s.value[2].profiles?.username)),1))]),t[18]||(t[18]=e("div",{class:"absolute -bottom-3 -right-3 w-8 h-8 bg-orange-400 rounded-full flex items-center justify-center text-orange-900 font-bold shadow-lg border-2 border-gray-900"}," 3 ",-1))]),_:1},8,["to"])]),e("div",Me,[t[21]||(t[21]=e("div",{class:"absolute top-0 inset-x-0 h-1 bg-gradient-to-r from-transparent via-orange-400 to-transparent opacity-50"},null,-1)),o(f,{to:`/${s.value[2].profiles?.username}`,class:"text-lg font-bold text-white hover:text-teal-400 transition-colors truncate w-full mb-1"},{default:d(()=>[i(l(s.value[2].profiles?.username||"Unknown"),1)]),_:1},8,["to"]),e("div",Re,[i(l(x(b)(s.value[2].total_xp))+" ",1),t[20]||(t[20]=e("span",{class:"text-xs font-medium text-orange-500/80 align-middle"},"XP",-1))]),e("div",Te,[e("span",qe,[o(v,{name:"i-heroicons-list-bullet",class:"w-3 h-3"}),i(" "+l(s.value[2].lists_created||0),1)]),e("span",De,[o(v,{name:"i-heroicons-pencil-square",class:"w-3 h-3"}),i(" "+l(s.value[2].reviews_created||0),1)])])])])):m("",!0)])])):m("",!0),e("div",Ve,[(r(!0),a($,null,B(I.value,(n,D)=>(r(),a("div",{key:n.user_id,class:"group relative bg-gray-800/40 hover:bg-gray-800/60 backdrop-blur-sm border border-white/5 hover:border-teal-500/30 rounded-xl p-4 transition-all duration-300 hover:transform hover:scale-[1.01] hover:shadow-lg hover:shadow-teal-900/10"},[e("div",Ae,[e("div",Ge,[e("span",He," #"+l(D+4),1)]),o(f,{to:`/${n.profiles?.username}`,class:"flex-shrink-0"},{default:d(()=>[e("div",Ke,[n.profiles?.avatar_url?(r(),a("img",{key:0,src:n.profiles.avatar_url,alt:n.profiles.username,class:"w-full h-full object-cover",width:"56",height:"56",loading:"lazy",decoding:"async"},null,8,Ye)):(r(),a("div",Je,[o(v,{name:"i-heroicons-user",class:"w-6 h-6 text-gray-400"})]))])]),_:2},1032,["to"]),e("div",Oe,[e("div",Qe,[e("div",null,[o(f,{to:`/${n.profiles?.username}`,class:"text-base sm:text-lg font-bold text-white hover:text-teal-400 transition-colors truncate block"},{default:d(()=>[i(l(n.profiles?.username||"Unknown"),1)]),_:2},1032,["to"]),e("div",We,[o(N,{level:n.current_level,size:"xs"},null,8,["level"]),n.current_login_streak>0?(r(),a("span",Ze,[o(v,{name:"i-heroicons-fire",class:"w-3.5 h-3.5"}),i(" "+l(n.current_login_streak),1)])):m("",!0)])]),e("div",et,[e("div",tt,[e("div",st,l(n.lists_created||0),1),t[22]||(t[22]=e("div",{class:"text-meta uppercase tracking-wider"},"Lists",-1))]),e("div",lt,[e("div",ot,l(n.reviews_created||0),1),t[23]||(t[23]=e("div",{class:"text-meta uppercase tracking-wider"},"Reviews",-1))])])])]),e("div",at,[e("div",rt,l(x(b)(n.total_xp)),1),t[24]||(t[24]=e("div",{class:"text-meta sm:text-xs font-bold text-gray-500 uppercase tracking-wider"},"XP",-1))])])]))),128))]),M.value?(r(),a("div",nt,[o(z,{onClick:R,loading:k.value,size:"xl",color:"gray",variant:"ghost",class:"hover:bg-gray-800"},{default:d(()=>[...t[25]||(t[25]=[i(" Load More Legends ",-1)])]),_:1},8,["loading"])])):m("",!0),!_.value&&c.value.length===0?(r(),a("div",it,[...t[26]||(t[26]=[e("p",{class:"text-gray-400"},"No entries found.",-1)])])):m("",!0)]))]),_:1})]),o(Y,{"enter-active-class":"transition duration-300 ease-out","enter-from-class":"transform translate-y-full opacity-0","enter-to-class":"transform translate-y-0 opacity-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"transform translate-y-0 opacity-100","leave-to-class":"transform translate-y-full opacity-0"},{default:d(()=>[x(g)&&!_.value&&y.value?(r(),a("div",dt,[o(S,{class:"max-w-5xl pointer-events-auto"},{default:d(()=>[e("div",ut,[e("div",ct,[e("div",xt,[t[28]||(t[28]=e("div",{class:"text-xs text-teal-400 font-bold uppercase tracking-wider mb-0.5"},"Your Rank",-1)),e("div",vt,"#"+l(y.value),1)]),e("div",ft,"#"+l(y.value),1),t[29]||(t[29]=e("div",{class:"h-8 w-px bg-gray-700 mx-2 hidden sm:block"},null,-1)),e("div",mt,[o(N,{level:x(g).current_level,size:"sm"},null,8,["level"]),e("div",null,[e("div",gt,l(x(b)(x(g).total_xp))+" XP",1),e("div",pt,"Level "+l(x(g).current_level),1)])])]),o(z,{to:"/dashboard/earn-xp",size:"sm",color:"teal",variant:"soft",icon:"i-heroicons-bolt"},{default:d(()=>[...t[30]||(t[30]=[i(" Earn XP ",-1)])]),_:1})])]),_:1})])):m("",!0)]),_:1})])}}},Lt=A(bt,[["__scopeId","data-v-9e6dba5e"]]);export{Lt as default};

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.