1import{j as e,H as N}from"./index-BIGTsIqw.js";import{r as n,L as i}from"./react-vendor-DYgsFty1.js";import{I as j,ak as v,an as w,Z as c,ao as k,ap as b}from"./icons-cVc9TYS8.js";function E(){return e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black via-purple-950 to-black opacity-90"}),e.jsx("div",{className:"absolute inset-0 opacity-30",style:{backgroundImage:` 2 linear-gradient(to right, #0ff2 1px, transparent 1px), 3 linear-gradient(to bottom, #0ff2 1px, transparent 1px) 4 `,backgroundSize:"60px 60px",transform:"perspective(500px) rotateX(60deg)",transformOrigin:"center top",top:"50%"}}),[...Array(8)].map((r,a)=>e.jsx("div",{className:"absolute w-px h-full opacity-20",style:{left:`${10+a*12}%`,background:`linear-gradient(to bottom, transparent, ${a%2===0?"#ff0080":"#00ffff"}, transparent)`,animation:`pulse ${2+a*.3}s ease-in-out infinite`,animationDelay:`${a*.2}s`}},`vline-${a}`)),[...Array(6)].map((r,a)=>e.jsx("div",{className:"absolute",style:{left:`${Math.random()*100}%`,top:`${Math.random()*100}%`,width:`${50+Math.random()*150}px`,height:"2px",backgroundColor:["#ff0080","#00ffff","#ffff00"][a%3],opacity:.6,animation:`glitch ${.5+Math.random()}s steps(2) infinite`,animationDelay:`${Math.random()*2}s`}},`glitch-${a}`)),[...Array(12)].map((r,a)=>e.jsx("div",{className:"absolute text-[#8B5CF6] font-mono text-xs opacity-20 animate-float-up",style:{left:`${5+a*8}%`,animationDuration:`${8+Math.random()*6}s`,animationDelay:`${a*.5}s`},children:a===3?"HIENERGY":a===7?"LEADERBOARD":a===11?"CHAMPIONS":Math.random().toString(16).substring(2,8).toUpperCase()},`hex-${a}`)),e.jsx("div",{className:"absolute top-4 left-4 w-16 h-16 border-l-2 border-t-2 border-cyan-500 opacity-50"}),e.jsx("div",{className:"absolute top-4 right-4 w-16 h-16 border-r-2 border-t-2 border-pink-500 opacity-50"}),e.jsx("div",{className:"absolute bottom-4 left-4 w-16 h-16 border-l-2 border-b-2 border-pink-500 opacity-50"}),e.jsx("div",{className:"absolute bottom-4 right-4 w-16 h-16 border-r-2 border-b-2 border-cyan-500 opacity-50"}),e.jsx("div",{className:"absolute inset-0 opacity-5",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, #000 2px, #000 4px)"}}),e.jsx("div",{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-cyan-400 to-transparent opacity-50 animate-scan"}),e.jsx("style",{children:` 5 @keyframes glitch { 6 0%, 100% { transform: translateX(0); opacity: 0.6; } 7 25% { transform: translateX(-5px); opacity: 0.8; } 8 50% { transform: translateX(5px); opacity: 0.4; } 9 75% { transform: translateX(-2px); opacity: 0.9; } 10 } 11 @keyframes float-up { 12 0% { transform: translateY(100vh); opacity: 0; } 13 10% { opacity: 0.2; } 14 90% { opacity: 0.2; } 15 100% { transform: translateY(-100px); opacity: 0; } 16 } 17 @keyframes scan { 18 0% { top: 0%; } 19 100% { top: 100%; } 20 } 21 @keyframes pulse { 22 0%, 100% { opacity: 0.1; } 23 50% { opacity: 0.3; } 24 } 25 .animate-float-up { 26 animation: float-up 10s linear infinite; 27 } 28 .animate-scan { 29 animation: scan 4s linear infinite; 30 } 31 `})]})}function F(){var p;const[r,a]=n.useState([]),[h,f]=n.useState(!0),[m,d]=n.useState(null),[o,x]=n.useState(!1),l=async()=>{try{x(!0);const t=await fetch("/api/leaderboard");if(!t.ok)throw new Error("Failed to fetch leaderboard");const s=await t.json();a(Array.isArray(s)?s:[]),d(null)}catch(t){console.error("Error fetching leaderboard:",t),d("Failed to load leaderboard. Please try again.")}finally{f(!1),x(!1)}};n.useEffect(()=>{l()},[]);const g=t=>t===0?e.jsx(k,{className:"text-yellow-400 w-5 h-5 sm:w-7 sm:h-7"}):t===1?e.jsx(b,{className:"text-zinc-300 w-5 h-5 sm:w-6 sm:h-6"}):t===2?e.jsx(b,{className:"text-amber-600 w-5 h-5 sm:w-6 sm:h-6"}):e.jsxs("span",{className:"text-[#8B5CF6] font-mono font-semibold text-sm sm:text-lg",children:["#",t+1]}),y=t=>t===0?"bg-gradient-to-r from-yellow-500/20 via-yellow-400/10 to-yellow-500/20 border-yellow-400":t===1?"bg-gradient-to-r from-gray-400/20 via-gray-300/10 to-gray-400/20 border-gray-400":t===2?"bg-gradient-to-r from-amber-600/20 via-amber-500/10 to-amber-600/20 border-amber-600":"bg-black/50 border-cyan-500/30 hover:border-[#DDD6FE]",u=t=>new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return e.jsxs(e.Fragment,{children:[e.jsxs(N,{children:[e.jsx("title",{children:"Leaderboard - Network Ninja Challenge - Hi Energy AI"}),e.jsx("meta",{name:"description",content:"See who dominates the Network Ninja Challenge! All-time high scores from affiliate marketing experts who know their networks."})]}),e.jsxs("div",{className:"min-h-screen bg-black relative",children:[e.jsx(E,{}),e.jsx("div",{className:"fixed inset-0 pointer-events-none opacity-10",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, #000 2px, #000 4px)"}}),e.jsxs("div",{className:"bg-black/80 border-b border-cyan-500/50 shadow-lg shadow-cyan-500/20 relative z-10 backdrop-blur-sm",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between",children:[e.jsxs(i,{to:"/affiliate-knowledge-quiz",className:"text-sm font-mono font-bold text-[#8B5CF6] hover:text-pink-400 transition-all transform hover:scale-110 flex items-center gap-2 tracking-wider",children:[e.jsx(j,{className:"rotate-180",size:16})," [BACK_TO_QUIZ]"]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-500 to-pink-500 rounded-lg blur-md opacity-70 group-hover:opacity-100 transition-opacity"}),e.jsx("img",{src:"/hi_energy_K.png",alt:"Hi Energy AI",className:"h-10 relative brightness-150 contrast-125",style:{filter:"drop-shadow(0 0 10px #0ff) drop-shadow(0 0 20px #ff0080)"}})]})]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-cyan-400 to-transparent"})]}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8 sm:py-12 relative z-10",children:[e.jsxs("div",{className:"text-center mb-8 sm:mb-12",children:[e.jsxs("div",{className:"inline-flex items-center justify-center w-16 h-16 sm:w-24 sm:h-24 rounded-lg mb-4 sm:mb-6 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500 to-pink-500 rounded-lg animate-pulse opacity-50"}),e.jsx(v,{className:"relative text-yellow-400 w-8 h-8 sm:w-12 sm:h-12",style:{filter:"drop-shadow(0 0 20px #ff0)"}})]}),e.jsx("h1",{className:"text-2xl sm:text-4xl md:text-6xl lg:text-7xl font-semibold text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 via-pink-500 to-yellow-400 mb-2 sm:mb-4 tracking-wider font-mono",style:{textShadow:"0 0 40px #0ff, 0 0 80px #ff0080"},children:"HALL_OF_FAME"}),e.jsx("p",{className:"text-sm sm:text-lg md:text-xl text-[#8B5CF6] font-mono",children:"> Network Ninja Champions_"}),e.jsx("p",{className:"text-xs sm:text-sm text-zinc-500 font-mono mt-2",children:"[TOP 100] ⢠[REAL-TIME]"})]}),e.jsx("div",{className:"flex justify-center mb-6 sm:mb-8",children:e.jsxs("button",{onClick:l,disabled:o,className:"flex items-center gap-2 px-4 sm:px-6 py-2 sm:py-3 bg-black/50 border border-cyan-500/50 rounded-lg text-[#8B5CF6] font-mono text-sm sm:text-base hover:border-[#DDD6FE] hover:bg-cyan-500/10 transition-all disabled:opacity-50",children:[e.jsx(w,{size:16,className:o?"animate-spin":""}),o?"LOADING...":"REFRESH"]})}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 sm:gap-4 mb-6 sm:mb-8",children:[e.jsxs("div",{className:"bg-black/50 rounded-lg p-2 sm:p-4 border border-cyan-500/30 text-center",children:[e.jsx("div",{className:"text-lg sm:text-2xl font-semibold text-[#8B5CF6] font-mono",children:r.length}),e.jsx("div",{className:"text-[10px] sm:text-xs font-mono text-zinc-500",children:"ENTRIES"})]}),e.jsxs("div",{className:"bg-black/50 rounded-lg p-2 sm:p-4 border border-pink-500/30 text-center",children:[e.jsx("div",{className:"text-lg sm:text-2xl font-semibold text-pink-400 font-mono",children:((p=r[0])==null?void 0:p.score)||0}),e.jsx("div",{className:"text-[10px] sm:text-xs font-mono text-zinc-500",children:"HIGH"})]}),e.jsxs("div",{className:"bg-black/50 rounded-lg p-2 sm:p-4 border border-yellow-500/30 text-center",children:[e.jsx("div",{className:"text-lg sm:text-2xl font-semibold text-yellow-400 font-mono",children:r.length>0?Math.round(r.reduce((t,s)=>t+s.score,0)/r.length):0}),e.jsx("div",{className:"text-[10px] sm:text-xs font-mono text-zinc-500",children:"AVG"})]})]}),e.jsxs("div",{className:"relative rounded-lg shadow-lg shadow-cyan-500/20",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-cyan-500 via-pink-500 to-cyan-500 rounded-lg blur opacity-50"}),e.jsxs("div",{className:"relative bg-[#18181B] rounded-lg p-3 sm:p-6 border border-cyan-500/30",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-2 sm:gap-4 mb-4 pb-4 border-b border-cyan-500/30",children:[e.jsx("div",{className:"col-span-2 sm:col-span-1 text-[10px] sm:text-xs font-mono text-[#8B5CF6] font-bold",children:"#"}),e.jsx("div",{className:"col-span-5 sm:col-span-5 text-[10px] sm:text-xs font-mono text-[#8B5CF6] font-bold",children:"PLAYER"}),e.jsx("div",{className:"col-span-2 sm:col-span-3 text-[10px] sm:text-xs font-mono text-[#8B5CF6] font-bold text-center",children:"SCORE"}),e.jsx("div",{className:"col-span-3 text-[10px] sm:text-xs font-mono text-[#8B5CF6] font-bold text-right hidden sm:block",children:"DATE"})]}),h?e.jsxs("div",{className:"text-center py-16",children:[e.jsxs("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-lg mb-4 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500 to-pink-500 rounded-lg animate-spin"}),e.jsx("div",{className:"absolute inset-1 bg-black rounded-lg"}),e.jsx(c,{className:"relative text-[#8B5CF6] animate-pulse",size:32})]}),e.jsx("p",{className:"text-[#8B5CF6] font-mono animate-pulse",children:"> LOADING_DATA..."})]}):m?e.jsxs("div",{className:"text-center py-16",children:[e.jsxs("p",{className:"text-red-400 font-mono",children:["> ERROR: ",m]}
31),e.jsx("button",{onClick:l,className:"mt-4 px-6 py-2 bg-cyan-500/20 border border-cyan-500 rounded text-[#8B5CF6] font-mono hover:bg-cyan-500/30 transition-all",children:"RETRY"})]}):r.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"text-6xl mb-4",children:"ð»"}),e.jsx("p",{className:"text-zinc-400 font-mono mb-4",children:"> NO_ENTRIES_FOUND"}),e.jsx(i,{to:"/affiliate-knowledge-quiz",className:"inline-block px-6 py-3 bg-gradient-to-r from-cyan-500 to-pink-500 text-white font-mono font-bold rounded-lg hover:from-cyan-400 hover:to-pink-400 transition-all",children:"BE THE FIRST CHAMPION"})]}):e.jsx("div",{className:"space-y-2",children:r.map((t,s)=>e.jsxs("div",{className:`grid grid-cols-12 gap-2 sm:gap-4 items-center p-2 sm:p-4 rounded-lg border transition-all ${y(s)}`,children:[e.jsx("div",{className:"col-span-2 sm:col-span-1 flex items-center justify-center",children:g(s)}),e.jsx("div",{className:"col-span-5 overflow-hidden",children:e.jsxs("span",{className:`font-mono font-bold text-sm sm:text-lg truncate block ${s===0?"text-yellow-400":s===1?"text-zinc-300":s===2?"text-amber-500":"text-white"}`,children:[s===0&&e.jsx("span",{className:"mr-1 sm:mr-2",children:"ð"}),t.username]})}),e.jsx("div",{className:"col-span-5 sm:col-span-3 text-center",children:e.jsx("span",{className:`font-mono font-semibold text-xl sm:text-2xl ${s===0?"text-yellow-400":s===1?"text-zinc-300":s===2?"text-amber-500":"text-pink-400"}`,style:s<3?{textShadow:"0 0 10px currentColor"}:{},children:t.score})}),e.jsx("div",{className:"col-span-3 text-right hidden sm:block",children:e.jsx("span",{className:"text-zinc-500 font-mono text-sm",children:u(t.created_at||t.date)})})]},`${t.username}-${t.created_at}-${s}`))})]})]}),e.jsxs("div",{className:"mt-8 sm:mt-12 text-center",children:[e.jsxs(i,{to:"/affiliate-knowledge-quiz",className:"relative inline-block group",children:[e.jsx("div",{className:"absolute -inset-1 bg-gradient-to-r from-cyan-500 via-pink-500 to-cyan-500 rounded-xl blur opacity-50 group-hover:opacity-100 transition-opacity"}),e.jsxs("span",{className:"relative block px-6 sm:px-12 py-4 sm:py-6 bg-gradient-to-r from-cyan-500 to-pink-500 text-white font-mono font-semibold text-base sm:text-xl md:text-2xl rounded-xl transform group-hover:scale-105 transition-all border-2 border-white",children:[e.jsx(c,{className:"inline mr-2 w-5 h-5 sm:w-6 sm:h-6"}),e.jsx("span",{className:"hidden sm:inline",children:"PLAY NOW & CLAIM YOUR SPOT"}),e.jsx("span",{className:"sm:hidden",children:"PLAY_NOW"}),e.jsx(c,{className:"inline ml-2 w-5 h-5 sm:w-6 sm:h-6"})]})]}),e.jsx("p",{className:"text-zinc-500 font-mono text-xs sm:text-sm mt-4",children:"[112 BRANDS] ⢠[5 LIVES] ⢠[GLORY]"})]})]}),e.jsx("div",{className:"bg-black/90 py-4 border-t border-cyan-500/20 relative z-10",children:e.jsx("div",{className:"text-center",children:e.jsxs("p",{className:"text-zinc-600 font-mono text-xs",children:["</> built with ",e.jsx("span",{className:"text-pink-500",children:"Hi"}),e.jsx("span",{className:"text-[#8B5CF6]",children:"Energy"}),".ai"]})})})]})]})}export{F 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.