PageSourceSearch

https://app.milo.ai/_nuxt/DhOHst24.js

js milo.ai collected 2026-10-05 12:15:29 UTC 26,802 bytes, 1 lines download raw bytes

1import{O as vt,o as r,h as u,e as t,f as b,i as _,F as j,j as R,d as dt,l as g,r as D,t as o,g as V,s as S,L as At,A as Tt,w as Ut,B as Mt,n as m,c as pt,k as jt,G as Nt,p as c,I as et,J as ct}from"./B7-LlmiM.js";import{B as Rt}from"./FhNm8pJe.js";import{P as It,n as mt,u as Ft,o as Ot,f as N,C as Et,g as Lt,b as Bt,c as xt,a as zt,i as Ht,p as Yt}from"./CmXIhakM.js";import{u as qt}from"./ChabqG2d.js";const Gt={key:0,class:"flex justify-center items-center py-20"},Jt={key:1,class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4"},Kt={class:"flex items-start justify-between mb-3"},Qt={class:"min-w-0"},Wt={class:"flex items-center gap-2"},Xt={class:"text-base font-semibold text-slate-900"},Zt={key:0,class:"px-1.5 py-0.5 rounded text-[10px] font-medium bg-slate-100 text-slate-500"},te={class:"text-[11px] uppercase tracking-wide text-slate-400 mt-0.5"},ee=["onClick"],se={class:"text-sm text-slate-500 mb-4 min-h-[2.5rem] line-clamp-2"},le={class:"flex flex-wrap gap-1.5 mb-4"},ae={key:0,class:"px-2 py-0.5 rounded-full text-[11px] font-medium bg-amber-50 text-amber-700 ring-1 ring-amber-100"},ne={class:"px-2 py-0.5 rounded-full text-[11px] font-medium bg-slate-50 text-slate-600 ring-1 ring-slate-100"},ie={class:"mt-auto border-t border-slate-100 pt-3 space-y-1.5"},oe={class:"text-slate-500"},re={class:"text-slate-900 font-semibold tabular-nums"},ue={class:"text-slate-300 font-normal"},de={key:0,class:"text-xs text-slate-300 italic"},pe={class:"space-y-4"},ce={class:"grid grid-cols-2 gap-3"},me={class:"grid grid-cols-3 gap-3 items-end"},xe={class:"flex items-center gap-2 pb-2"},ve={class:"flex items-center gap-2 pb-2"},ge={class:"space-y-2 pt-2 border-t border-slate-100"},fe={class:"col-span-5 text-xs text-slate-700"},he={class:"col-span-4"},ye={class:"col-span-3"},be=["disabled"],_e={key:0,class:"pi pi-spin pi-spinner mr-2"},we=vt({__name:"CsmPlans",props:{plans:{},limitTypes:{},loadingPlans:{type:Boolean}},emits:["saved"],setup(I,{emit:q}){const F=I,G=q,w=g(!1),p=g(null),C=g(!1),a=At({name:"",plan_type:"",description:"",is_active:!0,overrage:!1,default_duration_days:null,limits:{}});function A(v){const n={};for(const k of F.limitTypes){const x=v?.limits.find(T=>T.limit_type_key===k.key);n[k.key]={value:x?x.limit_value:0,period:x?x.period_type:mt(k.key)}}return n}function O(){p.value=null,a.name="",a.plan_type="",a.description="",a.is_active=!0,a.overrage=!1,a.default_duration_days=null,a.limits=A(),w.value=!0}function J(v){p.value=v,a.name=v.name,a.plan_type=v.plan_type,a.description=v.description,a.is_active=v.is_active,a.overrage=v.overrage,a.default_duration_days=v.default_duration_days??null,a.limits=A(v),w.value=!0}async function $(){if(!(!a.name||!a.plan_type)){C.value=!0;try{const v=F.limitTypes.map(x=>({limit_type_key:x.key,limit_value:a.limits[x.key]?.value??0,period_type:a.limits[x.key]?.period??mt(x.key)})),n={name:a.name,plan_type:a.plan_type,description:a.description,is_active:a.is_active,overrage:a.overrage,default_duration_days:a.default_duration_days??null,limits:v};if(!(p.value?await Ft(p.value.id,n):await Ot(n)))return;w.value=!1,G("saved")}finally{C.value=!1}}}return(v,n)=>{const k=D("ProgressSpinner"),x=D("InputText"),T=D("Textarea"),U=D("InputNumber"),y=D("Checkbox"),K=D("Select"),M=D("Dialog");return r(),u("div",null,[t("div",{class:"flex items-center justify-between mb-4"},[n[9]||(n[9]=t("p",{class:"text-sm text-slate-500"},"Subscription plans and their usage limits",-1)),t("button",{class:"btn-primary text-sm",onClick:O},[...n[8]||(n[8]=[t("i",{class:"pi pi-plus mr-2"},null,-1),b(" New plan ",-1)])])]),I.loadingPlans?(r(),u("div",Gt,[_(k)])):(r(),u("div",Jt,[(r(!0),u(j,null,R(I.plans,i=>(r(),u("div",{key:i.id,class:"group relative bg-white rounded-2xl ring-1 ring-slate-200/70 shadow-sm hover:shadow-md transition-all p-5 flex flex-col"},[t("div",Kt,[t("div",Qt,[t("div",Wt,[t("h3",Xt,o(i.name),1),i.is_active?V("",!0):(r(),u("span",Zt,"inactive"))]),t("p",te,o(i.plan_type),1)]),t("button",{class:"opacity-0 group-hover:opacity-100 transition-opacity text-xs font-medium text-violet-600 hover:text-violet-700",onClick:f=>J(i)},"Edit",8,ee)]),t("p",se,o(i.description||"No description"),1),t("div",le,[i.overrage?(r(),u("span",ae,"Overrage allowed")):V("",!0),t("span",ne,o(i.default_duration_days!=null?i.default_duration_days+"d trial":"No expiry"),1)]),t("div",ie,[(r(!0),u(j,null,R(i.limits,f=>(r(),u("div",{key:f.limit_type_key,class:"flex justify-between items-center text-xs"},[t("span",oe,o(f.limit_type_name),1),t("span",re,[b(o(f.limit_value.toLocaleStr
1ing()),1),t("span",ue," / "+o(f.period_type),1)])]))),128)),i.limits?.length?V("",!0):(r(),u("p",de,"No limits configured"))])]))),128))])),_(M,{visible:w.value,"onUpdate:visible":n[7]||(n[7]=i=>w.value=i),modal:"",header:p.value?`Edit ${p.value.name}`:"Create plan",style:{width:"560px"}},{footer:dt(()=>[t("button",{class:"btn-secondary",onClick:n[6]||(n[6]=i=>w.value=!1)},"Cancel"),t("button",{class:"btn-primary",disabled:C.value||!a.name||!a.plan_type,onClick:$},[C.value?(r(),u("i",_e)):V("",!0),b(" "+o(C.value?"Saving…":p.value?"Save":"Create"),1)],8,be)]),default:dt(()=>[t("div",pe,[t("div",ce,[t("div",null,[n[10]||(n[10]=t("label",{class:"block text-xs font-medium text-slate-700 mb-1"},"Name",-1)),_(x,{modelValue:a.name,"onUpdate:modelValue":n[0]||(n[0]=i=>a.name=i),class:"w-full !text-sm",placeholder:"e.g. Growth"},null,8,["modelValue"])]),t("div",null,[n[11]||(n[11]=t("label",{class:"block text-xs font-medium text-slate-700 mb-1"},"Plan type",-1)),_(x,{modelValue:a.plan_type,"onUpdate:modelValue":n[1]||(n[1]=i=>a.plan_type=i),class:"w-full !text-sm",placeholder:"e.g. enterprise"},null,8,["modelValue"])])]),t("div",null,[n[12]||(n[12]=t("label",{class:"block text-xs font-medium text-slate-700 mb-1"},"Description",-1)),_(T,{modelValue:a.description,"onUpdate:modelValue":n[2]||(n[2]=i=>a.description=i),rows:"2",class:"w-full !text-sm",placeholder:"Short description"},null,8,["modelValue"])]),t("div",me,[t("div",null,[n[13]||(n[13]=t("label",{class:"block text-xs font-medium text-slate-700 mb-1"},"Trial (days)",-1)),_(U,{modelValue:a.default_duration_days,"onUpdate:modelValue":n[3]||(n[3]=i=>a.default_duration_days=i),min:0,class:"w-full","input-class":"!text-sm w-full",placeholder:"∞"},null,8,["modelValue"])]),t("div",xe,[_(y,{modelValue:a.is_active,"onUpdate:modelValue":n[4]||(n[4]=i=>a.is_active=i),binary:!0,"input-id":"plan-active"},null,8,["modelValue"]),n[14]||(n[14]=t("label",{for:"plan-active",class:"text-sm text-slate-700"},"Active",-1))]),t("div",ve,[_(y,{modelValue:a.overrage,"onUpdate:modelValue":n[5]||(n[5]=i=>a.overrage=i),binary:!0,"input-id":"plan-overrage"},null,8,["modelValue"]),n[15]||(n[15]=t("label",{for:"plan-overrage",class:"text-sm text-slate-700"},"Overrage",-1))])]),t("div",ge,[n[16]||(n[16]=t("h3",{class:"text-sm font-semibold text-slate-900"},"Usage limits",-1)),(r(!0),u(j,null,R(I.limitTypes,i=>(r(),u("div",{key:i.key,class:"grid grid-cols-12 gap-2 items-center"},[t("label",fe,o(i.name),1),t("div",he,[_(U,{modelValue:a.limits[i.key].value,"onUpdate:modelValue":f=>a.limits[i.key].value=f,min:0,class:"w-full","input-class":"!text-sm w-full"},null,8,["modelValue","onUpdate:modelValue"])]),t("div",ye,[_(K,{modelValue:a.limits[i.key].period,"onUpdate:modelValue":f=>a.limits[i.key].period=f,options:S(It),"option-label":"label","option-value":"value",class:"w-full !text-sm"},null,8,["modelValue","onUpdate:modelValue","options"])])]))),128))])])]),_:1},8,["visible","header"])])}}}),ke=Object.assign(we,{__name:"CsmPlans"}),Ce={class:"w-full min-h-full bg-slate-50"},$e={class:"container mx-auto p-6 lg:p-8"},Se={key:0,class:"bg-white rounded-2xl ring-1 ring-slate-200/70 shadow-sm p-12 text-center"},Ve={class:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6"},Pe={class:"group relative overflow-hidden rounded-2xl bg-white ring-1 ring-slate-200/70 shadow-sm hover:shadow-md hover:-translate-y-0.5 transition-all duration-200 p-5"},De={class:"mt-3 text-3xl font-bold tracking-tight text-slate-900 tabular-nums"},Ae={class:"mt-1 text-xs text-slate-400"},Te={class:"group relative overflow-hidden rounded-2xl bg-white ring-1 ring-slate-200/70 shadow-sm hover:shadow-md hover:-translate-y-0.5 transition-all duration-200 p-5"},Ue={class:"mt-3 text-3xl font-bold tracking-tight text-slate-900 tabular-nums"},Me={class:"mt-1 text-xs text-slate-400"},je={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-white to-violet-50/50 ring-1 ring-violet-200/60 shadow-sm hover:shadow-md hover:-translate-y-0.5 transition-all duration-200 p-5"},Ne={class:"mt-3 text-3xl font-bold tracking-tight text-slate-900 tabular-nums"},Re={class:"mt-1 text-xs text-violet-500/70"},Ie={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-white to-violet-50/50 ring-1 ring-violet-200/60 shadow-sm hover:shadow-md hover:-translate-y-0.5 transition-all duration-200 p-5"},Fe={class:"mt-3 text-3xl font-bold tracking-tight text-slate-900 tabular-nums"},Oe={class:"bg-white rounded-2xl ring-1 ring-slate-200/70 shadow-sm p-6 mb-8"},Ee={class:"flex items-start justify-between mb-4"},Le={class:"text-right"},Be={class:"text-2xl font-bold tabular-nums text-slate-900 leading-none"},ze={key:1,class:"py-12 text-center text-sm text-slate-400"},He={class:"flex items-center gap-1 mb-6"},Ye=["onClick"],qe={key:0},Ge={class:"flex flex-wrap items-center gap-3 mb-4"},Je={class:"relative flex-1 min-w-[220px] max-w-md"},Ke={class:"inline-flex items-center gap-0.5 p-1 rounded-xl bg-slate-100/80"}
1,Qe=["onClick"],We={class:"tabular-nums text-slate-400"},Xe=["disabled"],Ze={key:0,class:"flex justify-center items-center py-20"},ts={key:1,class:"rounded-2xl bg-white ring-1 ring-slate-200/70 shadow-sm overflow-hidden"},es={class:"w-full"},ss={class:"border-b border-slate-100"},ls={class:"inline-flex items-center gap-1"},as={class:"inline-flex items-center gap-1"},ns={class:"inline-flex items-center gap-1"},is={class:"inline-flex items-center gap-1 justify-end"},os={class:"divide-y divide-slate-50"},rs=["onClick"],us={class:"px-5 py-3.5"},ds={class:"flex items-center gap-3"},ps={class:"min-w-0"},cs={class:"text-sm font-semibold text-slate-900 truncate"},ms={class:"text-xs text-slate-400 font-mono truncate max-w-[220px]"},xs={class:"px-3 py-3.5"},vs={class:"px-3 py-3.5"},gs={key:1,class:"text-xs text-slate-300"},fs={class:"px-3 py-3.5 text-right"},hs={class:"px-3 py-3.5"},ys={class:"px-3 py-3.5 text-right"},bs={class:"inline-flex items-center gap-1.5 text-sm text-slate-600 tabular-nums"},_s={class:"px-3 py-3.5"},ws={class:"flex items-center justify-end gap-1"},ks=["onClick"],Cs=["onClick"],$s=["onClick"],Ss={key:0},Vs={key:0,class:"flex items-center justify-between px-5 py-3 border-t border-slate-100 text-xs text-slate-500"},Ps={class:"tabular-nums"},Ds={key:0,class:"flex items-center gap-1"},As=["disabled"],Ts={class:"px-2 tabular-nums"},Us=["disabled"],L=25,Is=vt({__name:"index",setup(I){const q=Tt(),F=c(()=>q.isOriginalAdmin),G=c(()=>[{id:"customers",label:"Customers",icon:"pi pi-building",count:p.value.length},{id:"plans",label:"Plans",icon:"pi pi-tag",count:C.value.length}]),w=g("customers"),p=g([]),C=g([]),a=g([]),A=g(!1),O=g(!1),J=c(()=>{const s=new Map;for(const e of p.value)s.set(e.id,xt(e));return s});function $(s){return J.value.get(s.id)??xt(s)}const v=g(""),n=g("all"),k=g([]),x=g(!1),T=g("fee"),U=g("desc"),y=g(1),K=c(()=>C.value.map(s=>({label:s.name,value:s.id}))),M=c(()=>{const s=v.value.trim().toLowerCase();let e=p.value;return s&&(e=e.filter(d=>(d.name||"").toLowerCase().includes(s)||(d.slug||"").toLowerCase().includes(s))),k.value.length&&(e=e.filter(d=>d.plan_id!=null&&k.value.includes(d.plan_id))),x.value&&(e=e.filter(d=>(d.price_usd_monthly||0)>0)),e});function i(s,e){return e==="all"?!0:e==="atrisk"?["cooling","declining"].includes($(s).key):$(s).key===e}const f=c(()=>{let s=M.value;n.value!=="all"&&(s=s.filter(d=>i(d,n.value)));const e=U.value==="asc"?1:-1;return[...s].sort((d,h)=>{switch(T.value){case"fee":return((d.price_usd_monthly||0)-(h.price_usd_monthly||0))*e;case"seats":return((d.user_count||0)-(h.user_count||0))*e;case"expires":{const l=d.expires_at?new Date(d.expires_at).getTime():1/0,P=h.expires_at?new Date(h.expires_at).getTime():1/0;return(l-P)*e}default:return(d.name||d.slug).localeCompare(h.name||h.slug)*e}})}),Q=c(()=>Math.max(1,Math.ceil(f.value.length/L))),st=c(()=>f.value.slice((y.value-1)*L,y.value*L)),gt=c(()=>f.value.length?(y.value-1)*L+1:0),ft=c(()=>Math.min(y.value*L,f.value.length));Ut([v,n,k,x],()=>y.value=1);function B(s){return T.value!==s?"pi-sort text-slate-300":U.value==="asc"?"pi-sort-up-fill text-violet-500":"pi-sort-down-fill text-violet-500"}function z(s){T.value===s?U.value=U.value==="asc"?"desc":"asc":(T.value=s,U.value=s==="name"?"asc":"desc")}const ht=c(()=>[{key:"all",label:"All",dot:"",count:M.value.length},{key:"healthy",label:"Healthy",dot:"bg-emerald-500",count:M.value.filter(s=>$(s).key==="healthy").length},{key:"atrisk",label:"At risk",dot:"bg-amber-500",count:M.value.filter(s=>i(s,"atrisk")).length},{key:"dormant",label:"Dormant",dot:"bg-slate-400",count:M.value.filter(s=>$(s).key==="dormant").length}]),yt=c(()=>p.value.filter(s=>s.status==="active").length),bt=c(()=>p.value.filter(s=>i(s,"atrisk")).length),W=c(()=>p.value.reduce((s,e)=>s+(e.price_usd_monthly||0),0)),H=c(()=>p.value.filter(s=>(s.price_usd_monthly||0)>0).length),_t=c(()=>H.value?W.value/H.value:0),lt=c(()=>W.value*12),wt=c(()=>p.value.length?Math.round(H.value/p.value.length*100):0),at=c(()=>{const s=new Date,e=[];for(let d=11;d>=0;d--){const h=new Date(s.getFullYear(),s.getMonth()-d,1),l=new Date(h.getFullYear(),h.getMonth()+1,0,23,59,59),P=p.value.reduce((Y,E)=>{const ut=E.price_usd_monthly||0;return ut<=0||!E.started_at||new Date(E.started_at)>l||E.expires_at&&new Date(E.expires_at)<h?Y:Y+ut*12},0);e.push({label:h.toLocaleDateString("en-US",{month:"short",year:"2-digit"}),arr:P})}return e}),X=c(()=>{const s=at.value;return s.length?s[s.length-1].arr-s[0].arr:0}),kt={chartType:"AreaChart",x:"month",y:"arr",yAxisTitle:"ARR (USD)",legend:!1,colorPalette:["#7c3aed"],downloadableData:!0,downloadableImage:!0},Ct=c(()=>({headers:["month","arr"],rows:at.value.map(s=>[s.label,s.arr])}));async function Z(){A.value=!0;try{p.value=await Lt()}finally{A.value=!1}}async function nt(){O.value=!0;try{const s=await Bt();s&&(C.value=s.plans,a.value=s.limit_types)}finally{O.value=!1}}Mt(()=>{F.value&&(Z(),nt())});function it(s){ct(`/csm/companies/${s}`)}const $t=qt();function St(s){const e=s.name||s.slug,d=`Do a deep dive into the customer "${e}" (workspace slug: ${s.slug}). Analyze how their usage and engagement have developed over time, which users have dropped off or gone inactive, which users are accelerating their usage, and what the next steps should be for our customer success team to retain and grow this account.`,h=$t.createThread(`Deep dive: ${e}`.slice(0,50),"");localStorage.setItem("pendingQuery",d),ct(`/home/${h}`)}const tt=g(!1),ot=g(null);function Vt(s){ot.value=s,tt.value=!0}function rt(s){return Math.ceil((new Date(s).getTime()-Date.now())/864e5)}function Pt(s){if(!s.status)return"—";if(!s.expires_at)return"Auto-renews";const e=rt(s.expires_at);return e<0?`Expired ${Math.abs(e)}d ago`:e===0?"Today":e<=60?`in ${e}d`:new Date(s.expires_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function Dt(s){if(!s.status)return"text-slate-300";if(!s.expires_at)return"text-slate-400";const e=rt(s.expires_at);return e<0?"text-rose-600 font-medium":e<=14?"text-amber-600 font-medium":"text-slate-600"}return(s,e)=>{const d=D("MultiSelect"),h=D("ProgressSpinner");return r(),u("div",Ce,[t("div",$e,[F.value?(r(),u(j,{key:1},[e[37]||(e[37]=t("div",{class:"mb-8"},[t("p",{class:"text-[11px] font-semibold uppercase tracking-[0.18em] text-violet-500 mb-1.5"},"Admin · CSM"),t("h1",{class:"text-[28px] leading-none font-bold text-slate-900 tracking-tight"},"Customer Success"),t("p",{class:"text-slate-500 mt-2 text-sm"},"Accounts, subscriptions, revenue and plans — all in one place.")],-1)),t("div",Ve,[t("div",Pe,[e[11]||(e[11]=t("div",{class:"flex items-start justify-between"},[t("span",{class:"text-[11px] font-semibold uppercase tracking-[0.1em] text-slate-400"},"Active accounts"),t("i",{class:"pi pi-check-circle text-slate-300 group-hover:text-emerald-400 transition-colors text-sm"})],-1)),t("p",De,o(yt.value),1),t("p",Ae,"of "+o(p.value.length)+" · "+o(bt.value)+" at risk",1),e[12]||(e[12]=t("div",{class:"absolute inset-x-0 bottom-0 h-[3px] bg-gradient-to-r from-emerald-500 to-teal-500 opacity-0 group-hover:opacity-100 transition-opacity"},null,-1))]),t("div",Te,[e[13]||(e[13]=t("div",{class:"flex items-start justify-between"},[t("span",{class:"text-[11px] font-semibold uppercase tracking-[0.1em] text-slate-400"},"Paying customers"),t("i",{class:"pi pi-credit-card text-slate-300 group-hover:text-cyan-400 transition-colors text-sm"})],-1)),t("p",Ue,o(H.value),1),t("p",Me,o(wt.value)+"% of accounts",1),e[14]||(e[14]=t("div",{class:"absolute inset-x-0 bottom-0 h-[3px] bg-gradient-to-r from-cyan-500 to-blue-500 opacity-0 group-hover:opacity-100 transition-opacity"},null,-1))]),t("div",je,[e[15]||(e[15]=t("div",{class:"flex items-start justify-between"},[t("span",{class:"text-[11px] font-semibold uppercase tracking-[0.1em] text-violet-500/80"},"MRR"),t("i",{class:"pi pi-dollar text-violet-300 group-hover:text-violet-500 transition-colors text-sm"})],-1)),t("p",Ne,o(S(N)(W.value)),1),t("p",Re,o(S(N)(_t.value))+" ARPA",1),e[16]||(e[16]=t("div",{class:"absolute inset-x-0 bottom-0 h-[3px] bg-gradient-to-r from-violet-500 to-fuchsia-500 opacity-0 group-hover:opacity-100 transition-opacity"},null,-1))]),t("div",Ie,[e[17]||(e[17]=t("div",{class:"flex items-start justify-between"},[t("span",{class:"text-[11px] font-semibold uppercase tracking-[0.1em] text-violet-500/80"},"ARR"),t("i",{class:"pi pi-chart-line text-violet-300 group-hover:text-violet-500 transition-colors text-sm"})],-1)),t("p",Fe,o(S(N)(lt.value)),1),e[18]||(e[18]=t("p",{class:"mt-1 text-xs text-violet-500/70"},"annualized run-rate",-1)),e[19]||(e[19]=t("div",{class:"absolute inset-x-0 bottom-0 h-[3px] bg-gradient-to-r from-fuchsia-500 to-pink-500 opacity-0 group-hover:opacity-100 transition-opacity"},null,-1))])]),t("div",Oe,[t("div",Ee,[e[20]||(e[20]=t("div",null,[t("h2",{class:"text-base font-semibold text-slate-900"},"ARR over time"),t("p",{class:"text-sm text-slate-400"},"Annual recurring run-rate, trailing 12 months")],-1)),t("div",Le,[t("p",Be,o(S(N)(lt.value)),1),t("p",{class:m(["text-xs mt-1",X.value>=0?"text-emerald-600":"text-rose-600"])},[t("i",{class:m([X.value>=0?"pi pi-arrow-up-right":"pi pi-arrow-down-right","text-[10px]"])},null,2),b(" "+o(S(N)(Math.abs(X.value)))+" last 12 mo ",1)],2)])]),p.value.length?(r(),pt(Rt,{key:0,"chart-config":kt,"csv-data":Ct.value,height:"260px"},null,8,["csv-data"])):(r(),u("div",ze,"No revenue data yet"))]),t("div",He,[(r(!0),u(j,null,R(G.value,l=>(r(),u("button",{key:l.id,class:m(["flex items-center gap-2 px-3.5 py-2 rounded-xl text-sm font-medium transition-all",w.value===l.id?"bg-slate-900 text-white shadow-sm":"text-slate-500 hover:text-slate-900 hover:bg-slate-100"]),onClick:P=>w.value=l.id},[t("i",{class:m([l.icon,"text-xs"])},null,2),b(" "+o(l.label)+" ",1),t("span",{class:m(["px-1.5 py-0.5 text-[11px] rounded-md tabular-nums",w.value===l.id?"bg-white/20 text-white":"bg-slate-200/70 text-slate-500"])},o(l.count),3)],10,Ye))),128))]),w.value==="customers"?(r(),u("div",qe,[t("div",Ge,[t("div",Je,[e[21]||(e[21]=t("i",{class:"pi pi-search absolute left-3.5 to
1p-1/2 -translate-y-1/2 text-slate-400 text-sm"},null,-1)),jt(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>v.value=l),type:"text",placeholder:"Search accounts…",class:"w-full h-10 pl-10 pr-3 text-sm rounded-xl bg-white ring-1 ring-slate-200 focus:ring-2 focus:ring-violet-400 focus:outline-none transition-all placeholder:text-slate-400"},null,512),[[Nt,v.value]])]),t("div",Ke,[(r(!0),u(j,null,R(ht.value,l=>(r(),u("button",{key:l.key,class:m(["px-3 py-1.5 rounded-lg text-xs font-medium transition-all flex items-center gap-1.5",n.value===l.key?"bg-white text-slate-900 shadow-sm":"text-slate-500 hover:text-slate-700"]),onClick:P=>n.value=l.key},[l.dot?(r(),u("span",{key:0,class:m(["w-1.5 h-1.5 rounded-full",l.dot])},null,2)):V("",!0),b(" "+o(l.label)+" ",1),t("span",We,o(l.count),1)],10,Qe))),128))]),_(d,{modelValue:k.value,"onUpdate:modelValue":e[1]||(e[1]=l=>k.value=l),options:K.value,"option-label":"label","option-value":"value",placeholder:"All plans","max-selected-labels":1,"selected-items-label":"{0} plans",class:"!text-sm w-44",pt:{root:{class:"!rounded-xl !ring-1 !ring-slate-200 !border-0 !h-10 items-center"}}},null,8,["modelValue","options"]),t("button",{class:m(["h-10 px-3.5 rounded-xl text-sm font-medium ring-1 transition-all flex items-center gap-2",x.value?"bg-violet-50 text-violet-700 ring-violet-200":"bg-white text-slate-500 ring-slate-200 hover:text-slate-900"]),onClick:e[2]||(e[2]=l=>x.value=!x.value)},[t("i",{class:m(["pi",x.value?"pi-check-circle":"pi-dollar"])},null,2),e[22]||(e[22]=b(" Paying only ",-1))],2),t("button",{class:"ml-auto h-10 w-10 grid place-items-center rounded-xl bg-white ring-1 ring-slate-200 text-slate-500 hover:text-slate-900 hover:ring-slate-300 transition-all",title:"Refresh",disabled:A.value,onClick:Z},[t("i",{class:m(["pi pi-refresh text-sm",{"pi-spin":A.value}])},null,2)],8,Xe)]),A.value?(r(),u("div",Ze,[_(h)])):(r(),u("div",ts,[t("table",es,[t("thead",null,[t("tr",ss,[t("th",{class:"text-left font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-5 py-3 cursor-pointer select-none",onClick:e[3]||(e[3]=l=>z("name"))},[t("span",ls,[e[23]||(e[23]=b("Account ",-1)),t("i",{class:m(["pi text-[9px]",B("name")])},null,2)])]),e[27]||(e[27]=t("th",{class:"text-left font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-3 py-3"},"Health",-1)),e[28]||(e[28]=t("th",{class:"text-left font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-3 py-3"},"Plan",-1)),t("th",{class:"text-right font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-3 py-3 cursor-pointer select-none",onClick:e[4]||(e[4]=l=>z("fee"))},[t("span",as,[e[24]||(e[24]=b("MRR ",-1)),t("i",{class:m(["pi text-[9px]",B("fee")])},null,2)])]),t("th",{class:"text-left font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-3 py-3 cursor-pointer select-none",onClick:e[5]||(e[5]=l=>z("expires"))},[t("span",ns,[e[25]||(e[25]=b("Renews ",-1)),t("i",{class:m(["pi text-[9px]",B("expires")])},null,2)])]),t("th",{class:"text-right font-semibold text-[11px] uppercase tracking-[0.08em] text-slate-400 px-3 py-3 cursor-pointer select-none",onClick:e[6]||(e[6]=l=>z("seats"))},[t("span",is,[e[26]||(e[26]=b("Seats ",-1)),t("i",{class:m(["pi text-[9px]",B("seats")])},null,2)])]),e[29]||(e[29]=t("th",{class:"w-24 px-3 py-3"},null,-1))])]),t("tbody",os,[(r(!0),u(j,null,R(st.value,l=>(r(),u("tr",{key:l.id,class:"group cursor-pointer hover:bg-slate-50/70 transition-colors",onClick:P=>it(l.id)},[t("td",us,[t("div",ds,[t("div",{class:m(["w-9 h-9 rounded-xl grid place-items-center text-white text-[11px] font-bold shrink-0 shadow-sm",S(zt)(l.name||l.slug)])},o(S(Ht)(l.name||l.slug)),3),t("div",ps,[t("div",cs,o(l.name||"Untitled"),1),t("div",ms,o(l.slug),1)])])]),t("td",xs,[t("span",{class:m(["inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ring-1",[$(l).pill,$(l).ring]])},[t("span",{class:m(["w-1.5 h-1.5 rounded-full",$(l).dot])},null,2),b(" "+o($(l).label),1)],2)]),t("td",vs,[l.plan_name?(r(),u("span",{key:0,class:m(["inline-flex px-2 py-0.5 rounded-md text-xs font-medium ring-1",S(Yt)(l.plan_type)])},o(l.plan_name),3)):(r(),u("span",gs,"No plan"))]),t("td",fs,[t("span",{class:m(["text-sm font-semibold tabular-nums",l.price_usd_monthly?"text-slate-900":"text-slate-300"])},o(l.price_usd_monthly?S(N)(l.price_usd_monthly):"—"),3)]),t("td",hs,[t("span",{class:m(["text-sm",Dt(l)])},o(Pt(l)),3)]),t("td",ys,[t("span",bs,[e[30]||(e[30]=t("i",{class:"pi pi-users text-[11px] text-slate-300"},null,-1)),b(o(l.user_count),1)])]),t("td",_s,[t("div",ws,[t("button",{class:"h-7 w-7 grid place-items-center rounded-lg text-violet-500 hover:text-white hover:bg-gradient-to-r hover:from-cyan-500 hover:to-purple-600 transition-all",title:"Deep dive with Milo",onClick:et(P=>St(l),["stop"])},[...e[31]||(e[31]=[t("i",{class:"pi pi-sparkles text-xs"},null,-1)])],8,ks),t("button",{class:"h-7 w-7 grid place-items-center rounded-lg text-slate-400 hover:text-violet-600 hover:bg-violet-50 transition-colors",title:"Edit subscription",onClick:et(P=>Vt(l),["stop"])},[...e[32]||(e[32]=[t("i",{class:"pi pi-pencil text-xs"},null,-1)])],8,Cs),t("button",{class:"h-7 w-7 grid place-items-center rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-colors",title:"Open account",onClick:et(P=>it(l.id),["stop"])},[...e[33]||(e[33]=[t("i",{class:"pi pi-arrow-up-right text-xs"},null,-1)])],8,$s)])])],8,rs))),128)),st.value.length===0?(r(),u("tr",Ss,[...e[34]||(e[34]=[t("td",{colspan:"7",class:"px-5 py-16 text-center"},[t("i",{class:"pi pi-inbox text-3xl text-slate-200 mb-3 block"}),t("p",{class:"text-sm text-slate-400"},"No accounts match your filters.")],-1)])])):V("",!0)])]),f.value.length?(r(),u("div",Vs,[t("span",Ps,o(gt.value)+"–"+o(ft.value)+" of "+o(f.value.length),1),Q.value>1?(r(),u("div",Ds,[t("button",{class:"h-7 w-7 grid place-items-center rounded-lg hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",disabled:y.value===1,onClick:e[7]||(e[7]=l=>y.value--)},[...e[35]||(e[35]=[t("i",{class:"pi pi-chevron-left text-[11px]"},null,-1)])],8,As),t("span",Ts,"Page "+o(y.value)+" / "+o(Q.value),1),t("button",{class:"h-7 w-7 grid place-items-center rounded-lg hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent",disabled:y.value===Q.value,onClick:e[8]||(e[8]=l=>y.value++)},[...e[36]||(e[36]=[t("i",{class:"pi pi-chevron-right text-[11px]"},null,-1)])],8,Us)])):V("",!0)])):V("",!0)]))])):V("",!0),w.value==="plans"?(r(),pt(ke,{key:1,plans:C.value,"limit-types":a.value,"loading-plans":O.value,onSaved:nt},null,8,["plans","limit-types","loading-plans"])):V("",!0)],64)):(r(),u("div",Se,[...e[10]||(e[10]=[t("i",{class:"pi pi-lock text-4xl text-slate-300 mb-4"},null,-1),t("h2",{class:"text-xl font-semibold text-slate-900 mb-2"},"Admin access required",-1),t("p",{class:"text-slate-500"},"You don't have permission to view this page.",-1)])]))]),_(Et,{visible:tt.value,"onUpdate:visible":e[9]||(e[9]=l=>tt.value=l),company:ot.value,plans:C.value,"limit-types":a.value,onSaved:Z},null,8,["visible","company","plans","limit-types"])])}}});
1export{Is 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.