1import{c as J,f as W,u as Y,x as Z,j as e,B,z as H,aF as O,h as ee,o as D,l as se,aX as te,aY as ie,r as U,v as re,aT as oe,as as ae,ai as ne,A as le,al as K,a4 as L,a5 as Q,U as T,aM as ce,C as de,G as y,F as me,H as he,$ as R,E as A,T as u,I as S,X as w,D as pe,ap as ue,a7 as xe,az as F}from"./index-dE8a1mPK.js";import{E as ge}from"./ErrorState-gVNyx0--.js";import{u as ve}from"./useConfirm-4D74KrCi.js";import{I as fe}from"./IconArrowLeft-cAVPTBNq.js";import{I as V}from"./IconExternalLink-DcQXcLz7.js";import{I as je}from"./IconUserOff-CVzBARaR.js";import{I as ye}from"./IconAt-o0rM45xa.js";import{I as be}from"./IconMessage-ByV_OeXR.js";import{I as X}from"./IconSend-D-OEBegQ.js";import"./IconCopy-B63sUmw8.js";import"./Code-YtMEZkZ5.js";const[ke,ze]=J("Timeline component was not found in tree");var E={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const _e={},P=W((t,m)=>{const i=Y("TimelineItem",_e,t),{classNames:n,className:o,style:l,styles:v,vars:x,__active:h,__align:g,__lineActive:r,__vars:c,bullet:s,radius:f,color:a,lineVariant:M,children:k,title:z,mod:N,...C}=i,d=ze(),j=Z(),p={classNames:n,styles:v};return e.jsxs(B,{...d.getStyles("item",{...p,className:o,style:l}),mod:[{"line-active":r,active:h},N],ref:m,__vars:{"--tli-radius":f?O(f):void 0,"--tli-color":a?H(a,j):void 0,"--tli-border-style":M||void 0},...C,children:[e.jsx(B,{...d.getStyles("itemBullet",p),mod:{"with-child":!!s,align:g,active:h},children:s}),e.jsxs("div",{...d.getStyles("itemBody",p),children:[z&&e.jsx("div",{...d.getStyles("itemTitle",p),children:z}),e.jsx("div",{...d.getStyles("itemContent",p),children:k})]})]})});P.classes=E;P.displayName="@mantine/core/TimelineItem";const Ce={active:-1,align:"left",reverseActive:!1},Ie=se((t,{bulletSize:m,lineWidth:i,radius:n,color:o,autoContrast:l})=>({root:{"--tl-bullet-size":U(m),"--tl-line-width":U(i),"--tl-radius":n===void 0?void 0:O(n),"--tl-color":o?H(o,t):void 0,"--tl-icon-color":te(l,t)?ie({color:o,theme:t,autoContrast:l}):void 0}})),b=W((t,m)=>{const i=Y("Timeline",Ce,t),{classNames:n,className:o,style:l,styles:v,unstyled:x,vars:h,children:g,active:r,color:c,radius:s,bulletSize:f,align:a,lineWidth:M,reverseActive:k,mod:z,autoContrast:N,...C}=i,d=ee({name:"Timeline",classes:E,props:i,className:o,style:l,classNames:n,styles:v,unstyled:x,vars:h,varsResolver:Ie}),j=D.Children.toArray(g),p=j.map((I,_)=>{var $,q;return D.cloneElement(I,{unstyled:x,__align:a,__active:(($=I.props)==null?void 0:$.active)||(k?r>=j.length-_-1:r>=_),__lineActive:((q=I.props)==null?void 0:q.lineActive)||(k?r>=j.length-_-1:r-1>=_)})});return e.jsx(ke,{value:{getStyles:d},children:e.jsx(B,{...d("root"),mod:[{align:a},z],ref:m,...C,children:p})})});b.classes=E;b.displayName="@mantine/core/Timeline";b.Item=P;/** 2 * @license @tabler/icons-react v3.43.0 - MIT 3 * 4 * This source code is licensed under the MIT license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Te=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],Ae=re("outline","user-check","UserCheck",Te);function G(t){return t?new Date(t).toLocaleString():"â"}const Se={"send-dm-sent":{color:"blue",label:"DM sent",icon:e.jsx(X,{size:14})},"send-dm-failed":{color:"red",label:"DM failed",icon:e.jsx(X,{size:14})},"reply-from-them":{color:"cyan",label:"They replied",icon:e.jsx(be,{size:14})},"mention-from-them":{color:"teal",label:"They mentioned",icon:e.jsx(ye,{size:14})},"trigger-fired":{color:"violet",label:"Trigger fired",icon:e.jsx(F,{size:14})},"trigger-skipped":{color:"gray",label:"Trigger skipped",icon:e.jsx(F,{size:14})}};function Le(){const{handle:t}=oe(),m=ae(),i=ne(),{confirm:n,ConfirmDialog:o}=ve(),{data:l,isLoading:v,error:x}=le({queryKey:["prospect",t],queryFn:()=>T.getProspect(t)}),h=K({mutationFn:()=>T.addBlocklist({handle:t,note:"Added from prospect page"}),onSuccess:()=>{Q(`@${t} added to blocklist`),i.invalidateQueries({queryKey:["prospect",t]}),i.invalidateQueries({queryKey:["blocklist"]})},onError:s=>L(s)}),g=K({mutationFn:()=>T.removeBlocklist(t),onSuccess:()=>{Q(`@${t} removed from blocklist`),i.invalidateQueries({queryKey:["prospect",t]}),i.invalidateQueries({queryKey:["blocklist"]})},onError:s=>L(s)});if(v)return e.jsx(ce,{});if(x)return e.jsx(ge,{error:x,onRetry:()=>i.invalidateQueries({queryKey:["prospect",t]})});const{events:r=[],summary:c={}}=l||{};return e.jsxs(de,{gap:"lg",children:[e.jsxs(y,{justify:"space-between",wrap:"wrap",children:[e.jsxs(y,{gap:10,children:[e.jsx(me,{variant:"subtle",onClick:()=>m(-1),"aria-label":"Back",children:e.jsx(fe,{size:16})}),e.jsx(he,{radius:"xl",size:"md",children:t.slice(0,1).toUpperCase()}),e.jsxs("div",{children:[e.jsxs(R,{order:2,children:["@",t]}
6),e.jsxs(y,{gap:6,mt:4,children:[c.blocklisted&&e.jsx(A,{color:"red",variant:"filled",size:"sm",children:"blocklisted"}),e.jsxs(A,{variant:"light",size:"sm",children:[c.sentCount||0," sent"]}),e.jsxs(A,{variant:"light",size:"sm",color:"cyan",children:[c.receivedCount||0," received"]}),c.lastEventAt&&e.jsxs(u,{size:"xs",c:"dimmed",children:["last: ",G(c.lastEventAt)]})]})]})]}),e.jsxs(y,{gap:6,wrap:"nowrap",children:[e.jsx(S,{href:`https://x.com/${t}`,target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:e.jsx(w,{variant:"default",leftSection:e.jsx(V,{size:14}),children:"View on X"})}),c.blocklisted?e.jsx(w,{color:"green",variant:"light",leftSection:e.jsx(Ae,{size:14}),onClick:()=>g.mutate(),loading:g.isPending,children:"Unblock"}):e.jsx(w,{color:"red",variant:"light",leftSection:e.jsx(je,{size:14}),onClick:async()=>{await n({title:`Block @${t}?`,body:"No campaign or trigger will ever DM them again. You can unblock from this page anytime.",confirmLabel:"Block"})&&h.mutate()},loading:h.isPending,children:"Block"})]})]}),e.jsxs(pe,{withBorder:!0,padding:"md",children:[e.jsxs(R,{order:4,mb:"sm",children:["Timeline (",r.length,")"]}),r.length===0?e.jsx(ue,{py:"xl",children:e.jsx(u,{c:"dimmed",children:"No history with this handle yet."})}):e.jsx(b,{active:-1,bulletSize:20,lineWidth:2,children:r.map((s,f)=>{const a=Se[s.kind]||{color:"gray",label:s.kind,icon:null};return e.jsxs(b.Item,{bullet:a.icon,color:a.color,title:e.jsxs(y,{gap:6,children:[e.jsx(u,{size:"sm",fw:500,children:a.label}),e.jsx(u,{size:"xs",c:"dimmed",children:G(s.ts)}),s.tweetUrl&&e.jsx(S,{href:s.tweetUrl,target:"_blank",rel:"noreferrer",children:e.jsx(V,{size:12})})]}),children:[s.text&&e.jsx(u,{size:"sm",c:"dimmed",mt:2,lineClamp:3,children:s.text}),s.error&&e.jsx(u,{size:"xs",c:"red",mt:2,children:s.error}),s.reason&&!s.text&&e.jsx(u,{size:"xs",c:"dimmed",mt:2,children:s.reason}),s.campaignId&&e.jsx(S,{component:xe,to:`/campaigns/${s.campaignId}`,size:"xs",mt:2,inline:!0,children:"view campaign"})]},s.id||`${s.ts}-${s.kind}-${f}`)})})]}),e.jsx(o,{})]})}export{Le 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.