PageSourceSearch

https://tranchi.ai/assets/cDjfvoBXy.js

js tranchi.ai collected 2026-10-05 13:07:46 UTC 31,120 bytes, 8 lines download raw bytes

1import{j as e}from"./cCu9EUtGE.js";import{r as o}from"./cCaBsG04v.js";import{t as S,c as i,A as oe,X as xe,B as g,q as E,Y as pe,Z as ie,T as le,u as ue,b as he,y as ge,aX as ye,aw as ce,S as fe,U as re,I as Be,M as je,i as be,D as Ne,e as ve,f as we,g as Ce,aG as Me}from"./main-ChIfZBRY.js";import{D as ke}from"./cDcO16ZdD.js";import{u as Se,d as ne,B as De,a as de}from"./cBr-Mh5Li.js";import{d as Pe}from"./cDjfy5RN-.js";import{M as me,F as Ae}from"./cBXy-p8q6.js";import{G as Ie}from"./cCnU0qtxA.js";import{O as Fe}from"./cD7HCpP96.js";import{I as f}from"./cBWgbmwzJ.js";import{L as B}from"./cCxalnfsl.js";import{U as Te}from"./cDK-0l6Vs.js";import{P as Re}from"./cCAkJpFr9.js";import{T as Le}from"./cCzHoj30o.js";import"./cmI-Al9UM.js";const Ee="Selected buyers have no phone numbers to reach.",k=25;function Oe(r,D){const u=D==null?void 0:r.find(h=>h.poolBuyerId===D&&h.hasPhone);return u?[u.id]:r.filter(h=>h.hasPhone).slice(0,k).map(h=>h.id)}function ze(r){return r==="hot"?{label:"Hot",cls:"bg-red-100 text-red-700",Icon:Ae}:r==="warm"?{label:"Warm",cls:"bg-amber-100 text-amber-700",Icon:le}:{label:r||"Cold",cls:"bg-gray-100 text-gray-500",Icon:le}}function Ue({onClose:r,initialAddress:D="",initialPrice:u=null,initialPoolBuyerId:h=null}){const[N,j]=o.useState(D),[G,V]=o.useState(u!=null?String(u):""),[v,T]=o.useState(!!D.trim()),[x,b]=o.useState(new Set),[a,c]=o.useState(""),w=Number(G.replace(/[^0-9.]/g,""))||0,m=S.wholesale.previewListBuyers.useQuery({propertyAddress:N,price:w},{enabled:v&&N.trim().length>0,refetchOnWindowFocus:!1});o.useEffect(()=>{m.data&&(c(m.data.defaultMessage),b(new Set(Oe(m.data.buyers,h))))},[m.data,h]);const P=Se(v),[y,Q]=o.useState(null),O=S.wholesale.blastListDeal.useMutation({onSuccess:t=>{if(t.simulated){i.success(ke),r();return}if(t.totalNotSent===0){i.success(t.message),r();return}(t.totalSent===0?i.error:i.warning)(t.message,{description:Pe(t.reasonCounts),duration:8e3}),Q({totalSent:t.totalSent,totalNotSent:t.totalNotSent,outcomes:t.outcomes})},onError:t=>{if(t.message!==Ee){i.error(t.message);return}i.error(ne(P.data),A.length>0?{action:{label:"Select reachable only",onClick:I}}:void 0)}}),d=m.data?.buyers??[],A=d.filter(t=>t.hasPhone),I=()=>b(new Set(A.slice(0,k).map(t=>t.id))),R=x.size>=k,z=t=>b(F=>{const p=new Set(F);return p.has(t)?p.delete(t):p.size<k&&p.add(t),p}),q=I,H=()=>b(new Set);return y?e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:101",className:"fixed inset-0 z-[120] flex items-end sm:items-center justify-center bg-black/40 p-0 sm:p-4",onClick:r,children:e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:102",className:"w-full max-w-md overflow-hidden rounded-t-2xl bg-white sm:rounded-2xl",onClick:t=>t.stopPropagation(),children:e.jsx(De,{"data-loc":"client/src/components/BlastDealModal.tsx:103",...y,onDone:r})})}):e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:110",className:"fixed inset-0 z-[120] flex items-end sm:items-center justify-center bg-black/40 p-0 sm:p-4",onClick:r,children:e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:111",className:"flex max-h-[92dvh] w-full max-w-2xl flex-col overflow-hidden rounded-t-2xl bg-white sm:rounded-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:116",className:"flex items-start justify-between border-b border-gray-100 p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:117",className:"flex items-center gap-2",children:[v&&e.jsx("button",{"data-loc":"client/src/components/BlastDealModal.tsx:119",onClick:()=>T(!1),className:"rounded-full p-1 text-gray-400 hover:bg-gray-100",children:e.jsx(oe,{"data-loc":"client/src/components/BlastDealModal.tsx:120",className:"h-4 w-4"})}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:123",children:[e.jsx("h2",{"data-loc":"client/src/components/BlastDealModal.tsx:124",className:"text-lg font-bold",style:{color:"var(--text-primary)"},children:"Blast a deal to your buyers"}),e.jsx("p",{"data-loc":"client/src/components/BlastDealModal.tsx:125",className:"mt-0.5 text-xs text-gray-500",children:v?`${N}${w>
10?` · asking $${w.toLocaleString("en-US")}`:""}${m.data?` · ${m.data.totalMatched} buyers ranked`:""}`:"Enter the deal and we'll match it to your top buyers."})]})]}),e.jsx("button",{"data-loc":"client/src/components/BlastDealModal.tsx:132",onClick:r,className:"rounded-full p-1 text-gray-400 hover:bg-gray-100",children:e.jsx(xe,{"data-loc":"client/src/components/BlastDealModal.tsx:132",className:"h-5 w-5"})})]}),v?e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:169",className:"border-b border-gray-100 p-4",children:[e.jsx("label",{"data-loc":"client/src/components/BlastDealModal.tsx:170",className:"text-xs font-semibold text-gray-500",children:"Message buyers will receive"}),e.jsx("textarea",{"data-loc":"client/src/components/BlastDealModal.tsx:171",value:a,onChange:t=>c(t.target.value),rows:4,className:"mt-1.5 w-full resize-none rounded-lg border border-gray-200 p-2.5 text-sm focus:border-[#C9A84C] focus:outline-none"})]}),e.jsx(de,{"data-loc":"client/src/components/BlastDealModal.tsx:179",enabled:v,className:"mx-4 mt-2"}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:181",className:"flex items-center justify-between px-4 py-2 text-xs",children:[e.jsxs("span",{"data-loc":"client/src/components/BlastDealModal.tsx:182",className:"font-semibold text-gray-600",children:[x.size,"/",k," selected · ",A.length," reachable"]}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:185",className:"flex gap-2",children:[e.jsxs("button",{"data-loc":"client/src/components/BlastDealModal.tsx:186",onClick:q,className:"text-[#C9A84C] hover:underline",children:["Top ",k]}),e.jsx("button",{"data-loc":"client/src/components/BlastDealModal.tsx:187",onClick:H,className:"text-gray-400 hover:underline",children:"Clear"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:191",className:"min-h-[120px] flex-1 overflow-y-auto px-2 pb-2",children:[m.isLoading?e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:193",className:"flex items-center justify-center py-10",children:e.jsx(E,{"data-loc":"client/src/components/BlastDealModal.tsx:193",className:"h-5 w-5 animate-spin text-[#C9A84C]"})}):d.length===0?e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:195",className:"px-2 py-8 text-center text-sm text-gray-500",children:["No matching buyers on your list yet. Unlock buyers for this market, then refresh the matches.",e.jsx("button",{"data-loc":"client/src/components/BlastDealModal.tsx:197",type:"button",disabled:m.isFetching,onClick:()=>{m.refetch()},className:"ml-1 font-semibold text-[#C9A84C] underline disabled:opacity-50",children:"Refresh matches"})]}):d.map(t=>{const F=ze(t.activityTier),p=x.has(t.id),U=!t.hasPhone||R&&!p;return e.jsxs("button",{"data-loc":"client/src/components/BlastDealModal.tsx:207",disabled:U,title:t.hasPhone?R&&!p?`A blast is capped at ${k} buyers. Deselect one to add this buyer.`:void 0:"No phone number on file for this buyer, so a text cannot be sent",onClick:()=>t.hasPhone&&z(t.id),className:`mb-1.5 flex w-full items-start gap-3 rounded-lg border p-2.5 text-left transition-colors ${p?"border-[#C9A84C] bg-[#C9A84C]/5":"border-gray-100"} ${U?"opacity-50":"hover:border-[#C9A84C]/40"}`,children:[e.jsx("span",{"data-loc":"client/src/components/BlastDealModal.tsx:216",className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${p?"border-[#C9A84C] bg-[#C9A84C] text-white":"border-gray-300"}`,children:p&&e.jsx(pe,{"data-loc":"client/src/components/BlastDealModal.tsx:217",className:"h-3.5 w-3.5"})}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:219",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:220",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/BlastDealModal.tsx:221",className:"truncate text-sm font-semibold text-gray-900",children:t.name}),e.jsx("span",{"data-loc":"client/src/components/BlastDealModal.tsx:222",className:`shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${F.cls}`,children:F.label}),!t.hasPhone&&e.jsx("span",{"data-loc":"client/src/components/BlastDealModal.tsx:223",className:"text-[10px] text-gray-400",children:"(no phone)"})]}),e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:225",className:"mt-0.5 truncate text-xs text-gray-500",children:t.reasons.join(" · ")})]}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:227",className:"shrink-0 text-right",children:[e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:228",className:"text-sm font-bold",style:{color:"var(--navy-primary)"},children:t.matchScore}),e.jsx("div",{"data-loc":"client/src/components/BlastDealModal.tsx:229",className:"text-[9px] uppercase tracking-wide text-gray-400",children:"match"})]})]},t.id)}),d.length>0&&A.length===0&&e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:236",className:"mx-2 my-2 rounded-lg bg-amber-50 p-3 text-center text-xs text-amber-900",children:[ne(P.data),e.jsx("button",{"data-loc":"client/src/components/BlastDealModal.tsx:238",type:"button",disabled:m.isFetching,onClick:()=>{m.refetch()},className:"ml-1 font-semibold underline disabled:opacity-50",children:"Refresh"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:245",className:"border-t border-gray-100 p-4",children:[e.jsxs(g,{"data-loc":"client/src/components/BlastDealModal.tsx:246",className:"w-full gap-2 bg-[#C9A84C] text-white hover:bg-[#b8963f]",disabled:x.size===0||O.isPending||!a.trim(),title:x.size===0?"Select at least one buyer to blast":a.trim()?void 0:"Write a message to blast",onClick:()=>O.mutate({propertyAddress:N,price:w,buyerIds:Array.from(x),customMessage:a}),children:[O.isPending?e.jsx(E,{"data-loc":"client/src/components/BlastDealModal.tsx:252",className:"h-4 w-4 animate-spin"}):e.jsx(ie,{"data-loc":"client/src/components/BlastDealModal.tsx:252",className:"h-4 w-4"}),"Blast to ",x.size," buyer",x.size===1?"":"s"," via iMessage"]}),e.jsxs("p",{"data-loc":"client/src/components/BlastDealModal.tsx:255",className:"mt-2 text-center text-[11px] text-gray-400",children:["Capped at ",k," per blast to protect your sending number."]})]})]}):e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:137",className:"space-y-4 p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:138",children:[e.jsx("label",{"data-loc":"client/src/components/BlastDealModal.tsx:139",className:"text-xs font-semibold text-gray-500",children:"Property address"}),e.jsx("input",{"data-loc":"client/src/components/BlastDealModal.tsx:140",value:N,onChange:t=>j(t.target.value),placeholder:"123 Main St, Cleveland, OH 44102",className:"mt-1.5 w-full rounded-lg border border-gray-200 p-2.5 text-sm focus:border-[#C9A84C] focus:outline-none",autoFocus:!0})]}),e.jsxs("div",{"data-loc":"client/src/components/BlastDealModal.tsx:148",children:[e.jsx("label",{"data-loc":"client/src/components/BlastDealModal.tsx:149",className:"text-xs font-semibold text-gray-500",children:"Asking price"}),e.jsx("input",{"data-loc":"client/src/components/BlastDealModal.tsx:150",value:G,onChange:t=>V(t.target.value),inputMode:"numeric",placeholder:"$85,000",className:"mt-1.5 w-full rounded-lg border border-gray-200 p-2.5 text-sm focus:border-[#C9A84C] focus:outline-none"})]}),e.jsxs(g,{"data-loc":"client/src/components/BlastDealModal.tsx:158",className:"w-full gap-2 bg-[#C9A84C] text-white hover:bg-[#b8963f]",disabled:!N.trim(),onClick:()=>T(!0),children:[e.jsx(me,{"data-loc":"client/src/components/BlastDealModal.tsx:163",className:"h-4 w-4"})," Find my top buyers"]})]})]})})}
1const _={name:"",email:"",phone:"",companyName:"",markets:"",maxPrice:"",minPrice:"",propertyTypes:"",minROI:"",prefersCashFlow:!0,prefersFixAndFlip:!1,notes:""},K=()=>new URLSearchParams(typeof window>"u"?"":window.location.search);function ts(){ue("Cash Buyers - Tranchi AI");const{isAuthenticated:r,loading:D}=he(),[u]=o.useState(()=>{const s=K(),n=s.get("blastAddress")?.trim()??"",C=Number(s.get("blastPrice")),$=Number(s.get("blastPoolBuyerId"));return n&&Number.isFinite(C)&&C>0?{address:n,price:C,poolBuyerId:Number.isInteger($)&&$>0?$:null}:null}),[h]=o.useState(()=>K().has("buyer_unlock_whop")),[N,j]=o.useState(!1),[G,V]=o.useState(!1),[v,T]=o.useState(()=>{const s=K();return s.has("blastAddress")&&!s.has("buyer_unlock_whop")}),[x,b]=o.useState(null),[a,c]=o.useState(_),[w,m]=o.useState(""),P=o.useRef(null),{data:y,isLoading:Q,isError:O,refetch:d}=S.cashBuyers.list.useQuery(void 0,{enabled:r});o.useEffect(()=>{if(!u||!h)return;const s=()=>{d(),T(!0)};return window.addEventListener("buyer-unlock-ready",s),()=>window.removeEventListener("buyer-unlock-ready",s)},[u,h,d]);const{data:A}=S.cashBuyers.contactBackfillProgress.useQuery(void 0,{enabled:r,refetchInterval:s=>(s.state.data?.pending??0)>0?3e4:!1}),I=A?.pending??0;o.useEffect(()=>{I>0&&d()},[A?.withContact,I,d]);const R=S.cashBuyers.add.useMutation({onSuccess:()=>{i.success("Buyer added!"),j(!1),c(_),d()},onError:s=>i.error(s.message)}),z=S.cashBuyers.update.useMutation({onSuccess:()=>{i.success("Buyer updated!"),j(!1),b(null),c(_),d()},onError:s=>i.error(s.message)}),q=S.cashBuyers.delete.useMutation({onSuccess:()=>{i.success("Buyer removed."),d()},onError:s=>i.error(s.message)}),H=S.cashBuyers.importBuyers.useMutation({onSuccess:s=>{i.success(`Imported ${s.imported} buyers!`),d()},onError:s=>i.error(s.message)}),t=()=>{const s={name:a.name,email:a.email||void 0,phone:a.phone||void 0,companyName:a.companyName||void 0,markets:a.markets?a.markets.split(",").map(n=>n.trim()).filter(Boolean):void 0,maxPrice:a.maxPrice?Number(a.maxPrice):void 0,minPrice:a.minPrice?Number(a.minPrice):void 0,propertyTypes:a.propertyTypes?a.propertyTypes.split(",").map(n=>n.trim()).filter(Boolean):void 0,minROI:a.minROI?Number(a.minROI):void 0,prefersCashFlow:a.prefersCashFlow,prefersFixAndFlip:a.prefersFixAndFlip,notes:a.notes||void 0};x?z.mutate({id:x,...s}):R.mutate(s)},F=s=>{b(s.id),c({name:s.name||"",email:s.email||"",phone:s.phone||"",companyName:s.companyName||"",markets:(s.markets||[]).join(", "),maxPrice:s.maxPrice?String(Number(s.maxPrice)):"",minPrice:s.minPrice?String(Number(s.minPrice)):"",propertyTypes:(s.propertyTypes||[]).join(", "),minROI:s.minROI?String(Number(s.minROI)):"",prefersCashFlow:s.prefersCashFlow===1,prefersFixAndFlip:s.prefersFixAndFlip===1,notes:s.notes||""}),j(!0)},p=s=>{const n=s.target.files?.[0];if(!n)return;const C=new FileReader;C.onload=$=>{const W=($.target?.result).split(`
2`).filter(l=>l.trim());if(W.length<2){i.error("CSV must have a header row and at least one data row.");return}const L=W[0].split(",").map(l=>l.trim().toLowerCase()),Z=L.findIndex(l=>l.includes("name")),ee=L.findIndex(l=>l.includes("email")),se=L.findIndex(l=>l.includes("phone")),ae=L.findIndex(l=>l.includes("company")),X=L.findIndex(l=>l.includes("market")),Y=L.findIndex(l=>l.includes("max")&&l.includes("price"));if(Z===-1){i.error("CSV must have a 'name' column.");return}const te=W.slice(1).map(l=>{const M=l.split(",").map(J=>J.trim());return{name:M[Z]||"Unknown",email:ee>=0?M[ee]:void 0,phone:se>=0?M[se]:void 0,companyName:ae>=0?M[ae]:void 0,markets:X>=0&&M[X]?M[X].split(";").map(J=>J.trim()):void 0,maxPrice:Y>=0&&M[Y]?Number(M[Y].replace(/[^0-9.]/g,"")):void 0}}).filter(l=>l.name&&l.name!=="Unknown");if(te.length===0){i.error("No valid buyers found in CSV.");return}H.mutate({buyers:te})},C.readAsText(n),P.current&&(P.current.value="")},U=(y||[]).filter(s=>{if(!w)return!0;const n=w.toLowerCase();return s.name.toLowerCase().includes(n)||(s.email||"").toLowerCase().includes(n)||(s.phone||"").includes(n)||(s.companyName||"").toLowerCase().includes(n)||(s.markets||[]).some(C=>C.toLowerCase().includes(n))});return!D&&!r?e.jsx(Fe,{"data-loc":"client/src/pages/Buyers.tsx:250",title:"Unlock Cash Buyers",description:"Book a strategy call to become a Tranchi Operator and manage your buyer list."}):e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:258",className:"min-h-screen",style:{backgroundColor:"var(--bg-white)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:259",className:"max-w-5xl mx-auto px-4 pt-24 md:pt-28 pb-12",children:[e.jsxs(ge,{"data-loc":"client/src/pages/Buyers.tsx:261",href:"/properties/on-market",className:"inline-flex items-center gap-1.5 text-sm text-gray-500 hover:text-gray-900 transition-colors mb-6",children:[e.jsx(oe,{"data-loc":"client/src/pages/Buyers.tsx:265",className:"h-4 w-4"}),"Back to Deals"]}
2),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:270",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:271",children:[e.jsx("h1",{"data-loc":"client/src/pages/Buyers.tsx:272",className:"text-3xl font-bold tracking-tight",style:{color:"var(--text-primary)"},children:"Cash Buyers"}),e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:275",className:"text-sm text-gray-500 mt-1",children:"Manage your buyer list. Tranchi matches deals to buyers and blasts them automatically."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:279",className:"flex gap-2",children:[e.jsx("input",{"data-loc":"client/src/pages/Buyers.tsx:280",ref:P,type:"file",accept:".csv",className:"hidden",onChange:p}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:287",variant:"outline",size:"sm",onClick:()=>P.current?.click(),className:"gap-1.5",children:[e.jsx(Te,{"data-loc":"client/src/pages/Buyers.tsx:293",className:"h-3.5 w-3.5"}),"Import CSV"]}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:296",size:"sm",onClick:()=>T(!0),disabled:!y||y.length===0,className:"gap-1.5 text-white shadow-md",style:{background:"var(--navy-primary, #1a2b4a)"},children:[e.jsx(me,{"data-loc":"client/src/pages/Buyers.tsx:303",className:"h-3.5 w-3.5"}),"Blast a Deal"]}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:306",size:"sm",onClick:()=>V(!0),className:"gap-1.5 text-white shadow-md relative overflow-hidden",style:{background:"linear-gradient(135deg, #C9A84C 0%, #E8C547 50%, #C9A84C 100%)",backgroundSize:"200% 200%",animation:"goldShimmer 2.5s ease-in-out infinite"},children:[e.jsx(ye,{"data-loc":"client/src/pages/Buyers.tsx:316",className:"h-3.5 w-3.5"}),"Get Cash Buyers"]}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:319",size:"sm",variant:"outline",onClick:()=>{b(null),c(_),j(!0)},className:"gap-1.5",children:[e.jsx(ce,{"data-loc":"client/src/pages/Buyers.tsx:325",className:"h-3.5 w-3.5"}),"Add Buyer"]})]})]}),e.jsx(de,{"data-loc":"client/src/pages/Buyers.tsx:331",enabled:r,className:"mb-4"}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:334",className:"relative mb-4",children:[e.jsx(fe,{"data-loc":"client/src/pages/Buyers.tsx:335",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:336",placeholder:"Search buyers by name, email, phone, or market...",value:w,onChange:s=>m(s.target.value),className:"pl-10"})]}),Q?e.jsx("div",{"data-loc":"client/src/pages/Buyers.tsx:346",className:"flex items-center justify-center py-16",children:e.jsx(E,{"data-loc":"client/src/pages/Buyers.tsx:347",className:"h-6 w-6 animate-spin text-[#C9A84C]"})}):O?e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:350",className:"rounded-xl border border-dashed border-gray-200 p-12 text-center",children:[e.jsx(re,{"data-loc":"client/src/pages/Buyers.tsx:351",className:"h-12 w-12 text-gray-300 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:352",className:"font-medium text-gray-600",children:"Couldn't load your buyers"}),e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:353",className:"text-sm text-gray-400 mt-1 max-w-sm mx-auto",children:"Something went wrong. Your buyer list is safe."}),e.jsx(g,{"data-loc":"client/src/pages/Buyers.tsx:356",size:"sm",onClick:()=>d(),className:"mt-4 gap-1.5 bg-[#C9A84C] hover:bg-[#b8963f] text-white",children:"Try Again"})]}):U.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:365",className:"rounded-xl border border-dashed border-gray-200 p-12 text-center",children:[e.jsx(re,{"data-loc":"client/src/pages/Buyers.tsx:366",className:"h-12 w-12 text-gray-300 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:367",className:"font-medium text-gray-600",children:"No cash buyers yet"}),e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:368",className:"text-sm text-gray-400 mt-1 max-w-sm mx-auto",children:"Add buyers manually or import a CSV. When you lock up a deal, Tranchi will blast it to matching buyers."}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:371",size:"sm",onClick:()=>{b(null),c(_),j(!0)},className:"mt-4 gap-1.5 bg-[#C9A84C] hover:bg-[#b8963f] text-white",children:[e.jsx(ce,{"data-loc":"client/src/pages/Buyers.tsx:376",className:"h-3.5 w-3.5"}),"Add Your First Buyer"]})]}):e.jsx("div",{"data-loc":"client/src/pages/Buyers.tsx:381",className:"space-y-2",children:U.map(s=>e.jsx("div",{"data-loc":"client/src/pages/Buyers.tsx:383",className:"rounded-lg border border-gray-100 p-4 hover:border-[#C9A84C]/30 hover:bg-amber-50/20 transition-all group",children:e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:387",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:388",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:389",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Buyers.tsx:390",className:"font-semibold text-gray-900 text-sm",children:s.name}),s.companyName&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:392",className:"text-xs text-gray-400",children:["(",s.companyName,")"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:395",className:"flex flex-wrap items-center gap-3 mt-1.5 text-xs text-gray-500",children:[s.phone&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:397",className:"flex items-center gap-1",children:[e.jsx(ie,{"data-loc":"client/src/pages/Buyers.tsx:398",className:"h-3 w-3"})," ",s.phone]}),!s.phone&&!s.email&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:402",className:"flex items-center gap-1 text-amber-600",children:[e.jsx(E,{"data-loc":"client/src/pages/Buyers.tsx:403",className:"h-3 w-3 animate-spin"})," finding contact…"]}),s.email&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:407",className:"flex items-center gap-1",children:[e.jsx(Be,{"data-loc":"client/src/pages/Buyers.tsx:408",className:"h-3 w-3"})," ",s.email]}),s.markets&&s.markets.length>0&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:412",className:"flex items-center gap-1",children:[e.jsx(je,{"data-loc":"client/src/pages/Buyers.tsx:413",className:"h-3 w-3"}
2)," ",s.markets.join(", ")]}),s.maxPrice&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:417",className:"flex items-center gap-1",children:[e.jsx(be,{"data-loc":"client/src/pages/Buyers.tsx:418",className:"h-3 w-3"})," Up to $",Number(s.maxPrice).toLocaleString("en-US")]})]}),s.notes&&e.jsx("p",{"data-loc":"client/src/pages/Buyers.tsx:423",className:"text-xs text-gray-400 mt-1 line-clamp-1",children:s.notes})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:426",className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(g,{"data-loc":"client/src/pages/Buyers.tsx:427",variant:"ghost",size:"sm",onClick:()=>F(s),className:"h-7 w-7 p-0",children:e.jsx(Re,{"data-loc":"client/src/pages/Buyers.tsx:433",className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx(g,{"data-loc":"client/src/pages/Buyers.tsx:435",variant:"ghost",size:"sm",onClick:()=>{confirm("Remove this buyer from your list?")&&q.mutate({id:s.id})},className:"h-7 w-7 p-0",children:e.jsx(Le,{"data-loc":"client/src/pages/Buyers.tsx:445",className:"h-3.5 w-3.5 text-red-400"})})]})]})},s.id))}),y&&y.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:456",className:"mt-6 flex items-center gap-4 text-xs text-gray-400",children:[e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:457",children:[y.length," total buyers"]}),e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:458",children:[y.filter(s=>s.phone).length," with phone"]}),e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:459",children:[y.filter(s=>s.email).length," with email"]}),I>0&&e.jsxs("span",{"data-loc":"client/src/pages/Buyers.tsx:461",className:"flex items-center gap-1 text-amber-600",children:[e.jsx(E,{"data-loc":"client/src/pages/Buyers.tsx:462",className:"h-3 w-3 animate-spin"}),I.toLocaleString("en-US")," looking up contact"]})]})]}),e.jsx(Ne,{"data-loc":"client/src/pages/Buyers.tsx:471",open:N,onOpenChange:j,children:e.jsxs(ve,{"data-loc":"client/src/pages/Buyers.tsx:472",className:"max-w-lg max-h-[85dvh] overflow-y-auto",children:[e.jsx(we,{"data-loc":"client/src/pages/Buyers.tsx:473",children:e.jsx(Ce,{"data-loc":"client/src/pages/Buyers.tsx:474",children:x?"Edit Buyer":"Add Cash Buyer"})}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:476",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:477",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:478",className:"text-xs font-medium",children:"Name *"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:479",value:a.name,onChange:s=>c({...a,name:s.target.value}),placeholder:"John Smith"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:485",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:486",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:487",className:"text-xs font-medium",children:"Phone"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:488",value:a.phone,onChange:s=>c({...a,phone:s.target.value}),placeholder:"+1 555-123-4567"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:494",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:495",className:"text-xs font-medium",children:"Email"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:496",value:a.email,onChange:s=>c({...a,email:s.target.value}),placeholder:"[email protected]"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:503",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:504",className:"text-xs font-medium",children:"Company"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:505",value:a.companyName,onChange:s=>c({...a,companyName:s.target.value}),placeholder:"Smith Properties LLC"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:511",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:512",className:"text-xs font-medium",children:"Markets (comma-separated)"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:513",value:a.markets,onChange:s=>c({...a,markets:s.target.value}),placeholder:"Indianapolis, Cleveland, Kansas City"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:519",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:520",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:521",className:"text-xs font-medium",children:"Min Price ($)"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:522",type:"number",value:a.minPrice,onChange:s=>c({...a,minPrice:s.target.value}),placeholder:"50000"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:529",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:530",className:"text-xs font-medium",children:"Max Price ($)"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:531",type:"number",value:a.maxPrice,onChange:s=>c({...a,maxPrice:s.target.value}),placeholder:"200000"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:539",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:540",className:"text-xs font-medium",children:"Property Types (comma-separated)"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:541",value:a.propertyTypes,onChange:s=>c({...a,propertyTypes:s.target.value}),placeholder:"single_family, duplex, multifamily"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:547",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:548",className:"text-xs font-medium",children:"Min ROI (%)"}),e.jsx(f,{"data-loc":"client/src/pages/Buyers.tsx:549",type:"number",value:a.minROI,onChange:s=>c({...a,minROI:s.target.value}),placeholder:"8"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:556",className:"flex gap-4",children:[e.jsxs("label",{"data-loc":"client/src/pages/Buyers.tsx:557",className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{"data-loc":"client/src/pages/Buyers.tsx:558",type:"checkbox",checked:a.prefersCashFlow,onChange:s=>c({...a,prefersCashFlow:s.target.checked}),className:"rounded border-gray-300"}),"Cash Flow Deals"]}
2),e.jsxs("label",{"data-loc":"client/src/pages/Buyers.tsx:566",className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{"data-loc":"client/src/pages/Buyers.tsx:567",type:"checkbox",checked:a.prefersFixAndFlip,onChange:s=>c({...a,prefersFixAndFlip:s.target.checked}),className:"rounded border-gray-300"}),"Fix & Flip"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Buyers.tsx:576",children:[e.jsx(B,{"data-loc":"client/src/pages/Buyers.tsx:577",className:"text-xs font-medium",children:"Notes"}),e.jsx("textarea",{"data-loc":"client/src/pages/Buyers.tsx:578",value:a.notes,onChange:s=>c({...a,notes:s.target.value}),placeholder:"Any notes about this buyer...",className:"w-full rounded-md border border-gray-200 p-2 text-sm resize-none h-20"})]})]}),e.jsxs(Me,{"data-loc":"client/src/pages/Buyers.tsx:586",children:[e.jsx(g,{"data-loc":"client/src/pages/Buyers.tsx:587",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),e.jsxs(g,{"data-loc":"client/src/pages/Buyers.tsx:590",onClick:t,disabled:!a.name||R.isPending||z.isPending,className:"bg-[#C9A84C] hover:bg-[#b8963f] text-white",children:[(R.isPending||z.isPending)&&e.jsx(E,{"data-loc":"client/src/pages/Buyers.tsx:596",className:"h-4 w-4 animate-spin mr-1"}),x?"Save Changes":"Add Buyer"]})]})]})}),e.jsx(Ie,{"data-loc":"client/src/pages/Buyers.tsx:605",open:G,onOpenChange:V,onDispensed:()=>d()}),v&&e.jsx(Ue,{"data-loc":"client/src/pages/Buyers.tsx:612",initialAddress:u?.address,initialPrice:u?.price,initialPoolBuyerId:u?.poolBuyerId,onClose:()=>{if(T(!1),d(),u){const s=new URLSearchParams(window.location.search);s.delete("blastAddress"),s.delete("blastPrice"),s.delete("blastPoolBuyerId");const n=s.toString();window.history.replaceState({},"",window.location.pathname+(n?`?${n}`:""))}}}),e.jsx("style",{"data-loc":"client/src/pages/Buyers.tsx:631",children:`
3        @keyframes goldShimmer {
4          0% { background-position: 0% 50%; }
5          50% { background-position: 100% 50%; }
6          100% { background-position: 0% 50%; }
7        }
8      `})]})}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.