PageSourceSearch

https://sadu-ai.replit.app/assets/StartupDetail-CPpiTJQD.js

js sadu-ai.replit.app collected 2026-10-03 03:53:02 UTC 40,459 bytes, 3 lines download raw bytes

1import{p as Le,G as Pe,r as o,L as Ae,a as H,q as V,l as N,j as e,U as Ie,s as R,C as se,b as ae,K as W,N as ee,ab as Fe,T as De,a6 as Be,X as ze,af as _e,u as Qe,g as Ge,ah as He,a9 as We,c as Z,d as Ye,A as he,z as pe,aa as Ve,B as Xe,F as Je}from"./index-BLROMO9x.js";import{S as be,a as ve,b as ye,c as ke,d as we}from"./select-xNi6na47.js";import{B as J}from"./badge-BKR6ZVky.js";import{D as Ee,a as Ue,b as Re,c as re}from"./dropdown-menu-DZV2MakL.js";import{D as Ze}from"./DeleteConfirmDialog-DxY-KP73.js";import{E as et}from"./EditStartupDialog-C1Q0LQvc.js";import{T as Ke}from"./textarea-CswBSQlG.js";import{L as U}from"./label-Y77aelbe.js";import{A as tt,a as st,b as at,c as rt,d as nt,e as it,f as lt,g as ot}from"./alert-dialog-COZZ2-e9.js";import{s as Se}from"./countries-Bj-7vWjZ.js";import{P as Te}from"./PhoneCodeInput-CLW937pj.js";import{P as dt}from"./plus-BPlhyuP_.js";import{S as ct}from"./star-tk2sUcLt.js";import{P as $e}from"./phone-DUReJXzY.js";import{L as qe,M as mt}from"./map-pin-ChFs1w6j.js";import{U as ut}from"./upload-BTnzOAEu.js";import{G as xt}from"./globe-BT9AV5jY.js";import{E as ft}from"./ellipsis-ODceWYd4.js";import{P as ht}from"./pencil-g8GGTq78.js";import{T as pt}from"./trending-up-CHh84i8w.js";import{C as gt}from"./chevron-right-AzsBxwjF.js";import{f as ge}from"./format-KLGJ6BL-.js";import"./index-Ks48UPCk.js";import"./check-Ba4rD8JF.js";import"./chevron-up-D50KjeSK.js";import"./index-C4FmdOXP.js";import"./DiscardChangesDialog-D7dRwVwW.js";import"./dialog-BatUY4yM.js";import"./camera-CCMlnQkQ.js";import"./en-US-DWBB1Vss.js";function oe(t){switch(t){case"no_api_key":return"Admin: PROXYCURL_API_KEY is not set on the server.";case"rate_limited":return"Admin: LinkedIn lookup is rate-limited — try again shortly.";case"invalid_url":return"Admin: that URL doesn't look like a public LinkedIn profile.";case"not_found":return"Admin: profile not found or not public on LinkedIn.";case"error":return"Admin: LinkedIn lookup failed (network or upstream error).";default:return null}}function Me(t){return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}function de(t){const p=t.trim();if(!p)return!1;try{const d=new URL(p.startsWith("http")?p:`https://${p}`),m=d.hostname.toLowerCase();return m!=="linkedin.com"&&!m.endsWith(".linkedin.com")?!1:/^\/(in|pub)\/[^/]+\/?$/i.test(d.pathname)}catch{return!1}}function jt(t){return t.split(/\s+/).filter(Boolean).slice(0,2).map(p=>p[0]?.toUpperCase()||"").join("")}function Nt({person:t,onChanged:p,pendingFetch:d}){const{toast:m}=Pe(),S=o.useRef(null),[P,b]=o.useState(!1),i=d&&!t.avatar&&t.avatarSource!=="manual",a=async h=>{b(!0);try{const{objectPath:y}=await N.startups.uploadKeyPersonAvatar(h);await N.startups.updateKeyPerson(t.id,{avatar:y,avatarSource:"manual"}),p(),m({title:"Photo updated"})}catch{m({title:"Upload failed",variant:"destructive"})}finally{b(!1)}},l=async()=>{if(!t.linkedin){m({title:"No LinkedIn URL on this person",variant:"destructive"});return}if(!(t.avatarSource==="manual"&&!window.confirm("This person has a manually uploaded photo. Replace it with the LinkedIn photo?"))){b(!0);try{await N.startups.refreshKeyPersonAvatar(t.id,t.avatarSource==="manual"),p(),m({title:"Photo refreshed from LinkedIn"})}catch{m({title:"Refresh failed",description:"Check the LinkedIn URL or PROXYCURL_API_KEY.",variant:"destructive"})}finally{b(!1)}}},g=async()=>{b(!0);try{await N.startups.updateKeyPerson(t.id,{avatar:null,avatarSource:null}),p(),m({title:"Photo cleared"})}catch{m({title:"Failed to clear photo",variant:"destructive"})}finally{b(!1)}};return e.jsxs(Ee,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx("button",{type:"button",disabled:P,className:"relative h-16 w-16 rounded-full overflow-hidden border border-border bg-secondary flex items-center justify-center text-base font-medium text-muted-foreground hover:ring-2 hover:ring-primary/30 transition shrink-0","data-testid":`avatar-founder-key-person-${t.id}`,"aria-label":"Key person photo menu",children:P||i?e.jsx(ee,{className:"w-5 h-5 animate-spin"}):t.avatar?e.jsx("img",{src:t.avatar,alt:t.fullName,className:"h-full w-full object-cover"}):e.jsx("span",{children:jt(t.fullName)||"?"})})}),e.jsxs(Re,{align:"start",children:[e.jsxs(re,{onClick:()=>S.current?.click(),"data-testid":`menu-upload-photo-${t.id}`,children:[e.jsx(ut,{className:"w-3.5 h-3.5 mr-2"}),"Upload photo"]}),e.jsxs(re,{onClick:l,disabled:!t.linkedin,"data-testid":`menu-refresh-photo-${t.id}`,children:[e.jsx(Be,{className:"w-3.5 h-3.5 mr-2"}),"Fetch from LinkedIn"]}),t.avatar&&e.jsxs(re,{onClick:g,className:"text-red-600","data-testid":`menu-clear-photo-${t.id}`,children:[e.jsx(ze,{className:"w-3.5 h-3.5 mr-2"}),"Clear photo"]})]}),e.jsx("input",{ref:S,type:"file",accept:"image/*",className:"hidden",onChange:h=>{const y=h.target.files?.[0];y&&a(y),h.target.value=""}})]})}function bt({person:t,onSave:p,onDelete:d,onAvatarChanged:m,pendingFetch:S,hasPortalAccess:P,onRevokePortalAccess:b}
1){const[i,a]=o.useState(!1),[l,g]=o.useState(()=>{const{dialCode:n,number:v}=Se(t.mobile);return{fullName:t.fullName,title:t.title||"",email:t.email||"",mobile:v,mobileCode:n,linkedin:t.linkedin||"",notes:t.notes||""}}),[h,y]=o.useState({}),[C,D]=o.useState("idle"),[$,q]=o.useState(t.linkedin||""),[L,w]=o.useState({}),[_,K]=o.useState([]),[M,r]=o.useState(void 0),{user:j}=Ae(),u=j?.role==="admin",[A,I]=o.useState(null),B=o.useRef(0),ne=n=>{g(f=>({...f,linkedin:n}));const v=n.trim();v!==$&&(y({}),w({}),K([]),D("idle"),r(void 0),I(f=>f&&f.sourceUrl===v?f:null))};o.useEffect(()=>{const{dialCode:n,number:v}=Se(t.mobile);g({fullName:t.fullName,title:t.title||"",email:t.email||"",mobile:v,mobileCode:n,linkedin:t.linkedin||"",notes:t.notes||""}),y({}),w({}),K([]),I(null),D("idle"),r(void 0),q(t.linkedin||"")},[t]);const te=async()=>{const n=l.linkedin.trim();if(!n||!de(n)||n===$)return;q(n),D("loading");const v=++B.current;try{const f=await N.startups.lookupKeyPersonLinkedIn(n);if(v!==B.current)return;const k=[],O={};g(Q=>{if(Q.linkedin.trim()!==n)return Q;const T={...Q};return y(ce=>{const F={...ce};return f.fullName&&(T.fullName.trim()?T.fullName.trim()!==f.fullName&&(O.fullName=f.fullName):(T.fullName=f.fullName,F.fullName=!0,k.push("name"))),f.title&&(T.title.trim()?T.title.trim()!==f.title&&(O.title=f.title):(T.title=f.title,F.title=!0,k.push("title"))),F}),T}),f.avatar&&!t.avatar&&t.avatarSource!=="manual"&&(I({url:f.avatar,sourceUrl:n}),k.push("photo")),w(O),K(k);const X=k.length>0||Object.keys(O).length>0;D(X?"done":"none"),r(X?void 0:f.reason)}catch{v===B.current&&(D("none"),r("error"))}};o.useEffect(()=>{const n=l.linkedin.trim();if(!n||!de(n)||n===$)return;const v=setTimeout(()=>{te()},800);return()=>clearTimeout(v)},[l.linkedin,$]);const z=n=>{const v=L[n];if(!v)return;g(k=>({...k,[n]:v})),y(k=>({...k,[n]:!0})),w(k=>{const O={...k};return delete O[n],O});const f=n==="fullName"?"name":"title";K(k=>k.includes(f)?k:[...k,f])},ie=()=>{if(!l.fullName.trim())return;const n=l.linkedin.trim(),v=A&&A.sourceUrl===n;p(t.id,{fullName:l.fullName.trim(),title:l.title.trim()||null,email:l.email.trim()||null,mobile:l.mobile.trim()?`${l.mobileCode} ${l.mobile.trim()}`:null,linkedin:n||null,notes:l.notes.trim()||null,...v?{avatar:A.url,avatarSource:"linkedin"}:{}}),a(!1),w({}),I(null)};return i?e.jsxs("div",{className:"border border-border/60 rounded-xl p-4 space-y-3","data-testid":`edit-founder-key-person-${t.id}`,children:[A&&A.sourceUrl===l.linkedin.trim()&&e.jsxs("div",{className:"flex items-center gap-2","data-testid":`preview-edit-avatar-${t.id}`,children:[e.jsx("img",{src:A.url,alt:"LinkedIn preview",className:"h-12 w-12 rounded-full object-cover border border-border"}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:"New photo from LinkedIn (saved when you click Save)"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Full Name *"}),e.jsx(W,{value:l.fullName,onChange:n=>{g({...l,fullName:n.target.value}),h.fullName&&y({...h,fullName:!1})},className:"h-8 text-sm","data-testid":`input-edit-fullName-${t.id}`}),h.fullName&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Imported from LinkedIn"}),L.fullName&&e.jsxs("button",{type:"button",onClick:()=>z("fullName"),className:"text-[10px] text-primary hover:underline text-left",children:['Use LinkedIn value: "',L.fullName,'"']})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Title"}),e.jsx(W,{value:l.title,onChange:n=>{g({...l,title:n.target.value}),h.title&&y({...h,title:!1})},className:"h-8 text-sm","data-testid":`input-edit-title-${t.id}`}),h.title&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Imported from LinkedIn"}),L.title&&e.jsxs("button",{type:"button",onClick:()=>z("title"),className:"text-[10px] text-primary hover:underline text-left",children:['Use LinkedIn value: "',L.title,'"']})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Email"}),e.jsx(W,{type:"email",value:l.email,onChange:n=>g({...l,email:n.target.value}),className:"h-8 text-sm"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Mobile"}),e.jsx(Te,{dialCode:l.mobileCode,number:l.mobile,onDialCodeChange:n=>g({...l,mobileCode:n}),onNumberChange:n=>g({...l,mobile:n}),codeTestId:`select-edit-mobile-code-${t.id}`,numberTestId:`input-edit-mobile-${t.id}`})]}),e.jsxs("div",{className:"space-y-1 md:col-span-2",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"LinkedIn URL"}),e.jsx(W,{type:"url",value:l.linkedin,onChange:n=>ne(n.target.value),onBlur:te,className:"h-8 text-sm","data-testid":`input-edit-linkedin-${t.id}`}),C==="loading"&&e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[e.jsx(ee,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Looking up LinkedIn profile…"})]}),C==="done"&&_.length>0&&e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Filled ",Me(_)," from LinkedIn."]}
1),C==="done"&&_.length===0&&Object.keys(L).length>0&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Found LinkedIn values — review suggestions above."}),C==="none"&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No LinkedIn data found."}),C==="none"&&u&&oe(M)&&e.jsx("p",{className:"text-[11px] text-muted-foreground italic",children:oe(M)})]}),e.jsxs("div",{className:"space-y-1 md:col-span-2",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Notes"}),e.jsx(Ke,{value:l.notes,onChange:n=>g({...l,notes:n.target.value}),rows:2,className:"text-sm resize-none"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{a(!1),w({}),I(null)},children:"Cancel"}),e.jsx(R,{size:"sm",onClick:ie,disabled:!l.fullName.trim(),"data-testid":`button-save-edit-founder-key-person-${t.id}`,children:"Save"})]})]}):e.jsx("div",{className:"border border-border/60 rounded-xl p-4 hover:bg-secondary/20 transition-colors group","data-testid":`founder-key-person-${t.id}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Nt,{person:t,onChanged:m,pendingFetch:S}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[e.jsx("span",{className:"font-semibold text-foreground","data-testid":`founder-key-person-name-${t.id}`,children:t.fullName}),t.title&&e.jsx("span",{className:"text-sm text-muted-foreground",children:t.title})]}),S&&!t.avatar&&t.avatarSource!=="manual"&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-1 text-[11px] text-muted-foreground",children:[e.jsx(ee,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Fetching photo from LinkedIn…"})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-2 mt-2",children:t.isPrimary&&e.jsxs(J,{variant:"outline",className:"text-[10px] font-normal bg-primary/5 text-primary border-primary/20",children:[e.jsx(ct,{className:"w-2.5 h-2.5 mr-1"}),"Primary Contact"]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-muted-foreground",children:[t.email&&e.jsxs("a",{href:`mailto:${t.email}`,className:"inline-flex items-center gap-1 hover:text-primary",children:[e.jsx(Fe,{className:"w-3 h-3"}),t.email]}),t.mobile&&e.jsxs("a",{href:`tel:${t.mobile}`,className:"inline-flex items-center gap-1 hover:text-primary",children:[e.jsx($e,{className:"w-3 h-3"}),t.mobile]}),t.linkedin&&e.jsxs("a",{href:t.linkedin,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:text-primary",children:[e.jsx(qe,{className:"w-3 h-3"}),"LinkedIn"]})]}),t.notes&&e.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:t.notes})]}),e.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[P&&e.jsx(R,{variant:"ghost",size:"sm",className:"text-amber-600 hover:text-amber-700",onClick:()=>b?.(t.id),"data-testid":`button-revoke-portal-access-${t.id}`,children:"Revoke Portal Access"}),e.jsx(R,{variant:"ghost",size:"sm",onClick:()=>a(!0),"data-testid":`button-edit-founder-key-person-${t.id}`,children:"Edit"}),e.jsx(R,{variant:"ghost",size:"sm",className:"text-red-600 hover:text-red-700",onClick:()=>d(t.id),"data-testid":`button-delete-founder-key-person-${t.id}`,children:e.jsx(De,{className:"w-3.5 h-3.5"})})]})]})})}function vt({startupId:t,allowEmpty:p=!1}){const d=Le(),{toast:m}=Pe(),[S,P]=o.useState(!1),b={fullName:"",title:"",email:"",mobile:"",mobileCode:"+966",linkedin:"",notes:""},[i,a]=o.useState(b),[l,g]=o.useState({}),[h,y]=o.useState(null),[C,D]=o.useState({}),[$,q]=o.useState([]),[L,w]=o.useState("idle"),[_,K]=o.useState(void 0),[M,r]=o.useState(""),j=o.useRef(0),{user:u}=Ae(),A=u?.role==="admin",I=()=>{a(b),g({}),y(null),D({}),q([]),w("idle"),K(void 0),r("")},B=s=>{a(c=>({...c,linkedin:s}));const x=s.trim();x!==M&&(h&&h.sourceUrl!==x&&y(null),g({}),D({}),q([]),w("idle"),K(void 0))},ne=async()=>{const s=i.linkedin.trim();if(!s||!de(s)||s===M)return;r(s),w("loading");const x=++j.current;try{const c=await N.startups.lookupKeyPersonLinkedIn(s);if(x!==j.current)return;const E=[],G={};a(xe=>{if(xe.linkedin.trim()!==s)return xe;const Y={...xe};return g(Oe=>{const fe={...Oe};return c.fullName&&(Y.fullName.trim()?Y.fullName.trim()!==c.fullName&&(G.fullName=c.fullName):(Y.fullName=c.fullName,fe.fullName=!0,E.push("name"))),c.title&&(Y.title.trim()?Y.t
1itle.trim()!==c.title&&(G.title=c.title):(Y.title=c.title,fe.title=!0,E.push("title"))),fe}),c.avatar&&(y({url:c.avatar,sourceUrl:s}),E.push("photo")),Y}),D(G),q(E);const Ne=E.length>0||Object.keys(G).length>0;w(Ne?"done":"none"),K(Ne?void 0:c.reason)}catch{x===j.current&&(w("none"),K("error"))}};o.useEffect(()=>{const s=i.linkedin.trim();if(!s||!de(s)||s===M)return;const x=setTimeout(()=>{ne()},800);return()=>clearTimeout(x)},[i.linkedin,M]);const te=s=>{const x=C[s];x&&(a(c=>({...c,[s]:x})),g(c=>({...c,[s]:!0})),D(c=>{const E={...c};return delete E[s],E}),q(c=>c.includes(s==="fullName"?"name":"title")?c:[...c,s==="fullName"?"name":"title"]))},[z,ie]=o.useState({}),n=s=>ie(x=>({...x,[s]:Date.now()+15e3})),[,v]=o.useReducer(s=>s+1,0),{data:f=[]}=H({queryKey:["startup-key-people",t],queryFn:()=>N.startups.getKeyPeople(t),enabled:!!t,refetchInterval:()=>{const s=Date.now();return Object.values(z).some(x=>x>s)?3e3:!1}}),{data:k=[]}=H({queryKey:["startup-portal-users",t],queryFn:()=>N.startups.getPortalUsers(t),enabled:!!t}),O=new Map(k.filter(s=>!s.revokedAt).map(s=>[s.startupKeyPersonId,s])),X=V({mutationFn:s=>N.startupPortalAccess.revoke(s),onSuccess:()=>{d.invalidateQueries({queryKey:["startup-portal-users",t]}),m({title:"Portal access revoked",description:"This person can no longer log in to the Startup Portal."})},onError:()=>m({title:"Error",description:"Failed to revoke portal access.",variant:"destructive"})});o.useEffect(()=>{if(!Object.values(z).some(x=>x>Date.now()))return;const s=setInterval(()=>{const x=Date.now(),c={};for(const[E,G]of Object.entries(z))G>x&&(c[E]=G);Object.keys(c).length!==Object.keys(z).length?ie(c):v()},1e3);return()=>clearInterval(s)},[z]);const Q=()=>d.invalidateQueries({queryKey:["startup-key-people",t]}),T=V({mutationFn:()=>N.startups.createKeyPerson(t,{fullName:i.fullName.trim(),title:i.title.trim()||null,email:i.email.trim()||null,mobile:i.mobile.trim()?`${i.mobileCode} ${i.mobile.trim()}`:null,linkedin:i.linkedin.trim()||null,notes:i.notes.trim()||null,isPrimary:!1,sortOrder:f.length,...h&&h.sourceUrl===i.linkedin.trim()?{avatar:h.url,avatarSource:"linkedin"}:{}}),onSuccess:s=>{Q(),I(),P(!1),m({title:"Key person added"}),s.linkedin&&!s.avatar&&s.avatarSource!=="manual"&&n(s.id)},onError:()=>m({title:"Error",description:"Failed to add key person.",variant:"destructive"})}),ce=V({mutationFn:({id:s,patch:x})=>N.startups.updateKeyPerson(s,x),onSuccess:(s,x)=>{Q(),m({title:"Key person updated"});const c=Object.prototype.hasOwnProperty.call(x.patch,"linkedin"),E=Object.prototype.hasOwnProperty.call(x.patch,"avatar");s.linkedin&&!s.avatar&&s.avatarSource!=="manual"&&(c||E)&&n(s.id)},onError:()=>m({title:"Error",description:"Failed to update key person.",variant:"destructive"})}),[F,le]=o.useState(null),me=!!F&&O.has(F.id),ue=V({mutationFn:s=>N.startups.deleteKeyPerson(s),onSuccess:()=>{Q(),d.invalidateQueries({queryKey:["startup-portal-users",t]}),le(null),m({title:"Key person removed"})},onError:s=>m({title:"Error",description:s?.message||"Failed to delete key person.",variant:"destructive"})});return f.length===0&&!S&&!p?null:e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1 rounded bg-secondary text-muted-foreground",children:e.jsx(Ie,{className:"w-4 h-4"})}),e.jsx("h3",{className:"font-heading font-semibold text-lg text-foreground",children:"Key People"})]}),!S&&e.jsxs(R,{size:"sm",onClick:()=>P(!0),"data-testid":"button-add-founder-key-person",children:[e.jsx(dt,{className:"w-4 h-4 mr-2"}),"Add Key Person"]})]}),e.jsx(se,{className:"bg-white shadow-sm border border-black/5 rounded-2xl overflow-hidden",children:e.jsxs(ae,{className:"p-5 space-y-3",children:[S&&e.jsxs("div",{className:"border border-dashed border-border rounded-lg p-4 space-y-3","data-testid":"form-add-founder-key-person",children:[h&&h.sourceUrl===i.linkedin.trim()&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:h.url,alt:"LinkedIn preview",className:"h-12 w-12 rounded-full object-cover border border-border"}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Photo imported from LinkedIn"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Full Name *"}),e.jsx(W,{value:i.fullName,onChange:s=>{a({...i,fullName:s.target.value}),l.fullName&&g({...l,fullName:!1})},className:"h-8 text-sm","data-testid":"input-new-founder-key-person-name"}),l.fullName&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Imported from LinkedIn"}),C.fullName&&e.jsxs("button",{type:"button",onClick:()=>te("fullName"),className:"text-[10px] text-primary hover:underline text-left",children:['Use LinkedIn value: "',C.fullName,'"']})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Title"}),e.jsx(W,{value:i.title,onChange:s=>{a({...i,title:s.target.value}),l.title&&g({...l,title:!1})},className:"h-8 text-sm","data-testid":"input-new-founder-key-person-title"}),l.title&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Imported from LinkedIn"}),C.title&&e.jsxs("button",{type:"button",onClick:()=>te("title"),className:"text-[10px] text-primary hover:underline text-left",children:['Use LinkedIn value: "',C.title,'"']})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Email"}),e.jsx(W,{type:"email",value:i.email,onChange:s=>a({...i,email:s.target.value}),className:"h-8 text-sm"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Mobile"}),e.jsx(Te,{dialCode:i.mobileCode,number:i.mobile,onDialCodeChange:s=>a({...i,mobileCode:s}),onNumberChange:s=>a({...i,mobile:s}),codeTestId:"select-add-founder-mobile-code",numberTestId:"input-add-founder-mobile"})]}),e.jsxs("div",{className:"space-y-1 md:col-span-2",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"LinkedIn URL"}),e.jsx(W,{type:"url",value:i.linkedin,onChange:s=>B(s.target.value),onBlur:ne,className:"h-8 text-sm","data-testid":"input-new-founder-key-person-linkedin"}),L==="loading"&&e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[e.jsx(ee,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Looking up LinkedIn profile…"})]}),L==="done"&&$.length>0&&e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Filled ",Me($)," from LinkedIn."]}),L==="done"&&$.length===0&&Object.keys(C).length>0&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Found LinkedIn values — review suggestions above."}),L==="none"&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No LinkedIn data found. Enter details manually."}),L==="none"&&A&&oe(_)&&e.jsx("p",{className:"text-[11px] text-muted-foreground italic",children:oe(_)})]}),e.jsxs("div",{className:"space-y-1 md:col-span-2",children:[e.jsx(U,{className:"text-xs text-muted-foreground",children:"Notes"}),e.jsx(Ke,{value:i.notes,onChange:s=>a({...i,notes:s.target.value}),rows:2,className:"text-sm resize-none"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{P(!1),I()},children:"Cancel"}),e.jsx(R,{size:"sm",onClick:()=>T.mutate(),disabled:!i.fullName.trim()||T.isPending,"data-testid":"button-save-new-founder-key-person",children:T.isPending?e.jsx(ee,{className:"w-4 h-4 animate-spin"}):"Add"})]})]}),f.length===0&&!S?e.jsx("p",{className:"text-sm text-muted-foreground px-1 pb-2",children:"No key peo
1ple on file yet. A Startup Portal login is attached to a key person, so at least one is needed before portal access can be granted."}):f.map(s=>e.jsx(bt,{person:s,onSave:(x,c)=>ce.mutate({id:x,patch:c}),onDelete:x=>le(f.find(c=>c.id===x)??null),onAvatarChanged:Q,pendingFetch:(z[s.id]??0)>Date.now(),hasPortalAccess:O.has(s.id),onRevokePortalAccess:x=>X.mutate(x)},s.id))]})}),e.jsx(tt,{open:!!F,onOpenChange:s=>{s||le(null)},children:e.jsxs(st,{"data-testid":"dialog-delete-key-person",children:[e.jsxs(at,{children:[e.jsxs(rt,{children:["Remove ",F?.fullName??"this person","?"]}),e.jsx(nt,{children:me?`${F?.fullName} has Startup Portal access for this startup. Removing them deletes that login as well: they are signed out straight away, nothing records that they had access, and their email address can be granted to someone else. To cut off access but keep the person and the record, revoke access instead.`:"They are taken off this startup's key people. This cannot be undone."})]}),e.jsxs(it,{children:[e.jsx(lt,{"data-testid":"button-cancel-delete-key-person",children:"Cancel"}),me&&e.jsx(R,{variant:"outline",className:"text-amber-700",disabled:X.isPending,onClick:()=>{F&&X.mutate(F.id),le(null)},"data-testid":"button-revoke-instead",children:"Revoke access only"}),e.jsx(ot,{className:"bg-red-600 hover:bg-red-700 text-white",disabled:ue.isPending,onClick:s=>{s.preventDefault(),F&&ue.mutate(F.id)},"data-testid":"button-confirm-delete-key-person",children:ue.isPending?"Removing…":me?"Remove person and login":"Remove"})]})]})})]})}const yt=["Referral","Website","Event","Accelerator"],kt=["Growing","Stagnant","Acquired","IPO","Shutdown"],Ce=t=>{switch(t){case"Growing":return"bg-green-100 text-green-700 border-green-200";case"Stagnant":return"bg-yellow-100 text-yellow-700 border-yellow-200";case"Acquired":return"bg-purple-100 text-purple-700 border-purple-200";case"IPO":return"bg-blue-100 text-blue-700 border-blue-200";case"Shutdown":return"bg-gray-100 text-gray-600 border-gray-200";default:return"bg-gray-100 text-gray-600 border-gray-200"}};function je({title:t,icon:p,clickable:d=!0}){return e.jsxs("div",{className:Z("flex items-center gap-2 py-3 rounded px-2 -mx-2 transition-colors group",d&&"cursor-pointer hover:bg-secondary/30"),children:[e.jsx("div",{className:Z("p-1 rounded bg-secondary text-muted-foreground",d&&"group-hover:text-primary transition-colors"),children:e.jsx(p,{className:"w-4 h-4"})}),e.jsx("h3",{className:"font-heading font-semibold text-lg text-foreground",children:t}),d&&e.jsx(Je,{className:"w-4 h-4 ml-auto text-muted-foreground"})]})}function wt({description:t,maxLines:p=12}){const[d,m]=o.useState(!1),[S,P]=o.useState(!1),b=o.useRef(null);return o.useEffect(()=>{const i=()=>{b.current&&P(b.current.scrollHeight>b.current.clientHeight)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[t,d]),e.jsxs("div",{className:"flex-1 flex flex-col",children:[e.jsx("p",{ref:b,className:"text-sm leading-relaxed text-foreground/80 transition-all",style:d?void 0:{display:"-webkit-box",WebkitLineClamp:p,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t}),S&&!d&&e.jsx("button",{onClick:i=>{i.stopPropagation(),m(!0)},className:"text-xs text-primary hover:text-primary/80 hover:underline mt-1 font-medium cursor-pointer inline-block",type:"button",children:"Show more..."})]})}function ts(){const[,t]=_e("/startups/:id"),[,p]=Qe(),d=t?.id,m=Le(),[S,P]=o.useState(!1),[b,i]=o.useState(!1),{data:a,isLoading:l}=H({queryKey:["startup",d],queryFn:()=>N.startups.getById(d),enabled:!!d}),g=V({mutationFn:r=>N.startups.update(d,{source:r}),onSuccess:()=>{m.invalidateQueries({queryKey:["startup",d]}),m.invalidateQueries({queryKey:["startups"]})}}),h=V({mutationFn:r=>N.startups.update(d,{status:r}),onSuccess:()=>{m.invalidateQueries({queryKey:["startup",d]}),m.invalidateQueries({queryKey:["startups"]})}}),{data:y}=H({queryKey:["deals"],queryFn:()=>N.deals.getAll()}),{data:C=[]}=H({queryKey:["startup-key-people",d],queryFn:()=>N.startups.getKeyPeople(d),enabled:!!d}),{data:D}=H({queryKey:["/api/startups",d,"portfolio-company"],queryFn:()=>N.portfolioCompanies.getForStartup(d),enabled:!!d}),$=!!D,{data:q}=H({queryKey:["users"],queryFn:N.users.getAll}),{data:L}=H({queryKey:["funds"],queryFn:N.funds.getAll}),w=(y?.filter(r=>r.startupId===d)||[]).sort((r,j)=>{const u=new Date(j.createdAt).getTime()-new Date(r.createdAt).getTime();return u!==0?u:new Date(j.updatedAt).getTime()-new Date(r.updatedAt).getTime()}),_=w.reduce((r,j)=>{const u=j.fundId||"no-fund";return r[u]||(r[u]=[]),r[u].push(j),r},{}),K=r=>r==="no-fund"?"Unassigned":L?.find(j=>
1j.id===r)?.name||"Unknown Fund",M=V({mutationFn:()=>N.startups.delete(d),onSuccess:()=>{m.invalidateQueries({queryKey:["startups"]}),m.invalidateQueries({queryKey:["deals"]}),p("/startups")}});return Ge({backButton:{label:"Startups",href:"/startups"}}),He(a?.name||"Startup"),l?e.jsx(e.Fragment,{children:e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx(ee,{className:"w-8 h-8 animate-spin text-muted-foreground"})})}):a?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col h-full",children:e.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxs("div",{className:"space-y-4 pb-8",children:[e.jsx("div",{className:"rounded-2xl p-4 md:p-6 lg:p-8 border border-border/40",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-start gap-4 md:gap-6",children:[e.jsx("div",{className:"w-24 h-16 md:w-32 md:h-20 rounded-xl bg-secondary shadow-sm border border-border flex items-center justify-center p-2 md:p-3 shrink-0 mx-auto md:mx-0",children:a.logo?e.jsx("img",{src:a.logo,alt:a.name,className:"max-w-full max-h-full object-contain"}):e.jsx("span",{className:"text-2xl font-bold text-primary",children:a.name.substring(0,2).toUpperCase()})}),e.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.jsx("h1",{className:"text-xl md:text-2xl lg:text-3xl font-heading font-bold text-foreground mb-2",children:a.name}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-x-3 md:gap-x-4 gap-y-2 text-muted-foreground text-xs md:text-sm mb-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(mt,{className:"w-4 h-4"}),a.location]}),e.jsx("div",{className:"h-5 w-px bg-muted-foreground/40"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(We,{className:"w-4 h-4"}),"Founded ",a.foundedYear]}),e.jsx("div",{className:"h-5 w-px bg-muted-foreground/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Technology"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:a.technology?.split(",").map((r,j)=>e.jsx("span",{className:"h-6 inline-flex items-center px-2 text-xs border border-border/60 bg-background rounded-md",children:r.trim()}
1,j))})]}),e.jsx("div",{className:"h-5 w-px bg-muted-foreground/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Industry"}),e.jsx("span",{className:"h-6 inline-flex items-center px-2 text-xs border border-border/60 bg-background rounded-md",children:a.industry})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-x-3 md:gap-x-4 gap-y-2 text-muted-foreground text-xs md:text-sm mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] md:text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Created"}),e.jsx("span",{className:"h-6 inline-flex items-center px-2 text-xs border border-border/60 bg-background rounded-md",children:ge(new Date(a.createdAt),"MMM d, yyyy 'at' h:mm a")})]}),e.jsx("div",{className:"h-5 w-px bg-muted-foreground/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Source"}),e.jsxs(be,{value:a.source||"Website",onValueChange:r=>g.mutate(r),children:[e.jsx(ve,{className:"h-6 w-auto min-w-[100px] text-xs px-2 py-0 border-border/60 bg-background hover:bg-secondary/50 focus:ring-0 focus:ring-offset-0","data-testid":"select-source-trigger",children:e.jsx(ye,{})}),e.jsx(ke,{children:yt.map(r=>e.jsx(we,{value:r,className:"text-sm","data-testid":`select-source-${r.toLowerCase()}`,children:r},r))})]})]}),e.jsx("div",{className:"h-5 w-px bg-muted-foreground/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Startup Status"}),e.jsxs(be,{value:a.status||"Growing",onValueChange:r=>h.mutate(r),children:[e.jsx(ve,{className:Z("h-6 w-auto min-w-[90px] text-xs px-2 py-0 border focus:ring-0 focus:ring-offset-0 font-medium",Ce(a.status||"Growing")),"data-testid":"select-status-trigger",children:e.jsx(ye,{})}),e.jsx(ke,{children:kt.map(r=>e.jsx(we,{value:r,children:e.jsx("span",{className:Z("font-medium",Ce(r).split(" ").slice(1).join(" ")),children:r})},r))})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center md:justify-start gap-2 md:gap-3",children:[a.website&&e.jsxs("a",{href:a.website,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-2 min-h-[44px] md:min-h-0 md:py-1.5 rounded-lg bg-secondary hover:bg-secondary/80 text-foreground text-sm transition-colors",children:[e.jsx(xt,{className:"w-4 h-4"})," Website"]}),a.linkedin&&e.jsxs("a",{href:a.linkedin,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-2 min-h-[44px] md:min-h-0 md:py-1.5 rounded-lg bg-secondary hover:bg-secondary/80 text-foreground text-sm transition-colors",children:[e.jsx(qe,{className:"w-4 h-4"})," LinkedIn"]}),e.jsxs(Ee,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"h-11 w-11 md:h-8 md:w-8","data-testid":"startup-actions-menu",children:e.jsx(ft,{className:"w-5 h-5 md:w-4 md:h-4"})})}),e.jsxs(Re,{align:"end",children:[e.jsxs(re,{onClick:()=>i(!0),"data-testid":"edit-startup-button",children:[e.jsx(ht,{className:"w-4 h-4 mr-2"}),"Edit Startup"]}),e.jsxs(re,{onClick:()=>P(!0),className:"text-red-600 focus:text-red-600 focus:bg-red-50","data-testid":"delete-startup-button",children:[e.jsx(De,{className:"w-4 h-4 mr-2"}),"Delete Startup"]})]})]})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 md:gap-4",children:[e.jsxs("section",{className:"flex flex-col",children:[e.jsx(je,{title:"About",icon:Ye,clickable:!1}),e.jsx(se,{className:"bg-white shadow-sm border border-black/5 rounded-2xl overflow-hidden flex-1",children:e.jsx(ae,{className:"p-3 md:p-5 h-full",children:e.jsx(wt,{description:a.description})})})]}),e.jsxs("section",{className:"flex flex-col",children:[e.jsx(je,{title:"Team",icon:Ie,clickable:!1}),e.jsx(se,{className:"bg-white shadow-sm border border-black/5 rounded-2xl overflow-hidden flex-1",children:e.jsxs(ae,{className:"p-3 md:p-5 space-y-3 md:space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(he,{className:"w-10 h-10 md:w-12 md:h-12 border border-border shadow-sm",children:e.jsx(pe,{className:"bg-primary/5 text-primary font-medium",children:a.ceoName.substring(0,2).toUpperCase()})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-sm md:text-base text-foreground",children:a.ceoName}),e.jsx("div",{className:"text-[10px] md:text-xs text-muted-foreground font-medium mb-1.5 md:mb-2",children:"CEO"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("a",{href:`mailto:${a.ceoEmail}`,className:"text-[11px] md:text-xs text-muted-foreground hover:text-primary flex items-center gap-1.5 transition-colors break-all",children:[e.jsx(Fe,{className:"w-3.5 h-3.5 shrink-0"}),a.ceoEmail]}),a.ceoPhone&&e.jsxs("a",{href:`tel:${a.ceoPhone}`,className:"text-[11px] md:text-xs text-muted-foreground hover:text-primary flex items-center gap-1.5 transition-colors",children:[e.jsx($e,{className:"w-3.5 h-3.5 shrink-0"}),a.ceoPhone]})]})]})]}),a.coFounders&&a.coFounders.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(Ve,{}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Co-Founders"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:a.coFounders.map((r,j)=>e.jsx(J,{variant:"secondary",className:"font-normal",children:r},j))})]})]})]})})]})]}),(C.length>0||$)&&e.jsx(vt,{startupId:a.id,allowEmpty:!0}),e.jsxs("section",{children:[e.jsx(je,{title:"Related Deals",icon:pt,clickable:!1}),w.length===0?e.jsx(se,{className:"bg-white shadow-sm border border-black/5 rounded-2xl overflow-hidden",children:e.jsxs(ae,{className:"p-4 md:p-8 text-center",children:[e.jsx(Xe,{className:"w-12 h-12 text-muted-foreground
1/30 mx-auto mb-3"}),e.jsx("h3",{className:"font-medium text-foreground mb-1",children:"No deals yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Deals related to this startup will appear here"})]})}):e.jsx("div",{className:"space-y-6",children:Object.entries(_).map(([r,j])=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{variant:"outline",className:"border-[#201D52]/30 text-[#201D52] font-medium",children:K(r)}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[j.length," ",j.length===1?"deal":"deals"]})]}),e.jsx("div",{className:"space-y-3",children:j.map(u=>{const A=q?.find(B=>B.id===u.dealPartnerId),I=q?.find(B=>B.id===u.dealCaptainId);return e.jsx(se,{className:"bg-white shadow-sm hover:shadow-md border border-black/5 rounded-2xl overflow-hidden cursor-pointer transition-all",onClick:()=>p(`/startup-deals/${u.id}`),children:e.jsx(ae,{className:"p-3 md:p-5",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(J,{variant:"outline",className:Z("font-normal",u.status==="Passed"&&"bg-red-50 text-red-600 border-red-200",u.status==="Lost"&&"bg-orange-50 text-orange-600 border-orange-200",u.status==="Mistakes"&&"bg-purple-50 text-purple-600 border-purple-200",u.status==="Closed"&&"bg-blue-50 text-blue-600 border-blue-200"),children:u.status}),e.jsx(J,{variant:"secondary",className:"font-normal",children:u.round}),e.jsx(J,{variant:"outline",className:Z("font-normal",u.priority==="High"&&"bg-red-500/10 text-red-600 border-red-200",u.priority==="Medium"&&"bg-orange-500/10 text-orange-600 border-orange-200",u.priority==="Low"&&"bg-green-500/10 text-green-600 border-green-200"),children:u.priority})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 md:gap-4 mt-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-medium mb-0.5",children:"Ask"}),e.jsxs("div",{className:"font-semibold text-sm md:text-base text-foreground",children:["$",(u.askAmount/1e6).toFixed(1),"M"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-medium mb-0.5",children:"Pre-Money"}),e.jsxs("div",{className:"font-semibold text-foreground",children:["$",(u.valuation/1e6).toFixed(1),"M"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-medium mb-0.5",children:"Created"}),e.jsx("div",{className:"font-semibold text-foreground",children:ge(new Date(u.createdAt),"MMM d, yyyy")})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-medium mb-0.5",children:"Updated"}),e.jsx("div",{className:"font-semibold text-foreground",children:ge(new Date(u.updatedAt),"MMM d, yyyy")})]})]}),(A||I)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-3 pt-3 border-t border-border/40",children:[A&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-medium tracking-wide",children:"DEAL PARTNER"}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 h-6 px-2 rounded-md bg-secondary border border-border/50",children:[e.jsx(he,{className:"w-4 h-4",children:e.jsx(pe,{className:"text-[8px] bg-primary text-primary-foreground",children:A.avatar})}),e.jsx("span",{className:"text-xs text-foreground font-medium",children:A.name})]})]}),I&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-medium tracking-wide",children:"DEAL CAPTAIN"}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 h-6 px-2 rounded-md bg-secondary border border-border/50",children:[e.jsx(he,{className:"w-4 h-4",children:e.jsx(pe,{className:"text-[8px] bg-primary text-primary-foreground",children:I.avatar})}),e.jsx("span",{className:"text-xs text-foreground font-medium",children:I.name})]})]})]})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"shrink-0",children:e.jsx(gt,{className:"w-5 h-5 text-muted-foreground"})})]})})},u.id)})})]},r))})]})]})})}),e.jsx(et,{open:b,onOpenChange:i,startup:a}),e.jsx(Ze,{open:S,onOpenChange:P,title:"Delete this startup?",description:`This will remove "${a?.name}
1" and all its associated deals from all views.
2
3It can be recovered by an admin if needed.`,onConfirm:()=>M.mutate(),isDeleting:M.isPending})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Startup not found"}),e.jsx(R,{onClick:()=>p("/startups"),children:"Back to Startups"})]})})}export{ts 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.