PageSourceSearch

https://www.intelital.com/_next/static/chunks/pages/universe-815849634b9122dc.js

js intelital.com collected 2026-10-02 01:34:58 UTC 41,368 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="561a6886-6207-4de5-bbad-808b3cae0d2b",e._sentryDebugIdIdentifier="sentry-dbid-561a6886-6207-4de5-bbad-808b3cae0d2b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5737],{23323:(e,t,n)=>{"use strict";n.d(t,{GV:()=>r.GV,P9:()=>r.P9,Pq:()=>r.Pq,jQ:()=>r.jQ});var r=n(30220);n(36510),n(34811),n(53589)},36253:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Z});var r=n(37876),a=n(23323),s=n(96851),l=n(89099),i=n(14232),o=n(87168),d=n(55201),c=n(3144),u=n(48230),p=n.n(u),f=n(87874),x=n(98680),m=n(41001);let g={up:"text-signal-green-dark",down:"text-signal-amber-dark",flat:"text-fg-tertiary"};function h({entity:e,promoted:t,onTogglePromote:n}){let a=(0,s.c)("universe"),l="gtm"===(0,x.Pq)()?(0,f.I)(e.attributes?.domain):null,i=e.leadsCount>0?`${e.type} \xb7 ${a("entityLeads",{count:e.leadsCount})}`:e.type,o=e.sparkline.length>0;return(0,r.jsx)("article",{id:`entity-${e.id}`,className:(0,f.cn)("grid scroll-mt-16 grid-cols-1 gap-3.5 rounded-[14px] border border-line-soft bg-surface-canvas px-[18px] pb-3.5 pt-4 shadow-card-el transition-all duration-200 hover:-translate-y-0.5 hover:border-line-card hover:shadow-md"),children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[l?(0,r.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-body font-medium tracking-[-0.01em] text-fg-primary transition-colors hover:text-brand-teal hover:underline focus:outline-none focus-visible:underline",children:e.name}):(0,r.jsx)(p(),{href:`/universe/${e.id}`,className:"block truncate text-body font-medium tracking-[-0.01em] text-fg-primary transition-colors hover:text-brand-teal focus:outline-none focus-visible:underline",children:e.name}),(0,r.jsx)("p",{className:"text-caption text-fg-tertiary",children:i}),e.hasDecision&&(0,r.jsx)(p(),{href:"/home",className:"mt-1 inline-flex items-center self-start rounded-full bg-brand-teal/5 px-2.5 py-0.5 text-xs font-medium text-fg-secondary transition-colors hover:bg-brand-teal/10 hover:text-fg-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:a("openDecision")})]}),o&&(0,r.jsxs)("div",{className:(0,f.cn)("flex flex-none flex-col items-end gap-0.5",g[e.trajectory]),children:[(0,r.jsx)(m.O,{values:e.sparkline}),(0,r.jsx)("span",{className:"font-mono text-mono-xs uppercase",children:e.deltaLabel})]})]}),e.description&&(0,r.jsx)("p",{className:"max-w-[60ch] text-body font-normal leading-[1.6] tracking-[-0.005em] text-pretty text-fg-primary",children:e.description}),e.latestSignal&&(0,r.jsxs)("div",{className:(0,f.cn)("flex items-start gap-2.5 rounded-panel px-3 py-2 text-caption",e.latestSignal.fresh?"bg-[rgba(31,91,105,0.08)] text-[#1B4F5C]":"bg-surface-warm text-fg-secondary"),children:[(0,r.jsx)(d.A,{className:(0,f.cn)("mt-0.5 h-3.5 w-3.5 flex-none",e.latestSignal.fresh?"text-brand-teal-hover":"text-signal-amber"),"aria-hidden":!0}),(0,r.jsxs)("p",{className:"min-w-0",children:[e.latestSignal.when&&(0,r.jsx)("span",{className:(0,f.cn)("mr-1.5 font-mono text-mono-xs uppercase",e.latestSignal.fresh?"text-brand-teal-hover":"text-fg-tertiary"),children:e.latestSignal.when}),e.latestSignal.text]})]}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-center gap-1",children:[(0,r.jsxs)(p(),{href:`/universe/${e.id}`,className:"group/profile inline-flex items-center gap-1.5 rounded-lg px-2.5 py-[5px] text-caption font-medium text-brand-teal-hover transition-colors hover:bg-brand-teal/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:[a("openProfile"),(0,r.jsx)(c.A,{className:"h-3 w-3 transition-transform duration-200 ease-[cubic-bezier(.2,.8,.2,1.05)] group-hover/profile:translate-x-[3px]","aria-hidden":!0})]}),(0,r.jsx)("button",{type:"button",onClick:()=>n(e.id),"aria-pressed":t,className:(0,f.cn)("rounded-lg px-2.5 py-[5px] text-caption transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",t?"text-brand-teal-hover hover:bg-brand-teal/[0.06]":"text-fg-secondary hover:bg-brand-teal/[0.06] hover:text-fg-primary"),children:a(t?"promotedToQueue":"promoteToQueue")})]})]})})}var b=n(5002),y=n(98477);function v({label:e,value:t}){return(0,r.jsxs)("div",{className:"grid grid-cols-[1fr_1.4fr] items-baseline gap-2.5",children:[(0,r.jsx)("span",{className:"font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:e}),(0,r.jsx)("span",{className:"break-words text-body-sm leading-snug text-fg-primary",children:t})]})}function w({attrs:e}){let t=(0,s.c)("universe");if(!e)return null;let n=t=>{let n=e[t];return null==n?null:String(n).trim()||null},a=n("resumen_home"),l=n("lanes_outbound"),i=n("marketplace"),o=n("marketplace_url"),d=n("employees"),c=n("revenue"),u=n("domain")??n("web"),p=n("hq");return j(e)?(0,r.jsxs)(r.Fragment,{children:[a&&(0,r.jsx)("div",{className:"rounded-lg border border-line-soft bg-surface-sidebar px-3.5 py-3",children:(0,r.jsx)("p",{className:"text-body-sm leading-relaxed text-fg-primary whitespace-pre-line",children:a})}),l&&(0,r.jsx)(v,{label:t("acctLanes"),value:l}),i&&(0,r.jsxs)("div",{className:"grid grid-cols-[1fr_1.4fr] items-baseline gap-2.5",children:[(0,r.jsx)("span",{className:"font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:t("acctMarketplace")}),(0,r.jsx)("span",{className:"break-words text-body-sm leading-snug text-fg-primary",children:o?(0,r.jsx)("a",{href:o.startsWith("http")?o:`https://${o}`,target:"_blank",rel:"noopener noreferrer",className:"text-brand-teal underline decoration-brand-teal/30 hover:decoration-brand-teal focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70 rounded-sm",children:i}):i}
1)]}),d&&(0,r.jsx)(v,{label:t("acctEmployees"),value:d}),c&&(0,r.jsx)(v,{label:t("acctRevenue"),value:c}),u&&(0,r.jsxs)("div",{className:"grid grid-cols-[1fr_1.4fr] items-baseline gap-2.5",children:[(0,r.jsx)("span",{className:"font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:t("acctWebsite")}),(0,r.jsx)("a",{href:u.startsWith("http")?u:`https://${u}`,target:"_blank",rel:"noopener noreferrer",className:"break-words text-body-sm leading-snug text-brand-teal underline decoration-brand-teal/30 hover:decoration-brand-teal focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70 rounded-sm",children:u})]}),p&&(0,r.jsx)(v,{label:t("acctHQ"),value:p})]}):null}function j(e){if(!e)return!1;let t=t=>{let n=e[t];return null!=n&&""!==String(n).trim()};return t("resumen_home")||t("lanes_outbound")||t("marketplace")||t("marketplace_url")||t("employees")||t("revenue")||t("domain")||t("web")||t("hq")}function k({kind:e,name:t,rel:n}){return(0,r.jsxs)("div",{className:"grid grid-cols-[8px_1fr_auto] items-center gap-2.5 rounded-lg border border-line-soft bg-surface-sidebar px-3 py-2.5",children:[(0,r.jsx)("span",{className:(0,f.cn)("h-2 w-2 rounded-full","signal"===e?"bg-brand-teal-light":"bg-signal-green-dark")}),(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block truncate text-body-sm font-medium text-fg-primary",children:t}),(0,r.jsx)("span",{className:"mt-0.5 block font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:n})]})]})}function N({edge:e,entityId:t}){let n=(0,s.c)("universe"),a=e.src_id===t?e.dst_name??e.dst_id:e.src_name??e.src_id,l=e.attributes,i=(()=>{let e=l?.constraints;if(!Array.isArray(e)||0===e.length)return null;let t=(e,t)=>"object"==typeof e&&null!==e&&e.allowed===t,r=e.filter(e=>t(e,!0)).length,a=e.filter(e=>t(e,!1)).length;return`${n("constraintsAllowed",{count:r})} \xb7 ${n("constraintsForbidden",{count:a})}`})();return(0,r.jsxs)("div",{className:"grid grid-cols-[auto_1fr] items-start gap-2.5 rounded-lg border border-line-soft bg-surface-sidebar px-3 py-2.5",children:[(0,r.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-xs bg-brand-teal/10 px-2 py-0.5 font-mono text-mono-xs uppercase tracking-wider text-brand-teal",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-brand-teal"}),e.kind]}),(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block break-words text-body-sm font-medium leading-snug text-fg-primary",children:a}),i&&(0,r.jsx)("span",{className:"mt-0.5 block font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:i})]})]})}function S({kind:e,count:t}){return(0,r.jsxs)("div",{className:"grid grid-cols-[auto_1fr_auto] items-center gap-2.5 rounded-lg border border-line-soft bg-surface-sidebar px-3 py-2.5",children:[(0,r.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-xs bg-brand-teal/10 px-2 py-0.5 font-mono text-mono-xs uppercase tracking-wider text-brand-teal",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-brand-teal"}),e]}),(0,r.jsx)("span",{}),(0,r.jsx)("span",{className:"font-mono text-mono-xs tabular-nums text-fg-tertiary",children:t})]})}function C({edge:e,onClose:t}){let n=(0,s.c)("universe"),a=e.attributes;(0,i.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]);let l=(()=>{let e=a?.constraints;if(!Array.isArray(e)||0===e.length)return null;let t=(e,t)=>"object"==typeof e&&null!==e&&e.allowed===t;return{allowed:e.filter(e=>t(e,!0)).length,forbidden:e.filter(e=>t(e,!1)).length}})(),o=e.src_name??e.src_id,d=e.dst_name??e.dst_id;return(0,y.createPortal)((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-50 bg-[rgba(20,32,31,0.4)] backdrop-blur-[2px]","aria-hidden":!0,onClick:t}),(0,r.jsxs)("aside",{role:"dialog","aria-modal":"true","aria-label":"Edge details",className:"fixed right-0 top-0 z-50 flex h-full w-full max-w-[420px] flex-col border-l border-line-soft bg-surface-canvas shadow-lg outline-none",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-line-soft px-5 py-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-xs bg-[#7F0C50]/10 px-2 py-0.5 font-mono text-mono-xs uppercase tracking-wider text-[#7F0C50]",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[#7F0C50]"}),e.kind]}),(0,r.jsxs)("h2",{className:"mt-1.5 truncate text-h4 font-medium text-fg-primary",children:[o," → ",d]}),(0,r.jsxs)("p",{className:"mt-0.5 font-mono text-mono-xs tracking-wider text-fg-tertiary",children:["edge \xb7 ",e.id]})]}),(0,r.jsx)("button",{type:"button",onClick:t,"aria-label":n("drawerClose"),className:"flex-none rounded-md p-1.5 text-fg-tertiary transition-colors hover:bg-surface-app hover:text-fg-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:(0,r.jsx)(b.A,{className:"h-4 w-4","aria-hidden":!0})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)(v,{label:n("edgeFrom"),value:o}),(0,r.jsx)(v,{label:n("edgeTo"),value:d}),(0,r.jsx)(v,{label:n("edgeKind"),value:e.kind}),a?.source?(0,r.jsx)(v,{label:n("edgeSource"),value:String(a.source)}):null,l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"my-1 border-t border-line-soft"}),(0,r.jsx)(v,{label:n("edgeAllowedSkus"),value:String(l.allowed)}),(0,r.jsx)(v,{label:n("edgeForbiddenSkus"),value:String(l.forbidden)})]})]})})]})]}),document.body)}function A({entity:e,onClose:t,edges:n,selectedEdge:a,onCloseEdge:o}){let d=(0,s.c)("universe"),c=(0,l.useRouter)(),u=(0,i.useRef)(null),p={up:d("trendingUp"),down:d("trendingDown"),flat:d("stable")},x=(0,i.useRef)(null),[m,g]=(0,i.useState)("properties"),h=[{id:"properties",label:d("drawerProperties")}
1,{id:"neighbors",label:d("drawerNeighbors")},{id:"relationships",label:d("drawerRelationships")}];if((0,i.useEffect)(()=>{if(!e)return;x.current=document.activeElement,u.current?.focus();let n=e=>{if("Escape"===e.key)return void t();if("Tab"!==e.key||!u.current)return;let n=u.current.querySelectorAll('button:not([disabled]), [href], input, [tabindex]:not([tabindex="-1"])');if(0===n.length)return;let r=n[0],a=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n),x.current?.focus()}},[e,t]),a&&!e&&"u">typeof document)return(0,r.jsx)(C,{edge:a,onClose:()=>o?.()});if(!e||"u"<typeof document)return null;let A=[...null!==e.score?[{label:d("propScore"),value:`${e.score}%`}]:[],{label:d("propTrajectory"),value:p[e.trajectory]},{label:d("propSignalsWk"),value:e.deltaLabel},...e.industry?[{label:d("propIndustry"),value:e.industry}]:[],...e.region?[{label:d("propRegion"),value:e.region}]:[],...e.stage?[{label:d("propStage"),value:e.stage}]:[],...null!==e.headcount?[{label:d("propHeadcount"),value:`${e.headcount}`}]:[],...e.leadsCount>0?[{label:d("propLeads"),value:`${e.leadsCount}`}]:[]].filter(e=>e.value&&"—"!==e.value),E=(n??[]).filter(t=>t.src_id===e.id||t.dst_id===e.id),_=Object.entries(E.reduce((e,t)=>(e[t.kind]=(e[t.kind]??0)+1,e),{})).sort(([e],[t])=>e.localeCompare(t)),$=E.length>0||e.signals.length>0||e.leadNames.length>0;return(0,y.createPortal)((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-50 bg-[rgba(20,32,31,0.4)] backdrop-blur-[2px]","aria-hidden":!0,onClick:t}),(0,r.jsxs)("aside",{ref:u,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":d("entityDetails",{name:e.name}),className:"fixed right-0 top-0 z-50 flex h-full w-full max-w-[420px] flex-col border-l border-line-soft bg-surface-canvas shadow-lg outline-none",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-line-soft px-5 py-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-xs bg-brand-teal/10 px-2 py-0.5 font-mono text-mono-xs uppercase tracking-wider text-brand-teal",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-brand-teal"}),e.type]}),(0,r.jsx)("h2",{className:"mt-1.5 truncate text-h4 font-medium text-fg-primary",children:e.name}),(0,r.jsxs)("p",{className:"mt-0.5 font-mono text-mono-xs tracking-wider text-fg-tertiary",children:["node \xb7 ",e.type]})]}),(0,r.jsx)("button",{type:"button",onClick:t,"aria-label":d("drawerClose"),className:"flex-none rounded-md p-1.5 text-fg-tertiary transition-colors hover:bg-surface-app hover:text-fg-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:(0,r.jsx)(b.A,{className:"h-4 w-4","aria-hidden":!0})})]}),(0,r.jsx)("div",{className:"flex border-b border-line-soft px-3.5",children:h.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>g(e.id),className:(0,f.cn)("mx-0.5 border-b-[1.5px] px-2.5 pb-2.5 pt-3 text-body-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",m===e.id?"border-brand-teal text-fg-primary":"border-transparent text-fg-secondary hover:text-fg-primary"),children:e.label},e.id))}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:["properties"===m&&(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)(w,{attrs:e.attributes}),A.map(e=>(0,r.jsx)(v,{label:e.label,value:e.value},e.label)),!j(e.attributes)&&0===A.length&&(0,r.jsx)("p",{className:"text-body-sm text-fg-tertiary",children:d("noAttributes")})]}),"neighbors"===m&&($?(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[E.map(t=>(0,r.jsx)(N,{edge:t,entityId:e.id},t.id)),e.signals.map(e=>(0,r.jsx)(k,{kind:"signal",name:e.text,rel:e.when?`${d("relSignal")} \xb7 ${e.when}`:d("relSignal")},e.id)),e.leadNames.map(e=>(0,r.jsx)(k,{kind:"lead",name:e,rel:d("relLead")},e))]}):(0,r.jsx)("p",{className:"text-body-sm text-fg-tertiary",children:d("drawer
1NoNeighbors")})),"relationships"===m&&(_.length>0?(0,r.jsx)("div",{className:"flex flex-col gap-1.5",children:_.map(([e,t])=>(0,r.jsx)(S,{kind:e,count:t},e))}):(0,r.jsxs)("div",{className:"rounded-lg border border-dashed border-line-soft px-4 py-6 text-center",children:[(0,r.jsx)("p",{className:"text-body-sm text-fg-secondary",children:d("drawerNoRelationships")}),(0,r.jsx)("p",{className:"mt-1 text-caption text-fg-tertiary",children:d("drawerRelationshipsHint")})]}))]}),(0,r.jsx)("div",{className:"border-t border-line-soft px-5 py-3",children:(0,r.jsx)("button",{type:"button",onClick:()=>{t(),c.push(`/universe/${e.id}`)},className:"rounded-md border border-line-soft px-3 py-1.5 text-body-sm text-fg-primary transition-colors hover:border-brand-teal/40 hover:bg-surface-app focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:d("drawerOpenProfile")})})]})]}),document.body)}var E=n(86901),_=n(18847),$=n.n(_),F=n(75247);let L=$()(async()=>{let e=(await n.e(7387).then(n.bind(n,47387))).default,t=(0,i.forwardRef)((t,n)=>(0,r.jsx)(e,{...t,ref:n}));return t.displayName="ForceGraph2D",t},{loadableGenerated:{webpack:()=>[47387]},ssr:!1});function D(e){return e.replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}let M={origin:"#7F0C50",plant:"#1F5B69",bodega:"#4A8E9E",lane:"#4A8E9E",product:"#C98A1A",customer:"#1F5B69"},R=["#7F0C50","#B0376F","#1F5B69","#4A8E9E","#266878","#194750","#C98A1A","#3F7A5E","#4DA77A","#C8102E","#8A0B20","#A07830","#7A6E50","#6FB6C7","#D89BA8","#7EC699","#46606A","#8A9AA1","#5C4A3D","#B7AC92","#1B2A2E"];function T({entities:e,edges:t,onSelectEntity:n,onSelectEdge:a,selectedEdgeId:s,onBackgroundClick:l,nodeColors:o,nodePositions:d,edgeKinds:c,fitView:u=!0,enablePan:p=!0,showLegend:f=!0,nodeRelSize:m=2,nodeVal:g,nodeCanvasObject:h,nodePointerAreaPaint:b,linkCanvasObject:y,linkColor:v,linkWidth:w,linkDirectionalArrowLength:j=6,linkDirectionalArrowRelPos:k=1}){let N=(0,i.useRef)(null),S=(0,i.useRef)(null),[C,A]=(0,i.useState)({w:0,h:0}),[_,$]=(0,i.useState)([]),T=(0,x.Pq)();(0,i.useEffect)(()=>{let e=N.current;if(!e)return;let t=new ResizeObserver(()=>{A({w:e.clientWidth,h:e.clientHeight})});return t.observe(e),()=>t.disconnect()},[]),(0,i.useEffect)(()=>{if(!T)return;let e=!0;return(async()=>{let t=await (0,F.iD)();if(t)try{let n=await fetch(`/api/my-company/entity-types?vertical=${encodeURIComponent(T)}`,{headers:{Authorization:`Bearer ${t}`}});if(!n.ok)return;let r=await n.json().catch(()=>({}));e&&Array.isArray(r.entityTypes)&&$(r.entityTypes)}catch(e){}})(),()=>{e=!1}},[T]);let I=(0,i.useMemo)(()=>{let t=new Set;for(let n of e)t.add(n.type.toLowerCase());return t.add("signal"),t.add("leads"),Array.from(t).sort()},[e]),B=(0,i.useMemo)(()=>{let e={},t=new Set,n=o??M,r=0;for(let r of I){let a=n[r];a&&!t.has(a)&&(e[r]=a,t.add(a))}let a=0;for(let n of I)if(!e[n]){for(;a<R.length&&t.has(R[a]);)a++;if(a<R.length){let r=R[a];e[n]=r,t.add(r),a++}else{let a;do{var s;s=r++,a=`hsl(${Math.round(137.508*s%360)}, 70%, 55%)`}while(t.has(a));e[n]=a,t.add(a)}}return e},[I,o]),P=(0,i.useMemo)(()=>Array.from(new Set(e.map(e=>e.type.toLowerCase()))).map(e=>{let t=_.find(t=>t.key.toLowerCase()===e),n=t?.segment_label??t?.label??e,r=B[e]??M.company??"#6b7280";return{type:e,label:n,color:r}}),[e,_,B]),z=(0,i.useMemo)(()=>t.length>0||e.some(e=>{let t=e.type.toLowerCase();return"plant"===t||"bodega"===t||"origin"===t||"signal"===t}),[e,t]),O=(0,i.useMemo)(()=>{let n=[],r=[],a=new Set(e.map(e=>e.id));for(let t of e){let e=`entity-${t.id}`,a=t.type.toLowerCase(),s=d?.[t.id];if(n.push({id:e,kind:a,label:D(t.name),val:"plant"===a?8:"origin"===a?6:"signal"===a?1.5:4,entityId:t.id,...s?{fx:s.x,fy:s.y}:{}}),"plant"===a||!z)for(let a of t.signals.slice(0,3)){let s=`signal-${t.id}-${a.id}`;n.push({id:s,kind:"signal",label:D(a.text),val:1.5}),r.push({source:e,target:s})}if(!z&&t.leadsCount>0){let a=`leads-${t.id}`,s=t.leadNames.slice(0,3),l=t.leadsCount-s.length,i=[`${t.leadsCount} lead${1===t.leadsCount?"":"s"}`,...s.map(D),...l>0?[`+${l} more`]:[]].join("<br/>");n.push({id:a,kind:"leads",label:i,val:2}),r.push({source:e,target:a})}}if(z){let e=c?new Set(c.map(e=>e.toLowerCase())):null;for(let n of t){let t=n.kind.toLowerCase();(!e||e.has(t))&&a.has(n.src_id)&&a.has(n.dst_id)&&r.push({source:`entity-${n.src_id}`,target:`entity-${n.dst_id}`,edgeRecord:n})}}return{nodes:n,links:r}},[e,t,z]);(0,i.useEffect)(()=>{let e=S.current;if(!e||"function"!=typeof e.d3Force)return;e.d3Force("collide",(0,E.A)(50).iterations(2));let t=e.d3Force("charge");t&&"function"==typeof t.strength&&t.strength(-3e3);let n=e.d3Force("link");n&&"function"==typeof n.distance&&n.distance(300).strength(.6),"function"==typeof e.d3ReheatSimulation&&e.d3ReheatSimulation()},[O,C.w,C.h]);let q=(0,i.useCallback)(e=>{e.edgeRecord&&a&&a(e.edgeRecord)},[a]),K=(0,i.useCallback)(()=>{a?.(null),l?.()},[a,l]),W=(0,i.useCallback)(e=>s&&e.edgeRecord?.id===s?"rgba(127, 12, 80, 0.85)":v??"rgba(31, 91, 105, 0.75)",[s,v]),Q=(0,i.useCallback)(e=>s&&e.edgeRecord?.id===s?1.5:w??.75,[s,w]);return(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[(0,r.jsx)("div",{ref:N,className:"relative h-[560px] overflow-hidden rounded-lg border border-line-soft bg-surface-canvas shadow-card-el",children:C.w>0&&C.h>0&&(0,r.jsx)(L,{ref:S,graphData:O,width:C.w,height:C.h,nodeRelSize:m,nodeVal:g??(e=>e.val),nodeColor:e=>B[e.kind]??M.company??"#6b7280",nodeLabel:e=>e.label,nodeCanvasObject:h,nodePointerAreaPaint:b,linkColor:W,linkWidth:Q,linkCanvasObject:y,linkDirectionalArrowLength:j,linkDirectionalArrowRelPos:k,d3VelocityDecay:.4,onNodeClick:e=>{a?.(null),e.entityId&&n(e.entityId)},onNodeDragEnd:e=>{e.fx=e.x,e.fy=e.y}
1,onLinkClick:q,onBackgroundClick:K,enablePanInteraction:p,enableZoomInteraction:!0,cooldownTicks:500,onEngineStop:u?()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;S.current?.zoomToFit?.(450*!e,60)}:void 0},`graph-${C.w}x${C.h}`)}),f&&P.length>0&&(0,r.jsx)("div",{className:"flex items-center justify-between px-1",children:(0,r.jsx)("div",{className:"flex items-center gap-4",children:P.map(e=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-mono-xs uppercase text-fg-tertiary",children:[(0,r.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color}}),e.label]},e.type))})})]})}var I=n(19982);let B=["searchByAccountName","searchBySignalType","searchByRelationship","searchByIndustry"];function P({results:e,onQueryChange:t,onSelect:n,onOpenChange:a}){let l=(0,s.c)("universe"),o=(0,i.useRef)(null),[d,c]=(0,i.useState)(!1),[u,p]=(0,i.useState)(""),[x,m]=(0,i.useState)(-1),[g,h]=(0,i.useState)(0),b=(0,i.useCallback)(e=>{c(e),a(e),e||(p(""),m(-1),t(""))},[a,t]);(0,i.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()?(e.preventDefault(),o.current?.focus(),o.current?.select()):"Escape"===e.key&&d&&(o.current?.blur(),b(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[d,b]),(0,i.useEffect)(()=>{if(d)return;let e=setInterval(()=>h(e=>(e+1)%B.length),3600);return()=>clearInterval(e)},[d]);let y=e=>{o.current?.blur(),b(!1),n(e)},v=d&&u.trim().length>0;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:(0,f.cn)("relative flex flex-none items-center gap-3 rounded-[14px] border bg-surface-canvas px-4 py-2.5","transition-all duration-[240ms] ease-[cubic-bezier(.2,.7,.2,1)]",d?"z-50 w-[calc(100vw-80px)] border-brand-teal/45 shadow-[0_0_0_2px_rgba(31,91,105,0.25),0_10px_30px_-8px_rgba(31,91,105,0.30)] md:w-[min(50vw,640px)]":"w-72 border-line-soft shadow-card-el focus-within:border-brand-teal/30 lg:w-[520px]"),children:[(0,r.jsx)(I.A,{className:"h-[18px] w-[18px] flex-none text-fg-tertiary",strokeWidth:1.6,"aria-hidden":!0}),(0,r.jsx)("input",{ref:o,type:"text",role:"combobox","aria-expanded":v,"aria-controls":"universe-spotlight-results",placeholder:l(B[g]),autoComplete:"off",value:u,onFocus:()=>b(!0),onBlur:()=>b(!1),onChange:e=>{var n;p(n=e.target.value),m(-1),t(n)},onKeyDown:t=>{u&&0!==e.length&&("ArrowDown"===t.key?(t.preventDefault(),m(t=>Math.min(t+1,e.length-1))):"ArrowUp"===t.key?(t.preventDefault(),m(e=>Math.max(e-1,0))):"Enter"===t.key&&x>=0&&(t.preventDefault(),y(e[x])))},className:"min-w-0 flex-1 bg-transparent text-body-sm text-fg-primary outline-none placeholder:text-fg-tertiary"}),(0,r.jsx)("span",{className:"flex-none rounded-md border border-line-soft px-1.5 py-0.5 font-mono text-mono-xs text-fg-tertiary",children:"⌘ K"}),v&&(0,r.jsx)("div",{id:"universe-spotlight-results",role:"listbox",className:"absolute left-0 right-0 top-[calc(100%+8px)] z-50 overflow-hidden rounded-[14px] border border-line-soft bg-surface-canvas py-1.5 shadow-lg",children:0===e.length?(0,r.jsxs)("div",{className:"px-4 py-5 text-center text-body-sm text-fg-secondary",children:[l("noEntitiesMatch")," ",(0,r.jsxs)("strong",{className:"font-medium text-fg-primary",children:['"',u,'"']})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-4 pb-1 pt-2 font-mono text-mono-xs uppercase text-fg-tertiary",children:l("entities")}),e.slice(0,6).map((e,t)=>(0,r.jsxs)("button",{type:"button",role:"option","aria-selected":t===x,onMouseEnter:()=>m(t),onMouseDown:e=>e.preventDefault(),onClick:()=>y(e),className:(0,f.cn)("flex w-full items-center gap-3 px-4 py-2 text-left transition-colors",t===x&&"bg-brand-teal/5"),children:[(0,r.jsxs)("span",{className:"flex-none font-mono text-mono-xs text-brand-teal",children:["#",e.rank]}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate text-body-sm font-medium text-fg-primary",children:e.name}),(0,r.jsx)("span",{className:"flex-none text-caption text-fg-tertiary",children:e.type}),e.delta&&(0,r.jsx)("span",{className:"flex-none font-mono text-mono-xs uppercase text-fg-tertiary",children:e.delta})]},e.id))]})})]})})}function z({selected:e,onClick:t,children:n,className:a}){return(0,r.jsx)("button",{type:"button","aria-pressed":e,onClick:t,className:(0,f.cn)("rounded-full border px-[11px] py-[5px] text-xs transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",e?"border-brand-teal bg-brand-teal text-white":"border-transparent bg-brand-teal/5 text-fg-secondary hover:bg-brand-teal/10 hover:text-fg-primary",a),children:n})}var O=n(11410),q=n(52110);
1function K({value:e,onChange:t,graphDisabled:n=!1}){let a=(0,s.c)("universe"),l=[{view:"feed",label:a("feed"),icon:O.A,disabled:!1},{view:"graph",label:a("graph"),icon:q.A,disabled:n}];return(0,r.jsx)("div",{className:"flex flex-none items-center gap-0.5 rounded-lg border border-line-soft bg-surface-canvas p-0.5",children:l.map(({view:n,label:a,icon:s,disabled:l})=>(0,r.jsxs)("button",{type:"button",disabled:l,"aria-pressed":e===n,onClick:()=>t(n),className:(0,f.cn)("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-caption transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",e===n?"bg-surface-app font-medium text-fg-primary":"text-fg-secondary hover:text-fg-primary",l&&"cursor-not-allowed opacity-50"),children:[(0,r.jsx)(s,{className:"h-3.5 w-3.5","aria-hidden":!0}),a]},n))})}function W({view:e,onViewChange:t,signalsFilter:n,onSignalsFilterToggle:a,hasSignalsFilter:l,onHasSignalsFilterToggle:o,searchResults:d,onSearchQueryChange:c,onSearchSelect:u,entityTypes:p,filteredEntityTypeCounts:x,entityTypeFilter:m,onEntityTypeFilterChange:g,filteredCount:h}){let y=(0,s.c)("universe"),[v,w]=(0,i.useState)(!1),j=Object.entries(p).sort(([e],[t])=>e.localeCompare(t)),k="feed"===e&&j.length>1;return(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex flex-col",children:[(0,r.jsxs)("div",{className:(0,f.cn)("flex h-12 items-center gap-2.5 py-1.5 lg:h-14 lg:gap-3.5 lg:py-2 min-[1441px]:h-[60px] min-[1441px]:py-2.5",v?"z-50 bg-transparent":"bg-gradient-to-b from-surface-app/95 via-surface-app/95 via-70% to-transparent backdrop-blur-[6px]"),children:[(0,r.jsx)(P,{results:d,onQueryChange:c,onSelect:u,onOpenChange:w}),(0,r.jsxs)("div",{className:(0,f.cn)("ml-auto flex flex-none items-center gap-2 transition-opacity duration-200",v&&"pointer-events-none opacity-30"),children:["feed"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(z,{selected:n,onClick:a,className:"flex flex-none items-center gap-1.5 whitespace-nowrap",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:(0,f.cn)("h-1.5 w-1.5 flex-none rounded-full",n?"bg-white/80":"bg-signal-green")}),y("activeSignalsFilter"),n&&(0,r.jsx)(b.A,{className:"h-3 w-3 opacity-80","aria-hidden":!0})]}),(0,r.jsxs)(z,{selected:l,onClick:o,className:"flex flex-none items-center gap-1.5 whitespace-nowrap",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:(0,f.cn)("h-1.5 w-1.5 flex-none rounded-full",l?"bg-white/80":"bg-signal-green")}),y("hasSignalsFilter"),l&&(0,r.jsx)(b.A,{className:"h-3 w-3 opacity-80","aria-hidden":!0})]})]}),(0,r.jsx)(K,{value:e,onChange:t})]})]}),k&&(0,r.jsxs)("div",{className:(0,f.cn)("flex items-center gap-1.5 overflow-x-auto pb-2 transition-opacity duration-200",v&&"pointer-events-none opacity-30"),children:[(0,r.jsxs)(z,{selected:null===m,onClick:()=>g(null),className:"flex items-center gap-1 whitespace-nowrap",children:[y("allTypes"),(0,r.jsx)("span",{className:"opacity-60",children:h})]}),j.map(([e,t])=>(0,r.jsxs)(z,{selected:m===e,onClick:()=>g(m===e?null:e),className:"flex items-center gap-1 whitespace-nowrap",children:[e?e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"",(0,r.jsx)("span",{className:"opacity-60",children:x?.[e]??t})]},e))]})]})}function Q({count:e,onClick:t}){let n=(0,s.c)("universe");return e<=0?null:(0,r.jsx)("div",{className:"pointer-events-none sticky top-16 z-30 flex justify-center",children:(0,r.jsxs)("button",{type:"button",onClick:t,className:"pointer-events-auto flex items-center gap-2 rounded-full border border-brand-teal/20 bg-brand-teal/10 px-3.5 py-1.5 text-caption text-brand-teal-hover shadow-md transition-colors hover:bg-brand-teal/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-teal/70",children:[(0,r.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,r.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-signal-green opacity-75 motion-reduce:animate-none"}),(0,r.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-signal-green"})]}),n("newUpdates",{count:e})]})})}var H=n(91718),U=n(50217),V=n(4033),G=n(30220);function X(){let e=(0,s.c)("universe"),t=(0,l.useRouter)(),[n,a]=(0,i.useState)("feed"),[d,c]=(0,i.useState)(!1),[u,p]=(0,i.useState)(!1),[f,x]=(0,i.useState)(null),{entities:m,edges:g,total:b,hasMore:y,loading:v,error:w,refetch:j,entityTypes:k,sortMode:N}=(0,H.b)("graph"===n,f),{count:S,reset:C}=function(){let e=(0,G.P9)(),[t,n]=(0,i.useState)(0),r=(0,i.useRef)(new Date().toISOString());(0,i.useEffect)(()=>
1{r.current=new Date().toISOString(),n(0)},[e]);let a=(0,i.useCallback)(async()=>{if("u"<typeof document||!document.hidden)try{let{data:t}=await V.N.auth.getSession(),a=t.session?.access_token;if(!a)return;let s=await fetch(`/api/universe/updates?since=${encodeURIComponent(r.current)}`,{headers:{Authorization:`Bearer ${a}`,...e?{"x-org-id":e}:{}}}),l=await s.json().catch(()=>({}));s.ok&&"number"==typeof l.count&&n(l.count)}catch{}},[e]);return(0,i.useEffect)(()=>{let e=setInterval(a,9e4),t=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",t),()=>{clearInterval(e),document.removeEventListener("visibilitychange",t)}},[a]),{count:t,reset:(0,i.useCallback)(()=>{r.current=new Date().toISOString(),n(0)},[])}}(),{promoted:E,toggle:_}=(0,U.K)(),[$,F]=(0,i.useState)(""),[L,D]=(0,i.useState)(null),[M,R]=(0,i.useState)(null),I=(0,i.useRef)(!1);(0,i.useEffect)(()=>{t.isReady&&!I.current&&(I.current=!0,queueMicrotask(()=>{"graph"===t.query.view&&a("graph"),"active"===t.query.signals&&c(!0)}))},[t.isReady,t.query]);let B=(0,i.useMemo)(()=>"type_name"===N?m:[...m].sort((e,t)=>{let n=e.tamRank,r=t.tamRank;if(null!=n&&null!=r&&n!==r)return n-r;if(null!=n&&null==r)return -1;if(null==n&&null!=r)return 1;let a=e.score,s=t.score;if(null!=a&&null!=s&&s!==a)return s-a;if(null!=a&&null==s)return -1;if(null==a&&null!=s)return 1;let l=e.latestSignalMs??0,i=t.latestSignalMs??0;return i!==l?i-l:e.name.localeCompare(t.name)}),[m,N]),P=d&&"feed"===n,z=u&&"feed"===n,O=(0,i.useMemo)(()=>{let e=B.filter(e=>(!P||!0===e.isInHomeQueue)&&(!z||!!(e.signals.length>0)));return"type_name"===N?e:e.map((e,t)=>({...e,rank:t+1}))},[B,P,z,N]),q=(0,i.useMemo)(()=>O.reduce((e,t)=>{let n=t.type.toLowerCase();return e[n]=(e[n]??0)+1,e},{}),[O]),K=d&&!u&&null===f,X=(0,i.useMemo)(()=>{let e=$.trim().toLowerCase();return e?O.filter(t=>t.name.toLowerCase().includes(e)||t.why.toLowerCase().includes(e)).slice(0,6).map(e=>({id:e.id,rank:e.rank,name:e.name,type:e.type,delta:e.deltaLabel})):[]},[O,$]),Z=L?m.find(e=>e.id===L)??null:null,J="graph"===n?0===m.length:0===Object.values(k).reduce((e,t)=>e+t,0),Y=(d||u||null!==f)&&"feed"===n,ee=!J&&Y&&0===O.length;return(0,r.jsxs)("div",{className:"relative mx-auto flex w-full max-w-[880px] flex-col px-3 pb-24",children:[(0,r.jsx)(W,{view:n,onViewChange:a,signalsFilter:d,onSignalsFilterToggle:()=>c(e=>!e),hasSignalsFilter:u,onHasSignalsFilterToggle:()=>p(e=>!e),searchResults:X,onSearchQueryChange:F,onSearchSelect:e=>{"graph"===n&&a("feed"),requestAnimationFrame(()=>{var t;let n;return t=e.id,n=window.matchMedia("(prefers-reduced-motion: reduce)").matches,void document.getElementById(`entity-${t}`)?.scrollIntoView({behavior:n?"auto":"smooth",block:"start"})})},entityTypes:k,filteredEntityTypeCounts:q,entityTypeFilter:f,onEntityTypeFilterChange:x,filteredCount:O.length}),(0,r.jsx)(Q,{count:S,onClick:()=>{j(),C()}}),w&&(0,r.jsx)("p",{className:"py-4 text-body-sm text-signal-red",children:w}),v?(0,r.jsx)("div",{className:"flex justify-center py-16",children:(0,r.jsx)(o.y$,{size:"lg"})}):!w&&(J?(0,r.jsxs)("div",{className:"flex flex-col items-center py-12 text-center",children:[(0,r.jsx)("p",{className:"mb-2 text-h3 font-medium text-fg-primary",children:e("emptyTitle")}),(0,r.jsx)("p",{className:"mb-6 max-w-[360px] text-body text-fg-secondary",children:e("connectSource")}),(0,r.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:()=>t.push("/my-company"),children:e("connectSource")})]}):"graph"===n?(0,r.jsx)(T,{entities:O,edges:g,onSelectEntity:e=>{R(null),D(e)},onSelectEdge:e=>{R(e),e&&D(null)},selectedEdgeId:M?.id??null}):ee?(0,r.jsxs)("div",{className:"flex flex-col items-center py-12 text-center",children:[(0,r.jsx)("p",{className:"mb-2 text-h3 font-medium text-fg-primary",children:e(K?"activeSignalsEmptyTitle":"noMatchFiltersTitle")}),(0,r.jsx)("p",{className:"mb-6 max-w-[360px] text-body text-fg-secondary",children:e(K?"activeSignalsEmptyBody":"noMatchFiltersBody")}),(0,r.jsx)(o.$n,{variant:"secondary",size:"sm",onClick:()=>{c(!1),p(!1),x(null)},children:e(K?"clearFilter":"clearFilters")})]}):(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-3",children:[O.map(e=>(0,r.jsx)(h,{entity:e,promoted:E.has(e.id),onTogglePromote:_},e.id)),y&&(0,r.jsx)("p",{className:"py-2 text-center font-mono text-mono-xs uppercase tracking-wider text-fg-tertiary",children:e("showingFirstOf",{count:m.length,total:b})})]})),(0,r.jsx)(A,{entity:Z,onClose:()=>{D(null),R(null)},edges:g,selectedEdge:M,onCloseEdge:()=>R(null)},Z?.id)]})}function Z(){return(0,r.jsx)(a.GV,{children:(0,r.jsx)(X,{})})}},41001:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});var r=n(37876);function a({values:e,width:t=72,height:n=22,className:a}){if(e.length<2)return null;let s=Math.min(...e),l=Math.max(...e)-s||1,i=t/(e.length-1),o=e.map((e,t)=>[t*i,n-(e-s)/l*(n-4)-2]),d=o.map((e,t)=>`${0===t?"M":"L"}${e[0].toFixed(1)} ${e[1].toFixed(1)}`).join(" "),c=`${d} L${t} ${n} L0 ${n} Z`,u=o[o.length-1];return(0,r.jsxs)("svg",{viewBox:`0 0 ${t} ${n}`,width:a?void 0:t,height:a?void 0:n,preserveAspectRatio:"none",className:a,"aria-hidden":!0,
1children:[(0,r.jsx)("path",{d:c,fill:"currentColor",opacity:.08}),(0,r.jsx)("path",{d:d,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("circle",{cx:u[0],cy:u[1],r:2,fill:"currentColor"})]})}},45364:(e,t,n)=>{"use strict";function r(e){if(!e)return null;let t=new Date(e).getTime();if(!Number.isFinite(t))return null;let n=Math.floor((Date.now()-t)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;let r=Math.floor(n/60);if(r<24)return`${r}h ago`;let a=Math.floor(r/24);if(a<30)return`${a}d ago`;let s=Math.floor(a/30);return`${s}mo ago`}function a(e){return"number"==typeof e&&Number.isFinite(e)?e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1048576).toFixed(1)} MB`:""}function s(e){let t=e.split(".").pop()?.toLowerCase()??"";return"pdf"===t?"PDF":"doc"===t||"docx"===t?"DOC":"xls"===t||"xlsx"===t||"csv"===t?"XLS":"ppt"===t||"pptx"===t?"PPT":"md"===t||"txt"===t?"TXT":"FILE"}n.d(t,{KW:()=>r,h_:()=>s,z3:()=>a})},50217:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(14232),a=n(4033),s=n(30220);async function l(){let{data:e}=await a.N.auth.getSession(),t=e.session?.access_token;if(!t)throw Error("Missing session token");return t}function i(){let e=(0,s.P9)(),[t,n]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{let t=!0;return(async()=>{try{let r=await l(),a=await fetch("/api/universe/promote",{headers:{Authorization:`Bearer ${r}`,...e?{"x-org-id":e}:{}}}),s=await a.json().catch(()=>({}));t&&a.ok&&Array.isArray(s.promotedIds)&&n(new Set(s.promotedIds.map(String)))}catch{}})(),()=>{t=!1}},[e]);let a=(0,r.useCallback)(async r=>{let a=t.has(r);n(e=>{let t=new Set(e);return a?t.delete(r):t.add(r),t});try{let t=await l();if(!(await fetch("/api/universe/promote",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`,...e?{"x-org-id":e}:{}},body:JSON.stringify({company_id:r,remove:a})})).ok)throw Error("Request failed")}catch{n(e=>{let t=new Set(e);return a?t.add(r):t.delete(r),t})}},[t,e]);return{promoted:t,toggle:a}}},61130:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/universe",function(){return n(36253)}])},91718:(e,t,n)=>{"use strict";n.d(t,{b:()=>u,j:()=>c});var r=n(96851),a=n(14232),s=n(99584),l=n(4033),i=n(45364),o=n(30220);async function d(){let{data:e}=await l.N.auth.getSession(),t=e.session?.access_token;if(!t)throw Error("Missing session token");return t}function c(e,t){let n=Array.isArray(e.sparkline)?e.sparkline.map(e=>Number(e)||0):[],r=n[n.length-1]??0,a=n[n.length-2]??0,s=r>a?"up":r<a?"down":"flat",l=e=>e&&(0,i.KW)(new Date(e).toISOString())||"",o=e=>null!=e&&Date.now()-e<1728e5,d=e.latestSignal,c=null!=e.rank&&e.rank>0;return{id:String(e.id),rank:e.rank??0,tamRank:e.rank??null,name:e.name||(t?t("unknownCompany"):"Unknown company"),type:e.type||"Account",score:"number"==typeof e.score&&Number.isFinite(e.score)?e.score:null,trajectory:s,deltaLabel:r>0?t?t("signalsThisWeek",{count:r}):`${r} signal${1===r?"":"s"} this week`:t?t("quiet"):"quiet",why:e.why||"",latestSignal:d?{when:l(d.ts),text:d.text,fresh:o(d.ts)}:null,latestSignalMs:d?d.ts:null,signals:(e.signals??[]).map(e=>({id:String(e.id),text:e.text,when:l(e.ts),fresh:o(e.ts),src:e.src||"",url:e.url||null,observedAt:e.ts??null,expirationDate:e.expirationDate??null})),sparkline:n,leadsCount:0,leadNames:[],headcount:e.headcount??null,industry:e.industry??null,region:e.region??null,stage:e.stage??null,description:("string"==typeof e.description?e.description:"")||("string"==typeof e.attributes?.description?e.attributes?.description:"")||"",attributes:e.attributes??{},hasDecision:c,isInHomeQueue:e.isInHomeQueue,confirmation:e.confirmation??null,decisionStatus:e.decisionStatus??"none"}}function u(e=!1,t){let{user:n}=(0,s.A)(),l=(0,r.c)("common"),i=(0,o.P9)(),[p,f]=(0,a.useState)([]),[x,m]=(0,a.useState)([]),[g,h]=(0,a.useState)([]),[b,y]=(0,a.useState)(0),[v,w]=(0,a.useState)(!1),[j,k]=(0,a.useState)(!0),[N,S]=(0,a.useState)(null),[C,A]=(0,a.useState)(0),[E,_]=(0,a.useState)({}),[$,F]=(0,a.useState)("rank"),L=(0,a.useCallback)(()=>A(e=>e+1),[]);return(0,a.useEffect)(()=>
1{if(!n?.id)return void k(!1);let r=!0;return(async()=>{k(!0),S(null);try{let n=await d(),a=new URLSearchParams;e&&a.set("view","graph"),t&&a.set("entity_type",t);let s=a.toString(),o=`/api/universe/feed${s?`?${s}`:""}`,u=await fetch(o,{headers:{Authorization:`Bearer ${n}`,...i?{"x-org-id":i}:{}}}),p=await u.json().catch(()=>({}));if(!u.ok)throw Error(p?.error||`Request failed (${u.status})`);if(!r)return;let x=Array.isArray(p.entities)?p.entities:[],g=x.map(e=>c(e,l));e?m(g):f(g),h(Array.isArray(p.edges)?p.edges:[]),y("number"==typeof p.total?p.total:x.length),w(!!p.hasMore),p.entityTypes&&"object"==typeof p.entityTypes&&_(p.entityTypes),"string"==typeof p.sortMode&&F(p.sortMode)}catch(e){r&&S(e instanceof Error?e.message:"Failed to load entities")}finally{r&&k(!1)}})(),()=>{r=!1}},[n?.id,C,i,e,t]),(0,a.useEffect)(()=>{_({})},[i]),{entities:e?x:p,edges:g,total:b,hasMore:v,loading:j,error:N,refetch:L,entityTypes:E,sortMode:$}}}},e=>{e.O(0,[8638,2395,220,7168,636,6593,8792],()=>e(e.s=61130)),_N_E=e.O()}]);

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.