PageSourceSearch

https://app.evaheld.com/assets/index-CkShy8Oo.js

js evaheld.com collected 2026-09-28 08:31:44 UTC 33,114 bytes, 1 lines download raw bytes

1import{j as e,X as Ue,r as o,an as Ve,cx as qe,aa as K,aw as me,ax as xe,bk as pe,bl as ue,bm as he,ay as ge,az as Me,cy as Y,cz as fe,cA as Be}from"./PrivacyChoices-C6w-XUak.js";import{i as Qe,f as Ye,u as C,aE as He,o as We}from"./main-runtime-4dUeodXo.js";import{d as Je,D as Ke}from"./DateRangeCompare-BzPYRVdV.js";import{F as $e,O as Ge,R as ze,a as Xe,b as Ze,c as es}from"./OnboardingTrackingSettings-Ce0ftX2A.js";import{a as ss,A as je,C as as,P as ts}from"./adminPlanFilters-DJpfmRJx.js";import{B as Z}from"./Badge-qb0SG9z8.js";import{D as rs,a as is,b as ns,c as be}from"./DropdownMenu-BDlLqHoy.js";import{I as ls}from"./Input-DAEmJFbK.js";import{S as _,a as U,b as V,c as q,d as v}from"./Select-BWCy4G2d.js";import{S as Ae}from"./Switch-qQogvjBK.js";import{T as ds,a as os,b as H,c as N,d as cs,e as g}from"./Table-0VE0FzqP.js";import{C as ve}from"./CountryDisplay-DnKwu3I-.js";import{A as ms,S as xs}from"./AnalyticsSummaryBar-CorUb6l7.js";import{U as ps}from"./users-a9i3kJii.js";import{S as us}from"./shield-check-Cerqib4S.js";import{S as hs}from"./search-CVm3vRrR.js";import{E as gs}from"./ellipsis-CZXhmLGQ.js";import{E as fs}from"./eye-DVLQXW_g.js";import{T as js}from"./trash-2-1o1rxfXx.js";import"./index-DesqbAf8.js";import"./calendar-days-D78nTxQ9.js";import"./mouse-pointer-click-W1zF9wVl.js";import"./chevron-down-CBB9ZS3V.js";import"./external-link-TuCSqDNg.js";import"./plus-gr_6Daas.js";import"./index-DIMw6dBN.js";import"./index-D_CPmKy-.js";import"./index-CxuhBffx.js";import"./index-Ch-7bYJc.js";import"./index-hJKzZDzp.js";import"./index-BdQq_4o_.js";import"./index-Dxeku_h4.js";import"./index-B6Umo6Zz.js";import"./chevron-up-BOQ7A8om.js";const M=a=>`${a.toFixed(1)}%`,Ne=(a,n)=>M(n>0?a/n*100:0);function bs({data:a,comparison:n,hideTestAccounts:l,isLoading:c,onHideTestAccountsChange:m}){if(c&&!a)return e.jsx("div",{className:"h-52 animate-pulse rounded-2xl bg-slate-100"});const p=a?.variants,y=(p?.A.visitors??0)+(p?.B.visitors??0),A=Math.max(p?.A.visitors??0,p?.B.visitors??0,1);return e.jsxs("section",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"rounded-lg bg-purple-50 p-2 text-purple-600",children:e.jsx($e,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-500",children:"A/B Test Results"}),e.jsx("h2",{className:"mt-0.5 text-xl font-bold tracking-tight text-slate-900",children:"Signup order"}),e.jsxs("p",{className:"mt-1 text-[11px] text-slate-400",children:["Started ",a?.startDate?new Date(a.startDate).toLocaleDateString("en-AU"):"—"," · ",a?.daysRunning??0," days"]}),e.jsxs("p",{className:"mt-1 text-[11px] text-slate-500",children:[y.toLocaleString()," qualified visitors in the clean cohort"]}),e.jsx("p",{className:"mt-0.5 text-[10px] text-slate-400",children:"Raw technical loads and historical v1 sessions are excluded from conversion rates"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-md border border-slate-200 bg-white px-2 py-1",title:"Toggle internal test accounts in these results",children:[e.jsx(Ae,{id:"hide-test-signup-experiment",className:"scale-75",checked:l,onCheckedChange:m}),e.jsx("label",{htmlFor:"hide-test-signup-experiment",className:"cursor-pointer select-none text-[10px] font-semibold text-slate-600",children:"TA"})]}),e.jsx("span",{className:"rounded-full bg-amber-50 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide text-amber-700",children:"Collecting data — no winner yet"})]})]}),e.jsx("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:["A","B"].map(D=>{const t=p?.[D],u=n?.variants[D];return e.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50/60 p-3",children:[e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-purple-700",children:["Variant ",D]}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:D==="A"?"Onboarding first":"Email signup first"})]}),e.jsxs("p",{className:"text-right text-2xl font-bold tabular-nums text-slate-900",children:[t?.visitors??0,e.jsx("span",{className:"ml-1 text-[10px] font-medium uppercase text-slate-400",children:"qualified"})]})]}),e.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-slate-200",children:e.jsx("div",{className:"h-full rounded-full bg-purple-500",style:{width:`${(t?.visitors??0)/A*100}%`}})}),e.jsx("div",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-xs",children:[["Page loads",t?.rawPageLoads??0,"diagnostic"],["Engaged",t?.engagedVisitors??0,Ne(t?.engagedVisitors??0,t?.visitors??0)],["Input started",t?.inputStarted??0,Ne(t?.inputStarted??0,t?.visitors??0)],["Signups",t?.signups??0,M(t?.signupRate??0)],["Onboarding",t?.onboardingCompletions??0,M(t?.onboardingCompletionRate??0)],["Dashboard",t?.dashboardReached??0,M(t?.dashboardReachedRate??0)],["Paid",t?.paidConversions??0,M(t?.paidConversionRate??0)]].map(([x,j,b])=>e.jsxs("div",{className:"flex items-baseline justify-between border-b border-slate-200 pb-1.5",children:[e.jsx("span",{className:"text-slate-500",children:x}),e.jsxs("span",{className:"font-semibold tabular-nums text-slate-900",children:[j," ",e.jsx("span",{className:"text-[10px] font-medium text-slate-400",children:b})]})]},String(x)))}),u?e.jsxs("p",{className:"mt-2 text-[10px] text-slate-400",children:[(t?.signups??0)-u.signups>=0?"+":"",(t?.signups??0)-u.signups," signups vs compare"]}):null,e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-slate-400",children:"Top referring pages"}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:(t?.referringPages.length?t.referringPages:[{page:"No data yet",count:0}]).slice(0,3).map(x=>e.jsxs("span",{className:"max-w-full truncate rounded-md bg-white px-2 py-1 text-[10px] text-slate-600 ring-1 ring-slate-200",title:x.page,children:[x.page," · ",x.count]},x.page))})]})]},D)})}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 rounded-lg bg-purple-50 px-3 py-2 text-xs text-purple-900",children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[(a?.percentagePointDifference??0).toFixed(1)," pp"]})," B vs A"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a?.relativeUplift==null?"—":`${a.relativeUplift.toFixed(1)}%`})," relative uplift/decline"]}),e.jsx("span",{className:"text-purple-700",children:"Qualified landing → signup conversion is the primary measure."})]})]})}const W={welcome:"Welcome (Legacy)",name:"Enter Name (Legacy)",nameIntro:"What's Your Name",intent:"Who Are You Here For",carerRole:"Carer Role",priorities:"Select Priorities",age:"Age Range",context:"A Little More About You",dashboardPreview:"Dashboard Preview",signupSubmitted:"Signup Submitted",signupConverted:"Signed Up Successful",journey:"Recommendations"},vs=["nameIntro","intent","carerRole","priorities","age","context","dashboardPreview","signupSubmitted","signupConverted","journey","welcome","name"],$={summary:{rawPageLoads:48,qualifiedVisitors:42,engagedVisitors:40,inputStarted:38,started:42,activeAnonymous:5,abandonedAnonymous:7,signedUpUnverified:6,verifiedUsers:29,totalConverted:35,verificationRateAfterSignup:82.9,conversionRateFromStart:83.3},funnel:[],detailedFunnel:[["nameIntro","What's Your Name",42,40,0,2,0],["intent","Who Are You Here For",40,38,0,2,0],["priorities","Select Priorities",38,34,2,2,0],["age","Age Range",36,31,3,2,0],["context","A Little More About You",34,30,2,2,0],["dashboardPreview","Dashboard Preview",32,31,0,1,0],["signupConverted","Signed Up Successful",31,31,0,0,0],["journey","Recommendations",29,27,1,1,0]].map(([a,n,l,c,m,p,y])=>({key:String(a),label:String(n),reached:Number(l),completed:Number(c),skipped:Number(m),advanced:Number(c),dropOff:Number(p),inProgress:Number(y)})),referringPages:[{page:"/plans",url:"https://evaheld.com/plans",reached:14,completed:11,dropped:2,inProgress:1,completionRate:78.6,mainDropOffStep:"What matters most?",mainDropOffCount:2,topCta:"hero-plans",topCtaCount:8},{page:"/digital-legacy-vault",url:"https://evaheld.com/digital-legacy-vault",reached:9,completed:6,dropped:3,inProgress:0,completionRate:66.7,mainDropOffStep:"Age details",mainDropOffCount:2,topCta:"start-free",topCtaCount:7},{page:"/faq/is-my-data-secure-in-evaheld",url:"https://evaheld.com/faq/is-my-data-secure-in-evaheld",reached:7,completed:6,dropped:1,inProgress:0,completionRate:85.7,mainDropOffStep:"Create account",mainDropOffCount:1,topCta:"article-start-free",topCtaCount:5},{page:"evaheld.com/blog/what-is-family-legacy-today",url:"https://evaheld.com/blog/what-is-family-legacy-today",reached:5,completed:3,dropped:2,inProgress:0,completionRate:60,mainDropOffStep:"Who are you here for?",mainDropOffCount:2,topCta:null,topCtaCount:0},{page:"Direct / not captured",url:null,reached:7,completed:5,dropped:1,inProgress:1,completionRate:71.4,mainDropOffStep:"Relationships",mainDropOffCount:1,topCta:null,topCtaCount:0}],selections:{priorities:[],ageRanges:[],lifeContext:[],userIntent:[]}},ye={...$,summary:{rawPageLoads:29,qualifiedVisitors:24,engagedVisitors:23,inputStarted:21,started:24,activeAnonymous:3,abandonedAnonymous:4,signedUpUnverified:5,verifiedUsers:12,totalConverted:17,verificationRateAfterSignup:70.6,conversionRateFromStart:70.8},detailedFunnel:[["nameIntro","What's Your Name",24,23,0,1,0],["intent","Who Are You Here For",23,22,0,1,0],["priorities","Select Priorities",22,20,1,1,0],["age","Age Range",21,19,1,1,0],["context","A Little More About You",20,18,1,1,0],["dashboardPreview","Dashboard Preview",19,18,0,1,0],["signupConverted","Signed Up Successful",18,18,0,0,0],["journey","Recommendations",17,16,0,1,0]].map(([a,n,l,c,m,p,y])=>({key:String(a),label:String(n),reached:Number(l),completed:Number(c),skipped:Number(m),advanced:Number(c),dropOff:Number(p),inProgress:Number(y)})),referringPages:$.referringPages.map((a,n)=>{const l=[8,5,4,3,4][n]||0,c=[6,3,3,2,2][n]||0,m=n===0||n===4?1:0,p=Math.max(0,l-c-m);return{...a,reached:l,completed:c,dropped:p,inProgress:m,completionRate:l?c/l*100:0,mainDropOffCount:p,topCtaCount:a.topCta?Math.min(a.topCtaCount,l):0}})},Se={key:"signup_order_v1",cohort:"qualified_organic_v2",startDate:"2026-09-08T00:00:00.000Z",daysRunning:1,variants:{A:{variant:"A",rawPageLoads:29,visitors:24,engagedVisitors:19,inputStarted:16,signups:12,signupRate:50,onboardingCompletions:18,onboardingCompletionRate:75,dashboardReached:11,dashboardReachedRate:45.8,paidConversions:1,paidConversionRate:4.2,referringPages:[{page:"/plans",count:9},{page:"/faq",count:7}]},B:{variant:"B",rawPageLoads:27,visitors:23,engagedVisitors:20,inputStarted:17,signups:15,signupRate:65.2,onboardingCompletions:13,onboardingCompletionRate:56.5,dashboardReached:12,dashboardReachedRate:52.2,paidConversions:1,paidConversionRate:4.3,referringPages:[{page:"/blog",count:10},{page:"/",count:6}]}},percentagePointDifference:15.2,relativeUplift:30.4,status:"collecting_data"},f=a=>We(a,"-"),J=a=>{switch(a){case"active_anonymous":return{label:"Active",variant:"secondary"};case"abandoned_anonymous":return{label:"Abandoned",variant:"destructive"};case"signed_up_unverified":return{label:"Unverified",variant:"warning"};case"verified_user":return{label:"Verified",variant:"success"};default:return{label:a,variant:"outline"}}},Ns=a=>a.replace(/([A-Z])/g," $1").replace(/^./,n=>n.toUpperCase()).trim(),we=a=>a.user?.fullName||a.payload.fullName||a.payload.preferredName||"Anonymous visitor";function Ce({deletingSessionId:a,isDeleting:n,onDelete:l,onView:c,session:m}){return e.jsxs(rs,{children:[e.jsx(is,{asChild:!0,children:e.jsx(K,{variant:"ghost",size:"icon-sm",className:"ml-auto","aria-label":"Open session actions",children:e.jsx(gs,{className:"h-4 w-4"})})}),e.jsxs(ns,{align:"end",className:"w-40",children:[e.jsxs(be,{onClick:()=>c(m),children:[e.jsx(fs,{className:"h-4 w-4"}),"View"]}
1),e.jsxs(be,{onClick:()=>l(m),disabled:n,className:"text-red-600 focus:text-red-700",children:[e.jsx(js,{className:"h-4 w-4"}),n&&a===m.sessionId?"Deleting...":"Delete"]})]})]})}function aa(){const a=Qe(),n=Ue(),[l,c]=o.useState(""),[m,p]=o.useState(""),y=o.useMemo(()=>Ye(7),[]),[A,D]=o.useState(()=>({current:y,compareEnabled:!1,compare:Je(y)})),{from:t,to:u}=A.current,x=A.compareEnabled,j=A.compare.from,b=A.compare.to,[d,ee]=o.useState(!0),[De,se]=o.useState(!1),[S,Pe]=o.useState("all"),[w,Re]=o.useState("all"),[T,Le]=o.useState("all"),[B,Ee]=o.useState("all"),[P,h]=o.useState(1),[G,Oe]=o.useState(25);o.useEffect(()=>{const s=window.setTimeout(()=>{p(l.trim())},300);return()=>window.clearTimeout(s)},[l]);const Te=s=>{D(s),h(1)},[r,k]=o.useState(null),[ae,te]=o.useState(null),re=o.useMemo(()=>{const s={from:t||void 0,to:u||void 0,step:B==="all"?void 0:B,search:m||void 0,hideTestAccounts:d,planCategory:S,billingJourney:w,page:P,limit:G};return T==="abandoned"?s.status="abandoned":T==="unverified"?(s.status="converted",s.verification="unverified"):T==="verified"&&(s.status="converted",s.verification="verified"),s},[t,d,S,w,T,G,P,m,B,u]),ie=C({queryKey:["onboarding-stats",t,u,d,S,w],queryFn:()=>Y({from:t||void 0,to:u||void 0,hideTestAccounts:d,planCategory:S,billingJourney:w}),enabled:!a,initialData:a?$:void 0}),z=C({queryKey:["onboarding-stats","free-user-journey",t,u,d],queryFn:()=>Y({from:t||void 0,to:u||void 0,hideTestAccounts:d,planCategory:"free",billingJourney:"all"}),enabled:!a,initialData:a?ye:void 0}),ne=C({queryKey:["signup-order-experiment",t,u,d],queryFn:()=>fe({from:t||void 0,to:u||void 0,hideTestAccounts:d}),enabled:!a,initialData:a?Se:void 0}),ke=C({queryKey:["onboarding-stats","compare",j,b,d,S,w],queryFn:()=>Y({from:j||void 0,to:b||void 0,hideTestAccounts:d,planCategory:S,billingJourney:w}),enabled:!a&&x&&!!j&&!!b}),Fe=C({queryKey:["onboarding-stats","free-user-journey","compare",j,b,d],queryFn:()=>Y({from:j||void 0,to:b||void 0,hideTestAccounts:d,planCategory:"free",billingJourney:"all"}),enabled:!a&&x&&!!j&&!!b}),Ie=C({queryKey:["signup-order-experiment","compare",j,b,d],queryFn:()=>fe({from:j||void 0,to:b||void 0,hideTestAccounts:d}),enabled:!a&&x&&!!j&&!!b}),R=C({queryKey:["onboarding-sessions",re],queryFn:()=>Be(re),enabled:!a,initialData:a?{sessions:[],pagination:{page:1,limit:25,total:0,totalPages:0}}:void 0}),Q=ie.data,X=z.data,le=C({...He({from:t||void 0,to:u||void 0,hideTestAccounts:d,planCategory:S,billingJourney:w}),enabled:!a}),L=le.data?.acquisition??(a?{paidUsers:18,freeUsers:24,paidVerified:17,paidUnverified:1,freeVerified:18,freeUnverified:6}:void 0),de=x?a?$:ke.data:void 0,oe=x?a?ye:Fe.data:void 0,E=R.data?.sessions||[],O=R.data?.pagination,F=Ve({mutationFn:s=>qe(s),onSuccess:async(s,i)=>{r?.sessionId===i&&k(null),E.length===1&&P>1&&h(_e=>Math.max(1,_e-1)),await Promise.all([n.refetchQueries({queryKey:["onboarding-sessions"]}),n.refetchQueries({queryKey:["onboarding-stats"]})])},onError:s=>{te(s instanceof Error?s.message:"Failed to delete onboarding session.")}}),ce=s=>{window.confirm(`Delete onboarding session ${s.sessionId}? This removes only the analytics session record.`)&&(te(null),F.mutate(s.sessionId))};return e.jsxs("div",{className:"space-y-10 p-4 sm:p-6 lg:p-8",children:[e.jsxs("div",{className:"flex flex-col gap-4 border-b border-slate-200 pb-6 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-400",children:"Platform analytics"}),e.jsx("h1",{className:"mt-1 text-2xl font-bold tracking-tight text-slate-900 sm:text-3xl",children:"Onboarding Analytics"}),e.jsx("p",{className:"mt-2 max-w-xl text-sm text-slate-600",children:"Track anonymous onboarding starts, unverified accounts, and verification completion in one funnel."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 self-start lg:self-end",children:[e.jsxs(_,{value:S,onValueChange:s=>{Pe(s),h(1)},children:[e.jsx(U,{className:"w-[165px] bg-white",children:e.jsx(V,{placeholder:"All Plans"})}),e.jsx(q,{children:ss.map(s=>e.jsx(v,{value:s.value,children:s.label},s.value))})]}),e.jsxs("div",{className:"relative",children:[e.jsxs(_,{value:w,onValueChange:s=>{Re(s),h(1)},children:[e.jsx(U,{className:"w-[205px] bg-white",children:e.jsx(V,{placeholder:"Purchase Type"})}),e.jsx(q,{children:je.map(s=>e.jsx(v,{value:s.value,children:s.label},s.value))})]}),e.jsx("button",{type:"button",onClick:()=>se(!0),className:"absolute left-0 top-full mt-1 whitespace-nowrap text-[10px] font-semibold text-purple-700 underline decoration-purple-200 underline-offset-2 hover:text-purple-900",children:"See legend"})]}),e.jsxs("div",{className:"flex items-center gap-1 rounded-md border border-gray-200 bg-white px-2 py-1",children:[e.jsx(Ae,{id:"hide-test-onboarding-accounts",className:"scale-75",checked:d,onCheckedChange:s=>{ee(s),h(1)}}),e.jsx("label",{htmlFor:"hide-test-onboarding-accounts",className:"cursor-pointer select-none text-[10px] font-semibold text-gray-600",children:"TA"})]})]})]}),e.jsx(Ke,{value:A,onChange:Te}
1),e.jsxs(ms,{title:"Total Sessions",value:Q?.summary.started??0,comparisonValue:de?.summary.started,icon:ps,summaryDetails:e.jsxs("p",{className:"mt-1 text-[11px] text-slate-400",children:[Q?.summary.activeAnonymous??0," active · ",Q?.summary.abandonedAnonymous??0," abandoned"]}),segments:[],children:[le.isError?e.jsx("p",{className:"mb-2 text-xs font-medium text-rose-600",children:"Signup totals are temporarily unavailable. Session totals remain available."}):null,e.jsx("div",{className:"grid grid-cols-2 gap-6",children:[{label:"Paid Users",total:L?.paidUsers,verified:L?.paidVerified,unverified:L?.paidUnverified},{label:"Free Users",total:L?.freeUsers,verified:L?.freeVerified,unverified:L?.freeUnverified}].map(s=>e.jsxs("div",{children:[e.jsxs("p",{className:"font-semibold text-slate-600",children:[e.jsx("span",{className:"text-2xl font-bold tabular-nums text-slate-900",children:s.total?.toLocaleString()??"—"})," ",e.jsx("span",{className:"text-sm",children:s.label})]}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-xs",children:[e.jsxs("span",{className:"flex items-center gap-1 text-purple-700",children:[e.jsx(us,{className:"h-3.5 w-3.5"})," Verified ",e.jsx("strong",{className:"text-sm tabular-nums",children:s.verified??"—"})]}),e.jsxs("span",{className:"ml-auto flex items-center gap-1 text-right text-slate-500",children:[e.jsx(xs,{className:"h-3.5 w-3.5"})," Unverified ",e.jsx("strong",{className:"text-sm tabular-nums text-slate-700",children:s.unverified??"—"})]})]}),e.jsxs("div",{className:"mt-2.5 flex h-2.5 w-full overflow-hidden rounded-full bg-slate-100",children:[e.jsx("div",{className:"h-full bg-purple-500",style:{width:`${s.total&&s.verified!==void 0?s.verified/s.total*100:0}%`}}),e.jsx("div",{className:"h-full bg-slate-300",style:{width:`${s.total&&s.unverified!==void 0?s.unverified/s.total*100:0}%`}})]})]},s.label))})]}),e.jsx(bs,{data:ne.data,comparison:x?a?Se:Ie.data:void 0,hideTestAccounts:d,isLoading:ne.isLoading,onHideTestAccountsChange:s=>{ee(s),h(1)}}),e.jsx(Ge,{steps:X?.detailedFunnel,comparison:oe?.detailedFunnel,summary:X?.summary,isLoading:z.isLoading}),e.jsx(ze,{pages:X?.referringPages,comparison:oe?.referringPages,isLoading:z.isLoading}),e.jsx(Xe,{steps:Q?.detailedFunnel,comparison:de?.detailedFunnel,compareEnabled:x,isLoading:ie.isLoading}),e.jsxs("section",{className:"rounded-xl border border-slate-200 bg-white shadow-sm",children:[e.jsxs("div",{className:"border-b border-slate-200 px-4 py-4 sm:px-6 sm:py-5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-900",children:[e.jsx(Ze,{className:"h-5 w-5"}),e.jsx("h2",{className:"text-xl font-semibold",children:"Sessions"})]}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Review individual onboarding journeys and whether they became abandoned, unverified, or verified users."})]}),e.jsxs("div",{className:"space-y-4 p-3 sm:p-6",children:[ae&&e.jsx("div",{className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:ae}),e.jsxs("div",{className:"relative",children:[e.jsx(hs,{className:"absolute left-3 top-3.5 h-4 w-4 text-slate-400"}),e.jsx(ls,{value:l,onChange:s=>{c(s.target.value),h(1)},placeholder:"Search name, email, or session ID",className:"pl-9"})]}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2 sm:gap-4 xl:grid-cols-3",children:[e.jsxs(_,{value:T,onValueChange:s=>{Le(s),h(1)},children:[e.jsx(U,{children:e.jsx(V,{placeholder:"Lifecycle"})}),e.jsxs(q,{children:[e.jsx(v,{value:"all",children:"All Lifecycle States"}),e.jsx(v,{value:"abandoned",children:"Abandoned"}),e.jsx(v,{value:"unverified",children:"Unverified"}),e.jsx(v,{value:"verified",children:"Verified"})]})]}),e.jsxs(_,{value:B||"all",onValueChange:s=>{Ee(s==="all"?"all":s),h(1)},children:[e.jsx(U,{children:e.jsx(V,{placeholder:"Current step"})}),e.jsxs(q,{children:[e.jsx(v,{value:"all",children:"All Steps"}),vs.map(s=>e.jsx(v,{value:s,children:W[s]},s))]})]}),e.jsxs(_,{value:String(G),onValueChange:s=>{Oe(Number(s)),h(1)},children:[e.jsx(U,{children:e.jsx(V,{placeholder:"Rows per page"})}),e.jsxs(q,{children:[e.jsx(v,{value:"10",children:"10 rows"}),e.jsx(v,{value:"25",children:"25 rows"}),e.jsx(v,{value:"50",children:"50 rows"})]})]})]}),e.jsxs("div",{className:"space-y-3 lg:hidden",children:[R.isLoading&&e.jsx("div",{className:"rounded-xl border border-slate-200 px-4 py-8 text-center text-sm text-slate-500",children:"Loading onboarding sessions..."}),!R.isLoading&&E.length===0&&e.jsx("div",{className:"rounded-xl border border-slate-200 px-4 py-8 text-center text-sm text-slate-500",children:"No onboarding sessions foun
1d for the current filters."}),E.map(s=>{const i=J(s.lifecycleStatus);return e.jsxs("article",{className:"rounded-xl border border-slate-200 bg-white p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate font-semibold text-slate-900",children:we(s)}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:s.user?.email||s.payload.email||"No email"})]}),e.jsx(Ce,{session:s,isDeleting:F.isPending,deletingSessionId:F.variables,onView:k,onDelete:ce})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsx(Z,{variant:i.variant,children:i.label}),e.jsx("span",{className:"rounded-full bg-slate-100 px-2 py-1 text-xs font-medium text-slate-600",children:W[s.currentStep]}),e.jsx(ve,{countryCode:s.payload.countryCode,countryName:s.payload.countryName,className:"flex items-center gap-1.5 text-xs text-slate-600"})]}),e.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-3 border-t border-slate-100 pt-3 text-xs",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-500",children:"Last activity"}),e.jsx("p",{className:"mt-0.5 font-medium text-slate-800",children:f(s.lastActivityAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-500",children:"Signup date"}),e.jsx("p",{className:"mt-0.5 font-medium text-slate-800",children:f(s.convertedAt)})]})]})]},s.sessionId)})]}),e.jsx("div",{className:"hidden overflow-hidden rounded-xl border border-slate-200 lg:block",children:e.jsxs(ds,{children:[e.jsx(os,{children:e.jsxs(H,{children:[e.jsx(N,{children:"Name"}),e.jsx(N,{children:"Email"}),e.jsx(N,{children:"Country"}),e.jsx(N,{children:"Current Step"}),e.jsx(N,{children:"Lifecycle Status"}),e.jsx(N,{children:"Signup Date"}),e.jsx(N,{children:"Verified Date"}),e.jsx(N,{children:"Last Activity"}),e.jsx(N,{children:"Abandon Reason"}),e.jsx(N,{className:"text-right",children:"Actions"})]})}),e.jsxs(cs,{children:[R.isLoading&&e.jsx(H,{children:e.jsx(g,{colSpan:10,className:"text-center text-slate-500",children:"Loading onboarding sessions..."})}),!R.isLoading&&E.length===0&&e.jsx(H,{children:e.jsx(g,{colSpan:10,className:"text-center text-slate-500",children:"No onboarding sessions found for the current filters."})}),E.map(s=>{const i=J(s.lifecycleStatus);return e.jsxs(H,{children:[e.jsxs(g,{children:[e.jsx("div",{className:"font-medium text-slate-900",children:s.user?.fullName||s.payload.fullName||s.payload.preferredName||"-"}),e.jsx("div",{className:"text-xs text-slate-500 mt-1",children:s.sessionId})]}),e.jsx(g,{children:s.user?.email||s.payload.email||"-"}),e.jsx(g,{children:e.jsx(ve,{countryCode:s.payload.countryCode,countryName:s.payload.countryName,className:"flex items-center gap-2 text-sm text-slate-700"})}),e.jsx(g,{children:W[s.currentStep]}),e.jsx(g,{children:e.jsx(Z,{variant:i.variant,children:i.label})}),e.jsx(g,{children:f(s.convertedAt)}),e.jsx(g,{children:f(s.verifiedAt)}),e.jsx(g,{children:f(s.lastActivityAt)}),e.jsx(g,{children:s.abandonReason==="tab_closed"?"Tab closed":s.abandonReason==="heartbeat_timeout"?"Heartbeat timeout":"-"}),e.jsx(g,{className:"text-right",children:e.jsx(Ce,{session:s,isDeleting:F.isPending,deletingSessionId:F.variables,onView:k,onDelete:ce})})]},s.sessionId)})]})]})}),e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsxs("p",{className:"text-sm text-slate-600",children:["Showing ",E.length," of ",O?.total??0," sessions"]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 sm:justify-start sm:gap-3",children:[e.jsx(K,{variant:"secondary",className:"px-3 sm:px-4",onClick:()=>h(s=>Math.max(1,s-1)),disabled:P<=1,children:"Previous"}),e.jsxs("span",{className:"text-sm text-slate-600",children:["Page ",O?.page??P," of ",O?.totalPages??1]}),e.jsx(K,{variant:"secondary",className:"px-3 sm:px-4",onClick:()=>h(s=>O?.totalPages?Math.min(O.totalPages,s+1):s+1),disabled:P>=(O?.totalPages??1),children:"Next"})]})]})]})]}),a?null:e.jsx(es,{}),e.jsx(me,{open:De,onOpenChange:se,children:e.jsxs(xe,{className:"max-w-5xl",children:[e.jsx(pe,{children:e.jsxs("div",{children:[e.jsx(ue,{children:"UELV purchase analytics legend"}),e.jsx(he,{children:"Standard codes used for purchase journeys, checkout locations and user roles."})]})}),e.jsx(ge,{children:e.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-xs font-bold uppercase tracking-[0.14em] text-slate-400",children:"Purchase Types"}),e.jsx("div",{className:"space-y-2",children:je.filter(s=>s.value!=="all").map(s=>e.jsxs("div",{className:"grid grid-cols-[48px_1fr] gap-2 rounded-lg bg-slate-50 px-3 py-2",children:[e.jsx("strong",{className:"text-xs text-purple-700",children:s.code}),e.jsx("span",{className:"text-xs leading-snug text-slate-600",children:s.label})]},s.value))})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-xs font-bold uppercase tracking-[0.14em] text-slate-400",children:"Checkout Points"}),e.jsx("div",{className:"space-y-2",children:Object.entries(as).map(([s,i])=>e.jsxs("div",{className:"grid grid-cols-[52px_1fr] gap-2 rounded-lg bg-slate-50 px-3 py-2",children:[e.jsx("strong",{className:"text-xs text-purple-700",children:i.code}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-slate-700",children:i.label}),e.jsx("p",{className:"mt-0.5 break-all text-[10px] text-slate-400",children:s})]})]},s))})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-3 text-xs font-bold uppercase tracking-[0.14em] text-slate-400",children:"User Roles"}),e.jsx("div",{className:"space-y-2",children:ts.map(s=>e.jsxs("div",{className:"grid grid-cols-[48px_1fr] gap-2 rounded-lg bg-slate-50 px-3 py-2",children:[e.jsx("strong",{className:"text-xs text-purple-700",children:s.code}),e.jsx("span",{className:"text-xs leading-snug text-slate-600",children:s.label})]},s.code))})]})]})})]})}),e.jsx(me,{open:!!r,onOpenChange:s=>{s||k(null)},children:e.jsxs(xe,{className:"max-h-[calc(100dvh-1rem)] max-w-4xl sm:max-h-[90vh]",children:[e.jsx(pe,{children:e.jsxs("div",{children:[e.jsx(ue,{children:r?we(r):"Onboarding session"}),e.jsx(he,{children:"Review the captured onboarding answers and linked account state."})]})}
1),e.jsx(ge,{className:"space-y-4 sm:space-y-6",children:r&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Lifecycle"}),e.jsx("div",{className:"mt-2",children:e.jsx(Z,{variant:J(r.lifecycleStatus).variant,children:J(r.lifecycleStatus).label})})]}),e.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Current Step"}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-slate-900",children:W[r.currentStep]})]}),e.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Last Activity"}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-slate-900",children:f(r.lastActivityAt)})]}),e.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Session ID"}),e.jsx("p",{className:"mt-2 break-all text-sm font-medium text-slate-900",children:r.sessionId})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white",children:[e.jsx("div",{className:"border-b border-slate-200 px-5 py-4",children:e.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Onboarding Answers"})}),e.jsx("div",{className:"grid gap-0",children:Object.entries(r.payload).map(([s,i])=>{let I="-";return Array.isArray(i)?I=i.length>0?i.join(", "):"-":typeof i=="boolean"?I=i?"Yes":"No":typeof i=="string"&&(I=i||"-"),e.jsxs("div",{className:"grid gap-1 border-b border-slate-100 px-5 py-4 last:border-b-0",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:Ns(s)}),e.jsx("p",{className:"text-sm text-slate-900",children:s==="birthday"&&typeof i=="string"&&i?f(i):I})]},s)})})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white",children:[e.jsx("div",{className:"border-b border-slate-200 px-5 py-4",children:e.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Account Linkage"})}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-slate-700",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Signup Date"}),e.jsx("p",{className:"mt-1 text-slate-900",children:f(r.convertedAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Verified Date"}),e.jsx("p",{className:"mt-1 text-slate-900",children:f(r.verifiedAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Abandon Reason"}),e.jsx("p",{className:"mt-1 text-slate-900",children:r.abandonReason==="tab_closed"?"Tab closed":r.abandonReason==="heartbeat_timeout"?"Heartbeat timeout":"-"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"User"}),e.jsx("p",{className:"mt-1 text-slate-900",children:r.user?`${r.user.fullName} (${r.user.email})`:"No linked user"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"User Verified"}),e.jsx("p",{className:"mt-1 text-slate-900",children:r.user?r.user.emailVerified?"Yes":"No":"-"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Client ID"}),e.jsx("p",{className:"mt-1 text-slate-900",children:r.client?.uniqueId||"No linked client"})]})]})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white",children:[e.jsx("div",{className:"border-b border-slate-200 px-5 py-4",children:e.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Timeline"})}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-slate-700",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Session Created"}),e.jsx("p",{className:"mt-1 text-slate-900",children:f(r.createdAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Last Activity"}),e.jsx("p",{className:"mt-1 text-slate-900",children:f(r.lastActivityAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Abandoned At"}),e.jsx("p",{className:"mt-1 text-slate-900",children:f(r.abandonedAt)})]})]})]})]})]})]})}),e.jsx(Me,{children:e.jsx(K,{variant:"secondary",onClick:()=>k(null),children:"Close"})})]})})]})}export{aa as component};

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.