1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-accounts-dialog-Cfr0AzFo.js","assets/react-DjeEnMrD.js","assets/budget-order-uqum3Aah.js","assets/use-collapsible-groups-CYEKm4mT.js","assets/modal-footer-j8ZPWV5N.js","assets/Transition-B5u01dY_.js","assets/icons-shell-WzGXSqC-.js","assets/set-aside-switch-copy-_eit75lk.js","assets/index-Bl2BYPyR.js","assets/plaid-connection-state-HYLG2_J1.js","assets/index-Cpm4bQWX.css","assets/csv-C5PsKr0F.js","assets/Menu-DkjSnF3y.js","assets/Popover-Dt1CqIyx.js","assets/Input-eyPI4qqc.js","assets/constants-BLaM1s-m.js","assets/tracking-subtype-field-BWgZ063P.js","assets/drilldown-popover-CyMwEFNU.js","assets/session-refresh-UBrA_X3I.js","assets/preset-query-options-DeTY0eh9.js","assets/ArrowsOutLineVertical.es-CyCcBjkZ.js","assets/ChartLine.es-DuwhLw1d.js","assets/Trash.es-WI9U2CEc.js","assets/format-CueUZGk5.js","assets/route-TdYpycaL.js","assets/use-account-icon-sources-DKv8sJ9L.js","assets/mobile-picker-drawer-vCeCwTH4.js","assets/widget-empty-state-BJpZx97v.js","assets/use-pending-review-counts-DdM0XWKF.js","assets/curated-category-tree-DsviY_4H.js"])))=>i.map(i=>d[i]); 2import{j as e,r as y}from"./react-DjeEnMrD.js";import{B as T,o as I,n as D,_ as P,az as R}from"./index-Bl2BYPyR.js";import{A}from"./csv-C5PsKr0F.js";import{S as m}from"./curated-category-tree-DsviY_4H.js";import{j as E,k as F,o as L,n as C,e as M,p as H}from"./icons-shell-WzGXSqC-.js";import{F as G,P as p}from"./set-aside-switch-copy-_eit75lk.js";import{C as w}from"./Collapse-BgQaMRXW.js";import{A as $,u as W}from"./add-account-provider-IWgSpvYz.js";import{A as h,a as V}from"./accounts-page-row-BZjkvk7K.js";import{c as x}from"./modal-footer-j8ZPWV5N.js";import{u as Y}from"./pending-approval-state-BXqE8nc_.js";import{a as U}from"./use-pending-review-counts-DdM0XWKF.js";import"./budget-order-uqum3Aah.js";import"./Transition-B5u01dY_.js";import"./plaid-connection-state-HYLG2_J1.js";import"./widget-empty-state-BJpZx97v.js";import"./use-account-icon-sources-DKv8sJ9L.js";import"./Popover-Dt1CqIyx.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"e89864ce01e9b3a47263c09339ae55bd240556de"};var o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="1433913b-5e79-4bfa-86dc-054a78fc9675",s._sentryDebugIdIdentifier="sentry-dbid-1433913b-5e79-4bfa-86dc-054a78fc9675")}catch{}})();function q(s){return s.kind==="closed"?`Closed (${s.accounts.length})`:s.kind==="favorites"?"Favorites":s.label}function b(s){const o=s.kind==="closed",l=s.kind==="favorites",r=l?null:s.total,i=r!==null&&r<0,c=q(s);let n=null;return s.kind==="type"&&(n=s.icon),e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:()=>s.onOpenChange(!s.open),"aria-expanded":s.open,className:x("flex w-full items-center gap-2","rounded-md px-2 h-9","text-xs font-semibold uppercase tracking-[0.04em]","text-muted-foreground","hover:bg-muted/50 transition-colors","outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[e.jsx(E,{className:x("size-3 shrink-0 text-icon-muted","transition-transform duration-150",s.open&&"rotate-90")}),n&&e.jsx(n,{className:"size-3.5 shrink-0 text-icon-muted"}),l&&e.jsx(F,{className:x("size-3.5 shrink-0",G),weight:"fill"}),e.jsx("span",{className:"flex-1 text-left",children:c}),l&&!s.open&&e.jsx("span",{className:"text-xs font-medium tabular-nums tracking-normal text-muted-foreground",children:s.accounts.length}),r!==null&&e.jsx("span",{className:x("text-xs font-medium tabular-nums tracking-normal text-right",i?"text-destructive":"text-muted-foreground"),children:s.formatBalance(r)})]}),e.jsx(w,{expanded:s.open,keepMounted:!1,children:e.jsxs("div",{className:"relative mt-1 pl-3 pb-1",children:[e.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute left-[6px] top-0.5 bottom-0.5 w-px bg-border/60"}),o||l?s.accounts.map(t=>e.jsx(h,{account:t,formatBalance:s.formatBalance},t.id)):e.jsxs(e.Fragment,{children:[s.ungrouped.map(t=>e.jsx(h,{account:t,formatBalance:s.formatBalance},t.id)),s.groups.filter(t=>t.members.length>0).map(t=>e.jsxs("div",{children:[e.jsx($,{name:t.name,total:t.total,memberCount:t.members.length,isExpanded:t.isExpanded,onToggle:()=>s.onGroupExpandedChange(t.id,!t.isExpanded),formatBalance:s.formatBalance}),e.jsx(w,{expanded:t.isExpanded,keepMounted:!1,children:e.jsx("div",{className:"pl-6",children:t.members.map(u=>e.jsx(h,{account:u,formatBalance:s.formatBalance},u.id))})})]},t.id))]})]})})]})}function J(s,o){const l=s.reduce((n,t)=>n+o(t),0),r=[],i=[];let c=0;for(const n of s){const t=o(n);i.length===0&&(r.length===0||c+t<=l/2)?(r.push(n),c+=t):i.push(n)}return{left:r,right:i}}const S=D(()=>P(()=>import("./manage-accounts-dialog-Cfr0AzFo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),"ManageAccountsDialog"),j=()=>{S.preload?.()};function K({budgetId:s}){const{nodes:o,isLoading:l,isEmpty:r,isSectionOpen:i,setSectionOpen:c,setGroupExpanded:n}
2=Y(s,"page"),{formatAmount:t}=U(),{openAddAccountDialog:u}=W(),[_,N]=y.useState(!1);if(l)return e.jsxs("div",{"data-testid":"accounts-skeleton",className:"flex flex-col flex-1 min-h-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 border-b border-border bg-background px-4 pt-4 pb-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(m,{className:"h-7 w-28"}),e.jsx(m,{className:"h-4 w-52"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(m,{className:"h-8 w-8 rounded-md"}),e.jsx(m,{className:"h-8 w-8 rounded-md"})]})]}),e.jsx("div",{className:"border-b border-border bg-background px-4 py-3 md:px-5 md:py-2.5",children:e.jsx(m,{className:"h-5 w-40"})}),e.jsx(p,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:gap-3",children:[e.jsx(m,{className:"h-12 w-full rounded-lg"}),e.jsx(m,{className:"h-12 w-full rounded-lg"}),e.jsx(m,{className:"h-12 w-full rounded-lg"})]})})]});const v=o.find(a=>a.kind==="favorites"),z=o.filter(a=>a.kind!=="favorites"),B=a=>a.kind!=="type"?1+a.accounts.length:1+a.ungrouped.length+a.groups.reduce((d,g)=>d+1+g.members.length,0),{left:O,right:k}=J(z,B),f=a=>{if(a.kind==="favorites")return e.jsx(b,{kind:"favorites",open:i("favorites"),onOpenChange:d=>c("favorites",d),accounts:a.accounts,formatBalance:t},"favorites");if(a.kind==="type"){const d=V[a.key];return e.jsx(b,{kind:"type",label:d.label,icon:d.icon,open:i(a.key),onOpenChange:g=>c(a.key,g),ungrouped:a.ungrouped,groups:a.groups,total:a.total,formatBalance:t,onGroupExpandedChange:n},a.key)}return e.jsx(b,{kind:"closed",open:i("closed"),onOpenChange:d=>c("closed",d),accounts:a.accounts,total:a.total,formatBalance:t},"closed")};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[e.jsxs("header",{className:"flex items-start justify-between gap-2 border-b border-border bg-background px-4 pt-4 pb-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Accounts"}),e.jsx("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:"Track balances across all your accounts."})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(A,{variant:"subtle",size:36,"aria-label":"Organize accounts",onClick:()=>N(!0),onMouseEnter:j,onFocus:j,onPointerDown:j,children:e.jsx(L,{size:16})}),e.jsx(A,{variant:"subtle",size:36,"aria-label":"Add account",onClick:u,children:e.jsx(C,{size:16})})]})]}),r?e.jsx(p,{children:e.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center",children:[e.jsx("div",{className:"rounded-full bg-primary/10 p-3",children:e.jsx(M,{className:"text-link",size:24})}),e.jsx("p",{className:"text-sm font-medium",children:"No accounts yet"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add an account to start tracking your finances"}),e.jsx(T,{size:"sm",onClick:u,leftSection:e.jsx(C,{size:16}),children:"Add your first account"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(I,{to:"/budget/$budgetId/accounts/all",params:{budgetId:s},className:"flex w-full items-center gap-2.5 border-b border-border bg-background px-4 py-3 text-sm font-medium transition-colors active:bg-muted md:px-5 md:py-2.5 md:hover:bg-muted",children:[e.jsx(H,{className:"shrink-0 text-muted-foreground",size:16}),e.jsx("span",{className:"flex-1 text-left",children:"All Transactions"}),e.jsx(E,{className:"shrink-0 text-muted-foreground",size:16})]}),e.jsxs(p,{reserveAddButtonSpace:!0,children:[v&&e.jsx("div",{className:"mb-2 md:mb-3",children:f(v)}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-start md:gap-3",children:[e.jsx("div",{className:"flex flex-col gap-2 md:flex-1 md:gap-3",children:O.map(f)}),k.length>0&&e.jsx("div",{className:"flex flex-col gap-2 md:flex-1 md:gap-3",children:k.map(f)})]})]})]})]}),_&&e.jsx(y.Suspense,{fallback:null,children:e.jsx(S,{open:!0,onOpenChange:N,budgetId:s})})]})}function ge(){const s=R.useParams();return e.jsx(K,{budgetId:s.budgetId})}export{ge as component}; 3//# sourceMappingURL=index-CrlcLATA.js.map
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.