1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9511],{1006:(e,t,a)=>{"use strict";function o(e){if(!e)return new Date;let[t,a,o]=e.split("T")[0].split("-").map(Number);return new Date(t,a-1,o)}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{month:"short",day:"numeric",year:"numeric"};return o(e).toLocaleDateString("en-US",t)}a.d(t,{TJ:()=>n,Zj:()=>o})},5530:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var o=a(7620);let n=o.forwardRef(function(e,t){let{title:a,titleId:n,...r}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},r),a?o.createElement("title",{id:n},a):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))})},14337:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>G});var o=a(54568),n=a(7620),r=a(88919),s=a(93637),l=a(93558),i=a(28055),c=a(64682),d=a(63598),m=a(20133),u=a(78036),_=a(86383),h=a(70509),p=a(1006),g=a(91882),y=a.n(g),x=a(88985),b=a(8526),v=a(37286),f=a(34743),j=a.n(f);function w(e){let{monthlyExpected:t,monthlyActual:a,breakdown:r,tipsStats:s,onViewHistory:l,monthLabel:i}=e,[c,d]=(0,n.useState)(!1),{symbol:m,currency:_}=(0,u.H)();(0,n.useEffect)(()=>d(!0),[]);let h=t>0?Math.min(Math.round(a/t*100),100):0,p=e=>isNaN(e)||!isFinite(e)?"".concat(m,"0"):new Intl.NumberFormat("en-US",{style:"currency",currency:_,minimumFractionDigits:0,maximumFractionDigits:0}).format(e);return c?(0,o.jsxs)("div",{className:"".concat(j().panel," ").concat(j().panelPadding),children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:j().label,children:i}),(0,o.jsx)("p",{className:j().largeAmount,children:p(a)}),(0,o.jsx)("div",{className:j().progressTrack,children:(0,o.jsx)("div",{className:j().progressFill,style:{width:"".concat(h,"%")}})}),(0,o.jsxs)("p",{className:j().progressText,children:[h,"% of ",p(t)," expected"]})]}),(0,o.jsx)("div",{className:j().divider}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:j().sectionTitle,children:"Breakdown"}),r.paychecks>0&&(0,o.jsxs)("div",{className:j().breakdownRow,children:[(0,o.jsx)("span",{className:j().breakdownLabel,children:"Paychecks"}),(0,o.jsx)("span",{className:j().breakdownValue,children:p(r.paychecks)})]}),r.tips>0&&(0,o.jsxs)("div",{className:j().breakdownRow,children:[(0,o.jsx)("span",{className:j().breakdownLabel,children:"Tips"}),(0,o.jsx)("span",{className:j().breakdownValue,children:p(r.tips)})]}),r.bonuses>0&&(0,o.jsxs)("div",{className:j().breakdownRow,children:[(0,o.jsx)("span",{className:j().breakdownLabel,children:"Bonuses"}),(0,o.jsx)("span",{className:j().breakdownValue,children:p(r.bonuses)})]}),r.other>0&&(0,o.jsxs)("div",{className:j().breakdownRow,children:[(0,o.jsx)("span",{className:j().breakdownLabel,children:"Other"}),(0,o.jsx)("span",{className:j().breakdownValue,children:p(r.other)})]}),0===r.paychecks&&0===r.tips&&0===r.bonuses&&0===r.other&&(0,o.jsx)("p",{className:j().emptyState,children:"No income logged yet"})]}),s.totalHours>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:j().divider}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:j().sectionTitle,children:"Tips Performance"}),(0,o.jsxs)("div",{className:j().statsGrid,children:[(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsxs)("div",{className:j().statValue,children:[(0,o.jsx)(x.A,{className:j().statIcon}),(0,o.jsx)("span",{children:s.totalHours.toFixed(1)})]}),(0,o.jsx)("p",{className:j().statLabel,children:"Hours"})]}),(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsxs)("span",{className:j().statValue,children:[m,s.avgPerHour.toFixed(2)]}),(0,o.jsxs)("p",{className:j().statLabel,children:[m,"/Hour"]})]}),(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsxs)("div",{className:j().statValue,children:[(0,o.jsx)(b.A,{className:j().statIcon}),(0,o.jsx)("span",{children:s.daysWorked})]}),(0,o.jsx)("p",{className:j().statLabel,children:"Days"})]})]})]})]}),(0,o.jsx)("div",{style:{marginTop:"1.25rem"},children:(0,o.jsxs)("button",{onClick:l,className:j().secondaryButton,children:[(0,o.jsx)(v.A,{}),"View History"]})})]}):(0,o.jsx)("div",{className:"".concat(j().panel," ").concat(j().panelPadding),style:{minHeight:300}})}var N=a(97509),k=a(48037),S=a(86336),C=a(5530),T=a(2255);function B(e){let{month:t,year:a,incomeLogs:r,onDayClick:s,onMonthChange:l}
1=e,[i,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(null),[_,h]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1),[x,b]=(0,n.useState)({width:0,height:0}),{symbol:v}=(0,u.H)();(0,n.useEffect)(()=>{c(!0);let e=()=>{y(window.innerWidth<640),b({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,n.useEffect)(()=>(_?(document.body.style.overflow="hidden",document.body.setAttribute("data-fullscreen-open","true")):(document.body.style.overflow="",document.body.removeAttribute("data-fullscreen-open")),()=>{document.body.style.overflow="",document.body.removeAttribute("data-fullscreen-open")}),[_]);let f=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],w=new Date(a,t+1,0).getDate(),B=new Date(a,t,1).getDay(),A=(e,t,a)=>"".concat(e,"-").concat(String(t+1).padStart(2,"0"),"-").concat(String(a).padStart(2,"0")),D=new Date,I=A(D.getFullYear(),D.getMonth(),D.getDate()),L=(0,n.useMemo)(()=>{let e={};return r.forEach(t=>{let a=(0,p.Zj)(t.date),o=A(a.getFullYear(),a.getMonth(),a.getDate());e[o]||(e[o]=[]),e[o].push(t)}),e},[r]),F=e=>L[e]||[],E=e=>F(e).reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);return e+(isNaN(a)?0:a)},0),R=e=>e>=1e3?"".concat(v).concat((e/1e3).toFixed(1),"k"):"".concat(v).concat(Math.round(e)),H=["January","February","March","April","May","June","July","August","September","October","November","December"],M=()=>{0===t?l(11,a-1):l(t-1,a)},P=()=>{11===t?l(0,a+1):l(t+1,a)};if(!i)return(0,o.jsx)("div",{className:"".concat(j().panel," ").concat(j().panelPadding),style:{minHeight:300}});let G=e=>{let{day:n,expanded:r=!1}=e,l=A(a,t,n),i=F(l).length>0,c=E(l),u=l===I,_=d===n,h=[j().dayCell,i?j().dayCellHasIncome:"",u?j().dayCellToday:""].filter(Boolean).join(" ");return(0,o.jsxs)("button",{onClick:()=>s(l),className:h,style:{minHeight:r?"60px":"48px",transform:_?"scale(1.02)":"scale(1)"},onMouseEnter:()=>m(n),onMouseLeave:()=>m(null),"aria-label":"".concat(H[t]," ").concat(n,", ").concat(a).concat(i?", ".concat(R(c)," earned"):""),children:[(0,o.jsx)("span",{className:j().dayNumber,children:n}),i&&(0,o.jsx)("span",{className:j().dayIncome,children:R(c)})]})};if(_){let e=g?{position:"fixed",top:0,left:0,width:"".concat(x.height,"px"),height:"".concat(x.width,"px"),transform:"rotate(90deg)",transformOrigin:"top left",marginLeft:"".concat(x.width,"px"),zIndex:99999,backgroundColor:"var(--bg-card, #111114)",display:"flex",flexDirection:"column",padding:0,overflow:"hidden"}:{position:"fixed",inset:0,zIndex:99999,backgroundColor:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem"},n=(0,o.jsx)("div",{style:e,onClick:e=>!g&&e.target===e.currentTarget&&h(!1),children:(0,o.jsxs)("div",{style:g?{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",padding:"0.5rem 0.5rem 0.75rem 0.5rem"}:{maxWidth:"56rem",maxHeight:"90vh",width:"95%",padding:"1.5rem",display:"flex",flexDirection:"column",background:"var(--bg-card, #111114)",border:"1px solid #27272a",borderRadius:"16px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)",overflow:"hidden"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:g?"0.375rem":"1rem",paddingBottom:g?"0.375rem":0,borderBottom:g?"1px solid #27272a":"none",flexShrink:0},children:[(0,o.jsx)("button",{onClick:M,style:{width:g?"40px":"32px",height:g?"40px":"32px",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-elevated, #18181b)",border:"1px solid #27272a",borderRadius:"8px",cursor:"pointer"},"aria-label":"Previous month",children:(0,o.jsx)(k.A,{style:{width:"18px",height:"18px",color:"var(--muted-foreground)"}})}),(0,o.jsxs)("h2",{style:{fontSize:g?"1.125rem":"1.25rem",fontWeight:600,color:"var(--foreground)"},children:[H[t]," ",a]}),(0,o.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,o.jsx)("button",{onClick:P,style:{width:g?"40px":"32px",height:g?"40px":"32px",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-elevated, #18181b)",border:"1px solid #27272a",borderRadius:"8px",cursor:"pointer"},"aria-label":"Next month",children:(0,o.jsx)(S.A,{style:{width:"18px",height:"18px",color:"var(--muted-foreground)"}})}),(0,o.jsx)("button",{onClick:()=>h(!1),style:{width:g?"40px":"32px",height:g?"40px":"32px",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-elevated, #18181b)",border:"1px solid #27272a",borderRadius:"8px",cursor:"pointer"},"aria-label":"Close fullscreen",children:(0,o.jsx)(C.A,{style:{width:"18px",height:"18px",color:"var(--muted-foreground)"}})})]})]}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gap:g?"3px":"4px",marginBottom:g?"0.125rem":"0.5rem",flexShrink:0},children:f.map(e=>(0,o.jsx)("div",{style:{fontSize:g?"0.6875rem":"0.75rem",fontWeight:600,color:"var(--muted-foreground)",textAlign:"center",padding:g?"0.125rem 0":"0.5rem 0"},children:e},e))}),(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridAutoRows:g?"1fr":void 0,gap:g?"3px":"8px",flex:1,overflow:"hidden"},children:[Array.from({length:B}).map((e,t)=>(0,o.jsx)("div",{},"empty-".concat(t))),Array.from({length:w}).map((e,n)=>{let r=n+1,l=A(a,t,r),i=F(l).length>0,c=E(l),d=l===I;return(0,o.jsxs)("button",{onClick:()=>{s(l),h(!1)},style:{aspectRatio:g?void 0:"1",minHeight:g?0:void 0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:i?"var(--success-light)":"var(--bg-elevated, #18181b)",border:d?"2px solid var(--success)":"1px solid #27272a",borderRadius:g?"6px":"8px",cursor:"pointer",padding:g?"0.125rem":"0.25rem"},"aria-label":"".concat(H[t]," ").concat(r,", ").concat(a).concat(i?", ".concat(R(c)," earned"):""),children:[(0,o.jsx)("span",{style:{fontSize:g?"1rem":"0.875rem",fontWeight:i?600:500,color:"var(--foreground)"},children:r}),i&&(0,o.jsx)("span",{style:{fontSize:g?"0.6875rem":"0.625rem",fontWeight:600,color:"var(--success)",marginTop:"2px"},children:R(c)})]},r)})]})]})});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"".concat(j().panel," ").concat(j().panelPadding),style:{minHeight:200,opacity:.5},children:(0,o.jsx)("p",{style:{textAlign:"center",padding:"2rem 0",color:"var(--text-muted)"},children:"Calendar expanded - tap X to close"})}),"undefined"!=typeof document&&(0,N.createPortal)(n,document.body)]})}return(0,o.jsxs)("div",{className:"".concat(j().panel," ").concat(j().panelPadding),children:[(0,o.jsx)(e=>{let{expanded:n=!1}
1=e;return(0,o.jsxs)("div",{className:j().calendarHeader,children:[(0,o.jsx)("button",{onClick:M,className:j().navButton,"aria-label":"Previous month",children:(0,o.jsx)(k.A,{})}),(0,o.jsxs)("h2",{className:j().calendarTitle,style:{fontSize:n?"1.25rem":"1rem"},children:[H[t]," ",a]}),(0,o.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,o.jsx)("button",{onClick:P,className:j().navButton,"aria-label":"Next month",children:(0,o.jsx)(S.A,{})}),(0,o.jsx)("button",{onClick:()=>h(!_),className:j().navButton,"aria-label":n?"Close fullscreen":"Expand calendar",children:n?(0,o.jsx)(C.A,{}):(0,o.jsx)(T.A,{})})]})]})},{}),(0,o.jsx)("div",{className:j().calendarGrid,style:{marginBottom:"0.5rem"},children:f.map(e=>(0,o.jsx)("div",{className:j().dayHeader,children:e},e))}),(0,o.jsxs)("div",{className:j().calendarGrid,children:[Array.from({length:B}).map((e,t)=>(0,o.jsx)("div",{className:j().dayCellEmpty},"empty-".concat(t))),Array.from({length:w}).map((e,t)=>(0,o.jsx)(G,{day:t+1},t+1))]})]})}var A=a(46139);function D(e){let{isOpen:t,onClose:a,date:r,logs:s,onAddEntry:l,onEditLog:i,onDeleteLog:c}=e,[_,h]=(0,n.useState)(!1),{symbol:p,currency:g}=(0,u.H)();(0,n.useEffect)(()=>h(!0),[]);let y=e=>isNaN(e)||!isFinite(e)?"".concat(p,"0.00"):new Intl.NumberFormat("en-US",{style:"currency",currency:g,minimumFractionDigits:2,maximumFractionDigits:2}).format(e),v=s.reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);return e+(isNaN(a)?0:a)},0),f=s.filter(e=>{var t;let a=(null==(t=e.notes)?void 0:t.toLowerCase())||"";return a.startsWith("tips:")||a.includes("tips")}),w=f.reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);return e+(isNaN(a)?0:a)},0),N=f.reduce((e,t)=>{let a="number"==typeof t.hours_worked?t.hours_worked:parseFloat(String(t.hours_worked||"0"));return e+(isNaN(a)?0:a)},0);return((0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,a]),(0,n.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),_&&t)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:j().overlay,onClick:a}),(0,o.jsxs)("div",{className:j().modal,style:{maxWidth:"480px"},onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)("div",{className:j().modalHeader,children:[(0,o.jsx)("h2",{className:j().modalTitle,children:(e=>{if(!e)return"";let[t,a,o]=e.split("-").map(Number);return new Date(t,a-1,o).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})})(r)}),(0,o.jsx)("button",{onClick:a,className:j().closeButton,"aria-label":"Close modal",children:(0,o.jsx)(C.A,{})})]}),(0,o.jsxs)("div",{className:j().modalContent,children:[N>0&&(0,o.jsxs)("div",{className:j().statsGrid,style:{marginBottom:"1.5rem"},children:[(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsx)("p",{className:j().statLabel,children:"TIPS"}),(0,o.jsx)("p",{className:j().statValue,style:{color:"var(--accent)"},children:y(w)})]}),(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsx)("p",{className:j().statLabel,children:"HOURS"}),(0,o.jsx)("p",{className:j().statValue,children:N.toFixed(1)})]}),(0,o.jsxs)("div",{className:j().statCard,children:[(0,o.jsxs)("p",{className:j().statLabel,children:[p,"/HR"]}),(0,o.jsxs)("p",{className:j().statValue,style:{color:"var(--accent)"},children:[p,(w/N).toFixed(2)]})]})]}),s.length>0?(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:j().sectionTitle,children:"ENTRIES"}),s.map(e=>{let t=(e=>{if(!e)return"Other";let t=e.toLowerCase();return t.startsWith("paycheck:")||t.includes("paycheck")?"Paycheck":t.startsWith("tips:")||t.includes("tips")?"Tips":t.startsWith("bonus:")||t.includes("bonus")?"Bonus":"Other"})(e.notes);return(0,o.jsxs)("div",{className:j().logEntry,children:[(0,o.jsxs)("div",{className:j().logEntryInfo,children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.25rem"},children:[(0,o.jsx)("span",{style:{fontSize:"0.625rem",fontWeight:600,padding:"2px 6px",borderRadius:"4px",backgroundColor:"var(--bg-elevated)",color:"var(--accent)",textTransform:"uppercase",letterSpacing:"0.03em"},children:t}),(0,o.jsx)("span",{className:j().logEntryAmount,children:y(e.amount)})]}),e.hours_worked&&Number(e.hours_worked)>0&&(0,o.jsxs)("div",{className:j().logEntryMeta,style:{display:"flex",alignItems:"center",gap:"4px"},children:[(0,o.jsx)(x.A,{style:{width:"12px",height:"12px"}}),(0,o.jsxs)("span",{children:[Number(e.hours_worked).toFixed(1)," hrs"]})]})]}),(0,o.jsxs)("div",{className:j().logEntryActions,children:[(0,o.jsx)("button",{onClick:()=>i(e),className:j().actionButton,"aria-label":"Edit entry",children:(0,o.jsx)(d.A,{})}),(0,o.jsx)("button",{onClick:()=>c(e.id),className:"".concat(j().actionButton," ").concat(j().actionButtonDanger),"aria-label":"Delete entry",children:(0,o.jsx)(m.A,{})})]})]},e.id)})]}):(0,o.jsxs)("div",{className:j().emptyState,children:[(0,o.jsx)(b.A,{className:j().emptyStateIcon}),(0,o.jsx)("p",{className:j().emptyStateText,children:"No income logged"}),(0,o.jsx)("p",{style:{fontSize:"0.875rem",color:"var(--text-muted)"},children:"Add an entry for this day"})]}),s.length>0&&(0,o.jsxs)("div",{style:{marginTop:"1.25rem",padding:"1rem",backgroundColor:"var(--bg-elevated)",borderRadius:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",border:"1px solid var(--border)"},children:[(0,o.jsx)("span",{className:j().label,children:"DAY TOTAL"}),(0,o.jsx)("span",{style:{fontSize:"1.5rem",fontWeight:700,color:"var(--text)"},children:y(v)})]})]}),(0,o.jsx)("div",{className:j().modalFooter,children:(0,o.jsxs)("button",{onClick:l,className:j().primaryButton,style:{width:"100%"},children:[(0,o.jsx)(A.A,{style:{width:"18px",height:"18px"}}),"Add Entry for This Day"]})})]})]}):null}var I=a(20511),L=a(54492);function F(e){let{month:t,year:a,expectedMonthly:r,incomeLogs:s}
1=e,[l,i]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),[m,_]=(0,n.useState)(!1),[h,g]=(0,n.useState)({width:0,height:0}),{symbol:y}=(0,u.H)();(0,n.useEffect)(()=>{i(!0)},[]),(0,n.useEffect)(()=>{let e=()=>{d(window.innerWidth<640),g({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,n.useEffect)(()=>(m?(document.body.style.overflow="hidden",document.body.setAttribute("data-fullscreen-open","true")):(document.body.style.overflow="",document.body.removeAttribute("data-fullscreen-open")),()=>{document.body.style.overflow="",document.body.removeAttribute("data-fullscreen-open")}),[m]);let x=new Date(a,t+1,0).getDate(),b=new Date;t===b.getMonth()&&a===b.getFullYear()&&b.getDate();let v={start:1,end:x},f=(0,n.useMemo)(()=>{let e=r/x,o=Array.from({length:x},(t,a)=>e*(a+1)),n=Array.from({length:x},(e,o)=>{let n=o+1;return s.filter(e=>{let o=(0,p.Zj)(e.date);return o.getMonth()===t&&o.getFullYear()===a&&o.getDate()<=n}).reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);return e+(isNaN(a)?0:a)},0)});return{labels:Array.from({length:v.end-v.start+1},(e,t)=>v.start+t),datasets:[{label:"Expected",data:o.slice(v.start-1,v.end),borderColor:"#94a3b8",backgroundColor:"#94a3b8",borderDash:[5,5],tension:0,fill:!1,pointRadius:0,pointHoverRadius:4,pointBackgroun
1dColor:"#94a3b8"},{label:"Actual",data:n.slice(v.start-1,v.end),borderColor:"#10b981",backgroundColor:"rgba(16, 185, 129, 0.1)",tension:.4,fill:!0,pointRadius:0,pointHoverRadius:6,pointBackgroundColor:"#10b981"}]}},[s,r,t,a,x,v]),w={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",align:"end",labels:{usePointStyle:!0,pointStyle:"circle",padding:16,font:{size:12}}},tooltip:{backgroundColor:"rgba(10, 10, 10, 0.95)",titleColor:"#fff",bodyColor:"rgba(255, 255, 255, 0.7)",borderColor:"rgba(255, 255, 255, 0.1)",borderWidth:1,padding:12,cornerRadius:8,displayColors:!0,boxPadding:4,callbacks:{title:e=>{let o=e[0].label;return"".concat(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t]," ").concat(o,", ").concat(a)},label:e=>{var t;let a=null!=(t=e.parsed.y)?t:0;return"".concat(e.dataset.label,": ").concat(y).concat(a.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}))}}}},scales:{x:{grid:{color:"var(--border)"},border:{display:!1},ticks:{maxRotation:0,callback:function(e,t){return c?t%2==0?this.getLabelForValue(e):"":t%3==0?this.getLabelForValue(e):""}}},y:{grid:{color:"var(--border)"},border:{display:!1},ticks:{callback:e=>e>=1e3?"".concat(y).concat((e/1e3).toFixed(0),"k"):"".concat(y).concat(e)},beginAtZero:!0}}};if(!l)return(0,o.jsx)("div",{className:j().chartContainer,style:{minHeight:300}});if(m){let e=c?{position:"fixed",top:0,left:0,width:"".concat(h.height,"px"),height:"".concat(h.width,"px"),transform:"rotate(90deg)",transformOrigin:"top left",marginLeft:"".concat(h.width,"px"),zIndex:99999,backgroundColor:"var(--bg-card, #111114)",display:"flex",flexDirection:"column",padding:0,overflow:"hidden"}:{position:"fixed",inset:0,zIndex:99999,backgroundColor:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem"},t=(0,o.jsx)("div",{style:e,onClick:e=>!c&&e.target===e.currentTarget&&_(!1),children:(0,o.jsxs)("div",{style:c?{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",padding:"0.5rem"}:{maxWidth:"64rem",maxHeight:"90vh",width:"95%",padding:"1.5rem",display:"flex",flexDirection:"column",background:"var(--bg-card, #111114)",border:"1px solid #27272a",borderRadius:"16px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:c?"0.5rem":"1rem",paddingBottom:c?"0.5rem":0,borderBottom:c?"1px solid #27272a":"none",flexShrink:0},children:[(0,o.jsx)("h3",{style:{fontSize:"1rem",fontWeight:600,color:"var(--foreground)",margin:0},children:"Income Progress"}),(0,o.jsx)("button",{onClick:()=>_(!1),style:{width:c?"40px":"32px",height:c?"40px":"32px",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-elevated, #18181b)",border:"1px solid #27272a",borderRadius:"8px",cursor:"pointer"},"aria-label":"Close fullscreen",children:(0,o.jsx)(C.A,{style:{width:"18px",height:"18px",color:"var(--muted-foreground)"}})})]}),(0,o.jsx)("div",{style:{flex:1,minHeight:c?0:"400px"},children:(0,o.jsx)(I.N1,{data:f,options:w})})]})});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:j().chartContainer,style:{minHeight:150,opacity:.5},children:(0,o.jsx)("p",{style:{textAlign:"center",padding:"2rem 0",color:"var(--text-muted)"},children:"Chart expanded - tap X to close"})}),"undefined"!=typeof document&&(0,N.createPortal)(t,document.body)]})}return(0,o.jsxs)("div",{className:j().chartContainer,children:[(0,o.jsxs)("div",{className:j().chartHeader,children:[(0,o.jsx)("h3",{className:j().chartTitle,children:"Income Progress"}),(0,o.jsx)("button",{onClick:()=>_(!0),className:j().navButton,"aria-label":"Expand chart",children:(0,o.jsx)(T.A,{})})]}),(0,o.jsx)("div",{style:{height:c?"200px":"360px"},children:(0,o.jsx)(I.N1,{data:f,options:w})})]})}L.t1.register(L.PP,L.kc,L.FN,L.No,L.hE,L.m_,L.s$,L.dN);var E=a(33670),R=a(43470),H=a(74166),M=a.n(H);function P(e){let{isOpen:t,onClose:a,log:s,sources:i,onSuccess:c}
1=e,[d,m]=(0,n.useState)(""),[_,h]=(0,n.useState)(""),[g,y]=(0,n.useState)(""),[b,v]=(0,n.useState)("paycheck"),[f,j]=(0,n.useState)(""),[w,N]=(0,n.useState)(""),[k,S]=(0,n.useState)(""),[T,B]=(0,n.useState)(!1),{symbol:A}=(0,u.H)(),D="other"===_;(0,n.useEffect)(()=>{if(s&&t){m(s.amount.toString()),!s.source_id&&s.other_source_description?(h("other"),y(s.other_source_description)):(h(s.source_id||""),y("")),S(s.hours_worked?s.hours_worked.toString():"");let e=(0,p.Zj)(s.date),t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");j("".concat(t,"-").concat(a,"-").concat(o));let n=s.notes||"",r=n.match(/^(tips|paycheck|bonus|other):\s*/i);r?(v(r[1].toLowerCase()),N(n.replace(/^(tips|paycheck|bonus|other):\s*/i,""))):(v("other"),N(n))}},[s,t]);let I=async()=>{if(s){if(!d||0>=parseFloat(d))return void l.oR.error("Please enter a valid amount");if(!_)return void l.oR.error("Please select an income source");if(D&&!g.trim())return void l.oR.error("Please describe this income");if("tips"===b&&(!k||0>=parseFloat(k)))return void l.oR.error("Please enter hours worked for tips");B(!0);try{let e=w?"".concat(b,": ").concat(w):"".concat(b,": Income logged");await r.W.updateLog(s.id,{source_id:D?null:_,other_source_description:D?g.trim():void 0,amount:parseFloat(d),date:f,notes:e,hours_worked:"tips"===b&&k?parseFloat(k):void 0}),l.oR.success("Income log updated"),c()}catch(e){l.oR.error("Failed to update income log")}finally{B(!1)}}};(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,a]),(0,n.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]);let L="tips"===b&&d&&k&&parseFloat(k)>0?(parseFloat(d)/parseFloat(k)).toFixed(2):null;if(!t)return null;let F=i.filter(e=>e.is_active),E=()=>{T||a()};return(0,o.jsx)("div",{className:"".concat(M().overlay," ").concat(M().incomeTheme),onClick:e=>{e.target===e.currentTarget&&E()},children:(0,o.jsxs)("div",{className:M().modal,role:"dialog","aria-modal":"true",children:[(0,o.jsxs)("div",{className:M().header,children:[(0,o.jsxs)("div",{className:M().headerLeft,children:[(0,o.jsx)(R.A,{className:"h-5 w-5",style:{color:"var(--success)"}}),(0,o.jsx)("h2",{className:M().headerTitle,children:"Edit Income"})]}),(0,o.jsx)("button",{onClick:E,disabled:T,className:M().closeButton,children:(0,o.jsx)(C.A,{className:"h-5 w-5"})})]}),(0,o.jsxs)("div",{className:M().content,children:[(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Type"}),(0,o.jsx)("div",{className:M().typeToggleGroup,children:["paycheck","tips","bonus","other"].map(e=>(0,o.jsx)("button",{type:"button",onClick:()=>v(e),className:"".concat(M().typeToggleBtn," ").concat(b===e?M().typeToggleBtnActive:""),children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Source"}),(0,o.jsxs)("select",{value:_,onChange:e=>h(e.target.value),className:M().input,children:[(0,o.jsx)("option",{value:"",children:"Select a source"}),F.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id)),(0,o.jsx)("option",{disabled:!0,children:"ââââââââââ"}),(0,o.jsx)("option",{value:"other",children:"Other (one-time income)"})]})]}),D&&(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Describe This Income *"}),(0,o.jsx)("input",{type:"text",value:g,onChange:e=>y(e.target.value),placeholder:"e.g., Tax Refund, Birthday Gift, Sold Item",maxLength:100,className:M().input})]}),(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Amount"}),(0,o.jsxs)("div",{className:M().inputWrapper,children:[(0,o.jsx)("span",{className:M().inputPrefix,children:A}),(0,o.jsx)("input",{type:"number",value:d,onChange:e=>m(e.target.value),placeholder:"0.00",step:"0.01",min:"0",className:"".concat(M().input," ").concat(M().inputWithPrefix)})]})]}),"tips"===b&&(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Hours Worked *"}),(0,o.jsxs)("div",{className:M().inputWrapper,children:[(0,o.jsx)(x.A,{className:"h-5 w-5",style:{position:"absolute",left:"0.75rem",top:"50%",transform:"translateY(-50%)",color:"var(--modal-text-muted)"}}),(0,o.jsx)("input",{type:"number",value:k,onChange:e=>S(e.target.value),placeholder:"0",step:"0.5",min:"0",className:"".concat(M().input," ").concat(M().inputWithPrefix)})]}),L&&(0,o.jsxs)("div",{className:M().infoBox,style:{marginTop:"0.75rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,o.jsxs)("span",{style:{color:"var(--success)",fontWeight:600}
1,children:[A,L,"/hr"]}),(0,o.jsx)("span",{style:{color:"var(--modal-text-muted)",fontSize:"0.875rem"},children:"average"})]})]}),(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Date"}),(0,o.jsx)("input",{type:"date",value:f,onChange:e=>j(e.target.value),className:M().input})]}),(0,o.jsxs)("div",{className:M().fieldGroup,children:[(0,o.jsx)("label",{className:M().label,children:"Notes (Optional)"}),(0,o.jsx)("input",{type:"text",value:w,onChange:e=>N(e.target.value),placeholder:"Add a note...",className:M().input})]})]}),(0,o.jsxs)("div",{className:M().footer,children:[(0,o.jsx)("button",{onClick:E,disabled:T,className:M().secondaryButton,children:"Cancel"}),(0,o.jsx)("button",{onClick:I,disabled:T,className:M().primaryButton,children:T?"Saving...":"Save Changes"})]})]})})}function G(){let{format:e}=(0,u.H)(),[t,a]=(0,n.useState)([]),[d,m]=(0,n.useState)([]),[g,x]=(0,n.useState)(!0),[b,v]=(0,n.useState)(null),[f,j]=(0,n.useState)(-1),[N,k]=(0,n.useState)(-1),[S,C]=(0,n.useState)("main"),[T,A]=(0,n.useState)(!1),[I,L]=(0,n.useState)(!1),[R,H]=(0,n.useState)(null),[M,G]=(0,n.useState)(!1),[V,O]=(0,n.useState)(!1),[U,z]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(!1),[J,X]=(0,n.useState)(null),[q,K]=(0,n.useState)(null);(0,n.useEffect)(()=>{j(new Date().getMonth()),k(new Date().getFullYear())},[]),(0,n.useEffect)(()=>{Q()},[]);let Q=async()=>{try{x(!0),v(null);let e=new Date().getMonth(),t=new Date().getFullYear(),[o]=await Promise.all([r.W.getSources(),s.Y.getAllBudgets()]);a(o),j(e),k(t),await $(e,t)}catch(e){v("Failed to load income data")}finally{x(!1)}},$=async(e,t)=>{let a=void 0!==e?e:f,o=void 0!==t?t:N;if(-1!==a)try{let e="".concat(o,"-").concat(String(a+1).padStart(2,"0"),"-01"),t="".concat(11===a?o+1:o,"-").concat(String((11===a?0:a+1)+1).padStart(2,"0"),"-01"),n=await r.W.getLogs(void 0,500,e,t);m(n.map(e=>{var t;let a=(null==(t=e.notes)?void 0:t.toLowerCase())||"",o="other";return a.startsWith("paycheck:")||a.includes("paycheck")?o="paycheck":a.startsWith("tips:")||a.includes("tips")?o="tips":(a.startsWith("bonus:")||a.includes("bonus"))&&(o="bonus"),{id:e.id,source_id:e.source_id,date:e.date,amount:"string"==typeof e.amount?parseFloat(e.amount):e.amount,type:o,notes:e.notes,hours_worked:e.hours_worked}}))}catch(e){l.oR.error("Failed to load income logs")}};(0,n.useEffect)(()=>{$()},[f,N]);let ee=(0,n.useMemo)(()=>{let e,a=new Date,o=f===a.getMonth()&&N===a.getFullYear(),n=new Date(N,f,1),r=new Date(N,f+1,0),s=o?a:r,l=d.filter(e=>{let t=(0,p.Zj)(e.date);return t>=n&&t<=s}),i={tips:0,paychecks:0,bonuses:0,other:0};l.forEach(e=>{let t="number"==typeof e.amount?e.amount:parseFloat(e.amount);if(!isNaN(t))switch(e.type){case"tips":i.tips+=t;break;case"paycheck":i.paychecks+=t;break;case"bonus":i.bonuses+=t;break;default:i.other+=t}});let c=l.filter(e=>"tips"===e.type),m=c.reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);return e+(isNaN(a)?0:a)},0),u=c.reduce((e,t)=>{let a="number"==typeof t.hours_worked?t.hours_worked:parseFloat(String(t.hours_worked||"0"));return e+(isNaN(a)?0:a)},0),_={totalHours:u,avgPerHour:u>0?m/u:0,daysWorked:new Set(c.map(e=>{let t=(0,p.Zj)(e.date);return"".concat(t.getFullYear(),"-").concat(t.getMonth(),"-").concat(t.getDate())})).size},h=i.tips+i.paychecks+i.bonuses+i.other;return{expected:(e=0,t.forEach(t=>{if(!t.is_active)return;let a="number"==typeof t.amount?t.amount:parseFloat(t.amount);if(isNaN(a))return;let o=0;switch(t.frequency){case"monthly":o=a;break;case"weekly":o=4.33*a;break;case"biweekly":o=2.17*a;break;case"daily":o=30*a;break;case"hourly":o=160*a;break;default:o=a/12}if(t.tax_rate&&t.tax_rate>0){let a=t.retirement_contribution_pct||0,n=t.other_pretax_deductions||0,r=a/100*o;e+=(o-r-n)*(1-t.tax_rate/100)}else e+=o}),e),actual:h,breakdown:i,tipsStats:_}},[d,t,f,N]),et=new Date,ea=f===et.getMonth()&&N===et.getFullYear()?"This Month":"".concat(["January","February","March","April","May","June","July","August","September","October","November","December"][f]," ").concat(N),eo=(0,n.useMemo)(()=>d.filter(e=>{let t=(0,p.Zj)(e.date);return t.getMonth()===f&&t.getFullYear()===N}),[d,f,N]),en=e=>{X(e),z(null)},er=async e=>{if(!M){G(!0);try{await r.W.deleteLog(e),l.oR.success("Income log deleted"),await $(),z(null)}catch(e){l.oR.error("Failed to delete log")}finally{G(!1)}}};return(0,o.jsxs)("div",{className:y().page,children:[(0,o.jsx)(h.J,{children:(0,o.jsx)(h.T,{children:(0,o.jsxs)("header",{className:y().header,children:[(0,o.jsxs)("div",{className:y().headerLeft,children:["history"===S&&(0,o.jsx)("button",{className:y().backBtn,onClick:()=>{T||(A(!0),L(!1),setTimeout(()=>{C("main")},200),setTimeout(()=>{A(!1)},400))},children:(0,o.jsx)(i.A,{})}),(0,o.jsx)("h1",{className:y().title,children:"history"===S?"Income History":"Income"})]}),(0,o.jsxs)("div",{className:y().headerActions,children:[(0,o.jsx)("button",{className:y().iconBtn,onClick:async()=>
1{if(!V){O(!0);try{await Q()}finally{O(!1)}}},title:"Refresh",disabled:V,children:(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,o.jsx)("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),"main"===S&&(0,o.jsxs)("button",{className:y().primaryBtn,onClick:()=>Z(!0),children:[(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,o.jsx)("path",{d:"M12 5v14M5 12h14"})}),(0,o.jsx)("span",{children:"Log Income"})]})]})]})})}),b&&!g&&(0,o.jsx)(_.W5,{message:b,onRetry:Q}),"main"===S&&!b&&-1!==f&&(0,o.jsx)(h.J,{children:(0,o.jsxs)("div",{className:"".concat(y().mainContent," ").concat(T?y().mainContentExiting:""),children:[(0,o.jsxs)("div",{className:y().mainGrid,children:[(0,o.jsx)(h.T,{children:(0,o.jsx)(w,{monthlyExpected:ee.expected,monthlyActual:ee.actual,breakdown:ee.breakdown,tipsStats:ee.tipsStats,onViewHistory:()=>{T||(A(!0),setTimeout(()=>{C("history"),L(!0)},200),setTimeout(()=>{A(!1)},500))},monthLabel:ea})}),(0,o.jsx)(h.T,{children:(0,o.jsx)(B,{month:f,year:N,incomeLogs:d,onDayClick:e=>{z(e)},onMonthChange:(e,t)=>
1{j(e),k(t)}})})]}),(0,o.jsx)(h.T,{children:(0,o.jsx)(F,{month:f,year:N,expectedMonthly:ee.expected,incomeLogs:d})})]})}),"history"===S&&(0,o.jsx)(h.J,{children:(0,o.jsx)(h.T,{children:(0,o.jsx)(W,{incomeLogs:eo,sources:t,onEditLog:en,onDeleteLog:e=>H(e),showDetail:I,monthLabel:ea})})}),(0,o.jsx)(D,{isOpen:!!U,onClose:()=>z(null),date:U||"",logs:(e=>{if(!e)return[];let[t,a,o]=e.split("-").map(Number);return d.filter(e=>{let n=(0,p.Zj)(e.date);return n.getFullYear()===t&&n.getMonth()===a-1&&n.getDate()===o})})(U),onAddEntry:()=>{K(U),z(null),Z(!0)},onEditLog:en,onDeleteLog:er}),(0,o.jsx)(E.L,{isOpen:Y,onClose:()=>{Z(!1),K(null)},sources:t,defaultDate:q,onSuccess:async()=>{await $(),Z(!1),K(null)}}),(0,o.jsx)(P,{isOpen:!!J,onClose:()=>X(null),log:J,sources:t,onSuccess:async()=>{await $(),X(null)}}),R&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:y().overlay,onClick:()=>H(null)}),(0,o.jsxs)("div",{className:y().confirmModal,children:[(0,o.jsx)("div",{className:y().confirmIcon,children:(0,o.jsx)(c.A,{})}),(0,o.jsx)("h3",{className:y().confirmTitle,children:"Delete Income Log?"}),(0,o.jsxs)("p",{className:y().confirmMessage,children:["Are you sure you want to delete this"," ",e(R.amount)," ","income log from"," ",(0,p.Zj)(R.date).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),"? This cannot be undone."]}),(0,o.jsxs)("div",{className:y().confirmActions,children:[(0,o.jsx)("button",{className:y().cancelBtn,onClick:()=>H(null),disabled:M,children:"Cancel"}),(0,o.jsx)("button",{className:y().deleteBtn,disabled:M,onClick:async()=>{await er(R.id),H(null)},children:M?"Deleting...":"Delete"})]})]})]})]})}function W(e){let{incomeLogs:t,sources:a,onEditLog:r,onDeleteLog:s,showDetail:l,monthLabel:i}=e,{format:c}=(0,u.H)(),[_,h]=(0,n.useState)(""),g=(0,n.useMemo)(()=>_?t.filter(e=>e.source_id===_):t,[t,_]),x=e=>{if(e.source_name)return e.source_name;if(e.source_id){let t=a.find(t=>t.id===e.source_id);return(null==t?void 0:t.name)||null}return null},b=(0,n.useMemo)(()=>{let e=new Set;return t.forEach(t=>{t.source_id&&e.add(t.source_id)}),e},[t]),v=(0,n.useMemo)(()=>a.filter(e=>b.has(e.id)),[a,b]),f=(0,n.useMemo)(()=>{let e=g.reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(String(t.amount));return e+(isNaN(a)?0:a)},0),t=g.filter(e=>{var t;let a=(null==(t=e.notes)?void 0:t.toLowerCase())||"";return a.startsWith("tips:")||a.includes("tips")}),a=t.reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(String(t.amount));return e+(isNaN(a)?0:a)},0),o=t.reduce((e,t)=>{let a="number"==typeof t.hours_worked?t.hours_worked:parseFloat(String(t.hours_worked||"0"));return e+(isNaN(a)?0:a)},0),n=new Set(t.map(e=>{let t=(0,p.Zj)(e.date);return"".concat(t.getFullYear(),"-").concat(t.getMonth(),"-").concat(t.getDate())}));return{totalAmount:e,totalLogs:g.length,totalTips:a,tipHours:o,avgPerHour:o>0?a/o:0,tipDays:n.size,avgPerDay:n.size>0?a/n.size:0}},[g]),j=(0,n.useMemo)(()=>{let e=[],t={};return[...g].sort((e,t)=>(0,p.Zj)(e.date).getTime()-(0,p.Zj)(t.date).getTime()).forEach(e=>{let a=(0,p.Zj)(e.date),o="".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"));t[o]||(t[o]=[]),t[o].push(e)}),Object.keys(t).sort((e,t)=>e.localeCompare(t)).forEach(a=>{let[o,n]=a.split("-").map(Number),r=new Date(o,n-1,1).toLocaleDateString("en-US",{month:"long",year:"numeric"}),s=t[a].reduce((e,t)=>{let a="number"==typeof t.amount?t.amount:parseFloat(String(t.amount));return e+(isNaN(a)?0:a)},0);e.push({monthKey:a,monthName:r,logs:t[a],total:s})}),e},[g]);return(0,o.jsxs)("div",{className:"".concat(y().detailView," ").concat(l?y().detailViewVisible:""),children:[(0,o.jsxs)("div",{className:y().historyMonthHeader,children:[(0,o.jsxs)("span",{className:y().historyMonthLabel,children:["Showing: ",i]}),v.length>1&&(0,o.jsxs)("div",{className:y().sourceFilter,children:[(0,o.jsx)("button",{className:"".concat(y().sourceFilterPill," ").concat(_?"":y().sourceFilterPillActive),onClick:()=>h(""),children:"All Sources"}),v.map(e=>(0,o.jsx)("button",{className:"".concat(y().sourceFilterPill," ").concat(_===e.id?y().sourceFilterPillActive:""),onClick:()=>h(_===e.id?"":e.id),children:e.name},e.id))]})]}),0===j.length?(0,o.jsxs)("div",{className:y().emptyState,children:[(0,o.jsx)("p",{className:y().emptyStateText,children:_?"No income from this source for ".concat(i):"No income logged for ".concat(i)}),(0,o.jsx)("p",{className:y().emptyStateSubtext,children:_?'Try selecting a different source or "All Sources"':"Use the arrows to
1navigate to a different month"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:y().historyStats,children:[(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Total Earned"}),(0,o.jsx)("span",{className:y().historyStatValue,children:c(f.totalAmount)})]}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Entries"}),(0,o.jsx)("span",{className:y().historyStatValue,children:f.totalLogs})]}),f.tipHours>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:y().statsDivider}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Total Tips"}),(0,o.jsx)("span",{className:y().historyStatValue,children:c(f.totalTips)})]}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Hours"}),(0,o.jsx)("span",{className:y().historyStatValue,children:f.tipHours.toFixed(1)})]}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"$/Hour"}),(0,o.jsx)("span",{className:y().historyStatValueAccent,children:c(f.avgPerHour)})]}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Days"}),(0,o.jsx)("span",{className:y().historyStatValue,children:f.tipDays})]}),(0,o.jsxs)("div",{className:y().historyStat,children:[(0,o.jsx)("span",{className:y().historyStatLabel,children:"Avg/Day"}),(0,o.jsx)("span",{className:y().historyStatValue,children:c(f.avgPerDay)})]})]})]}),(0,o.jsxs)("div",{className:y().historyTableHeader,children:[(0,o.jsx)("span",{className:y().historyTableHeaderCell,children:"Date"}),(0,o.jsx)("span",{className:y().historyTableHeaderCell,children:"Amount"}),(0,o.jsx)("span",{className:y().historyTableHeaderCell,children:"Hours"}),(0,o.jsx)("span",{className:y().historyTableHeaderCell,children:"Actions"})]}),(0,o.jsx)("div",{className:y().incomeListScroll,children:j.map((e,t)=>(0,o.jsxs)("div",{className:y().monthGroup,style:{animationDelay:"".concat(.1*t,"s")},children:[(0,o.jsx)("div",{className:y().monthGroupTitle,children:(0,o.jsx)("span",{children:e.monthName})}),e.logs.map((e,t)=>{var a;let n=(e=>{if(!e)return"Other";let t=e.toLowerCase();return t.startsWith("paycheck:")||t.includes("paycheck")?"Paycheck":t.startsWith("tips:")||t.includes("tips")?"Tips":t.startsWith("bonus:")||t.includes("bonus")?"Bonus":"Other"})(e.notes),l=e.hours_worked?Number(e.hours_worked):0;return(0,o.jsxs)("div",{className:y().historyTableRow,style:{animationDelay:"".concat(.05+.03*t,"s")},children:[(0,o.jsxs)("div",{className:y().historyRowInfo,children:[(0,o.jsx)("span",{className:y().historyRowDate,children:(a=e.date,(0,p.Zj)(a).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}))}),(0,o.jsxs)("div",{className:y().historyRowMeta,children:[x(e)&&(0,o.jsx)("span",{className:y().historyRowSource,children:x(e)}),(0,o.jsx)("span",{className:y().historyRowType,children:n})]})]}),(0,o.jsx)("span",{className:y().historyRowAmount,children:c(e.amount)}),(0,o.jsx)("span",{className:y().historyRowHours,children:l>0?"".concat(l.toFixed(1),"h"):"â"}),(0,o.jsxs)("div",{className:y().historyRowActions,children:[(0,o.jsx)("button",{onClick:()=>r(e),className:y().historyActionBtn,"aria-label":"Edit log",children:(0,o.jsx)(d.A,{})}),(0,o.jsx)("button",{onClick:()=>s(e),className:"".concat(y().historyActionBtn," ").concat(y().historyActionBtnDanger),"aria-label":"Delete log",children:(0,o.jsx)(m.A,{})})]})]},e.id)})]},e.monthKey))})]})]})}},34743:e=>{e.exports={panel:"income-components_panel__tjDL0",panelPadding:"income-components_panelPadding__7h8DS",label:"income-components_label__0nRlw",primaryText:"income-components_primaryText__VcL_D",secondaryText:"income-components_secondaryText__om_Ao",mutedText:"income-components_mutedText__MjO3d",largeAmount:"income-components_largeAmount__78fK9",progressTrack:"income-components_progressTrack__r_n93",progressFill:"income-components_progressFill__gU0_m",progressText:"income-components_progressText__13hsY",divider:"income-components_divider__M2RSQ",sectionTitle:"income-components_sectionTitle__pyxDf",breakdownRow:"income-components_breakdownRow__xY1Rw",breakdownLabel:"income-components_breakdownLabel__MG5r1",breakdownValue:"income-components_breakdownValue__PEpEA",statsGrid:"income-components_statsGrid__v7m89",statCard:"income-components_statCard__YMAky",statValue:"income-components_statValue___VNJQ",statLabel:"income-components_statLabel__d9Rlt",statIcon:"income-components_statIcon__5q8n0",secondaryButton:"income-components_secondaryButton__e6k2c",calendarHeader:"income-components_calendarHeader___4lwJ",calendarTitle:"income-components_calendarTitle__b8_9j",calendarNav:"income-components_calendarNav__XmG4s",navButton:"income-components_navButton__cxuZG",calendarGrid:"income-components_calendarGrid__WnErb",dayHeader:"income-components_dayHeader__kHQ3l",dayCell:"income-components_dayCell__uIljJ",dayNumber:"income-components_dayNumber__dIFgL",dayIncome:"income-components_dayIncome__P4GFc",dayCellEmpty:"income-components_dayCellEmpty__il8Ef",dayCellToday:"income-components_dayCellToday__ujHXa",dayCellHasIncome:"income-components_dayCellHasIncome__3L_7W",chartContainer:"income-components_chartContainer__46tkS",chartHeader:"income-components_chartHeader__YH5rt",chartTitle:"income-components_chartTitle__y2STe",chartLegend:"income-components_chartLegend__RNSSO",legendItem:"income-components_legendItem__T2DwR",legendDot:"income-components_legendDot___bLQf",legendDotActual:"income-components_legendDotActual__ayt7o",legendDotExpected:"income-components_legendDotExpected__sdn8b",overlay:"income-components_overlay__QVYtu",fadeIn:"income-components_fadeIn__v2G_i",slidePanel:"income-components_slidePanel__MxtQU",slideIn:"income-components_slideIn__9dHQo",slidePanelHeader:"income-components_slidePanelHeader__OYENs",slidePanelTitle:"income-components_slidePanelTitle___BgFc",closeButton:"income-components_closeButton__r2d0V",slidePanelContent:"income-components_slidePanelContent__xUdtW",historyStats:"income-components_historyStats__VyxTT",historySlideUp:"income-components_historySlideUp__Bsk7O",historyStat:"income-components_historyStat__eXwVB",historyStatLabel:"income-components_historyStatLabel___9GI4",historyStatValue:"income-components_historyStatValue__Orv2b",historyTable:"income-components_historyTable__9EBUK",historyTableHeader:"income-components_historyTableHeader__HJ_kG",historyTableHeaderCell:"income-components_historyTableHeaderCell__NOPrF",historyTableRow:"income-components_historyTableRow__W_qvm",historyRowSlide:"income-components_historyRowSlide__N7ozW",historyRowInfo:"income-components_historyRowInfo__8_OOk",historyRowDate:"income-components_historyRowDate__jc6GA",historyRowType:"income-components_historyRowType__P_WYZ",historyRowAmount:"income-components_historyRowAmount__Pnn3B",historyRowHours:"income-components_historyRowHours__OipyO",historyRowActions:"income-components_historyRowActions__gRPjg",historyActionBtn:"income-components_historyActionBtn__HgXbG",historyActionBtnDanger:"income-components_historyActionBtnDanger__xQtl9",monthGroup:"income-components_monthGroup__x3ttG",monthGroupTitle:"income-components_monthGroupTitle__9bX7r",monthGroupTotal:"income-components_monthGroupTotal__xEx1v",logEntry:"income-components_logEntry__fm980",logEntryInfo:"income-components_logEntryInfo__W1ivg",logEntryAmount:"income-components_logEntryAmount__MHuVm",logEntryMeta:"income-components_logEntryMeta__If7kp",logEntryActions:"income-components_logEntryActions__96upd",actionButton:"income-components_actionButton__IRtlS",actionButtonDanger:"income-components_actionButtonDanger__cv4HS",emptyState:"income-components_emptyState__KoAEo",emptyStateIcon:"income-components_emptyStateIcon__KglqF",emptyStateText:"income-components_emptyStateText__Xddxh",modal:"income-components_modal__FjfCa",modalIn:"income-components_modalIn__aURn5",modalHeader:"income-components_modalHeader__voBow",modalTitle:"income-components_modalTitle__rtP5G",modalContent:"income-components_modalContent__j0VMj",modalFooter:"income-components_modalFooter__3_zDv",formGroup:"income-components_formGroup__xYFEr",formLabel:"income-components_formLabel___E6GS",formInput:"income-components_formInput__bdTqT",formSelect:"income-components_formSelect__kJMuN",primaryButton:"income-components_primaryButton___lcep",cancelButton:"income-components_cancelButton__6HoO5"}},38676:(e,t,a)=>{"use strict";a.d(t,{Qn:()=>r,Zt:()=>s,vv:()=>n,zN:()=>l});
1let o={USD:{symbol:"$",name:"US Dollar",locale:"en-US"},EUR:{symbol:"â¬",name:"Euro",locale:"de-DE"},GBP:{symbol:"\xa3",name:"British Pound",locale:"en-GB"},CAD:{symbol:"C$",name:"Canadian Dollar",locale:"en-CA"},AUD:{symbol:"A$",name:"Australian Dollar",locale:"en-AU"}};function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",a=arguments.length>2?arguments[2]:void 0,n=o[t],r=(null==a?void 0:a.wholeNumber)||(null==a?void 0:a.compact);return new Intl.NumberFormat(n.locale,{style:"currency",currency:t,notation:(null==a?void 0:a.compact)?"compact":"standard",minimumFractionDigits:2*!r,maximumFractionDigits:(null==a?void 0:a.compact)?1:2*!r,signDisplay:(null==a?void 0:a.showSign)?"exceptZero":"auto"}).format(e)}function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"USD";return o[e].symbol}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"USD";return o[e].name}function l(){return Object.keys(o).map(e=>({code:e,symbol:o[e].symbol,name:o[e].name}))}},43470:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var o=a(7620);let n=o.forwardRef(function(e,t){let{title:a,titleId:n,...r}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},r),a?o.createElement("title",{id:n},a):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},45467:(e,t,a)=>{Promise.resolve().then(a.bind(a,14337))},46975:e=>{e.exports={skeleton:"skeleton_skeleton__IrghC",skeletonShimmer:"skeleton_skeletonShimmer__5nQYZ"}},64682:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var o=a(7620);let n=o.forwardRef(function(e,t){let{title:a,titleId:n,...r}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},r),a?o.createElement("title",{id:n},a):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))})},69029:e=>{e.exports={vaultGrid:"vault-card_vaultGrid__kNZSJ",vaultGridExiting:"vault-card_vaultGridExiting__DTPNi",vaultCard:"vault-card_vaultCard__u1x45",cardEnter:"vault-card_cardEnter__DIKy0",vaultCardInner:"vault-card_vaultCardInner__8h5L2",vaultGlow:"vault-card_vaultGlow__kr_a0",vaultIcon:"vault-card_vaultIcon__zbYGx",vaultContent:"vault-card_vaultContent__xh6ug",vaultTitle:"vault-card_vaultTitle__MhPo6",vaultSubtitle:"vault-card_vaultSubtitle__NuPRB",vaultStats:"vault-card_vaultStats__lnDJ9",vaultPrimary:"vault-card_vaultPrimary__jFL6y",vaultSecondary:"vault-card_vaultSecondary__EJbAx",vaultArrow:"vault-card_vaultArrow__PIJak",vaultLock:"vault-card_vaultLock__tgGy3",vaultCardSelected:"vault-card_vaultCardSelected__r73ux",vaultUnlock:"vault-card_vaultUnlock__exuUw",unlockPulse:"vault-card_unlockPulse__YnWKW",vaultLockUnlocking:"vault-card_vaultLockUnlocking__br9do",lockOpen:"vault-card_lockOpen__QqzjS",vaultCardFading:"vault-card_vaultCardFading__Mt0xR",cardFadeOut:"vault-card_cardFadeOut__8Va5C",vaultStatsLoading:"vault-card_vaultStatsLoading__8Z43F",spin:"vault-card_spin__NEBM4"}},70509:(e,t,a)=>{"use strict";a.d(t,{J:()=>i,T:()=>c});var o=a(54568),n=a(27186),r=a(95730);let s={hidden:{},visible:{transition:{staggerChildren:.18,delayChildren:.25}}},l={hidden:{opacity:0,y:18},visible:{opacity:1,y:0,transition:{duration:.75,ease:[.22,1,.36,1]}}};function i(e){let{children:t,className:a,delay:l,stagger:i}=e,c=(0,n.I)(),d=void 0!==l||void 0!==i?{...s,visible:{transition:{...s.visible.transition,...void 0!==l&&{delayChildren:l},...void 0!==i&&{staggerChildren:i}}}}:s;return(0,o.jsx)(r.P.div,{variants:d,initial:!c&&"hidden",animate:"visible",className:a,children:t})}function c(e){let{children:t,className:a}=e;return(0,o.jsx)(r.P.div,{variants:l,className:a,children:t})}},74166:e=>{e.exports={overlay:"budget-modal_overlay___rIR8",modal:"budget-modal_modal__19quz",modalL
1arge:"budget-modal_modalLarge__gwson",header:"budget-modal_header__E3Tn7",headerLeft:"budget-modal_headerLeft__0olo0",headerIcon:"budget-modal_headerIcon__ygn2h",headerIconWarning:"budget-modal_headerIconWarning__lWNmP",headerIconSuccess:"budget-modal_headerIconSuccess__NU6oS",headerIconDanger:"budget-modal_headerIconDanger__wme7p",headerTitle:"budget-modal_headerTitle__iVKei",closeButton:"budget-modal_closeButton__InfCz",content:"budget-modal_content__M3hl8",contentRebalancing:"budget-modal_contentRebalancing__x5YaL",footer:"budget-modal_footer__KpQZu",footerLeft:"budget-modal_footerLeft__BPNxA",footerRight:"budget-modal_footerRight__41fYV",fieldGroup:"budget-modal_fieldGroup__2Kv76",label:"budget-modal_label__hlNh0",input:"budget-modal_input__zbf40",inputWrapper:"budget-modal_inputWrapper__6DTML",inputPrefix:"budget-modal_inputPrefix__548NG",inputWithPrefix:"budget-modal_inputWithPrefix__ME5to",colorGrid:"budget-modal_colorGrid__JBIhZ",colorButton:"budget-modal_colorButton__mXoIE",colorButtonSelected:"budget-modal_colorButtonSelected__34HXE",iconGrid:"budget-modal_iconGrid__FQ_bO",iconButton:"budget-modal_iconButton__I_Fc7",iconButtonSelected:"budget-modal_iconButtonSelected___J2LO",budgetContext:"budget-modal_budgetContext__iINkn",budgetContextValue:"budget-modal_budgetContextValue__Fxlng",statusPositive:"budget-modal_statusPositive___awkZ",statusNegative:"budget-modal_statusNegative__vTRta",statusWarning:"budget-modal_statusWarning__y2qIc",infoBox:"budget-modal_infoBox__akd_X",infoRow:"budget-modal_infoRow__C84AI",infoLabel:"budget-modal_infoLabel__8al2Q",infoValue:"budget-modal_infoValue__XBpG8",infoText:"budget-modal_infoText__4rSEg",inputLabel:"budget-modal_inputLabel__wLeHO",inputField:"budget-modal_inputField__8PHnu",warningBox:"budget-modal_warningBox__DBVXZ",warningBoxIncrease:"budget-modal_warningBoxIncrease__XvxNA",warningBoxDecrease:"budget-modal_warningBoxDecrease__2gbsG",warningIcon:"budget-modal_warningIcon__kfJXE",warningTitle:"budget-modal_warningTitle__Qfrdi",warningText:"budget-modal_warningText__6jt6l",warningTextIncrease:"budget-modal_warningTextIncrease__O_Emk",warningTextDecrease:"budget-modal_warningTextDecrease__dw_j_",errorBox:"budget-modal_errorBox__7heFv",errorIcon:"budget-modal_errorIcon__24Hin",errorText:"budget-modal_errorText__qyOnB",successBox:"budget-modal_successBox__ws09O",successText:"budget-modal_successText__bidle",rebalanceHeader:"budget-modal_rebalanceHeader__dp8A_",rebalanceHeaderIncrease:"budget-modal_rebalanceHeaderIncrease__lxA4w",rebalanceHeaderDecrease:"budget-modal_rebalanceHeaderDecrease__GmLdY",rebalanceSummary:"budget-modal_rebalanceSummary__iAP7L",rebalanceSummaryCategory:"budget-modal_rebalanceSummaryCategory__uin2k",categoryColorDot:"budget-modal_categoryColorDot__nRnpS",categoryName:"budget-modal_categoryName__C185X",rebalanceSummaryAmount:"budget-modal_rebalanceSummaryAmount__m5Kyv",rebalanceSummaryAmountNew:"budget-modal_rebalanceSummaryAmountNew__tAw6E",rebalanceTitle:"budget-modal_rebalanceTitle__K5tD1",rebalanceTitleIncrease:"budget-modal_rebalanceTitleIncrease__oVcyM",rebalanceTitleDecrease:"budget-modal_rebalanceTitleDecrease__Qc1jT",rebalanceDescription:"budget-modal_rebalanceDescription__Cc5G7",rebalanceDescriptionIncrease:"budget-modal_rebalanceDescriptionIncrease__sMvP_",rebalanceDescriptionDecrease:"budget-modal_rebalanceDescriptionDecrease__F6qjt",progressContainer:"budget-modal_progressContainer__vjr3J",progressTrack:"budget-modal_progressTrack__NLm1v",progressFill:"budget-modal_progressFill__glTFs",progressFillIncrease:"budget-modal_progressFillIncrease__mBUGn",progressFillDecrease:"budget-modal_progressFillDecrease__rGea8",progressFillComplete:"budget-modal_progressFillComplete__wC0JD",progressLabel:"budget-modal_progressLabel__pTD4I",progressLabelPending:"budget-modal_progressLabelPending__TuQFD",progressLabelComplete:"budget-modal_progressLabelComplete__19rOz",categoryList:"budget-modal_categoryList__Xttkk",categoryRow:"budget-modal_categoryRow__90_nm",categoryRowHeader:"budget-modal_categoryRowHeader__znMnC",categoryRowInfo:"budget-modal_categoryRowInfo__U0Trf",categoryRowName:"budget-modal_categoryRowName__0n3gs",categoryRowMeta:"budget-modal_categoryRowMeta__a7jXI",categoryRowControls:"budget-modal_categoryRowControls__Tr7ti",categorySlider:"budget-modal_categorySlider__LG35m",categoryInputWrapper:"budget-modal_categoryInputWrapper__XkAZ8",categoryInputPrefix:"budget-modal_categoryInputPrefix__MN6Wu",categoryInput:"budget-modal_categoryInput__SWFRd",quickAmounts:"budget-modal_quickAmounts__vwlYI",quickAmountBtn:"budget-modal_quickAmountBtn__aujec",quickAmountBtnExact:"budget-modal_quickAmountBtnExact__UKOKN",quickAmountBtnNormal:"budget-modal_quickAmountBtnNormal__SJ04N",addCategoryButton:"budget-modal_addCategoryButton__KWMtl",typeToggleGroup:"budget-modal_typeToggleGroup__vVMEZ",typeToggleBtn:"budget-modal_typeToggleBtn__4TIgK",typeToggleBtnActive:"budget-modal_typeToggleBtnActive__5
1Hdzu",incomeTheme:"budget-modal_incomeTheme__kZyJq",primaryButton:"budget-modal_primaryButton__OgkrM",dangerButton:"budget-modal_dangerButton__SZtXr",warningButton:"budget-modal_warningButton__clq5I",secondaryButton:"budget-modal_secondaryButton__emhA_",backButton:"budget-modal_backButton__8esyc",spinner:"budget-modal_spinner__33TgC",spin:"budget-modal_spin__pG14Q",deleteCategoryInfo:"budget-modal_deleteCategoryInfo__9e_Rp",deleteCategoryHeader:"budget-modal_deleteCategoryHeader__FC9za",deleteCategoryName:"budget-modal_deleteCategoryName__2axf3",deleteCategoryStats:"budget-modal_deleteCategoryStats__bO4dB",deleteCategoryStat:"budget-modal_deleteCategoryStat__toFku",deleteStatLabel:"budget-modal_deleteStatLabel__82qmD",deleteStatValue:"budget-modal_deleteStatValue__9f8bN",blockedContainer:"budget-modal_blockedContainer__LF0Xv",blockedIcon:"budget-modal_blockedIcon__Z9Vxe",blockedTitle:"budget-modal_blockedTitle__llLyr",blockedDescription:"budget-modal_blockedDescription__eI87_"}},77800:(e,t,a)=>{"use strict";a.d(t,{E:()=>l});var o=a(54568),n=a(46975),r=a.n(n);let s={sm:"4px",md:"8px",lg:"14px",full:"9999px"};function l(e){let{className:t,width:a,height:n,rounded:l,style:i}=e;return(0,o.jsx)("div",{className:"".concat(r().skeleton).concat(t?" ".concat(t):""),style:{width:a,height:n,...l?{borderRadius:s[l]}:{},...i}})}},78036:(e,t,a)=>{"use strict";a.d(t,{H:()=>s});var o=a(72203),n=a(38676),r=a(7620);function s(){let{user:e}=(0,o.A)(),t=(null==e?void 0:e.currency)||"USD",a=(0,r.useCallback)(e=>(0,n.vv)(e,t),[t]),s=(0,r.useCallback)(e=>(0,n.vv)(e,t,{compact:!0}),[t]),l=(0,r.useCallback)(e=>(0,n.vv)(e,t,{showSign:!0}),[t]),i=(0,r.useCallback)(e=>(0,n.vv)(e,t,{wholeNumber:!0}),[t]),c=(0,r.useMemo)(()=>(0,n.Qn)(t),[t]);return{currency:t,symbol:c,format:a,formatCompact:s,formatSigned:l,formatWhole:i}}},86383:(e,t,a)=>{"use strict";a.d(t,{W5:()=>_,bh:()=>i,lo:()=>c});var o=a(54568);a(7620);var n=a(69029),r=a.n(n);let s=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,o.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,o.jsx)("path",{d:"M7 11V7a5 5 0 0110 0v4"})]}),l=()=>(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,o.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,o.jsx)("path",{d:"M7 11V7a5 5 0 019.9-1"})]});function i(e){let{id:t,title:a,subtitle:n,icon:i,gradient:c,primaryStat:d,secondaryStat:m,isSelected:u=!1,isFading:_=!1,isAnimating:h=!1,isDataLoading:p=!1,onClick:g,animationDelay:y="0s",className:x=""}=e,b=[r().vaultCard,u?r().vaultCardSelected:"",_?r().vaultCardFading:"",x].filter(Boolean).join(" ");return(0,o.jsx)("button",{className:b,onClick:()=>{!h&&g&&g(t)},disabled:h,style:{"--card-gradient":c,"--delay":y},children:(0,o.jsxs)("div",{className:r().vaultCardInner,children:[(0,o.jsx)("div",{className:r().vaultGlow}),u&&(0,o.jsx)("div",{className:r().unlockPulse}),(0,o.jsx)("div",{className:r().vaultIcon,children:i}),(0,o.jsxs)("div",{className:r().vaultContent,children:[(0,o.jsx)("span",{className:r().vaultTitle,children:a}),(0,o.jsx)("span",{className:r().vaultSubtitle,children:n})]}),(0,o.jsxs)("div",{className:"".concat(r().vaultStats," ").concat(p?r().vaultStatsLoading:""),children:[(0,o.jsx)("span",{className:r().vaultPrimary,children:d}),(0,o.jsx)("span",{className:r().vaultSecondary,children:m})]}),(0,o.jsx)("div",{className:r().vaultArrow,children:(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,o.jsx)("path",{d:"M9 18l6-6-6-6"})})}),(0,o.jsx)("div",{className:"".concat(r().vaultLock," ").concat(u?r().vaultLockUnlocking:""),children:u?(0,o.jsx)(l,{}):(0,o.jsx)(s,{})})]})})}function c(e){let{children:t,isExiting:a=!1,className:n=""}=e,s=[r().vaultGrid,a?r().vaultGridExiting:"",n].filter(Boolean).join(" ");return(0,o.jsx)("div",{className:s,children:t})}a(77800);var d=a(64682),m=a(88362),u=a.n(m);function _(e){let{message:t="Something went wrong",onRetry:a,compact:n=!1,className:r}=e;return n?(0,o.jsxs)("div",{className:"".concat(u().compact).concat(r?" ".concat(r):""),children:[(0,o.jsx)("span",{className:u().compactMessage,children:t}),a&&(0,o.jsx)("button",{className:u().compactRetry,onClick:a,children:"Try Again"})]}):(0,o.jsxs)("div",{className:"".concat(u().wrapper).concat(r?" ".concat(r):""),children:[(0,o.jsx)("div",{className:u().iconWrap,children:(0,o.jsx)(d.A,{className:u().icon})}),(0,o.jsx)("p",{className:u().message,children:t}),a&&(0,o.jsx)("button",{className:u().retryBtn,onClick:a,children:"Try Again"})]})}},88362:e=>{e.exports={wrapper:"error-state_wrapper__39q7K",errorFadeIn:"error-state_errorFadeIn___Dx4h",iconWrap:"error-state_iconWrap__Vommc",icon:"error-state_icon__rFjBf",message:"error-state_message__OM45_",retryBtn:"error-state_retryBtn__ZJAqz",compact:"error-state_compact__Eb5io",compactMessage:"error-state_compactMessage__aHOwS",compactRetry:"error-state_compactRetry__55RMf"}},88985:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var o=a(7620);let n=o.forwardRef(function(e,t){let{title:a,titleId:n,...r}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},r),a?o.createElement("title",{id:n},a):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},91882:e=>{e.exports={page:"income_page__SfpsY",header:"income_header__sYgRa",headerLeft:"income_headerLeft__Tw0Nu",backBtn:"income_backBtn__NX1_9",title:"income_title__JN2qx",headerActions:"income_headerActions__rzG1i",iconBtn:"income_iconBtn__aSeuV",primaryBtn:"income_primaryBtn__Omyk0",mainGrid:"income_mainGrid__WTfM0",card:"income_card__InXUN",cardHeader:"income_cardHeader__PY7GY",cardTitle:"income_cardTitle__OkyKk",cardSubtitle:"income_cardSubtitle__8ajvk",loadingContainer:"income_loadingContainer__7ozm1",spinner:"income_spinner__UI3kj",spin:"income_spin__XayWe",loadingText:"income_loadingText__w_Mrn",mainContent:"income_mainContent__xdmsY",fadeSlideIn:"income_fadeSlideIn__Ppt4U",mainContentExiting:"income_mainContentExiting__Gka8c",detailVie
1w:"income_detailView__n8M8S",detailViewVisible:"income_detailViewVisible__XR_ZR",historyMonthHeader:"income_historyMonthHeader__dF7Th",historyMonthLabel:"income_historyMonthLabel__9hZCO",sourceFilter:"income_sourceFilter__ELRY6",sourceFilterPill:"income_sourceFilterPill__ohT8O",sourceFilterPillActive:"income_sourceFilterPillActive__65GeF",historyStats:"income_historyStats__2ijLq",historySlideUp:"income_historySlideUp__74JV8",historyStat:"income_historyStat__Jj4a4",historyStatLabel:"income_historyStatLabel__R4BFg",historyStatValue:"income_historyStatValue__BV3qE",historyStatValueAccent:"income_historyStatValueAccent__xzNmx",statsDivider:"income_statsDivider__MhieY",historyTableHeader:"income_historyTableHeader__HwLVC",historyTableHeaderCell:"income_historyTableHeaderCell___NaWZ",monthGroup:"income_monthGroup__Q_uhx",monthGroupTitle:"income_monthGroupTitle__Mzif8",monthGroupTotal:"income_monthGroupTotal__RZu_T",historyTableRow:"income_historyTableRow__ftf_j",historyRowSlide:"income_historyRowSlide__q_6D4",incomeListScroll:"income_incomeListScroll__PTwAj",historyRowInfo:"income_historyRowInfo__fydcq",historyRowDate:"income_historyRowDate__V7ZzG",historyRowMeta:"income_historyRowMeta__6XUYl",historyRowSource:"income_historyRowSource__GkcV0",historyRowType:"income_historyRowType__VPvis",historyRowAmount:"income_historyRowAmount__o9f4w",historyRowHours:"income_historyRowHours__OXLXU",historyRowActions:"income_historyRowActions__A2bE1",historyActionBtn:"income_historyActionBtn__85TKG",historyActionBtnDanger:"income_historyActionBtnDanger__MG8pS",emptyState:"income_emptyState__96lzI",emptyStateText:"income_emptyStateText__oYyz8",emptyStateSubtext:"income_emptyStateSubtext__uP1rE",overlay:"income_overlay__BmHPl",fadeIn:"income_fadeIn__B_bQd",confirmModal:"income_confirmModal__9_tZt",modalIn:"income_modalIn__21Bzp",confirmIcon:"income_confirmIcon__QXwvT",confirmTitle:"income_confirmTitle__K5TBD",confirmMessage:"income_confirmMessage__kPcuU",confirmActions:"income_confirmActions__7KuPk",cancelBtn:"income_cancelBtn__7_gbi",deleteBtn:"income_deleteBtn__O14Ka"}},93637:(e,t,a)=>{"use strict";a.d(t,{Y:()=>n});var o=a(81699);let n={getAllBudgets:async()=>(await o.uE.get("/budgets")).data,getBudgetById:async e=>(await o.uE.get("/budgets/".concat(e))).data,createBudget:async e=>(await o.uE.post("/budgets",e)).data,updateBudget:async(e,t)=>(await o.uE.put("/budgets/".concat(e),t)).data,updateIncome:async(e,t,a)=>(await o.uE.patch("/budgets/".concat(e,"/income"),{income:t,adjustment:a})).data,async deleteBudget(e){await o.uE.delete("/budgets/".concat(e))},getBudgetSummary:async e=>(await o.uE.get("/budgets/summary",{params:e?{period:e}:{}})).data,getBudgetCategories:async e=>(await o.uE.get("/budgets/".concat(e,"/categories"))).data,createCategory:async(e,t)=>(await o.uE.post("/budgets/".concat(e,"/categories"),t)).data,updateCategory:async(e,t,a)=>(await o.uE.put("/budgets/".concat(e,"/categories/").concat(t),a)).data,copyBudget:async(e,t)=>(await o.uE.post("/budgets/".concat(e,"/copy"),t)).data,getLatestBudgetForPeriod:async e=>(await o.uE.get("/budgets/latest/".concat(e))).data,async getUserIncome(){try{return(await o.uE.get("/income/stats?period=month")).data.totalMonthlyIncome||0}catch(e){return 0}},updateUserIncome:async e=>e,rebalanceCategories:async(e,t)=>(await o.uE.post("/budgets/".concat(e,"/rebalance"),{changes:t})).data}}},e=>{e.O(0,[7592,8024,4288,1090,3558,5730,9878,2203,9115,3670,587,6531,7358],()=>e(e.s=45467)),_N_E=e.O()}]);
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.