PageSourceSearch

https://careerdiary.io/assets/LinkedInPage-ClxI2pYf.js

js careerdiary.io collected 2026-09-24 15:03:59 UTC 9,270 bytes, 3 lines download raw bytes

1import{r as l,j as e}from"./animation-CddyXVCz.js";import{u as N,N as k,h as b,B as d,Z as I,$ as L,a0 as T,p as G,a1 as C,S}from"./index-CGKNpi9E.js";import{c as w}from"./clipboard-C0L7pyCw.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";const P=()=>{var u,g,r;const{state:t}=N(),n=k(),[i,p]=l.useState(((r=(g=(u=t.profile)==null?void 0:u.jobPreferences)==null?void 0:g.targetRoles)==null?void 0:r[0])||""),[c,h]=l.useState(!1),[f,y]=l.useState([]),o=l.useMemo(()=>{var s,a,x;return[(s=t.profile)==null?void 0:s.headline,(a=t.profile)==null?void 0:a.summary,...((x=t.profile)==null?void 0:x.skills)||[]].filter(Boolean).join(" | ")},[t.profile]),j=l.useMemo(()=>{var s,a;return((a=(s=t.profile)==null?void 0:s.experience)==null?void 0:a.flatMap(x=>(x.accomplishments||[]).map(v=>v.description)).filter(Boolean))||[]},[t.profile]),m=async()=>{var s;h(!0);try{const a=await I({profileData:o,accomplishments:j,targetRole:i,userName:(s=t.profile)==null?void 0:s.fullName});y(a.summaries)}catch(a){n.error("LinkedIn summary failed",a instanceof Error?a.message:"Try again later.")}finally{h(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(b,{variant:"glass",className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-[minmax(0,1fr)_auto]",children:[e.jsx("input",{value:i,onChange:s=>p(s.target.value),placeholder:"Target role",className:"rounded-xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900"}),e.jsx(d,{type:"button",variant:"primary",onClick:()=>{m()},disabled:c||!o,children:c?"Generating...":"Generate Summaries"})]})}),e.jsx("div",{className:"grid gap-4 xl:grid-cols-3",children:f.map(s=>e.jsxs(b,{variant:"glass",className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-sm font-semibold capitalize text-[var(--text-primary)]",children:s.style}),e.jsx(d,{type:"button",variant:"ghost",size:"sm",onClick:()=>w(s.text).then(()=>n.success("Copied summary")),children:"Copy"})]}),e.jsx("div",{className:"rounded-2xl border border-[var(--border-default)] bg-white p-4 text-sm leading-6 text-[var(--text-secondary)] dark:bg-slate-900",children:s.text}),e.jsxs("div",{className:"rounded-2xl bg-slate-50 p-4 dark:bg-slate-900/70",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-slate-500",children:"Preview"}),e.jsxs("div",{className:"mt-3 rounded-xl border border-slate-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-950",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500",children:"About"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-slate-700 dark:text-slate-300",children:s.text})]})]})]},s.style))})]})},E=()=>{var m,u,g;const{state:t}=N(),n=k(),[i,p]=l.useState(((g=(u=(m=t.profile)==null?void 0:m.jobPreferences)==null?void 0:u.targetRoles)==null?void 0:g[0])||""),[c,h]=l.useState(!1),[f,y]=l.useState([]),o=l.useMemo(()=>{var r;return((r=t.profile)==null?void 0:r.skills)||[]},[t.profile]),j=async()=>{var r,s;h(!0);try{const a=await L({currentHeadline:(r=t.profile)==null?void 0:r.headline,targetRole:i,keySkills:o,userName:(s=t.profile)==null?void 0:s.fullName});y(a.headlines)}catch(a){n.error("Headline generation failed",a instanceof Error?a.message:"Try again later.")}finally{h(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(b,{variant:"glass",className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-[minmax(0,1fr)_auto]",children:[e.jsx("input",{value:i,onChange:r=>p(r.target.value),placeholder:"Target role",className:"rounded-xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900"}),e.jsx(d,{type:"button",variant:"primary",onClick:()=>{j()},disabled:c||o.length===0,children:c?"Generating...":"Generate Headlines"})]})}),e.jsx("div",{className:"grid gap-4",children:f.map(r=>e.jsxs(b,{variant:"glass",className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-semibold text-[var(--text-primary)]",children:r.text}),e.jsxs("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:[r.characterCount," characters"]})]}),e.jsx(d,{type:"button",variant:"ghost",onClick:()=>w(r.text).then(()=>n.success("Copied headline")),children:"Copy"})]},r.text))})]})},H=()=>{const{state:t}=N(),n=k(),[i,p]=l.useState(""),[c,h]=l.useState("thought leadership"),[f,y]=l.useState(!1),[o,j]=l.useState(""),[m,u]=l.useState([]),g=l.useMemo(()=>{var s,a;return((a=(s=t.profile)==null?void 0:s.experience)==null?void 0:a.flatMap(x=>(x.accomplishments||[]).map(v=>({id:v.id,label:`${x.jobTitle} at ${x.company}`,description:v.description}))))||[]},[t.profile]),r=async()=>{var s;if(i){y(!0);try{const a=await T({diaryEntry:i,style:c,userName:(s=t.profile)==null?void 0:s.fullName});j(a.post),u(a.hashtags)}catch(a){n.error("Post generation failed",a instanceof Error?a.message:"Try again later.")}finally{y(!1)}}};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(b,{variant:"glass",className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-[minmax(0,1fr)_220px_auto]",children:[e.jsxs("select",{value:i,onChange:s=>p(s.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:"",children:"Select a diary entry"}),g.map(s=>e.jsx("option",{value:s.description,children:s.label},s.id))]}),e.jsxs("select",{value:c,onChange:s=>h(s.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:"thought leadership",children:"Thought leadership"}),e.jsx("option",{value:"milestone",children:"Milestone"}),e.jsx("option",{value:"lesson learned",children:"Lesson learned"})]}),e.jsx(d,{type:"button",variant:"primary",onClick:()=>{r()},disabled:f||!i,children:f?"Generating...":"Generate Post"})]})}),o&&e.jsxs(b,{variant:"glass",className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:"Draft post"}),e.jsx(d,{type:"button",variant:"ghost",onClick:()=>w(`${o}
2
3${m.join(" ")}`).then(()=>n.success("Copied post")),children:"Copy"})]}),e.jsx("textarea",{value:o,onChange:s=>j(s.target.value),rows:8,className:"w-full rounded-2xl border border-[var(--border-default)] bg-white px-4 py-3 text-sm dark:bg-slate-900"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:m.map(s=>e.jsx("span",{className:"rounded-full bg-blue-500/10 px-3 py-1 text-xs font-semibold text-blue-700 dark:text-blue-300",children:s},s))}),e.jsxs("div",{className:"rounded-2xl bg-slate-50 p-4 dark:bg-slate-900/70",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-slate-500",children:"Preview"}),e.jsxs("div",{className:"mt-3 rounded-xl border border-slate-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-950",children:[e.jsx("p",{className:"text-sm whitespace-pre-wrap text-slate-700 dark:text-slate-300",children:o}
3),e.jsx("p",{className:"mt-4 text-sm text-blue-600 dark:text-blue-300",children:m.join(" ")})]})]})]})]})},_=()=>{const[t,n]=l.useState("summary");G({title:"LinkedIn Optimization | CareerDiary",description:"Generate LinkedIn summaries, headlines, and post drafts tailored to your target role.",canonical:"https://careerdiary.io/app/linkedin"});const i=p=>t===p?"bg-blue-600 text-white shadow-lg":"bg-white/70 text-slate-600 hover:bg-slate-100 dark:bg-slate-900/70 dark:text-slate-300 dark:hover:bg-slate-800";return e.jsxs("div",{className:"mx-auto w-full max-w-6xl space-y-6",children:[e.jsx(b,{variant:"glass",className:"overflow-hidden bg-gradient-to-br from-sky-500/12 via-white to-blue-500/12 dark:from-sky-500/10 dark:via-slate-950 dark:to-blue-500/10",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-sky-500/10 px-3 py-1 text-xs font-semibold uppercase tracking-[0.2em] text-sky-700 dark:text-sky-300",children:[e.jsx(C,{className:"h-4 w-4"}),"LinkedIn Optimization"]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-[var(--text-primary)]",children:"Shape your public narrative"}),e.jsx("p",{className:"mt-2 max-w-3xl text-sm text-[var(--text-secondary)]",children:"Generate stronger summaries, search-friendly headlines, and polished post drafts directly from your Career Diary."})]})]})}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx(d,{type:"button",variant:"ghost",className:i("summary"),onClick:()=>n("summary"),leftIcon:e.jsx(S,{className:"h-4 w-4"}),children:"Summary Generator"}),e.jsx(d,{type:"button",variant:"ghost",className:i("headline"),onClick:()=>n("headline"),leftIcon:e.jsx(C,{className:"h-4 w-4"}),children:"Headline Optimizer"}),e.jsx(d,{type:"button",variant:"ghost",className:i("post"),onClick:()=>n("post"),leftIcon:e.jsx(S,{className:"h-4 w-4"}),children:"Post Drafts"})]}),t==="summary"&&e.jsx(P,{}),t==="headline"&&e.jsx(E,{}),t==="post"&&e.jsx(H,{})]})};export{_ as LinkedInPage};

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.