PageSourceSearch

https://authengine-az3zrmtj.manus.space/assets/Execution-CRZ5vim2.js

js authengine-az3zrmtj.manus.space collected 2026-10-03 05:00:16 UTC 32,598 bytes, 1 lines download raw bytes

1import{r as u,j as e}from"./react-vendor-Dc4PsQq0.js";import{u as ge,w as me,t as d,a as i,S as J,D as q,e as R,f as z,h as M,i as W,j as O,k as Ee,l as ve,m as be,n as je,o as fe}from"./index-5nRfQ--P.js";import{P as ye,S as X,E as Y}from"./PageHeader-Bi4OJb3E.js";import{C as Z}from"./checkbox-s2QQwv_K.js";import{L as r,I as g}from"./label-Doc1f-25.js";import{T as Ne,a as Ce,b as ee,c as te}from"./tabs-CjywmeMS.js";import{T as se}from"./textarea-lTLWfDgQ.js";import{a7 as n,aA as D,an as ae,d as we,aB as Pe,aC as ce,a3 as V,aD as ke,aE as Te,at as ne,i as Ue,ai as _e,aj as Ae,a8 as H,aF as Se}from"./ui-vendor-BQj_Jcqx.js";import"./data-vendor-BDtrsGNX.js";import"./vendor-C0RMI9HL.js";const F=["owned_property_publish","approved_directory_submission","outreach_required","manual_placement"],f={owned_property_publish:{title:"Owned WordPress property",description:"Publish reviewed editorial content live through a verified site connection."},approved_directory_submission:{title:"Approved directory submission",description:"Prepare and track a submission only where the directory permits it."},outreach_required:{title:"Publisher outreach",description:"Route the opportunity through relationship-led outreach; no automatic third-party posting."},manual_placement:{title:"Manual authorized placement",description:"Track work completed by you, your client, or an authorized publisher."}},ie=20;function He(){const{activeProject:$}=ge();me();const o=$.id,B=d.useUtils(),[oe,y]=u.useState(!1),[le,N]=u.useState(!1),[x,K]=u.useState("all"),[c,E]=u.useState(null),[C,v]=u.useState(""),[k,w]=u.useState(""),[l,j]=u.useState({name:"Primary WordPress site",siteUrl:"",username:"",applicationPassword:"",consentConfirmed:!1}),[a,p]=u.useState({executionType:"owned_property_publish",connectionId:"",targetUrl:"",destinationUrl:`https://${$.domain}`,title:"",expectedAnchor:"",content:"",submissionNotes:"",authorizationConfirmed:!1}),b=d.execution.connections.useQuery({projectId:o}),h=d.execution.list.useQuery({projectId:o}),T=u.useMemo(()=>b.data?.filter(t=>t.status==="verified")??[],[b.data]),Q=u.useMemo(()=>(h.data??[]).filter(t=>x==="all"||t.executionType===x),[h.data,x]),re=u.useMemo(()=>Object.fromEntries(F.map(t=>[t,h.data?.filter(s=>s.executionType===t).length??0])),[h.data]),de=h.data?.filter(t=>t.status==="published").length??0,xe=h.data?.filter(t=>["draft","awaiting_approval","approved","publishing"].includes(t.status)).length??0,m=()=>{b.refetch(),h.refetch(),B.placements.list.invalidate({projectId:o}),B.analytics.overview.invalidate({projectId:o})},U=d.execution.saveConnection.useMutation({onSuccess:t=>{n[t.status==="verified"?"success":"warning"](t.status==="verified"?"WordPress connection verified":t.lastError||"Connection saved but verification failed"),y(!1),j(s=>({...s,applicationPassword:""})),m()},onError:t=>n.error(t.message)}),_=d.execution.verifyConnection.useMutation({onSuccess:t=>{n[t.status==="verified"?"success":"error"](t.status==="verified"?"Connection verified":t.error),m()},onError:t=>n.error(t.message)}),ue=d.execution.disableConnection.useMutation({onSuccess:()=>{n.success("Connection disabled"),m()},onError:t=>n.error(t.message)}),A=d.execution.create.useMutation({onSuccess:()=>{n.success("Placement execution drafted"),N(!1),p(t=>({...t,title:"",expectedAnchor:"",content:"",submissionNotes:"",authorizationConfirmed:!1})),m()},onError:t=>n.error(t.message)}),G=d.execution.requestApproval.useMutation({onSuccess:()=>{n.success("Sent for human approval"),m()},onError:t=>n.error(t.message)}),S=d.execution.approve.useMutation({onSuccess:()=>{n.success("Placement approved"),E(null),v(""),m()},onError:t=>n.error(t.message)}),L=d.execution.publish.useMutation({onSuccess:t=>{n.success("Published live and added to monitoring"),E(null),v(""),m(),window.open(t.url,"_blank","noopener,noreferrer")},onError:t=>n.error(t.message)}),I=d.execution.markPublished.useMutation({onSuccess:()=>{n.success("Live placement recorded and added to monitoring"),E(null),v(""),w(""),m()},onError:t=>n.error(t.message)}),pe=d.execution.cancel.useMutation({onSuccess:()=>{n.success("Execution cancelled"),m()},onError:t=>n.error(t.message)}),he=t=>
1{const s=b.data?.find(P=>P.id===Number(t));p(P=>({...P,connectionId:t,targetUrl:s?.siteUrl||P.targetUrl}))};return e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:74",className:"mx-auto max-w-[1500px] space-y-6",children:[e.jsx(ye,{"data-loc":"client/src/pages/Execution.tsx:75",eyebrow:"Authorized execution",title:"Placement studio",description:"Move qualified opportunities into real placements. Authority Engine can publish directly only to verified properties you control; every other path preserves site-owner consent and human review.",actions:e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:75",className:"flex flex-wrap gap-2",children:[e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:75",variant:"outline",onClick:()=>y(!0),children:[e.jsx(D,{"data-loc":"client/src/pages/Execution.tsx:75",className:"mr-2 h-4 w-4"}),"Connect WordPress"]}),e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:75",onClick:()=>N(!0),children:[e.jsx(ae,{"data-loc":"client/src/pages/Execution.tsx:75",className:"mr-2 h-4 w-4"}),"Create execution"]})]})}),e.jsx("div",{"data-loc":"client/src/pages/Execution.tsx:77",className:"grid gap-4 md:grid-cols-4",children:[{label:"Verified properties",value:T.length,detail:"Allowlisted owned domains",icon:we,tone:"bg-emerald-50 text-emerald-700"},{label:"Execution queue",value:h.data?.length??0,detail:"All authorized paths",icon:Pe,tone:"bg-violet-50 text-violet-700"},{label:"Awaiting action",value:xe,detail:"Draft, review, or publish",icon:ce,tone:"bg-amber-50 text-amber-700"},{label:"Published",value:de,detail:"Automatically monitored",icon:V,tone:"bg-sky-50 text-sky-700"}].map(t=>e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:78",className:"surface-card rounded-2xl p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:78",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:78",children:[e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:78",className:"text-xs text-muted-foreground",children:t.label}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:78",className:"mt-3 text-3xl font-semibold tracking-[-.04em] tabular-nums",children:t.value})]}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:78",className:`flex h-9 w-9 items-center justify-center rounded-xl ${t.tone}`,children:e.jsx(t.icon,{"data-loc":"client/src/pages/Execution.tsx:78",className:"h-4 w-4"})})]}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:78",className:"mt-2 text-[11px] text-muted-foreground",children:t.detail})]},t.label))}),e.jsx("div",{"data-loc":"client/src/pages/Execution.tsx:81",className:"rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4 text-sm text-emerald-950",children:e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:81",className:"flex gap-3",children:[e.jsx(ke,{"data-loc":"client/src/pages/Execution.tsx:81",className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-700"}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:81",children:[e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:81",className:"font-semibold",children:"Aggressive execution, without link-spam shortcuts"}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:81",className:"mt-1 text-xs leading-5 text-emerald-800",children:"Direct publishing is restricted to verified, consented WordPress properties. Directory, publisher, and manual placements require explicit authorization and a live URL before they enter monitoring. Approval and execution are recorded in the audit trail."})]})]})}),e.jsxs(Ne,{"data-loc":"client/src/pages/Execution.tsx:83",defaultValue:"queue",className:"space-y-4",children:[e.jsxs(Ce,{"data-loc":"client/src/pages/Execution.tsx:84",className:"h-11 rounded-xl bg-muted/70 p-1",children:[e.jsx(ee,{"data-loc":"client/src/pages/Execution.tsx:84",value:"queue",className:"rounded-lg px-4",children:"Execution queue"}),e.jsx(ee,{"data-loc":"client/src/pages/Execution.tsx:84",value:"connections",className:"rounded-lg px-4",children:"Owned properties"})]}),e.jsxs(te,{"data-loc":"client/src/pages/Execution.tsx:85",value:"queue",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:86","data-testid":"execution-lanes",className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:[e.jsxs("button",{"data-loc":"client/src/pages/Execution.tsx:86",type:"button","aria-pressed":x==="all",onClick:()=>K("all"),className:`rounded-2xl border p-4 text-left transition ${x==="all"?"border-violet-400 bg-vi
1olet-50 shadow-sm ring-2 ring-violet-100":"border-border/70 bg-white hover:border-violet-200"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:86",className:"flex items-center justify-between gap-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:86",className:"text-sm font-semibold",children:"All authorized paths"}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:86",className:"text-lg font-semibold tabular-nums",children:h.data?.length??0})]}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:86",className:"mt-2 text-[10px] leading-4 text-muted-foreground",children:"The complete approval and execution queue."})]}),F.map(t=>e.jsxs("button",{"data-loc":"client/src/pages/Execution.tsx:86",type:"button","aria-pressed":x===t,onClick:()=>K(t),className:`rounded-2xl border p-4 text-left transition ${x===t?"border-violet-400 bg-violet-50 shadow-sm ring-2 ring-violet-100":"border-border/70 bg-white hover:border-violet-200"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:86",className:"flex items-center justify-between gap-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:86",className:"text-sm font-semibold",children:f[t].title}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:86",className:"text-lg font-semibold tabular-nums",children:re[t]})]}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:86",className:"mt-2 line-clamp-2 text-[10px] leading-4 text-muted-foreground",children:f[t].description})]},t))]}),h.isLoading?e.jsx("div",{"data-loc":"client/src/pages/Execution.tsx:87",className:"space-y-3",children:Array.from({length:4},(t,s)=>e.jsx(J,{"data-loc":"client/src/pages/Execution.tsx:87",className:"h-36 rounded-2xl"},s))}):Q.length?Q.map(t=>e.jsx("article",{"data-loc":"client/src/pages/Execution.tsx:87",className:"surface-card rounded-2xl p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:87",className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:87",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:87",className:"flex flex-wrap items-center gap-2",children:[e.jsx(X,{"data-loc":"client/src/pages/Execution.tsx:87",value:t.status}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:87",className:"rounded-full bg-muted px-2.5 py-1 text-[10px] font-semibold text-muted-foreground",children:f[t.executionType].title}),t.executionType==="outreach_required"?e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:87",className:"rounded-full bg-sky-50 px-2.5 py-1 text-[10px] font-semibold text-sky-700",children:"Publisher-controlled placement"}):null]}),e.jsx("h2",{"data-loc":"client/src/pages/Execution.tsx:87",className:"mt-3 truncate text-base font-semibold",children:t.title||new URL(t.targetUrl).hostname}),e.jsxs("p",{"data-loc":"client/src/pages/Execution.tsx:87",className:"mt-1 truncate text-[11px] text-muted-foreground",children:[t.targetUrl," → ",t.destinationUrl]}),t.executionType==="outreach_required"&&t.submissionNotes?e.jsxs("p",{"data-loc":"client/src/pages/Execution.tsx:87",className:"mt-3 line-clamp-2 rounded-lg bg-sky-50/70 px-3 py-2 text-xs leading-5 text-sky-900",children:[e.jsx("strong",{"data-loc":"client/src/pages/Execution.tsx:87",children:"Outreach plan:"})," ",t.submissionNotes]}):null,t.errorMessage?e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:87",className:"mt-3 rounded-lg bg-destructive/8 px-3 py-2 text-xs text-destructive",children:t.errorMessage}):null,t.publishedUrl?e.jsxs("a",{"data-loc":"client/src/pages/Execution.tsx:87",href:t.publishedUrl,target:"_blank",rel:"noreferrer",className:"mt-3 inline-flex items-center gap-1 text-xs font-semibold text-violet-700 hover:underline",children:["Open live placement ",e.jsx(Te,{"data-loc":"client/src/pages/Execution.tsx:87",className:"h-3.5 w-3.5"})]}):null]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:87",className:"flex shrink-0 flex-wrap gap-2",children:[["draft","failed"].includes(t.status)?e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:87",size:"sm",onClick:()=>G.mutate({projectId:o,executionId:t.id}),disabled:G.isPending,children:[e.jsx(ne,{"data-loc":"client/src/pages/Execution.tsx:87",className:"mr-2 h-3.5 w-3.5"}),"Request approval"]}):null,t.status==="awaiting_approval"?e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:87",size:"sm",onClick:()=>{E({kind:"approve",id:t.id,executionType:t.executionType}),v("")},children:[e.jsx(ce,{"data-loc":"client/src/pages/Execution.tsx:87",className:"mr-2 h-3.5 w-3.5"}),"Review & approve"]}):null,t.status==="approved"&&t.executionType==="owned_property_publish"?e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:87",size:"sm",onClick:()=>
1{E({kind:"publish",id:t.id,executionType:t.executionType}),v("")},children:[e.jsx(V,{"data-loc":"client/src/pages/Execution.tsx:87",className:"mr-2 h-3.5 w-3.5"}),"Publish live"]}):null,t.status==="approved"&&t.executionType!=="owned_property_publish"?e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:87",size:"sm",onClick:()=>{E({kind:"confirm",id:t.id,executionType:t.executionType}),v(""),w("")},children:[e.jsx(Ue,{"data-loc":"client/src/pages/Execution.tsx:87",className:"mr-2 h-3.5 w-3.5"}),t.executionType==="outreach_required"?"Verify publisher placement":"Confirm live URL"]}):null,["published","cancelled","publishing"].includes(t.status)?null:e.jsx(i,{"data-loc":"client/src/pages/Execution.tsx:87",size:"sm",variant:"ghost",onClick:()=>pe.mutate({projectId:o,executionId:t.id}),children:"Cancel"})]})]})},t.id)):e.jsx(Y,{"data-loc":"client/src/pages/Execution.tsx:87",icon:x==="outreach_required"?ne:V,title:x==="all"?"No placement executions yet":`No ${f[x].title.toLowerCase()} work yet`,description:x==="outreach_required"?"Create a publisher-outreach execution with a documented relationship and follow-up plan. Authority Engine will never post to that publisher automatically.":"Start with a qualified opportunity, choose a compliant execution path, record destination authorization, and route the work through approval before anything goes live.",action:e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:87",onClick:()=>N(!0),children:[e.jsx(ae,{"data-loc":"client/src/pages/Execution.tsx:87",className:"mr-2 h-4 w-4"}),"Create execution"]})})]}),e.jsx(te,{"data-loc":"client/src/pages/Execution.tsx:89",value:"connections",className:"space-y-3",children:b.isLoading?e.jsx(J,{"data-loc":"client/src/pages/Execution.tsx:90",className:"h-40 rounded-2xl"}):b.data?.length?b.data.map(t=>e.jsx("article",{"data-loc":"client/src/pages/Execution.tsx:90",className:"surface-card rounded-2xl p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:90",className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:90",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:90",className:"flex items-center gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/Execution.tsx:90",className:"h-4 w-4 text-violet-600"}),e.jsx("h2",{"data-loc":"client/src/pages/Execution.tsx:90",className:"font-semibold",children:t.name}),e.jsx(X,{"data-loc":"client/src/pages/Execution.tsx:90",value:t.status})]}),e.jsxs("p",{"data-loc":"client/src/pages/Execution.tsx:90",className:"mt-2 text-xs text-muted-foreground",children:[t.allowedDomain," · WordPress · ",t.username]}),e.jsxs("p",{"data-loc":"client/src/pages/Execution.tsx:90",className:"mt-1 text-[10px] text-muted-foreground",children:["Consent recorded ",new Date(t.consentConfirmedAt).toLocaleString()]}),t.lastError?e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:90",className:"mt-3 max-w-2xl rounded-lg bg-destructive/8 px-3 py-2 text-xs text-destructive",children:t.lastError}):null]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:90",className:"flex gap-2",children:[e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:90",variant:"outline",size:"sm",onClick:()=>_.mutate({projectId:o,connectionId:t.id}),disabled:_.isPending,children:[e.jsx(Ae,{"data-loc":"client/src/pages/Execution.tsx:90",className:`mr-2 h-3.5 w-3.5 ${_.isPending?"animate-spin":""}`}),"Verify"]}),t.status!=="disabled"?e.jsx(i,{"data-loc":"client/src/pages/Execution.tsx:90",variant:"ghost",size:"sm",onClick:()=>ue.mutate({projectId:o,connectionId:t.id}),children:"Disable"}):null]})]})},t.id)):e.jsx(Y,{"data-loc":"client/src/pages/Execution.tsx:90",icon:D,title:"No owned properties connected",description:"Connect a WordPress site you control with an application password. Credentials are encrypted and never shown again.",action:e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:90",onClick:()=>y(!0),children:[e.jsx(D,{"data-loc":"client/src/pages/Execution.tsx:90",className:"mr-2 h-4 w-4"}),"Connect WordPress"]})})})]}),e.jsx(q,{"data-loc":"client/src/pages/Execution.tsx:94",open:oe,onOpenChange:y,children:e.jsxs(R,{"data-loc":"client/src/pages/Execution.tsx:94",className:"sm:max-w-xl",children:[e.jsxs(z,{"data-loc":"client/src/pages/Execution.tsx:94",children:[e.jsx(M,{"data-loc":"client/src/pages/Execution.tsx:94",children:"Connect an owned WordPress property"}),e.jsx(W,{"data-loc":"client/src/pages/Execution.tsx:94",children:"Use a WordPress Application Password for an editor or administrator. Authority Engine encrypts it and only sends it to the exact HTTPS domain you approve."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"space-y-4 py-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:94",children:"Connection name"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:94",value:l.name,onChange:t=>j(s=>({...s,name:t.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:94",children:"WordPress site URL"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:94",type:"url",placeholder:"https://example.com",value:l.siteUrl,onChange:t=>j(s=>({...s,siteUrl:t.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:94",children:"WordPress username"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:94",autoComplete:"username",value:l.username,onChange:t=>j(s=>({...s,username:t.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:94",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:94",children:"Application password"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:94",type:"password",autoComplete:"new-password",value:l.applicationPassword,onChange:t=>j(s=>({...s,applicationPassword:t.target.value}))})]})]}),e.jsxs("label",{"data-loc":"client/src/pages/Execution.tsx:94",className:"flex items-start gap-3 rounded-xl border p-4 text-xs leading-5",children:[e.jsx(Z,{"data-loc":"client/src/pages/Execution.tsx:94",checked:l.consentConfirmed,onCheckedChange:t=>j(s=>({...s,consentConfirmed:t===!0})),className:"mt-0.5"}),e.jsxs("span",{"data-loc":"client/src/pages/Execution.tsx:94",children:[e.jsx("strong",{"data-loc":"client/src/pages/Execution.tsx:94",children:"I control this site or have written publishing authorization."}),e.jsx("br",{"data-loc":"client/src/pages/Execution.tsx:94"}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:94",className:"text-muted-foreground",children:"I understand that publishing will be restricted to this exact domain and will still require human approval."})]})]})]}),e.jsxs(O,{"data-loc":"client/src/pages/Execution.tsx:94",children:[e.jsx(i,{"data-loc":"client/src/pages/Execution.tsx:94",variant:"outline",onClick:()=>y(!1),children:"Cancel"}),e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:94",disabled:U.isPending||!l.siteUrl||!l.username||!l.applicationPassword||!l.consentConfirmed,onClick:()=>U.mutate({projectId:o,name:l.name,siteUrl:l.siteUrl,username:l.username,applicationPassword:l.applicationPassword,consentConfirmed:!0}),children:[U.isPending&&e.jsx(H,{"data-loc":"client/src/pages/Execution.tsx:94",className:"mr-2 h-4 w-4 animate-spin"}),"Save & verify"]})]})]})}),e.jsx(q,{"data-loc":"client/src/pages/Execution.tsx:96",open:le,onOpenChange:N,children:e.jsxs(R,{"data-loc":"client/src/pages/Execution.tsx:96",className:"max-h-[92vh] overflow-y-auto sm:max-w-3xl",children:[e.jsxs(z,{"data-loc":"client/src/pages/Execution.tsx:96",children:[e.jsx(M,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Create a placement execution"}),e.jsx(W,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Choose the real execution path. The draft will not publish or submit anything until authorization and human approval are recorded."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-5 py-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"grid gap-3 sm:grid-cols-2",children:F.map(t=>e.jsxs("button",{"data-loc":"client/src/pages/Execution.tsx:96",type:"button",onClick:()=>p(s=>({...s,executionType:t,connectionId:t==="owned_property_publish"?s.connectionId:""})),className:`rounded-xl border p-4 text-left transition ${a.executionType===t?"border-violet-400 bg-vi
1olet-50 ring-2 ring-violet-100":"hover:border-violet-200 hover:bg-muted/30"}`,children:[e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:96",className:"text-sm font-semibold",children:f[t].title}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:96",className:"mt-1 text-[11px] leading-5 text-muted-foreground",children:f[t].description})]},t))}),a.executionType==="outreach_required"?e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"rounded-xl border border-sky-200 bg-sky-50/70 p-4 text-xs leading-5 text-sky-950",children:[e.jsx("strong",{"data-loc":"client/src/pages/Execution.tsx:96",children:"Publisher outreach is a relationship workflow, not an automated post."}),e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:96",className:"mt-1 text-sky-800",children:"Document the contact angle, value exchange, intended channel, and follow-up plan. Only the publisher can put this placement live."})]}):null,a.executionType==="owned_property_publish"?e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Verified property"}),e.jsxs(Ee,{"data-loc":"client/src/pages/Execution.tsx:96",value:a.connectionId||void 0,onValueChange:he,children:[e.jsx(ve,{"data-loc":"client/src/pages/Execution.tsx:96",children:e.jsx(be,{"data-loc":"client/src/pages/Execution.tsx:96",placeholder:"Choose a verified WordPress property"})}),e.jsx(je,{"data-loc":"client/src/pages/Execution.tsx:96",children:T.map(t=>e.jsxs(fe,{"data-loc":"client/src/pages/Execution.tsx:96",value:String(t.id),children:[t.name," · ",t.allowedDomain]},t.id))})]}),T.length?null:e.jsx("p",{"data-loc":"client/src/pages/Execution.tsx:96",className:"text-[11px] text-amber-700",children:"Connect and verify an owned WordPress property first."})]}):null,e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Target site or submission URL"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:96",type:"url",value:a.targetUrl,onChange:t=>p(s=>({...s,targetUrl:t.target.value})),placeholder:"https://publisher.example.com"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Destination URL receiving the link"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:96",type:"url",value:a.destinationUrl,onChange:t=>p(s=>({...s,destinationUrl:t.target.value}))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:["Title ",e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:96",className:"font-normal text-muted-foreground",children:"— required for WordPress"})]}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:96",value:a.title,onChange:t=>p(s=>({...s,title:t.target.value}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:"Expected anchor or citation"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:96",value:a.expectedAnchor,onChange:t=>p(s=>({...s,expectedAnchor:t.target.value}))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsxs(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:["Reviewed editorial content ",e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:96",className:"font-normal text-muted-foreground",children:"— HTML supported"})]}),e.jsx(se,{"data-loc":"client/src/pages/Execution.tsx:96",className:"min-h-44 font-mono text-xs",value:a.content,onChange:t=>p(s=>({...s,content:t.target.value})),placeholder:`Write useful, site-appropriate content and include the exact destination URL: ${a.destinationUrl}`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:96",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:96",children:a.executionType==="outreach_required"?"Publisher outreach plan — required":"Submission or authorization notes"}),e.jsx(se,{"data-loc":"client/src/pages/Execution.tsx:96",value:a.submissionNotes,onChange:t=>p(s=>({...s,submissionNotes:t.target.value})),placeholder:a.executionType==="outreach_required"?"Contact angle, value offered, channel, responsible owner, and follow-up timing.":"Who authorized this placement? What submission rules or editorial constraints apply?"}),a.executionType==="outreach_required"?e.jsxs("p",{"data-loc":"client/src/pages/Execution.tsx:96",className:"text-[10px] text-muted-foreground",children:["Minimum ",ie," characters · ",a.submissionNotes.trim().length," entered"]}):null]}),e.jsxs("label",{"data-loc":"client/src/pages/Execution.tsx:96",className:"flex items-start gap-3 rounded-xl border border-amber-200 bg-amber-50/70 p-4 text-xs leading-5 text-amber-950",children:[e.jsx(Z,{"data-loc":"client/src/pages/Execution.tsx:96",checked:a.authorizationConfirmed,onCheckedChange:t=>p(s=>({...s,authorizationConfirmed:t===!0})),className:"mt-0.5"}),e.jsxs("span",{"data-loc":"client/src/pages/Execution.tsx:96",children:[e.jsx("strong",{"data-loc":"client/src/pages/Execution.tsx:96",children:"I confirm this destination permits this action."}),e.jsx("br",{"data-loc":"client/src/pages/Execution.tsx:96"}),e.jsx("span",{"data-loc":"client/src/pages/Execution.tsx:96",className:"text-amber-800",children:"I control the property, have publisher/client authorization, or am using an explicitly permitted public submission process."})]})]})]}),e.jsxs(O,{"data-loc":"client/src/pages/Execution.tsx:96",children:[e.jsx(i,{"data-loc":"client/src/pages/Execution.tsx:96",variant:"outline",onClick:()=>N(!1),children:"Cancel"}),e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:96",disabled:A.isPending||!a.targetUrl||!a.destinationUrl||!a.authorizationConfirmed||a.executionType==="owned_property_publish"&&!a.connectionId||a.executionType==="outreach_required"&&a.submissionNotes.trim().length<ie,onClick:()=>A.mutate({projectId:o,executionType:a.executionType,connectionId:a.connectionId?Number(a.connectionId):void 0,targetUrl:a.targetUrl,destinationUrl:a.destinationUrl,title:a.title||void 0,content:a.content||void 0,expectedAnchor:a.expectedAnchor||void 0,submissionNotes:a.submissionNotes||void 0,authorizationConfirmed:!0}),children:[A.isPending&&e.jsx(H,{"data-loc":"client/src/pages/Execution.tsx:96",className:"mr-2 h-4 w-4 animate-spin"}),"Create draft"]})]})]})}),e.jsx(q,{"data-loc":"client/src/pages/Execution.tsx:98",open:!!c,onOpenChange:t=>{t||(E(null),v(""),w(""))},children:e.jsxs(R,{"data-loc":"client/src/pages/Execution.tsx:98",children:[e.jsxs(z,{"data-loc":"client/src/pages/Execution.tsx:98",children:[e.jsx(M,{"data-loc":"client/src/pages/Execution.tsx:98",children:c?.kind==="approve"?"Approve this placement?":c?.kind==="publish"?"Publish live now?":c?.executionType==="outreach_required"?"Verify the publisher placement":"Confirm the live placement"}),e.jsx(W,{"data-loc":"client/src/pages/Execution.tsx:98",children:c?.kind==="approve"?"Review the content, destination, target, and authorization record first. Type APPROVE PLACEMENT to create a durable approval record.":c?.kind==="publish"?"This will publish immediately to the connected owned WordPress property and begin monitoring. Type PUBLISH NOW to continue."
1:c?.executionType==="outreach_required"?"Enter the public page URL only after the publisher independently accepts the outreach and publishes the citation. Authority Engine will verify the destination link before recording it live.":"Enter the real public source URL after the authorized publisher or submission process puts the link live."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:98",className:"space-y-4 py-4",children:[c?.kind==="confirm"?e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:98",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:98",children:"Live source URL"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:98",type:"url",value:k,onChange:t=>w(t.target.value),placeholder:"https://publisher.example.com/live-page"})]}):null,e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:98",className:"space-y-2",children:[e.jsx(r,{"data-loc":"client/src/pages/Execution.tsx:98",children:"Confirmation phrase"}),e.jsx(g,{"data-loc":"client/src/pages/Execution.tsx:98",value:C,onChange:t=>v(t.target.value),placeholder:c?.kind==="approve"?"APPROVE PLACEMENT":c?.kind==="publish"?"PUBLISH NOW":"CONFIRM LIVE"})]}),c?.kind==="publish"?e.jsxs("div",{"data-loc":"client/src/pages/Execution.tsx:98",className:"flex gap-2 rounded-xl bg-amber-50 p-3 text-xs leading-5 text-amber-900",children:[e.jsx(Se,{"data-loc":"client/src/pages/Execution.tsx:98",className:"mt-0.5 h-4 w-4 shrink-0"}),"Publishing is immediate. Authority Engine cannot retract content from WordPress automatically in this release."]}):null]}),e.jsxs(O,{"data-loc":"client/src/pages/Execution.tsx:98",children:[e.jsx(i,{"data-loc":"client/src/pages/Execution.tsx:98",variant:"outline",onClick:()=>E(null),children:"Cancel"}),e.jsxs(i,{"data-loc":"client/src/pages/Execution.tsx:98",disabled:!c||(c.kind==="approve"?C!=="APPROVE PLACEMENT":c.kind==="publish"?C!=="PUBLISH NOW":C!=="CONFIRM LIVE"||!k)||S.isPending||L.isPending||I.isPending,onClick:()=>{c&&(c.kind==="approve"?S.mutate({projectId:o,executionId:c.id,confirmation:"APPROVE PLACEMENT"}):c.kind==="publish"?L.mutate({projectId:o,executionId:c.id,confirmation:"PUBLISH NOW"}):I.mutate({projectId:o,executionId:c.id,publishedUrl:k,confirmation:"CONFIRM LIVE"}))},children:[(S.isPending||L.isPending||I.isPending)&&e.jsx(H,{"data-loc":"client/src/pages/Execution.tsx:98",className:"mr-2 h-4 w-4 animate-spin"}),c?.kind==="approve"?"Approve":c?.kind==="publish"?"Publish live":c?.executionType==="outreach_required"?"Verify publisher placement":"Confirm placement"]})]})]})})]})}export{He 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.