1import{r as m,U as I,d as H,j as e,q as L,e as V,X as j}from"./index-Ba4BgsO5.js";import{u as A,g as D,D as M,h as O}from"./html2canvas.esm-DAf4igC2.js";import{S as E}from"./search-DhDYykJC.js";function K({picks:g,players:h,onClose:w}){const v=A(),[f,y]=m.useState(null),[N,k]=m.useState(""),[G,C]=m.useState(!1),[U,S]=m.useState(!1),[p,z]=m.useState(!1);m.useEffect(()=>{const s=()=>{z(window.innerWidth<768)};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]);const b=m.useRef(null),{toast:R}=I(),$=H(s=>s.getCurrentOwner),F=async()=>{if(b.current)try{const r=(await O(b.current,{backgroundColor:"#f0f7ff",scale:4,logging:!1,useCORS:!0,allowTaint:!0,onclone:t=>{const a=t.querySelector(".export-footer");a&&(a.style.display="block"),t.querySelectorAll(".no-export").forEach(d=>d.style.display="none"),t.querySelectorAll(".export-only").forEach(d=>d.style.display="flex")}})).toDataURL("image/png"),i=document.createElement("a");i.href=r,i.download=`${f}-Mock-Draft.png`,i.click(),S(!0),setTimeout(()=>S(!1),2e3)}catch(s){console.error("Error saving image:",s)}},B=s=>{const r=c[s];if(!r)return;let i=`${s} Mock Draft Summary 2 3`;r.forEach(t=>{const a=h.find(o=>o.id===t.playerId);a&&(i+=`R${t.round}: ${t.pick}. ${a.name} (${a.position}), ${a.college} 4`)}),i+=` 5Created at NFLDraftHQ.com`,navigator.clipboard.writeText(i).then(()=>{C(!0),setTimeout(()=>C(!1),2e3)}).catch(t=>{R({title:"Error",description:"Failed to copy text.",variant:"destructive"})})},c={};g.forEach(s=>{if(s.playerId){const r=$(s.round,s.pick,s.team);c[r]||(c[r]=[]),c[r].push(s)}});const P=["Cardinals","Falcons","Ravens","Bills","Panthers","Bears","Bengals","Browns","Cowboys","Broncos","Lions","Packers","Texans","Colts","Jaguars","Chiefs","Raiders","Chargers","Rams","Dolphins","Vikings","Patriots","Saints","Giants","Jets","Eagles","Steelers","49ers","Seahawks","Buccaneers","Titans","Commanders"].filter(s=>c[s]).sort();h.filter(s=>!g.some(r=>r.playerId===s.id)).sort((s,r)=>(s.rank||999)-(r.rank||999)).slice(0,15),g.filter(s=>s.playerId).length>=224;const W=P.filter(s=>{if(!N)return!0;const r=N.toLowerCase();return s.toLowerCase().includes(r)?!0:(c[s]||[]).some(t=>{const a=h.find(o=>o.id===t.playerId);return a?a.name.toLowerCase().includes(r)||a.college.toLowerCase().includes(r):!1})}),T=f?[f]:W;return e.jsx("div",{className:"fixed inset-0 z-[2000] bg-black font-sans flex items-center justify-center sm:p-4",children:f?e.jsx("div",{className:"w-full sm:max-w-md h-full sm:h-auto",children:T.map(s=>{const r=c[s],i=L(s).toLowerCase();return e.jsxs("div",{className:"flex flex-col h-full sm:h-auto sm:rounded-lg overflow-hidden shadow-2xl border border-gray-200 bg-white relative",children:[e.jsxs("div",{className:V("p-2 px-3 flex justify-between items-center border-b relative h-10 no-export bg-zinc-800 border-zinc-700"),children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx("img",{src:`/team-logos/${i}.png`,alt:s,className:"h-7 w-auto object-contain shrink-0",onError:t=>t.currentTarget.style.display="none"}),e.jsx("span",{className:"font-black italic uppercase text-[11px] sm:text-sm tracking-tight whitespace-nowrap text-white",children:p?`${s} Mock Draft`:"Mock Draft"}),e.jsxs("div",{className:"flex items-center gap-2 ml-2 no-export shrink-0",children:[e.jsx("button",{onClick:F,className:"flex items-center justify-center w-7 h-7 rounded-full hover:bg-white/10 transition-all",title:"Save Image",children:e.jsx("span",{className:"text-sm",children:"ð¾"})}),e.jsx("button",{onClick:()=>B(s),className:"flex items-center justify-center w-7 h-7 rounded-full hover:bg-white/10 transition-all",title:"Copy Text",children:e.jsx("span",{className:"text-sm",children:"ð"})})]})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 shrink-0",children:[e.jsx("div",{className:"text-[10px] font-black tracking-widest text-white whitespace-nowrap",children:new Date().toLocaleDateString("en-US",{month:"numeric",day:"numeric",year:"2-digit"}).replace(/\//g,".")}),e.jsx("button",{onClick:w,className:"p-1 hover:bg-white/10 rounded text-white",children:e.jsx(j,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{ref:b,className:"bg-white",children:[e.jsxs("div",{className:"p-0 flex-grow overflow-y-auto flex flex-col bg-white",children:[e.jsxs("div",{className:"flex items-center px-3 py-1 border-b shrink-0 bg-white border-gray-100",children:[e.jsx("div",{className:"w-14 shrink-0"}),e.jsx("div",{className:"w-10 shrink-0"}),e.jsx("div",{className:"mx-2 w-7 shrink-0"}),e.jsx("div",{className:"flex-grow pl-3"})]}),e.jsx("div",{className:"flex-grow",children:r.map(t=>{const a=h.find(x=>x.id===t.playerId);if(!a)return null;const o=a.college.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-9]/g,"")+".png",u=t.team.split(" (")[0],d=s!==u,l=v.get(D(t))??M;let n="text-gray-500";return l.startsWith("A")?n="text-blue-600":l.startsWith("B")?n="text-green-600":l.startsWith("
5C")?n="text-red-600":l.startsWith("D")?n="text-orange-600":l==="F"&&(n="text-red-700"),e.jsxs("div",{className:"flex items-center py-2 px-3 border-b last:border-0 border-gray-100",children:[e.jsxs("div",{className:"w-14 text-[11px] font-bold text-gray-500 shrink-0 flex items-center gap-0.5",children:["R",t.round,": ",t.pick,d&&e.jsx("svg",{className:"w-2.5 h-2.5 text-blue-500 ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M7 16V4M7 4L3 8M7 4L11 8M17 8V20M17 20L21 16M17 20L13 16",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsx("div",{className:"w-10 text-center shrink-0",children:e.jsx("span",{className:"text-[#013369] font-black text-xs",children:a.position})}),e.jsx("div",{className:"mx-2 w-7 h-7 flex items-center justify-center shrink-0",children:e.jsx("img",{src:`/college-logos/${o}`,alt:a.college,className:"max-w-full max-h-full object-contain",onError:x=>x.currentTarget.style.display="none"})}),e.jsxs("div",{className:"flex-grow min-w-0 flex flex-col justify-center overflow-hidden pl-3",children:[e.jsx("div",{className:"flex items-center gap-1.5 leading-none",children:e.jsx("div",{className:"font-[900] uppercase font-sans text-black truncate",style:{display:"block",lineHeight:"1.1",color:"#1a1a1a",fontSize:"11px"},children:a.name})}),e.jsxs("div",{className:"text-[10px] text-gray-500 font-bold uppercase font-sans whitespace-nowrap overflow-hidden mt-1 flex items-center gap-2",children:[e.jsx("span",{className:"truncate",style:{lineHeight:"1.0"},children:a.college}),e.jsx("span",{className:`font-black text-[10px] ${n}`,style:{lineHeight:"1.2"},children:l})]})]}),e.jsx("div",{className:"flex items-center shrink-0 ml-auto w-12 justify-end",children:e.jsx("div",{className:"text-[11px] font-bold text-gray-400 text-right",children:a.rank||"NR"})})]},t.pick)})}),p&&e.jsx("div",{className:"p-4 bg-white border-t border-gray-100 flex justify-center mt-auto shrink-0 no-export",children:e.jsx("button",{onClick:()=>y(null),className:"px-8 py-2 bg-zinc-800 text-white font-black uppercase tracking-widest rounded-lg shadow-md hover:bg-zinc-900 transition-colors text-sm",children:"Done"})})]}),e.jsx("div",{className:"w-full py-0.5 bg-[#e6f3ff] border-t border-blue-100 text-center text-[9px] font-bold text-zinc-900 tracking-widest",children:"Visit NFLDraftHQ.com"})]})]},s)})}):e.jsxs("div",{className:"w-full sm:max-w-6xl bg-white shadow-2xl flex flex-col h-full sm:h-auto max-h-screen sm:max-h-[90vh] sm:rounded-lg overflow-hidden",children:[p?e.jsxs("div",{className:"bg-[#f0f7ff] text-zinc-900 shrink-0 border-b border-blue-200 relative px-4 pt-2 pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between relative h-10 px-0",children:[e.jsx("h2",{className:"text-xl font-black italic uppercase tracking-tighter whitespace-nowrap",children:"Team Summary"}),e.jsx("div",{className:"flex-grow flex items-center justify-center pointer-events-none pr-8",children:e.jsx("span",{className:"text-sm font-bold text-gray-500 whitespace-nowrap",children:new Date().toLocaleDateString("en-US",{month:"numeric",day:"numeric",year:"2-digit"}).replace(/\//g,".")})}),e.jsx("button",{onClick:w,className:"p-1 hover:bg-black/5 rounded shrink-0",children:e.jsx(j,{className:"w-8 h-8"})})]}),e.jsx("div",{className:"flex justify-center mt-1.5",children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",placeholder:"Search...",className:"pl-8 pr-4 py-1.5 rounded-full border border-blue-200 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 w-64 font-medium",onChange:s=>k(s.target.value)}),e.jsx(E,{className:"w-4 h-4 text-gray-400 absolute left-2.5 top-1/2 -translate-y-1/2"})]})}),e.jsx("div",{className:"text-center text-xs font-bold text-blue-600 italic mt-1",children:"Click any Team to View and Save/Copy"}),e.jsx("div",{className:"h-0.5 w-full bg-black mt-2 -mx-4 w-[calc(100%+2rem)]"})]}):e.jsxs("div",{className:"bg-[#f0f7ff] text-zinc-900 p-2 px-4 flex justify-between items-center shrink-0 border-b border-blue-200 h-auto min-h-[48px] flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-0 flex-1 min-w-[200px]",children:[e.jsx("h2",{className:"text-xl font-black italic uppercase tracking-tighter whitespace-nowrap",children:"Mock Team Summary"}),e.jsx("span",{className:"text-sm font-bold text-blue-600 italic ml-4 lg:ml-[160px] whitespace-nowrap",children:"Click any Team to View and/or Save"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap sm:flex-nowrap",children:[e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",placeholder:"Search...",className:"pl-8 pr-4 py-1.5 rounded-full border border-blue-200 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 w-full sm:w-64 font-medium",onChange:s=>k(s.target.value)}),e.jsx(E,{className:"w-4 h-4 text-gray-400 absolute left-2.5 top-1/2 -translate-y-1/2"})]}),e.jsx("div",{className:"text-sm font-black tracking-widest text-zinc-700 whitespace-nowrap",children:new Date().toLocaleDateString("en-US",{month:"numeric",day:"numeric",year:"2-digit"}).replace(/\//g,".")}),e.jsx("button",{onClick:w,className:"p-1 hover:bg-black/5 rounded",children:e.jsx(j,{className:"w-8 h-8"})})]})]}),e.jsx("div",{className:"flex-grow overflow-y-auto p-2 sm:p-6 bg-gray-50",children:e.jsx("div",{className:p?"flex flex-col gap-4":"grid grid-cols-1 md:grid-cols-3 gap-6",children:T.map(s=>{const r=c[s],i=L(s).toLowerCase();return e.jsxs("div",{className:"flex flex-col rounded-lg overflow-hidden shadow-md border border-gray-200 transition-transform cursor-pointer hover:scale-[1.02]",onClick:()=>y(s),children:[e.jsx("div",{className:"bg-zinc-800 p-3 flex justify-between items-center border-b border-zinc-700",children:e.jsxs("div",{className:"flex items-center gap-3 w-full",children:[e.jsx("img",{src:`/team-logos/${i}.png`,alt:s,className:"h-8 w-auto object-contain",onError:t=>t.currentTarget.style.display="none"}),e.jsx("span",{className:"font-black uppercase text-xs text-white",children:s}),e.jsx("span",{className:"font-black italic uppercase text-sm tracking-tight text-white ml-auto",children:"Mock Draft"})]})}),e.jsxs("div",{className:"bg-white p-0 flex-grow",children:[e.jsxs("div",{className:"flex items-center px-3 py-1 border-b border-gray-100 bg-white",children:[e.jsx("div",{className:"w-14 shrink-0"}),e.jsx("div",{className:"w-10 shrink-0"}),e.jsx("div",{className:"mx-2 w-7 shrink-0"}),e.jsx("div",{className:"flex-grow pl-3"})]}),e.jsx("div",{className:"flex-grow",children:r.map(t=>{const a=h.find(x=>x.id===t.playerId);if(!a)return null;const o=a.college.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-9]/g,"")+".png",u=t.team.split(" (")[0],d=s!==u,l=v.get(D(t))??M;let n="text-gray-500";return l.startsWith("A")?n="text-blue-600":l.startsWith("B")?n="text-green-600":l.startsWith("
5C")?n="text-red-600":l.startsWith("D")?n="text-orange-600":l==="F"&&(n="text-red-700"),e.jsxs("div",{className:"flex items-center py-2 px-3 border-b last:border-0 border-gray-50",children:[e.jsxs("div",{className:"w-14 text-[11px] font-bold text-gray-400 shrink-0 flex items-center gap-0.5",children:["R",t.round,": ",t.pick,d&&e.jsx("svg",{className:"w-2.5 h-2.5 text-blue-500 ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M7 16V4M7 4L3 8M7 4L11 8M17 8V20M17 20L21 16M17 20L13 16",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsx("div",{className:"w-10 text-center shrink-0",children:e.jsx("span",{className:"text-gray-600 font-black text-xs",children:a.position})}),e.jsx("div",{className:"mx-2 w-7 h-7 flex items-center justify-center shrink-0",children:e.jsx("img",{src:`/college-logos/${o}`,alt:a.college,className:"max-w-full max-h-full object-contain",onError:x=>x.currentTarget.style.display="none"})}),e.jsxs("div",{className:"flex-grow min-w-0 flex flex-col justify-center overflow-hidden pl-3",children:[e.jsx("div",{className:"flex items-center gap-1.5 leading-none",children:e.jsx("div",{className:"font-[900] uppercase font-sans text-black truncate",style:{display:"block",lineHeight:"1.1",color:"#1a1a1a",fontSize:"11px"},children:a.name})}),e.jsxs("div",{className:"text-[10px] text-gray-400 font-bold uppercase font-sans whitespace-nowrap overflow-hidden mt-1 flex items-center gap-2",children:[e.jsx("span",{className:"truncate",style:{lineHeight:"1.0"},children:a.college}),e.jsx("span",{className:`font-black text-[10px] ${n}`,style:{lineHeight:"1.2"},children:l})]})]}),e.jsx("div",{className:"flex items-center shrink-0 ml-auto w-12 justify-end",children:e.jsx("div",{className:"text-[11px] font-bold text-gray-900 text-right",children:a.rank||"-"})})]},t.pick)})})]})]},s)})})})]})})}export{K 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.