import{c as K,j as e,o as le,m as oe,r as n,S as p,L as H,A as h}from"./index-XAQEFxR0.js";import{P as ie}from"./PublicNav-BtOZ2-Xr.js";import{F as ne}from"./Footer-BWuDGipe.js";import{S as de}from"./SEO-BWgzAOui.js";import{bL as ce,bM as xe,bN as pe,bO as me,bP as he,bQ as be}from"./RadarChart-DpMY-pSW.js";import{m as a}from"./proxy-C_GZZbVv.js";import{C as E}from"./calendar-BvkO_kGD.js";import{T as ge}from"./trophy-Cnk5jCR7.js";import{E as V}from"./external-link-Cdm4wqGT.js";import{A as B}from"./activity-DJNZk-yp.js";import{Z as G}from"./zap-CJLpCXio.js";import{S as ue}from"./star-DOmKOXKc.js";import{T as Y}from"./target-DtlTPIrP.js";import{C as U}from"./cpu-DcQERwFD.js";import{A as b}from"./award-C8G88Zaq.js";import{C as W}from"./circle-check-BRk-jZt-.js";import"./arrow-right-BBWeihko.js";import"./lock-riYib5_N.js";import"./mail-C4YbZpAk.js";/**
 * @license lucide-react v0.561.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],ve=K("file-check",fe);/**
 * @license lucide-react v0.561.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const we=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],q=K("flame",we),ye=({data:l})=>{if(!l||l.length===0)return null;const g=l.map(r=>({subject:r.skill_name||r.subject,A:r.level||r.value,fullMark:100}));return e.jsx("div",{className:"w-full h-[300px] flex items-center justify-center",children:e.jsx(ce,{width:"100%",height:"100%",children:e.jsxs(xe,{cx:"50%",cy:"50%",outerRadius:"65%",data:g,margin:{top:10,right:30,bottom:10,left:30},children:[e.jsx(pe,{stroke:"#333",strokeDasharray:"3 3"}),e.jsx(me,{dataKey:"subject",tick:{fill:"#94a3b8",fontSize:10,fontWeight:"bold"}}),e.jsx(he,{name:"Skills",dataKey:"A",stroke:"#06b6d4",fill:"#06b6d4",fillOpacity:.3,dot:{r:4,fill:"#06b6d4"}})]})})})},Ve=()=>{var v,w,y,j,N,_,k,S,L,D,A,$,z,C,P,I,R,T,M;const{username:l}=le();(v=oe().state)==null||v.initialProfile;const[r,X]=n.useState(null),[Z,d]=n.useState(!0),[J,u]=n.useState(null),[o,f]=n.useState(null);n.useEffect(()=>{l&&(async()=>{d(!0);try{const s=await fetch(`${h}/api/profile/public/${l}`);if(s.ok){const x=await s.json();X(x),d(!1)}else u("Target user information not available."),d(!1)}catch(s){console.error("Error fetching public profile:",s),u("A secure connection to the grid could not be established."),d(!1)}})()},[l]);const Q=t=>t<21?{title:"Novice Analyst",color:"from-gray-400 to-gray-600",text:"text-gray-300",shadow:"shadow-gray-500/20"}:t<50?{title:"SOC Tier 1",color:"from-green-400 to-emerald-600",text:"text-green-400",shadow:"shadow-green-500/20"}:t<100?{title:"SOC Tier 2",color:"from-purple-400 to-indigo-600",text:"text-purple-400",shadow:"shadow-purple-500/30"}:t<200?{title:"Senior Analyst",color:"from-yellow-400 to-orange-500",text:"text-yellow-400",shadow:"shadow-yellow-500/30"}:{title:"SOC Manager",color:"from-red-500 to-rose-700",text:"text-red-400",shadow:"shadow-red-500/30"},ee=t=>{switch(t){case"gold":return"bg-gradient-to-br from-yellow-500/10 to-orange-600/10 border-yellow-500/40 text-yellow-500 hover:border-yellow-400 hover:shadow-[0_0_30px_rgba(234,179,8,0.3)] filter";case"silver":return"bg-gradient-to-br from-slate-300/10 to-slate-500/10 border-slate-400/40 text-slate-300 hover:border-slate-300 hover:shadow-[0_0_30px_rgba(148,163,184,0.3)] filter";case"bronze":return"bg-gradient-to-br from-orange-400/10 to-orange-700/10 border-orange-500/40 text-orange-500 hover:border-orange-400 hover:shadow-[0_0_30px_rgba(249,115,22,0.3)] filter";default:return"bg-gradient-to-br from-purple-500/10 to-indigo-600/10 border-purple-500/40 text-purple-400 hover:border-purple-400 hover:shadow-[0_0_30px_rgba(168,85,247,0.3)] filter"}};if(Z)return e.jsxs("div",{className:"min-h-screen bg-[#0f1115] flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-900/10 via-[#0f1115] to-[#0f1115]"}),e.jsxs(a.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"relative z-10 flex flex-col items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-cyan-500/30 border-t-cyan-400 rounded-full animate-spin shadow-[0_0_30px_rgba(34,211,238,0.3)] filter drop-shadow-[0_0_10px_rgba(34,211,238,0.8)]"}),e.jsx("div",{className:"text-cyan-400 font-mono tracking-widest text-sm animate-pulse",children:"DECRYPTING PROFILE..."})]})]});if(J||!r)return e.jsx("div",{className:"min-h-screen bg-[#0f1115] flex flex-col items-center justify-center text-center p-4",children:e.jsxs(a.div,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5},children:[e.jsx(p,{className:"w-24 h-24 text-gray-800 mb-6 drop-shadow-xl"}),e.jsx("h1",{className:"text-3xl font-black text-white mb-2 tracking-tight",children:"Target Not Found"}),e.jsxs("p",{className:"text-gray-500 mb-8 max-w-md",children:["The user @",l," has gone dark or does not exist on our network."]}),e.jsx(H,{to:"/leaderboard",className:"px-8 py-3 bg-cyan-600 hover:bg-cyan-500 text-white font-bold rounded-xl transition-all shadow-[0_0_20px_rgba(8,145,178,0.4)] hover:shadow-[0_0_30px_rgba(34,211,238,0.6)]",children:"Return to Leaderboard"})]})});const c=Q(((w=r.stats)==null?void 0:w.level)||1),te=t=>{var s;return((s=r.recent_activity)==null?void 0:s.filter(x=>{const i=new Date(x.date);return i.getDate()===t.getDate()&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}))||[]};return e.jsxs("div",{className:"min-h-screen bg-[#0f1115] font-sans text-gray-300 flex flex-col overflow-x-hidden selection:bg-cyan-500/30 selection:text-cyan-100 relative",children:[r&&e.jsx(de,{title:`${r.username} | Global Rank #${((y=r.stats)==null?void 0:y.rank)||"-"}`,description:`Check out ${r.username}'s cybersecurity profile on InfoSecLabs. Level ${((j=r.stats)==null?void 0:j.level)||1} Analyst with ${((N=r.badges)==null?void 0:N.length)||0} badges.`,image:r.profile_picture?`${h}${r.profile_picture}`:void 0,type:"profile"}),e.jsx(ie,{}),e.jsxs("main",{className:"flex-grow relative z-10",children:[e.jsxs("div",{className:"fixed inset-0 pointer-events-none",children:[e.jsx("div",{className:"absolute top-[-10%] right-[-5%] w-[600px] h-[600px] bg-purple-600/10 rounded-full blur-[150px] mix-blend-screen"}),e.jsx("div",{className:"absolute bottom-[-10%] left-[-5%] w-[600px] h-[600px] bg-cyan-600/10 rounded-full blur-[150px] mix-blend-screen"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full bg-[linear-gradient(rgba(255,255,255,0.02)_1px,transparent_1px)] bg-[size:40px_40px] opacity-20"})]}),e.jsx(a.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-12 pb-12 relative",children:e.jsxs("div",{className:"relative rounded-[2rem] overflow-hidden border-t border-l border-white/20 shadow-[0_8px_32px_0_rgba(0,0,0,0.5)] bg-black/40 backdrop-blur-3xl group min-h-[300px] flex flex-col justify-center",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-r opacity-40 mix-blend-overlay ${(((_=r==null?void 0:r.stats)==null?void 0:_.xp)||0)<1e3?"from-cyan-900 via-slate-900 to-emerald-900":(((k=r==null?void 0:r.stats)==null?void 0:k.xp)||0)<5e3?"from-indigo-900 via-purple-900 to-fuchsia-900":"from-amber-900 via-orange-900 to-red-900"}`}),e.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-20 mix-blend-overlay pointer-events-none"}),e.jsx(a.div,{animate:{scale:[1,1.1,1],opacity:[.3,.5,.3]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute -bottom-32 -right-32 w-96 h-96 bg-cyan-500/30 rounded-full blur-[100px] mix-blend-screen"}),e.jsx(a.div,{animate:{scale:[1,1.2,1],opacity:[.2,.4,.2]},transition:{duration:10,repeat:1/0,ease:"easeInOut",delay:1},className:"absolute -top-32 -left-32 w-96 h-96 bg-purple-500/30 rounded-full blur-[100px] mix-blend-screen"}),e.jsx("div",{className:"relative z-20 px-8 md:px-16 py-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-10",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsxs(a.div,{whileHover:{scale:1.05,rotate:0},className:"w-40 h-40 md:w-48 md:h-48 rounded-[2rem] -rotate-3 transition-transform duration-500 border border-white/20 bg-black/60 backdrop-blur-md overflow-hidden shadow-[0_0_40px_rgba(6,182,212,0.3)] hover:shadow-[0_0_60px_rgba(168,85,247,0.5)] hover:rotate-0 relative z-10 box-border",children:[r.profile_picture?e.jsx("img",{src:`${h}${r.profile_picture}`,alt:r.username,className:"w-full h-full object-cover"}):e.jsx("div",{className:`w-full h-full flex items-center justify-center text-7xl font-black text-white bg-gradient-to-br ${c.color}`,children:r.username[0].toUpperCase()}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0f1115]/80 via-transparent to-transparent pointer-events-none"})]}),e.jsx("div",{className:"absolute -bottom-3 -right-3 md:bottom-2 md:right-2 z-20 bg-[#151619] rounded-xl p-3 border border-gray-700 shadow-xl",children:e.jsx(p,{className:"w-7 h-7 text-cyan-400 fill-cyan-400/20 animate-pulse"})}),e.jsxs("div",{className:"absolute -top-4 -left-4 z-20 bg-gradient-to-r from-purple-600 to-indigo-600 rounded-xl px-4 py-1.5 text-sm font-black text-white shadow-xl border border-white/20 -rotate-6",children:["LVL ",(S=r.stats)==null?void 0:S.level]})]}),e.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-4 mb-4",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-black text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-400 tracking-tight drop-shadow-xl inline-block",children:r.username}),e.jsx("span",{className:`self-center md:self-auto px-5 py-2 rounded-full text-sm font-black tracking-widest uppercase border bg-black/40 backdrop-blur-md ${c.text} border-current shadow-lg ${c.shadow}`,children:c.title})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-x-6 gap-y-3 text-gray-300 font-medium text-sm mb-8",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-[#0f1115]/60 border border-white/5 backdrop-blur-sm",children:[e.jsx(E,{className:"w-4 h-4 text-purple-400"}),e.jsxs("span",{children:["Joined ",new Date(r.created_at).toLocaleDateString(void 0,{month:"short",year:"numeric"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-yellow-500/10 border border-yellow-500/20 text-yellow-500 backdrop-blur-sm shadow-[0_0_15px_rgba(234,179,8,0.1)]",children:[e.jsx(ge,{className:"w-4 h-4"}),e.jsxs("span",{className:"font-bold tracking-wide",children:["Global Rank #",(L=r.stats)==null?void 0:L.rank]})]})]}),e.jsxs("div",{className:"flex items-center justify-center md:justify-start gap-4",children:[e.jsxs(a.a,{whileHover:{scale:1.05},whileTap:{scale:.95},href:`https://twitter.com/intent/tweet?text=Check out my InfoSecLabs profile!&url=${window.location.href}`,target:"_blank",rel:"noopener noreferrer",className:"relative px-6 py-3 bg-gradient-to-r from-[#1DA1F2] to-blue-500 hover:from-[#1a91da] hover:to-blue-600 text-white rounded-xl font-bold text-sm shadow-lg shadow-[#1DA1F2]/30 overflow-hidden flex items-center gap-2 border border-white/10",children:[e.jsx(be,{className:"w-4 h-4"})," Share"]}),e.jsxs(a.a,{whileHover:{scale:1.05},whileTap:{scale:.95},href:`https://www.linkedin.com/sharing/share-offsite/?url=${window.location.href}`,target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 bg-[#0f1115] hover:bg-gray-800 border border-white/10 text-white rounded-xl font-bold text-sm shadow-lg flex items-center gap-2",children:[e.jsx(V,{className:"w-4 h-4"})," LinkedIn"]})]})]})]})})]})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-20",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-8",children:[e.jsxs(a.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6,delay:.2},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative overflow-hidden group transition-all duration-500",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-cyan-500/10 rounded-bl-full -mr-8 -mt-8 transition-transform duration-700 group-hover:scale-[1.5]"}),e.jsxs("h3",{className:"text-xl font-bold text-white mb-6 flex items-center gap-3 relative z-10",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-cyan-500/20 to-blue-600/20 border border-cyan-500/30 rounded-xl shadow-[0_0_15px_rgba(6,182,212,0.2)]",children:e.jsx(B,{className:"w-5 h-5 text-cyan-400"})}),"Performance Matrix"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 relative z-10",children:[e.jsxs(a.div,{whileHover:{y:-2},className:"bg-[#0f1115] p-5 rounded-2xl border border-white/5 hover:border-cyan-500/50 transition-colors group/stat shadow-inner",children:[e.jsxs("div",{className:"text-gray-500 text-[10px] font-bold uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[e.jsx(G,{className:"w-3 h-3 text-cyan-500"})," Total XP"]}),e.jsx("div",{className:"text-3xl font-black text-white group-hover/stat:text-cyan-400 transition-colors tracking-tighter",children:(A=(D=r.stats)==null?void 0:D.xp)==null?void 0:A.toLocaleString()})]}),e.jsxs(a.div,{whileHover:{y:-2},className:"bg-[#0f1115] p-5 rounded-2xl border border-white/5 hover:border-purple-500/50 transition-colors group/stat shadow-inner",children:[e.jsxs("div",{className:"text-gray-500 text-[10px] font-bold uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[e.jsx(ue,{className:"w-3 h-3 text-purple-500"})," Level"]}),e.jsx("div",{className:"text-3xl font-black text-white group-hover/stat:text-purple-400 transition-colors tracking-tighter",children:($=r.stats)==null?void 0:$.level})]}),e.jsxs(a.div,{whileHover:{y:-2},className:"bg-[#0f1115] p-5 rounded-2xl border border-white/5 hover:border-orange-500/50 transition-colors group/stat shadow-inner",children:[e.jsxs("div",{className:"text-gray-500 text-[10px] font-bold uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[e.jsx(q,{className:"w-3 h-3 text-orange-500"})," Streak"]}),e.jsxs("div",{className:"text-3xl font-black text-orange-500 flex items-center gap-1 tracking-tighter",children:[(z=r.stats)==null?void 0:z.streak,e.jsx(q,{className:"w-5 h-5 fill-orange-500 animate-[pulse_2s_ease-in-out_infinite]"})]})]}),e.jsxs(a.div,{whileHover:{y:-2},className:"bg-[#0f1115] p-5 rounded-2xl border border-white/5 hover:border-green-500/50 transition-colors group/stat shadow-inner",children:[e.jsxs("div",{className:"text-gray-500 text-[10px] font-bold uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[e.jsx(Y,{className:"w-3 h-3 text-green-500"})," Flags"]}),e.jsx("div",{className:"text-3xl font-black text-white group-hover/stat:text-green-400 transition-colors tracking-tighter",children:(C=r.stats)==null?void 0:C.total_flags})]})]})]}),e.jsxs(a.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6,delay:.3},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative overflow-hidden group transition-all duration-500",children:[e.jsx("div",{className:"absolute top-0 left-0 w-32 h-32 bg-purple-500/10 rounded-br-full -ml-8 -mt-8 transition-transform duration-700 group-hover:scale-[1.5]"}),e.jsxs("h3",{className:"text-xl font-bold text-white mb-6 flex items-center gap-3 relative z-10",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-purple-500/20 to-indigo-600/20 border border-purple-500/30 rounded-xl shadow-[0_0_15px_rgba(168,85,247,0.2)]",children:e.jsx(U,{className:"w-5 h-5 text-purple-400"})}),"Skill Assessment"]}),e.jsx("div",{className:"relative z-10",children:r.skills&&r.skills.length>0?e.jsx(ye,{data:r.skills}):e.jsxs("div",{className:"text-center py-10",children:[e.jsx("div",{className:"text-gray-500 text-sm italic mb-4",children:"Awaiting field assessment..."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["SOC","DFIR","Malware","Cloud","Network","OSINT"].map(t=>e.jsx("div",{className:"px-3 py-1.5 bg-[#0f1115] border border-white/5 rounded-lg text-[10px] text-gray-500 font-bold uppercase tracking-wider",children:t},t))})]})})]}),e.jsxs(a.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6,delay:.4},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative transition-all duration-500",children:[e.jsxs("h3",{className:"text-xl font-bold text-white mb-8 flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-purple-500/20 to-pink-600/20 border border-purple-500/30 rounded-xl shadow-[0_0_15px_rgba(168,85,247,0.2)]",children:e.jsx(B,{className:"w-5 h-5 text-purple-400"})}),"Live Operations Feed"]}),e.jsxs("div",{className:"space-y-6 relative max-h-[600px] overflow-y-auto px-4 pt-4 pb-8 custom-scrollbar",children:[e.jsx("style",{children:`
                                        .custom-scrollbar::-webkit-scrollbar { width: 4px; height: 4px; }
                                        .custom-scrollbar::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); borderRadius: 10px; }
                                        .custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.5); borderRadius: 10px; }
                                        .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.8); }
                                    `}),e.jsx("div",{className:"absolute left-[35px] top-8 bottom-8 w-[2px] bg-gradient-to-b from-purple-500/50 via-cyan-500/20 to-transparent"}),((P=r.recent_activity)==null?void 0:P.length)>0?r.recent_activity.map((t,s)=>e.jsxs(a.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5+s*.1},className:"relative pl-14 group",children:[e.jsx("div",{className:`absolute left-0 top-3 w-10 h-10 rounded-full flex items-center justify-center z-10 transition-transform duration-300 group-hover:scale-110 group-hover:rotate-12 ${t.type==="flag"?"bg-[#0f1115] border-[3px] border-cyan-500 text-cyan-400 shadow-[0_0_15px_rgba(6,182,212,0.5)]":t.type==="badge"?"bg-[#0f1115] border-[3px] border-yellow-500 text-yellow-400 shadow-[0_0_15px_rgba(234,179,8,0.5)]":"bg-[#0f1115] border-[3px] border-purple-500 text-purple-400 shadow-[0_0_15px_rgba(168,85,247,0.5)]"}`,children:t.type==="flag"?e.jsx(Y,{className:"w-4 h-4"}):t.type==="badge"?e.jsx(b,{className:"w-4 h-4"}):e.jsx(G,{className:"w-4 h-4"})}),e.jsxs("div",{className:"bg-[#0f1115]/80 p-5 rounded-2xl border border-white/5 group-hover:border-white/20 transition-all duration-300 hover:shadow-lg",children:[e.jsx("div",{className:"text-[15px] font-bold text-white mb-2 leading-snug group-hover:text-cyan-100 transition-colors",children:t.title}),e.jsxs("div",{className:"flex justify-between items-center text-xs font-mono",children:[e.jsx("span",{className:"text-gray-500",children:new Date(t.date).toLocaleDateString()}),t.xp>0&&e.jsxs("span",{className:"text-green-400 font-bold bg-green-400/10 border border-green-400/20 px-2.5 py-1 rounded-md",children:["+",t.xp," XP"]})]})]})]},s)):e.jsx("div",{className:"text-center text-gray-500 py-4 italic",children:"No recent activity detected."})]})]})]}),e.jsxs("div",{className:"lg:col-span-8 space-y-8",children:[e.jsxs(a.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative overflow-hidden transition-all duration-500",children:[e.jsx("div",{className:"absolute top-0 right-0 w-full h-full bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-[0.03] pointer-events-none mix-blend-overlay"}),e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center mb-10 gap-4 relative z-10",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-2xl font-bold text-white flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-yellow-400/20 to-orange-500/20 border border-yellow-500/30 rounded-xl shadow-[0_0_15px_rgba(234,179,8,0.2)]",children:e.jsx(b,{className:"w-6 h-6 text-yellow-500"})}),"Achievement Locker"]}),e.jsx("p",{className:"text-gray-400 text-sm mt-2 ml-16",children:"Badges earned through completing operations and challenges."})]}),e.jsxs("div",{className:"bg-[#0f1115] text-cyan-400 text-sm font-black px-6 py-2.5 rounded-xl border border-cyan-500/30 shadow-[0_0_15px_rgba(6,182,212,0.1)]",children:[((I=r.badges)==null?void 0:I.length)||0," Badges Unlocked"]})]}),((R=r.badges)==null?void 0:R.filter(t=>t.is_pinned).length)>0&&e.jsxs("div",{className:"mb-10 relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[e.jsx("div",{className:"h-[1px] flex-1 bg-gradient-to-r from-transparent via-yellow-500/50 to-transparent"}),e.jsx("div",{className:"px-4 py-1.5 bg-yellow-500/10 border border-yellow-500/20 rounded-lg text-[10px] font-black text-yellow-500 uppercase tracking-[0.2em]",children:"Pinned Showcase"}),e.jsx("div",{className:"h-[1px] flex-1 bg-gradient-to-r from-transparent via-yellow-500/50 to-transparent"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:r.badges.filter(t=>t.is_pinned).map((t,s)=>e.jsxs(a.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},whileHover:{scale:1.05,y:-5},className:`relative p-8 rounded-[2rem] border-2 bg-[#0f1115] overflow-hidden flex flex-col items-center text-center group/pinned ${t.type==="gold"?"border-yellow-500/30":t.type==="silver"?"border-slate-400/30":"border-orange-600/30"}`,children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white/[0.02] to-transparent pointer-events-none"}),e.jsx("div",{className:"text-6xl mb-6 filter drop-shadow-[0_0_15px_rgba(255,255,255,0.3)] group-hover/pinned:scale-110 group-hover/pinned:rotate-6 transition-transform duration-500",children:t.icon||"🎖️"}),e.jsx("div",{className:"font-black text-lg text-white mb-2 leading-tight",children:t.name}),e.jsxs("div",{className:`text-[10px] font-black uppercase tracking-widest px-3 py-1 rounded-full border mb-4 ${t.type==="gold"?"text-yellow-500 border-yellow-500/30 bg-yellow-500/10":t.type==="silver"?"text-slate-300 border-slate-400/30 bg-slate-400/10":"text-orange-500 border-orange-600/30 bg-orange-600/10"}`,children:[t.type," achievement"]})]},`pinned-${s}`))})]}),((T=r.badges)==null?void 0:T.length)>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-2 gap-5 relative z-10",children:r.badges.filter(t=>!t.is_pinned).map((t,s)=>e.jsx(a.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.4+s*.1},whileHover:{y:-5,scale:1.02},className:`group relative p-6 rounded-[1.5rem] border backdrop-blur-md overflow-hidden ${ee(t.type)} bg-[#0f1115]/50`,children:e.jsxs("div",{className:"flex items-start gap-5 relative z-10",children:[e.jsx("div",{className:"text-5xl filter drop-shadow-xl transform group-hover:scale-110 group-hover:rotate-6 transition-transform duration-500",children:t.icon||"🎖️"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-black text-xl text-white mb-1.5 tracking-tight group-hover:text-transparent group-hover:bg-clip-text group-hover:bg-gradient-to-r group-hover:from-white group-hover:to-gray-400 transition-all",children:t.name}),e.jsx("p",{className:"text-sm font-medium opacity-80 mb-4 leading-relaxed border-l-2 border-current pl-3",children:t.description}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[10px] font-black uppercase tracking-widest text-white/50 bg-black/40 px-3 py-1.5 rounded-lg border border-white/5",children:[e.jsx(E,{className:"w-3 h-3"})," ",new Date(t.awarded_at).toLocaleDateString()]})]})]})},s))}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-24 bg-[#0f1115]/50 rounded-[2rem] border border-white/5 border-dashed",children:[e.jsx("div",{className:"w-24 h-24 bg-[#151619] border border-white/10 shadow-inner rounded-full flex items-center justify-center mb-6",children:e.jsx(b,{className:"w-12 h-12 text-gray-600"})}),e.jsx("h4",{className:"text-white font-black text-xl mb-2 tracking-tight",children:"No Badges Yet"}),e.jsx("p",{className:"text-gray-500 text-sm max-w-sm text-center",children:"Complete investigations and academy courses to earn premium badges and populate this locker."})]})]}),e.jsxs(a.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative transition-all duration-500",children:[e.jsxs("div",{className:"flex justify-between items-center mb-8",children:[e.jsxs("h3",{className:"text-xl font-bold text-white flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-emerald-500/20 to-green-600/20 border border-emerald-500/30 rounded-xl shadow-[0_0_15px_rgba(16,185,129,0.2)]",children:e.jsx(U,{className:"w-5 h-5 text-emerald-400"})}),"Activity Heatmap"]}),e.jsx("div",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest bg-[#0f1115] border border-white/5 px-4 py-2 rounded-xl",children:"Last 6 Months"})]}),e.jsxs("div",{className:"w-full relative",children:[o&&e.jsxs(a.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"absolute -top-24 left-1/2 -translate-x-1/2 z-50 bg-[#0f1115] border border-emerald-500/30 p-4 rounded-2xl shadow-2xl min-w-[200px] backdrop-blur-xl",children:[e.jsx("div",{className:"text-xs font-black text-emerald-400 mb-1 leading-none uppercase tracking-widest",children:o.date.toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"})}),e.jsxs("div",{className:"text-white font-bold text-sm mb-2",children:[o.activities.length," ",o.activities.length===1?"Operation":"Operations"," Detected"]}),o.activities.length>0&&e.jsxs("div",{className:"space-y-1",children:[o.activities.slice(0,3).map((t,s)=>e.jsxs("div",{className:"text-[10px] text-gray-400 flex items-center gap-1.5 truncate",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500"}),t.title]},s)),o.activities.length>3&&e.jsxs("div",{className:"text-[9px] text-emerald-500/70 font-bold pl-2.5",children:["+",o.activities.length-3," more..."]})]})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-4 mask-linear-fade custom-scrollbar",children:Array.from({length:26}).map((t,s)=>e.jsx("div",{className:"grid grid-rows-7 gap-2",children:Array.from({length:7}).map((x,i)=>{const O=new Date,re=(25-s)*7+(6-i),m=new Date(O);m.setDate(O.getDate()-re);const F=te(m),ae=Math.min(F.length,4),se=["bg-white/5 border border-white/10","bg-emerald-900/40 border-emerald-900/50","bg-emerald-700/60 border-emerald-700/50","bg-emerald-500/80 border-emerald-500/50 shadow-[0_0_5px_rgba(16,185,129,0.3)]","bg-emerald-400 border-emerald-300 shadow-[0_0_10px_rgba(52,211,153,0.6)]"];return e.jsx(a.div,{onMouseEnter:()=>f({date:m,activities:F}),onMouseLeave:()=>f(null),whileHover:{scale:1.5,zIndex:10,borderRadius:"4px"},className:`w-4 h-4 rounded-[6px] border ${se[ae]} transition-all cursor-pointer`},i)})},s))})]}),e.jsxs("div",{className:"flex justify-end items-center gap-3 mt-6 text-xs font-bold text-gray-500 uppercase tracking-wider",children:[e.jsx("span",{children:"Less"}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("div",{className:"w-4 h-4 rounded-[6px] bg-white/5 border border-white/10"}),e.jsx("div",{className:"w-4 h-4 rounded-[6px] bg-emerald-900/40 border border-emerald-900/50"}),e.jsx("div",{className:"w-4 h-4 rounded-[6px] bg-emerald-700/60 border border-emerald-700/50"}),e.jsx("div",{className:"w-4 h-4 rounded-[6px] bg-emerald-500/80 border border-emerald-500/50 shadow-[0_0_5px_rgba(16,185,129,0.3)]"}),e.jsx("div",{className:"w-4 h-4 rounded-[6px] bg-emerald-400 border border-emerald-300 shadow-[0_0_10px_rgba(52,211,153,0.6)]"})]}),e.jsx("span",{children:"More"})]})]}),e.jsxs(a.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},className:"bg-black/40 backdrop-blur-3xl border border-white/10 hover:border-white/20 rounded-[2rem] p-8 shadow-[0_8px_32px_0_rgba(31,38,135,0.37)] relative overflow-hidden group transition-all duration-500",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-cyan-500/5 rounded-bl-full pointer-events-none"}),e.jsxs("div",{className:"flex justify-between items-center mb-8",children:[e.jsxs("h3",{className:"text-xl font-bold text-white flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-cyan-500/20 to-blue-600/20 border border-cyan-500/30 rounded-xl shadow-[0_0_15px_rgba(6,182,212,0.2)]",children:e.jsx(ve,{className:"w-5 h-5 text-cyan-400"})}),"Verified Certificates"]}),e.jsxs("div",{className:"text-[10px] font-black text-cyan-400 uppercase tracking-widest bg-cyan-500/10 border border-cyan-500/20 px-4 py-2 rounded-xl flex items-center gap-2",children:[e.jsx(W,{className:"w-3 h-3"})," Blockchain Verified"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 relative z-10",children:((M=r.certificates)==null?void 0:M.length)>0?r.certificates.map((t,s)=>e.jsxs(a.div,{whileHover:{y:-5,scale:1.02},className:"bg-[#0f1115] border border-white/5 hover:border-cyan-500/30 p-6 rounded-2xl flex flex-col gap-4 transition-all group/cert",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsx("div",{className:"p-3 bg-white/5 rounded-xl group-hover/cert:bg-cyan-500/10 transition-colors",children:e.jsx(p,{className:"w-8 h-8 text-gray-500 group-hover/cert:text-cyan-400"})}),e.jsxs("div",{className:"text-[10px] font-mono text-gray-600 bg-black/40 px-2.5 py-1 rounded-md border border-white/5 group-hover/cert:border-cyan-500/20 group-hover/cert:text-cyan-600 transition-colors",children:["ID: ",t.certificate_id]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-black text-lg mb-1 leading-tight group-hover/cert:text-cyan-100 transition-colors",children:t.title}),e.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold text-gray-500",children:[e.jsx("span",{children:"InfoSecLabs Academy"}),e.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-700"}),e.jsx("span",{children:new Date(t.completed_at).toLocaleDateString(void 0,{month:"short",year:"numeric"})})]})]}),e.jsxs("div",{className:"mt-2 pt-4 border-t border-white/5 flex items-center justify-between",children:[e.jsxs("div",{className:"text-[9px] font-black uppercase tracking-widest text-emerald-500 flex items-center gap-1",children:[e.jsx(W,{className:"w-3 h-3"})," Authenticated"]}),e.jsxs(H,{to:`/verify?id=${t.certificate_id}`,className:"flex items-center gap-1.5 text-[10px] font-bold text-cyan-400 hover:text-cyan-300 transition-colors uppercase tracking-widest",children:["Verify Credential ",e.jsx(V,{className:"w-3 h-3"})]})]})]},s)):e.jsxs("div",{className:"col-span-1 md:col-span-2 flex flex-col items-center justify-center py-12 bg-black/20 rounded-2xl border border-white/5 border-dashed",children:[e.jsx(p,{className:"w-12 h-12 text-gray-700 mb-4 opacity-20"}),e.jsx("p",{className:"text-gray-500 text-sm font-medium",children:"No verified certificates found on chain."})]})}),e.jsx("div",{className:"mt-8 text-center",children:e.jsx("p",{className:"text-gray-600 text-[10px] font-medium leading-relaxed max-w-lg mx-auto italic",children:"All certificates issued by InfoSecLabs Academy are cryptographically signed and can be verified via our public ledger."})})]})]})]})})]}),e.jsx(ne,{})]})};export{Ve as default};
