From 9ee367624022c15fdc63d81aac2dde01ebf99665 Mon Sep 17 00:00:00 2001 From: Suriya Date: Tue, 16 Jun 2026 16:28:00 +0530 Subject: [PATCH] cors fix --- dist/assets/{Alert-Ok_eCidg.js => Alert-CzmzDPlp.js} | 2 +- dist/assets/{Button-DK5g2WFv.js => Button-Bcwcjqrt.js} | 2 +- dist/assets/{Close-DaYHvsp_.js => Close-CknXfd8d.js} | 2 +- .../assets/{ComingSoon-DFNLKciP.js => ComingSoon-CGM6Litg.js} | 2 +- dist/assets/{Dashboard-Cei3-Abv.js => Dashboard-CaTPkifY.js} | 2 +- .../{DeleteOutline-DHEVbt_6.js => DeleteOutline-DetaO5yn.js} | 2 +- .../assets/{EmptyState-B_LUop-_.js => EmptyState-CQsHTCg9.js} | 2 +- dist/assets/{Error404-Tw0V7paU.js => Error404-BtmKoWcF.js} | 2 +- dist/assets/{Error500-BhnsxntT.js => Error500-DmuBsKdr.js} | 2 +- .../{HomeOutlined-uwpuCaL2.js => HomeOutlined-DeKFCazV.js} | 2 +- ...{InputAdornment-Bwtqyiqg.js => InputAdornment-Bnl7vvhj.js} | 2 +- ...{LinearProgress-C7VdMGLk.js => LinearProgress-C8QvFQwb.js} | 2 +- dist/assets/{Link-DsI7GZfd.js => Link-Dp34e72e.js} | 2 +- ...Outlined-KXKsS6Ie.js => LocalShippingOutlined-DRozEKne.js} | 2 +- dist/assets/{Login-HaAIClqZ.js => Login-BohcWU3v.js} | 2 +- .../assets/{PageHeader-1FV595Go.js => PageHeader-CdP5B6Qy.js} | 2 +- .../{PhoneOutlined-BlqLiA8g.js => PhoneOutlined-CBkctqNs.js} | 2 +- dist/assets/{Pricing-B5KK24ta.js => Pricing-BuyNgb7k.js} | 2 +- dist/assets/{Refresh-Z6LWMmna.js => Refresh-DEoCZISD.js} | 2 +- dist/assets/{Settings-C9JXqPw8.js => Settings-CDtM7ArL.js} | 2 +- .../assets/{StatusChip-C-P1gBCE.js => StatusChip-VSepiSqW.js} | 2 +- ...ontOutlined-R0CC3Y_0.js => StorefrontOutlined-DupKwNFq.js} | 2 +- dist/assets/{Survey-ndeaWZLt.js => Survey-q3ahIjIS.js} | 2 +- dist/assets/{TableRow-CzSsRUSI.js => TableRow-CEoQ4SIZ.js} | 2 +- dist/assets/{TeamUsers-Cu1_QgRb.js => TeamUsers-BvR0WI-e.js} | 2 +- dist/assets/{Tenants-Vq8ITDL4.js => Tenants-mdxHS17O.js} | 2 +- dist/assets/{TextField-CWImxk_G.js => TextField-Btd7UbKs.js} | 2 +- ...Construction-BRmjUgS2.js => UnderConstruction-mds5BQRj.js} | 2 +- .../{VisibilityOff-7YzRgPyD.js => VisibilityOff-D5-u3y0u.js} | 2 +- dist/assets/{index-CkS0O37G.js => index-DdJWTZFy.js} | 4 ++-- dist/index.html | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) rename dist/assets/{Alert-Ok_eCidg.js => Alert-CzmzDPlp.js} (98%) rename dist/assets/{Button-DK5g2WFv.js => Button-Bcwcjqrt.js} (98%) rename dist/assets/{Close-DaYHvsp_.js => Close-CknXfd8d.js} (99%) rename dist/assets/{ComingSoon-DFNLKciP.js => ComingSoon-CGM6Litg.js} (89%) rename dist/assets/{Dashboard-Cei3-Abv.js => Dashboard-CaTPkifY.js} (95%) rename dist/assets/{DeleteOutline-DHEVbt_6.js => DeleteOutline-DetaO5yn.js} (99%) rename dist/assets/{EmptyState-B_LUop-_.js => EmptyState-CQsHTCg9.js} (92%) rename dist/assets/{Error404-Tw0V7paU.js => Error404-BtmKoWcF.js} (79%) rename dist/assets/{Error500-BhnsxntT.js => Error500-DmuBsKdr.js} (79%) rename dist/assets/{HomeOutlined-uwpuCaL2.js => HomeOutlined-DeKFCazV.js} (78%) rename dist/assets/{InputAdornment-Bwtqyiqg.js => InputAdornment-Bnl7vvhj.js} (96%) rename dist/assets/{LinearProgress-C7VdMGLk.js => LinearProgress-C8QvFQwb.js} (98%) rename dist/assets/{Link-DsI7GZfd.js => Link-Dp34e72e.js} (97%) rename dist/assets/{LocalShippingOutlined-KXKsS6Ie.js => LocalShippingOutlined-DRozEKne.js} (87%) rename dist/assets/{Login-HaAIClqZ.js => Login-BohcWU3v.js} (57%) rename dist/assets/{PageHeader-1FV595Go.js => PageHeader-CdP5B6Qy.js} (99%) rename dist/assets/{PhoneOutlined-BlqLiA8g.js => PhoneOutlined-CBkctqNs.js} (97%) rename dist/assets/{Pricing-B5KK24ta.js => Pricing-BuyNgb7k.js} (95%) rename dist/assets/{Refresh-Z6LWMmna.js => Refresh-DEoCZISD.js} (84%) rename dist/assets/{Settings-C9JXqPw8.js => Settings-CDtM7ArL.js} (98%) rename dist/assets/{StatusChip-C-P1gBCE.js => StatusChip-VSepiSqW.js} (97%) rename dist/assets/{StorefrontOutlined-R0CC3Y_0.js => StorefrontOutlined-DupKwNFq.js} (96%) rename dist/assets/{Survey-ndeaWZLt.js => Survey-q3ahIjIS.js} (96%) rename dist/assets/{TableRow-CzSsRUSI.js => TableRow-CEoQ4SIZ.js} (99%) rename dist/assets/{TeamUsers-Cu1_QgRb.js => TeamUsers-BvR0WI-e.js} (94%) rename dist/assets/{Tenants-Vq8ITDL4.js => Tenants-mdxHS17O.js} (98%) rename dist/assets/{TextField-CWImxk_G.js => TextField-Btd7UbKs.js} (99%) rename dist/assets/{UnderConstruction-BRmjUgS2.js => UnderConstruction-mds5BQRj.js} (91%) rename dist/assets/{VisibilityOff-7YzRgPyD.js => VisibilityOff-D5-u3y0u.js} (97%) rename dist/assets/{index-CkS0O37G.js => index-DdJWTZFy.js} (95%) diff --git a/dist/assets/Alert-Ok_eCidg.js b/dist/assets/Alert-CzmzDPlp.js similarity index 98% rename from dist/assets/Alert-Ok_eCidg.js rename to dist/assets/Alert-CzmzDPlp.js index eba3026..9c3b077 100644 --- a/dist/assets/Alert-Ok_eCidg.js +++ b/dist/assets/Alert-CzmzDPlp.js @@ -1 +1 @@ -import{l as N,m as _,a3 as c,j as e,a as H,n as T,o as U,_ as n,ak as I,I as F,p as V,q as g,v as Z,w as d,P as q,ab as m,aa as M}from"./index-CkS0O37G.js";function D(o){return N("MuiAlert",o)}const S=_("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),G=c(e.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),J=c(e.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),K=c(e.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Q=c(e.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),X=c(e.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Y=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],oo=o=>{const{variant:s,color:r,severity:t,classes:l}=o,u={root:["root",`color${g(r||t)}`,`${s}${g(r||t)}`,`${s}`],icon:["icon"],message:["message"],action:["action"]};return Z(u,D,l)},to=d(q,{name:"MuiAlert",slot:"Root",overridesResolver:(o,s)=>{const{ownerState:r}=o;return[s.root,s[r.variant],s[`${r.variant}${g(r.color||r.severity)}`]]}})(({theme:o})=>{const s=o.palette.mode==="light"?m:M,r=o.palette.mode==="light"?M:m;return n({},o.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(o.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{colorSeverity:t,variant:"standard"},style:{color:o.vars?o.vars.palette.Alert[`${t}Color`]:s(o.palette[t].light,.6),backgroundColor:o.vars?o.vars.palette.Alert[`${t}StandardBg`]:r(o.palette[t].light,.9),[`& .${S.icon}`]:o.vars?{color:o.vars.palette.Alert[`${t}IconColor`]}:{color:o.palette[t].main}}})),...Object.entries(o.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{colorSeverity:t,variant:"outlined"},style:{color:o.vars?o.vars.palette.Alert[`${t}Color`]:s(o.palette[t].light,.6),border:`1px solid ${(o.vars||o).palette[t].light}`,[`& .${S.icon}`]:o.vars?{color:o.vars.palette.Alert[`${t}IconColor`]}:{color:o.palette[t].main}}})),...Object.entries(o.palette).filter(([,t])=>t.main&&t.dark).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:n({fontWeight:o.typography.fontWeightMedium},o.vars?{color:o.vars.palette.Alert[`${t}FilledColor`],backgroundColor:o.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:o.palette.mode==="dark"?o.palette[t].dark:o.palette[t].main,color:o.palette.getContrastText(o.palette[t].main)})}))]})}),so=d("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(o,s)=>s.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),eo=d("div",{name:"MuiAlert",slot:"Message",overridesResolver:(o,s)=>s.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),j=d("div",{name:"MuiAlert",slot:"Action",overridesResolver:(o,s)=>s.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),z={success:e.jsx(G,{fontSize:"inherit"}),warning:e.jsx(J,{fontSize:"inherit"}),error:e.jsx(K,{fontSize:"inherit"}),info:e.jsx(Q,{fontSize:"inherit"})},ao=H.forwardRef(function(s,r){const t=T({props:s,name:"MuiAlert"}),{action:l,children:u,className:$,closeText:v="Close",color:f,components:x={},componentsProps:b={},icon:C,iconMapping:L=z,onClose:A,role:P="alert",severity:p="success",slotProps:h={},slots:R={},variant:k="standard"}=t,O=U(t,Y),a=n({},t,{color:f,severity:p,variant:k,colorSeverity:f||p}),i=oo(a),y={slots:n({closeButton:x.CloseButton,closeIcon:x.CloseIcon},R),slotProps:n({},b,h)},[B,E]=I("closeButton",{elementType:F,externalForwardedProps:y,ownerState:a}),[W,w]=I("closeIcon",{elementType:X,externalForwardedProps:y,ownerState:a});return e.jsxs(to,n({role:P,elevation:0,ownerState:a,className:V(i.root,$),ref:r},O,{children:[C!==!1?e.jsx(so,{ownerState:a,className:i.icon,children:C||L[p]||z[p]}):null,e.jsx(eo,{ownerState:a,className:i.message,children:u}),l!=null?e.jsx(j,{ownerState:a,className:i.action,children:l}):null,l==null&&A?e.jsx(j,{ownerState:a,className:i.action,children:e.jsx(B,n({size:"small","aria-label":v,title:v,color:"inherit",onClick:A},E,{children:e.jsx(W,n({fontSize:"small"},w))}))}):null]}))});export{ao as A,X as C}; +import{l as N,m as _,a3 as c,j as e,a as H,n as T,o as U,_ as n,ak as I,I as F,p as V,q as g,v as Z,w as d,P as q,ab as m,aa as M}from"./index-DdJWTZFy.js";function D(o){return N("MuiAlert",o)}const S=_("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),G=c(e.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),J=c(e.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),K=c(e.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Q=c(e.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),X=c(e.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Y=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],oo=o=>{const{variant:s,color:r,severity:t,classes:l}=o,u={root:["root",`color${g(r||t)}`,`${s}${g(r||t)}`,`${s}`],icon:["icon"],message:["message"],action:["action"]};return Z(u,D,l)},to=d(q,{name:"MuiAlert",slot:"Root",overridesResolver:(o,s)=>{const{ownerState:r}=o;return[s.root,s[r.variant],s[`${r.variant}${g(r.color||r.severity)}`]]}})(({theme:o})=>{const s=o.palette.mode==="light"?m:M,r=o.palette.mode==="light"?M:m;return n({},o.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(o.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{colorSeverity:t,variant:"standard"},style:{color:o.vars?o.vars.palette.Alert[`${t}Color`]:s(o.palette[t].light,.6),backgroundColor:o.vars?o.vars.palette.Alert[`${t}StandardBg`]:r(o.palette[t].light,.9),[`& .${S.icon}`]:o.vars?{color:o.vars.palette.Alert[`${t}IconColor`]}:{color:o.palette[t].main}}})),...Object.entries(o.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{colorSeverity:t,variant:"outlined"},style:{color:o.vars?o.vars.palette.Alert[`${t}Color`]:s(o.palette[t].light,.6),border:`1px solid ${(o.vars||o).palette[t].light}`,[`& .${S.icon}`]:o.vars?{color:o.vars.palette.Alert[`${t}IconColor`]}:{color:o.palette[t].main}}})),...Object.entries(o.palette).filter(([,t])=>t.main&&t.dark).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:n({fontWeight:o.typography.fontWeightMedium},o.vars?{color:o.vars.palette.Alert[`${t}FilledColor`],backgroundColor:o.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:o.palette.mode==="dark"?o.palette[t].dark:o.palette[t].main,color:o.palette.getContrastText(o.palette[t].main)})}))]})}),so=d("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(o,s)=>s.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),eo=d("div",{name:"MuiAlert",slot:"Message",overridesResolver:(o,s)=>s.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),j=d("div",{name:"MuiAlert",slot:"Action",overridesResolver:(o,s)=>s.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),z={success:e.jsx(G,{fontSize:"inherit"}),warning:e.jsx(J,{fontSize:"inherit"}),error:e.jsx(K,{fontSize:"inherit"}),info:e.jsx(Q,{fontSize:"inherit"})},ao=H.forwardRef(function(s,r){const t=T({props:s,name:"MuiAlert"}),{action:l,children:u,className:$,closeText:v="Close",color:f,components:x={},componentsProps:b={},icon:C,iconMapping:L=z,onClose:A,role:P="alert",severity:p="success",slotProps:h={},slots:R={},variant:k="standard"}=t,O=U(t,Y),a=n({},t,{color:f,severity:p,variant:k,colorSeverity:f||p}),i=oo(a),y={slots:n({closeButton:x.CloseButton,closeIcon:x.CloseIcon},R),slotProps:n({},b,h)},[B,E]=I("closeButton",{elementType:F,externalForwardedProps:y,ownerState:a}),[W,w]=I("closeIcon",{elementType:X,externalForwardedProps:y,ownerState:a});return e.jsxs(to,n({role:P,elevation:0,ownerState:a,className:V(i.root,$),ref:r},O,{children:[C!==!1?e.jsx(so,{ownerState:a,className:i.icon,children:C||L[p]||z[p]}):null,e.jsx(eo,{ownerState:a,className:i.message,children:u}),l!=null?e.jsx(j,{ownerState:a,className:i.action,children:l}):null,l==null&&A?e.jsx(j,{ownerState:a,className:i.action,children:e.jsx(B,n({size:"small","aria-label":v,title:v,color:"inherit",onClick:A},E,{children:e.jsx(W,n({fontSize:"small"},w))}))}):null]}))});export{ao as A,X as C}; diff --git a/dist/assets/Button-DK5g2WFv.js b/dist/assets/Button-Bcwcjqrt.js similarity index 98% rename from dist/assets/Button-DK5g2WFv.js rename to dist/assets/Button-Bcwcjqrt.js index 1fa6166..75ca73a 100644 --- a/dist/assets/Button-DK5g2WFv.js +++ b/dist/assets/Button-Bcwcjqrt.js @@ -1 +1 @@ -import{l as V,m as _,a as d,aI as j,n as O,o as F,_ as r,j as b,p as R,q as n,v as U,w as z,W as G,V as A,A as u}from"./index-CkS0O37G.js";function D(o){return V("MuiButton",o)}const v=_("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),H=d.createContext({}),q=d.createContext(void 0),J=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],K=o=>{const{color:a,disableElevation:i,fullWidth:s,size:t,variant:l,classes:c}=o,x={root:["root",l,`${l}${n(a)}`,`size${n(t)}`,`${l}Size${n(t)}`,`color${n(a)}`,i&&"disableElevation",s&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${n(t)}`],endIcon:["icon","endIcon",`iconSize${n(t)}`]},g=U(x,D,c);return r({},c,g)},k=o=>r({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Q=z(G,{shouldForwardProp:o=>A(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.root,a[i.variant],a[`${i.variant}${n(i.color)}`],a[`size${n(i.size)}`],a[`${i.variant}Size${n(i.size)}`],i.color==="inherit"&&a.colorInherit,i.disableElevation&&a.disableElevation,i.fullWidth&&a.fullWidth]}})(({theme:o,ownerState:a})=>{var i,s;const t=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],l=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return r({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":r({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="text"&&a.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="outlined"&&a.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[a.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:l,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},a.variant==="contained"&&a.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[a.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[a.color].main}}),"&:active":r({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${v.focusVisible}`]:r({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${v.disabled}`]:r({color:(o.vars||o).palette.action.disabled},a.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},a.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},a.variant==="text"&&{padding:"6px 8px"},a.variant==="text"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main},a.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},a.variant==="outlined"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[a.color].mainChannel} / 0.5)`:`1px solid ${u(o.palette[a.color].main,.5)}`},a.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(i=(s=o.palette).getContrastText)==null?void 0:i.call(s,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:t,boxShadow:(o.vars||o).shadows[2]},a.variant==="contained"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].contrastText,backgroundColor:(o.vars||o).palette[a.color].main},a.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},a.size==="small"&&a.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},a.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${v.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${v.disabled}`]:{boxShadow:"none"}}),X=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.startIcon,a[`iconSize${n(i.size)}`]]}})(({ownerState:o})=>r({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},k(o))),Y=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.endIcon,a[`iconSize${n(i.size)}`]]}})(({ownerState:o})=>r({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},k(o))),w=d.forwardRef(function(a,i){const s=d.useContext(H),t=d.useContext(q),l=j(s,a),c=O({props:l,name:"MuiButton"}),{children:x,color:g="primary",component:C="button",className:h,disabled:f=!1,disableElevation:E=!1,disableFocusRipple:y=!1,endIcon:I,focusVisibleClassName:W,fullWidth:P=!1,size:M="medium",startIcon:$,type:B,variant:N="text"}=c,L=F(c,J),p=r({},c,{color:g,component:C,disabled:f,disableElevation:E,disableFocusRipple:y,fullWidth:P,size:M,type:B,variant:N}),e=K(p),S=$&&b.jsx(X,{className:e.startIcon,ownerState:p,children:$}),m=I&&b.jsx(Y,{className:e.endIcon,ownerState:p,children:I}),T=t||"";return b.jsxs(Q,r({ownerState:p,className:R(s.className,e.root,h,T),component:C,disabled:f,focusRipple:!y,focusVisibleClassName:R(e.focusVisible,W),ref:i,type:B},L,{classes:e,children:[S,x,m]}))});export{w as B}; +import{l as V,m as _,a as d,aI as j,n as O,o as F,_ as r,j as b,p as R,q as n,v as U,w as z,W as G,V as A,A as u}from"./index-DdJWTZFy.js";function D(o){return V("MuiButton",o)}const v=_("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),H=d.createContext({}),q=d.createContext(void 0),J=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],K=o=>{const{color:a,disableElevation:i,fullWidth:s,size:t,variant:l,classes:c}=o,x={root:["root",l,`${l}${n(a)}`,`size${n(t)}`,`${l}Size${n(t)}`,`color${n(a)}`,i&&"disableElevation",s&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${n(t)}`],endIcon:["icon","endIcon",`iconSize${n(t)}`]},g=U(x,D,c);return r({},c,g)},k=o=>r({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Q=z(G,{shouldForwardProp:o=>A(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.root,a[i.variant],a[`${i.variant}${n(i.color)}`],a[`size${n(i.size)}`],a[`${i.variant}Size${n(i.size)}`],i.color==="inherit"&&a.colorInherit,i.disableElevation&&a.disableElevation,i.fullWidth&&a.fullWidth]}})(({theme:o,ownerState:a})=>{var i,s;const t=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],l=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return r({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":r({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="text"&&a.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="outlined"&&a.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[a.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:u(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:l,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},a.variant==="contained"&&a.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[a.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[a.color].main}}),"&:active":r({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${v.focusVisible}`]:r({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${v.disabled}`]:r({color:(o.vars||o).palette.action.disabled},a.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},a.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},a.variant==="text"&&{padding:"6px 8px"},a.variant==="text"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main},a.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},a.variant==="outlined"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[a.color].mainChannel} / 0.5)`:`1px solid ${u(o.palette[a.color].main,.5)}`},a.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(i=(s=o.palette).getContrastText)==null?void 0:i.call(s,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:t,boxShadow:(o.vars||o).shadows[2]},a.variant==="contained"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].contrastText,backgroundColor:(o.vars||o).palette[a.color].main},a.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},a.size==="small"&&a.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},a.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${v.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${v.disabled}`]:{boxShadow:"none"}}),X=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.startIcon,a[`iconSize${n(i.size)}`]]}})(({ownerState:o})=>r({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},k(o))),Y=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.endIcon,a[`iconSize${n(i.size)}`]]}})(({ownerState:o})=>r({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},k(o))),w=d.forwardRef(function(a,i){const s=d.useContext(H),t=d.useContext(q),l=j(s,a),c=O({props:l,name:"MuiButton"}),{children:x,color:g="primary",component:C="button",className:h,disabled:f=!1,disableElevation:E=!1,disableFocusRipple:y=!1,endIcon:I,focusVisibleClassName:W,fullWidth:P=!1,size:M="medium",startIcon:$,type:B,variant:N="text"}=c,L=F(c,J),p=r({},c,{color:g,component:C,disabled:f,disableElevation:E,disableFocusRipple:y,fullWidth:P,size:M,type:B,variant:N}),e=K(p),S=$&&b.jsx(X,{className:e.startIcon,ownerState:p,children:$}),m=I&&b.jsx(Y,{className:e.endIcon,ownerState:p,children:I}),T=t||"";return b.jsxs(Q,r({ownerState:p,className:R(s.className,e.root,h,T),component:C,disabled:f,focusRipple:!y,focusVisibleClassName:R(e.focusVisible,W),ref:i,type:B},L,{classes:e,children:[S,x,m]}))});export{w as B}; diff --git a/dist/assets/Close-DaYHvsp_.js b/dist/assets/Close-CknXfd8d.js similarity index 99% rename from dist/assets/Close-DaYHvsp_.js rename to dist/assets/Close-CknXfd8d.js index 1730105..80e7482 100644 --- a/dist/assets/Close-DaYHvsp_.js +++ b/dist/assets/Close-CknXfd8d.js @@ -1 +1 @@ -import{l as st,m as at,a as d,n as it,o as Z,j as b,_ as u,p as W,v as ct,w as L,T as le,V as re,q as Lt,W as $t,X as ne,Y as kt,Z as Dt,$ as Ft,a0 as nt,a1 as se,k as vt,a2 as ae,r as Ot,i as _t,S as ie,B as ce}from"./index-CkS0O37G.js";import{K as de,a as ue}from"./PhoneOutlined-BlqLiA8g.js";let V;function At(){if(V)return V;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),V="reverse",t.scrollLeft>0?V="default":(t.scrollLeft=1,t.scrollLeft===0&&(V="negative")),document.body.removeChild(t),V}function fe(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return st("MuiDialogContentText",t)}at("MuiDialogContentText",["root"]);const be=["children","className"],he=t=>{const{classes:e}=t,n=ct({root:["root"]},pe,e);return u({},e,n)},ve=L(le,{shouldForwardProp:t=>re(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Ke=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiDialogContentText"}),{className:s}=n,a=Z(n,be),h=he(a);return b.jsx(ve,u({component:"p",variant:"body1",color:"text.secondary",ref:l,ownerState:a,className:W(h.root,s)},n,{classes:h}))});function xe(t){return st("MuiTab",t)}const j=at("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),me=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Se=t=>{const{classes:e,textColor:l,fullWidth:n,wrapped:s,icon:a,label:h,selected:v,disabled:f}=t,S={root:["root",a&&h&&"labelIcon",`textColor${Lt(l)}`,n&&"fullWidth",s&&"wrapped",v&&"selected",f&&"disabled"],iconWrapper:["iconWrapper"]};return ct(S,xe,e)},ge=L($t,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Lt(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${j.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>u({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${j.iconWrapper}`]:u({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${j.selected}`]:{opacity:1},[`&.${j.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${j.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${j.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${j.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${j.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Ge=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiTab"}),{className:s,disabled:a=!1,disableFocusRipple:h=!1,fullWidth:v,icon:f,iconPosition:S="top",indicator:B,label:C,onChange:x,onClick:w,onFocus:$,selected:T,selectionFollowsFocus:g,textColor:_="inherit",value:R,wrapped:dt=!1}=n,A=Z(n,me),U=u({},n,{disabled:a,disableFocusRipple:h,selected:T,icon:!!f,iconPosition:S,label:!!C,fullWidth:v,textColor:_,wrapped:dt}),H=Se(U),k=f&&C&&d.isValidElement(f)?d.cloneElement(f,{className:W(H.iconWrapper,f.props.className)}):f,J=E=>{!T&&x&&x(E,R),w&&w(E)},X=E=>{g&&!T&&x&&x(E,R),$&&$(E)};return b.jsxs(ge,u({focusRipple:!h,className:W(H.root,s),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:J,onFocus:X,ownerState:U,tabIndex:T?0:-1},A,{children:[S==="top"||S==="start"?b.jsxs(d.Fragment,{children:[k,C]}):b.jsxs(d.Fragment,{children:[C,k]}),B]}))});function Ce(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ye(t,e,l,n={},s=()=>{}){const{ease:a=Ce,duration:h=300}=n;let v=null;const f=e[t];let S=!1;const B=()=>{S=!0},C=x=>{if(S){s(new Error("Animation cancelled"));return}v===null&&(v=x);const w=Math.min(1,(x-v)/h);if(e[t]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{s(null)});return}requestAnimationFrame(C)};return f===l?(s(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Be=["onChange"],we={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Te(t){const{onChange:e}=t,l=Z(t,Be),n=d.useRef(),s=d.useRef(null),a=()=>{n.current=s.current.offsetHeight-s.current.clientHeight};return ne(()=>{const h=kt(()=>{const f=n.current;a(),f!==n.current&&e(n.current)}),v=Dt(s.current);return v.addEventListener("resize",h),()=>{h.clear(),v.removeEventListener("resize",h)}},[e]),d.useEffect(()=>{a(),e(n.current)},[e]),b.jsx("div",u({style:we},l,{ref:s}))}function Ie(t){return st("MuiTabScrollButton",t)}const Me=at("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Re=["className","slots","slotProps","direction","orientation","disabled"],Ee=t=>{const{classes:e,orientation:l,disabled:n}=t;return ct({root:["root",l,n&&"disabled"]},Ie,e)},ze=L($t,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>u({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var n,s;const a=it({props:e,name:"MuiTabScrollButton"}),{className:h,slots:v={},slotProps:f={},direction:S}=a,B=Z(a,Re),C=Ft(),x=u({isRtl:C},a),w=Ee(x),$=(n=v.StartScrollButtonIcon)!=null?n:de,T=(s=v.EndScrollButtonIcon)!=null?s:ue,g=nt({elementType:$,externalSlotProps:f.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),_=nt({elementType:T,externalSlotProps:f.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return b.jsx(ze,u({component:"div",className:W(w.root,h),ref:l,role:null,ownerState:x,tabIndex:null},B,{children:S==="left"?b.jsx($,u({},g)):b.jsx(T,u({},_))}))});function Pe(t){return st("MuiTabs",t)}const xt=at("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ne=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Pt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Nt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,lt=(t,e,l)=>{let n=!1,s=l(t,e);for(;s;){if(s===t.firstChild){if(n)return;n=!0}const a=s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||a)s=l(t,s);else{s.focus();return}}},je=t=>{const{vertical:e,fixed:l,hideScrollbar:n,scrollableX:s,scrollableY:a,centered:h,scrollButtonsHideMobile:v,classes:f}=t;return ct({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",n&&"hideScrollbar",s&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",v&&"scrollButtonsHideMobile"],scrollableX:[s&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},Pe,f)},Le=L("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${xt.scrollButtons}`]:e.scrollButtons},{[`& .${xt.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>u({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${xt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),$e=L("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>u({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),ke=L("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>u({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),De=L("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>u({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Fe=L(Te)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),jt={},Ze=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiTabs"}),s=se(),a=Ft(),{"aria-label":h,"aria-labelledby":v,action:f,centered:S=!1,children:B,className:C,component:x="div",allowScrollButtonsMobile:w=!1,indicatorColor:$="primary",onChange:T,orientation:g="horizontal",ScrollButtonComponent:_=We,scrollButtons:R="auto",selectionFollowsFocus:dt,slots:A={},slotProps:U={},TabIndicatorProps:H={},TabScrollButtonProps:k={},textColor:J="primary",value:X,variant:E="standard",visibleScrollbar:ut=!1}=n,Ht=Z(n,Ne),I=E==="scrollable",y=g==="vertical",Y=y?"scrollTop":"scrollLeft",Q=y?"top":"left",tt=y?"bottom":"right",ft=y?"clientHeight":"clientWidth",q=y?"height":"width",D=u({},n,{component:x,allowScrollButtonsMobile:w,indicatorColor:$,orientation:g,vertical:y,scrollButtons:R,textColor:J,variant:E,visibleScrollbar:ut,fixed:!I,hideScrollbar:I&&!ut,scrollableX:I&&!y,scrollableY:I&&y,centered:S&&!I,scrollButtonsHideMobile:!w}),P=je(D),Xt=nt({elementType:A.StartScrollButtonIcon,externalSlotProps:U.startScrollButtonIcon,ownerState:D}),Vt=nt({elementType:A.EndScrollButtonIcon,externalSlotProps:U.endScrollButtonIcon,ownerState:D}),[gt,Ut]=d.useState(!1),[F,Ct]=d.useState(jt),[yt,Yt]=d.useState(!1),[Bt,qt]=d.useState(!1),[wt,Kt]=d.useState(!1),[Tt,Gt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,z=d.useRef(null),O=d.useRef(null),Mt=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:fe(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&X!==!1){const i=O.current.children;if(i.length>0){const p=i[It.get(X)];c=p?p.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},K=vt(()=>{const{tabsMeta:o,tabMeta:r}=Mt();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const m=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+m)}const p={[i]:c,[q]:r?r[q]:0};if(isNaN(F[i])||isNaN(F[q]))Ct(p);else{const m=Math.abs(F[i]-p[i]),M=Math.abs(F[q]-p[q]);(m>=1||M>=1)&&Ct(p)}}),pt=(o,{animation:r=!0}={})=>{r?ye(Y,z.current,o,{duration:s.transitions.duration.standard}):z.current[Y]=o},Rt=o=>{let r=z.current[Y];y?r+=o:(r+=o*(a?-1:1),r*=a&&At()==="reverse"?-1:1),pt(r)},Et=()=>{const o=z.current[ft];let r=0;const c=Array.from(O.current.children);for(let i=0;io){i===0&&(r=o);break}r+=p[ft]}return r},Zt=()=>{Rt(-1*Et())},Jt=()=>{Rt(Et())},Qt=d.useCallback(o=>{Gt({overflow:null,scrollbarWidth:o})},[]),te=()=>{const o={};o.scrollbarSizeListener=I?b.jsx(Fe,{onChange:Qt,className:W(P.scrollableX,P.hideScrollbar)}):null;const c=I&&(R==="auto"&&(yt||Bt)||R===!0);return o.scrollButtonStart=c?b.jsx(_,u({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Xt},orientation:g,direction:a?"right":"left",onClick:Zt,disabled:!yt},k,{className:W(P.scrollButtons,k.className)})):null,o.scrollButtonEnd=c?b.jsx(_,u({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:g,direction:a?"left":"right",onClick:Jt,disabled:!Bt},k,{className:W(P.scrollButtons,k.className)})):null,o},zt=vt(o=>{const{tabsMeta:r,tabMeta:c}=Mt();if(!(!c||!r)){if(c[Q]r[tt]){const i=r[Y]+(c[tt]-r[tt]);pt(i,{animation:o})}}}),et=vt(()=>{I&&R!==!1&&Kt(!wt)});d.useEffect(()=>{const o=kt(()=>{z.current&&K()});let r;const c=m=>{m.forEach(M=>{M.removedNodes.forEach(G=>{var N;(N=r)==null||N.unobserve(G)}),M.addedNodes.forEach(G=>{var N;(N=r)==null||N.observe(G)})}),o(),et()},i=Dt(z.current);i.addEventListener("resize",o);let p;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(m=>{r.observe(m)})),typeof MutationObserver<"u"&&(p=new MutationObserver(c),p.observe(O.current,{childList:!0})),()=>{var m,M;o.clear(),i.removeEventListener("resize",o),(m=p)==null||m.disconnect(),(M=r)==null||M.disconnect()}},[K,et]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&I&&R!==!1){const c=o[0],i=o[r-1],p={root:z.current,threshold:.99},m=ht=>{Yt(!ht[0].isIntersecting)},M=new IntersectionObserver(m,p);M.observe(c);const G=ht=>{qt(!ht[0].isIntersecting)},N=new IntersectionObserver(G,p);return N.observe(i),()=>{M.disconnect(),N.disconnect()}}},[I,R,wt,B==null?void 0:B.length]),d.useEffect(()=>{Ut(!0)},[]),d.useEffect(()=>{K()}),d.useEffect(()=>{zt(jt!==F)},[zt,F]),d.useImperativeHandle(f,()=>({updateIndicator:K,updateScrollButtons:et}),[K,et]);const Wt=b.jsx(De,u({},H,{className:W(P.indicator,H.className),ownerState:D,style:u({},F,H.style)}));let ot=0;const ee=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?ot:o.props.value;It.set(r,ot);const c=r===X;return ot+=1,d.cloneElement(o,u({fullWidth:E==="fullWidth",indicator:c&&!gt&&Wt,selected:c,selectionFollowsFocus:dt,onChange:T,textColor:J,value:r},ot===1&&X===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),oe=o=>{const r=O.current,c=ae(r).activeElement;if(c.getAttribute("role")!=="tab")return;let p=g==="horizontal"?"ArrowLeft":"ArrowUp",m=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&a&&(p="ArrowRight",m="ArrowLeft"),o.key){case p:o.preventDefault(),lt(r,c,Nt);break;case m:o.preventDefault(),lt(r,c,Pt);break;case"Home":o.preventDefault(),lt(r,null,Pt);break;case"End":o.preventDefault(),lt(r,null,Nt);break}},bt=te();return b.jsxs(Le,u({className:W(P.root,C),ownerState:D,ref:l,as:x},Ht,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,b.jsxs($e,{className:P.scroller,ownerState:D,style:{overflow:Tt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ut?void 0:-Tt.scrollbarWidth},ref:z,children:[b.jsx(ke,{"aria-label":h,"aria-labelledby":v,"aria-orientation":g==="vertical"?"vertical":null,className:P.flexContainer,ownerState:D,onKeyDown:oe,ref:O,role:"tablist",children:ee}),gt&&Wt]}),bt.scrollButtonEnd]}))});var mt={},Oe=_t;Object.defineProperty(mt,"__esModule",{value:!0});var _e=mt.default=void 0,Ae=Oe(Ot()),rt=b;_e=mt.default=(0,Ae.default)([(0,rt.jsx)("path",{d:"M14 12h4v1.5h-4zm0 3h4v1.5h-4z"},"0"),(0,rt.jsx)("path",{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m-9 0V4h2v5h-2zm9 13H4V9h5c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2h5z"},"1"),(0,rt.jsx)("circle",{cx:"9",cy:"13.5",r:"1.5"},"2"),(0,rt.jsx)("path",{d:"M11.08 16.18c-.64-.28-1.34-.43-2.08-.43s-1.44.15-2.08.43c-.56.24-.92.78-.92 1.39V18h6v-.43c0-.61-.36-1.15-.92-1.39"},"3")],"BadgeOutlined");function Je({label:t,count:e,active:l=!1}){return b.jsxs(ie,{direction:"row",alignItems:"center",spacing:1,children:[b.jsx("span",{children:t}),b.jsx(ce,{component:"span",sx:{minWidth:20,height:20,px:.75,borderRadius:10,fontSize:"0.72rem",fontWeight:700,lineHeight:"20px",textAlign:"center",bgcolor:l?"primary.main":"grey.200",color:l?"#fff":"text.secondary"},children:e})]})}var St={},He=_t;Object.defineProperty(St,"__esModule",{value:!0});var Xe=St.default=void 0,Ve=He(Ot()),Ue=b;Xe=St.default=(0,Ve.default)((0,Ue.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");export{Ke as D,Ze as T,Ge as a,Je as b,_e as c,Xe as d}; +import{l as st,m as at,a as d,n as it,o as Z,j as b,_ as u,p as W,v as ct,w as L,T as le,V as re,q as Lt,W as $t,X as ne,Y as kt,Z as Dt,$ as Ft,a0 as nt,a1 as se,k as vt,a2 as ae,r as Ot,i as _t,S as ie,B as ce}from"./index-DdJWTZFy.js";import{K as de,a as ue}from"./PhoneOutlined-CBkctqNs.js";let V;function At(){if(V)return V;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),V="reverse",t.scrollLeft>0?V="default":(t.scrollLeft=1,t.scrollLeft===0&&(V="negative")),document.body.removeChild(t),V}function fe(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return st("MuiDialogContentText",t)}at("MuiDialogContentText",["root"]);const be=["children","className"],he=t=>{const{classes:e}=t,n=ct({root:["root"]},pe,e);return u({},e,n)},ve=L(le,{shouldForwardProp:t=>re(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Ke=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiDialogContentText"}),{className:s}=n,a=Z(n,be),h=he(a);return b.jsx(ve,u({component:"p",variant:"body1",color:"text.secondary",ref:l,ownerState:a,className:W(h.root,s)},n,{classes:h}))});function xe(t){return st("MuiTab",t)}const j=at("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),me=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Se=t=>{const{classes:e,textColor:l,fullWidth:n,wrapped:s,icon:a,label:h,selected:v,disabled:f}=t,S={root:["root",a&&h&&"labelIcon",`textColor${Lt(l)}`,n&&"fullWidth",s&&"wrapped",v&&"selected",f&&"disabled"],iconWrapper:["iconWrapper"]};return ct(S,xe,e)},ge=L($t,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Lt(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${j.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>u({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${j.iconWrapper}`]:u({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${j.selected}`]:{opacity:1},[`&.${j.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${j.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${j.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${j.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${j.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Ge=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiTab"}),{className:s,disabled:a=!1,disableFocusRipple:h=!1,fullWidth:v,icon:f,iconPosition:S="top",indicator:B,label:C,onChange:x,onClick:w,onFocus:$,selected:T,selectionFollowsFocus:g,textColor:_="inherit",value:R,wrapped:dt=!1}=n,A=Z(n,me),U=u({},n,{disabled:a,disableFocusRipple:h,selected:T,icon:!!f,iconPosition:S,label:!!C,fullWidth:v,textColor:_,wrapped:dt}),H=Se(U),k=f&&C&&d.isValidElement(f)?d.cloneElement(f,{className:W(H.iconWrapper,f.props.className)}):f,J=E=>{!T&&x&&x(E,R),w&&w(E)},X=E=>{g&&!T&&x&&x(E,R),$&&$(E)};return b.jsxs(ge,u({focusRipple:!h,className:W(H.root,s),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:J,onFocus:X,ownerState:U,tabIndex:T?0:-1},A,{children:[S==="top"||S==="start"?b.jsxs(d.Fragment,{children:[k,C]}):b.jsxs(d.Fragment,{children:[C,k]}),B]}))});function Ce(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ye(t,e,l,n={},s=()=>{}){const{ease:a=Ce,duration:h=300}=n;let v=null;const f=e[t];let S=!1;const B=()=>{S=!0},C=x=>{if(S){s(new Error("Animation cancelled"));return}v===null&&(v=x);const w=Math.min(1,(x-v)/h);if(e[t]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{s(null)});return}requestAnimationFrame(C)};return f===l?(s(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Be=["onChange"],we={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Te(t){const{onChange:e}=t,l=Z(t,Be),n=d.useRef(),s=d.useRef(null),a=()=>{n.current=s.current.offsetHeight-s.current.clientHeight};return ne(()=>{const h=kt(()=>{const f=n.current;a(),f!==n.current&&e(n.current)}),v=Dt(s.current);return v.addEventListener("resize",h),()=>{h.clear(),v.removeEventListener("resize",h)}},[e]),d.useEffect(()=>{a(),e(n.current)},[e]),b.jsx("div",u({style:we},l,{ref:s}))}function Ie(t){return st("MuiTabScrollButton",t)}const Me=at("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Re=["className","slots","slotProps","direction","orientation","disabled"],Ee=t=>{const{classes:e,orientation:l,disabled:n}=t;return ct({root:["root",l,n&&"disabled"]},Ie,e)},ze=L($t,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>u({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var n,s;const a=it({props:e,name:"MuiTabScrollButton"}),{className:h,slots:v={},slotProps:f={},direction:S}=a,B=Z(a,Re),C=Ft(),x=u({isRtl:C},a),w=Ee(x),$=(n=v.StartScrollButtonIcon)!=null?n:de,T=(s=v.EndScrollButtonIcon)!=null?s:ue,g=nt({elementType:$,externalSlotProps:f.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),_=nt({elementType:T,externalSlotProps:f.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return b.jsx(ze,u({component:"div",className:W(w.root,h),ref:l,role:null,ownerState:x,tabIndex:null},B,{children:S==="left"?b.jsx($,u({},g)):b.jsx(T,u({},_))}))});function Pe(t){return st("MuiTabs",t)}const xt=at("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ne=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Pt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Nt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,lt=(t,e,l)=>{let n=!1,s=l(t,e);for(;s;){if(s===t.firstChild){if(n)return;n=!0}const a=s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||a)s=l(t,s);else{s.focus();return}}},je=t=>{const{vertical:e,fixed:l,hideScrollbar:n,scrollableX:s,scrollableY:a,centered:h,scrollButtonsHideMobile:v,classes:f}=t;return ct({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",n&&"hideScrollbar",s&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",v&&"scrollButtonsHideMobile"],scrollableX:[s&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},Pe,f)},Le=L("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${xt.scrollButtons}`]:e.scrollButtons},{[`& .${xt.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>u({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${xt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),$e=L("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>u({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),ke=L("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>u({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),De=L("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>u({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Fe=L(Te)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),jt={},Ze=d.forwardRef(function(e,l){const n=it({props:e,name:"MuiTabs"}),s=se(),a=Ft(),{"aria-label":h,"aria-labelledby":v,action:f,centered:S=!1,children:B,className:C,component:x="div",allowScrollButtonsMobile:w=!1,indicatorColor:$="primary",onChange:T,orientation:g="horizontal",ScrollButtonComponent:_=We,scrollButtons:R="auto",selectionFollowsFocus:dt,slots:A={},slotProps:U={},TabIndicatorProps:H={},TabScrollButtonProps:k={},textColor:J="primary",value:X,variant:E="standard",visibleScrollbar:ut=!1}=n,Ht=Z(n,Ne),I=E==="scrollable",y=g==="vertical",Y=y?"scrollTop":"scrollLeft",Q=y?"top":"left",tt=y?"bottom":"right",ft=y?"clientHeight":"clientWidth",q=y?"height":"width",D=u({},n,{component:x,allowScrollButtonsMobile:w,indicatorColor:$,orientation:g,vertical:y,scrollButtons:R,textColor:J,variant:E,visibleScrollbar:ut,fixed:!I,hideScrollbar:I&&!ut,scrollableX:I&&!y,scrollableY:I&&y,centered:S&&!I,scrollButtonsHideMobile:!w}),P=je(D),Xt=nt({elementType:A.StartScrollButtonIcon,externalSlotProps:U.startScrollButtonIcon,ownerState:D}),Vt=nt({elementType:A.EndScrollButtonIcon,externalSlotProps:U.endScrollButtonIcon,ownerState:D}),[gt,Ut]=d.useState(!1),[F,Ct]=d.useState(jt),[yt,Yt]=d.useState(!1),[Bt,qt]=d.useState(!1),[wt,Kt]=d.useState(!1),[Tt,Gt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,z=d.useRef(null),O=d.useRef(null),Mt=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:fe(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&X!==!1){const i=O.current.children;if(i.length>0){const p=i[It.get(X)];c=p?p.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},K=vt(()=>{const{tabsMeta:o,tabMeta:r}=Mt();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const m=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+m)}const p={[i]:c,[q]:r?r[q]:0};if(isNaN(F[i])||isNaN(F[q]))Ct(p);else{const m=Math.abs(F[i]-p[i]),M=Math.abs(F[q]-p[q]);(m>=1||M>=1)&&Ct(p)}}),pt=(o,{animation:r=!0}={})=>{r?ye(Y,z.current,o,{duration:s.transitions.duration.standard}):z.current[Y]=o},Rt=o=>{let r=z.current[Y];y?r+=o:(r+=o*(a?-1:1),r*=a&&At()==="reverse"?-1:1),pt(r)},Et=()=>{const o=z.current[ft];let r=0;const c=Array.from(O.current.children);for(let i=0;io){i===0&&(r=o);break}r+=p[ft]}return r},Zt=()=>{Rt(-1*Et())},Jt=()=>{Rt(Et())},Qt=d.useCallback(o=>{Gt({overflow:null,scrollbarWidth:o})},[]),te=()=>{const o={};o.scrollbarSizeListener=I?b.jsx(Fe,{onChange:Qt,className:W(P.scrollableX,P.hideScrollbar)}):null;const c=I&&(R==="auto"&&(yt||Bt)||R===!0);return o.scrollButtonStart=c?b.jsx(_,u({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Xt},orientation:g,direction:a?"right":"left",onClick:Zt,disabled:!yt},k,{className:W(P.scrollButtons,k.className)})):null,o.scrollButtonEnd=c?b.jsx(_,u({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:g,direction:a?"left":"right",onClick:Jt,disabled:!Bt},k,{className:W(P.scrollButtons,k.className)})):null,o},zt=vt(o=>{const{tabsMeta:r,tabMeta:c}=Mt();if(!(!c||!r)){if(c[Q]r[tt]){const i=r[Y]+(c[tt]-r[tt]);pt(i,{animation:o})}}}),et=vt(()=>{I&&R!==!1&&Kt(!wt)});d.useEffect(()=>{const o=kt(()=>{z.current&&K()});let r;const c=m=>{m.forEach(M=>{M.removedNodes.forEach(G=>{var N;(N=r)==null||N.unobserve(G)}),M.addedNodes.forEach(G=>{var N;(N=r)==null||N.observe(G)})}),o(),et()},i=Dt(z.current);i.addEventListener("resize",o);let p;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(m=>{r.observe(m)})),typeof MutationObserver<"u"&&(p=new MutationObserver(c),p.observe(O.current,{childList:!0})),()=>{var m,M;o.clear(),i.removeEventListener("resize",o),(m=p)==null||m.disconnect(),(M=r)==null||M.disconnect()}},[K,et]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&I&&R!==!1){const c=o[0],i=o[r-1],p={root:z.current,threshold:.99},m=ht=>{Yt(!ht[0].isIntersecting)},M=new IntersectionObserver(m,p);M.observe(c);const G=ht=>{qt(!ht[0].isIntersecting)},N=new IntersectionObserver(G,p);return N.observe(i),()=>{M.disconnect(),N.disconnect()}}},[I,R,wt,B==null?void 0:B.length]),d.useEffect(()=>{Ut(!0)},[]),d.useEffect(()=>{K()}),d.useEffect(()=>{zt(jt!==F)},[zt,F]),d.useImperativeHandle(f,()=>({updateIndicator:K,updateScrollButtons:et}),[K,et]);const Wt=b.jsx(De,u({},H,{className:W(P.indicator,H.className),ownerState:D,style:u({},F,H.style)}));let ot=0;const ee=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?ot:o.props.value;It.set(r,ot);const c=r===X;return ot+=1,d.cloneElement(o,u({fullWidth:E==="fullWidth",indicator:c&&!gt&&Wt,selected:c,selectionFollowsFocus:dt,onChange:T,textColor:J,value:r},ot===1&&X===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),oe=o=>{const r=O.current,c=ae(r).activeElement;if(c.getAttribute("role")!=="tab")return;let p=g==="horizontal"?"ArrowLeft":"ArrowUp",m=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&a&&(p="ArrowRight",m="ArrowLeft"),o.key){case p:o.preventDefault(),lt(r,c,Nt);break;case m:o.preventDefault(),lt(r,c,Pt);break;case"Home":o.preventDefault(),lt(r,null,Pt);break;case"End":o.preventDefault(),lt(r,null,Nt);break}},bt=te();return b.jsxs(Le,u({className:W(P.root,C),ownerState:D,ref:l,as:x},Ht,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,b.jsxs($e,{className:P.scroller,ownerState:D,style:{overflow:Tt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ut?void 0:-Tt.scrollbarWidth},ref:z,children:[b.jsx(ke,{"aria-label":h,"aria-labelledby":v,"aria-orientation":g==="vertical"?"vertical":null,className:P.flexContainer,ownerState:D,onKeyDown:oe,ref:O,role:"tablist",children:ee}),gt&&Wt]}),bt.scrollButtonEnd]}))});var mt={},Oe=_t;Object.defineProperty(mt,"__esModule",{value:!0});var _e=mt.default=void 0,Ae=Oe(Ot()),rt=b;_e=mt.default=(0,Ae.default)([(0,rt.jsx)("path",{d:"M14 12h4v1.5h-4zm0 3h4v1.5h-4z"},"0"),(0,rt.jsx)("path",{d:"M20 7h-5V4c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m-9 0V4h2v5h-2zm9 13H4V9h5c0 1.1.9 2 2 2h2c1.1 0 2-.9 2-2h5z"},"1"),(0,rt.jsx)("circle",{cx:"9",cy:"13.5",r:"1.5"},"2"),(0,rt.jsx)("path",{d:"M11.08 16.18c-.64-.28-1.34-.43-2.08-.43s-1.44.15-2.08.43c-.56.24-.92.78-.92 1.39V18h6v-.43c0-.61-.36-1.15-.92-1.39"},"3")],"BadgeOutlined");function Je({label:t,count:e,active:l=!1}){return b.jsxs(ie,{direction:"row",alignItems:"center",spacing:1,children:[b.jsx("span",{children:t}),b.jsx(ce,{component:"span",sx:{minWidth:20,height:20,px:.75,borderRadius:10,fontSize:"0.72rem",fontWeight:700,lineHeight:"20px",textAlign:"center",bgcolor:l?"primary.main":"grey.200",color:l?"#fff":"text.secondary"},children:e})]})}var St={},He=_t;Object.defineProperty(St,"__esModule",{value:!0});var Xe=St.default=void 0,Ve=He(Ot()),Ue=b;Xe=St.default=(0,Ve.default)((0,Ue.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");export{Ke as D,Ze as T,Ge as a,Je as b,_e as c,Xe as d}; diff --git a/dist/assets/ComingSoon-DFNLKciP.js b/dist/assets/ComingSoon-CGM6Litg.js similarity index 89% rename from dist/assets/ComingSoon-DFNLKciP.js rename to dist/assets/ComingSoon-CGM6Litg.js index 5df80ec..ae42bcb 100644 --- a/dist/assets/ComingSoon-DFNLKciP.js +++ b/dist/assets/ComingSoon-CGM6Litg.js @@ -1 +1 @@ -import{a as c,j as e,B as a,S as i,as as x,T as t}from"./index-CkS0O37G.js";import{T as d}from"./TextField-CWImxk_G.js";import{B as h}from"./Button-DK5g2WFv.js";const n=[{label:"Days",value:12},{label:"Hours",value:8},{label:"Minutes",value:45},{label:"Seconds",value:30}];function u(){const[s,o]=c.useState("");return e.jsx(a,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(i,{spacing:3,alignItems:"center",sx:{maxWidth:620,width:"100%"},children:[e.jsx(x,{}),e.jsx(t,{variant:"h2",sx:{fontWeight:800,color:"grey.800"},children:"Coming Soon"}),e.jsx(t,{variant:"body1",color:"text.secondary",children:"Something new is on its way"}),e.jsx(i,{direction:"row",spacing:{xs:1,sm:2},alignItems:"center",justifyContent:"center",children:n.map((r,l)=>e.jsxs(i,{direction:"row",spacing:{xs:1,sm:2},alignItems:"center",children:[e.jsxs(a,{sx:{width:{xs:64,sm:84},py:2,borderRadius:2,bgcolor:"primary.lighter",border:1,borderColor:"primary.light"},children:[e.jsx(t,{variant:"h2",sx:{fontWeight:800,color:"primary.main",lineHeight:1},children:String(r.value).padStart(2,"0")}),e.jsx(t,{variant:"caption",color:"text.secondary",sx:{textTransform:"uppercase",letterSpacing:1},children:r.label})]}),lo(r.target.value)}),e.jsx(h,{variant:"contained",sx:{whiteSpace:"nowrap",px:3},children:"Notify Me"})]})]})]})})}export{u as default}; +import{a as c,j as e,B as a,S as i,as as x,T as t}from"./index-DdJWTZFy.js";import{T as d}from"./TextField-Btd7UbKs.js";import{B as h}from"./Button-Bcwcjqrt.js";const n=[{label:"Days",value:12},{label:"Hours",value:8},{label:"Minutes",value:45},{label:"Seconds",value:30}];function u(){const[s,o]=c.useState("");return e.jsx(a,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(i,{spacing:3,alignItems:"center",sx:{maxWidth:620,width:"100%"},children:[e.jsx(x,{}),e.jsx(t,{variant:"h2",sx:{fontWeight:800,color:"grey.800"},children:"Coming Soon"}),e.jsx(t,{variant:"body1",color:"text.secondary",children:"Something new is on its way"}),e.jsx(i,{direction:"row",spacing:{xs:1,sm:2},alignItems:"center",justifyContent:"center",children:n.map((r,l)=>e.jsxs(i,{direction:"row",spacing:{xs:1,sm:2},alignItems:"center",children:[e.jsxs(a,{sx:{width:{xs:64,sm:84},py:2,borderRadius:2,bgcolor:"primary.lighter",border:1,borderColor:"primary.light"},children:[e.jsx(t,{variant:"h2",sx:{fontWeight:800,color:"primary.main",lineHeight:1},children:String(r.value).padStart(2,"0")}),e.jsx(t,{variant:"caption",color:"text.secondary",sx:{textTransform:"uppercase",letterSpacing:1},children:r.label})]}),lo(r.target.value)}),e.jsx(h,{variant:"contained",sx:{whiteSpace:"nowrap",px:3},children:"Notify Me"})]})]})]})})}export{u as default}; diff --git a/dist/assets/Dashboard-Cei3-Abv.js b/dist/assets/Dashboard-CaTPkifY.js similarity index 95% rename from dist/assets/Dashboard-Cei3-Abv.js rename to dist/assets/Dashboard-CaTPkifY.js index d51380c..40e00c7 100644 --- a/dist/assets/Dashboard-Cei3-Abv.js +++ b/dist/assets/Dashboard-CaTPkifY.js @@ -1 +1 @@ -import{r as R,j as e,i as T,S as c,B as d,T as i,a as u,t as D,C as U,d as V,U as W,b as q,D as G,f as z,c as J,e as K,g as Q}from"./index-CkS0O37G.js";import{d as X}from"./Refresh-Z6LWMmna.js";import{S as C,d as Y,a as Z,b as ee,c as P}from"./StatusChip-C-P1gBCE.js";import{P as k,G as h}from"./PageHeader-1FV595Go.js";import{E as S}from"./EmptyState-B_LUop-_.js";import{B as E}from"./Button-DK5g2WFv.js";import{A as te}from"./Alert-Ok_eCidg.js";import{T as re,a as se,b as ae,c as F,d as o,e as ne}from"./TableRow-CzSsRUSI.js";import{L as ie}from"./LinearProgress-C7VdMGLk.js";import{C as le}from"./Link-DsI7GZfd.js";var I={},oe=T;Object.defineProperty(I,"__esModule",{value:!0});var B=I.default=void 0,ce=oe(R()),de=e;B=I.default=(0,ce.default)((0,de.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined");var L={},xe=T;Object.defineProperty(L,"__esModule",{value:!0});var N=L.default=void 0,ue=xe(R()),he=e;N=L.default=(0,ue.default)((0,he.jsx)("path",{d:"M13 5.08c3.06.44 5.48 2.86 5.92 5.92h3.03c-.47-4.72-4.23-8.48-8.95-8.95zM18.92 13c-.44 3.06-2.86 5.48-5.92 5.92v3.03c4.72-.47 8.48-4.23 8.95-8.95zM11 18.92c-3.39-.49-6-3.4-6-6.92s2.61-6.43 6-6.92V2.05c-5.05.5-9 4.76-9 9.95 0 5.19 3.95 9.45 9 9.95z"}),"DonutLargeOutlined");var A={},me=T;Object.defineProperty(A,"__esModule",{value:!0});var H=A.default=void 0,ge=me(R()),je=e;H=A.default=(0,ge.default)((0,je.jsx)("path",{d:"m12 2-5.5 9h11zm0 3.84L13.93 9h-3.87zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5m0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5M3 21.5h8v-8H3zm2-6h4v4H5z"}),"CategoryOutlined");function pe({data:s=[],size:n=180,thickness:x=26,centerLabel:g,centerValue:y}){const j=s.reduce((a,b)=>a+b.value,0)||1,m=(n-x)/2,v=2*Math.PI*m;let f=0;return e.jsxs(c,{direction:{xs:"column",sm:"row"},spacing:3,alignItems:"center",justifyContent:"center",sx:{flexWrap:"wrap"},children:[e.jsxs(d,{sx:{position:"relative",width:n,maxWidth:"100%",aspectRatio:"1 / 1"},children:[e.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${n} ${n}`,children:e.jsxs("g",{transform:`rotate(-90 ${n/2} ${n/2})`,children:[e.jsx("circle",{cx:n/2,cy:n/2,r:m,fill:"none",stroke:"#F0F0F0",strokeWidth:x}),s.map((a,b)=>{const p=a.value/j*v,$=e.jsx("circle",{cx:n/2,cy:n/2,r:m,fill:"none",stroke:a.color,strokeWidth:x,strokeDasharray:`${p} ${v-p}`,strokeDashoffset:-f,strokeLinecap:"butt"},b);return f+=p,$})]})}),e.jsxs(d,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx(i,{variant:"h3",sx:{fontWeight:700},children:y??j}),e.jsx(i,{variant:"caption",color:"text.secondary",children:g??"Total"})]})]}),e.jsx(c,{spacing:1.25,children:s.map(a=>e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(d,{sx:{width:10,height:10,borderRadius:"3px",bgcolor:a.color}}),e.jsx(i,{variant:"body2",color:"text.secondary",sx:{minWidth:80},children:a.label}),e.jsx(i,{variant:"subtitle2",children:a.value.toLocaleString("en-IN")})]},a.label))})]})}const fe={newclient:"#00A2AE",contacted:"#FFBF00",onboarded:"#00A854",lost:"#F04134"},be=s=>fe[String(s||"").toLowerCase()]||"#8C8C8C",w=["#C01227","#00A2AE","#00A854","#FFBF00","#9E0E20","#8C8C8C","#D6515C"];function _({icon:s,title:n,action:x,color:g="primary",noPadding:y=!1,children:j}){return e.jsxs(le,{sx:{height:"100%",display:"flex",flexDirection:"column",borderRadius:4,boxShadow:"0 10px 30px rgba(0,0,0,0.03)",border:"1px solid rgba(0,0,0,0.04)"},children:[e.jsxs(c,{direction:"row",spacing:1.5,alignItems:"center",sx:{px:3,py:2,borderBottom:1,borderColor:"divider",background:m=>`linear-gradient(90deg, ${m.palette[g].lighter}66 0%, transparent 100%)`},children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${g}.lighter`,color:`${g}.main`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)"},children:e.jsx(s,{fontSize:"small"})}),e.jsx(i,{variant:"h6",sx:{fontWeight:700,color:"grey.800",flexGrow:1,letterSpacing:"-0.3px"},children:n}),x]}),e.jsx(d,{sx:{p:y?0:3,flexGrow:1},children:j})]})}function Ie(){var O;const[s,n]=u.useState([]),[x,g]=u.useState([]),[y,j]=u.useState(!0),[m,v]=u.useState(null),f=()=>{j(!0),v(null),Promise.all([z(),J()]).then(([t,r])=>{n((t||[]).map(K)),g((r||[]).map(Q))}).catch(t=>v(t.message||"Failed to load dashboard data")).finally(()=>j(!1))};u.useEffect(()=>{f()},[]);const a=u.useMemo(()=>({total:s.length,newCount:s.filter(t=>t.status==="newClient").length,parcels:s.reduce((t,r)=>t+r.parcelVolume,0),contracts:s.reduce((t,r)=>t+r.activeContracts,0)}),[s]),b=u.useMemo(()=>{const t={};return s.forEach(r=>{t[r.status]=(t[r.status]||0)+1}),Object.entries(t).sort((r,l)=>l[1]-r[1]).map(([r,l])=>({label:D(r),value:l,color:be(r)}))},[s]),p=u.useMemo(()=>{const t={};return s.forEach(r=>{const l=r.businessType||"other";t[l]=(t[l]||0)+1}),Object.entries(t).sort((r,l)=>l[1]-r[1])},[s]),$=((O=p[0])==null?void 0:O[1])||1,M=u.useMemo(()=>[...s].sort((t,r)=>String(r.lastUpdated).localeCompare(String(t.lastUpdated))).slice(0,6),[s]);return new Date().toLocaleDateString("en-IN",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),y?e.jsxs(e.Fragment,{children:[e.jsx(k,{title:"Dashboard",breadcrumbs:[{label:"Dashboard"}]}),e.jsx(d,{sx:{display:"flex",justifyContent:"center",py:12},children:e.jsx(U,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(k,{title:"Dashboard",breadcrumbs:[{label:"Dashboard"}],action:e.jsx(E,{variant:"outlined",startIcon:e.jsx(X,{}),onClick:f,children:"Refresh"})}),m&&e.jsx(te,{severity:"error",sx:{mb:2.5},action:e.jsx(E,{color:"inherit",size:"small",onClick:f,children:"Retry"}),children:m}),e.jsxs(h,{container:!0,spacing:3,children:[e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Total Clients",value:a.total,icon:V,color:"primary",caption:"All registered"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"New Clients",value:a.newCount,icon:Y,color:"primary",caption:"Awaiting onboarding"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Total Parcel Volume",value:a.parcels.toLocaleString("en-IN"),icon:Z,color:"primary",caption:"Across all clients"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Active Contracts",value:a.contracts,icon:ee,color:"primary",caption:"Currently running"})}),e.jsx(h,{item:!0,xs:12,lg:8,children:e.jsx(_,{icon:B,title:"Recent Clients",color:"primary",noPadding:!0,children:M.length===0?e.jsx(S,{title:"No clients yet",caption:"Add a client to see it here."}):e.jsx(re,{children:e.jsxs(se,{sx:{minWidth:600},children:[e.jsx(ae,{children:e.jsxs(F,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(o,{children:"Client"}),e.jsx(o,{children:"Type"}),e.jsx(o,{children:"Location"}),e.jsx(o,{align:"right",children:"Parcels"}),e.jsx(o,{children:"Status"})]})}),e.jsx(ne,{children:M.map(t=>e.jsxs(F,{hover:!0,children:[e.jsx(o,{children:e.jsxs(c,{direction:"row",spacing:1.25,alignItems:"center",children:[e.jsx(W,{name:t.name,size:32}),e.jsx(i,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:t.name})]})}),e.jsx(o,{children:e.jsx(i,{variant:"body2",children:D(t.businessType)||"—"})}),e.jsx(o,{children:e.jsxs(i,{variant:"body2",children:[t.city||"—",t.businessState?`, ${t.businessState}`:""]})}),e.jsx(o,{align:"right",sx:{fontWeight:600},children:t.parcelVolume.toLocaleString("en-IN")}),e.jsx(o,{children:e.jsx(P,{status:t.status})})]},t.id))})]})})})}),e.jsx(h,{item:!0,xs:12,lg:4,children:e.jsx(_,{icon:N,title:"Clients by Status",color:"primary",children:e.jsx(d,{sx:{py:1.5},children:b.length===0?e.jsx(S,{title:"No data"}):e.jsx(pe,{data:b,centerValue:a.total,centerLabel:"Clients"})})})}),e.jsx(h,{item:!0,xs:12,lg:8,children:e.jsx(_,{icon:H,title:"Clients by Business Type",color:"primary",children:p.length===0?e.jsx(S,{title:"No data"}):e.jsx(c,{spacing:2.25,children:p.map(([t,r],l)=>e.jsxs(d,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:.75},children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(d,{sx:{width:10,height:10,borderRadius:"3px",bgcolor:w[l%w.length]}}),e.jsx(i,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:D(t)})]}),e.jsxs(i,{variant:"body2",color:"text.secondary",children:[r," · ",Math.round(r/s.length*100),"%"]})]}),e.jsx(ie,{variant:"determinate",value:r/$*100,sx:{height:8,borderRadius:4,bgcolor:"grey.100","& .MuiLinearProgress-bar":{borderRadius:4,backgroundColor:w[l%w.length]}}})]},t))})})}),e.jsx(h,{item:!0,xs:12,lg:4,children:e.jsx(_,{icon:q,title:`App Users · ${x.length}`,color:"primary",children:x.length===0?e.jsx(S,{title:"No team users"}):e.jsx(c,{divider:e.jsx(G,{}),spacing:0,children:x.slice(0,6).map(t=>e.jsxs(c,{direction:"row",spacing:1.5,alignItems:"center",sx:{py:1.25},children:[e.jsx(W,{name:t.name,size:36}),e.jsxs(d,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(i,{variant:"subtitle2",sx:{fontWeight:600},children:t.name}),e.jsx(i,{variant:"caption",color:"text.secondary",noWrap:!0,sx:{display:"block"},children:t.email})]}),e.jsx(P,{status:t.role})]},t.id))})})})]})]})}export{Ie as default}; +import{r as R,j as e,i as T,S as c,B as d,T as i,a as u,t as D,C as U,d as V,U as W,b as q,D as G,f as z,c as J,e as K,g as Q}from"./index-DdJWTZFy.js";import{d as X}from"./Refresh-DEoCZISD.js";import{S as C,d as Y,a as Z,b as ee,c as P}from"./StatusChip-VSepiSqW.js";import{P as k,G as h}from"./PageHeader-CdP5B6Qy.js";import{E as S}from"./EmptyState-CQsHTCg9.js";import{B as E}from"./Button-Bcwcjqrt.js";import{A as te}from"./Alert-CzmzDPlp.js";import{T as re,a as se,b as ae,c as F,d as o,e as ne}from"./TableRow-CEoQ4SIZ.js";import{L as ie}from"./LinearProgress-C8QvFQwb.js";import{C as le}from"./Link-Dp34e72e.js";var I={},oe=T;Object.defineProperty(I,"__esModule",{value:!0});var B=I.default=void 0,ce=oe(R()),de=e;B=I.default=(0,ce.default)((0,de.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined");var L={},xe=T;Object.defineProperty(L,"__esModule",{value:!0});var N=L.default=void 0,ue=xe(R()),he=e;N=L.default=(0,ue.default)((0,he.jsx)("path",{d:"M13 5.08c3.06.44 5.48 2.86 5.92 5.92h3.03c-.47-4.72-4.23-8.48-8.95-8.95zM18.92 13c-.44 3.06-2.86 5.48-5.92 5.92v3.03c4.72-.47 8.48-4.23 8.95-8.95zM11 18.92c-3.39-.49-6-3.4-6-6.92s2.61-6.43 6-6.92V2.05c-5.05.5-9 4.76-9 9.95 0 5.19 3.95 9.45 9 9.95z"}),"DonutLargeOutlined");var A={},me=T;Object.defineProperty(A,"__esModule",{value:!0});var H=A.default=void 0,ge=me(R()),je=e;H=A.default=(0,ge.default)((0,je.jsx)("path",{d:"m12 2-5.5 9h11zm0 3.84L13.93 9h-3.87zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5m0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5M3 21.5h8v-8H3zm2-6h4v4H5z"}),"CategoryOutlined");function pe({data:s=[],size:n=180,thickness:x=26,centerLabel:g,centerValue:y}){const j=s.reduce((a,b)=>a+b.value,0)||1,m=(n-x)/2,v=2*Math.PI*m;let f=0;return e.jsxs(c,{direction:{xs:"column",sm:"row"},spacing:3,alignItems:"center",justifyContent:"center",sx:{flexWrap:"wrap"},children:[e.jsxs(d,{sx:{position:"relative",width:n,maxWidth:"100%",aspectRatio:"1 / 1"},children:[e.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${n} ${n}`,children:e.jsxs("g",{transform:`rotate(-90 ${n/2} ${n/2})`,children:[e.jsx("circle",{cx:n/2,cy:n/2,r:m,fill:"none",stroke:"#F0F0F0",strokeWidth:x}),s.map((a,b)=>{const p=a.value/j*v,$=e.jsx("circle",{cx:n/2,cy:n/2,r:m,fill:"none",stroke:a.color,strokeWidth:x,strokeDasharray:`${p} ${v-p}`,strokeDashoffset:-f,strokeLinecap:"butt"},b);return f+=p,$})]})}),e.jsxs(d,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx(i,{variant:"h3",sx:{fontWeight:700},children:y??j}),e.jsx(i,{variant:"caption",color:"text.secondary",children:g??"Total"})]})]}),e.jsx(c,{spacing:1.25,children:s.map(a=>e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(d,{sx:{width:10,height:10,borderRadius:"3px",bgcolor:a.color}}),e.jsx(i,{variant:"body2",color:"text.secondary",sx:{minWidth:80},children:a.label}),e.jsx(i,{variant:"subtitle2",children:a.value.toLocaleString("en-IN")})]},a.label))})]})}const fe={newclient:"#00A2AE",contacted:"#FFBF00",onboarded:"#00A854",lost:"#F04134"},be=s=>fe[String(s||"").toLowerCase()]||"#8C8C8C",w=["#C01227","#00A2AE","#00A854","#FFBF00","#9E0E20","#8C8C8C","#D6515C"];function _({icon:s,title:n,action:x,color:g="primary",noPadding:y=!1,children:j}){return e.jsxs(le,{sx:{height:"100%",display:"flex",flexDirection:"column",borderRadius:4,boxShadow:"0 10px 30px rgba(0,0,0,0.03)",border:"1px solid rgba(0,0,0,0.04)"},children:[e.jsxs(c,{direction:"row",spacing:1.5,alignItems:"center",sx:{px:3,py:2,borderBottom:1,borderColor:"divider",background:m=>`linear-gradient(90deg, ${m.palette[g].lighter}66 0%, transparent 100%)`},children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${g}.lighter`,color:`${g}.main`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)"},children:e.jsx(s,{fontSize:"small"})}),e.jsx(i,{variant:"h6",sx:{fontWeight:700,color:"grey.800",flexGrow:1,letterSpacing:"-0.3px"},children:n}),x]}),e.jsx(d,{sx:{p:y?0:3,flexGrow:1},children:j})]})}function Ie(){var O;const[s,n]=u.useState([]),[x,g]=u.useState([]),[y,j]=u.useState(!0),[m,v]=u.useState(null),f=()=>{j(!0),v(null),Promise.all([z(),J()]).then(([t,r])=>{n((t||[]).map(K)),g((r||[]).map(Q))}).catch(t=>v(t.message||"Failed to load dashboard data")).finally(()=>j(!1))};u.useEffect(()=>{f()},[]);const a=u.useMemo(()=>({total:s.length,newCount:s.filter(t=>t.status==="newClient").length,parcels:s.reduce((t,r)=>t+r.parcelVolume,0),contracts:s.reduce((t,r)=>t+r.activeContracts,0)}),[s]),b=u.useMemo(()=>{const t={};return s.forEach(r=>{t[r.status]=(t[r.status]||0)+1}),Object.entries(t).sort((r,l)=>l[1]-r[1]).map(([r,l])=>({label:D(r),value:l,color:be(r)}))},[s]),p=u.useMemo(()=>{const t={};return s.forEach(r=>{const l=r.businessType||"other";t[l]=(t[l]||0)+1}),Object.entries(t).sort((r,l)=>l[1]-r[1])},[s]),$=((O=p[0])==null?void 0:O[1])||1,M=u.useMemo(()=>[...s].sort((t,r)=>String(r.lastUpdated).localeCompare(String(t.lastUpdated))).slice(0,6),[s]);return new Date().toLocaleDateString("en-IN",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),y?e.jsxs(e.Fragment,{children:[e.jsx(k,{title:"Dashboard",breadcrumbs:[{label:"Dashboard"}]}),e.jsx(d,{sx:{display:"flex",justifyContent:"center",py:12},children:e.jsx(U,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(k,{title:"Dashboard",breadcrumbs:[{label:"Dashboard"}],action:e.jsx(E,{variant:"outlined",startIcon:e.jsx(X,{}),onClick:f,children:"Refresh"})}),m&&e.jsx(te,{severity:"error",sx:{mb:2.5},action:e.jsx(E,{color:"inherit",size:"small",onClick:f,children:"Retry"}),children:m}),e.jsxs(h,{container:!0,spacing:3,children:[e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Total Clients",value:a.total,icon:V,color:"primary",caption:"All registered"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"New Clients",value:a.newCount,icon:Y,color:"primary",caption:"Awaiting onboarding"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Total Parcel Volume",value:a.parcels.toLocaleString("en-IN"),icon:Z,color:"primary",caption:"Across all clients"})}),e.jsx(h,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(C,{accent:!0,title:"Active Contracts",value:a.contracts,icon:ee,color:"primary",caption:"Currently running"})}),e.jsx(h,{item:!0,xs:12,lg:8,children:e.jsx(_,{icon:B,title:"Recent Clients",color:"primary",noPadding:!0,children:M.length===0?e.jsx(S,{title:"No clients yet",caption:"Add a client to see it here."}):e.jsx(re,{children:e.jsxs(se,{sx:{minWidth:600},children:[e.jsx(ae,{children:e.jsxs(F,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(o,{children:"Client"}),e.jsx(o,{children:"Type"}),e.jsx(o,{children:"Location"}),e.jsx(o,{align:"right",children:"Parcels"}),e.jsx(o,{children:"Status"})]})}),e.jsx(ne,{children:M.map(t=>e.jsxs(F,{hover:!0,children:[e.jsx(o,{children:e.jsxs(c,{direction:"row",spacing:1.25,alignItems:"center",children:[e.jsx(W,{name:t.name,size:32}),e.jsx(i,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:t.name})]})}),e.jsx(o,{children:e.jsx(i,{variant:"body2",children:D(t.businessType)||"—"})}),e.jsx(o,{children:e.jsxs(i,{variant:"body2",children:[t.city||"—",t.businessState?`, ${t.businessState}`:""]})}),e.jsx(o,{align:"right",sx:{fontWeight:600},children:t.parcelVolume.toLocaleString("en-IN")}),e.jsx(o,{children:e.jsx(P,{status:t.status})})]},t.id))})]})})})}),e.jsx(h,{item:!0,xs:12,lg:4,children:e.jsx(_,{icon:N,title:"Clients by Status",color:"primary",children:e.jsx(d,{sx:{py:1.5},children:b.length===0?e.jsx(S,{title:"No data"}):e.jsx(pe,{data:b,centerValue:a.total,centerLabel:"Clients"})})})}),e.jsx(h,{item:!0,xs:12,lg:8,children:e.jsx(_,{icon:H,title:"Clients by Business Type",color:"primary",children:p.length===0?e.jsx(S,{title:"No data"}):e.jsx(c,{spacing:2.25,children:p.map(([t,r],l)=>e.jsxs(d,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:.75},children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(d,{sx:{width:10,height:10,borderRadius:"3px",bgcolor:w[l%w.length]}}),e.jsx(i,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:D(t)})]}),e.jsxs(i,{variant:"body2",color:"text.secondary",children:[r," · ",Math.round(r/s.length*100),"%"]})]}),e.jsx(ie,{variant:"determinate",value:r/$*100,sx:{height:8,borderRadius:4,bgcolor:"grey.100","& .MuiLinearProgress-bar":{borderRadius:4,backgroundColor:w[l%w.length]}}})]},t))})})}),e.jsx(h,{item:!0,xs:12,lg:4,children:e.jsx(_,{icon:q,title:`App Users · ${x.length}`,color:"primary",children:x.length===0?e.jsx(S,{title:"No team users"}):e.jsx(c,{divider:e.jsx(G,{}),spacing:0,children:x.slice(0,6).map(t=>e.jsxs(c,{direction:"row",spacing:1.5,alignItems:"center",sx:{py:1.25},children:[e.jsx(W,{name:t.name,size:36}),e.jsxs(d,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(i,{variant:"subtitle2",sx:{fontWeight:600},children:t.name}),e.jsx(i,{variant:"caption",color:"text.secondary",noWrap:!0,sx:{display:"block"},children:t.email})]}),e.jsx(P,{status:t.role})]},t.id))})})})]})]})}export{Ie as default}; diff --git a/dist/assets/DeleteOutline-DHEVbt_6.js b/dist/assets/DeleteOutline-DetaO5yn.js similarity index 99% rename from dist/assets/DeleteOutline-DHEVbt_6.js rename to dist/assets/DeleteOutline-DetaO5yn.js index f9c56b1..38e9609 100644 --- a/dist/assets/DeleteOutline-DHEVbt_6.js +++ b/dist/assets/DeleteOutline-DetaO5yn.js @@ -1 +1 @@ -import{l as m,m as h,a as d,n as D,a1 as ee,P as z,a7 as oe,o as b,_ as i,u as ae,j as r,p as x,q as f,v as C,w as u,a8 as te,a9 as ie,T as se,r as S,i as P}from"./index-CkS0O37G.js";function re(e){return m("MuiDialog",e)}const R=h("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),F=d.createContext({}),le=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ne=u(ie,{name:"MuiDialog",slot:"Backdrop",overrides:(e,o)=>o.backdrop})({zIndex:-1}),ce=e=>{const{classes:o,scroll:a,maxWidth:t,fullWidth:l,fullScreen:s}=e,c={root:["root"],container:["container",`scroll${f(a)}`],paper:["paper",`paperScroll${f(a)}`,`paperWidth${f(String(t))}`,l&&"paperFullWidth",s&&"paperFullScreen"]};return C(c,re,o)},de=u(te,{name:"MuiDialog",slot:"Root",overridesResolver:(e,o)=>o.root})({"@media print":{position:"absolute !important"}}),pe=u("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.container,o[`scroll${f(a.scroll)}`]]}})(({ownerState:e})=>i({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),ue=u(z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.paper,o[`scrollPaper${f(a.scroll)}`],o[`paperWidth${f(String(a.maxWidth))}`],a.fullWidth&&o.paperFullWidth,a.fullScreen&&o.paperFullScreen]}})(({theme:e,ownerState:o})=>i({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},o.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},o.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!o.maxWidth&&{maxWidth:"calc(100% - 64px)"},o.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${R.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.maxWidth&&o.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[o.maxWidth]}${e.breakpoints.unit}`,[`&.${R.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[o.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.fullWidth&&{width:"calc(100% - 64px)"},o.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${R.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),ze=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialog"}),l=ee(),s={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":c,"aria-labelledby":n,BackdropComponent:p,BackdropProps:k,children:L,className:O,disableEscapeKeyDown:w=!1,fullScreen:E=!1,fullWidth:H=!1,maxWidth:q="sm",onBackdropClick:B,onClick:A,onClose:y,open:N,PaperComponent:V=z,PaperProps:I={},scroll:Y="paper",TransitionComponent:X=oe,transitionDuration:U=s,TransitionProps:K}=t,G=b(t,le),v=i({},t,{disableEscapeKeyDown:w,fullScreen:E,fullWidth:H,maxWidth:q,scroll:Y}),W=ce(v),M=d.useRef(),J=g=>{M.current=g.target===g.currentTarget},Q=g=>{A&&A(g),M.current&&(M.current=null,B&&B(g),y&&y(g,"backdropClick"))},$=ae(n),Z=d.useMemo(()=>({titleId:$}),[$]);return r.jsx(de,i({className:x(W.root,O),closeAfterTransition:!0,components:{Backdrop:ne},componentsProps:{backdrop:i({transitionDuration:U,as:p},k)},disableEscapeKeyDown:w,onClose:y,open:N,ref:a,onClick:Q,ownerState:v},G,{children:r.jsx(X,i({appear:!0,in:N,timeout:U,role:"presentation"},K,{children:r.jsx(pe,{className:x(W.container),onMouseDown:J,ownerState:v,children:r.jsx(ue,i({as:V,elevation:24,role:"dialog","aria-describedby":c,"aria-labelledby":$},I,{className:x(W.paper,I.className),ownerState:v,children:r.jsx(F.Provider,{value:Z,children:L})}))})}))}))});function ge(e){return m("MuiDialogActions",e)}h("MuiDialogActions",["root","spacing"]);const xe=["className","disableSpacing"],fe=e=>{const{classes:o,disableSpacing:a}=e;return C({root:["root",!a&&"spacing"]},ge,o)},ve=u("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,!a.disableSpacing&&o.spacing]}})(({ownerState:e})=>i({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Fe=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogActions"}),{className:l,disableSpacing:s=!1}=t,c=b(t,xe),n=i({},t,{disableSpacing:s}),p=fe(n);return r.jsx(ve,i({className:x(p.root,l),ownerState:n,ref:a},c))});function me(e){return m("MuiDialogContent",e)}h("MuiDialogContent",["root","dividers"]);function he(e){return m("MuiDialogTitle",e)}const De=h("MuiDialogTitle",["root"]),be=["className","dividers"],Ce=e=>{const{classes:o,dividers:a}=e;return C({root:["root",a&&"dividers"]},me,o)},ke=u("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,a.dividers&&o.dividers]}})(({theme:e,ownerState:o})=>i({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},o.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${De.root} + &`]:{paddingTop:0}})),Le=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogContent"}),{className:l,dividers:s=!1}=t,c=b(t,be),n=i({},t,{dividers:s}),p=Ce(n);return r.jsx(ke,i({className:x(p.root,l),ownerState:n,ref:a},c))}),ye=["className","id"],We=e=>{const{classes:o}=e;return C({root:["root"]},he,o)},Me=u(se,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,o)=>o.root})({padding:"16px 24px",flex:"0 0 auto"}),Oe=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogTitle"}),{className:l,id:s}=t,c=b(t,ye),n=t,p=We(n),{titleId:k=s}=d.useContext(F);return r.jsx(Me,i({component:"h2",className:x(p.root,l),ownerState:n,ref:a,variant:"h6",id:s??k},c))});var _={},$e=P;Object.defineProperty(_,"__esModule",{value:!0});var Re=_.default=void 0,Se=$e(S()),Pe=r;Re=_.default=(0,Se.default)((0,Pe.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var j={},_e=P;Object.defineProperty(j,"__esModule",{value:!0});var je=j.default=void 0,Te=_e(S()),we=r;je=j.default=(0,Te.default)((0,we.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined");var T={},Be=P;Object.defineProperty(T,"__esModule",{value:!0});var Ae=T.default=void 0,Ne=Be(S()),Ie=r;Ae=T.default=(0,Ne.default)((0,Ie.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");export{ze as D,Oe as a,Le as b,Fe as c,Re as d,je as e,Ae as f}; +import{l as m,m as h,a as d,n as D,a1 as ee,P as z,a7 as oe,o as b,_ as i,u as ae,j as r,p as x,q as f,v as C,w as u,a8 as te,a9 as ie,T as se,r as S,i as P}from"./index-DdJWTZFy.js";function re(e){return m("MuiDialog",e)}const R=h("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),F=d.createContext({}),le=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ne=u(ie,{name:"MuiDialog",slot:"Backdrop",overrides:(e,o)=>o.backdrop})({zIndex:-1}),ce=e=>{const{classes:o,scroll:a,maxWidth:t,fullWidth:l,fullScreen:s}=e,c={root:["root"],container:["container",`scroll${f(a)}`],paper:["paper",`paperScroll${f(a)}`,`paperWidth${f(String(t))}`,l&&"paperFullWidth",s&&"paperFullScreen"]};return C(c,re,o)},de=u(te,{name:"MuiDialog",slot:"Root",overridesResolver:(e,o)=>o.root})({"@media print":{position:"absolute !important"}}),pe=u("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.container,o[`scroll${f(a.scroll)}`]]}})(({ownerState:e})=>i({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),ue=u(z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.paper,o[`scrollPaper${f(a.scroll)}`],o[`paperWidth${f(String(a.maxWidth))}`],a.fullWidth&&o.paperFullWidth,a.fullScreen&&o.paperFullScreen]}})(({theme:e,ownerState:o})=>i({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},o.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},o.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!o.maxWidth&&{maxWidth:"calc(100% - 64px)"},o.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${R.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.maxWidth&&o.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[o.maxWidth]}${e.breakpoints.unit}`,[`&.${R.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[o.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.fullWidth&&{width:"calc(100% - 64px)"},o.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${R.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),ze=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialog"}),l=ee(),s={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":c,"aria-labelledby":n,BackdropComponent:p,BackdropProps:k,children:L,className:O,disableEscapeKeyDown:w=!1,fullScreen:E=!1,fullWidth:H=!1,maxWidth:q="sm",onBackdropClick:B,onClick:A,onClose:y,open:N,PaperComponent:V=z,PaperProps:I={},scroll:Y="paper",TransitionComponent:X=oe,transitionDuration:U=s,TransitionProps:K}=t,G=b(t,le),v=i({},t,{disableEscapeKeyDown:w,fullScreen:E,fullWidth:H,maxWidth:q,scroll:Y}),W=ce(v),M=d.useRef(),J=g=>{M.current=g.target===g.currentTarget},Q=g=>{A&&A(g),M.current&&(M.current=null,B&&B(g),y&&y(g,"backdropClick"))},$=ae(n),Z=d.useMemo(()=>({titleId:$}),[$]);return r.jsx(de,i({className:x(W.root,O),closeAfterTransition:!0,components:{Backdrop:ne},componentsProps:{backdrop:i({transitionDuration:U,as:p},k)},disableEscapeKeyDown:w,onClose:y,open:N,ref:a,onClick:Q,ownerState:v},G,{children:r.jsx(X,i({appear:!0,in:N,timeout:U,role:"presentation"},K,{children:r.jsx(pe,{className:x(W.container),onMouseDown:J,ownerState:v,children:r.jsx(ue,i({as:V,elevation:24,role:"dialog","aria-describedby":c,"aria-labelledby":$},I,{className:x(W.paper,I.className),ownerState:v,children:r.jsx(F.Provider,{value:Z,children:L})}))})}))}))});function ge(e){return m("MuiDialogActions",e)}h("MuiDialogActions",["root","spacing"]);const xe=["className","disableSpacing"],fe=e=>{const{classes:o,disableSpacing:a}=e;return C({root:["root",!a&&"spacing"]},ge,o)},ve=u("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,!a.disableSpacing&&o.spacing]}})(({ownerState:e})=>i({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Fe=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogActions"}),{className:l,disableSpacing:s=!1}=t,c=b(t,xe),n=i({},t,{disableSpacing:s}),p=fe(n);return r.jsx(ve,i({className:x(p.root,l),ownerState:n,ref:a},c))});function me(e){return m("MuiDialogContent",e)}h("MuiDialogContent",["root","dividers"]);function he(e){return m("MuiDialogTitle",e)}const De=h("MuiDialogTitle",["root"]),be=["className","dividers"],Ce=e=>{const{classes:o,dividers:a}=e;return C({root:["root",a&&"dividers"]},me,o)},ke=u("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,a.dividers&&o.dividers]}})(({theme:e,ownerState:o})=>i({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},o.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${De.root} + &`]:{paddingTop:0}})),Le=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogContent"}),{className:l,dividers:s=!1}=t,c=b(t,be),n=i({},t,{dividers:s}),p=Ce(n);return r.jsx(ke,i({className:x(p.root,l),ownerState:n,ref:a},c))}),ye=["className","id"],We=e=>{const{classes:o}=e;return C({root:["root"]},he,o)},Me=u(se,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,o)=>o.root})({padding:"16px 24px",flex:"0 0 auto"}),Oe=d.forwardRef(function(o,a){const t=D({props:o,name:"MuiDialogTitle"}),{className:l,id:s}=t,c=b(t,ye),n=t,p=We(n),{titleId:k=s}=d.useContext(F);return r.jsx(Me,i({component:"h2",className:x(p.root,l),ownerState:n,ref:a,variant:"h6",id:s??k},c))});var _={},$e=P;Object.defineProperty(_,"__esModule",{value:!0});var Re=_.default=void 0,Se=$e(S()),Pe=r;Re=_.default=(0,Se.default)((0,Pe.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var j={},_e=P;Object.defineProperty(j,"__esModule",{value:!0});var je=j.default=void 0,Te=_e(S()),we=r;je=j.default=(0,Te.default)((0,we.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined");var T={},Be=P;Object.defineProperty(T,"__esModule",{value:!0});var Ae=T.default=void 0,Ne=Be(S()),Ie=r;Ae=T.default=(0,Ne.default)((0,Ie.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");export{ze as D,Oe as a,Le as b,Fe as c,Re as d,je as e,Ae as f}; diff --git a/dist/assets/EmptyState-B_LUop-_.js b/dist/assets/EmptyState-CQsHTCg9.js similarity index 92% rename from dist/assets/EmptyState-B_LUop-_.js rename to dist/assets/EmptyState-CQsHTCg9.js index 2350e64..05f5113 100644 --- a/dist/assets/EmptyState-B_LUop-_.js +++ b/dist/assets/EmptyState-CQsHTCg9.js @@ -1 +1 @@ -import{r as d,j as e,i as l,B as o,T as n}from"./index-CkS0O37G.js";var r={},x=l;Object.defineProperty(r,"__esModule",{value:!0});var a=r.default=void 0,u=x(d()),h=e;a=r.default=(0,u.default)((0,h.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5v-3h3.56c.69 1.19 1.97 2 3.45 2s2.75-.81 3.45-2H19zm0-5h-4.99c0 1.1-.9 2-2 2s-2-.9-2-2H5V5h14z"}),"InboxOutlined");function p({icon:s=a,title:i="No records found",caption:t,sx:c}){return e.jsxs(o,{sx:{textAlign:"center",py:6,px:2,...c},children:[e.jsx(o,{sx:{width:72,height:72,borderRadius:"50%",bgcolor:"grey.100",display:"inline-flex",alignItems:"center",justifyContent:"center",mb:2},children:e.jsx(s,{sx:{fontSize:34,color:"grey.400"}})}),e.jsx(n,{variant:"h5",color:"text.secondary",children:i}),t&&e.jsx(n,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:t})]})}export{p as E}; +import{r as d,j as e,i as l,B as o,T as n}from"./index-DdJWTZFy.js";var r={},x=l;Object.defineProperty(r,"__esModule",{value:!0});var a=r.default=void 0,u=x(d()),h=e;a=r.default=(0,u.default)((0,h.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5v-3h3.56c.69 1.19 1.97 2 3.45 2s2.75-.81 3.45-2H19zm0-5h-4.99c0 1.1-.9 2-2 2s-2-.9-2-2H5V5h14z"}),"InboxOutlined");function p({icon:s=a,title:i="No records found",caption:t,sx:c}){return e.jsxs(o,{sx:{textAlign:"center",py:6,px:2,...c},children:[e.jsx(o,{sx:{width:72,height:72,borderRadius:"50%",bgcolor:"grey.100",display:"inline-flex",alignItems:"center",justifyContent:"center",mb:2},children:e.jsx(s,{sx:{fontSize:34,color:"grey.400"}})}),e.jsx(n,{variant:"h5",color:"text.secondary",children:i}),t&&e.jsx(n,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:t})]})}export{p as E}; diff --git a/dist/assets/Error404-Tw0V7paU.js b/dist/assets/Error404-BtmKoWcF.js similarity index 79% rename from dist/assets/Error404-Tw0V7paU.js rename to dist/assets/Error404-BtmKoWcF.js index adc2219..19c848a 100644 --- a/dist/assets/Error404-Tw0V7paU.js +++ b/dist/assets/Error404-BtmKoWcF.js @@ -1 +1 @@ -import{ar as o,j as e,B as t,S as i,T as r}from"./index-CkS0O37G.js";import{d as n}from"./HomeOutlined-uwpuCaL2.js";import{B as s}from"./Button-DK5g2WFv.js";function c(){const a=o();return e.jsx(t,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(i,{spacing:2,alignItems:"center",children:[e.jsx(r,{sx:{fontWeight:900,fontSize:{xs:"6rem",md:"9rem"},lineHeight:1,color:"primary.main"},children:"404"}),e.jsx(t,{sx:{width:64,height:4,borderRadius:2,bgcolor:"primary.main"}}),e.jsx(r,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Page Not Found"}),e.jsx(r,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"The page you are looking for was moved, removed, renamed, or might never exist!"}),e.jsx(s,{variant:"contained",size:"large",startIcon:e.jsx(n,{}),onClick:()=>a("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{c as default}; +import{ar as o,j as e,B as t,S as i,T as r}from"./index-DdJWTZFy.js";import{d as n}from"./HomeOutlined-DeKFCazV.js";import{B as s}from"./Button-Bcwcjqrt.js";function c(){const a=o();return e.jsx(t,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(i,{spacing:2,alignItems:"center",children:[e.jsx(r,{sx:{fontWeight:900,fontSize:{xs:"6rem",md:"9rem"},lineHeight:1,color:"primary.main"},children:"404"}),e.jsx(t,{sx:{width:64,height:4,borderRadius:2,bgcolor:"primary.main"}}),e.jsx(r,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Page Not Found"}),e.jsx(r,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"The page you are looking for was moved, removed, renamed, or might never exist!"}),e.jsx(s,{variant:"contained",size:"large",startIcon:e.jsx(n,{}),onClick:()=>a("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{c as default}; diff --git a/dist/assets/Error500-BhnsxntT.js b/dist/assets/Error500-DmuBsKdr.js similarity index 79% rename from dist/assets/Error500-BhnsxntT.js rename to dist/assets/Error500-DmuBsKdr.js index 141613e..fbb7f93 100644 --- a/dist/assets/Error500-BhnsxntT.js +++ b/dist/assets/Error500-DmuBsKdr.js @@ -1 +1 @@ -import{ar as i,j as r,B as t,S as n,T as e}from"./index-CkS0O37G.js";import{d as s}from"./HomeOutlined-uwpuCaL2.js";import{B as o}from"./Button-DK5g2WFv.js";function m(){const a=i();return r.jsx(t,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:r.jsxs(n,{spacing:2,alignItems:"center",children:[r.jsx(e,{sx:{fontWeight:900,fontSize:{xs:"6rem",md:"9rem"},lineHeight:1,color:"primary.main"},children:"500"}),r.jsx(t,{sx:{width:64,height:4,borderRadius:2,bgcolor:"primary.main"}}),r.jsx(e,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Internal Server Error"}),r.jsx(e,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"Server error 500. We are fixing the problem. Please try again at a later stage."}),r.jsx(o,{variant:"contained",size:"large",startIcon:r.jsx(s,{}),onClick:()=>a("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{m as default}; +import{ar as i,j as r,B as t,S as n,T as e}from"./index-DdJWTZFy.js";import{d as s}from"./HomeOutlined-DeKFCazV.js";import{B as o}from"./Button-Bcwcjqrt.js";function m(){const a=i();return r.jsx(t,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:r.jsxs(n,{spacing:2,alignItems:"center",children:[r.jsx(e,{sx:{fontWeight:900,fontSize:{xs:"6rem",md:"9rem"},lineHeight:1,color:"primary.main"},children:"500"}),r.jsx(t,{sx:{width:64,height:4,borderRadius:2,bgcolor:"primary.main"}}),r.jsx(e,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Internal Server Error"}),r.jsx(e,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"Server error 500. We are fixing the problem. Please try again at a later stage."}),r.jsx(o,{variant:"contained",size:"large",startIcon:r.jsx(s,{}),onClick:()=>a("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{m as default}; diff --git a/dist/assets/HomeOutlined-uwpuCaL2.js b/dist/assets/HomeOutlined-DeKFCazV.js similarity index 78% rename from dist/assets/HomeOutlined-uwpuCaL2.js rename to dist/assets/HomeOutlined-DeKFCazV.js index 3d00783..2f332ab 100644 --- a/dist/assets/HomeOutlined-uwpuCaL2.js +++ b/dist/assets/HomeOutlined-DeKFCazV.js @@ -1 +1 @@ -import{r,j as t,i as a}from"./index-CkS0O37G.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,o=u(r()),i=t;v=e.default=(0,o.default)((0,i.jsx)("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"}),"HomeOutlined");export{v as d}; +import{r,j as t,i as a}from"./index-DdJWTZFy.js";var e={},u=a;Object.defineProperty(e,"__esModule",{value:!0});var v=e.default=void 0,o=u(r()),i=t;v=e.default=(0,o.default)((0,i.jsx)("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"}),"HomeOutlined");export{v as d}; diff --git a/dist/assets/InputAdornment-Bwtqyiqg.js b/dist/assets/InputAdornment-Bnl7vvhj.js similarity index 96% rename from dist/assets/InputAdornment-Bwtqyiqg.js rename to dist/assets/InputAdornment-Bnl7vvhj.js index d0cc577..5596eb7 100644 --- a/dist/assets/InputAdornment-Bwtqyiqg.js +++ b/dist/assets/InputAdornment-Bnl7vvhj.js @@ -1 +1 @@ -import{l as y,m as C,a as b,n as I,o as A,ap as j,_ as c,j as a,at as L,p as z,T as R,q as m,v as T,w as _}from"./index-CkS0O37G.js";function $(n){return y("MuiInputAdornment",n)}const x=C("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var f;const F=["children","className","component","disablePointerEvents","disableTypography","position","variant"],M=(n,t)=>{const{ownerState:e}=n;return[t.root,t[`position${m(e.position)}`],e.disablePointerEvents===!0&&t.disablePointerEvents,t[e.variant]]},N=n=>{const{classes:t,disablePointerEvents:e,hiddenLabel:o,position:s,size:r,variant:l}=n,d={root:["root",e&&"disablePointerEvents",s&&`position${m(s)}`,l,o&&"hiddenLabel",r&&`size${m(r)}`]};return T(d,$,t)},U=_("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:M})(({theme:n,ownerState:t})=>c({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(n.vars||n).palette.action.active},t.variant==="filled"&&{[`&.${x.positionStart}&:not(.${x.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),S=b.forwardRef(function(t,e){const o=I({props:t,name:"MuiInputAdornment"}),{children:s,className:r,component:l="div",disablePointerEvents:d=!1,disableTypography:g=!1,position:u,variant:v}=o,E=A(o,F),i=j()||{};let p=v;v&&i.variant,i&&!p&&(p=i.variant);const h=c({},o,{hiddenLabel:i.hiddenLabel,size:i.size,disablePointerEvents:d,position:u,variant:p}),P=N(h);return a.jsx(L.Provider,{value:null,children:a.jsx(U,c({as:l,ownerState:h,className:z(P.root,r),ref:e},E,{children:typeof s=="string"&&!g?a.jsx(R,{color:"text.secondary",children:s}):a.jsxs(b.Fragment,{children:[u==="start"?f||(f=a.jsx("span",{className:"notranslate",children:"​"})):null,s]})}))})});export{S as I}; +import{l as y,m as C,a as b,n as I,o as A,ap as j,_ as c,j as a,at as L,p as z,T as R,q as m,v as T,w as _}from"./index-DdJWTZFy.js";function $(n){return y("MuiInputAdornment",n)}const x=C("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var f;const F=["children","className","component","disablePointerEvents","disableTypography","position","variant"],M=(n,t)=>{const{ownerState:e}=n;return[t.root,t[`position${m(e.position)}`],e.disablePointerEvents===!0&&t.disablePointerEvents,t[e.variant]]},N=n=>{const{classes:t,disablePointerEvents:e,hiddenLabel:o,position:s,size:r,variant:l}=n,d={root:["root",e&&"disablePointerEvents",s&&`position${m(s)}`,l,o&&"hiddenLabel",r&&`size${m(r)}`]};return T(d,$,t)},U=_("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:M})(({theme:n,ownerState:t})=>c({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(n.vars||n).palette.action.active},t.variant==="filled"&&{[`&.${x.positionStart}&:not(.${x.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),S=b.forwardRef(function(t,e){const o=I({props:t,name:"MuiInputAdornment"}),{children:s,className:r,component:l="div",disablePointerEvents:d=!1,disableTypography:g=!1,position:u,variant:v}=o,E=A(o,F),i=j()||{};let p=v;v&&i.variant,i&&!p&&(p=i.variant);const h=c({},o,{hiddenLabel:i.hiddenLabel,size:i.size,disablePointerEvents:d,position:u,variant:p}),P=N(h);return a.jsx(L.Provider,{value:null,children:a.jsx(U,c({as:l,ownerState:h,className:z(P.root,r),ref:e},E,{children:typeof s=="string"&&!g?a.jsx(R,{color:"text.secondary",children:s}):a.jsxs(b.Fragment,{children:[u==="start"?f||(f=a.jsx("span",{className:"notranslate",children:"​"})):null,s]})}))})});export{S as I}; diff --git a/dist/assets/LinearProgress-C7VdMGLk.js b/dist/assets/LinearProgress-C8QvFQwb.js similarity index 98% rename from dist/assets/LinearProgress-C7VdMGLk.js rename to dist/assets/LinearProgress-C8QvFQwb.js index bdc9b08..51a2596 100644 --- a/dist/assets/LinearProgress-C7VdMGLk.js +++ b/dist/assets/LinearProgress-C8QvFQwb.js @@ -1,4 +1,4 @@ -import{l as q,m as N,a as M,n as D,o as z,_ as s,$ as U,j as b,p as O,q as t,v as T,w as m,ai as h,aa as A,ab as K,aj as C}from"./index-CkS0O37G.js";function E(r){return q("MuiLinearProgress",r)}N("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const X=["className","color","value","valueBuffer","variant"];let l=r=>r,$,k,L,_,B,I;const v=4,W=C($||($=l` +import{l as q,m as N,a as M,n as D,o as z,_ as s,$ as U,j as b,p as O,q as t,v as T,w as m,ai as h,aa as A,ab as K,aj as C}from"./index-DdJWTZFy.js";function E(r){return q("MuiLinearProgress",r)}N("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const X=["className","color","value","valueBuffer","variant"];let l=r=>r,$,k,L,_,B,I;const v=4,W=C($||($=l` 0% { left: -35%; right: 100%; diff --git a/dist/assets/Link-DsI7GZfd.js b/dist/assets/Link-Dp34e72e.js similarity index 97% rename from dist/assets/Link-DsI7GZfd.js rename to dist/assets/Link-Dp34e72e.js index ae9711a..df32ce7 100644 --- a/dist/assets/Link-DsI7GZfd.js +++ b/dist/assets/Link-Dp34e72e.js @@ -1 +1 @@ -import{l as x,m as h,a as p,n as g,o as v,_ as a,j as k,p as R,v as V,w as F,P as z,au as b,A as W,av as E,y as H,q as L,T as q}from"./index-CkS0O37G.js";function I(e){return x("MuiCard",e)}h("MuiCard",["root"]);const O=["className","raised"],S=e=>{const{classes:o}=e;return V({root:["root"]},I,o)},G=F(z,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})(()=>({overflow:"hidden"})),so=p.forwardRef(function(o,s){const n=g({props:o,name:"MuiCard"}),{className:t,raised:r=!1}=n,c=v(n,O),i=a({},n,{raised:r}),u=S(i);return k.jsx(G,a({className:R(u.root,t),elevation:r?8:void 0,ref:s,ownerState:i},c))});function J(e){return x("MuiLink",e)}const K=h("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),D={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Q=e=>D[e]||e,X=({theme:e,ownerState:o})=>{const s=Q(o.color),n=b(e,`palette.${s}`,!1)||o.color,t=b(e,`palette.${s}Channel`);return"vars"in e&&t?`rgba(${t} / 0.4)`:W(n,.4)},Y=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Z=e=>{const{classes:o,component:s,focusVisible:n,underline:t}=e,r={root:["root",`underline${L(t)}`,s==="button"&&"button",n&&"focusVisible"]};return V(r,J,o)},oo=F(q,{name:"MuiLink",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:s}=e;return[o.root,o[`underline${L(s.underline)}`],s.component==="button"&&o.button]}})(({theme:e,ownerState:o})=>a({},o.underline==="none"&&{textDecoration:"none"},o.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},o.underline==="always"&&a({textDecoration:"underline"},o.color!=="inherit"&&{textDecorationColor:X({theme:e,ownerState:o})},{"&:hover":{textDecorationColor:"inherit"}}),o.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${K.focusVisible}`]:{outline:"auto"}})),no=p.forwardRef(function(o,s){const n=g({props:o,name:"MuiLink"}),{className:t,color:r="primary",component:c="a",onBlur:i,onFocus:u,TypographyClasses:M,underline:$="always",variant:f="inherit",sx:d}=n,A=v(n,Y),{isFocusVisibleRef:m,onBlur:N,onFocus:T,ref:j}=E(),[B,y]=p.useState(!1),P=H(s,j),U=l=>{N(l),m.current===!1&&y(!1),i&&i(l)},_=l=>{T(l),m.current===!0&&y(!0),u&&u(l)},C=a({},n,{color:r,component:c,focusVisible:B,underline:$,variant:f}),w=Z(C);return k.jsx(oo,a({color:r,className:R(w.root,t),classes:M,component:c,onBlur:U,onFocus:_,ref:P,ownerState:C,variant:f,sx:[...Object.keys(D).includes(r)?[]:[{color:r}],...Array.isArray(d)?d:[d]]},A))});export{so as C,no as L}; +import{l as x,m as h,a as p,n as g,o as v,_ as a,j as k,p as R,v as V,w as F,P as z,au as b,A as W,av as E,y as H,q as L,T as q}from"./index-DdJWTZFy.js";function I(e){return x("MuiCard",e)}h("MuiCard",["root"]);const O=["className","raised"],S=e=>{const{classes:o}=e;return V({root:["root"]},I,o)},G=F(z,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})(()=>({overflow:"hidden"})),so=p.forwardRef(function(o,s){const n=g({props:o,name:"MuiCard"}),{className:t,raised:r=!1}=n,c=v(n,O),i=a({},n,{raised:r}),u=S(i);return k.jsx(G,a({className:R(u.root,t),elevation:r?8:void 0,ref:s,ownerState:i},c))});function J(e){return x("MuiLink",e)}const K=h("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),D={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Q=e=>D[e]||e,X=({theme:e,ownerState:o})=>{const s=Q(o.color),n=b(e,`palette.${s}`,!1)||o.color,t=b(e,`palette.${s}Channel`);return"vars"in e&&t?`rgba(${t} / 0.4)`:W(n,.4)},Y=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Z=e=>{const{classes:o,component:s,focusVisible:n,underline:t}=e,r={root:["root",`underline${L(t)}`,s==="button"&&"button",n&&"focusVisible"]};return V(r,J,o)},oo=F(q,{name:"MuiLink",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:s}=e;return[o.root,o[`underline${L(s.underline)}`],s.component==="button"&&o.button]}})(({theme:e,ownerState:o})=>a({},o.underline==="none"&&{textDecoration:"none"},o.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},o.underline==="always"&&a({textDecoration:"underline"},o.color!=="inherit"&&{textDecorationColor:X({theme:e,ownerState:o})},{"&:hover":{textDecorationColor:"inherit"}}),o.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${K.focusVisible}`]:{outline:"auto"}})),no=p.forwardRef(function(o,s){const n=g({props:o,name:"MuiLink"}),{className:t,color:r="primary",component:c="a",onBlur:i,onFocus:u,TypographyClasses:M,underline:$="always",variant:f="inherit",sx:d}=n,A=v(n,Y),{isFocusVisibleRef:m,onBlur:N,onFocus:T,ref:j}=E(),[B,y]=p.useState(!1),P=H(s,j),U=l=>{N(l),m.current===!1&&y(!1),i&&i(l)},_=l=>{T(l),m.current===!0&&y(!0),u&&u(l)},C=a({},n,{color:r,component:c,focusVisible:B,underline:$,variant:f}),w=Z(C);return k.jsx(oo,a({color:r,className:R(w.root,t),classes:M,component:c,onBlur:U,onFocus:_,ref:P,ownerState:C,variant:f,sx:[...Object.keys(D).includes(r)?[]:[{color:r}],...Array.isArray(d)?d:[d]]},A))});export{so as C,no as L}; diff --git a/dist/assets/LocalShippingOutlined-KXKsS6Ie.js b/dist/assets/LocalShippingOutlined-DRozEKne.js similarity index 87% rename from dist/assets/LocalShippingOutlined-KXKsS6Ie.js rename to dist/assets/LocalShippingOutlined-DRozEKne.js index a0e0a8f..cbd6c5c 100644 --- a/dist/assets/LocalShippingOutlined-KXKsS6Ie.js +++ b/dist/assets/LocalShippingOutlined-DRozEKne.js @@ -1 +1 @@ -import{r,j as t,i as a}from"./index-CkS0O37G.js";var e={},i=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,s=i(r()),o=t;u=e.default=(0,s.default)((0,o.jsx)("path",{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5zm-.5 1.5 1.96 2.5H17V9.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"LocalShippingOutlined");export{u as d}; +import{r,j as t,i as a}from"./index-DdJWTZFy.js";var e={},i=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,s=i(r()),o=t;u=e.default=(0,s.default)((0,o.jsx)("path",{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5zm-.5 1.5 1.96 2.5H17V9.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"LocalShippingOutlined");export{u as d}; diff --git a/dist/assets/Login-HaAIClqZ.js b/dist/assets/Login-BohcWU3v.js similarity index 57% rename from dist/assets/Login-HaAIClqZ.js rename to dist/assets/Login-BohcWU3v.js index fd157e5..0a27ce5 100644 --- a/dist/assets/Login-HaAIClqZ.js +++ b/dist/assets/Login-BohcWU3v.js @@ -1 +1 @@ -import{a3 as B,j as o,l as q,m as E,a as p,n as N,o as T,_ as u,p as F,q as f,v as D,w as W,V as O,A as U,ap as V,aq as Y,T as d,S as M,ar as G,B as k,as as J,I as K}from"./index-CkS0O37G.js";import{S as Q,d as X,a as Z}from"./VisibilityOff-7YzRgPyD.js";import{C as ee,L as oe}from"./Link-DsI7GZfd.js";import{T as A}from"./TextField-CWImxk_G.js";import{I as re}from"./InputAdornment-Bwtqyiqg.js";import{B as te}from"./Button-DK5g2WFv.js";const ae=B(o.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),se=B(o.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),ne=B(o.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function le(e){return q("MuiCheckbox",e)}const R=E("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ie=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],ce=e=>{const{classes:r,indeterminate:t,color:s,size:n}=e,a={root:["root",t&&"indeterminate",`color${f(s)}`,`size${f(n)}`]},i=D(a,le,r);return u({},r,i)},de=W(Q,{shouldForwardProp:e=>O(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.indeterminate&&r.indeterminate,r[`size${f(t.size)}`],t.color!=="default"&&r[`color${f(t.color)}`]]}})(({theme:e,ownerState:r})=>u({color:(e.vars||e).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${r.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[r.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:U(r.color==="default"?e.palette.action.active:e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${R.checked}, &.${R.indeterminate}`]:{color:(e.vars||e).palette[r.color].main},[`&.${R.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),pe=o.jsx(se,{}),ue=o.jsx(ae,{}),me=o.jsx(ne,{}),be=p.forwardRef(function(r,t){var s,n;const a=N({props:r,name:"MuiCheckbox"}),{checkedIcon:i=pe,color:b="primary",icon:m=ue,indeterminate:c=!1,indeterminateIcon:l=me,inputProps:S,size:v="medium",className:y}=a,z=T(a,ie),P=c?l:m,x=c?l:i,C=u({},a,{color:b,indeterminate:c,size:v}),h=ce(C);return o.jsx(de,u({type:"checkbox",inputProps:u({"data-indeterminate":c},S),icon:p.cloneElement(P,{fontSize:(s=P.props.fontSize)!=null?s:v}),checkedIcon:p.cloneElement(x,{fontSize:(n=x.props.fontSize)!=null?n:v}),ownerState:C,ref:t,className:F(h.root,y)},z,{classes:h}))});function xe(e){return q("MuiFormControlLabel",e)}const j=E("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),he=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ge=e=>{const{classes:r,disabled:t,labelPlacement:s,error:n,required:a}=e,i={root:["root",t&&"disabled",`labelPlacement${f(s)}`,n&&"error",a&&"required"],label:["label",t&&"disabled"],asterisk:["asterisk",n&&"error"]};return D(i,xe,r)},fe=W("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[{[`& .${j.label}`]:r.label},r.root,r[`labelPlacement${f(t.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>u({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${j.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${j.label}`]:{[`&.${j.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),ve=W("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${j.error}`]:{color:(e.vars||e).palette.error.main}})),Ce=p.forwardRef(function(r,t){var s,n;const a=N({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:b={},control:m,disabled:c,disableTypography:l,label:S,labelPlacement:v="end",required:y,slotProps:z={}}=a,P=T(a,he),x=V(),C=(s=c??m.props.disabled)!=null?s:x==null?void 0:x.disabled,h=y??m.props.required,_={disabled:C,required:h};["checked","name","onChange","value","inputRef"].forEach(I=>{typeof m.props[I]>"u"&&typeof a[I]<"u"&&(_[I]=a[I])});const H=Y({props:a,muiFormControl:x,states:["error"]}),L=u({},a,{disabled:C,labelPlacement:v,required:h,error:H.error}),$=ge(L),w=(n=z.typography)!=null?n:b.typography;let g=S;return g!=null&&g.type!==d&&!l&&(g=o.jsx(d,u({component:"span"},w,{className:F($.label,w==null?void 0:w.className),children:g}))),o.jsxs(fe,u({className:F($.root,i),ownerState:L,ref:t},P,{children:[p.cloneElement(m,_),h?o.jsxs(M,{display:"block",children:[g,o.jsxs(ve,{ownerState:L,"aria-hidden":!0,className:$.asterisk,children:[" ","*"]})]}):g]}))}),ke="/assets/mid-mile-approach-Drwn-ig9.jpg";function Le(){const e=G(),[r,t]=p.useState(!1),[s,n]=p.useState(""),[a,i]=p.useState(""),[b,m]=p.useState(""),c=()=>{s==="admin@doormile.com"&&a==="admin"?(localStorage.setItem("logged_in","true"),e("/dashboard")):m("Invalid email or password")};return o.jsxs(k,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:`url(${ke})`,backgroundSize:"cover",backgroundPosition:"center",position:"relative","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(15,23,42,0.6) 0%, rgba(192, 18, 39, 0.8) 100%)",zIndex:1}},children:[o.jsxs(ee,{sx:{position:"relative",zIndex:2,width:"100%",maxWidth:440,p:{xs:4,sm:5},m:2,background:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",border:"1px solid rgba(255, 255, 255, 0.5)",boxShadow:"0 24px 48px rgba(0,0,0,0.2)",borderRadius:4},children:[o.jsx(k,{sx:{mb:4,display:"flex",justifyContent:"center"},children:o.jsx(J,{})}),o.jsx(d,{variant:"h3",sx:{fontWeight:800,textAlign:"center",letterSpacing:"-0.5px",color:"#1e293b"},children:"Welcome back"}),o.jsx(d,{variant:"body1",sx:{mt:1,mb:4,textAlign:"center",color:"#475569"},children:"Sign in to your Doormile operations account."}),o.jsxs(M,{spacing:2.5,children:[o.jsxs(k,{children:[o.jsx(d,{variant:"subtitle2",sx:{mb:.75,color:"#334155",fontWeight:600},children:"Email"}),o.jsx(A,{fullWidth:!0,placeholder:"Enter your email address",value:s,onChange:l=>n(l.target.value),sx:{"& .MuiOutlinedInput-root":{bgcolor:"rgba(255,255,255,0.6)",borderRadius:2,transition:"all 0.2s ease","&:hover":{bgcolor:"rgba(255,255,255,0.9)"},"&.Mui-focused":{bgcolor:"#fff",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}}}})]}),o.jsxs(k,{children:[o.jsx(d,{variant:"subtitle2",sx:{mb:.75,color:"#334155",fontWeight:600},children:"Password"}),o.jsx(A,{fullWidth:!0,type:r?"text":"password",placeholder:"Enter your password",value:a,onChange:l=>i(l.target.value),sx:{"& .MuiOutlinedInput-root":{bgcolor:"rgba(255,255,255,0.6)",borderRadius:2,transition:"all 0.2s ease","&:hover":{bgcolor:"rgba(255,255,255,0.9)"},"&.Mui-focused":{bgcolor:"#fff",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}}},InputProps:{endAdornment:o.jsx(re,{position:"end",children:o.jsx(K,{onClick:()=>t(l=>!l),edge:"end",size:"small",children:r?o.jsx(X,{fontSize:"small",sx:{color:"#94a3b8"}}):o.jsx(Z,{fontSize:"small",sx:{color:"#94a3b8"}})})})}})]}),o.jsxs(M,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[o.jsx(Ce,{control:o.jsx(be,{defaultChecked:!0,size:"small",sx:{color:"#cbd5e1","&.Mui-checked":{color:"primary.main"}}}),label:o.jsx(d,{variant:"body2",sx:{color:"#475569",fontWeight:500},children:"Remember me"})}),o.jsx(oe,{href:"#",underline:"hover",variant:"body2",color:"primary",sx:{fontWeight:600},children:"Forgot password?"})]}),b&&o.jsx(d,{variant:"body2",color:"error",textAlign:"center",sx:{fontWeight:600},children:b}),o.jsx(te,{fullWidth:!0,size:"large",variant:"contained",onClick:c,sx:{mt:2,py:1.5,borderRadius:2,fontSize:"1.05rem",fontWeight:700,textTransform:"none",boxShadow:"0 8px 16px rgba(192, 18, 39, 0.25)","&:hover":{boxShadow:"0 12px 20px rgba(192, 18, 39, 0.35)",transform:"translateY(-1px)"},transition:"all 0.2s ease"},children:"Sign In"})]})]}),o.jsx(k,{sx:{position:"absolute",bottom:20,zIndex:2},children:o.jsxs(d,{variant:"caption",sx:{color:"rgba(255,255,255,0.8)",fontSize:"0.8rem"},children:["© ",new Date().getFullYear()," Doormile Logistics Pvt. Ltd. All rights reserved."]})})]})}export{Le as default}; +import{a3 as B,j as o,l as q,m as E,a as p,n as N,o as T,_ as u,p as F,q as f,v as D,w as W,V as O,A as U,ap as V,aq as Y,T as d,S as M,ar as G,B as k,as as J,I as K}from"./index-DdJWTZFy.js";import{S as Q,d as X,a as Z}from"./VisibilityOff-D5-u3y0u.js";import{C as ee,L as oe}from"./Link-Dp34e72e.js";import{T as A}from"./TextField-Btd7UbKs.js";import{I as re}from"./InputAdornment-Bnl7vvhj.js";import{B as te}from"./Button-Bcwcjqrt.js";const ae=B(o.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),se=B(o.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),ne=B(o.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function le(e){return q("MuiCheckbox",e)}const R=E("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ie=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],ce=e=>{const{classes:r,indeterminate:t,color:s,size:n}=e,a={root:["root",t&&"indeterminate",`color${f(s)}`,`size${f(n)}`]},i=D(a,le,r);return u({},r,i)},de=W(Q,{shouldForwardProp:e=>O(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.indeterminate&&r.indeterminate,r[`size${f(t.size)}`],t.color!=="default"&&r[`color${f(t.color)}`]]}})(({theme:e,ownerState:r})=>u({color:(e.vars||e).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${r.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[r.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:U(r.color==="default"?e.palette.action.active:e.palette[r.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${R.checked}, &.${R.indeterminate}`]:{color:(e.vars||e).palette[r.color].main},[`&.${R.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),pe=o.jsx(se,{}),ue=o.jsx(ae,{}),me=o.jsx(ne,{}),be=p.forwardRef(function(r,t){var s,n;const a=N({props:r,name:"MuiCheckbox"}),{checkedIcon:i=pe,color:b="primary",icon:m=ue,indeterminate:c=!1,indeterminateIcon:l=me,inputProps:S,size:v="medium",className:y}=a,z=T(a,ie),P=c?l:m,x=c?l:i,C=u({},a,{color:b,indeterminate:c,size:v}),h=ce(C);return o.jsx(de,u({type:"checkbox",inputProps:u({"data-indeterminate":c},S),icon:p.cloneElement(P,{fontSize:(s=P.props.fontSize)!=null?s:v}),checkedIcon:p.cloneElement(x,{fontSize:(n=x.props.fontSize)!=null?n:v}),ownerState:C,ref:t,className:F(h.root,y)},z,{classes:h}))});function xe(e){return q("MuiFormControlLabel",e)}const j=E("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),he=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ge=e=>{const{classes:r,disabled:t,labelPlacement:s,error:n,required:a}=e,i={root:["root",t&&"disabled",`labelPlacement${f(s)}`,n&&"error",a&&"required"],label:["label",t&&"disabled"],asterisk:["asterisk",n&&"error"]};return D(i,xe,r)},fe=W("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[{[`& .${j.label}`]:r.label},r.root,r[`labelPlacement${f(t.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>u({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${j.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${j.label}`]:{[`&.${j.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),ve=W("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${j.error}`]:{color:(e.vars||e).palette.error.main}})),Ce=p.forwardRef(function(r,t){var s,n;const a=N({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:b={},control:m,disabled:c,disableTypography:l,label:S,labelPlacement:v="end",required:y,slotProps:z={}}=a,P=T(a,he),x=V(),C=(s=c??m.props.disabled)!=null?s:x==null?void 0:x.disabled,h=y??m.props.required,_={disabled:C,required:h};["checked","name","onChange","value","inputRef"].forEach(I=>{typeof m.props[I]>"u"&&typeof a[I]<"u"&&(_[I]=a[I])});const H=Y({props:a,muiFormControl:x,states:["error"]}),L=u({},a,{disabled:C,labelPlacement:v,required:h,error:H.error}),$=ge(L),w=(n=z.typography)!=null?n:b.typography;let g=S;return g!=null&&g.type!==d&&!l&&(g=o.jsx(d,u({component:"span"},w,{className:F($.label,w==null?void 0:w.className),children:g}))),o.jsxs(fe,u({className:F($.root,i),ownerState:L,ref:t},P,{children:[p.cloneElement(m,_),h?o.jsxs(M,{display:"block",children:[g,o.jsxs(ve,{ownerState:L,"aria-hidden":!0,className:$.asterisk,children:[" ","*"]})]}):g]}))}),ke="/assets/mid-mile-approach-Drwn-ig9.jpg";function Le(){const e=G(),[r,t]=p.useState(!1),[s,n]=p.useState(""),[a,i]=p.useState(""),[b,m]=p.useState(""),c=()=>{s==="admin@doormile.in"&&a==="admin"?(localStorage.setItem("logged_in","true"),e("/dashboard")):m("Invalid email or password")};return o.jsxs(k,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:`url(${ke})`,backgroundSize:"cover",backgroundPosition:"center",position:"relative","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(15,23,42,0.6) 0%, rgba(192, 18, 39, 0.8) 100%)",zIndex:1}},children:[o.jsxs(ee,{sx:{position:"relative",zIndex:2,width:"100%",maxWidth:440,p:{xs:4,sm:5},m:2,background:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",border:"1px solid rgba(255, 255, 255, 0.5)",boxShadow:"0 24px 48px rgba(0,0,0,0.2)",borderRadius:4},children:[o.jsx(k,{sx:{mb:4,display:"flex",justifyContent:"center"},children:o.jsx(J,{})}),o.jsx(d,{variant:"h3",sx:{fontWeight:800,textAlign:"center",letterSpacing:"-0.5px",color:"#1e293b"},children:"Welcome back"}),o.jsx(d,{variant:"body1",sx:{mt:1,mb:4,textAlign:"center",color:"#475569"},children:"Sign in to your Doormile operations account."}),o.jsxs(M,{spacing:2.5,children:[o.jsxs(k,{children:[o.jsx(d,{variant:"subtitle2",sx:{mb:.75,color:"#334155",fontWeight:600},children:"Email"}),o.jsx(A,{fullWidth:!0,placeholder:"Enter your email address",value:s,onChange:l=>n(l.target.value),sx:{"& .MuiOutlinedInput-root":{bgcolor:"rgba(255,255,255,0.6)",borderRadius:2,transition:"all 0.2s ease","&:hover":{bgcolor:"rgba(255,255,255,0.9)"},"&.Mui-focused":{bgcolor:"#fff",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}}}})]}),o.jsxs(k,{children:[o.jsx(d,{variant:"subtitle2",sx:{mb:.75,color:"#334155",fontWeight:600},children:"Password"}),o.jsx(A,{fullWidth:!0,type:r?"text":"password",placeholder:"Enter your password",value:a,onChange:l=>i(l.target.value),sx:{"& .MuiOutlinedInput-root":{bgcolor:"rgba(255,255,255,0.6)",borderRadius:2,transition:"all 0.2s ease","&:hover":{bgcolor:"rgba(255,255,255,0.9)"},"&.Mui-focused":{bgcolor:"#fff",boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}}},InputProps:{endAdornment:o.jsx(re,{position:"end",children:o.jsx(K,{onClick:()=>t(l=>!l),edge:"end",size:"small",children:r?o.jsx(X,{fontSize:"small",sx:{color:"#94a3b8"}}):o.jsx(Z,{fontSize:"small",sx:{color:"#94a3b8"}})})})}})]}),o.jsxs(M,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[o.jsx(Ce,{control:o.jsx(be,{defaultChecked:!0,size:"small",sx:{color:"#cbd5e1","&.Mui-checked":{color:"primary.main"}}}),label:o.jsx(d,{variant:"body2",sx:{color:"#475569",fontWeight:500},children:"Remember me"})}),o.jsx(oe,{href:"#",underline:"hover",variant:"body2",color:"primary",sx:{fontWeight:600},children:"Forgot password?"})]}),b&&o.jsx(d,{variant:"body2",color:"error",textAlign:"center",sx:{fontWeight:600},children:b}),o.jsx(te,{fullWidth:!0,size:"large",variant:"contained",onClick:c,sx:{mt:2,py:1.5,borderRadius:2,fontSize:"1.05rem",fontWeight:700,textTransform:"none",boxShadow:"0 8px 16px rgba(192, 18, 39, 0.25)","&:hover":{boxShadow:"0 12px 20px rgba(192, 18, 39, 0.35)",transform:"translateY(-1px)"},transition:"all 0.2s ease"},children:"Sign In"})]})]}),o.jsx(k,{sx:{position:"absolute",bottom:20,zIndex:2},children:o.jsxs(d,{variant:"caption",sx:{color:"rgba(255,255,255,0.8)",fontSize:"0.8rem"},children:["© ",new Date().getFullYear()," Doormile Logistics Pvt. Ltd. All rights reserved."]})})]})}export{Le as default}; diff --git a/dist/assets/PageHeader-1FV595Go.js b/dist/assets/PageHeader-CdP5B6Qy.js similarity index 99% rename from dist/assets/PageHeader-1FV595Go.js rename to dist/assets/PageHeader-CdP5B6Qy.js index 8c18ca5..7571683 100644 --- a/dist/assets/PageHeader-1FV595Go.js +++ b/dist/assets/PageHeader-CdP5B6Qy.js @@ -1 +1 @@ -import{a3 as so,j as f,l as H,m as q,a as b,n as Z,o as T,y as fo,_ as g,W as A,p as z,q as p,v as J,w as B,A as I,ae as ao,a0 as go,T as F,a1 as vo,al as bo,am as G,an as Q,r as xo,i as mo,S as Co,B as ro,ao as lo}from"./index-CkS0O37G.js";import{L as to}from"./Link-DsI7GZfd.js";const $o=so(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function yo(o){return H("MuiChip",o)}const n=q("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),ko=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],ho=o=>{const{classes:e,disabled:l,size:a,color:r,iconColor:t,onDelete:i,clickable:s,variant:d}=o,u={root:["root",d,l&&"disabled",`size${p(a)}`,`color${p(r)}`,s&&"clickable",s&&`clickableColor${p(r)}`,i&&"deletable",i&&`deletableColor${p(r)}`,`${d}${p(r)}`],label:["label",`label${p(a)}`],avatar:["avatar",`avatar${p(a)}`,`avatarColor${p(r)}`],icon:["icon",`icon${p(a)}`,`iconColor${p(t)}`],deleteIcon:["deleteIcon",`deleteIcon${p(a)}`,`deleteIconColor${p(r)}`,`deleteIcon${p(d)}Color${p(r)}`]};return J(u,yo,e)},Io=B("div",{name:"MuiChip",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:l}=o,{color:a,iconColor:r,clickable:t,onDelete:i,size:s,variant:d}=l;return[{[`& .${n.avatar}`]:e.avatar},{[`& .${n.avatar}`]:e[`avatar${p(s)}`]},{[`& .${n.avatar}`]:e[`avatarColor${p(a)}`]},{[`& .${n.icon}`]:e.icon},{[`& .${n.icon}`]:e[`icon${p(s)}`]},{[`& .${n.icon}`]:e[`iconColor${p(r)}`]},{[`& .${n.deleteIcon}`]:e.deleteIcon},{[`& .${n.deleteIcon}`]:e[`deleteIcon${p(s)}`]},{[`& .${n.deleteIcon}`]:e[`deleteIconColor${p(a)}`]},{[`& .${n.deleteIcon}`]:e[`deleteIcon${p(d)}Color${p(a)}`]},e.root,e[`size${p(s)}`],e[`color${p(a)}`],t&&e.clickable,t&&a!=="default"&&e[`clickableColor${p(a)})`],i&&e.deletable,i&&a!=="default"&&e[`deletableColor${p(a)}`],e[d],e[`${d}${p(a)}`]]}})(({theme:o,ownerState:e})=>{const l=o.palette.mode==="light"?o.palette.grey[700]:o.palette.grey[300];return g({maxWidth:"100%",fontFamily:o.typography.fontFamily,fontSize:o.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(o.vars||o).palette.text.primary,backgroundColor:(o.vars||o).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:o.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${n.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${n.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:o.vars?o.vars.palette.Chip.defaultAvatarColor:l,fontSize:o.typography.pxToRem(12)},[`& .${n.avatarColorPrimary}`]:{color:(o.vars||o).palette.primary.contrastText,backgroundColor:(o.vars||o).palette.primary.dark},[`& .${n.avatarColorSecondary}`]:{color:(o.vars||o).palette.secondary.contrastText,backgroundColor:(o.vars||o).palette.secondary.dark},[`& .${n.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:o.typography.pxToRem(10)},[`& .${n.icon}`]:g({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&g({color:o.vars?o.vars.palette.Chip.defaultIconColor:l},e.color!=="default"&&{color:"inherit"})),[`& .${n.deleteIcon}`]:g({WebkitTapHighlightColor:"transparent",color:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / 0.26)`:I(o.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / 0.4)`:I(o.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:o.vars?`rgba(${o.vars.palette[e.color].contrastTextChannel} / 0.7)`:I(o.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(o.vars||o).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(o.vars||o).palette[e.color].main,color:(o.vars||o).palette[e.color].contrastText},e.onDelete&&{[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette[e.color].dark}})},({theme:o,ownerState:e})=>g({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.hoverOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.hoverOpacity)},[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.focusOpacity)},"&:active":{boxShadow:(o.vars||o).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette[e.color].dark}}),({theme:o,ownerState:e})=>g({},e.variant==="outlined"&&{backgroundColor:"transparent",border:o.vars?`1px solid ${o.vars.palette.Chip.defaultBorder}`:`1px solid ${o.palette.mode==="light"?o.palette.grey[400]:o.palette.grey[700]}`,[`&.${n.clickable}:hover`]:{backgroundColor:(o.vars||o).palette.action.hover},[`&.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette.action.focus},[`& .${n.avatar}`]:{marginLeft:4},[`& .${n.avatarSmall}`]:{marginLeft:2},[`& .${n.icon}`]:{marginLeft:4},[`& .${n.iconSmall}`]:{marginLeft:2},[`& .${n.deleteIcon}`]:{marginRight:5},[`& .${n.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(o.vars||o).palette[e.color].main,border:`1px solid ${o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / 0.7)`:I(o.palette[e.color].main,.7)}`,[`&.${n.clickable}:hover`]:{backgroundColor:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:I(o.palette[e.color].main,o.palette.action.hoverOpacity)},[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / ${o.vars.palette.action.focusOpacity})`:I(o.palette[e.color].main,o.palette.action.focusOpacity)},[`& .${n.deleteIcon}`]:{color:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / 0.7)`:I(o.palette[e.color].main,.7),"&:hover, &:active":{color:(o.vars||o).palette[e.color].main}}})),So=B("span",{name:"MuiChip",slot:"Label",overridesResolver:(o,e)=>{const{ownerState:l}=o,{size:a}=l;return[e.label,e[`label${p(a)}`]]}})(({ownerState:o})=>g({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},o.variant==="outlined"&&{paddingLeft:11,paddingRight:11},o.size==="small"&&{paddingLeft:8,paddingRight:8},o.size==="small"&&o.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function no(o){return o.key==="Backspace"||o.key==="Delete"}const le=b.forwardRef(function(e,l){const a=Z({props:e,name:"MuiChip"}),{avatar:r,className:t,clickable:i,color:s="default",component:d,deleteIcon:u,disabled:c=!1,icon:v,label:$,onClick:y,onDelete:C,onKeyDown:P,onKeyUp:N,size:k="medium",variant:R="filled",tabIndex:w,skipFocusWhenDisabled:M=!1}=a,O=T(a,ko),h=b.useRef(null),x=fo(h,l),S=m=>{m.stopPropagation(),C&&C(m)},W=m=>{m.currentTarget===m.target&&no(m)&&m.preventDefault(),P&&P(m)},L=m=>{m.currentTarget===m.target&&(C&&no(m)?C(m):m.key==="Escape"&&h.current&&h.current.blur()),N&&N(m)},_=i!==!1&&y?!0:i,K=_||C?A:d||"div",U=g({},a,{component:K,disabled:c,size:k,color:s,iconColor:b.isValidElement(v)&&v.props.color||s,onDelete:!!C,clickable:_,variant:R}),j=ho(U),uo=K===A?g({component:d||"div",focusVisibleClassName:j.focusVisible},C&&{disableRipple:!0}):{};let Y=null;C&&(Y=u&&b.isValidElement(u)?b.cloneElement(u,{className:z(u.props.className,j.deleteIcon),onClick:S}):f.jsx($o,{className:z(j.deleteIcon),onClick:S}));let oo=null;r&&b.isValidElement(r)&&(oo=b.cloneElement(r,{className:z(j.avatar,r.props.className)}));let eo=null;return v&&b.isValidElement(v)&&(eo=b.cloneElement(v,{className:z(j.icon,v.props.className)})),f.jsxs(Io,g({as:K,className:z(j.root,t),disabled:_&&c?!0:void 0,onClick:y,onKeyDown:W,onKeyUp:L,ref:x,tabIndex:M&&c?-1:w,ownerState:U},uo,O,{children:[oo||eo,f.jsx(So,{className:z(j.label),ownerState:U,children:$}),Y]}))}),Ro=so(f.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),zo=["slots","slotProps"],Bo=B(A,{name:"MuiBreadcrumbCollapsed"})(({theme:o})=>g({display:"flex",marginLeft:`calc(${o.spacing(1)} * 0.5)`,marginRight:`calc(${o.spacing(1)} * 0.5)`},o.palette.mode==="light"?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":g({},o.palette.mode==="light"?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}),"&:active":g({boxShadow:o.shadows[0]},o.palette.mode==="light"?{backgroundColor:ao(o.palette.grey[200],.12)}:{backgroundColor:ao(o.palette.grey[600],.12)})})),Po=B(Ro)({width:24,height:16});function jo(o){const{slots:e={},slotProps:l={}}=o,a=T(o,zo),r=o;return f.jsx("li",{children:f.jsx(Bo,g({focusRipple:!0},a,{ownerState:r,children:f.jsx(Po,g({as:e.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function No(o){return H("MuiBreadcrumbs",o)}const Mo=q("MuiBreadcrumbs",["root","ol","li","separator"]),Oo=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Wo=o=>{const{classes:e}=o;return J({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},No,e)},Lo=B(F,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(o,e)=>[{[`& .${Mo.li}`]:e.li},e.root]})({}),Vo=B("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(o,e)=>e.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),wo=B("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(o,e)=>e.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Do(o,e,l,a){return o.reduce((r,t,i)=>(i{const S=()=>{N(!0);const W=M.current.querySelector("a[href],button,[tabindex]");W&&W.focus()};return v+c>=x.length?x:[...x.slice(0,v),f.jsx(jo,{"aria-label":u,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:S},"ellipsis"),...x.slice(x.length-c,x.length)]},h=b.Children.toArray(r).filter(x=>b.isValidElement(x)).map((x,S)=>f.jsx("li",{className:R.li,children:x},`child-${S}`));return f.jsx(Lo,g({ref:l,component:i,color:"text.secondary",className:z(R.root,t),ownerState:k},C,{children:f.jsx(Vo,{className:R.ol,ref:M,ownerState:k,children:Do(P||$&&h.length<=$?h:O(h),R.separator,y,k)})}))}),io=b.createContext();function To(o){return H("MuiGrid",o)}const Go=[0,1,2,3,4,5,6,7,8,9,10],_o=["column-reverse","column","row-reverse","row"],Ko=["nowrap","wrap-reverse","wrap"],D=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],E=q("MuiGrid",["root","container","item","zeroMinWidth",...Go.map(o=>`spacing-xs-${o}`),..._o.map(o=>`direction-xs-${o}`),...Ko.map(o=>`wrap-xs-${o}`),...D.map(o=>`grid-xs-${o}`),...D.map(o=>`grid-sm-${o}`),...D.map(o=>`grid-md-${o}`),...D.map(o=>`grid-lg-${o}`),...D.map(o=>`grid-xl-${o}`)]),Uo=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function V(o){const e=parseFloat(o);return`${e}${String(o).replace(String(e),"")||"px"}`}function Ao({theme:o,ownerState:e}){let l;return o.breakpoints.keys.reduce((a,r)=>{let t={};if(e[r]&&(l=e[r]),!l)return a;if(l===!0)t={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(l==="auto")t={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const i=G({values:e.columns,breakpoints:o.breakpoints.values}),s=typeof i=="object"?i[r]:i;if(s==null)return a;const d=`${Math.round(l/s*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const c=o.spacing(e.columnSpacing);if(c!=="0px"){const v=`calc(${d} + ${V(c)})`;u={flexBasis:v,maxWidth:v}}}t=g({flexBasis:d,flexGrow:0,maxWidth:d},u)}return o.breakpoints.values[r]===0?Object.assign(a,t):a[o.breakpoints.up(r)]=t,a},{})}function Fo({theme:o,ownerState:e}){const l=G({values:e.direction,breakpoints:o.breakpoints.values});return Q({theme:o},l,a=>{const r={flexDirection:a};return a.indexOf("column")===0&&(r[`& > .${E.item}`]={maxWidth:"none"}),r})}function co({breakpoints:o,values:e}){let l="";Object.keys(e).forEach(r=>{l===""&&e[r]!==0&&(l=r)});const a=Object.keys(o).sort((r,t)=>o[r]-o[t]);return a.slice(0,a.indexOf(l))}function Ho({theme:o,ownerState:e}){const{container:l,rowSpacing:a}=e;let r={};if(l&&a!==0){const t=G({values:a,breakpoints:o.breakpoints.values});let i;typeof t=="object"&&(i=co({breakpoints:o.breakpoints.values,values:t})),r=Q({theme:o},t,(s,d)=>{var u;const c=o.spacing(s);return c!=="0px"?{marginTop:`-${V(c)}`,[`& > .${E.item}`]:{paddingTop:V(c)}}:(u=i)!=null&&u.includes(d)?{}:{marginTop:0,[`& > .${E.item}`]:{paddingTop:0}}})}return r}function qo({theme:o,ownerState:e}){const{container:l,columnSpacing:a}=e;let r={};if(l&&a!==0){const t=G({values:a,breakpoints:o.breakpoints.values});let i;typeof t=="object"&&(i=co({breakpoints:o.breakpoints.values,values:t})),r=Q({theme:o},t,(s,d)=>{var u;const c=o.spacing(s);return c!=="0px"?{width:`calc(100% + ${V(c)})`,marginLeft:`-${V(c)}`,[`& > .${E.item}`]:{paddingLeft:V(c)}}:(u=i)!=null&&u.includes(d)?{}:{width:"100%",marginLeft:0,[`& > .${E.item}`]:{paddingLeft:0}}})}return r}function Zo(o,e,l={}){if(!o||o<=0)return[];if(typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number")return[l[`spacing-xs-${String(o)}`]];const a=[];return e.forEach(r=>{const t=o[r];Number(t)>0&&a.push(l[`spacing-${r}-${String(t)}`])}),a}const Jo=B("div",{name:"MuiGrid",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:l}=o,{container:a,direction:r,item:t,spacing:i,wrap:s,zeroMinWidth:d,breakpoints:u}=l;let c=[];a&&(c=Zo(i,u,e));const v=[];return u.forEach($=>{const y=l[$];y&&v.push(e[`grid-${$}-${String(y)}`])}),[e.root,a&&e.container,t&&e.item,d&&e.zeroMinWidth,...c,r!=="row"&&e[`direction-xs-${String(r)}`],s!=="wrap"&&e[`wrap-xs-${String(s)}`],...v]}})(({ownerState:o})=>g({boxSizing:"border-box"},o.container&&{display:"flex",flexWrap:"wrap",width:"100%"},o.item&&{margin:0},o.zeroMinWidth&&{minWidth:0},o.wrap!=="wrap"&&{flexWrap:o.wrap}),Fo,Ho,qo,Ao);function Qo(o,e){if(!o||o<=0)return[];if(typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number")return[`spacing-xs-${String(o)}`];const l=[];return e.forEach(a=>{const r=o[a];if(Number(r)>0){const t=`spacing-${a}-${String(r)}`;l.push(t)}}),l}const Xo=o=>{const{classes:e,container:l,direction:a,item:r,spacing:t,wrap:i,zeroMinWidth:s,breakpoints:d}=o;let u=[];l&&(u=Qo(t,d));const c=[];d.forEach($=>{const y=o[$];y&&c.push(`grid-${$}-${String(y)}`)});const v={root:["root",l&&"container",r&&"item",s&&"zeroMinWidth",...u,a!=="row"&&`direction-xs-${String(a)}`,i!=="wrap"&&`wrap-xs-${String(i)}`,...c]};return J(v,To,e)},te=b.forwardRef(function(e,l){const a=Z({props:e,name:"MuiGrid"}),{breakpoints:r}=vo(),t=bo(a),{className:i,columns:s,columnSpacing:d,component:u="div",container:c=!1,direction:v="row",item:$=!1,rowSpacing:y,spacing:C=0,wrap:P="wrap",zeroMinWidth:N=!1}=t,k=T(t,Uo),R=y||C,w=d||C,M=b.useContext(io),O=c?s||12:M,h={},x=g({},k);r.keys.forEach(L=>{k[L]!=null&&(h[L]=k[L],delete x[L])});const S=g({},t,{columns:O,container:c,direction:v,item:$,rowSpacing:R,columnSpacing:w,wrap:P,zeroMinWidth:N,spacing:C},h,{breakpoints:r.keys}),W=Xo(S);return f.jsx(io.Provider,{value:O,children:f.jsx(Jo,g({ownerState:S,className:z(W.root,i),as:u,ref:l},x))})});var X={},Yo=mo;Object.defineProperty(X,"__esModule",{value:!0});var po=X.default=void 0,oe=Yo(xo()),ee=f;po=X.default=(0,oe.default)((0,ee.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");function ne({title:o,breadcrumbs:e=[],action:l}){return f.jsxs(Co,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:3},children:[f.jsxs(ro,{children:[f.jsx(F,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:o}),e.length>0&&f.jsxs(Eo,{separator:f.jsx(po,{fontSize:"small"}),sx:{mt:.5},children:[f.jsx(to,{component:lo,to:"/dashboard",underline:"hover",color:"text.secondary",variant:"caption",children:"Home"}),e.map((a,r)=>a.to&&r{const{classes:e,disabled:l,size:a,color:r,iconColor:t,onDelete:i,clickable:s,variant:d}=o,u={root:["root",d,l&&"disabled",`size${p(a)}`,`color${p(r)}`,s&&"clickable",s&&`clickableColor${p(r)}`,i&&"deletable",i&&`deletableColor${p(r)}`,`${d}${p(r)}`],label:["label",`label${p(a)}`],avatar:["avatar",`avatar${p(a)}`,`avatarColor${p(r)}`],icon:["icon",`icon${p(a)}`,`iconColor${p(t)}`],deleteIcon:["deleteIcon",`deleteIcon${p(a)}`,`deleteIconColor${p(r)}`,`deleteIcon${p(d)}Color${p(r)}`]};return J(u,yo,e)},Io=B("div",{name:"MuiChip",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:l}=o,{color:a,iconColor:r,clickable:t,onDelete:i,size:s,variant:d}=l;return[{[`& .${n.avatar}`]:e.avatar},{[`& .${n.avatar}`]:e[`avatar${p(s)}`]},{[`& .${n.avatar}`]:e[`avatarColor${p(a)}`]},{[`& .${n.icon}`]:e.icon},{[`& .${n.icon}`]:e[`icon${p(s)}`]},{[`& .${n.icon}`]:e[`iconColor${p(r)}`]},{[`& .${n.deleteIcon}`]:e.deleteIcon},{[`& .${n.deleteIcon}`]:e[`deleteIcon${p(s)}`]},{[`& .${n.deleteIcon}`]:e[`deleteIconColor${p(a)}`]},{[`& .${n.deleteIcon}`]:e[`deleteIcon${p(d)}Color${p(a)}`]},e.root,e[`size${p(s)}`],e[`color${p(a)}`],t&&e.clickable,t&&a!=="default"&&e[`clickableColor${p(a)})`],i&&e.deletable,i&&a!=="default"&&e[`deletableColor${p(a)}`],e[d],e[`${d}${p(a)}`]]}})(({theme:o,ownerState:e})=>{const l=o.palette.mode==="light"?o.palette.grey[700]:o.palette.grey[300];return g({maxWidth:"100%",fontFamily:o.typography.fontFamily,fontSize:o.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(o.vars||o).palette.text.primary,backgroundColor:(o.vars||o).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:o.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${n.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${n.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:o.vars?o.vars.palette.Chip.defaultAvatarColor:l,fontSize:o.typography.pxToRem(12)},[`& .${n.avatarColorPrimary}`]:{color:(o.vars||o).palette.primary.contrastText,backgroundColor:(o.vars||o).palette.primary.dark},[`& .${n.avatarColorSecondary}`]:{color:(o.vars||o).palette.secondary.contrastText,backgroundColor:(o.vars||o).palette.secondary.dark},[`& .${n.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:o.typography.pxToRem(10)},[`& .${n.icon}`]:g({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&g({color:o.vars?o.vars.palette.Chip.defaultIconColor:l},e.color!=="default"&&{color:"inherit"})),[`& .${n.deleteIcon}`]:g({WebkitTapHighlightColor:"transparent",color:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / 0.26)`:I(o.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / 0.4)`:I(o.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:o.vars?`rgba(${o.vars.palette[e.color].contrastTextChannel} / 0.7)`:I(o.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(o.vars||o).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(o.vars||o).palette[e.color].main,color:(o.vars||o).palette[e.color].contrastText},e.onDelete&&{[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette[e.color].dark}})},({theme:o,ownerState:e})=>g({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.hoverOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.hoverOpacity)},[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette.action.selectedChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))`:I(o.palette.action.selected,o.palette.action.selectedOpacity+o.palette.action.focusOpacity)},"&:active":{boxShadow:(o.vars||o).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette[e.color].dark}}),({theme:o,ownerState:e})=>g({},e.variant==="outlined"&&{backgroundColor:"transparent",border:o.vars?`1px solid ${o.vars.palette.Chip.defaultBorder}`:`1px solid ${o.palette.mode==="light"?o.palette.grey[400]:o.palette.grey[700]}`,[`&.${n.clickable}:hover`]:{backgroundColor:(o.vars||o).palette.action.hover},[`&.${n.focusVisible}`]:{backgroundColor:(o.vars||o).palette.action.focus},[`& .${n.avatar}`]:{marginLeft:4},[`& .${n.avatarSmall}`]:{marginLeft:2},[`& .${n.icon}`]:{marginLeft:4},[`& .${n.iconSmall}`]:{marginLeft:2},[`& .${n.deleteIcon}`]:{marginRight:5},[`& .${n.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(o.vars||o).palette[e.color].main,border:`1px solid ${o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / 0.7)`:I(o.palette[e.color].main,.7)}`,[`&.${n.clickable}:hover`]:{backgroundColor:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:I(o.palette[e.color].main,o.palette.action.hoverOpacity)},[`&.${n.focusVisible}`]:{backgroundColor:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / ${o.vars.palette.action.focusOpacity})`:I(o.palette[e.color].main,o.palette.action.focusOpacity)},[`& .${n.deleteIcon}`]:{color:o.vars?`rgba(${o.vars.palette[e.color].mainChannel} / 0.7)`:I(o.palette[e.color].main,.7),"&:hover, &:active":{color:(o.vars||o).palette[e.color].main}}})),So=B("span",{name:"MuiChip",slot:"Label",overridesResolver:(o,e)=>{const{ownerState:l}=o,{size:a}=l;return[e.label,e[`label${p(a)}`]]}})(({ownerState:o})=>g({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},o.variant==="outlined"&&{paddingLeft:11,paddingRight:11},o.size==="small"&&{paddingLeft:8,paddingRight:8},o.size==="small"&&o.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function no(o){return o.key==="Backspace"||o.key==="Delete"}const le=b.forwardRef(function(e,l){const a=Z({props:e,name:"MuiChip"}),{avatar:r,className:t,clickable:i,color:s="default",component:d,deleteIcon:u,disabled:c=!1,icon:v,label:$,onClick:y,onDelete:C,onKeyDown:P,onKeyUp:N,size:k="medium",variant:R="filled",tabIndex:w,skipFocusWhenDisabled:M=!1}=a,O=T(a,ko),h=b.useRef(null),x=fo(h,l),S=m=>{m.stopPropagation(),C&&C(m)},W=m=>{m.currentTarget===m.target&&no(m)&&m.preventDefault(),P&&P(m)},L=m=>{m.currentTarget===m.target&&(C&&no(m)?C(m):m.key==="Escape"&&h.current&&h.current.blur()),N&&N(m)},_=i!==!1&&y?!0:i,K=_||C?A:d||"div",U=g({},a,{component:K,disabled:c,size:k,color:s,iconColor:b.isValidElement(v)&&v.props.color||s,onDelete:!!C,clickable:_,variant:R}),j=ho(U),uo=K===A?g({component:d||"div",focusVisibleClassName:j.focusVisible},C&&{disableRipple:!0}):{};let Y=null;C&&(Y=u&&b.isValidElement(u)?b.cloneElement(u,{className:z(u.props.className,j.deleteIcon),onClick:S}):f.jsx($o,{className:z(j.deleteIcon),onClick:S}));let oo=null;r&&b.isValidElement(r)&&(oo=b.cloneElement(r,{className:z(j.avatar,r.props.className)}));let eo=null;return v&&b.isValidElement(v)&&(eo=b.cloneElement(v,{className:z(j.icon,v.props.className)})),f.jsxs(Io,g({as:K,className:z(j.root,t),disabled:_&&c?!0:void 0,onClick:y,onKeyDown:W,onKeyUp:L,ref:x,tabIndex:M&&c?-1:w,ownerState:U},uo,O,{children:[oo||eo,f.jsx(So,{className:z(j.label),ownerState:U,children:$}),Y]}))}),Ro=so(f.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),zo=["slots","slotProps"],Bo=B(A,{name:"MuiBreadcrumbCollapsed"})(({theme:o})=>g({display:"flex",marginLeft:`calc(${o.spacing(1)} * 0.5)`,marginRight:`calc(${o.spacing(1)} * 0.5)`},o.palette.mode==="light"?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":g({},o.palette.mode==="light"?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}),"&:active":g({boxShadow:o.shadows[0]},o.palette.mode==="light"?{backgroundColor:ao(o.palette.grey[200],.12)}:{backgroundColor:ao(o.palette.grey[600],.12)})})),Po=B(Ro)({width:24,height:16});function jo(o){const{slots:e={},slotProps:l={}}=o,a=T(o,zo),r=o;return f.jsx("li",{children:f.jsx(Bo,g({focusRipple:!0},a,{ownerState:r,children:f.jsx(Po,g({as:e.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function No(o){return H("MuiBreadcrumbs",o)}const Mo=q("MuiBreadcrumbs",["root","ol","li","separator"]),Oo=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Wo=o=>{const{classes:e}=o;return J({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},No,e)},Lo=B(F,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(o,e)=>[{[`& .${Mo.li}`]:e.li},e.root]})({}),Vo=B("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(o,e)=>e.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),wo=B("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(o,e)=>e.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Do(o,e,l,a){return o.reduce((r,t,i)=>(i{const S=()=>{N(!0);const W=M.current.querySelector("a[href],button,[tabindex]");W&&W.focus()};return v+c>=x.length?x:[...x.slice(0,v),f.jsx(jo,{"aria-label":u,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:S},"ellipsis"),...x.slice(x.length-c,x.length)]},h=b.Children.toArray(r).filter(x=>b.isValidElement(x)).map((x,S)=>f.jsx("li",{className:R.li,children:x},`child-${S}`));return f.jsx(Lo,g({ref:l,component:i,color:"text.secondary",className:z(R.root,t),ownerState:k},C,{children:f.jsx(Vo,{className:R.ol,ref:M,ownerState:k,children:Do(P||$&&h.length<=$?h:O(h),R.separator,y,k)})}))}),io=b.createContext();function To(o){return H("MuiGrid",o)}const Go=[0,1,2,3,4,5,6,7,8,9,10],_o=["column-reverse","column","row-reverse","row"],Ko=["nowrap","wrap-reverse","wrap"],D=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],E=q("MuiGrid",["root","container","item","zeroMinWidth",...Go.map(o=>`spacing-xs-${o}`),..._o.map(o=>`direction-xs-${o}`),...Ko.map(o=>`wrap-xs-${o}`),...D.map(o=>`grid-xs-${o}`),...D.map(o=>`grid-sm-${o}`),...D.map(o=>`grid-md-${o}`),...D.map(o=>`grid-lg-${o}`),...D.map(o=>`grid-xl-${o}`)]),Uo=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function V(o){const e=parseFloat(o);return`${e}${String(o).replace(String(e),"")||"px"}`}function Ao({theme:o,ownerState:e}){let l;return o.breakpoints.keys.reduce((a,r)=>{let t={};if(e[r]&&(l=e[r]),!l)return a;if(l===!0)t={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(l==="auto")t={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const i=G({values:e.columns,breakpoints:o.breakpoints.values}),s=typeof i=="object"?i[r]:i;if(s==null)return a;const d=`${Math.round(l/s*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const c=o.spacing(e.columnSpacing);if(c!=="0px"){const v=`calc(${d} + ${V(c)})`;u={flexBasis:v,maxWidth:v}}}t=g({flexBasis:d,flexGrow:0,maxWidth:d},u)}return o.breakpoints.values[r]===0?Object.assign(a,t):a[o.breakpoints.up(r)]=t,a},{})}function Fo({theme:o,ownerState:e}){const l=G({values:e.direction,breakpoints:o.breakpoints.values});return Q({theme:o},l,a=>{const r={flexDirection:a};return a.indexOf("column")===0&&(r[`& > .${E.item}`]={maxWidth:"none"}),r})}function co({breakpoints:o,values:e}){let l="";Object.keys(e).forEach(r=>{l===""&&e[r]!==0&&(l=r)});const a=Object.keys(o).sort((r,t)=>o[r]-o[t]);return a.slice(0,a.indexOf(l))}function Ho({theme:o,ownerState:e}){const{container:l,rowSpacing:a}=e;let r={};if(l&&a!==0){const t=G({values:a,breakpoints:o.breakpoints.values});let i;typeof t=="object"&&(i=co({breakpoints:o.breakpoints.values,values:t})),r=Q({theme:o},t,(s,d)=>{var u;const c=o.spacing(s);return c!=="0px"?{marginTop:`-${V(c)}`,[`& > .${E.item}`]:{paddingTop:V(c)}}:(u=i)!=null&&u.includes(d)?{}:{marginTop:0,[`& > .${E.item}`]:{paddingTop:0}}})}return r}function qo({theme:o,ownerState:e}){const{container:l,columnSpacing:a}=e;let r={};if(l&&a!==0){const t=G({values:a,breakpoints:o.breakpoints.values});let i;typeof t=="object"&&(i=co({breakpoints:o.breakpoints.values,values:t})),r=Q({theme:o},t,(s,d)=>{var u;const c=o.spacing(s);return c!=="0px"?{width:`calc(100% + ${V(c)})`,marginLeft:`-${V(c)}`,[`& > .${E.item}`]:{paddingLeft:V(c)}}:(u=i)!=null&&u.includes(d)?{}:{width:"100%",marginLeft:0,[`& > .${E.item}`]:{paddingLeft:0}}})}return r}function Zo(o,e,l={}){if(!o||o<=0)return[];if(typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number")return[l[`spacing-xs-${String(o)}`]];const a=[];return e.forEach(r=>{const t=o[r];Number(t)>0&&a.push(l[`spacing-${r}-${String(t)}`])}),a}const Jo=B("div",{name:"MuiGrid",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:l}=o,{container:a,direction:r,item:t,spacing:i,wrap:s,zeroMinWidth:d,breakpoints:u}=l;let c=[];a&&(c=Zo(i,u,e));const v=[];return u.forEach($=>{const y=l[$];y&&v.push(e[`grid-${$}-${String(y)}`])}),[e.root,a&&e.container,t&&e.item,d&&e.zeroMinWidth,...c,r!=="row"&&e[`direction-xs-${String(r)}`],s!=="wrap"&&e[`wrap-xs-${String(s)}`],...v]}})(({ownerState:o})=>g({boxSizing:"border-box"},o.container&&{display:"flex",flexWrap:"wrap",width:"100%"},o.item&&{margin:0},o.zeroMinWidth&&{minWidth:0},o.wrap!=="wrap"&&{flexWrap:o.wrap}),Fo,Ho,qo,Ao);function Qo(o,e){if(!o||o<=0)return[];if(typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number")return[`spacing-xs-${String(o)}`];const l=[];return e.forEach(a=>{const r=o[a];if(Number(r)>0){const t=`spacing-${a}-${String(r)}`;l.push(t)}}),l}const Xo=o=>{const{classes:e,container:l,direction:a,item:r,spacing:t,wrap:i,zeroMinWidth:s,breakpoints:d}=o;let u=[];l&&(u=Qo(t,d));const c=[];d.forEach($=>{const y=o[$];y&&c.push(`grid-${$}-${String(y)}`)});const v={root:["root",l&&"container",r&&"item",s&&"zeroMinWidth",...u,a!=="row"&&`direction-xs-${String(a)}`,i!=="wrap"&&`wrap-xs-${String(i)}`,...c]};return J(v,To,e)},te=b.forwardRef(function(e,l){const a=Z({props:e,name:"MuiGrid"}),{breakpoints:r}=vo(),t=bo(a),{className:i,columns:s,columnSpacing:d,component:u="div",container:c=!1,direction:v="row",item:$=!1,rowSpacing:y,spacing:C=0,wrap:P="wrap",zeroMinWidth:N=!1}=t,k=T(t,Uo),R=y||C,w=d||C,M=b.useContext(io),O=c?s||12:M,h={},x=g({},k);r.keys.forEach(L=>{k[L]!=null&&(h[L]=k[L],delete x[L])});const S=g({},t,{columns:O,container:c,direction:v,item:$,rowSpacing:R,columnSpacing:w,wrap:P,zeroMinWidth:N,spacing:C},h,{breakpoints:r.keys}),W=Xo(S);return f.jsx(io.Provider,{value:O,children:f.jsx(Jo,g({ownerState:S,className:z(W.root,i),as:u,ref:l},x))})});var X={},Yo=mo;Object.defineProperty(X,"__esModule",{value:!0});var po=X.default=void 0,oe=Yo(xo()),ee=f;po=X.default=(0,oe.default)((0,ee.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");function ne({title:o,breadcrumbs:e=[],action:l}){return f.jsxs(Co,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{mb:3},children:[f.jsxs(ro,{children:[f.jsx(F,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:o}),e.length>0&&f.jsxs(Eo,{separator:f.jsx(po,{fontSize:"small"}),sx:{mt:.5},children:[f.jsx(to,{component:lo,to:"/dashboard",underline:"hover",color:"text.secondary",variant:"caption",children:"Home"}),e.map((a,r)=>a.to&&r{f(h,0)},U=h=>{f(h,a-1)},S=h=>{f(h,a+1)},i=h=>{f(h,Math.max(0,Math.ceil(I/g)-1))},r=(R=d.firstButton)!=null?R:D,j=(x=d.lastButton)!=null?x:D,w=(C=d.nextButton)!=null?C:D,A=(y=d.previousButton)!=null?y:D,M=($=d.firstButtonIcon)!=null?$:Pt,N=(_=d.lastButtonIcon)!=null?_:xt,c=(m=d.nextButtonIcon)!=null?m:It,J=(u=d.previousButtonIcon)!=null?u:mt,O=l?j:r,tt=l?w:A,ot=l?A:w,et=l?r:j,st=l?n.lastButton:n.firstButton,Q=l?n.nextButton:n.previousButton,V=l?n.previousButton:n.nextButton,nt=l?n.firstButton:n.lastButton;return e.jsxs("div",s({ref:B},K,{children:[b&&e.jsx(O,s({onClick:E,disabled:v||a===0,"aria-label":p("first",a),title:p("first",a)},st,{children:l?e.jsx(N,s({},n.lastButtonIcon)):e.jsx(M,s({},n.firstButtonIcon))})),e.jsx(tt,s({onClick:U,disabled:v||a===0,color:"inherit","aria-label":p("previous",a),title:p("previous",a)},Q??k,{children:l?e.jsx(c,s({},n.nextButtonIcon)):e.jsx(J,s({},n.previousButtonIcon))})),e.jsx(ot,s({onClick:S,disabled:v||(I!==-1?a>=Math.ceil(I/g)-1:!1),color:"inherit","aria-label":p("next",a),title:p("next",a)},V??H,{children:l?e.jsx(J,s({},n.previousButtonIcon)):e.jsx(c,s({},n.nextButtonIcon))})),L&&e.jsx(et,s({onClick:i,disabled:v||a>=Math.ceil(I/g)-1,"aria-label":p("last",a),title:p("last",a)},nt,{children:l?e.jsx(M,s({},n.firstButtonIcon)):e.jsx(N,s({},n.lastButtonIcon))}))]}))});function Rt(t){return lt("MuiTablePagination",t)}const T=it("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Y;const Lt=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],St=P(G,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,o)=>o.root})(({theme:t})=>({overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}})),jt=P(gt,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,o)=>s({[`& .${T.actions}`]:o.actions},o.toolbar)})(({theme:t})=>({minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${T.actions}`]:{flexShrink:0,marginLeft:20}})),wt=P("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,o)=>o.spacer})({flex:"1 1 100%"}),Mt=P("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,o)=>o.selectLabel})(({theme:t})=>s({},t.typography.body2,{flexShrink:0})),Tt=P(ht,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,o)=>s({[`& .${T.selectIcon}`]:o.selectIcon,[`& .${T.select}`]:o.select},o.input,o.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${T.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Ct=P(dt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,o)=>o.menuItem})({}),yt=P("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,o)=>o.displayedRows})(({theme:t})=>s({},t.typography.body2,{flexShrink:0}));function $t({from:t,to:o,count:B}){return`${t}–${o} of ${B!==-1?B:`more than ${o}`}`}function _t(t){return`Go to ${t} page`}const kt=t=>{const{classes:o}=t;return pt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Rt,o)},Et=q.forwardRef(function(o,B){var R;const x=rt({props:o,name:"MuiTablePagination"}),{ActionsComponent:C=ft,backIconButtonProps:y,className:$,colSpan:_,component:m=G,count:u,disabled:k=!1,getItemAriaLabel:I=_t,labelDisplayedRows:v=$t,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:H,onPageChange:f,onRowsPerPageChange:a,page:g,rowsPerPage:b,rowsPerPageOptions:L=[10,25,50,100],SelectProps:d={},showFirstButton:n=!1,showLastButton:K=!1,slotProps:l={},slots:E={}}=x,U=Z(x,Lt),S=x,i=kt(S),r=(R=l==null?void 0:l.select)!=null?R:d,j=r.native?"option":Ct;let w;(m===G||m==="td")&&(w=_||1e3);const A=X(r.id),M=X(r.labelId),N=()=>u===-1?(g+1)*b:b===-1?u:Math.min(u,(g+1)*b);return e.jsx(St,s({colSpan:w,ref:B,as:m,ownerState:S,className:z(i.root,$)},U,{children:e.jsxs(jt,{className:i.toolbar,children:[e.jsx(wt,{className:i.spacer}),L.length>1&&e.jsx(Mt,{className:i.selectLabel,id:M,children:p}),L.length>1&&e.jsx(Tt,s({variant:"standard"},!r.variant&&{input:Y||(Y=e.jsx(ct,{}))},{value:b,onChange:a,id:A,labelId:M},r,{classes:s({},r.classes,{root:z(i.input,i.selectRoot,(r.classes||{}).root),select:z(i.select,(r.classes||{}).select),icon:z(i.selectIcon,(r.classes||{}).icon)}),disabled:k,children:L.map(c=>q.createElement(j,s({},!ut(j)&&{ownerState:S},{className:i.menuItem,key:c.label?c.label:c,value:c.value?c.value:c}),c.label?c.label:c))})),e.jsx(yt,{className:i.displayedRows,children:v({from:u===0?0:g*b+1,to:N(),count:u===-1?-1:u,page:g})}),e.jsx(C,{className:i.actions,backIconButtonProps:y,count:u,nextIconButtonProps:H,onPageChange:f,page:g,rowsPerPage:b,showFirstButton:n,showLastButton:K,slotProps:l.actions,slots:E.actions,getItemAriaLabel:I,disabled:k})]})}))});var W={},At=Bt;Object.defineProperty(W,"__esModule",{value:!0});var Nt=W.default=void 0,Dt=At(bt()),zt=e;Nt=W.default=(0,Dt.default)((0,zt.jsx)("path",{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79zm9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75zM7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1"}),"PhoneOutlined");export{mt as K,Et as T,It as a,Nt as d}; +import{a3 as F,j as e,a as q,o as Z,$ as at,I as D,_ as s,l as lt,m as it,n as rt,u as X,p as z,a4 as ct,a5 as ut,v as pt,w as P,M as dt,a6 as gt,r as bt,i as Bt}from"./index-DdJWTZFy.js";import{d as G}from"./TableRow-CEoQ4SIZ.js";import{S as ht}from"./TextField-Btd7UbKs.js";const Pt=F(e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),xt=F(e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),mt=F(e.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),It=F(e.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),vt=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],ft=q.forwardRef(function(o,B){var R,x,C,y,$,_,m,u;const{backIconButtonProps:k,count:I,disabled:v=!1,getItemAriaLabel:p,nextIconButtonProps:H,onPageChange:f,page:a,rowsPerPage:g,showFirstButton:b,showLastButton:L,slots:d={},slotProps:n={}}=o,K=Z(o,vt),l=at(),E=h=>{f(h,0)},U=h=>{f(h,a-1)},S=h=>{f(h,a+1)},i=h=>{f(h,Math.max(0,Math.ceil(I/g)-1))},r=(R=d.firstButton)!=null?R:D,j=(x=d.lastButton)!=null?x:D,w=(C=d.nextButton)!=null?C:D,A=(y=d.previousButton)!=null?y:D,M=($=d.firstButtonIcon)!=null?$:Pt,N=(_=d.lastButtonIcon)!=null?_:xt,c=(m=d.nextButtonIcon)!=null?m:It,J=(u=d.previousButtonIcon)!=null?u:mt,O=l?j:r,tt=l?w:A,ot=l?A:w,et=l?r:j,st=l?n.lastButton:n.firstButton,Q=l?n.nextButton:n.previousButton,V=l?n.previousButton:n.nextButton,nt=l?n.firstButton:n.lastButton;return e.jsxs("div",s({ref:B},K,{children:[b&&e.jsx(O,s({onClick:E,disabled:v||a===0,"aria-label":p("first",a),title:p("first",a)},st,{children:l?e.jsx(N,s({},n.lastButtonIcon)):e.jsx(M,s({},n.firstButtonIcon))})),e.jsx(tt,s({onClick:U,disabled:v||a===0,color:"inherit","aria-label":p("previous",a),title:p("previous",a)},Q??k,{children:l?e.jsx(c,s({},n.nextButtonIcon)):e.jsx(J,s({},n.previousButtonIcon))})),e.jsx(ot,s({onClick:S,disabled:v||(I!==-1?a>=Math.ceil(I/g)-1:!1),color:"inherit","aria-label":p("next",a),title:p("next",a)},V??H,{children:l?e.jsx(J,s({},n.previousButtonIcon)):e.jsx(c,s({},n.nextButtonIcon))})),L&&e.jsx(et,s({onClick:i,disabled:v||a>=Math.ceil(I/g)-1,"aria-label":p("last",a),title:p("last",a)},nt,{children:l?e.jsx(M,s({},n.firstButtonIcon)):e.jsx(N,s({},n.lastButtonIcon))}))]}))});function Rt(t){return lt("MuiTablePagination",t)}const T=it("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Y;const Lt=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],St=P(G,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,o)=>o.root})(({theme:t})=>({overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}})),jt=P(gt,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,o)=>s({[`& .${T.actions}`]:o.actions},o.toolbar)})(({theme:t})=>({minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${T.actions}`]:{flexShrink:0,marginLeft:20}})),wt=P("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,o)=>o.spacer})({flex:"1 1 100%"}),Mt=P("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,o)=>o.selectLabel})(({theme:t})=>s({},t.typography.body2,{flexShrink:0})),Tt=P(ht,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,o)=>s({[`& .${T.selectIcon}`]:o.selectIcon,[`& .${T.select}`]:o.select},o.input,o.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${T.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Ct=P(dt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,o)=>o.menuItem})({}),yt=P("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,o)=>o.displayedRows})(({theme:t})=>s({},t.typography.body2,{flexShrink:0}));function $t({from:t,to:o,count:B}){return`${t}–${o} of ${B!==-1?B:`more than ${o}`}`}function _t(t){return`Go to ${t} page`}const kt=t=>{const{classes:o}=t;return pt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Rt,o)},Et=q.forwardRef(function(o,B){var R;const x=rt({props:o,name:"MuiTablePagination"}),{ActionsComponent:C=ft,backIconButtonProps:y,className:$,colSpan:_,component:m=G,count:u,disabled:k=!1,getItemAriaLabel:I=_t,labelDisplayedRows:v=$t,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:H,onPageChange:f,onRowsPerPageChange:a,page:g,rowsPerPage:b,rowsPerPageOptions:L=[10,25,50,100],SelectProps:d={},showFirstButton:n=!1,showLastButton:K=!1,slotProps:l={},slots:E={}}=x,U=Z(x,Lt),S=x,i=kt(S),r=(R=l==null?void 0:l.select)!=null?R:d,j=r.native?"option":Ct;let w;(m===G||m==="td")&&(w=_||1e3);const A=X(r.id),M=X(r.labelId),N=()=>u===-1?(g+1)*b:b===-1?u:Math.min(u,(g+1)*b);return e.jsx(St,s({colSpan:w,ref:B,as:m,ownerState:S,className:z(i.root,$)},U,{children:e.jsxs(jt,{className:i.toolbar,children:[e.jsx(wt,{className:i.spacer}),L.length>1&&e.jsx(Mt,{className:i.selectLabel,id:M,children:p}),L.length>1&&e.jsx(Tt,s({variant:"standard"},!r.variant&&{input:Y||(Y=e.jsx(ct,{}))},{value:b,onChange:a,id:A,labelId:M},r,{classes:s({},r.classes,{root:z(i.input,i.selectRoot,(r.classes||{}).root),select:z(i.select,(r.classes||{}).select),icon:z(i.selectIcon,(r.classes||{}).icon)}),disabled:k,children:L.map(c=>q.createElement(j,s({},!ut(j)&&{ownerState:S},{className:i.menuItem,key:c.label?c.label:c,value:c.value?c.value:c}),c.label?c.label:c))})),e.jsx(yt,{className:i.displayedRows,children:v({from:u===0?0:g*b+1,to:N(),count:u===-1?-1:u,page:g})}),e.jsx(C,{className:i.actions,backIconButtonProps:y,count:u,nextIconButtonProps:H,onPageChange:f,page:g,rowsPerPage:b,showFirstButton:n,showLastButton:K,slotProps:l.actions,slots:E.actions,getItemAriaLabel:I,disabled:k})]})}))});var W={},At=Bt;Object.defineProperty(W,"__esModule",{value:!0});var Nt=W.default=void 0,Dt=At(bt()),zt=e;Nt=W.default=(0,Dt.default)((0,zt.jsx)("path",{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79zm9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75zM7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1"}),"PhoneOutlined");export{mt as K,Et as T,It as a,Nt as d}; diff --git a/dist/assets/Pricing-B5KK24ta.js b/dist/assets/Pricing-BuyNgb7k.js similarity index 95% rename from dist/assets/Pricing-B5KK24ta.js rename to dist/assets/Pricing-BuyNgb7k.js index 8f412d6..9e576da 100644 --- a/dist/assets/Pricing-B5KK24ta.js +++ b/dist/assets/Pricing-BuyNgb7k.js @@ -1 +1 @@ -import{r as H,j as e,i as M,a as b,S as v,N,B as x,C as Z,T as d,K as z,I as T}from"./index-CkS0O37G.js";import{d as D,D as q,a as G,b as U,c as J,e as K,f as Q}from"./DeleteOutline-DHEVbt_6.js";import{d as W}from"./LocalShippingOutlined-KXKsS6Ie.js";import{P as V,G as p,C as S}from"./PageHeader-1FV595Go.js";import{B as y}from"./Button-DK5g2WFv.js";import{C as P}from"./Link-DsI7GZfd.js";import{T as j}from"./TextField-CWImxk_G.js";import{T as Y,a as X,b as ee,c as k,d as n,e as re}from"./TableRow-CzSsRUSI.js";var R={},te=M;Object.defineProperty(R,"__esModule",{value:!0});var $=R.default=void 0,ie=te(H()),ae=e;$=R.default=(0,ie.default)((0,ae.jsx)("path",{d:"M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 2.59 4.49L21 11.49c.81-.23 1.28-1.05 1.07-1.85"}),"FlightTakeoffOutlined");const C="https://api.doormile.com/api/v1",_=()=>{const l=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...l?{Authorization:`Bearer ${l}`}:{}}};async function le(){const l=await fetch(`${C}/admin/carrier-pricing?limit=500`,{headers:_()});if(!l.ok)throw new Error("Failed to fetch pricing");return l.json()}async function se(l){const{id:a,created_at:c,updated_at:g,...f}=l,o=a?`${C}/admin/carrier-pricing/${a}`:`${C}/admin/carrier-pricing`,r=await fetch(o,{method:a?"PUT":"POST",headers:_(),body:JSON.stringify(f)});if(!r.ok)throw new Error("Failed to save pricing");return r.json()}async function ne(l){const a=await fetch(`${C}/admin/carrier-pricing/${l}`,{method:"DELETE",headers:_()});if(!a.ok)throw new Error("Failed to delete pricing");return a.json()}const E={id:null,company:"",weight_slab:"",service_type:"",zone:"",rate:"",delivery_time:""};function w({label:l,value:a,icon:c,color:g="primary"}){return e.jsx(x,{sx:{flex:1,p:2.5,borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 4px 20px rgba(0,0,0,0.03)"},children:e.jsxs(v,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(x,{sx:{width:48,height:48,borderRadius:2,bgcolor:`${g}.lighter`,color:`${g}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(c,{sx:{fontSize:24}})}),e.jsxs(x,{children:[e.jsx(d,{variant:"h4",sx:{fontWeight:800,color:"grey.800",lineHeight:1.1},children:a}),e.jsx(d,{variant:"body2",sx:{fontWeight:600,mt:.5},color:"text.secondary",children:l})]})]})})}function oe({company:l,rows:a,onEditRow:c,onAddRow:g,onDeleteRow:f}){const o=[...new Set(a.map(t=>t.service_type).filter(Boolean))],r=a.some(t=>t.zone&&t.zone.trim()!==""),u=a.some(t=>t.delivery_time&&t.delivery_time.trim()!=="");return e.jsxs(P,{sx:{mb:4,borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200",overflow:"hidden"},children:[e.jsxs(x,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",justifyContent:"space-between",background:t=>`linear-gradient(90deg, ${t.palette.primary.lighter}44 0%, ${t.palette.background.paper} 70%)`},children:[e.jsxs(v,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(x,{sx:{width:48,height:48,borderRadius:"50%",bgcolor:"primary.main",color:"primary.contrastText",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:"1.4rem"},children:l[0].toUpperCase()}),e.jsxs(x,{children:[e.jsx(d,{variant:"h6",sx:{fontWeight:800,color:"grey.800",lineHeight:1.2},children:l}),e.jsxs(d,{variant:"caption",color:"text.secondary",children:[a.length," rate",a.length!==1?"s":""]})]})]}),e.jsx(v,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:o.map(t=>e.jsx(S,{label:t,size:"small",sx:{fontWeight:600,bgcolor:"primary.lighter",color:"primary.dark"}},t))})]}),e.jsx(Y,{children:e.jsxs(X,{sx:{minWidth:500},children:[e.jsx(ee,{children:e.jsxs(k,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(n,{children:"Weight Slab"}),e.jsx(n,{children:"Service Type"}),r&&e.jsx(n,{children:"Zone"}),e.jsx(n,{children:"Rate (₹)"}),u&&e.jsx(n,{children:"Delivery"}),e.jsx(n,{align:"right",children:"Actions"})]})}),e.jsx(re,{children:a.map(t=>e.jsxs(k,{hover:!0,sx:{"& > *":{borderBottom:"1px solid",borderColor:"divider"}},children:[e.jsx(n,{children:e.jsx(d,{variant:"body2",sx:{fontWeight:700,color:"grey.800"},children:t.weight_slab||"—"})}),e.jsx(n,{children:e.jsx(d,{variant:"body2",color:"text.secondary",children:t.service_type||"—"})}),r&&e.jsx(n,{children:e.jsx(S,{size:"small",label:t.zone||"—",sx:{fontWeight:600,bgcolor:"grey.100",color:"grey.700",borderRadius:1}})}),e.jsx(n,{children:e.jsx(S,{size:"small",label:t.rate?`₹${t.rate}`:"—",sx:{fontWeight:600,bgcolor:"success.lighter",color:"success.dark",borderRadius:1}})}),u&&e.jsx(n,{children:e.jsx(d,{variant:"body2",color:"text.secondary",children:t.delivery_time||"—"})}),e.jsxs(n,{align:"right",children:[e.jsx(z,{title:"Edit Row",children:e.jsx(T,{size:"small",onClick:()=>c(t),children:e.jsx(K,{fontSize:"small"})})}),e.jsx(z,{title:"Delete Row",children:e.jsx(T,{size:"small",onClick:()=>f(t),children:e.jsx(Q,{fontSize:"small"})})})]})]},t.id))})]})}),e.jsx(x,{sx:{p:1,borderTop:1,borderColor:"divider",bgcolor:"grey.50"},children:e.jsx(y,{fullWidth:!0,size:"small",startIcon:e.jsx(D,{}),sx:{color:"text.secondary",fontWeight:600,"&:hover":{bgcolor:"grey.200",color:"primary.main"}},onClick:()=>g(l),children:"Add Rate Slab"})})]})}function je(){const[l,a]=b.useState([]),[c,g]=b.useState(!0),[f,o]=b.useState(!1),[r,u]=b.useState(null);b.useEffect(()=>{let i=!1;return le().then(s=>{i||a(s.data||[])}).catch(()=>{i||a([])}).finally(()=>{i||g(!1)}),()=>{i=!0}},[]);const t=[...new Set(l.map(i=>i.company).filter(Boolean))].sort(),I=t.reduce((i,s)=>(i[s]=l.filter(h=>h.company===s),i),{}),B=new Set(l.map(i=>i.weight_slab).filter(Boolean)).size,A=i=>{u({...i}),o(!0)},F=i=>{u({...E,company:i}),o(!0)},L=async i=>{if(window.confirm("Delete this pricing entry?"))try{await ne(i.id),a(s=>s.filter(h=>h.id!==i.id))}catch{alert("Failed to delete. Please try again.")}},O=async()=>{try{const i=await se(r);r.id?a(s=>s.map(h=>h.id===r.id?i:h)):a(s=>[...s,i]),o(!1)}catch{alert("Failed to save. Please try again.")}},m=i=>s=>u(h=>({...h,[i]:s.target.value}));return e.jsxs(e.Fragment,{children:[e.jsx(V,{title:"Logistics Pricing Matrix",breadcrumbs:[{label:"Pricing Rate Cards"}],action:e.jsx(y,{variant:"contained",startIcon:e.jsx(D,{}),onClick:()=>{u({...E}),o(!0)},sx:{borderRadius:2,px:3,boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},children:"Add Rate Entry"})}),e.jsxs(v,{direction:{xs:"column",md:"row"},spacing:2,sx:{mt:3,mb:4},children:[e.jsx(w,{label:"Total Carriers",value:c?"…":t.length,icon:W,color:"primary"}),e.jsx(w,{label:"Rate Entries",value:c?"…":l.length,icon:N,color:"success"}),e.jsx(w,{label:"Weight Slabs",value:c?"…":B,icon:$,color:"warning"})]}),c?e.jsx(x,{sx:{display:"flex",justifyContent:"center",py:8},children:e.jsx(Z,{size:40})}):t.length===0?e.jsxs(P,{sx:{p:6,textAlign:"center",borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200"},children:[e.jsx(W,{sx:{fontSize:48,color:"grey.300",mb:2}}),e.jsx(d,{variant:"h6",sx:{color:"grey.700",fontWeight:600},children:"No pricing data found"}),e.jsx(d,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"Run the SQL import or add entries manually."})]}):t.map(i=>e.jsx(oe,{company:i,rows:I[i],onEditRow:A,onAddRow:F,onDeleteRow:L},i)),e.jsxs(q,{open:f,onClose:()=>o(!1),maxWidth:"sm",fullWidth:!0,children:[e.jsx(G,{children:r!=null&&r.id?"Edit Rate Entry":"Add Rate Entry"}),e.jsx(U,{dividers:!0,children:e.jsxs(p,{container:!0,spacing:2,children:[e.jsx(p,{item:!0,xs:12,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Carrier / Company",value:(r==null?void 0:r.company)||"",onChange:m("company")})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Weight Slab",value:(r==null?void 0:r.weight_slab)||"",onChange:m("weight_slab"),placeholder:"e.g. 1kg - 2kg"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Service Type",value:(r==null?void 0:r.service_type)||"",onChange:m("service_type"),placeholder:"e.g. Standard Surface"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Zone",value:(r==null?void 0:r.zone)||"",onChange:m("zone"),placeholder:"e.g. Local / Zonal / National"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Rate (₹)",value:(r==null?void 0:r.rate)||"",onChange:m("rate"),placeholder:"e.g. 100 - 200"})}),e.jsx(p,{item:!0,xs:12,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Delivery Time",value:(r==null?void 0:r.delivery_time)||"",onChange:m("delivery_time"),placeholder:"e.g. 3 - 5 days"})})]})}),e.jsxs(J,{sx:{p:2},children:[e.jsx(y,{onClick:()=>o(!1),children:"Cancel"}),e.jsx(y,{variant:"contained",onClick:O,children:"Save"})]})]})]})}export{je as default}; +import{r as H,j as e,i as M,a as b,S as v,N,B as x,C as Z,T as d,K as z,I as T}from"./index-DdJWTZFy.js";import{d as D,D as q,a as G,b as U,c as J,e as K,f as Q}from"./DeleteOutline-DetaO5yn.js";import{d as W}from"./LocalShippingOutlined-DRozEKne.js";import{P as V,G as p,C as S}from"./PageHeader-CdP5B6Qy.js";import{B as y}from"./Button-Bcwcjqrt.js";import{C as P}from"./Link-Dp34e72e.js";import{T as j}from"./TextField-Btd7UbKs.js";import{T as Y,a as X,b as ee,c as k,d as n,e as re}from"./TableRow-CEoQ4SIZ.js";var R={},te=M;Object.defineProperty(R,"__esModule",{value:!0});var $=R.default=void 0,ie=te(H()),ae=e;$=R.default=(0,ie.default)((0,ae.jsx)("path",{d:"M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 2.59 4.49L21 11.49c.81-.23 1.28-1.05 1.07-1.85"}),"FlightTakeoffOutlined");const C="https://api.doormile.com/api/v1",_=()=>{const l=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...l?{Authorization:`Bearer ${l}`}:{}}};async function le(){const l=await fetch(`${C}/admin/carrier-pricing?limit=500`,{headers:_()});if(!l.ok)throw new Error("Failed to fetch pricing");return l.json()}async function se(l){const{id:a,created_at:c,updated_at:g,...f}=l,o=a?`${C}/admin/carrier-pricing/${a}`:`${C}/admin/carrier-pricing`,r=await fetch(o,{method:a?"PUT":"POST",headers:_(),body:JSON.stringify(f)});if(!r.ok)throw new Error("Failed to save pricing");return r.json()}async function ne(l){const a=await fetch(`${C}/admin/carrier-pricing/${l}`,{method:"DELETE",headers:_()});if(!a.ok)throw new Error("Failed to delete pricing");return a.json()}const E={id:null,company:"",weight_slab:"",service_type:"",zone:"",rate:"",delivery_time:""};function w({label:l,value:a,icon:c,color:g="primary"}){return e.jsx(x,{sx:{flex:1,p:2.5,borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 4px 20px rgba(0,0,0,0.03)"},children:e.jsxs(v,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(x,{sx:{width:48,height:48,borderRadius:2,bgcolor:`${g}.lighter`,color:`${g}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(c,{sx:{fontSize:24}})}),e.jsxs(x,{children:[e.jsx(d,{variant:"h4",sx:{fontWeight:800,color:"grey.800",lineHeight:1.1},children:a}),e.jsx(d,{variant:"body2",sx:{fontWeight:600,mt:.5},color:"text.secondary",children:l})]})]})})}function oe({company:l,rows:a,onEditRow:c,onAddRow:g,onDeleteRow:f}){const o=[...new Set(a.map(t=>t.service_type).filter(Boolean))],r=a.some(t=>t.zone&&t.zone.trim()!==""),u=a.some(t=>t.delivery_time&&t.delivery_time.trim()!=="");return e.jsxs(P,{sx:{mb:4,borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200",overflow:"hidden"},children:[e.jsxs(x,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",justifyContent:"space-between",background:t=>`linear-gradient(90deg, ${t.palette.primary.lighter}44 0%, ${t.palette.background.paper} 70%)`},children:[e.jsxs(v,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(x,{sx:{width:48,height:48,borderRadius:"50%",bgcolor:"primary.main",color:"primary.contrastText",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:800,fontSize:"1.4rem"},children:l[0].toUpperCase()}),e.jsxs(x,{children:[e.jsx(d,{variant:"h6",sx:{fontWeight:800,color:"grey.800",lineHeight:1.2},children:l}),e.jsxs(d,{variant:"caption",color:"text.secondary",children:[a.length," rate",a.length!==1?"s":""]})]})]}),e.jsx(v,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:o.map(t=>e.jsx(S,{label:t,size:"small",sx:{fontWeight:600,bgcolor:"primary.lighter",color:"primary.dark"}},t))})]}),e.jsx(Y,{children:e.jsxs(X,{sx:{minWidth:500},children:[e.jsx(ee,{children:e.jsxs(k,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(n,{children:"Weight Slab"}),e.jsx(n,{children:"Service Type"}),r&&e.jsx(n,{children:"Zone"}),e.jsx(n,{children:"Rate (₹)"}),u&&e.jsx(n,{children:"Delivery"}),e.jsx(n,{align:"right",children:"Actions"})]})}),e.jsx(re,{children:a.map(t=>e.jsxs(k,{hover:!0,sx:{"& > *":{borderBottom:"1px solid",borderColor:"divider"}},children:[e.jsx(n,{children:e.jsx(d,{variant:"body2",sx:{fontWeight:700,color:"grey.800"},children:t.weight_slab||"—"})}),e.jsx(n,{children:e.jsx(d,{variant:"body2",color:"text.secondary",children:t.service_type||"—"})}),r&&e.jsx(n,{children:e.jsx(S,{size:"small",label:t.zone||"—",sx:{fontWeight:600,bgcolor:"grey.100",color:"grey.700",borderRadius:1}})}),e.jsx(n,{children:e.jsx(S,{size:"small",label:t.rate?`₹${t.rate}`:"—",sx:{fontWeight:600,bgcolor:"success.lighter",color:"success.dark",borderRadius:1}})}),u&&e.jsx(n,{children:e.jsx(d,{variant:"body2",color:"text.secondary",children:t.delivery_time||"—"})}),e.jsxs(n,{align:"right",children:[e.jsx(z,{title:"Edit Row",children:e.jsx(T,{size:"small",onClick:()=>c(t),children:e.jsx(K,{fontSize:"small"})})}),e.jsx(z,{title:"Delete Row",children:e.jsx(T,{size:"small",onClick:()=>f(t),children:e.jsx(Q,{fontSize:"small"})})})]})]},t.id))})]})}),e.jsx(x,{sx:{p:1,borderTop:1,borderColor:"divider",bgcolor:"grey.50"},children:e.jsx(y,{fullWidth:!0,size:"small",startIcon:e.jsx(D,{}),sx:{color:"text.secondary",fontWeight:600,"&:hover":{bgcolor:"grey.200",color:"primary.main"}},onClick:()=>g(l),children:"Add Rate Slab"})})]})}function je(){const[l,a]=b.useState([]),[c,g]=b.useState(!0),[f,o]=b.useState(!1),[r,u]=b.useState(null);b.useEffect(()=>{let i=!1;return le().then(s=>{i||a(s.data||[])}).catch(()=>{i||a([])}).finally(()=>{i||g(!1)}),()=>{i=!0}},[]);const t=[...new Set(l.map(i=>i.company).filter(Boolean))].sort(),I=t.reduce((i,s)=>(i[s]=l.filter(h=>h.company===s),i),{}),B=new Set(l.map(i=>i.weight_slab).filter(Boolean)).size,A=i=>{u({...i}),o(!0)},F=i=>{u({...E,company:i}),o(!0)},L=async i=>{if(window.confirm("Delete this pricing entry?"))try{await ne(i.id),a(s=>s.filter(h=>h.id!==i.id))}catch{alert("Failed to delete. Please try again.")}},O=async()=>{try{const i=await se(r);r.id?a(s=>s.map(h=>h.id===r.id?i:h)):a(s=>[...s,i]),o(!1)}catch{alert("Failed to save. Please try again.")}},m=i=>s=>u(h=>({...h,[i]:s.target.value}));return e.jsxs(e.Fragment,{children:[e.jsx(V,{title:"Logistics Pricing Matrix",breadcrumbs:[{label:"Pricing Rate Cards"}],action:e.jsx(y,{variant:"contained",startIcon:e.jsx(D,{}),onClick:()=>{u({...E}),o(!0)},sx:{borderRadius:2,px:3,boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},children:"Add Rate Entry"})}),e.jsxs(v,{direction:{xs:"column",md:"row"},spacing:2,sx:{mt:3,mb:4},children:[e.jsx(w,{label:"Total Carriers",value:c?"…":t.length,icon:W,color:"primary"}),e.jsx(w,{label:"Rate Entries",value:c?"…":l.length,icon:N,color:"success"}),e.jsx(w,{label:"Weight Slabs",value:c?"…":B,icon:$,color:"warning"})]}),c?e.jsx(x,{sx:{display:"flex",justifyContent:"center",py:8},children:e.jsx(Z,{size:40})}):t.length===0?e.jsxs(P,{sx:{p:6,textAlign:"center",borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200"},children:[e.jsx(W,{sx:{fontSize:48,color:"grey.300",mb:2}}),e.jsx(d,{variant:"h6",sx:{color:"grey.700",fontWeight:600},children:"No pricing data found"}),e.jsx(d,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"Run the SQL import or add entries manually."})]}):t.map(i=>e.jsx(oe,{company:i,rows:I[i],onEditRow:A,onAddRow:F,onDeleteRow:L},i)),e.jsxs(q,{open:f,onClose:()=>o(!1),maxWidth:"sm",fullWidth:!0,children:[e.jsx(G,{children:r!=null&&r.id?"Edit Rate Entry":"Add Rate Entry"}),e.jsx(U,{dividers:!0,children:e.jsxs(p,{container:!0,spacing:2,children:[e.jsx(p,{item:!0,xs:12,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Carrier / Company",value:(r==null?void 0:r.company)||"",onChange:m("company")})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Weight Slab",value:(r==null?void 0:r.weight_slab)||"",onChange:m("weight_slab"),placeholder:"e.g. 1kg - 2kg"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Service Type",value:(r==null?void 0:r.service_type)||"",onChange:m("service_type"),placeholder:"e.g. Standard Surface"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Zone",value:(r==null?void 0:r.zone)||"",onChange:m("zone"),placeholder:"e.g. Local / Zonal / National"})}),e.jsx(p,{item:!0,xs:12,sm:6,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Rate (₹)",value:(r==null?void 0:r.rate)||"",onChange:m("rate"),placeholder:"e.g. 100 - 200"})}),e.jsx(p,{item:!0,xs:12,children:e.jsx(j,{fullWidth:!0,size:"small",label:"Delivery Time",value:(r==null?void 0:r.delivery_time)||"",onChange:m("delivery_time"),placeholder:"e.g. 3 - 5 days"})})]})}),e.jsxs(J,{sx:{p:2},children:[e.jsx(y,{onClick:()=>o(!1),children:"Cancel"}),e.jsx(y,{variant:"contained",onClick:O,children:"Save"})]})]})]})}export{je as default}; diff --git a/dist/assets/Refresh-Z6LWMmna.js b/dist/assets/Refresh-DEoCZISD.js similarity index 84% rename from dist/assets/Refresh-Z6LWMmna.js rename to dist/assets/Refresh-DEoCZISD.js index 444f769..9798682 100644 --- a/dist/assets/Refresh-Z6LWMmna.js +++ b/dist/assets/Refresh-DEoCZISD.js @@ -1 +1 @@ -import{r,j as t,i as a}from"./index-CkS0O37G.js";var e={},s=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,o=s(r()),i=t;u=e.default=(0,o.default)((0,i.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");export{u as d}; +import{r,j as t,i as a}from"./index-DdJWTZFy.js";var e={},s=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,o=s(r()),i=t;u=e.default=(0,o.default)((0,i.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");export{u as d}; diff --git a/dist/assets/Settings-C9JXqPw8.js b/dist/assets/Settings-CDtM7ArL.js similarity index 98% rename from dist/assets/Settings-C9JXqPw8.js rename to dist/assets/Settings-CDtM7ArL.js index 99e1de6..13cd43e 100644 --- a/dist/assets/Settings-C9JXqPw8.js +++ b/dist/assets/Settings-CDtM7ArL.js @@ -1 +1 @@ -import{ac as Ve,a as b,k as ge,_ as x,ad as xe,l as Z,m as K,n as X,o as F,j as e,p as Ce,v as J,w as M,P as Fe,ae as qe,a1 as Ge,af as Ue,a0 as Ye,ag as Ze,q as R,aa as Ke,ab as Xe,A as fe,r as $,i as _,S as p,T as C,B as j,ah as Je,M as me,D,I as Qe}from"./index-CkS0O37G.js";import{S as et,d as tt,a as rt}from"./VisibilityOff-7YzRgPyD.js";import{P as at,C as G,G as L}from"./PageHeader-1FV595Go.js";import{B as N}from"./Button-DK5g2WFv.js";import{C as V}from"./Link-DsI7GZfd.js";import{T as A}from"./TextField-CWImxk_G.js";import{L as ot}from"./LinearProgress-C7VdMGLk.js";import{A as nt}from"./Alert-Ok_eCidg.js";import{I as st}from"./InputAdornment-Bwtqyiqg.js";function it(t={}){const{autoHideDuration:r=null,disableWindowBlurListener:a=!1,onClose:o,open:d,resumeHideDuration:u}=t,l=Ve();b.useEffect(()=>{if(!d)return;function c(i){i.defaultPrevented||(i.key==="Escape"||i.key==="Esc")&&(o==null||o(i,"escapeKeyDown"))}return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[d,o]);const w=ge((c,i)=>{o==null||o(c,i)}),v=ge(c=>{!o||c==null||l.start(c,()=>{w(null,"timeout")})});b.useEffect(()=>(d&&v(r),l.clear),[d,r,v,l]);const y=c=>{o==null||o(c,"clickaway")},s=l.clear,h=b.useCallback(()=>{r!=null&&v(u??r*.5)},[r,u,v]),k=c=>i=>{const g=c.onBlur;g==null||g(i),h()},O=c=>i=>{const g=c.onFocus;g==null||g(i),s()},P=c=>i=>{const g=c.onMouseEnter;g==null||g(i),s()},T=c=>i=>{const g=c.onMouseLeave;g==null||g(i),h()};return b.useEffect(()=>{if(!a&&d)return window.addEventListener("focus",h),window.addEventListener("blur",s),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",s)}},[a,d,h,s]),{getRootProps:(c={})=>{const i=x({},xe(t),xe(c));return x({role:"presentation"},c,i,{onBlur:k(i),onFocus:O(i),onMouseEnter:P(i),onMouseLeave:T(i)})},onClickAway:y}}function lt(t){return Z("MuiSnackbarContent",t)}K("MuiSnackbarContent",["root","message","action"]);const ct=["action","className","message","role"],dt=t=>{const{classes:r}=t;return J({root:["root"],action:["action"],message:["message"]},lt,r)},ut=M(Fe,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,r)=>r.root})(({theme:t})=>{const r=t.palette.mode==="light"?.8:.98,a=qe(t.palette.background.default,r);return x({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(a),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:a,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),ht=M("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0"}),pt=M("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),vt=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSnackbarContent"}),{action:d,className:u,message:l,role:w="alert"}=o,v=F(o,ct),y=o,s=dt(y);return e.jsxs(ut,x({role:w,square:!0,elevation:6,className:Ce(s.root,u),ownerState:y,ref:a},v,{children:[e.jsx(ht,{className:s.message,ownerState:y,children:l}),d?e.jsx(pt,{className:s.action,ownerState:y,children:d}):null]}))});function gt(t){return Z("MuiSnackbar",t)}K("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const xt=["onEnter","onExited"],ft=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],mt=t=>{const{classes:r,anchorOrigin:a}=t,o={root:["root",`anchorOrigin${R(a.vertical)}${R(a.horizontal)}`]};return J(o,gt,r)},be=M("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,r[`anchorOrigin${R(a.anchorOrigin.vertical)}${R(a.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:r})=>{const a={left:"50%",right:"auto",transform:"translateX(-50%)"};return x({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},r.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},r.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},r.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:x({},r.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},r.anchorOrigin.horizontal==="center"&&a,r.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},r.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),bt=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSnackbar"}),d=Ge(),u={enter:d.transitions.duration.enteringScreen,exit:d.transitions.duration.leavingScreen},{action:l,anchorOrigin:{vertical:w,horizontal:v}={vertical:"bottom",horizontal:"left"},autoHideDuration:y=null,children:s,className:h,ClickAwayListenerProps:k,ContentProps:O,disableWindowBlurListener:P=!1,message:T,open:E,TransitionComponent:c=Ue,transitionDuration:i=u,TransitionProps:{onEnter:g,onExited:n}={}}=o,z=F(o.TransitionProps,xt),f=F(o,ft),H=x({},o,{anchorOrigin:{vertical:w,horizontal:v},autoHideDuration:y,disableWindowBlurListener:P,TransitionComponent:c,transitionDuration:i}),Le=mt(H),{getRootProps:Te,onClickAway:Ee}=it(x({},H)),[He,ve]=b.useState(!0),Ne=Ye({elementType:be,getSlotProps:Te,externalForwardedProps:f,ownerState:H,additionalProps:{ref:a},className:[Le.root,h]}),De=q=>{ve(!0),n&&n(q)},We=(q,Be)=>{ve(!1),g&&g(q,Be)};return!E&&He?null:e.jsx(Ze,x({onClickAway:Ee},k,{children:e.jsx(be,x({},Ne,{children:e.jsx(c,x({appear:!0,in:E,timeout:i,direction:w==="top"?"down":"up",onEnter:We,onExited:De},z,{children:s||e.jsx(vt,x({message:T,action:l},O))}))}))}))});function jt(t){return Z("MuiSwitch",t)}const m=K("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),wt=["className","color","edge","size","sx"],yt=t=>{const{classes:r,edge:a,size:o,color:d,checked:u,disabled:l}=t,w={root:["root",a&&`edge${R(a)}`,`size${R(o)}`],switchBase:["switchBase",`color${R(d)}`,u&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},v=J(w,jt,r);return x({},r,v)},St=M("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,a.edge&&r[`edge${R(a.edge)}`],r[`size${R(a.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${m.thumb}`]:{width:16,height:16},[`& .${m.switchBase}`]:{padding:4,[`&.${m.checked}`]:{transform:"translateX(16px)"}}}}]}),Ct=M(et,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.switchBase,{[`& .${m.input}`]:r.input},a.color!=="default"&&r[`color${R(a.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${m.checked}`]:{transform:"translateX(20px)"},[`&.${m.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${m.checked} + .${m.track}`]:{opacity:.5},[`&.${m.disabled} + .${m.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${m.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:fe(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{color:r},style:{[`&.${m.checked}`]:{color:(t.vars||t).palette[r].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:fe(t.palette[r].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${m.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r}DisabledColor`]:`${t.palette.mode==="light"?Ke(t.palette[r].main,.62):Xe(t.palette[r].main,.55)}`}},[`&.${m.checked} + .${m.track}`]:{backgroundColor:(t.vars||t).palette[r].main}}}))]})),kt=M("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,r)=>r.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),zt=M("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,r)=>r.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),W=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSwitch"}),{className:d,color:u="primary",edge:l=!1,size:w="medium",sx:v}=o,y=F(o,wt),s=x({},o,{color:u,edge:l,size:w}),h=yt(s),k=e.jsx(zt,{className:h.thumb,ownerState:s});return e.jsxs(St,{className:Ce(h.root,d),sx:v,ownerState:s,children:[e.jsx(Ct,x({type:"checkbox",icon:k,checkedIcon:k,ref:a,ownerState:s},y,{classes:x({},h,{root:h.switchBase})})),e.jsx(kt,{className:h.track,ownerState:s})]})});var Q={},$t=_;Object.defineProperty(Q,"__esModule",{value:!0});var ke=Q.default=void 0,_t=$t($()),Rt=e;ke=Q.default=(0,_t.default)((0,Rt.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3M6 6h9v4H6z"}),"SaveOutlined");var ee={},Mt=_;Object.defineProperty(ee,"__esModule",{value:!0});var te=ee.default=void 0,Ot=Mt($()),Pt=e;te=ee.default=(0,Ot.default)((0,Pt.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"TuneOutlined");var re={},It=_;Object.defineProperty(re,"__esModule",{value:!0});var ae=re.default=void 0,At=It($()),Lt=e;ae=re.default=(0,At.default)((0,Lt.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");var oe={},Tt=_;Object.defineProperty(oe,"__esModule",{value:!0});var ne=oe.default=void 0,Et=Tt($()),Ht=e;ne=oe.default=(0,Et.default)((0,Ht.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2M9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9zm9 14H6V10h12zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"LockOutlined");var se={},Nt=_;Object.defineProperty(se,"__esModule",{value:!0});var Y=se.default=void 0,Dt=Nt($()),Wt=e;Y=se.default=(0,Dt.default)((0,Wt.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83v-4.7l6-2.25 6 2.25z"}),"ShieldOutlined");var ie={},Bt=_;Object.defineProperty(ie,"__esModule",{value:!0});var ze=ie.default=void 0,Vt=Bt($()),Ft=e;ze=ie.default=(0,Vt.default)((0,Ft.jsx)("path",{d:"M18 11v2h4v-2zm-2 6.61c.96.71 2.21 1.65 3.2 2.39.4-.53.8-1.07 1.2-1.6-.99-.74-2.24-1.68-3.2-2.4-.4.54-.8 1.08-1.2 1.61M20.4 5.6c-.4-.53-.8-1.07-1.2-1.6-.99.74-2.24 1.68-3.2 2.4.4.53.8 1.07 1.2 1.6.96-.72 2.21-1.65 3.2-2.4M4 9c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2h1v4h2v-4h1l5 3V6L8 9zm5.03 1.71L11 9.53v4.94l-1.97-1.18-.48-.29H4v-2h4.55zM15.5 12c0-1.33-.58-2.53-1.5-3.35v6.69c.92-.81 1.5-2.01 1.5-3.34"}),"CampaignOutlined");var le={},qt=_;Object.defineProperty(le,"__esModule",{value:!0});var $e=le.default=void 0,Gt=qt($()),Ut=e;$e=le.default=(0,Gt.default)((0,Ut.jsx)("path",{d:"M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z"}),"BusinessOutlined");var ce={},Yt=_;Object.defineProperty(ce,"__esModule",{value:!0});var _e=ce.default=void 0,Zt=Yt($()),je=e;_e=ce.default=(0,Zt.default)([(0,je.jsx)("path",{d:"M23 11.99 20.56 9.2l.34-3.69-3.61-.82L15.4 1.5 12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 11.99l2.44 2.79-.34 3.7 3.61.82 1.89 3.2 3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-3.95 1.48-.56.65.08.85.18 1.95-1.9.43-.84.19-.44.74-.99 1.68-1.78-.77-.8-.34-.79.34-1.78.77-.99-1.67-.44-.74-.84-.19-1.9-.43.18-1.96.08-.85-.56-.65L3.67 12l1.29-1.48.56-.65-.09-.86-.18-1.94 1.9-.43.84-.19.44-.74.99-1.68 1.78.77.8.34.79-.34 1.78-.77.99 1.68.44.74.84.19 1.9.43-.18 1.95-.08.85.56.65 1.29 1.47z"},"0"),(0,je.jsx)("path",{d:"m10.09 13.75-2.32-2.33-1.48 1.49 3.8 3.81 7.34-7.36-1.48-1.49z"},"1")],"VerifiedOutlined");var de={},Kt=_;Object.defineProperty(de,"__esModule",{value:!0});var Re=de.default=void 0,Xt=Kt($()),Jt=e;Re=de.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM2.74 18c-.77 1.33.19 3 1.73 3h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0zM11 11v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1m0 5h2v2h-2z"}),"WarningAmberRounded");var ue={},Qt=_;Object.defineProperty(ue,"__esModule",{value:!0});var Me=ue.default=void 0,er=Qt($()),tr=e;Me=ue.default=(0,er.default)((0,tr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m-1-4h2v2h-2zm1.61-9.96c-2.06-.3-3.88.97-4.43 2.79-.18.58.26 1.17.87 1.17h.2c.41 0 .74-.29.88-.67.32-.89 1.27-1.5 2.3-1.28.95.2 1.65 1.13 1.57 2.1-.1 1.34-1.62 1.63-2.45 2.88 0 .01-.01.01-.01.02-.01.02-.02.03-.03.05-.09.15-.18.32-.25.5-.01.03-.03.05-.04.08-.01.02-.01.04-.02.07-.12.34-.2.75-.2 1.25h2c0-.42.11-.77.28-1.07.02-.03.03-.06.05-.09.08-.14.18-.27.28-.39.01-.01.02-.03.03-.04.1-.12.21-.23.33-.34.96-.91 2.26-1.65 1.99-3.56-.24-1.74-1.61-3.21-3.35-3.47"}),"HelpOutlineRounded");var he={},rr=_;Object.defineProperty(he,"__esModule",{value:!0});var Oe=he.default=void 0,ar=rr($()),or=e;Oe=he.default=(0,ar.default)((0,or.jsx)("path",{d:"m17 8-1.41 1.41L17.17 11H9v2h8.17l-1.58 1.58L17 16l4-4zM5 5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7v-2H5z"}),"LogoutOutlined");var pe={},nr=_;Object.defineProperty(pe,"__esModule",{value:!0});var Pe=pe.default=void 0,sr=nr($()),ir=e;Pe=pe.default=(0,sr.default)((0,ir.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const Ie=["Asia/Kolkata (IST)","Asia/Dubai (GST)","UTC","America/New_York (EST)"],Ae=["English","हिन्दी (Hindi)","العربية (Arabic)"],we={orgName:"Doormile Logistics Pvt. Ltd.",supportEmail:"support@doormile.in",contact:"+91 63749 46729",timezone:Ie[0],language:Ae[0]},ye={newClient:!0,contractStatus:!0,teamAccess:!1,databaseSync:!0,emailAlerts:!0,smsAlerts:!1},Se={currentPassword:"",newPassword:"",confirmPassword:"",twoFactor:!1},lr=[{icon:te,label:"General",desc:"Organisation profile"},{icon:ae,label:"Notifications",desc:"Alerts & channels"},{icon:ne,label:"Security",desc:"Password & 2FA"}],cr=[{k:"newClient",t:"New client onboarded",d:"Notify when a new client is added to the system"},{k:"contractStatus",t:"Contract status",d:"When a client contract becomes active or expires"},{k:"teamAccess",t:"Team access",d:"When a new team member is granted or revoked access"},{k:"databaseSync",t:"Database sync",d:"Alerts for vector database synchronization events"}],dr=[{label:"Too weak",color:"error"},{label:"Weak",color:"error"},{label:"Fair",color:"warning"},{label:"Good",color:"info"},{label:"Strong",color:"success"}],ur=t=>{let r=0;return t.length>=8&&r++,/[a-z]/.test(t)&&/[A-Z]/.test(t)&&r++,/\d/.test(t)&&r++,/[^A-Za-z0-9]/.test(t)&&r++,r};function I({icon:t,title:r,subtitle:a,color:o="primary",danger:d=!1,children:u}){return e.jsxs(V,{sx:d?{borderColor:"error.light"}:void 0,children:[e.jsxs(p,{direction:"row",spacing:1.75,alignItems:"center",sx:{px:3,py:2.25,borderBottom:1,borderColor:"divider",background:l=>`linear-gradient(90deg, ${l.palette[o].lighter}66 0%, ${l.palette.background.paper} 72%)`},children:[e.jsx(j,{sx:{width:40,height:40,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${o}.lighter`,color:`${o}.main`},children:e.jsx(t,{fontSize:"small"})}),e.jsxs(j,{sx:{minWidth:0},children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.3},children:r}),a&&e.jsx(C,{variant:"caption",color:"text.secondary",children:a})]})]}),e.jsx(j,{sx:{px:3},children:u})]})}function S({label:t,description:r,children:a,align:o="center"}){return e.jsxs(L,{container:!0,spacing:2,alignItems:o,sx:{py:2.5,borderRadius:2,transition:"background-color .15s","&:hover":{bgcolor:"grey.50"}},children:[e.jsxs(L,{item:!0,xs:12,sm:5,children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:600,color:"grey.800"},children:t}),r&&e.jsx(C,{variant:"caption",color:"text.secondary",children:r})]}),e.jsx(L,{item:!0,xs:12,sm:7,children:a})]})}const B={display:"flex",justifyContent:{sm:"flex-end"}};function U({label:t,value:r,onChange:a,autoComplete:o}){const[d,u]=b.useState(!1);return e.jsx(A,{fullWidth:!0,size:"small",type:d?"text":"password",label:t,value:r,onChange:a,autoComplete:o,InputProps:{endAdornment:e.jsx(st,{position:"end",children:e.jsx(Qe,{onClick:()=>u(l=>!l),edge:"end",size:"small",children:d?e.jsx(tt,{fontSize:"small"}):e.jsx(rt,{fontSize:"small"})})})}})}function wr(){const[t,r]=b.useState(0),[a,o]=b.useState(!1),[d,u]=b.useState(!1),[l,w]=b.useState(we),[v,y]=b.useState(ye),[s,h]=b.useState(Se),k=n=>z=>{w(f=>({...f,[n]:z.target.value})),u(!0)},O=n=>z=>{y(f=>({...f,[n]:z.target.checked})),u(!0)},P=n=>z=>{h(f=>({...f,[n]:z.target.value})),u(!0)},T=()=>{o(!0),u(!1)},E=()=>{w(we),y(ye),h(Se),u(!1)},c=ur(s.newPassword),i=dr[c],g=s.confirmPassword&&s.newPassword!==s.confirmPassword;return e.jsxs(e.Fragment,{children:[e.jsx(at,{title:"Settings",breadcrumbs:[{label:"Settings"}],action:e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",children:[d&&e.jsx(G,{size:"small",label:"Unsaved changes",sx:{bgcolor:"warning.lighter",color:"warning.dark",fontWeight:600}}),e.jsx(N,{variant:"outlined",onClick:E,children:"Discard"}),e.jsx(N,{variant:"contained",startIcon:e.jsx(ke,{}),onClick:T,children:"Save Changes"})]})}),e.jsxs(L,{container:!0,spacing:2.5,children:[e.jsx(L,{item:!0,xs:12,md:3,children:e.jsxs(p,{spacing:2.5,sx:{position:{md:"sticky"},top:{md:88}},children:[e.jsxs(V,{sx:{p:1.5},children:[e.jsx(C,{variant:"overline",sx:{px:1,color:"text.secondary",fontWeight:700,letterSpacing:.6},children:"Preferences"}),e.jsx(p,{spacing:.25,sx:{mt:.5},children:lr.map((n,z)=>{const f=t===z,H=n.icon;return e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",onClick:()=>r(z),sx:{px:1.5,py:1.25,borderRadius:2,cursor:"pointer",position:"relative",bgcolor:f?"primary.lighter":"transparent",transition:"background-color .15s","&:hover":{bgcolor:f?"primary.lighter":"grey.50"},"&::before":f?{content:'""',position:"absolute",left:0,top:9,bottom:9,width:3,borderRadius:3,bgcolor:"primary.main"}:{}},children:[e.jsx(j,{sx:{width:34,height:34,borderRadius:1.5,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:f?"primary.main":"grey.100",color:f?"#fff":"grey.600"},children:e.jsx(H,{fontSize:"small"})}),e.jsxs(j,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:600,color:f?"primary.main":"grey.800"},children:n.label}),e.jsx(C,{variant:"caption",color:"text.secondary",children:n.desc})]}),e.jsx(Pe,{sx:{fontSize:18,color:f?"primary.main":"grey.300"}})]},n.label)})})]}),e.jsx(V,{sx:{p:2.5,bgcolor:"primary.lighter",borderColor:"primary.100"},children:e.jsxs(p,{spacing:1.25,children:[e.jsx(j,{sx:{width:38,height:38,borderRadius:2,bgcolor:"primary.main",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Me,{fontSize:"small"})}),e.jsxs(j,{children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:700,color:"primary.dark"},children:"Need a hand?"}),e.jsx(C,{variant:"caption",sx:{color:"primary.dark",opacity:.85},children:"Our team is available 24/7 for operational support."})]}),e.jsx(N,{size:"small",variant:"contained",sx:{alignSelf:"flex-start"},children:"Contact support"})]})})]})}),e.jsxs(L,{item:!0,xs:12,md:9,children:[t===0&&e.jsxs(p,{spacing:2.5,children:[e.jsx(V,{sx:{overflow:"hidden"},children:e.jsxs(p,{direction:{xs:"column",sm:"row"},spacing:2.5,alignItems:{sm:"center"},sx:{p:3,background:n=>`linear-gradient(90deg, ${n.palette.primary.lighter}88 0%, ${n.palette.background.paper} 75%)`},children:[e.jsx(Je,{variant:"rounded",sx:{width:64,height:64,bgcolor:"primary.main",color:"#fff"},children:e.jsx($e,{})}),e.jsxs(j,{sx:{flexGrow:1,minWidth:0},children:[e.jsxs(p,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(C,{variant:"h5",sx:{fontWeight:700,color:"grey.800"},children:l.orgName}),e.jsx(G,{size:"small",icon:e.jsx(_e,{sx:{fontSize:15,ml:.5}}),label:"Verified",sx:{fontWeight:700,bgcolor:"success.lighter",color:"success.dark","& .MuiChip-icon":{color:"inherit"}}})]}),e.jsxs(C,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:[l.supportEmail," · ",l.contact]})]}),e.jsx(N,{variant:"outlined",size:"small",children:"Change logo"})]})}),e.jsx(I,{icon:te,title:"Organisation",subtitle:"Profile and regional preferences",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Organisation name",description:"Shown on invoices and exports",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.orgName,onChange:k("orgName")})}),e.jsx(S,{label:"Support email",description:"Where customer replies are routed",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.supportEmail,onChange:k("supportEmail")})}),e.jsx(S,{label:"Contact number",description:"Primary operations line",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.contact,onChange:k("contact")})}),e.jsx(S,{label:"Timezone",description:"Used for schedules and reports",children:e.jsx(A,{select:!0,fullWidth:!0,size:"small",value:l.timezone,onChange:k("timezone"),children:Ie.map(n=>e.jsx(me,{value:n,children:n},n))})}),e.jsx(S,{label:"Language",description:"Console display language",children:e.jsx(A,{select:!0,fullWidth:!0,size:"small",value:l.language,onChange:k("language"),children:Ae.map(n=>e.jsx(me,{value:n,children:n},n))})})]})})]}),t===1&&e.jsxs(p,{spacing:2.5,children:[e.jsx(I,{icon:ae,title:"Notification Preferences",subtitle:"Choose what you get alerted about",color:"primary",children:e.jsx(p,{divider:e.jsx(D,{}),children:cr.map(n=>e.jsx(S,{label:n.t,description:n.d,children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v[n.k],onChange:O(n.k)})})},n.k))})}),e.jsx(I,{icon:ze,title:"Delivery Channels",subtitle:"How alerts reach your team",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Email alerts",description:"Send notifications to the support inbox",children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v.emailAlerts,onChange:O("emailAlerts")})})}),e.jsx(S,{label:"SMS alerts",description:"Send notifications to the registered mobile",children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v.smsAlerts,onChange:O("smsAlerts")})})})]})})]}),t===2&&e.jsxs(p,{spacing:2.5,children:[e.jsx(I,{icon:ne,title:"Change Password",subtitle:"Use 8+ characters with a mix of letters, numbers & symbols",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Current password",description:"Enter your existing password",align:"flex-start",children:e.jsx(U,{label:"Current password",value:s.currentPassword,onChange:P("currentPassword"),autoComplete:"current-password"})}),e.jsx(S,{label:"New password",description:"Choose a strong, unique password",align:"flex-start",children:e.jsxs(j,{children:[e.jsx(U,{label:"New password",value:s.newPassword,onChange:P("newPassword"),autoComplete:"new-password"}),s.newPassword&&e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",sx:{mt:1},children:[e.jsx(ot,{variant:"determinate",value:c/4*100,color:i.color,sx:{flexGrow:1,height:6,borderRadius:3}}),e.jsx(C,{variant:"caption",sx:{fontWeight:700,color:`${i.color}.main`,minWidth:56},children:i.label})]})]})}),e.jsx(S,{label:"Confirm new password",description:"Re-enter the new password",align:"flex-start",children:e.jsxs(j,{children:[e.jsx(U,{label:"Confirm new password",value:s.confirmPassword,onChange:P("confirmPassword"),autoComplete:"new-password"}),g&&e.jsx(C,{variant:"caption",color:"error.main",sx:{mt:.75,display:"block"},children:"Passwords do not match"})]})})]})}),e.jsx(I,{icon:Y,title:"Two-Factor Authentication",subtitle:"Add an extra layer of security to your account",color:"primary",children:e.jsx(S,{label:"Authenticator app",description:"Require a one-time code at sign-in for extra security",children:e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",sx:{justifyContent:{sm:"flex-end"}},children:[e.jsx(G,{size:"small",icon:e.jsx(Y,{sx:{fontSize:15,ml:.5}}),label:s.twoFactor?"Enabled":"Disabled",sx:{fontWeight:700,bgcolor:s.twoFactor?"success.lighter":"grey.100",color:s.twoFactor?"success.dark":"grey.600","& .MuiChip-icon":{color:"inherit"}}}),e.jsx(W,{checked:s.twoFactor,onChange:n=>{h(z=>({...z,twoFactor:n.target.checked})),u(!0)}})]})})}),e.jsx(I,{icon:Re,title:"Danger Zone",subtitle:"Irreversible and high-impact actions",color:"error",danger:!0,children:e.jsx(S,{label:"Sign out of all sessions",description:"End every active session on all devices",children:e.jsx(j,{sx:B,children:e.jsx(N,{variant:"outlined",color:"error",startIcon:e.jsx(Oe,{}),onClick:()=>{localStorage.removeItem("auth_token"),window.location.href="/login"},children:"Sign out everywhere"})})})})]})]})]}),e.jsx(bt,{open:a,autoHideDuration:2500,onClose:()=>o(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(nt,{severity:"success",variant:"filled",onClose:()=>o(!1),sx:{width:"100%"},children:"Settings saved successfully."})})]})}export{wr as default}; +import{ac as Ve,a as b,k as ge,_ as x,ad as xe,l as Z,m as K,n as X,o as F,j as e,p as Ce,v as J,w as M,P as Fe,ae as qe,a1 as Ge,af as Ue,a0 as Ye,ag as Ze,q as R,aa as Ke,ab as Xe,A as fe,r as $,i as _,S as p,T as C,B as j,ah as Je,M as me,D,I as Qe}from"./index-DdJWTZFy.js";import{S as et,d as tt,a as rt}from"./VisibilityOff-D5-u3y0u.js";import{P as at,C as G,G as L}from"./PageHeader-CdP5B6Qy.js";import{B as N}from"./Button-Bcwcjqrt.js";import{C as V}from"./Link-Dp34e72e.js";import{T as A}from"./TextField-Btd7UbKs.js";import{L as ot}from"./LinearProgress-C8QvFQwb.js";import{A as nt}from"./Alert-CzmzDPlp.js";import{I as st}from"./InputAdornment-Bnl7vvhj.js";function it(t={}){const{autoHideDuration:r=null,disableWindowBlurListener:a=!1,onClose:o,open:d,resumeHideDuration:u}=t,l=Ve();b.useEffect(()=>{if(!d)return;function c(i){i.defaultPrevented||(i.key==="Escape"||i.key==="Esc")&&(o==null||o(i,"escapeKeyDown"))}return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[d,o]);const w=ge((c,i)=>{o==null||o(c,i)}),v=ge(c=>{!o||c==null||l.start(c,()=>{w(null,"timeout")})});b.useEffect(()=>(d&&v(r),l.clear),[d,r,v,l]);const y=c=>{o==null||o(c,"clickaway")},s=l.clear,h=b.useCallback(()=>{r!=null&&v(u??r*.5)},[r,u,v]),k=c=>i=>{const g=c.onBlur;g==null||g(i),h()},O=c=>i=>{const g=c.onFocus;g==null||g(i),s()},P=c=>i=>{const g=c.onMouseEnter;g==null||g(i),s()},T=c=>i=>{const g=c.onMouseLeave;g==null||g(i),h()};return b.useEffect(()=>{if(!a&&d)return window.addEventListener("focus",h),window.addEventListener("blur",s),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",s)}},[a,d,h,s]),{getRootProps:(c={})=>{const i=x({},xe(t),xe(c));return x({role:"presentation"},c,i,{onBlur:k(i),onFocus:O(i),onMouseEnter:P(i),onMouseLeave:T(i)})},onClickAway:y}}function lt(t){return Z("MuiSnackbarContent",t)}K("MuiSnackbarContent",["root","message","action"]);const ct=["action","className","message","role"],dt=t=>{const{classes:r}=t;return J({root:["root"],action:["action"],message:["message"]},lt,r)},ut=M(Fe,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,r)=>r.root})(({theme:t})=>{const r=t.palette.mode==="light"?.8:.98,a=qe(t.palette.background.default,r);return x({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(a),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:a,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),ht=M("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0"}),pt=M("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),vt=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSnackbarContent"}),{action:d,className:u,message:l,role:w="alert"}=o,v=F(o,ct),y=o,s=dt(y);return e.jsxs(ut,x({role:w,square:!0,elevation:6,className:Ce(s.root,u),ownerState:y,ref:a},v,{children:[e.jsx(ht,{className:s.message,ownerState:y,children:l}),d?e.jsx(pt,{className:s.action,ownerState:y,children:d}):null]}))});function gt(t){return Z("MuiSnackbar",t)}K("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const xt=["onEnter","onExited"],ft=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],mt=t=>{const{classes:r,anchorOrigin:a}=t,o={root:["root",`anchorOrigin${R(a.vertical)}${R(a.horizontal)}`]};return J(o,gt,r)},be=M("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,r[`anchorOrigin${R(a.anchorOrigin.vertical)}${R(a.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:r})=>{const a={left:"50%",right:"auto",transform:"translateX(-50%)"};return x({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},r.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},r.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},r.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:x({},r.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},r.anchorOrigin.horizontal==="center"&&a,r.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},r.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),bt=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSnackbar"}),d=Ge(),u={enter:d.transitions.duration.enteringScreen,exit:d.transitions.duration.leavingScreen},{action:l,anchorOrigin:{vertical:w,horizontal:v}={vertical:"bottom",horizontal:"left"},autoHideDuration:y=null,children:s,className:h,ClickAwayListenerProps:k,ContentProps:O,disableWindowBlurListener:P=!1,message:T,open:E,TransitionComponent:c=Ue,transitionDuration:i=u,TransitionProps:{onEnter:g,onExited:n}={}}=o,z=F(o.TransitionProps,xt),f=F(o,ft),H=x({},o,{anchorOrigin:{vertical:w,horizontal:v},autoHideDuration:y,disableWindowBlurListener:P,TransitionComponent:c,transitionDuration:i}),Le=mt(H),{getRootProps:Te,onClickAway:Ee}=it(x({},H)),[He,ve]=b.useState(!0),Ne=Ye({elementType:be,getSlotProps:Te,externalForwardedProps:f,ownerState:H,additionalProps:{ref:a},className:[Le.root,h]}),De=q=>{ve(!0),n&&n(q)},We=(q,Be)=>{ve(!1),g&&g(q,Be)};return!E&&He?null:e.jsx(Ze,x({onClickAway:Ee},k,{children:e.jsx(be,x({},Ne,{children:e.jsx(c,x({appear:!0,in:E,timeout:i,direction:w==="top"?"down":"up",onEnter:We,onExited:De},z,{children:s||e.jsx(vt,x({message:T,action:l},O))}))}))}))});function jt(t){return Z("MuiSwitch",t)}const m=K("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),wt=["className","color","edge","size","sx"],yt=t=>{const{classes:r,edge:a,size:o,color:d,checked:u,disabled:l}=t,w={root:["root",a&&`edge${R(a)}`,`size${R(o)}`],switchBase:["switchBase",`color${R(d)}`,u&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},v=J(w,jt,r);return x({},r,v)},St=M("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,a.edge&&r[`edge${R(a.edge)}`],r[`size${R(a.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${m.thumb}`]:{width:16,height:16},[`& .${m.switchBase}`]:{padding:4,[`&.${m.checked}`]:{transform:"translateX(16px)"}}}}]}),Ct=M(et,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.switchBase,{[`& .${m.input}`]:r.input},a.color!=="default"&&r[`color${R(a.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${m.checked}`]:{transform:"translateX(20px)"},[`&.${m.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${m.checked} + .${m.track}`]:{opacity:.5},[`&.${m.disabled} + .${m.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${m.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:fe(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{color:r},style:{[`&.${m.checked}`]:{color:(t.vars||t).palette[r].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:fe(t.palette[r].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${m.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r}DisabledColor`]:`${t.palette.mode==="light"?Ke(t.palette[r].main,.62):Xe(t.palette[r].main,.55)}`}},[`&.${m.checked} + .${m.track}`]:{backgroundColor:(t.vars||t).palette[r].main}}}))]})),kt=M("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,r)=>r.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),zt=M("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,r)=>r.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),W=b.forwardRef(function(r,a){const o=X({props:r,name:"MuiSwitch"}),{className:d,color:u="primary",edge:l=!1,size:w="medium",sx:v}=o,y=F(o,wt),s=x({},o,{color:u,edge:l,size:w}),h=yt(s),k=e.jsx(zt,{className:h.thumb,ownerState:s});return e.jsxs(St,{className:Ce(h.root,d),sx:v,ownerState:s,children:[e.jsx(Ct,x({type:"checkbox",icon:k,checkedIcon:k,ref:a,ownerState:s},y,{classes:x({},h,{root:h.switchBase})})),e.jsx(kt,{className:h.track,ownerState:s})]})});var Q={},$t=_;Object.defineProperty(Q,"__esModule",{value:!0});var ke=Q.default=void 0,_t=$t($()),Rt=e;ke=Q.default=(0,_t.default)((0,Rt.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3M6 6h9v4H6z"}),"SaveOutlined");var ee={},Mt=_;Object.defineProperty(ee,"__esModule",{value:!0});var te=ee.default=void 0,Ot=Mt($()),Pt=e;te=ee.default=(0,Ot.default)((0,Pt.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"TuneOutlined");var re={},It=_;Object.defineProperty(re,"__esModule",{value:!0});var ae=re.default=void 0,At=It($()),Lt=e;ae=re.default=(0,At.default)((0,Lt.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");var oe={},Tt=_;Object.defineProperty(oe,"__esModule",{value:!0});var ne=oe.default=void 0,Et=Tt($()),Ht=e;ne=oe.default=(0,Et.default)((0,Ht.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2M9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9zm9 14H6V10h12zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"LockOutlined");var se={},Nt=_;Object.defineProperty(se,"__esModule",{value:!0});var Y=se.default=void 0,Dt=Nt($()),Wt=e;Y=se.default=(0,Dt.default)((0,Wt.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83v-4.7l6-2.25 6 2.25z"}),"ShieldOutlined");var ie={},Bt=_;Object.defineProperty(ie,"__esModule",{value:!0});var ze=ie.default=void 0,Vt=Bt($()),Ft=e;ze=ie.default=(0,Vt.default)((0,Ft.jsx)("path",{d:"M18 11v2h4v-2zm-2 6.61c.96.71 2.21 1.65 3.2 2.39.4-.53.8-1.07 1.2-1.6-.99-.74-2.24-1.68-3.2-2.4-.4.54-.8 1.08-1.2 1.61M20.4 5.6c-.4-.53-.8-1.07-1.2-1.6-.99.74-2.24 1.68-3.2 2.4.4.53.8 1.07 1.2 1.6.96-.72 2.21-1.65 3.2-2.4M4 9c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2h1v4h2v-4h1l5 3V6L8 9zm5.03 1.71L11 9.53v4.94l-1.97-1.18-.48-.29H4v-2h4.55zM15.5 12c0-1.33-.58-2.53-1.5-3.35v6.69c.92-.81 1.5-2.01 1.5-3.34"}),"CampaignOutlined");var le={},qt=_;Object.defineProperty(le,"__esModule",{value:!0});var $e=le.default=void 0,Gt=qt($()),Ut=e;$e=le.default=(0,Gt.default)((0,Ut.jsx)("path",{d:"M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z"}),"BusinessOutlined");var ce={},Yt=_;Object.defineProperty(ce,"__esModule",{value:!0});var _e=ce.default=void 0,Zt=Yt($()),je=e;_e=ce.default=(0,Zt.default)([(0,je.jsx)("path",{d:"M23 11.99 20.56 9.2l.34-3.69-3.61-.82L15.4 1.5 12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 11.99l2.44 2.79-.34 3.7 3.61.82 1.89 3.2 3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-3.95 1.48-.56.65.08.85.18 1.95-1.9.43-.84.19-.44.74-.99 1.68-1.78-.77-.8-.34-.79.34-1.78.77-.99-1.67-.44-.74-.84-.19-1.9-.43.18-1.96.08-.85-.56-.65L3.67 12l1.29-1.48.56-.65-.09-.86-.18-1.94 1.9-.43.84-.19.44-.74.99-1.68 1.78.77.8.34.79-.34 1.78-.77.99 1.68.44.74.84.19 1.9.43-.18 1.95-.08.85.56.65 1.29 1.47z"},"0"),(0,je.jsx)("path",{d:"m10.09 13.75-2.32-2.33-1.48 1.49 3.8 3.81 7.34-7.36-1.48-1.49z"},"1")],"VerifiedOutlined");var de={},Kt=_;Object.defineProperty(de,"__esModule",{value:!0});var Re=de.default=void 0,Xt=Kt($()),Jt=e;Re=de.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM2.74 18c-.77 1.33.19 3 1.73 3h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0zM11 11v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1m0 5h2v2h-2z"}),"WarningAmberRounded");var ue={},Qt=_;Object.defineProperty(ue,"__esModule",{value:!0});var Me=ue.default=void 0,er=Qt($()),tr=e;Me=ue.default=(0,er.default)((0,tr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m-1-4h2v2h-2zm1.61-9.96c-2.06-.3-3.88.97-4.43 2.79-.18.58.26 1.17.87 1.17h.2c.41 0 .74-.29.88-.67.32-.89 1.27-1.5 2.3-1.28.95.2 1.65 1.13 1.57 2.1-.1 1.34-1.62 1.63-2.45 2.88 0 .01-.01.01-.01.02-.01.02-.02.03-.03.05-.09.15-.18.32-.25.5-.01.03-.03.05-.04.08-.01.02-.01.04-.02.07-.12.34-.2.75-.2 1.25h2c0-.42.11-.77.28-1.07.02-.03.03-.06.05-.09.08-.14.18-.27.28-.39.01-.01.02-.03.03-.04.1-.12.21-.23.33-.34.96-.91 2.26-1.65 1.99-3.56-.24-1.74-1.61-3.21-3.35-3.47"}),"HelpOutlineRounded");var he={},rr=_;Object.defineProperty(he,"__esModule",{value:!0});var Oe=he.default=void 0,ar=rr($()),or=e;Oe=he.default=(0,ar.default)((0,or.jsx)("path",{d:"m17 8-1.41 1.41L17.17 11H9v2h8.17l-1.58 1.58L17 16l4-4zM5 5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h7v-2H5z"}),"LogoutOutlined");var pe={},nr=_;Object.defineProperty(pe,"__esModule",{value:!0});var Pe=pe.default=void 0,sr=nr($()),ir=e;Pe=pe.default=(0,sr.default)((0,ir.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const Ie=["Asia/Kolkata (IST)","Asia/Dubai (GST)","UTC","America/New_York (EST)"],Ae=["English","हिन्दी (Hindi)","العربية (Arabic)"],we={orgName:"Doormile Logistics Pvt. Ltd.",supportEmail:"support@doormile.in",contact:"+91 63749 46729",timezone:Ie[0],language:Ae[0]},ye={newClient:!0,contractStatus:!0,teamAccess:!1,databaseSync:!0,emailAlerts:!0,smsAlerts:!1},Se={currentPassword:"",newPassword:"",confirmPassword:"",twoFactor:!1},lr=[{icon:te,label:"General",desc:"Organisation profile"},{icon:ae,label:"Notifications",desc:"Alerts & channels"},{icon:ne,label:"Security",desc:"Password & 2FA"}],cr=[{k:"newClient",t:"New client onboarded",d:"Notify when a new client is added to the system"},{k:"contractStatus",t:"Contract status",d:"When a client contract becomes active or expires"},{k:"teamAccess",t:"Team access",d:"When a new team member is granted or revoked access"},{k:"databaseSync",t:"Database sync",d:"Alerts for vector database synchronization events"}],dr=[{label:"Too weak",color:"error"},{label:"Weak",color:"error"},{label:"Fair",color:"warning"},{label:"Good",color:"info"},{label:"Strong",color:"success"}],ur=t=>{let r=0;return t.length>=8&&r++,/[a-z]/.test(t)&&/[A-Z]/.test(t)&&r++,/\d/.test(t)&&r++,/[^A-Za-z0-9]/.test(t)&&r++,r};function I({icon:t,title:r,subtitle:a,color:o="primary",danger:d=!1,children:u}){return e.jsxs(V,{sx:d?{borderColor:"error.light"}:void 0,children:[e.jsxs(p,{direction:"row",spacing:1.75,alignItems:"center",sx:{px:3,py:2.25,borderBottom:1,borderColor:"divider",background:l=>`linear-gradient(90deg, ${l.palette[o].lighter}66 0%, ${l.palette.background.paper} 72%)`},children:[e.jsx(j,{sx:{width:40,height:40,borderRadius:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${o}.lighter`,color:`${o}.main`},children:e.jsx(t,{fontSize:"small"})}),e.jsxs(j,{sx:{minWidth:0},children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.3},children:r}),a&&e.jsx(C,{variant:"caption",color:"text.secondary",children:a})]})]}),e.jsx(j,{sx:{px:3},children:u})]})}function S({label:t,description:r,children:a,align:o="center"}){return e.jsxs(L,{container:!0,spacing:2,alignItems:o,sx:{py:2.5,borderRadius:2,transition:"background-color .15s","&:hover":{bgcolor:"grey.50"}},children:[e.jsxs(L,{item:!0,xs:12,sm:5,children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:600,color:"grey.800"},children:t}),r&&e.jsx(C,{variant:"caption",color:"text.secondary",children:r})]}),e.jsx(L,{item:!0,xs:12,sm:7,children:a})]})}const B={display:"flex",justifyContent:{sm:"flex-end"}};function U({label:t,value:r,onChange:a,autoComplete:o}){const[d,u]=b.useState(!1);return e.jsx(A,{fullWidth:!0,size:"small",type:d?"text":"password",label:t,value:r,onChange:a,autoComplete:o,InputProps:{endAdornment:e.jsx(st,{position:"end",children:e.jsx(Qe,{onClick:()=>u(l=>!l),edge:"end",size:"small",children:d?e.jsx(tt,{fontSize:"small"}):e.jsx(rt,{fontSize:"small"})})})}})}function wr(){const[t,r]=b.useState(0),[a,o]=b.useState(!1),[d,u]=b.useState(!1),[l,w]=b.useState(we),[v,y]=b.useState(ye),[s,h]=b.useState(Se),k=n=>z=>{w(f=>({...f,[n]:z.target.value})),u(!0)},O=n=>z=>{y(f=>({...f,[n]:z.target.checked})),u(!0)},P=n=>z=>{h(f=>({...f,[n]:z.target.value})),u(!0)},T=()=>{o(!0),u(!1)},E=()=>{w(we),y(ye),h(Se),u(!1)},c=ur(s.newPassword),i=dr[c],g=s.confirmPassword&&s.newPassword!==s.confirmPassword;return e.jsxs(e.Fragment,{children:[e.jsx(at,{title:"Settings",breadcrumbs:[{label:"Settings"}],action:e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",children:[d&&e.jsx(G,{size:"small",label:"Unsaved changes",sx:{bgcolor:"warning.lighter",color:"warning.dark",fontWeight:600}}),e.jsx(N,{variant:"outlined",onClick:E,children:"Discard"}),e.jsx(N,{variant:"contained",startIcon:e.jsx(ke,{}),onClick:T,children:"Save Changes"})]})}),e.jsxs(L,{container:!0,spacing:2.5,children:[e.jsx(L,{item:!0,xs:12,md:3,children:e.jsxs(p,{spacing:2.5,sx:{position:{md:"sticky"},top:{md:88}},children:[e.jsxs(V,{sx:{p:1.5},children:[e.jsx(C,{variant:"overline",sx:{px:1,color:"text.secondary",fontWeight:700,letterSpacing:.6},children:"Preferences"}),e.jsx(p,{spacing:.25,sx:{mt:.5},children:lr.map((n,z)=>{const f=t===z,H=n.icon;return e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",onClick:()=>r(z),sx:{px:1.5,py:1.25,borderRadius:2,cursor:"pointer",position:"relative",bgcolor:f?"primary.lighter":"transparent",transition:"background-color .15s","&:hover":{bgcolor:f?"primary.lighter":"grey.50"},"&::before":f?{content:'""',position:"absolute",left:0,top:9,bottom:9,width:3,borderRadius:3,bgcolor:"primary.main"}:{}},children:[e.jsx(j,{sx:{width:34,height:34,borderRadius:1.5,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:f?"primary.main":"grey.100",color:f?"#fff":"grey.600"},children:e.jsx(H,{fontSize:"small"})}),e.jsxs(j,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:600,color:f?"primary.main":"grey.800"},children:n.label}),e.jsx(C,{variant:"caption",color:"text.secondary",children:n.desc})]}),e.jsx(Pe,{sx:{fontSize:18,color:f?"primary.main":"grey.300"}})]},n.label)})})]}),e.jsx(V,{sx:{p:2.5,bgcolor:"primary.lighter",borderColor:"primary.100"},children:e.jsxs(p,{spacing:1.25,children:[e.jsx(j,{sx:{width:38,height:38,borderRadius:2,bgcolor:"primary.main",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Me,{fontSize:"small"})}),e.jsxs(j,{children:[e.jsx(C,{variant:"subtitle2",sx:{fontWeight:700,color:"primary.dark"},children:"Need a hand?"}),e.jsx(C,{variant:"caption",sx:{color:"primary.dark",opacity:.85},children:"Our team is available 24/7 for operational support."})]}),e.jsx(N,{size:"small",variant:"contained",sx:{alignSelf:"flex-start"},children:"Contact support"})]})})]})}),e.jsxs(L,{item:!0,xs:12,md:9,children:[t===0&&e.jsxs(p,{spacing:2.5,children:[e.jsx(V,{sx:{overflow:"hidden"},children:e.jsxs(p,{direction:{xs:"column",sm:"row"},spacing:2.5,alignItems:{sm:"center"},sx:{p:3,background:n=>`linear-gradient(90deg, ${n.palette.primary.lighter}88 0%, ${n.palette.background.paper} 75%)`},children:[e.jsx(Je,{variant:"rounded",sx:{width:64,height:64,bgcolor:"primary.main",color:"#fff"},children:e.jsx($e,{})}),e.jsxs(j,{sx:{flexGrow:1,minWidth:0},children:[e.jsxs(p,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(C,{variant:"h5",sx:{fontWeight:700,color:"grey.800"},children:l.orgName}),e.jsx(G,{size:"small",icon:e.jsx(_e,{sx:{fontSize:15,ml:.5}}),label:"Verified",sx:{fontWeight:700,bgcolor:"success.lighter",color:"success.dark","& .MuiChip-icon":{color:"inherit"}}})]}),e.jsxs(C,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:[l.supportEmail," · ",l.contact]})]}),e.jsx(N,{variant:"outlined",size:"small",children:"Change logo"})]})}),e.jsx(I,{icon:te,title:"Organisation",subtitle:"Profile and regional preferences",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Organisation name",description:"Shown on invoices and exports",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.orgName,onChange:k("orgName")})}),e.jsx(S,{label:"Support email",description:"Where customer replies are routed",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.supportEmail,onChange:k("supportEmail")})}),e.jsx(S,{label:"Contact number",description:"Primary operations line",children:e.jsx(A,{fullWidth:!0,size:"small",value:l.contact,onChange:k("contact")})}),e.jsx(S,{label:"Timezone",description:"Used for schedules and reports",children:e.jsx(A,{select:!0,fullWidth:!0,size:"small",value:l.timezone,onChange:k("timezone"),children:Ie.map(n=>e.jsx(me,{value:n,children:n},n))})}),e.jsx(S,{label:"Language",description:"Console display language",children:e.jsx(A,{select:!0,fullWidth:!0,size:"small",value:l.language,onChange:k("language"),children:Ae.map(n=>e.jsx(me,{value:n,children:n},n))})})]})})]}),t===1&&e.jsxs(p,{spacing:2.5,children:[e.jsx(I,{icon:ae,title:"Notification Preferences",subtitle:"Choose what you get alerted about",color:"primary",children:e.jsx(p,{divider:e.jsx(D,{}),children:cr.map(n=>e.jsx(S,{label:n.t,description:n.d,children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v[n.k],onChange:O(n.k)})})},n.k))})}),e.jsx(I,{icon:ze,title:"Delivery Channels",subtitle:"How alerts reach your team",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Email alerts",description:"Send notifications to the support inbox",children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v.emailAlerts,onChange:O("emailAlerts")})})}),e.jsx(S,{label:"SMS alerts",description:"Send notifications to the registered mobile",children:e.jsx(j,{sx:B,children:e.jsx(W,{checked:v.smsAlerts,onChange:O("smsAlerts")})})})]})})]}),t===2&&e.jsxs(p,{spacing:2.5,children:[e.jsx(I,{icon:ne,title:"Change Password",subtitle:"Use 8+ characters with a mix of letters, numbers & symbols",color:"primary",children:e.jsxs(p,{divider:e.jsx(D,{}),children:[e.jsx(S,{label:"Current password",description:"Enter your existing password",align:"flex-start",children:e.jsx(U,{label:"Current password",value:s.currentPassword,onChange:P("currentPassword"),autoComplete:"current-password"})}),e.jsx(S,{label:"New password",description:"Choose a strong, unique password",align:"flex-start",children:e.jsxs(j,{children:[e.jsx(U,{label:"New password",value:s.newPassword,onChange:P("newPassword"),autoComplete:"new-password"}),s.newPassword&&e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",sx:{mt:1},children:[e.jsx(ot,{variant:"determinate",value:c/4*100,color:i.color,sx:{flexGrow:1,height:6,borderRadius:3}}),e.jsx(C,{variant:"caption",sx:{fontWeight:700,color:`${i.color}.main`,minWidth:56},children:i.label})]})]})}),e.jsx(S,{label:"Confirm new password",description:"Re-enter the new password",align:"flex-start",children:e.jsxs(j,{children:[e.jsx(U,{label:"Confirm new password",value:s.confirmPassword,onChange:P("confirmPassword"),autoComplete:"new-password"}),g&&e.jsx(C,{variant:"caption",color:"error.main",sx:{mt:.75,display:"block"},children:"Passwords do not match"})]})})]})}),e.jsx(I,{icon:Y,title:"Two-Factor Authentication",subtitle:"Add an extra layer of security to your account",color:"primary",children:e.jsx(S,{label:"Authenticator app",description:"Require a one-time code at sign-in for extra security",children:e.jsxs(p,{direction:"row",spacing:1.5,alignItems:"center",sx:{justifyContent:{sm:"flex-end"}},children:[e.jsx(G,{size:"small",icon:e.jsx(Y,{sx:{fontSize:15,ml:.5}}),label:s.twoFactor?"Enabled":"Disabled",sx:{fontWeight:700,bgcolor:s.twoFactor?"success.lighter":"grey.100",color:s.twoFactor?"success.dark":"grey.600","& .MuiChip-icon":{color:"inherit"}}}),e.jsx(W,{checked:s.twoFactor,onChange:n=>{h(z=>({...z,twoFactor:n.target.checked})),u(!0)}})]})})}),e.jsx(I,{icon:Re,title:"Danger Zone",subtitle:"Irreversible and high-impact actions",color:"error",danger:!0,children:e.jsx(S,{label:"Sign out of all sessions",description:"End every active session on all devices",children:e.jsx(j,{sx:B,children:e.jsx(N,{variant:"outlined",color:"error",startIcon:e.jsx(Oe,{}),onClick:()=>{localStorage.removeItem("auth_token"),window.location.href="/login"},children:"Sign out everywhere"})})})})]})]})]}),e.jsx(bt,{open:a,autoHideDuration:2500,onClose:()=>o(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(nt,{severity:"success",variant:"filled",onClose:()=>o(!1),sx:{width:"100%"},children:"Settings saved successfully."})})]})}export{wr as default}; diff --git a/dist/assets/StatusChip-C-P1gBCE.js b/dist/assets/StatusChip-VSepiSqW.js similarity index 97% rename from dist/assets/StatusChip-C-P1gBCE.js rename to dist/assets/StatusChip-VSepiSqW.js index a012a6f..0b5a56e 100644 --- a/dist/assets/StatusChip-C-P1gBCE.js +++ b/dist/assets/StatusChip-VSepiSqW.js @@ -1 +1 @@ -import{l as R,m as S,a as $,n as M,o as O,_ as C,j as e,p as z,v as E,w as k,r as d,i as u,B as f,S as v,T as p}from"./index-CkS0O37G.js";import{C as F}from"./Link-DsI7GZfd.js";import{C as I}from"./PageHeader-1FV595Go.js";function A(r){return R("MuiCardContent",r)}S("MuiCardContent",["root"]);const D=["className","component"],V=r=>{const{classes:a}=r;return E({root:["root"]},A,a)},H=k("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(r,a)=>a.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),P=$.forwardRef(function(a,t){const l=M({props:a,name:"MuiCardContent"}),{className:s,component:n="div"}=l,c=O(l,D),o=C({},l,{component:n}),i=V(o);return e.jsx(H,C({as:n,className:z(i.root,s),ownerState:o,ref:t},c))});var b={},L=u;Object.defineProperty(b,"__esModule",{value:!0});var U=b.default=void 0,q=L(d()),N=e;U=b.default=(0,q.default)((0,N.jsx)("path",{d:"M7.25 12.5 4.75 9H3.5v6h1.25v-3.5L7.3 15h1.2V9H7.25zM9.5 15h4v-1.25H11v-1.11h2.5v-1.26H11v-1.12h2.5V9h-4zm9.75-6v4.5h-1.12V9.99h-1.25v3.52h-1.13V9H14.5v5c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V9z"}),"FiberNewOutlined");var g={},B=u;Object.defineProperty(g,"__esModule",{value:!0});var T=g.default=void 0,W=B(d()),j=e;T=g.default=(0,W.default)([(0,j.jsx)("path",{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-1 18H5V9h14zm1-13H4V4h16z"},"0"),(0,j.jsx)("path",{d:"M9 12h6v2H9z"},"1")],"Inventory2Outlined");var x={},G=u;Object.defineProperty(x,"__esModule",{value:!0});var Y=x.default=void 0,J=G(d()),K=e;Y=x.default=(0,J.default)((0,K.jsx)("path",{d:"M12.22 19.85c-.18.18-.5.21-.71 0-.18-.18-.21-.5 0-.71l3.39-3.39-1.41-1.41-3.39 3.39c-.19.2-.51.19-.71 0-.21-.21-.18-.53 0-.71l3.39-3.39-1.41-1.41-3.39 3.39c-.18.18-.5.21-.71 0-.19-.19-.19-.51 0-.71l3.39-3.39-1.42-1.41-3.39 3.39c-.18.18-.5.21-.71 0-.19-.2-.19-.51 0-.71L9.52 8.4l1.87 1.86c.95.95 2.59.94 3.54 0 .98-.98.98-2.56 0-3.54l-1.86-1.86.28-.28c.78-.78 2.05-.78 2.83 0l4.24 4.24c.78.78.78 2.05 0 2.83zm9.61-6.78c1.56-1.56 1.56-4.09 0-5.66l-4.24-4.24c-1.56-1.56-4.09-1.56-5.66 0l-.28.28-.28-.28c-1.56-1.56-4.09-1.56-5.66 0L2.17 6.71C.75 8.13.62 10.34 1.77 11.9l1.45-1.45c-.39-.75-.26-1.7.37-2.33l3.54-3.54c.78-.78 2.05-.78 2.83 0l3.56 3.56c.18.18.21.5 0 .71-.21.21-.53.18-.71 0L9.52 5.57l-5.8 5.79c-.98.97-.98 2.56 0 3.54.39.39.89.63 1.42.7.07.52.3 1.02.7 1.42.4.4.9.63 1.42.7.07.52.3 1.02.7 1.42.4.4.9.63 1.42.7.07.54.31 1.03.7 1.42.47.47 1.1.73 1.77.73.67 0 1.3-.26 1.77-.73z"}),"HandshakeOutlined");var h={},Q=u;Object.defineProperty(h,"__esModule",{value:!0});var _=h.default=void 0,X=Q(d()),Z=e;_=h.default=(0,X.default)((0,Z.jsx)("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");var m={},ee=u;Object.defineProperty(m,"__esModule",{value:!0});var y=m.default=void 0,re=ee(d()),oe=e;y=m.default=(0,re.default)((0,oe.jsx)("path",{d:"M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1"}),"ArrowDownwardRounded");function se({title:r,value:a,icon:t,color:l="primary",trend:s,caption:n,accent:c=!1}){const o=typeof s=="number"?s>=0:null;return e.jsxs(F,{sx:{height:"100%",position:"relative",overflow:"hidden",borderRadius:3,boxShadow:"0 8px 24px rgba(0,0,0,0.03)",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{transform:"translateY(-4px)",boxShadow:"0 16px 32px rgba(0,0,0,0.06)"},background:i=>`linear-gradient(145deg, ${i.palette.background.paper} 0%, ${i.palette[l].lighter}15 100%)`},children:[t&&e.jsx(f,{sx:{position:"absolute",right:-15,bottom:-15,opacity:.04,transform:"rotate(-15deg)",pointerEvents:"none"},children:e.jsx(t,{sx:{fontSize:110}})}),e.jsxs(P,{sx:{p:2.5,"&:last-child":{pb:2.5},height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(v,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:1.5,position:"relative",zIndex:2},children:[e.jsx(p,{variant:"body2",sx:{fontWeight:600,color:"text.secondary"},children:r}),t&&e.jsx(f,{sx:{width:38,height:38,borderRadius:2,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${l}.lighter`,color:`${l}.main`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)"},children:e.jsx(t,{fontSize:"small"})})]}),e.jsx(f,{sx:{flexGrow:1,position:"relative",zIndex:2},children:e.jsx(p,{variant:"h4",sx:{fontWeight:800,color:"grey.900",letterSpacing:"-0.5px",lineHeight:1},children:a})}),(o!==null||n)&&e.jsxs(v,{direction:"row",spacing:1,alignItems:"center",sx:{mt:2,pt:1.5,borderTop:"1px dashed rgba(0,0,0,0.06)",position:"relative",zIndex:2},children:[o!==null&&e.jsxs(v,{direction:"row",spacing:.25,alignItems:"center",sx:{bgcolor:o?"success.lighter":"error.lighter",px:.75,py:.25,borderRadius:1},children:[o?e.jsx(_,{sx:{fontSize:14,color:"success.dark"}}):e.jsx(y,{sx:{fontSize:14,color:"error.dark"}}),e.jsxs(p,{variant:"caption",sx:{fontWeight:700,color:o?"success.dark":"error.dark"},children:[Math.abs(s),"%"]})]}),n&&e.jsx(p,{variant:"caption",sx:{color:"text.secondary",fontWeight:600},children:n})]})]})]})}const ae={pending:{color:"warning",label:"Pending"},created:{color:"info",label:"Created"},assigned:{color:"info",label:"Assigned"},accepted:{color:"info",label:"Accepted"},arrived:{color:"info",label:"Arrived"},picked:{color:"primary",label:"Picked"},"in-transit":{color:"info",label:"In Transit"},active:{color:"primary",label:"Active"},delivered:{color:"success",label:"Delivered"},completed:{color:"success",label:"Completed"},skipped:{color:"warning",label:"Skipped"},failed:{color:"error",label:"Failed"},cancelled:{color:"error",label:"Cancelled"},newclient:{color:"info",label:"New Client"},contacted:{color:"warning",label:"Contacted"},onboarded:{color:"success",label:"Onboarded"},lost:{color:"error",label:"Lost"},admin:{color:"primary",label:"Admin"},rep:{color:"info",label:"Rep"},manager:{color:"success",label:"Manager"},support:{color:"warning",label:"Support"},online:{color:"success",label:"Online"},offline:{color:"default",label:"Offline"},"on-delivery":{color:"info",label:"On Delivery"},inactive:{color:"default",label:"Inactive"},paid:{color:"success",label:"Paid"},open:{color:"info",label:"Open"},overdue:{color:"error",label:"Overdue"},prepaid:{color:"success",label:"Prepaid"},cod:{color:"warning",label:"COD"}},w={success:{bg:"#E3F6EC",fg:"#00773B"},warning:{bg:"#FFF7E0",fg:"#8A6500"},info:{bg:"#E0F7F8",fg:"#00727B"},error:{bg:"#FEEAE9",fg:"#A82216"},primary:{bg:"#F8E0E3",fg:"#9E0E20"},default:{bg:"#F0F0F0",fg:"#595959"}};function ie({status:r,size:a="small",label:t,sx:l}){const s=String(r||"").toLowerCase().replace(/\s+/g,"-"),n=String(r||"").replace(/[_-]+/g," ").replace(/\b\w/g,i=>i.toUpperCase()),c=ae[s]||{color:"default",label:n||r},o=w[c.color]||w.default;return e.jsx(I,{size:a,label:t||c.label,sx:{bgcolor:o.bg,color:o.fg,border:"none",...l}})}export{se as S,T as a,Y as b,ie as c,U as d}; +import{l as R,m as S,a as $,n as M,o as O,_ as C,j as e,p as z,v as E,w as k,r as d,i as u,B as f,S as v,T as p}from"./index-DdJWTZFy.js";import{C as F}from"./Link-Dp34e72e.js";import{C as I}from"./PageHeader-CdP5B6Qy.js";function A(r){return R("MuiCardContent",r)}S("MuiCardContent",["root"]);const D=["className","component"],V=r=>{const{classes:a}=r;return E({root:["root"]},A,a)},H=k("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(r,a)=>a.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),P=$.forwardRef(function(a,t){const l=M({props:a,name:"MuiCardContent"}),{className:s,component:n="div"}=l,c=O(l,D),o=C({},l,{component:n}),i=V(o);return e.jsx(H,C({as:n,className:z(i.root,s),ownerState:o,ref:t},c))});var b={},L=u;Object.defineProperty(b,"__esModule",{value:!0});var U=b.default=void 0,q=L(d()),N=e;U=b.default=(0,q.default)((0,N.jsx)("path",{d:"M7.25 12.5 4.75 9H3.5v6h1.25v-3.5L7.3 15h1.2V9H7.25zM9.5 15h4v-1.25H11v-1.11h2.5v-1.26H11v-1.12h2.5V9h-4zm9.75-6v4.5h-1.12V9.99h-1.25v3.52h-1.13V9H14.5v5c0 .55.45 1 1 1h4c.55 0 1-.45 1-1V9z"}),"FiberNewOutlined");var g={},B=u;Object.defineProperty(g,"__esModule",{value:!0});var T=g.default=void 0,W=B(d()),j=e;T=g.default=(0,W.default)([(0,j.jsx)("path",{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-1 18H5V9h14zm1-13H4V4h16z"},"0"),(0,j.jsx)("path",{d:"M9 12h6v2H9z"},"1")],"Inventory2Outlined");var x={},G=u;Object.defineProperty(x,"__esModule",{value:!0});var Y=x.default=void 0,J=G(d()),K=e;Y=x.default=(0,J.default)((0,K.jsx)("path",{d:"M12.22 19.85c-.18.18-.5.21-.71 0-.18-.18-.21-.5 0-.71l3.39-3.39-1.41-1.41-3.39 3.39c-.19.2-.51.19-.71 0-.21-.21-.18-.53 0-.71l3.39-3.39-1.41-1.41-3.39 3.39c-.18.18-.5.21-.71 0-.19-.19-.19-.51 0-.71l3.39-3.39-1.42-1.41-3.39 3.39c-.18.18-.5.21-.71 0-.19-.2-.19-.51 0-.71L9.52 8.4l1.87 1.86c.95.95 2.59.94 3.54 0 .98-.98.98-2.56 0-3.54l-1.86-1.86.28-.28c.78-.78 2.05-.78 2.83 0l4.24 4.24c.78.78.78 2.05 0 2.83zm9.61-6.78c1.56-1.56 1.56-4.09 0-5.66l-4.24-4.24c-1.56-1.56-4.09-1.56-5.66 0l-.28.28-.28-.28c-1.56-1.56-4.09-1.56-5.66 0L2.17 6.71C.75 8.13.62 10.34 1.77 11.9l1.45-1.45c-.39-.75-.26-1.7.37-2.33l3.54-3.54c.78-.78 2.05-.78 2.83 0l3.56 3.56c.18.18.21.5 0 .71-.21.21-.53.18-.71 0L9.52 5.57l-5.8 5.79c-.98.97-.98 2.56 0 3.54.39.39.89.63 1.42.7.07.52.3 1.02.7 1.42.4.4.9.63 1.42.7.07.52.3 1.02.7 1.42.4.4.9.63 1.42.7.07.54.31 1.03.7 1.42.47.47 1.1.73 1.77.73.67 0 1.3-.26 1.77-.73z"}),"HandshakeOutlined");var h={},Q=u;Object.defineProperty(h,"__esModule",{value:!0});var _=h.default=void 0,X=Q(d()),Z=e;_=h.default=(0,X.default)((0,Z.jsx)("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59a.9959.9959 0 0 0-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1"}),"ArrowUpwardRounded");var m={},ee=u;Object.defineProperty(m,"__esModule",{value:!0});var y=m.default=void 0,re=ee(d()),oe=e;y=m.default=(0,re.default)((0,oe.jsx)("path",{d:"M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1"}),"ArrowDownwardRounded");function se({title:r,value:a,icon:t,color:l="primary",trend:s,caption:n,accent:c=!1}){const o=typeof s=="number"?s>=0:null;return e.jsxs(F,{sx:{height:"100%",position:"relative",overflow:"hidden",borderRadius:3,boxShadow:"0 8px 24px rgba(0,0,0,0.03)",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)","&:hover":{transform:"translateY(-4px)",boxShadow:"0 16px 32px rgba(0,0,0,0.06)"},background:i=>`linear-gradient(145deg, ${i.palette.background.paper} 0%, ${i.palette[l].lighter}15 100%)`},children:[t&&e.jsx(f,{sx:{position:"absolute",right:-15,bottom:-15,opacity:.04,transform:"rotate(-15deg)",pointerEvents:"none"},children:e.jsx(t,{sx:{fontSize:110}})}),e.jsxs(P,{sx:{p:2.5,"&:last-child":{pb:2.5},height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(v,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:1.5,position:"relative",zIndex:2},children:[e.jsx(p,{variant:"body2",sx:{fontWeight:600,color:"text.secondary"},children:r}),t&&e.jsx(f,{sx:{width:38,height:38,borderRadius:2,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:`${l}.lighter`,color:`${l}.main`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)"},children:e.jsx(t,{fontSize:"small"})})]}),e.jsx(f,{sx:{flexGrow:1,position:"relative",zIndex:2},children:e.jsx(p,{variant:"h4",sx:{fontWeight:800,color:"grey.900",letterSpacing:"-0.5px",lineHeight:1},children:a})}),(o!==null||n)&&e.jsxs(v,{direction:"row",spacing:1,alignItems:"center",sx:{mt:2,pt:1.5,borderTop:"1px dashed rgba(0,0,0,0.06)",position:"relative",zIndex:2},children:[o!==null&&e.jsxs(v,{direction:"row",spacing:.25,alignItems:"center",sx:{bgcolor:o?"success.lighter":"error.lighter",px:.75,py:.25,borderRadius:1},children:[o?e.jsx(_,{sx:{fontSize:14,color:"success.dark"}}):e.jsx(y,{sx:{fontSize:14,color:"error.dark"}}),e.jsxs(p,{variant:"caption",sx:{fontWeight:700,color:o?"success.dark":"error.dark"},children:[Math.abs(s),"%"]})]}),n&&e.jsx(p,{variant:"caption",sx:{color:"text.secondary",fontWeight:600},children:n})]})]})]})}const ae={pending:{color:"warning",label:"Pending"},created:{color:"info",label:"Created"},assigned:{color:"info",label:"Assigned"},accepted:{color:"info",label:"Accepted"},arrived:{color:"info",label:"Arrived"},picked:{color:"primary",label:"Picked"},"in-transit":{color:"info",label:"In Transit"},active:{color:"primary",label:"Active"},delivered:{color:"success",label:"Delivered"},completed:{color:"success",label:"Completed"},skipped:{color:"warning",label:"Skipped"},failed:{color:"error",label:"Failed"},cancelled:{color:"error",label:"Cancelled"},newclient:{color:"info",label:"New Client"},contacted:{color:"warning",label:"Contacted"},onboarded:{color:"success",label:"Onboarded"},lost:{color:"error",label:"Lost"},admin:{color:"primary",label:"Admin"},rep:{color:"info",label:"Rep"},manager:{color:"success",label:"Manager"},support:{color:"warning",label:"Support"},online:{color:"success",label:"Online"},offline:{color:"default",label:"Offline"},"on-delivery":{color:"info",label:"On Delivery"},inactive:{color:"default",label:"Inactive"},paid:{color:"success",label:"Paid"},open:{color:"info",label:"Open"},overdue:{color:"error",label:"Overdue"},prepaid:{color:"success",label:"Prepaid"},cod:{color:"warning",label:"COD"}},w={success:{bg:"#E3F6EC",fg:"#00773B"},warning:{bg:"#FFF7E0",fg:"#8A6500"},info:{bg:"#E0F7F8",fg:"#00727B"},error:{bg:"#FEEAE9",fg:"#A82216"},primary:{bg:"#F8E0E3",fg:"#9E0E20"},default:{bg:"#F0F0F0",fg:"#595959"}};function ie({status:r,size:a="small",label:t,sx:l}){const s=String(r||"").toLowerCase().replace(/\s+/g,"-"),n=String(r||"").replace(/[_-]+/g," ").replace(/\b\w/g,i=>i.toUpperCase()),c=ae[s]||{color:"default",label:n||r},o=w[c.color]||w.default;return e.jsx(I,{size:a,label:t||c.label,sx:{bgcolor:o.bg,color:o.fg,border:"none",...l}})}export{se as S,T as a,Y as b,ie as c,U as d}; diff --git a/dist/assets/StorefrontOutlined-R0CC3Y_0.js b/dist/assets/StorefrontOutlined-DupKwNFq.js similarity index 96% rename from dist/assets/StorefrontOutlined-R0CC3Y_0.js rename to dist/assets/StorefrontOutlined-DupKwNFq.js index aa09b89..9bd1b6b 100644 --- a/dist/assets/StorefrontOutlined-R0CC3Y_0.js +++ b/dist/assets/StorefrontOutlined-DupKwNFq.js @@ -1 +1 @@ -import{r as e,j as r,i as a}from"./index-CkS0O37G.js";var t={},o=a;Object.defineProperty(t,"__esModule",{value:!0});var v=t.default=void 0,c=o(e()),i=r;v=t.default=(0,c.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var u={},f=a;Object.defineProperty(u,"__esModule",{value:!0});var n=u.default=void 0,s=f(e()),_=r;n=u.default=(0,s.default)((0,_.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");var d={},p=a;Object.defineProperty(d,"__esModule",{value:!0});var j=d.default=void 0,x=p(e()),$=r;j=d.default=(0,x.default)((0,$.jsx)("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14M12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2"}),"PlaceOutlined");var l={},m=a;Object.defineProperty(l,"__esModule",{value:!0});var M=l.default=void 0,R=m(e()),b=r;M=l.default=(0,R.default)((0,b.jsx)("path",{d:"m21.9 8.89-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89m-2.99-3.9 1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31zM8.49 9.52 9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41-.25-.29-.37-.68-.33-1.07m-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17M5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19z"}),"StorefrontOutlined");export{v as a,j as b,M as c,n as d}; +import{r as e,j as r,i as a}from"./index-DdJWTZFy.js";var t={},o=a;Object.defineProperty(t,"__esModule",{value:!0});var v=t.default=void 0,c=o(e()),i=r;v=t.default=(0,c.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var u={},f=a;Object.defineProperty(u,"__esModule",{value:!0});var n=u.default=void 0,s=f(e()),_=r;n=u.default=(0,s.default)((0,_.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");var d={},p=a;Object.defineProperty(d,"__esModule",{value:!0});var j=d.default=void 0,x=p(e()),$=r;j=d.default=(0,x.default)((0,$.jsx)("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14M12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2"}),"PlaceOutlined");var l={},m=a;Object.defineProperty(l,"__esModule",{value:!0});var M=l.default=void 0,R=m(e()),b=r;M=l.default=(0,R.default)((0,b.jsx)("path",{d:"m21.9 8.89-1.05-4.37c-.22-.9-1-1.52-1.91-1.52H5.05c-.9 0-1.69.63-1.9 1.52L2.1 8.89c-.24 1.02-.02 2.06.62 2.88.08.11.19.19.28.29V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6.94c.09-.09.2-.18.28-.28.64-.82.87-1.87.62-2.89m-2.99-3.9 1.05 4.37c.1.42.01.84-.25 1.17-.14.18-.44.47-.94.47-.61 0-1.14-.49-1.21-1.14L16.98 5zM13 5h1.96l.54 4.52c.05.39-.07.78-.33 1.07-.22.26-.54.41-.95.41-.67 0-1.22-.59-1.22-1.31zM8.49 9.52 9.04 5H11v4.69c0 .72-.55 1.31-1.29 1.31-.34 0-.65-.15-.89-.41-.25-.29-.37-.68-.33-1.07m-4.45-.16L5.05 5h1.97l-.58 4.86c-.08.65-.6 1.14-1.21 1.14-.49 0-.8-.29-.93-.47-.27-.32-.36-.75-.26-1.17M5 19v-6.03c.08.01.15.03.23.03.87 0 1.66-.36 2.24-.95.6.6 1.4.95 2.31.95.87 0 1.65-.36 2.23-.93.59.57 1.39.93 2.29.93.84 0 1.64-.35 2.24-.95.58.59 1.37.95 2.24.95.08 0 .15-.02.23-.03V19z"}),"StorefrontOutlined");export{v as a,j as b,M as c,n as d}; diff --git a/dist/assets/Survey-ndeaWZLt.js b/dist/assets/Survey-q3ahIjIS.js similarity index 96% rename from dist/assets/Survey-ndeaWZLt.js rename to dist/assets/Survey-q3ahIjIS.js index dda8cda..35e603e 100644 --- a/dist/assets/Survey-ndeaWZLt.js +++ b/dist/assets/Survey-q3ahIjIS.js @@ -1 +1 @@ -import{r as F,j as e,i as H,a as m,S as u,B as d,T as n,H as le,C as oe,I as w,K as V,L as ce}from"./index-CkS0O37G.js";import{d as de,D as xe,a as he,b as ue,c as pe,e as G,f as ge}from"./DeleteOutline-DHEVbt_6.js";import{d as me,a as je,b as D,c as fe}from"./StorefrontOutlined-R0CC3Y_0.js";import{T as ye,d as be}from"./PhoneOutlined-BlqLiA8g.js";import{d as ve}from"./LocalShippingOutlined-KXKsS6Ie.js";import{P as _e,G as c,C}from"./PageHeader-1FV595Go.js";import{E as Ce}from"./EmptyState-B_LUop-_.js";import{B as $}from"./Button-DK5g2WFv.js";import{C as Se}from"./Link-DsI7GZfd.js";import{T as h}from"./TextField-CWImxk_G.js";import{I as ke}from"./InputAdornment-Bwtqyiqg.js";import{T as $e,a as ze,b as Pe,c as z,d as l,e as We}from"./TableRow-CzSsRUSI.js";var L={},Re=H;Object.defineProperty(L,"__esModule",{value:!0});var A=L.default=void 0,Te=Re(F()),Ie=e;A=L.default=(0,Te.default)((0,Ie.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75M19 19H5V5h14z"}),"AssignmentOutlined");var M={},we=H;Object.defineProperty(M,"__esModule",{value:!0});var K=M.default=void 0,De=we(F()),Ee=e;K=M.default=(0,De.default)((0,Ee.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"TimelineOutlined");var N={},Be=H;Object.defineProperty(N,"__esModule",{value:!0});var X=N.default=void 0,Oe=Be(F()),Ae=e;X=N.default=(0,Oe.default)((0,Ae.jsx)("path",{d:"M22 8.98V18c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2l.01-12c0-1.1.89-2 1.99-2h10.1c-.06.32-.1.66-.1 1s.04.68.1 1H4l8 5 3.67-2.29c.47.43 1.02.76 1.63.98L12 13 4 8v10h16V9.9c.74-.15 1.42-.48 2-.92M16 5c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"MarkEmailUnreadOutlined");const P="https://api.doormile.com/api/v1",q=()=>{const r=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...r?{Authorization:`Bearer ${r}`}:{}}};async function J(r=1){const s=await fetch(`${P}/admin/competitor-branches?limit=200&page=${r}`,{headers:q()});if(!s.ok)throw new Error("Failed to fetch branches");return s.json()}async function Fe(r){const{id:s,created_at:j,updated_at:o,...f}=r,x=s?`${P}/admin/competitor-branches/${s}`:`${P}/admin/competitor-branches`,b=await fetch(x,{method:s?"PUT":"POST",headers:q(),body:JSON.stringify(f)});if(!b.ok)throw new Error("Failed to save branch");return b.json()}async function He(r){const s=await fetch(`${P}/admin/competitor-branches/${r}`,{method:"DELETE",headers:q()});if(!s.ok)throw new Error("Failed to delete branch");return s.json()}const Le={id:null,company:"",area:"",phone:"",rate_per_kg:"",offers_pickup:"",offers_drop:"",time_in_days:"",packing_charge:"",plus_code:"",address:""},Me={textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700,color:"grey.700"};function _({label:r,color:s="default"}){return r==null||r===""?e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:"grey.500"},children:"—"}):e.jsx(C,{size:"small",label:r,sx:{fontWeight:600,...s==="default"?{bgcolor:"grey.100",color:"grey.700"}:{bgcolor:`${s}.lighter`,color:`${s}.dark`}}})}function y({label:r,children:s}){return e.jsxs(d,{children:[e.jsx(n,{variant:"caption",color:"text.secondary",sx:Me,children:r}),e.jsx(d,{sx:{mt:.5},children:s})]})}function E({label:r,value:s}){return e.jsx(y,{label:r,children:e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:s?"grey.800":"grey.500",wordBreak:"break-word"},children:s||"—"})})}function B({icon:r,title:s,accent:j="primary",children:o}){return e.jsxs(d,{sx:{height:"100%",borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",overflow:"hidden",boxShadow:"0 2px 8px rgba(0,0,0,0.03)"},children:[e.jsxs(u,{direction:"row",spacing:1,alignItems:"center",sx:{px:2,py:1.5,borderBottom:1,borderColor:"divider",bgcolor:`${j}.lighter`,opacity:.999},children:[e.jsx(r,{sx:{fontSize:18,color:`${j}.main`}}),e.jsx(n,{variant:"overline",sx:{fontWeight:700,color:"grey.800",letterSpacing:.6,lineHeight:1},children:s})]}),e.jsx(u,{spacing:2,sx:{p:2},children:o})]})}function O({label:r,value:s,icon:j,color:o="primary"}){return e.jsx(d,{sx:{flex:1,p:2.5,borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 4px 20px rgba(0,0,0,0.03)"},children:e.jsxs(u,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(d,{sx:{width:48,height:48,borderRadius:2,bgcolor:`${o}.lighter`,color:`${o}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(j,{sx:{fontSize:24}})}),e.jsxs(d,{children:[e.jsx(n,{variant:"h4",sx:{fontWeight:800,color:"grey.800",lineHeight:1.1},children:s}),e.jsx(n,{variant:"body2",sx:{fontWeight:600,mt:.5},color:"text.secondary",children:r})]})]})})}function Ne({row:r,onEdit:s,onDelete:j}){const[o,f]=m.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs(z,{hover:!0,sx:{"& > *":{borderBottom:"unset"}},children:[e.jsx(l,{sx:{pl:1,width:48},children:e.jsx(w,{size:"small",onClick:()=>f(!o),sx:{color:"grey.500",bgcolor:o?"grey.100":"transparent","&:hover":{bgcolor:"grey.200"}},children:o?e.jsx(me,{}):e.jsx(je,{})})}),e.jsxs(l,{children:[e.jsx(n,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:r.area||"—"}),r.company&&e.jsx(n,{variant:"caption",color:"text.secondary",children:r.company})]}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(be,{sx:{fontSize:15,color:"grey.400"}}),e.jsx(n,{variant:"body2",children:r.phone||"—"})]})}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:.75,alignItems:"flex-start",children:[e.jsx(D,{sx:{fontSize:16,color:"grey.400",mt:.2}}),e.jsx(n,{variant:"body2",sx:{maxWidth:250,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.address||"—"})]})}),e.jsx(l,{children:e.jsx(n,{variant:"body2",sx:{fontWeight:600},children:r.rate_per_kg||"—"})}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:1,flexWrap:"wrap",children:[r.offers_pickup&&e.jsx(C,{size:"small",label:`Pickup: ${r.offers_pickup}`}),r.offers_drop&&e.jsx(C,{size:"small",label:`Drop: ${r.offers_drop}`}),r.time_in_days&&e.jsx(C,{size:"small",label:`Days: ${r.time_in_days}`}),r.packing_charge&&e.jsx(C,{size:"small",label:`Packing: ${r.packing_charge}`}),!r.offers_pickup&&!r.offers_drop&&!r.time_in_days&&!r.packing_charge&&e.jsx(n,{variant:"body2",color:"text.secondary",children:"—"})]})}),e.jsxs(l,{align:"right",children:[e.jsx(V,{title:"Edit",children:e.jsx(w,{size:"small",onClick:x=>{x.stopPropagation(),s(r)},children:e.jsx(G,{fontSize:"small"})})}),e.jsx(V,{title:"Delete",children:e.jsx(w,{size:"small",onClick:x=>{x.stopPropagation(),j(r)},children:e.jsx(ge,{fontSize:"small"})})})]})]}),e.jsx(z,{children:e.jsx(l,{colSpan:7,sx:{py:0,borderBottom:o?void 0:"none"},children:e.jsx(ce,{in:o,timeout:"auto",unmountOnExit:!0,children:e.jsxs(d,{sx:{m:2,borderRadius:2.5,border:1,borderColor:"divider",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},children:[e.jsxs(u,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{px:2.5,py:1.75,borderBottom:1,borderColor:"divider",background:x=>`linear-gradient(90deg, ${x.palette.primary.lighter}88 0%, ${x.palette.background.paper} 75%)`},children:[e.jsxs(u,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:"50%",bgcolor:"primary.main",color:"primary.contrastText",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:"1.2rem"},children:(r.company||r.area||"S")[0].toUpperCase()}),e.jsxs(d,{children:[e.jsx(n,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.2},children:r.company||"Survey Record"}),e.jsx(n,{variant:"caption",color:"text.secondary",children:r.area||"Unknown Area"})]})]}),e.jsx($,{size:"small",variant:"contained",startIcon:e.jsx(G,{}),onClick:()=>s(r),children:"Edit Survey"})]}),e.jsx(d,{sx:{p:2.5,bgcolor:"grey.50"},children:e.jsxs(c,{container:!0,spacing:2.5,alignItems:"stretch",children:[e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:fe,title:"Enquiry Details",accent:"primary",children:[e.jsx(y,{label:"Rate per kg",children:e.jsx(_,{label:r.rate_per_kg,color:r.rate_per_kg&&r.rate_per_kg!=="Not answered"?"success":"default"})}),e.jsx(y,{label:"Pickup",children:e.jsx(_,{label:r.offers_pickup,color:"info"})}),e.jsx(y,{label:"Drop",children:e.jsx(_,{label:r.offers_drop,color:"info"})}),e.jsx(y,{label:"Packing",children:e.jsx(_,{label:r.packing_charge,color:"info"})})]})}),e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:ve,title:"Logistics & Ops",accent:"primary",children:[e.jsx(y,{label:"Time in Days",children:e.jsx(_,{label:r.time_in_days,color:"primary"})}),e.jsx(E,{label:"Company",value:r.company}),e.jsx(E,{label:"Contact Number",value:r.phone})]})}),e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:D,title:"Location & Pincode",accent:"primary",children:[e.jsx(y,{label:"Area / Zone",children:e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:"grey.800"},children:r.area||"—"})}),e.jsx(E,{label:"Plus Code",value:r.plus_code}),e.jsx(y,{label:"Full Address",children:e.jsxs(u,{direction:"row",spacing:1,sx:{p:1.25,borderRadius:1.5,bgcolor:"grey.50",border:1,borderColor:"divider"},children:[e.jsx(D,{sx:{fontSize:16,color:"grey.400",mt:"2px"}}),e.jsx(n,{variant:"body2",sx:{color:"grey.800",lineHeight:1.5},children:r.address||"—"})]})})]})})]})})]})})})})]})}function tr(){const[r,s]=m.useState([]),[j,o]=m.useState(0),[f,x]=m.useState(!0),[b,Y]=m.useState(""),[W,R]=m.useState(0),[S,Z]=m.useState(5),[Q,v]=m.useState(!1),[a,T]=m.useState(null);m.useEffect(()=>{let t=!1;async function i(){x(!0);try{const g=await J(1),I=[...g.data||[]];if((g.total||0)>200){const ne=await J(2);I.push(...ne.data||[])}t||(s(I),o(g.total||I.length))}catch{t||s([])}finally{t||x(!1)}}return i(),()=>{t=!0}},[]);const k=r.filter(t=>{if(!b)return!0;const i=b.toLowerCase();return t.company&&t.company.toLowerCase().includes(i)||t.area&&t.area.toLowerCase().includes(i)||t.phone&&t.phone.includes(i)||t.address&&t.address.toLowerCase().includes(i)}),U=k.slice(W*S,W*S+S),ee=t=>{T({...t}),v(!0)},re=()=>{T({...Le}),v(!0)},te=async()=>{try{const t=await Fe(a);a.id?s(i=>i.map(g=>g.id===a.id?t:g)):(s(i=>[t,...i]),o(i=>i+1)),v(!1)}catch{alert("Failed to save. Please try again.")}},ae=async t=>{if(window.confirm("Delete this branch record?"))try{await He(t.id),s(i=>i.filter(g=>g.id!==t.id)),o(i=>i-1)}catch{alert("Failed to delete. Please try again.")}},p=t=>i=>T(g=>({...g,[t]:i.target.value})),se=new Set(r.map(t=>t.company).filter(Boolean)).size,ie=r.filter(t=>t.rate_per_kg&&t.rate_per_kg!=="Not answered"&&t.rate_per_kg!=="").length;return e.jsxs(e.Fragment,{children:[e.jsx(_e,{title:"Field Surveys",breadcrumbs:[{label:"Surveys"}],action:e.jsx($,{variant:"contained",startIcon:e.jsx(de,{}),onClick:re,sx:{borderRadius:2,px:3,boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},children:"New Survey"})}),e.jsxs(u,{direction:{xs:"column",md:"row"},spacing:2,sx:{mt:3,mb:1},children:[e.jsx(O,{label:"Total Surveys",value:f?"…":j,icon:A,color:"primary"}),e.jsx(O,{label:"Companies Surveyed",value:f?"…":se,icon:K,color:"success"}),e.jsx(O,{label:"With Rate Info",value:f?"…":ie,icon:X,color:"warning"})]}),e.jsxs(Se,{sx:{overflow:"hidden",mt:3,borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200"},children:[e.jsxs(d,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:t=>`linear-gradient(90deg, ${t.palette.primary.lighter}66 0%, ${t.palette.background.paper} 70%)`},children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(A,{fontSize:"small"})}),e.jsxs(d,{children:[e.jsx(n,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"Survey Records"}),e.jsx(n,{variant:"caption",color:"text.secondary",children:"Manage business enquiry and survey data from the field"})]})]}),e.jsxs(u,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(h,{size:"small",placeholder:"Search by company, area, phone, or address…",value:b,onChange:t=>{Y(t.target.value),R(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(ke,{position:"start",children:e.jsx(le,{fontSize:"small"})})}}),e.jsx(d,{sx:{flexGrow:1}}),e.jsxs(n,{variant:"body2",color:"text.secondary",children:[k.length," ",k.length===1?"record":"records"]})]}),f?e.jsx(d,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(oe,{size:36})}):e.jsxs(e.Fragment,{children:[e.jsx($e,{children:e.jsxs(ze,{sx:{minWidth:1e3},children:[e.jsx(Pe,{children:e.jsxs(z,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(l,{sx:{width:48}}),e.jsx(l,{children:"Area / Company"}),e.jsx(l,{children:"Contact"}),e.jsx(l,{children:"Location"}),e.jsx(l,{children:"Rate / Pricing"}),e.jsx(l,{children:"Logistics"}),e.jsx(l,{align:"right",children:"Actions"})]})}),e.jsx(We,{children:U.length===0?e.jsx(z,{children:e.jsx(l,{colSpan:7,sx:{border:"none"},children:e.jsx(Ce,{title:"No records found",caption:"Try a different search term or add a new survey."})})}):U.map(t=>e.jsx(Ne,{row:t,onEdit:ee,onDelete:ae},t.id))})]})}),e.jsx(ye,{component:"div",count:k.length,page:W,onPageChange:(t,i)=>R(i),rowsPerPage:S,onRowsPerPageChange:t=>{Z(+t.target.value),R(0)},rowsPerPageOptions:[5,10,25]})]})]}),e.jsxs(xe,{open:Q,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[e.jsx(he,{children:a!=null&&a.id?"Edit Survey":"New Survey"}),e.jsx(ue,{dividers:!0,children:e.jsxs(c,{container:!0,spacing:2,children:[e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Company",value:(a==null?void 0:a.company)||"",onChange:p("company")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Area",value:(a==null?void 0:a.area)||"",onChange:p("area")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Phone Number",value:(a==null?void 0:a.phone)||"",onChange:p("phone")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Rate per kg",value:(a==null?void 0:a.rate_per_kg)||"",onChange:p("rate_per_kg")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Pickup",value:(a==null?void 0:a.offers_pickup)||"",onChange:p("offers_pickup")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Drop",value:(a==null?void 0:a.offers_drop)||"",onChange:p("offers_drop")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Time in days",value:(a==null?void 0:a.time_in_days)||"",onChange:p("time_in_days")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Packing charge",value:(a==null?void 0:a.packing_charge)||"",onChange:p("packing_charge")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Plus code",value:(a==null?void 0:a.plus_code)||"",onChange:p("plus_code")})}),e.jsx(c,{item:!0,xs:12,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Address",value:(a==null?void 0:a.address)||"",onChange:p("address"),multiline:!0,minRows:2})})]})}),e.jsxs(pe,{sx:{p:2},children:[e.jsx($,{onClick:()=>v(!1),children:"Cancel"}),e.jsx($,{variant:"contained",onClick:te,children:"Save Survey"})]})]})]})}export{tr as default}; +import{r as F,j as e,i as H,a as m,S as u,B as d,T as n,H as le,C as oe,I as w,K as V,L as ce}from"./index-DdJWTZFy.js";import{d as de,D as xe,a as he,b as ue,c as pe,e as G,f as ge}from"./DeleteOutline-DetaO5yn.js";import{d as me,a as je,b as D,c as fe}from"./StorefrontOutlined-DupKwNFq.js";import{T as ye,d as be}from"./PhoneOutlined-CBkctqNs.js";import{d as ve}from"./LocalShippingOutlined-DRozEKne.js";import{P as _e,G as c,C}from"./PageHeader-CdP5B6Qy.js";import{E as Ce}from"./EmptyState-CQsHTCg9.js";import{B as $}from"./Button-Bcwcjqrt.js";import{C as Se}from"./Link-Dp34e72e.js";import{T as h}from"./TextField-Btd7UbKs.js";import{I as ke}from"./InputAdornment-Bnl7vvhj.js";import{T as $e,a as ze,b as Pe,c as z,d as l,e as We}from"./TableRow-CEoQ4SIZ.js";var L={},Re=H;Object.defineProperty(L,"__esModule",{value:!0});var A=L.default=void 0,Te=Re(F()),Ie=e;A=L.default=(0,Te.default)((0,Ie.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75M19 19H5V5h14z"}),"AssignmentOutlined");var M={},we=H;Object.defineProperty(M,"__esModule",{value:!0});var K=M.default=void 0,De=we(F()),Ee=e;K=M.default=(0,De.default)((0,Ee.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"TimelineOutlined");var N={},Be=H;Object.defineProperty(N,"__esModule",{value:!0});var X=N.default=void 0,Oe=Be(F()),Ae=e;X=N.default=(0,Oe.default)((0,Ae.jsx)("path",{d:"M22 8.98V18c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2l.01-12c0-1.1.89-2 1.99-2h10.1c-.06.32-.1.66-.1 1s.04.68.1 1H4l8 5 3.67-2.29c.47.43 1.02.76 1.63.98L12 13 4 8v10h16V9.9c.74-.15 1.42-.48 2-.92M16 5c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"MarkEmailUnreadOutlined");const P="https://api.doormile.com/api/v1",q=()=>{const r=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...r?{Authorization:`Bearer ${r}`}:{}}};async function J(r=1){const s=await fetch(`${P}/admin/competitor-branches?limit=200&page=${r}`,{headers:q()});if(!s.ok)throw new Error("Failed to fetch branches");return s.json()}async function Fe(r){const{id:s,created_at:j,updated_at:o,...f}=r,x=s?`${P}/admin/competitor-branches/${s}`:`${P}/admin/competitor-branches`,b=await fetch(x,{method:s?"PUT":"POST",headers:q(),body:JSON.stringify(f)});if(!b.ok)throw new Error("Failed to save branch");return b.json()}async function He(r){const s=await fetch(`${P}/admin/competitor-branches/${r}`,{method:"DELETE",headers:q()});if(!s.ok)throw new Error("Failed to delete branch");return s.json()}const Le={id:null,company:"",area:"",phone:"",rate_per_kg:"",offers_pickup:"",offers_drop:"",time_in_days:"",packing_charge:"",plus_code:"",address:""},Me={textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700,color:"grey.700"};function _({label:r,color:s="default"}){return r==null||r===""?e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:"grey.500"},children:"—"}):e.jsx(C,{size:"small",label:r,sx:{fontWeight:600,...s==="default"?{bgcolor:"grey.100",color:"grey.700"}:{bgcolor:`${s}.lighter`,color:`${s}.dark`}}})}function y({label:r,children:s}){return e.jsxs(d,{children:[e.jsx(n,{variant:"caption",color:"text.secondary",sx:Me,children:r}),e.jsx(d,{sx:{mt:.5},children:s})]})}function E({label:r,value:s}){return e.jsx(y,{label:r,children:e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:s?"grey.800":"grey.500",wordBreak:"break-word"},children:s||"—"})})}function B({icon:r,title:s,accent:j="primary",children:o}){return e.jsxs(d,{sx:{height:"100%",borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",overflow:"hidden",boxShadow:"0 2px 8px rgba(0,0,0,0.03)"},children:[e.jsxs(u,{direction:"row",spacing:1,alignItems:"center",sx:{px:2,py:1.5,borderBottom:1,borderColor:"divider",bgcolor:`${j}.lighter`,opacity:.999},children:[e.jsx(r,{sx:{fontSize:18,color:`${j}.main`}}),e.jsx(n,{variant:"overline",sx:{fontWeight:700,color:"grey.800",letterSpacing:.6,lineHeight:1},children:s})]}),e.jsx(u,{spacing:2,sx:{p:2},children:o})]})}function O({label:r,value:s,icon:j,color:o="primary"}){return e.jsx(d,{sx:{flex:1,p:2.5,borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 4px 20px rgba(0,0,0,0.03)"},children:e.jsxs(u,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(d,{sx:{width:48,height:48,borderRadius:2,bgcolor:`${o}.lighter`,color:`${o}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(j,{sx:{fontSize:24}})}),e.jsxs(d,{children:[e.jsx(n,{variant:"h4",sx:{fontWeight:800,color:"grey.800",lineHeight:1.1},children:s}),e.jsx(n,{variant:"body2",sx:{fontWeight:600,mt:.5},color:"text.secondary",children:r})]})]})})}function Ne({row:r,onEdit:s,onDelete:j}){const[o,f]=m.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs(z,{hover:!0,sx:{"& > *":{borderBottom:"unset"}},children:[e.jsx(l,{sx:{pl:1,width:48},children:e.jsx(w,{size:"small",onClick:()=>f(!o),sx:{color:"grey.500",bgcolor:o?"grey.100":"transparent","&:hover":{bgcolor:"grey.200"}},children:o?e.jsx(me,{}):e.jsx(je,{})})}),e.jsxs(l,{children:[e.jsx(n,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:r.area||"—"}),r.company&&e.jsx(n,{variant:"caption",color:"text.secondary",children:r.company})]}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(be,{sx:{fontSize:15,color:"grey.400"}}),e.jsx(n,{variant:"body2",children:r.phone||"—"})]})}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:.75,alignItems:"flex-start",children:[e.jsx(D,{sx:{fontSize:16,color:"grey.400",mt:.2}}),e.jsx(n,{variant:"body2",sx:{maxWidth:250,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.address||"—"})]})}),e.jsx(l,{children:e.jsx(n,{variant:"body2",sx:{fontWeight:600},children:r.rate_per_kg||"—"})}),e.jsx(l,{children:e.jsxs(u,{direction:"row",spacing:1,flexWrap:"wrap",children:[r.offers_pickup&&e.jsx(C,{size:"small",label:`Pickup: ${r.offers_pickup}`}),r.offers_drop&&e.jsx(C,{size:"small",label:`Drop: ${r.offers_drop}`}),r.time_in_days&&e.jsx(C,{size:"small",label:`Days: ${r.time_in_days}`}),r.packing_charge&&e.jsx(C,{size:"small",label:`Packing: ${r.packing_charge}`}),!r.offers_pickup&&!r.offers_drop&&!r.time_in_days&&!r.packing_charge&&e.jsx(n,{variant:"body2",color:"text.secondary",children:"—"})]})}),e.jsxs(l,{align:"right",children:[e.jsx(V,{title:"Edit",children:e.jsx(w,{size:"small",onClick:x=>{x.stopPropagation(),s(r)},children:e.jsx(G,{fontSize:"small"})})}),e.jsx(V,{title:"Delete",children:e.jsx(w,{size:"small",onClick:x=>{x.stopPropagation(),j(r)},children:e.jsx(ge,{fontSize:"small"})})})]})]}),e.jsx(z,{children:e.jsx(l,{colSpan:7,sx:{py:0,borderBottom:o?void 0:"none"},children:e.jsx(ce,{in:o,timeout:"auto",unmountOnExit:!0,children:e.jsxs(d,{sx:{m:2,borderRadius:2.5,border:1,borderColor:"divider",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},children:[e.jsxs(u,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{px:2.5,py:1.75,borderBottom:1,borderColor:"divider",background:x=>`linear-gradient(90deg, ${x.palette.primary.lighter}88 0%, ${x.palette.background.paper} 75%)`},children:[e.jsxs(u,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:"50%",bgcolor:"primary.main",color:"primary.contrastText",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:"1.2rem"},children:(r.company||r.area||"S")[0].toUpperCase()}),e.jsxs(d,{children:[e.jsx(n,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.2},children:r.company||"Survey Record"}),e.jsx(n,{variant:"caption",color:"text.secondary",children:r.area||"Unknown Area"})]})]}),e.jsx($,{size:"small",variant:"contained",startIcon:e.jsx(G,{}),onClick:()=>s(r),children:"Edit Survey"})]}),e.jsx(d,{sx:{p:2.5,bgcolor:"grey.50"},children:e.jsxs(c,{container:!0,spacing:2.5,alignItems:"stretch",children:[e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:fe,title:"Enquiry Details",accent:"primary",children:[e.jsx(y,{label:"Rate per kg",children:e.jsx(_,{label:r.rate_per_kg,color:r.rate_per_kg&&r.rate_per_kg!=="Not answered"?"success":"default"})}),e.jsx(y,{label:"Pickup",children:e.jsx(_,{label:r.offers_pickup,color:"info"})}),e.jsx(y,{label:"Drop",children:e.jsx(_,{label:r.offers_drop,color:"info"})}),e.jsx(y,{label:"Packing",children:e.jsx(_,{label:r.packing_charge,color:"info"})})]})}),e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:ve,title:"Logistics & Ops",accent:"primary",children:[e.jsx(y,{label:"Time in Days",children:e.jsx(_,{label:r.time_in_days,color:"primary"})}),e.jsx(E,{label:"Company",value:r.company}),e.jsx(E,{label:"Contact Number",value:r.phone})]})}),e.jsx(c,{item:!0,xs:12,md:4,children:e.jsxs(B,{icon:D,title:"Location & Pincode",accent:"primary",children:[e.jsx(y,{label:"Area / Zone",children:e.jsx(n,{variant:"body2",sx:{fontWeight:500,color:"grey.800"},children:r.area||"—"})}),e.jsx(E,{label:"Plus Code",value:r.plus_code}),e.jsx(y,{label:"Full Address",children:e.jsxs(u,{direction:"row",spacing:1,sx:{p:1.25,borderRadius:1.5,bgcolor:"grey.50",border:1,borderColor:"divider"},children:[e.jsx(D,{sx:{fontSize:16,color:"grey.400",mt:"2px"}}),e.jsx(n,{variant:"body2",sx:{color:"grey.800",lineHeight:1.5},children:r.address||"—"})]})})]})})]})})]})})})})]})}function tr(){const[r,s]=m.useState([]),[j,o]=m.useState(0),[f,x]=m.useState(!0),[b,Y]=m.useState(""),[W,R]=m.useState(0),[S,Z]=m.useState(5),[Q,v]=m.useState(!1),[a,T]=m.useState(null);m.useEffect(()=>{let t=!1;async function i(){x(!0);try{const g=await J(1),I=[...g.data||[]];if((g.total||0)>200){const ne=await J(2);I.push(...ne.data||[])}t||(s(I),o(g.total||I.length))}catch{t||s([])}finally{t||x(!1)}}return i(),()=>{t=!0}},[]);const k=r.filter(t=>{if(!b)return!0;const i=b.toLowerCase();return t.company&&t.company.toLowerCase().includes(i)||t.area&&t.area.toLowerCase().includes(i)||t.phone&&t.phone.includes(i)||t.address&&t.address.toLowerCase().includes(i)}),U=k.slice(W*S,W*S+S),ee=t=>{T({...t}),v(!0)},re=()=>{T({...Le}),v(!0)},te=async()=>{try{const t=await Fe(a);a.id?s(i=>i.map(g=>g.id===a.id?t:g)):(s(i=>[t,...i]),o(i=>i+1)),v(!1)}catch{alert("Failed to save. Please try again.")}},ae=async t=>{if(window.confirm("Delete this branch record?"))try{await He(t.id),s(i=>i.filter(g=>g.id!==t.id)),o(i=>i-1)}catch{alert("Failed to delete. Please try again.")}},p=t=>i=>T(g=>({...g,[t]:i.target.value})),se=new Set(r.map(t=>t.company).filter(Boolean)).size,ie=r.filter(t=>t.rate_per_kg&&t.rate_per_kg!=="Not answered"&&t.rate_per_kg!=="").length;return e.jsxs(e.Fragment,{children:[e.jsx(_e,{title:"Field Surveys",breadcrumbs:[{label:"Surveys"}],action:e.jsx($,{variant:"contained",startIcon:e.jsx(de,{}),onClick:re,sx:{borderRadius:2,px:3,boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},children:"New Survey"})}),e.jsxs(u,{direction:{xs:"column",md:"row"},spacing:2,sx:{mt:3,mb:1},children:[e.jsx(O,{label:"Total Surveys",value:f?"…":j,icon:A,color:"primary"}),e.jsx(O,{label:"Companies Surveyed",value:f?"…":se,icon:K,color:"success"}),e.jsx(O,{label:"With Rate Info",value:f?"…":ie,icon:X,color:"warning"})]}),e.jsxs(Se,{sx:{overflow:"hidden",mt:3,borderRadius:2.5,boxShadow:"0 8px 24px rgba(0,0,0,0.04)",border:1,borderColor:"grey.200"},children:[e.jsxs(d,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:t=>`linear-gradient(90deg, ${t.palette.primary.lighter}66 0%, ${t.palette.background.paper} 70%)`},children:[e.jsx(d,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(A,{fontSize:"small"})}),e.jsxs(d,{children:[e.jsx(n,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"Survey Records"}),e.jsx(n,{variant:"caption",color:"text.secondary",children:"Manage business enquiry and survey data from the field"})]})]}),e.jsxs(u,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(h,{size:"small",placeholder:"Search by company, area, phone, or address…",value:b,onChange:t=>{Y(t.target.value),R(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(ke,{position:"start",children:e.jsx(le,{fontSize:"small"})})}}),e.jsx(d,{sx:{flexGrow:1}}),e.jsxs(n,{variant:"body2",color:"text.secondary",children:[k.length," ",k.length===1?"record":"records"]})]}),f?e.jsx(d,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(oe,{size:36})}):e.jsxs(e.Fragment,{children:[e.jsx($e,{children:e.jsxs(ze,{sx:{minWidth:1e3},children:[e.jsx(Pe,{children:e.jsxs(z,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(l,{sx:{width:48}}),e.jsx(l,{children:"Area / Company"}),e.jsx(l,{children:"Contact"}),e.jsx(l,{children:"Location"}),e.jsx(l,{children:"Rate / Pricing"}),e.jsx(l,{children:"Logistics"}),e.jsx(l,{align:"right",children:"Actions"})]})}),e.jsx(We,{children:U.length===0?e.jsx(z,{children:e.jsx(l,{colSpan:7,sx:{border:"none"},children:e.jsx(Ce,{title:"No records found",caption:"Try a different search term or add a new survey."})})}):U.map(t=>e.jsx(Ne,{row:t,onEdit:ee,onDelete:ae},t.id))})]})}),e.jsx(ye,{component:"div",count:k.length,page:W,onPageChange:(t,i)=>R(i),rowsPerPage:S,onRowsPerPageChange:t=>{Z(+t.target.value),R(0)},rowsPerPageOptions:[5,10,25]})]})]}),e.jsxs(xe,{open:Q,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[e.jsx(he,{children:a!=null&&a.id?"Edit Survey":"New Survey"}),e.jsx(ue,{dividers:!0,children:e.jsxs(c,{container:!0,spacing:2,children:[e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Company",value:(a==null?void 0:a.company)||"",onChange:p("company")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Area",value:(a==null?void 0:a.area)||"",onChange:p("area")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Phone Number",value:(a==null?void 0:a.phone)||"",onChange:p("phone")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Rate per kg",value:(a==null?void 0:a.rate_per_kg)||"",onChange:p("rate_per_kg")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Pickup",value:(a==null?void 0:a.offers_pickup)||"",onChange:p("offers_pickup")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Drop",value:(a==null?void 0:a.offers_drop)||"",onChange:p("offers_drop")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Time in days",value:(a==null?void 0:a.time_in_days)||"",onChange:p("time_in_days")})}),e.jsx(c,{item:!0,xs:12,sm:3,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Packing charge",value:(a==null?void 0:a.packing_charge)||"",onChange:p("packing_charge")})}),e.jsx(c,{item:!0,xs:12,sm:6,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Plus code",value:(a==null?void 0:a.plus_code)||"",onChange:p("plus_code")})}),e.jsx(c,{item:!0,xs:12,children:e.jsx(h,{fullWidth:!0,size:"small",label:"Address",value:(a==null?void 0:a.address)||"",onChange:p("address"),multiline:!0,minRows:2})})]})}),e.jsxs(pe,{sx:{p:2},children:[e.jsx($,{onClick:()=>v(!1),children:"Cancel"}),e.jsx($,{variant:"contained",onClick:te,children:"Save Survey"})]})]})]})}export{tr as default}; diff --git a/dist/assets/TableRow-CzSsRUSI.js b/dist/assets/TableRow-CEoQ4SIZ.js similarity index 99% rename from dist/assets/TableRow-CzSsRUSI.js rename to dist/assets/TableRow-CEoQ4SIZ.js index d614838..3a8dd45 100644 --- a/dist/assets/TableRow-CzSsRUSI.js +++ b/dist/assets/TableRow-CEoQ4SIZ.js @@ -1,2 +1,2 @@ -import{a as d,l as y,m as f,n as C,o as T,_ as i,j as u,p as x,v as m,w as R,q as v,aa as E,A as k,ab as L}from"./index-CkS0O37G.js";const S=d.createContext();function q(e){return y("MuiTable",e)}f("MuiTable",["root","stickyHeader"]);const I=["className","component","padding","size","stickyHeader"],J=e=>{const{classes:o,stickyHeader:t}=e;return m({root:["root",t&&"stickyHeader"]},q,o)},X=R("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.stickyHeader&&o.stickyHeader]}})(({theme:e,ownerState:o})=>i({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":i({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},o.stickyHeader&&{borderCollapse:"separate"})),P="table",fe=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTable"}),{className:r,component:s=P,padding:l="normal",size:n="medium",stickyHeader:c=!1}=a,b=T(a,I),p=i({},a,{component:s,padding:l,size:n,stickyHeader:c}),h=J(p),N=d.useMemo(()=>({padding:l,size:n,stickyHeader:c}),[l,n,c]);return u.jsx(S.Provider,{value:N,children:u.jsx(X,i({as:s,role:s===P?null:"table",ref:t,className:x(h.root,r),ownerState:p},b))})}),w=d.createContext();function F(e){return y("MuiTableBody",e)}f("MuiTableBody",["root"]);const G=["className","component"],K=e=>{const{classes:o}=e;return m({root:["root"]},F,o)},Q=R("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"table-row-group"}),V={variant:"body"},A="tbody",Ce=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableBody"}),{className:r,component:s=A}=a,l=T(a,G),n=i({},a,{component:s}),c=K(n);return u.jsx(w.Provider,{value:V,children:u.jsx(Q,i({className:x(c.root,r),as:s,ref:t,role:s===A?null:"rowgroup",ownerState:n},l))})});function Y(e){return y("MuiTableCell",e)}const Z=f("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ee=["align","className","component","padding","scope","size","sortDirection","variant"],oe=e=>{const{classes:o,variant:t,align:a,padding:r,size:s,stickyHeader:l}=e,n={root:["root",t,l&&"stickyHeader",a!=="inherit"&&`align${v(a)}`,r!=="normal"&&`padding${v(r)}`,`size${v(s)}`]};return m(n,Y,o)},te=R("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`size${v(t.size)}`],t.padding!=="normal"&&o[`padding${v(t.padding)}`],t.align!=="inherit"&&o[`align${v(t.align)}`],t.stickyHeader&&o.stickyHeader]}})(({theme:e,ownerState:o})=>i({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid +import{a as d,l as y,m as f,n as C,o as T,_ as i,j as u,p as x,v as m,w as R,q as v,aa as E,A as k,ab as L}from"./index-DdJWTZFy.js";const S=d.createContext();function q(e){return y("MuiTable",e)}f("MuiTable",["root","stickyHeader"]);const I=["className","component","padding","size","stickyHeader"],J=e=>{const{classes:o,stickyHeader:t}=e;return m({root:["root",t&&"stickyHeader"]},q,o)},X=R("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.stickyHeader&&o.stickyHeader]}})(({theme:e,ownerState:o})=>i({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":i({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},o.stickyHeader&&{borderCollapse:"separate"})),P="table",fe=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTable"}),{className:r,component:s=P,padding:l="normal",size:n="medium",stickyHeader:c=!1}=a,b=T(a,I),p=i({},a,{component:s,padding:l,size:n,stickyHeader:c}),h=J(p),N=d.useMemo(()=>({padding:l,size:n,stickyHeader:c}),[l,n,c]);return u.jsx(S.Provider,{value:N,children:u.jsx(X,i({as:s,role:s===P?null:"table",ref:t,className:x(h.root,r),ownerState:p},b))})}),w=d.createContext();function F(e){return y("MuiTableBody",e)}f("MuiTableBody",["root"]);const G=["className","component"],K=e=>{const{classes:o}=e;return m({root:["root"]},F,o)},Q=R("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"table-row-group"}),V={variant:"body"},A="tbody",Ce=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableBody"}),{className:r,component:s=A}=a,l=T(a,G),n=i({},a,{component:s}),c=K(n);return u.jsx(w.Provider,{value:V,children:u.jsx(Q,i({className:x(c.root,r),as:s,ref:t,role:s===A?null:"rowgroup",ownerState:n},l))})});function Y(e){return y("MuiTableCell",e)}const Z=f("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ee=["align","className","component","padding","scope","size","sortDirection","variant"],oe=e=>{const{classes:o,variant:t,align:a,padding:r,size:s,stickyHeader:l}=e,n={root:["root",t,l&&"stickyHeader",a!=="inherit"&&`align${v(a)}`,r!=="normal"&&`padding${v(r)}`,`size${v(s)}`]};return m(n,Y,o)},te=R("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o[`size${v(t.size)}`],t.padding!=="normal"&&o[`padding${v(t.padding)}`],t.align!=="inherit"&&o[`align${v(t.align)}`],t.stickyHeader&&o.stickyHeader]}})(({theme:e,ownerState:o})=>i({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid ${e.palette.mode==="light"?E(k(e.palette.divider,1),.88):L(k(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},o.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},o.variant==="body"&&{color:(e.vars||e).palette.text.primary},o.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},o.size==="small"&&{padding:"6px 16px",[`&.${Z.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},o.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},o.padding==="none"&&{padding:0},o.align==="left"&&{textAlign:"left"},o.align==="center"&&{textAlign:"center"},o.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},o.align==="justify"&&{textAlign:"justify"},o.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),Te=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableCell"}),{align:r="inherit",className:s,component:l,padding:n,scope:c,size:b,sortDirection:p,variant:h}=a,N=T(a,ee),g=d.useContext(S),H=d.useContext(w),z=H&&H.variant==="head";let $;l?$=l:$=z?"th":"td";let M=c;$==="td"?M=void 0:!M&&z&&(M="col");const j=h||H&&H.variant,U=i({},a,{align:r,component:$,padding:n||(g&&g.padding?g.padding:"normal"),size:b||(g&&g.size?g.size:"medium"),sortDirection:p,stickyHeader:j==="head"&&g&&g.stickyHeader,variant:j}),W=oe(U);let _=null;return p&&(_=p==="asc"?"ascending":"descending"),u.jsx(te,i({as:$,ref:t,className:x(W.root,s),"aria-sort":_,scope:M,ownerState:U},N))});function ae(e){return y("MuiTableContainer",e)}f("MuiTableContainer",["root"]);const se=["className","component"],ne=e=>{const{classes:o}=e;return m({root:["root"]},ae,o)},le=R("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,o)=>o.root})({width:"100%",overflowX:"auto"}),xe=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableContainer"}),{className:r,component:s="div"}=a,l=T(a,se),n=i({},a,{component:s}),c=ne(n);return u.jsx(le,i({ref:t,as:s,className:x(c.root,r),ownerState:n},l))});function re(e){return y("MuiTableHead",e)}f("MuiTableHead",["root"]);const ie=["className","component"],ce=e=>{const{classes:o}=e;return m({root:["root"]},re,o)},de=R("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"table-header-group"}),pe={variant:"head"},B="thead",me=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableHead"}),{className:r,component:s=B}=a,l=T(a,ie),n=i({},a,{component:s}),c=ce(n);return u.jsx(w.Provider,{value:pe,children:u.jsx(de,i({as:s,className:x(c.root,r),ref:t,role:s===B?null:"rowgroup",ownerState:n},l))})});function ue(e){return y("MuiTableRow",e)}const O=f("MuiTableRow",["root","selected","hover","head","footer"]),be=["className","component","hover","selected"],ge=e=>{const{classes:o,selected:t,hover:a,head:r,footer:s}=e;return m({root:["root",t&&"selected",a&&"hover",r&&"head",s&&"footer"]},ue,o)},ve=R("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.head&&o.head,t.footer&&o.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${O.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${O.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:k(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:k(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),D="tr",Re=d.forwardRef(function(o,t){const a=C({props:o,name:"MuiTableRow"}),{className:r,component:s=D,hover:l=!1,selected:n=!1}=a,c=T(a,be),b=d.useContext(w),p=i({},a,{component:s,hover:l,selected:n,head:b&&b.variant==="head",footer:b&&b.variant==="footer"}),h=ge(p);return u.jsx(ve,i({as:s,ref:t,className:x(h.root,r),role:s===D?null:"row",ownerState:p},c))});export{xe as T,fe as a,me as b,Re as c,Te as d,Ce as e}; diff --git a/dist/assets/TeamUsers-Cu1_QgRb.js b/dist/assets/TeamUsers-BvR0WI-e.js similarity index 94% rename from dist/assets/TeamUsers-Cu1_QgRb.js rename to dist/assets/TeamUsers-BvR0WI-e.js index eb83599..08172aa 100644 --- a/dist/assets/TeamUsers-Cu1_QgRb.js +++ b/dist/assets/TeamUsers-BvR0WI-e.js @@ -1 +1 @@ -import{r as $,j as e,i as T,a,I as L,M as pe,C as W,O as fe,Q as je,t as X,S as O,B as p,b as ge,T as j,H as ve,K,c as be,g as ye,R as Se,U as Ce}from"./index-CkS0O37G.js";import{D as Z,a as ee,b as se,c as re,d as _e,e as $e,f as Te}from"./DeleteOutline-DHEVbt_6.js";import{d as ze}from"./Refresh-Z6LWMmna.js";import{d as Me,T as Pe}from"./PhoneOutlined-BlqLiA8g.js";import{d as Ie,T as Re,a as we,b as ke,D as De,c as Ee}from"./Close-DaYHvsp_.js";import{G as b,P as Oe,C as te}from"./PageHeader-1FV595Go.js";import{E as Ae}from"./EmptyState-B_LUop-_.js";import{A as le}from"./Alert-Ok_eCidg.js";import{T as y}from"./TextField-CWImxk_G.js";import{B as S}from"./Button-DK5g2WFv.js";import{C as Ue,L as Y}from"./Link-DsI7GZfd.js";import{I as Le}from"./InputAdornment-Bwtqyiqg.js";import{T as We,a as qe,b as Be,c as k,d as i,e as He}from"./TableRow-CzSsRUSI.js";var q={},Fe=T;Object.defineProperty(q,"__esModule",{value:!0});var ae=q.default=void 0,Ve=Fe($()),Ne=e;ae=q.default=(0,Ve.default)((0,Ne.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline");var B={},Ge=T;Object.defineProperty(B,"__esModule",{value:!0});var ne=B.default=void 0,Qe=Ge($()),D=e;ne=B.default=(0,Qe.default)((0,D.jsxs)("g",{fillRule:"evenodd",children:[(0,D.jsx)("circle",{cx:"17",cy:"15.5",r:"1.12"}),(0,D.jsx)("path",{d:"M17 17.5c-.73 0-2.19.36-2.24 1.08.5.71 1.32 1.17 2.24 1.17s1.74-.46 2.24-1.17c-.05-.72-1.51-1.08-2.24-1.08"}),(0,D.jsx)("path",{d:"M18 11.09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55C13.18 21.99 14.97 23 17 23c3.31 0 6-2.69 6-6 0-2.97-2.16-5.43-5-5.91M11 17c0 .56.08 1.11.23 1.62-.24.11-.48.22-.73.3-3.17-1-5.5-4.24-5.5-7.74v-3.6l5.5-2.4 5.5 2.4v3.51c-2.84.48-5 2.94-5 5.91m6 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4"})]}),"AdminPanelSettingsOutlined");var H={},Ke=T;Object.defineProperty(H,"__esModule",{value:!0});var ie=H.default=void 0,Ye=Ke($()),E=e;ie=H.default=(0,Ye.default)([(0,E.jsx)("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62"},"0"),(0,E.jsx)("circle",{cx:"9",cy:"13",r:"1"},"1"),(0,E.jsx)("circle",{cx:"15",cy:"13",r:"1"},"2"),(0,E.jsx)("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6c-3.03 0-6.29 2.51-6.03 6.45 2.47-1.01 4.33-3.21 4.86-5.89 1.31 2.63 4 4.44 7.12 4.47"},"3")],"SupportAgentOutlined");var F={},Je=T;Object.defineProperty(F,"__esModule",{value:!0});var oe=F.default=void 0,Xe=Je($()),Ze=e;oe=F.default=(0,Xe.default)((0,Ze.jsx)("path",{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01.1-.7.3-1.37.59-1.98-.22-.02-.44-.03-.67-.03-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2zm6-6c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m10.75 10c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63M17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"ManageAccountsOutlined");var V={},es=T;Object.defineProperty(V,"__esModule",{value:!0});var ce=V.default=void 0,ss=es($()),rs=e;ce=V.default=(0,ss.default)((0,rs.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutlineOutlined");const ts=["admin","rep","manager"],J={name:"",email:"",phone:"",role:"rep",pin:"",password:""},ls=(r,n)=>n&&!r.includes(n)?[n,...r]:r;function as({open:r,mode:n,initial:u,onClose:m,onSaved:C}){const o=n==="edit",[t,z]=a.useState(J),[h,M]=a.useState(!1),[g,x]=a.useState(null);a.useEffect(()=>{r&&(z({...J,...u||{}}),x(null))},[r,u]);const c=d=>f=>z(v=>({...v,[d]:f.target.value})),A=async()=>{if(!t.name.trim()){x("Name is required.");return}if(!t.email.trim()){x("Email is required.");return}if(!o&&!t.password.trim()){x("Password is required.");return}M(!0),x(null);const d={first_name:t.name.trim(),email:t.email.trim(),phone:t.phone,role:t.role,...t.password?{password:t.password}:{},...t.pin?{pin:String(t.pin)}:{}};try{o?await fe(u.id,d):await je(d),C()}catch(f){x(f.message||"Failed to save user")}finally{M(!1)}};return e.jsxs(Z,{open:r,onClose:h?void 0:m,maxWidth:"sm",fullWidth:!0,children:[e.jsxs(ee,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o?"Edit Team User":"Add Team User",e.jsx(L,{onClick:m,size:"small",disabled:h,children:e.jsx(Ie,{})})]}),e.jsxs(se,{dividers:!0,children:[g&&e.jsx(le,{severity:"error",sx:{mb:2},children:g}),e.jsxs(b,{container:!0,spacing:2,sx:{mt:0},children:[e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Name *",value:t.name,onChange:c("name")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Email *",value:t.email,onChange:c("email")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Phone",value:t.phone,onChange:c("phone")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{select:!0,fullWidth:!0,size:"small",label:"Role",value:t.role,onChange:c("role"),children:ls(ts,t.role).map(d=>e.jsx(pe,{value:d,children:d},d))})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"PIN",value:t.pin,onChange:c("pin")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",type:"password",label:o?"New Password (optional)":"Password *",value:t.password,onChange:c("password")})})]})]}),e.jsxs(re,{sx:{px:3,py:2},children:[e.jsx(S,{onClick:m,disabled:h,children:"Cancel"}),e.jsx(S,{variant:"contained",onClick:A,disabled:h,startIcon:h?e.jsx(W,{size:16,color:"inherit"}):null,children:o?"Save Changes":"Create User"})]})]})}const ns={admin:{color:"primary",icon:ne},manager:{color:"success",icon:oe},rep:{color:"info",icon:Ee},support:{color:"warning",icon:ie}},de=r=>ns[String(r||"").toLowerCase()]||{color:"secondary",icon:ce};function is({name:r,email:n,role:u}){const{color:m,icon:C}=de(u),o=n?n.split("@")[0]:"";return e.jsxs(O,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsxs(p,{sx:{position:"relative",display:"inline-flex"},children:[e.jsx(Ce,{name:r,size:40,sx:{border:"2px solid",borderColor:`${m}.lighter`}}),e.jsx(p,{sx:{position:"absolute",right:-3,bottom:-3,width:18,height:18,borderRadius:"50%",bgcolor:`${m}.main`,color:"#fff",display:"inline-flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff"},children:e.jsx(C,{sx:{fontSize:11}})})]}),e.jsxs(p,{sx:{minWidth:0},children:[e.jsx(j,{variant:"body2",sx:{fontWeight:600,color:"grey.800",lineHeight:1.25},children:r}),o&&e.jsxs(j,{variant:"caption",color:"text.secondary",children:["@",o]})]})]})}function os({role:r}){const{color:n,icon:u}=de(r);return e.jsx(te,{size:"small",icon:e.jsx(u,{sx:{fontSize:15,ml:.5}}),label:X(r),sx:{fontWeight:600,bgcolor:`${n==="secondary"?"grey.100":`${n}.lighter`}`,color:`${n==="secondary"?"grey.700":`${n}.dark`}`,"& .MuiChip-icon":{color:"inherit"}}})}function Ss(){var Q;const[r,n]=a.useState([]),[u,m]=a.useState(!0),[C,o]=a.useState(null),[t,z]=a.useState(0),[h,M]=a.useState(""),[g,x]=a.useState(0),[c,A]=a.useState(10),[d,f]=a.useState({open:!1,mode:"add",initial:null}),[v,P]=a.useState(null),[I,N]=a.useState(!1),_=()=>{m(!0),o(null),be().then(s=>n(s.map(ye))).catch(s=>o(s.message||"Failed to load team users")).finally(()=>m(!1))};a.useEffect(()=>{_()},[]);const R=a.useMemo(()=>{const s=[];return r.forEach(l=>{s.includes(l.role)||s.push(l.role)}),[{key:"all",label:"All"},...s.map(l=>({key:l,label:X(l)}))]},[r]),U=((Q=R[Math.min(t,R.length-1)])==null?void 0:Q.key)||"all",ue=a.useMemo(()=>{const s={all:r.length};return r.forEach(l=>{s[l.role]=(s[l.role]||0)+1}),s},[r]),w=a.useMemo(()=>r.filter(s=>{const l=U==="all"||s.role===U,me=!h||[s.name,s.email,s.phone,s.role].join(" ").toLowerCase().includes(h.toLowerCase());return l&&me}),[r,U,h]),G=w.slice(g*c,g*c+c),xe=()=>{f({open:!1,mode:"add",initial:null}),_()},he=async()=>{N(!0);try{await Se(v.id),P(null),_()}catch(s){o(s.message||"Failed to delete user")}finally{N(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Oe,{title:"App Users",breadcrumbs:[{label:"App Users"}],action:e.jsxs(O,{direction:"row",spacing:1.5,children:[e.jsx(S,{variant:"outlined",startIcon:e.jsx(ze,{}),onClick:_,disabled:u,children:"Refresh"}),e.jsx(S,{variant:"contained",startIcon:e.jsx(_e,{}),onClick:()=>f({open:!0,mode:"add",initial:null}),children:"Add User"})]})}),e.jsxs(Ue,{sx:{overflow:"hidden"},children:[e.jsxs(p,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:s=>`linear-gradient(90deg, ${s.palette.primary.lighter}66 0%, ${s.palette.background.paper} 70%)`},children:[e.jsx(p,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(ge,{fontSize:"small"})}),e.jsxs(p,{children:[e.jsx(j,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"App Users Directory"}),e.jsx(j,{variant:"caption",color:"text.secondary",children:"Manage console members, roles and access"})]})]}),e.jsxs(O,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(y,{size:"small",placeholder:"Search by name, email, phone…",value:h,onChange:s=>{M(s.target.value),x(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(Le,{position:"start",children:e.jsx(ve,{fontSize:"small"})})}}),e.jsx(p,{sx:{flexGrow:1}}),!u&&e.jsxs(O,{direction:"row",spacing:1,alignItems:"center",children:[e.jsxs(j,{variant:"body2",color:"text.secondary",children:[w.length," ",w.length===1?"user":"users"]}),e.jsx(te,{size:"small",label:"live · PostgreSQL",sx:{height:22,fontSize:"0.7rem",bgcolor:"success.lighter",color:"success.dark",fontWeight:600}})]})]}),e.jsx(p,{sx:{px:2,borderBottom:1,borderColor:"divider"},children:e.jsx(Re,{value:Math.min(t,R.length-1),onChange:(s,l)=>{z(l),x(0)},variant:"scrollable",scrollButtons:"auto",children:R.map((s,l)=>e.jsx(we,{label:e.jsx(ke,{label:s.label,count:ue[s.key]||0,active:t===l})},s.key))})}),C&&e.jsx(le,{severity:"error",sx:{m:2},action:e.jsx(S,{color:"inherit",size:"small",onClick:_,children:"Retry"}),children:C}),e.jsx(We,{children:e.jsxs(qe,{sx:{minWidth:800},children:[e.jsx(Be,{children:e.jsxs(k,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(i,{sx:{width:64},children:"S.No"}),e.jsx(i,{children:"User"}),e.jsx(i,{children:"Email"}),e.jsx(i,{children:"Phone"}),e.jsx(i,{children:"Role"}),e.jsx(i,{align:"right",children:"Actions"})]})}),e.jsx(He,{children:u?e.jsx(k,{children:e.jsx(i,{colSpan:6,sx:{border:"none"},children:e.jsx(p,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(W,{})})})}):G.length===0?e.jsx(k,{children:e.jsx(i,{colSpan:6,sx:{border:"none"},children:e.jsx(Ae,{title:"No team users found",caption:"Try a different role or search term, or add a user."})})}):G.map((s,l)=>e.jsxs(k,{hover:!0,children:[e.jsx(i,{children:e.jsx(j,{variant:"body2",color:"text.secondary",children:g*c+l+1})}),e.jsx(i,{children:e.jsx(is,{name:s.name,email:s.email,role:s.role})}),e.jsx(i,{children:s.email?e.jsxs(Y,{href:`mailto:${s.email}`,underline:"hover",color:"text.primary",sx:{display:"inline-flex",alignItems:"center",gap:.75,fontSize:"0.8125rem"},children:[e.jsx(ae,{sx:{fontSize:15,color:"grey.400"}}),s.email]}):e.jsx(j,{variant:"body2",color:"text.disabled",children:"—"})}),e.jsx(i,{children:s.phone?e.jsxs(Y,{href:`tel:${s.phone}`,underline:"hover",color:"text.primary",sx:{display:"inline-flex",alignItems:"center",gap:.75,fontSize:"0.8125rem"},children:[e.jsx(Me,{sx:{fontSize:15,color:"grey.400"}}),s.phone]}):e.jsx(j,{variant:"body2",color:"text.disabled",children:"—"})}),e.jsx(i,{children:e.jsx(os,{role:s.role})}),e.jsxs(i,{align:"right",children:[e.jsx(K,{title:"Edit",children:e.jsx(L,{size:"small",onClick:()=>f({open:!0,mode:"edit",initial:s}),children:e.jsx($e,{fontSize:"small"})})}),e.jsx(K,{title:"Delete",children:e.jsx(L,{size:"small",color:"error",onClick:()=>P(s),children:e.jsx(Te,{fontSize:"small"})})})]})]},s.id))})]})}),e.jsx(Pe,{component:"div",count:w.length,page:g,onPageChange:(s,l)=>x(l),rowsPerPage:c,onRowsPerPageChange:s=>{A(+s.target.value),x(0)},rowsPerPageOptions:[5,10,25]})]}),e.jsx(as,{open:d.open,mode:d.mode,initial:d.initial,onClose:()=>f({open:!1,mode:"add",initial:null}),onSaved:xe}),e.jsxs(Z,{open:!!v,onClose:I?void 0:()=>P(null),children:[e.jsx(ee,{children:"Delete user?"}),e.jsx(se,{children:e.jsxs(De,{children:["This will permanently remove ",e.jsx("strong",{children:v==null?void 0:v.name})," from the PostgreSQL database. This cannot be undone."]})}),e.jsxs(re,{sx:{px:3,py:2},children:[e.jsx(S,{onClick:()=>P(null),disabled:I,children:"Cancel"}),e.jsx(S,{color:"error",variant:"contained",onClick:he,disabled:I,startIcon:I?e.jsx(W,{size:16,color:"inherit"}):null,children:"Delete"})]})]})]})}export{Ss as default}; +import{r as $,j as e,i as T,a,I as L,M as pe,C as W,O as fe,Q as je,t as X,S as O,B as p,b as ge,T as j,H as ve,K,c as be,g as ye,R as Se,U as Ce}from"./index-DdJWTZFy.js";import{D as Z,a as ee,b as se,c as re,d as _e,e as $e,f as Te}from"./DeleteOutline-DetaO5yn.js";import{d as ze}from"./Refresh-DEoCZISD.js";import{d as Me,T as Pe}from"./PhoneOutlined-CBkctqNs.js";import{d as Ie,T as Re,a as we,b as ke,D as De,c as Ee}from"./Close-CknXfd8d.js";import{G as b,P as Oe,C as te}from"./PageHeader-CdP5B6Qy.js";import{E as Ae}from"./EmptyState-CQsHTCg9.js";import{A as le}from"./Alert-CzmzDPlp.js";import{T as y}from"./TextField-Btd7UbKs.js";import{B as S}from"./Button-Bcwcjqrt.js";import{C as Ue,L as Y}from"./Link-Dp34e72e.js";import{I as Le}from"./InputAdornment-Bnl7vvhj.js";import{T as We,a as qe,b as Be,c as k,d as i,e as He}from"./TableRow-CEoQ4SIZ.js";var q={},Fe=T;Object.defineProperty(q,"__esModule",{value:!0});var ae=q.default=void 0,Ve=Fe($()),Ne=e;ae=q.default=(0,Ve.default)((0,Ne.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline");var B={},Ge=T;Object.defineProperty(B,"__esModule",{value:!0});var ne=B.default=void 0,Qe=Ge($()),D=e;ne=B.default=(0,Qe.default)((0,D.jsxs)("g",{fillRule:"evenodd",children:[(0,D.jsx)("circle",{cx:"17",cy:"15.5",r:"1.12"}),(0,D.jsx)("path",{d:"M17 17.5c-.73 0-2.19.36-2.24 1.08.5.71 1.32 1.17 2.24 1.17s1.74-.46 2.24-1.17c-.05-.72-1.51-1.08-2.24-1.08"}),(0,D.jsx)("path",{d:"M18 11.09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55C13.18 21.99 14.97 23 17 23c3.31 0 6-2.69 6-6 0-2.97-2.16-5.43-5-5.91M11 17c0 .56.08 1.11.23 1.62-.24.11-.48.22-.73.3-3.17-1-5.5-4.24-5.5-7.74v-3.6l5.5-2.4 5.5 2.4v3.51c-2.84.48-5 2.94-5 5.91m6 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4"})]}),"AdminPanelSettingsOutlined");var H={},Ke=T;Object.defineProperty(H,"__esModule",{value:!0});var ie=H.default=void 0,Ye=Ke($()),E=e;ie=H.default=(0,Ye.default)([(0,E.jsx)("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62"},"0"),(0,E.jsx)("circle",{cx:"9",cy:"13",r:"1"},"1"),(0,E.jsx)("circle",{cx:"15",cy:"13",r:"1"},"2"),(0,E.jsx)("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6c-3.03 0-6.29 2.51-6.03 6.45 2.47-1.01 4.33-3.21 4.86-5.89 1.31 2.63 4 4.44 7.12 4.47"},"3")],"SupportAgentOutlined");var F={},Je=T;Object.defineProperty(F,"__esModule",{value:!0});var oe=F.default=void 0,Xe=Je($()),Ze=e;oe=F.default=(0,Xe.default)((0,Ze.jsx)("path",{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01.1-.7.3-1.37.59-1.98-.22-.02-.44-.03-.67-.03-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2zm6-6c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m10.75 10c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63M17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"ManageAccountsOutlined");var V={},es=T;Object.defineProperty(V,"__esModule",{value:!0});var ce=V.default=void 0,ss=es($()),rs=e;ce=V.default=(0,ss.default)((0,rs.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutlineOutlined");const ts=["admin","rep","manager"],J={name:"",email:"",phone:"",role:"rep",pin:"",password:""},ls=(r,n)=>n&&!r.includes(n)?[n,...r]:r;function as({open:r,mode:n,initial:u,onClose:m,onSaved:C}){const o=n==="edit",[t,z]=a.useState(J),[h,M]=a.useState(!1),[g,x]=a.useState(null);a.useEffect(()=>{r&&(z({...J,...u||{}}),x(null))},[r,u]);const c=d=>f=>z(v=>({...v,[d]:f.target.value})),A=async()=>{if(!t.name.trim()){x("Name is required.");return}if(!t.email.trim()){x("Email is required.");return}if(!o&&!t.password.trim()){x("Password is required.");return}M(!0),x(null);const d={first_name:t.name.trim(),email:t.email.trim(),phone:t.phone,role:t.role,...t.password?{password:t.password}:{},...t.pin?{pin:String(t.pin)}:{}};try{o?await fe(u.id,d):await je(d),C()}catch(f){x(f.message||"Failed to save user")}finally{M(!1)}};return e.jsxs(Z,{open:r,onClose:h?void 0:m,maxWidth:"sm",fullWidth:!0,children:[e.jsxs(ee,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[o?"Edit Team User":"Add Team User",e.jsx(L,{onClick:m,size:"small",disabled:h,children:e.jsx(Ie,{})})]}),e.jsxs(se,{dividers:!0,children:[g&&e.jsx(le,{severity:"error",sx:{mb:2},children:g}),e.jsxs(b,{container:!0,spacing:2,sx:{mt:0},children:[e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Name *",value:t.name,onChange:c("name")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Email *",value:t.email,onChange:c("email")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"Phone",value:t.phone,onChange:c("phone")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{select:!0,fullWidth:!0,size:"small",label:"Role",value:t.role,onChange:c("role"),children:ls(ts,t.role).map(d=>e.jsx(pe,{value:d,children:d},d))})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",label:"PIN",value:t.pin,onChange:c("pin")})}),e.jsx(b,{item:!0,xs:12,sm:6,children:e.jsx(y,{fullWidth:!0,size:"small",type:"password",label:o?"New Password (optional)":"Password *",value:t.password,onChange:c("password")})})]})]}),e.jsxs(re,{sx:{px:3,py:2},children:[e.jsx(S,{onClick:m,disabled:h,children:"Cancel"}),e.jsx(S,{variant:"contained",onClick:A,disabled:h,startIcon:h?e.jsx(W,{size:16,color:"inherit"}):null,children:o?"Save Changes":"Create User"})]})]})}const ns={admin:{color:"primary",icon:ne},manager:{color:"success",icon:oe},rep:{color:"info",icon:Ee},support:{color:"warning",icon:ie}},de=r=>ns[String(r||"").toLowerCase()]||{color:"secondary",icon:ce};function is({name:r,email:n,role:u}){const{color:m,icon:C}=de(u),o=n?n.split("@")[0]:"";return e.jsxs(O,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsxs(p,{sx:{position:"relative",display:"inline-flex"},children:[e.jsx(Ce,{name:r,size:40,sx:{border:"2px solid",borderColor:`${m}.lighter`}}),e.jsx(p,{sx:{position:"absolute",right:-3,bottom:-3,width:18,height:18,borderRadius:"50%",bgcolor:`${m}.main`,color:"#fff",display:"inline-flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff"},children:e.jsx(C,{sx:{fontSize:11}})})]}),e.jsxs(p,{sx:{minWidth:0},children:[e.jsx(j,{variant:"body2",sx:{fontWeight:600,color:"grey.800",lineHeight:1.25},children:r}),o&&e.jsxs(j,{variant:"caption",color:"text.secondary",children:["@",o]})]})]})}function os({role:r}){const{color:n,icon:u}=de(r);return e.jsx(te,{size:"small",icon:e.jsx(u,{sx:{fontSize:15,ml:.5}}),label:X(r),sx:{fontWeight:600,bgcolor:`${n==="secondary"?"grey.100":`${n}.lighter`}`,color:`${n==="secondary"?"grey.700":`${n}.dark`}`,"& .MuiChip-icon":{color:"inherit"}}})}function Ss(){var Q;const[r,n]=a.useState([]),[u,m]=a.useState(!0),[C,o]=a.useState(null),[t,z]=a.useState(0),[h,M]=a.useState(""),[g,x]=a.useState(0),[c,A]=a.useState(10),[d,f]=a.useState({open:!1,mode:"add",initial:null}),[v,P]=a.useState(null),[I,N]=a.useState(!1),_=()=>{m(!0),o(null),be().then(s=>n(s.map(ye))).catch(s=>o(s.message||"Failed to load team users")).finally(()=>m(!1))};a.useEffect(()=>{_()},[]);const R=a.useMemo(()=>{const s=[];return r.forEach(l=>{s.includes(l.role)||s.push(l.role)}),[{key:"all",label:"All"},...s.map(l=>({key:l,label:X(l)}))]},[r]),U=((Q=R[Math.min(t,R.length-1)])==null?void 0:Q.key)||"all",ue=a.useMemo(()=>{const s={all:r.length};return r.forEach(l=>{s[l.role]=(s[l.role]||0)+1}),s},[r]),w=a.useMemo(()=>r.filter(s=>{const l=U==="all"||s.role===U,me=!h||[s.name,s.email,s.phone,s.role].join(" ").toLowerCase().includes(h.toLowerCase());return l&&me}),[r,U,h]),G=w.slice(g*c,g*c+c),xe=()=>{f({open:!1,mode:"add",initial:null}),_()},he=async()=>{N(!0);try{await Se(v.id),P(null),_()}catch(s){o(s.message||"Failed to delete user")}finally{N(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Oe,{title:"App Users",breadcrumbs:[{label:"App Users"}],action:e.jsxs(O,{direction:"row",spacing:1.5,children:[e.jsx(S,{variant:"outlined",startIcon:e.jsx(ze,{}),onClick:_,disabled:u,children:"Refresh"}),e.jsx(S,{variant:"contained",startIcon:e.jsx(_e,{}),onClick:()=>f({open:!0,mode:"add",initial:null}),children:"Add User"})]})}),e.jsxs(Ue,{sx:{overflow:"hidden"},children:[e.jsxs(p,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:s=>`linear-gradient(90deg, ${s.palette.primary.lighter}66 0%, ${s.palette.background.paper} 70%)`},children:[e.jsx(p,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(ge,{fontSize:"small"})}),e.jsxs(p,{children:[e.jsx(j,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"App Users Directory"}),e.jsx(j,{variant:"caption",color:"text.secondary",children:"Manage console members, roles and access"})]})]}),e.jsxs(O,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(y,{size:"small",placeholder:"Search by name, email, phone…",value:h,onChange:s=>{M(s.target.value),x(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(Le,{position:"start",children:e.jsx(ve,{fontSize:"small"})})}}),e.jsx(p,{sx:{flexGrow:1}}),!u&&e.jsxs(O,{direction:"row",spacing:1,alignItems:"center",children:[e.jsxs(j,{variant:"body2",color:"text.secondary",children:[w.length," ",w.length===1?"user":"users"]}),e.jsx(te,{size:"small",label:"live · PostgreSQL",sx:{height:22,fontSize:"0.7rem",bgcolor:"success.lighter",color:"success.dark",fontWeight:600}})]})]}),e.jsx(p,{sx:{px:2,borderBottom:1,borderColor:"divider"},children:e.jsx(Re,{value:Math.min(t,R.length-1),onChange:(s,l)=>{z(l),x(0)},variant:"scrollable",scrollButtons:"auto",children:R.map((s,l)=>e.jsx(we,{label:e.jsx(ke,{label:s.label,count:ue[s.key]||0,active:t===l})},s.key))})}),C&&e.jsx(le,{severity:"error",sx:{m:2},action:e.jsx(S,{color:"inherit",size:"small",onClick:_,children:"Retry"}),children:C}),e.jsx(We,{children:e.jsxs(qe,{sx:{minWidth:800},children:[e.jsx(Be,{children:e.jsxs(k,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(i,{sx:{width:64},children:"S.No"}),e.jsx(i,{children:"User"}),e.jsx(i,{children:"Email"}),e.jsx(i,{children:"Phone"}),e.jsx(i,{children:"Role"}),e.jsx(i,{align:"right",children:"Actions"})]})}),e.jsx(He,{children:u?e.jsx(k,{children:e.jsx(i,{colSpan:6,sx:{border:"none"},children:e.jsx(p,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(W,{})})})}):G.length===0?e.jsx(k,{children:e.jsx(i,{colSpan:6,sx:{border:"none"},children:e.jsx(Ae,{title:"No team users found",caption:"Try a different role or search term, or add a user."})})}):G.map((s,l)=>e.jsxs(k,{hover:!0,children:[e.jsx(i,{children:e.jsx(j,{variant:"body2",color:"text.secondary",children:g*c+l+1})}),e.jsx(i,{children:e.jsx(is,{name:s.name,email:s.email,role:s.role})}),e.jsx(i,{children:s.email?e.jsxs(Y,{href:`mailto:${s.email}`,underline:"hover",color:"text.primary",sx:{display:"inline-flex",alignItems:"center",gap:.75,fontSize:"0.8125rem"},children:[e.jsx(ae,{sx:{fontSize:15,color:"grey.400"}}),s.email]}):e.jsx(j,{variant:"body2",color:"text.disabled",children:"—"})}),e.jsx(i,{children:s.phone?e.jsxs(Y,{href:`tel:${s.phone}`,underline:"hover",color:"text.primary",sx:{display:"inline-flex",alignItems:"center",gap:.75,fontSize:"0.8125rem"},children:[e.jsx(Me,{sx:{fontSize:15,color:"grey.400"}}),s.phone]}):e.jsx(j,{variant:"body2",color:"text.disabled",children:"—"})}),e.jsx(i,{children:e.jsx(os,{role:s.role})}),e.jsxs(i,{align:"right",children:[e.jsx(K,{title:"Edit",children:e.jsx(L,{size:"small",onClick:()=>f({open:!0,mode:"edit",initial:s}),children:e.jsx($e,{fontSize:"small"})})}),e.jsx(K,{title:"Delete",children:e.jsx(L,{size:"small",color:"error",onClick:()=>P(s),children:e.jsx(Te,{fontSize:"small"})})})]})]},s.id))})]})}),e.jsx(Pe,{component:"div",count:w.length,page:g,onPageChange:(s,l)=>x(l),rowsPerPage:c,onRowsPerPageChange:s=>{A(+s.target.value),x(0)},rowsPerPageOptions:[5,10,25]})]}),e.jsx(as,{open:d.open,mode:d.mode,initial:d.initial,onClose:()=>f({open:!1,mode:"add",initial:null}),onSaved:xe}),e.jsxs(Z,{open:!!v,onClose:I?void 0:()=>P(null),children:[e.jsx(ee,{children:"Delete user?"}),e.jsx(se,{children:e.jsxs(De,{children:["This will permanently remove ",e.jsx("strong",{children:v==null?void 0:v.name})," from the PostgreSQL database. This cannot be undone."]})}),e.jsxs(re,{sx:{px:3,py:2},children:[e.jsx(S,{onClick:()=>P(null),disabled:I,children:"Cancel"}),e.jsx(S,{color:"error",variant:"contained",onClick:he,disabled:I,startIcon:I?e.jsx(W,{size:16,color:"inherit"}):null,children:"Delete"})]})]})]})}export{Ss as default}; diff --git a/dist/assets/Tenants-Vq8ITDL4.js b/dist/assets/Tenants-mdxHS17O.js similarity index 98% rename from dist/assets/Tenants-Vq8ITDL4.js rename to dist/assets/Tenants-mdxHS17O.js index 16c59a0..b7cc46f 100644 --- a/dist/assets/Tenants-Vq8ITDL4.js +++ b/dist/assets/Tenants-mdxHS17O.js @@ -1 +1 @@ -import{a as p,u as Cr,h as Ot,k as lt,s as Sr,_ as w,l as nr,m as sr,n as or,o as Ke,j as e,p as We,q as yt,v as ar,w as re,P as ir,x as lr,y as Ir,z as Oe,I as Ne,A as Lt,r as Je,i as Ze,T as C,M as ct,D as zt,C as bt,E as Tr,F as Pr,G as $r,t as ye,S as z,d as Gt,B as M,H as Or,f as Lr,e as Ar,J as kr,U as qt,K as At,L as Rr}from"./index-CkS0O37G.js";import{D as cr,a as ur,b as dr,c as pr,d as zr,e as Kt,f as wr}from"./DeleteOutline-DHEVbt_6.js";import{d as Dr}from"./Refresh-Z6LWMmna.js";import{d as _r,a as Mr,b as ut,c as Wr}from"./StorefrontOutlined-R0CC3Y_0.js";import{S as dt,d as Nr,a as gr,b as hr,c as Ut}from"./StatusChip-C-P1gBCE.js";import{T as Er,d as Fr}from"./PhoneOutlined-BlqLiA8g.js";import{d as Br}from"./LocalShippingOutlined-KXKsS6Ie.js";import{d as Hr,T as Vr,a as Gr,b as qr,D as Kr,c as Ur}from"./Close-DaYHvsp_.js";import{C as vt,G as g,P as Jr}from"./PageHeader-1FV595Go.js";import{E as Zr}from"./EmptyState-B_LUop-_.js";import{C as Xr,A as fr}from"./Alert-Ok_eCidg.js";import{A as Yr,f as Me,o as Jt,i as kt,T as O}from"./TextField-CWImxk_G.js";import{B as pe}from"./Button-DK5g2WFv.js";import{C as Qr}from"./Link-DsI7GZfd.js";import{I as en}from"./InputAdornment-Bwtqyiqg.js";import{T as tn,a as rn,b as nn,c as Ue,d as N,e as sn}from"./TableRow-CzSsRUSI.js";const on=t=>{const o=p.useRef({});return p.useEffect(()=>{o.current=t}),o.current};function Zt(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function an(t={}){const{ignoreAccents:o=!0,ignoreCase:c=!0,limit:b,matchFrom:$="any",stringify:I,trim:s=!1}=t;return(h,{inputValue:k,getOptionLabel:E})=>{let D=s?k.trim():k;c&&(D=D.toLowerCase()),o&&(D=Zt(D));const _=D?h.filter(H=>{let L=(I||E)(H);return c&&(L=L.toLowerCase()),o&&(L=Zt(L)),$==="start"?L.indexOf(D)===0:L.indexOf(D)>-1}):h;return typeof b=="number"?_.slice(0,b):_}}function pt(t,o){for(let c=0;c{var o;return t.current!==null&&((o=t.current.parentElement)==null?void 0:o.contains(document.activeElement))},un=[];function dn(t){const{unstable_isActiveElementInListbox:o=cn,unstable_classNamePrefix:c="Mui",autoComplete:b=!1,autoHighlight:$=!1,autoSelect:I=!1,blurOnSelect:s=!1,clearOnBlur:h=!t.freeSolo,clearOnEscape:k=!1,componentName:E="useAutocomplete",defaultValue:D=t.multiple?un:null,disableClearable:_=!1,disableCloseOnSelect:H=!1,disabled:L,disabledItemsFocusable:ve=!1,disableListWrap:T=!1,filterOptions:ge=ln,filterSelectedOptions:u=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:Y,getOptionLabel:V=n=>{var r;return(r=n.label)!=null?r:n},groupBy:B,handleHomeEndKeys:K=!t.freeSolo,id:xe,includeInputInList:je=!1,inputValue:ne,isOptionEqualToValue:U=(n,r)=>n===r,multiple:S=!1,onChange:Ce,onClose:Se,onHighlightChange:l,onInputChange:m,onOpen:le,open:Nt,openOnFocus:Et=!1,options:Ee,readOnly:Ie=!1,selectOnFocus:Fe=!t.freeSolo,value:Xe}=t,Q=Cr(xe);let J=V;J=n=>{const r=V(n);return typeof r!="string"?String(r):r};const Be=p.useRef(!1),Ye=p.useRef(!0),W=p.useRef(null),ee=p.useRef(null),[Le,jt]=p.useState(null),[Z,He]=p.useState(-1),Qe=$?0:-1,G=p.useRef(Qe),[d,Ft]=Ot({controlled:Xe,default:D,name:E}),[j,he]=Ot({controlled:ne,default:"",name:E,state:"inputValue"}),[Ae,et]=p.useState(!1),Te=p.useCallback((n,r)=>{if(!(S?d.length!(u&&(S?d:[d]).some(r=>r!==null&&U(n,r)))),{inputValue:nt&&Ct?"":j,getOptionLabel:J}):[],se=on({filteredOptions:P,value:d,inputValue:j});p.useEffect(()=>{const n=d!==se.value;Ae&&!n||v&&!n||Te(null,d)},[d,Te,Ae,se.value,v]);const Ve=me&&P.length>0&&!Ie,ke=lt(n=>{n===-1?W.current.focus():Le.querySelector(`[data-tag-index="${n}"]`).focus()});p.useEffect(()=>{S&&Z>d.length-1&&(He(-1),ke(-1))},[d,S,Z,ke]);function Re(n,r){if(!ee.current||n<0||n>=P.length)return-1;let a=n;for(;;){const i=ee.current.querySelector(`[data-option-index="${a}"]`),x=ve?!1:!i||i.disabled||i.getAttribute("aria-disabled")==="true";if(i&&i.hasAttribute("tabindex")&&!x)return a;if(r==="next"?a=(a+1)%P.length:a=(a-1+P.length)%P.length,a===n)return-1}}const ce=lt(({event:n,index:r,reason:a="auto"})=>{if(G.current=r,r===-1?W.current.removeAttribute("aria-activedescendant"):W.current.setAttribute("aria-activedescendant",`${Q}-option-${r}`),l&&l(n,r===-1?null:P[r],a),!ee.current)return;const i=ee.current.querySelector(`[role="option"].${c}-focused`);i&&(i.classList.remove(`${c}-focused`),i.classList.remove(`${c}-focusVisible`));let x=ee.current;if(ee.current.getAttribute("role")!=="listbox"&&(x=ee.current.parentElement.querySelector('[role="listbox"]')),!x)return;if(r===-1){x.scrollTop=0;return}const A=ee.current.querySelector(`[data-option-index="${r}"]`);if(A&&(A.classList.add(`${c}-focused`),a==="keyboard"&&A.classList.add(`${c}-focusVisible`),x.scrollHeight>x.clientHeight&&a!=="mouse"&&a!=="touch")){const R=A,de=x.clientHeight+x.scrollTop,Vt=R.offsetTop+R.offsetHeight;Vt>de?x.scrollTop=Vt-x.clientHeight:R.offsetTop-R.offsetHeight*(B?1.3:0){if(!X)return;const A=Re((()=>{const R=P.length-1;if(r==="reset")return Qe;if(r==="start")return 0;if(r==="end")return R;const de=G.current+r;return de<0?de===-1&&je?-1:T&&G.current!==-1||Math.abs(r)>1?0:R:de>R?de===R+1&&je?-1:T||Math.abs(r)>1?R:0:de})(),a);if(ce({index:A,reason:i,event:n}),b&&r!=="reset")if(A===-1)W.current.value=j;else{const R=J(P[A]);W.current.value=R,R.toLowerCase().indexOf(j.toLowerCase())===0&&j.length>0&&W.current.setSelectionRange(j.length,R.length)}}),ze=()=>{const n=(r,a)=>{const i=r?J(r):"",x=a?J(a):"";return i===x};if(G.current!==-1&&se.filteredOptions&&se.filteredOptions.length!==P.length&&se.inputValue===j&&(S?d.length===se.value.length&&se.value.every((r,a)=>J(d[a])===J(r)):n(se.value,d))){const r=se.filteredOptions[G.current];if(r)return pt(P,a=>J(a)===J(r))}return-1},Ge=p.useCallback(()=>{if(!X)return;const n=ze();if(n!==-1){G.current=n;return}const r=S?d[0]:d;if(P.length===0||r==null){oe({diff:"reset"});return}if(ee.current){if(r!=null){const a=P[G.current];if(S&&a&&pt(d,x=>U(a,x))!==-1)return;const i=pt(P,x=>U(x,r));i===-1?oe({diff:"reset"}):ce({index:i});return}if(G.current>=P.length-1){ce({index:P.length-1});return}ce({index:G.current})}},[P.length,S?!1:d,u,oe,ce,X,j,S]),St=lt(n=>{Sr(ee,n),n&&Ge()});p.useEffect(()=>{Ge()},[Ge]);const te=n=>{me||(tt(!0),rt(!0),le&&le(n))},fe=(n,r)=>{me&&(tt(!1),Se&&Se(n,r))},ue=(n,r,a,i)=>{if(S){if(d.length===r.length&&d.every((x,A)=>x===r[A]))return}else if(d===r)return;Ce&&Ce(n,r,a,i),Ft(r)},we=p.useRef(!1),Pe=(n,r,a="selectOption",i="options")=>{let x=a,A=r;if(S){A=Array.isArray(d)?d.slice():[];const R=pt(A,de=>U(r,de));R===-1?A.push(r):i!=="freeSolo"&&(A.splice(R,1),x="removeOption")}Te(n,A),ue(n,A,x,{option:r}),!H&&(!n||!n.ctrlKey&&!n.metaKey)&&fe(n,x),(s===!0||s==="touch"&&we.current||s==="mouse"&&!we.current)&&W.current.blur()};function st(n,r){if(n===-1)return-1;let a=n;for(;;){if(r==="next"&&a===d.length||r==="previous"&&a===-1)return-1;const i=Le.querySelector(`[data-tag-index="${a}"]`);if(!i||!i.hasAttribute("tabindex")||i.disabled||i.getAttribute("aria-disabled")==="true")a+=r==="next"?1:-1;else return a}}const ot=(n,r)=>{if(!S)return;j===""&&fe(n,"toggleInput");let a=Z;Z===-1?j===""&&r==="previous"&&(a=d.length-1):(a+=r==="next"?1:-1,a<0&&(a=0),a===d.length&&(a=-1)),a=st(a,r),He(a),ke(a)},at=n=>{Be.current=!0,he(""),m&&m(n,"","clear"),ue(n,S?[]:null,"clear")},It=n=>r=>{if(n.onKeyDown&&n.onKeyDown(r),!r.defaultMuiPrevented&&(Z!==-1&&["ArrowLeft","ArrowRight"].indexOf(r.key)===-1&&(He(-1),ke(-1)),r.which!==229))switch(r.key){case"Home":X&&K&&(r.preventDefault(),oe({diff:"start",direction:"next",reason:"keyboard",event:r}));break;case"End":X&&K&&(r.preventDefault(),oe({diff:"end",direction:"previous",reason:"keyboard",event:r}));break;case"PageUp":r.preventDefault(),oe({diff:-Xt,direction:"previous",reason:"keyboard",event:r}),te(r);break;case"PageDown":r.preventDefault(),oe({diff:Xt,direction:"next",reason:"keyboard",event:r}),te(r);break;case"ArrowDown":r.preventDefault(),oe({diff:1,direction:"next",reason:"keyboard",event:r}),te(r);break;case"ArrowUp":r.preventDefault(),oe({diff:-1,direction:"previous",reason:"keyboard",event:r}),te(r);break;case"ArrowLeft":ot(r,"previous");break;case"ArrowRight":ot(r,"next");break;case"Enter":if(G.current!==-1&&X){const a=P[G.current],i=y?y(a):!1;if(r.preventDefault(),i)return;Pe(r,a,"selectOption"),b&&W.current.setSelectionRange(W.current.value.length,W.current.value.length)}else v&&j!==""&&nt===!1&&(S&&r.preventDefault(),Pe(r,j,"createOption","freeSolo"));break;case"Escape":X?(r.preventDefault(),r.stopPropagation(),fe(r,"escape")):k&&(j!==""||S&&d.length>0)&&(r.preventDefault(),r.stopPropagation(),at(r));break;case"Backspace":if(S&&!Ie&&j===""&&d.length>0){const a=Z===-1?d.length-1:Z,i=d.slice();i.splice(a,1),ue(r,i,"removeOption",{option:d[a]})}break;case"Delete":if(S&&!Ie&&j===""&&d.length>0&&Z!==-1){const a=Z,i=d.slice();i.splice(a,1),ue(r,i,"removeOption",{option:d[a]})}break}},Bt=n=>{et(!0),Et&&!Be.current&&te(n)},De=n=>{if(o(ee)){W.current.focus();return}et(!1),Ye.current=!0,Be.current=!1,I&&G.current!==-1&&X?Pe(n,P[G.current],"blur"):I&&v&&j!==""?Pe(n,j,"blur","freeSolo"):h&&Te(n,d),fe(n,"blur")},q=n=>{const r=n.target.value;j!==r&&(he(r),rt(!1),m&&m(n,r,"input")),r===""?!_&&!S&&ue(n,null,"clear"):te(n)},F=n=>{const r=Number(n.currentTarget.getAttribute("data-option-index"));G.current!==r&&ce({event:n,index:r,reason:"mouse"})},ae=n=>{ce({event:n,index:Number(n.currentTarget.getAttribute("data-option-index")),reason:"touch"}),we.current=!0},Ht=n=>{const r=Number(n.currentTarget.getAttribute("data-option-index"));Pe(n,P[r],"selectOption"),we.current=!1},Tt=n=>r=>{const a=d.slice();a.splice(n,1),ue(r,a,"removeOption",{option:d[n]})},Pt=n=>{me?fe(n,"toggleInput"):te(n)},$t=n=>{n.currentTarget.contains(n.target)&&n.target.getAttribute("id")!==Q&&n.preventDefault()},it=n=>{n.currentTarget.contains(n.target)&&(W.current.focus(),Fe&&Ye.current&&W.current.selectionEnd-W.current.selectionStart===0&&W.current.select(),Ye.current=!1)},qe=n=>{!L&&(j===""||!me)&&Pt(n)};let $e=v&&j.length>0;$e=$e||(S?d.length>0:d!==null);let _e=P;return B&&(_e=P.reduce((n,r,a)=>{const i=B(r);return n.length>0&&n[n.length-1].group===i?n[n.length-1].options.push(r):n.push({key:a,index:a,group:i,options:[r]}),n},[])),L&&Ae&&De(),{getRootProps:(n={})=>w({"aria-owns":Ve?`${Q}-listbox`:null},n,{onKeyDown:It(n),onMouseDown:$t,onClick:it}),getInputLabelProps:()=>({id:`${Q}-label`,htmlFor:Q}),getInputProps:()=>({id:Q,value:j,onBlur:De,onFocus:Bt,onChange:q,onMouseDown:qe,"aria-activedescendant":X?"":null,"aria-autocomplete":b?"both":"list","aria-controls":Ve?`${Q}-listbox`:void 0,"aria-expanded":Ve,autoComplete:"off",ref:W,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:L}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:at}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Pt}),getTagProps:({index:n})=>w({key:n,"data-tag-index":n,tabIndex:-1},!Ie&&{onDelete:Tt(n)}),getListboxProps:()=>({role:"listbox",id:`${Q}-listbox`,"aria-labelledby":`${Q}-label`,ref:St,onMouseDown:n=>{n.preventDefault()}}),getOptionProps:({index:n,option:r})=>{var a;const i=(S?d:[d]).some(A=>A!=null&&U(r,A)),x=y?y(r):!1;return{key:(a=Y==null?void 0:Y(r))!=null?a:J(r),tabIndex:-1,role:"option",id:`${Q}-option-${n}`,onMouseMove:F,onClick:Ht,onTouchStart:ae,"data-option-index":n,"aria-disabled":x,"aria-selected":i}},id:Q,inputValue:j,value:d,dirty:$e,expanded:X&&Le,popupOpen:X,focused:Ae||Z!==-1,anchorEl:Le,setAnchorEl:jt,focusedTag:Z,groupedOptions:_e}}function pn(t){return nr("MuiListSubheader",t)}sr("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const gn=["className","color","component","disableGutters","disableSticky","inset"],hn=t=>{const{classes:o,color:c,disableGutters:b,inset:$,disableSticky:I}=t,s={root:["root",c!=="default"&&`color${yt(c)}`,!b&&"gutters",$&&"inset",!I&&"sticky"]};return ar(s,pn,o)},fn=re("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:c}=t;return[o.root,c.color!=="default"&&o[`color${yt(c.color)}`],!c.disableGutters&&o.gutters,c.inset&&o.inset,!c.disableSticky&&o.sticky]}})(({theme:t,ownerState:o})=>w({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},o.color==="primary"&&{color:(t.vars||t).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),xr=p.forwardRef(function(o,c){const b=or({props:o,name:"MuiListSubheader"}),{className:$,color:I="default",component:s="li",disableGutters:h=!1,disableSticky:k=!1,inset:E=!1}=b,D=Ke(b,gn),_=w({},b,{color:I,component:s,disableGutters:h,disableSticky:k,inset:E}),H=hn(_);return e.jsx(fn,w({as:s,className:We(H.root,$),ref:c,ownerState:_},D))});xr.muiSkipListHighlight=!0;function xn(t){return nr("MuiAutocomplete",t)}const f=sr("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Yt,Qt;const mn=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],bn=["ref"],yn=["key"],vn=["key"],jn=t=>{const{classes:o,disablePortal:c,expanded:b,focused:$,fullWidth:I,hasClearIcon:s,hasPopupIcon:h,inputFocused:k,popupOpen:E,size:D}=t,_={root:["root",b&&"expanded",$&&"focused",I&&"fullWidth",s&&"hasClearIcon",h&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",k&&"inputFocused"],tag:["tag",`tagSize${yt(D)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",E&&"popupIndicatorOpen"],popper:["popper",c&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return ar(_,xn,o)},Cn=re("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:c}=t,{fullWidth:b,hasClearIcon:$,hasPopupIcon:I,inputFocused:s,size:h}=c;return[{[`& .${f.tag}`]:o.tag},{[`& .${f.tag}`]:o[`tagSize${yt(h)}`]},{[`& .${f.inputRoot}`]:o.inputRoot},{[`& .${f.input}`]:o.input},{[`& .${f.input}`]:s&&o.inputFocused},o.root,b&&o.fullWidth,I&&o.hasPopupIcon,$&&o.hasClearIcon]}})({[`&.${f.focused} .${f.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${f.clearIndicator}`]:{visibility:"visible"}},[`& .${f.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${f.inputRoot}`]:{[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:30},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:56},[`& .${f.input}`]:{width:0,minWidth:30}},[`& .${kt.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${kt.root}.${Oe.sizeSmall}`]:{[`& .${kt.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Jt.root}`]:{padding:9,[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:39},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:65},[`& .${f.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${f.endAdornment}`]:{right:9}},[`& .${Jt.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${f.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Me.root}`]:{paddingTop:19,paddingLeft:8,[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:39},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:65},[`& .${Me.input}`]:{padding:"7px 4px"},[`& .${f.endAdornment}`]:{right:9}},[`& .${Me.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Me.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Me.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${f.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Me.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${f.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${f.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${f.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${f.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${f.inputRoot}`]:{flexWrap:"wrap"}}}]}),Sn=re("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,o)=>o.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),In=re(Ne,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Tn=re(Ne,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},o)=>w({},o.popupIndicator,t.popupOpen&&o.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Pn=re(lr,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,o)=>{const{ownerState:c}=t;return[{[`& .${f.option}`]:o.option},o.popper,c.disablePortal&&o.popperDisablePortal]}})(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),$n=re(ir,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,o)=>o.paper})(({theme:t})=>w({},t.typography.body1,{overflow:"auto"})),On=re("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,o)=>o.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),Ln=re("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,o)=>o.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),An=re("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,o)=>o.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${f.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${f.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${f.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${f.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),kn=re(xr,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,o)=>o.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),Rn=re("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,o)=>o.groupUl})({padding:0,[`& .${f.option}`]:{paddingLeft:24}}),gt=p.forwardRef(function(o,c){var b,$,I,s;const h=or({props:o,name:"MuiAutocomplete"}),{autoComplete:k=!1,autoHighlight:E=!1,autoSelect:D=!1,blurOnSelect:_=!1,ChipProps:H,className:L,clearIcon:ve=Yt||(Yt=e.jsx(Xr,{fontSize:"small"})),clearOnBlur:T=!h.freeSolo,clearOnEscape:ge=!1,clearText:u="Clear",closeText:v="Close",componentsProps:y={},defaultValue:Y=h.multiple?[]:null,disableClearable:V=!1,disableCloseOnSelect:B=!1,disabled:K=!1,disabledItemsFocusable:xe=!1,disableListWrap:je=!1,disablePortal:ne=!1,filterSelectedOptions:U=!1,forcePopupIcon:S="auto",freeSolo:Ce=!1,fullWidth:Se=!1,getLimitTagsText:l=r=>`+${r}`,getOptionLabel:m,groupBy:le,handleHomeEndKeys:Nt=!h.freeSolo,includeInputInList:Et=!1,limitTags:Ee=-1,ListboxComponent:Ie="ul",ListboxProps:Fe,loading:Xe=!1,loadingText:Q="Loading…",multiple:J=!1,noOptionsText:Be="No options",openOnFocus:Ye=!1,openText:W="Open",PaperComponent:ee=ir,PopperComponent:Le=lr,popupIcon:jt=Qt||(Qt=e.jsx(Yr,{})),readOnly:Z=!1,renderGroup:He,renderInput:Qe,renderOption:G,renderTags:d,selectOnFocus:Ft=!h.freeSolo,size:j="medium",slotProps:he={}}=h,Ae=Ke(h,mn),{getRootProps:et,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:tt,getClearProps:Ct,getTagProps:rt,getListboxProps:nt,getOptionProps:X,value:P,dirty:se,expanded:Ve,id:ke,popupOpen:Re,focused:ce,focusedTag:oe,anchorEl:ze,setAnchorEl:Ge,inputValue:St,groupedOptions:te}=dn(w({},h,{componentName:"Autocomplete"})),fe=!V&&!K&&se&&!Z,ue=(!Ce||S===!0)&&S!==!1,{onMouseDown:we}=Te(),{ref:Pe}=Fe??{},st=nt(),{ref:ot}=st,at=Ke(st,bn),It=Ir(ot,Pe),De=m||(r=>{var a;return(a=r.label)!=null?a:r}),q=w({},h,{disablePortal:ne,expanded:Ve,focused:ce,fullWidth:Se,getOptionLabel:De,hasClearIcon:fe,hasPopupIcon:ue,inputFocused:oe===-1,popupOpen:Re,size:j}),F=jn(q);let ae;if(J&&P.length>0){const r=a=>w({className:F.tag,disabled:K},rt(a));d?ae=d(P,r,q):ae=P.map((a,i)=>{const x=r({index:i}),{key:A}=x,R=Ke(x,yn);return e.jsx(vt,w({label:De(a),size:j},R,H),A)})}if(Ee>-1&&Array.isArray(ae)){const r=ae.length-Ee;!ce&&r>0&&(ae=ae.splice(0,Ee),ae.push(e.jsx("span",{className:F.tag,children:l(r)},ae.length)))}const Tt=He||(r=>e.jsxs("li",{children:[e.jsx(kn,{className:F.groupLabel,ownerState:q,component:"div",children:r.group}),e.jsx(Rn,{className:F.groupUl,ownerState:q,children:r.children})]},r.key)),$t=G||((r,a)=>{const{key:i}=r,x=Ke(r,vn);return e.jsx("li",w({},x,{children:De(a)}),i)}),it=(r,a)=>{const i=X({option:r,index:a});return $t(w({},i,{className:F.option}),r,{selected:i["aria-selected"],index:a,inputValue:St},q)},qe=(b=he.clearIndicator)!=null?b:y.clearIndicator,$e=($=he.paper)!=null?$:y.paper,_e=(I=he.popper)!=null?I:y.popper,n=(s=he.popupIndicator)!=null?s:y.popupIndicator;return e.jsxs(p.Fragment,{children:[e.jsx(Cn,w({ref:c,className:We(F.root,L),ownerState:q},et(Ae),{children:Qe({id:ke,disabled:K,fullWidth:!0,size:j==="small"?"small":void 0,InputLabelProps:me(),InputProps:w({ref:Ge,className:F.inputRoot,startAdornment:ae,onClick:r=>{r.target===r.currentTarget&&we(r)}},(fe||ue)&&{endAdornment:e.jsxs(Sn,{className:F.endAdornment,ownerState:q,children:[fe?e.jsx(In,w({},Ct(),{"aria-label":u,title:u,ownerState:q},qe,{className:We(F.clearIndicator,qe==null?void 0:qe.className),children:ve})):null,ue?e.jsx(Tn,w({},tt(),{disabled:K,"aria-label":Re?v:W,title:Re?v:W,ownerState:q},n,{className:We(F.popupIndicator,n==null?void 0:n.className),children:jt})):null]})}),inputProps:w({className:F.input,disabled:K,readOnly:Z},Te())})})),ze?e.jsx(Pn,w({as:Le,disablePortal:ne,style:{width:ze?ze.clientWidth:null},ownerState:q,role:"presentation",anchorEl:ze,open:Re},_e,{className:We(F.popper,_e==null?void 0:_e.className),children:e.jsxs($n,w({ownerState:q,as:ee},$e,{className:We(F.paper,$e==null?void 0:$e.className),children:[Xe&&te.length===0?e.jsx(On,{className:F.loading,ownerState:q,children:Q}):null,te.length===0&&!Ce&&!Xe?e.jsx(Ln,{className:F.noOptions,ownerState:q,role:"presentation",onMouseDown:r=>{r.preventDefault()},children:Be}):null,te.length>0?e.jsx(An,w({as:Ie,className:F.listbox,ownerState:q},at,Fe,{ref:It,children:te.map((r,a)=>le?Tt({key:r.key,group:r.group,children:r.options.map((i,x)=>it(i,r.index+x))}):it(r,a))})):null]}))})):null]})});var wt={},zn=Ze;Object.defineProperty(wt,"__esModule",{value:!0});var mr=wt.default=void 0,wn=zn(Je()),Dn=e;mr=wt.default=(0,wn.default)((0,Dn.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");var Dt={},_n=Ze;Object.defineProperty(Dt,"__esModule",{value:!0});var br=Dt.default=void 0,Mn=_n(Je()),Wn=e;br=Dt.default=(0,Mn.default)((0,Wn.jsx)("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined");var _t={},Nn=Ze;Object.defineProperty(_t,"__esModule",{value:!0});var yr=_t.default=void 0,En=Nn(Je()),Fn=e;yr=_t.default=(0,En.default)((0,Fn.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");var Mt={},Bn=Ze;Object.defineProperty(Mt,"__esModule",{value:!0});var vr=Mt.default=void 0,Hn=Bn(Je()),Vn=e;vr=Mt.default=(0,Hn.default)((0,Vn.jsx)("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M10 5.47l4 1.4v11.66l-4-1.4zm-5 .99 3-1.01v11.7l-3 1.16zm14 11.08-3 1.01V6.86l3-1.16z"}),"MapOutlined");var Wt={},Gn=Ze;Object.defineProperty(Wt,"__esModule",{value:!0});var jr=Wt.default=void 0,qn=Gn(Je()),Kn=e;jr=Wt.default=(0,qn.default)((0,Kn.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"MyLocation");const Un=["retail","wholesale","manufacturer","distributor","services","ecommerce","other"],Jn=["newClient","contacted","onboarded","lost"],Zn=["Daily","Weekly","Fortnightly","Monthly","Occasional"],Xn=["basicOnly","full","none"],Yn=["Blue Dart","Delhivery","DTDC","India Post / Speed Post","The Professional Couriers","XpressBees","Ecom Express","Shadowfax","Safexpress","VRL Logistics","TCI (Transport Corporation of India)","Om Logistics","Best Roadways","MSS (Mettur Super Services)","ABT Travels & Logistics","Navata Road Transport","KRS (Kerala Roadways)","Parveen Travels / Parveen Express","SRM Transports","KPN Travels & KPN Speed Parcel","SRS Travels","Hindusthan Travels","City Travels","Essaar Travels","No. 1 Air Travels","A1 Travels","Krish Travels","Hebron Transports","Horma Travels","Vivegam Travels","PSS Transport","SRT (Renugambal Travels)","Thamarai Bus Transports","Rathimeena Travels","Ganesh Travels","John Kennedy Bus Service","Arun Travel","Saaji Meera Roadways","ARC Parcel Service","Chakra Travels & Parcel Service","MVA Parcel And Bus Service","Shrinath Travels & Cargo","Hans Travels","Zingbus","Kalpana Travels / City Land Travels","Trackon Couriers","North India Transways","RSRTC Cargo","UPSRTC Cargo"],Rt=["Chennai","Coimbatore","Madurai","Tiruchirappalli","Salem","Tuticorin","Tirupur","Erode","Vellore","Tirunelveli","Thanjavur","Dindigul","Hosur","Nagercoil","Karur","Namakkal","Kanchipuram","Cuddalore","Thoothukudi","Bengaluru","Mysuru","Mangaluru","Hubli","Belagavi","Kalaburagi","Davangere","Ballari","Kochi","Thiruvananthapuram","Kozhikode","Kannur","Thrissur","Kollam","Hyderabad","Warangal","Visakhapatnam","Vijayawada","Tirupati","Guntur","Rajahmundry","Nellore","Mumbai","Pune","Nagpur","Nashik","Aurangabad","Kolhapur","Solapur","New Delhi","Gurugram","Noida","Faridabad","Chandigarh","Amritsar","Ludhiana","Jalandhar","Ahmedabad","Surat","Vadodara","Rajkot","Bhavnagar","Jamnagar","Jaipur","Jodhpur","Udaipur","Kota","Bikaner","Lucknow","Kanpur","Varanasi","Agra","Prayagraj","Gorakhpur","Bhopal","Indore","Gwalior","Jabalpur","Raipur","Kolkata","Siliguri","Durgapur","Patna","Gaya","Ranchi","Jamshedpur","Bhubaneswar","Cuttack","Guwahati","Dibrugarh","Agartala","Imphal","Shillong","Aizawl","Dimapur","Dehradun","Haridwar","Shimla","Srinagar","Jammu","Leh","Panaji","Puducherry","Port Blair"],er={name:"",email:"",password:"",phone:"",city:"",businessState:"",businessType:"retail",status:"newClient",frequency:"Daily",parcelVolume:0,activeContracts:0,provider:"",efficiency:"",logisticsSegment:"",transitFrom:"",transitTo:"",neighbourhood:"",surveyAddress:"",surveyLat:"",surveyLng:"",dataConsent:"full",notes:"",pincode:""},ht=t=>typeof t=="string"?t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim():t,ft=(t,o)=>o&&!t.includes(o)?[o,...t]:t;function Qn({open:t,mode:o,initial:c,onClose:b,onSaved:$}){const I=o==="edit",[s,h]=p.useState(er),[k,E]=p.useState(!1),[D,_]=p.useState(null),[H,L]=p.useState(!1),ve=()=>{if(!navigator.geolocation){alert("Geolocation is not supported by your browser");return}L(!0),navigator.geolocation.getCurrentPosition(async u=>{const v=u.coords.latitude,y=u.coords.longitude;h(Y=>({...Y,surveyLat:v,surveyLng:y}));try{const V=await(await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${v}&lon=${y}`)).json();if(V&&V.address){const B=V.address,K=B.city||B.town||B.village||B.county||"",xe=B.state||"",je=B.postcode||"",ne=V.display_name||"";h(U=>({...U,city:K||U.city,businessState:xe||U.businessState,pincode:je||U.pincode,surveyAddress:ne||U.surveyAddress}))}}catch(Y){console.error("Reverse geocoding failed",Y)}finally{L(!1)}},u=>{alert("Unable to retrieve your location"),L(!1)})};p.useEffect(()=>{t&&(h({...er,...c||{}}),_(null))},[t,c]);const T=u=>v=>h(y=>({...y,[u]:v.target.value})),ge=async()=>{if(!s.name.trim()){_("Client name is required.");return}E(!0),_(null);const u=s.surveyLat===""?void 0:Number(s.surveyLat),v=s.surveyLng===""?void 0:Number(s.surveyLng),y={first_name:s.name.trim(),phone:s.phone,city:s.city,businessState:s.businessState,businessType:s.businessType,status:s.status,frequency:s.frequency,parcelVolume:Number(s.parcelVolume)||0,activeContracts:Number(s.activeContracts)||0,provider:s.provider,efficiency:s.efficiency,logisticsSegment:s.logisticsSegment,transitFrom:s.transitFrom,transitTo:s.transitTo,neighbourhood:s.neighbourhood,pincode:s.pincode,surveyAddress:s.surveyAddress,dataConsent:s.dataConsent,notes:s.notes,lastUpdated:new Date().toISOString().slice(0,10),registration_source:"web",...s.email.trim()?{email:s.email.trim()}:{},...u!=null?{survey_lat:u}:{},...v!=null?{survey_long:v}:{}};try{I?await Tr(c.id,y):await Pr({...y,...s.password?{password:s.password}:{}}),$()}catch(Y){_(Y.message||"Failed to save client")}finally{E(!1)}};return e.jsxs(cr,{open:t,onClose:k?void 0:b,maxWidth:"md",fullWidth:!0,children:[e.jsxs(ur,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[I?"Edit Client":"Add Client",e.jsx(Ne,{onClick:b,size:"small",disabled:k,children:e.jsx(Hr,{})})]}),e.jsxs(dr,{dividers:!0,children:[D&&e.jsx(fr,{severity:"error",sx:{mb:2},children:D}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Business"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0,mb:1},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Client Name *",value:s.name,onChange:T("name")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Phone",value:s.phone,onChange:T("phone")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Email",value:s.email,onChange:T("email")})}),!I&&e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Password",type:"password",value:s.password,onChange:T("password")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Business Type",value:s.businessType,onChange:T("businessType"),children:ft(Un,s.businessType).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Status",value:s.status,onChange:T("status"),children:ft(Jn,s.status).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Order Frequency",value:s.frequency,onChange:T("frequency"),children:ft(Zn,s.frequency).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Parcel Volume",value:s.parcelVolume,onChange:T("parcelVolume")})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Active Contracts",value:s.activeContracts,onChange:T("activeContracts")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Yn,value:s.provider||null,onChange:(u,v)=>h(y=>({...y,provider:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Current Provider"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Efficiency",value:s.efficiency,onChange:T("efficiency")})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Logistics Segment",value:s.logisticsSegment,onChange:T("logisticsSegment"),placeholder:"First Mile, Last Mile"})})]}),e.jsx(zt,{sx:{my:1.5}}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Location & Transit"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0,mb:1},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.city||null,onChange:(u,v)=>h(y=>({...y,city:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"City"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"State",value:s.businessState,onChange:T("businessState")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Pincode",value:s.pincode,onChange:T("pincode")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Neighbourhood / Zone",value:s.neighbourhood,onChange:T("neighbourhood")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.transitFrom||null,onChange:(u,v)=>h(y=>({...y,transitFrom:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Transit From"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.transitTo||null,onChange:(u,v)=>h(y=>({...y,transitTo:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Transit To"})})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Latitude",value:s.surveyLat,onChange:T("surveyLat")})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Longitude",value:s.surveyLng,onChange:T("surveyLng")})}),e.jsx(g,{item:!0,xs:12,sm:6,display:"flex",alignItems:"center",children:e.jsx(pe,{variant:"outlined",size:"small",onClick:ve,disabled:H,startIcon:H?e.jsx(bt,{size:16}):e.jsx(jr,{}),fullWidth:!0,children:"Get GPS Location"})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Survey Address",value:s.surveyAddress,onChange:T("surveyAddress"),multiline:!0,minRows:2})})]}),e.jsx(zt,{sx:{my:1.5}}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Other"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Data Consent",value:s.dataConsent,onChange:T("dataConsent"),children:ft(Xn,s.dataConsent).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Notes",value:s.notes,onChange:T("notes"),multiline:!0,minRows:2})})]})]}),e.jsxs(pr,{sx:{px:3,py:2},children:[e.jsx(pe,{onClick:b,disabled:k,children:"Cancel"}),e.jsx(pe,{variant:"contained",onClick:ge,disabled:k,startIcon:k?e.jsx(bt,{size:16,color:"inherit"}):null,children:I?"Save Changes":"Create Client"})]})]})}const es=t=>({full:"success",basiconly:"info",none:"default"})[String(t||"").toLowerCase()]||"default",ts=t=>{const o=String(t||"").toLowerCase();return/high|good|excellent/.test(o)?"success":/med|average|moderate/.test(o)?"warning":/low|poor|bad/.test(o)?"error":"info"},rs={textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700,color:"grey.700"};function be({label:t,color:o="default"}){return t==null||t===""?e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.500"},children:"—"}):e.jsx(vt,{size:"small",label:t,sx:{fontWeight:600,...o==="default"?{bgcolor:"grey.100",color:"grey.700"}:{bgcolor:`${o}.lighter`,color:`${o}.dark`}}})}function ie({label:t,children:o}){return e.jsxs(M,{children:[e.jsx(C,{variant:"caption",color:"text.secondary",sx:rs,children:t}),e.jsx(M,{sx:{mt:.5},children:o})]})}function xt({label:t,value:o}){return e.jsx(ie,{label:t,children:e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:o?"grey.800":"grey.500",wordBreak:"break-word"},children:o||"—"})})}function mt({icon:t,title:o,accent:c="primary",children:b}){return e.jsxs(M,{sx:{height:"100%",borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",overflow:"hidden"},children:[e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",sx:{px:2,py:1.25,borderBottom:1,borderColor:"divider",bgcolor:`${c}.lighter`,opacity:.999},children:[e.jsx(t,{sx:{fontSize:18,color:`${c}.main`}}),e.jsx(C,{variant:"overline",sx:{fontWeight:700,color:"grey.800",letterSpacing:.6,lineHeight:1},children:o})]}),e.jsx(z,{spacing:1.75,sx:{p:2},children:b})]})}function tr({label:t,value:o,icon:c,color:b="primary"}){return e.jsx(M,{sx:{flex:1,p:1.5,borderRadius:1.5,border:1,borderColor:"divider",bgcolor:"grey.50"},children:e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(M,{sx:{width:32,height:32,borderRadius:1,bgcolor:`${b}.lighter`,color:`${b}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(c,{sx:{fontSize:18}})}),e.jsxs(M,{children:[e.jsx(C,{variant:"h5",sx:{fontWeight:700,color:"grey.800",lineHeight:1.1},children:o}),e.jsx(C,{variant:"caption",color:"text.secondary",children:t})]})]})})}function rr({label:t,value:o,color:c="grey.800"}){return e.jsxs(M,{sx:{textAlign:"center",minWidth:56},children:[e.jsx(C,{variant:"body2",sx:{fontWeight:700,color:c,lineHeight:1.2},children:o}),e.jsx(C,{variant:"caption",color:"text.secondary",sx:{fontSize:"0.65rem"},children:t})]})}function ns({row:t,index:o,onEdit:c,onDelete:b}){const[$,I]=p.useState(!1);return e.jsxs(p.Fragment,{children:[e.jsxs(Ue,{hover:!0,sx:{cursor:"pointer","& > *":{borderBottom:$?"unset":void 0},...$&&{bgcolor:"primary.lighter","&:hover":{bgcolor:"primary.lighter"}}},onClick:()=>I(s=>!s),children:[e.jsx(N,{padding:"checkbox",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),I(h=>!h)},children:$?e.jsx(_r,{}):e.jsx(Mr,{})})}),e.jsx(N,{sx:{whiteSpace:"nowrap"},children:e.jsx(C,{variant:"caption",sx:{fontFamily:"monospace",fontWeight:700,color:"primary.main",bgcolor:"primary.lighter",px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:"primary.light",whiteSpace:"nowrap"},children:t.logicalId})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:1.25,alignItems:"center",children:[e.jsx(qt,{name:t.name,size:38}),e.jsxs(M,{sx:{minWidth:0},children:[e.jsx(C,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:t.name}),e.jsx(z,{direction:"row",spacing:.75,alignItems:"center",sx:{mt:.4},children:t.businessType&&e.jsx(vt,{size:"small",label:ye(t.businessType),sx:{height:20,fontSize:"0.68rem",fontWeight:600,bgcolor:"grey.100",color:"grey.700"}})})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(Fr,{sx:{fontSize:15,color:"grey.400"}}),e.jsxs(M,{children:[e.jsx(C,{variant:"body2",children:t.phone||"—"}),t.frequency&&e.jsx(C,{variant:"caption",color:"text.secondary",children:t.frequency})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(ut,{sx:{fontSize:15,color:"grey.400"}}),e.jsxs(M,{children:[e.jsxs(C,{variant:"body2",children:[t.city||"—",t.businessState?`, ${t.businessState}`:""]}),t.neighbourhood&&e.jsx(C,{variant:"caption",color:"text.secondary",children:t.neighbourhood})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:1.5,alignItems:"center",justifyContent:"center",divider:e.jsx(zt,{orientation:"vertical",flexItem:!0}),children:[e.jsx(rr,{label:"Parcels",value:Number(t.parcelVolume).toLocaleString()}),e.jsx(rr,{label:"Contracts",value:t.activeContracts,color:"primary.main"})]})}),e.jsx(N,{children:e.jsx(Ut,{status:t.status})}),e.jsxs(N,{align:"right",children:[e.jsx(At,{title:"Edit",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),c(t)},children:e.jsx(Kt,{fontSize:"small"})})}),e.jsx(At,{title:"Delete",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),b(t)},children:e.jsx(wr,{fontSize:"small"})})})]})]}),e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{py:0,borderBottom:$?void 0:"none"},children:e.jsx(Rr,{in:$,timeout:"auto",unmountOnExit:!0,children:e.jsxs(M,{sx:{m:2,borderRadius:2.5,border:1,borderColor:"divider",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},children:[e.jsxs(z,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{px:2.5,py:1.75,borderBottom:1,borderColor:"divider",background:s=>`linear-gradient(90deg, ${s.palette.primary.lighter}88 0%, ${s.palette.background.paper} 75%)`},children:[e.jsxs(z,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsx(qt,{name:t.name,size:40}),e.jsxs(M,{children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.2},children:t.name}),e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",sx:{mt:.25},children:[e.jsx(Ur,{sx:{fontSize:14,color:"grey.400"}}),e.jsx(C,{variant:"caption",color:"text.secondary",children:t.clientId})]})]}),e.jsx(Ut,{status:t.status,sx:{ml:.5}})]}),e.jsx(pe,{size:"small",variant:"contained",startIcon:e.jsx(Kt,{}),onClick:()=>c(t),children:"Edit Client"})]}),e.jsx(M,{sx:{p:2.5,bgcolor:"grey.50"},children:e.jsxs(g,{container:!0,spacing:2.5,alignItems:"stretch",children:[e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:Wr,title:"Business",accent:"primary",children:[e.jsxs(z,{direction:"row",spacing:1.5,children:[e.jsx(tr,{label:"Parcel Volume",value:Number(t.parcelVolume).toLocaleString(),icon:gr,color:"primary"}),e.jsx(tr,{label:"Active Contracts",value:t.activeContracts,icon:hr,color:"primary"})]}),e.jsx(ie,{label:"Client ID",children:e.jsx(C,{variant:"body2",sx:{fontFamily:"monospace",fontWeight:600,color:"grey.800"},children:t.clientId})}),e.jsx(ie,{label:"Business Type",children:e.jsx(be,{label:t.businessType&&ye(t.businessType),color:"primary"})}),e.jsx(ie,{label:"Order Frequency",children:e.jsx(be,{label:t.frequency&&ye(t.frequency),color:"info"})})]})}),e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:Br,title:"Logistics",accent:"primary",children:[e.jsx(ie,{label:"Logistics Segment",children:t.logisticsSegment?e.jsx(z,{direction:"row",spacing:.75,flexWrap:"wrap",useFlexGap:!0,children:String(t.logisticsSegment).split(/[,/]/).map(s=>s.trim()).filter(Boolean).map(s=>e.jsx(be,{label:ye(s),color:"primary"},s))}):e.jsx(be,{label:null})}),e.jsx(xt,{label:"Current Provider",value:t.provider}),e.jsx(ie,{label:"Efficiency",children:e.jsx(be,{label:t.efficiency&&ye(t.efficiency),color:ts(t.efficiency)})}),e.jsx(ie,{label:"Transit Route",children:(()=>{const s=[t.transitFrom,...String(t.transitTo||"").split(",")].map(h=>h.trim()).filter(Boolean);return s.length?e.jsx(z,{direction:"row",spacing:.75,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:s.map((h,k)=>e.jsxs(p.Fragment,{children:[k>0&&e.jsx(yr,{sx:{fontSize:20,color:"primary.main"}}),e.jsx(be,{label:ye(h),color:k===0?"default":"info"})]},`${h}-${k}`))}):e.jsx(be,{label:null})})()})]})}),e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:ut,title:"Location & Survey",accent:"primary",children:[e.jsx(ie,{label:"City / State",children:e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.800"},children:[t.city,t.businessState].filter(Boolean).join(", ")||"—"})}),e.jsx(xt,{label:"Neighbourhood",value:t.neighbourhood}),e.jsx(ie,{label:"Survey Address",children:e.jsxs(z,{direction:"row",spacing:1,sx:{p:1.25,borderRadius:1.5,bgcolor:"grey.50",border:1,borderColor:"divider"},children:[e.jsx(ut,{sx:{fontSize:16,color:"grey.400",mt:"2px"}}),e.jsx(C,{variant:"body2",sx:{color:"grey.800",lineHeight:1.5},children:t.surveyAddress||"—"})]})}),e.jsx(ie,{label:"Coordinates",children:t.surveyLat&&t.surveyLng?e.jsxs(z,{direction:"row",spacing:1.25,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(At,{title:`${t.surveyLat}, ${t.surveyLng}`,arrow:!0,placement:"top",children:e.jsxs(z,{direction:"row",spacing:.5,alignItems:"center",sx:{cursor:"default"},children:[e.jsx(ut,{sx:{fontSize:16,color:"grey.400"}}),e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.800",borderBottom:"1px dotted",borderColor:"grey.300"},children:[t.neighbourhood,t.city].filter(Boolean).join(", ")||"Pinned location"})]})}),e.jsx(pe,{component:"a",href:`https://www.google.com/maps?q=${t.surveyLat},${t.surveyLng}`,target:"_blank",rel:"noopener",size:"small",variant:"outlined",startIcon:e.jsx(vr,{sx:{fontSize:16}}),sx:{py:.25,px:1.25,minWidth:0,fontSize:"0.75rem",fontWeight:600,borderRadius:5,color:"primary.main",borderColor:"primary.100",bgcolor:"primary.lighter","&:hover":{borderColor:"primary.main",bgcolor:"primary.lighter"}},children:"View on map"})]}):e.jsx(C,{variant:"body2",sx:{color:"grey.500"},children:"—"})})]})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(mt,{icon:mr,title:"Contact & Compliance",accent:"primary",children:e.jsxs(g,{container:!0,spacing:2.5,children:[e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(xt,{label:"Phone",value:t.phone})}),e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(ie,{label:"Data Consent",children:e.jsx(be,{label:t.dataConsent&&ye(t.dataConsent),color:es(t.dataConsent)})})}),e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(xt,{label:"Last Updated",value:t.lastUpdated})}),t.notes&&e.jsx(g,{item:!0,xs:12,children:e.jsxs(M,{sx:{p:2,borderRadius:1.5,bgcolor:"warning.lighter",border:1,borderColor:"warning.light"},children:[e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",sx:{mb:.5},children:[e.jsx(br,{sx:{fontSize:16,color:"warning.dark"}}),e.jsx(C,{variant:"caption",sx:{color:"warning.dark",textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700},children:"Notes"})]}),e.jsx(C,{variant:"body2",sx:{color:"grey.800"},children:t.notes})]})})]})})})]})})]})})})})]})}function vs(){var Se;const[t,o]=p.useState([]),[c,b]=p.useState(!0),[$,I]=p.useState(null),[s]=$r(),[h,k]=p.useState(0),[E,D]=p.useState(s.get("q")||""),[_,H]=p.useState(0),[L,ve]=p.useState(10);p.useEffect(()=>{const l=s.get("q");l!=null&&(D(l),H(0))},[s]);const[T,ge]=p.useState({open:!1,mode:"add",initial:null}),[u,v]=p.useState(null),[y,Y]=p.useState(!1),V=(l=!1)=>{l||(b(!0),I(null)),Lr().then(m=>o(m.map(Ar))).catch(m=>{l||I(m.message||"Failed to load clients")}).finally(()=>{l||b(!1)})};p.useEffect(()=>{V();const l=setInterval(()=>{V(!0)},1e4);return()=>clearInterval(l)},[]);const B=p.useMemo(()=>({total:t.length,newCount:t.filter(l=>l.status==="newClient").length,parcels:t.reduce((l,m)=>l+(Number(m.parcelVolume)||0),0),contracts:t.reduce((l,m)=>l+(Number(m.activeContracts)||0),0)}),[t]),K=p.useMemo(()=>{const l=[];return t.forEach(m=>{l.includes(m.status)||l.push(m.status)}),[{key:"all",label:"All"},...l.map(m=>({key:m,label:ye(m)}))]},[t]),xe=((Se=K[Math.min(h,K.length-1)])==null?void 0:Se.key)||"all",je=p.useMemo(()=>{const l={all:t.length};return t.forEach(m=>{l[m.status]=(l[m.status]||0)+1}),l},[t]),ne=p.useMemo(()=>t.filter(l=>{const m=xe==="all"||l.status===xe,le=!E||[l.name,l.phone,l.city,l.businessType,l.clientId,l.neighbourhood].join(" ").toLowerCase().includes(E.toLowerCase());return m&&le}),[t,xe,E]),U=ne.slice(_*L,_*L+L),S=()=>{ge({open:!1,mode:"add",initial:null}),V()},Ce=async()=>{Y(!0);try{await kr(u.id),v(null),V()}catch(l){I(l.message||"Failed to delete client")}finally{Y(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Jr,{title:"Clients",breadcrumbs:[{label:"Clients"}],action:e.jsxs(z,{direction:"row",spacing:1.5,children:[e.jsx(pe,{variant:"outlined",startIcon:e.jsx(Dr,{}),onClick:V,disabled:c,children:"Refresh"}),e.jsx(pe,{variant:"contained",startIcon:e.jsx(zr,{}),onClick:()=>ge({open:!0,mode:"add",initial:null}),children:"Add Client"})]})}),e.jsxs(g,{container:!0,spacing:2.5,sx:{mb:3},children:[e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Total Clients",value:B.total,icon:Gt,caption:"All registered"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"New Clients",value:B.newCount,icon:Nr,color:"primary",caption:"Awaiting onboarding"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Total Parcel Volume",value:B.parcels.toLocaleString(),icon:gr,color:"primary",caption:"Across all clients"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Active Contracts",value:B.contracts,icon:hr,color:"primary",caption:"Currently running"})})]}),e.jsxs(Qr,{sx:{overflow:"hidden"},children:[e.jsxs(M,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:l=>`linear-gradient(90deg, ${l.palette.primary.lighter}66 0%, ${l.palette.background.paper} 70%)`},children:[e.jsx(M,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Gt,{fontSize:"small"})}),e.jsxs(M,{children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"Client Directory"}),e.jsx(C,{variant:"caption",color:"text.secondary",children:"Browse, search and manage every client account"})]})]}),e.jsxs(z,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(O,{size:"small",placeholder:"Search by name, phone, city, ID…",value:E,onChange:l=>{D(l.target.value),H(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(en,{position:"start",children:e.jsx(Or,{fontSize:"small"})})}}),e.jsx(M,{sx:{flexGrow:1}}),!c&&e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",children:[e.jsxs(C,{variant:"body2",color:"text.secondary",children:[ne.length," ",ne.length===1?"client":"clients"]}),e.jsx(vt,{size:"small",label:"live · doormile_clients",sx:{height:22,fontSize:"0.7rem",bgcolor:"success.lighter",color:"success.dark",fontWeight:600}})]})]}),e.jsx(M,{sx:{px:2,borderBottom:1,borderColor:"divider"},children:e.jsx(Vr,{value:Math.min(h,K.length-1),onChange:(l,m)=>{k(m),H(0)},variant:"scrollable",scrollButtons:"auto",children:K.map((l,m)=>e.jsx(Gr,{label:e.jsx(qr,{label:l.label,count:je[l.key]||0,active:h===m})},l.key))})}),$&&e.jsx(fr,{severity:"error",sx:{m:2},action:e.jsx(pe,{color:"inherit",size:"small",onClick:V,children:"Retry"}),children:$}),e.jsx(tn,{children:e.jsxs(rn,{sx:{minWidth:900},children:[e.jsx(nn,{children:e.jsxs(Ue,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(N,{padding:"checkbox"}),e.jsx(N,{children:"ID"}),e.jsx(N,{children:"Client"}),e.jsx(N,{children:"Contact"}),e.jsx(N,{children:"Location"}),e.jsx(N,{align:"center",children:"Volume"}),e.jsx(N,{children:"Status"}),e.jsx(N,{align:"right",children:"Actions"})]})}),e.jsx(sn,{children:c?e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{border:"none"},children:e.jsx(M,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(bt,{})})})}):U.length===0?e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{border:"none"},children:e.jsx(Zr,{title:"No clients found",caption:"Try a different tab or search term, or add a client."})})}):U.map((l,m)=>e.jsx(ns,{row:l,index:_*L+m,onEdit:le=>ge({open:!0,mode:"edit",initial:le}),onDelete:le=>v(le)},l.id))})]})}),e.jsx(Er,{component:"div",count:ne.length,page:_,onPageChange:(l,m)=>H(m),rowsPerPage:L,onRowsPerPageChange:l=>{ve(+l.target.value),H(0)},rowsPerPageOptions:[5,10,25]})]}),e.jsx(Qn,{open:T.open,mode:T.mode,initial:T.initial,onClose:()=>ge({open:!1,mode:"add",initial:null}),onSaved:S}),e.jsxs(cr,{open:!!u,onClose:y?void 0:()=>v(null),children:[e.jsx(ur,{children:"Delete client?"}),e.jsx(dr,{children:e.jsxs(Kr,{children:["This will permanently remove ",e.jsx("strong",{children:u==null?void 0:u.name})," from the doormile_clients collection. This cannot be undone."]})}),e.jsxs(pr,{sx:{px:3,py:2},children:[e.jsx(pe,{onClick:()=>v(null),disabled:y,children:"Cancel"}),e.jsx(pe,{color:"error",variant:"contained",onClick:Ce,disabled:y,startIcon:y?e.jsx(bt,{size:16,color:"inherit"}):null,children:"Delete"})]})]})]})}export{vs as default}; +import{a as p,u as Cr,h as Ot,k as lt,s as Sr,_ as w,l as nr,m as sr,n as or,o as Ke,j as e,p as We,q as yt,v as ar,w as re,P as ir,x as lr,y as Ir,z as Oe,I as Ne,A as Lt,r as Je,i as Ze,T as C,M as ct,D as zt,C as bt,E as Tr,F as Pr,G as $r,t as ye,S as z,d as Gt,B as M,H as Or,f as Lr,e as Ar,J as kr,U as qt,K as At,L as Rr}from"./index-DdJWTZFy.js";import{D as cr,a as ur,b as dr,c as pr,d as zr,e as Kt,f as wr}from"./DeleteOutline-DetaO5yn.js";import{d as Dr}from"./Refresh-DEoCZISD.js";import{d as _r,a as Mr,b as ut,c as Wr}from"./StorefrontOutlined-DupKwNFq.js";import{S as dt,d as Nr,a as gr,b as hr,c as Ut}from"./StatusChip-VSepiSqW.js";import{T as Er,d as Fr}from"./PhoneOutlined-CBkctqNs.js";import{d as Br}from"./LocalShippingOutlined-DRozEKne.js";import{d as Hr,T as Vr,a as Gr,b as qr,D as Kr,c as Ur}from"./Close-CknXfd8d.js";import{C as vt,G as g,P as Jr}from"./PageHeader-CdP5B6Qy.js";import{E as Zr}from"./EmptyState-CQsHTCg9.js";import{C as Xr,A as fr}from"./Alert-CzmzDPlp.js";import{A as Yr,f as Me,o as Jt,i as kt,T as O}from"./TextField-Btd7UbKs.js";import{B as pe}from"./Button-Bcwcjqrt.js";import{C as Qr}from"./Link-Dp34e72e.js";import{I as en}from"./InputAdornment-Bnl7vvhj.js";import{T as tn,a as rn,b as nn,c as Ue,d as N,e as sn}from"./TableRow-CEoQ4SIZ.js";const on=t=>{const o=p.useRef({});return p.useEffect(()=>{o.current=t}),o.current};function Zt(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function an(t={}){const{ignoreAccents:o=!0,ignoreCase:c=!0,limit:b,matchFrom:$="any",stringify:I,trim:s=!1}=t;return(h,{inputValue:k,getOptionLabel:E})=>{let D=s?k.trim():k;c&&(D=D.toLowerCase()),o&&(D=Zt(D));const _=D?h.filter(H=>{let L=(I||E)(H);return c&&(L=L.toLowerCase()),o&&(L=Zt(L)),$==="start"?L.indexOf(D)===0:L.indexOf(D)>-1}):h;return typeof b=="number"?_.slice(0,b):_}}function pt(t,o){for(let c=0;c{var o;return t.current!==null&&((o=t.current.parentElement)==null?void 0:o.contains(document.activeElement))},un=[];function dn(t){const{unstable_isActiveElementInListbox:o=cn,unstable_classNamePrefix:c="Mui",autoComplete:b=!1,autoHighlight:$=!1,autoSelect:I=!1,blurOnSelect:s=!1,clearOnBlur:h=!t.freeSolo,clearOnEscape:k=!1,componentName:E="useAutocomplete",defaultValue:D=t.multiple?un:null,disableClearable:_=!1,disableCloseOnSelect:H=!1,disabled:L,disabledItemsFocusable:ve=!1,disableListWrap:T=!1,filterOptions:ge=ln,filterSelectedOptions:u=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:Y,getOptionLabel:V=n=>{var r;return(r=n.label)!=null?r:n},groupBy:B,handleHomeEndKeys:K=!t.freeSolo,id:xe,includeInputInList:je=!1,inputValue:ne,isOptionEqualToValue:U=(n,r)=>n===r,multiple:S=!1,onChange:Ce,onClose:Se,onHighlightChange:l,onInputChange:m,onOpen:le,open:Nt,openOnFocus:Et=!1,options:Ee,readOnly:Ie=!1,selectOnFocus:Fe=!t.freeSolo,value:Xe}=t,Q=Cr(xe);let J=V;J=n=>{const r=V(n);return typeof r!="string"?String(r):r};const Be=p.useRef(!1),Ye=p.useRef(!0),W=p.useRef(null),ee=p.useRef(null),[Le,jt]=p.useState(null),[Z,He]=p.useState(-1),Qe=$?0:-1,G=p.useRef(Qe),[d,Ft]=Ot({controlled:Xe,default:D,name:E}),[j,he]=Ot({controlled:ne,default:"",name:E,state:"inputValue"}),[Ae,et]=p.useState(!1),Te=p.useCallback((n,r)=>{if(!(S?d.length!(u&&(S?d:[d]).some(r=>r!==null&&U(n,r)))),{inputValue:nt&&Ct?"":j,getOptionLabel:J}):[],se=on({filteredOptions:P,value:d,inputValue:j});p.useEffect(()=>{const n=d!==se.value;Ae&&!n||v&&!n||Te(null,d)},[d,Te,Ae,se.value,v]);const Ve=me&&P.length>0&&!Ie,ke=lt(n=>{n===-1?W.current.focus():Le.querySelector(`[data-tag-index="${n}"]`).focus()});p.useEffect(()=>{S&&Z>d.length-1&&(He(-1),ke(-1))},[d,S,Z,ke]);function Re(n,r){if(!ee.current||n<0||n>=P.length)return-1;let a=n;for(;;){const i=ee.current.querySelector(`[data-option-index="${a}"]`),x=ve?!1:!i||i.disabled||i.getAttribute("aria-disabled")==="true";if(i&&i.hasAttribute("tabindex")&&!x)return a;if(r==="next"?a=(a+1)%P.length:a=(a-1+P.length)%P.length,a===n)return-1}}const ce=lt(({event:n,index:r,reason:a="auto"})=>{if(G.current=r,r===-1?W.current.removeAttribute("aria-activedescendant"):W.current.setAttribute("aria-activedescendant",`${Q}-option-${r}`),l&&l(n,r===-1?null:P[r],a),!ee.current)return;const i=ee.current.querySelector(`[role="option"].${c}-focused`);i&&(i.classList.remove(`${c}-focused`),i.classList.remove(`${c}-focusVisible`));let x=ee.current;if(ee.current.getAttribute("role")!=="listbox"&&(x=ee.current.parentElement.querySelector('[role="listbox"]')),!x)return;if(r===-1){x.scrollTop=0;return}const A=ee.current.querySelector(`[data-option-index="${r}"]`);if(A&&(A.classList.add(`${c}-focused`),a==="keyboard"&&A.classList.add(`${c}-focusVisible`),x.scrollHeight>x.clientHeight&&a!=="mouse"&&a!=="touch")){const R=A,de=x.clientHeight+x.scrollTop,Vt=R.offsetTop+R.offsetHeight;Vt>de?x.scrollTop=Vt-x.clientHeight:R.offsetTop-R.offsetHeight*(B?1.3:0){if(!X)return;const A=Re((()=>{const R=P.length-1;if(r==="reset")return Qe;if(r==="start")return 0;if(r==="end")return R;const de=G.current+r;return de<0?de===-1&&je?-1:T&&G.current!==-1||Math.abs(r)>1?0:R:de>R?de===R+1&&je?-1:T||Math.abs(r)>1?R:0:de})(),a);if(ce({index:A,reason:i,event:n}),b&&r!=="reset")if(A===-1)W.current.value=j;else{const R=J(P[A]);W.current.value=R,R.toLowerCase().indexOf(j.toLowerCase())===0&&j.length>0&&W.current.setSelectionRange(j.length,R.length)}}),ze=()=>{const n=(r,a)=>{const i=r?J(r):"",x=a?J(a):"";return i===x};if(G.current!==-1&&se.filteredOptions&&se.filteredOptions.length!==P.length&&se.inputValue===j&&(S?d.length===se.value.length&&se.value.every((r,a)=>J(d[a])===J(r)):n(se.value,d))){const r=se.filteredOptions[G.current];if(r)return pt(P,a=>J(a)===J(r))}return-1},Ge=p.useCallback(()=>{if(!X)return;const n=ze();if(n!==-1){G.current=n;return}const r=S?d[0]:d;if(P.length===0||r==null){oe({diff:"reset"});return}if(ee.current){if(r!=null){const a=P[G.current];if(S&&a&&pt(d,x=>U(a,x))!==-1)return;const i=pt(P,x=>U(x,r));i===-1?oe({diff:"reset"}):ce({index:i});return}if(G.current>=P.length-1){ce({index:P.length-1});return}ce({index:G.current})}},[P.length,S?!1:d,u,oe,ce,X,j,S]),St=lt(n=>{Sr(ee,n),n&&Ge()});p.useEffect(()=>{Ge()},[Ge]);const te=n=>{me||(tt(!0),rt(!0),le&&le(n))},fe=(n,r)=>{me&&(tt(!1),Se&&Se(n,r))},ue=(n,r,a,i)=>{if(S){if(d.length===r.length&&d.every((x,A)=>x===r[A]))return}else if(d===r)return;Ce&&Ce(n,r,a,i),Ft(r)},we=p.useRef(!1),Pe=(n,r,a="selectOption",i="options")=>{let x=a,A=r;if(S){A=Array.isArray(d)?d.slice():[];const R=pt(A,de=>U(r,de));R===-1?A.push(r):i!=="freeSolo"&&(A.splice(R,1),x="removeOption")}Te(n,A),ue(n,A,x,{option:r}),!H&&(!n||!n.ctrlKey&&!n.metaKey)&&fe(n,x),(s===!0||s==="touch"&&we.current||s==="mouse"&&!we.current)&&W.current.blur()};function st(n,r){if(n===-1)return-1;let a=n;for(;;){if(r==="next"&&a===d.length||r==="previous"&&a===-1)return-1;const i=Le.querySelector(`[data-tag-index="${a}"]`);if(!i||!i.hasAttribute("tabindex")||i.disabled||i.getAttribute("aria-disabled")==="true")a+=r==="next"?1:-1;else return a}}const ot=(n,r)=>{if(!S)return;j===""&&fe(n,"toggleInput");let a=Z;Z===-1?j===""&&r==="previous"&&(a=d.length-1):(a+=r==="next"?1:-1,a<0&&(a=0),a===d.length&&(a=-1)),a=st(a,r),He(a),ke(a)},at=n=>{Be.current=!0,he(""),m&&m(n,"","clear"),ue(n,S?[]:null,"clear")},It=n=>r=>{if(n.onKeyDown&&n.onKeyDown(r),!r.defaultMuiPrevented&&(Z!==-1&&["ArrowLeft","ArrowRight"].indexOf(r.key)===-1&&(He(-1),ke(-1)),r.which!==229))switch(r.key){case"Home":X&&K&&(r.preventDefault(),oe({diff:"start",direction:"next",reason:"keyboard",event:r}));break;case"End":X&&K&&(r.preventDefault(),oe({diff:"end",direction:"previous",reason:"keyboard",event:r}));break;case"PageUp":r.preventDefault(),oe({diff:-Xt,direction:"previous",reason:"keyboard",event:r}),te(r);break;case"PageDown":r.preventDefault(),oe({diff:Xt,direction:"next",reason:"keyboard",event:r}),te(r);break;case"ArrowDown":r.preventDefault(),oe({diff:1,direction:"next",reason:"keyboard",event:r}),te(r);break;case"ArrowUp":r.preventDefault(),oe({diff:-1,direction:"previous",reason:"keyboard",event:r}),te(r);break;case"ArrowLeft":ot(r,"previous");break;case"ArrowRight":ot(r,"next");break;case"Enter":if(G.current!==-1&&X){const a=P[G.current],i=y?y(a):!1;if(r.preventDefault(),i)return;Pe(r,a,"selectOption"),b&&W.current.setSelectionRange(W.current.value.length,W.current.value.length)}else v&&j!==""&&nt===!1&&(S&&r.preventDefault(),Pe(r,j,"createOption","freeSolo"));break;case"Escape":X?(r.preventDefault(),r.stopPropagation(),fe(r,"escape")):k&&(j!==""||S&&d.length>0)&&(r.preventDefault(),r.stopPropagation(),at(r));break;case"Backspace":if(S&&!Ie&&j===""&&d.length>0){const a=Z===-1?d.length-1:Z,i=d.slice();i.splice(a,1),ue(r,i,"removeOption",{option:d[a]})}break;case"Delete":if(S&&!Ie&&j===""&&d.length>0&&Z!==-1){const a=Z,i=d.slice();i.splice(a,1),ue(r,i,"removeOption",{option:d[a]})}break}},Bt=n=>{et(!0),Et&&!Be.current&&te(n)},De=n=>{if(o(ee)){W.current.focus();return}et(!1),Ye.current=!0,Be.current=!1,I&&G.current!==-1&&X?Pe(n,P[G.current],"blur"):I&&v&&j!==""?Pe(n,j,"blur","freeSolo"):h&&Te(n,d),fe(n,"blur")},q=n=>{const r=n.target.value;j!==r&&(he(r),rt(!1),m&&m(n,r,"input")),r===""?!_&&!S&&ue(n,null,"clear"):te(n)},F=n=>{const r=Number(n.currentTarget.getAttribute("data-option-index"));G.current!==r&&ce({event:n,index:r,reason:"mouse"})},ae=n=>{ce({event:n,index:Number(n.currentTarget.getAttribute("data-option-index")),reason:"touch"}),we.current=!0},Ht=n=>{const r=Number(n.currentTarget.getAttribute("data-option-index"));Pe(n,P[r],"selectOption"),we.current=!1},Tt=n=>r=>{const a=d.slice();a.splice(n,1),ue(r,a,"removeOption",{option:d[n]})},Pt=n=>{me?fe(n,"toggleInput"):te(n)},$t=n=>{n.currentTarget.contains(n.target)&&n.target.getAttribute("id")!==Q&&n.preventDefault()},it=n=>{n.currentTarget.contains(n.target)&&(W.current.focus(),Fe&&Ye.current&&W.current.selectionEnd-W.current.selectionStart===0&&W.current.select(),Ye.current=!1)},qe=n=>{!L&&(j===""||!me)&&Pt(n)};let $e=v&&j.length>0;$e=$e||(S?d.length>0:d!==null);let _e=P;return B&&(_e=P.reduce((n,r,a)=>{const i=B(r);return n.length>0&&n[n.length-1].group===i?n[n.length-1].options.push(r):n.push({key:a,index:a,group:i,options:[r]}),n},[])),L&&Ae&&De(),{getRootProps:(n={})=>w({"aria-owns":Ve?`${Q}-listbox`:null},n,{onKeyDown:It(n),onMouseDown:$t,onClick:it}),getInputLabelProps:()=>({id:`${Q}-label`,htmlFor:Q}),getInputProps:()=>({id:Q,value:j,onBlur:De,onFocus:Bt,onChange:q,onMouseDown:qe,"aria-activedescendant":X?"":null,"aria-autocomplete":b?"both":"list","aria-controls":Ve?`${Q}-listbox`:void 0,"aria-expanded":Ve,autoComplete:"off",ref:W,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:L}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:at}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Pt}),getTagProps:({index:n})=>w({key:n,"data-tag-index":n,tabIndex:-1},!Ie&&{onDelete:Tt(n)}),getListboxProps:()=>({role:"listbox",id:`${Q}-listbox`,"aria-labelledby":`${Q}-label`,ref:St,onMouseDown:n=>{n.preventDefault()}}),getOptionProps:({index:n,option:r})=>{var a;const i=(S?d:[d]).some(A=>A!=null&&U(r,A)),x=y?y(r):!1;return{key:(a=Y==null?void 0:Y(r))!=null?a:J(r),tabIndex:-1,role:"option",id:`${Q}-option-${n}`,onMouseMove:F,onClick:Ht,onTouchStart:ae,"data-option-index":n,"aria-disabled":x,"aria-selected":i}},id:Q,inputValue:j,value:d,dirty:$e,expanded:X&&Le,popupOpen:X,focused:Ae||Z!==-1,anchorEl:Le,setAnchorEl:jt,focusedTag:Z,groupedOptions:_e}}function pn(t){return nr("MuiListSubheader",t)}sr("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const gn=["className","color","component","disableGutters","disableSticky","inset"],hn=t=>{const{classes:o,color:c,disableGutters:b,inset:$,disableSticky:I}=t,s={root:["root",c!=="default"&&`color${yt(c)}`,!b&&"gutters",$&&"inset",!I&&"sticky"]};return ar(s,pn,o)},fn=re("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:c}=t;return[o.root,c.color!=="default"&&o[`color${yt(c.color)}`],!c.disableGutters&&o.gutters,c.inset&&o.inset,!c.disableSticky&&o.sticky]}})(({theme:t,ownerState:o})=>w({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},o.color==="primary"&&{color:(t.vars||t).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),xr=p.forwardRef(function(o,c){const b=or({props:o,name:"MuiListSubheader"}),{className:$,color:I="default",component:s="li",disableGutters:h=!1,disableSticky:k=!1,inset:E=!1}=b,D=Ke(b,gn),_=w({},b,{color:I,component:s,disableGutters:h,disableSticky:k,inset:E}),H=hn(_);return e.jsx(fn,w({as:s,className:We(H.root,$),ref:c,ownerState:_},D))});xr.muiSkipListHighlight=!0;function xn(t){return nr("MuiAutocomplete",t)}const f=sr("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Yt,Qt;const mn=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],bn=["ref"],yn=["key"],vn=["key"],jn=t=>{const{classes:o,disablePortal:c,expanded:b,focused:$,fullWidth:I,hasClearIcon:s,hasPopupIcon:h,inputFocused:k,popupOpen:E,size:D}=t,_={root:["root",b&&"expanded",$&&"focused",I&&"fullWidth",s&&"hasClearIcon",h&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",k&&"inputFocused"],tag:["tag",`tagSize${yt(D)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",E&&"popupIndicatorOpen"],popper:["popper",c&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return ar(_,xn,o)},Cn=re("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:c}=t,{fullWidth:b,hasClearIcon:$,hasPopupIcon:I,inputFocused:s,size:h}=c;return[{[`& .${f.tag}`]:o.tag},{[`& .${f.tag}`]:o[`tagSize${yt(h)}`]},{[`& .${f.inputRoot}`]:o.inputRoot},{[`& .${f.input}`]:o.input},{[`& .${f.input}`]:s&&o.inputFocused},o.root,b&&o.fullWidth,I&&o.hasPopupIcon,$&&o.hasClearIcon]}})({[`&.${f.focused} .${f.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${f.clearIndicator}`]:{visibility:"visible"}},[`& .${f.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${f.inputRoot}`]:{[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:30},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:56},[`& .${f.input}`]:{width:0,minWidth:30}},[`& .${kt.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${kt.root}.${Oe.sizeSmall}`]:{[`& .${kt.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Jt.root}`]:{padding:9,[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:39},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:65},[`& .${f.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${f.endAdornment}`]:{right:9}},[`& .${Jt.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${f.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Me.root}`]:{paddingTop:19,paddingLeft:8,[`.${f.hasPopupIcon}&, .${f.hasClearIcon}&`]:{paddingRight:39},[`.${f.hasPopupIcon}.${f.hasClearIcon}&`]:{paddingRight:65},[`& .${Me.input}`]:{padding:"7px 4px"},[`& .${f.endAdornment}`]:{right:9}},[`& .${Me.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Me.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Me.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${f.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Me.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${f.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${f.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${f.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${f.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${f.inputRoot}`]:{flexWrap:"wrap"}}}]}),Sn=re("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,o)=>o.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),In=re(Ne,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Tn=re(Ne,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},o)=>w({},o.popupIndicator,t.popupOpen&&o.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Pn=re(lr,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,o)=>{const{ownerState:c}=t;return[{[`& .${f.option}`]:o.option},o.popper,c.disablePortal&&o.popperDisablePortal]}})(({theme:t})=>({zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),$n=re(ir,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,o)=>o.paper})(({theme:t})=>w({},t.typography.body1,{overflow:"auto"})),On=re("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,o)=>o.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),Ln=re("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,o)=>o.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),An=re("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,o)=>o.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${f.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${f.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${f.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${f.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Lt(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),kn=re(xr,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,o)=>o.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),Rn=re("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,o)=>o.groupUl})({padding:0,[`& .${f.option}`]:{paddingLeft:24}}),gt=p.forwardRef(function(o,c){var b,$,I,s;const h=or({props:o,name:"MuiAutocomplete"}),{autoComplete:k=!1,autoHighlight:E=!1,autoSelect:D=!1,blurOnSelect:_=!1,ChipProps:H,className:L,clearIcon:ve=Yt||(Yt=e.jsx(Xr,{fontSize:"small"})),clearOnBlur:T=!h.freeSolo,clearOnEscape:ge=!1,clearText:u="Clear",closeText:v="Close",componentsProps:y={},defaultValue:Y=h.multiple?[]:null,disableClearable:V=!1,disableCloseOnSelect:B=!1,disabled:K=!1,disabledItemsFocusable:xe=!1,disableListWrap:je=!1,disablePortal:ne=!1,filterSelectedOptions:U=!1,forcePopupIcon:S="auto",freeSolo:Ce=!1,fullWidth:Se=!1,getLimitTagsText:l=r=>`+${r}`,getOptionLabel:m,groupBy:le,handleHomeEndKeys:Nt=!h.freeSolo,includeInputInList:Et=!1,limitTags:Ee=-1,ListboxComponent:Ie="ul",ListboxProps:Fe,loading:Xe=!1,loadingText:Q="Loading…",multiple:J=!1,noOptionsText:Be="No options",openOnFocus:Ye=!1,openText:W="Open",PaperComponent:ee=ir,PopperComponent:Le=lr,popupIcon:jt=Qt||(Qt=e.jsx(Yr,{})),readOnly:Z=!1,renderGroup:He,renderInput:Qe,renderOption:G,renderTags:d,selectOnFocus:Ft=!h.freeSolo,size:j="medium",slotProps:he={}}=h,Ae=Ke(h,mn),{getRootProps:et,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:tt,getClearProps:Ct,getTagProps:rt,getListboxProps:nt,getOptionProps:X,value:P,dirty:se,expanded:Ve,id:ke,popupOpen:Re,focused:ce,focusedTag:oe,anchorEl:ze,setAnchorEl:Ge,inputValue:St,groupedOptions:te}=dn(w({},h,{componentName:"Autocomplete"})),fe=!V&&!K&&se&&!Z,ue=(!Ce||S===!0)&&S!==!1,{onMouseDown:we}=Te(),{ref:Pe}=Fe??{},st=nt(),{ref:ot}=st,at=Ke(st,bn),It=Ir(ot,Pe),De=m||(r=>{var a;return(a=r.label)!=null?a:r}),q=w({},h,{disablePortal:ne,expanded:Ve,focused:ce,fullWidth:Se,getOptionLabel:De,hasClearIcon:fe,hasPopupIcon:ue,inputFocused:oe===-1,popupOpen:Re,size:j}),F=jn(q);let ae;if(J&&P.length>0){const r=a=>w({className:F.tag,disabled:K},rt(a));d?ae=d(P,r,q):ae=P.map((a,i)=>{const x=r({index:i}),{key:A}=x,R=Ke(x,yn);return e.jsx(vt,w({label:De(a),size:j},R,H),A)})}if(Ee>-1&&Array.isArray(ae)){const r=ae.length-Ee;!ce&&r>0&&(ae=ae.splice(0,Ee),ae.push(e.jsx("span",{className:F.tag,children:l(r)},ae.length)))}const Tt=He||(r=>e.jsxs("li",{children:[e.jsx(kn,{className:F.groupLabel,ownerState:q,component:"div",children:r.group}),e.jsx(Rn,{className:F.groupUl,ownerState:q,children:r.children})]},r.key)),$t=G||((r,a)=>{const{key:i}=r,x=Ke(r,vn);return e.jsx("li",w({},x,{children:De(a)}),i)}),it=(r,a)=>{const i=X({option:r,index:a});return $t(w({},i,{className:F.option}),r,{selected:i["aria-selected"],index:a,inputValue:St},q)},qe=(b=he.clearIndicator)!=null?b:y.clearIndicator,$e=($=he.paper)!=null?$:y.paper,_e=(I=he.popper)!=null?I:y.popper,n=(s=he.popupIndicator)!=null?s:y.popupIndicator;return e.jsxs(p.Fragment,{children:[e.jsx(Cn,w({ref:c,className:We(F.root,L),ownerState:q},et(Ae),{children:Qe({id:ke,disabled:K,fullWidth:!0,size:j==="small"?"small":void 0,InputLabelProps:me(),InputProps:w({ref:Ge,className:F.inputRoot,startAdornment:ae,onClick:r=>{r.target===r.currentTarget&&we(r)}},(fe||ue)&&{endAdornment:e.jsxs(Sn,{className:F.endAdornment,ownerState:q,children:[fe?e.jsx(In,w({},Ct(),{"aria-label":u,title:u,ownerState:q},qe,{className:We(F.clearIndicator,qe==null?void 0:qe.className),children:ve})):null,ue?e.jsx(Tn,w({},tt(),{disabled:K,"aria-label":Re?v:W,title:Re?v:W,ownerState:q},n,{className:We(F.popupIndicator,n==null?void 0:n.className),children:jt})):null]})}),inputProps:w({className:F.input,disabled:K,readOnly:Z},Te())})})),ze?e.jsx(Pn,w({as:Le,disablePortal:ne,style:{width:ze?ze.clientWidth:null},ownerState:q,role:"presentation",anchorEl:ze,open:Re},_e,{className:We(F.popper,_e==null?void 0:_e.className),children:e.jsxs($n,w({ownerState:q,as:ee},$e,{className:We(F.paper,$e==null?void 0:$e.className),children:[Xe&&te.length===0?e.jsx(On,{className:F.loading,ownerState:q,children:Q}):null,te.length===0&&!Ce&&!Xe?e.jsx(Ln,{className:F.noOptions,ownerState:q,role:"presentation",onMouseDown:r=>{r.preventDefault()},children:Be}):null,te.length>0?e.jsx(An,w({as:Ie,className:F.listbox,ownerState:q},at,Fe,{ref:It,children:te.map((r,a)=>le?Tt({key:r.key,group:r.group,children:r.options.map((i,x)=>it(i,r.index+x))}):it(r,a))})):null]}))})):null]})});var wt={},zn=Ze;Object.defineProperty(wt,"__esModule",{value:!0});var mr=wt.default=void 0,wn=zn(Je()),Dn=e;mr=wt.default=(0,wn.default)((0,Dn.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");var Dt={},_n=Ze;Object.defineProperty(Dt,"__esModule",{value:!0});var br=Dt.default=void 0,Mn=_n(Je()),Wn=e;br=Dt.default=(0,Mn.default)((0,Wn.jsx)("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined");var _t={},Nn=Ze;Object.defineProperty(_t,"__esModule",{value:!0});var yr=_t.default=void 0,En=Nn(Je()),Fn=e;yr=_t.default=(0,En.default)((0,Fn.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");var Mt={},Bn=Ze;Object.defineProperty(Mt,"__esModule",{value:!0});var vr=Mt.default=void 0,Hn=Bn(Je()),Vn=e;vr=Mt.default=(0,Hn.default)((0,Vn.jsx)("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M10 5.47l4 1.4v11.66l-4-1.4zm-5 .99 3-1.01v11.7l-3 1.16zm14 11.08-3 1.01V6.86l3-1.16z"}),"MapOutlined");var Wt={},Gn=Ze;Object.defineProperty(Wt,"__esModule",{value:!0});var jr=Wt.default=void 0,qn=Gn(Je()),Kn=e;jr=Wt.default=(0,qn.default)((0,Kn.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"MyLocation");const Un=["retail","wholesale","manufacturer","distributor","services","ecommerce","other"],Jn=["newClient","contacted","onboarded","lost"],Zn=["Daily","Weekly","Fortnightly","Monthly","Occasional"],Xn=["basicOnly","full","none"],Yn=["Blue Dart","Delhivery","DTDC","India Post / Speed Post","The Professional Couriers","XpressBees","Ecom Express","Shadowfax","Safexpress","VRL Logistics","TCI (Transport Corporation of India)","Om Logistics","Best Roadways","MSS (Mettur Super Services)","ABT Travels & Logistics","Navata Road Transport","KRS (Kerala Roadways)","Parveen Travels / Parveen Express","SRM Transports","KPN Travels & KPN Speed Parcel","SRS Travels","Hindusthan Travels","City Travels","Essaar Travels","No. 1 Air Travels","A1 Travels","Krish Travels","Hebron Transports","Horma Travels","Vivegam Travels","PSS Transport","SRT (Renugambal Travels)","Thamarai Bus Transports","Rathimeena Travels","Ganesh Travels","John Kennedy Bus Service","Arun Travel","Saaji Meera Roadways","ARC Parcel Service","Chakra Travels & Parcel Service","MVA Parcel And Bus Service","Shrinath Travels & Cargo","Hans Travels","Zingbus","Kalpana Travels / City Land Travels","Trackon Couriers","North India Transways","RSRTC Cargo","UPSRTC Cargo"],Rt=["Chennai","Coimbatore","Madurai","Tiruchirappalli","Salem","Tuticorin","Tirupur","Erode","Vellore","Tirunelveli","Thanjavur","Dindigul","Hosur","Nagercoil","Karur","Namakkal","Kanchipuram","Cuddalore","Thoothukudi","Bengaluru","Mysuru","Mangaluru","Hubli","Belagavi","Kalaburagi","Davangere","Ballari","Kochi","Thiruvananthapuram","Kozhikode","Kannur","Thrissur","Kollam","Hyderabad","Warangal","Visakhapatnam","Vijayawada","Tirupati","Guntur","Rajahmundry","Nellore","Mumbai","Pune","Nagpur","Nashik","Aurangabad","Kolhapur","Solapur","New Delhi","Gurugram","Noida","Faridabad","Chandigarh","Amritsar","Ludhiana","Jalandhar","Ahmedabad","Surat","Vadodara","Rajkot","Bhavnagar","Jamnagar","Jaipur","Jodhpur","Udaipur","Kota","Bikaner","Lucknow","Kanpur","Varanasi","Agra","Prayagraj","Gorakhpur","Bhopal","Indore","Gwalior","Jabalpur","Raipur","Kolkata","Siliguri","Durgapur","Patna","Gaya","Ranchi","Jamshedpur","Bhubaneswar","Cuttack","Guwahati","Dibrugarh","Agartala","Imphal","Shillong","Aizawl","Dimapur","Dehradun","Haridwar","Shimla","Srinagar","Jammu","Leh","Panaji","Puducherry","Port Blair"],er={name:"",email:"",password:"",phone:"",city:"",businessState:"",businessType:"retail",status:"newClient",frequency:"Daily",parcelVolume:0,activeContracts:0,provider:"",efficiency:"",logisticsSegment:"",transitFrom:"",transitTo:"",neighbourhood:"",surveyAddress:"",surveyLat:"",surveyLng:"",dataConsent:"full",notes:"",pincode:""},ht=t=>typeof t=="string"?t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim():t,ft=(t,o)=>o&&!t.includes(o)?[o,...t]:t;function Qn({open:t,mode:o,initial:c,onClose:b,onSaved:$}){const I=o==="edit",[s,h]=p.useState(er),[k,E]=p.useState(!1),[D,_]=p.useState(null),[H,L]=p.useState(!1),ve=()=>{if(!navigator.geolocation){alert("Geolocation is not supported by your browser");return}L(!0),navigator.geolocation.getCurrentPosition(async u=>{const v=u.coords.latitude,y=u.coords.longitude;h(Y=>({...Y,surveyLat:v,surveyLng:y}));try{const V=await(await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${v}&lon=${y}`)).json();if(V&&V.address){const B=V.address,K=B.city||B.town||B.village||B.county||"",xe=B.state||"",je=B.postcode||"",ne=V.display_name||"";h(U=>({...U,city:K||U.city,businessState:xe||U.businessState,pincode:je||U.pincode,surveyAddress:ne||U.surveyAddress}))}}catch(Y){console.error("Reverse geocoding failed",Y)}finally{L(!1)}},u=>{alert("Unable to retrieve your location"),L(!1)})};p.useEffect(()=>{t&&(h({...er,...c||{}}),_(null))},[t,c]);const T=u=>v=>h(y=>({...y,[u]:v.target.value})),ge=async()=>{if(!s.name.trim()){_("Client name is required.");return}E(!0),_(null);const u=s.surveyLat===""?void 0:Number(s.surveyLat),v=s.surveyLng===""?void 0:Number(s.surveyLng),y={first_name:s.name.trim(),phone:s.phone,city:s.city,businessState:s.businessState,businessType:s.businessType,status:s.status,frequency:s.frequency,parcelVolume:Number(s.parcelVolume)||0,activeContracts:Number(s.activeContracts)||0,provider:s.provider,efficiency:s.efficiency,logisticsSegment:s.logisticsSegment,transitFrom:s.transitFrom,transitTo:s.transitTo,neighbourhood:s.neighbourhood,pincode:s.pincode,surveyAddress:s.surveyAddress,dataConsent:s.dataConsent,notes:s.notes,lastUpdated:new Date().toISOString().slice(0,10),registration_source:"web",...s.email.trim()?{email:s.email.trim()}:{},...u!=null?{survey_lat:u}:{},...v!=null?{survey_long:v}:{}};try{I?await Tr(c.id,y):await Pr({...y,...s.password?{password:s.password}:{}}),$()}catch(Y){_(Y.message||"Failed to save client")}finally{E(!1)}};return e.jsxs(cr,{open:t,onClose:k?void 0:b,maxWidth:"md",fullWidth:!0,children:[e.jsxs(ur,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[I?"Edit Client":"Add Client",e.jsx(Ne,{onClick:b,size:"small",disabled:k,children:e.jsx(Hr,{})})]}),e.jsxs(dr,{dividers:!0,children:[D&&e.jsx(fr,{severity:"error",sx:{mb:2},children:D}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Business"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0,mb:1},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Client Name *",value:s.name,onChange:T("name")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Phone",value:s.phone,onChange:T("phone")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Email",value:s.email,onChange:T("email")})}),!I&&e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Password",type:"password",value:s.password,onChange:T("password")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Business Type",value:s.businessType,onChange:T("businessType"),children:ft(Un,s.businessType).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Status",value:s.status,onChange:T("status"),children:ft(Jn,s.status).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Order Frequency",value:s.frequency,onChange:T("frequency"),children:ft(Zn,s.frequency).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Parcel Volume",value:s.parcelVolume,onChange:T("parcelVolume")})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Active Contracts",value:s.activeContracts,onChange:T("activeContracts")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Yn,value:s.provider||null,onChange:(u,v)=>h(y=>({...y,provider:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Current Provider"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Efficiency",value:s.efficiency,onChange:T("efficiency")})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Logistics Segment",value:s.logisticsSegment,onChange:T("logisticsSegment"),placeholder:"First Mile, Last Mile"})})]}),e.jsx(zt,{sx:{my:1.5}}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Location & Transit"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0,mb:1},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.city||null,onChange:(u,v)=>h(y=>({...y,city:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"City"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"State",value:s.businessState,onChange:T("businessState")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Pincode",value:s.pincode,onChange:T("pincode")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Neighbourhood / Zone",value:s.neighbourhood,onChange:T("neighbourhood")})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.transitFrom||null,onChange:(u,v)=>h(y=>({...y,transitFrom:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Transit From"})})}),e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(gt,{autoHighlight:!0,options:Rt,value:s.transitTo||null,onChange:(u,v)=>h(y=>({...y,transitTo:v||""})),renderInput:u=>e.jsx(O,{...u,fullWidth:!0,size:"small",label:"Transit To"})})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Latitude",value:s.surveyLat,onChange:T("surveyLat")})}),e.jsx(g,{item:!0,xs:12,sm:3,children:e.jsx(O,{fullWidth:!0,size:"small",type:"number",label:"Longitude",value:s.surveyLng,onChange:T("surveyLng")})}),e.jsx(g,{item:!0,xs:12,sm:6,display:"flex",alignItems:"center",children:e.jsx(pe,{variant:"outlined",size:"small",onClick:ve,disabled:H,startIcon:H?e.jsx(bt,{size:16}):e.jsx(jr,{}),fullWidth:!0,children:"Get GPS Location"})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Survey Address",value:s.surveyAddress,onChange:T("surveyAddress"),multiline:!0,minRows:2})})]}),e.jsx(zt,{sx:{my:1.5}}),e.jsx(C,{variant:"overline",color:"text.secondary",children:"Other"}),e.jsxs(g,{container:!0,spacing:2,sx:{mt:0},children:[e.jsx(g,{item:!0,xs:12,sm:6,children:e.jsx(O,{select:!0,fullWidth:!0,size:"small",label:"Data Consent",value:s.dataConsent,onChange:T("dataConsent"),children:ft(Xn,s.dataConsent).map(u=>e.jsx(ct,{value:u,children:ht(u)},u))})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(O,{fullWidth:!0,size:"small",label:"Notes",value:s.notes,onChange:T("notes"),multiline:!0,minRows:2})})]})]}),e.jsxs(pr,{sx:{px:3,py:2},children:[e.jsx(pe,{onClick:b,disabled:k,children:"Cancel"}),e.jsx(pe,{variant:"contained",onClick:ge,disabled:k,startIcon:k?e.jsx(bt,{size:16,color:"inherit"}):null,children:I?"Save Changes":"Create Client"})]})]})}const es=t=>({full:"success",basiconly:"info",none:"default"})[String(t||"").toLowerCase()]||"default",ts=t=>{const o=String(t||"").toLowerCase();return/high|good|excellent/.test(o)?"success":/med|average|moderate/.test(o)?"warning":/low|poor|bad/.test(o)?"error":"info"},rs={textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700,color:"grey.700"};function be({label:t,color:o="default"}){return t==null||t===""?e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.500"},children:"—"}):e.jsx(vt,{size:"small",label:t,sx:{fontWeight:600,...o==="default"?{bgcolor:"grey.100",color:"grey.700"}:{bgcolor:`${o}.lighter`,color:`${o}.dark`}}})}function ie({label:t,children:o}){return e.jsxs(M,{children:[e.jsx(C,{variant:"caption",color:"text.secondary",sx:rs,children:t}),e.jsx(M,{sx:{mt:.5},children:o})]})}function xt({label:t,value:o}){return e.jsx(ie,{label:t,children:e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:o?"grey.800":"grey.500",wordBreak:"break-word"},children:o||"—"})})}function mt({icon:t,title:o,accent:c="primary",children:b}){return e.jsxs(M,{sx:{height:"100%",borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",overflow:"hidden"},children:[e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",sx:{px:2,py:1.25,borderBottom:1,borderColor:"divider",bgcolor:`${c}.lighter`,opacity:.999},children:[e.jsx(t,{sx:{fontSize:18,color:`${c}.main`}}),e.jsx(C,{variant:"overline",sx:{fontWeight:700,color:"grey.800",letterSpacing:.6,lineHeight:1},children:o})]}),e.jsx(z,{spacing:1.75,sx:{p:2},children:b})]})}function tr({label:t,value:o,icon:c,color:b="primary"}){return e.jsx(M,{sx:{flex:1,p:1.5,borderRadius:1.5,border:1,borderColor:"divider",bgcolor:"grey.50"},children:e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(M,{sx:{width:32,height:32,borderRadius:1,bgcolor:`${b}.lighter`,color:`${b}.main`,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(c,{sx:{fontSize:18}})}),e.jsxs(M,{children:[e.jsx(C,{variant:"h5",sx:{fontWeight:700,color:"grey.800",lineHeight:1.1},children:o}),e.jsx(C,{variant:"caption",color:"text.secondary",children:t})]})]})})}function rr({label:t,value:o,color:c="grey.800"}){return e.jsxs(M,{sx:{textAlign:"center",minWidth:56},children:[e.jsx(C,{variant:"body2",sx:{fontWeight:700,color:c,lineHeight:1.2},children:o}),e.jsx(C,{variant:"caption",color:"text.secondary",sx:{fontSize:"0.65rem"},children:t})]})}function ns({row:t,index:o,onEdit:c,onDelete:b}){const[$,I]=p.useState(!1);return e.jsxs(p.Fragment,{children:[e.jsxs(Ue,{hover:!0,sx:{cursor:"pointer","& > *":{borderBottom:$?"unset":void 0},...$&&{bgcolor:"primary.lighter","&:hover":{bgcolor:"primary.lighter"}}},onClick:()=>I(s=>!s),children:[e.jsx(N,{padding:"checkbox",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),I(h=>!h)},children:$?e.jsx(_r,{}):e.jsx(Mr,{})})}),e.jsx(N,{sx:{whiteSpace:"nowrap"},children:e.jsx(C,{variant:"caption",sx:{fontFamily:"monospace",fontWeight:700,color:"primary.main",bgcolor:"primary.lighter",px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:"primary.light",whiteSpace:"nowrap"},children:t.logicalId})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:1.25,alignItems:"center",children:[e.jsx(qt,{name:t.name,size:38}),e.jsxs(M,{sx:{minWidth:0},children:[e.jsx(C,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},children:t.name}),e.jsx(z,{direction:"row",spacing:.75,alignItems:"center",sx:{mt:.4},children:t.businessType&&e.jsx(vt,{size:"small",label:ye(t.businessType),sx:{height:20,fontSize:"0.68rem",fontWeight:600,bgcolor:"grey.100",color:"grey.700"}})})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(Fr,{sx:{fontSize:15,color:"grey.400"}}),e.jsxs(M,{children:[e.jsx(C,{variant:"body2",children:t.phone||"—"}),t.frequency&&e.jsx(C,{variant:"caption",color:"text.secondary",children:t.frequency})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",children:[e.jsx(ut,{sx:{fontSize:15,color:"grey.400"}}),e.jsxs(M,{children:[e.jsxs(C,{variant:"body2",children:[t.city||"—",t.businessState?`, ${t.businessState}`:""]}),t.neighbourhood&&e.jsx(C,{variant:"caption",color:"text.secondary",children:t.neighbourhood})]})]})}),e.jsx(N,{children:e.jsxs(z,{direction:"row",spacing:1.5,alignItems:"center",justifyContent:"center",divider:e.jsx(zt,{orientation:"vertical",flexItem:!0}),children:[e.jsx(rr,{label:"Parcels",value:Number(t.parcelVolume).toLocaleString()}),e.jsx(rr,{label:"Contracts",value:t.activeContracts,color:"primary.main"})]})}),e.jsx(N,{children:e.jsx(Ut,{status:t.status})}),e.jsxs(N,{align:"right",children:[e.jsx(At,{title:"Edit",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),c(t)},children:e.jsx(Kt,{fontSize:"small"})})}),e.jsx(At,{title:"Delete",children:e.jsx(Ne,{size:"small",onClick:s=>{s.stopPropagation(),b(t)},children:e.jsx(wr,{fontSize:"small"})})})]})]}),e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{py:0,borderBottom:$?void 0:"none"},children:e.jsx(Rr,{in:$,timeout:"auto",unmountOnExit:!0,children:e.jsxs(M,{sx:{m:2,borderRadius:2.5,border:1,borderColor:"divider",overflow:"hidden",boxShadow:"0 4px 16px rgba(0,0,0,0.06)"},children:[e.jsxs(z,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:1.5,sx:{px:2.5,py:1.75,borderBottom:1,borderColor:"divider",background:s=>`linear-gradient(90deg, ${s.palette.primary.lighter}88 0%, ${s.palette.background.paper} 75%)`},children:[e.jsxs(z,{direction:"row",spacing:1.5,alignItems:"center",children:[e.jsx(qt,{name:t.name,size:40}),e.jsxs(M,{children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.2},children:t.name}),e.jsxs(z,{direction:"row",spacing:.75,alignItems:"center",sx:{mt:.25},children:[e.jsx(Ur,{sx:{fontSize:14,color:"grey.400"}}),e.jsx(C,{variant:"caption",color:"text.secondary",children:t.clientId})]})]}),e.jsx(Ut,{status:t.status,sx:{ml:.5}})]}),e.jsx(pe,{size:"small",variant:"contained",startIcon:e.jsx(Kt,{}),onClick:()=>c(t),children:"Edit Client"})]}),e.jsx(M,{sx:{p:2.5,bgcolor:"grey.50"},children:e.jsxs(g,{container:!0,spacing:2.5,alignItems:"stretch",children:[e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:Wr,title:"Business",accent:"primary",children:[e.jsxs(z,{direction:"row",spacing:1.5,children:[e.jsx(tr,{label:"Parcel Volume",value:Number(t.parcelVolume).toLocaleString(),icon:gr,color:"primary"}),e.jsx(tr,{label:"Active Contracts",value:t.activeContracts,icon:hr,color:"primary"})]}),e.jsx(ie,{label:"Client ID",children:e.jsx(C,{variant:"body2",sx:{fontFamily:"monospace",fontWeight:600,color:"grey.800"},children:t.clientId})}),e.jsx(ie,{label:"Business Type",children:e.jsx(be,{label:t.businessType&&ye(t.businessType),color:"primary"})}),e.jsx(ie,{label:"Order Frequency",children:e.jsx(be,{label:t.frequency&&ye(t.frequency),color:"info"})})]})}),e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:Br,title:"Logistics",accent:"primary",children:[e.jsx(ie,{label:"Logistics Segment",children:t.logisticsSegment?e.jsx(z,{direction:"row",spacing:.75,flexWrap:"wrap",useFlexGap:!0,children:String(t.logisticsSegment).split(/[,/]/).map(s=>s.trim()).filter(Boolean).map(s=>e.jsx(be,{label:ye(s),color:"primary"},s))}):e.jsx(be,{label:null})}),e.jsx(xt,{label:"Current Provider",value:t.provider}),e.jsx(ie,{label:"Efficiency",children:e.jsx(be,{label:t.efficiency&&ye(t.efficiency),color:ts(t.efficiency)})}),e.jsx(ie,{label:"Transit Route",children:(()=>{const s=[t.transitFrom,...String(t.transitTo||"").split(",")].map(h=>h.trim()).filter(Boolean);return s.length?e.jsx(z,{direction:"row",spacing:.75,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:s.map((h,k)=>e.jsxs(p.Fragment,{children:[k>0&&e.jsx(yr,{sx:{fontSize:20,color:"primary.main"}}),e.jsx(be,{label:ye(h),color:k===0?"default":"info"})]},`${h}-${k}`))}):e.jsx(be,{label:null})})()})]})}),e.jsx(g,{item:!0,xs:12,md:4,children:e.jsxs(mt,{icon:ut,title:"Location & Survey",accent:"primary",children:[e.jsx(ie,{label:"City / State",children:e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.800"},children:[t.city,t.businessState].filter(Boolean).join(", ")||"—"})}),e.jsx(xt,{label:"Neighbourhood",value:t.neighbourhood}),e.jsx(ie,{label:"Survey Address",children:e.jsxs(z,{direction:"row",spacing:1,sx:{p:1.25,borderRadius:1.5,bgcolor:"grey.50",border:1,borderColor:"divider"},children:[e.jsx(ut,{sx:{fontSize:16,color:"grey.400",mt:"2px"}}),e.jsx(C,{variant:"body2",sx:{color:"grey.800",lineHeight:1.5},children:t.surveyAddress||"—"})]})}),e.jsx(ie,{label:"Coordinates",children:t.surveyLat&&t.surveyLng?e.jsxs(z,{direction:"row",spacing:1.25,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(At,{title:`${t.surveyLat}, ${t.surveyLng}`,arrow:!0,placement:"top",children:e.jsxs(z,{direction:"row",spacing:.5,alignItems:"center",sx:{cursor:"default"},children:[e.jsx(ut,{sx:{fontSize:16,color:"grey.400"}}),e.jsx(C,{variant:"body2",sx:{fontWeight:500,color:"grey.800",borderBottom:"1px dotted",borderColor:"grey.300"},children:[t.neighbourhood,t.city].filter(Boolean).join(", ")||"Pinned location"})]})}),e.jsx(pe,{component:"a",href:`https://www.google.com/maps?q=${t.surveyLat},${t.surveyLng}`,target:"_blank",rel:"noopener",size:"small",variant:"outlined",startIcon:e.jsx(vr,{sx:{fontSize:16}}),sx:{py:.25,px:1.25,minWidth:0,fontSize:"0.75rem",fontWeight:600,borderRadius:5,color:"primary.main",borderColor:"primary.100",bgcolor:"primary.lighter","&:hover":{borderColor:"primary.main",bgcolor:"primary.lighter"}},children:"View on map"})]}):e.jsx(C,{variant:"body2",sx:{color:"grey.500"},children:"—"})})]})}),e.jsx(g,{item:!0,xs:12,children:e.jsx(mt,{icon:mr,title:"Contact & Compliance",accent:"primary",children:e.jsxs(g,{container:!0,spacing:2.5,children:[e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(xt,{label:"Phone",value:t.phone})}),e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(ie,{label:"Data Consent",children:e.jsx(be,{label:t.dataConsent&&ye(t.dataConsent),color:es(t.dataConsent)})})}),e.jsx(g,{item:!0,xs:12,sm:6,md:4,children:e.jsx(xt,{label:"Last Updated",value:t.lastUpdated})}),t.notes&&e.jsx(g,{item:!0,xs:12,children:e.jsxs(M,{sx:{p:2,borderRadius:1.5,bgcolor:"warning.lighter",border:1,borderColor:"warning.light"},children:[e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",sx:{mb:.5},children:[e.jsx(br,{sx:{fontSize:16,color:"warning.dark"}}),e.jsx(C,{variant:"caption",sx:{color:"warning.dark",textTransform:"uppercase",letterSpacing:.4,fontSize:"0.68rem",fontWeight:700},children:"Notes"})]}),e.jsx(C,{variant:"body2",sx:{color:"grey.800"},children:t.notes})]})})]})})})]})})]})})})})]})}function vs(){var Se;const[t,o]=p.useState([]),[c,b]=p.useState(!0),[$,I]=p.useState(null),[s]=$r(),[h,k]=p.useState(0),[E,D]=p.useState(s.get("q")||""),[_,H]=p.useState(0),[L,ve]=p.useState(10);p.useEffect(()=>{const l=s.get("q");l!=null&&(D(l),H(0))},[s]);const[T,ge]=p.useState({open:!1,mode:"add",initial:null}),[u,v]=p.useState(null),[y,Y]=p.useState(!1),V=(l=!1)=>{l||(b(!0),I(null)),Lr().then(m=>o(m.map(Ar))).catch(m=>{l||I(m.message||"Failed to load clients")}).finally(()=>{l||b(!1)})};p.useEffect(()=>{V();const l=setInterval(()=>{V(!0)},1e4);return()=>clearInterval(l)},[]);const B=p.useMemo(()=>({total:t.length,newCount:t.filter(l=>l.status==="newClient").length,parcels:t.reduce((l,m)=>l+(Number(m.parcelVolume)||0),0),contracts:t.reduce((l,m)=>l+(Number(m.activeContracts)||0),0)}),[t]),K=p.useMemo(()=>{const l=[];return t.forEach(m=>{l.includes(m.status)||l.push(m.status)}),[{key:"all",label:"All"},...l.map(m=>({key:m,label:ye(m)}))]},[t]),xe=((Se=K[Math.min(h,K.length-1)])==null?void 0:Se.key)||"all",je=p.useMemo(()=>{const l={all:t.length};return t.forEach(m=>{l[m.status]=(l[m.status]||0)+1}),l},[t]),ne=p.useMemo(()=>t.filter(l=>{const m=xe==="all"||l.status===xe,le=!E||[l.name,l.phone,l.city,l.businessType,l.clientId,l.neighbourhood].join(" ").toLowerCase().includes(E.toLowerCase());return m&&le}),[t,xe,E]),U=ne.slice(_*L,_*L+L),S=()=>{ge({open:!1,mode:"add",initial:null}),V()},Ce=async()=>{Y(!0);try{await kr(u.id),v(null),V()}catch(l){I(l.message||"Failed to delete client")}finally{Y(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Jr,{title:"Clients",breadcrumbs:[{label:"Clients"}],action:e.jsxs(z,{direction:"row",spacing:1.5,children:[e.jsx(pe,{variant:"outlined",startIcon:e.jsx(Dr,{}),onClick:V,disabled:c,children:"Refresh"}),e.jsx(pe,{variant:"contained",startIcon:e.jsx(zr,{}),onClick:()=>ge({open:!0,mode:"add",initial:null}),children:"Add Client"})]})}),e.jsxs(g,{container:!0,spacing:2.5,sx:{mb:3},children:[e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Total Clients",value:B.total,icon:Gt,caption:"All registered"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"New Clients",value:B.newCount,icon:Nr,color:"primary",caption:"Awaiting onboarding"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Total Parcel Volume",value:B.parcels.toLocaleString(),icon:gr,color:"primary",caption:"Across all clients"})}),e.jsx(g,{item:!0,xs:12,sm:6,lg:3,children:e.jsx(dt,{accent:!0,title:"Active Contracts",value:B.contracts,icon:hr,color:"primary",caption:"Currently running"})})]}),e.jsxs(Qr,{sx:{overflow:"hidden"},children:[e.jsxs(M,{sx:{px:2.5,py:2,borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,background:l=>`linear-gradient(90deg, ${l.palette.primary.lighter}66 0%, ${l.palette.background.paper} 70%)`},children:[e.jsx(M,{sx:{width:40,height:40,borderRadius:2,bgcolor:"primary.lighter",color:"primary.main",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Gt,{fontSize:"small"})}),e.jsxs(M,{children:[e.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,color:"grey.800",lineHeight:1.2},children:"Client Directory"}),e.jsx(C,{variant:"caption",color:"text.secondary",children:"Browse, search and manage every client account"})]})]}),e.jsxs(z,{direction:{xs:"column",md:"row"},spacing:1.5,sx:{p:2},alignItems:{md:"center"},children:[e.jsx(O,{size:"small",placeholder:"Search by name, phone, city, ID…",value:E,onChange:l=>{D(l.target.value),H(0)},sx:{minWidth:300},InputProps:{startAdornment:e.jsx(en,{position:"start",children:e.jsx(Or,{fontSize:"small"})})}}),e.jsx(M,{sx:{flexGrow:1}}),!c&&e.jsxs(z,{direction:"row",spacing:1,alignItems:"center",children:[e.jsxs(C,{variant:"body2",color:"text.secondary",children:[ne.length," ",ne.length===1?"client":"clients"]}),e.jsx(vt,{size:"small",label:"live · doormile_clients",sx:{height:22,fontSize:"0.7rem",bgcolor:"success.lighter",color:"success.dark",fontWeight:600}})]})]}),e.jsx(M,{sx:{px:2,borderBottom:1,borderColor:"divider"},children:e.jsx(Vr,{value:Math.min(h,K.length-1),onChange:(l,m)=>{k(m),H(0)},variant:"scrollable",scrollButtons:"auto",children:K.map((l,m)=>e.jsx(Gr,{label:e.jsx(qr,{label:l.label,count:je[l.key]||0,active:h===m})},l.key))})}),$&&e.jsx(fr,{severity:"error",sx:{m:2},action:e.jsx(pe,{color:"inherit",size:"small",onClick:V,children:"Retry"}),children:$}),e.jsx(tn,{children:e.jsxs(rn,{sx:{minWidth:900},children:[e.jsx(nn,{children:e.jsxs(Ue,{sx:{"& th":{bgcolor:"grey.50",fontWeight:700,color:"grey.700",textTransform:"uppercase",fontSize:"0.72rem",letterSpacing:.4}},children:[e.jsx(N,{padding:"checkbox"}),e.jsx(N,{children:"ID"}),e.jsx(N,{children:"Client"}),e.jsx(N,{children:"Contact"}),e.jsx(N,{children:"Location"}),e.jsx(N,{align:"center",children:"Volume"}),e.jsx(N,{children:"Status"}),e.jsx(N,{align:"right",children:"Actions"})]})}),e.jsx(sn,{children:c?e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{border:"none"},children:e.jsx(M,{sx:{display:"flex",justifyContent:"center",py:6},children:e.jsx(bt,{})})})}):U.length===0?e.jsx(Ue,{children:e.jsx(N,{colSpan:8,sx:{border:"none"},children:e.jsx(Zr,{title:"No clients found",caption:"Try a different tab or search term, or add a client."})})}):U.map((l,m)=>e.jsx(ns,{row:l,index:_*L+m,onEdit:le=>ge({open:!0,mode:"edit",initial:le}),onDelete:le=>v(le)},l.id))})]})}),e.jsx(Er,{component:"div",count:ne.length,page:_,onPageChange:(l,m)=>H(m),rowsPerPage:L,onRowsPerPageChange:l=>{ve(+l.target.value),H(0)},rowsPerPageOptions:[5,10,25]})]}),e.jsx(Qn,{open:T.open,mode:T.mode,initial:T.initial,onClose:()=>ge({open:!1,mode:"add",initial:null}),onSaved:S}),e.jsxs(cr,{open:!!u,onClose:y?void 0:()=>v(null),children:[e.jsx(ur,{children:"Delete client?"}),e.jsx(dr,{children:e.jsxs(Kr,{children:["This will permanently remove ",e.jsx("strong",{children:u==null?void 0:u.name})," from the doormile_clients collection. This cannot be undone."]})}),e.jsxs(pr,{sx:{px:3,py:2},children:[e.jsx(pe,{onClick:()=>v(null),disabled:y,children:"Cancel"}),e.jsx(pe,{color:"error",variant:"contained",onClick:Ce,disabled:y,startIcon:y?e.jsx(bt,{size:16,color:"inherit"}):null,children:"Delete"})]})]})]})}export{vs as default}; diff --git a/dist/assets/TextField-CWImxk_G.js b/dist/assets/TextField-Btd7UbKs.js similarity index 99% rename from dist/assets/TextField-CWImxk_G.js rename to dist/assets/TextField-Btd7UbKs.js index c8524eb..726a646 100644 --- a/dist/assets/TextField-CWImxk_G.js +++ b/dist/assets/TextField-Btd7UbKs.js @@ -1 +1 @@ -import{_ as r,z as Se,m as A,l as U,a3 as co,j as m,a as f,n as K,o as T,aw as ke,a4 as Pe,v as _,w as C,ax as Me,ay as Oe,V as Q,az as Ne,aA as we,aB as Fe,aC as po,aD as $e,at as fo,p as Y,q,ap as de,aq as ue,h as De,y as Je,a2 as mo,aE as bo,u as Qe,aF as vo,aG as go,aH as ho}from"./index-CkS0O37G.js";function xo(e){return U("MuiInput",e)}const le=r({},Se,A("MuiInput",["root","underline","input"]));function Co(e){return U("MuiOutlinedInput",e)}const J=r({},Se,A("MuiOutlinedInput",["root","notchedOutline","input"]));function Io(e){return U("MuiFilledInput",e)}const ee=r({},Se,A("MuiFilledInput",["root","underline","input"])),Ro=co(m.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),yo=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Fo=e=>{const{classes:o,disableUnderline:t}=e,s=_({root:["root",!t&&"underline"],input:["input"]},Io,o);return r({},o,s)},$o=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Oe(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{var t;const n=e.palette.mode==="light",s=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",d=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",u=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return r({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d}},[`&.${ee.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d},[`&.${ee.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:u}},!o.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t=(e.vars||e).palette[o.color||"primary"])==null?void 0:t.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ee.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ee.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:s}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ee.disabled}, .${ee.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ee.disabled}:before`]:{borderBottomStyle:"dotted"}},o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&r({padding:"25px 12px 8px"},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9}))}),So=C(Ne,{name:"MuiFilledInput",slot:"Input",overridesResolver:we})(({theme:e,ownerState:o})=>r({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9},o.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Le=f.forwardRef(function(o,t){var n,s,d,a;const u=K({props:o,name:"MuiFilledInput"}),{components:c={},componentsProps:l,fullWidth:p=!1,inputComponent:v="input",multiline:g=!1,slotProps:I,slots:x={},type:S="text"}=u,F=T(u,yo),$=r({},u,{fullWidth:p,inputComponent:v,multiline:g,type:S}),R=Fo(u),k={root:{ownerState:$},input:{ownerState:$}},b=I??l?ke(k,I??l):k,w=(n=(s=x.root)!=null?s:c.Root)!=null?n:$o,O=(d=(a=x.input)!=null?a:c.Input)!=null?d:So;return m.jsx(Pe,r({slots:{root:w,input:O},componentsProps:b,fullWidth:p,inputComponent:v,multiline:g,ref:t,type:S},F,{classes:R}))});Le.muiName="Input";function ko(e){return U("MuiFormControl",e)}A("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Po=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Mo=e=>{const{classes:o,margin:t,fullWidth:n}=e,s={root:["root",t!=="none"&&`margin${q(t)}`,n&&"fullWidth"]};return _(s,ko,o)},Oo=C("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},o)=>r({},o.root,o[`margin${q(e.margin)}`],e.fullWidth&&o.fullWidth)})(({ownerState:e})=>r({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),No=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormControl"}),{children:s,className:d,color:a="primary",component:u="div",disabled:c=!1,error:l=!1,focused:p,fullWidth:v=!1,hiddenLabel:g=!1,margin:I="none",required:x=!1,size:S="medium",variant:F="outlined"}=n,$=T(n,Po),R=r({},n,{color:a,component:u,disabled:c,error:l,fullWidth:v,hiddenLabel:g,margin:I,required:x,size:S,variant:F}),k=Mo(R),[b,w]=f.useState(()=>{let P=!1;return s&&f.Children.forEach(s,M=>{if(!Fe(M,["Input","Select"]))return;const E=Fe(M,["Select"])?M.props.input:M;E&&po(E.props)&&(P=!0)}),P}),[O,L]=f.useState(()=>{let P=!1;return s&&f.Children.forEach(s,M=>{Fe(M,["Input","Select"])&&($e(M.props,!0)||$e(M.props.inputProps,!0))&&(P=!0)}),P}),[z,j]=f.useState(!1);c&&z&&j(!1);const D=p!==void 0&&!c?p:z;let H;const V=f.useMemo(()=>({adornedStart:b,setAdornedStart:w,color:a,disabled:c,error:l,filled:O,focused:D,fullWidth:v,hiddenLabel:g,size:S,onBlur:()=>{j(!1)},onEmpty:()=>{L(!1)},onFilled:()=>{L(!0)},onFocus:()=>{j(!0)},registerEffect:H,required:x,variant:F}),[b,a,c,l,O,D,v,g,H,x,S,F]);return m.jsx(fo.Provider,{value:V,children:m.jsx(Oo,r({as:u,ownerState:R,className:Y(k.root,d),ref:t},$,{children:s}))})});function wo(e){return U("MuiFormHelperText",e)}const He=A("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ve;const Lo=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Wo=e=>{const{classes:o,contained:t,size:n,disabled:s,error:d,filled:a,focused:u,required:c}=e,l={root:["root",s&&"disabled",d&&"error",n&&`size${q(n)}`,t&&"contained",u&&"focused",a&&"filled",c&&"required"]};return _(l,wo,o)},Bo=C("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.size&&o[`size${q(t.size)}`],t.contained&&o.contained,t.filled&&o.filled]}})(({theme:e,ownerState:o})=>r({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${He.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${He.error}`]:{color:(e.vars||e).palette.error.main}},o.size==="small"&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})),To=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormHelperText"}),{children:s,className:d,component:a="p"}=n,u=T(n,Lo),c=de(),l=ue({props:n,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),p=r({},n,{component:a,contained:l.variant==="filled"||l.variant==="outlined",variant:l.variant,size:l.size,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),v=Wo(p);return m.jsx(Bo,r({as:a,ownerState:p,className:Y(v.root,d),ref:t},u,{children:s===" "?Ve||(Ve=m.jsx("span",{className:"notranslate",children:"​"})):s}))});function zo(e){return U("MuiFormLabel",e)}const ae=A("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Eo=["children","className","color","component","disabled","error","filled","focused","required"],jo=e=>{const{classes:o,color:t,focused:n,disabled:s,error:d,filled:a,required:u}=e,c={root:["root",`color${q(t)}`,s&&"disabled",d&&"error",a&&"filled",n&&"focused",u&&"required"],asterisk:["asterisk",d&&"error"]};return _(c,zo,o)},Ao=C("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},o)=>r({},o.root,e.color==="secondary"&&o.colorSecondary,e.filled&&o.filled)})(({theme:e,ownerState:o})=>r({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ae.focused}`]:{color:(e.vars||e).palette[o.color].main},[`&.${ae.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ae.error}`]:{color:(e.vars||e).palette.error.main}})),Uo=C("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${ae.error}`]:{color:(e.vars||e).palette.error.main}})),_o=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormLabel"}),{children:s,className:d,component:a="label"}=n,u=T(n,Eo),c=de(),l=ue({props:n,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),p=r({},n,{color:l.color||"primary",component:a,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),v=jo(p);return m.jsxs(Ao,r({as:a,ownerState:p,className:Y(v.root,d),ref:t},u,{children:[s,l.required&&m.jsxs(Uo,{ownerState:p,"aria-hidden":!0,className:v.asterisk,children:[" ","*"]})]}))}),qo=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Do=e=>{const{classes:o,disableUnderline:t}=e,s=_({root:["root",!t&&"underline"],input:["input"]},xo,o);return r({},o,s)},Ho=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Oe(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),r({position:"relative"},o.formControl&&{"label + &":{marginTop:16}},!o.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${le.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${le.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${le.disabled}, .${le.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${le.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Vo=C(Ne,{name:"MuiInput",slot:"Input",overridesResolver:we})({}),We=f.forwardRef(function(o,t){var n,s,d,a;const u=K({props:o,name:"MuiInput"}),{disableUnderline:c,components:l={},componentsProps:p,fullWidth:v=!1,inputComponent:g="input",multiline:I=!1,slotProps:x,slots:S={},type:F="text"}=u,$=T(u,qo),R=Do(u),b={root:{ownerState:{disableUnderline:c}}},w=x??p?ke(x??p,b):b,O=(n=(s=S.root)!=null?s:l.Root)!=null?n:Ho,L=(d=(a=S.input)!=null?a:l.Input)!=null?d:Vo;return m.jsx(Pe,r({slots:{root:O,input:L},slotProps:w,fullWidth:v,inputComponent:g,multiline:I,ref:t,type:F},$,{classes:R}))});We.muiName="Input";function Ko(e){return U("MuiInputLabel",e)}A("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Xo=["disableAnimation","margin","shrink","variant","className"],Go=e=>{const{classes:o,formControl:t,size:n,shrink:s,disableAnimation:d,variant:a,required:u}=e,c={root:["root",t&&"formControl",!d&&"animated",s&&"shrink",n&&n!=="normal"&&`size${q(n)}`,a],asterisk:[u&&"asterisk"]},l=_(c,Ko,o);return r({},o,l)},Jo=C(_o,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${ae.asterisk}`]:o.asterisk},o.root,t.formControl&&o.formControl,t.size==="small"&&o.sizeSmall,t.shrink&&o.shrink,!t.disableAnimation&&o.animated,t.focused&&o.focused,o[t.variant]]}})(({theme:e,ownerState:o})=>r({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},o.size==="small"&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},o.variant==="filled"&&r({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&r({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},o.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),o.variant==="outlined"&&r({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Qo=f.forwardRef(function(o,t){const n=K({name:"MuiInputLabel",props:o}),{disableAnimation:s=!1,shrink:d,className:a}=n,u=T(n,Xo),c=de();let l=d;typeof l>"u"&&c&&(l=c.filled||c.focused||c.adornedStart);const p=ue({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),v=r({},n,{disableAnimation:s,formControl:c,shrink:l,size:p.size,variant:p.variant,required:p.required,focused:p.focused}),g=Go(v);return m.jsx(Jo,r({"data-shrink":l,ownerState:v,ref:t,className:Y(g.root,a)},u,{classes:g}))});function Yo(e){return U("MuiNativeSelect",e)}const Be=A("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Zo=["className","disabled","error","IconComponent","inputRef","variant"],et=e=>{const{classes:o,variant:t,disabled:n,multiple:s,open:d,error:a}=e,u={select:["select",t,n&&"disabled",s&&"multiple",a&&"error"],icon:["icon",`icon${q(t)}`,d&&"iconOpen",n&&"disabled"]};return _(u,Yo,o)},Ye=({ownerState:e,theme:o})=>r({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":r({},o.vars?{backgroundColor:`rgba(${o.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:o.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Be.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(o.vars||o).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(o.vars||o).shape.borderRadius,"&:focus":{borderRadius:(o.vars||o).shape.borderRadius},"&&&":{paddingRight:32}}),ot=C("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Q,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.select,o[t.variant],t.error&&o.error,{[`&.${Be.multiple}`]:o.multiple}]}})(Ye),Ze=({ownerState:e,theme:o})=>r({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(o.vars||o).palette.action.active,[`&.${Be.disabled}`]:{color:(o.vars||o).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),tt=C("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${q(t.variant)}`],t.open&&o.iconOpen]}})(Ze),nt=f.forwardRef(function(o,t){const{className:n,disabled:s,error:d,IconComponent:a,inputRef:u,variant:c="standard"}=o,l=T(o,Zo),p=r({},o,{disabled:s,variant:c,error:d}),v=et(p);return m.jsxs(f.Fragment,{children:[m.jsx(ot,r({ownerState:p,className:Y(v.select,n),disabled:s,ref:u||t},l)),o.multiple?null:m.jsx(tt,{as:a,ownerState:p,className:v.icon})]})});var Ke;const rt=["children","classes","className","label","notched"],st=C("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Q})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),lt=C("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Q})(({ownerState:e,theme:o})=>r({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:o.transitions.create("width",{duration:150,easing:o.transitions.easing.easeOut})},e.withLabel&&r({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:o.transitions.create("max-width",{duration:50,easing:o.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:o.transitions.create("max-width",{duration:100,easing:o.transitions.easing.easeOut,delay:50})})));function it(e){const{className:o,label:t,notched:n}=e,s=T(e,rt),d=t!=null&&t!=="",a=r({},e,{notched:n,withLabel:d});return m.jsx(st,r({"aria-hidden":!0,className:o,ownerState:a},s,{children:m.jsx(lt,{ownerState:a,children:d?m.jsx("span",{children:t}):Ke||(Ke=m.jsx("span",{className:"notranslate",children:"​"}))})}))}const at=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],dt=e=>{const{classes:o}=e,n=_({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Co,o);return r({},o,n)},ut=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Oe})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return r({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${J.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${J.focused} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette[o.color].main,borderWidth:2},[`&.${J.error} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${J.disabled} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&r({padding:"16.5px 14px"},o.size==="small"&&{padding:"8.5px 14px"}))}),ct=C(it,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,o)=>o.notchedOutline})(({theme:e})=>{const o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:o}}),pt=C(Ne,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:we})(({theme:e,ownerState:o})=>r({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{padding:"8.5px 14px"},o.multiline&&{padding:0},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0})),Te=f.forwardRef(function(o,t){var n,s,d,a,u;const c=K({props:o,name:"MuiOutlinedInput"}),{components:l={},fullWidth:p=!1,inputComponent:v="input",label:g,multiline:I=!1,notched:x,slots:S={},type:F="text"}=c,$=T(c,at),R=dt(c),k=de(),b=ue({props:c,muiFormControl:k,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=r({},c,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:k,fullWidth:p,hiddenLabel:b.hiddenLabel,multiline:I,size:b.size,type:F}),O=(n=(s=S.root)!=null?s:l.Root)!=null?n:ut,L=(d=(a=S.input)!=null?a:l.Input)!=null?d:pt;return m.jsx(Pe,r({slots:{root:O,input:L},renderSuffix:z=>m.jsx(ct,{ownerState:w,className:R.notchedOutline,label:g!=null&&g!==""&&b.required?u||(u=m.jsxs(f.Fragment,{children:[g," ","*"]})):g,notched:typeof x<"u"?x:!!(z.startAdornment||z.filled||z.focused)}),fullWidth:p,inputComponent:v,multiline:I,ref:t,type:F},$,{classes:r({},R,{notchedOutline:null})}))});Te.muiName="Input";function ft(e){return U("MuiSelect",e)}const ie=A("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Xe;const mt=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],bt=C("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`&.${ie.select}`]:o.select},{[`&.${ie.select}`]:o[t.variant]},{[`&.${ie.error}`]:o.error},{[`&.${ie.multiple}`]:o.multiple}]}})(Ye,{[`&.${ie.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),vt=C("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${q(t.variant)}`],t.open&&o.iconOpen]}})(Ze),gt=C("input",{shouldForwardProp:e=>go(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,o)=>o.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ge(e,o){return typeof o=="object"&&o!==null?e===o:String(e)===String(o)}function ht(e){return e==null||typeof e=="string"&&!e.trim()}const xt=e=>{const{classes:o,variant:t,disabled:n,multiple:s,open:d,error:a}=e,u={select:["select",t,n&&"disabled",s&&"multiple",a&&"error"],icon:["icon",`icon${q(t)}`,d&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return _(u,ft,o)},Ct=f.forwardRef(function(o,t){var n;const{"aria-describedby":s,"aria-label":d,autoFocus:a,autoWidth:u,children:c,className:l,defaultOpen:p,defaultValue:v,disabled:g,displayEmpty:I,error:x=!1,IconComponent:S,inputRef:F,labelId:$,MenuProps:R={},multiple:k,name:b,onBlur:w,onChange:O,onClose:L,onFocus:z,onOpen:j,open:D,readOnly:H,renderValue:V,SelectDisplayProps:P={},tabIndex:M,value:E,variant:X="standard"}=o,G=T(o,mt),[y,Z]=De({controlled:E,default:v,name:"Select"}),[ce,pe]=De({controlled:D,default:p,name:"Select"}),fe=f.useRef(null),B=f.useRef(null),[W,re]=f.useState(null),{current:oe}=f.useRef(D!=null),[Ce,se]=f.useState(),oo=Je(t,F),to=f.useCallback(i=>{B.current=i,i&&re(i)},[]),me=W==null?void 0:W.parentNode;f.useImperativeHandle(oo,()=>({focus:()=>{B.current.focus()},node:fe.current,value:y}),[y]),f.useEffect(()=>{p&&ce&&W&&!oe&&(se(u?null:me.clientWidth),B.current.focus())},[W,u]),f.useEffect(()=>{a&&B.current.focus()},[a]),f.useEffect(()=>{if(!$)return;const i=mo(B.current).getElementById($);if(i){const h=()=>{getSelection().isCollapsed&&B.current.focus()};return i.addEventListener("click",h),()=>{i.removeEventListener("click",h)}}},[$]);const be=(i,h)=>{i?j&&j(h):L&&L(h),oe||(se(u?null:me.clientWidth),pe(i))},no=i=>{i.button===0&&(i.preventDefault(),B.current.focus(),be(!0,i))},ro=i=>{be(!1,i)},Ee=f.Children.toArray(c),so=i=>{const h=Ee.find(N=>N.props.value===i.target.value);h!==void 0&&(Z(h.props.value),O&&O(i,h))},lo=i=>h=>{let N;if(h.currentTarget.hasAttribute("tabindex")){if(k){N=Array.isArray(y)?y.slice():[];const ne=y.indexOf(i.props.value);ne===-1?N.push(i.props.value):N.splice(ne,1)}else N=i.props.value;if(i.props.onClick&&i.props.onClick(h),y!==N&&(Z(N),O)){const ne=h.nativeEvent||h,qe=new ne.constructor(ne.type,ne);Object.defineProperty(qe,"target",{writable:!0,value:{value:N,name:b}}),O(qe,i)}k||be(!1,h)}},io=i=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(i.key)!==-1&&(i.preventDefault(),be(!0,i))},ve=W!==null&&ce,ao=i=>{!ve&&w&&(Object.defineProperty(i,"target",{writable:!0,value:{value:y,name:b}}),w(i))};delete G["aria-invalid"];let te,je;const ge=[];let he=!1;($e({value:y})||I)&&(V?te=V(y):he=!0);const uo=Ee.map(i=>{if(!f.isValidElement(i))return null;let h;if(k){if(!Array.isArray(y))throw new Error(bo(2));h=y.some(N=>Ge(N,i.props.value)),h&&he&&ge.push(i.props.children)}else h=Ge(y,i.props.value),h&&he&&(je=i.props.children);return f.cloneElement(i,{"aria-selected":h?"true":"false",onClick:lo(i),onKeyUp:N=>{N.key===" "&&N.preventDefault(),i.props.onKeyUp&&i.props.onKeyUp(N)},role:"option",selected:h,value:void 0,"data-value":i.props.value})});he&&(k?ge.length===0?te=null:te=ge.reduce((i,h,N)=>(i.push(h),N{const{classes:o}=e;return o},ze={name:"MuiSelect",overridesResolver:(e,o)=>o.root,shouldForwardProp:e=>Q(e)&&e!=="variant",slot:"Root"},Ft=C(We,ze)(""),$t=C(Te,ze)(""),St=C(Le,ze)(""),eo=f.forwardRef(function(o,t){const n=K({name:"MuiSelect",props:o}),{autoWidth:s=!1,children:d,classes:a={},className:u,defaultOpen:c=!1,displayEmpty:l=!1,IconComponent:p=Ro,id:v,input:g,inputProps:I,label:x,labelId:S,MenuProps:F,multiple:$=!1,native:R=!1,onClose:k,onOpen:b,open:w,renderValue:O,SelectDisplayProps:L,variant:z="outlined"}=n,j=T(n,It),D=R?nt:Ct,H=de(),V=ue({props:n,muiFormControl:H,states:["variant","error"]}),P=V.variant||z,M=r({},n,{variant:P,classes:a}),E=yt(M),X=T(E,Rt),G=g||{standard:m.jsx(Ft,{ownerState:M}),outlined:m.jsx($t,{label:x,ownerState:M}),filled:m.jsx(St,{ownerState:M})}[P],y=Je(t,ho(G));return m.jsx(f.Fragment,{children:f.cloneElement(G,r({inputComponent:D,inputProps:r({children:d,error:V.error,IconComponent:p,variant:P,type:void 0,multiple:$},R?{id:v}:{autoWidth:s,defaultOpen:c,displayEmpty:l,labelId:S,MenuProps:F,onClose:k,onOpen:b,open:w,renderValue:O,SelectDisplayProps:r({id:v},L)},I,{classes:I?ke(X,I.classes):X},g?g.props.inputProps:{})},($&&R||l)&&P==="outlined"?{notched:!0}:{},{ref:y,className:Y(G.props.className,u,E.root)},!g&&{variant:P},j))})});eo.muiName="Select";function kt(e){return U("MuiTextField",e)}A("MuiTextField",["root"]);const Pt=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Mt={standard:We,filled:Le,outlined:Te},Ot=e=>{const{classes:o}=e;return _({root:["root"]},kt,o)},Nt=C(No,{name:"MuiTextField",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Lt=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiTextField"}),{autoComplete:s,autoFocus:d=!1,children:a,className:u,color:c="primary",defaultValue:l,disabled:p=!1,error:v=!1,FormHelperTextProps:g,fullWidth:I=!1,helperText:x,id:S,InputLabelProps:F,inputProps:$,InputProps:R,inputRef:k,label:b,maxRows:w,minRows:O,multiline:L=!1,name:z,onBlur:j,onChange:D,onFocus:H,placeholder:V,required:P=!1,rows:M,select:E=!1,SelectProps:X,type:G,value:y,variant:Z="outlined"}=n,ce=T(n,Pt),pe=r({},n,{autoFocus:d,color:c,disabled:p,error:v,fullWidth:I,multiline:L,required:P,select:E,variant:Z}),fe=Ot(pe),B={};Z==="outlined"&&(F&&typeof F.shrink<"u"&&(B.notched=F.shrink),B.label=b),E&&((!X||!X.native)&&(B.id=void 0),B["aria-describedby"]=void 0);const W=Qe(S),re=x&&W?`${W}-helper-text`:void 0,oe=b&&W?`${W}-label`:void 0,Ce=Mt[Z],se=m.jsx(Ce,r({"aria-describedby":re,autoComplete:s,autoFocus:d,defaultValue:l,fullWidth:I,multiline:L,name:z,rows:M,maxRows:w,minRows:O,type:G,value:y,id:W,inputRef:k,onBlur:j,onChange:D,onFocus:H,placeholder:V,inputProps:$},B,R));return m.jsxs(Nt,r({className:Y(fe.root,u),disabled:p,error:v,fullWidth:I,ref:t,required:P,color:c,variant:Z,ownerState:pe},ce,{children:[b!=null&&b!==""&&m.jsx(Qo,r({htmlFor:W,id:oe},F,{children:b})),E?m.jsx(eo,r({"aria-describedby":re,id:W,labelId:oe,value:y,input:se},X,{children:a})):se,x&&m.jsx(To,r({id:re},g,{children:x}))]}))});export{Ro as A,eo as S,Lt as T,ee as f,le as i,J as o}; +import{_ as r,z as Se,m as A,l as U,a3 as co,j as m,a as f,n as K,o as T,aw as ke,a4 as Pe,v as _,w as C,ax as Me,ay as Oe,V as Q,az as Ne,aA as we,aB as Fe,aC as po,aD as $e,at as fo,p as Y,q,ap as de,aq as ue,h as De,y as Je,a2 as mo,aE as bo,u as Qe,aF as vo,aG as go,aH as ho}from"./index-DdJWTZFy.js";function xo(e){return U("MuiInput",e)}const le=r({},Se,A("MuiInput",["root","underline","input"]));function Co(e){return U("MuiOutlinedInput",e)}const J=r({},Se,A("MuiOutlinedInput",["root","notchedOutline","input"]));function Io(e){return U("MuiFilledInput",e)}const ee=r({},Se,A("MuiFilledInput",["root","underline","input"])),Ro=co(m.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),yo=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Fo=e=>{const{classes:o,disableUnderline:t}=e,s=_({root:["root",!t&&"underline"],input:["input"]},Io,o);return r({},o,s)},$o=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Oe(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{var t;const n=e.palette.mode==="light",s=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",d=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",u=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return r({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d}},[`&.${ee.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:d},[`&.${ee.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:u}},!o.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t=(e.vars||e).palette[o.color||"primary"])==null?void 0:t.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ee.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ee.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:s}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ee.disabled}, .${ee.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ee.disabled}:before`]:{borderBottomStyle:"dotted"}},o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&r({padding:"25px 12px 8px"},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9}))}),So=C(Ne,{name:"MuiFilledInput",slot:"Input",overridesResolver:we})(({theme:e,ownerState:o})=>r({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0},o.hiddenLabel&&o.size==="small"&&{paddingTop:8,paddingBottom:9},o.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),Le=f.forwardRef(function(o,t){var n,s,d,a;const u=K({props:o,name:"MuiFilledInput"}),{components:c={},componentsProps:l,fullWidth:p=!1,inputComponent:v="input",multiline:g=!1,slotProps:I,slots:x={},type:S="text"}=u,F=T(u,yo),$=r({},u,{fullWidth:p,inputComponent:v,multiline:g,type:S}),R=Fo(u),k={root:{ownerState:$},input:{ownerState:$}},b=I??l?ke(k,I??l):k,w=(n=(s=x.root)!=null?s:c.Root)!=null?n:$o,O=(d=(a=x.input)!=null?a:c.Input)!=null?d:So;return m.jsx(Pe,r({slots:{root:w,input:O},componentsProps:b,fullWidth:p,inputComponent:v,multiline:g,ref:t,type:S},F,{classes:R}))});Le.muiName="Input";function ko(e){return U("MuiFormControl",e)}A("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Po=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Mo=e=>{const{classes:o,margin:t,fullWidth:n}=e,s={root:["root",t!=="none"&&`margin${q(t)}`,n&&"fullWidth"]};return _(s,ko,o)},Oo=C("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},o)=>r({},o.root,o[`margin${q(e.margin)}`],e.fullWidth&&o.fullWidth)})(({ownerState:e})=>r({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),No=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormControl"}),{children:s,className:d,color:a="primary",component:u="div",disabled:c=!1,error:l=!1,focused:p,fullWidth:v=!1,hiddenLabel:g=!1,margin:I="none",required:x=!1,size:S="medium",variant:F="outlined"}=n,$=T(n,Po),R=r({},n,{color:a,component:u,disabled:c,error:l,fullWidth:v,hiddenLabel:g,margin:I,required:x,size:S,variant:F}),k=Mo(R),[b,w]=f.useState(()=>{let P=!1;return s&&f.Children.forEach(s,M=>{if(!Fe(M,["Input","Select"]))return;const E=Fe(M,["Select"])?M.props.input:M;E&&po(E.props)&&(P=!0)}),P}),[O,L]=f.useState(()=>{let P=!1;return s&&f.Children.forEach(s,M=>{Fe(M,["Input","Select"])&&($e(M.props,!0)||$e(M.props.inputProps,!0))&&(P=!0)}),P}),[z,j]=f.useState(!1);c&&z&&j(!1);const D=p!==void 0&&!c?p:z;let H;const V=f.useMemo(()=>({adornedStart:b,setAdornedStart:w,color:a,disabled:c,error:l,filled:O,focused:D,fullWidth:v,hiddenLabel:g,size:S,onBlur:()=>{j(!1)},onEmpty:()=>{L(!1)},onFilled:()=>{L(!0)},onFocus:()=>{j(!0)},registerEffect:H,required:x,variant:F}),[b,a,c,l,O,D,v,g,H,x,S,F]);return m.jsx(fo.Provider,{value:V,children:m.jsx(Oo,r({as:u,ownerState:R,className:Y(k.root,d),ref:t},$,{children:s}))})});function wo(e){return U("MuiFormHelperText",e)}const He=A("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ve;const Lo=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Wo=e=>{const{classes:o,contained:t,size:n,disabled:s,error:d,filled:a,focused:u,required:c}=e,l={root:["root",s&&"disabled",d&&"error",n&&`size${q(n)}`,t&&"contained",u&&"focused",a&&"filled",c&&"required"]};return _(l,wo,o)},Bo=C("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.size&&o[`size${q(t.size)}`],t.contained&&o.contained,t.filled&&o.filled]}})(({theme:e,ownerState:o})=>r({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${He.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${He.error}`]:{color:(e.vars||e).palette.error.main}},o.size==="small"&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})),To=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormHelperText"}),{children:s,className:d,component:a="p"}=n,u=T(n,Lo),c=de(),l=ue({props:n,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),p=r({},n,{component:a,contained:l.variant==="filled"||l.variant==="outlined",variant:l.variant,size:l.size,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),v=Wo(p);return m.jsx(Bo,r({as:a,ownerState:p,className:Y(v.root,d),ref:t},u,{children:s===" "?Ve||(Ve=m.jsx("span",{className:"notranslate",children:"​"})):s}))});function zo(e){return U("MuiFormLabel",e)}const ae=A("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Eo=["children","className","color","component","disabled","error","filled","focused","required"],jo=e=>{const{classes:o,color:t,focused:n,disabled:s,error:d,filled:a,required:u}=e,c={root:["root",`color${q(t)}`,s&&"disabled",d&&"error",a&&"filled",n&&"focused",u&&"required"],asterisk:["asterisk",d&&"error"]};return _(c,zo,o)},Ao=C("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},o)=>r({},o.root,e.color==="secondary"&&o.colorSecondary,e.filled&&o.filled)})(({theme:e,ownerState:o})=>r({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ae.focused}`]:{color:(e.vars||e).palette[o.color].main},[`&.${ae.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ae.error}`]:{color:(e.vars||e).palette.error.main}})),Uo=C("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${ae.error}`]:{color:(e.vars||e).palette.error.main}})),_o=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiFormLabel"}),{children:s,className:d,component:a="label"}=n,u=T(n,Eo),c=de(),l=ue({props:n,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),p=r({},n,{color:l.color||"primary",component:a,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),v=jo(p);return m.jsxs(Ao,r({as:a,ownerState:p,className:Y(v.root,d),ref:t},u,{children:[s,l.required&&m.jsxs(Uo,{ownerState:p,"aria-hidden":!0,className:v.asterisk,children:[" ","*"]})]}))}),qo=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Do=e=>{const{classes:o,disableUnderline:t}=e,s=_({root:["root",!t&&"underline"],input:["input"]},xo,o);return r({},o,s)},Ho=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[...Oe(e,o),!t.disableUnderline&&o.underline]}})(({theme:e,ownerState:o})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),r({position:"relative"},o.formControl&&{"label + &":{marginTop:16}},!o.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${le.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${le.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${le.disabled}, .${le.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${le.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Vo=C(Ne,{name:"MuiInput",slot:"Input",overridesResolver:we})({}),We=f.forwardRef(function(o,t){var n,s,d,a;const u=K({props:o,name:"MuiInput"}),{disableUnderline:c,components:l={},componentsProps:p,fullWidth:v=!1,inputComponent:g="input",multiline:I=!1,slotProps:x,slots:S={},type:F="text"}=u,$=T(u,qo),R=Do(u),b={root:{ownerState:{disableUnderline:c}}},w=x??p?ke(x??p,b):b,O=(n=(s=S.root)!=null?s:l.Root)!=null?n:Ho,L=(d=(a=S.input)!=null?a:l.Input)!=null?d:Vo;return m.jsx(Pe,r({slots:{root:O,input:L},slotProps:w,fullWidth:v,inputComponent:g,multiline:I,ref:t,type:F},$,{classes:R}))});We.muiName="Input";function Ko(e){return U("MuiInputLabel",e)}A("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Xo=["disableAnimation","margin","shrink","variant","className"],Go=e=>{const{classes:o,formControl:t,size:n,shrink:s,disableAnimation:d,variant:a,required:u}=e,c={root:["root",t&&"formControl",!d&&"animated",s&&"shrink",n&&n!=="normal"&&`size${q(n)}`,a],asterisk:[u&&"asterisk"]},l=_(c,Ko,o);return r({},o,l)},Jo=C(_o,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${ae.asterisk}`]:o.asterisk},o.root,t.formControl&&o.formControl,t.size==="small"&&o.sizeSmall,t.shrink&&o.shrink,!t.disableAnimation&&o.animated,t.focused&&o.focused,o[t.variant]]}})(({theme:e,ownerState:o})=>r({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},o.size==="small"&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},o.variant==="filled"&&r({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&r({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},o.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),o.variant==="outlined"&&r({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},o.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Qo=f.forwardRef(function(o,t){const n=K({name:"MuiInputLabel",props:o}),{disableAnimation:s=!1,shrink:d,className:a}=n,u=T(n,Xo),c=de();let l=d;typeof l>"u"&&c&&(l=c.filled||c.focused||c.adornedStart);const p=ue({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),v=r({},n,{disableAnimation:s,formControl:c,shrink:l,size:p.size,variant:p.variant,required:p.required,focused:p.focused}),g=Go(v);return m.jsx(Jo,r({"data-shrink":l,ownerState:v,ref:t,className:Y(g.root,a)},u,{classes:g}))});function Yo(e){return U("MuiNativeSelect",e)}const Be=A("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Zo=["className","disabled","error","IconComponent","inputRef","variant"],et=e=>{const{classes:o,variant:t,disabled:n,multiple:s,open:d,error:a}=e,u={select:["select",t,n&&"disabled",s&&"multiple",a&&"error"],icon:["icon",`icon${q(t)}`,d&&"iconOpen",n&&"disabled"]};return _(u,Yo,o)},Ye=({ownerState:e,theme:o})=>r({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":r({},o.vars?{backgroundColor:`rgba(${o.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:o.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Be.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(o.vars||o).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(o.vars||o).shape.borderRadius,"&:focus":{borderRadius:(o.vars||o).shape.borderRadius},"&&&":{paddingRight:32}}),ot=C("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Q,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.select,o[t.variant],t.error&&o.error,{[`&.${Be.multiple}`]:o.multiple}]}})(Ye),Ze=({ownerState:e,theme:o})=>r({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(o.vars||o).palette.action.active,[`&.${Be.disabled}`]:{color:(o.vars||o).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),tt=C("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${q(t.variant)}`],t.open&&o.iconOpen]}})(Ze),nt=f.forwardRef(function(o,t){const{className:n,disabled:s,error:d,IconComponent:a,inputRef:u,variant:c="standard"}=o,l=T(o,Zo),p=r({},o,{disabled:s,variant:c,error:d}),v=et(p);return m.jsxs(f.Fragment,{children:[m.jsx(ot,r({ownerState:p,className:Y(v.select,n),disabled:s,ref:u||t},l)),o.multiple?null:m.jsx(tt,{as:a,ownerState:p,className:v.icon})]})});var Ke;const rt=["children","classes","className","label","notched"],st=C("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Q})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),lt=C("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Q})(({ownerState:e,theme:o})=>r({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:o.transitions.create("width",{duration:150,easing:o.transitions.easing.easeOut})},e.withLabel&&r({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:o.transitions.create("max-width",{duration:50,easing:o.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:o.transitions.create("max-width",{duration:100,easing:o.transitions.easing.easeOut,delay:50})})));function it(e){const{className:o,label:t,notched:n}=e,s=T(e,rt),d=t!=null&&t!=="",a=r({},e,{notched:n,withLabel:d});return m.jsx(st,r({"aria-hidden":!0,className:o,ownerState:a},s,{children:m.jsx(lt,{ownerState:a,children:d?m.jsx("span",{children:t}):Ke||(Ke=m.jsx("span",{className:"notranslate",children:"​"}))})}))}const at=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],dt=e=>{const{classes:o}=e,n=_({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Co,o);return r({},o,n)},ut=C(Me,{shouldForwardProp:e=>Q(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Oe})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return r({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${J.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${J.focused} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette[o.color].main,borderWidth:2},[`&.${J.error} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${J.disabled} .${J.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&r({padding:"16.5px 14px"},o.size==="small"&&{padding:"8.5px 14px"}))}),ct=C(it,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,o)=>o.notchedOutline})(({theme:e})=>{const o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:o}}),pt=C(Ne,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:we})(({theme:e,ownerState:o})=>r({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},o.size==="small"&&{padding:"8.5px 14px"},o.multiline&&{padding:0},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0})),Te=f.forwardRef(function(o,t){var n,s,d,a,u;const c=K({props:o,name:"MuiOutlinedInput"}),{components:l={},fullWidth:p=!1,inputComponent:v="input",label:g,multiline:I=!1,notched:x,slots:S={},type:F="text"}=c,$=T(c,at),R=dt(c),k=de(),b=ue({props:c,muiFormControl:k,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=r({},c,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:k,fullWidth:p,hiddenLabel:b.hiddenLabel,multiline:I,size:b.size,type:F}),O=(n=(s=S.root)!=null?s:l.Root)!=null?n:ut,L=(d=(a=S.input)!=null?a:l.Input)!=null?d:pt;return m.jsx(Pe,r({slots:{root:O,input:L},renderSuffix:z=>m.jsx(ct,{ownerState:w,className:R.notchedOutline,label:g!=null&&g!==""&&b.required?u||(u=m.jsxs(f.Fragment,{children:[g," ","*"]})):g,notched:typeof x<"u"?x:!!(z.startAdornment||z.filled||z.focused)}),fullWidth:p,inputComponent:v,multiline:I,ref:t,type:F},$,{classes:r({},R,{notchedOutline:null})}))});Te.muiName="Input";function ft(e){return U("MuiSelect",e)}const ie=A("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Xe;const mt=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],bt=C("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`&.${ie.select}`]:o.select},{[`&.${ie.select}`]:o[t.variant]},{[`&.${ie.error}`]:o.error},{[`&.${ie.multiple}`]:o.multiple}]}})(Ye,{[`&.${ie.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),vt=C("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.icon,t.variant&&o[`icon${q(t.variant)}`],t.open&&o.iconOpen]}})(Ze),gt=C("input",{shouldForwardProp:e=>go(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,o)=>o.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ge(e,o){return typeof o=="object"&&o!==null?e===o:String(e)===String(o)}function ht(e){return e==null||typeof e=="string"&&!e.trim()}const xt=e=>{const{classes:o,variant:t,disabled:n,multiple:s,open:d,error:a}=e,u={select:["select",t,n&&"disabled",s&&"multiple",a&&"error"],icon:["icon",`icon${q(t)}`,d&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return _(u,ft,o)},Ct=f.forwardRef(function(o,t){var n;const{"aria-describedby":s,"aria-label":d,autoFocus:a,autoWidth:u,children:c,className:l,defaultOpen:p,defaultValue:v,disabled:g,displayEmpty:I,error:x=!1,IconComponent:S,inputRef:F,labelId:$,MenuProps:R={},multiple:k,name:b,onBlur:w,onChange:O,onClose:L,onFocus:z,onOpen:j,open:D,readOnly:H,renderValue:V,SelectDisplayProps:P={},tabIndex:M,value:E,variant:X="standard"}=o,G=T(o,mt),[y,Z]=De({controlled:E,default:v,name:"Select"}),[ce,pe]=De({controlled:D,default:p,name:"Select"}),fe=f.useRef(null),B=f.useRef(null),[W,re]=f.useState(null),{current:oe}=f.useRef(D!=null),[Ce,se]=f.useState(),oo=Je(t,F),to=f.useCallback(i=>{B.current=i,i&&re(i)},[]),me=W==null?void 0:W.parentNode;f.useImperativeHandle(oo,()=>({focus:()=>{B.current.focus()},node:fe.current,value:y}),[y]),f.useEffect(()=>{p&&ce&&W&&!oe&&(se(u?null:me.clientWidth),B.current.focus())},[W,u]),f.useEffect(()=>{a&&B.current.focus()},[a]),f.useEffect(()=>{if(!$)return;const i=mo(B.current).getElementById($);if(i){const h=()=>{getSelection().isCollapsed&&B.current.focus()};return i.addEventListener("click",h),()=>{i.removeEventListener("click",h)}}},[$]);const be=(i,h)=>{i?j&&j(h):L&&L(h),oe||(se(u?null:me.clientWidth),pe(i))},no=i=>{i.button===0&&(i.preventDefault(),B.current.focus(),be(!0,i))},ro=i=>{be(!1,i)},Ee=f.Children.toArray(c),so=i=>{const h=Ee.find(N=>N.props.value===i.target.value);h!==void 0&&(Z(h.props.value),O&&O(i,h))},lo=i=>h=>{let N;if(h.currentTarget.hasAttribute("tabindex")){if(k){N=Array.isArray(y)?y.slice():[];const ne=y.indexOf(i.props.value);ne===-1?N.push(i.props.value):N.splice(ne,1)}else N=i.props.value;if(i.props.onClick&&i.props.onClick(h),y!==N&&(Z(N),O)){const ne=h.nativeEvent||h,qe=new ne.constructor(ne.type,ne);Object.defineProperty(qe,"target",{writable:!0,value:{value:N,name:b}}),O(qe,i)}k||be(!1,h)}},io=i=>{H||[" ","ArrowUp","ArrowDown","Enter"].indexOf(i.key)!==-1&&(i.preventDefault(),be(!0,i))},ve=W!==null&&ce,ao=i=>{!ve&&w&&(Object.defineProperty(i,"target",{writable:!0,value:{value:y,name:b}}),w(i))};delete G["aria-invalid"];let te,je;const ge=[];let he=!1;($e({value:y})||I)&&(V?te=V(y):he=!0);const uo=Ee.map(i=>{if(!f.isValidElement(i))return null;let h;if(k){if(!Array.isArray(y))throw new Error(bo(2));h=y.some(N=>Ge(N,i.props.value)),h&&he&&ge.push(i.props.children)}else h=Ge(y,i.props.value),h&&he&&(je=i.props.children);return f.cloneElement(i,{"aria-selected":h?"true":"false",onClick:lo(i),onKeyUp:N=>{N.key===" "&&N.preventDefault(),i.props.onKeyUp&&i.props.onKeyUp(N)},role:"option",selected:h,value:void 0,"data-value":i.props.value})});he&&(k?ge.length===0?te=null:te=ge.reduce((i,h,N)=>(i.push(h),N{const{classes:o}=e;return o},ze={name:"MuiSelect",overridesResolver:(e,o)=>o.root,shouldForwardProp:e=>Q(e)&&e!=="variant",slot:"Root"},Ft=C(We,ze)(""),$t=C(Te,ze)(""),St=C(Le,ze)(""),eo=f.forwardRef(function(o,t){const n=K({name:"MuiSelect",props:o}),{autoWidth:s=!1,children:d,classes:a={},className:u,defaultOpen:c=!1,displayEmpty:l=!1,IconComponent:p=Ro,id:v,input:g,inputProps:I,label:x,labelId:S,MenuProps:F,multiple:$=!1,native:R=!1,onClose:k,onOpen:b,open:w,renderValue:O,SelectDisplayProps:L,variant:z="outlined"}=n,j=T(n,It),D=R?nt:Ct,H=de(),V=ue({props:n,muiFormControl:H,states:["variant","error"]}),P=V.variant||z,M=r({},n,{variant:P,classes:a}),E=yt(M),X=T(E,Rt),G=g||{standard:m.jsx(Ft,{ownerState:M}),outlined:m.jsx($t,{label:x,ownerState:M}),filled:m.jsx(St,{ownerState:M})}[P],y=Je(t,ho(G));return m.jsx(f.Fragment,{children:f.cloneElement(G,r({inputComponent:D,inputProps:r({children:d,error:V.error,IconComponent:p,variant:P,type:void 0,multiple:$},R?{id:v}:{autoWidth:s,defaultOpen:c,displayEmpty:l,labelId:S,MenuProps:F,onClose:k,onOpen:b,open:w,renderValue:O,SelectDisplayProps:r({id:v},L)},I,{classes:I?ke(X,I.classes):X},g?g.props.inputProps:{})},($&&R||l)&&P==="outlined"?{notched:!0}:{},{ref:y,className:Y(G.props.className,u,E.root)},!g&&{variant:P},j))})});eo.muiName="Select";function kt(e){return U("MuiTextField",e)}A("MuiTextField",["root"]);const Pt=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Mt={standard:We,filled:Le,outlined:Te},Ot=e=>{const{classes:o}=e;return _({root:["root"]},kt,o)},Nt=C(No,{name:"MuiTextField",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Lt=f.forwardRef(function(o,t){const n=K({props:o,name:"MuiTextField"}),{autoComplete:s,autoFocus:d=!1,children:a,className:u,color:c="primary",defaultValue:l,disabled:p=!1,error:v=!1,FormHelperTextProps:g,fullWidth:I=!1,helperText:x,id:S,InputLabelProps:F,inputProps:$,InputProps:R,inputRef:k,label:b,maxRows:w,minRows:O,multiline:L=!1,name:z,onBlur:j,onChange:D,onFocus:H,placeholder:V,required:P=!1,rows:M,select:E=!1,SelectProps:X,type:G,value:y,variant:Z="outlined"}=n,ce=T(n,Pt),pe=r({},n,{autoFocus:d,color:c,disabled:p,error:v,fullWidth:I,multiline:L,required:P,select:E,variant:Z}),fe=Ot(pe),B={};Z==="outlined"&&(F&&typeof F.shrink<"u"&&(B.notched=F.shrink),B.label=b),E&&((!X||!X.native)&&(B.id=void 0),B["aria-describedby"]=void 0);const W=Qe(S),re=x&&W?`${W}-helper-text`:void 0,oe=b&&W?`${W}-label`:void 0,Ce=Mt[Z],se=m.jsx(Ce,r({"aria-describedby":re,autoComplete:s,autoFocus:d,defaultValue:l,fullWidth:I,multiline:L,name:z,rows:M,maxRows:w,minRows:O,type:G,value:y,id:W,inputRef:k,onBlur:j,onChange:D,onFocus:H,placeholder:V,inputProps:$},B,R));return m.jsxs(Nt,r({className:Y(fe.root,u),disabled:p,error:v,fullWidth:I,ref:t,required:P,color:c,variant:Z,ownerState:pe},ce,{children:[b!=null&&b!==""&&m.jsx(Qo,r({htmlFor:W,id:oe},F,{children:b})),E?m.jsx(eo,r({"aria-describedby":re,id:W,labelId:oe,value:y,input:se},X,{children:a})):se,x&&m.jsx(To,r({id:re},g,{children:x}))]}))});export{Ro as A,eo as S,Lt as T,ee as f,le as i,J as o}; diff --git a/dist/assets/UnderConstruction-BRmjUgS2.js b/dist/assets/UnderConstruction-mds5BQRj.js similarity index 91% rename from dist/assets/UnderConstruction-BRmjUgS2.js rename to dist/assets/UnderConstruction-mds5BQRj.js index 7f9d0f2..d7a9b4a 100644 --- a/dist/assets/UnderConstruction-BRmjUgS2.js +++ b/dist/assets/UnderConstruction-mds5BQRj.js @@ -1 +1 @@ -import{r as o,j as e,i as s,ar as c,B as r,S as l,T as n}from"./index-CkS0O37G.js";import{d}from"./HomeOutlined-uwpuCaL2.js";import{B as u}from"./Button-DK5g2WFv.js";var t={},x=s;Object.defineProperty(t,"__esModule",{value:!0});var a=t.default=void 0,h=x(o()),m=e;a=t.default=(0,h.default)((0,m.jsx)("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"ConstructionOutlined");function j(){const i=c();return e.jsx(r,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(l,{spacing:2.5,alignItems:"center",children:[e.jsx(r,{sx:{width:110,height:110,borderRadius:"50%",bgcolor:"primary.lighter",color:"primary.main",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(a,{sx:{fontSize:56}})}),e.jsx(n,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Under Construction"}),e.jsx(n,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"Hey! Please check out this site later. We are doing some maintenance on it right now."}),e.jsx(u,{variant:"contained",size:"large",startIcon:e.jsx(d,{}),onClick:()=>i("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{j as default}; +import{r as o,j as e,i as s,ar as c,B as r,S as l,T as n}from"./index-DdJWTZFy.js";import{d}from"./HomeOutlined-DeKFCazV.js";import{B as u}from"./Button-Bcwcjqrt.js";var t={},x=s;Object.defineProperty(t,"__esModule",{value:!0});var a=t.default=void 0,h=x(o()),m=e;a=t.default=(0,h.default)((0,m.jsx)("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"ConstructionOutlined");function j(){const i=c();return e.jsx(r,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},children:e.jsxs(l,{spacing:2.5,alignItems:"center",children:[e.jsx(r,{sx:{width:110,height:110,borderRadius:"50%",bgcolor:"primary.lighter",color:"primary.main",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(a,{sx:{fontSize:56}})}),e.jsx(n,{variant:"h3",sx:{fontWeight:700,color:"grey.800"},children:"Under Construction"}),e.jsx(n,{variant:"body1",color:"text.secondary",sx:{maxWidth:460},children:"Hey! Please check out this site later. We are doing some maintenance on it right now."}),e.jsx(u,{variant:"contained",size:"large",startIcon:e.jsx(d,{}),onClick:()=>i("/dashboard"),sx:{mt:1},children:"Back To Home"})]})})}export{j as default}; diff --git a/dist/assets/VisibilityOff-7YzRgPyD.js b/dist/assets/VisibilityOff-D5-u3y0u.js similarity index 97% rename from dist/assets/VisibilityOff-7YzRgPyD.js rename to dist/assets/VisibilityOff-D5-u3y0u.js index 2a3f173..43b031d 100644 --- a/dist/assets/VisibilityOff-7YzRgPyD.js +++ b/dist/assets/VisibilityOff-D5-u3y0u.js @@ -1 +1 @@ -import{l as A,m as G,a as H,o as J,h as K,ap as Q,_ as n,j as d,p as T,q as X,v as Y,w as R,W as Z,V as ee,r as _,i as F}from"./index-CkS0O37G.js";function te(e){return A("PrivateSwitchBase",e)}G("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const ae=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],se=e=>{const{classes:s,checked:l,disabled:r,edge:o}=e,u={root:["root",l&&"checked",r&&"disabled",o&&`edge${X(o)}`],input:["input"]};return Y(u,te,s)},oe=R(Z,{name:"MuiSwitchBase"})(({ownerState:e})=>n({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ie=R("input",{name:"MuiSwitchBase",shouldForwardProp:ee})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),me=H.forwardRef(function(s,l){const{autoFocus:r,checked:o,checkedIcon:u,className:S,defaultChecked:m,disabled:w,disableFocusRipple:g=!1,edge:P=!1,icon:j,id:I,inputProps:M,inputRef:q,name:z,onBlur:b,onChange:v,onFocus:x,readOnly:O,required:E=!1,tabIndex:V,type:c,value:C}=s,$=J(s,ae),[B,L]=K({controlled:o,default:!!m,name:"SwitchBase",state:"checked"}),a=Q(),N=t=>{x&&x(t),a&&a.onFocus&&a.onFocus(t)},U=t=>{b&&b(t),a&&a.onBlur&&a.onBlur(t)},D=t=>{if(t.nativeEvent.defaultPrevented)return;const y=t.target.checked;L(y),v&&v(t,y)};let i=w;a&&typeof i>"u"&&(i=a.disabled);const W=c==="checkbox"||c==="radio",h=n({},s,{checked:B,disabled:i,disableFocusRipple:g,edge:P}),k=se(h);return d.jsxs(oe,n({component:"span",className:T(k.root,S),centerRipple:!0,focusRipple:!g,disabled:i,tabIndex:null,role:void 0,onFocus:N,onBlur:U,ownerState:h,ref:l},$,{children:[d.jsx(ie,n({autoFocus:r,checked:o,defaultChecked:m,className:k.input,disabled:i,id:W?I:void 0,name:z,onChange:D,readOnly:O,ref:q,required:E,ownerState:h,tabIndex:V,type:c},c==="checkbox"&&C===void 0?{}:{value:C},M)),B?u:j]}))});var p={},ce=F;Object.defineProperty(p,"__esModule",{value:!0});var ne=p.default=void 0,de=ce(_()),le=d;ne=p.default=(0,de.default)((0,le.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var f={},re=F;Object.defineProperty(f,"__esModule",{value:!0});var ue=f.default=void 0,he=re(_()),pe=d;ue=f.default=(0,he.default)((0,pe.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");export{me as S,ne as a,ue as d}; +import{l as A,m as G,a as H,o as J,h as K,ap as Q,_ as n,j as d,p as T,q as X,v as Y,w as R,W as Z,V as ee,r as _,i as F}from"./index-DdJWTZFy.js";function te(e){return A("PrivateSwitchBase",e)}G("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const ae=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],se=e=>{const{classes:s,checked:l,disabled:r,edge:o}=e,u={root:["root",l&&"checked",r&&"disabled",o&&`edge${X(o)}`],input:["input"]};return Y(u,te,s)},oe=R(Z,{name:"MuiSwitchBase"})(({ownerState:e})=>n({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ie=R("input",{name:"MuiSwitchBase",shouldForwardProp:ee})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),me=H.forwardRef(function(s,l){const{autoFocus:r,checked:o,checkedIcon:u,className:S,defaultChecked:m,disabled:w,disableFocusRipple:g=!1,edge:P=!1,icon:j,id:I,inputProps:M,inputRef:q,name:z,onBlur:b,onChange:v,onFocus:x,readOnly:O,required:E=!1,tabIndex:V,type:c,value:C}=s,$=J(s,ae),[B,L]=K({controlled:o,default:!!m,name:"SwitchBase",state:"checked"}),a=Q(),N=t=>{x&&x(t),a&&a.onFocus&&a.onFocus(t)},U=t=>{b&&b(t),a&&a.onBlur&&a.onBlur(t)},D=t=>{if(t.nativeEvent.defaultPrevented)return;const y=t.target.checked;L(y),v&&v(t,y)};let i=w;a&&typeof i>"u"&&(i=a.disabled);const W=c==="checkbox"||c==="radio",h=n({},s,{checked:B,disabled:i,disableFocusRipple:g,edge:P}),k=se(h);return d.jsxs(oe,n({component:"span",className:T(k.root,S),centerRipple:!0,focusRipple:!g,disabled:i,tabIndex:null,role:void 0,onFocus:N,onBlur:U,ownerState:h,ref:l},$,{children:[d.jsx(ie,n({autoFocus:r,checked:o,defaultChecked:m,className:k.input,disabled:i,id:W?I:void 0,name:z,onChange:D,readOnly:O,ref:q,required:E,ownerState:h,tabIndex:V,type:c},c==="checkbox"&&C===void 0?{}:{value:C},M)),B?u:j]}))});var p={},ce=F;Object.defineProperty(p,"__esModule",{value:!0});var ne=p.default=void 0,de=ce(_()),le=d;ne=p.default=(0,de.default)((0,le.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var f={},re=F;Object.defineProperty(f,"__esModule",{value:!0});var ue=f.default=void 0,he=re(_()),pe=d;ue=f.default=(0,he.default)((0,pe.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");export{me as S,ne as a,ue as d}; diff --git a/dist/assets/index-CkS0O37G.js b/dist/assets/index-DdJWTZFy.js similarity index 95% rename from dist/assets/index-CkS0O37G.js rename to dist/assets/index-DdJWTZFy.js index dfe7933..970e8a0 100644 --- a/dist/assets/index-CkS0O37G.js +++ b/dist/assets/index-DdJWTZFy.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-Cei3-Abv.js","assets/Refresh-Z6LWMmna.js","assets/StatusChip-C-P1gBCE.js","assets/Link-DsI7GZfd.js","assets/PageHeader-1FV595Go.js","assets/EmptyState-B_LUop-_.js","assets/Button-DK5g2WFv.js","assets/Alert-Ok_eCidg.js","assets/TableRow-CzSsRUSI.js","assets/LinearProgress-C7VdMGLk.js","assets/Tenants-Vq8ITDL4.js","assets/DeleteOutline-DHEVbt_6.js","assets/StorefrontOutlined-R0CC3Y_0.js","assets/PhoneOutlined-BlqLiA8g.js","assets/TextField-CWImxk_G.js","assets/LocalShippingOutlined-KXKsS6Ie.js","assets/Close-DaYHvsp_.js","assets/InputAdornment-Bwtqyiqg.js","assets/Survey-ndeaWZLt.js","assets/Pricing-B5KK24ta.js","assets/TeamUsers-Cu1_QgRb.js","assets/Settings-C9JXqPw8.js","assets/VisibilityOff-7YzRgPyD.js","assets/Login-HaAIClqZ.js","assets/UnderConstruction-BRmjUgS2.js","assets/HomeOutlined-uwpuCaL2.js","assets/ComingSoon-DFNLKciP.js","assets/Error500-BhnsxntT.js","assets/Error404-Tw0V7paU.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-CaTPkifY.js","assets/Refresh-DEoCZISD.js","assets/StatusChip-VSepiSqW.js","assets/Link-Dp34e72e.js","assets/PageHeader-CdP5B6Qy.js","assets/EmptyState-CQsHTCg9.js","assets/Button-Bcwcjqrt.js","assets/Alert-CzmzDPlp.js","assets/TableRow-CEoQ4SIZ.js","assets/LinearProgress-C8QvFQwb.js","assets/Tenants-mdxHS17O.js","assets/DeleteOutline-DetaO5yn.js","assets/StorefrontOutlined-DupKwNFq.js","assets/PhoneOutlined-CBkctqNs.js","assets/TextField-Btd7UbKs.js","assets/LocalShippingOutlined-DRozEKne.js","assets/Close-CknXfd8d.js","assets/InputAdornment-Bnl7vvhj.js","assets/Survey-q3ahIjIS.js","assets/Pricing-BuyNgb7k.js","assets/TeamUsers-BvR0WI-e.js","assets/Settings-CDtM7ArL.js","assets/VisibilityOff-D5-u3y0u.js","assets/Login-BohcWU3v.js","assets/UnderConstruction-mds5BQRj.js","assets/HomeOutlined-DeKFCazV.js","assets/ComingSoon-CGM6Litg.js","assets/Error500-DmuBsKdr.js","assets/Error404-BtmKoWcF.js"])))=>i.map(i=>d[i]); function z1(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var mg={exports:{}},ll={},gg={exports:{}},ie={};/** * @license React * react.production.min.js @@ -185,4 +185,4 @@ Error generating stack: `+i.message+` `));return m},[u,h,c,d,i]),S=y.useMemo(()=>g?{minDate:g.date("1900-01-01T00:00:00.000"),maxDate:g.date("2099-12-31T00:00:00.000")}:null,[g]),p=y.useMemo(()=>({utils:g,defaultDates:S,localeText:v}),[S,g,v]);return b.jsx(lg.Provider,{value:p,children:l})},VM=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join(` `):e;return()=>{n||(n=!0,t==="error"?console.error(r):console.warn(r))}};var p1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(us,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",u="day",c="week",d="month",h="quarter",x="year",v="date",g="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var _=["th","st","nd","rd"],R=j%100;return"["+j+(_[(R-20)%10]||_[R]||_[0])+"]"}},f=function(j,_,R){var L=String(j);return!L||L.length>=_?j:""+Array(_+1-L.length).join(R)+j},w={s:f,z:function(j){var _=-j.utcOffset(),R=Math.abs(_),L=Math.floor(R/60),T=R%60;return(_<=0?"+":"-")+f(L,2,"0")+":"+f(T,2,"0")},m:function j(_,R){if(_.date()1)return j(A[0])}else{var B=_.name;E[B]=_,T=B}return!L&&T&&(P=T),T||!L&&P},$=function(j,_){if(M(j))return j.clone();var R=typeof _=="object"?_:{};return R.date=j,R.args=arguments,new z(R)},I=w;I.l=D,I.i=M,I.w=function(j,_){return $(j,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var z=function(){function j(R){this.$L=D(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[C]=!0}var _=j.prototype;return _.parse=function(R){this.$d=function(L){var T=L.date,O=L.utc;if(T===null)return new Date(NaN);if(I.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var A=T.match(S);if(A){var B=A[2]-1||0,U=(A[7]||"0").substring(0,3);return O?new Date(Date.UTC(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,U)):new Date(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,U)}}return new Date(T)}(R),this.init()},_.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},_.$utils=function(){return I},_.isValid=function(){return this.$d.toString()!==g},_.isSame=function(R,L){var T=$(R);return this.startOf(L)<=T&&T<=this.endOf(L)},_.isAfter=function(R,L){return $(R)25){var c=s(this).startOf(r).add(1,r).date(u),d=s(this).endOf(n);if(c.isBefore(d))return 1}var h=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),x=this.diff(h,n,!0);return x<0?s(this).startOf("week").week():Math.ceil(x)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(h1);var KM=h1.exports;const GM=Kr(KM);var m1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(us,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(S){return(S=+S)+(S>68?1900:2e3)},c=function(S){return function(p){this[S]=+p}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(S){(this.zone||(this.zone={})).offset=function(p){if(!p||p==="Z")return 0;var m=p.match(/([+-]|\d\d)/g),f=60*m[1]+(+m[2]||0);return f===0?0:m[0]==="+"?-f:f}(S)}],h=function(S){var p=l[S];return p&&(p.indexOf?p:p.s.concat(p.f))},x=function(S,p){var m,f=l.meridiem;if(f){for(var w=1;w<=24;w+=1)if(S.indexOf(f(w,0,p))>-1){m=w>12;break}}else m=S===(p?"pm":"PM");return m},v={A:[a,function(S){this.afternoon=x(S,!1)}],a:[a,function(S){this.afternoon=x(S,!0)}],Q:[o,function(S){this.month=3*(S-1)+1}],S:[o,function(S){this.milliseconds=100*+S}],SS:[i,function(S){this.milliseconds=10*+S}],SSS:[/\d{3}/,function(S){this.milliseconds=+S}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[a,function(S){var p=l.ordinal,m=S.match(/\d+/);if(this.day=m[0],p)for(var f=1;f<=31;f+=1)p(f).replace(/\[|\]/g,"")===S&&(this.day=f)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[a,function(S){var p=h("months"),m=(h("monthsShort")||p.map(function(f){return f.slice(0,3)})).indexOf(S)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[a,function(S){var p=h("months").indexOf(S)+1;if(p<1)throw new Error;this.month=p%12||p}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(S){this.year=u(S)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(S){var p,m;p=S,m=l&&l.formats;for(var f=(S=p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,I,z){var N=z&&z.toUpperCase();return I||m[z]||n[z]||m[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,_,R){return _||R.slice(1)})})).match(r),w=f.length,P=0;P-1)return new Date((T==="X"?1e3:1)*L);var B=g(T)(L),U=B.year,q=B.month,V=B.day,G=B.hours,W=B.minutes,Z=B.seconds,te=B.milliseconds,Q=B.zone,re=B.week,K=new Date,ce=V||(U||q?1:K.getDate()),X=U||K.getFullYear(),se=0;U&&!q||(se=q>0?q-1:K.getMonth());var oe,nt=G||0,Ve=W||0,Le=Z||0,ft=te||0;return Q?new Date(Date.UTC(X,se,ce,nt,Ve,Le,ft+60*Q.offset*1e3)):O?new Date(Date.UTC(X,se,ce,nt,Ve,Le,ft)):(oe=new Date(X,se,ce,nt,Ve,Le,ft),re&&(oe=A(oe).week(re).toDate()),oe)}catch{return new Date("")}}(E,D,C,m),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),z&&E!=this.format(D)&&(this.$d=new Date("")),l={}}else if(D instanceof Array)for(var j=D.length,_=1;_<=j;_+=1){M[1]=D[_-1];var R=m.apply(this,M);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}_===j&&(this.$d=new Date(""))}else w.call(this,P)}}})})(m1);var QM=m1.exports;const XM=Kr(QM);var g1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(us,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,a=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,c=function(d,h){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,v,g){var S=g&&g.toUpperCase();return v||h[g]||n[g]||h[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,f){return m||f.slice(1)})})}(l,u===void 0?{}:u);return a.call(this,c)}}})})(g1);var qM=g1.exports;const ZM=Kr(qM);var v1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(us,function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,l){var u=o(i),c=o(s),d=(l=l||"()")[0]==="(",h=l[1]===")";return(d?this.isAfter(u,a):!this.isBefore(u,a))&&(h?this.isBefore(c,a):!this.isAfter(c,a))||(d?this.isBefore(u,a):!this.isAfter(u,a))&&(h?this.isAfter(c,a):!this.isBefore(c,a))}}})})(v1);var JM=v1.exports;const e_=Kr(JM);lt.extend(XM);lt.extend(ZM);lt.extend(e_);const t_=VM(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),n_={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},r_={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},tc=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(` `),ug=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(` -`),o_=(e,t)=>t?(...n)=>e(...n).locale(t):e;class i_{constructor({locale:t,formats:n,instance:r}={}){var o;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=n_,this.setLocaleToValue=i=>{const s=this.getCurrentLocaleCode();return s===i.locale()?i:i.locale(s)},this.hasUTCPlugin=()=>typeof lt.utc<"u",this.hasTimezonePlugin=()=>typeof lt.tz<"u",this.isSame=(i,s,a)=>{const l=this.setTimezone(s,this.getTimezone(i));return i.format(a)===l.format(a)},this.cleanTimezone=i=>{switch(i){case"default":return;case"system":return lt.tz.guess();default:return i}},this.createSystemDate=i=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(i);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const s=lt.tz.guess();return s!=="UTC"?lt.tz(i,s):lt(i)}return lt(i)},this.createUTCDate=i=>{if(!this.hasUTCPlugin())throw new Error(tc);return lt.utc(i)},this.createTZDate=(i,s)=>{if(!this.hasUTCPlugin())throw new Error(tc);if(!this.hasTimezonePlugin())throw new Error(ug);const a=i!==void 0&&!i.endsWith("Z");return lt(i).tz(this.cleanTimezone(s),a)},this.getLocaleFormats=()=>{const i=lt.Ls,s=this.locale||"en";let a=i[s];return a===void 0&&(t_(),a=i.en),a.formats},this.adjustOffset=i=>{if(!this.hasTimezonePlugin())return i;const s=this.getTimezone(i);if(s!=="UTC"){var a,l;const u=i.tz(this.cleanTimezone(s),!0);if(((a=u.$offset)!=null?a:0)===((l=i.$offset)!=null?l:0))return i;i.$offset=u.$offset}return i},this.date=i=>i===null?null:this.dayjs(i),this.dateWithTimezone=(i,s)=>{if(i===null)return null;let a;return s==="UTC"?a=this.createUTCDate(i):s==="system"||s==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(i):a=this.createTZDate(i,s),this.locale===void 0?a:a.locale(this.locale)},this.getTimezone=i=>{if(this.hasTimezonePlugin()){var s;const a=(s=i.$x)==null?void 0:s.$timezone;if(a)return a}return this.hasUTCPlugin()&&i.isUTC()?"UTC":"system"},this.setTimezone=(i,s)=>{if(this.getTimezone(i)===s)return i;if(s==="UTC"){if(!this.hasUTCPlugin())throw new Error(tc);return i.utc()}if(s==="system")return i.local();if(!this.hasTimezonePlugin()){if(s==="default")return i;throw new Error(ug)}return lt.tz(i,this.cleanTimezone(s))},this.toJsDate=i=>i.toDate(),this.parseISO=i=>this.dayjs(i),this.toISO=i=>i.toISOString(),this.parse=(i,s)=>i===""?null:this.dayjs(i,s,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=i=>{const s=this.getLocaleFormats(),a=l=>l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(u,c,d)=>c||d.slice(1));return i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(l,u,c)=>{const d=c&&c.toUpperCase();return u||s[c]||a(s[d])})},this.getFormatHelperText=i=>this.expandFormat(i).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=i=>i===null,this.isValid=i=>this.dayjs(i).isValid(),this.format=(i,s)=>this.formatByString(i,this.formats[s]),this.formatByString=(i,s)=>this.dayjs(i).format(s),this.formatNumber=i=>i,this.getDiff=(i,s,a)=>i.diff(s,a),this.isEqual=(i,s)=>i===null&&s===null?!0:this.dayjs(i).toDate().getTime()===this.dayjs(s).toDate().getTime(),this.isSameYear=(i,s)=>this.isSame(i,s,"YYYY"),this.isSameMonth=(i,s)=>this.isSame(i,s,"YYYY-MM"),this.isSameDay=(i,s)=>this.isSame(i,s,"YYYY-MM-DD"),this.isSameHour=(i,s)=>i.isSame(s,"hour"),this.isAfter=(i,s)=>i>s,this.isAfterYear=(i,s)=>this.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()>s.utc():i.isAfter(s,"year"),this.isAfterDay=(i,s)=>this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()>s.utc():i.isAfter(s,"day"),this.isBefore=(i,s)=>ithis.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()i>=s&&i<=a,this.startOfYear=i=>this.adjustOffset(i.startOf("year")),this.startOfMonth=i=>this.adjustOffset(i.startOf("month")),this.startOfWeek=i=>this.adjustOffset(i.startOf("week")),this.startOfDay=i=>this.adjustOffset(i.startOf("day")),this.endOfYear=i=>this.adjustOffset(i.endOf("year")),this.endOfMonth=i=>this.adjustOffset(i.endOf("month")),this.endOfWeek=i=>this.adjustOffset(i.endOf("week")),this.endOfDay=i=>this.adjustOffset(i.endOf("day")),this.addYears=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"year"):i.add(s,"year")),this.addMonths=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"month"):i.add(s,"month")),this.addWeeks=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"week"):i.add(s,"week")),this.addDays=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"day"):i.add(s,"day")),this.addHours=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"hour"):i.add(s,"hour")),this.addMinutes=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"minute"):i.add(s,"minute")),this.addSeconds=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"second"):i.add(s,"second")),this.getYear=i=>i.year(),this.getMonth=i=>i.month(),this.getDate=i=>i.date(),this.getHours=i=>i.hour(),this.getMinutes=i=>i.minute(),this.getSeconds=i=>i.second(),this.getMilliseconds=i=>i.millisecond(),this.setYear=(i,s)=>this.adjustOffset(i.set("year",s)),this.setMonth=(i,s)=>this.adjustOffset(i.set("month",s)),this.setDate=(i,s)=>this.adjustOffset(i.set("date",s)),this.setHours=(i,s)=>this.adjustOffset(i.set("hour",s)),this.setMinutes=(i,s)=>this.adjustOffset(i.set("minute",s)),this.setSeconds=(i,s)=>this.adjustOffset(i.set("second",s)),this.setMilliseconds=(i,s)=>this.adjustOffset(i.set("millisecond",s)),this.getDaysInMonth=i=>i.daysInMonth(),this.getNextMonth=i=>this.addMonths(i,1),this.getPreviousMonth=i=>this.addMonths(i,-1),this.getMonthArray=i=>{const a=[i.startOf("year")];for(;a.length<12;){const l=a[a.length-1];a.push(this.addMonths(l,1))}return a},this.mergeDateAndTime=(i,s)=>i.hour(s.hour()).minute(s.minute()).second(s.second()),this.getWeekdays=()=>{const i=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(s=>this.formatByString(this.addDays(i,s),"dd"))},this.getWeekArray=i=>{const s=this.setLocaleToValue(i),a=s.startOf("month").startOf("week"),l=s.endOf("month").endOf("week");let u=0,c=a;const d=[];for(;ci.week(),this.getYearRange=(i,s)=>{const a=i.startOf("year"),l=s.endOf("year"),u=[];let c=a;for(;ci==="am"?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=o_((o=this.rawDayJsInstance)!=null?o:lt,t),this.locale=t,this.formats=k({},r_,n),lt.extend(GM)}}const Ne={0:"#FFFFFF",50:"#FAFAFA",100:"#F5F5F5",200:"#F0F0F0",300:"#D9D9D9",400:"#BFBFBF",500:"#8C8C8C",600:"#595959",700:"#434343",800:"#262626",900:"#141414",A50:"#FAFAFB",A100:"#E6EBF1"},s_={mode:"light",common:{black:"#000000",white:"#FFFFFF"},primary:{lighter:"#F8E0E3",100:"#EFBBC1",200:"#E08A92",light:"#D6515C",400:"#CC2E3C",main:"#C01227",dark:"#9E0E20",700:"#870C1B",darker:"#7E0B17",900:"#520710",contrastText:"#FFFFFF"},secondary:{lighter:Ne[100],100:Ne[100],200:Ne[200],light:Ne[300],400:Ne[400],main:Ne[500],600:Ne[600],dark:Ne[700],800:Ne[800],darker:Ne[900],A100:Ne[0],A200:Ne[400],A300:Ne[700],contrastText:Ne[0]},error:{lighter:"#FEEAE9",light:"#F88078",main:"#F04134",dark:"#A82216",darker:"#7A150C",contrastText:"#FFFFFF"},warning:{lighter:"#FFF7E0",light:"#FFD666",main:"#FFBF00",dark:"#B38600",darker:"#805F00",contrastText:"#262626"},info:{lighter:"#E0F7F8",light:"#66CBD2",main:"#00A2AE",dark:"#00727B",darker:"#005159",contrastText:"#FFFFFF"},success:{lighter:"#E3F6EC",light:"#5CC98C",main:"#00A854",dark:"#00773B",darker:"#00552A",contrastText:"#FFFFFF"},grey:Ne,text:{primary:Ne[800],secondary:Ne[600],disabled:Ne[400]},action:{disabled:Ne[300],hover:"rgba(192, 18, 39, 0.04)",selected:"rgba(192, 18, 39, 0.08)"},divider:Ne[200],background:{paper:"#FFFFFF",default:Ne.A50}},a_={fontFamily:'"Public Sans", "Inter", "Helvetica", "Arial", sans-serif',htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:700,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:700,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:500,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{fontSize:"0.6875rem",fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase"},button:{textTransform:"capitalize",fontWeight:600}},Ci={card:"0px 1px 4px rgba(0, 0, 0, 0.08)",cardHover:"0px 4px 16px rgba(0, 0, 0, 0.10)",widget:"0px 2px 14px rgba(38, 38, 38, 0.06)",dropdown:"0px 8px 24px rgba(38, 38, 38, 0.12)",primaryGlow:"0px 6px 16px rgba(192, 18, 39, 0.28)",primaryGlowHover:"0px 8px 20px rgba(192, 18, 39, 0.36)",header:"0px 1px 0px rgba(0, 0, 0, 0.06)"};function l_(e){const{palette:t}=e;return{MuiCssBaseline:{styleOverrides:{body:{backgroundColor:t.background.default},"*::-webkit-scrollbar":{width:8,height:8},"*::-webkit-scrollbar-thumb":{background:t.grey[300],borderRadius:8},"*::-webkit-scrollbar-thumb:hover":{background:t.grey[400]}}},MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,fontWeight:600,padding:"7px 18px"},containedPrimary:{boxShadow:Ci.primaryGlow,"&:hover":{boxShadow:Ci.primaryGlowHover,backgroundColor:t.primary.dark}},outlined:{borderColor:t.grey[300]},sizeLarge:{padding:"10px 22px",fontSize:"0.9375rem"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:8}}},MuiCard:{styleOverrides:{root:{borderRadius:10,border:`1px solid ${t.grey[200]}`,boxShadow:Ci.card,backgroundImage:"none"}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h5"},subheaderTypographyProps:{variant:"caption"}},styleOverrides:{root:{padding:20}}},MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}},MuiPaper:{defaultProps:{elevation:0},styleOverrides:{rounded:{borderRadius:10}}},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:600,fontSize:"0.75rem"},sizeSmall:{height:22},label:{paddingLeft:8,paddingRight:8}}},MuiTableCell:{styleOverrides:{root:{borderColor:t.grey[200],padding:"12px 16px",fontSize:"0.8125rem"},head:{fontWeight:600,color:t.grey[600],backgroundColor:t.grey[50],textTransform:"none",whiteSpace:"nowrap"}}},MuiTableRow:{styleOverrides:{root:{"&:hover":{backgroundColor:t.primary.lighter+"66"}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:8,backgroundColor:t.background.paper,"& .MuiOutlinedInput-notchedOutline":{borderColor:t.grey[300]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:t.grey[400]}},input:{padding:"11px 14px"}}},MuiInputLabel:{styleOverrides:{root:{color:t.grey[600],fontSize:"0.875rem"}}},MuiTab:{styleOverrides:{root:{textTransform:"none",fontWeight:600,minHeight:46,fontSize:"0.875rem"}}},MuiTabs:{styleOverrides:{indicator:{height:3,borderRadius:3}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:t.grey[800],borderRadius:6,fontSize:"0.75rem",padding:"6px 10px"}}},MuiDialog:{styleOverrides:{paper:{borderRadius:12}}},MuiAvatar:{styleOverrides:{root:{fontWeight:600,fontSize:"0.875rem"}}},MuiListItemButton:{styleOverrides:{root:{borderRadius:8}}},MuiLinearProgress:{styleOverrides:{root:{borderRadius:8,height:6,backgroundColor:t.grey[200]}}},MuiMenu:{styleOverrides:{paper:{borderRadius:10,boxShadow:Ci.dropdown,marginTop:4}}}}}let yd=Qf({palette:s_,typography:a_,shape:{borderRadius:6},customShadows:Ci,mixins:{toolbar:{minHeight:64}}});yd.components=l_(yd);const u_="modulepreload",c_=function(e){return"/"+e},cg={},Ht=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=c_(l),l in cg)return;cg[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":u_,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,x)=>{d.addEventListener("load",h),d.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};var cp={},nc={};const d_=Vn(Wb);var dg;function En(){return dg||(dg=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=d_}(nc)),nc}var f_=Ut;Object.defineProperty(cp,"__esModule",{value:!0});var y1=cp.default=void 0,p_=f_(En()),h_=b;y1=cp.default=(0,p_.default)((0,h_.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var dp={},m_=Ut;Object.defineProperty(dp,"__esModule",{value:!0});var xd=dp.default=void 0,g_=m_(En()),v_=b;xd=dp.default=(0,g_.default)((0,v_.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");var fp={},y_=Ut;Object.defineProperty(fp,"__esModule",{value:!0});var pp=fp.default=void 0,x_=y_(En()),w_=b;pp=fp.default=(0,x_.default)((0,w_.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined");var hp={},S_=Ut;Object.defineProperty(hp,"__esModule",{value:!0});var x1=hp.default=void 0,E_=S_(En()),C_=b;x1=hp.default=(0,E_.default)((0,C_.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");const k_="/Doormile-logo.png";function w1({onDark:e=!1,compact:t=!1,height:n=26,sx:r}){if(t){const o=e?"#FFFFFF":"#C01227",i=e?"#C01227":"#FFFFFF";return b.jsx(xe,{sx:{display:"flex",alignItems:"center",...r},children:b.jsx(xe,{sx:{width:34,height:34,borderRadius:2,bgcolor:o,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:e?"none":"0 4px 10px rgba(192, 18, 39,0.30)"},children:b.jsx(St,{sx:{color:i,fontWeight:800,fontSize:"1.25rem",lineHeight:1},children:"D"})})})}return b.jsx(xe,{sx:{display:"flex",alignItems:"center",...r},children:b.jsx(xe,{component:"img",src:k_,alt:"Doormile",sx:{height:n,width:"auto",display:"block",filter:e?"none":"brightness(0) saturate(100%)"}})})}const lO=e=>String(e||"").replace(/[_-]+/g," ").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/\s+/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim(),b_=(e="")=>{let t=0;for(let r=0;re.split(" ").filter(Boolean).slice(0,2).map(t=>t[0]).join("").toUpperCase();function T_({name:e="",size:t=32,sx:n}){return b.jsx(gd,{sx:{width:t,height:t,bgcolor:b_(e),fontSize:t*.42,...n},children:P_(e)})}const Cr="https://api.doormile.com/api/v1",kr=()=>{const e=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{}}};async function R_(){const e=await fetch(`${Cr}/crm/clients`,{headers:kr()});if(!e.ok)throw new Error("Failed to fetch clients");return e.json()}async function uO(e){const t=await fetch(`${Cr}/crm/clients`,{method:"POST",headers:kr(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to create client");return t.json()}async function cO(e,t){const n=await fetch(`${Cr}/crm/clients/${e}`,{method:"PUT",headers:kr(),body:JSON.stringify(t)});if(!n.ok)throw new Error("Failed to update client");return n.json()}async function dO(e){const t=await fetch(`${Cr}/crm/clients/${e}`,{method:"DELETE",headers:kr()});if(!t.ok)throw new Error("Failed to delete client");return t.json()}async function fO(){const e=await fetch(`${Cr}/admin/users`,{headers:kr()});if(!e.ok)throw new Error("Failed to fetch users");return e.json()}async function pO(e){const t=await fetch(`${Cr}/admin/users`,{method:"POST",headers:kr(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to create user");return t.json()}async function hO(e,t){const n=await fetch(`${Cr}/admin/users/${e}`,{method:"PUT",headers:kr(),body:JSON.stringify(t)});if(!n.ok)throw new Error("Failed to update user");return n.json()}async function mO(e){const t=await fetch(`${Cr}/admin/users/${e}`,{method:"DELETE",headers:kr()});if(!t.ok)throw new Error("Failed to delete user");return t.json()}const $_=e=>"CLI-"+String(e).replace(/[^a-zA-Z0-9]/g,"").toUpperCase().substring(0,6).padStart(6,"0");function M_(e){const t=e.payload??e,n=t.id??e.id,r=$_(n);return{id:n,logicalId:r,clientId:r,name:t.first_name?`${t.first_name} ${t.last_name||""}`.trim():t.name||"—",phone:t.phone||"",city:t.city||"",businessState:t.businessState||"",businessType:t.businessType||"",status:t.status||"unknown",parcelVolume:Number(t.parcelVolume)||0,activeContracts:Number(t.activeContracts)||0,frequency:t.frequency||"",provider:t.provider||"",efficiency:t.efficiency||"",logisticsSegment:t.logisticsSegment||"",transitFrom:t.transitFrom||"",transitTo:t.transitTo||"",neighbourhood:t.neighbourhood||t.surveyZone||"",surveyAddress:t.surveyAddress||t.address||"",surveyLat:t.survey_lat??t.surveyLat??"",surveyLng:t.survey_long??t.surveyLng??"",dataConsent:t.dataConsent||"",lastUpdated:t.lastUpdated||"",notes:t.notes||""}}function gO(e){const t=e.payload??e;return{id:t.id??e.id,name:t.first_name?`${t.first_name} ${t.last_name||""}`.trim():t.name||"—",email:t.email||"",phone:t.phone||"",role:t.role||"unknown",pin:t.pin||""}}const fg="#C01227";function __({onToggle:e}){var P;const t=ms(),[n,r]=y.useState(null),[o,i]=y.useState(""),s=y.useRef(null),[a,l]=y.useState([]),[u,c]=y.useState(!1),[d,h]=y.useState(!1),[x,v]=y.useState(!1),g=()=>{u||d||(h(!0),R_().then(E=>l(E.map(M_))).catch(()=>{}).finally(()=>{c(!0),h(!1)}))},S=o.trim().toLowerCase(),p=S?a.filter(E=>[E.name,E.city,E.businessType,E.phone].join(" ").toLowerCase().includes(S)).slice(0,6):[],m=E=>{i(E.target.value),g(),v(!0)},f=E=>{t(`/tenants?q=${encodeURIComponent(E)}`),i(""),v(!1)},w=E=>{E.preventDefault();const C=o.trim();C&&f(C)};return b.jsx(FP,{position:"fixed",elevation:0,sx:{bgcolor:"#fff",color:"grey.800",zIndex:E=>E.zIndex.drawer+1,borderBottom:1,borderColor:"divider"},children:b.jsxs(up,{sx:{minHeight:64,px:{xs:1.5,sm:2.5},gap:1},children:[b.jsx($P,{color:"inherit",edge:"start",onClick:e,sx:{mr:.5},children:b.jsx(y1,{})}),b.jsx(xe,{onClick:()=>t("/dashboard"),sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:b.jsx(w1,{height:22})}),b.jsx(xe,{sx:{flexGrow:1}}),b.jsx(JR,{onClickAway:()=>v(!1),children:b.jsxs(xe,{sx:{display:{xs:"none",sm:"block"},position:"relative"},children:[b.jsxs(xe,{ref:s,component:"form",onSubmit:w,sx:{display:"flex",alignItems:"center",bgcolor:"grey.100",borderRadius:2,px:1.5,py:.5,width:{sm:240,md:320},"&:hover":{bgcolor:"grey.200"},"&:focus-within":{bgcolor:"grey.200"}},children:[b.jsx(xd,{sx:{fontSize:20,mr:1,color:"grey.500"}}),b.jsx(bR,{value:o,onChange:m,onFocus:()=>{g(),o.trim()&&v(!0)},placeholder:"Search clients…",sx:{color:"grey.800",fontSize:"0.875rem",flex:1,"&::placeholder":{color:"grey.500"}},inputProps:{"aria-label":"search"}})]}),b.jsx(lp,{open:x&&!!S,anchorEl:s.current,placement:"bottom-start",style:{zIndex:1400,width:(P=s.current)==null?void 0:P.offsetWidth},children:b.jsx(au,{sx:{mt:1,borderRadius:2,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:d&&p.length===0?b.jsx(xe,{sx:{display:"flex",justifyContent:"center",py:2.5},children:b.jsx(r1,{size:20})}):p.length===0?b.jsx(xe,{sx:{px:2,py:2},children:b.jsxs(St,{variant:"body2",color:"text.secondary",children:["No clients match “",o.trim(),"”."]})}):b.jsxs(b.Fragment,{children:[p.map(E=>b.jsxs(Js,{onClick:()=>f(E.name),sx:{py:1,gap:1.25},children:[b.jsx(T_,{name:E.name,size:30}),b.jsxs(xe,{sx:{minWidth:0},children:[b.jsx(St,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},noWrap:!0,children:E.name}),b.jsx(St,{variant:"caption",color:"text.secondary",noWrap:!0,children:[E.businessType,E.city].filter(Boolean).join(" · ")||E.phone})]})]},E.id)),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>f(o.trim()),sx:{py:1.25,color:"primary.main",fontWeight:600},children:[b.jsx(xd,{fontSize:"small",sx:{mr:1}}),"See all results for “",o.trim(),"”"]})]})})})]})}),b.jsxs(xe,{onClick:E=>r(E.currentTarget),sx:{display:"flex",alignItems:"center",gap:1,ml:.5,cursor:"pointer",py:.5,px:.5,borderRadius:2,"&:hover":{bgcolor:"grey.100"}},children:[b.jsx(gd,{sx:{width:34,height:34,bgcolor:fg,color:"#fff",fontWeight:700},children:"A"}),b.jsxs(xe,{sx:{display:{xs:"none",md:"block"},lineHeight:1.1},children:[b.jsx(St,{variant:"subtitle2",sx:{color:"grey.800",fontWeight:600},children:"Admin"}),b.jsx(St,{variant:"caption",sx:{color:"text.secondary"},children:"Operations Admin"})]})]}),b.jsxs(PM,{anchorEl:n,open:!!n,onClose:()=>r(null),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},PaperProps:{sx:{mt:1,minWidth:220}},children:[b.jsx(xe,{sx:{px:2,py:1.5},children:b.jsxs(W$,{direction:"row",spacing:1.5,alignItems:"center",children:[b.jsx(gd,{sx:{width:38,height:38,bgcolor:fg,color:"#fff",fontWeight:700},children:"A"}),b.jsxs(xe,{sx:{lineHeight:1.2},children:[b.jsx(St,{variant:"subtitle2",sx:{fontWeight:700},children:"Admin"}),b.jsx(St,{variant:"caption",color:"text.secondary",children:"Operations Admin"})]})]})}),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>{r(null),t("/settings")},children:[b.jsx(sl,{children:b.jsx(pp,{fontSize:"small"})}),"Settings"]}),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>{r(null),localStorage.removeItem("auth_token"),t("/login")},sx:{color:"error.main"},children:[b.jsx(sl,{children:b.jsx(x1,{fontSize:"small",color:"error"})}),"Logout"]})]})]})})}var mp={},O_=Ut;Object.defineProperty(mp,"__esModule",{value:!0});var S1=mp.default=void 0,L_=O_(En()),j_=b;S1=mp.default=(0,L_.default)((0,j_.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");var gp={},I_=Ut;Object.defineProperty(gp,"__esModule",{value:!0});var E1=gp.default=void 0,D_=I_(En()),A_=b;E1=gp.default=(0,D_.default)((0,A_.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var vp={},N_=Ut;Object.defineProperty(vp,"__esModule",{value:!0});var C1=vp.default=void 0,z_=N_(En()),F_=b;C1=vp.default=(0,z_.default)((0,F_.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord");var yp={},B_=Ut;Object.defineProperty(yp,"__esModule",{value:!0});var wd=yp.default=void 0,W_=B_(En()),U_=b;wd=yp.default=(0,W_.default)((0,U_.jsx)("path",{d:"M19 5v2h-4V5zM9 5v6H5V5zm10 8v6h-4v-6zM9 17v2H5v-2zM21 3h-8v6h8zM11 3H3v10h8zm10 8h-8v10h8zm-10 4H3v6h8z"}),"DashboardOutlined");var xp={},H_=Ut;Object.defineProperty(xp,"__esModule",{value:!0});var k1=xp.default=void 0,V_=H_(En()),Y_=b;k1=xp.default=(0,V_.default)((0,Y_.jsx)("path",{d:"M17 11V3H7v4H3v14h8v-4h2v4h8V11zM7 19H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm4 4H9v-2h2zm0-4H9V9h2zm0-4H9V5h2zm4 8h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm4 12h-2v-2h2zm0-4h-2v-2h2z"}),"ApartmentOutlined");var wp={},K_=Ut;Object.defineProperty(wp,"__esModule",{value:!0});var b1=wp.default=void 0,G_=K_(En()),Q_=b;b1=wp.default=(0,G_.default)((0,Q_.jsx)("path",{d:"M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29M20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74M8.07 16c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zM12 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"GroupsOutlined");var Sp={},X_=Ut;Object.defineProperty(Sp,"__esModule",{value:!0});var P1=Sp.default=void 0,q_=X_(En()),Z_=b;P1=Sp.default=(0,q_.default)((0,Z_.jsx)("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4"}),"AttachMoneyOutlined");const pg=[{group:"CRM",items:[{id:"dashboard",title:"Dashboard",url:"/dashboard",icon:wd},{id:"tenants",title:"Clients",url:"/tenants",icon:k1},{id:"survey",title:"Survey",url:"/survey",icon:wd},{id:"pricing",title:"Pricing Matrix",url:"/pricing",icon:P1},{id:"team-users",title:"App Users",url:"/team-users",icon:b1}]},{group:"System",items:[{id:"settings",title:"Settings",url:"/settings",icon:pp}]}],Ea=264,Sd=78,ut="#C01227";function hg({item:e,open:t,active:n,depth:r=0,onClick:o}){const i=e.icon,s=b.jsxs(l1,{selected:n,onClick:o,sx:{minHeight:44,my:.25,mx:t?1:.75,px:t?1.5:0,justifyContent:t?"flex-start":"center",borderRadius:2,color:n?ut:"grey.700","& .MuiListItemIcon-root":{color:n?ut:"grey.500"},"&:hover":{bgcolor:ji(ut,.04),color:ut,"& .MuiListItemIcon-root":{color:ut}},"&.Mui-selected":{bgcolor:ji(ut,.08),color:ut,"& .MuiListItemIcon-root":{color:ut},borderLeft:t?`4px solid ${ut}`:"none","&:hover":{bgcolor:ji(ut,.12)}}},children:[b.jsx(sl,{sx:{minWidth:t?34:"auto",justifyContent:"center"},children:r>0&&!i?b.jsx(C1,{sx:{fontSize:8}}):i?b.jsx(i,{fontSize:"small"}):null}),t&&b.jsx(u1,{primary:e.title,primaryTypographyProps:{fontSize:"0.875rem",fontWeight:n?700:500}})]});return t?s:b.jsx(f1,{title:e.title,placement:"right",children:s})}function J_({open:e,mobileOpen:t,onMobileClose:n,isMobile:r}){const o=Xr(),i=ms(),s=x=>x&&o.pathname.startsWith(x),a=e||r,l=pg.flatMap(x=>x.items).filter(x=>x.children&&x.children.some(v=>s(v.url))).map(x=>x.id),[u,c]=y.useState(l),d=x=>{i(x),r&&n()},h=b.jsxs(xe,{sx:{bgcolor:"#fff",height:"100%",color:"grey.800",display:"flex",flexDirection:"column",borderRight:1,borderColor:"divider"},children:[b.jsx(up,{sx:{px:a?2.5:0,justifyContent:a?"flex-start":"center",minHeight:64},children:b.jsx(w1,{compact:!a})}),b.jsx(xe,{sx:{overflowY:"auto",overflowX:"hidden",flexGrow:1,pb:2},children:pg.map(x=>b.jsxs(xe,{sx:{mt:1},children:[a&&b.jsx(St,{variant:"overline",sx:{px:2.5,color:"#A06060",fontSize:"0.6875rem",letterSpacing:"0.08em",fontWeight:700},children:x.group}),b.jsx(a1,{disablePadding:!0,sx:{mt:.5},children:x.items.map(v=>{if(v.children){const g=u.includes(v.id),S=v.children.some(f=>s(f.url)),p=v.icon,m=b.jsxs(l1,{onClick:()=>a?c(f=>f.includes(v.id)?f.filter(w=>w!==v.id):[...f,v.id]):d(v.children[0].url),sx:{minHeight:44,my:.25,mx:a?1:.75,px:a?1.5:0,justifyContent:a?"flex-start":"center",borderRadius:2,color:S?ut:"grey.700",bgcolor:S&&!g?ji(ut,.08):"transparent","& .MuiListItemIcon-root":{color:S?ut:"grey.500"},"&:hover":{bgcolor:ji(ut,.04),color:ut,"& .MuiListItemIcon-root":{color:ut}}},children:[b.jsx(sl,{sx:{minWidth:a?34:"auto",justifyContent:"center"},children:b.jsx(p,{fontSize:"small"})}),a&&b.jsxs(b.Fragment,{children:[b.jsx(u1,{primary:v.title,primaryTypographyProps:{fontSize:"0.875rem",fontWeight:500}}),g?b.jsx(S1,{fontSize:"small"}):b.jsx(E1,{fontSize:"small"})]})]});return b.jsxs(xe,{children:[a?m:b.jsx(f1,{title:v.title,placement:"right",children:m}),a&&b.jsx(W0,{in:g,timeout:"auto",unmountOnExit:!0,children:b.jsx(xe,{sx:{pl:1.5},children:v.children.map(f=>b.jsx(hg,{item:f,open:!0,depth:1,active:s(f.url),onClick:()=>d(f.url)},f.id))})})]},v.id)}return b.jsx(hg,{item:v,open:a,active:s(v.url),onClick:()=>d(v.url)},v.id)})})]},x.group))}),a&&b.jsx(xe,{sx:{p:2,borderTop:"1px solid",borderColor:"divider"},children:b.jsx(St,{variant:"caption",sx:{color:"text.secondary"},children:"Doormile CRM v1.0"})})]});return r?b.jsx(tg,{variant:"temporary",open:t,onClose:n,ModalProps:{keepMounted:!0},sx:{"& .MuiDrawer-paper":{width:Ea,border:"none"}},children:h}):b.jsx(tg,{variant:"permanent",sx:{width:e?Ea:Sd,flexShrink:0,whiteSpace:"nowrap","& .MuiDrawer-paper":{width:e?Ea:Sd,border:"none",overflowX:"hidden",transition:x=>x.transitions.create("width",{duration:x.transitions.duration.standard})}},open:e,children:h})}function eO(){const e=Zr(),t=HC(e.breakpoints.down("lg")),[n,r]=y.useState(!0),[o,i]=y.useState(!1),s=()=>{t?i(a=>!a):r(a=>!a)};return b.jsxs(xe,{sx:{display:"flex",bgcolor:"background.default",minHeight:"100vh"},children:[b.jsx(__,{onToggle:s}),b.jsx(J_,{open:n,isMobile:t,mobileOpen:o,onMobileClose:()=>i(!1)}),b.jsxs(xe,{component:"main",sx:{flexGrow:1,width:{lg:`calc(100% - ${n?Ea:Sd}px)`},minHeight:"100vh",transition:e.transitions.create("width",{duration:e.transitions.duration.standard})},children:[b.jsx(up,{sx:{minHeight:64}}),b.jsx(xe,{sx:{p:{xs:2,sm:3}},children:b.jsx(Cf,{})})]})]})}function tO(){return b.jsx(xe,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:b.jsx(Cf,{})})}function nO({children:e}){return localStorage.getItem("logged_in")?e||b.jsx(Cf,{}):b.jsx(Ay,{to:"/login",replace:!0})}const Vt=e=>{const t=y.lazy(e);return b.jsx(y.Suspense,{fallback:b.jsx(xe,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh"},children:b.jsx(r1,{color:"primary"})}),children:b.jsx(t,{})})};function rO(){return b.jsxs(o2,{children:[b.jsxs(st,{element:b.jsx(nO,{children:b.jsx(eO,{})}),children:[b.jsx(st,{path:"/dashboard",element:Vt(()=>Ht(()=>import("./Dashboard-Cei3-Abv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])))}),b.jsx(st,{path:"/tenants",element:Vt(()=>Ht(()=>import("./Tenants-Vq8ITDL4.js"),__vite__mapDeps([10,11,1,12,2,3,4,13,8,14,15,16,5,7,6,17])))}),b.jsx(st,{path:"/survey",element:Vt(()=>Ht(()=>import("./Survey-ndeaWZLt.js"),__vite__mapDeps([18,11,12,13,8,14,15,4,3,5,6,17])))}),b.jsx(st,{path:"/pricing",element:Vt(()=>Ht(()=>import("./Pricing-B5KK24ta.js"),__vite__mapDeps([19,11,15,4,3,6,14,8])))}),b.jsx(st,{path:"/team-users",element:Vt(()=>Ht(()=>import("./TeamUsers-Cu1_QgRb.js"),__vite__mapDeps([20,11,1,13,8,14,16,4,3,5,7,6,17])))}),b.jsx(st,{path:"/settings",element:Vt(()=>Ht(()=>import("./Settings-C9JXqPw8.js"),__vite__mapDeps([21,22,4,3,6,14,9,7,17])))})]}),b.jsxs(st,{element:b.jsx(tO,{}),children:[b.jsx(st,{path:"/login",element:Vt(()=>Ht(()=>import("./Login-HaAIClqZ.js"),__vite__mapDeps([23,22,3,14,17,6])))}),b.jsx(st,{path:"/under-construction",element:Vt(()=>Ht(()=>import("./UnderConstruction-BRmjUgS2.js"),__vite__mapDeps([24,25,6])))}),b.jsx(st,{path:"/coming-soon",element:Vt(()=>Ht(()=>import("./ComingSoon-DFNLKciP.js"),__vite__mapDeps([26,14,6])))}),b.jsx(st,{path:"/500",element:Vt(()=>Ht(()=>import("./Error500-BhnsxntT.js"),__vite__mapDeps([27,25,6])))}),b.jsx(st,{path:"/404",element:Vt(()=>Ht(()=>import("./Error404-Tw0V7paU.js"),__vite__mapDeps([28,25,6])))})]}),b.jsx(st,{path:"/",element:b.jsx(Ay,{to:"/dashboard",replace:!0})}),b.jsx(st,{path:"*",element:Vt(()=>Ht(()=>import("./Error404-Tw0V7paU.js"),__vite__mapDeps([28,25,6])))})]})}rc.createRoot(document.getElementById("root")).render(b.jsx(gn.StrictMode,{children:b.jsxs(Db,{theme:yd,children:[b.jsx(r$,{}),b.jsx(HM,{dateAdapter:i_,children:b.jsx(f2,{children:b.jsx(rO,{})})})]})}));export{Vf as $,gt as A,xe as B,r1 as C,Sa as D,cO as E,uO as F,iO as G,xd as H,$P as I,dO as J,f1 as K,W0 as L,Js as M,P1 as N,hO as O,au as P,pO as Q,mO as R,W$ as S,St as T,T_ as U,Cs as V,Jf as W,Mt as X,ou as Y,On as Z,k as _,y as a,Hr as a0,Zr as a1,Xe as a2,F0 as a3,bR as a4,el as a5,up as a6,DR as a7,o1 as a8,BR as a9,wR as aA,XC as aB,aO as aC,gR as aD,gr as aE,PM as aF,jb as aG,qr as aH,Za as aI,Ik as aa,Lk as ab,Or as ac,C0 as ad,sO as ae,il as af,JR as ag,gd as ah,Nl as ai,Go as aj,uP as ak,Kl as al,Vu as am,Sn as an,oO as ao,mR as ap,hR as aq,ms as ar,w1 as as,t1 as at,zl as au,Hf as av,Jt as aw,ER as ax,xR as ay,CR as az,b1 as b,fO as c,k1 as d,M_ as e,R_ as f,gO as g,S0 as h,Ut as i,b as j,vn as k,Se as l,Ee as m,ve as n,Y as o,J as p,ue as q,En as r,Ja as s,lO as t,Uf as u,be as v,ne as w,lp as x,Ae as y,md as z}; +`),o_=(e,t)=>t?(...n)=>e(...n).locale(t):e;class i_{constructor({locale:t,formats:n,instance:r}={}){var o;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=n_,this.setLocaleToValue=i=>{const s=this.getCurrentLocaleCode();return s===i.locale()?i:i.locale(s)},this.hasUTCPlugin=()=>typeof lt.utc<"u",this.hasTimezonePlugin=()=>typeof lt.tz<"u",this.isSame=(i,s,a)=>{const l=this.setTimezone(s,this.getTimezone(i));return i.format(a)===l.format(a)},this.cleanTimezone=i=>{switch(i){case"default":return;case"system":return lt.tz.guess();default:return i}},this.createSystemDate=i=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(i);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const s=lt.tz.guess();return s!=="UTC"?lt.tz(i,s):lt(i)}return lt(i)},this.createUTCDate=i=>{if(!this.hasUTCPlugin())throw new Error(tc);return lt.utc(i)},this.createTZDate=(i,s)=>{if(!this.hasUTCPlugin())throw new Error(tc);if(!this.hasTimezonePlugin())throw new Error(ug);const a=i!==void 0&&!i.endsWith("Z");return lt(i).tz(this.cleanTimezone(s),a)},this.getLocaleFormats=()=>{const i=lt.Ls,s=this.locale||"en";let a=i[s];return a===void 0&&(t_(),a=i.en),a.formats},this.adjustOffset=i=>{if(!this.hasTimezonePlugin())return i;const s=this.getTimezone(i);if(s!=="UTC"){var a,l;const u=i.tz(this.cleanTimezone(s),!0);if(((a=u.$offset)!=null?a:0)===((l=i.$offset)!=null?l:0))return i;i.$offset=u.$offset}return i},this.date=i=>i===null?null:this.dayjs(i),this.dateWithTimezone=(i,s)=>{if(i===null)return null;let a;return s==="UTC"?a=this.createUTCDate(i):s==="system"||s==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(i):a=this.createTZDate(i,s),this.locale===void 0?a:a.locale(this.locale)},this.getTimezone=i=>{if(this.hasTimezonePlugin()){var s;const a=(s=i.$x)==null?void 0:s.$timezone;if(a)return a}return this.hasUTCPlugin()&&i.isUTC()?"UTC":"system"},this.setTimezone=(i,s)=>{if(this.getTimezone(i)===s)return i;if(s==="UTC"){if(!this.hasUTCPlugin())throw new Error(tc);return i.utc()}if(s==="system")return i.local();if(!this.hasTimezonePlugin()){if(s==="default")return i;throw new Error(ug)}return lt.tz(i,this.cleanTimezone(s))},this.toJsDate=i=>i.toDate(),this.parseISO=i=>this.dayjs(i),this.toISO=i=>i.toISOString(),this.parse=(i,s)=>i===""?null:this.dayjs(i,s,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=i=>{const s=this.getLocaleFormats(),a=l=>l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(u,c,d)=>c||d.slice(1));return i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(l,u,c)=>{const d=c&&c.toUpperCase();return u||s[c]||a(s[d])})},this.getFormatHelperText=i=>this.expandFormat(i).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=i=>i===null,this.isValid=i=>this.dayjs(i).isValid(),this.format=(i,s)=>this.formatByString(i,this.formats[s]),this.formatByString=(i,s)=>this.dayjs(i).format(s),this.formatNumber=i=>i,this.getDiff=(i,s,a)=>i.diff(s,a),this.isEqual=(i,s)=>i===null&&s===null?!0:this.dayjs(i).toDate().getTime()===this.dayjs(s).toDate().getTime(),this.isSameYear=(i,s)=>this.isSame(i,s,"YYYY"),this.isSameMonth=(i,s)=>this.isSame(i,s,"YYYY-MM"),this.isSameDay=(i,s)=>this.isSame(i,s,"YYYY-MM-DD"),this.isSameHour=(i,s)=>i.isSame(s,"hour"),this.isAfter=(i,s)=>i>s,this.isAfterYear=(i,s)=>this.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()>s.utc():i.isAfter(s,"year"),this.isAfterDay=(i,s)=>this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()>s.utc():i.isAfter(s,"day"),this.isBefore=(i,s)=>ithis.hasUTCPlugin()?!this.isSameYear(i,s)&&i.utc()this.hasUTCPlugin()?!this.isSameDay(i,s)&&i.utc()i>=s&&i<=a,this.startOfYear=i=>this.adjustOffset(i.startOf("year")),this.startOfMonth=i=>this.adjustOffset(i.startOf("month")),this.startOfWeek=i=>this.adjustOffset(i.startOf("week")),this.startOfDay=i=>this.adjustOffset(i.startOf("day")),this.endOfYear=i=>this.adjustOffset(i.endOf("year")),this.endOfMonth=i=>this.adjustOffset(i.endOf("month")),this.endOfWeek=i=>this.adjustOffset(i.endOf("week")),this.endOfDay=i=>this.adjustOffset(i.endOf("day")),this.addYears=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"year"):i.add(s,"year")),this.addMonths=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"month"):i.add(s,"month")),this.addWeeks=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"week"):i.add(s,"week")),this.addDays=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"day"):i.add(s,"day")),this.addHours=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"hour"):i.add(s,"hour")),this.addMinutes=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"minute"):i.add(s,"minute")),this.addSeconds=(i,s)=>this.adjustOffset(s<0?i.subtract(Math.abs(s),"second"):i.add(s,"second")),this.getYear=i=>i.year(),this.getMonth=i=>i.month(),this.getDate=i=>i.date(),this.getHours=i=>i.hour(),this.getMinutes=i=>i.minute(),this.getSeconds=i=>i.second(),this.getMilliseconds=i=>i.millisecond(),this.setYear=(i,s)=>this.adjustOffset(i.set("year",s)),this.setMonth=(i,s)=>this.adjustOffset(i.set("month",s)),this.setDate=(i,s)=>this.adjustOffset(i.set("date",s)),this.setHours=(i,s)=>this.adjustOffset(i.set("hour",s)),this.setMinutes=(i,s)=>this.adjustOffset(i.set("minute",s)),this.setSeconds=(i,s)=>this.adjustOffset(i.set("second",s)),this.setMilliseconds=(i,s)=>this.adjustOffset(i.set("millisecond",s)),this.getDaysInMonth=i=>i.daysInMonth(),this.getNextMonth=i=>this.addMonths(i,1),this.getPreviousMonth=i=>this.addMonths(i,-1),this.getMonthArray=i=>{const a=[i.startOf("year")];for(;a.length<12;){const l=a[a.length-1];a.push(this.addMonths(l,1))}return a},this.mergeDateAndTime=(i,s)=>i.hour(s.hour()).minute(s.minute()).second(s.second()),this.getWeekdays=()=>{const i=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(s=>this.formatByString(this.addDays(i,s),"dd"))},this.getWeekArray=i=>{const s=this.setLocaleToValue(i),a=s.startOf("month").startOf("week"),l=s.endOf("month").endOf("week");let u=0,c=a;const d=[];for(;ci.week(),this.getYearRange=(i,s)=>{const a=i.startOf("year"),l=s.endOf("year"),u=[];let c=a;for(;ci==="am"?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=o_((o=this.rawDayJsInstance)!=null?o:lt,t),this.locale=t,this.formats=k({},r_,n),lt.extend(GM)}}const Ne={0:"#FFFFFF",50:"#FAFAFA",100:"#F5F5F5",200:"#F0F0F0",300:"#D9D9D9",400:"#BFBFBF",500:"#8C8C8C",600:"#595959",700:"#434343",800:"#262626",900:"#141414",A50:"#FAFAFB",A100:"#E6EBF1"},s_={mode:"light",common:{black:"#000000",white:"#FFFFFF"},primary:{lighter:"#F8E0E3",100:"#EFBBC1",200:"#E08A92",light:"#D6515C",400:"#CC2E3C",main:"#C01227",dark:"#9E0E20",700:"#870C1B",darker:"#7E0B17",900:"#520710",contrastText:"#FFFFFF"},secondary:{lighter:Ne[100],100:Ne[100],200:Ne[200],light:Ne[300],400:Ne[400],main:Ne[500],600:Ne[600],dark:Ne[700],800:Ne[800],darker:Ne[900],A100:Ne[0],A200:Ne[400],A300:Ne[700],contrastText:Ne[0]},error:{lighter:"#FEEAE9",light:"#F88078",main:"#F04134",dark:"#A82216",darker:"#7A150C",contrastText:"#FFFFFF"},warning:{lighter:"#FFF7E0",light:"#FFD666",main:"#FFBF00",dark:"#B38600",darker:"#805F00",contrastText:"#262626"},info:{lighter:"#E0F7F8",light:"#66CBD2",main:"#00A2AE",dark:"#00727B",darker:"#005159",contrastText:"#FFFFFF"},success:{lighter:"#E3F6EC",light:"#5CC98C",main:"#00A854",dark:"#00773B",darker:"#00552A",contrastText:"#FFFFFF"},grey:Ne,text:{primary:Ne[800],secondary:Ne[600],disabled:Ne[400]},action:{disabled:Ne[300],hover:"rgba(192, 18, 39, 0.04)",selected:"rgba(192, 18, 39, 0.08)"},divider:Ne[200],background:{paper:"#FFFFFF",default:Ne.A50}},a_={fontFamily:'"Public Sans", "Inter", "Helvetica", "Arial", sans-serif',htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:700,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:700,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:500,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{fontSize:"0.6875rem",fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase"},button:{textTransform:"capitalize",fontWeight:600}},Ci={card:"0px 1px 4px rgba(0, 0, 0, 0.08)",cardHover:"0px 4px 16px rgba(0, 0, 0, 0.10)",widget:"0px 2px 14px rgba(38, 38, 38, 0.06)",dropdown:"0px 8px 24px rgba(38, 38, 38, 0.12)",primaryGlow:"0px 6px 16px rgba(192, 18, 39, 0.28)",primaryGlowHover:"0px 8px 20px rgba(192, 18, 39, 0.36)",header:"0px 1px 0px rgba(0, 0, 0, 0.06)"};function l_(e){const{palette:t}=e;return{MuiCssBaseline:{styleOverrides:{body:{backgroundColor:t.background.default},"*::-webkit-scrollbar":{width:8,height:8},"*::-webkit-scrollbar-thumb":{background:t.grey[300],borderRadius:8},"*::-webkit-scrollbar-thumb:hover":{background:t.grey[400]}}},MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,fontWeight:600,padding:"7px 18px"},containedPrimary:{boxShadow:Ci.primaryGlow,"&:hover":{boxShadow:Ci.primaryGlowHover,backgroundColor:t.primary.dark}},outlined:{borderColor:t.grey[300]},sizeLarge:{padding:"10px 22px",fontSize:"0.9375rem"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:8}}},MuiCard:{styleOverrides:{root:{borderRadius:10,border:`1px solid ${t.grey[200]}`,boxShadow:Ci.card,backgroundImage:"none"}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h5"},subheaderTypographyProps:{variant:"caption"}},styleOverrides:{root:{padding:20}}},MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}},MuiPaper:{defaultProps:{elevation:0},styleOverrides:{rounded:{borderRadius:10}}},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:600,fontSize:"0.75rem"},sizeSmall:{height:22},label:{paddingLeft:8,paddingRight:8}}},MuiTableCell:{styleOverrides:{root:{borderColor:t.grey[200],padding:"12px 16px",fontSize:"0.8125rem"},head:{fontWeight:600,color:t.grey[600],backgroundColor:t.grey[50],textTransform:"none",whiteSpace:"nowrap"}}},MuiTableRow:{styleOverrides:{root:{"&:hover":{backgroundColor:t.primary.lighter+"66"}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:8,backgroundColor:t.background.paper,"& .MuiOutlinedInput-notchedOutline":{borderColor:t.grey[300]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:t.grey[400]}},input:{padding:"11px 14px"}}},MuiInputLabel:{styleOverrides:{root:{color:t.grey[600],fontSize:"0.875rem"}}},MuiTab:{styleOverrides:{root:{textTransform:"none",fontWeight:600,minHeight:46,fontSize:"0.875rem"}}},MuiTabs:{styleOverrides:{indicator:{height:3,borderRadius:3}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:t.grey[800],borderRadius:6,fontSize:"0.75rem",padding:"6px 10px"}}},MuiDialog:{styleOverrides:{paper:{borderRadius:12}}},MuiAvatar:{styleOverrides:{root:{fontWeight:600,fontSize:"0.875rem"}}},MuiListItemButton:{styleOverrides:{root:{borderRadius:8}}},MuiLinearProgress:{styleOverrides:{root:{borderRadius:8,height:6,backgroundColor:t.grey[200]}}},MuiMenu:{styleOverrides:{paper:{borderRadius:10,boxShadow:Ci.dropdown,marginTop:4}}}}}let yd=Qf({palette:s_,typography:a_,shape:{borderRadius:6},customShadows:Ci,mixins:{toolbar:{minHeight:64}}});yd.components=l_(yd);const u_="modulepreload",c_=function(e){return"/"+e},cg={},Ht=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=c_(l),l in cg)return;cg[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":u_,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,x)=>{d.addEventListener("load",h),d.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};var cp={},nc={};const d_=Vn(Wb);var dg;function En(){return dg||(dg=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=d_}(nc)),nc}var f_=Ut;Object.defineProperty(cp,"__esModule",{value:!0});var y1=cp.default=void 0,p_=f_(En()),h_=b;y1=cp.default=(0,p_.default)((0,h_.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var dp={},m_=Ut;Object.defineProperty(dp,"__esModule",{value:!0});var xd=dp.default=void 0,g_=m_(En()),v_=b;xd=dp.default=(0,g_.default)((0,v_.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");var fp={},y_=Ut;Object.defineProperty(fp,"__esModule",{value:!0});var pp=fp.default=void 0,x_=y_(En()),w_=b;pp=fp.default=(0,x_.default)((0,w_.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined");var hp={},S_=Ut;Object.defineProperty(hp,"__esModule",{value:!0});var x1=hp.default=void 0,E_=S_(En()),C_=b;x1=hp.default=(0,E_.default)((0,C_.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");const k_="/Doormile-logo.png";function w1({onDark:e=!1,compact:t=!1,height:n=26,sx:r}){if(t){const o=e?"#FFFFFF":"#C01227",i=e?"#C01227":"#FFFFFF";return b.jsx(xe,{sx:{display:"flex",alignItems:"center",...r},children:b.jsx(xe,{sx:{width:34,height:34,borderRadius:2,bgcolor:o,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxShadow:e?"none":"0 4px 10px rgba(192, 18, 39,0.30)"},children:b.jsx(St,{sx:{color:i,fontWeight:800,fontSize:"1.25rem",lineHeight:1},children:"D"})})})}return b.jsx(xe,{sx:{display:"flex",alignItems:"center",...r},children:b.jsx(xe,{component:"img",src:k_,alt:"Doormile",sx:{height:n,width:"auto",display:"block",filter:e?"none":"brightness(0) saturate(100%) invert(15%) sepia(93%) saturate(5437%) hue-rotate(346deg) brightness(81%) contrast(92%)"}})})}const lO=e=>String(e||"").replace(/[_-]+/g," ").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/\s+/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim(),b_=(e="")=>{let t=0;for(let r=0;re.split(" ").filter(Boolean).slice(0,2).map(t=>t[0]).join("").toUpperCase();function T_({name:e="",size:t=32,sx:n}){return b.jsx(gd,{sx:{width:t,height:t,bgcolor:b_(e),fontSize:t*.42,...n},children:P_(e)})}const Cr="https://api.doormile.com/api/v1",kr=()=>{const e=localStorage.getItem("auth_token");return{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{}}};async function R_(){const e=await fetch(`${Cr}/crm/clients`,{headers:kr()});if(!e.ok)throw new Error("Failed to fetch clients");return e.json()}async function uO(e){const t=await fetch(`${Cr}/crm/clients`,{method:"POST",headers:kr(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to create client");return t.json()}async function cO(e,t){const n=await fetch(`${Cr}/crm/clients/${e}`,{method:"PUT",headers:kr(),body:JSON.stringify(t)});if(!n.ok)throw new Error("Failed to update client");return n.json()}async function dO(e){const t=await fetch(`${Cr}/crm/clients/${e}`,{method:"DELETE",headers:kr()});if(!t.ok)throw new Error("Failed to delete client");return t.json()}async function fO(){const e=await fetch(`${Cr}/admin/users`,{headers:kr()});if(!e.ok)throw new Error("Failed to fetch users");return e.json()}async function pO(e){const t=await fetch(`${Cr}/admin/users`,{method:"POST",headers:kr(),body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to create user");return t.json()}async function hO(e,t){const n=await fetch(`${Cr}/admin/users/${e}`,{method:"PUT",headers:kr(),body:JSON.stringify(t)});if(!n.ok)throw new Error("Failed to update user");return n.json()}async function mO(e){const t=await fetch(`${Cr}/admin/users/${e}`,{method:"DELETE",headers:kr()});if(!t.ok)throw new Error("Failed to delete user");return t.json()}const $_=e=>"CLI-"+String(e).replace(/[^a-zA-Z0-9]/g,"").toUpperCase().substring(0,6).padStart(6,"0");function M_(e){const t=e.payload??e,n=t.id??e.id,r=$_(n);return{id:n,logicalId:r,clientId:r,name:t.first_name?`${t.first_name} ${t.last_name||""}`.trim():t.name||"—",phone:t.phone||"",city:t.city||"",businessState:t.businessState||"",businessType:t.businessType||"",status:t.status||"unknown",parcelVolume:Number(t.parcelVolume)||0,activeContracts:Number(t.activeContracts)||0,frequency:t.frequency||"",provider:t.provider||"",efficiency:t.efficiency||"",logisticsSegment:t.logisticsSegment||"",transitFrom:t.transitFrom||"",transitTo:t.transitTo||"",neighbourhood:t.neighbourhood||t.surveyZone||"",surveyAddress:t.surveyAddress||t.address||"",surveyLat:t.survey_lat??t.surveyLat??"",surveyLng:t.survey_long??t.surveyLng??"",dataConsent:t.dataConsent||"",lastUpdated:t.lastUpdated||"",notes:t.notes||""}}function gO(e){const t=e.payload??e;return{id:t.id??e.id,name:t.first_name?`${t.first_name} ${t.last_name||""}`.trim():t.name||"—",email:t.email||"",phone:t.phone||"",role:t.role||"unknown",pin:t.pin||""}}const fg="#C01227";function __({onToggle:e}){var P;const t=ms(),[n,r]=y.useState(null),[o,i]=y.useState(""),s=y.useRef(null),[a,l]=y.useState([]),[u,c]=y.useState(!1),[d,h]=y.useState(!1),[x,v]=y.useState(!1),g=()=>{u||d||(h(!0),R_().then(E=>l(E.map(M_))).catch(()=>{}).finally(()=>{c(!0),h(!1)}))},S=o.trim().toLowerCase(),p=S?a.filter(E=>[E.name,E.city,E.businessType,E.phone].join(" ").toLowerCase().includes(S)).slice(0,6):[],m=E=>{i(E.target.value),g(),v(!0)},f=E=>{t(`/tenants?q=${encodeURIComponent(E)}`),i(""),v(!1)},w=E=>{E.preventDefault();const C=o.trim();C&&f(C)};return b.jsx(FP,{position:"fixed",elevation:0,sx:{bgcolor:"#fff",color:"grey.800",zIndex:E=>E.zIndex.drawer+1,borderBottom:1,borderColor:"divider"},children:b.jsxs(up,{sx:{minHeight:64,px:{xs:1.5,sm:2.5},gap:1},children:[b.jsx($P,{color:"inherit",edge:"start",onClick:e,sx:{mr:.5},children:b.jsx(y1,{})}),b.jsx(xe,{onClick:()=>t("/dashboard"),sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:b.jsx(w1,{height:22})}),b.jsx(xe,{sx:{flexGrow:1}}),b.jsx(JR,{onClickAway:()=>v(!1),children:b.jsxs(xe,{sx:{display:{xs:"none",sm:"block"},position:"relative"},children:[b.jsxs(xe,{ref:s,component:"form",onSubmit:w,sx:{display:"flex",alignItems:"center",bgcolor:"grey.100",borderRadius:2,px:1.5,py:.5,width:{sm:240,md:320},"&:hover":{bgcolor:"grey.200"},"&:focus-within":{bgcolor:"grey.200"}},children:[b.jsx(xd,{sx:{fontSize:20,mr:1,color:"grey.500"}}),b.jsx(bR,{value:o,onChange:m,onFocus:()=>{g(),o.trim()&&v(!0)},placeholder:"Search clients…",sx:{color:"grey.800",fontSize:"0.875rem",flex:1,"&::placeholder":{color:"grey.500"}},inputProps:{"aria-label":"search"}})]}),b.jsx(lp,{open:x&&!!S,anchorEl:s.current,placement:"bottom-start",style:{zIndex:1400,width:(P=s.current)==null?void 0:P.offsetWidth},children:b.jsx(au,{sx:{mt:1,borderRadius:2,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:d&&p.length===0?b.jsx(xe,{sx:{display:"flex",justifyContent:"center",py:2.5},children:b.jsx(r1,{size:20})}):p.length===0?b.jsx(xe,{sx:{px:2,py:2},children:b.jsxs(St,{variant:"body2",color:"text.secondary",children:["No clients match “",o.trim(),"”."]})}):b.jsxs(b.Fragment,{children:[p.map(E=>b.jsxs(Js,{onClick:()=>f(E.name),sx:{py:1,gap:1.25},children:[b.jsx(T_,{name:E.name,size:30}),b.jsxs(xe,{sx:{minWidth:0},children:[b.jsx(St,{variant:"body2",sx:{fontWeight:600,color:"grey.800"},noWrap:!0,children:E.name}),b.jsx(St,{variant:"caption",color:"text.secondary",noWrap:!0,children:[E.businessType,E.city].filter(Boolean).join(" · ")||E.phone})]})]},E.id)),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>f(o.trim()),sx:{py:1.25,color:"primary.main",fontWeight:600},children:[b.jsx(xd,{fontSize:"small",sx:{mr:1}}),"See all results for “",o.trim(),"”"]})]})})})]})}),b.jsxs(xe,{onClick:E=>r(E.currentTarget),sx:{display:"flex",alignItems:"center",gap:1,ml:.5,cursor:"pointer",py:.5,px:.5,borderRadius:2,"&:hover":{bgcolor:"grey.100"}},children:[b.jsx(gd,{sx:{width:34,height:34,bgcolor:fg,color:"#fff",fontWeight:700},children:"A"}),b.jsxs(xe,{sx:{display:{xs:"none",md:"block"},lineHeight:1.1},children:[b.jsx(St,{variant:"subtitle2",sx:{color:"grey.800",fontWeight:600},children:"Admin"}),b.jsx(St,{variant:"caption",sx:{color:"text.secondary"},children:"Operations Admin"})]})]}),b.jsxs(PM,{anchorEl:n,open:!!n,onClose:()=>r(null),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},PaperProps:{sx:{mt:1,minWidth:220}},children:[b.jsx(xe,{sx:{px:2,py:1.5},children:b.jsxs(W$,{direction:"row",spacing:1.5,alignItems:"center",children:[b.jsx(gd,{sx:{width:38,height:38,bgcolor:fg,color:"#fff",fontWeight:700},children:"A"}),b.jsxs(xe,{sx:{lineHeight:1.2},children:[b.jsx(St,{variant:"subtitle2",sx:{fontWeight:700},children:"Admin"}),b.jsx(St,{variant:"caption",color:"text.secondary",children:"Operations Admin"})]})]})}),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>{r(null),t("/settings")},children:[b.jsx(sl,{children:b.jsx(pp,{fontSize:"small"})}),"Settings"]}),b.jsx(Sa,{}),b.jsxs(Js,{onClick:()=>{r(null),localStorage.removeItem("auth_token"),t("/login")},sx:{color:"error.main"},children:[b.jsx(sl,{children:b.jsx(x1,{fontSize:"small",color:"error"})}),"Logout"]})]})]})})}var mp={},O_=Ut;Object.defineProperty(mp,"__esModule",{value:!0});var S1=mp.default=void 0,L_=O_(En()),j_=b;S1=mp.default=(0,L_.default)((0,j_.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");var gp={},I_=Ut;Object.defineProperty(gp,"__esModule",{value:!0});var E1=gp.default=void 0,D_=I_(En()),A_=b;E1=gp.default=(0,D_.default)((0,A_.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var vp={},N_=Ut;Object.defineProperty(vp,"__esModule",{value:!0});var C1=vp.default=void 0,z_=N_(En()),F_=b;C1=vp.default=(0,z_.default)((0,F_.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord");var yp={},B_=Ut;Object.defineProperty(yp,"__esModule",{value:!0});var wd=yp.default=void 0,W_=B_(En()),U_=b;wd=yp.default=(0,W_.default)((0,U_.jsx)("path",{d:"M19 5v2h-4V5zM9 5v6H5V5zm10 8v6h-4v-6zM9 17v2H5v-2zM21 3h-8v6h8zM11 3H3v10h8zm10 8h-8v10h8zm-10 4H3v6h8z"}),"DashboardOutlined");var xp={},H_=Ut;Object.defineProperty(xp,"__esModule",{value:!0});var k1=xp.default=void 0,V_=H_(En()),Y_=b;k1=xp.default=(0,V_.default)((0,Y_.jsx)("path",{d:"M17 11V3H7v4H3v14h8v-4h2v4h8V11zM7 19H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm4 4H9v-2h2zm0-4H9V9h2zm0-4H9V5h2zm4 8h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm4 12h-2v-2h2zm0-4h-2v-2h2z"}),"ApartmentOutlined");var wp={},K_=Ut;Object.defineProperty(wp,"__esModule",{value:!0});var b1=wp.default=void 0,G_=K_(En()),Q_=b;b1=wp.default=(0,G_.default)((0,Q_.jsx)("path",{d:"M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29M20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74M8.07 16c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zM12 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"GroupsOutlined");var Sp={},X_=Ut;Object.defineProperty(Sp,"__esModule",{value:!0});var P1=Sp.default=void 0,q_=X_(En()),Z_=b;P1=Sp.default=(0,q_.default)((0,Z_.jsx)("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4"}),"AttachMoneyOutlined");const pg=[{group:"CRM",items:[{id:"dashboard",title:"Dashboard",url:"/dashboard",icon:wd},{id:"tenants",title:"Clients",url:"/tenants",icon:k1},{id:"survey",title:"Survey",url:"/survey",icon:wd},{id:"pricing",title:"Pricing Matrix",url:"/pricing",icon:P1},{id:"team-users",title:"App Users",url:"/team-users",icon:b1}]},{group:"System",items:[{id:"settings",title:"Settings",url:"/settings",icon:pp}]}],Ea=264,Sd=78,ut="#C01227";function hg({item:e,open:t,active:n,depth:r=0,onClick:o}){const i=e.icon,s=b.jsxs(l1,{selected:n,onClick:o,sx:{minHeight:44,my:.25,mx:t?1:.75,px:t?1.5:0,justifyContent:t?"flex-start":"center",borderRadius:2,color:n?ut:"grey.700","& .MuiListItemIcon-root":{color:n?ut:"grey.500"},"&:hover":{bgcolor:ji(ut,.04),color:ut,"& .MuiListItemIcon-root":{color:ut}},"&.Mui-selected":{bgcolor:ji(ut,.08),color:ut,"& .MuiListItemIcon-root":{color:ut},borderLeft:t?`4px solid ${ut}`:"none","&:hover":{bgcolor:ji(ut,.12)}}},children:[b.jsx(sl,{sx:{minWidth:t?34:"auto",justifyContent:"center"},children:r>0&&!i?b.jsx(C1,{sx:{fontSize:8}}):i?b.jsx(i,{fontSize:"small"}):null}),t&&b.jsx(u1,{primary:e.title,primaryTypographyProps:{fontSize:"0.875rem",fontWeight:n?700:500}})]});return t?s:b.jsx(f1,{title:e.title,placement:"right",children:s})}function J_({open:e,mobileOpen:t,onMobileClose:n,isMobile:r}){const o=Xr(),i=ms(),s=x=>x&&o.pathname.startsWith(x),a=e||r,l=pg.flatMap(x=>x.items).filter(x=>x.children&&x.children.some(v=>s(v.url))).map(x=>x.id),[u,c]=y.useState(l),d=x=>{i(x),r&&n()},h=b.jsxs(xe,{sx:{bgcolor:"#fff",height:"100%",color:"grey.800",display:"flex",flexDirection:"column",borderRight:1,borderColor:"divider"},children:[b.jsx(up,{sx:{px:a?2.5:0,justifyContent:a?"flex-start":"center",minHeight:64},children:b.jsx(w1,{compact:!a})}),b.jsx(xe,{sx:{overflowY:"auto",overflowX:"hidden",flexGrow:1,pb:2},children:pg.map(x=>b.jsxs(xe,{sx:{mt:1},children:[a&&b.jsx(St,{variant:"overline",sx:{px:2.5,color:"#A06060",fontSize:"0.6875rem",letterSpacing:"0.08em",fontWeight:700},children:x.group}),b.jsx(a1,{disablePadding:!0,sx:{mt:.5},children:x.items.map(v=>{if(v.children){const g=u.includes(v.id),S=v.children.some(f=>s(f.url)),p=v.icon,m=b.jsxs(l1,{onClick:()=>a?c(f=>f.includes(v.id)?f.filter(w=>w!==v.id):[...f,v.id]):d(v.children[0].url),sx:{minHeight:44,my:.25,mx:a?1:.75,px:a?1.5:0,justifyContent:a?"flex-start":"center",borderRadius:2,color:S?ut:"grey.700",bgcolor:S&&!g?ji(ut,.08):"transparent","& .MuiListItemIcon-root":{color:S?ut:"grey.500"},"&:hover":{bgcolor:ji(ut,.04),color:ut,"& .MuiListItemIcon-root":{color:ut}}},children:[b.jsx(sl,{sx:{minWidth:a?34:"auto",justifyContent:"center"},children:b.jsx(p,{fontSize:"small"})}),a&&b.jsxs(b.Fragment,{children:[b.jsx(u1,{primary:v.title,primaryTypographyProps:{fontSize:"0.875rem",fontWeight:500}}),g?b.jsx(S1,{fontSize:"small"}):b.jsx(E1,{fontSize:"small"})]})]});return b.jsxs(xe,{children:[a?m:b.jsx(f1,{title:v.title,placement:"right",children:m}),a&&b.jsx(W0,{in:g,timeout:"auto",unmountOnExit:!0,children:b.jsx(xe,{sx:{pl:1.5},children:v.children.map(f=>b.jsx(hg,{item:f,open:!0,depth:1,active:s(f.url),onClick:()=>d(f.url)},f.id))})})]},v.id)}return b.jsx(hg,{item:v,open:a,active:s(v.url),onClick:()=>d(v.url)},v.id)})})]},x.group))}),a&&b.jsx(xe,{sx:{p:2,borderTop:"1px solid",borderColor:"divider"},children:b.jsx(St,{variant:"caption",sx:{color:"text.secondary"},children:"Doormile CRM v1.0"})})]});return r?b.jsx(tg,{variant:"temporary",open:t,onClose:n,ModalProps:{keepMounted:!0},sx:{"& .MuiDrawer-paper":{width:Ea,border:"none"}},children:h}):b.jsx(tg,{variant:"permanent",sx:{width:e?Ea:Sd,flexShrink:0,whiteSpace:"nowrap","& .MuiDrawer-paper":{width:e?Ea:Sd,border:"none",overflowX:"hidden",transition:x=>x.transitions.create("width",{duration:x.transitions.duration.standard})}},open:e,children:h})}function eO(){const e=Zr(),t=HC(e.breakpoints.down("lg")),[n,r]=y.useState(!0),[o,i]=y.useState(!1),s=()=>{t?i(a=>!a):r(a=>!a)};return b.jsxs(xe,{sx:{display:"flex",bgcolor:"background.default",minHeight:"100vh"},children:[b.jsx(__,{onToggle:s}),b.jsx(J_,{open:n,isMobile:t,mobileOpen:o,onMobileClose:()=>i(!1)}),b.jsxs(xe,{component:"main",sx:{flexGrow:1,width:{lg:`calc(100% - ${n?Ea:Sd}px)`},minHeight:"100vh",transition:e.transitions.create("width",{duration:e.transitions.duration.standard})},children:[b.jsx(up,{sx:{minHeight:64}}),b.jsx(xe,{sx:{p:{xs:2,sm:3}},children:b.jsx(Cf,{})})]})]})}function tO(){return b.jsx(xe,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:b.jsx(Cf,{})})}function nO({children:e}){return localStorage.getItem("logged_in")?e||b.jsx(Cf,{}):b.jsx(Ay,{to:"/login",replace:!0})}const Vt=e=>{const t=y.lazy(e);return b.jsx(y.Suspense,{fallback:b.jsx(xe,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh"},children:b.jsx(r1,{color:"primary"})}),children:b.jsx(t,{})})};function rO(){return b.jsxs(o2,{children:[b.jsxs(st,{element:b.jsx(nO,{children:b.jsx(eO,{})}),children:[b.jsx(st,{path:"/dashboard",element:Vt(()=>Ht(()=>import("./Dashboard-CaTPkifY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])))}),b.jsx(st,{path:"/tenants",element:Vt(()=>Ht(()=>import("./Tenants-mdxHS17O.js"),__vite__mapDeps([10,11,1,12,2,3,4,13,8,14,15,16,5,7,6,17])))}),b.jsx(st,{path:"/survey",element:Vt(()=>Ht(()=>import("./Survey-q3ahIjIS.js"),__vite__mapDeps([18,11,12,13,8,14,15,4,3,5,6,17])))}),b.jsx(st,{path:"/pricing",element:Vt(()=>Ht(()=>import("./Pricing-BuyNgb7k.js"),__vite__mapDeps([19,11,15,4,3,6,14,8])))}),b.jsx(st,{path:"/team-users",element:Vt(()=>Ht(()=>import("./TeamUsers-BvR0WI-e.js"),__vite__mapDeps([20,11,1,13,8,14,16,4,3,5,7,6,17])))}),b.jsx(st,{path:"/settings",element:Vt(()=>Ht(()=>import("./Settings-CDtM7ArL.js"),__vite__mapDeps([21,22,4,3,6,14,9,7,17])))})]}),b.jsxs(st,{element:b.jsx(tO,{}),children:[b.jsx(st,{path:"/login",element:Vt(()=>Ht(()=>import("./Login-BohcWU3v.js"),__vite__mapDeps([23,22,3,14,17,6])))}),b.jsx(st,{path:"/under-construction",element:Vt(()=>Ht(()=>import("./UnderConstruction-mds5BQRj.js"),__vite__mapDeps([24,25,6])))}),b.jsx(st,{path:"/coming-soon",element:Vt(()=>Ht(()=>import("./ComingSoon-CGM6Litg.js"),__vite__mapDeps([26,14,6])))}),b.jsx(st,{path:"/500",element:Vt(()=>Ht(()=>import("./Error500-DmuBsKdr.js"),__vite__mapDeps([27,25,6])))}),b.jsx(st,{path:"/404",element:Vt(()=>Ht(()=>import("./Error404-BtmKoWcF.js"),__vite__mapDeps([28,25,6])))})]}),b.jsx(st,{path:"/",element:b.jsx(Ay,{to:"/dashboard",replace:!0})}),b.jsx(st,{path:"*",element:Vt(()=>Ht(()=>import("./Error404-BtmKoWcF.js"),__vite__mapDeps([28,25,6])))})]})}rc.createRoot(document.getElementById("root")).render(b.jsx(gn.StrictMode,{children:b.jsxs(Db,{theme:yd,children:[b.jsx(r$,{}),b.jsx(HM,{dateAdapter:i_,children:b.jsx(f2,{children:b.jsx(rO,{})})})]})}));export{Vf as $,gt as A,xe as B,r1 as C,Sa as D,cO as E,uO as F,iO as G,xd as H,$P as I,dO as J,f1 as K,W0 as L,Js as M,P1 as N,hO as O,au as P,pO as Q,mO as R,W$ as S,St as T,T_ as U,Cs as V,Jf as W,Mt as X,ou as Y,On as Z,k as _,y as a,Hr as a0,Zr as a1,Xe as a2,F0 as a3,bR as a4,el as a5,up as a6,DR as a7,o1 as a8,BR as a9,wR as aA,XC as aB,aO as aC,gR as aD,gr as aE,PM as aF,jb as aG,qr as aH,Za as aI,Ik as aa,Lk as ab,Or as ac,C0 as ad,sO as ae,il as af,JR as ag,gd as ah,Nl as ai,Go as aj,uP as ak,Kl as al,Vu as am,Sn as an,oO as ao,mR as ap,hR as aq,ms as ar,w1 as as,t1 as at,zl as au,Hf as av,Jt as aw,ER as ax,xR as ay,CR as az,b1 as b,fO as c,k1 as d,M_ as e,R_ as f,gO as g,S0 as h,Ut as i,b as j,vn as k,Se as l,Ee as m,ve as n,Y as o,J as p,ue as q,En as r,Ja as s,lO as t,Uf as u,be as v,ne as w,lp as x,Ae as y,md as z}; diff --git a/dist/index.html b/dist/index.html index aaf7950..fda95c5 100644 --- a/dist/index.html +++ b/dist/index.html @@ -13,7 +13,7 @@ rel="stylesheet" /> Doormile CRM - +