PageSourceSearch

https://capitaldart.com/assets/deals._dealId_.market-comps._reportId-CzWR-PD9.js

js capitaldart.com collected 2026-10-08 12:40:45 UTC 14,398 bytes, 64 lines download raw bytes

1import{ae as V,u as $,a as H,K as I,M as T,r as B,j as e,L as _}from"./main-rwWalgtK.js";import{D as K,a as W}from"./deal-nav-D5JC-LpS.js";import{g as Q}from"./deals.functions-BPUbNQnF.js";import{g as O}from"./market-comps.functions-DwQgEj6S.js";import"./dropdown-menu-Dw1WXiGW.js";import"./index-Dx4MIMDP.js";import"./index-DG2ieJUr.js";import"./Combination-B0LoZHdt.js";import"./chevron-right-B7sl-bEG.js";import"./check-ERfHPR0W.js";import"./circle-Biidvlel.js";import"./run.functions-BSkwrG43.js";import"./deal-contacts-export.functions-DKbEu9cs.js";import"./x-CT6MgQxM.js";import"./chevron-down-Yir-hmoX.js";function f(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function N(t){return(Array.isArray(t)?t:[]).map(f).filter(r=>!!r)}function n(t){return typeof t=="string"&&t.trim()?t:null}function u(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function Y(t){const r=Math.abs(t);return r>=100?t.toFixed(0):r>=10?t.toFixed(1):t.toFixed(2)}function y(t){return t===null?"":"$"+Y(t)+"M"}function F(t){if(!t)return"";const r=new Date(t);return Number.isNaN(r.getTime())?t:r.toLocaleDateString()}const G=["executive_summary","summary_stats","similar_deals","round_size_benchmarks","valuation_multiples","stepup_multiples","time_between_rounds","positioning"],U={executive_summary:"Executive Summary",summary_stats:"Summary Stats",similar_deals:"Most Similar Deals",round_size_benchmarks:"Round Size Benchmarks",valuation_multiples:"Valuation Multiples",stepup_multiples:"Step-Up Multiples",time_between_rounds:"Time Between Rounds",positioning:"Positioning"};function J({body:t}){const r=t.split(/\n{2,}|\n/).map(s=>s.trim()).filter(Boolean);return e.jsx(e.Fragment,{children:r.map((s,o)=>e.jsx("p",{className:"mt-2 text-sm text-brand-ink",children:s},o))})}function X({rows:t}){return e.jsx("div",{className:"mt-3 overflow-x-auto",children:e.jsx("table",{className:"w-full min-w-[28rem] text-left text-sm",children:e.jsx("tbody",{children:t.map((r,s)=>e.jsxs("tr",{className:"border-b border-brand-line/60 align-top",children:[e.jsx("td",{className:"w-1/2 py-2 pr-3 text-brand-ink",children:n(r.label)??""}),e.jsxs("td",{className:"py-2 pr-3 text-brand-ink",children:[e.jsx("span",{children:n(r.value)??""}),n(r.note)&&e.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:n(r.note)})]})]},s))})})})}function Z({tables:t}){return e.jsx(e.Fragment,{children:t.map((r,s)=>{const o=N(r.rows);return o.length===0?null:e.jsxs("div",{className:"mt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-brand-ink",children:n(r.title)??""}),e.jsx("div",{className:"mt-2 overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[36rem] text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-brand-line",children:[e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Metric"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Median"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Low (25th pct)"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"High (75th pct)"}),e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Deals"})]})}),e.jsx("tbody",{children:o.map((i,x)=>e.jsxs("tr",{className:"border-b border-brand-line/60 align-top",children:[e.jsx("td",{className:"py-2 pr-3 text-brand-ink",children:n(i.label)??""}),e.jsx("td",{className:"py-2 pr-3 text-brand-ink",children:n(i.median)??""}),e.jsx("td",{className:"py-2 pr-3 text-brand-ink",children:n(i.low)??""}),e.jsx("td",{className:"py-2 pr-3 text-brand-ink",children:n(i.high)??""}),e.jsx("td",{className:"py-2 pr-3 text-brand-ink",children:u(i.n)!==null?String(u(i.n)):""})]},x))})]})}),n(r.population_line)&&e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:n(r.population_line)}),n(r.coverage_line)&&e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:n(r.coverage_line)}),s===0&&n(r.how_to_read)&&e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n(r.how_to_read)})]},s)})})}const P=[["company","Company"],["date","Date"],["stage","Stage"],["deal_size","Deal Size"],["pre_money","Pre-Money"],["post_money","Post-Money"],["revenue","Revenue"],["investors","Investors"]],ee=["description","website","company_type","vertical","city","country","deal_type","pre_to_revenue","lead_investors"];function te(t){return ee.some(r=>r in t)}const A=[["deal_size","Deal Size"],["pre_money","Pre-Money"],["post_money","Post-Money"],["revenue","Revenue"],["pre_to_revenue","Pre/Rev"]];function re(t){const r=n(t.city),s=n(t.state_province),o=n(t.country);
1return[r,s??o].filter(Boolean).join(", ")}function ne(t){return t?/^https?:\/\//i.test(t)?t:"https://"+t:null}function se({rows:t}){return e.jsx("div",{className:"mt-3 overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-brand-line",children:[e.jsx("th",{className:"py-2 pr-3 font-medium",children:"Company"}),A.map(([r,s])=>e.jsx("th",{className:"py-2 pl-3 text-right font-medium",children:s},r))]})}),e.jsx("tbody",{children:t.map((r,s)=>{const o=n(r.company)??"",i=ne(n(r.website)),m=[re(r),[n(r.company_type),n(r.vertical)].filter(Boolean).join(", "),n(r.stage),n(r.deal_type),F(n(r.date))].filter(l=>l&&l.length>0),j=n(r.description),c=n(r.lead_investors),h=n(r.other_investors),b=[c?c.split(", ").map(l=>l+" (lead)").join(", "):null,h].filter(Boolean).join(", ");return e.jsxs("tr",{className:"border-b border-brand-line/60 align-top",children:[e.jsxs("td",{className:"py-2 pr-3 text-brand-ink",children:[e.jsxs("div",{className:"font-medium",children:[i?e.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"underline underline-offset-2",children:o}):o,m.length>0&&e.jsxs("span",{className:"font-normal text-brand-muted",children:[" ",m.join(" · ")]})]}),j&&e.jsx("div",{className:"truncate text-xs text-brand-muted",children:j}),b&&e.jsx("div",{className:"text-xs text-brand-muted",children:b})]}),A.map(([l])=>e.jsx("td",{className:"whitespace-nowrap py-2 pl-3 text-right text-brand-ink",children:n(r[l])??""},l))]},s)})})]})})}function ae({rows:t}){return t.some(te)?e.jsx(se,{rows:t}):e.jsx("div",{className:"mt-3 overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[52rem] text-left text-sm",children:[e.jsx("thead",{children:e.jsx("tr",{className:"border-b border-brand-line",children:P.map(([r,s])=>e.jsx("th",{className:"py-2 pr-3 font-medium",children:s},r))})}),e.jsx("tbody",{children:t.map((r,s)=>e.jsx("tr",{className:"border-b border-brand-line/60 align-top",children:P.map(([o])=>e.jsx("td",{className:"py-2 pr-3 text-brand-ink "+(o==="investors"?"whitespace-normal":"whitespace-nowrap"),children:o==="date"?F(n(r.date)):n(r[o])??""},o))},s))})]})})}function oe({implied:t}){const r=u(t.low),s=u(t.median),o=u(t.high),i=u(t.revenue_musd),x=u(t.basis_n),m=u(t.target_premoney_musd);return r===null||s===null||o===null||i===null?null:e.jsxs("div",{className:"mt-4 rounded-md border border-brand-line bg-brand-line/20 p-3",children:[e.jsx("p",{className:"text-sm font-semibold text-brand-ink",children:"Implied pre-money valuation range"}),e.jsxs("p",{className:"mt-1 text-sm text-brand-ink",children:[y(r)," to ",y(o),", centered on ",y(s),", from your revenue of ",y(i)," and the segment’s pre-money to revenue multiples (based on ",x??0," deals).",m!==null?` Your target: ${y(m)}.`:""]})]})}function we(){const{dealId:t,reportId:r}=V.useParams(),{user:s}=$(),o=H(),i=I(O),x=I(Q),m=T({queryKey:["market-comps-report",t,r],queryFn:()=>i({data:{dealId:t,reportId:r}}),enabled:!!s}),j=T({queryKey:["deal-detail",t],queryFn:()=>x({data:{dealId:t}}),enabled:!!s}),c=m.data?.report??null,h=n(c?.report_status);if(B.useEffect(()=>{h==="processing"&&o({to:"/deals/$dealId",params:{dealId:t}})},[h,t,o]),B.useEffect(()=>(document.body.classList.add("model-review-print"),()=>{document.body.classList.remove("model-review-print")}),[]),m.isLoading||j.isLoading)return e.jsx("div",{className:"mx-auto max-w-4xl px-4 py-10 text-sm text-muted-foreground",children:"Loading the report..."});if(m.isError||!c)return e.jsxs("div",{className:"mx-auto max-w-4xl space-y-3 px-4 py-10",children:[e.jsx("p",{className:"text-sm text-brand-ink",children:"This report is not available."}),e.jsx(_,{to:"/deals/$dealId",params:{dealId:t},className:"text-sm underline underline-offset-2",children:"Back to the deal"})]});const b=n(j.data?.deal?.name)??"Deal",l=`${b} Market Comps and Valuation Report`,C=()=>{const a=document.title;document.title=l;const d=()=>{document.title=a,window.removeEventListener("afterprint",d)};window.addEventListener("afterprint",d),setTimeout(()=>{document.title===l&&(document.title=a,window.removeEventListener("afterprint",d))},1e3),window.print()};if(h==="failed")return e.jsxs("div",{className:"mx-auto max-w-4xl space-y-3 px-4 py-10",children:[e.jsxs("h1",{className:"font-serif text-2xl text-brand-ink",children:[e.jsx("span",{className:"block",children:b}),e.jsx("span",{className:"block",children:"Market Comps and Valuation Report"})]}),e.jsx("p",{className:"text-sm text-brand-ink",children:"This report did not finish. Any credits charged were returned."}),n(c.failed_reason)&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Reason: ",n(c.failed_reason)]}),e.jsx(_,{to:"/deals/$dealId",params:{dealId:t},className:"text-sm underline underline-offset-2",children:"Back to the deal"})]});if(h==="processing")return null;const p=f(c.report_json)??{},q=f(p.narrative)??{},g=f(p.deal)??{},k=n(p.disclaimer),D=n(p.generated_at),w=N(p.summary_stats_tables),S=n(p.segment_basis_line),v=N(p.similar_deals_table),R=f(p.implied_valuation),L=G.map(a=>{const d=f(q[a]);if(!d)return null;const M=n(d.body)??"",E=N(d.table),z=a==="summary_stats"&&w.length>0||a==="similar_deals"&&v.length>0;return!M&&E.length===0&&!z?null:{key:a,heading:n(d.heading)??U[a]??a,body:M,table:E}}).filter(a=>!!a);return e.jsxs("div",{className:"model-review-report mx-auto max-w-4xl space-y-5 px-4 py-8",children:[e.jsx("style",{children:`
2        @media print {
3          @page { margin: 0.75in; }
4          body.model-review-print {
5            background: #fff !important;
6            color: #000 !important;
7            -webkit-print-color-adjust: exact;
8            print-color-adjust: exact;
9          }
10          body.model-review-print header.sticky { display: none !important; }
11          .model-review-report .no-print { display: none !important; }
12          .model-review-report {
13            max-width: none !important;
14            padding: 0 !important;
15            margin: 0 !important;
16          }
17          .model-review-report section,
18          .model-review-report .rounded-lg {
19            border: none !important;
20            background: transparent !important;
21            box-shadow: none !important;
22            border-radius: 0 !important;
23            padding: 0.5rem 0 !important;
24            margin: 1rem 0 !important;
25          }
26          .model-review-report h1,
27          .model-review-report h2,
28          .model-review-report h3 {
29            color: #000 !important;
30            break-after: avoid;
31          }
32          .model-review-report .font-serif { color: #000 !important; }
33          .model-review-report p,
34          .model-review-report li,
35          .model-review-report td,
36          .model-review-report th { color: #000 !important; }
37          .model-review-report .text-muted-foreground,
38          .model-review-report .text-brand-muted { color: #333 !important; }
39          .model-review-report .overflow-x-auto {
40            overflow: visible !important;
41            width: 100% !important;
42          }
43          .model-review-report table {
44            width: 100% !important;
45            min-width: 0 !important;
46            border-collapse: collapse !important;
47            page-break-inside: auto !important;
48          }
49          .model-review-report thead { display: table-row-group !important; }
50          .model-review-report tr {
51            border-top: 1px solid #ccc !important;
52            border-bottom: 1px solid #ccc !important;
53            page-break-inside: auto !important;
54          }
55          .model-review-report td,
56          .model-review-report th {
57            padding: 0.35rem 0.5rem 0.35rem 0 !important;
58            vertical-align: top !important;
59            border: none !important;
60          }
61          .model-review-report .border-brand-line { border-color: #ccc !important; }
62        }
63      `}),e.jsxs("div",{className:"no-print space-y-6",children:[e.jsx(K,{dealId:t}),e.jsx(W,{dealId:t,active:"reports"})]}),e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"font-serif text-2xl text-brand-ink",children:[e.jsx("span",{className:"block",children:b}),e.jsx("span",{className:"block",children:"Market Comps and Valuation Report"})]}),(n(g.stage)||n(g.sector))&&e.jsx("p",{className:"mt-1 text-sm text-brand-muted",children:[n(g.stage),n(g.sector)].filter(
63Boolean).join(" · ")}),D&&e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Prepared ",new Date(D).toLocaleDateString()]})]}),e.jsxs("div",{className:"flex items-center gap-3 no-print",children:[e.jsx("button",{type:"button",onClick:C,className:"shrink-0 text-sm underline underline-offset-2",children:"Download PDF"}),e.jsx(_,{to:"/deals/$dealId",params:{dealId:t},className:"shrink-0 text-sm underline underline-offset-2",children:"Back to the deal"})]})]}),L.map((a,d)=>e.jsxs("section",{className:"rounded-lg border border-brand-line bg-brand-paper p-5",children:[e.jsxs("h2",{className:"font-serif text-lg text-brand-ink",children:[d+1,". ",a.heading]}),e.jsxs("div",{className:"mt-3",children:[a.body&&e.jsx(J,{body:a.body}),a.table.length>0&&e.jsx(X,{rows:a.table}),a.key==="executive_summary"&&R&&e.jsx(oe,{implied:R}),a.key==="summary_stats"&&S&&e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:S}),a.key==="summary_stats"&&w.length>0&&e.jsx(Z,{tables:w}),a.key==="similar_deals"&&v.length>0&&e.jsx(ae,{rows:v})]})]},a.key)),L.length===0&&e.jsx("p",{className:"text-sm text-brand-muted",children:"This report has no content to display."}),k&&e.jsx("p",{className:"pt-2 text-xs text-muted-foreground",children:k})]})}export{we as component};
64//# sourceMappingURL=deals._dealId_.market-comps._reportId-CzWR-PD9.js.map

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.