1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="76556a78-6423-442d-9a9a-bea7c3af877d",e._sentryDebugIdIdentifier="sentry-dbid-76556a78-6423-442d-9a9a-bea7c3af877d")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[38026],{26117:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return a(37704)}])},23112:function(e,t,a){"use strict";a.d(t,{c:function(){return k}});var r=a(85893),n=a(25675),s=a.n(n),l=a(78051),i=a(39332),d=a(67294),o=a(28116),c=a(12003),u=a(8971),m=a(26806);let f=d.forwardRef((e,t)=>{let{className:a,children:n,...s}=e;return(0,r.jsxs)(o.fC,{ref:t,className:(0,m.cn)("relative z-10 flex max-w-max flex-1 items-center justify-center",a),...s,children:[n,(0,r.jsx)(j,{})]})});f.displayName=o.fC.displayName;let h=d.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.aV,{ref:t,className:(0,m.cn)("group flex flex-1 list-none items-center justify-center space-x-1",a),...n})});h.displayName=o.aV.displayName;let x=o.ck,v=(0,c.j)("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),p=d.forwardRef((e,t)=>{let{className:a,children:n,...s}=e;return(0,r.jsxs)(o.xz,{ref:t,className:(0,m.cn)(v(),"group",a),...s,children:[n," ",(0,r.jsx)(u.default,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});p.displayName=o.xz.displayName;let g=d.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.VY,{ref:t,className:(0,m.cn)("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",a),...n})});g.displayName=o.VY.displayName;let b=o.rU,j=d.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{className:(0,m.cn)("absolute left-0 top-full flex justify-center"),children:(0,r.jsx)(o.l_,{className:(0,m.cn)("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",a),ref:t,...n})})});j.displayName=o.l_.displayName;let N=d.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.z$,{ref:t,className:(0,m.cn)("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",a),...n,children:(0,r.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})});N.displayName=o.z$.displayName;let y=[{href:"/dashboard",text:"Dashboard"},{href:"/dashboard/customers",text:"Customers"},{href:"/dashboard/bookings",text:"Bookings"},{href:"/dashboard/vans",text:"Vans"},{href:"/dashboard/van-variations",text:"Van Variations"},{href:"/dashboard/extras",text:"Extras"},{href:"/dashboard/images",text:"Images"},{href:"/dashboard/content",text:"Content"}],w={href:"/api/auth/logout",text:"Logout",icon:(0,r.jsx)(l.default,{className:"text-xl mr-2"})},k=e=>{let{children:t}=e,a=(0,i.usePathname)();return(0,r.jsxs)("div",{className:"min-h-screen",children:[(0,r.jsx)("nav",{className:"border-b",children:(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(s(),{src:"/small-logo.webp",width:40,height:40,alt:"logo",className:"mr-4"}),(0,r.jsx)(f,{children:(0,r.jsx)(h,{children:y.map(e=>{let t=a===e.href;return(0,r.jsx)(x,{children:(0,r.jsx)(b,{href:e.href,className:(0,m.cn)("flex items-center px-3 py-2",t&&"bg-accent"),children:(0,r.jsx)("span",{children:e.text})})},e.href)})})})]}),(0,r.jsx)(f,{children:(0,r.jsx)(h,{children:(0,r.jsx)(x,{children:(0,r.jsxs)(b,{href:w.href,className:"flex items-center px-3 py-2",children:[w.icon,(0,r.jsx)("span",{children:w.text})]})})})})]})}),(0,r.jsx)("main",{className:"p-6",children:t})]})}},9383:function(e,t,a){"use strict";a.d(t,{Ol:function(){return i},Zb:function(){return l},aY:function(){return c},ll:function(){return d}});var r=a(85893),n=a(67294),s=a(26806);let l=n.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...n})});l.displayName="Card";let i=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",a),...n})});i.displayName="CardHeader";let d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("font-semibold leading-none tracking-tight",a),...n})});d.displayName="CardTitle";let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",a),...n})});o.displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("p-6 pt-0",a),...n})});c.displayName="CardContent";let u=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex items-center p-6 pt-0",a),...n})});u.displayName="CardFooter"},12228:function(e,t,a){"use strict";a.d(t,{x:function(){return i}});var r=a(85893),n=a(67294),s=a(25443),l=a(26806);let i=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,r.jsxs)(s.fC,{ref:t,className:(0,l.cn)("relative overflow-hidden",a),...i,children:[(0,r.jsx)(s.l_,{className:"h-full w-full rounded-[inherit]",children:n}),(0,r.jsx)(d,{}),(0,r.jsx)(s.Ns,{})]})});i.displayName=s.fC.displayName;let d=n.forwardRef((e,t)=>{let{className:a,orientation:n="vertical",...i}=e;return(0,r.jsx)(s.gb,{ref:t,orientation:n,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===n&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...i,children:(0,r.jsx)(s.q4,{className:"relative flex-1 rounded-full bg-border"})})});d.displayName=s.gb.displayName},30211:function(e,t,a){"use strict";a.d(t,{SP:function(){return o},dr:function(){return d},mQ:function(){return i},nU:function(){return c}});var r=a(85893),n=a(67294),s=a(60434),l=a(26806);let i=s.fC,d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.aV,{ref:t,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...n})});d.displayName=s.aV.displayName;let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.xz,{ref:t,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...n})});o.displayName=s.xz.displayName;let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.VY,{ref:t,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...n})});c.displayName=s.VY.displayName},37704:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return O},default:function(){return P}});var r=a(85893),n=a(23112),s=a(61667),l=a(29009),i=a(28935),d=a(14195),o=a(3023),c=a(75358),u=a(18242),m=a(67294),f=a(26050),h=a(33558),x=a(26806);let v={light:"",dark:".dark"},p=m.createContext(null);function g(){let e=m.useContext(p);if(!e)throw Error("useChart must be used within a <ChartContainer />");return e}let b=m.forwardRef((e,t)=>{let{id:a,className:n,children:s,config:i,...d}=e,o=m.useId(),c="chart-".concat(a||o.replace(/:/g,""));return(0,r.jsx)(p.Provider,{value:{config:i},children:(0,r.jsxs)("div",{"data-chart":c,ref:t,className:(0,x.cn)("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",n
1),...d,children:[(0,r.jsx)(j,{id:c,config:i}),(0,r.jsx)(l.h,{children:s})]})})});b.displayName="Chart";let j=e=>{let{id:t,config:a}=e,n=Object.entries(a).filter(e=>{let[,t]=e;return t.theme||t.color});return n.length?(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:Object.entries(v).map(e=>{let[a,r]=e;return"\n".concat(r," [data-chart=").concat(t,"] {\n").concat(n.map(e=>{var t;let[r,n]=e,s=(null===(t=n.theme)||void 0===t?void 0:t[a])||n.color;return s?" --color-".concat(r,": ").concat(s,";"):null}).join("\n"),"\n}\n")}).join("\n")}}):null},N=f.u,y=m.forwardRef((e,t)=>{let{active:a,payload:n,className:s,indicator:l="dot",hideLabel:i=!1,hideIndicator:d=!1,label:o,labelFormatter:c,labelClassName:u,formatter:f,color:h,nameKey:v,labelKey:p}=e,{config:b}=g(),j=m.useMemo(()=>{var e;if(i||!(null==n?void 0:n.length))return null;let[t]=n,a="".concat(p||t.dataKey||t.name||"value"),s=k(b,t,a),l=p||"string"!=typeof o?null==s?void 0:s.label:(null===(e=b[o])||void 0===e?void 0:e.label)||o;return c?(0,r.jsx)("div",{className:(0,x.cn)("font-medium",u),children:c(l,n)}):l?(0,r.jsx)("div",{className:(0,x.cn)("font-medium",u),children:l}):null},[o,c,n,i,u,b,p]);if(!a||!(null==n?void 0:n.length))return null;let N=1===n.length&&"dot"!==l;return(0,r.jsxs)("div",{ref:t,className:(0,x.cn)("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",s),children:[N?null:j,(0,r.jsx)("div",{className:"grid gap-1.5",children:n.map((e,t)=>{let a="".concat(v||e.name||e.dataKey||"value"),n=k(b,e,a),s=h||e.payload.fill||e.color;return(0,r.jsx)("div",{className:(0,x.cn)("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===l&&"items-center"),children:f&&(null==e?void 0:e.value)!==void 0&&e.name?f(e.value,e.name,e,t,e.payload):(0,r.jsxs)(r.Fragment,{children:[(null==n?void 0:n.icon)?(0,r.jsx)(n.icon,{}):!d&&(0,r.jsx)("div",{className:(0,x.cn)("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===l,"w-1":"line"===l,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===l,"my-0.5":N&&"dashed"===l}),style:{"--color-bg":s,"--color-border":s}}),(0,r.jsxs)("div",{className:(0,x.cn)("flex flex-1 justify-between leading-none",N?"items-end":"items-center"),children:[(0,r.jsxs)("div",{className:"grid gap-1.5",children:[N?j:null,(0,r.jsx)("span",{className:"text-muted-foreground",children:(null==n?void 0:n.label)||e.name})]}),e.value&&(0,r.jsx)("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})});y.displayName="ChartTooltip",h.D;let w=m.forwardRef((e,t)=>{let{className:a,hideIcon:n=!1,payload:s,verticalAlign:l="bottom",nameKey:i}=e,{config:d}=g();return(null==s?void 0:s.length)?(0,r.jsx)("div",{ref:t,className:(0,x.cn)("flex items-center justify-center gap-4","top"===l?"pb-3":"pt-3",a),children:s.map(e=>{let t="".concat(i||e.dataKey||"value"),a=k(d,e,t);return(0,r.jsxs)("div",{className:(0,x.cn)("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[(null==a?void 0:a.icon)&&!n?(0,r.jsx)(a.icon,{}):(0,r.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color}}),null==a?void 0:a.label]},e.value)})}):null});function k(e,t,a){if("object"!=typeof t||null===t)return;let r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0,n=a;return a in t&&"string"==typeof t[a]?n=t[a]:r&&a in r&&"string"==typeof r[a]&&(n=r[a]),n in e?e[n]:e[a]}w.displayName="ChartLegend";let _=()=>{let{data:e}=(0,s.h_)(),t=new Date,a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=Array.from({length:12},(e,r)=>{let n=new Date;return n.setMonth(t.getMonth()-(11-r)),{month:a[n.getMonth()],year:n.getFullYear(),revenue:0}}),m=null==e?void 0:e.bookings.reduce((e,r)=>{if(!(null==r?void 0:r.fromDate))return e;let n=new Date(r.fromDate),s=(t.getFullYear()-n.getFullYear())*12+t.getMonth()-n.getMonth();if(s>=12||s<0)return e;let l=n.getMonth(),i=a[l],d=e.find(e=>e.month===i&&e.year===n.getFullYear());return d&&(d.revenue+=(null==r?void 0:r.cost)||0),e},n),f=null==m?void 0:m.map(e=>({month:e.month,revenue:e.revenue}));return(0,r.jsx)(b,{config:{},className:"w-full h-full",children:(0,r.jsx)(l.h,{width:"100%",height:"100%",children:(0,r.jsxs)(i.v,{data:f,margin:{top:20,right:20,bottom:20,left
1:20},children:[(0,r.jsx)(d.q,{vertical:!1}),(0,r.jsx)(o.K,{dataKey:"month",axisLine:!1,tickLine:!1,className:"text-sm font-medium fill-muted-foreground"}),(0,r.jsx)(c.B,{dataKey:"revenue",axisLine:!1,tickLine:!1,className:"text-sm font-medium fill-muted-foreground",tickFormatter:e=>"\xa3".concat(e)}),(0,r.jsx)(N,{content:(0,r.jsx)(y,{})}),(0,r.jsx)(u.$,{dataKey:"revenue",fill:"hsl(var(--primary))",radius:[4,4,0,0],maxBarSize:40,fillOpacity:.8,stroke:"hsl(var(--primary))",strokeWidth:1})]})})})};var C=a(30211),D=a(91132),R=a(43907),E=a(9383),M=a(12228),V=a(68622);s.qb.Confirmed,s.qb.Pending,s.qb.Cancelled;let I={CONFIRMED:"#43a047",PENDING:"#fbc02d",CANCELLED:"#dc3545"};var O=!0;function P(){let{data:e,loading:t}=(0,s.h_)();if(t)return(0,r.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-primary"})});let a=null==e?void 0:e.bookings.filter(e=>(null==e?void 0:e.status)&&e.status!==s.qb.Cancelled).map(e=>{var t,a;return{title:"".concat(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.name," - ").concat(null==e?void 0:null===(a=e.vanVariation)||void 0===a?void 0:a.name),start:null==e?void 0:e.fromDate,end:null==e?void 0:e.toDate,backgroundColor:I[(null==e?void 0:e.status)||"PENDING"]}}),l=null==e?void 0:e.bookings.slice().sort((e,t)=>new Date((null==t?void 0:t.createdAt)||0).getTime()-new Date((null==e?void 0:e.createdAt)||0).getTime()).slice(0,5);return(0,r.jsx)(n.c,{children:(0,r.jsxs)(C.mQ,{defaultValue:"overview",className:"space-y-6",children:[(0,r.jsxs)(C.dr,{children:[(0,r.jsx)(C.SP,{value:"overview",className:"text-base",children:"Overview"}),(0,r.jsx)(C.SP,{value:"schedule",className:"text-base",children:"Schedule"})]}),(0,r.jsx)(C.nU,{value:"overview",children:(0,r.jsxs)("div",{className:"grid lg:grid-cols-5 gap-6",children:[(0,r.jsx)("div",{className:"lg:col-span-3",children:(0,r.jsxs)(E.Zb,{className:"shadow-sm hover:shadow-md transition-shadow duration-200",children:[(0,r.jsx)(E.Ol,{className:"border-b bg-muted/10",children:(0,r.jsx)(E.ll,{className:"text-xl",children:"Revenue Overview (Last 12 Months)"})}),(0,r.jsx)(E.aY,{className:"h-[400px] p-6",children:(0,r.jsx)(_,{})})]})}),(0,r.jsx)("div",{className:"lg:col-span-2 space-y-6",children:(0,r.jsxs)(E.Zb,{className:"shadow-sm hover:shadow-md transition-shadow duration-200",children:[(0,r.jsx)(E.Ol,{className:"border-b bg-muted/10",children:(0,r.jsx)(E.ll,{className:"text-xl",children:"Latest Bookings"})}),(0,r.jsx)(E.aY,{className:"p-0",children:(0,r.jsx)(M.x,{className:"h-[400px]",children:(0,r.jsx)("div",{className:"space-y-0",children:null==l?void 0:l.map(e=>{var t,a;return(0,r.jsxs)("div",{className:"flex justify-between items-start p-4 hover:bg-muted/5 transition-colors duration-200 border-b last:border-0",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)("p",{className:"font-semibold text-base",children:null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.name})}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:null==e?void 0:null===(a=e.vanVariation)||void 0===a?void 0:a.name}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:(0,V.B)(new Date((null==e?void 0:e.createdAt)||0),new Date,{addSuffix:!0})})]}),(0,r.jsx)("div",{className:"text-right",children:(0,r.jsxs)("p",{className:"text-lg font-bold text-primary",children:["\xa3",null==e?void 0:e.cost]})})]},null==e?void 0:e.id)})})})})]})})]})}),(0,r.jsx)(C.nU,{value:"schedule",className:"w-full",children:(0,r.jsx)(E.Zb,{className:"shadow-sm hover:shadow-md transition-shadow duration-200",children:(0,r.jsxs)(E.aY,{className:"p-6",children:[(0,r.jsxs)("div",{className:"flex gap-4 mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-4 h-4 rounded",style:{backgroundColor:I.CONFIRMED}}),(0,r.jsx)("span",{className:"text-sm",children:"Confirmed"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-4 h-4 rounded",style:{backgroundColor:I.PENDING}}),(0,r.jsx)("span",{className:"text-sm",children:"Pending"})]})]}),(0,r.jsx)(R.Z,{plugins:[D.Z],initialView:"dayGridMonth",events:a,displayEventTime:!1,height:"600px",headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,dayGridWeek"}})]})})})]})})}}},function(e){e.O(0,[11069,45738,95475,75977,49341,68057,61667,49774,92888,40179],function(){return e(e.s=26117)}),_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.