PageSourceSearch

https://careerdiary.io/assets/CareerDiaryPage-X49wOAd_.js

js careerdiary.io collected 2026-09-24 15:03:37 UTC 99,513 bytes, 8 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/gcsStorageService-CfuPNSR4.js","assets/index-CGKNpi9E.js","assets/animation-CddyXVCz.js","assets/react-vendor-CbN3pvl2.js","assets/supabase-iKSPld20.js","assets/docgen-Bp8WKBAE.js","assets/query-DPqpbKNH.js","assets/index-D2PKCkk9.css","assets/index-C7IeTs5z.js"])))=>i.map(i=>d[i]);
2import{R as Ee,j as e,r as h}from"./animation-CddyXVCz.js";import{aQ as ft,B as j,T as re,aH as Ae,X as $e,af as de,_ as ot,h as ae,S as oe,w as Ot,r as we,u as bt,aR as Yt,a5 as dt,L as Fe,aB as xe,z as Jt,aS as Zt,aT as Qt,aU as Xt,aV as ct,aW as Kt,aX as qt,l as es,U as mt,ag as ts,aY as ss,H as as,aZ as rs,a_ as ls,a$ as ns,ay as is,a1 as os,b0 as ds,v as cs,b1 as ms,b2 as xs,b3 as us,N as hs,s as ps,P as yt,D as gs,m as fs,b4 as bs,o as ys,p as vs,Q as js,b5 as Ns,b6 as ws}from"./index-CGKNpi9E.js";import{L as ks}from"./LocationInput-5wsh_pfJ.js";import{L as vt}from"./LocationAutocomplete-BN3Aw_CG.js";import{getCategoryIcon as Cs,getCategoryDisplayName as Ss}from"./documentCategorizationService-CgIkAT40.js";import{S as Is,p as Ue}from"./SuccessAnimation-D8qDTGT3.js";import{P as Ps}from"./PageWrapper-BunOBjUW.js";import{deleteFromGCS as Ds,uploadToGCS as Ts,getSignedUrl as Rs}from"./gcsStorageService-CfuPNSR4.js";import{d as zs,P as Ls}from"./PersonalizedEmptyState-DHLu2vFE.js";import{s as As}from"./downWeek-Dfl6cIKw.js";import{a as Es}from"./loggedWin-C0wQo753.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";import"./handoffSuggestions-raELPsOv.js";const xt=(a,r)=>{const n=a.length,o=r.length,m=Array(n+1).fill(null).map(()=>Array(o+1).fill(0));for(let t=1;t<=n;t++)for(let x=1;x<=o;x++)a[t-1]===r[x-1]?m[t][x]=m[t-1][x-1]+1:m[t][x]=Math.max(m[t-1][x],m[t][x-1]);const i=[];let d=n,p=o;for(;d>0||p>0;)if(d>0&&p>0&&a[d-1]===r[p-1])i.unshift({value:a[d-1]}),d--,p--;else if(p>0&&(d===0||m[d][p-1]>=m[d-1][p]))i.unshift({value:r[p-1],added:!0}),p--;else if(d>0&&(p===0||m[d][p-1]<m[d-1][p]))i.unshift({value:a[d-1],removed:!0}),d--;else break;return i},Fs=(a,r)=>{const n=a.split(`
3`),o=r.split(`
4`),m=xt(n,o),i=/(\s+)/,d=[];let p=1,t=1,x=0;for(;x<m.length;){const w=m[x],b=m[x+1];if(w.removed&&b&&b.added){const C=xt(w.value.split(i),b.value.split(i)),f=C.filter(T=>!T.added),k=C.filter(T=>!T.removed);d.push({left:{parts:f,lineNumber:p++,isChange:!0},right:{parts:k,lineNumber:t++,isChange:!0}}),x+=2}else w.removed?(d.push({left:{parts:[{value:w.value}],lineNumber:p++,isChange:!0}}),x++):w.added?(d.push({right:{parts:[{value:w.value}],lineNumber:t++,isChange:!0}}),x++):(d.push({left:{parts:[{value:w.value}],lineNumber:p++,isChange:!1},right:{parts:[{value:w.value}],lineNumber:t++,isChange:!1}}),x++)}return d},Ne=({data:a})=>{const r="px-3 py-1 whitespace-pre-wrap break-words",n=a!=null&&a.isChange?a.parts.some(o=>o.removed)?"bg-red-50 dark:bg-red-900/30":"bg-green-50 dark:bg-green-900/30":"";return a?e.jsx("td",{className:`${r} ${n} text-gray-900 dark:text-slate-100`,children:a.parts.map((o,m)=>{let i="";return o.added&&(i="bg-green-300 dark:bg-green-600/50 text-green-900 dark:text-green-100 px-0.5 rounded"),o.removed&&(i="bg-red-300 dark:bg-red-600/50 text-red-900 dark:text-red-100 px-0.5 rounded line-through"),o.value===""?e.jsx("span",{children:" "},m):e.jsx("span",{className:i,children:o.value},m)})}):e.jsx("td",{className:`${r} bg-gray-50 dark:bg-slate-900/30`})},Us=({originalText:a,newText:r})=>{const n=Ee.useMemo(()=>Fs(a,r),[a,r]);return e.jsxs("div",{className:"w-full h-full min-h-[400px] border border-gray-300 dark:border-slate-600 rounded-lg overflow-hidden bg-white dark:bg-slate-800 flex flex-col",children:[e.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-300 dark:border-slate-600 bg-gray-50 dark:bg-slate-900/50",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs font-semibold text-gray-500 dark:text-slate-400 uppercase tracking-wide",children:"Before & After Comparison"})})}),e.jsxs("div",{className:"hidden lg:flex flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex-1 border-r border-gray-300 dark:border-slate-600 flex flex-col overflow-hidden",children:[e.jsx("div",{className:"px-4 py-2 bg-red-50 dark:bg-red-900/20 border-b border-gray-300 dark:border-slate-600",children:e.jsxs("h3",{className:"text-sm font-semibold text-red-700 dark:text-red-400 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Original Resume"]})}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("table",{className:"min-w-full text-sm border-collapse",style:{fontFamily:"monospace, monospace"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"50px"}}),e.jsx("col",{})]}),e.jsx("tbody",{children:n.map((o,m)=>{var i;return e.jsxs("tr",{children:[e.jsx("td",{className:"w-12 text-right pr-3 py-0.5 bg-gray-50 dark:bg-slate-900/50 text-gray-400 dark:text-slate-500 select-none border-r border-gray-200 dark:border-slate-700 sticky left-0 z-10",children:((i=o.left)==null?void 0:i.lineNumber)||""}),e.jsx(Ne,{data:o.left})]},m)})})]})})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx("div",{className:"px-4 py-2 bg-green-50 dark:bg-green-900/20 border-b border-gray-300 dark:border-slate-600",children:e.jsxs("h3",{className:"text-sm font-semibold text-green-700 dark:text-green-400 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Tailored Resume"]})}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("table",{className:"min-w-full text-sm border-collapse",style:{fontFamily:"monospace, monospace"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"50px"}}),e.jsx("col",{})]}),e.jsx("tbody",{children:n.map((o,m)=>{var i;return e.jsxs("tr",{children:[e.jsx("td",{className:"w-12 text-right pr-3 py-0.5 bg-gray-50 dark:bg-slate-900/50 text-gray-400 dark:text-slate-500 select-none border-r border-gray-200 dark:border-slate-700 sticky left-0 z-10",children:((i=o.right)==null?void 0:i.lineNumber)||""}),e.jsx(Ne,{data:o.right})]},m)})})]})})]})]}),e.jsx("div",{className:"lg:hidden flex-1 overflow-auto",children:e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsxs("div",{className:"border border-red-200 dark:border-red-800/50 rounded-lg overflow-hidden bg-red-50/30 dark:bg-red-900/10",children:[e.jsx("div",{className:"px-4 py-2 bg-red-50 dark:bg-red-900/20 border-b border-red-200 dark:border-red-800/50",children:e.jsxs("h3",{className:"text-sm font-semibold text-red-700 dark:text-red-400 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Original Resume"]})}),e.jsx("div",{className:"p-3 overflow-x-auto",children:e.jsxs("table",{className:"min-w-full text-sm border-collapse",style:{fontFamily:"monospace, monospace"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"40px"}}),e.jsx("col",{})]}),e.jsx("tbody",{children:n.map((o,m)=>{var i;return e.jsxs("tr",{children:[e.jsx("td",{className:"w-10 text-right pr-2 py-0.5 bg-gray-50 dark:bg-slate-900/50 text-gray-400 dark:text-slate-500 select-none border-r border-gray-200 dark:border-slate-700",children:((i=o.left)==null?void 0:i.lineNumber)||""}),e.jsx(Ne,{data:o.left})]},`original-${m}`)})})]})})]}),e.jsxs("div",{className:"border border-green-200 dark:border-green-800/50 rounded-lg overflow-hidden bg-green-50/30 dark:bg-green-900/10",children:[e.jsx("div",{className:"px-4 py-2 bg-green-50 dark:bg-green-900/20 border-b border-green-200 dark:border-green-800/50",children:e.jsxs("h3",{className:"text-sm font-semibold text-green-700 dark:text-green-400 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Tailored Resume"]})}),e.jsx("div",{className:"p-3 overflow-x-auto",children:e.jsxs("table",{className:"min-w-full text-sm border-collapse",style:{fontFamily:"monospace, monospace"},children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"40px"}}),e.jsx("col",{})]}),e.jsx("tbody",{children:n.map((o,m)=>{var i;return e.jsxs("tr",{children:[e.jsx("td",{className:"w-10 text-right pr-2 py-0.5 bg-gray-50 dark:bg-slate-900/50 text-gray-400 dark:text-slate-500 select-none border-r border-gray-200 dark:border-slate-700",children:((i=o.right)==null?void 0:i.lineNumber)||""}),e.jsx(Ne,{data:o.right})]},`tailored-${m}`)})})]})})]})]})})]})},$s=({filesByCategory:a,onDeleteFile:r,onSetDefaultFile:n,getFileIcon:o,formatFileSize:m,formatDate:i})=>{const[d,p]=h.useState(null),[t,x]=h.useState(null),[w,b]=h.useState(null),[C,f]=h.useState(null),[k,T]=h.useState(!1),[F,A]=h.useState(null),I=async z=>{if(p(z),x(null),b(null),f(null),A(null),!z.supabaseStoragePath){A("Preview not available for this file. Please re-upload to enable preview.");return}T(!0);try{const{getSignedUrl:g}=await ot(async()=>{const{getSignedUrl:V}=await import("./gcsStorageService-CfuPNSR4.js");return{getSignedUrl:V}},__vite__mapDeps([0,1,2,3,4,5,6,7])),N=await g(z.supabaseStoragePath,3600);x(N);const D=z.mimeType==="application/vnd.openxmlformats-officedocument.wordprocessingml.document",G=z.mimeType==="text/plain";if(D){const{default:V}=await ot(async()=>{const{default:L}=await import("./index-C7IeTs5z.js").then(W=>W.i);return{default:L}},__vite__mapDeps([8,3,5])),J=await fetch(N);if(!J.ok)throw new Error(`HTTP ${J.status}`);const q=await J.arrayBuffer(),ee=await V.convertToHtml({arrayBuffer:q});b(ee.value)}if(G){const V=await fetch(N);if(!V.ok)throw new Error(`HTTP ${V.status}`);const J=await V.text();f(J)}}catch(g){const N=g instanceof Error?g.message:"Unknown error";A(`Failed to load preview: ${N}`)}finally{T(!1)}},P=()=>{p(null),x(null),b(null),f(null),A(null)},R=()=>
4{if(t&&d){const z=document.createElement("a");z.href=t,z.download=d.displayName,document.body.appendChild(z),z.click(),document.body.removeChild(z)}},$=Object.keys(a),S=(d==null?void 0:d.mimeType)==="application/pdf",B=(d==null?void 0:d.mimeType)==="application/vnd.openxmlformats-officedocument.wordprocessingml.document",Y=(d==null?void 0:d.mimeType)==="text/plain";return $.length===0?e.jsxs("div",{className:"text-center py-12 border-2 border-dashed border-gray-200 dark:border-slate-700 rounded-2xl",children:[e.jsx(ft,{className:"h-16 w-16 mx-auto text-gray-300 dark:text-slate-600 mb-4"}),e.jsx("p",{className:"text-lg font-semibold text-gray-700 dark:text-slate-300 mb-2",children:"No documents yet"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"Upload your first document to get started"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-8",children:$.map(z=>{const g=(a[z]||[]).sort((N,D)=>N.isDefault?-1:D.isDefault?1:new Date(D.createTime).getTime()-new Date(N.createTime).getTime());return g.length===0?null:e.jsxs("div",{className:"animate-slideDown",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("span",{className:"text-2xl",children:Cs(z)}),e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-slate-200",children:Ss(z)}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-slate-400",children:["(",g.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 2xl:grid-cols-10 gap-4",children:g.map(N=>e.jsxs(j,{onClick:()=>I(N),variant:"ghost",className:"group relative flex flex-col items-center p-4 rounded-xl border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-800 hover:border-blue-400 dark:hover:border-blue-500 hover:shadow-lg transition-all duration-base hover:scale-105 cursor-pointer h-auto w-full border-none",children:[e.jsxs("div",{className:`mb-3 w-16 h-16 rounded-2xl flex items-center justify-center text-4xl shadow-sm group-hover:shadow-md transition-shadow relative ${N.isDefault?"bg-yellow-50 dark:bg-yellow-900/20 ring-2 ring-yellow-400":"bg-gradient-to-br from-blue-50 to-blue-50 dark:from-blue-900/30 dark:to-blue-900/30"}`,children:[o(N.mimeType),N.isDefault&&e.jsx("div",{className:"absolute -top-2 -right-2 bg-yellow-400 text-white p-1 rounded-full shadow-sm",title:"Default Resume",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-3 h-3",children:e.jsx("path",{fillRule:"evenodd",d:"M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401z",clipRule:"evenodd"})})})]}),e.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-slate-300 text-center truncate mb-2 w-full px-1",title:N.displayName,children:N.displayName}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 font-medium",children:m(N.sizeBytes)}),e.jsx(j,{onClick:D=>{D.stopPropagation(),r(N.name)},variant:"ghost",size:"sm",className:"absolute top-2 right-2 p-2 bg-white dark:bg-slate-800 rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900/20 h-auto border-none","aria-label":"Delete file",children:e.jsx(re,{className:"h-4 w-4 text-gray-400 hover:text-red-500"})}),z==="resumes"&&!N.isDefault&&e.jsx(j,{onClick:D=>{D.stopPropagation(),n(N.name)},variant:"ghost",size:"sm",className:"absolute top-2 left-2 p-2 bg-white dark:bg-slate-800 rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity hover:bg-yellow-50 dark:hover:bg-yellow-900/20 h-auto border-none","aria-label":"Set as Default",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4 text-gray-400 hover:text-yellow-500",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})})]},N.name))})]},z)})}),d&&e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4 animate-fadeIn backdrop-blur-sm",onClick:P,children:e.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-2xl shadow-2xl w-full max-w-5xl h-[90vh] flex flex-col",onClick:z=>z.stopPropagation(),style:{animation:"zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"},children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("span",{className:"text-3xl",children:o(d.mimeType)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white truncate",children:d.displayName}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:[m(d.sizeBytes)," • ",i(d.createTime)]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx(j,{onClick:()=>window.open(t,"_blank","noopener,noreferrer"),variant:"ghost",size:"sm",className:"p-2",title:"Open in new tab",children:e.jsx(Ae,{className:"h-5 w-5 rotate-90"})}),e.jsx(j,{onClick:R,variant:"ghost",size:"sm",className:"p-2",title:"Download",children:e.jsx(Ae,{className:"h-5 w-5"})})]}),e.jsx(j,{onClick:P,variant:"ghost",size:"sm",className:"p-2 hover:text-red-600 dark:hover:text-red-400",title:"Close",children:e.jsx($e,{className:"h-5 w-5"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-hidden",children:[k&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600 dark:text-slate-400",children:"Loading preview..."})]})}),F&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[e.jsx(de,{className:"h-16 w-16 text-red-400 mx-auto mb-4"}),e.jsx("p",{className:"text-lg font-semibold text-gray-700 dark:text-slate-300 mb-2",children:"Preview Unavailable"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400 whitespace-pre-wrap",children:F})]})}),!k&&!F&&t&&S&&e.jsx("iframe",{src:t,className:"w-full h-full border-0",title:"PDF Preview"}),!k&&!F&&B&&w&&e.jsx("div",{className:"h-full overflow-y-auto p-8 bg-white dark:bg-slate-900",children:e.jsx("div",{className:"max-w-4xl mx-auto prose dark:prose-invert prose-slate",dangerouslySetInnerHTML:{__html:w}})}),!k&&!F&&Y&&C&&e.jsx("div",{className:"h-full overflow-y-auto p-6 bg-gray-50 dark:bg-slate-950",children:e.jsx("pre",{className:"text-sm text-gray-800 dark:text-slate-200 whitespace-pre-wrap font-mono",children:C})}),!k&&!F&&t&&!S&&!B&&!Y&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx(de,{className:"h-16 w-16 text-gray-300 dark:text-slate-600 mx-auto mb-4"}),e.jsx("p",{className:"text-lg font-semibold text-gray-700 dark:text-slate-300 mb-2",children:"Preview Not Supported"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400 mb-4",children:"This file type cannot be previewed in the browser."}),e.jsx(j,{onClick:R,variant:"primary",size:"lg",leftIcon:e.jsx(Ae,{className:"h-5 w-5"}),children:"Download File"})]})})]})]})})]})},Bs=({file:a,extractedAccomplishments:r,onAccept:n,onCancel:o})=>{const[m,i]=h.useState(!1),[d,p]=h.useState(!1),[t,x]=h.useState(new Set(r.map(f=>f.id))),w=async()=>
4{if(t.size===0){o();return}p(!0),i(!0);const f=r.filter(k=>t.has(k.id));setTimeout(()=>{n(f),p(!1)},1500)},b=f=>{x(k=>{const T=new Set(k);return T.has(f)?T.delete(f):T.add(f),T})},C=f=>{if(f.situationOrProblem||f.taskOrGoal||f.actionTaken||f.resultAchieved){const k=[];return f.situationOrProblem&&k.push(`Situation: ${f.situationOrProblem}`),f.taskOrGoal&&k.push(`Task: ${f.taskOrGoal}`),f.actionTaken&&k.push(`Action: ${f.actionTaken}`),f.resultAchieved&&k.push(`Result: ${f.resultAchieved}`),k.join(`
5
6`)}return f.description||"No description available"};return e.jsxs(e.Fragment,{children:[m&&e.jsx(Is,{message:"Career Diary Updated!",onComplete:()=>{}}),e.jsx(Ps,{title:"Review Document Upload",maxWidth:"xl",children:e.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[e.jsx(ae,{variant:"glass",padding:"lg",className:"bg-gradient-to-br from-[var(--bg-secondary)] via-[var(--bg-tertiary)] to-[var(--bg-secondary)] border border-[var(--color-accent)]/30",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-[var(--color-accent)]/20 to-blue-600/20 flex items-center justify-center",children:e.jsx(oe,{className:"h-7 w-7 text-[var(--color-accent)]"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)] mb-2",children:"Review Document Upload"}),e.jsxs("p",{className:"text-[var(--text-secondary)]/70 mb-4",children:["We've extracted ",r.length," accomplishment",r.length!==1?"s":""," from ",e.jsx("strong",{children:a.name}),". Please review and select which ones to add to your Career Diary."]}),e.jsxs("div",{className:"flex flex-wrap gap-4 mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"h-4 w-4 text-[var(--color-accent)]"}),e.jsxs("span",{className:"font-semibold text-[var(--text-primary)]",children:[r.length," Accomplishment",r.length!==1?"s":""," Found"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(we,{className:"h-4 w-4 text-green-500"}),e.jsxs("span",{className:"font-semibold text-[var(--text-primary)]",children:[t.size," Selected"]})]})]})]})]})}),r.length>0?e.jsxs(ae,{variant:"glass",padding:"md",children:[e.jsxs("h3",{className:"text-lg font-bold text-[var(--text-primary)] mb-4 flex items-center gap-2",children:[e.jsx(oe,{className:"h-5 w-5 text-[var(--color-accent)]"}),"Extracted Accomplishments"]}),e.jsx("div",{className:"space-y-3",children:r.map(f=>{const k=t.has(f.id);return e.jsx("div",{className:`p-4 rounded-xl border transition-all cursor-pointer ${k?"bg-[var(--color-accent)]/10 border-[var(--color-accent)]/50":"bg-[var(--bg-secondary)] border-[var(--border-default)] hover:border-[var(--color-accent)]/30"}`,onClick:()=>b(f.id),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-1",children:e.jsx("div",{className:`w-5 h-5 rounded border flex items-center justify-center ${k?"bg-[var(--color-accent)] border-[var(--color-accent)]":"border-[var(--border-default)]"}`,children:k&&e.jsx(we,{className:"h-4 w-4 text-white"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[f.suggestedTitle&&e.jsx("h4",{className:"font-bold text-[var(--text-primary)] text-base mb-1",children:f.suggestedTitle}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)] whitespace-pre-wrap leading-relaxed",children:C(f)}),f.skills&&f.skills.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:f.skills.map((T,F)=>e.jsx("span",{className:"px-2 py-1 rounded-lg bg-[var(--color-accent)]/10 text-[var(--color-accent)] text-xs font-medium",children:T},F))})]})]})},f.id)})})]}):e.jsx(ae,{variant:"glass",padding:"md",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx($e,{className:"h-12 w-12 text-gray-400 dark:text-slate-600 mx-auto mb-4"}),e.jsx("p",{className:"text-[var(--text-secondary)]/70",children:"No accomplishments were extracted from this document. It will still be saved to your Documents folder."})]})}),e.jsxs("div",{className:"sticky bottom-0 sticky-bottom-safe bg-[var(--bg-primary)]/95 backdrop-blur-sm border-t border-[var(--border-default)] -mx-4 sm:-mx-6 px-4 sm:px-6 py-4 sm:py-6 mt-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:justify-center",children:[e.jsx(j,{onClick:w,disabled:d||m||t.size===0,variant:"primary",size:"lg",loading:d||m,leftIcon:e.jsx(we,{className:"h-5 w-5"}
6),className:"w-full sm:w-auto sm:min-w-[240px]",children:d||m?"Saving...":`Add ${t.size} Accomplishment${t.size!==1?"s":""} to Career Diary`}),e.jsx(j,{onClick:o,variant:"secondary",size:"lg",disabled:d||m,className:"w-full sm:w-auto",children:r.length===0?"Done":"Skip Adding Accomplishments"})]}),t.size===0&&r.length>0&&e.jsx("p",{className:"text-sm text-amber-600 dark:text-amber-400 text-center mt-3",children:"Select at least one accomplishment to add to your Career Diary"})]})]})})]})},Ms=({isGuest:a,onInitiateAuth:r,compact:n=!1})=>{var ne;const{state:o,actions:m,toast:i}=bt(),{setDefaultResume:d}=Yt(),{corpusFiles:p,isUploadingFile:t,fileUploadError:x}=o,{handleUploadCorpusFile:w,handleDeleteCorpusFile:b,handleAcceptAccomplishments:C}=m,f=h.useRef(null),[k,T]=h.useState(null),[F,A]=h.useState(!1),[I,P]=h.useState(null),[R,$]=h.useState(""),[S,B]=h.useState("resumes"),[Y,z]=h.useState(null),g=[{value:"resumes",label:"Resume",description:"Your professional resume or CV"},{value:"cover_letters",label:"Cover Letter",description:"Cover letters for applications"},{value:"certifications",label:"Certifications",description:"Professional certifications and licenses"},{value:"transcripts",label:"Transcripts",description:"Academic transcripts and records"},{value:"performance_reviews",label:"Performance Reviews",description:"Work performance evaluations"},{value:"projects",label:"Projects",description:"Project documentation and case studies"},{value:"references",label:"References",description:"Letters of recommendation and references"},{value:"other",label:"Other",description:"Miscellaneous career documents"}],N=y=>{var _;const E=(_=y.target.files)==null?void 0:_[0];if(E){P(E);const O=E.name.replace(/\.[^/.]+$/,"");$(O),A(!0),f.current&&(f.current.value="")}},D=async()=>{if(I&&R.trim()){const y=I.name.split(".").pop(),E=`${R.trim()}.${y}`,_=new File([I],E,{type:I.type});try{const O=await w(_,S);O&&O.extractedAccomplishments.length>0?(z({file:_,uploadResult:O}),A(!1)):(i.success("Document Uploaded",`"${_.name}" has been added to your documents.`),A(!1),P(null),$(""),B("resumes"))}catch(O){console.error("[CareerCorpus] Upload failed:",O),O.message&&(O.message.includes("HTTP 409")||O.message.includes("already exists"))?i.error("Duplicate File",`This file already exists in your library. Please use the existing "${R}" or rename it.`):i.error("Upload Failed","Could not upload document. Please try again."),A(!1),P(null),$(""),B("resumes")}}},G=()=>{A(!1),P(null),$(""),B("resumes"),z(null)},V=async y=>{if(Y)try{await C(y),i.success("Career Diary Updated",`${y.length} accomplishment${y.length>1?"s":""} added to your profile.`),z(null),P(null),$(""),B("resumes")}catch(E){console.error("[CareerCorpus] Failed to accept accomplishments:",E),i.error("Failed to Save","Could not add accomplishments to your Career Diary. Please try again.")}},J=()=>{i.info("Review Cancelled","Accomplishments were not added to your Career Diary. The document is still saved in your library."),z(null),P(null),$(""),B("resumes")},q=y=>{T(y)},ee=async()=>{k&&(await b(k),T(null))},L=()=>{T(null)},W=p.reduce((y,E)=>{const _=E.category||"other";return y[_]||(y[_]=[]),y[_].push(E),y},{}),K=y=>{const E=parseInt(y,10);return isNaN(E)?"Unknown size":E<1024?`${E} B`:E<1024*1024?`${(E/1024).toFixed(1)} KB`:`${(E/(1024*1024)).toFixed(1)} MB`},le=y=>{try{return new Date(y).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"Unknown date"}},te=y=>y.includes("pdf")?"📄":y.includes("word")||y.includes("document")?"📝":y.includes("text")?"📃":"📎";return Y&&!n?e.jsx(Bs,{file:Y.file,extractedAccomplishments:Y.uploadResult.extractedAccomplishments,onAccept:V,onCancel:J}):n?e.jsx("div",{className:"space-y-3",children:a?e.jsxs("div",{className:"text-center p-3 rounded-xl bg-gray-50 dark:bg-slate-800/50 border border-[var(--border-default)]",children:[e.jsx(dt,{className:"h-6 w-6 mx-auto text-gray-400 dark:text-slate-500 mb-2"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mb-2",children:"Sign in to save documents"}),e.jsx(j,{onClick:r,variant:"primary",children:"Sign In"})]}):e.jsxs(e.Fragment,{children:[x&&e.jsx("p",{className:"text-xs text-red-600",children:x}),p.length>0&&e.jsx("ul",{className:"space-y-2 max-h-32 overflow-y-auto",children:p.map(y=>e.jsxs("li",{className:"flex items-center justify-between bg-white dark:bg-slate-800 p-2 rounded-lg border border-gray-100 dark:border-slate-700 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 overflow-hidden min-w-0",children:[e.jsx(de,{className:"h-4 w-4 text-gray-400 dark:text-slate-500 flex-shrink-0"}),e.jsx("span",{className:"block min-w-0 truncate",title:y.displayName,children:y.displayName})]}),e.jsx(j,{onClick:()=>b(y.name),variant:"ghost",size:"sm",className:"p-0.5 text-gray-400 hover:text-red-500 h-auto border-none","aria-label":"Delete document",children:e.jsx(re,{className:"h-3.5 w-3.5"})})]},y.name))}),e.jsx(j,{onClick:()=>{var y;return(y=f.current)==null?void 0:y.click()},disabled:t,variant:"secondary",size:"sm",className:"w-full",leftIcon:t?e.jsx(Fe,{className:"h-4 w-4"}):e.jsx(xe,{className:"h-4 w-4"}),children:t?"Uploading...":"Add Document"}),e.jsx("input",{type:"file",ref:f,onChange:N,className:"hidden",accept:".pdf,.docx,.txt,.md"})]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ft,{className:"h-6 w-6 text-gray-500 dark:text-slate-400"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-800 dark:text-slate-200",children:"Document Library"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"Upload career docs (reviews, project briefs, certifications) for the AI to search when tailoring your resume."})]})]}),a?e.jsxs("div",{className:"text-center p-6 rounded-2xl bg-gray-50 dark:bg-slate-800/50 border border-[var(--border-default)]",children:[e.jsx(dt,{className:"h-10 w-10 mx-auto text-gray-400 dark:text-slate-500 mb-3"}),e.jsx("p",{className:"text-sm font-semibold text-gray-700 dark:text-slate-300",children:"Want to save documents?"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mb-4",children:"Sign up to securely store and reuse documents across sessions."}),e.jsx(j,{onClick:r,variant:"primary",children:"Sign Up / Log In"})]}):e.jsxs(e.Fragment,{children:[x&&e.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-500/30 text-red-700 dark:text-red-300 p-3 rounded-lg text-sm",children:x}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(j,{onClick:()=>{var y;return(y=f.current)==null?void 0:y.click()},disabled:t,variant:"primary",size:"lg",className:"w-full",leftIcon:t?e.jsx(Fe,{className:"h-5 w-5"}):e.jsx(xe,{className:"h-5 w-5"}),children:t?"Uploading...":"Upload Document"}),e.jsx("input",{type:"file",ref:f,onChange:N,className:"hidden",accept:".pdf,.docx,.txt,.md"})]}),p.length>0&&e.jsx($s,{filesByCategory:W,onDeleteFile:q,onSetDefaultFile:async y=>{try{await d(y),i.success("Default Resume Set","This resume will be automatically selected for tailoring.")}catch{i.error("Actions Failed","Could not set default resume.")}},getFileIcon:te,formatFileSize:K,formatDate:le})]}),F&&I&&e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100] p-4 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-2xl p-6 max-w-lg w-full shadow-2xl",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-4",children:"Upload Document"}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-semibold text-gray-700 dark:text-slate-300 mb-2",children:"Document Name"}),e.jsx("input",{type:"text",value:R,onChange:y=>$(y.target.value),className:"w-full px-4 py-2 rounded-lg border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-gray-900 dark:text-white focus:border-blue-500 focus:outline-none",placeholder:"Enter a meaningful name",autoFocus:!0}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-slate-400",children:["Original: ",I.name]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-semibold text-gray-700 dark:text-slate-300 mb-2",children:"Category"}),e.jsx("select",{value:S,onChange:y=>B(y.target.value),className:"w-full px-4 py-2 rounded-lg border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 text-gray-900 dark:text-white focus:border-blue-500 focus:outline-none",children:g.map(y=>e.jsx("option",{value:y.value,children:y.label},y.value))}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-slate-400",children:(ne=g.find(y=>y.value===S))==null?void 0:ne.description})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(j,{onClick:G,disabled:t,variant:"secondary",size:"md",className:"flex-1",children:"Cancel"}),e.jsx(j,{onClick:D,disabled:t||!R.trim(),variant:"primary",children:t?"Uploading...":"Upload"})]})]})}),k&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-2xl p-6 max-w-md w-full shadow-2xl",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:"Delete Document?"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400 mb-6",children:"Are you sure you want to delete this document? This action cannot be undone."}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(j,{onClick:ee,variant:"danger",children:"Delete"}),e.jsx(j,{onClick:L,variant:"secondary",size:"md",className:"flex-1",children:"Cancel"})]})]})})]})},Q=({id:a,label:r,value:n,onChange:o,onBlur:m,placeholder:i,type:d="text",icon:p,validator:t,formatter:x,required:w=!1,disabled:b=!1,className:C="",maxLength:f})=>{const[k,T]=h.useState(!1),[F,A]=h.useState(!0),[I,P]=h.useState(!1);h.useEffect(()=>{I&&t&&n?A(t(n)):!n&&!w&&A(!0)},[n,I,t,w]);const R=S=>{let B=S.target.value;x&&(B=x(B));const Y=S.nativeEvent.inputType;o(B,{pasted:Y==="insertFromPaste"})},$=S=>{T(!1),P(!0),t&&n?A(t(n)):w&&!n&&A(!1),m==null||m(S.target.value)};return e.jsxs("div",{className:`iconic-input-group ${C}`,children:[e.jsxs("label",{htmlFor:a,className:"iconic-input-label flex justify-between items-center",children:[e.jsxs("span",{children:[r," ",w&&e.jsx("span",{className:"text-red-500",children:"*"})]}),I&&n&&e.jsxs("span",{className:`text-xs flex items-center gap-1 ${F?"text-green-500":"text-red-500"}`,children:[F?e.jsx(we,{className:"w-3 h-3"}):e.jsx(Jt,{className:"w-3 h-3"}),F?"Valid":"Invalid"]}
6)]}),e.jsxs("div",{className:"relative",children:[p&&!n&&e.jsx("div",{className:`absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-[var(--text-secondary)] opacity-50 pointer-events-none ${k?"text-[var(--color-accent)] opacity-100":""}`,children:Ee.isValidElement(p)?Ee.cloneElement(p,{className:"w-full h-full"}):p}),e.jsx("input",{id:a,type:d,value:n,onChange:R,onFocus:()=>T(!0),onBlur:$,disabled:b,placeholder:i,maxLength:f,className:`iconic-input ${p&&!n?"pl-10":""} ${I&&!F?"iconic-input-error":""}`})]}),I&&!F&&e.jsx("p",{className:"rt-error-message",children:w&&!n?`We'll need your ${r.toLowerCase()} to continue`:`Let's try a different ${r.toLowerCase()} format`})]})},_s=(a,r)=>{const n=r.trim();return a==="linkedIn"?Zt(n):a==="github"?Qt(n):Xt(n)},Hs=(a,r,n)=>{const o=_s(a,r);return n==="type"?{draft:r,value:o}:{draft:null,value:o}};function Vs(a,r,n){return[a,r,n].filter(Boolean).join(" ")}const Ws=({contactDetails:a,contactInfoString:r,personalInfo:n,onChange:o,onBlurSave:m,readOnly:i=!1,className:d=""})=>{const[p,t]=h.useState("detailed"),[x,w]=h.useState({email:"",...a}),[b,C]=h.useState({firstName:"",lastName:"",fullName:"",...n}),[f,k]=h.useState(r),[T,F]=h.useState({}),A=h.useRef(!1),I=h.useRef(null),P=h.useRef(a),R=h.useRef(x.zipcode);h.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]),h.useEffect(()=>{var N,D,G,V,J,q,ee;if(A.current)return;if(a&&(a.email!==((N=P.current)==null?void 0:N.email)||a.phone!==((D=P.current)==null?void 0:D.phone)||a.location!==((G=P.current)==null?void 0:G.location)||a.zipcode!==((V=P.current)==null?void 0:V.zipcode)||a.linkedIn!==((J=P.current)==null?void 0:J.linkedIn)||a.github!==((q=P.current)==null?void 0:q.github)||a.portfolio!==((ee=P.current)==null?void 0:ee.portfolio))){const L=a.zipcode||"",W=x.zipcode||"";if(L&&R.current&&L===R.current){P.current={...a,zipcode:W};return}w(a),P.current=a}if(r&&!A.current){const L=ct(r),W=[];L.email&&W.push(L.email),L.phone&&W.push(L.phone),L.linkedIn&&W.push(L.linkedIn),L.github&&W.push(L.github);const K=L.website||L.portfolio;K&&W.push(K);const le=W.length>0?W.join(" | "):r;k(le),!a&&(L.email||L.phone||L.linkedIn||L.github||K)&&w(te=>({...te,...L}))}n&&!A.current&&C(L=>JSON.stringify(L)!==JSON.stringify(n)?{...L,...n}:L)},[a,r,n,x]);const $=(g,N)=>{I.current&&clearTimeout(I.current),A.current=!0;const D={...x,[g]:N};w(D),g==="zipcode"&&(R.current=N),P.current=D;const G=xs(D);k(G),o(D,G,b),I.current=setTimeout(()=>{A.current=!1,g==="zipcode"&&(R.current=void 0)},2e3)},S=(g,N,D)=>{const{draft:G,value:V}=Hs(g,N,D);F(J=>({...J,[g]:G??void 0})),V!==(x[g]||"")&&$(g,V)},B=(g,N)=>{const D={...b,[g]:N};(g==="firstName"||g==="middleName"||g==="lastName")&&(D.fullName=Vs(D.firstName||"",D.middleName,D.lastName||"")),C(D),o(x,f,D)},Y=g=>{k(g);const N=ct(g),D={email:N.email||x.email||"",phone:N.phone,linkedIn:N.linkedIn,github:N.github,portfolio:N.portfolio,location:N.location,website:N.website};w(D),o(D,g,b)},z=g=>{g.currentTarget.contains(g.relatedTarget)||m&&m(x,f,b)};return e.jsx("div",{onBlur:z,children:e.jsxs(ae,{variant:"default",padding:"md",className:d,children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] uppercase tracking-wide",children:"Personal & Contact Information"}),e.jsxs("div",{className:"group relative",children:[e.jsx(Kt,{className:"w-4 h-4 text-[var(--text-secondary)] opacity-50 cursor-help"}),e.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-full mb-2 w-64 p-2 bg-gray-800 dark:bg-gray-900 text-white text-xs rounded shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all pointer-events-none z-50 whitespace-normal",children:'Structured info helps AI tailor your applications. "Preferred Name" is used for greetings, while legal names are used for applications.'})]})]}),!i&&e.jsx(j,{onClick:()=>t(p==="simple"?"detailed":"simple"),variant:"ghost",size:"sm",className:"text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] font-normal flex items-center gap-1 transition-colors p-0 h-auto hover:bg-transparent min-h-0 min-w-0 opacity-60 hover:opacity-100",children:p==="simple"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Switch to Detailed View"}),e.jsx(qt,{className:"w-3 h-3"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Switch to Simple View"}),e.jsx(es,{className:"w-3 h-3"})]})})]}),p==="simple"?e.jsxs("div",{className:"animate-fadeIn space-y-4",children:[e.jsx(Q,{id:"full-name",label:"Full Name",value:b.fullName,onChange:g=>B("fullName",g),icon:e.jsx(mt,{}),disabled:i,placeholder:"John Doe"}),e.jsxs("div",{children:[e.jsx(Q,{id:"contact-string",label:"Contact String",value:f,onChange:Y,placeholder:"Email | Phone | LinkedIn | Location",disabled:i,className:"mb-2"}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)] opacity-70",children:"Enter your contact info separated by pipes (|) or commas. We'll automatically parse this into structured data."})]})]}):e.jsxs("div",{className:"animate-fadeIn space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx("div",{className:"md:col-span-2 xl:col-span-2",children:e.jsx(Q,{id:"first-name",label:"First Name",value:b.firstName||"",onChange:g=>B("firstName",g),icon:e.jsx(mt,{}),required:!0,disabled:i})}),e.jsx(Q,{id:"middle-name",label:"Middle Name",value:b.middleName||"",onChange:g=>B("middleName",g),disabled:i}),e.jsx(Q,{id:"last-name",label:"Last Name",value:b.lastName||"",onChange:g=>B("lastName",g),required:!0,disabled:i}),e.jsx(Q,{id:"preferred-name",label:"Preferred Name",value:b.preferredName||"",onChange:g=>B("preferredName",g),icon:e.jsx(ts,{}),disabled:i})]}),e.jsx("div",{className:"h-px bg-[var(--border-default)] opacity-30"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 ga
6p-4",children:[e.jsx("div",{className:"md:col-span-3",children:e.jsx(Q,{id:"email",label:"Email Address",value:x.email,onChange:g=>$("email",g),type:"email",icon:e.jsx(as,{}),validator:ss,required:!0,disabled:i})}),e.jsx("div",{className:"md:col-span-2",children:e.jsx(Q,{id:"phone",label:"Phone Number",value:x.phone||"",onChange:g=>$("phone",g),type:"tel",icon:e.jsx(ns,{}),validator:ls,formatter:rs,disabled:i})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx("div",{className:"md:col-span-3",children:e.jsx(Q,{id:"location",label:"Location",value:x.location||"",onChange:g=>$("location",g),icon:e.jsx(is,{}),disabled:i})}),e.jsx("div",{className:"md:col-span-1",children:e.jsx(Q,{id:"zipcode",label:"ZIP Code",value:x.zipcode||"",onChange:g=>$("zipcode",g),disabled:i,maxLength:10})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(Q,{id:"linkedin",label:"LinkedIn",value:T.linkedIn??(x.linkedIn||""),onChange:(g,{pasted:N})=>S("linkedIn",g,N?"paste":"type"),onBlur:g=>S("linkedIn",g,"blur"),icon:e.jsx(os,{}),disabled:i}),e.jsx(Q,{id:"portfolio",label:"Portfolio / Website",value:T.portfolio??(x.portfolio||""),onChange:(g,{pasted:N})=>S("portfolio",g,N?"paste":"type"),onBlur:g=>S("portfolio",g,"blur"),type:"url",icon:e.jsx(cs,{}),validator:ds,disabled:i})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.jsx(Q,{id:"github",label:"GitHub",value:T.github??(x.github||""),onChange:(g,{pasted:N})=>S("github",g,N?"paste":"type"),onBlur:g=>S("github",g,"blur"),icon:e.jsx(ms,{}),disabled:i})})]})]})]})})},Gs=({onClose:a,onFileSelect:r,isUploading:n})=>{const o=h.useRef(null),m=d=>{var t;const p=(t=d.target.files)==null?void 0:t[0];p&&r(p)},i=us();return e.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-2xl max-w-2xl w-full shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white dark:bg-slate-800 border-b border-gray-200 dark:border-slate-700 p-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center",children:e.jsx("svg",{className:"w-7 h-7 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Import from LinkedIn"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"Seamlessly transfer your professional profile"})]})]}),e.jsx(j,{onClick:a,variant:"ghost",size:"sm",className:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-slate-300 rounded-lg hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors h-auto border-none",disabled:n,"aria-label":"Close",children:e.jsx($e,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 dark:text-slate-300 uppercase tracking-wide",children:"How to Import"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx("span",{className:"text-sm font-bold text-blue-600 dark:text-blue-400",children:"1"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:"Open LinkedIn Settings"}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-slate-400 mb-2",children:["Navigate to your LinkedIn profile and click on ",e.jsx("strong",{children:"Settings & Privacy"})]}),e.jsx("a",{href:"https://www.linkedin.com/psettings/data-privacy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm font-semibold text-blue-600 dar
6k:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",children:"Open LinkedIn Settings →"})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx("span",{className:"text-sm font-bold text-blue-600 dark:text-blue-400",children:"2"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:"Request Your Profile Data"}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-slate-400",children:["Go to ",e.jsx("strong",{children:"Data Privacy"})," → ",e.jsx("strong",{children:"Get a copy of your data"})," → Select ",e.jsx("strong",{children:'"Profile"'})," and choose ",e.jsx("strong",{children:"PDF format"})," → Click ",e.jsx("strong",{children:'"Request archive"'})]})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:e.jsx("span",{className:"text-sm font-bold text-blue-600 dark:text-blue-400",children:"3"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:"Download Your PDF"}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-slate-400",children:["LinkedIn will email you a download link (usually within 10-15 minutes). Download the ZIP file, extract it, and locate your ",e.jsx("strong",{children:"Profile.pdf"})]})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:e.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:"4"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:"Upload Here"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400 mb-3",children:"Click the upload button below and select your Profile.pdf. Our AI will automatically extract and format all your information."}),e.jsx(j,{onClick:()=>{var d;return(d=o.current)==null?void 0:d.click()},disabled:n,loading:n,variant:"primary",size:"lg",className:"w-full shadow-md hover:shadow-lg",leftIcon:n?void 0:e.jsx(xe,{className:"h-5 w-5"}),children:n?"Importing LinkedIn Profile...":"Upload LinkedIn PDF"}),e.jsx("input",{type:"file",ref:o,onChange:m,className:"hidden",accept:".pdf",disabled:n})]})]})]}),e.jsx("div",{className:"border-t border-gray-200 dark:border-slate-700"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold text-gray-700 dark:text-slate-300 uppercase tracking-wide flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-yellow-500",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})}),"Pro Tips"]}),e.jsx("ul",{className:"space-y-2",children:i.map((d,p)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600 dark:text-slate-400",children:[e.jsx("span",{className:"text-blue-500 mt-1",children:"•"}),e.jsx("span",{children:d})]},p))})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-slate-900/40 rounded-xl p-4 border border-gray-200 dark:border-slate-700",children:[e.jsxs("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[e.jsx(de,{className:"h-4 w-4 text-gray-500 dark:text-slate-400"}),"Don't have LinkedIn Premium?"]}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-slate-400",children:["You can also export your profile by going to your profile page → ",e.jsx("strong",{children:"More"})," → ",e.jsx("strong",{children:"Save to PDF"}),". This creates a simplified version that works great with our parser."]})]})]}),e.jsxs("div",{className:"sticky bottom-0 sticky-bottom-safe bg-gray-50 dark:bg-slate-900/60 border-t border-gray-200 dark:border-slate-700 p-4 flex items-center justify-between rounded-b-2xl",children:[e.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400",children:"Your data is processed securely and never shared"}),e.jsx(j,{onClick:a,disabled:n,variant:"ghost",size:"sm",className:"font-semibold",children:"Close"})]})]})})},Os=5*1024*1024,Ys=["image/jpeg","image/jpg","image/png","image/webp"];function Js(a){return Ys.includes(a.type)?a.size>
6Os?{valid:!1,error:"Image must be smaller than 5MB"}:{valid:!0}:{valid:!1,error:"Please upload a JPG, PNG, or WebP image"}}async function Zs(a,r=400){return new Promise((n,o)=>{const m=new FileReader;m.onload=i=>{var p;const d=new Image;d.onload=()=>{const t=document.createElement("canvas"),x=t.getContext("2d");if(!x){o(new Error("Could not get canvas context"));return}t.width=r,t.height=r;const w=Math.min(d.width,d.height),b=(d.width-w)/2,C=(d.height-w)/2;x.drawImage(d,b,C,w,w,0,0,r,r),t.toBlob(f=>{f?n(f):o(new Error("Failed to create image blob"))},"image/jpeg",.9)},d.onerror=()=>{o(new Error("Failed to load image"))},d.src=(p=i.target)==null?void 0:p.result},m.onerror=()=>{o(new Error("Failed to read file"))},m.readAsDataURL(a)})}function Qs(a){if(!a||!a.trim())return{initials:"??",backgroundColor:"#6366f1",textColor:"#ffffff"};const r=a.trim().split(/\s+/);let n="";r.length===1?n=r[0].substring(0,2).toUpperCase():n=(r[0][0]+r[r.length-1][0]).toUpperCase();const o=Xs(a);return{initials:n,backgroundColor:o,textColor:"#ffffff"}}function Xs(a){let r=0;for(let o=0;o<a.length;o++)r=a.charCodeAt(o)+((r<<5)-r),r=r&r;const n=["#6366f1","#8b5cf6","#ec4899","#f59e0b","#10b981","#3b82f6","#06b6d4","#f97316"];return n[Math.abs(r)%n.length]}async function Ks(a,r){const n=Js(a);if(!n.valid)throw new Error(n.error||"Invalid image file");const o=await Zs(a,400),d=`avatar-${Date.now()}.jpg`,p=new File([o],d,{type:"image/jpeg"}),t=await Ts(p,r,d);return{url:await Rs(t,31536e3),path:t}}async function qs(a){await Ds(a)}const ea=({currentPhotoUrl:a,currentPhotoPath:r,userId:n,fullName:o,onPhotoChange:m})=>{const[i,d]=h.useState(!1),[p,t]=h.useState(!1),[x,w]=h.useState(null),[b,C]=h.useState(a||null),f=h.useRef(null),k=async I=>{w(null),d(!0);try{const P=URL.createObjectURL(I);C(P);const R=await Ks(I,n);URL.revokeObjectURL(P),m(R.url,R.path),C(R.url)}catch(P){console.error("Photo upload failed:",P),w(P.message||"Failed to upload photo"),C(a||null)}finally{d(!1)}},T=I=>{var R;const P=(R=I.target.files)==null?void 0:R[0];P&&k(P),f.current&&(f.current.value="")},F=async()=>{if(r){w(null),t(!0);try{await qs(r),m(null,null),C(null)}catch(I){console.error("Photo deletion failed:",I),w(I.message||"Failed to delete photo")}finally{t(!1)}}},A=Qs(o);return e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsxs("div",{className:"relative",children:[b?e.jsx("img",{src:b,alt:o,className:"w-32 h-32 rounded-full object-cover border border-[var(--border-default)] shadow-lg"}):e.jsx("div",{className:"w-32 h-32 rounded-full flex items-center justify-center text-4xl font-bold text-white shadow-lg border border-[var(--border-default)]",style:{backgroundColor:A.backgroundColor},children:A.initials}),(i||p)&&e.jsx("div",{className:"absolute inset-0 bg-black/50 rounded-full flex items-center justify-center",children:e.jsx(Fe,{className:"h-10 w-10 text-white"})})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(j,{onClick:()=>{var I;return(I=f.current)==null?void 0:I.click()},loading:i,disabled:p,variant:"primary",size:"md",leftIcon:e.jsx(xe,{className:"h-4 w-4"}),children:b?"Change Photo":"Upload Photo"}),b&&e.jsx(j,{onClick:F,loading:p,disabled:i,variant:"secondary",size:"md",leftIcon:e.jsx(re,{className:"h-4 w-4"}),className:"hover:border-red-500 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/10",children:"Remove"})]}),e.jsx("input",{ref:f,type:"file",accept:"image/jpeg,image/jpg,image/png,image/webp",onChange:T,className:"hidden"}),x&&e.jsx("div",{className:"text-sm text-red-500 bg-red-50 dark:bg-red-900/20 px-4 py-2 rounded-lg border border-red-200 dark:border-red-500/30",children:x}),!x&&e.jsx("p",{className:"text-xs text-[var(--text-secondary)] opacity-70 text-center max-w-xs",children:"Upload a photo (JPG, PNG, or WebP). Max 5MB. Will be resized to 400x400px."})]})},ut={enabled:!1,day_of_week:"monday",time_utc:"15:00",prompt_style:"metric-focused"},ht=async()=>{var o,m;const a={"Content-Type":"application/json"},r=await((o=ps)==null?void 0:o.auth.getSession()),n=(m=r==null?void 0:r.data.session)==null?void 0:m.access_token;return n&&(a.Authorization=`Bearer ${n}`),a},ta=()=>{const a=hs(),[r,n]=h.useState(ut),[o,m]=h.useState(!0),[i,d]=h.useState(!1);h.useEffect(()=>{(async()=>{try{const x=await ht(),w=await fetch("/api/reminders/settings",{headers:x});if(!w.ok)throw new Error("Failed to load reminder settings");const b=await w.json();n({...ut,...b})}catch(x){a.error("Could not load reminders",x instanceof Error?x.message:"Try again later.")}finally{m(!1)}})()},[a]);const p=async()=>{d(!0);try{const t=await ht();if(!(await fetch("/api/reminders/settings",{method:"PUT",headers:t,body:JSON.stringify(r)})).ok)throw new Error("Failed to save reminder settings");a.success("Preferences saved")}catch(t){a.error("Could not save reminders",t instanceof Error?t.message:"Try again later.")}finally{d(!1)}};return e.jsxs(ae,{variant:"default",padding:"md",className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-[var(--text-primary)]",children:"Accomplishment reminders"}),e.jsx("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:"Send yourself a weekly prompt to capture wins before they disappear."})]}),o?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-10 animate-pulse rounded-xl bg-slate-100 dar
6k:bg-slate-800"}),e.jsx("div",{className:"h-10 animate-pulse rounded-xl bg-slate-100 dark:bg-slate-800"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"flex items-center justify-between rounded-2xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900",children:[e.jsx("span",{className:"font-medium text-[var(--text-primary)]",children:"Enable weekly reminders"}),e.jsx("input",{type:"checkbox",checked:r.enabled,onChange:t=>n(x=>({...x,enabled:t.target.checked}))})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx("select",{value:r.day_of_week,onChange:t=>n(x=>({...x,day_of_week:t.target.value})),className:"rounded-xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900",children:["monday","tuesday","wednesday","thursday","friday","saturday","sunday"].map(t=>e.jsx("option",{value:t,children:t},t))}),e.jsx("input",{type:"time",value:r.time_utc,onChange:t=>n(x=>({...x,time_utc:t.target.value})),className:"rounded-xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900"}),e.jsxs("select",{value:r.prompt_style,onChange:t=>n(x=>({...x,prompt_style:t.target.value})),className:"rounded-xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900",children:[e.jsx("option",{value:"metric-focused",children:"Metric-focused"}),e.jsx("option",{value:"collaboration-focused",children:"Collaboration-focused"}),e.jsx("option",{value:"learning-focused",children:"Learning-focused"})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(j,{type:"button",variant:"primary",onClick:()=>{p()},disabled:i,children:i?"Saving...":"Save Reminder Settings"})})]})]})},sa=({experience:a,isLocked:r,onFieldChange:n,onRemove:o,onAddAccomplishment:m,onUpdateAccomplishment:i,onDeleteAccomplishment:d,onRefactorAccomplishment:p,starPreviews:t,onAcceptRefactor:x,onUndoRefactor:w})=>e.jsxs("div",{className:"border border-[var(--border-default)] rounded-2xl p-4 space-y-4 bg-white dark:bg-slate-900/40",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-[minmax(0,1.45fr)_minmax(0,1fr)]",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Job title"}),e.jsx("input",{type:"text",disabled:r,value:a.jobTitle,onChange:b=>n(a.id,"jobTitle",b.target.value),className:"w-full min-w-0 mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Company"}),e.jsx("input",{type:"text",disabled:r,value:a.company,onChange:b=>n(a.id,"company",b.target.value),className:"w-full min-w-0 mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Location"}),e.jsx(vt,{value:a.location,onChange:b=>n(a.id,"location",b),placeholder:"City, State",disabled:r,className:"mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Dates"}),e.jsx("input",{type:"text",disabled:r,value:a.dates,onChange:b=>n(a.id,"dates",b.target.value),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{className:"h-5 w-5 text-blue-400"}),e.jsx("span",{className:"text-sm font-semibold text-gray-700 dark:text-slate-200",children:"Accomplishments"})]}),a.accomplishments.map(b=>{const C=t==null?void 0:t[b.id];return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("textarea",{disabled:r,value:b.description,onChange:f=>i(a.id,b.id,f.target.value),className:"flex-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm resize-none",rows:2}),!r&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(j,{onClick:()=>p(a.id,b.id),variant:"ghost",size:"sm",className:"p-2 text-blue-400 hover:text-blue-600 h-auto w-auto min-w-0","aria-label":"AI STAR Refactor",title:"AI STAR Refactor",children:e.jsx(oe,{className:"h-4 w-4"})}),e.jsx(j,{onClick:()=>d(a.id,b.id),variant:"ghost",size:"sm",className:"p-2 text-gray-400 hover:text-red-500 h-auto w-auto min-w-0","aria-label":"Delete accomplishment",children:e.jsx(re,{className:"h-4 w-4"})})]})]}),C&&!C.applied&&e.jsxs("div",{"data-testid":"star-preview",className:"rounded-xl border border-blue-200 dark:border-blue-800/60 bg-blue-50 dark:bg-blue-900/20 p-3 space-y-2 animate-in fade-in slide-in-from-top-1 duration-300",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(oe,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-tight text-blue-600 dar
6k:text-blue-400",children:"AI suggestion (STAR)"})]}),e.jsx("p",{className:"text-sm text-blue-900 dark:text-blue-100 leading-relaxed",children:C.proposed}),C.metrics.length>0&&e.jsxs("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:["Even stronger with real numbers you could add: ",C.metrics.join(", ")]}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(j,{onClick:()=>x==null?void 0:x(a.id,b.id),variant:"primary",size:"sm",className:"text-xs",children:"Use this version"}),e.jsx(j,{onClick:()=>w==null?void 0:w(a.id,b.id),variant:"ghost",size:"sm",className:"text-xs text-gray-500",children:"Keep my original"})]})]}),C&&C.applied&&e.jsxs("div",{"data-testid":"star-applied",className:"flex items-center justify-between rounded-lg border border-emerald-200 dark:border-emerald-800/60 bg-emerald-50 dark:bg-emerald-900/20 px-3 py-1.5",children:[e.jsx("span",{className:"text-xs font-medium text-emerald-700 dark:text-emerald-300",children:"STAR rewrite applied"}),e.jsx("button",{type:"button",onClick:()=>w==null?void 0:w(a.id,b.id),className:"text-xs font-semibold text-emerald-700 dark:text-emerald-300 underline hover:no-underline",children:"Undo"})]})]},b.id)}),!r&&e.jsx(j,{onClick:()=>m(a.id),variant:"ghost",size:"sm",className:"inline-flex items-center gap-1 text-sm font-semibold text-blue-600 hover:text-blue-800 p-0 h-auto",leftIcon:e.jsx(yt,{className:"h-4 w-4"}),children:"Add accomplishment"})]}),!r&&e.jsx("div",{className:"flex justify-end pt-2",children:e.jsx(j,{onClick:()=>o(a.id),variant:"ghost",size:"sm",className:"flex items-center gap-2 text-xs font-semibold text-red-500 hover:text-red-600 p-0 h-auto",leftIcon:e.jsx(re,{className:"h-4 w-4"}),children:"Remove role"})}),a.clarifyingQuestion&&e.jsxs("div",{className:"ai-clarifying-question mt-2 p-3 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-100 dark:border-blue-900/30 flex items-start gap-3 animate-in fade-in slide-in-from-top-1 duration-500",children:[e.jsx("div",{className:"bg-blue-100 dark:bg-blue-900/40 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(oe,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-bold text-blue-600 dark:text-blue-400 uppercase tracking-tight",children:"Socratic Coach"}),e.jsxs("p",{className:"text-sm text-blue-800 dark:text-blue-200 italic font-medium",children:['"',a.clarifyingQuestion,'"']})]})]})]}),aa=({education:a,isLocked:r,onChange:n,onRemove:o})=>{const m=a.dates||a.graduationDate||a.endDate||"";return e.jsxs("div",{className:"border border-[var(--border-default)] rounded-2xl p-4 space-y-3 bg-white dark:bg-slate-900/40",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Degree"}),e.jsx("input",{type:"text",disabled:r,value:a.degree,onChange:i=>n(a.id,"degree",i.target.value),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"University"}),e.jsx("input",{type:"text",disabled:r,value:a.university,onChange:i=>n(a.id,"university",i.target.value),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Dates"}),e.jsx("input",{type:"text",disabled:r,value:m,onChange:i=>n(a.id,"dates",i.target.value),placeholder:"Month Year - Month Year",className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-800 px-3 py-2 text-sm"})]}),!r&&e.jsx("div",{className:"flex justify-end pt-1",children:e.jsx(j,{onClick:()=>o(a.id),variant:"ghost",size:"sm",className:"flex items-center gap-2 text-xs font-semibold text-red-500 hover:text-red-600 p-0 h-auto",leftIcon:e.jsx(re,{className:"h-4 w-4"}),children:"Remove education"})})]})},ra=({summary:a,isLocked:r,onMerge:n,onReplace:o,onCancel:m})=>e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/40 border border-blue-200 dark:border-blue-500/40 rounded-2xl p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-blue-900 dark:text-blue-200",children:"AI has a new update ready"}),e.jsx("p",{className:"text-xs text-blue-800 dark:text-blue-200/80 mt-1",children:"Blend the uploaded resume with your diary or replace it entirely."})]}),e.jsxs("p",{className:"text-xs text-blue-900 dark:text-blue-100 bg-white/70 dark:bg-slate-900/40 rounded-lg p-3 border border-blue-100 dar
6k:border-blue-500/20",children:[e.jsx("strong",{children:"Merge summary:"})," ",a]}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-3",children:[e.jsx(j,{disabled:r,onClick:n,variant:"primary",size:"md",className:`flex-1 ${r?"bg-gray-200 text-gray-500 cursor-not-allowed":"bg-[var(--color-accent)] text-white hover:brightness-110"}`,children:"Merge with diary"}),e.jsx(j,{disabled:r,onClick:o,variant:"secondary",size:"md",className:`flex-1 ${r?"bg-gray-100 text-gray-500 cursor-not-allowed":"bg-white text-gray-800 border border-gray-200 hover:bg-gray-50"}`,children:"Replace diary"})]}),e.jsx(j,{onClick:m,variant:"ghost",size:"sm",className:"text-xs font-semibold text-gray-500 hover:text-red-500 h-auto p-0",children:"Cancel"})]});function pt(a){if(a.startDate){const r=Ue(a.startDate);if(r.start.year){const n=r.start.year,o=r.start.month||1;return n*100+o}}if(a.dates){const r=Ue(a.dates);if(r.start.year){const n=r.start.year,o=r.start.month||1;return n*100+o}}return a.isCurrent?999999:0}function la(a){return[...a].sort((n,o)=>{if(n.isCurrent&&!o.isCurrent)return-1;if(!n.isCurrent&&o.isCurrent)return 1;const m=pt(n),i=pt(o);return m>0&&i>0?i-m:m>0&&i===0?-1:m===0&&i>0?1:0})}const na=()=>{const a=gs(),{session:r,isGuest:n}=fs(),[o,m]=h.useState(null);h.useEffect(()=>{if(n||!r)return;let d=!1;return(async()=>{try{const p=await bs();d||m(p)}catch{}})(),()=>{d=!0}},[n,r]);const i=h.useMemo(()=>o?As(o):null,[o]);return i?e.jsxs("div",{"data-testid":"weekly-effort","data-effort-empty":i.empty?"true":"false",className:"rounded-lg border border-[var(--line)] bg-[var(--surface-sunk)] px-4 py-3",children:[e.jsx("p",{className:"text-sm leading-6 text-[var(--text-secondary)]",children:i.headline}),i.action&&e.jsxs("button",{type:"button",onClick:()=>a(i.action.to),"data-testid":"weekly-effort-action",className:"mt-1 text-sm font-medium text-[var(--ever-700)] underline-offset-2 hover:underline",children:[i.action.label," →"]})]}):null},gt=a=>a.split(",").map(r=>r.trim()).filter(Boolean),ia=a=>{const r=new Set,n=[];for(const o of a){const m=o.trim().toLowerCase();!m||r.has(m)||(r.add(m),n.push(o.trim()))}return n},ka=({onNavigateToWorkspace:a,isGuest:r,onInitiateAuth:n,initialWin:o})=>{var Xe,Ke,qe,et,tt,st,at,rt,lt,nt,it;const m=ys(),{state:i,actions:d,toast:p}=bt(),{profile:t,pendingResumeUpdate:x,location:w,zipcode:b,diarySaveStatus:C,isUpdating:f,pendingProfileChatUpdate:k,profileChatHistory:T,isChattingWithProfile:F,profileChatError:A,profileChatAuditLog:I,lastProfileSnapshot:P,corpusFiles:R}=i,{handleFileParse:$,handleProfileMutation:S,handleLocationChange:B,handleZipcodeChange:Y,handleMergeResumeUpdate:z,handleReplaceResumeUpdate:g,handleCancelResumeUpdate:N,handleAddAccomplishment:D,handleUpdateAccomplishment:G,handleDeleteAccomplishment:V,handleSendProfileChatMessage:J,handleApplyProfileChatUpdate:q,handleRejectProfileChatUpdate:ee,handleUndoLastProfileChatUpdate:L,handleClearCareerDiary:W}=d,[K,le]=h.useState({targetRoles:"",preferredLocations:"",preferredIndustries:""}),[te,ne]=h.useState(""),[y,E]=h.useState(((Ke=(Xe=t==null?void 0:t.experience)==null?void 0:Xe[0])==null?void 0:Ke.id)||null),[_,O]=h.useState("basic"),[ue,jt]=h.useState(!0),[ie,Nt]=h.useState("chat"),[he,Be]=h.useState(!1),[wt,ke]=h.useState(!1),[kt,Ce]=h.useState(!1),[Se,Ie]=h.useState({}),Pe=h.useRef(C),Me=h.useRef(0),_e=h.useRef(!1),pe=h.useRef(!1),De=h.useRef(null);vs({title:"Career Diary - Track Achievements | CareerDiary",description:"Document your career achievements, skills, and experience. Build a living career profile to tailor resumes and applications.",canonical:"https://careerdiary.io/app/diary"});const He=h.useRef(!1);h.useEffect(()=>{if(!o||He.current||i.isHydratingProfile||i.isAuthLoading)return;He.current=!0;let s="",l=!1;S(c=>{const u=Es(c,o);return s=u.experienceId,l=u.added,u.profile},!0),O("experience"),s&&E(s),l&&p.success("Saved to your diary",r?"Kept in this browser. Create a free account to keep it everywhere.":"Add the result and any numbers while you still remember them.")},[o,i.isHydratingProfile,i.isAuthLoading,S,p,r]);const Ct=!t||!t.fullName&&!t.summary&&(!t.experience||t.experience.length===0),St=h.useMemo(()=>{var s,l,c;return zs({lastTailoredRole:(s=i.lastTailoredInfo)==null?void 0:s.jobTitle,trackedRole:(c=(l=i.appliedJobs)==null?void 0:l[0])==null?void 0:c.job_title,profile:t})},[(qe=i.lastTailoredInfo)==null?void 0:qe.jobTitle,i.appliedJobs,t]),It=(s,l)=>{S(c=>({...c,photoUrl:s||void 0,photoStoragePath:l||void 0}))},ge={targetRoles:[],preferredLocations:[],locationTypes:[],preferredIndustries:[],salaryExpectation:"",searchR
6adius:void 0},U=h.useMemo(()=>({...ge,...(t==null?void 0:t.jobPreferences)||{}}),[t==null?void 0:t.jobPreferences]);h.useEffect(()=>{const s={targetRoles:(U.targetRoles||[]).join(", "),preferredLocations:(U.preferredLocations||[]).join(", "),preferredIndustries:(U.preferredIndustries||[]).join(", ")};le(l=>l.targetRoles===s.targetRoles&&l.preferredLocations===s.preferredLocations&&l.preferredIndustries===s.preferredIndustries?l:s)},[U.targetRoles,U.preferredLocations,U.preferredIndustries]);const Z=h.useMemo(()=>{if(!t||!te.trim())return(t==null?void 0:t.experience)||[];const s=te.toLowerCase();return((t==null?void 0:t.experience)||[]).filter(l=>{if(!l)return!1;const c=(l.company||"").toLowerCase(),u=(l.jobTitle||"").toLowerCase(),v=(l.location||"").toLowerCase();return c.includes(s)||u.includes(s)||v.includes(s)})},[t==null?void 0:t.experience,te]),Te=h.useMemo(()=>{var u,v,M;const s=((u=t==null?void 0:t.experience)==null?void 0:u.length)||0,l=((v=t==null?void 0:t.experience)==null?void 0:v.reduce((H,X)=>{var se;return H+(((se=X==null?void 0:X.accomplishments)==null?void 0:se.length)||0)},0))||0,c=((M=t==null?void 0:t.skills)==null?void 0:M.length)||0;return{roles:s,accomplishments:l,skills:c}},[t==null?void 0:t.experience,t==null?void 0:t.skills]),Re=h.useMemo(()=>{var s,l,c,u,v;return[!!(t!=null&&t.fullName&&(t!=null&&t.summary)),!!((s=t==null?void 0:t.experience)!=null&&s.length),!!((l=t==null?void 0:t.education)!=null&&l.length),!!((c=t==null?void 0:t.skills)!=null&&c.length),!!(t!=null&&t.jobPreferences&&((((u=t==null?void 0:t.jobPreferences.targetRoles)==null?void 0:u.length)??0)>0||(((v=t==null?void 0:t.jobPreferences.preferredLocations)==null?void 0:v.length)??0)>0))]},[t]);h.useEffect(()=>{if(!Z.length){E(null);return}if(!Z.some(s=>(s==null?void 0:s.id)===y)){const s=Z[0];s!=null&&s.id&&E(s.id)}},[Z,y]),h.useEffect(()=>{const s=C,l=Pe.current,c=Date.now();l==="saving"&&s==="saved"&&c-Me.current>2e3&&(p.success("Changes Saved",void 0,2e3),Me.current=c,_e.current=!0),s==="idle"&&(_e.current=!1),Pe.current=s},[C,p]),h.useEffect(()=>{if(_==="preferences"){if(C==="saving"){Ce(!1);return}if(Pe.current==="saved"&&C==="saved"){Ce(!0);const s=window.setTimeout(()=>Ce(!1),2500);return()=>window.clearTimeout(s)}}},[_,C]);const Pt=s=>{try{return new Intl.DateTimeFormat(void 0,{dateStyle:"short",timeStyle:"short"}).format(new Date(s))}catch{return s}},fe=Z.find(s=>(s==null?void 0:s.id)===y)||Z[0]||null,ce=fe?Z.findIndex(s=>(s==null?void 0:s.id)===fe.id):-1,Ve=s=>{if(!Z.length)return;const c=Math.min(Math.max((ce===-1?0:ce)+s,0),Z.length-1);E(Z[c].id)},[Dt,We]=h.useState(null),be=(s,l=!1)=>S(c=>({...c,...s}),l),Ge=(s,l=!1)=>{const c=gt(s);S(u=>({...u,skills:c}),l)},ye=s=>{S(l=>({...l,jobPreferences:{...l.jobPreferences??ge,...s}}))},ze=(s,l)=>{le(c=>({...c,[s]:l}))},Le=s=>{const l=K[s],c=s==="preferredLocations"?Ns(l):l.split(",").map(u=>u.trim()).filter(Boolean);ye({[s]:c})},Tt=s=>{const l=new Set(U.locationTypes);l.has(s)?l.delete(s):l.add(s),ye({locationTypes:Array.from(l)})},Rt=()=>{const s=`exp_${Date.now()}`,l={id:s,jobTitle:"",company:"",location:"",dates:"",description:[],accomplishments:[]};S(c=>{const u=c.experience||[],v=[l,...u];return{...c,experience:v}}),E(s),ne("")},zt=(s,l,c)=>{if(S(u=>{let v=u.experience.map(M=>{if(M.id===s){const H={...M,[l]:c};if(l==="dates"&&c){const X=Ue(c);if(X.start.year){const se=X.start.year,me=X.start.month;H.startDate=me?new Date(se,me-1).toLocaleDateString("en-US",{month:"short",year:"numeric"}):se.toString()}if(X.end){if(X.isCurrent)H.endDate="Present",H.isCurrent=!0;else if(X.end.year){const se=X.end.year,me=X.end.month;H.endDate=me?new Date(se,me-1).toLocaleDateString("en-US",{month:"short",year:"numeric"}):se.toString(),H.isCurrent=!1}}}return H}return M});return l==="dates"&&(v=la(v),v.find(H=>H.id===s)&&E(s)),{...u,experience:v}}),l==="jobTitle"||l==="company"){const u=t==null?void 0:t.experience.find(H=>H.id===s),v=l==="jobTitle"?c:(u==null?void 0:u.jobTitle)||"",M=l==="company"?c:(u==null?void 0:u.company)||"";De.current&&clearTimeout(De.current),De.current=setTimeout(()=>{Lt(s,v,M)},1200)}},Lt=async(s,l,c)=>
6{console.log("[SocraticCoach] Triggering for:",{jobTitle:l,company:c});const u=t==null?void 0:t.experience.find(v=>v.id===s);if(u&&l.length>3&&(u.accomplishments.length===0||u.accomplishments.length===1&&!u.accomplishments[0].description))try{const{question:v}=await ws(l,c,u.accomplishments.map(M=>M.description).filter(Boolean),t==null?void 0:t.fullName);S(M=>({...M,experience:M.experience.map(H=>H.id===s?{...H,clarifyingQuestion:v}:H)}))}catch(v){console.error("[SocraticCoach] Failed to fetch question:",v)}},At=s=>{S(l=>({...l,experience:l.experience.filter(c=>c.id!==s)}))},Et=()=>{S(s=>({...s,education:[...s.education||[],{id:`edu_${Date.now()}`,degree:"",university:"",dates:""}]}))},Ft=(s,l,c)=>{S(u=>({...u,education:u.education.map(v=>v.id===s?{...v,[l]:c}:v)}))},Ut=s=>{S(l=>({...l,education:l.education.filter(c=>c.id!==s)}))},$t=async(s,l)=>{const c=t==null?void 0:t.experience.find(v=>v.id===s);if(!c)return;const u=c.accomplishments.find(v=>v.id===l);if(!u||!u.description.trim()){p.info("Casual Note Needed","Enter a rough accomplishment first for the AI to optimize.");return}p.info("AI is Thinking...","Refactoring your note into a high-impact STAR bullet point.");try{const v=await js(u.description,c.jobTitle,c.company,t==null?void 0:t.fullName);if(!v.final_bullet.trim()||v.final_bullet.trim()===u.description.trim()){p.info("No Rewrite Suggested","The AI had no stronger phrasing for this note — it stays as-is.");return}Ie(M=>({...M,[l]:{original:u.description,proposed:v.final_bullet,metrics:v.recommended_metrics||[],applied:!1}})),p.success("Suggestion Ready","Review the STAR rewrite below — your original stays until you accept it.")}catch(v){p.error("AI Refactor Failed",v instanceof Error?v.message:"Something went wrong. Please try again.")}},Bt=(s,l)=>{const c=Se[l];c&&(G(s,l,c.proposed),Ie(u=>({...u,[l]:{...c,applied:!0}})))},Mt=(s,l)=>{const c=Se[l];c&&(c.applied&&G(s,l,c.original),Ie(u=>{const v={...u};return delete v[l],v}))},_t=async()=>{if(he)return;const s=R.length,l=s>0?`This will permanently delete all entries from your Career Diary AND all ${s} document${s>1?"s":""} in your Documents folder. This action cannot be undone. Continue?`:"This will permanently delete all entries from your Career Diary. This action cannot be undone. Continue?";if(window.confirm(l)){Be(!0);try{await W(),O("basic"),ne("")}finally{Be(!1)}}},Ht=async s=>{console.log("[CareerDiaryPage] LinkedIn PDF selected:",s.name),ke(!1),pe.current=!1;try{await $(s),!i.error&&!pe.current&&(p.success("LinkedIn Profile Imported","Your LinkedIn profile has been successfully imported to your Career Diary."),pe.current=!0)}catch(l){pe.current=!1,p.error("Import Failed",l instanceof Error?l.message:"Failed to import LinkedIn profile. Please try again.")}},Oe=[t==null?void 0:t.fullName,t==null?void 0:t.contactInfo,(t==null?void 0:t.summary)&&t.summary.slice(0,80)].filter(Boolean).join(" • "),Ye=(et=t==null?void 0:t.experience)!=null&&et.length?`${t.experience.length} role${t.experience.length>1?"s":""} • Latest: ${((tt=t.experience[0])==null?void 0:tt.jobTitle)||"Role"} at ${((st=t.experience[0])==null?void 0:st.company)||"Company"}`:"No roles captured yet.",Je=(at=t==null?void 0:t.education)!=null&&at.length?`${t.education.length} entr${t.education.length>1?"ies":"y"} • Latest: ${t.education[0].degree} at ${t.education[0].university}`:"No education yet.",Ze=(rt=t==null?void 0:t.skills)!=null&&rt.length?t.skills.slice(0,8).join(", ")+(t.skills.length>8?"…":""):"Add skills to boost matching.",Qe=U.targetRoles.length||U.preferredLocations.length?[U.targetRoles.length?`Roles: ${U.targetRoles.slice(0,3).join(", ")}`:null,U.preferredLocations.length?`Locations: ${U.preferredLocations.slice(0,2).join(", ")}`:null,U.locationTypes.length?`Mode: ${U.locationTypes.join(", ")}`:null].filter(Boolean).join(" • "):"Use preferences to steer job search.",ve=[{id:"basic",title:"Professional Identity",description:"Your headline info powers every tailored resume and extension request.",summary:Oe,render:()=>{var s,l,c;return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1.5fr)_minmax(280px,0.9fr)] items-start",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(Ws,{contactDetails:t==null?void 0:t.contactDetails,contactInfoString:(t==null?void 0:t.contactInfo)||"",personalInfo:{firstName:(t==null?void 0:t.firstName)||"",middleName:(t==null?void 0:t.middleName)||"",lastName:(t==null?void 0:t.lastName)||"",preferredName:(t==null?void 0:t.preferredName)||"",fullName:(t==null?void 0:t.fullName)||""},onChange:(u,v,M)=>{var H;be({contactDetails:u,contactInfo:v,...M}),u.zipcode!==void 0&&u.zipcode!==(((H=t==null?void 0:t.contactDetails)==null?void 0:H.zipcode)||"")&&Y(u.zipcode||"")},onBlurSave:(u,v,M)=>{be({contactDetails:u,contactInfo:v,...M},!0)},className:"bg-[var(--bg-secondary)] border border-[var(--border-default)]"}),((l=(s=i.session)==null?void 0:s.user)==null?void 0:l.id)&&e.jsxs(ae,{variant:"default",padding:"md",children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-[var(--text-secondary)] font-semibold block mb-4",children:"Profile Photo"}),e.jsx(ea,{currentPhotoUrl:t==null?void 0:t.photoUrl,currentPhotoPath:t==null?void 0:t.photoStoragePath,userId:i.session.user.id,fullName:(t==null?void 0:t.fullName)||"",onPhotoChange:It})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-[var(--text-secondary)] font-semibold block mb-2",children:"Professional summary"}),e.jsx("textarea",{value:(t==null?void 0:t.summary)||"",onChange:u=>be({summary:u.target.value}),onBlur:u=>be({summary:u.target.value.trim()},!0),rows:6,className:"w-full rounded-2xl border border-[var(--border-default)] bg-[var(--bg-tertiary)] text-[var(--text-primary)] px-4 py-3 text-sm resize-y min-h-[170px] placeholder:text-[var(--text-secondary)]/50",placeholder:"Tell recruiters who you are, the industries you know, and the impact you create."})]})]}),e.jsxs(ae,{variant:"soft",padding:"md",className:"space-y-4",children:[e.jsxs("div",{className:"rounded-xl border border-[var(--border-default)] bg-[var(--bg-secondary)] px-4 py-3",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-[var(--text-secondary)] font-semibold mb-2",children:"Base location"}),e.jsx(ks,{location:w,zipcode:b,radius:(c=t==null?void 0:t.jobPreferences)==null?void 0:c.searchRadius,onSave:B,onZipcodeSave:Y,onRadiusSave:u=>S(v=>({...v,jobPreferences:{...v.jobPreferences||{},searchRadius:u}}))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-[var(--text-secondary)] font-semibold",children:"Qu
6ick Actions"}),e.jsx(j,{onClick:()=>ke(!0),variant:"primary",size:"md",className:"w-full",leftIcon:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),children:"Import from LinkedIn"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-[var(--border-default)]"})}),e.jsx("div",{className:"relative flex justify-center text-xs",children:e.jsx("span",{className:"bg-[var(--bg-tertiary)] px-2 text-[var(--text-secondary)]",children:"or"})})]}),e.jsx(j,{onClick:a,variant:"primary",size:"md",className:"w-full",leftIcon:e.jsx(de,{className:"h-4 w-4"}),children:"Tailor Resume"}),e.jsx(j,{onClick:_t,disabled:he,variant:"danger",size:"md",className:"w-full",leftIcon:e.jsx(re,{className:"h-3.5 w-3.5"}),loading:he,children:he?"Clearing...":"Clear diary"}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)] text-center",children:"Clear removes all entries to start fresh"})]})]})]})})}},{id:"experience",title:"Career Timeline",description:"Navigate roles as a timeline, edit details, and capture AI-suggested bullets.",summary:Ye,render:()=>e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,280px)_minmax(0,1fr)]",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-2xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900/40 p-3",children:e.jsx("input",{type:"text",value:te,onChange:s=>ne(s.target.value),placeholder:"Search roles or companies",className:"w-full rounded-xl border border-[var(--border-default)] bg-[var(--bg-secondary)] text-[var(--text-primary)] px-3 py-2 text-sm"})}),e.jsx("div",{className:"rounded-2xl border border-gray-100 dark:border-slate-800 bg-white dark:bg-slate-900 p-4 max-h-80 overflow-y-auto relative",children:Z.length===0?e.jsx("p",{className:"text-sm text-gray-500 dark:text-slate-400",children:"No roles yet. Upload a resume or add your first experience."}):e.jsxs("div",{className:"relative pl-4",children:[e.jsx("span",{className:"absolute left-1 top-0 bottom-0 w-px bg-gradient-to-b from-blue-200 to-transparent dark:from-blue-500/30"}),Z.map(s=>!s||!s.id?null:e.jsxs(j,{onClick:()=>E(s.id),variant:"ghost",className:`w-full text-left mb-3 last:mb-0 pl-4 py-2 rounded-2xl transition h-auto border-none
7                              ${y===s.id?"bg-[var(--color-accent)]/10":"bg-transparent"}`,children:[e.jsx("span",{className:`absolute -left-[7px] mt-2 h-2.5 w-2.5 rounded-full border ${y===s.id?"border-[var(--color-accent)] bg-[var(--bg-secondary)]":"border-[var(--border-default)] bg-[var(--bg-secondary)]"}`}),e.jsxs("div",{className:"font-normal",children:[e.jsx("p",{className:"text-sm font-semibold text-[var(--text-primary)]",children:s.jobTitle||"Untitled role"}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]",children:s.company||"Company not specified"}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]/60",children:s.dates||""})]})]},s.id))]})}),e.jsx(j,{onClick:Rt,variant:"ghost",size:"md",className:"w-full border border-dashed border-[var(--border-default)] hover:border-[var(--color-accent)]",children:"+ Add another role"})]}),e.jsx("div",{className:"min-h-[320px]",children:fe?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 text-xs font-semibold text-[var(--text-secondary)]",children:[e.jsxs("span",{children:["Viewing role ",ce+1," of ",Z.length]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{onClick:()=>Ve(-1),disabled:ce<=0,variant:"secondary",size:"sm",children:"Previous"}),e.jsx(j,{onClick:()=>Ve(1),disabled:ce>=Z.length-1,variant:"secondary",size:"sm",children:"Next"})]})]}),e.jsx(sa,{experience:fe,isLocked:(t==null?void 0:t.locked)??!1,onFieldChange:zt,onRemove:At,onAddAccomplishment:D,onUpdateAccomplishment:G,onDeleteAccomplishment:V,onRefactorAccomplishment:$t,starPreviews:Se,onAcceptRefactor:Bt,onUndoRefactor:Mt})]}):e.jsxs("div",{className:"h-full rounded-2xl border border-dashed border-[var(--border-default)] flex flex-col items-center justify-center text-sm text-[var(--text-secondary)] p-6",children:[e.jsx("p",{children:"No experience selected."}),e.jsx("p",{className:"text-xs mt-1",children:"Use the timeline or add a role to begin."})]})})]})})},{id:"education",title:"Education & Credentials",description:"Degrees, programs, and certifications backing your story.",summary:Je,render:()=>{var s,l;return e.jsxs("div",{className:"space-y-4",children:[(s=t==null?void 0:t.education)!=null&&s.length?e.jsx("div",{className:"grid gap-4 lg:grid-cols-2",children:(l=t==null?void 0:t.education)==null?void 0:l.map(c=>e.jsx(aa,{education:c,isLocked:(t==null?void 0:t.locked)??!1,onChange:Ft,onRemove:Ut},c.id))}):e.jsx("div",{className:"rounded-2xl border border-dashed border-[var(--border-default)] p-6 text-sm text-[var(--text-secondary)] text-center",children:"Add degrees, bootcamps, or certifications to strengthen the profile pipeline."}),e.jsx(j,{onClick:Et,variant:"ghost",size:"md",leftIcon:e.jsx(yt,{className:"h-4 w-4"}),children:"Add education entry"})]})}},{id:"skills",title:"Skills & Stack",description:"Organize the toolkit the extension and job search will reference.",summary:Ze,render:()=>{var l,c;const s=Dt??(((l=t==null?void 0:t.skills)==null?void 0:l.join(", "))||"");return e.jsxs("div",{className:"space-y-4 grid gap-6 lg:grid-cols-2",children:[e.jsx("div",{className:"flex flex-wrap gap-2 content-start",children:((t==null?void 0:t.skills)||[]).length?(c=t==null?void 0:t.skills)==null?void 0:c.map((u,v)=>e.jsx("span",{className:"text-xs font-semibold px-3 py-1 rounded-full bg-[var(--color-accent)]/10 text-[var(--color-accent)]",children:u},`${u}-${v}`)):e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"Add a comma-separated list below to generate skill chips."})}),e.jsx("textarea",{value:s,onChange:u=>{We(u.target.value),Ge(u.target.value)},onBlur:u=>{const v=ia(gt(u.target.value)).join(", ");We(null),Ge(v,!0)},rows:3,className:"w-full rounded-2xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-4 py-3 text-sm resize-none",placeholder:"e.g., Customer research, SQL, Python, GenAI prompt design"})]})}},{id:"preferences",title:"Job Search Preferences",description:"Keep this current so job matches and the extension know what to prioritize.",summary:Qe,render:()=>e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Target roles"}),e.jsx("input",{type:"text",value:K.targetRoles,onChange:s=>ze("targetRoles",s.target.value),onBlur:()=>Le("targetRoles"),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-3 py-3 text-sm",placeholder:"Product leader, Program director, BizOps"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Preferred locations"}),e.jsx(vt,{value:K.preferredLocations,onChange:s=>ze("preferredLocations",s),onBlur:()=>Le("preferredLocations"),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-3 py-3 text-sm",placeholder:"Seattle, Remote-friendly, Toronto"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Preferred industries"}),e.jsx("input",{type:"text",value:K.preferredIndustries,onChange:s=>ze("preferredIndustries",s.target.value),onBlur:()=>Le("preferredIndustries"),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-3 py-3 text-sm",placeholder:"AI infra, Climate tech, Healthcare"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Salary expectations"}),e.jsx("input",{type:"text",value:U.salaryExpectation,onChange:s=>ye({salaryExpectation:s.target.value}),onBlur:s=>S(l=>({...l,jobPreferences:{...l.jobPreferences??ge,salaryExpectation:s.target.value}}),!0),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-3 py-3 text-sm",placeholder:"$180k base + bonus"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold",children:"Search radius (miles)"}),e.jsx("input",{type:"number",min:"0",max:"500",value:U.searchRadius||"",onChange:s=>
7ye({searchRadius:s.target.value?parseInt(s.target.value):void 0}),onBlur:s=>S(l=>({...l,jobPreferences:{...l.jobPreferences??ge,searchRadius:s.target.value?parseInt(s.target.value):void 0}}),!0),className:"w-full mt-1 rounded-xl border border-[var(--border-default)] bg-gray-50 dark:bg-slate-900 px-3 py-3 text-sm",placeholder:"25"}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mt-1",children:"Distance from your location to search for jobs"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-gray-500 dark:text-slate-400 font-semibold mb-2",children:"Working style"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:["remote","hybrid","onsite"].map(s=>e.jsx(j,{type:"button",onClick:()=>Tt(s),variant:"secondary",size:"sm",className:`capitalize h-auto border transition-colors ${U.locationTypes.includes(s)?"!bg-blue-600 !text-white !border-blue-600 hover:!bg-blue-700":""}`,"data-active":U.locationTypes.includes(s),"aria-pressed":U.locationTypes.includes(s),children:s},s))})]}),e.jsx(ta,{})]})},{id:"documents",title:"Document Library",description:"Upload career documents for the AI to reference when tailoring your resume.",summary:`${R.length} document${R.length===1?"":"s"}`,render:()=>e.jsx(Ms,{isGuest:r,onInitiateAuth:n})}],Vt=[{id:"basic",label:"Identity",summary:Oe,complete:!!(t!=null&&t.fullName||t!=null&&t.summary)},{id:"experience",label:"Timeline",summary:Ye,complete:!!((lt=t==null?void 0:t.experience)!=null&&lt.length)},{id:"education",label:"Education",summary:Je,complete:!!((nt=t==null?void 0:t.education)!=null&&nt.length)},{id:"skills",label:"Skills",summary:Ze,complete:!!((it=t==null?void 0:t.skills)!=null&&it.length)},{id:"preferences",label:"Preferences",summary:Qe,complete:!!(U.targetRoles.length||U.preferredLocations.length)},{id:"documents",label:"Documents",summary:`${R.length} file${R.length===1?"":"s"}`,complete:R.length>0}],Wt=Re.filter(Boolean).length,Gt=Re.length?Math.round(Wt/Re.length*100):0,je=ve.find(s=>s.id===_)??ve[0];return h.useEffect(()=>{const s=new URLSearchParams(m.search).get("tab");s&&ve.some(l=>l.id===s)&&s!==_&&O(s)},[_,m.search,ve]),e.jsxs("div",{className:"space-y-4 w-full max-w-[95vw] xl:max-w-[92vw] 2xl:max-w-[90vw] mx-auto px-3 sm:px-4 lg:px-6 xl:px-8",children:[e.jsxs("header",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 py-4 border-b border-[var(--border-default)] min-w-0",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold rt-heading-font truncate",children:(t==null?void 0:t.fullName)||"Career Diary"}),!(t!=null&&t.summary)&&e.jsxs("p",{className:"text-sm text-[var(--text-secondary)] mt-1 max-w-2xl",children:["Your Career Diary — every win, role and skill in one place, built from your resume and reused on every tailored application. ",e.jsx("span",{className:"text-[var(--ever-700)] font-medium",children:"Update once; tailor forever."})]}),(t==null?void 0:t.summary)&&e.jsx("p",{className:"text-sm text-[var(--text-secondary)]/80 mt-1 line-clamp-2",children:t.summary})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-wrap flex-shrink-0",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 px-3 py-2 rounded-full bg-[var(--color-accent)]/10 text-[var(--color-accent)] text-sm font-medium whitespace-nowrap",children:[Gt,"% complete"]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--text-secondary)]/70 flex-wrap",children:[e.jsxs("span",{className:"px-2 py-1 rounded bg-[var(--bg-tertiary)] whitespace-nowrap",children:[Te.roles," roles"]}),e.jsxs("span",{className:"px-2 py-1 rounded bg-[var(--bg-tertiary)] whitespace-nowrap",children:[Te.accomplishments," accomplishments"]}),e.jsxs("span",{className:"px-2 py-1 rounded bg-[var(--bg-tertiary)] whitespace-nowrap",children:[Te.skills," skills"]})]})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1fr)_minmax(0,320px)] 2xl:grid-cols-[minmax(0,1fr)_minmax(0,380px)] items-start",children:[e.jsxs("section",{className:"space-y-6",children:[e.jsx("div",{className:"iconic-surface p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:Vt.map(s=>e.jsxs(j,{onClick:()=>O(s.id),variant:_===s.id?"primary":"secondary",size:"md",className:`px-4 py-2 rounded-lg text-sm font-semibold transition-all h-auto
8                    ${_===s.id?"shadow-md":"bg-gray-100 dark:bg-slate-800 text-[var(--text-secondary)] hover:bg-gray-200 dark:hover:bg-slate-700"}`,children:[s.label,s.complete&&e.jsx("span",{className:"ml-2",children:"✓"}
8),s.id==="preferences"&&kt&&e.jsx("span",{className:"ml-2 rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-emerald-600 dark:text-emerald-300",children:"Saved"})]},s.id))})}),e.jsxs("div",{className:"iconic-surface p-5 space-y-6",children:[x&&e.jsx(ra,{summary:x.mergeSummary,isLocked:(t==null?void 0:t.locked)??!1,onMerge:z,onReplace:g,onCancel:N}),e.jsx(na,{}),e.jsxs("div",{className:"iconic-surface-soft flex flex-col md:flex-row md:items-center md:justify-between gap-3 px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-[var(--text-secondary)]/60 font-semibold",children:je.description}),e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)]",children:je.title}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)]/80 mt-1",children:je.summary||"Start filling this section to improve tailoring."})]}),e.jsx("span",{className:"text-xs font-semibold text-[var(--color-accent)]",children:"In focus"})]}),e.jsx("div",{className:"iconic-surface-soft p-6 shadow-inner shadow-gray-200/40",children:_!=="documents"&&Ct?e.jsx(Ls,{surface:"diary",tease:St,icon:e.jsx(de,{className:"w-8 h-8"}),action:e.jsxs("label",{className:"iconic-btn-primary inline-flex items-center gap-2 px-5 py-3 rounded-xl cursor-pointer text-white font-medium text-sm",children:[e.jsx(xe,{className:"w-4 h-4"}),"Build my Diary from a resume",e.jsx("input",{type:"file",accept:".pdf,.doc,.docx,.txt,.rtf",className:"hidden",onChange:s=>{var c;const l=(c=s.target.files)==null?void 0:c[0];l&&$(l),s.target.value=""}})]})}):je.render()})]})]}),e.jsxs("aside",{className:"space-y-3 lg:sticky lg:top-6 self-start z-10",children:[e.jsx(j,{type:"button",onClick:()=>jt(s=>!s),variant:"ghost",size:"md",className:"rt-nav-pill w-full justify-center shadow-sm h-auto border-none","data-active":!ue,"aria-pressed":!ue,children:ue?"Show assistant":"Hide assistant"}),!ue&&e.jsxs("div",{className:"iconic-surface p-4 flex flex-col h-[560px] shadow-lg",children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:["chat","diff","audit"].map(s=>e.jsx(j,{type:"button",onClick:()=>Nt(s),variant:ie===s?"primary":"ghost",size:"sm",className:"rt-nav-pill rt-nav-pill--compact flex-1 justify-center shadow-none h-auto border-none","data-active":ie===s,"aria-pressed":ie===s,children:s==="chat"?"AI Chat":s==="diff"?"Diff Preview":"Audit Trail"},s))}),e.jsxs("div",{className:"flex-1 mt-4 overflow-hidden",children:[ie==="chat"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 overflow-y-auto space-y-3 pr-1",children:[T.length===0&&e.jsx("p",{className:"text-xs text-[var(--text-secondary)]/60",children:"No conversations yet. Ask the assistant to refine a section."}),T.map((s,l)=>{var c;return e.jsx("div",{className:`rounded-2xl px-3 py-2 text-sm ${s.role==="user"?"bg-[var(--color-accent)] text-white self-end ml-auto":"bg-[var(--bg-tertiary)] text-[var(--text-secondary)]"}`,children:s.text},`chat-${s.role}-${l}-${(c=s.text)==null?void 0:c.substring(0,10)}`)})]}),A&&e.jsx("div",{className:"mt-3 rounded-xl border border-red-200 bg-red-50 px-3 py-2 text-xs font-semibold text-red-800",children:A}),P&&e.jsx(j,{onClick:L,variant:"secondary",size:"sm",className:"mt-3 w-full",children:"Undo last AI update"}),k&&e.jsxs("div",{className:"mt-3 border border-[var(--color-accent)]/30 rounded-2xl p-3 text-xs text-[var(--color-accent)]",children:[e.jsx("p",{className:"font-semibold mb-2",children:"Preview ready"}),e.jsx("p",{children:k.summary}),k.diffSummary.length>0&&e.jsx("ul",{className:"mt-2 space-y-1 text-xs",children:k.diffSummary.map((s,l)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"mt-1",children:"•"}),e.jsx("span",{children:s})]},l))}),e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[e.jsx(j,{onClick:q,variant:"primary",size:"sm",className:"flex-1",children:"Apply update"}),e.jsx(j,{onClick:ee,variant:"secondary",size:"sm",className:"flex-1",children:"Reject"})]})]}),e.jsxs("form",{onSubmit:s=>{var u;s.preventDefault();const c=(u=new FormData(s.currentTarget).get("assistantPrompt"))==null?void 0:u.trim();c&&(J(c),s.currentTarget.reset())},className:"mt-3 space-y-2",children:[e.jsx("textarea",{name:"assistantPrompt",rows:2,disabled:F,placeholder:"e.g., Make my Amazon role summary more concise",className:"w-full rounded-2xl border border-[var(--border-default)] bg-[var(--bg-tertiary)] px-3 py-2 text-sm"}),e.jsx(j,{type:"submit",disabled:F,loading:F,variant:"primary",size:"md",className:"w-full",children:"Ask assistant"})]})]}),ie==="diff"&&e.jsx("div",{className:"flex h-full flex-col",children:k!=null&&k.beforeText&&(k!=null&&k.afterText)?e.jsx(Us,{originalText:k.beforeText,newText:k.afterText}):e.jsx("div",{className:"flex h-full items-center justify-center text-center text-sm text-[var(--text-secondary)]/70",children:e.jsx("p",{children:"Ask the assistant for an update to see a diff preview."})})}),ie==="audit"&&e.jsxs("div",{className:"flex flex-col h-full space-y-3 overflow-y-auto",children:[I.length===0&&e.jsx("p",{className:"text-xs text-[var(--text-secondary)]/60",children:"No AI edits applied yet."}),I.map((s,l)=>e.jsxs("div",{className:"iconic-surface-soft p-3 text-xs space-y-1",children:[e.jsx("p",{className:"font-semibold text-[var(--text-primary)]",children:s.summary}),e.jsx("p",{className:"text-[var(--text-secondary)]/70",children:Pt(s.timestamp)}),s.diffSummary.length>0&&e.jsx("ul",{className:"list-disc list-inside space-y-0.5 text-[var(--text-secondary)]/80",children:s.diffSummary.slice(0,3).map((c,u)=>e.jsx("li",{children:c},u))})]},`${s.timestamp}-${l}`))]})]}),e.jsx("p",{className:"text-xs text-[var(--text-secondary)]/60 mt-3",children:"AI edits sync to the corpus powering tailoring and the Chrome companion."})]})]})]}),wt&&e.jsx(Gs,{onClose:()=>ke(!1),onFileSelect:Ht,isUploading:f})]})};export{ka as CareerDiaryPage};

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.