PageSourceSearch

https://authengine-az3zrmtj.manus.space/assets/Outreach-uTm6qpT1.js

js authengine-az3zrmtj.manus.space collected 2026-10-03 05:00:15 UTC 33,330 bytes, 1 lines download raw bytes

1import{r as s,j as e}from"./react-vendor-Dc4PsQq0.js";import{P as Le,S as H,f as C,E as Pe}from"./PageHeader-Bi4OJb3E.js";import{u as Ee,t as p,a as n,b as ne,S as J,k as m,l as j,m as O,n as v,o as f,D as ie,e as oe,f as de,h as xe,i as pe,j as he}from"./index-5nRfQ--P.js";import{L as c,I as S}from"./label-Doc1f-25.js";import{T as Re,a as Ve,b as ue,c as ge}from"./tabs-CjywmeMS.js";import{T as Y}from"./textarea-lTLWfDgQ.js";import{a7 as h,an as _e,ar as me,as as M,d as je,at as Oe,au as Me,i as $e,av as qe,aw as ze,ax as Qe,g as Be,a8 as $,ay as Fe,N as Ge,e as We,az as He}from"./ui-vendor-BQj_Jcqx.js";import"./data-vendor-BDtrsGNX.js";import"./vendor-C0RMI9HL.js";const Je=["attempt","response","follow_up","note","status_change"],Ye=["email","form","social","phone","other"],Ke=["none","positive","neutral","negative","bounced"],Xe=["anchor_text","guest_post_pitch","bio_blurb","citation_snippet"];function ve(T){try{return T?JSON.parse(T):[]}catch{return[]}}function ia(){const{activeProject:T}=Ee(),q=T.id;p.useUtils();const[fe]=s.useState(()=>Date.now()+10080*60*1e3),k=s.useMemo(()=>Number(new URLSearchParams(window.location.search).get("campaignId"))||null,[]),[i,D]=s.useState(k),[Ne,z]=s.useState(k?"content":"outreach"),[l,N]=s.useState(null),[be,y]=s.useState(!1),[ye,U]=s.useState(!1),[K,we]=s.useState("guest_post_pitch"),[X,Ce]=s.useState(""),[w,Q]=s.useState(""),[I,Z]=s.useState(null),[o,L]=s.useState("draft"),[Se,ee]=s.useState(""),[ae,te]=s.useState([]),[se,ce]=s.useState([]),[r,b]=s.useState({activityType:"attempt",channel:"email",responseStatus:"none",subject:"",notes:"",followUpAt:""}),[d,A]=s.useState({name:"",email:"",role:"",profileUrl:""}),u=p.campaigns.list.useQuery({projectId:q});s.useEffect(()=>{!i&&u.data?.length&&D(u.data[0].id)},[u.data,i]);const ke=s.useMemo(()=>({campaignId:i??0}),[i]),x=p.campaigns.board.useQuery(ke,{enabled:!!i});s.useEffect(()=>{l&&x.data&&!x.data.items.some(a=>a.id===l)&&N(null)},[x.data,l]),s.useEffect(()=>{if(!k||l||!x.data?.items.length)return;const a=x.data.items.find(t=>t.stage==="qualified")??x.data.items.find(t=>t.stage==="discovered");a&&N(a.id)},[k,x.data?.items,l]);const re=u.data?.find(a=>a.id===i),P=x.data?.items.find(a=>a.id===l),g=P?.opportunityId??0,le=s.useMemo(()=>({opportunityId:g}),[g]),E=p.outreach.contacts.useQuery(le,{enabled:!!g}),R=p.outreach.projectTimeline.useQuery({projectId:q,limit:100}),V=p.outreach.due.useQuery({projectId:q,through:fe}),_=p.content.list.useQuery(le,{enabled:!!g}),B=p.outreach.log.useMutation({onSuccess:()=>{h.success("Outreach activity logged"),y(!1),b({activityType:"attempt",channel:"email",responseStatus:"none",subject:"",notes:"",followUpAt:""}),R.refetch(),V.refetch(),x.refetch()},onError:a=>h.error(a.message)}),F=p.outreach.createContact.useMutation({onSuccess:()=>{h.success("Contact added"),U(!1),A({name:"",email:"",role:"",profileUrl:""}),E.refetch()},onError:a=>h.error(a.message)}),G=p.content.generate.useMutation({onSuccess:a=>{Z(a.id),Q(a.draft),L("draft"),ee(a.rationale),te(a.claimsRequiringVerification),ce([...a.warnings??[],...a.recommendedDisclosure?[`Suggested disclosure: ${a.recommendedDisclosure}`]:[]]),h.success("Draft generated for review"),_.refetch()},onError:a=>h.error(a.message)}),W=p.content.approve.useMutation({onSuccess:()=>{L("approved"),h.success("Draft approved and unlocked for copying"),_.refetch()},onError:a=>h.error(a.message)}),Ae=a=>{if(a.preventDefault(),!l)return h.error("Choose a campaign opportunity.");B.mutate({campaignOpportunityId:l,activityType:r.activityType,channel:r.channel,responseStatus:r.responseStatus,subject:r.subject||void 0,notes:r.notes,followUpAt:r.followUpAt?new Date(r.followUpAt).getTime():null})},Te=a=>{a.preventDefault(),g&&F.mutate({opportunityId:g,name:d.name||void 0,email:d.email||void 0,role:d.role||void 0,profileUrl:d.profileUrl||void 0,isPrimary:!0})},De=a=>{Z(a.id),Q(a.draft),L(a.status),ee(a.rationale??""),te(ve(a.claimsJson)),ce(ve(a.warningsJson))},Ue=async()=>{o==="approved"&&(await navigator.clipboard.writeText(w),h.success("Approved draft copied"))};return e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:102",className:"mx-auto max-w-[1500px] space-y-6",children:[e.jsx(Le,{"data-loc":"client/src/pages/Outreach.tsx:103",eyebrow:"Relationship operations",title:"Outreach & placement content",description:"Log every contact attempt, plan follow-ups, and prepare context-aware drafts. AI output stays locked behind human review and approval.",actions:e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:103",onClick:()=>y(!0),disabled:!u.data?.length,children:[e.jsx(_e,{"data-loc":"client/src/pages/Outreach.tsx:103",className:"mr-2 h-4 w-4"}),"Log activity"]})}),k?e.jsxs("section",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"rounded-2xl border border-violet-200 bg-vi
1olet-50/70 p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:104",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"flex flex-wrap items-center gap-2",children:[e.jsx(ne,{"data-loc":"client/src/pages/Outreach.tsx:104",className:"bg-violet-600 text-white hover:bg-violet-600",children:"Campaign loaded"}),re?e.jsx(ne,{"data-loc":"client/src/pages/Outreach.tsx:104",variant:"outline",className:"border-violet-200 bg-white",children:re.name}):null]}),e.jsx("h2",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mt-3 text-sm font-semibold",children:"Review outreach in five deliberate steps"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mt-1 text-xs leading-5 text-muted-foreground",children:"Choose the prospect, generate a tailored draft, verify every claim and warning, approve the final text, then copy it into your authorized email/form/social channel. Return here afterward to log what was actually sent and schedule follow-up."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"flex flex-wrap gap-2",children:[e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:104",variant:"outline",className:"bg-white",onClick:()=>z("outreach"),children:[e.jsx(me,{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mr-2 h-4 w-4"}),"Activity tracker"]}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:104",onClick:()=>z("content"),children:[e.jsx(M,{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mr-2 h-4 w-4"}),"Prepare reviewed draft"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mt-4 flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2.5 text-[11px] leading-5 text-amber-900",children:[e.jsx(je,{"data-loc":"client/src/pages/Outreach.tsx:104",className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{"data-loc":"client/src/pages/Outreach.tsx:104",children:[e.jsx("strong",{"data-loc":"client/src/pages/Outreach.tsx:104",children:"No automatic sending:"})," Authority Engine does not contact a publisher from this screen. You choose the recipient and channel, then log the real activity for an auditable timeline."]})]})]}):null,e.jsxs(Re,{"data-loc":"client/src/pages/Outreach.tsx:105",value:Ne,onValueChange:a=>z(a),className:"space-y-5",children:[e.jsxs(Ve,{"data-loc":"client/src/pages/Outreach.tsx:106",className:"h-11 rounded-xl bg-muted p-1",children:[e.jsxs(ue,{"data-loc":"client/src/pages/Outreach.tsx:106",value:"outreach",className:"h-9 rounded-lg px-4",children:[e.jsx(Oe,{"data-loc":"client/src/pages/Outreach.tsx:106",className:"mr-2 h-3.5 w-3.5"}),"Outreach tracker"]}),e.jsxs(ue,{"data-loc":"client/src/pages/Outreach.tsx:106",value:"content",className:"h-9 rounded-lg px-4",children:[e.jsx(M,{"data-loc":"client/src/pages/Outreach.tsx:106",className:"mr-2 h-3.5 w-3.5"}),"Content studio"]})]}),e.jsx(ge,{"data-loc":"client/src/pages/Outreach.tsx:107",value:"outreach",className:"space-y-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:108",className:"grid gap-5 xl:grid-cols-[.72fr_1.28fr]",children:[e.jsxs("section",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"surface-card rounded-2xl p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",children:[e.jsx("h2",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"text-sm font-semibold",children:"Follow-ups due"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-1 text-[11px] text-muted-foreground",children:"Overdue and coming within seven days"})]}),e.jsx(Me,{"data-loc":"client/src/pages/Outreach.tsx:109",className:"h-4 w-4 text-primary"})]}),V.isLoading?e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-5 space-y-3",children:[e.jsx(J,{"data-loc":"client/src/pages/Outreach.tsx:109",className:"h-20 rounded-xl"}),e.jsx(J,{"data-loc":"client/src/pages/Outreach.tsx:109",className:"h-20 rounded-xl"})]}):V.data?.length?e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-5 space-y-2",children:V.data.map(a=>{const t=!!(a.followUpAt&&a.followUpAt<Date.now());return e.jsxs("button",{"data-loc":"client/src/pages/Outreach.tsx:109",onClick:()=>
1{D(u.data?.find(Ie=>Ie.name===a.campaignName)?.id??i),N(a.campaignOpportunityId),y(!0)},className:"w-full rounded-xl border bg-white p-3.5 text-left hover:border-violet-200 hover:shadow-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"truncate text-xs font-semibold",children:a.title||a.domain}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-1 truncate text-[10px] text-muted-foreground",children:a.campaignName})]}),e.jsx("span",{"data-loc":"client/src/pages/Outreach.tsx:109",className:`rounded-full px-2 py-1 text-[9px] font-semibold ${t?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"}`,children:t?"Overdue":a.followUpAt?new Date(a.followUpAt).toLocaleDateString():"Scheduled"})]}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-3 line-clamp-2 text-[11px] leading-5 text-muted-foreground",children:a.notes})]},a.id)})}):e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-5 rounded-xl border border-dashed p-6 text-center",children:[e.jsx($e,{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mx-auto h-5 w-5 text-emerald-500"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-2 text-xs font-semibold",children:"No follow-ups due"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:109",className:"mt-1 text-[10px] text-muted-foreground",children:"Future reminders will appear here."})]})]}),e.jsxs("section",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"surface-card overflow-hidden rounded-2xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"flex items-center justify-between border-b px-5 py-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:110",children:[e.jsx("h2",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"text-sm font-semibold",children:"Activity timeline"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-1 text-[11px] text-muted-foreground",children:"Newest recorded touchpoints across this project"})]}),e.jsx(me,{"data-loc":"client/src/pages/Outreach.tsx:110",className:"h-4 w-4 text-muted-foreground"})]}),R.isLoading?e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"space-y-3 p-5",children:Array.from({length:4},(a,t)=>e.jsx(J,{"data-loc":"client/src/pages/Outreach.tsx:110",className:"h-20 rounded-xl"},t))}):R.data?.length?e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"max-h-[620px] divide-y overflow-y-auto",children:R.data.map(a=>e.jsxs("article",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"flex gap-4 px-5 py-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-violet-50 text-violet-600",children:a.activityType==="response"?e.jsx(qe,{"data-loc":"client/src/pages/Outreach.tsx:110",className:"h-4 w-4"}):e.jsx(ze,{"data-loc":"client/src/pages/Outreach.tsx:110",className:"h-4 w-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"text-xs font-semibold",children:a.title||a.domain}),e.jsx(H,{"data-loc":"client/src/pages/Outreach.tsx:110",value:a.activityType}),a.responseStatus!=="none"&&e.jsx(H,{"data-loc":"client/src/pages/Outreach.tsx:110",value:a.responseStatus})]}),e.jsxs("p",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-1 text-[10px] text-muted-foreground",children:[a.campaignName," · ",new Date(a.occurredAt).toLocaleString()," ",a.channel?`· ${C(a.channel)}`:""]}),a.subject&&e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-2 text-xs font-medium",children:a.subject}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-1 text-[11px] leading-5 text-muted-foreground",children:a.notes}),a.followUpAt&&e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"mt-2 flex items-center gap-1.5 text-[10px] font-medium text-amber-700",children:[e.jsx(Qe,{"data-loc":"client/src/pages/Outreach.tsx:110",className:"h-3 w-3"}
1),"Follow up ",new Date(a.followUpAt).toLocaleString()]})]})]},a.id))}):e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:110",className:"p-5",children:e.jsx(Pe,{"data-loc":"client/src/pages/Outreach.tsx:110",icon:Oe,title:"No outreach activity yet",description:"Choose a campaign opportunity and log the first contact attempt, response, note, or follow-up.",action:e.jsx(n,{"data-loc":"client/src/pages/Outreach.tsx:110",onClick:()=>y(!0),disabled:!u.data?.length,children:"Log first activity"})})})]})]})}),e.jsx(ge,{"data-loc":"client/src/pages/Outreach.tsx:114",value:"content",className:"space-y-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:115",className:"grid gap-5 xl:grid-cols-[.72fr_1.28fr]",children:[e.jsxs("section",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"surface-card rounded-2xl p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"flex items-center gap-2",children:[e.jsx(Be,{"data-loc":"client/src/pages/Outreach.tsx:116",className:"h-4 w-4 text-primary"}),e.jsx("h2",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"text-sm font-semibold",children:"Generation context"})]}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mt-2 text-[11px] leading-5 text-muted-foreground",children:"Choose a campaign and opportunity. Authority Engine combines the target page evidence with this project’s audience, topics, voice, and goals."}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mt-5 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:116",children:"Campaign"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:116",value:i?String(i):"",onValueChange:a=>{D(Number(a)),N(null)},children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:116",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:116",placeholder:"Select campaign"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:116",children:u.data?.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:116",value:String(a.id),children:a.name},a.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:116",children:"Target opportunity"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:116",value:l?String(l):"",onValueChange:a=>N(Number(a)),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:116",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:116",placeholder:"Select opportunity"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:116",children:x.data?.items.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:116",value:String(a.id),children:a.title||a.domain},a.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:116",children:"Content type"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:116",value:K,onValueChange:a=>we(a),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:116",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:116"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:116",children:Xe.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:116",value:a,children:C(a)},a))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"space-y-2",children:[e.jsxs(c,{"data-loc":"client/src/pages/Outreach.tsx:116",children:["Additional direction ",e.jsx("span",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"font-normal text-muted-foreground",children:"— optional"})]}),e.jsx(Y,{"data-loc":"client/src/pages/Outreach.tsx:116",value:X,onChange:a=>Ce(a.target.value),placeholder:"Focus on the editor’s audience. Avoid promotional language. Lead with a useful contribution.",className:"min-h-28"})]}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:116",className:"w-full",disabled:!g||G.isPending,onClick:()=>G.mutate({opportunityId:g,contentType:K,instructions:X||void 0}),children:[G.isPending?e.jsx($,{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(M,{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mr-2 h-4 w-4"}),"Generate tailored draft"]})]}),_.data?.length?e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mt-7 border-t pt-5",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mb-3 text-[10px] font-semibold uppercase tracking-[.14em] text-muted-foreground",children:"Draft history"}),e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"max-h-48 space-y-2 overflow-y-auto",children:_.data.map(a=>e.jsxs("button",{"data-loc":"client/src/pages/Outreach.tsx:116",onClick:()=>De(a),className:`w-full rounded-xl border p-3 text-left ${I===a.id?"border-violet-200 bg-vi
1olet-50/60":"bg-white hover:border-violet-200"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"flex items-center justify-between gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"text-[11px] font-semibold",children:C(a.contentType)}),e.jsx(H,{"data-loc":"client/src/pages/Outreach.tsx:116",value:a.status})]}),e.jsxs("p",{"data-loc":"client/src/pages/Outreach.tsx:116",className:"mt-1 text-[9px] text-muted-foreground",children:[new Date(a.createdAt).toLocaleString()," · ",a.model]})]},a.id))})]}):null]}),e.jsxs("section",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"surface-card rounded-2xl p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"flex flex-col gap-3 border-b pb-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",children:[e.jsx("h2",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"text-sm font-semibold",children:"Human review"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-1 text-[11px] text-muted-foreground",children:"Edit freely. Approval is required before copy is enabled."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"flex gap-2",children:[e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:117",variant:"outline",size:"sm",disabled:!w||o!=="approved",onClick:Ue,children:[e.jsx(Fe,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mr-1.5 h-3.5 w-3.5"}),"Copy approved"]}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:117",size:"sm",disabled:!I||!w.trim()||o==="approved"||W.isPending,onClick:()=>I&&W.mutate({generationId:I,reviewedDraft:w}),children:[W.isPending?e.jsx($,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):e.jsx(Ge,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mr-1.5 h-3.5 w-3.5"}),o==="approved"?"Approved":"Approve draft"]})]})]}),w?e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"space-y-4 pt-5",children:[e.jsx(Y,{"data-loc":"client/src/pages/Outreach.tsx:117",value:w,onChange:a=>{Q(a.target.value),o==="approved"&&L("draft")},className:"min-h-[320px] resize-y bg-white text-sm leading-6"}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"rounded-xl border bg-muted/25 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"text-[10px] font-semibold uppercase tracking-[.14em] text-muted-foreground",children:"Why this approach"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-2 text-[11px] leading-5 text-muted-foreground",children:Se||"No rationale was stored for this draft."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:`rounded-xl border p-4 ${o==="approved"?"border-emerald-200 bg-emerald-50":"border-amber-200 bg-amber-50"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:`flex items-center gap-2 text-xs font-semibold ${o==="approved"?"text-emerald-800":"text-amber-800"}`,children:[o==="approved"?e.jsx(je,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"h-4 w-4"}):e.jsx(We,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"h-4 w-4"}),o==="approved"?"Human approved":"Review required"]}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:`mt-2 text-[11px] leading-5 ${o==="approved"?"text-emerald-700":"text-amber-700"}`,children:o==="approved"?"This reviewed version is unlocked for copying.":"Verify claims, personalization, fit, and disclosure before approval."})]})]}),ae.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"rounded-xl border border-red-200 bg-red-50 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"text-xs font-semibold text-red-800",children:"Claims requiring verification"}),e.jsx("ul",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-2 space-y-1 text-[11px] leading-5 text-red-700",children:ae.map(a=>e.jsxs("li",{"data-loc":"client/src/pages/Outreach.tsx:117",children:["• ",a]},a))})]}),se.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"rounded-xl border border-amber-200 bg-amber-50 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"text-xs font-semibold text-amber-800",children:"Generation notes"}),e.jsx("ul",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-2 space-y-1 text-[11px] leading-5 text-amber-700",children:se.map(a=>e.jsxs("li",{"data-loc":"client/src/pages/Outreach.tsx:117",children:["• ",a]},a))})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"flex min-h-[520px] flex-col items-center justify-center text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-violet-50 text-violet-600",children:e.jsx(M,{"data-loc":"client/src/pages/Outreach.tsx:117",className:"h-5 w-5"})}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-4 text-sm font-semibold",children:"Your review workspace is ready"}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:117",className:"mt-2 max-w-sm text-[11px] leading-5 text-muted-foreground",children:"Select a qualified target and generate anchor options, a pitch, a bio blurb, or a citation snippet grounded in its context."})]})]})]})})]}),e.jsx(ie,{"data-loc":"client/src/pages/Outreach.tsx:122",open:be,onOpenChange:y,children:e.jsx(oe,{"data-loc":"client/src/pages/Outreach.tsx:122",className:"sm:max-w-2xl",children:e.jsxs("form",{"data-loc":"client/src/pages/Outreach.tsx:122",onSubmit:Ae,children:[e.jsxs(de,{"data-loc":"client/src/pages/Outreach.tsx:122",children:[e.jsx(xe,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Log outreach activity"}),e.jsx(pe,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Record the actual touchpoint and schedule the next action. Timestamps are stored in UTC and shown in your local timezone."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"grid gap-4 py-5 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Campaign"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:122",value:i?String(i):"",onValueChange:a=>{D(Number(a)),N(null)},children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:122",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:122",placeholder:"Choose campaign"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:122",children:u.data?.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:122",value:String(a.id),children:a.name},a.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Opportunity"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:122",value:l?Str
1ing(l):"",onValueChange:a=>N(Number(a)),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:122",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:122",placeholder:"Choose opportunity"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:122",children:x.data?.items.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:122",value:String(a.id),children:a.title||a.domain},a.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Activity"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:122",value:r.activityType,onValueChange:a=>b(t=>({...t,activityType:a})),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:122",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:122"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:122",children:Je.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:122",value:a,children:C(a)},a))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Channel"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:122",value:r.channel,onValueChange:a=>b(t=>({...t,channel:a})),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:122",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:122"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:122",children:Ye.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:122",value:a,children:C(a)},a))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Response"}),e.jsxs(m,{"data-loc":"client/src/pages/Outreach.tsx:122",value:r.responseStatus,onValueChange:a=>b(t=>({...t,responseStatus:a})),children:[e.jsx(j,{"data-loc":"client/src/pages/Outreach.tsx:122",children:e.jsx(O,{"data-loc":"client/src/pages/Outreach.tsx:122"})}),e.jsx(v,{"data-loc":"client/src/pages/Outreach.tsx:122",children:Ke.map(a=>e.jsx(f,{"data-loc":"client/src/pages/Outreach.tsx:122",value:a,children:C(a)},a))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2",children:[e.jsxs(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:["Follow-up date ",e.jsx("span",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"font-normal text-muted-foreground",children:"— optional"})]}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:122",type:"datetime-local",value:r.followUpAt,onChange:a=>b(t=>({...t,followUpAt:a.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2 sm:col-span-2",children:[e.jsxs(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:["Subject ",e.jsx("span",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"font-normal text-muted-foreground",children:"— optional"})]}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:122",value:r.subject,onChange:a=>b(t=>({...t,subject:a.target.value})),placeholder:"Resource contribution for your readers"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"space-y-2 sm:col-span-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:122",children:"Notes"}),e.jsx(Y,{"data-loc":"client/src/pages/Outreach.tsx:122",value:r.notes,onChange:a=>b(t=>({...t,notes:a.target.value})),placeholder:"What was sent, what they said, and what needs to happen next",className:"min-h-28",required:!0})]}),P&&e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"flex items-center justify-between rounded-xl border bg-muted/30 p-3 sm:col-span-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:122",children:[e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"text-xs font-semibold",children:P.title||P.domain}),e.jsx("p",{"data-loc":"client/src/pages/Outreach.tsx:122",className:"mt-1 text-[10px] text-muted-foreground",children:E.data?.length?`${E.data.length} saved contact${E.data.length===1?"":"s"}`:"No saved contact yet"})]}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:122",type:"button",variant:"outline",size:"sm",onClick:()=>U(!0),children:[e.jsx(He,{"data-loc":"client/src/pages/Outreach.tsx:122",className:"mr-1.5 h-3.5 w-3.5"}),"Add contact"]})]})]}),e.jsxs(he,{"data-loc":"client/src/pages/Outreach.tsx:122",children:[e.jsx(n,{"data-loc":"client/src/pages/Outreach.tsx:122",type:"button",variant:"outline",onClick:()=>y(!1),children:"Cancel"}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:122",type:"submit",disabled:B.isPending||!l||!r.notes.trim(),children:[B.isPending&&e.jsx($,{"data-loc":"client/src/pages/Outreach.tsx:122",className:"mr-2 h-4 w-4 animate-spin"}),"Save activity"]})]})]})})}),e.jsx(ie,{"data-loc":"client/src/pages/Outreach.tsx:124",open:ye,onOpenChange:U,children:e.jsx(oe,{"data-loc":"client/src/pages/Outreach.tsx:124",children:e.jsxs("form",{"data-loc":"client/src/pages/Outreach.tsx:124",onSubmit:Te,children:[e.jsxs(de,{"data-loc":"client/src/pages/Outreach.tsx:124",children:[e.jsx(xe,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Add primary contact"}),e.jsx(pe,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Save a real person or verified submission route for this opportunity."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:124",className:"grid gap-4 py-5 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:124",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Name"}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:124",value:d.name,onChange:a=>A(t=>({...t,name:a.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:124",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Role"}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:124",value:d.role,onChange:a=>A(t=>({...t,role:a.target.value})),placeholder:"Editor"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:124",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Email"}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:124",type:"email",value:d.email,onChange:a=>A(t=>({...t,email:a.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Outreach.tsx:124",className:"space-y-2",children:[e.jsx(c,{"data-loc":"client/src/pages/Outreach.tsx:124",children:"Profile or contact URL"}),e.jsx(S,{"data-loc":"client/src/pages/Outreach.tsx:124",type:"url",value:d.profileUrl,onChange:a=>A(t=>({...t,profileUrl:a.target.value})),placeholder:"https://"})]})]}),e.jsxs(he,{"data-loc":"client/src/pages/Outreach.tsx:124",children:[e.jsx(n,{"data-loc":"client/src/pages/Outreach.tsx:124",type:"button",variant:"outline",onClick:()=>U(!1),children:"Cancel"}),e.jsxs(n,{"data-loc":"client/src/pages/Outreach.tsx:124",type:"submit",disabled:F.isPending||!d.name&&!d.email&&!d.profileUrl,children:[F.isPending&&e.jsx($,{"data-loc":"client/src/pages/Outreach.tsx:124",className:"mr-2 h-4 w-4 animate-spin"}),"Save contact"]})]})]})})})]})}export{ia as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.