1import{f as k,r as f,t as C,j as e,e as O,E}from"./index-C3Qps0S4.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const M=k("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]),B=[{id:"bead",label:"Bead Plate"},{id:"bigroad",label:"Big Road"},{id:"bigeye",label:"Big Eye"},{id:"small",label:"Small Road"},{id:"cockroach",label:"Cockroach"}];function I(){const[t,x]=f.useState("bead"),[a,c]=f.useState(null),{data:o}=C.sessions.list.useQuery(),i=a??o?.[0]?.id??null,{data:m}=C.sessions.get.useQuery({id:i},{enabled:!!i}),l=m?.rounds??[];return e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:31",className:"space-y-4",children:[e.jsxs("h1",{"data-loc":"client/src/pages/RoadmapPage.tsx:32",className:"text-xl font-bold text-gold-gradient flex items-center gap-2",children:[e.jsx(M,{"data-loc":"client/src/pages/RoadmapPage.tsx:33",className:"w-5 h-5 text-orange-400"}),"Visual Roadmap"]}),e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:38",className:"glass-card rounded-xl p-3",children:e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:39",className:"relative",children:[e.jsxs("select",{"data-loc":"client/src/pages/RoadmapPage.tsx:40",className:"w-full bg-black/60 border border-red-500/20 rounded-lg px-3 py-2 text-sm text-white appearance-none",value:i??"",onChange:s=>c(s.target.value?Number(s.target.value):null),children:[e.jsx("option",{"data-loc":"client/src/pages/RoadmapPage.tsx:45",value:"",children:"à¹à¸¥à¸·à¸à¸à¹à¸à¸ªà¸à¸±à¸"}),o?.map(s=>e.jsxs("option",{"data-loc":"client/src/pages/RoadmapPage.tsx:47",value:s.id,children:[s.name," (",s.totalRounds," à¸à¸²)"]},s.id))]}),e.jsx(O,{"data-loc":"client/src/pages/RoadmapPage.tsx:52",className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"})]})}),e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:57",className:"flex gap-1 overflow-x-auto pb-1 scrollbar-hide",children:B.map(s=>e.jsx("button",{"data-loc":"client/src/pages/RoadmapPage.tsx:59",onClick:()=>x(s.id),className:`px-3 py-1.5 rounded-lg text-xs font-medium whitespace-nowrap transition-all ${t===s.id?"bg-gradient-to-r from-red-500 to-orange-500 text-white neon-glow-red":"bg-black/40 text-gray-400 border border-red-500/10"}`,children:s.label},s.id))}),e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:74",className:"glass-card-orange rounded-2xl p-3 min-h-[300px]",children:l.length===0?e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:76",className:"flex flex-col items-center justify-center h-[280px] text-gray-500",children:[e.jsx(E,{"data-loc":"client/src/pages/RoadmapPage.tsx:77",className:"w-8 h-8 mb-2 opacity-50"}),e.jsx("p",{"data-loc":"client/src/pages/RoadmapPage.tsx:78",className:"text-sm",children:"à¹à¸¥à¸·à¸à¸à¹à¸à¸ªà¸à¸±à¸à¹à¸à¸·à¹à¸à¸à¸¹ Roadmap"})]}):e.jsx(_,{"data-loc":"client/src/pages/RoadmapPage.tsx:81",view:t,rounds:l})}),e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:86",className:"flex items-center justify-center gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:87",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:88",className:"w-4 h-4 rounded-full bg-[#3B82F6]"}),e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:89",className:"text-xs text-gray-400",children:"Player"})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:91",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:92",className:"w-4 h-4 rounded-full bg-[#EF4444]"}),e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:93",className:"text-xs text-gray-400",children:"Banker"})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:95",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:96",className:"w-4 h-4 rounded-full bg-[#22C55E]"}),e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:97",className:"text-xs text-gray-400",children:"Tie"})]})]}),(t==="bigeye"||t==="small"||t==="cockroach")&&e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:103",className:"flex items-center justify-center gap-4 text-[10px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:104",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:105",className:"w-3 h-3 rounded-full bg-[#EF4444]"}),e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:106",className:"text-gray-400",children:"à¸à¸²à¸¡ (Follow)"})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:108",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:109",className:"w-3 h-3 rounded-full bg-[#3B82F6]"}),e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:110",className:"text-gray-400",children:"à¹à¸à¸ (Break)"})]})]})]})}function _({view:t,rounds:x}){const a=x.map(c=>c.result);switch(t){case"bead":return e.jsx(F,{"data-loc":"client/src/pages/RoadmapPage.tsx:123",results:a});case"bigroad":return e.jsx(T,{"data-loc":"client/src/pages/RoadmapPage.tsx:125",results:a});case"bigeye":return e.jsx(y,{"data-loc":"client/src/pages/RoadmapPage.tsx:127",results:a,type:"bigeye"});case"small":return e.jsx(y,{"data-loc":"client/src/pages/RoadmapPage.tsx:129",results:a,type:"small"});case"cockroach":return e.jsx(y,{"data-loc":"client/src/pages/RoadmapPage.tsx:131",results:a,type:"cockroach"});default:return null}}function F({results:t}){const a=f.useRef(null),c=Math.max(10,Math.ceil(t.length/6));return f.useEffect(()=>{a.current&&t.length>60&&(a.current.scrollLeft=a.current.scrollWidth)},[t.length]),e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:150",ref:a,className:"overflow-x-auto",children:e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:151",className:"grid gap-1",
6style:{gridTemplateColumns:`repeat(${c}, 1fr)`,gridTemplateRows:"repeat(6, 1fr)",minWidth:c>10?`${c*32}px`:void 0},children:Array.from({length:6*c}).map((o,i)=>{const m=Math.floor(i/6),l=i%6,s=m*6+l,r=t[s];return e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:167",className:"aspect-square flex items-center justify-center",style:{gridRow:l+1,gridColumn:m+1},children:r?e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:173",className:`w-full h-full max-w-[28px] max-h-[28px] rounded-full flex items-center justify-center text-[10px] font-bold text-white animate-token-enter ${r==="banker"?"bg-[#EF4444] shadow-[0_0_6px_rgba(239,68,68,0.5)]":r==="player"?"bg-[#3B82F6] shadow-[0_0_6px_rgba(59,130,246,0.5)]":"bg-[#22C55E] shadow-[0_0_6px_rgba(34,197,94,0.5)]"}`,children:r==="banker"?"B":r==="player"?"P":"T"}):e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:185",className:"w-full h-full max-w-[28px] max-h-[28px] rounded-full border border-white/5"})},i)})})})}function S(t){const x=[];let a=[],c=null;for(const o of t){if(o==="tie"){a.length>0&&a[a.length-1].tieCount++;continue}c===null?(a=[{result:o,tieCount:0}],c=o):o===c?a.push({result:o,tieCount:0}):(x.push(a),a=[{result:o,tieCount:0}],c=o)}return a.length>0&&x.push(a),x}function T({results:t}){const a=f.useRef(null),{grid:c,totalCols:o}=f.useMemo(()=>{const i=S(t),m={};let l=0,s=0;for(const u of i){let g=0,n=s;for(let d=0;d<u.length;d++){const b=`${g},${n}`;if(g<6&&!m[b]){if(m[b]=u[d],l=Math.max(l,n),d<u.length-1){const p=`${g+1},${n}`;g+1<6&&!m[p]?g++:(n++,l=Math.max(l,n))}}else n++,m[`${g},${n}`]=u[d],l=Math.max(l,n)}s=l+1}const r=Math.max(20,l+1),h=Array.from({length:6},()=>Array(r).fill(null));return Object.entries(m).forEach(([u,g])=>{const[n,d]=u.split(",").map(Number);n<6&&d<r&&(h[n][d]=g)}),{grid:h,totalCols:r}},[t]);return f.useEffect(()=>{a.current&&(a.current.scrollLeft=a.current.scrollWidth)},[t.length]),e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:305",ref:a,className:"overflow-x-auto",children:e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:306",className:"grid gap-0.5",style:{gridTemplateColumns:`repeat(${o}, minmax(22px, 1fr))`,gridTemplateRows:"repeat(6, 1fr)",minWidth:o>20?`${o*24}px`:void 0},children:c.map((i,m)=>i.map((l,s)=>e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:316",className:"aspect-square flex items-center justify-center relative",style:{gridRow:m+1,gridColumn:s+1},children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:323",className:`w-full h-full max-w-[20px] max-h-[20px] rounded-full border-2 ${l.result==="banker"?"border-[#EF4444]":"border-[#3B82F6]"}`}),l.tieCount>0&&e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:331",className:"absolute top-0 right-0 w-2.5 h-2.5 rounded-full bg-[#22C55E] flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/RoadmapPage.tsx:332",className:"text-[6px] text-white font-bold",children:l.tieCount})})]}):null},`${m}-${s}`)))})})}function y({results:t,type:x}){const c=f.useRef(null),o=x==="bigeye"?1:x==="small"?2:3,i=o+1,{grid:m,totalCols:l}=f.useMemo(()=>{const r=S(t),h=[];for(let p=i;p<r.length;p++){const N=r[p],P=p-o;if(P<0)continue;const w=r[P];for(let j=0;j<N.length;j++){if(p===i&&j===0){if(P>0){const R=r[P-1],v=w.length>=N.length?R&&R.length>=2:R&&R.length<2;h.push(v?"red":"blue")}continue}if(j===0){const R=r[p-1],v=p-1-o;if(v>=0){const W=r[v],$=R.length===W.length;h.push($?"red":"blue")}}else{const R=w.length>j;h.push(R?"red":"blue")}}}const u=Math.max(20,Math.ceil(h.length/6)+2),g=Array.from({length:6},()=>Array(u).fill(null));let n=0,d=0,b=null;for(const p of h)if(b===null)g[d][n]=p,b=p,d++;else if(p===b)if(d<6)g[d][n]=p,d++;else{if(n++,n>=u)break;g[d-1][n]=p}else{if(n++,d=0,n>=u)break;g[d][n]=p,b=p,d++}return{grid:g,totalCols:u}},[t,o,i]);f.useEffect(()=>{c.current&&(c.current.scrollLeft=c.current.scrollWidth)},[t.length]);const s=x==="bigeye"?14:x==="small"?12:10;return e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:458",ref:c,className:"overflow-x-auto",children:t.filter(r=>r!=="tie").length<i+2?e.jsxs("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:460",className:"flex flex-col items-center justify-center h-[200px] text-gray-500",children:[e.jsxs("p",{"data-loc":"client/src/pages/RoadmapPage.tsx:461",className:"text-sm",children:["à¸à¹à¸à¸à¸à¸²à¸£à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ ",i+2," à¸à¸² (à¹à¸¡à¹à¸à¸±à¸ Tie)"]}),e.jsxs("p",{"data-loc":"client/src/pages/RoadmapPage.tsx:462",className:"text-xs mt-1 text-gray-600",children:["à¹à¸à¸·à¹à¸à¹à¸ªà¸à¸ ",x==="bigeye"?"Big Eye Boy":x==="small"?"Small Road":"Cockroach Road"]})]}):e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:465",className:"grid gap-0.5",style:{gridTemplateColumns:`repeat(${l}, minmax(${s+6}px, 1fr))`,gridTemplateRows:"repeat(6, 1fr)",minWidth:l>20?`${l*(s+8)}px`:void 0},children:m.map((r,h)=>r.map((u,g)=>e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:475",className:"aspect-square flex items-center justify-center",style:{gridRow:h+1,gridColumn:g+1},children:u?e.jsx("div",{"data-loc":"client/src/pages/RoadmapPage.tsx:481",className:`rounded-full animate-token-enter ${u==="red"?"bg-[#EF4444] shadow-[0_0_4px_rgba(239,68,68,0.4)]":"bg-[#3B82F6] shadow-[0_0_4px_rgba(59,130,246,0.4)]"}`,style:{width:s,height:s}}):null},`${h}-${g}`)))})})}export{I 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.