(()=>{const N=window.React;if(!N)return;const e=N.createElement,h=N.useState,M=N.useEffect,t={bg:"var(--app-bg,#0e0e10)",surface:"var(--app-surface,#1a1a1c)",elevated:"var(--app-elevated,#2a2a2e)",rule:"var(--app-rule)",ruleSoft:"var(--app-rule-soft)",ink:"var(--app-ink,#e6e3da)",inkSoft:"var(--app-ink-soft)",inkFaint:"var(--app-ink-faint)",accent:"var(--app-accent,#00f3ff)",accentDim:"var(--app-accent-dim)",accentGlow:"var(--app-accent-glow,rgba(0,243,255,.35))",running:"var(--app-running,#00d1ff)",success:"var(--app-success,#00d4b8)",warn:"var(--app-warn,#f8d974)",fail:"var(--app-fail,#f43f6c)",mono:'var(--app-font-mono,"JetBrains Mono",SFMono-Regular,monospace)',body:'var(--app-font-body,"Inter",system-ui,sans-serif)'},_=["Type","Brief","Context","Contact","Submitted"],I=[{field:"Company",value:"Aegis Systems",by:"domain-agt"},{field:"Industry",value:"Enterprise AI \xB7 operations",by:"domain-agt"},{field:"Company size",value:"\u2248 400 employees",by:"domain-agt"},{field:"Region",value:"EU \xB7 distributed",by:"domain-agt"},{field:"Fiscal",value:"EUR \xB7 Jan\u2013Dec",by:"domain-agt"},{field:"Procurement",value:"Legal review req.",by:"domain-agt"}],S=[{id:"o1",name:"Autonomous data pipeline",state:"matched",conf:.94,req:"Ingest + reconcile ledgers",price:"\u20AC24,000",basis:"fixed"},{id:"o2",name:"Agent orchestration setup",state:"matched",conf:.88,req:"Multi-agent operations",price:"\u20AC18,000",basis:"fixed"},{id:"o3",name:"Custom eval harness",state:"partial",conf:.62,req:"QA guardrails + evals",price:"\u20AC9,000",basis:"estimate"},{id:"o4",name:"24/7 monitoring & SLA",state:"matched",conf:.91,req:"Uptime guarantee",price:"\u20AC6,000 / yr",basis:"recurring"},{id:"o5",name:"On-prem / air-gapped deploy",state:"gap",conf:.31,req:"Air-gapped install",price:"custom",basis:"needs line"},{id:"o6",name:"BSI C5 certification",state:"out",conf:.12,req:"Regulatory audit",price:"\u2014",basis:"out of scope"}],R=[{id:"s1",name:"Cover",fill:"locked",owner:"human",tokens:null,preview:"Proposal for Aegis Systems \u2014 Autonomous Finance Ops"},{id:"s2",name:"Executive summary",fill:"edited",owner:"human",tokens:"\u20AC0.06",preview:"A three-phase rollout that reconciles the May AP ledger autonomously across two EUR accounts\u2026"},{id:"s3",name:"Our understanding",fill:"ai-draft",owner:"draft-agt",tokens:"\u20AC0.08",preview:"Aegis Systems runs a high-volume AP function across two EUR accounts with ~400 invoices per month\u2026"},{id:"s4",name:"Solution",fill:"ai-draft",owner:"solution-agt",tokens:"\u20AC0.12",preview:"We deploy a match-agt pipeline with a human-review gate before any ledger posting\u2026"},{id:"s5",name:"Scope & deliverables",fill:"edited",owner:"human",tokens:"\u20AC0.09",preview:"6 deliverables across 3 fixed-scope milestones with acceptance criteria per phase\u2026"},{id:"s6",name:"Pricing",fill:"locked",owner:"human",tokens:null,preview:"Fixed \u20AC48,000 base + optional recurring lines"},{id:"s7",name:"Timeline",fill:"empty",owner:null,tokens:null,preview:""},{id:"s8",name:"Terms",fill:"empty",owner:null,tokens:null,preview:""},{id:"s9",name:"Next steps",fill:"ai-draft",owner:"draft-agt",tokens:"\u20AC0.04",preview:"Countersign, then kickoff within 5 business days of acceptance\u2026"}],P=[{id:"opt1",label:"24/7 monitoring & SLA",delta:6e3,unit:"/ yr",on:!0},{id:"opt2",label:"On-prem / air-gapped deploy",delta:18e3,unit:"",on:!1},{id:"opt3",label:"Quarterly optimization pass",delta:9600,unit:"/ yr",on:!1},{id:"opt4",label:"Priority support (4h response)",delta:4800,unit:"/ yr",on:!1}],E=48e3,$=[{id:"p1",title:"Aegis Systems \u2014 Autonomous Finance Ops",client:"Aegis Systems",value:"\u20AC57,600",stage:"Negotiating",activity:"2h ago \xB7 viewed 6\xD7",owner:"human",hot:!0},{id:"p2",title:"Meridian Re \u2014 Claims triage agents",client:"Meridian Re",value:"\u20AC120,000",stage:"Sent",activity:"4d ago \xB7 unopened",owner:"sales-agt",stalled:!0},{id:"p3",title:"Kestrel Bank \u2014 Support copilot",client:"Kestrel Bank",value:"\u20AC42,000",stage:"Viewed",activity:"4h ago \xB7 3 sections",owner:"human"},{id:"p4",title:"Flowmine \u2014 Process-mining add-on",client:"Flowmine",value:"\u20AC31,000",stage:"Draft",activity:"draft \xB7 6/9 segments",owner:"draft-agt"},{id:"p5",title:"Peoplebase \u2014 HR data pipeline",client:"Peoplebase",value:"\u20AC28,500",stage:"Won",activity:"signed 3d ago",owner:"human"},{id:"p6",title:"Transitline \u2014 Route optimization",client:"Transitline",value:"\u20AC64,000",stage:"Lost",activity:"lost \xB7 price",owner:"human"},{id:"p7",title:"Nimbus Bank \u2014 KYC automation",client:"Nimbus Bank",value:"\u20AC39,000",stage:"Negotiating",activity:"6h ago \xB7 redlines",owner:"human"},{id:"p8",title:"Wardrobe \u2014 Catalog agents",client:"Wardrobe",value:"\u20AC22,000",stage:"Sent",activity:"5h ago \xB7 viewed 1\xD7",owner:"sales-agt"}],F=["Draft","Sent","Viewed","Negotiating","Won","Lost"],W=[{step:"Draft",count:14,pct:100,health:"ok"},{step:"Sent",count:11,pct:79,health:"ok"},{step:"Viewed",count:8,pct:57,health:"ok"},{step:"Negotiating",count:5,pct:36,health:"warn"},{step:"Won",count:3,pct:21,health:"ok"}],g={steps:_,enrich:I,match:S,segments:R,options:P,base:E,pipeline:$,pipelineStages:F,pipelineFunnel:W,source:"seed"},q={check:'<polyline points="5 12 10 17 20 6"/>',x:'<line x1="6" y1="6" x2="18" y2="18"/><line x1="18" y1="6" x2="6" y2="18"/>',download:'<path d="M12 3v12"/><polyline points="7 11 12 16 17 11"/><line x1="5" y1="20" x2="19" y2="20"/>',send:'<path d="M22 2 11 13"/><path d="M22 2 15 22l-4-9-9-4z"/>',euro:'<path d="M17 7a6 6 0 1 0 0 10"/><line x1="4" y1="10" x2="13" y2="10"/><line x1="4" y1="14" x2="12" y2="14"/>',link:'<path d="M9 15l6-6"/><path d="M11 6l1-1a4 4 0 0 1 6 6l-1 1"/><path d="M13 18l-1 1a4 4 0 0 1-6-6l1-1"/>',grip:'<circle cx="9" cy="6" r="1.3" fill="currentColor"/><circle cx="15" cy="6" r="1.3" fill="currentColor"/><circle cx="9" cy="12" r="1.3" fill="currentColor"/><circle cx="15" cy="12" r="1.3" fill="currentColor"/><circle cx="9" cy="18" r="1.3" fill="currentColor"/><circle cx="15" cy="18" r="1.3" fill="currentColor"/>',sparkle:'<path d="M12 3l1.7 5.3L19 10l-5.3 1.7L12 17l-1.7-5.3L5 10l5.3-1.7z"/>',lock:'<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/>',pen:'<path d="M4 20h4L20 8l-4-4L4 16z"/><line x1="14" y1="6" x2="18" y2="10"/>',smartToy:'<rect x="5" y="8" width="14" height="10" rx="2"/><line x1="12" y1="4" x2="12" y2="8"/><circle cx="12" cy="4" r="1.2" fill="currentColor"/><circle cx="9.5" cy="13" r="1.2" fill="currentColor"/><circle cx="14.5" cy="13" r="1.2" fill="currentColor"/>'};function l(a,s){return s=s||16,e("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:s,height:s,flexShrink:0},dangerouslySetInnerHTML:{__html:'<svg viewBox="0 0 24 24" width="'+s+'" height="'+s+'" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">'+(q[a]||"")+"</svg>"}})}function k(a){return"\u20AC"+Number(a||0).toLocaleString("en-US")}function D(a){return a==="matched"?{label:"matched",color:t.success}:a==="partial"?{label:"partial",color:t.warn}:a==="gap"?{label:"gap",color:t.fail}:{label:"out of scope",color:t.inkFaint}}function V(a){return a==="ai-draft"?{label:"ai draft",color:t.running}:a==="edited"?{label:"edited",color:t.accent}:a==="locked"?{label:"locked",color:t.success}:{label:"empty",color:t.inkFaint}}function K(a){return e("div",{className:"ps-funnel"},(a||[]).map(s=>{const c=s.health==="fail"?t.fail:s.health==="warn"?t.warn:t.success;return e("div",{key:s.step,className:"ps-funnel-row"},[e("span",{key:"l",className:"ps-funnel-label"},s.step),e("div",{key:"b",className:"ps-funnel-track"},e("div",{className:"ps-funnel-fill",style:{width:s.pct+"%",background:c}})),e("span",{key:"c",className:"ps-funnel-count mono"},s.count+" \xB7 "+s.pct+"%")])}))}function L(a){const s=window.KIND_REGISTRY&&window.KIND_REGISTRY[a];return s&&s.data&&s.data.seed||g}function v(a){const[s,c]=h(()=>L(a));return M(()=>{const o=()=>c(L(a));return window.addEventListener("proposal-live-hydrated",o),()=>window.removeEventListener("proposal-live-hydrated",o)},[]),s}const O="proposal-suite-style";function w(){if(document.getElementById(O))return;const a=`
    .propsuite{display:flex;flex-direction:column;gap:14px;height:100%;min-height:0;font-size:14px;line-height:1.45;color:${t.ink};font-family:${t.body};overflow:auto;padding:1.5rem;}
    .propsuite *,.propsuite *::before,.propsuite *::after{box-sizing:border-box;}
    .propsuite .mono{font-family:${t.mono};font-variant-numeric:tabular-nums;}
    .propsuite .ps-src{font-family:${t.mono};font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:${t.inkFaint};margin:-6px 0 0;}
    .propsuite button{font:inherit;cursor:pointer;}
    .propsuite .ps-overline{font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:${t.inkFaint};}
    .propsuite .ps-card{background:${t.surface};border:1px solid ${t.rule};border-radius:12px;}

    /* P1 \xB7 stepper */
    .propsuite .ps-stepper{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding-bottom:18px;border-bottom:1px solid ${t.rule};}
    .propsuite .ps-step-btn{display:flex;align-items:center;gap:8px;border:none;background:transparent;padding:0;}
    .propsuite .ps-step-dot{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:1px solid ${t.rule};}
    .propsuite .ps-step-label{font-size:11px;white-space:nowrap;color:${t.inkFaint};}
    .propsuite .ps-submitted{display:flex;flex-direction:column;align-items:center;text-align:center;padding:56px 20px;border:1px solid ${t.rule};border-radius:12px;background:${t.surface};}
    .propsuite .ps-req-grid{display:grid;grid-template-columns:1fr 320px;gap:16px;align-items:start;}
    .propsuite .ps-enrich-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:${t.rule};}
    .propsuite .ps-enrich-cell{padding:12px 16px;background:${t.surface};display:flex;flex-direction:column;gap:5px;}
    .propsuite .ps-matched-row{display:flex;align-items:center;gap:10px;padding:11px 16px;border-bottom:1px solid ${t.rule};font-size:13px;}
    .propsuite .ps-matched-row:last-child{border-bottom:none;}
    .propsuite .ps-dot-ok{width:7px;height:7px;border-radius:50%;background:${t.success};box-shadow:0 0 8px ${t.success};flex-shrink:0;}
    .propsuite .ps-footer{display:flex;align-items:center;gap:10px;margin-top:18px;}
    .propsuite .ps-btn{height:40px;padding:0 16px;border-radius:9px;border:1px solid ${t.rule};background:transparent;color:${t.ink};font-weight:500;font-size:13px;}
    .propsuite .ps-btn-primary{border:none;background:${t.accent};color:var(--app-accent-ink, #0e0e10);font-weight:700;box-shadow:0 0 18px ${t.accentGlow};}
    .propsuite .ps-btn-ghost{border:none;background:transparent;color:${t.inkSoft};}
    .propsuite .ps-chip-pill{display:inline-flex;align-items:center;gap:5px;font-family:${t.mono};font-size:11px;padding:2px 9px;border-radius:9999px;border:1px solid;}

    /* P2 \xB7 offering match grid + rail */
    .propsuite .ps-match-layout{display:grid;grid-template-columns:1fr 320px;gap:16px;align-items:start;}
    .propsuite .ps-match-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;}
    .propsuite .ps-match-card{text-align:left;padding:14px;display:flex;flex-direction:column;gap:10px;background:${t.surface};border-radius:12px;}
    .propsuite .ps-rail{position:sticky;top:0;background:${t.elevated};border:1px solid ${t.rule};border-radius:12px;overflow:hidden;}
    .propsuite .ps-rail-head{padding:14px 16px;border-bottom:1px solid ${t.rule};}
    .propsuite .ps-rail-body{padding:14px 16px;display:flex;flex-direction:column;gap:14px;}
    .propsuite .ps-gap-box{border:1px dashed ${t.fail};border-radius:10px;padding:12px;background:rgba(244,63,108,.06);}
    .propsuite .ps-out-box{border:1px solid ${t.rule};border-radius:10px;padding:12px;background:${t.surface};}
    .propsuite .ps-rail-actions{padding:12px 16px;border-top:1px solid ${t.rule};display:flex;flex-direction:column;gap:8px;}

    /* P3 \xB7 builder + light-paper preview */
    .propsuite .ps-build-layout{display:grid;grid-template-columns:400px 1fr;gap:16px;align-items:start;}
    .propsuite .ps-seg{padding:13px;display:flex;flex-direction:column;gap:9px;margin-bottom:9px;}
    .propsuite .ps-seg-head{display:flex;align-items:center;gap:9px;}
    .propsuite .ps-seg-preview{font-size:12.5px;color:${t.inkSoft};line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .propsuite .ps-preview-pane{position:sticky;top:0;background:${t.elevated};border:1px solid ${t.rule};border-radius:12px;overflow:hidden;}
    .propsuite .ps-preview-head{display:flex;align-items:center;justify-content:space-between;padding:11px 15px;border-bottom:1px solid ${t.rule};}
    .propsuite .ps-preview-body{padding:28px 34px;background:${t.bg};max-height:600px;overflow-y:auto;}
    /* Deliberate light "paper" palette \u2014 scoped to .ps-paper only, mirrors a printed/emailed doc */
    .propsuite .ps-paper{max-width:520px;margin:0 auto;background:#ffffff;color:#141414;border-radius:6px;padding:38px 40px;box-shadow:0 10px 40px rgba(0,0,0,.4);}
    .propsuite .ps-paper-kicker{font-family:${t.mono};font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:#8a8a8a;margin-bottom:7px;}
    .propsuite .ps-paper-title{font-size:1.35rem;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-bottom:5px;}
    .propsuite .ps-paper-sub{font-size:12.5px;color:#6a6a6a;margin-bottom:22px;}
    .propsuite .ps-paper-label{font-family:${t.mono};font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#00a2b3;margin-bottom:7px;}
    .propsuite .ps-paper-p{font-size:12.5px;line-height:1.65;color:#3a3a3a;margin:0 0 18px;}
    .propsuite .ps-paper-table{border:1px solid #e6e6e6;border-radius:6px;overflow:hidden;}
    .propsuite .ps-paper-row{display:flex;justify-content:space-between;padding:10px 13px;border-bottom:1px solid #eee;font-size:12.5px;}
    .propsuite .ps-paper-row:last-child{border-bottom:none;}
    .propsuite .ps-paper-total{font-weight:700;background:#fafafa;}

    /* P4 \xB7 client review (paper pane + live rail) */
    .propsuite .ps-review-layout{display:grid;grid-template-columns:1fr 340px;gap:16px;align-items:start;}
    .propsuite .ps-client-paper{border:1px solid ${t.rule};border-radius:12px;overflow:hidden;background:#ffffff;color:#16202e;}
    .propsuite .ps-client-hero{padding:28px 36px;border-bottom:1px solid #eef0f4;background:linear-gradient(180deg,#f7f9fc,#ffffff);}
    .propsuite .ps-client-logo{width:28px;height:28px;border-radius:7px;background:#1d4ed8;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:800;}
    .propsuite .ps-client-body{padding:28px 36px;display:flex;flex-direction:column;gap:22px;}
    .propsuite .ps-client-label{font-family:${t.mono};font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#1d4ed8;margin-bottom:7px;}
    .propsuite .ps-client-p{font-size:13px;line-height:1.7;color:#33404f;margin:0;}
    .propsuite .ps-client-table{border:1px solid #e6e9ef;border-radius:8px;overflow:hidden;}
    .propsuite .ps-client-row{display:flex;justify-content:space-between;padding:11px 14px;border-bottom:1px solid #eef0f4;font-size:12.5px;}
    .propsuite .ps-client-row:last-child{border-bottom:none;}
    .propsuite .ps-client-total{font-weight:800;background:#f7f9fc;color:#0a1628;font-size:13.5px;}
    .propsuite .ps-total-card{background:${t.elevated};border:1px solid ${t.rule};border-radius:12px;overflow:hidden;}
    .propsuite .ps-total-head{padding:16px 18px;border-bottom:1px solid ${t.rule};}
    .propsuite .ps-total-big{font-family:${t.mono};font-size:1.8rem;font-weight:700;color:${t.ink};line-height:1;}
    .propsuite .ps-toggle-row{display:flex;align-items:center;gap:11px;padding:12px 16px;border:none;border-bottom:1px solid ${t.rule};background:transparent;width:100%;text-align:left;}
    .propsuite .ps-toggle-track{width:32px;height:18px;border-radius:9999px;position:relative;flex-shrink:0;transition:background .25s ease;}
    .propsuite .ps-toggle-knob{position:absolute;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .25s ease;}
    .propsuite .ps-total-actions{padding:14px 16px;display:flex;flex-direction:column;gap:9px;}
    .propsuite .ps-thread{border:1px solid ${t.rule};border-radius:12px;background:${t.surface};overflow:hidden;margin-top:12px;}
    .propsuite .ps-thread-body{padding:14px;display:flex;flex-direction:column;gap:10px;}
    .propsuite .ps-bubble-me{align-self:flex-end;max-width:82%;background:${t.accentDim};color:${t.ink};border-radius:11px 11px 3px 11px;padding:9px 12px;font-size:12.5px;}
    .propsuite .ps-bubble-them{align-self:flex-start;max-width:88%;background:${t.surface};border:1px solid ${t.rule};border-radius:11px 11px 11px 3px;padding:9px 12px;font-size:12.5px;color:${t.inkSoft};}

    /* P5 \xB7 kanban + funnel + drawer */
    .propsuite .ps-kanban{display:flex;gap:11px;overflow-x:auto;padding-bottom:6px;}
    .propsuite .ps-kanban-col{width:216px;flex-shrink:0;display:flex;flex-direction:column;gap:9px;}
    .propsuite .ps-kanban-head{display:flex;align-items:center;justify-content:space-between;padding:0 3px;}
    .propsuite .ps-kanban-card{text-align:left;border-radius:10px;background:${t.surface};padding:12px;display:flex;flex-direction:column;gap:8px;border-width:1px;border-style:solid;}
    .propsuite .ps-funnel{display:flex;flex-direction:column;gap:9px;}
    .propsuite .ps-funnel-row{display:flex;align-items:center;gap:12px;}
    .propsuite .ps-funnel-label{width:88px;flex-shrink:0;font-size:12px;color:${t.ink};}
    .propsuite .ps-funnel-track{flex:1;height:24px;border-radius:6px;background:${t.ruleSoft};overflow:hidden;}
    .propsuite .ps-funnel-fill{height:100%;opacity:.85;border-radius:6px;}
    .propsuite .ps-funnel-count{width:96px;flex-shrink:0;text-align:right;font-size:11.5px;color:${t.inkSoft};}
    .propsuite .ps-drawer-scrim{position:fixed;inset:0;z-index:45;background:rgba(0,0,0,.5);}
    .propsuite .ps-drawer{position:absolute;top:0;right:0;bottom:0;width:min(400px,94vw);background:${t.elevated};border-left:1px solid ${t.rule};display:flex;flex-direction:column;}
    .propsuite .ps-drawer-head{padding:18px;border-bottom:1px solid ${t.rule};}
    .propsuite .ps-drawer-body{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:16px;}
    .propsuite .ps-drawer-foot{padding:14px 18px;border-top:1px solid ${t.rule};display:flex;gap:9px;}

    @media(max-width:1000px){
      .propsuite .ps-req-grid,.propsuite .ps-match-layout,.propsuite .ps-build-layout,.propsuite .ps-review-layout{grid-template-columns:1fr;}
    }
    `,s=document.createElement("style");s.id=O,s.textContent=a,document.head.appendChild(s)}function C(){w();const a=v("proposalRequest"),[s,c]=h(2),o=a.steps||_,p=a.enrich||I,u=a.match||S,n=s===o.length-1,y=u.filter(i=>i.state==="matched"||i.state==="partial").map(i=>i.name),d=o.map((i,m)=>{const b=m<s,x=m===s,j=x?t.accent:b?t.success:t.rule,G=x?t.accent:b?t.success:"transparent",Y=x||b?"var(--app-accent-ink, #0e0e10)":t.inkFaint;return e("button",{key:i,className:"ps-step-btn",onClick:()=>c(m)},[e("span",{key:"d",className:"ps-step-dot",style:{borderColor:j,background:G,color:Y}},b?l("check",15):String(m+1)),e("span",{key:"l",className:"ps-step-label",style:{color:x||b?t.ink:t.inkFaint}},i)])});let r;return n?r=e("div",{className:"ps-submitted"},[e("span",{key:"i",style:{width:52,height:52,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",background:"rgba(0,212,184,.15)",color:t.success,marginBottom:16}},l("check",24)),e("div",{key:"t",style:{fontSize:"1.2rem",fontWeight:700,marginBottom:8}},"Request submitted"),e("div",{key:"d",style:{color:t.inkSoft,fontSize:13,maxWidth:420,marginBottom:18,lineHeight:1.6}},"We'll assemble a draft proposal from your context and matched offerings. Expect it within ~2 days \u2014 you'll get an email when it's ready to review."),e("div",{key:"id",className:"mono",style:{fontSize:11,color:t.inkFaint}},"REQ-2026-0142 \xB7 servicesProposal")]):r=e("div",{className:"ps-req-grid"},[e("div",{key:"l",style:{display:"flex",flexDirection:"column",gap:16}},[e("div",{key:"chips",style:{display:"flex",gap:10,flexWrap:"wrap"}},[e("div",{key:"type",className:"ps-card",style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px"}},[e("span",{key:"c",style:{color:t.success,display:"inline-flex"}},l("check",13)),e("span",{key:"l",className:"ps-overline"},"Type"),e("span",{key:"v",className:"mono",style:{fontSize:13}},"servicesProposal")]),e("div",{key:"brief",className:"ps-card",style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",flex:1,minWidth:0}},[e("span",{key:"c",style:{color:t.success,display:"inline-flex"}},l("check",13)),e("span",{key:"l",className:"ps-overline",style:{flexShrink:0}},"Brief"),e("span",{key:"v",style:{fontSize:13,color:t.inkSoft,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},"Reconcile our May AP ledger autonomously across two EUR accounts; flag exceptions for human review.")])]),e("div",{key:"enrich",className:"ps-card",style:{overflow:"hidden"}},[e("div",{key:"hd",style:{padding:"14px 16px",borderBottom:`1px solid ${t.rule}`,display:"flex",alignItems:"center",gap:10}},[e("span",{key:"b",style:{color:t.accent,display:"inline-flex"}},l("smartToy",18)),e("div",{key:"t"},[e("div",{key:"1",style:{fontSize:14,fontWeight:650}},"We found this about you \u2014 correct?"),e("div",{key:"2",className:"mono",style:{fontSize:10.5,color:t.inkFaint,marginTop:3}},"enriched from company domain \xB7 domain-agt \xB7 editable")])]),e("div",{key:"grid",className:"ps-enrich-grid"},p.map(i=>e("div",{key:i.field,className:"ps-enrich-cell"},[e("div",{key:"1",style:{display:"flex",justifyContent:"space-between",gap:8}},[e("span",{key:"f",className:"ps-overline"},i.field),e("span",{key:"b",style:{color:t.accent,display:"inline-flex"},title:"enriched by "+i.by},l("smartToy",12))]),e("div",{key:"2",style:{display:"flex",justifyContent:"space-between",gap:8}},[e("span",{key:"v",style:{fontSize:13.5}},i.value),e("button",{key:"p",style:{border:"none",background:"transparent",color:t.inkFaint,display:"inline-flex",padding:2},title:"Edit"},l("pen",12))]),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:i,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.proposalRequest}):null])))])]),e("div",{key:"r",className:"ps-rail"},[e("div",{key:"hd",className:"ps-rail-head"},[e("div",{key:"1",className:"ps-overline"},"Matched to your offerings"),e("div",{key:"2",className:"mono",style:{fontSize:11,color:t.inkFaint,marginTop:4}},y.length+" of "+u.length+" requested \xB7 cross-aligned")]),e("div",{key:"list"},y.map(i=>e("div",{key:i,className:"ps-matched-row"},[e("span",{key:"d",className:"ps-dot-ok"}),e("span",{key:"t",style:{flex:1}},i)]))),e("div",{key:"range",style:{padding:"14px 16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},[e("span",{key:"l",className:"ps-overline"},"Estimated range"),e("span",{key:"v",className:"mono ps-chip-pill",style:{color:t.accent,borderColor:t.accent}},[l("euro",12),e("span",{key:"t"},"48,000 \u2013 72,000")])])])]),e("div",{className:"propsuite"},[a.source?e("p",{key:"src",className:"ps-src"},`source: ${a.source}`):null,e("div",{key:"stepper",className:"ps-stepper"},d),r,n?null:e("div",{key:"footer",className:"ps-footer"},[e("button",{key:"back",className:"ps-btn",onClick:()=>c(i=>Math.max(0,i-1))},"Back"),e("span",{key:"sp",style:{flex:1}}),e("button",{key:"save",className:"ps-btn ps-btn-ghost"},"Save & finish later"),e("button",{key:"next",className:"ps-btn ps-btn-primary",onClick:()=>c(i=>Math.min(o.length-1,i+1))},"Confirm & continue")])])}C.displayName="ProposalRequestView";function z(){w();const a=v("offeringMatch"),s=a.match||S,[c,o]=h("o5"),p=s.find(n=>n.id===c)||s[0],u=D(p.state);return e("div",{className:"propsuite"},[a.source?e("p",{key:"src",className:"ps-src"},`source: ${a.source}`):null,e("div",{key:"layout",className:"ps-match-layout"},[e("div",{key:"grid",className:"ps-match-grid"},s.map(n=>{const y=D(n.state),d=p.id===n.id;return e("button",{key:n.id,className:"ps-match-card",style:{border:`1px solid ${d?t.accent:t.rule}`},onClick:()=>o(n.id)},[e("div",{key:"1",style:{display:"flex",justifyContent:"space-between",gap:8,alignItems:"flex-start"}},[e("span",{key:"n",style:{fontSize:14,fontWeight:600,lineHeight:1.3}},n.name),e("span",{key:"c",className:"mono ps-chip-pill",style:{color:y.color,borderColor:y.color,whiteSpace:"nowrap",flexShrink:0}},y.label)]),e("div",{key:"2",style:{display:"flex",alignItems:"center",gap:6,color:t.inkFaint}},[l("smartToy",13),e("span",{key:"t",className:"mono",style:{fontSize:11}},"confidence "+Math.round(n.conf*100)+"%"),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:n,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.offeringMatch}):null]),e("div",{key:"hr",style:{height:1,background:t.rule}}),e("div",{key:"3",style:{display:"flex",alignItems:"center",gap:6}},[e("span",{key:"i",style:{color:t.inkFaint,display:"inline-flex"}},l("link",13)),e("span",{key:"t",style:{fontSize:12.5,color:t.inkSoft,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},n.req)]),e("div",{key:"4",style:{display:"flex",justifyContent:"space-between",gap:8}},[e("span",{key:"b",className:"ps-overline"},n.basis),e("span",{key:"p",className:"mono",style:{fontSize:13,color:t.accent}},n.price)])])})),e("div",{key:"rail",className:"ps-rail"},[e("div",{key:"hd",className:"ps-rail-head"},[e("div",{key:"1",style:{display:"flex",alignItems:"center",gap:8,marginBottom:8}},[e("span",{key:"c",className:"mono ps-chip-pill",style:{color:u.color,borderColor:u.color}},u.label),e("span",{key:"conf",className:"mono",style:{fontSize:11,color:t.inkFaint}},"confidence "+Math.round(p.conf*100)+"%")]),e("div",{key:"2",style:{fontSize:15,fontWeight:650}},p.name)]),e("div",{key:"body",className:"ps-rail-body"},[e("div",{key:"req"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:6}},"Requested item"),e("div",{key:"v",style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:t.accent}},[l("link",13),e("span",{key:"t"},p.req)])]),e("div",{key:"price"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:6}},"Price basis"),e("div",{key:"v",style:{display:"flex",justifyContent:"space-between"}},[e("span",{key:"b",style:{fontSize:13,color:t.inkSoft}},p.basis),e("span",{key:"p",className:"mono",style:{fontSize:14}},p.price)])]),p.state==="gap"?e("div",{key:"gap",className:"ps-gap-box"},[e("div",{key:"l",className:"ps-overline",style:{color:t.fail,marginBottom:8}},"Coverage gap"),e("div",{key:"d",style:{fontSize:12.5,color:t.inkSoft,lineHeight:1.5,marginBottom:10}},"No standard offering covers this. Add a custom line to keep it in the proposal."),e("button",{key:"b",className:"ps-btn",style:{width:"100%",height:36,border:`1px solid ${t.accent}`,color:t.accent,fontWeight:600}},"+ Add custom line")]):null,p.state==="out"?e("div",{key:"out",className:"ps-out-box"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:8}},"Out of scope"),e("div",{key:"d",style:{fontSize:12.5,color:t.inkSoft,lineHeight:1.5,marginBottom:10}},"We don't offer this. Decline it explicitly so the client sees a clean boundary."),e("button",{key:"b",className:"ps-btn",style:{width:"100%",height:36,border:"1px solid rgba(244,63,108,.4)",color:t.fail,fontWeight:600}},"Decline (hold)")]):null]),e("div",{key:"actions",className:"ps-rail-actions"},[e("button",{key:"1",className:"ps-btn ps-btn-primary",style:{height:38}},"Push to Builder"),e("button",{key:"2",className:"ps-btn",style:{height:36,border:"1px solid rgba(0,212,184,.4)",color:t.success,fontWeight:600}},"Accept match")])])])])}z.displayName="OfferingMatchView";function A(){w();const a=v("proposalBuilder"),s=a.segments||R,c=s.filter(o=>o.fill!=="empty").length;return e("div",{className:"propsuite"},[a.source?e("p",{key:"src",className:"ps-src"},`source: ${a.source}`):null,e("div",{key:"layout",className:"ps-build-layout"},[e("div",{key:"segs"},[e("div",{key:"hd",style:{display:"flex",justifyContent:"space-between",padding:"0 2px",marginBottom:8}},[e("span",{key:"l",className:"ps-overline"},"Segments \xB7 servicesProposal preset"),e("span",{key:"c",className:"mono",style:{fontSize:11,color:t.inkFaint}},c+" / "+s.length+" filled")]),...s.map(o=>{const p=V(o.fill),u=!!o.owner&&o.owner!=="human";return e("div",{key:o.id,className:"ps-card ps-seg"},[e("div",{key:"hd",className:"ps-seg-head"},[e("span",{key:"g",style:{color:t.inkFaint,display:"inline-flex"}},l("grip",14)),e("span",{key:"n",style:{flex:1,fontSize:13.5,fontWeight:600}},o.name),e("span",{key:"c",className:"mono ps-chip-pill",style:{color:p.color,borderColor:p.color}},p.label),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:o,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.proposalBuilder}):null]),o.fill==="empty"?e("div",{key:"empty",style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:10}},[e("span",{key:"t",style:{fontSize:12.5,color:t.inkFaint,fontStyle:"italic"}},"No content yet"),e("button",{key:"b",className:"ps-btn",style:{height:30,padding:"0 11px",border:`1px solid ${t.accent}`,color:t.accent,fontWeight:600,fontSize:11.5,display:"inline-flex",gap:6,alignItems:"center"}},[l("sparkle",13),e("span",{key:"l"},"AI draft")])]):e("div",{key:"content"},[e("div",{key:"p",className:"ps-seg-preview"},o.preview),e("div",{key:"meta",style:{display:"flex",alignItems:"center",gap:10,marginTop:8}},[u?e("span",{key:"o",style:{display:"inline-flex",alignItems:"center",gap:5,color:t.running}},[l("smartToy",13),e("span",{key:"t",className:"mono",style:{fontSize:10.5}},o.owner)]):null,o.tokens?e("span",{key:"tk",className:"mono",style:{fontSize:10.5,padding:"2px 7px",borderRadius:6,border:`1px solid ${t.rule}`,color:t.inkFaint}},o.tokens):null,e("span",{key:"sp",style:{flex:1}}),o.fill==="locked"?e("span",{key:"lk",style:{color:t.success,display:"inline-flex"}},l("lock",14)):null])])])})]),e("div",{key:"preview",className:"ps-preview-pane"},[e("div",{key:"hd",className:"ps-preview-head"},[e("span",{key:"l",style:{fontSize:11,color:t.inkSoft}},"Live preview"),e("div",{key:"b",style:{display:"flex",gap:8}},[e("button",{key:"1",className:"ps-btn",style:{height:30,padding:"0 11px",fontSize:11.5}},"Preview as client"),e("button",{key:"2",className:"ps-btn ps-btn-primary",style:{height:30,padding:"0 12px",fontSize:11.5}},"Send for review")])]),e("div",{key:"body",className:"ps-preview-body"},[e("div",{key:"paper",className:"ps-paper"},[e("div",{key:"1",className:"ps-paper-kicker"},"Proposal \xB7 draft"),e("div",{key:"2",className:"ps-paper-title"},"Autonomous Finance Ops"),e("div",{key:"3",className:"ps-paper-sub"},"Prepared for Aegis Systems \xB7 May 2026"),e("div",{key:"4",className:"ps-paper-label"},"Executive summary"),e("p",{key:"5",className:"ps-paper-p"},"A three-phase rollout that reconciles the May AP ledger autonomously across two EUR accounts, flags exceptions for human review, and posts to your ledger behind an approval gate."),e("div",{key:"6",className:"ps-paper-label"},"Our understanding"),e("p",{key:"7",className:"ps-paper-p"},"Aegis Systems runs a high-volume AP function across two EUR accounts with ~400 invoices reconciled manually each month today."),e("div",{key:"8",className:"ps-paper-label"},"Pricing"),e("div",{key:"9",className:"ps-paper-table"},[e("div",{key:"1",className:"ps-paper-row"},[e("span",{key:"l"},"Autonomous data pipeline"),e("span",{key:"v",className:"mono"},"\u20AC24,000")]),e("div",{key:"2",className:"ps-paper-row"},[e("span",{key:"l"},"Agent orchestration setup"),e("span",{key:"v",className:"mono"},"\u20AC18,000")]),e("div",{key:"3",className:"ps-paper-row ps-paper-total"},[e("span",{key:"l"},"Total"),e("span",{key:"v",className:"mono"},"\u20AC48,000")])])])])])])])}A.displayName="ProposalBuilderView";function B(){w();const a=v("proposalReview"),s=a.base||E,c=a.options||P,[o,p]=h({}),[u,n]=h(!1),y=c.map(i=>({...i,on:o[i.id]!==void 0?o[i.id]:i.on})),d=s+y.filter(i=>i.on).reduce((i,m)=>i+m.delta,0),r=i=>p(m=>{const b=m[i]!==void 0?m[i]:(c.find(x=>x.id===i)||{}).on;return{...m,[i]:!b}});return e("div",{className:"propsuite"},[a.source?e("p",{key:"src",className:"ps-src"},`source: ${a.source}`):null,e("div",{key:"layout",className:"ps-review-layout"},[e("div",{key:"paper",className:"ps-client-paper"},[e("div",{key:"hero",className:"ps-client-hero"},[e("div",{key:"1",style:{display:"flex",alignItems:"center",gap:10,marginBottom:18}},[e("span",{key:"logo",className:"ps-client-logo"},"A"),e("span",{key:"n",style:{fontWeight:700,color:"#0a1628"}},"Aegis Systems")]),e("div",{key:"2",className:"ps-client-label"},"Proposal \xB7 valid until 2026-08-15"),e("div",{key:"3",style:{fontSize:"1.7rem",fontWeight:800,letterSpacing:"-0.02em",lineHeight:1.05,color:"#0a1628"}},"Autonomous Finance Operations")]),e("div",{key:"body",className:"ps-client-body"},[e("div",{key:"1"},[e("div",{key:"l",className:"ps-client-label"},"Executive summary"),e("p",{key:"p",className:"ps-client-p"},"A three-phase rollout that reconciles your monthly AP ledger autonomously, flags exceptions for human review, and posts behind an approval gate \u2014 cutting a 5-day close to under a day.")]),e("div",{key:"2"},[e("div",{key:"l",className:"ps-client-label"},"Scope"),e("p",{key:"p",className:"ps-client-p"},"Ingest + reconcile across two EUR accounts \xB7 multi-agent orchestration \xB7 a human-review gate \xB7 a QA eval harness. Optional add-ons are toggled in the summary at right.")]),e("div",{key:"3"},[e("div",{key:"l",className:"ps-client-label"},"Investment"),e("div",{key:"t",className:"ps-client-table"},[e("div",{key:"base",className:"ps-client-row"},[e("span",{key:"l"},"Base engagement \u2014 fixed"),e("span",{key:"v",className:"mono"},k(s))]),...y.filter(i=>i.on).map(i=>e("div",{key:i.id,className:"ps-client-row"},[e("span",{key:"l"},"+ "+i.label),e("span",{key:"v",className:"mono"},"+"+k(i.delta)+(i.unit?" "+i.unit:"")),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:i,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.proposalReview}):null])),e("div",{key:"total",className:"ps-client-row ps-client-total"},[e("span",{key:"l"},"Total"),e("span",{key:"v",className:"mono"},k(d))])])])])]),e("div",{key:"rail",style:{display:"flex",flexDirection:"column",gap:14}},[e("div",{key:"card",className:"ps-total-card"},[e("div",{key:"hd",className:"ps-total-head"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:8}},"Your total \xB7 live"),e("div",{key:"t",className:"ps-total-big"},k(d)),e("div",{key:"s",className:"mono",style:{fontSize:11,color:t.inkFaint,marginTop:6}},y.filter(i=>i.on).length+" options \xB7 valid until 2026-08-15")]),e("div",{key:"opts"},y.map(i=>e("button",{key:i.id,className:"ps-toggle-row",onClick:()=>r(i.id)},[e("span",{key:"t",className:"ps-toggle-track",style:{background:i.on?t.accent:"rgba(150,150,160,.35)"}},e("span",{className:"ps-toggle-knob",style:{left:i.on?"16px":"2px"}})),e("span",{key:"l",style:{flex:1,fontSize:13}},i.label),e("span",{key:"d",className:"mono",style:{fontSize:12,color:t.accent,whiteSpace:"nowrap"}},"+"+k(i.delta)+(i.unit?" "+i.unit:"")),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:i,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.proposalReview}):null]))),e("div",{key:"actions",className:"ps-total-actions"},[e("button",{key:"1",className:"ps-btn ps-btn-primary",style:{height:42,width:"100%"}},"Accept & sign"),e("div",{key:"2",style:{display:"flex",gap:8}},[e("button",{key:"a",className:"ps-btn",style:{flex:1,height:38},onClick:()=>n(i=>!i)},"Ask a question"),e("button",{key:"b",className:"ps-btn",style:{flex:1,height:38}},"Request changes")]),e("button",{key:"3",className:"ps-btn ps-btn-ghost",style:{width:"100%",height:36,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:7}},[l("download",14),e("span",{key:"l"},"Download PDF")])])]),u?e("div",{key:"thread",className:"ps-thread"},[e("div",{key:"hd",style:{padding:"11px 15px",borderBottom:`1px solid ${t.rule}`,fontSize:12,fontWeight:600}},"Ask about this proposal"),e("div",{key:"body",className:"ps-thread-body"},[e("div",{key:"1",className:"ps-bubble-me"},"Can we split the base into two milestones?"),e("div",{key:"2",className:"ps-bubble-them"},"Yes \u2014 we can bill 50% at kickoff and 50% at the review gate. Want me to update the terms?"),e("div",{key:"3",style:{display:"flex",gap:8}},[e("input",{key:"in",placeholder:"Type your question\u2026",style:{flex:1,height:36,borderRadius:9,border:`1px solid ${t.rule}`,background:t.bg,color:t.ink,padding:"0 11px",fontSize:12.5,outline:"none"}}),e("button",{key:"send",style:{width:36,height:36,borderRadius:9,border:"none",background:t.accent,color:"var(--app-accent-ink, #0e0e10)",display:"inline-flex",alignItems:"center",justifyContent:"center"}},l("send",14))])])]):null])])])}B.displayName="ProposalReviewView";function T(){w();const a=v("proposalPipeline"),s=a.pipeline||$,c=a.pipelineStages||F,o=a.pipelineFunnel||W,[p,u]=h(null),n=s.find(d=>d.id===p)||null,y=c.map(d=>({stage:d,cards:s.filter(r=>r.stage===d)}));return e("div",{className:"propsuite"},[a.source?e("p",{key:"src",className:"ps-src"},`source: ${a.source}`):null,e("div",{key:"kanban",className:"ps-kanban"},y.map(d=>e("div",{key:d.stage,className:"ps-kanban-col"},[e("div",{key:"hd",className:"ps-kanban-head"},[e("span",{key:"l",className:"ps-overline"},d.stage),e("span",{key:"c",className:"mono",style:{fontSize:11,color:t.inkFaint}},d.cards.length)]),...d.cards.map(r=>{const i=!!r.owner&&r.owner!=="human",m=r.stalled?t.warn:r.hot?t.accent:t.rule;return e("button",{key:r.id,className:"ps-kanban-card",style:{borderColor:m},onClick:()=>u(r.id)},[e("div",{key:"1",style:{fontSize:12.5,fontWeight:600,lineHeight:1.35}},r.title),e("div",{key:"2",style:{display:"flex",alignItems:"center",gap:8}},[e("span",{key:"cl",className:"mono ps-chip-pill",style:{fontSize:10,color:t.inkSoft,borderColor:t.rule}},r.client),r.stalled?e("span",{key:"st",className:"mono ps-chip-pill",style:{fontSize:9.5,color:t.warn,borderColor:t.warn}},"stalled"):null]),e("div",{key:"3",style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8}},[e("span",{key:"v",className:"mono",style:{fontSize:13,color:t.accent}},r.value),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:r,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.proposalPipeline}):null,i?e("span",{key:"b",style:{color:t.running,display:"inline-flex"},title:"agent-owned"},l("smartToy",12)):null]),e("div",{key:"4",className:"mono",style:{fontSize:10.5,color:t.inkFaint}},r.activity)])})]))),e("div",{key:"funnel",className:"ps-card",style:{padding:20,maxWidth:680}},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:6}},"Stage conversion"),e("div",{key:"d",style:{fontSize:12.5,color:t.inkSoft,marginBottom:18}},"Draft \u2192 Won \xB7 this quarter"),K(o)]),n?e("div",{key:"drawer",className:"ps-drawer-scrim",onClick:()=>u(null)},e("div",{className:"ps-drawer",onClick:d=>d.stopPropagation()},[e("div",{key:"hd",className:"ps-drawer-head"},[e("div",{key:"1",style:{display:"flex",justifyContent:"space-between",marginBottom:10}},[e("span",{key:"s",className:"mono ps-chip-pill",style:{color:t.accent,borderColor:t.accent}},n.stage),e("button",{key:"x",style:{border:"none",background:"transparent",color:t.inkFaint,display:"inline-flex",padding:4},onClick:()=>u(null)},l("x",15))]),e("div",{key:"2",style:{fontSize:15.5,fontWeight:700,lineHeight:1.3}},n.title),e("div",{key:"3",className:"mono",style:{fontSize:11.5,color:t.inkFaint,marginTop:6}},n.client+" \xB7 "+n.value)]),e("div",{key:"body",className:"ps-drawer-body"},[e("div",{key:"1"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:8}},"Activity"),e("div",{key:"v",style:{fontSize:13,color:t.inkSoft,lineHeight:1.6}},n.activity)]),e("div",{key:"2"},[e("div",{key:"l",className:"ps-overline",style:{marginBottom:10}},"Next action"),e("button",{key:"b",className:"ps-btn",style:{width:"100%",height:40,border:`1px solid ${t.accent}`,color:t.accent,fontWeight:600,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8}},[l("smartToy",14),e("span",{key:"l"},"Send agent-drafted follow-up")])])]),e("div",{key:"foot",className:"ps-drawer-foot"},[e("button",{key:"1",className:"ps-btn",style:{flex:1,height:40,border:"1px solid rgba(244,63,108,.4)",color:t.fail,fontWeight:600}},"Re-send (hold)"),e("button",{key:"2",className:"ps-btn",style:{flex:1,height:40,border:"1px solid rgba(0,212,184,.4)",color:t.success,fontWeight:600}},"Mark won")])])):null])}T.displayName="ProposalPipelineView",window.PROPOSAL_REQUEST_VIEW_FN=C,window.PROPOSAL_MATCH_VIEW_FN=z,window.PROPOSAL_BUILDER_VIEW_FN=A,window.PROPOSAL_REVIEW_VIEW_FN=B,window.PROPOSAL_PIPELINE_VIEW_FN=T,window.VIEWS=window.VIEWS||{},window.VIEWS.proposalRequest=C,window.VIEWS.offeringMatch=z,window.VIEWS.proposalBuilder=A,window.VIEWS.proposalReview=B,window.VIEWS.proposalPipeline=T,window.KIND_REGISTRY=window.KIND_REGISTRY||{};const f=window.KIND_REGISTRY;f.proposalRequest=f.proposalRequest||{id:"proposalRequest",label:"Proposal Request",workspaceLabel:"Request",workspaceIcon:"assignment",description:"Adaptive client intake \u2014 ask only what's missing for the chosen proposal type, pre-filled from enrichment.",defaultView:"proposalRequest",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Confirm & continue",kind:"primary",icon:"check"},secondaryActions:[{label:"Save & finish later",icon:"bookmark"}],heroKpis:[{label:"turnaround",value:"~2 days",delta:"",trend:"flat"},{label:"completeness",value:"80%",delta:"+20%",trend:"up"},{label:"matched offerings",value:"4",delta:"",trend:"flat"},{label:"est. range",value:"\u20AC48\u201372k",delta:"",trend:"flat"}],schema:[{key:"title",label:"Field",wide:!0},{key:"status",label:"Status",kind:"status"},{key:"sub",label:"Value"},{key:"kpi",label:"Source",mono:!0,right:!0}],mockItems:I.map(a=>({id:a.field.toLowerCase().replace(/\s+/g,"-"),title:a.field,status:"ok",statusLabel:"enriched",sub:a.value,kpi:a.by})),data:{seed:g,source:"seed"}},f.offeringMatch=f.offeringMatch||{id:"offeringMatch",label:"Offering Match",workspaceLabel:"Match",workspaceIcon:"compare_arrows",description:"Cross-alignment of the incoming request onto your product offerings \u2014 matched items, coverage, and gaps.",defaultView:"offeringMatch",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Push to Builder",kind:"primary",icon:"layers"},secondaryActions:[{label:"Accept match",icon:"check_circle"}],heroKpis:[{label:"coverage",value:"78%",delta:"",trend:"up"},{label:"matched",value:"4",delta:"",trend:"flat"},{label:"gaps",value:"1",delta:"",trend:"down"},{label:"est. margin",value:"41%",delta:"",trend:"up"}],schema:[{key:"title",label:"Offering",wide:!0},{key:"status",label:"State",kind:"status"},{key:"sub",label:"Requested item"},{key:"kpi",label:"Price",mono:!0,right:!0}],mockItems:S.map(a=>({id:a.id,title:a.name,status:a.state==="matched"?"ok":a.state==="partial"?"warn":"fail",statusLabel:a.state,sub:a.req,kpi:a.price})),data:{seed:g,source:"seed"}},f.proposalBuilder=f.proposalBuilder||{id:"proposalBuilder",label:"Proposal Builder",workspaceLabel:"Builder",workspaceIcon:"view_agenda",description:"Assemble a proposal from the shared segment library using a type preset \u2014 LLM-fill, reorder, and preview live.",defaultView:"proposalBuilder",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Send for review",kind:"primary",icon:"send"},secondaryActions:[{label:"Preview as client",icon:"visibility"}],heroKpis:[{label:"segments",value:"6 / 9",delta:"",trend:"flat"},{label:"preset",value:"services",delta:"",trend:"flat"},{label:"est. total",value:"\u20AC57.6k",delta:"",trend:"flat"},{label:"readiness",value:"72%",delta:"",trend:"up"}],schema:[{key:"title",label:"Segment",wide:!0},{key:"status",label:"Fill",kind:"status"},{key:"sub",label:"Preview"},{key:"kpi",label:"Tokens",mono:!0,right:!0}],mockItems:R.map(a=>({id:a.id,title:a.name,status:a.fill==="ai-draft"?"running":a.fill==="empty"?"warn":"ok",statusLabel:a.fill,sub:a.preview||"No content yet",kpi:a.tokens||"\u2014"})),data:{seed:g,source:"seed"}},f.proposalReview=f.proposalReview||{id:"proposalReview",label:"Proposal Review",workspaceLabel:"Review",workspaceIcon:"draw",description:"The interactive client proposal \u2014 read it segment by segment, toggle optional scope, then accept and e-sign.",defaultView:"proposalReview",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Accept & sign",kind:"primary",icon:"draw"},secondaryActions:[{label:"Download PDF",icon:"download"}],heroKpis:[{label:"total \xB7 live",value:"\u20AC54.0k",delta:"",trend:"flat"},{label:"valid until",value:"Aug 15",delta:"",trend:"flat"},{label:"options",value:"1",delta:"",trend:"flat"},{label:"status",value:"viewed",delta:"",trend:"up"}],schema:[{key:"title",label:"Line item",wide:!0},{key:"status",label:"Included",kind:"status"},{key:"sub",label:"Detail"},{key:"kpi",label:"Amount",mono:!0,right:!0}],mockItems:[{id:"base",title:"Base engagement \u2014 fixed",status:"ok",statusLabel:"included",sub:"",kpi:k(E)},...P.map(a=>({id:a.id,title:a.label,status:a.on?"ok":"warn",statusLabel:a.on?"included":"optional",sub:"",kpi:"+"+k(a.delta)+(a.unit?" "+a.unit:"")}))],data:{seed:g,source:"seed"}},f.proposalPipeline=f.proposalPipeline||{id:"proposalPipeline",label:"Proposal Pipeline",workspaceLabel:"Pipeline",workspaceIcon:"view_kanban",description:"Deal flow from draft to won or lost \u2014 spot stalled deals and watch win/loss conversion.",defaultView:"proposalPipeline",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"New proposal",kind:"primary",icon:"add"},secondaryActions:[{label:"Export",icon:"download"}],heroKpis:[{label:"open value",value:"\u20AC312k",delta:"",trend:"flat"},{label:"win rate",value:"34%",delta:"+3%",trend:"up"},{label:"avg close",value:"11d",delta:"",trend:"flat"},{label:"expiring",value:"3",delta:"",trend:"down"}],schema:[{key:"title",label:"Proposal",wide:!0},{key:"status",label:"Stage",kind:"status"},{key:"sub",label:"Client \xB7 activity"},{key:"kpi",label:"Value",mono:!0,right:!0}],mockItems:$.map(a=>({id:a.id,title:a.title,status:a.stage==="Won"?"ok":a.stage==="Lost"?"fail":a.stage==="Negotiating"?"warn":"running",statusLabel:a.stage,sub:a.client+" \xB7 "+a.activity,kpi:a.value})),data:{seed:g,source:"seed"}},window.PROPOSAL_SUITE_SEED=g})();
