PageSourceSearch

https://layoffproof.ai/assets/interview-preparation-hSROhABp.js

js layoffproof.ai collected 2026-10-02 01:11:24 UTC 18,516 bytes, 1 lines download raw bytes

1import{j as e,S as N,k as y,C as ee,B as se,r as l,u as te,e as ae,L as ie,a0 as re,c as m,F as ne,as as _,at as E}from"./index-CgAagivl.js";import{L as J}from"./LayoffProofSelect-DFN0u2Yi.js";import{M as H}from"./message-square-DouqsxzX.js";import{T as le}from"./trending-up-C6clG_ZO.js";import{S as oe}from"./search-D0DE8bP5.js";import{L as ce}from"./link-2-Dwz88H_G.js";import{I as W}from"./info-DqM5O2bR.js";import{L as z}from"./loader-circle-htiMdbb9.js";import{C as de}from"./circle-check-big-C0g7Wkv9.js";import{L as D}from"./lightbulb-D7_mnLCK.js";import{S as xe}from"./star-CbM2UJGw.js";import{R as me}from"./refresh-cw-9KYIIfqU.js";import{D as he}from"./download-B-D-bDzo.js";import{C as be}from"./circle-help-C5m-AgA9.js";const fe=[{icon:N,title:"Personalized Questions",description:"Questions tailored to the job description and role",iconBg:"bg-[#ede9fe]",iconColor:"text-[#8b5cf6]"},{icon:y,title:"AI Scoring",description:"Get intelligent scores based on industry best practices",iconBg:"bg-[#fce7f3]",iconColor:"text-[#ec4899]"},{icon:H,title:"Detailed Feedback",description:"Receive actionable feedback to improve your answers",iconBg:"bg-[#dbeafe]",iconColor:"text-[#3b82f6]"},{icon:le,title:"Practice & Improve",description:"Practice, enhance, and boost your interview performance",iconBg:"bg-[#dcfce7]",iconColor:"text-[#22c55e]"}];function pe(){return e.jsx("div",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",children:fe.map(t=>{const r=t.icon;return e.jsxs("div",{className:"flex items-start gap-3 rounded-2xl border border-[#e8ecf4] bg-white p-4 shadow-sm",children:[e.jsx("div",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl ${t.iconBg}`,children:e.jsx(r,{className:`h-5 w-5 ${t.iconColor}`,strokeWidth:2})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-bold text-[#0f172a]",children:t.title}),e.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-[#64748b]",children:t.description})]})]},t.title)})})}function g({size:t,className:r}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:r,"aria-hidden":!0,children:e.jsx("path",{d:"M12 1.5L13.35 9.6L21 10.9L13.35 12.2L12 20.5L10.65 12.2L3 10.9L10.65 9.6L12 1.5Z",fill:"#a78bfa"})})}function ue(){return e.jsxs("div",{className:"relative hidden h-[120px] w-[200px] shrink-0 lg:block","aria-hidden":!0,children:[e.jsxs("div",{className:"absolute right-4 top-2 h-[88px] w-[120px] rotate-[-4deg] rounded-2xl border border-[#ede9fe] bg-white p-3 shadow-[0_12px_32px_rgba(139,92,246,0.15)]",children:[e.jsx("div",{className:"mb-2 h-1.5 w-10 rounded-full bg-[#c4b5fd]"}),e.jsx("div",{className:"space-y-2",children:[0,1,2].map(t=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-[#ede9fe]",children:e.jsx(ee,{className:"h-2.5 w-2.5 text-[#8b5cf6]",strokeWidth:3})}),e.jsx("div",{className:"h-1 rounded-full bg-[#f3e8ff]",style:{width:`${72-t*8}%`}})]},t))})]}),e.jsx("div",{className:"absolute right-0 top-8 flex h-12 w-12 items-center justify-center rounded-2xl bg-gradient-to-br from-[#8b5cf6] to-[#7c3aed] shadow-[0_8px_24px_rgba(139,92,246,0.35)]",children:e.jsx(se,{className:"h-6 w-6 text-white",strokeWidth:2})}),e.jsx(g,{size:14,className:"absolute right-[88px] top-0"}),e.jsx(g,{size:10,className:"absolute right-2 top-20 opacity-70"}),e.jsx(g,{size:12,className:"absolute bottom-4 right-[140px] opacity-80"})]})}const v="w-full rounded-xl border border-[#e2e8f0] bg-white px-3 py-2.5 text-sm text-[#0f172a] outline-none transition placeholder:text-[#94a3b8] focus:border-[#a5b4fc] focus:ring-2 focus:ring-[#c7d2fe]/60 disabled:opacity-60",h="mb-1.5 block text-xs font-medium text-[#475569]",b="rounded-2xl border border-[#e8ecf4] bg-white p-5 shadow-sm sm:p-6",je="flex w-full items-center justify-center gap-2 rounded-xl bg-[#8b5cf6] px-4 py-3 text-sm font-semibold text-white shadow-sm shadow-violet-200/50 transition hover:bg-[#7c3aed] disabled:cursor-not-allowed disabled:opacity-50";function ge(t,r){return(t==null?void 0:t.trim())||(r==null?void 0:r.trim())||"there"}function w({questions:t}){return!t||t.length===0?null:e.jsxs("div",{className:b,children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-[#dbeafe]",children:e.jsx(be,{className:"h-5 w-5 text-[#3b82f6]",strokeWidth:2})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold text-[#0f172a]",children:"Your Questions for the Interviewer"}),e.jsx("p",{className:"text-xs text-[#64748b]",children:"Smart questions show engagement and help you evaluate the role."})]})]}),e.jsx("ul",{className:"space-y-4",children:t.map((r,c)=>e.jsxs("li",{className:"text-sm text-[#334155]",children:[e.jsx("span",{className:"font-medium text-[#0f172a]",children:r.question}),e.jsxs("div",{className:"mt-2 rounded-xl border border-[#e8ecf4] bg-[#f8fafc] p-3 text-xs leading-relaxed text-[#64748b]",children:[e.jsx("span",{className:"font-semibold text-[#475569]",children:"Good impression: "}),r.goodImpression]})]},c))})]})}const ve=[{label:"AI-Generated Questions",icon:N,bg:"bg-[#ede9fe]",text:"text-[#7c3aed]"},{label:"Intelligent Scoring",icon:y,bg:"bg-[#fce7f3]",text:"text-[#db2777]"},{label:"Personalized Feedback",icon:H,bg:"bg-[#dbeafe]",text:"text-[#2563eb]"}];function Be(){var q,Q,B,G,M;const[t,r]=l.useState("input"),[c,k]=l.useState(""),[f,I]=l.useState(""),[S,O]=l.useState("mixed"),[C,Y]=l.useState("hiring_manager"),[T,L]=l.useState(!1),[a,u]=l.useState(null),[n,p]=l.useState(0),[j,P]=l.useState({}),[A,F]=l.useState(!1),{user:o}=te(),{toast:x}=ae(),$=ge(o==null?void 0:o.firstName,o==null?void 0:o.lastName),U=async()=>
1{if(!c.trim()&&!f.trim()){x({title:"Missing Information",description:"Please provide either a job description or job title to generate questions.",variant:"destructive"});return}L(!0);try{const s=await fetch("/api/generate-interview-questions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobDescription:c,jobTitle:f,interviewType:S,interviewerRole:C,id:o==null?void 0:o.id})}),i=await _(s);if(!s.ok)throw new Error(E(i,s.statusText));const d=i;u(d),r("questions"),x({title:"Questions Generated!",description:`Generated ${d.questions.length} tailored interview questions.`})}catch(s){x({title:"Generation Failed",description:s.message,variant:"destructive"})}finally{L(!1)}},K=()=>{r("practice"),p(0)},Z=(s,i)=>{P(d=>({...d,[s]:i}))},V=async()=>{if(a){F(!0);try{const s=await fetch("/api/score-interview-answers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questions:a.questions,userAnswers:j,jobTitle:a.jobTitle})}),i=await _(s);if(!s.ok)throw new Error(E(i,"Failed to score answers"));const d=i.questions;u(R=>R?{...R,questions:d}:null),r("results"),x({title:"Scoring Complete!",description:"Your interview answers have been evaluated with personalized feedback."})}catch(s){x({title:"Scoring Failed",description:s instanceof Error?s.message:"Unable to score answers. Please try again.",variant:"destructive"})}finally{F(!1)}}},X=()=>{r("input"),k(""),I(""),u(null),p(0),P({})};return e.jsxs(ie,{activeNavId:"interview",children:[e.jsx(re,{greeting:$}),e.jsxs("main",{className:"flex-1 px-4 pb-10 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex items-start justify-between gap-6 py-6",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-[26px] font-bold tracking-tight text-[#0f172a]",children:"AI Interview Question Generator & Scorer"}),e.jsx("p",{className:"mt-1 max-w-2xl text-sm leading-relaxed text-[#64748b]",children:"Get personalized interview questions based on job descriptions and receive AI-powered scoring with detailed feedback."}),e.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:ve.map(s=>{const i=s.icon;return e.jsxs("span",{className:m("inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-semibold",s.bg,s.text),children:[e.jsx(i,{className:"h-3.5 w-3.5",strokeWidth:2}),s.label]},s.label)})})]}),e.jsx(ue,{})]}),e.jsxs("div",{className:"mx-auto max-w-5xl",children:[t==="input"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:b,children:[e.jsxs("div",{className:"mb-6 flex items-start gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[#ede9fe]",children:e.jsx(ne,{className:"h-5 w-5 text-[#8b5cf6]",strokeWidth:2})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold text-[#0f172a]",children:"Step 1: Job Information"}),e.jsx("p",{className:"mt-0.5 text-sm text-[#64748b]",children:"Provide job details to generate relevant interview questions."})]})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"job-title",className:h,children:"Job Title (Optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(oe,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#94a3b8]"}),e.jsx("input",{id:"job-title",type:"text",placeholder:"e.g., Software Engineer, Marketing Manager",value:f,onChange:s=>I(s.target.value),className:m(v,"pl-9")})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"job-description",className:h,children:"Job Description or LinkedIn Job Link"}),e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{id:"job-description",placeholder:"Paste the full job description here or provide a LinkedIn job link...",value:c,onChange:s=>k(s.target.value),rows:8,className:m(v,"min-h-[180px] resize-y pr-10")}),e.jsx(ce,{className:"pointer-events-none absolute bottom-3 right-3 h-4 w-4 text-[#94a3b8]"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"interview-type",className:h,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Interview Type",e.jsx(W,{className:"h-3.5 w-3.5 text-[#94a3b8]","aria-hidden":!0})]})}),e.jsxs(J,{id:"interview-type",value:S,onChange:s=>O(s.target.value),children:[e.jsx("option",{value:"behavioral",children:"Behavioral"}),e.jsx("option",{value:"technical",children:"Technical"}),e.jsx("option",{value:"managerial",children:"Managerial"}),e.jsx("option",{value:"mixed",children:"Mixed (Recommended)"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"interviewer-role",className:h,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Interview With",e.jsx(W,{className:"h-3.5 w-3.5 text-[#94a3b8]","aria-hidden":!0})]})}),e.jsxs(J,{id:"interviewer-role",value:C,onChange:s=>Y(s.target.value),children:[e.jsx("option",{value:"hiring_manager",children:"Hiring Manager"}),e.jsx("option",{value:"hr_recruiter",children:"HR / Recruiter"}),e.jsx("option",{value:"technical_lead",children:"Technical Lead / Senior Engineer"}),e.jsx("option",{value:"team_member",children:"Peer / Team Member"}),e.jsx("option",{value:"executive",children:"Executive / C-Level"})]})]})]}),e.jsx("button",{type:"button",onClick:U,disabled:T||!c.trim()&&!f.trim(),className:je,children:T?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"h-4 w-4 animate-spin"}),"Generating Questions..."]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"h-4 w-4"}),"Generate Interview Questions"]})})]})]}),e.jsx(pe,{})]}),t==="questions"&&a&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:b,children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[#dcfce7]",children:e.jsx(de,{className:"h-5 w-5 text-[#22c55e]",strokeWidth:2})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-base font-bold text-[#0f172a]",children:["Generated Questions for: ",a.jobTitle]}),e.jsx("p",{className:"mt-0.5 text-sm text-[#64748b]",children:"Review the questions you might be asked, then start your practice session."})]})]}),e.jsx("button",{type:"button",onClick:K,className:"shrink-0 rounded-xl bg-[#8b5cf6] px-5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-[#7c3aed]",children:"Start Practice"})]}),e.jsx("div",{className:"space-y-3",children:a.questions.map((s,i)=>e.jsxs("div",{className:"rounded-xl border border-[#e8ecf4] bg-[#fafafa] p-4",children:[e.jsxs("div",{className:"mb-2 flex items-start justify-between gap-2",children:[e.jsxs("h3",{className:"text-sm font-semibold text-[#0f172a]",children:["Question ",i+1]}),e.jsx("span",{className:"shrink-0 rounded-full border border-[#e2e8f0] bg-white px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[#64748b]",children:s.category})]}),e.jsx("p",{className:"text-sm leading-relaxed text-[#334155]",children:s.question}),s.interviewerIntent&&e.jsxs("div",{className:"mt-3 rounded-xl border border-[#fde68a] bg-[#fffbeb] p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs font-semibold text-[#92400e]",children:[e.jsx(D,{className:"h-3.5 w-3.5 text-[#f59e0b]"}),"Why they're asking this"]}),e.jsx("p",{className:"text-xs leading-relaxed text-[#78350f]",children:s.interviewerIntent})]})]},s.id))})]}),e.jsx(w,{questions:a.questionsToAskInterviewer})]}),t==="practice"&&a&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:b,children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsxs("h2",{className:"text-base font-bold text-[#0f172a]",children:["Question ",n+1," of ",a.questions.length]}),e.jsx("span",{className:"rounded-full border border-[#e2e8f0] bg-[#f8fafc] px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[#64748b]",children:(q=a.questions[n])==null?void 0:q.category})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"rounded-xl border border-[#c7d2fe] bg-[#eef2ff] p-5",children:e.jsx("p",{className:"text-base leading-relaxed text-[#312e81]",children:(Q=a.questions[n])==null?void 0:Q.question})}),((B=a.questions[n])==null?void 0:B.interviewerIntent)&&e.jsxs("div",{className:"rounded-xl border border-[#fde68a] bg-[#fffbeb] p-4",children:[e.jsxs("h4",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-semibold text-[#92400e]",children:[e.jsx(D,{className:"h-4 w-4 text-[#f59e0b]"}),"Keep in mind why they're asking"]}),e.jsx("p",{className:"text-sm text-[#78350f]",children:(G=a.questions[n])==null?void 0:G.interviewerIntent})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"user-answer",className:h,children:"Your Answer"}),e.jsx("textarea",{id:"user-answer",placeholder:"Type your answer here...",value:j[(M=a.questions[n])==null?void 0:M.id]||"",onChange:s=>{var i;return Z((i=a.questions[n])==null?void 0:i.id,s.target.value)},rows:6,className:m(v,"min-h-[150px] resize-y")})]}),e.jsxs("div",{className:"flex justify-between gap-3",children:[e.jsx("button",{type:"button",onClick:()=>p(Math.max(0,n-1)),disabled:n===0,className:"rounded-xl border border-[#e2e8f0] bg-white px-4 py-2.5 text-sm font-semibold text-[#334155] transition hover:bg-[#f8fafc] disabled:opacity-40",children:"Previous"}),n<a.questions.length-1?e.jsx("button",{type:"button",onClick:()=>p(n+1),className:"rounded-xl bg-[#8b5cf6] px-5 py-2.5 text-sm font-semibold text-white hover:bg-[#7c3aed]",children:"Next Question"}):e.jsx("button",{type:"button",onClick:V,disabled:A,className:"flex items-center gap-2 rounded-xl bg-[#22c55e] px-5 py-2.5 text-sm font-semibold text-white hover:bg-[#16a34a] disabled:opacity-50",children:A?e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"h-4 w-4 animate-spin"}),"Scoring..."]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4"}),"Score My Answers"]})})]})]})]}),e.jsx(w,{questions:a.questionsToAskInterviewer})]}),t==="results"&&a&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:b,children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-[#fef9c3]",children:e.jsx(xe,{className:"h-5 w-5 text-[#eab308]",fill:"currentColor",strokeWidth:0})}),e.jsx("h2",{className:"text-base font-bold text-[#0f172a]",children:"Interview Results"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",onClick:X,className:"flex items-center gap-1.5 rounded-xl border border-[#e2e8f0] bg-white px-4 py-2 text-sm font-semibold text-[#334155] hover:bg-[#f8fafc]",children:[e.jsx(me,{className:"h-3.5 w-3.5"}),"Try Again"]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-xl border border-[#e2e8f0] bg-white px-4 py-2 text-sm font-semibold text-[#334155] hover:bg-[#f8fafc]",children:[e.jsx(he,{className:"h-3.5 w-3.5"}),"Export PDF"]})]})]}),e.jsx("div",{className:"space-y-4",children:a.questions.map((s,i)=>e.jsxs("div",{className:"rounded-xl border border-[#e8ecf4] bg-[#fafafa] p-5",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-start justify-between gap-2",children:[e.jsxs("h3",{className:"text-sm font-semibold text-[#0f172a]",children:["Question ",i+1]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"rounded-full border border-[#e2e8f0] bg-white px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[#64748b]",children:s.category}),s.score!=null&&e.jsxs("span",{className:m("rounded-full px-2.5 py-0.5 text-[10px] font-bold",s.score>=8?"bg-[#dcfce7] text-[#166534]":s.score>=5?"bg-[#fef9c3] text-[#854d0e]":"bg-[#fee2e2] text-[#991b1b]"),children:["Score: ",s.score,"/10"]})]})]}),e.jsx("p",{className:"mb-4 text-sm text-[#334155]",children:s.question}),e.jsxs("div",{className:"mb-3 rounded-xl border border-[#e8ecf4] bg-white p-4",children:[e.jsx("h4",{className:"mb-1.5 text-xs font-semibold text-[#0f172a]",children:"Your Answer"}),e.jsx("p",{className:"whitespace-pre-wrap text-sm text-[#475569]",children:j[s.id]||"No answer provided"})]}),s.feedback&&e.jsxs("div",{className:"rounded-xl border border-[#bfdbfe] bg-[#eff6ff] p-4",children:[e.jsx("h4",{className:"mb-1.5 text-xs font-semibold text-[#1e40af]",children:"AI Feedback"}),e.jsx("p",{className:"whitespace-pre-wrap text-sm text-[#1d4ed8]",children:s.feedback})]})]},s.id))})]}),e.jsx(w,{questions:a.questionsToAskInterviewer})]})]})]})]})}export{Be 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.