1import{u as E,r as u,j as e,a as N,b as W}from"./index-EQVk02tg.js";import{L as _}from"./Layout-CRdY9eup.js";import{u as Y,s as F}from"./onboardingTour-BPLauyM7.js";import"./Layout-CJPQ5iiB.js";const b="#6366f1",T="#4f46e5",M="#16a34a",B=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=[{id:"check",label:"Run your first risk check",sub:"See if a customer has a history before you work with them.",route:"/risk-check",cta:"Run a check"},{id:"report",label:"File your first report",sub:"Warn the network about a bad customer.",route:"/reports",cta:"File a report"},{id:"ext",label:"Connect the Chrome extension",sub:"Run checks right inside your CRM.",route:"/api-keys",cta:"Get your key"}],I=({size:o=14,color:r="#fff"})=>e.jsx("svg",{width:o,height:o,fill:"none",viewBox:"0 0 24 24",stroke:r,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}),D=({done:o,current:r,number:n})=>e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.9rem",fontWeight:800,background:o?M:r?`linear-gradient(135deg, ${b}, ${T})`:"#fff",border:o||r?"none":"2px solid #dbe3ec",color:o||r?"#fff":"#94a3b8",boxShadow:r?"0 4px 10px -3px rgba(79,70,229,.5)":"none"},children:o?e.jsx(I,{}):n}),V=({onboarding:o,signals:r})=>{var m;const n=E(),{dismissed:g,celebrated:i,fallbacks:y,dismiss:l,markExtDone:p,markCelebrated:S}=o,[z,j]=u.useState(!1),k=H.map(t=>({...t,done:t.id==="check"?r.check||y.check:t.id==="report"?r.report||y.report:y.ext})),x=k.filter(t=>t.done).length,h=k.length,v=x===h,f=(m=k.find(t=>!t.done))==null?void 0:m.id,C=v&&!i,w=t=>{t.id==="ext"&&p(),n(t.route)};if(!v&&g)return null;const s=Math.round(x/h*100),c=B?"none":"width 400ms cubic-bezier(0.16, 1, 0.3, 1)";return v&&C?e.jsxs("div",{id:"onboarding-checklist",style:{background:`linear-gradient(135deg, ${b} 0%, ${T} 100%)`,borderRadius:"14px",padding:"22px 24px",marginBottom:"28px",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"16px",boxShadow:"0 10px 24px -12px rgba(79,70,229,.55)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"14px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",background:"rgba(255,255,255,.18)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(I,{size:20})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"1.2rem",fontWeight:800,color:"#fff"},children:"You're all set ð"}),e.jsx("div",{style:{fontSize:"0.9rem",color:"rgba(255,255,255,.85)",marginTop:"3px"},children:"You've run a check, filed a report, and connected the extension. Your dashboard does the rest."})]})]}),e.jsx("button",{type:"button",onClick:S,onMouseEnter:t=>t.currentTarget.style.background="#f1f5ff",onMouseLeave:t=>t.currentTarget.style.background="#fff",style:{padding:"10px 20px",background:"#fff",border:"none",borderRadius:"8px",color:T,fontWeight:700,fontSize:"0.88rem",cursor:"pointer",whiteSpace:"nowrap",transition:B?"none":"background 150ms ease"},children:"Got it"})]}):v?e.jsxs("div",{id:"onboarding-checklist",style:{background:"#fff",borderRadius:"12px",border:"1px solid #e2e8f0",padding:"12px 18px",marginBottom:"28px"},children:[e.jsxs("button",{type:"button",onClick:()=>j(t=>!t),style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",background:"none",border:"none",padding:0,cursor:"pointer",color:"#0f172a",fontWeight:600,fontSize:"0.9rem"},children:[e.jsx("span",{style:{width:"22px",height:"22px",borderRadius:"50%",background:M,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(I,{size:12})}),e.jsx("span",{children:"Getting started"}),e.jsx("span",{style:{color:"#94a3b8",fontSize:"0.78rem",fontWeight:500},children:"· all done"}),e.jsx("span",{style:{marginLeft:"auto",color:b,fontSize:"0.8rem",fontWeight:600},children:z?"Hide":"Show"})]}),z&&e.jsx("div",{style:{marginTop:"14px",display:"flex",flexDirection:"column",gap:"12px"},children:k.map(t=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx(D,{done:!0}),e.jsx("span",{style:{fontSize:"0.88rem",color:"#94a3b8",textDecoration:"line-through"},children:t.label})]},t.id))})]}):e.jsxs("div",{id:"onboarding-checklist",style:{position:"relative",overflow:"hidden",background:"#fff",borderRadius:"16px",border:"1px solid #e8edf2",padding:"24px 24px 22px",marginBottom:"28px",boxShadow:"0 10px 30px -18px rgba(15,23,42,.25)"},children:[e.jsx("span",{style:{position:"absolute",top:0,left:0,width:"100%",height:"4px",background:`linear-gradient(90deg, ${b}, #818cf8 60%, ${b}1a)`}}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"16px",marginBottom:"18px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
1p:"13px"},children:[e.jsx("div",{style:{width:"36px",height:"36px",borderRadius:"10px",background:"rgba(99,102,241,.1)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx("svg",{width:"19",height:"19",fill:"none",viewBox:"0 0 24 24",stroke:b,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"1.05rem",fontWeight:800,color:"#0f172a"},children:"Get started with Helix Flag"}),e.jsx("div",{style:{fontSize:"0.85rem",color:"#64748b",marginTop:"2px"},children:"Three quick steps to your first protection â under two minutes."})]})]}),e.jsx("button",{type:"button",onClick:l,onMouseEnter:t=>t.currentTarget.style.color="#64748b",onMouseLeave:t=>t.currentTarget.style.color="#94a3b8",style:{background:"none",border:"none",color:"#94a3b8",fontSize:"0.8rem",cursor:"pointer",whiteSpace:"nowrap",padding:"2px 4px"},children:"Hide for now"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"18px"},children:[e.jsx("div",{style:{flex:1,height:"8px",background:"#f1f5f9",borderRadius:"999px",overflow:"hidden"},children:e.jsx("div",{style:{width:`${s}%`,height:"100%",background:`linear-gradient(90deg, ${b}, ${T})`,borderRadius:"999px",transition:c}})}),e.jsxs("div",{style:{fontSize:"0.82rem",fontWeight:700,color:b,whiteSpace:"nowrap"},children:[x,"/",h]})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:k.map((t,L)=>{const a=t.id===f;return e.jsxs("div",{onMouseEnter:d=>{!a&&!t.done&&(d.currentTarget.style.background="#f1f5f9")},onMouseLeave:d=>{!a&&!t.done&&(d.currentTarget.style.background="#f8fafc")},style:{position:"relative",overflow:"hidden",display:"flex",alignItems:"center",gap:"14px",padding:a?"16px 18px":"14px 16px",borderRadius:"12px",background:t.done?"rgba(22,163,74,.05)":a?"linear-gradient(135deg, rgba(99,102,241,.10) 0%, rgba(99,102,241,.04) 100%)":"#f8fafc",border:`1px solid ${t.done?"rgba(22,163,74,.18)":a?"rgba(99,102,241,.28)":"#eef2f7"}`,boxShadow:a?"0 8px 22px -12px rgba(79,70,229,.55)":"none",transition:B?"none":"background 150ms ease"},children:[a&&e.jsx("span",{style:{position:"absolute",left:0,top:0,bottom:0,width:"3px",background:`linear-gradient(180deg, ${b}, ${T})`}}),e.jsx(D,{done:t.done,current:a,number:L+1}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"0.92rem",fontWeight:600,color:t.done?"#94a3b8":"#0f172a",textDecoration:t.done?"line-through":"none"},children:t.label}),e.jsx("div",{style:{fontSize:"0.8rem",color:"#94a3b8",marginTop:"1px"},children:t.sub})]}),t.done?e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"5px",fontSize:"0.8rem",fontWeight:600,color:M,whiteSpace:"nowrap"},children:[e.jsx(I,{size:13,color:M})," Done"]}):a?e.jsxs("button",{type:"button",onClick:()=>w(t),onMouseEnter:d=>{d.currentTarget.style.transform="translateY(-1px)",d.currentTarget.style.boxShadow="0 10px 22px -10px rgba(79,70,229,.65)"},onMouseLeave:d=>{d.currentTarget.style.transform="none",d.currentTarget.style.boxShadow="0 6px 16px -9px rgba(79,70,229,.55)"},style:{display:"inline-flex",alignItems:"center",gap:"7px",padding:"10px 18px",background:`linear-gradient(135deg, ${b}, ${T})`,border:"none",borderRadius:"9px",color:"#fff",fontWeight:700,fontSize:"0.86rem",cursor:"pointer",whiteSpace:"nowrap",boxShadow:"0 6px 16px -9px rgba(79,70,229,.55)",transition:B?"none":"transform 150ms ease, box-shadow 150ms ease"},children:[t.cta,e.jsx("svg",{width:"15",height:"15",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M13 7l5 5-5 5M6 12h12"})})]}):e.jsx("button",{type:"button",onClick:()=>w(t),onMouseEnter:d=>d.currentTarget.style.background="#eef2ff",onMouseLeave:d=>d.currentTarget.style.background="#fff",style:{padding:"9px 18px",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"8px",color:b,fontWeight:600,fontSize:"0.85rem",cursor:"pointer",whiteSpace:"nowrap",transition:B?"none":"background 150ms ease"},children:t.cta})]},t.id)})})]})},A=[{label:"Account Created",description:"Your login credentials are ready"},{label:"Complete Application",description:"Fill out your business details and upload documents"},{label:"Under Review",description:"Our team is reviewing your application"}
1,{label:"Verified",description:"Your business information has been confirmed"},{label:"Verified Member",description:"Listed as a verified business on the network"}],G=o=>{switch(o){case"draft":return 0;case"pending":return 1;case"under_review":return 1;case"requires_info":return 0;case"approved":return 3;case"rejected":return-1;default:return 0}},O=()=>{const o=E(),{user:r}=N(),[n,g]=u.useState(null),[i,y]=u.useState(!0),[l,p]=u.useState(""),[S,z]=u.useState(!1),[j,k]=u.useState("");if(u.useEffect(()=>{(async()=>{try{const c=await W.get("/signup/my-verification");g(c.data)}catch{}finally{y(!1)}})()},[]),i)return e.jsx("div",{className:"loading",children:e.jsx("div",{className:"spinner"})});const x=async()=>{if(l.trim()){z(!0);try{await W.post("/signup/my-verification/respond",{response:l.trim()}),k("Your response has been submitted. Our team will review it shortly."),p("");const s=await W.get("/signup/my-verification");g(s.data)}catch{}finally{z(!1)}}},h=(n==null?void 0:n.status)||"draft",v=G(h),f=h==="rejected",C=h==="draft"||h==="requires_info",w=h==="pending"||h==="under_review";return e.jsxs(e.Fragment,{children:[e.jsx("h1",{style:{marginBottom:"8px"},children:"Welcome to Helix Flag"}),e.jsxs("p",{style:{color:"#64748b",marginBottom:"32px",fontSize:"16px"},children:[r==null?void 0:r.email," â Your business verification is in progress."]}),f&&e.jsxs("div",{className:"card",style:{marginBottom:"24px",border:"2px solid rgba(220,38,38,.3)",background:"rgba(220,38,38,.05)"},children:[e.jsx("h2",{style:{color:"#dc2626",marginBottom:"8px"},children:"Application Requires Attention"}),e.jsx("p",{style:{color:"#64748b"},children:"Your application was not approved."}),(n==null?void 0:n.customer_notes)&&e.jsxs("div",{style:{marginTop:"12px",padding:"12px 16px",background:"rgba(255,255,255,.6)",borderRadius:"8px",fontSize:"14px",color:"#991b1b"},children:[e.jsx("strong",{style:{display:"block",marginBottom:"6px"},children:"Reason:"}),e.jsx("ul",{style:{margin:0,paddingLeft:"20px"},children:n.customer_notes.split(` 2`).filter(s=>s.trim()).map((s,c)=>e.jsx("li",{children:s.trim()},c))})]}),!(n!=null&&n.customer_response)&&!j&&e.jsxs("div",{style:{marginTop:"16px"},children:[e.jsx("textarea",{value:l,onChange:s=>p(s.target.value),placeholder:"If you believe this rejection is in error, please describe it here...",rows:4,style:{width:"100%",padding:"12px",border:"1px solid rgba(220,38,38,.3)",borderRadius:"8px",fontSize:"14px",resize:"vertical",boxSizing:"border-box"}}),e.jsx("button",{onClick:x,disabled:S||!l.trim(),style:{marginTop:"8px",padding:"10px 20px",border:"none",borderRadius:"8px",background:l.trim()?"#dc2626":"#94a3b8",color:"white",cursor:l.trim()?"pointer":"default",fontWeight:"600"},children:S?"Submitting...":"Submit Response"})]}),j&&e.jsx("div",{style:{marginTop:"16px",padding:"12px 16px",background:"#d1fae5",border:"1px solid #6ee7b7",borderRadius:"8px",color:"#065f46",fontSize:"14px"},children:j})]}),e.jsxs("div",{className:"card",style:{marginBottom:"24px"},children:[e.jsx("h2",{style:{marginBottom:"24px"},children:"Verification Progress"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:A.map((s,c)=>{const m=c<=v&&!f,t=c===v+1&&!f;return e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"16px",position:"relative"},children:[c<A.length-1&&e.jsx("div",{style:{position:"absolute",left:"15px",top:"32px",width:"2px",height:"32px",background:m?"#dc2626":"#e2e8f0"}}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:"14px",fontWeight:"600",background:m?"#dc2626":t?"rgba(220,38,38,.1)":"#f1f5f9",color:m?"#fff":t?"#dc2626":"#94a3b8",border:t?"2px solid #dc2626":"none"},children:m?e.jsx("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):c+1}),e.jsxs("div",{style:{paddingBottom:"24px"},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"15px",color:m?"#1e293b":t?"#dc2626":"#94a3b8",lineHeight:"32px"},children:s.label}),e.jsx("div",{style:{fontSize:"13px",color:"#94a3b8"},children:s.description})]})]},c)})})]}),e.jsxs("div",{className:"card",style:{textAlign:"center",padding:"32px"},children:[C&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{marginBottom:"12px"},children:"Complete Your Application"}),e.jsx("p",{style:{color:"#64748b",marginBottom:"20px"},children:"Fill out your business details to get verified."}),e.jsx("button",{className:"btn btn-primary",onClick:()=>o("/my-verification"),children:"Go to My Application"})]}),w&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{marginBottom:"12px"},children:"Application Under Review"}),e.jsx("p",{style:{color:"#64748b",marginBottom:"20px"},children:"You'll receive an email once a decision has been made."}),e.jsx("button",{className:"btn btn-secondary",onClick:()=>o("/my-verification"),children:"View Application"})]}),f&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{marginBottom:"12px"},children:"Need Help?"}),e.jsx("a",{href:"mailto:[email protected]",className:"btn btn-primary",children:"Contact Support"})]})]})]})},P=o=>
2o==null?"-":Number(o).toLocaleString(),R=({value:o,label:r,color:n="#1e293b",sub:g,large:i,display:y,emphasis:l=!1})=>e.jsxs("div",{onMouseEnter:p=>{p.currentTarget.style.transform="translateY(-2px)",p.currentTarget.style.boxShadow="0 14px 30px -16px rgba(15,23,42,.30)",p.currentTarget.style.borderColor="#dbe3ec"},onMouseLeave:p=>{p.currentTarget.style.transform="none",p.currentTarget.style.boxShadow="0 1px 2px rgba(15,23,42,.04)",p.currentTarget.style.borderColor="#e8edf2"},style:{position:"relative",overflow:"hidden",background:"#fff",borderRadius:"14px",border:"1px solid #e8edf2",padding:i?"26px 24px 24px":"20px 20px 18px",boxShadow:"0 1px 2px rgba(15,23,42,.04)",transition:"transform 220ms cubic-bezier(0.16,1,0.3,1), box-shadow 220ms ease, border-color 220ms ease"},children:[e.jsx("span",{style:{position:"absolute",top:0,left:0,width:"100%",height:l?"4px":"3px",background:`linear-gradient(90deg, ${n}, ${n}1a)`}}),e.jsx("div",{style:{fontSize:i?"2.6rem":"2.05rem",fontWeight:800,color:n,lineHeight:1.05,letterSpacing:"-0.02em",fontVariantNumeric:"tabular-nums"},children:y??P(o)}),e.jsx("div",{style:{fontSize:"0.82rem",fontWeight:700,color:"#334155",marginTop:"8px"},children:r}),g&&e.jsx("div",{style:{fontSize:"0.74rem",color:"#94a3b8",marginTop:"3px"},children:g})]}),Q=()=>{const o=E(),{user:r}=N(),n=(r==null?void 0:r.industry_type)==="insurance";u.useEffect(()=>{n&&o("/insurance/dashboard",{replace:!0})},[n,o]);const g=(r==null?void 0:r.role)==="org_admin"&&!(r!=null&&r.organization_id),[i,y]=u.useState(null),[l,p]=u.useState(null),[S,z]=u.useState(null),[j,k]=u.useState(!g&&!n),x=Y();u.useEffect(()=>{!g&&!n&&v()},[]);const h=(r==null?void 0:r.subscription_status)==="sandbox";if(u.useEffect(()=>{if(j||g||n||h||x.tourDone)return;const a=requestAnimationFrame(()=>{F({onDone:x.markTourDone})});return()=>cancelAnimationFrame(a)},[j,g,n,h,x.tourDone,x.markTourDone]),n)return null;const v=async()=>{try{const[a,d,$]=await Promise.all([W.get("/reports/stats/dashboard"),W.get("/risk/actions/stats"),W.get("/reports/stats/platform").catch(()=>({data:null}))]);y(a.data),p(d.data),z($.data)}catch{}finally{k(!1)}};if(g)return e.jsx(_,{children:e.jsx(O,{})});if(j)return e.jsx(_,{children:e.jsx("div",{className:"loading",children:e.jsx("div",{className:"spinner"})})});const f=(l==null?void 0:l.red_flags_caught)||0,C=(l==null?void 0:l.yellow_flags_caught)||0,w=f+C,s=f*2500+C*750,c=(i==null?void 0:i.total_risk_checks_this_month)||0,m={check:((r==null?void 0:r.trial_lookups_used)||0)>0||c>0,report:((i==null?void 0:i.active_red_reports)||0)+((i==null?void 0:i.active_yellow_reports)||0)>0}
2,t=w===0&&c===0,L=()=>{x.undismiss(),x.resetCoachmarks();const a=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;setTimeout(()=>{var d;(d=document.getElementById("onboarding-checklist"))==null||d.scrollIntoView({behavior:a?"auto":"smooth",block:"start"})},60),F({onDone:x.markTourDone})};return e.jsxs(_,{children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"16px",flexWrap:"wrap",marginBottom:"28px"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{margin:0,fontSize:"1.6rem",fontWeight:800,color:"#0f172a"},children:"Dashboard"}),e.jsx("p",{style:{margin:"4px 0 0",color:"#64748b",fontSize:"0.9rem"},children:(r==null?void 0:r.organization_name)||(r==null?void 0:r.email)})]}),e.jsxs("button",{type:"button",onClick:L,style:{display:"inline-flex",alignItems:"center",gap:"7px",padding:"9px 16px",background:"#fff",border:"1px solid #fecaca",borderRadius:"8px",color:"#dc2626",fontWeight:600,fontSize:"0.85rem",cursor:"pointer",whiteSpace:"nowrap"},children:[e.jsx("svg",{width:"15",height:"15",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Show me around"]})]}),e.jsx(V,{onboarding:x,signals:m}),S&&e.jsxs("div",{style:{marginBottom:"28px"},children:[e.jsx("div",{style:{fontSize:"0.72rem",fontWeight:700,color:"#94a3b8",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"10px"},children:"Helix Flag Network"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:"12px"},children:[e.jsx(R,{value:S.total_identities,label:"Tracked Identities",color:"#0891b2",sub:"Unique debtors"}),e.jsx(R,{value:S.total_flags,label:"Active Flags",color:"#dc2626",sub:"Red + Yellow"})]})]}),e.jsxs("div",{style:{marginBottom:"28px"},children:[e.jsx("div",{style:{fontSize:"0.72rem",fontWeight:700,color:"#94a3b8",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"10px"},children:"Your Organization"}),t?e.jsxs("div",{style:{position:"relative",overflow:"hidden",background:"linear-gradient(135deg, #fbfbff 0%, #f4f5ff 100%)",borderRadius:"16px",border:"1px solid #e6e8fb",padding:"38px 32px",textAlign:"center",boxShadow:"0 1px 2px rgba(15,23,42,.04)"},children:[e.jsx("span",{style:{position:"absolute",top:0,left:0,width:"100%",height:"4px",background:"linear-gradient(90deg, #dc2626, #ef4444)"}}),e.jsx("div",{style:{width:"52px",height:"52px",borderRadius:"14px",margin:"0 auto 16px",background:"rgba(220,38,38,.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("svg",{width:"26",height:"26",fill:"none",viewBox:"0 0 24 24",stroke:"#dc2626",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("div",{style:{fontSize:"1.2rem",fontWeight:800,color:"#0f172a",letterSpacing:"-0.01em"},children:"Start screening customers to see your protection stats here."}),e.jsx("div",{style:{fontSize:"0.92rem",color:"#64748b",marginTop:"8px",marginBottom:"22px"},children:"Every lookup and report you make builds your dashboard."}),e.jsx("button",{onClick:()=>o("/risk-check"),onMouseEnter:a=>{a.currentTarget.style.transform="translateY(-1px)",a.currentTarget.style.boxShadow="0 10px 22px -10px rgba(220,38,38,.5)"},onMouseLeave:a=>{a.currentTarget.style.transform="none",a.currentTarget.style.boxShadow="0 6px 16px -8px rgba(220,38,38,.45)"},style:{padding:"12px 24px",background:"linear-gradient(135deg, #dc2626, #b91c1c)",border:"none",borderRadius:"10px",color:"#fff",fontWeight:700,fontSize:"0.92rem",cursor:"pointer",boxShadow:"0 6px 16px -8px rgba(220,38,38,.45)",transition:"transform 150ms ease, box-shadow 150ms ease"},children:"Run your first check"})]}):e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(170px, 1fr))",gap:"14px"},children:[e.jsx(R,{value:f,label:"Red Flags Caught",sub:"Serious incidents prevented",color:"#dc2626",emphasis:f>0}),e.jsx(R,{value:C,label:"Yellow Flags Caught",sub:"Caution customers identified",color:"#ca8a04",emphasis:C>0}),e.jsx(R,{value:s,display:s>0?`$${s>=1e3?Math.round(s/1e3)+"K":s}`:"$0",label:"Est. Losses Prevented",sub:"Based on SMB non-payment averages",color:"#16a34a",emphasis:s>0}),e.jsx(R,{value:c,label:"Lookups This Month",sub:"Customers screened",color:"#2563eb"}),e.jsx(R,{value:(i==null?void 0:i.active_red_reports)||0,label:"Active Red Reports",sub:"Filed by your org",color:"#dc2626"}),e.jsx(R,{value:(i==null?void 0:i.active_yellow_reports)||0,label:"Active Yellow Reports",sub:"Filed by your org",color:"#ca8a04"})]})]}),w>0&&e.jsxs("div",{style:{background:"linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%)",borderRadius:"14px",padding:"28px 32px",marginBottom:"28px",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"20px"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"0.75rem",fontWeight:700,color:"rgba(255,255,255,.5)",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"6px"},children:"Helix Flag has protected your business from"}),e.jsxs("div",{style:{fontSize:"2.2rem",fontWeight:800,color:"#fff",lineHeight:1.1},children:[w," high-risk ",w===1?"customer":"customers"]}),s>0&&e.jsxs("div",{style:{fontSize:"1rem",color:"rgba(255,255,255,.7)",marginTop:"8px"},children:["Estimated ",e.jsxs("strong",{style:{color:"#4ade80"}
2,children:["$",s.toLocaleString()]})," in potential losses prevented"]})]}),e.jsx("button",{onClick:()=>o("/risk-check"),style:{padding:"12px 24px",background:"#dc2626",border:"none",borderRadius:"8px",color:"#fff",fontWeight:700,fontSize:"0.95rem",cursor:"pointer",whiteSpace:"nowrap"},children:"Run a Risk Check"})]}),e.jsxs("div",{style:{background:"#fff",borderRadius:"12px",border:"1px solid #e2e8f0",padding:"20px 24px"},children:[e.jsx("div",{style:{fontSize:"0.72rem",fontWeight:700,color:"#94a3b8",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"14px"},children:"Quick Actions"}),e.jsxs("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[e.jsx("button",{onClick:()=>o("/risk-check"),style:{padding:"9px 18px",background:"#dc2626",border:"none",borderRadius:"8px",color:"#fff",fontWeight:600,fontSize:"0.88rem",cursor:"pointer"},children:"Check Customer Risk"}),e.jsx("button",{onClick:()=>o("/reports"),style:{padding:"9px 18px",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:"8px",color:"#1e293b",fontWeight:600,fontSize:"0.88rem",cursor:"pointer"},children:"View My Reports"}),e.jsx("button",{onClick:()=>o("/extension"),style:{padding:"9px 18px",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:"8px",color:"#1e293b",fontWeight:600,fontSize:"0.88rem",cursor:"pointer"},children:"Get the Extension"})]})]}),e.jsxs("div",{style:{marginTop:"20px",background:"linear-gradient(135deg, #fef2f2 0%, #fff 60%)",borderRadius:"12px",border:"1px solid rgba(220,38,38,.2)",padding:"20px 24px",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"16px"},children:[e.jsxs("div",{style:{flex:"1 1 320px"},children:[e.jsx("div",{style:{fontSize:"0.72rem",fontWeight:700,color:"#dc2626",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"6px"},children:"Chrome Extension"}),e.jsx("div",{style:{fontSize:"1.05rem",fontWeight:700,color:"#0f172a",marginBottom:"4px"},children:"Run risk checks from inside ServiceTitan, Housecall Pro, and Jobber"}),e.jsx("div",{style:{fontSize:"0.85rem",color:"#64748b"},children:"One-click lookups during customer intake â sign in with your Helix Flag account, no setup or keys. Get it and see how it works on the Extension page."})]}),e.jsx("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:e.jsx("button",{onClick:()=>o("/extension"),style:{padding:"10px 20px",background:"#6366f1",border:"none",borderRadius:"8px",color:"#fff",fontWeight:700,fontSize:"0.9rem",cursor:"pointer",whiteSpace:"nowrap"},children:"Get the extension"})})]})]})};export{Q 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.