1import{aC as Ne,b0 as r,aU as e,a7 as He,f as je,ar as ae,ak as _e,x as fe,aj as Ge,a5 as qe,aa as Je,aw as le,ag as ke,l as Ve,a4 as Ye,a6 as Ke,bj as Xe,bh as Qe,S as Ze,b as et,h as tt,W as Se,v as Ce,E as st,u as we,d as rt,al as Re,g as Me,H as Ae,an as De,e as at,p as nt,m as lt}from"./index-DzBlipNH.js";import{h as it,p as ot}from"./index-CqmcC3Fa.js";import{M as ct,R as Ee,E as dt}from"./wavesurfer.esm-Yu3OoRGs.js";import{T as ut}from"./ThemeToggle-CSokmc7l.js";import{T as ne}from"./Tooltip-BUdmjWbK.js";import{s as xt,a as mt}from"./VoiceCallsEngine-Dx3akb_u.js";import{P as Oe}from"./PricingModel-BoYQxnDv.js";import{I as ht}from"./image-kXBGWeG2.js";import{H as gt}from"./history-Dz2wB3Bb.js";import{M as ft}from"./mic-Dju2lGz7.js";import{M as Ie}from"./index-A7u2vmuq.js";import{r as Le}from"./index-Bidy5sek.js";import{S as ze}from"./sparkles-DcUdiNy9.js";import{L as pt,T as bt}from"./target-1d8l3eF6.js";import{G as yt}from"./graduation-cap-MO5ZuLZE.js";import"./extends-oTk6mKXu.js";import"./sun-DAFBb2Qa.js";/** 2 * @license lucide-react v0.541.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const jt=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],Ue=Ne("badge-dollar-sign",jt);/** 7 * @license lucide-react v0.541.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const wt=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Te=Ne("calendar-days",wt);/** 12 * @license lucide-react v0.541.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const vt=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Nt=Ne("dot",vt),kt="/sounds/dialtone.mp3",St="/sounds/hangup.mp3";function Ct({agentId:s,jobId:c,company:m,onClose:j}){const[o,d]=r.useState("idle"),[w,A]=r.useState("Connectingâ¦"),[R,U]=r.useState(!1),[O,L]=r.useState(0),[D,E]=r.useState(0),[z,F]=r.useState(0),[W,v]=r.useState(0),n=r.useRef(null),p=r.useRef(null),I=r.useRef(null),T=r.useRef(),J=r.useRef(null),H=r.useRef(null),te=r.useRef(null),_=r.useRef(null),ie=r.useRef(null),B=r.useRef(!1),N=r.useRef(null),V=r.useRef(0),oe=(u,a=3)=>{if(!u)return 0;const x=new Uint8Array(u.frequencyBinCount);u.getByteFrequencyData(x);const i=Math.max(1,Math.floor(x.length/10));let k=0;for(let $=0;$<i;$++)k+=x[$];const de=i,ue=Math.min(x.length,i+Math.floor(x.length/6));let se=0;for(let $=de;$<ue;$++)se+=x[$];const xe=k/i,pe=se/Math.max(1,ue-de),re=Math.max(0,xe-a)/(255-a),be=Math.max(0,pe-a)/(255-a),ye=.65*re+.35*be;return Math.min(1,Math.pow(ye,.5)*1.45)},Y=(u,a,x=.35)=>u+x*(a-u),K=r.useCallback(()=>{const u=oe(p.current,3),a=oe(I.current,2);L(k=>Y(k,u,.35)),E(k=>Y(k,a,.4));const x=Math.max(u*.85,a);F(k=>Y(k,x,.3));const i=Math.max(u,a);v(k=>k+.45*(i-k)),!B.current&&a>.06&&(B.current=!0,d("running"),U(!0),A("Connected"),N.current&&(window.clearInterval(N.current),N.current=null)),T.current=requestAnimationFrame(K)},[]),ce=r.useCallback(async()=>{try{const u=await navigator.mediaDevices.getUserMedia({audio:!0});n.current=u;const a=new(window.AudioContext||window.webkitAudioContext);te.current=a,a.state==="suspended"&&await a.resume();const x=a.createMediaStreamSource(u),i=a.createAnalyser();i.fftSize=512,i.minDecibels=-100,i.maxDecibels=-10,i.smoothingTimeConstant=.3,x.connect(i),p.current=i}catch(u){console.warn("Mic permission denied or unavailable",u),p.current=null}},[]),X=r.useCallback(async u=>{try{const a=new(window.AudioContext||window.webkitAudioContext);_.current=a,a.state==="suspended"&&await a.resume();const x=a.createMediaStreamSource(u),i=a.createAnalyser();i.fftSize=512,i.minDecibels=-100,i.maxDecibels=-10,i.smoothingTimeConstant=.5,x.connect(i),I.current=i}catch(a){console.error("Failed to attach remote analyser",a),I.current=null}},[]),Q=r.useCallback(async()=>
16{if(o!=="idle")return;try{J.current=J.current||new Audio(kt),J.current.currentTime=0,J.current.play().catch(()=>{})}catch{}d("starting"),A("Connectingâ¦");const u=localStorage.getItem("accessToken");if(!u){alert("Access token missing"),d("error");return}try{await ce();const a=await xt(s,u,{onReady:()=>{d("running")},onAgentAudioStart:()=>{B.current=!0,U(!0),d("running"),A("Connected"),N.current&&(window.clearInterval(N.current),N.current=null)},onRemoteStream:i=>{X(i)}},{jobId:c});ie.current=a,a!=null&&a.remoteStream&&X(a.remoteStream),T.current||(T.current=requestAnimationFrame(K));const x=()=>{var i,k;return(k=(i=ie.current)==null?void 0:i.sendText)==null?void 0:k.call(i,"Hi")};x==null||x(),B.current||(V.current=0,N.current=window.setInterval(()=>{if(B.current){N.current&&(window.clearInterval(N.current),N.current=null);return}if(V.current>=3){N.current&&(window.clearInterval(N.current),N.current=null);return}V.current+=1,x==null||x()},2e3))}catch(a){console.error("Failed to start call",a),d("error")}},[s,ce,X,K,o]),Z=r.useCallback(()=>{var u,a,x;T.current&&cancelAnimationFrame(T.current),T.current=void 0,N.current&&(window.clearInterval(N.current),N.current=null),(u=n.current)==null||u.getTracks().forEach(i=>i.stop()),n.current=null;try{(a=te.current)==null||a.close()}catch{}te.current=null;try{(x=_.current)==null||x.close()}catch{}_.current=null,p.current=null,I.current=null,L(0),E(0),F(0),v(0),d("idle"),B.current=!1},[]),G=r.useCallback(()=>{try{H.current=H.current||new Audio(St),H.current.currentTime=0,H.current.play().catch(()=>{})}catch{}try{mt()}catch{}Z(),j()},[Z,j]);return r.useEffect(()=>{Q();const u=a=>{a.key==="Escape"&&G()};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u),Z()}},[]),e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 animate-fadeIn",children:e.jsxs("div",{className:"relative bg-white dark:bg-zinc-900 rounded-2xl shadow-2xl w-[460px] max-w-[92vw] p-5 sm:p-6 flex flex-col items-center",children:[e.jsx("button",{onClick:G,className:"absolute top-3 right-3 p-1.5 text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 transition","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),e.jsxs("h2",{className:"text-lg font-semibold text-zinc-800 dark:text-zinc-100",children:[m," HR on Call"]}),e.jsx("p",{className:"mt-1 text-xs text-zinc-500",children:"Talk anytime."}),e.jsx("div",{className:`mt-3 text-xs px-3 py-1 rounded-full ${o==="starting"?"bg-amber-100 text-amber-700":o==="running"?"bg-emerald-100 text-emerald-700":o==="error"?"bg-rose-100 text-rose-700":"bg-zinc-100 text-zinc-600"}`,"aria-live":"polite",children:o==="starting"?w:o==="running"?R?"Connected":"Live":o==="error"?"Connection failed":"Idle"}),e.jsxs("div",{className:"mt-5 grid grid-cols-2 gap-4 w-full",children:[e.jsx(Pe,{label:"You",level:O}),e.jsx(Pe,{label:m,level:D})]}),e.jsx("div",{className:"mt-5 w-full",children:e.jsx(Mt,{energy:W})}),e.jsx("div",{className:"mt-6 flex items-center gap-3 w-full",children:o==="running"?e.jsx("button",{onClick:G,className:"flex-1 px-4 py-2.5 bg-rose-500 hover:bg-rose-600 text-white font-medium rounded-lg shadow-md transition",children:"End Call"}):o==="starting"?e.jsx("button",{disabled:!0,className:"flex-1 px-4 py-2.5 bg-zinc-200 text-zinc-600 rounded-lg shadow-inner cursor-not-allowed",children:e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(Rt,{})," ",w]})}):o==="error"?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:Q,className:"flex-1 px-4 py-2.5 bg-emerald-500 hover:bg-emerald-600 text-white font-medium rounded-lg shadow-md transition",children:"Retry"}),e.jsx("button",{onClick:G,className:"px-4 py-2.5 bg-zinc-100 hover:bg-zinc-200 text-zinc-700 rounded-lg transition",children:"Close"})]}):e.jsx("button",{onClick:Q,className:"flex-1 px-4 py-2.5 bg-emerald-500 hover:bg-emerald-600 text-white font-medium rounded-lg shadow-md transition",children:"Start Call"})}),(o==="starting"||o==="running")&&e.jsx("button",{onClick:G,className:"mt-3 text-sm text-zinc-500 hover:text-rose-500 underline transition",children:"Cancel"})]})})}function Rt(){return e.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeWidth:"4",className:"opacity-25"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M4 12a8 8 0 018-8v8H4z",className:"opacity-75"})]})}function Pe({label:s,level:c}){const m=Math.round(c*100);return e.jsxs("div",{className:"rounded-xl border border-zinc-200 dark:border-zinc-800 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs mb-2",children:[e.jsx("span",{className:"text-zinc-500",children:s}),e.jsxs("span",{className:"tabular-nums text-zinc-400",children:[m,"%"]})]}),e.jsx("div",{className:"h-2.5 rounded-full bg-zinc-100 dark:bg-zinc-800 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${m}%`,boxShadow:c>.05?`0 0 ${8+c*14}px rgba(59,130,246,0.6)`:"none",background:s==="You"?"linear-gradient(90deg, #34d399, #10b981)":"linear-gradient(90deg, #60a5fa, #6366f1)"}})})]})}function Mt({energy:s}){const c=r.useRef(null),m=r.useRef(null),j=r.useRef(0),o=r.useRef(8),d=r.useRef(),w=r.useCallback(()=>{const O=8+s*48;o.current+=(O-o.current)*.22;const L=1.6+s*1.2,D=.12+s*.45,E=$e(1e3,100,50,o.current,L,j.current),z=$e(1e3,100,50,o.current*.9,L*1.03,j.current+Math.PI/2);c.current&&(c.current.setAttribute("d",E),c.current.setAttribute("stroke-width",String(2+s*2.5)),c.current.setAttribute("op
16acity",String(.65+s*.35))),m.current&&(m.current.setAttribute("d",z),m.current.setAttribute("stroke-width",String(1.5+s*1.5)),m.current.setAttribute("opacity",String(.35+s*.35))),j.current+=D,d.current=requestAnimationFrame(w)},[s]);return r.useEffect(()=>(d.current=requestAnimationFrame(w),()=>{d.current&&cancelAnimationFrame(d.current)}),[w]),e.jsx("div",{className:"w-full h-28 relative",children:e.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 1000 100",preserveAspectRatio:"none",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"waveGrad1",x1:"0",y1:"0",x2:"1",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"#22d3ee"}),e.jsx("stop",{offset:"50%",stopColor:"#6366f1"}),e.jsx("stop",{offset:"100%",stopColor:"#a855f7"})]}),e.jsxs("linearGradient",{id:"waveGrad2",x1:"0",y1:"0",x2:"1",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"#67e8f9"}),e.jsx("stop",{offset:"50%",stopColor:"#93c5fd"}),e.jsx("stop",{offset:"100%",stopColor:"#d8b4fe"})]}),e.jsxs("filter",{id:"waveGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[e.jsx("feGaussianBlur",{stdDeviation:"3",result:"blur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"blur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),e.jsx("path",{ref:c,fill:"none",stroke:"url(#waveGrad1)",filter:"url(#waveGlow)"}),e.jsx("path",{ref:m,fill:"none",stroke:"url(#waveGrad2)"})]})})}function $e(s,c,m,j,o,d){let A="";for(let R=0;R<=64;R++){const U=R/64,O=U*s,L=m+Math.sin(U*o*2*Math.PI+d)*j;A+=(R===0?"M":"L")+O.toFixed(2)+" "+L.toFixed(2)+" "}return A}const At="db2npjq4o",Dt="my_upload",Et=({jobId:s,role:c,company:m,onClose:j})=>{const[o,d]=r.useState([]),[w,A]=r.useState(""),[R,U]=r.useState(null),[O,L]=r.useState(!1),[D,E]=r.useState(!1),[z,F]=r.useState(null),[W,v]=r.useState(!1),[n,p]=r.useState(null),[I,T]=r.useState(null),[J,H]=r.useState(!1),[te,_]=r.useState(!1),[ie,B]=r.useState(""),[N,V]=r.useState(!1),[oe,Y]=r.useState(!1),[K,ce]=r.useState([]),X=r.useRef(null),Q=r.useRef(null),Z=r.useRef(null),G=()=>{var t;return(t=X.current)==null?void 0:t.scrollIntoView({behavior:"smooth"})};r.useEffect(G,[o]);const u=()=>{j&&j()};He.useEffect(()=>{const t=l=>l.key==="Escape"&&u();return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),r.useEffect(()=>{if(o.length===0){const t={id:"greeting",content:`Hi! Iâm your interviewer for the **${c}** position at **${m}**. 17Letâs start with a quick warm-up: 18> *âTell me a little about yourself and why youâre interested in this role.â*`,sender:"ai",timestamp:new Date().toISOString(),type:"text"};d([t])}},[]);const a=async t=>{const l=new FormData;return l.append("file",t),l.append("upload_preset",Dt),(await(await fetch(`https://api.cloudinary.com/v1_1/${At}/${t.type.startsWith("image/")?"image":"raw"}/upload`,{method:"POST",body:l})).json()).secure_url},x=()=>{I&&URL.revokeObjectURL(I),p(null),T(null)},i=async()=>{try{const t=await le.post(`/mokInterviewr/all-mock-interviewed?jobId=${encodeURIComponent(s)}`);ce(Array.isArray(t)?t:(t==null?void 0:t.data)??[])}catch(t){console.error("Failed to load topics",t)}},k=({blob:t,onDelete:l})=>{const h=r.useRef(null),b=r.useRef(null),[f,M]=r.useState(!1),[g,q]=r.useState(0),[S,P]=r.useState(0);r.useEffect(()=>{if(!b.current)return;const y=dt.create({container:b.current,waveColor:"#6366f1",progressColor:"#4f46e5",cursorColor:"#4338ca",barWidth:2,barRadius:3,cursorWidth:1,height:10,barGap:2,responsive:!0});return y.load(URL.createObjectURL(t)),y.on("ready",()=>q(y.getDuration())),y.on("audioprocess",()=>P(y.getCurrentTime())),y.on("finish",()=>M(!1)),h.current=y,()=>y.destroy()},[t]);const me=()=>{h.current&&(h.current.playPause(),M(!f))},he=y=>`${Math.floor(y/60)}:${`${Math.floor(y%60)}`.padStart(2,"0")}`;return e.jsxs("div",{className:"flex flex-col bg-gray-100 dark:bg-gray-700 rounded-lg p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("button",{onClick:me,className:"p-1.5 rounded-full bg-blue-500 text-white",children:f?e.jsx(Ye,{size:16}):e.jsx(Ke,{size:16})}),e.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[he(S)," / ",he(g)]})]}),e.jsx("button",{onClick:l,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600",children:e.jsx(ae,{size:16})})]}),e.jsx("div",{ref:b})]})},de=({onSend:t,onCancel:l,onRecordingComplete:h})=>{const[b,f]=r.useState(!0),[M,g]=r.useState(null),[q,S]=r.useState(0),P=r.useRef();r.useEffect(()=>(navigator.mediaDevices.getUserMedia({audio:!0}).then(y=>{const ge=new Ee(y,{type:"audio",mimeType:"audio/wav",recorderType:Ee.StereoAudioRecorder,desiredSampRate:16e3});ge.startRecording(),g(ge),P.current=setInterval(()=>S(Be=>Be+1),1e3)}).catch(()=>{ke.fire("Microphone access denied"),l()}),()=>{P.current&&clearInterval(P.current)}),[l]);const me=()=>{M&&(P.current&&clearInterval(P.current),M.stopRecording(()=>{h(M.getBlob()),f(!1);const y=M.stream;
18y&&y.getTracks().forEach(ge=>ge.stop())}))},he=y=>`${Math.floor(y/60)}:${String(y%60).padStart(2,"0")}`;return e.jsxs("div",{className:"flex items-center justify-between px-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full animate-pulse"}),e.jsx("span",{className:"text-sm",children:"Recording"}),e.jsx("span",{className:"text-sm font-mono",children:he(q)})]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("button",{onClick:()=>{l(),me()},className:"p-1.5 rounded-full hover:bg-gray-200",children:e.jsx(ae,{size:18})}),e.jsx("button",{onClick:()=>{me(),t()},className:"p-1.5 rounded-full hover:bg-gray-200",children:e.jsx(Ve,{size:18})})]})]})},ue=async t=>{try{const l=await le.post(`/mokInterviewr/get-mock-conversation?convId=${encodeURIComponent(t)}`),h=Array.isArray(l)?l:(l==null?void 0:l.data)??[],b=[];h.forEach((f,M)=>{f.userResponse&&b.push({id:`u-${M}`,content:f.userResponse,sender:"user",timestamp:f.createdAt||new Date().toISOString(),type:"text"}),f.aiResponse&&b.push({id:`a-${M}`,content:f.aiResponse,sender:"ai",timestamp:f.createdAt||new Date().toISOString(),type:"text"})}),d(b),U(t),_(!1)}catch(l){console.error("Failed to load conversation",l)}};r.useEffect(()=>{i()},[s]);const se=async()=>{var M;const t=w.trim();if(!t&&!z&&!n||W)return;let l=null;if(n&&(v(!0),l=await a(n),v(!1),!l)){ke.fire("File upload failed");return}const h={id:Date.now().toString(),content:t,sender:"user",timestamp:new Date().toISOString(),type:z?"audio":n?n.type.startsWith("image/")?"image":"file":"text",fileUrl:l??void 0,fileName:n==null?void 0:n.name,audioBlob:z??void 0,imageUrl:n!=null&&n.type.startsWith("image/")?l??void 0:void 0};d(g=>[...g,h]),A(""),x(),F(null);const b={id:`loading-${Date.now()}`,content:"",sender:"loading",timestamp:new Date().toISOString(),type:"text"};d(g=>[...g,b]),L(!0);const f=new FormData;f.append("jobId",s),f.append("role",c),f.append("query",t),R&&f.append("convId",R),l&&f.append("imageUrl",l),z&&f.append("file",z,"voice.wav");try{const g=await le.post("/mokInterviewr/mock-interviewer",f,{headers:{"Content-Type":"multipart/form-data"}});if(d(S=>S.filter(P=>P.id!==b.id)),(g==null?void 0:g.status)==="220"||(g==null?void 0:g.status)==="error"){let S="Free plan limit reached. Please upgrade to continue.";try{typeof g.message=="string"?S=JSON.parse(g.message).message||S:(M=g.message)!=null&&M.message&&(S=g.message.message)}catch{}B(S),V(!0);return}const q={id:(Date.now()+1).toString(),content:g.reply,sender:"ai",timestamp:new Date().toISOString(),type:"text"};d(S=>[...S,q]),!R&&g.convId&&(U(g.convId),i())}catch{d(S=>S.filter(P=>P.id!==b.id));const q={id:Date.now().toString(),content:"Sorry, an error occurred. Please try again.",sender:"ai",timestamp:new Date().toISOString(),type:"text"};d(S=>[...S,q])}finally{L(!1)}},xe=()=>se(),pe=()=>se(),re=()=>{E(!1),F(null)},be=t=>{F(t),E(!1)},ye=()=>E(t=>!t),$=t=>{var h;const l=(h=t.target.files)==null?void 0:h[0];l&&(p(l),T(URL.createObjectURL(l)),H(!1))},Fe=()=>{U(null),d([])},We=t=>{if(t.sender==="loading")return e.jsxs("div",{className:"flex items-center space-x-2 px-4 py-3",children:[e.jsx("span",{className:"text-sm font-medium",children:"Interview bot is thinking"}),e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce delay-150"}),e.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce delay-300"})]})]});
18if(t.type==="audio"&&t.audioBlob)return e.jsx(k,{blob:t.audioBlob,onDelete:re});if(t.type==="image"&&t.imageUrl)return e.jsxs("div",{className:"p-2",children:[t.content&&e.jsx("p",{className:"text-sm mb-2",children:t.content}),e.jsx("img",{src:t.imageUrl,alt:"upload",className:"rounded-md max-h-64 object-contain"})]});if((t.type==="pdf"||t.type==="file")&&t.fileUrl)return e.jsxs("div",{className:"p-2",children:[t.content&&e.jsx("p",{className:"text-sm mb-2",children:t.content}),e.jsxs("div",{className:"border rounded-md p-3 bg-gray-50 dark:bg-gray-800",children:[e.jsx(fe,{size:20,className:"mr-2 inline"}),e.jsx("a",{href:t.fileUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:t.fileName})]})]});if(t.content.includes("```")){const l=t.content.split(/(```[\s\S]*?```)/);return e.jsx("div",{className:"px-4 py-3",children:l.map((h,b)=>h.startsWith("```")?e.jsx("div",{className:"my-2",children:e.jsx(it,{style:ot.atomDark,language:"javascript",wrapLongLines:!0,children:h.slice(3,-3)})},b):e.jsx(Ie,{remarkPlugins:[Le],children:h},b))})}return e.jsx("div",{className:"px-4 py-3",children:e.jsx(Ie,{remarkPlugins:[Le],children:t.content})})};return e.jsxs("div",{className:"fixed inset-0 bg-black/60 z-[100] flex items-center justify-center",children:[e.jsxs("div",{className:"w-full h-full max-w-5xl max-h-[90vh] bg-white dark:bg-gray-800 rounded-xl shadow-2xl flex flex-col",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-r from-blue-500 to-purple-500 flex items-center justify-center",children:e.jsx(je,{size:22,className:"text-white"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"font-semibold",children:[m," HR Â ",e.jsxs("span",{className:"text-xs",children:[e.jsx(Nt,{size:20,className:"inline-block text-green-500"}),"online"]})]}),e.jsx("span",{className:"text-xs text-gray-500",children:c})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ut,{}),e.jsx("button",{onClick:u,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:e.jsx(ae,{size:20})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[o.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[e.jsx(je,{size:48,className:"text-blue-500 mb-4"}),e.jsx("h2",{className:"text-xl font-bold mb-2",children:"Ready for your interview?"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Type or record your answer below."})]}),o.map(t=>e.jsx("div",{className:`flex ${t.sender==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`flex items-start space-x-3 max-w-3xl ${t.sender==="user"?"flex-row-reverse space-x-reverse":""}`,children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${t.sender==="user"?"bg-gradient-to-r from-blue-500 to-purple-500":"bg-gray-200 dark:bg-gray-700"}`,children:t.sender==="user"?e.jsx(_e,{size:16,className:"text-white"}):e.jsx(je,{size:16,className:"text-gray-700 dark:text-gray-300"})}),e.jsx("div",{className:`rounded-2xl shadow-sm overflow-hidden ${t.sender==="user"?"bg-gradient-to-r from-blue-500 to-purple-500 text-white":"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100"}`,children:We(t)})]})},t.id)),e.jsx("div",{ref:X})]}),e.jsx("div",{className:"relative px-2 py-2 border-gray-200 dark:border-gray-700 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:e.jsxs("div",{className:"px-4 py-3 border border-gray-200 dark:border-gray-700 rounded-2xl",children:[D&&e.jsx(de,{onSend:pe,onCancel:re,onRecordingComplete:be}),z&&!D&&e.jsx("div",{className:"mb-3",children:e.jsx(k,{blob:z,onDelete:re})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex-1 relative",children:[n&&e.jsxs("div",{className:"mb-2 relative w-full p-2 border border-gray-300 dark:border-gray-600 rounded-lg flex items-center justify-between bg-gray-50 dark:bg-gray-700",children:[I&&n.type.startsWith("image/")?e.jsx("img",{src:I,alt:"preview",className:"max-h-16 object-contain rounded-md"}):e.jsxs("div",{className:"flex items-center gap-2 text-gray-600 dark:text-gray-300",children:[e.jsx(fe,{size:20}),e.jsx("span",{className:"text-sm truncate",children:n.name})]}),W&&e.jsxs("div",{className:"flex items-center text-gray-500 dark:text-gray-400 text-xs ml-auto",children:[e.jsx("span",{className:"dot-animate w-2 h-2 rounded-full bg-blue-600"}),e.jsx("span",{className:"dot-animate w-2 h-2 rounded-full bg-blue-600 mx-0.5",style:{animationDelay:"150ms"}}),e.jsx("span",{className:"dot-animate w-2 h-2 rounded-full bg-blue-600",style:{animationDelay:"300ms"}}),e.jsx("span",{className:"ml-1",children:"Uploading..."})]}),e.jsx("button",{onClick:x,className:"ml-2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-500 dark:text-gray-400","aria-label":"Remove uploaded file",children:e.jsx(ae,{size:16})})]}),e.jsx("textarea",{value:w,onChange:t=>{A(t.target.value),t.target.style.height="auto",t.target.style.height=`${t.target.scrollHeight}px`},onKeyDown:t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),xe())},onPaste:t=>{t.preventDefault();const l=t.clipboardData.getData("text/plain"),h=t.target,b=h.selectionStart,f=h.selectionEnd,M=w.substring(0,b)+l+w.substring(f);A(M),setTimeout(()=>{const g=b+l.length;h.selectionStart=g,h.selectionEnd=g,h.style.height="auto",h.style.height=`${h.scrollHeight}px`},0)},placeholder:!w&&!D?`Message for ${c} interview...`:void 0,className:"w-full pl-4 pr-4 py-2.5 hiddenScroll roun
18ded-lg outline-none bg-white dark:bg-transparent text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 disabled:opacity-50 disabled:cursor-not-allowed overflow-y-auto max-h-48 min-h-[44px] whitespace-pre-wrap resize-none",rows:1,disabled:O||D})]}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsxs("div",{className:"relative flex items-center",children:[e.jsx(ne,{content:"New Chat",maxWidth:"w-24",position:"right",children:e.jsx("button",{onClick:Fe,className:"p-2.5 dark:hover:bg-gray-700 rounded-lg text-gray-600 dark:text-gray-400 transition-colors",children:e.jsx(ct,{size:20})})}),e.jsx(ne,{content:"Upload",children:e.jsx("button",{onClick:()=>H(t=>!t),className:"p-2.5 dark:hover:bg-gray-700 rounded-lg text-gray-600 dark:text-gray-400 transition-colors","aria-label":"Upload options",disabled:W||D,children:e.jsx(Ge,{size:20})})}),J&&e.jsxs("div",{className:"absolute bottom-full left-0 mb-2 w-48 bg-white dark:bg-gray-700 rounded-lg shadow-lg py-2 z-10",children:[e.jsxs("button",{onClick:()=>{var t;return(t=Z.current)==null?void 0:t.click()},className:"flex items-center px-4 py-2 text-gray-800 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 w-full text-left",children:[e.jsx(ht,{size:18,className:"mr-2"})," Upload Image"]}),e.jsx("input",{type:"file",ref:Z,className:"hidden",accept:"image/*",onChange:$}),e.jsxs("button",{onClick:()=>{var t;return(t=Q.current)==null?void 0:t.click()},className:"flex items-center px-4 py-2 text-gray-800 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 w-full text-left",children:[e.jsx(fe,{size:18,className:"mr-2"})," Upload File"]}),e.jsx("input",{type:"file",ref:Q,className:"hidden",onChange:$})]}),e.jsx(ne,{content:"History",maxWidth:"w-28",children:e.jsx("button",{onClick:()=>{i(),_(!0)},className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:"Conversation History",children:e.jsx(gt,{size:20,className:"text-gray-500 dark:text-gray-400"})})}),e.jsx(ne,{content:"Voice Call",maxWidth:"w-28",children:e.jsx("button",{onClick:()=>Y(!0),title:"Start voice call",className:"h-8 w-8 flex justify-center items-center rounded-full bg-gray-300/20 dark:bg-gray-600 shadow-sm",children:e.jsx(qe,{size:18,className:"text-red-600"})})})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(ne,{content:"Audio Record",position:"left",maxWidth:"w-32",children:e.jsx("button",{onClick:ye,className:`p-2.5 rounded-lg transition-colors ${D?"bg-red-500 hover:bg-red-600 text-white":"bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-600 dark:text-gray-400"}`,"aria-label":D?"Stop recording":"Start recording",children:e.jsx(ft,{size:20})})}),e.jsx("button",{onClick:xe,className:"p-2.5 bg-blue-600 hover:bg-blue-700 rounded-lg text-white transition-colors","aria-label":"Send message",disabled:W||D||!w.trim()&&!n&&!z,children:e.jsx(Je,{size:20})})]})]})]})]})}),oe&&e.jsx(Ct,{agentId:"9586dc65-41e9-4f22-99c2-3df8063ba9ab",jobId:s,company:m,onClose:()=>Y(!1)}),te&&e.jsx("div",{className:"fixed inset-0 z-[110] bg-black/60 flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-2xl bg-white dark:bg-gray-800 rounded-xl shadow-xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[e.jsx("h3",{className:"font-semibold",children:"Conversation History"}),e.jsx("button",{onClick:()=>_(!1),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:e.jsx(ae,{size:18})})]}),e.jsxs("div",{className:"max-h-[60vh] overflow-y-auto divide-y divide-gray-200 dark:divide-gray-700",children:[K.length===0&&e.jsx("div",{className:"p-4 text-sm text-gray-500",children:"No previous conversations for this job."}),K.map(t=>e.jsx("button",{onClick:()=>ue(t.id),className:`w-full text-left px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700 ${R===t.id?"bg-blue-50 dark:bg-blue-900/20":""}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:t.topic||"general"}),e.jsxs("div",{className:"text-xs text-gray-500",children:[new Date(t.createdAt).toLocaleStr
18ing()," â¢"," ",t.isClosed?"Closed":"Open"]})]}),R===t.id&&e.jsx("span",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Active"})]})},t.id))]})]})})]}),e.jsx(Oe,{isOpen:N,onClose:()=>V(!1),userLocation:"IN",errorMessage:ie})]})},ee=({title:s,icon:c,children:m,className:j=""})=>e.jsxs("div",{className:`bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-blue-100 dark:border-gray-700 ${j}`,children:[e.jsxs("h2",{className:"text-xl font-semibold text-gray-800 dark:text-gray-100 mb-4 flex items-center",children:[c&&e.jsx("span",{className:"mr-2 text-blue-600 dark:text-blue-400",children:c}),s]}),m]}),ve=({title:s,icon:c,children:m,defaultOpen:j=!0})=>{const[o,d]=r.useState(j);return e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-blue-100 dark:border-gray-700",children:[e.jsxs("button",{className:"flex items-center justify-between w-full text-left",onClick:()=>d(!o),children:[e.jsxs("h2",{className:"text-xl font-semibold text-gray-800 dark:text-gray-100 flex items-center",children:[c&&e.jsx("span",{className:"mr-2 text-blue-600 dark:text-blue-400",children:c}),s]}),o?e.jsx(nt,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"}):e.jsx(lt,{className:"h-5 w-5 text-blue-500 dark:text-blue-400"})]}),o&&e.jsx("div",{className:"mt-4",children:m})]})},C=({icon:s,label:c,value:m})=>e.jsxs("div",{className:"flex items-start mb-3",children:[e.jsx("span",{className:"text-blue-600 dark:text-blue-400 mr-3 mt-1",children:s}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 block",children:c}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:m||"Not specified"})]})]}),It=s=>{if(s==null)return 0;if(typeof s.toNumber=="function")return s.toNumber();if(typeof s=="number")return s;const c=Number(s);return isNaN(c)?0:c},Kt=()=>{const[s,c]=r.useState(null),[m,j]=r.useState(!0),[o,d]=r.useState(null),[w,A]=r.useState(!1),[R,U]=r.useState(""),[O,L]=r.useState(!1),D=async v=>{var n;console.log("Checking eligibility for job ID:",v);try{const p=await le.post(`/jobs/check-job-elegibility?id=${v}`);if(console.log("Eligibility response:",p),p.status===220||p.status==="error"){let I="Free plan limit reached. Please upgrade to continue.";try{typeof p.message=="string"?I=JSON.parse(p.message).message||I:(n=p.message)!=null&&n.message&&(I=p.message.message)}catch(T){console.error("Error parsing error message:",T)}U(I),L(!0);return}console.log("Eligibility check passed")}catch(p){console.error("Error checking eligibility:",p)}},{id:E}=Xe(),z=Qe();r.useEffect(()=>{},[]),r.useEffect(()=>{if(w)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[w]);const F=async v=>{try{j(!0),d(null);const n=await le.post(`/jobs/get-job-data?id=${v}`);if(n.success){const p=Array.isArray(n.data)?n.data[0]:n.data;c(p),console.log(p)}else throw new Error("API returned unsuccessful response")}catch(n){d(n instanceof Error?n.message:"An unknown error occurred"),console.error("Error fetching job:",n)}finally{j(!1)}};if(r.useEffect(()=>{E&&F(E)},[E]),m)return e.jsx(Ze,{});if(o)return e.jsx("div",{className:"max-w-6xl mx-auto p-6",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 text-center shadow-sm border border-blue-100 dark:border-gray-700",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-800 dark:text-gray-100 mb-4",children:"Error Loading Job"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:o}),e.jsx("button",{onClick:()=>E&&F(E),className:"bg-blue-600 dark:bg-blue-700 text-white px-4 py-2 rounded-lg hover:bg-blue-700 dark:hover:bg-blue-800 transition-colors",children:"Try Again"})]})});if(!s)return e.jsx("div",{className:"max-w-6xl mx-auto p-6",children:e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 text-center shadow-sm border border-blue-100 dark:border-gray-700",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-800 dark:text-gray-100 mb-4",children:"Job Not Found"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"The requested job could not be found."})]})});const W=It(s.aiConfidenceScore);return e.jsxs("div",{children:[e.jsxs("div",{className:"max-w-6xl mx-auto
18space-y-6 dark:bg-gray-850 min-h-screen",children:[e.jsxs("button",{onClick:()=>z(-1),className:"flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 mb-4 font-medium",children:[e.jsx(et,{className:"h-5 w-5 mr-2"}),"Back to Jobs"]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-blue-700 dark:from-blue-700 dark:to-blue-800 rounded-xl p-6 text-white shadow-md",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold mb-2",children:s.title}),e.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[e.jsxs("span",{className:"flex items-center bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm",children:[e.jsx(tt,{className:"h-4 w-4 mr-1"}),s.sourceName]}),e.jsxs("span",{className:"flex items-center bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm",children:[e.jsx(Se,{className:"h-4 w-4 mr-1"}),s.locations.join(", ")||"Not specified"]}),e.jsxs("span",{className:"flex items-center bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm",children:[e.jsx(Ce,{className:"h-4 w-4 mr-1"}),s.employeeType||"Not specified"]})]})]}),e.jsxs("div",{children:[e.jsxs("a",{href:s.jobDetailUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-white text-blue-700 dark:bg-gray-800 dark:text-blue-300 px-5 py-3 rounded-lg font-medium hover:bg-blue-50 dark:hover:bg-gray-700 transition-all shadow-sm whitespace-nowrap",children:["Apply Now",e.jsx(st,{className:"h-4 w-4 ml-2"})]}),e.jsx("button",{onClick:()=>A(!0),style:{marginTop:"10px"},className:"inline-flex items-center justify-center bg-gradient-to-r from-indigo-800 to-purple-900 text-white px-5 py-3 rounded-lg font-medium hover:bg-indigo-700 transition-all shadow-sm whitespace-nowrap mt-3 lg:mt-0",children:"Mock Interview"})]})]})}),e.jsx(ee,{title:"Job Overview",icon:e.jsx(we,{className:"h-5 w-5"}),children:e.jsx("p",{className:"text-gray-700 dark:text-gray-300 leading-relaxed",children:s.jobOverview})}),e.jsx(ve,{title:"Job Description",icon:e.jsx(fe,{className:"h-5 w-5"}),children:e.jsx("p",{className:"text-gray-700 dark:text-gray-300 leading-relaxed whitespace-pre-line",children:s.jobDescriptionClean})}),e.jsx(ve,{title:"Qualifications",icon:e.jsx(rt,{className:"h-5 w-5"}),children:e.jsx("p",{className:"text-gray-700 dark:text-gray-300 leading-relaxed whitespace-pre-line",children:s.qualificationClean})}),s.skillsWorkday&&s.skillsWorkday.length>0&&e.jsx(ve,{title:"Required Skills",icon:e.jsx(ze,{className:"h-5 w-5"}),children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.skillsWorkday.map((v,n)=>e.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-3 py-2 rounded-lg text-sm font-medium border border-blue-200 dark:border-blue-700",children:v},n))})})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ee,{title:"Job Fitness",icon:e.jsx(Me,{className:"h-5 w-5"}),className:"bg-gradient-to-br from-indigo-100 to-purple-200 dark:from-slate-800/60 dark:to-slate-900/60",children:[e.jsx(C,{icon:e.jsx(Re,{className:"h-5 w-5"}),label:"Fit Score",value:W===0?e.jsx("button",{onClick:()=>D(s.id),className:"bg-blue-600 hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-800 text-white px-3 py-1 rounded text-sm font-medium transition-colors",children:"Check Eligibility"}):e.jsx("div",{className:"flex items-center",children:e.jsxs("span",{className:"font-semibold text-blue-700 dark:text-blue-400",children:[W,"%"]})})}),e.jsx(C,{icon:e.jsx(ze,{className:"h-5 w-5"}),label:"AI Analysis",value:e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:s.aiReason})})]}),e.jsxs(ee,{title:"Job Details",icon:e.jsx(Me,{className:"h-5 w-5"}),children:[e.jsx(C,{icon:e.jsx(Re,{className:"h-5 w-5"}),label:"Employee Type",value:s.employeeType}),e.jsx(C,{icon:e.jsx(pt,{className:"h-5 w-5"}),label:"Career Level",value:s.careerLevel}),e.jsx(C,{icon:e.jsx(bt,{className:"h-5 w-5"}),label:"Job Type",value:s.jobTypeDescription}),e.jsx(C,{icon:e.jsx(Se,{className:"h-5 w-5"}),label:"Location",value:s.locations.join(", ")}),e.jsx(C,{icon:e.jsx(Ae,{className:"h-5 w-5"}),label:"Country",value:s.country}),e.jsx(C,{icon:e.jsx(Ce,{className:"h-5 w-5"}),label:"Experience",value:s.yearsOfExperienceMin||s.yearsOfExperienceMa
18x?`${s.yearsOfExperienceMin||"0"} - ${s.yearsOfExperienceMax||"N/A"} years`:"Not specified"}),e.jsx(C,{icon:e.jsx(De,{className:"h-5 w-5"}),label:"Business Area",value:s.businessArea})]}),e.jsxs(ee,{title:"Requirements",icon:e.jsx(at,{className:"h-5 w-5"}),children:[e.jsx(C,{icon:e.jsx(yt,{className:"h-5 w-5"}),label:"Education",value:s.education&&s.education.length>0?s.education.join(", "):"Not specified"}),e.jsx(C,{icon:e.jsx(Te,{className:"h-5 w-5"}),label:"Posted Date",value:new Date(s.scrapedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}),e.jsx(C,{icon:e.jsx(Te,{className:"h-5 w-5"}),label:"Last Updated",value:s.jobUpdateDate?new Date(s.jobUpdateDate).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"Not specified"})]}),s.compensationRanges&&s.compensationRanges.length>0&&e.jsx(ee,{title:"Compensation",icon:e.jsx(Ue,{className:"h-5 w-5"}),children:s.compensationRanges.map((v,n)=>e.jsx(C,{icon:e.jsx(Ue,{className:"h-5 w-5"}),label:`Compensation (${v.period})`,value:v.amountMin&&v.amountMax?`${v.amountMin} - ${v.amountMax}`:"Not disclosed"},n))}),e.jsxs(ee,{title:"Additional Information",icon:e.jsx(we,{className:"h-5 w-5"}),children:[e.jsx(C,{icon:e.jsx(Ae,{className:"h-5 w-5"}),label:"Source Domain",value:e.jsx("a",{href:`https://${s.sourceDomain}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline font-medium",children:s.sourceDomain})}),e.jsx(C,{icon:e.jsx(we,{className:"h-5 w-5"}),label:"Job Family",value:s.jobFamilyGroup&&s.jobFamilyGroup.length>0?s.jobFamilyGroup.join(", "):"Not specified"}),e.jsx(C,{icon:e.jsx(De,{className:"h-5 w-5"}),label:"Functions",value:s.functionList&&s.functionList.length>0?s.functionList.join(", "):"Not specified"})]})]})]})]}),w&&e.jsx(Et,{jobId:s.id,company:s.sourceName,role:s.title,onClose:()=>A(!1)}),e.jsx(Oe,{isOpen:O,onClose:()=>L(!1),userLocation:"IN",errorMessage:R})]})};export{Kt 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.