PageSourceSearch

https://www.wasabibourges.com/_next/static/chunks/pages/profile-e7c3a5f1a27709b4.js

js wasabibourges.com collected 2026-10-04 03:44:44 UTC 12,981 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[277],{99813:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return r(4802)}])},84370:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var l=n(r(33651)),o=r(85893);t.Z=(0,l.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},52358:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var l=n(r(33651)),o=r(85893);t.Z=(0,l.default)((0,o.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2m6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2z"}),"ShoppingBagOutlined")},53600:function(e,t,r){"use strict";var n=r(30139),l=r(85893);t.Z=(0,n.Z)((0,l.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l4 4 4-4H6c0-3.86 3.14-7 7-7s7 3.14 7 7-3.14 7-7 7c-1.9 0-3.62-.76-4.88-1.99L6.7 18.42C8.32 20.01 10.55 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m2 8v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1z"}),"LockReset")},44771:function(e,t,r){"use strict";var n=r(30139),l=r(85893);t.Z=(0,n.Z)((0,l.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},19357:function(e,t,r){"use strict";var n=r(30139),l=r(85893);t.Z=(0,n.Z)((0,l.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-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.5"}),"Place")},90633:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(87462),l=r(63366),o=r(67294),i=r(8780),s=r(94780),a=r(77527),c=r(44001),d=r(96788),u=r(1588),m=r(34867);function h(e){return(0,m.ZP)("MuiAlertTitle",e)}(0,u.Z)("MuiAlertTitle",["root"]);var p=r(85893);let x=["className"],f=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},h,t)},v=(0,a.ZP)(d.Z,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{fontWeight:t.typography.fontWeightMedium,marginTop:-2}});var g=o.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiAlertTitle"}),{className:o}=r,s=(0,l.Z)(r,x),a=f(r);return(0,p.jsx)(v,(0,n.Z)({gutterBottom:!0,component:"div",ownerState:r,ref:t,className:(0,i.Z)(a.root,o)},s))})},4802:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return R}});var n=r(85893),l=r(41664),o=r.n(l),i=r(17232),s=r(44771),a=r(61730),c=r(51015),d=r(60990),u=r(68573),m=r(55895),h=r(96788),p=r(27269),x=r(40913),f=r(34598),v=r(14586),g=r(74355),j=r(3101),Z=r(6316),y=r(67294),b=r(19388),P=r(14155),k=r(84019),w=r(28325),C=r(96095),S=r(11163),M=r(5252),N=r(94438),I=r(60502),T=r(11032);let _=e=>{let{title:t,value:r}=e;return(0,n.jsxs)(f.hs,{flexDirection:"column",p:1,children:[(0,n.jsx)(x.x4,{color:"grey.600",mb:.5,textAlign:"left",children:t}),(0,n.jsx)("span",{children:r})]})};var R=!0;t.default=()=>{let[e,t]=(0,y.useState)(),[r,l]=(0,y.useState)(0),{isFallback:R,push:D}=(0,S.useRouter)(),{isAuthenticated:H,stateLoaded:z,user:E,setUser:A,setIsAuthenticated:V}=(0,N.bp)(),B=(0,a.Z)(e=>e.breakpoints.down("md")),W=(0,C.k)(),L=()=>{D("/"),localStorage.removeItem("user_token"),localStorage.removeItem((0,M.Vg)("user")),localStorage.removeItem((0,M.Vg)("order")),V(!1),A(null)},F=()=>{W.onTrue()};(0,y.useEffect)(()=>{z&&H&&O()},[z,H]);let O=(0,y.useCallback)(async()=>{try{b.XK.getAll({pageSize:1,fields:"id"}).then(e=>{var t,r,n,o;(null===(r=e.data)||void 0===r?void 0:null===(t=r.filter)||void 0===t?void 0:t.totalRecords)>0&&l(null===(o=e.data)||void 0===o?void 0:null===(n=o.filter)||void 0===n?void 0:n.totalRecords)}).catch(e=>console.log(e))}catch(e){console.error(e)}},[E]);if("loading"===e||R||!z)return(0,n.jsx)(I.Z,{});let G=(0,n.jsx)(c.Z,{color:"primary",LinkComponent:o(),href:"/profile/edit",sx:{px:4,bgcolor:"primary.light"},children:"Modifier Profile"}),X=[{title:r,subtitle:"Commandes"},{title:(null==E?void 0:E.fidelityPoints)?null==E?void 0:E.fidelityPoints:0,subtitle:"Points fid\xe9lit\xe9"}];return(0,n.jsxs)(g.Z,{children:[(0,n.jsx)(P.Z,{}),(0,n.jsx)(v.Z,{icon:s.Z,title:"Mon profil",button:G,logout:F,navigation:(0,n.jsx)(j.Z,{downMd:B,logout:F})}),(0,n.jsx)(d.Z,{mb:4,children:(0,n.jsxs)(u.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(u.ZP,{item:!0,md:8,xs:12,children:(0,n.jsxs)(k.Z,{sx:{display:"flex",p:"14px 32px",height:"100%",alignItems:"center"},children:[(0,n.jsx)(m.Z,{src:null==E?void 0:E.firstName,sx:{height:64,width:64}}),(0,n.jsx)(d.Z,{ml:1.5,flex:"1 1 0",children:(0,n.jsx)(f.$9,{flexWrap:"wrap",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(x.H5,{my:"0px",children:"".concat((0,T.do)(null==E?void 0:E.gender)," ").concat(null==E?void 0:E.firstName," ").concat(null==E?void 0:E.lastName)}),(0,n.jsxs)(f.hs,{alignItems:"center",children:[(0,n.jsx)(h.Z,{color:"grey.600",children:"Email :"}),(0,n.jsx)(h.Z,{ml:.5,color:"primary.main",children:null==E?void 0:E.email})]}),(0,n.jsxs)(f.hs,{alignItems:"center",children:[(0,n.jsx)(h.Z,{color:"grey.600",children:"T\xe9l. :"}),(0,n.jsx)(h.Z,{ml:.5,color:"primary.main",children:(0,Z.Rz)(null==E?void 0:E.phoneNumber)})]})]})})})]})}),(0,n.jsx)(u.ZP,{item:!0,md:4,xs:12,children:(0,n.jsx)(u.ZP,{container:!0,spacing:4,children:X.map(e=>(0,n.jsx)(u.ZP,{item:!0,lg:6,sm:6,xs:6,children:(0,n.jsxs)(k.Z,{sx:{height:"100%",display:"flex",p:"1rem 1.25rem",alignItems:"center",flexDirection:"column"}
1,children:[(0,n.jsx)(x.H3,{color:"primary.main",my:0,fontWeight:600,children:e.title}),(0,n.jsx)(x.x4,{color:"grey.600",textAlign:"center",children:e.subtitle})]})},e.subtitle))})})]})}),(0,n.jsxs)(p.Z,{sx:{cursor:"auto",p:"0.75rem 1.5rem",...B&&{alignItems:"start",flexDirection:"column",justifyContent:"flex-start"}},children:[(0,n.jsx)(_,{title:"First Name",value:null==E?void 0:E.firstName}),(0,n.jsx)(_,{title:"Last Name",value:null==E?void 0:E.lastName}),(0,n.jsx)(_,{title:"Email",value:null==E?void 0:E.email}),(0,n.jsx)(_,{title:"Phone",value:null==E?void 0:E.phoneNumber}),(0,n.jsx)(_,{title:"Birth date",value:(null==E?void 0:E.birthDay)?(0,i.Z)(new Date(null==E?void 0:E.birthDay),"dd MMM, yyyy"):""})]}),(0,n.jsx)(w.Z,{open:W.value,onClose:W.onFalse,title:"Se d\xe9connecter",content:"Voulez-vous vraiement d\xe9connecter ?",action:(0,n.jsx)(c.Z,{variant:"contained",color:"error",onClick:()=>L(),children:"D\xe9connecter"})})]})}},27269:function(e,t,r){"use strict";var n=r(77527),l=r(60762);let o=(0,n.ZP)(l.Z)(e=>{let{theme:t}=e;return{display:"flex",flexWrap:"wrap",alignItems:"center",borderRadius:"10px",cursor:"pointer",color:t.palette.grey[200],background:t.palette.marron[800],"& > *":{flex:"1 1 0"},"& .pre":{whiteSpace:"pre"}}});t.Z=o},14586:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(85893),l=r(84370),o=r(77527),i=r(60990),s=r(51015),a=r(67294),c=r(86010),d=r(70178),u=r(95307);let m=(0,o.ZP)(i.Z)({"& .handle":{cursor:"pointer"}});var h=e=>{var t;let{position:r="left",open:l=!1,width:o=280,handle:i,children:s,toggleSidenav:h}=e,[p,x]=(0,a.useState)(l),f=()=>x(!p);return(0,a.useEffect)(()=>x(l),[l]),(0,n.jsxs)(m,{children:[(0,n.jsx)(d.ZP,{anchor:r,open:p,onClose:h||f,SlideProps:{style:{width:o}},children:(0,n.jsx)(u.Z,{autoHide:!1,children:s})}),i&&(0,a.cloneElement)(i,{onClick:h||f,className:(0,c.Z)(null===(t=i.props)||void 0===t?void 0:t.className,"handle")})]})},p=r(40913),x=r(34598),f=r(71191);let v=(0,o.ZP)(i.Z)(e=>{let{theme:t}=e;return{display:"flex",marginTop:t.spacing(-2),marginBottom:t.spacing(3),"& .headerHold":{flexGrow:1,alignItems:"center",justifyContent:"space-between"},[t.breakpoints.up("md")]:{"& .sidenav":{display:"none"}},[t.breakpoints.down("md")]:{flexDirection:"column"}}});var g=e=>{let{title:t,button:r,navigation:o,logout:a,...c}=e,d=1025>(0,f.Z)();return s.Z,(0,n.jsxs)(v,{children:[(0,n.jsxs)(x.hs,{mt:2,className:"headerHold",children:[(0,n.jsxs)(x.hs,{alignItems:"center",children:[c.icon&&(0,n.jsx)(c.icon,{color:"primary"}),(0,n.jsx)(p.H2,{ml:1.5,my:"0px",lineHeight:"1",whiteSpace:"pre",children:t})]}),(0,n.jsx)(i.Z,{className:"sidenav",children:(0,n.jsx)(h,{position:"left",handle:(0,n.jsx)(l.Z,{fontSize:"small"}),children:o})}),!d&&r]}),d&&(0,n.jsx)(i.Z,{mt:2,children:r})]})}},3101:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var n=r(85893),l=r(67294),o=r(11163),i=r(96788),s=r(60990),a=r(51015),c=r(44771),d=r(19357),u=r(53600),m=r(52358),h=r(34598),p=r(77527),x=r(60762),f=r(94735);let v=(0,p.ZP)(x.Z)(e=>{let{theme:t}=e;return{color:t.palette.grey[200],background:t.palette.marron[800],paddingBottom:"1.5rem",[t.breakpoints.down("md")]:{boxShadow:"none",overflowY:"auto",height:"calc(100vh - 64px)"}}}),g=(0,p.ZP)(e=>{let{children:t,isCurrentPath:r,...l}=e;return(0,n.jsx)(f.Z,{...l,children:t})})(e=>{let{theme:t,isCurrentPath:r}=e;return{display:"flex",alignItems:"center",borderLeft:"4px solid",paddingLeft:"1.5rem",paddingRight:"1.5rem",marginBottom:"1.25rem",justifyContent:"space-between",borderColor:r?t.palette.primary.main:"transparent","& .nav-icon":{color:r?t.palette.primary.main:t.palette.grey[600]},"&:hover":{borderColor:t.palette.primary.main,"& .nav-icon":{color:t.palette.primary.main}}}});var j=r(94438),Z=r(5252);let y=[{title:"PARAM\xc8TRES DU COMPTE",list:[{href:"/profile",title:"Profile Info",icon:c.Z,count:3},{href:"/profile/orders",title:"Mes commandes",icon:m.Z,count:0},{href:"/profile/addresses",title:"Mes adresses",icon:d.Z,count:0},{href:"/profile/password",title:"Mot de passe",icon:u.Z,count:0}]}];var b=e=>{let{downMd:t,logout:r}=e,{pathname:c,push:d}=(0,o.useRouter)(),{setUser:u,setIsAuthenticated:m}=(0,j.bp)(),p=(0,l.useCallback)(()=>{localStorage.removeItem("user_token"),localStorage.removeItem((0,Z.Vg)("user")),localStorage.removeItem((0,Z.Vg)("order")),u(null),d("/"),m(!1)},[]);return(0,n.jsxs)(v,{children:[y.map(e=>(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(i.Z,{p:"26px 30px 1rem",color:"grey.100",fontSize:"12px",children:e.title}),e.list.map(e=>(0,n.jsxs)(g,{href:e.href,isCurrentPath:c.includes(e.href),children:[(0,n.jsxs)(h.hs,{alignItems:"center",gap:1,children:[(0,n.jsx)(e.icon,{color:"inherit",fontSize:"small",className:"nav-icon"}),(0,n.jsx)("span",{children:e.title})]}),(0,n.jsx)("span",{children:e.count>0&&e.count})]},e.title))]},e.title)),(0,n.jsx)(s.Z,{px:2.5,pt:3,children:(0,n.jsx)(a.Z,{fullWidth:!0,color:"primary",variant:"contained",sx:{height:"40px"},onClick:()=>p(),children:"Se d\xe9connecter"})})]})}},74355:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(85893),l=r(67294),o=r(56656),i=r(68573),s=r(3101),a=r(76615),c=r(94438),d=r(60502),u=r(11163),m=r(44723),h=r(90633),p=r(51015),x=r(99682),f=r(34598),v=r(41664),g=r.n(v);function j(){let{restaurant:e}=(0,c.bp)(),t=(0,u.useRouter)(),r=async()=>{t.back()};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(f.hs,{flexDirection:"column",minHeight:"100vh",justifyContent:"center",alignItems:"center",px:2,children:[(0,n.jsx)(x.Z,{src:e.logoUrl,
1sx:{display:"block",maxWidth:"320px",width:"100%",mb:"1.5rem"},alt:e.name}),(0,n.jsxs)(m.Z,{severity:"error",sx:{marginBottom:"30px"},children:[(0,n.jsx)(h.Z,{children:"Acc\xe8s refus\xe9"}),"Vous devez \xeatre connect\xe9 pour voir cette page."]}),(0,n.jsxs)(f.hs,{flexWrap:"wrap",children:[(0,n.jsx)(p.Z,{variant:"outlined",color:"primary",sx:{m:"0.5rem"},onClick:r,children:"Retour"}),(0,n.jsx)(g(),{href:"/",children:(0,n.jsx)(p.Z,{variant:"contained",color:"primary",sx:{m:"0.5rem"},children:"Page d'accueil"})})]})]})})}var Z=e=>{let{children:t}=e,{restaurant:r,isAuthenticated:m,stateLoaded:h}=(0,c.bp)(),[p,x]=(0,l.useState)(!1),{push:f}=(0,u.useRouter)();return((0,l.useEffect)(()=>{!0===h&&(x(m),!1===m?f("/"):console.log("AuthGuard: logging in"))},[h]),!0===h)?!0===p?(0,n.jsx)(a.Z,{showNavbar:!1,restaurant:r,children:(0,n.jsx)(o.Z,{sx:{my:"2rem"},children:(0,n.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(i.ZP,{item:!0,lg:3,xs:12,sx:{display:{xs:"none",sm:"none",md:"block"}},children:(0,n.jsx)(s.Z,{})}),(0,n.jsx)(i.ZP,{item:!0,lg:9,xs:12,children:t})]})})}):(0,n.jsx)(j,{}):(0,n.jsx)(d.Z,{})}},14155:function(e,t,r){"use strict";var n=r(85893),l=r(18745),o=r(735);t.Z=()=>{let e=(0,l.Z)();return(0,n.jsx)(o.Z,{styles:{body:{backgroundColor:e.palette.marron[900],color:e.palette.grey[100]},".MobileNavBar":{color:e.palette.grey[900]},".DarkTable table":{color:e.palette.grey[100],backgroundColor:e.palette.marron[700]},".DarkTable .MuiTableCell-head":{color:e.palette.marron[200],borderBottom:"1px solid ".concat(e.palette.primary.main)},".DarkTable .MuiTableCell-body":{color:e.palette.grey[100],fontSize:"13px",borderBottom:"1px solid ".concat(e.palette.primary.main)},".DarkPagination .MuiPaginationItem-root":{color:e.palette.grey[100],borderColor:e.palette.grey[800]},".save-button":{width:"100%"}}})}}},function(e){e.O(0,[4255,5302,8050,8573,1867,4723,8939,6310,788,604,7279,4433,7419,3749,5664,8805,6615,2888,9774,179],function(){return e(e.s=99813)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.