PageSourceSearch

https://theffdynasty.com/assets/ExpertFFDashboardRookies-BvGj1Uz0.js

js theffdynasty.com collected 2026-10-08 06:06:01 UTC 56,920 bytes, 1 lines download raw bytes

1import{O as Rs,f as Ps,r as u,cz as Cs,ag as Ts,i as ie,aZ as $s,s as V,cD as Ds,bH as qs,cl as _t,j as t,S as Os,ai as Mt,aj as Et,aQ as De,aR as qe,aS as Oe,cd as Ls,bs as Bs,bt as It,al as zs,Z as Vs,am as Hs,C as Us,P as At,an as Ft,aP as St,cj as Rt,cA as Pt,cB as tt,cC as st,ar as Ct,aq as Tt,aN as Ks,a$ as $t,B as Ws,aw as Gs,ax as Qs,ay as Zs,az as Js,T as Dt,k as qt,as as Ot}from"./index-D6HMcao1.js";import{u as Xs}from"./RankingsViewModeContext-BjfsESjg.js";import{T as Ys,D as er}from"./DraftBoardView-Ct3nTmEE.js";import{H as tr,R as Lt}from"./HideWhenEmbedded-Dxv8YbDd.js";import{u as sr}from"./RankingsScopeContext-X5MAF8ZG.js";import{T as Bt,G as zt}from"./TenDayMovementIndicator-DcYAEopm.js";import{u as rr}from"./useAdpRankHistory-BeCftLHD.js";import{r as nr,c as ar}from"./fantasyScoring-ZOr14G32.js";import{c as or,a as ir}from"./adpTierBreaks-XWKKvBk3.js";import{L as Vt}from"./list-Bs3aUN0b.js";import{A as lr}from"./arrow-up-down-BbHk50zI.js";const _e=50;function jr(){const{format:O,setFormat:cr}=Rs();Ps();const te=sr(),Le=!!(te!=null&&te.hideInnerScopeToggle),[U,Be]=u.useState(["all"]),[rt,Me]=u.useState(_e),[Z,Ht]=u.useState(""),[ve,nt]=u.useState(!1),at=u.useRef(null),[Ut,Kt]=u.useState(0);u.useEffect(()=>{const e=at.current;if(!e)return;const s=()=>Kt(e.getBoundingClientRect().height);s();const r=new ResizeObserver(s);return r.observe(e),()=>r.disconnect()},[]);const[Wt,Gt]=u.useState(new Set),[Qt,Zt]=u.useState(new Set),[y,ze]=u.useState("expert"),[C,Jt]=u.useState(new Set),{isStreamMode:Xt}=Cs(),[Ee,Yt]=u.useState(!1),[J,fe]=Xs(["list","tier","board"],"list"),[re,es]=u.useState("expert"),[ot,it]=u.useState(!1),{openPlayerDetails:Ve}=Ts(),[ts,dr]=u.useState(new Map),ss=e=>ts.get(e)??"rookie",{data:T}=ie({queryKey:["rookie-player-ids"],queryFn:async()=>{const{data:e}=await V.from("players").select("player_id, position").or("years_exp.is.null,years_exp.eq.0").eq("status","Active").in("position",["QB","RB","WR","TE"]);return new Set((e==null?void 0:e.map(s=>s.player_id))||[])},staleTime:1e3*60*10}),{data:L,isLoading:rs}=$s(O,"all"),w=u.useMemo(()=>!L||!T?[]:L.filter(e=>T.has(e.playerId)),[L,T]),ns=u.useMemo(()=>w.map(e=>e.playerId).sort().join(","),[w]),{data:W}=ie({queryKey:["mrd-college-2025-prod",ns,O],enabled:w.length>0,staleTime:10*60*1e3,queryFn:async()=>{const e=new Map,s=w.map(p=>p.playerId),r=new Map,n=new Map;for(let p=0;p<s.length;p+=200){const l=s.slice(p,p+200),{data:x}=await V.from("players").select("player_id, position").in("player_id",l);x==null||x.forEach(k=>n.set(k.player_id,k.position??null))}for(let p=0;p<s.length;p+=200){const l=s.slice(p,p+200),{data:x}=await V.from("player_mappings").select("sleeper_id, college_espn_id").in("sleeper_id",l);x==null||x.forEach(k=>{k.college_espn_id&&r.set(k.sleeper_id,String(k.college_espn_id))})}
1const a=Array.from(new Set(r.values()));if(a.length===0)return e;const i=nr(O,null),h=[];for(let p=0;p<a.length;p+=200){const l=a.slice(p,p+200);let x=0;for(;;){const{data:k}=await V.from("espn_player_stats").select("espn_id, passing_yards, passing_tds, interceptions, rushing_yards, rushing_tds, receptions, receiving_yards, receiving_tds, fumbles").eq("season",2025).in("stat_type",["college_weekly","college_postseason"]).in("espn_id",l).range(x,x+999);if(!(k!=null&&k.length)||(h.push(...k),k.length<1e3))break;x+=1e3}}const v=new Map;h.forEach(p=>{const l=String(p.espn_id),x=v.get(l)||{total:0,games:0},k=ar({...p,fumbles_lost:p.fumbles},i,null);x.total+=k,x.games+=1,v.set(l,x)});const b=i.teReceptionBonus;return r.forEach((p,l)=>{const x=v.get(p);if(!x)return;let k=x.total;if(b&&(n.get(l)||"").toUpperCase()==="TE"){const f=h.filter(o=>String(o.espn_id)===p).reduce((o,d)=>o+Number(d.receptions||0),0);k+=f*b}const c=x.games>0?k/x.games:null;e.set(l,{total:k,ppg:c})}),e}}),{data:X,isLoading:as}=ie({queryKey:["master-rookie-overall-adp"],queryFn:async()=>{const{data:e}=await V.from("mock_drafts").select("id").eq("is_rookie_draft",!1);if(!e||e.length===0)return new Map;const s=e.map(l=>l.id),r=s.length;let n=[],a=0;const i=1e3;for(;;){const{data:l}=await V.from("mock_draft_picks").select("player_id, pick_number, mock_draft_id").in("mock_draft_id",s).range(a,a+i-1);if(!l||l.length===0||(n.push(...l),l.length<i))break;a+=i}const h=new Map,v=new Map,b=new Map;n.forEach(l=>{const x=b.get(l.mock_draft_id)||0;l.pick_number>x&&b.set(l.mock_draft_id,l.pick_number),h.has(l.player_id)||(h.set(l.player_id,[]),v.set(l.player_id,new Set)),h.get(l.player_id).push(l.pick_number),v.get(l.player_id).add(l.mock_draft_id)});const p=new Map;return h.forEach((l,x)=>{const k=v.get(x);let c=l.reduce((f,o)=>f+o,0);s.forEach(f=>{k.has(f)||(c+=(b.get(f)||0)+1)}),p.set(x,c/r)}),p},staleTime:1e3*60*5}),os="dynasty-sf-ppr-tep",{data:He,isLoading:is}=Ds(os),lt=(He==null?void 0:He.windows)??[],le=lt[0]??null,Y=lt[1]??null,_=u.useMemo(()=>{const e=new Map;return le&&le.entries.forEach(s=>e.set(s.player_id,s.avg_pick)),e},[le]),Ie=u.useMemo(()=>{const e=new Map;return Y&&Y.entries.forEach(s=>e.set(s.player_id,s.avg_pick)),e},[Y]),Ae=u.useMemo(()=>{const e=new Map;return Y&&Y.entries.forEach((s,r)=>e.set(s.player_id,r+1)),e},[Y]),{data:he,isLoading:ls}=ie({queryKey:["master-rookie-expert-consensus",O],queryFn:async()=>{const{data:e}=await V.from("user_roles").select("user_id").eq("role","expert"),s=(e==null?void 0:e.map(c=>c.user_id))||[];if(s.length===0)return{consensusMap:new Map,expertList:[],perExpertData:[]};const{data:r,error:n}=await V.from("expert_rankings").select("id, user_id, name, ranking_data, ranking_type, updated_at, display_limit").eq("format_id",O).eq("is_public",!0).eq("is_live",!0).eq("ranking_type","rookie").in("user_id",s).order("updated_at",{ascending:!1});if(n)throw n;if(!r||r.length===0)return{consensusMap:new Map,expertList:[],perExpertData:[]};const a=new Set,i=r.filter(c=>a.has(c.user_id)?!1:(a.add(c.user_id),!0)),h=[...new Set(i.map(c=>c.user_id))],{data:v}=await V.from("profiles_public").select("id, username, name, profile_picture_url").in("id",h),b=new Map;v==null||v.forEach(c=>b.set(c.id,c));const p=h.map(c=>{const f=b.get(c);return{id:c,name:(f==null?void 0:f.name)||(f==null?void 0:f.username)||"Expert",avatar:(f==null?void 0:f.profile_picture_url)||null}}),l=c=>{const f=[];if(c!=null&&c.tiers&&Array.isArray(c.tiers)){let o=0;c.tiers.forEach(d=>{(d.players||[]).forEach(g=>{o++;const N=g.player_id||g.playerId;N&&f.push({playerId:N,rank:o})})})}else if(c!=null&&c.items&&Array.isArray(c.items)){let o=0;c.items.forEach(d=>{if(d.type==="player"||d.player_id||d.playerId){o++;const g=d.player_id||d.playerId;g&&f.push({playerId:g,rank:o})}})}else c!=null&&c.players&&Array.isArray(c.players)?c.players.forEach((o,d)=>{const g=o.player_id||o.playerId;g&&f.push({playerId:g,rank:o.rank||d+1})}):Array.isArray(c)&&c.forEach((o,d)=>{const g=o.player_id||o.playerId;g&&f.push({playerId:g,rank:o.rank||d+1})});return f},x=i.map(c=>{var K,ae;
1const f=b.get(c.user_id),o=(f==null?void 0:f.name)||(f==null?void 0:f.username)||"Expert",d=(f==null?void 0:f.profile_picture_url)||null,g=l(c.ranking_data),N=typeof c.display_limit=="number"&&c.display_limit>0?c.display_limit:null,I=N?g.filter(F=>F.rank<=N):g,M=N?new Set(I.map(F=>F.playerId)):null;let $=[];if((K=c.ranking_data)!=null&&K.tiers&&Array.isArray(c.ranking_data.tiers))$=c.ranking_data.tiers.map((F,Q)=>({tierIndex:Q+1,playerIds:(F.players||[]).map(B=>B.player_id||B.playerId).filter(Boolean)}));else if((ae=c.ranking_data)!=null&&ae.items&&Array.isArray(c.ranking_data.items)){let F=0,Q=[];const B=()=>{F>0&&$.push({tierIndex:F,playerIds:Q})};c.ranking_data.items.forEach(E=>{if((E==null?void 0:E.type)==="tier")B(),F=typeof E.tier_number=="number"?E.tier_number:F+1,Q=[];else{const m=(E==null?void 0:E.player_id)||(E==null?void 0:E.playerId);m&&F>0&&Q.push(m)}}),B()}return M&&($=$.map(F=>({tierIndex:F.tierIndex,playerIds:F.playerIds.filter(Q=>M.has(Q))})).filter(F=>F.playerIds.length>0)),{userId:c.user_id,expertName:o,expertAvatar:d,players:I,tiers:$}});return{consensusMap:(c=>{const f=c.length;let o=0;
1c.forEach(M=>{M.players.length>o&&(o=M.players.length)});const d=new Map,g=new Map;c.forEach(M=>{M.players.forEach(({playerId:$,rank:K})=>{d.has($)||d.set($,[]),d.get($).push({expertId:M.userId,expertName:M.expertName,expertAvatar:M.expertAvatar,rank:K})}),M.tiers.forEach($=>{$.playerIds.forEach(K=>{g.has(K)||g.set(K,[]),g.get(K).push($.tierIndex)})})}),d.forEach(M=>{M.forEach($=>{$.rank>o&&(o=$.rank)})});const N=o+1,I=new Map;return d.forEach((M,$)=>{let K=M.reduce((B,E)=>B+E.rank,0);const ae=f-M.length;K+=ae*N;const F=g.get($),Q=F&&F.length>0?Math.round(F.reduce((B,E)=>B+E,0)/F.length):null;I.set($,{avgRank:K/f,experts:M,totalExperts:f,consensusTier:Q})}),I})(x),expertList:p,perExpertData:x}},staleTime:1e3*60*5}),Ue=u.useMemo(()=>{if(!he)return{consensusMap:new Map,tierBoundaries:[],activeExperts:0};const{perExpertData:e,consensusMap:s}=he,r=l=>{const x=new Map;l.forEach(c=>{let f=0;(Array.isArray(c==null?void 0:c.tiers)?c.tiers:[]).forEach(d=>{const g=Array.isArray(d==null?void 0:d.playerIds)?d.playerIds:[],N=typeof(d==null?void 0:d.tierIndex)=="number"?d.tierIndex:null;!N||g.length===0||(f+=g.length,x.has(N)||x.set(N,[]),x.get(N).push(f))})});const k=[];return x.forEach((c,f)=>{const o=c.reduce((d,g)=>d+g,0)/c.length;k.push({tierIndex:f,afterRank:Math.round(o)})}),k.sort((c,f)=>c.afterRank-f.afterRank)};if(C.size===0)return{consensusMap:s,tierBoundaries:r(e),activeExperts:e.length};const n=e.filter(l=>C.has(l.userId));if(n.length===0)return{consensusMap:new Map,tierBoundaries:[],activeExperts:0};const a=n.length;let i=0;n.forEach(l=>{l.players.length>i&&(i=l.players.length)});const h=new Map,v=new Map;n.forEach(l=>{l.players.forEach(({playerId:x,rank:k})=>{h.has(x)||h.set(x,[]),h.get(x).push({expertId:l.userId,expertName:l.expertName,expertAvatar:l.expertAvatar,rank:k})}),l.tiers.forEach(x=>{x.playerIds.forEach(k=>{v.has(k)||v.set(k,[]),v.get(k).push(x.tierIndex)})})}),h.forEach(l=>{l.forEach(x=>{x.rank>i&&(i=x.rank)})});const b=i+1,p=new Map;return h.forEach((l,x)=>{let k=l.reduce((o,d)=>o+d.rank,0);k+=(a-l.length)*b;const c=v.get(x),f=c&&c.length>0?Math.round(c.reduce((o,d)=>o+d,0)/c.length):null;p.set(x,{avgRank:k/a,experts:l,totalExperts:a,consensusTier:f})}),{consensusMap:p,tierBoundaries:r(n),activeExperts:a}},[he,C]),P=Ue.consensusMap,je=Ue.tierBoundaries,cs=Ue.activeExperts,ce=(he==null?void 0:he.expertList)||[],ds=u.useMemo(()=>{const e=["Casey","Chev","Jeremiah"];return[...ce].sort((s,r)=>{const n=e.indexOf(s.name),a=e.indexOf(r.name);return n!==-1&&a!==-1?n-a:n!==-1?-1:a!==-1?1:0})},[ce]),{data:q,isLoading:us}=ie({queryKey:["master-rookie-10day-score",O],queryFn:async()=>{const e=new Date;e.setDate(e.getDate()-10);const s=e.toISOString().split("T")[0],{data:r}=await V.from("crowdsourced_ranking_history").select("player_id, score, snapshot_date").eq("format_id",O).gte("snapshot_date",s).order("snapshot_date",{ascending:!0}).limit(1e3),n=new Map;return r==null||r.forEach(a=>{n.has(a.player_id)||n.set(a.player_id,a.score)}),n},staleTime:1e3*60*5}),Fe=u.useMemo(()=>{if(!L||L.length===0)return{minScore:0,maxScore:0};const e=L.map(s=>s.score);return{minScore:Math.min(...e),maxScore:Math.max(...e)}},[L]),ee=e=>{const{minScore:s,maxScore:r}=Fe;if(r===s)return"50.00";if(e>=r)return"100.00";const n=(e-s)/(r-s)*100;return Math.max(0,Math.min(99.99,n)).toFixed(2)};u.useMemo(()=>{if(!q||q.size===0)return null;const e=Array.from(q.values());return{minScore:Math.min(...e),maxScore:Math.max(...e)}},[q]),u.useMemo(()=>{if(!X||!w)return new Map;const e=new Map;w.forEach(n=>{n.position&&e.set(n.playerId,n.position)});const s={};
1X.forEach((n,a)=>{if(!(T!=null&&T.has(a)))return;const i=e.get(a)||"OTHER";s[i]||(s[i]=[]),s[i].push({playerId:a,avgPick:n})});const r=new Map;return Object.values(s).forEach(n=>{n.sort((a,i)=>a.avgPick-i.avgPick),n.forEach((a,i)=>r.set(a.playerId,i+1))}),r},[X,w,T]);const ps=u.useMemo(()=>{if(!_||!w)return new Map;const e=new Map;w.forEach(n=>{n.position&&e.set(n.playerId,n.position)});const s={};_.forEach((n,a)=>{if(!(T!=null&&T.has(a)))return;const i=e.get(a)||"OTHER";s[i]||(s[i]=[]),s[i].push({playerId:a,avgPick:n})});const r=new Map;return Object.values(s).forEach(n=>{n.sort((a,i)=>a.avgPick-i.avgPick),n.forEach((a,i)=>r.set(a.playerId,i+1))}),r},[_,w,T]),{data:de}=ie({queryKey:["mrd-rookie-live-expert-consensus",O],queryFn:async()=>{const{data:e,error:s}=await V.from("expert_rankings").select("user_id, updated_at, ranking_data, display_limit").eq("format_id",O).eq("ranking_type","rookie").eq("is_public",!0).eq("is_live",!0);if(s)throw s;const r=Array.from(new Set((e??[]).map(b=>b.user_id)));if(r.length===0)return new Map;const n=await Promise.all(r.map(async b=>{const[p,l]=await Promise.all([V.rpc("has_role",{_user_id:b,_role:"expert"}),V.rpc("has_role",{_user_id:b,_role:"admin"})]);return p.data===!0||l.data===!0})),a=new Set(r.filter((b,p)=>n[p]));if(a.size===0)return new Map;const i=new Map;for(const b of e??[]){if(!a.has(b.user_id))continue;const p=i.get(b.user_id);(!p||new Date(b.updated_at).getTime()>new Date(p.updated_at).getTime())&&i.set(b.user_id,b)}const h=new Map;i.forEach(b=>{var c;const p=(c=b==null?void 0:b.ranking_data)==null?void 0:c.items;if(!Array.isArray(p))return;const l=b==null?void 0:b.display_limit,x=typeof l=="number"&&l>0?l:null;let k=0;for(const f of p){if(!f||f.type!=="player")continue;if(k+=1,x!==null&&k>x)break;const o=String(f.player_id||f.playerId||"");if(!o)continue;const d=h.get(o)??{total:0,count:0};d.total+=k,d.count+=1,h.set(o,d)}});const v=new Map;return h.forEach(({total:b,count:p},l)=>{p>0&&v.set(l,b/p)}),v},staleTime:5*60*1e3,enabled:!!O}),H=u.useMemo(()=>{const e=new Map;return P&&Array.from(P.entries()).filter(([r])=>!qs(r)).sort((r,n)=>r[1].avgRank-n[1].avgRank).forEach(([r],n)=>e.set(r,n+1)),e},[P]),Se=u.useMemo(()=>{if(!w||!q)return new Map;const e=new Map;return w.forEach(s=>{const r=q.get(s.playerId);if(r!==void 0){const n=parseFloat(ee(s.score)),a=parseFloat(ee(r));e.set(s.playerId,n-a)}}),e},[w,q,Fe]),{data:ge}=ie({queryKey:["master-rookie-rank-movement-bulk",O],queryFn:async()=>{const e=new Date,s=new Date;s.setDate(s.getDate()-10);const{data:r,error:n}=await V.rpc("get_rookie_rank_movement_bulk",{p_format_id:O,p_start_date:s.toISOString(),p_end_date:e.toISOString()});if(n)throw n;const a=new Map;for(const i of r??[])a.set(i.player_id,{ovr:Number(i.first_rookie_rank)-Number(i.last_rookie_rank),pos:Number(i.first_pos_rookie_rank)-Number(i.last_pos_rookie_rank)});return a},enabled:!!O,staleTime:5*60*1e3}),ms=u.useMemo(()=>{const e=new Map;return ge&&ge.forEach((s,r)=>e.set(r,s.pos)),e},[ge]),Re=u.useMemo(()=>{const e=new Map;return w.length&&w.slice().sort((s,r)=>r.score-s.score).forEach((s,r)=>e.set(s.playerId,r+1)),e},[w]),xs=u.useMemo(()=>{const e=new Map;return ge&&ge.forEach((s,r)=>e.set(r,s.ovr)),e},[ge]),ye=u.useMemo(()=>{const e={};return w.forEach(s=>{s.position&&(e[s.playerId]=s.position)}),e},[w]),{data:be}=_t(O,!0,30),ct=u.useMemo(()=>{const e=new Map;return!be||H.size===0||be.forEach((s,r)=>{if(s.length<1)return;const n=s[0].rank,a=H.get(r);!Number.isFinite(n)||!Number.isFinite(a)||e.set(r,n-a)}),e},[be,H]),fs=u.useMemo(()=>{const e=new Map;return be&&be.forEach((s,r)=>{if(s.length===0)return;const n=s[0].avg,a=de==null?void 0:de.get(r),i=Number.isFinite(a)?a:s[s.length-1].avg;!Number.isFinite(n)||!Number.isFinite(i)||e.set(r,i-n)}),e},[be,de]),se=u.useMemo(()=>{const e=new Map;return!_||_.size===0||Array.from(_.entries()).filter(([r])=>T==null?void 0:T.has(r)).sort((r,n)=>r[1]-n[1]).forEach(([r],n)=>e.set(r,n+1)),e},[_,T]),hs=u.useMemo(()=>{const e=new Map;return!Ae||Ae.size===0||se.forEach((s,r)=>{const n=Ae.get(r);Number.isFinite(n)&&e.set(r,n-s)}),e},[se,Ae]),gs=u.useMemo(()=>{const e=new Map;return!Ie||Ie.size===0||_.forEach((s,r)=>{const n=Ie.get(r);!Number.isFinite(n)||!Number.isFinite(s)||e.set(r,s-n)}),e},[_,Ie]),dt=e=>{const s=new Map;if(!e||e.length===0)return s;const r={};return e.forEach(n=>{if(!(T!=null&&T.has(n.player_id)))return;const a=ye==null?void 0:ye[n.player_id];a&&(r[a]=(r[a]||0)+1,s.set(n.player_id,r[a]))}),s},ut=u.useMemo(()=>dt(le==null?void 0:le.entries),[le,T,ye]),Ke=u.useMemo(()=>dt(Y==null?void 0:Y.entries),[Y,T,ye]),ys=u.useMemo(()=>{const e=new Map;return Ke.size===0||ut.forEach((s,r)=>{const n=Ke.get(r);Number.isFinite(n)&&e.set(r,n-s)}),e},[ut,Ke]),pt=(e,s)=>{if(y==="expert"){const n=ct.get(e);return n??null}if(y==="rookie-adp"){const n=ys.get(e);return n??null}const r=ms.get(e);return r??null},mt=u.useMemo(()=>
1{if(!w.length)return{minScore:0,maxScore:0};const e=w.map(s=>s.score);return{minScore:Math.min(...e),maxScore:Math.max(...e)}},[w]),ue=u.useMemo(()=>{if(!w.length||!q)return null;const e=[];return w.forEach(s=>{const r=q.get(s.playerId);r!==void 0&&Number.isFinite(r)&&e.push(r)}),e.length?{minScore:Math.min(...e),maxScore:Math.max(...e)}:null},[w,q]),bs=e=>{const{minScore:s,maxScore:r}=mt;if(r===s)return"50.00";if(e>=r)return"100.00";const n=(e-s)/(r-s)*100;return Math.max(0,Math.min(99.99,n)).toFixed(2)};u.useMemo(()=>{const e=new Map;return!w.length||!q||!ue||w.forEach(s=>{const r=q.get(s.playerId);if(r===void 0)return;const n=parseFloat(bs(s.score)),a=ue.maxScore===ue.minScore?50:(r-ue.minScore)/(ue.maxScore-ue.minScore)*100;e.set(s.playerId,n-Math.max(0,Math.min(100,a)))}),e},[w,q,ue,mt]);const xt=u.useMemo(()=>{const e=new Map;if(!(L!=null&&L.length))return e;const s=new Map;return L.forEach(r=>{if(!r.position)return;const n=s.get(r.position)??[];n.push(r),s.set(r.position,n)}),s.forEach(r=>r.slice().sort((n,a)=>a.score-n.score).forEach((n,a)=>e.set(n.playerId,a+1))),e},[L]),ft=u.useMemo(()=>{const e=new Map;if(!(L!=null&&L.length)||!q)return e;const s=new Map;L.forEach(a=>{if(!a.position)return;const i=s.get(a.position)??[];i.push(a),s.set(a.position,i)});const r=new Map;s.forEach(a=>a.slice().sort((i,h)=>h.score-i.score).forEach((i,h)=>r.set(i.playerId,h+1)));const n=new Map;return L.forEach(a=>{if(!a.position)return;const i=q.get(a.playerId);if(i===void 0||!Number.isFinite(i))return;const h=n.get(a.position)??[];h.push({playerId:a.playerId,score:i}),n.set(a.position,h)}),n.forEach(a=>{a.slice().sort((i,h)=>h.score-i.score).forEach(({playerId:i},h)=>{const v=r.get(i);v!==void 0&&e.set(i,h+1-v)})}),e},[L,q]),{data:We}=rr(O,!1,ye,90),ks=u.useMemo(()=>{const e=new Map;return We&&We.forEach((s,r)=>{if(s.length<1)return;const n=s[0].adp,a=X==null?void 0:X.get(r),i=Number.isFinite(a)?a:s[s.length-1].adp;!Number.isFinite(n)||!Number.isFinite(i)||e.set(r,i-n)}),e},[We,X]),{data:Ge}=ie({queryKey:["master-rookie-overall-expert-consensus",O],queryFn:async()=>{const{data:e}=await V.from("user_roles").select("user_id").eq("role","expert"),s=(e==null?void 0:e.map(o=>o.user_id))||[];if(!s.length)return new Map;const{data:r}=await V.from("expert_rankings").select("id, user_id, ranking_data, ranking_type, updated_at, display_limit").eq("format_id",O).eq("is_public",!0).eq("is_live",!0).eq("ranking_type","player").in("user_id",s).order("updated_at",{ascending:!1});if(!(r!=null&&r.length))return new Map;const n=new Set,a=r.filter(o=>n.has(o.user_id)?!1:(n.add(o.user_id),!0)),i=[...new Set(a.map(o=>o.user_id))],{data:h}=await V.from("profiles_public").select("id, username, name, profile_picture_url").in("id",i),v=new Map;h==null||h.forEach(o=>v.set(o.id,o));const b=o=>{const d=[];if(o!=null&&o.tiers&&Array.isArray(o.tiers)){let g=0;o.tiers.forEach(N=>(N.players||[]).forEach(I=>{g++;const M=I.player_id||I.playerId;M&&d.push({playerId:M,rank:g})}))}else if(o!=null&&o.items&&Array.isArray(o.items)){let g=0;o.items.forEach(N=>{if(N.type==="player"||N.player_id||N.playerId){g++;const I=N.player_id||N.playerId;I&&d.push({playerId:I,rank:g})}})}else o!=null&&o.players&&Array.isArray(o.players)?o.players.forEach((g,N)=>{const I=g.player_id||g.playerId;I&&d.push({playerId:I,rank:g.rank||N+1})}):Array.isArray(o)&&o.forEach((g,N)=>{const I=g.player_id||g.playerId;I&&d.push({playerId:I,rank:g.rank||N+1})});return d},p=a.map(o=>{const d=v.get(o.user_id),g=b(o.ranking_data),N=typeof o.display_limit=="number"&&o.display_limit>0?o.display_limit:null,I=N?g.filter(M=>M.rank<=N):g;return{userId:o.user_id,expertName:(d==null?void 0:d.name)||(d==null?void 0:d.username)||"Expert",expertAvatar:(d==null?void 0:d.profile_picture_url)||null,players:I}}),l=p.length;let x=0;p.forEach(o=>{o.players.length>x&&(x=o.players.length)});const k=new Map;p.forEach(o=>o.players.forEach(({playerId:d,rank:g})=>{k.has(d)||k.set(d,[]),k.get(d).push({expertId:o.userId,expertName:o.expertName,expertAvatar:o.expertAvatar,rank:g})})),k.forEach(o=>o.forEach(d=>{d.rank>x&&(x=d.rank)}));const c=x+1,f=new Map;
1return k.forEach((o,d)=>{let g=o.reduce((N,I)=>N+I.rank,0);g+=(l-o.length)*c,f.set(d,{avgRank:g/l,experts:o,totalExperts:l,consensusTier:null})}),f},staleTime:1e3*60*5}),{data:Qe}=_t(O,!1,30),vs=u.useMemo(()=>{const e=new Map;return Qe&&Qe.forEach((s,r)=>{if(s.length<2)return;const n=s[0].avg,a=s[s.length-1].avg;!Number.isFinite(n)||!Number.isFinite(a)||e.set(r,a-n)}),e},[Qe]),Ne=u.useMemo(()=>{let e=[...w];return!U.includes("all")&&U.length>0&&(e=e.filter(s=>s.position&&U.includes(s.position))),e},[w,U]),ht=u.useMemo(()=>Z.trim()?Ne.filter(e=>e.playerName.toLowerCase().includes(Z.toLowerCase())):Ne,[Ne,Z]),Pe=u.useCallback(e=>{const s=[...e],r=99999;if(s.sort((n,a)=>{var i,h,v,b;switch(y){case"rookie-adp":return(se.get(n.playerId)??r)-(se.get(a.playerId)??r);case"expert":return(H.get(n.playerId)??r)-(H.get(a.playerId)??r);case"crowdsourced":return n.rank-a.rank;case"10day-rank":{const p=n.tenDayMovement??0;return(a.tenDayMovement??0)-p}case"10day-ffd":{const p=Se.get(n.playerId)??0;return(Se.get(a.playerId)??0)-p}case"ffd":return parseFloat(ee(a.score))-parseFloat(ee(n.score));case"col-pts":{const p=(i=W==null?void 0:W.get(n.playerId))==null?void 0:i.total;return(((h=W==null?void 0:W.get(a.playerId))==null?void 0:h.total)??-1/0)-(p??-1/0)}case"col-ppg":{const p=(v=W==null?void 0:W.get(n.playerId))==null?void 0:v.ppg;return(((b=W==null?void 0:W.get(a.playerId))==null?void 0:b.ppg)??-1/0)-(p??-1/0)}default:return n.rank-a.rank}}),C.size>0){const n=h=>{const v=P==null?void 0:P.get(h);return v?v.experts.some(b=>C.has(b.expertId)):!1},a=[],i=[];return s.forEach(h=>(n(h.playerId)?a:i).push(h)),[...a,...i]}return s},[y,se,H,Se,Fe,C,P,W]),we=u.useMemo(()=>Pe(ht),[Pe,ht]),pe=we.slice(0,rt),gt=we.length>rt,yt=u.useMemo(()=>{const e={},s=new Map;return Pe(Ne).forEach(r=>{const n=r.position||"N/A";e[n]=(e[n]||0)+1,s.set(r.playerId,e[n])}),s},[Pe,Ne]),Ce=y==="ffd"||y==="expert"||y==="rookie-adp",bt=e=>{const s=parseFloat(ee(e));return Math.floor((100-s)/5)},js=u.useMemo(()=>{if(!pe.length)return new Map;const e=new Set;pe.forEach(n=>e.add(bt(n.score)));const s=Array.from(e).sort((n,a)=>n-a),r=new Map;return s.forEach((n,a)=>r.set(n,a+1)),r},[pe,Fe]),Ns=u.useMemo(()=>{const e=new Map;if(y!=="rookie-adp")return e;const s=[];if(pe.forEach(i=>{const h=_==null?void 0:_.get(i.playerId);h!=null&&Number.isFinite(h)&&s.push({playerId:i.playerId,adp:h})}),s.length===0)return e;const r=or(s.map(i=>i.adp),ir);let n=1,a=0;return s.forEach((i,h)=>{const v=h+1;for(e.set(i.playerId,n);a<r.length&&v===r[a].afterRank;)n++,a++}),e},[y,pe,_]),Te=e=>{var s;if(!Ce)return null;if(y==="expert"){if(cs===1)return((s=P==null?void 0:P.get(e.playerId))==null?void 0:s.consensusTier)??null;if(!je||je.length===0)return null;const r=H.get(e.playerId);if(r==null)return null;for(const a of je)if(r<=a.afterRank)return a.tierIndex;return je[je.length-1].tierIndex+1}return y==="rookie-adp"?Ns.get(e.playerId)??null:js.get(bt(e.score))||1},ws=y==="rookie-adp"?"ADP Tier":"Tier",ke=u.useMemo(()=>{let e=(w??[]).filter(n=>{var i;const a=((i=n.playerName)==null?void 0:i.toLowerCase())||"";return!a.includes("player invalid")&&!a.includes("duplicate player")});if(Z.trim()){const n=Z.toLowerCase();e=e.filter(a=>a.playerName.toLowerCase().includes(n))}const s=99999;return[...e].sort((n,a)=>{switch(y){case"expert":return(H.get(n.playerId)??s)-(H.get(a.playerId)??s);case"rookie-adp":return((_==null?void 0:_.get(n.playerId))??s)-((_==null?void 0:_.get(a.playerId))??s);case"ffd":return parseFloat(ee(a.score))-parseFloat(ee(n.score));case"crowdsourced":default:return n.rank-a.rank}}).map((n,a)=>({...n,rank:a+1}))},[w,Z,y,_,H]),kt=u.useMemo(()=>{const e={},s=new Map;return ke.forEach(r=>{const n=r.position||"N/A";e[n]=(e[n]||0)+1,s.set(r.playerId,e[n])}),s},[ke]),_s=u.useMemo(()=>ke.map(e=>{let s=ee(e.score);if(y==="expert"){const r=H.get(e.playerId);s=r!=null?r.toFixed(1):null}else if(y==="rookie-adp"){const r=_==null?void 0:_.get(e.playerId);s=r!=null?r.toFixed(1):null}return{playerId:e.playerId,playerName:e.playerName,team:e.team??null,position:e.position??null,displayRank:e.rank,imageUrl:e.imageUrl??void 0,yearsExp:e.yearsExp??e.years_exp??null,ffdValue:s}}),[ke,y,H,_]),me=u.useMemo(()=>{let e=ke;return!U.includes("all")&&U.length>0&&(e=e.filter(s=>s.position&&U.includes(s.position))),e.map((s,r)=>({...s,rank:r+1}))},[ke,U]),Ms=u.useMemo(()=>me.map(e=>({playerId:e.playerId,playerName:e.playerName,team:e.team??null,position:e.position??null,displayRank:e.rank})),[me]),Es=u.useMemo(()=>{const e=new Map;if(!Ce||Z.trim())return e;let s=0;for(let r=0;r<me.length-1;r++){const n=Te(me[r]),a=Te(me[r+1]);n!==a&&n!=null&&(e.set(me[r+1].rank-1,s),s+=1)}return e},[me,Ce,Z,y]),Ze=(e="sm")=>{const s=e==="xs"?"h-3 w-3":"h-3.5 w-3.5";return e==="xs"?t.jsxs("div",{className:"flex items-center gap-0.5",children:[t.jsx("button",{className:`h-7 w-7 rounded-full flex items-center justify-center transition-all ${J==="list"?"bg-primary text-background":"text-muted-foreground hover:text-foreground bg-muted/50"}`,onClick:()=>fe("list"),"aria-label":"List view",children:t.jsx(Vt,{className:s})}),t.jsx("button",{className:`h-7 w-7 rounded-full flex items-center justify-center transition-all ${J==="tier"?"bg-primary text-background":"text-muted-foreground hover:text-foreground bg-muted/50"}`,onClick:()=>fe("tier"),"aria-label":"Tiers view",children:t.jsx(Ot,{className:s})}),t.jsx("button",{className:`h-7 w-7 rounded-full flex items-center justify-center transition-all ${J==="board"?"bg-primary text-background":"text-muted-foreground hover:text-foreground bg-muted/50"}`,onClick:()=>fe("board"),"aria-label":"Draftboard view",children:t.jsx(zt,{className:s})})]}):t.jsxs("div",{className:"flex items-center bg-muted/50 rounded-full p-0.5",children:[t.jsxs("button",{className:`px-2.5 py-1 text-xs font-medium rounded-full transition-all inline-flex items-center gap-1 leading-none ${J==="list"?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,onClick:()=>fe("list"),children:[t.jsx(Vt,{className:s}),"List"]}),t.jsxs("button",{className:`px-2.5 py-1 text-xs font-medium rounded-full transition-all inline-flex items-center gap-1 leading-none ${J==="tier"?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,onClick:()=>fe("tier"),children:[t.jsx(Ot,{className:s}),"Tiers"]}),t.jsxs("button",{className:`px-2.5 py-1 text-xs font-medium rounded-full transition-all inline-flex items-center gap-1 leading-none ${J==="board"?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,onClick:()=>fe("board"),children:[t.jsx(zt,{className:s}),"Board"]})]})},$e=e=>{if(e==="all")Be(["all"]);else{const s=U.filter(r=>r!=="all");
1if(s.includes(e)){const r=s.filter(n=>n!==e);Be(r.length===0?["all"]:r)}else Be([...s,e])}Me(_e)},vt=e=>{Gt(s=>{const r=new Set(s);return r.has(e)?r.delete(e):r.add(e),r})},Is=e=>{Zt(s=>{const r=new Set(s);return r.has(e)?r.delete(e):r.add(e),r})},jt=e=>{Jt(s=>{const r=new Set(s);return r.has(e)?r.delete(e):r.add(e),r}),Me(_e)},As=e=>{ze(e),Me(_e)},Je=({col:e,label:s,className:r})=>t.jsxs("button",{onClick:()=>As(e),className:`flex items-center justify-center gap-0.5 hover:text-primary transition-colors ${y===e?"text-primary font-bold":""} ${r||""}`,children:[s,y===e&&t.jsx(lr,{className:"h-3 w-3"})]}),Fs=rs||as||is||ls||us,[Xe,Ye]=u.useState(null),ne=(e,s)=>{if(e==null||s==null||!Number.isFinite(e)||!Number.isFinite(s))return t.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"-"});const r=e-s;if(r===0)return t.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"-"});const n=r<0,a=n?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",i=n?Dt:qt;return t.jsxs("span",{className:`text-base font-bold ${a} flex items-center gap-0.5 leading-none`,children:[t.jsx(i,{className:"w-3.5 h-3.5"}),Math.abs(r).toFixed(0)]})},Ss=e=>{if(!e)return{first:"",second:""};const s=e.split(/\s+vs\s+/i);if(s.length!==2)return{first:e,second:""};const r=n=>{const a=n.trim();return a.toLowerCase()==="exp"?"Expert":a};return{first:r(s[0]),second:r(s[1])}};return t.jsxs(t.Fragment,{children:[(te==null?void 0:te.isActivePanel)!==!1&&t.jsx(Os,{title:"FFDashboard Rookies | Expert Panel",description:"Rookie-focused data view for expert analysis."}),t.jsxs("div",{className:"min-h-screen",children:[t.jsxs("div",{ref:at,className:"sticky top-[var(--studio-header-h,0px)] z-30 -mt-3 md:-mt-3 bg-background border-b border-border/30",children:[t.jsx("div",{className:"absolute inset-x-0 -top-5 h-5 bg-background pointer-events-none","aria-hidden":"true"}),t.jsx(tr,{children:t.jsx("header",{"data-tutorial":"mrd-header",className:"pt-3 pb-0 md:pb-2",children:t.jsx("div",{className:"max-w-[1036px] mx-auto px-4 space-y-2",children:!Xt&&t.jsx("div",{className:"flex items-center justify-between gap-4",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[(()=>{const e=(te==null?void 0:te.isActivePanel)===!1?"p":"h1";return t.jsxs(e,{className:"text-3xl md:text-4xl font-bold tracking-tight",children:[t.jsx("span",{className:"md:hidden",children:"FFDashboard"}),t.jsx("span",{className:"hidden md:inline",children:"FFDashboard Rookies"})]})})(),t.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-0.5",children:"Rookie-focused data — Expert Consensus, Rookie ADP, Overall ADP, and movement."})]})})})})}),t.jsx("div",{className:"pt-0 pb-2 md:pt-2",children:t.jsxs("div",{className:"max-w-[1036px] mx-auto px-4 space-y-2",children:[t.jsxs("div",{className:"relative hidden lg:flex items-center gap-1.5 md:gap-2 flex-nowrap",children:[t.jsx("button",{onClick:()=>nt(!ve),className:"p-0.5 md:p-1 text-foreground hover:text-primary transition-colors flex-shrink-0",children:ve?t.jsx(Mt,{className:"h-4 w-4 md:h-5 md:w-5 stroke-[2.5]"}):t.jsx(Et,{className:"h-4 w-4 md:h-5 md:w-5 stroke-[2.5]"})}),Le&&t.jsx("div",{className:"flex-shrink-0",children:Ze("sm")}),t.jsx(Lt,{scope:"rookie",overallPath:"/expert-panel/ffdashboard",rookiePath:"/expert-panel/ffdashboard-rookies"}),t.jsxs("div",{className:`absolute flex items-center gap-4 ${Le?"left-[330px]":"left-1/2 -translate-x-1/2"}`,children:[ce.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-1",children:ds.map(e=>{const s=C.size===0||C.has(e.id);return t.jsx("button",{type:"button",onClick:()=>jt(e.id),title:e.name,"aria-label":e.name,"aria-pressed":s,className:`rounded-full transition-all ${s?"ring-2 ring-primary":"opacity-40 grayscale hover:opacity-70"}`,children:t.jsxs(De,{className:"h-8 w-8",children:[e.avatar&&t.jsx(qe,{src:e.avatar}),t.jsx(Oe,{className:"text-xs",children:e.name.charAt(0)})]})},e.id)})}),t.jsx("div",{className:"w-px h-6 bg-border/50"})]}),t.jsx("div",{className:"flex items-center gap-0.5 bg-muted/50 rounded-full p-0.5",children:[{key:"expert",label:"Exp Avg"},{key:"rookie-adp",label:"ADP"},{key:"ffd",label:"Crowd"}].map(({key:e,label:s})=>t.jsx("button",{onClick:()=>ze(e),className:`px-2.5 py-1 text-xs font-medium rounded-full transition-colors ${y===e?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,children:s},e))}),!Le&&Ze("sm")]}),t.jsxs("div",{className:"flex items-center gap-0.5 bg-muted/50 rounded-full p-0.5 flex-shrink-0 ml-auto",children:[t.jsx("button",{type:"button",onClick:()=>$e("all"),className:`px-2.5 py-1 text-xs font-medium rounded-full transition-colors ${U.includes("all")?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,children:"All"}),[{value:"QB",activeClass:"bg-red-500 text-background"},{value:"RB",activeClass:"bg-green-500 text-background"},{value:"WR",activeClass:"bg-blue-500 text-background"},{value:"TE",activeClass:"bg-yellow-500 text-background"}].map(({value:e,activeClass:s})=>t.jsx("button",{type:"button",onClick:()=>$e(e),className:`px-2.5 py-1 text-xs font-medium rounded-full transition-colors ${U.includes(e)?s:"text-muted-foreground hover:text-foreground"}`,children:e},e))]})]}),t.jsxs("div",{className:"lg:hidden space-y-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:()=>nt(!ve),className:"p-1 text-foreground hover:text-primary transition-colors",children:ve?t.jsx(Mt,{className:"h-4 w-4 stroke-[2.5]"}):t.jsx(Et,{className:"h-4 w-4 stroke-[2.5]"})}),t.jsx(Lt,{scope:"rookie",overallPath:"/expert-panel/ffdashboard",rookiePath:"/expert-panel/ffdashboard-rookies",size:"xs"}),t.jsx("div",{className:"flex-1"}),Ze("xs"),t.jsxs("button",{onClick:()=>Yt(!Ee),className:`flex items-center gap-1.5 h-8 px-3 rounded-full text-xs font-semibold transition-all ${Ee||C.size>0||!U.includes("all")?"bg-primary text-primary-foreground":"bg-muted/60 text-muted-foreground hover:bg-muted"}`,children:[t.jsx(Ls,{className:"h-3.5 w-3.5"}),"Filters",Ee?t.jsx(Bs,{className:"h-3 w-3"}):t.jsx(It,{className:"h-3 w-3"})]})]}),Ee&&t.jsx("div",{className:"space-y-3 pb-2",children:t.jsxs("div",{className:"flex items-center justify-between",children:[ce.length>0?t.jsx("div",{className:"flex items-center gap-1.5",children:ce.slice(0,3).map(e=>{const s=C.size===0||C.has(e.id);return t.jsx("button",{type:"button",onClick:()=>jt(e.id),title:e.name,"aria-label":e.name,"aria-pressed":s,className:`rounded-full transition-all ${s?"ring-2 ring-primary":"opacity-40 grayscale hover:opacity-70"}`,children:t.jsxs(De,{className:"h-7 w-7",children:[e.avatar&&t.jsx(qe,{src:e.avatar}),t.jsx(Oe,{className:"text-[10px]",children:e.name.charAt(0)})]})},e.id)})}):t.jsx("div",{}),t.jsxs("div",{className:"flex items-center gap-0.5 bg-muted/50 rounded-full p-0.5 w-fit",children:[t.jsx("button",{type:"button",onClick:()=>$e("all"),className:`px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors ${U.includes("all")?"bg-primary text-background":"text-muted-foreground hover:text-foreground"}`,children:"All"}),[{value:"QB",activeClass:"bg-red-500 text-background"},{value:"RB",activeClass:"bg-green-500 text-background"},{value:"WR",activeClass:"bg-blue-500 text-background"},{value:"TE",activeClass:"bg-yellow-500 text-background"}].map(({value:e,activeClass:s})=>t.jsx("button",{type:"button",onClick:()=>$e(e),className:`px-2 py-0.5 text-[11px] font-medium rounded-full transition-colors ${U.includes(e)?s:"text-muted-foreground hover:text-foreground"}`,children:e},e))]})]})})]}),ve&&t.jsx(zs,{value:Z,onChange:e=>
1Ht(e.target.value),placeholder:"Search rookies...",className:"max-w-md",autoFocus:!0}),J!=="board"&&t.jsxs("div",{className:"hidden lg:flex items-center justify-between gap-3 px-4 h-10 rounded-xl bg-muted/40 text-foreground/80 text-xs font-semibold",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-8 flex-shrink-0 text-center ml-1",children:"Rank"}),t.jsx("div",{className:"w-10 flex-shrink-0"}),t.jsx("div",{className:"w-44 flex-shrink-0",children:"Player"}),t.jsx("div",{className:"w-12 flex-shrink-0 text-center",children:"Pos"})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-between gap-2 ml-4",children:[t.jsxs("div",{className:"flex items-center gap-[10px]",children:[t.jsx("div",{className:"w-24 flex-shrink-0 text-center",children:"Experts"}),t.jsx(Je,{col:"expert",label:"Exp Avg",className:"w-16 flex-shrink-0 text-center whitespace-nowrap"})]}),t.jsx(Je,{col:"rookie-adp",label:"ADP",className:"w-20 flex-shrink-0 text-center"}),t.jsx(Je,{col:"ffd",label:"Crowd",className:"w-20 flex-shrink-0 text-center"}),(()=>{var r,n;const e=C.size===1?((n=(r=ce.find(a=>C.has(a.id)))==null?void 0:r.name)==null?void 0:n.split(" ")[0])??"Exp":"Exp",s=y==="expert"?{col1:`${e} vs ADP`,col2:`${e} vs Crowd`}:y==="rookie-adp"?{col1:`ADP vs ${e}`,col2:"ADP vs Crowd"}:{col1:`Crowd vs ${e}`,col2:"Crowd vs ADP"};return t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"w-[72px] flex-shrink-0 text-center h-full flex items-center justify-center leading-tight",children:t.jsx("span",{className:"text-[10px] font-semibold whitespace-nowrap",children:s.col1})}),t.jsx("div",{className:"w-[72px] flex-shrink-0 text-center h-full flex items-center justify-center leading-tight",children:t.jsx("span",{className:"text-[10px] font-semibold whitespace-nowrap",children:s.col2})})]})})()]})]}),t.jsxs("div",{className:"flex lg:hidden items-center gap-2 px-4 py-2 rounded-xl bg-muted/40 text-foreground/80 text-xs font-semibold",children:[t.jsx("div",{className:"flex-shrink-0 w-9"}),t.jsx("div",{className:"flex-1",children:"Player"}),t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>it(!ot),className:"flex items-center gap-0.5 text-[10px] text-primary font-bold",children:[{ffd:"Crowd","rookie-adp":"ADP",expert:"Expert"}[re],t.jsx(It,{className:"h-3 w-3"})]}),ot&&t.jsx("div",{className:"absolute right-0 top-full mt-1 z-[60] bg-popover/95 backdrop-blur-2xl border border-border/40 rounded-xl shadow-lg py-1 min-w-[100px]",children:[["expert","Expert"],["rookie-adp","ADP"],["ffd","Crowd"]].map(([e,s])=>t.jsx("button",{onClick:()=>{es(e),it(!1);const n={ffd:"ffd","rookie-adp":"rookie-adp",expert:"expert",production:"col-pts",ppg:"col-ppg"}[e];n&&ze(n)},className:`w-full text-left px-3 py-1.5 text-xs hover:bg-muted/50 transition-colors ${re===e?"text-primary font-bold":"text-foreground"}`,children:s},e))})]})]})]})})]}),t.jsx("main",{"data-tutorial":"mrd-grid",className:J==="board"?"px-4 py-4 space-y-1 overflow-visible":"max-w-[1036px] mx-auto px-4 py-4 space-y-1",children:Fs?t.jsx("div",{className:"space-y-2",children:Array.from({length:10}).map((e,s)=>t.jsx(Vs,{className:"h-12 w-full rounded-lg"},s))}):J==="tier"?t.jsx(Ys,{players:Ms,tierDividerMap:Es,showTiers:Ce&&!Z.trim(),positionRanks:kt}):J==="board"?t.jsx(er,{players:_s,positionRanks:kt,selectedPositions:U,orderMode:"linear",fullWidthCards:!0,stickyHeader:!0,stickyTopVar:`calc(var(--studio-header-h, 0px) + ${Ut}px)`,trailingEmptyRounds:0}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"space-y-0.5",children:pe.map((e,s)=>{const r=Te(e),n=s>0?pe[s-1]:null,a=n?Te(n):null,i=r!==null&&r!==a,v=ss(e.playerId)==="overall";ps.get(e.playerId);const b=v?X==null?void 0:X.get(e.playerId):_==null?void 0:_.get(e.playerId),p=v?ks.get(e.playerId):gs.get(e.playerId),l=v?Ge==null?void 0:Ge.get(e.playerId):P==null?void 0:P.get(e.playerId),x=v?vs.get(e.playerId):fs.get(e.playerId),c=(v?null:(de==null?void 0:de.get(e.playerId))??null)??(l==null?void 0:l.avgRank)??null,f=ee(e.score),o=Se.get(e.playerId),d=o!==void 0&&parseFloat(o.toFixed(1))===0,g=o!==void 0&&!d?o>0?`+${o.toFixed(1)}`:o.toFixed(1):null,N=q==null?void 0:q.get(e.playerId),I=N!==void 0?parseFloat(ee(N)):null,M=o!==void 0&&I!==null&&I!==0?o/I*100:null,$=M!==null&&parseFloat(M.toFixed(1))===0,K=M!==null&&!$&&!d?`${Math.abs(M).toFixed(1)}%`:null,ae=o!==void 0&&!d&&o>0?"text-green-500":o!==void 0&&!d&&o<0?"text-red-500":"text-muted-foreground",F=Wt.has(e.playerId),Q=Qt.has(e.playerId);let B=null,E;
1return y==="expert"?(B=H.get(e.playerId)??null,E=ct.get(e.playerId)??null):y==="rookie-adp"?(B=se.get(e.playerId)??null,E=hs.get(e.playerId)??null):y==="ffd"||y==="crowdsourced"||y==="10day-rank"||y==="10day-ffd"?v?(B=e.rank??null,E=e.tenDayMovement??null):(B=Re.get(e.playerId)??null,E=xs.get(e.playerId)??null):(B=s+1,E=void 0),t.jsxs(Hs.Fragment,{children:[i&&t.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 my-2",children:[t.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-primary/50 to-transparent"}),t.jsxs("span",{className:"text-xs font-semibold text-primary/70",children:[ws," ",r]}),t.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-primary/50 to-transparent"})]}),t.jsxs(Us,{className:"border-0 shadow-none hover:border hover:border-primary/50 transition-all duration-200 cursor-pointer lg:py-0 lg:hover:scale-[1.02] lg:hover:z-10 lg:relative",onClick:()=>Is(e.playerId),children:[t.jsxs("div",{className:"hidden lg:flex items-center justify-between gap-3 px-4 py-1.5 min-h-[45.5px] group",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"flex flex-col items-center justify-center h-10 gap-[3px] w-8 flex-shrink-0 ml-1",children:[t.jsx("span",{className:"text-base font-bold text-foreground leading-none",children:B??"-"}),E!==void 0?t.jsx("div",{className:"flex items-center justify-center leading-none",children:t.jsx(Bt,{movement:E,stacked:!0})}):t.jsx("div",{className:"h-[10px]"})]}),t.jsx("div",{className:"flex-shrink-0 w-10",children:t.jsx(At,{playerId:e.playerId,playerName:e.playerName,className:"h-10 w-10",onClick:()=>Ve(e.playerId)})}),t.jsxs("div",{className:"w-44 flex-shrink-0 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("h3",{"data-player-name":"","data-player-id":e.playerId,className:"font-semibold text-base leading-tight cursor-pointer hover:text-primary transition-colors truncate",onClick:m=>{m.stopPropagation(),Ve(e.playerId)},title:e.playerName,children:e.playerName}),e.injury_status&&t.jsx(Ft,{status:e.injury_status})]}),t.jsx("div",{className:"text-sm font-normal whitespace-nowrap truncate",children:(()=>{const m=e.team||"-",j=St(e.birthDate,e.age),S=Rt(e.draftRound,e.draftPick);return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:`font-semibold ${Pt(e.team)}`,children:m}),j&&j!=="-"&&t.jsxs("span",{className:"text-muted-foreground",children:[" · Age ",j]}),S&&t.jsxs("span",{className:"text-muted-foreground",children:[" · Pick ",S]})]})})()})]}),t.jsxs("div",{className:"w-12 flex-shrink-0 flex flex-col justify-center items-center h-10 gap-[3px] leading-none",children:[t.jsxs("span",{className:`text-xs font-bold px-2 py-[3px] rounded-md ${tt(e.position)} ${st(e.position)}`,children:[e.position||"N/A",(v&&(y==="ffd"||y==="crowdsourced"||y==="10day-rank"||y==="10day-ffd")?xt.get(e.playerId):yt.get(e.playerId))??""]}),(()=>{const j=v&&(y==="ffd"||y==="crowdsourced"||y==="10day-rank"||y==="10day-ffd")?ft.get(e.playerId)??null:pt(e.playerId,e.tenDayMovement);if(j==null)return t.jsx("div",{className:"h-[9px]"});if(j===0)return t.jsx("span",{className:"text-[9px] font-semibold text-muted-foreground leading-none",children:"-"});const S=j>0;return t.jsxs("span",{className:`flex items-center gap-0.5 text-[9px] font-semibold leading-none ${S?"text-emerald-500":"text-red-500"}`,children:[S?t.jsx(Ct,{className:"w-2.5 h-2.5"}):t.jsx(Tt,{className:"w-2.5 h-2.5"}),Math.abs(j)]})})()]})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-between gap-2 ml-4",children:[t.jsxs("div",{className:"flex items-center gap-[10px]",children:[t.jsx("div",{className:"w-24 flex-shrink-0 flex items-center justify-center",children:l?t.jsxs("button",{onClick:m=>{m.stopPropagation(),vt(e.playerId)},className:"flex items-center -space-x-[5px] hover:bg-muted/50 rounded-full p-0.5 transition-colors",children:[l.experts.slice(0,3).map(m=>t.jsxs("div",{className:"relative",children:[t.jsx(De,{className:"h-10 w-10 border-2 border-background",children:m.expertAvatar?t.jsx(qe,{src:m.expertAvatar,alt:m.expertName,className:"object-cover"}):t.jsx(Oe,{className:"text-xs bg-primary/20 text-primary",children:m.expertName.charAt(0)})}),t.jsx("span",{className:"absolute -bottom-1 -right-1 min-w-[16px] h-[16px] px-1 rounded-full bg-primary text-primary-foreground text-[9px] font-bold flex items-center justify-center border border-background leading-none",children:m.rank})]},m.expertId)),l.experts.length>3&&t.jsx("div",{className:"h-10 w-10 rounded-full bg-muted border-2 border-background flex items-center justify-center",children:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",l.experts.length-3]})})]}):t.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})}),t.jsx("div",{className:"w-16 flex-shrink-0 flex flex-col justify-center items-center gap-[3px] h-10 leading-none",children:l?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-base font-bold text-foreground whitespace-nowrap leading-none",children:c!=null?c%1===0?c:c.toFixed(1):"-"}),(()=>{const m=x;if(m==null||!Number.isFinite(m))return t.jsx("div",{className:"h-[10px]"});const j=Math.round(m*10)/10;
1if(j===0)return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:"-"});const S=j<0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",D=j<0?"▲":"▼";return t.jsxs("span",{className:`text-[10px] font-semibold ${S} flex items-center gap-0.5 leading-none`,children:[t.jsx("span",{children:D}),Math.abs(j).toFixed(1)]})})()]}):t.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})})]}),t.jsx("div",{className:"w-20 flex-shrink-0 flex flex-col justify-center items-center gap-[3px] h-10 leading-none",children:b!=null?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-base font-bold text-foreground whitespace-nowrap leading-none",children:b.toFixed(1)}),(()=>{const m=p;if(m==null||!Number.isFinite(m))return t.jsx("div",{className:"h-[10px]"});const j=Math.round(m*10)/10;if(j===0)return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:"-"});const S=j<0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",D=j<0?"▲":"▼";return t.jsxs("span",{className:`text-[10px] font-semibold ${S} flex items-center gap-0.5 leading-none`,children:[t.jsx("span",{children:D}),Math.abs(j).toFixed(1)]})})()]}):t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"-"})})}),t.jsxs("div",{className:"w-20 flex-shrink-0 flex flex-col justify-center items-center gap-[3px] h-10 whitespace-nowrap",children:[t.jsx("span",{className:"text-base font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent leading-none",children:f}),t.jsxs("div",{className:"flex items-center gap-0.5 leading-none text-[10px] font-semibold",children:[t.jsx("span",{className:ae,children:g||"-"}),K&&t.jsxs("span",{className:ae,children:["(",K,")"]})]})]}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"w-[72px] flex-shrink-0 flex flex-col justify-center items-center gap-[3px] h-10 whitespace-nowrap",children:(()=>{var D,R;let m;if(C.size>0){const A=((R=(D=P==null?void 0:P.get(e.playerId))==null?void 0:D.experts)==null?void 0:R.filter(z=>C.has(z.expertId)))??[];A.length>0&&(m=A.reduce((z,G)=>z+G.rank,0)/A.length)}else m=H.get(e.playerId);const j=se.get(e.playerId),S=Re.get(e.playerId);return y==="expert"?ne(m,j):ne(y==="rookie-adp"?j:S,m)})()}),t.jsx("div",{className:"w-[72px] flex-shrink-0 flex flex-col justify-center items-center gap-[3px] h-10 whitespace-nowrap",children:(()=>{var D,R;let m;if(C.size>0){const A=((R=(D=P==null?void 0:P.get(e.playerId))==null?void 0:D.experts)==null?void 0:R.filter(z=>C.has(z.expertId)))??[];A.length>0&&(m=A.reduce((z,G)=>z+G.rank,0)/A.length)}else m=H.get(e.playerId);const j=se.get(e.playerId),S=Re.get(e.playerId);return y==="expert"?ne(m,S):y==="rookie-adp"?ne(j,S):ne(S,j)})()})]})]})]}),F&&l&&t.jsx("div",{className:"hidden lg:block px-3 pb-2 border-t border-border/30 mt-1 pt-2",children:t.jsxs("div",{className:"flex flex-wrap gap-3",children:[l.experts.sort((m,j)=>m.rank-j.rank).map(m=>t.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 rounded-md px-2 py-1",children:[t.jsx(De,{className:"h-6 w-6",children:m.expertAvatar?t.jsx(qe,{src:m.expertAvatar,alt:m.expertName,className:"object-cover"}):t.jsx(Oe,{className:"text-[9px] bg-primary/20 text-primary",children:m.expertName.charAt(0)})}),t.jsx("span",{className:"text-xs text-muted-foreground",children:m.expertName}),t.jsxs(Ks,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-4",children:["#",m.rank]})]},m.expertId)),l.totalExperts>l.experts.length&&t.jsxs("div",{className:"flex items-center text-xs text-muted-foreground italic",children:["+",l.totalExperts-l.experts.length," did not rank"]})]})}),t.jsx("div",{className:"lg:hidden p-2",onClick:()=>vt(e.playerId),children:(()=>{const m=re==="ffd"||re==="rookie-adp"||re==="expert",j=v&&(y==="ffd"||y==="crowdsourced"||y==="10day-rank"||y==="10day-ffd"),S=(j?xt.get(e.playerId):yt.get(e.playerId))??"",D=j?ft.get(e.playerId)??null:pt(e.playerId,e.tenDayMovement);return t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:`flex flex-col items-center w-7 flex-shrink-0 gap-[2px] ${m?"justify-start":"justify-center"}`,children:m?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"h-5 flex items-center justify-center",children:t.jsx("span",{className:"text-sm font-bold text-foreground leading-none",children:B??"-"})}),t.jsx("div",{className:"h-3 flex items-center justify-center",children:E!=null?t.jsx(Bt,{movement:E,stacked:!0}):t.jsx("span",{className:"text-[9px] font-semibold text-muted-foreground
1/60 leading-none",children:"-"})})]}):t.jsx(t.Fragment,{children:t.jsx("span",{className:"text-sm font-bold text-foreground leading-none",children:B??"-"})})}),t.jsx("div",{className:"flex-shrink-0",onClick:R=>{R.stopPropagation(),Ve(e.playerId)},children:t.jsx(At,{playerId:e.playerId,playerName:e.playerName,className:"h-9 w-9"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("h3",{className:"font-bold text-sm leading-tight truncate",children:e.playerName}),e.injury_status&&t.jsx(Ft,{status:e.injury_status})]}),t.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:t.jsx("div",{className:"text-xs",children:(()=>{const R=Rt(e.draftRound,e.draftPick),A=St(e.birthDate,e.age),z=e.team||"FA";return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:`font-semibold ${Pt(e.team)}`,children:z}),A!=="-"&&t.jsxs("span",{className:"text-slate-500",children:[" • Age ",A]}),R&&t.jsxs("span",{className:"text-slate-500",children:[" • Pick ",R]})]})})()})})]}),t.jsx("div",{className:`flex-shrink-0 flex flex-col items-center w-12 gap-[2px] ml-3 ${m?"justify-start":"justify-center"}`,children:m?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"h-5 flex items-center justify-center",children:t.jsxs("span",{className:`text-[10px] px-1.5 h-5 inline-flex items-center rounded font-bold leading-none ${tt(e.position)} ${st(e.position)}`,children:[e.position||"N/A",S]})}),t.jsx("div",{className:"h-3 flex items-center justify-center",children:D==null||D===0?t.jsx("span",{className:"text-[9px] font-semibold text-muted-foreground/60 leading-none",children:"-"}):t.jsxs("span",{className:`text-[9px] font-semibold leading-none ${D>0?"text-emerald-500":"text-red-500"} flex items-center gap-0.5`,children:[D>0?t.jsx(Ct,{className:"w-2 h-2 stroke-[3]"}):t.jsx(Tt,{className:"w-2 h-2 stroke-[3]"}),Math.abs(D)]})})]}):t.jsxs("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-bold leading-none ${tt(e.position)} ${st(e.position)}`,children:[e.position||"N/A",S]})}),t.jsxs("div",{className:`flex-shrink-0 flex flex-col items-end w-16 gap-[2px] -ml-3 ${m?"justify-start":"justify-center"}`,children:[re==="ffd"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"h-5 flex items-center justify-end",children:t.jsx("span",{className:"text-lg font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent leading-none",children:f})}),t.jsx("div",{className:"h-3 flex items-center justify-end text-[10px] font-semibold",children:t.jsx("span",{className:`${ae} leading-none`,children:g||"-"})})]}),re==="rookie-adp"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"h-5 flex items-center justify-end",children:t.jsx("span",{className:"text-sm font-bold text-foreground whitespace-nowrap leading-none",children:b!=null?b.toFixed(1):"-"})}),t.jsx("div",{className:"h-3 flex items-center justify-end",children:(()=>{const R=p;if(R==null||!Number.isFinite(R))return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground/60 leading-none",children:"-"});const A=Math.round(R*10)/10;if(A===0)return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground leading-none",children:"-"});const z=A<0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",G=A<0?"▲":"▼";return t.jsxs("span",{className:`text-[10px] font-semibold ${z} flex items-center gap-0.5 leading-none`,children:[t.jsx("span",{children:G}),Math.abs(A).toFixed(1)]})})()})]}),re==="expert"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"h-5 flex items-center justify-end",children:t.jsx("span",{className:"text-sm font-bold text-foreground leading-none",children:c!=null?c%1===0?c:c.toFixed(1):"-"})}),t.jsx("div",{className:"h-3 flex items-center justify-end",children:(()=>{const R=x;if(R==null||!Number.isFinite(R))return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground/60 leading-none",children:"-"});const A=Math.round(R*10)/10;if(A===0)return t.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground leading-none",children:"-"});const z=A<0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",G=A<0?"▲":"▼";return t.jsxs("span",{className:`text-[10px] font-semibold ${z} flex items-center gap-0.5 leading-none`,children:[t.jsx("span",{children:G}),Math.abs(A).toFixed(1)]})})()})]})]})]})})()}),Q&&t.jsx("div",{className:"lg:hidden px-3 pb-3 pt-2 border-t border-border/30",onClick:m=>m.stopPropagation(),children:(()=>{var Nt,wt;let m,j="Exp";if(C.size>0){const xe=((wt=(Nt=P==null?void 0:P.get(e.playerId))==null?void 0:Nt.experts)==null?void 0:wt.filter(oe=>C.has(oe.expertId)))??[];if(xe.length>0&&(m=xe.reduce((oe,et)=>oe+et.rank,0)/xe.length),C.size===1){const oe=ce.find(et=>C.has(et.id));oe!=null&&oe.name&&(j=oe.name.split(" ")[0])}}else m=H.get(e.playerId);const S=se.get(e.playerId),D=Re.get(e.playerId);let R=`${j} vs ADP`,A=`${j} vs Crowd`,z=[m,S],G=[m,D];return y==="rookie-adp"?(R=`ADP vs ${j}`,A="ADP vs Crowd",z=[S,m],G=[S,D]):y==="ffd"&&(R=`Crowd vs ${j}`,A="Crowd vs ADP",z=[D,m],G=[D,S]),t.jsxs("div",{className:"flex items-stretch justify-around ga
1p-2",children:[t.jsxs("div",{className:"flex flex-col items-center gap-1 flex-1",children:[t.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:[R,t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-full hover:bg-muted transition-colors",onClick:xe=>{xe.stopPropagation(),Ye(R)},children:t.jsx($t,{className:"w-3 h-3 text-muted-foreground"})})]}),ne(z[0],z[1])]}),t.jsx("div",{className:"w-px bg-border/50"}),t.jsxs("div",{className:"flex flex-col items-center gap-1 flex-1",children:[t.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:[A,t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-full hover:bg-muted transition-colors",onClick:xe=>{xe.stopPropagation(),Ye(A)},children:t.jsx($t,{className:"w-3 h-3 text-muted-foreground"})})]}),ne(G[0],G[1])]})]})})()})]})]},e.playerId)})}),gt&&t.jsx("div",{className:"mt-6 flex justify-center",children:t.jsx(Ws,{variant:"outline",size:"lg",onClick:()=>Me(e=>e+_e),className:"w-full sm:w-auto",children:"Show 50 More"})}),!gt&&we.length>0&&t.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-6",children:["Showing all ",we.length," rookies"]}),we.length===0&&t.jsx("p",{className:"text-center text-sm text-muted-foreground mt-12",children:"No rookies found for this format."})]})}),t.jsx(Gs,{open:!!Xe,onOpenChange:e=>!e&&Ye(null),children:t.jsxs(Qs,{className:"sm:max-w-md",children:[t.jsx(Zs,{children:t.jsx(Js,{children:Xe})}),(()=>{const{first:e,second:s}=Ss(Xe);return t.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground leading-relaxed",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Dt,{className:"w-4 h-4 text-green-600 dark:text-green-400"}),t.jsxs("span",{children:[e," is ranked ",t.jsx("strong",{className:"text-foreground",children:"higher"})," than ",s]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4 text-red-600 dark:text-red-400"}),t.jsxs("span",{children:[e," is ranked ",t.jsx("strong",{className:"text-foreground",children:"lower"})," than ",s]})]})]})})()]})})]})]})}export{jr 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.