1import{r as l,j as e,l as S,B as f,S as b,C,T as i}from"./index-WWECtYvd.js";import{B as _}from"./Badge-9ql_laky.js";import{P as R}from"./PageLoading-BVOW9gzq.js";const r={proven:{label:"Proven",color:"bg-emerald-500"},hybrid:{label:"Hybrid",color:"bg-amber-500"},synthetic:{label:"Synthetic",color:"bg-gray-400"}},T=c=>c==="CONFIRMED"||c==="OBSERVED"?"text-emerald-600":"text-gray-500";function z(){const[c,h]=l.useState(!0),[m,p]=l.useState([]),[u,j]=l.useState(0),[n,v]=l.useState(""),[d,w]=l.useState(""),[a,o]=l.useState(null),[g,y]=l.useState(!1);l.useEffect(()=>{document.title="Resume Console â Rolebotz"},[]);const N=l.useCallback(async()=>{h(!0);try{const s=new URLSearchParams;n&&s.set("q",n),d&&s.set("status",d),s.set("limit","100");const t=await fetch(`/api/resumes?${s.toString()}`,{credentials:"include"}),x=t.ok?await t.json():{resumes:[],total:0};p(x.resumes||[]),j(x.total||0)}catch{p([]),j(0)}finally{h(!1)}},[n,d]);l.useEffect(()=>{N()},[N]);const k=async s=>{y(!0),o(null);try{const t=await fetch(`/api/resume/${encodeURIComponent(s)}`,{credentials:"include"});if(t.ok){const x=await t.json();o(x.resume)}}catch{}finally{y(!1)}};return c&&m.length===0?e.jsx(R,{}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"mb-1",children:"Resume Console"}),e.jsxs("p",{className:"text-gray-500",children:["What each Bottery Pack has solved. ",u," pack",u===1?"":"s"," in the catalog."]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[e.jsx(S,{placeholder:"Search by role, vertical, problemâ¦",value:n,onChange:s=>v(s.target.value),className:"max-w-md"}),e.jsx("div",{className:"flex gap-2",children:["","proven","hybrid","synthetic"].map(s=>e.jsx(f,{size:"sm",variant:d===s?"solid":"default",onClick:()=>w(s),children:s?r[s]?.label||s:"All"},s||"all"))}),c&&e.jsx(b,{size:20})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:[m.map(s=>{const t=r[s.status]||r.synthetic;return e.jsxs(C,{clickable:!0,className:"cursor-pointer hover:shadow-lg transition-shadow",onClick:()=>k(s.pack_id),children:[e.jsxs("div",{className:"flex justify-between items-start gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-semibold truncate",children:s.name||s.pack_id}),e.jsxs("div",{className:"text-xs text-gray-500 truncate",children:[s.role," · ",s.vertical]})]}),e.jsx(_,{className:t.color,content:t.label})]}),s.summary&&e.jsx("p",{className:"text-sm text-gray-600 mt-2 line-clamp-3",children:s.summary}),e.jsxs("div",{className:"flex gap-2 mt-3",children:[e.jsxs(i,{children:[s.problems_solved_count," problem",s.problems_solved_count===1?"":"s"]}),e.jsxs(i,{children:[s.edge_case_count," edge case",s.edge_case_count===1?"":"s"]}),s.packuracy_score!=null&&e.jsxs(i,{className:"bg-emerald-100",children:["score ",s.packuracy_score]})]})]},s.pack_id)}),m.length===0&&!c&&e.jsx("div",{className:"col-span-full text-center text-gray-400 py-12",children:"No resumes match your search."})]}),(g||a)&&e.jsx("div",{className:"fixed inset-0 bg-black/40 flex justify-end z-50",onClick:()=>o(null),children:e.jsxs("div",{className:"w-full max-w-2xl bg-white dark:bg-gray-800 h-full overflow-y-auto p-6",onClick:s=>s.stopPropagation(),children:[g&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(b,{size:32})}),a&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h4",{children:a.name}),e.jsxs("div",{className:"text-sm text-gray-500",children:[a.role," · ",a.vertical]})]}),e.jsx(f,{size:"sm",variant:"default",onClick:()=>o(null),children:"Close"})]}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(_,{className:(r[a.status]||r.synthetic).color,content:(r[a.status]||r.synthetic).label}),a.packuracy_score!=null?e.jsxs(i,{className:"bg-emerald-100",children:["Packuracy ",a.packuracy_score]}):e.jsx("span",{className:"text-xs text-gray-400",children:"Score pending real evidence"})]}),a.professional_summary&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Summary"}),e.jsx("p",{className:"text-sm",children:a.professional_summary})]}),e.jsxs("section",{children:[e.jsxs("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:["Problems Solved (",a.problems_solved_count,")"]}),a.problems_solved.length===0&&e.jsx("p",{className:"text-sm text-gray-400",children:"None recorded."}),e.jsx("ul",{className:"flex flex-col gap-2",children:a.problems_solved.map(s=>e.jsxs("li",{className:"text-sm border-l-2 pl-3 border-gray-200",children:[e.jsx("div",{children:s.title}),e.jsxs("div",{className:"text-xs",children:[e.jsx("span",{className:T(s.tier),children:s.tier}),s.sop_ref&&e.jsxs("span",{className:"text-gray-400",children:[" · ",s.sop_ref]})]})]},s.problem_id))})]}),(a.edge_cases_real.length>0||a.edge_cases_projected.length>0)&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Edge Cases"}),a.edge_cases_real.map((s,t)=>e.jsxs("div",{className:"text-sm",children:["â ",s.desc," ",s.date&&e.jsxs("span",{className:"text-xs text-gray-400",children:["(",s.date,")"]})]},`r${t}`)),a.edge_cases_projected.map((s,t)=>e.jsxs("div",{className:"text-sm text-gray-400",children:["â ",s.desc," ",e.jsx("span",{className:"text-xs",children:"(projected)"})]},`p${t}`))]}),a.tribal_knowledge&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Tribal Knowledge"}),e.jsx("p",{className:"text-sm",children:a.tribal_knowledge})]}),a.capability_problems&&a.capability_problems.length>0&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"What This Role Handles"}),e.jsx("ul",{className:"flex flex-col gap-1.5",children:a.capability_problems.map((s,t)=>e.jsxs("li",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:s.problem}),s.how&&e.jsxs("span",{className:"text-gray-500",children:[" â ",s.how]})]},t))})]}),a.key_metrics&&a.key_metrics.length>0&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Key Metrics"}),e.jsx("div",{className:"flex flex-col gap-1",children:a.key_metrics.map((s,t)=>e.jsxs("div",{className:"text-sm flex gap-2",children:[e.jsxs("span",{className:"font-medium min-w-0",children:[s.metric,":"]}),e.jsx("span",{className:"text-gray-600",children:s.impact})]},t))})]}),a.systems&&a.systems.length>0&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Systems"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.systems.map((s,t)=>e.jsx(i,{children:s},t))})]}),a.reports&&a.reports.length>0&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Reports It Works With"}),e.jsx("ul",{className:"text-sm list-disc pl-5",children:a.reports.map((s,t)=>e.jsx("li",{children:s},t))})]}),a.how_it_works&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"How It Works"}),e.jsx("p",{className:"text-sm",children:a.how_it_works})]}),a.who_should_hire&&a.who_should_hire.length>0&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"Who Should Deploy This"}),e.jsx("ul",{className:"text-sm list-disc pl-5",children:a.who_should_hire.map((s,t)=>e.jsx("li",{children:s},t))})]}),a.opportunity&&e.jsxs("section",{children:[e.jsx("h6",{className:"text-gray-500 uppercase text-xs mb-1",children:"The Opportunity"}),e.jsx("p",{className:"text-sm",children:a.opportunity})]}),e.jsxs("div",{className:"text-xs text-gray-400 mt-2",children:["Rendered ",a.rendered_at]})]})]})})]})}export{z 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.