1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10318,24204,33819,44970,53562,70916],{10318:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(26514);i(75834);let a=function(e){return(0,n.jsxs)("svg",{viewBox:"0 0 55.25 64.58",width:"1em",height:"1em",...e,children:[(0,n.jsx)("path",{fill:"#12123b",d:"M27.62 5.5A1.52 1.52 0 1126.11 7a1.52 1.52 0 011.51-1.5"}),(0,n.jsx)("path",{fill:"#12123b",d:"M23.45 2.45v4.77a4.18 4.18 0 108.35 0V2.45zm4.17 11.4A6.63 6.63 0 0121 7.22V0h13.25v7.22a6.63 6.63 0 01-6.63 6.63"}),(0,n.jsx)("path",{fill:"#efa835",d:"M27.67 43.21A10.34 10.34 0 1138 32.86a10.36 10.36 0 01-10.33 10.35zm0-18.48a8.14 8.14 0 108.14 8.13 8.15 8.15 0 00-8.14-8.13zM44.19 64.58h-33V55a9.26 9.26 0 019.25-9.25h14.5A9.26 9.26 0 0144.19 55zm-30.55-2.5h28.05V55a6.76 6.76 0 00-6.75-6.75H20.39A6.76 6.76 0 0013.64 55z"}),(0,n.jsx)("path",{fill:"#12123b",d:"M55.25 64.58H0V3.6h22.22v2.45H2.45v56.08H52.8V6.05H33.02V3.6h22.23v60.98z"})]})}},24204:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(26514);i(75834);let a=function(e){return(0,n.jsxs)("svg",{width:"133",height:"38",viewBox:"0 0 133 38",fill:"none",children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.1503 31.6133L25.0508 20.8133L35.5323 19.2244C35.471 24.1083 33.4108 28.5005 30.1503 31.6133ZM17.709 36.3133L23.8489 22.1617L28.8432 32.74C25.9795 34.9706 22.4133 36.3133 18.5365 36.3133H17.709ZM26.1902 3.55993L14.7238 8.06683L3.91016 1.68683H18.5368C21.2912 1.68683 23.8857 2.37164 26.1902 3.55993ZM31.548 7.8727C33.7457 10.531 35.1664 13.8681 35.4704 17.5275L25.3691 19.059L31.548 7.8727ZM14.3828 27.0886L21.9766 22.2992L16.5929 34.7117L14.3828 27.0886ZM12.9684 28.1647L15.3309 36.3132H3.15625L12.9684 28.1647ZM1.65625 18.5428L12.0814 26.7318L1.65625 35.3813V18.5428ZM23.681 18.6694L16.0293 9.36125L28.0317 4.6435C28.865 5.21614 29.6387 5.87059 30.3586 6.57985L23.681 18.6694ZM21.7963 19.0035L3.38477 16.3444L14.456 10.0749L21.7963 19.0035ZM13.4607 25.6852L3.81836 18.1101L21.4363 20.6554L13.4607 25.6852ZM12.9736 8.98424L1.65625 15.3929V2.30653L12.9736 8.98424ZM18.5366 0H0V38H18.5366C28.8276 38 37.2 29.477 37.2 19C37.2 8.52297 28.8276 0 18.5366 0Z",fill:"#1D4153"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.0979 15.8577C95.5677 15.8577 92.6946 18.5991 92.6946 21.9691C92.6946 25.3383 95.5677 28.0796 99.0979 28.0796C102.628 28.0796 105.501 25.3383 105.501 21.9691C105.501 18.5991 102.628 15.8577 99.0979 15.8577ZM99.097 29.6875C94.6377 29.6875 91.009 26.2251 91.009 21.9692C91.009 17.7132 94.6377 14.25 99.097 14.25C103.556 14.25 107.185 17.7132 107.185 21.9692C107.185 26.2251 103.556 29.6875 99.097 29.6875ZM56.2007 27.8929H52.0859V16.1044H56.2007C59.6062 16.1044 62.3766 18.7485 62.3766 21.9987C62.3766 25.2489 59.6062 27.8929 56.2007 27.8929ZM50.4004 29.5008H56.1998C60.5335 29.5008 64.0603 26.1348 64.0603 21.9987C64.0603 17.8617 60.5335 14.4966 56.1998 14.4966H50.4004V29.5008ZM80.1694 27.8929H76.0547V16.1044H80.1694C83.5749 16.1044 86.3453 18.7485 86.3453 21.9987C86.3453 25.2489 83.5749 27.8929 80.1694 27.8929ZM74.3691 29.5008H80.1685C84.5022 29.5008 88.029 26.1348 88.029 21.9987C88.029 17.8617 84.5022 14.4966 80.1685 14.4966H74.3691V29.5008ZM69.6749 29.3548H67.9902V14.6014H69.6749V29.3548ZM130.316 29.3548H132.001V14.6014H130.316V29.3548ZM123.999 29.3545H125.683V14.6679H124.144L118.153 22.5583L112.32 14.6679H110.791V29.3545H112.476V17.7195L118.152 25.3293L123.999 17.2122V29.3545Z",fill:"#1D4153"})]})}},33819:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(26514);i(75834);let a=e=>(0,n.jsxs)("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",...e,children:[(0,n.jsx)("path",{d:"M24.7855 20.6423L20.5614 16.4183L22.6331 14.3467C22.8126 14.1672 22.8863 13.9076 22.828 13.6605C22.7696 13.4134 22.5876 13.2142 22.3468 13.1339L9.9172 8.99072C9.65407 8.90298 9.36383 8.97148 9.16769 9.16768C8.9715 9.36387 8.90299 9.654 8.99074 9.91719L13.134 22.3468C13.2143 22.5876 13.4135 22.7697 13.6605 22.828C13.9075 22.8865 14.1672 22.8126 14.3467 22.6331L16.4183 20.5615L20.6424 24.7855C20.7854 24.9285 20.9728 25 21.1602 25C21.3476 25 21.5351 24.9286 21.6781 24.7855L24.7855 21.6781C25.0716 21.392 25.0716 20.9283 24.7855 20.6423ZM21.1602 23.2318L16.9361 19.0078C16.6502 18.7218 16.1863 18.7218 15.9004 19.0078L14.1488 20.7593L10.8436 10.8437L20.7593 14.1489L19.0078 15.9004C18.722 16.1861 18.7217 16.6502 19.0078 16.9362L23.2318 21.1602L21.1602 23.2318Z",fill:"white"}),(0,n.jsx)("path",{d:"M9.52148 5.85938C9.92598 5.85938 10.2539 5.53145 10.2539 5.12695V0.732422C10.2539 0.32793 9.92598 0 9.52148 0C9.11699 0 8.78906 0.32793 8.78906 0.732422V5.12695C8.78906 5.53145 9.11699 5.85938 9.52148 5.85938Z",fill:"white"}),(0,n.jsx)("path",{d:"M3.82844 2.78875C3.54246 2.50271 3.07869 2.50271 2.79265 2.78875C2.50662 3.07478 2.50662 3.5385 2.79265 3.82454L5.90007 6.93196C6.18606 7.21799 6.64988 7.21799 6.93586 6.93196C7.2219 6.64592 7.2219 6.1822 6.93586 5.89617L3.82844 2.78875Z",fill:"white"}),(0,n.jsx)("path",{d:"M5.90007 12.111L2.79265 15.2184C2.50662 15.5045 2.50662 15.9682 2.79265 16.2542C3.07864 16.5403 3.54246 16.5403 3.82844 16.2542L6.93586 13.1468C7.2219 12.8608 7.2219 12.397 6.93586 12.111C6.64983 11.825 6.18606 11.825 5.90007 12.111Z",fill:"white"}),(0,n.jsx)("path",{d:"M13.1488 6.93196L16.2562 3.82454C16.5422 3.5385 16.5422 3.07478 16.2562 2.78875C15.9702 2.50271 15.5064 2.50271 15.2204 2.78875L12.113 5.89617C11.8269 6.1822 11.8269 6.64592 12.113 6.93196C12.399 7.21799 12.8628 7.21799 13.1488 6.93196Z",fill:"white"}),(0,n.jsx)("path",{d:"M5.85938 9.52148C5.85938 9.11699 5.53145 8.78906 5.12695 8.78906H0.732422C0.32793 8.78906 0 9.11699 0 9.52148C0 9.92598 0.32793 10.2539 0.732422 10.2539H5.12695C5.53145 10.2539 5.85938 9.92598 5.85938 9.52148Z",fill:"white"})]})},34288:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(26514),a=i(13742),r=i(17941),s=i(60900),o=i(98647);let l=a.default.div.withConfig({componentId:"sc-4f5e5675-0"})(["color:",";font-family:",";width:fit-content;*{box-sizing:border-box;}.red{color:",";}.price{&__from{text-transform:uppercase;font-size:12px;display:block;margin-bottom:3px;}&__before-discount{text-decoration:line-through;font-size:14px;color:",";font-family:",";}&__final{display:flex;align-items:baseline;}&__total{font-size:25px;}&__unit{font-size:16px;line-height:normal;margin:0 10px 0 5px;}&__asterisk{margin-left:10px;font-family:",";}}",""],r.Jy.blueDark,r.vX.NunitoSansBold,r.Jy.redVif,r.Jy.greyPrimary,r.vX.NunitoSansRegular,r.vX.NunitoSansRegular,e=>{let{small:t}=e;return t&&(0,a.css)([".price{&__from{font-size:12px;margin-bottom:3px;}&__total,&__before-discount{font-size:16px;}}"])}),d=e=>{let{price:t,priceWithoutDiscount:i,discountPercent:a,unit:d,fromPrice:c,small:p,className:u="",showDiscountPercentSymbol:m,offerSubjectToConditions:h,showSticker:x=!0}=e;return(0,n.jsx)(l,{small:p,className:u,children:(0,n.jsxs)("div",{className:"price__wrapper",children:[c&&(0,n.jsx)("div",{className:"price__from",children:"\xc0 partir de "}),(0,n.jsxs)("div",{className:"price__list",children:[i&&(0,n.jsx)("span",{className:"price__before-discount",dangerouslySetInnerHTML:{__html:(0,s.rc)(i)}}),(0,n.jsxs)("div",{className:"price__final",children:[(0,n.jsx)("span",{className:"price__total ".concat(i?"red":""),dangerouslySetInnerHTML:{__html:(0,s.rc)(t)}}),d&&(0,n.jsx)("span",{className:"price__unit ".concat(i?"red":""),children:d}),i&&x&&(a?(0,n.jsx)(o.A,{discountPercent:(e=>
1String(e).trim().startsWith("-")?String(e):"-".concat(e))(a),color:r.Jy.white,bgc:r.Jy.redVif,fontSize:"12px","data-testid":"cart_item_discount_percent",showSymbol:m}):(0,n.jsx)(o.A,{discountPercent:"PROMO",color:r.Jy.white,bgc:r.Jy.redVif,fontSize:"12px","data-testid":"cart_item_discount_percent",showSymbol:!1})),h&&(0,n.jsx)("span",{className:"price__asterisk",children:"*"})]})]})]})})}},37651:(e,t,i)=>{"use strict";i.d(t,{L:()=>r});var n=i(96157),a=i(54642);let r=()=>({setMyStore:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn("DEPRECATED don't use this, use setMyStore from '@stores/MyStore.store' directly!"),(0,a.q5)(...t)},hasMyStore:(0,n.Pj)(a.GX),store:(0,n.Pj)(a.e8)})},43553:(e,t,i)=>{"use strict";i.d(t,{f:()=>d});var n=i(96252),a=i.n(n),r=i(79161),s=i(88735);let o={PARTOO_API_URL:r.QM.APIURL,PARTOO_URL:r.QM.URL,PARTOO_APIKEY:"2a8cfa0decccb5a083314cd52eca9ef24a294773ec75ef31"};class l{constructor(e=!1,t=o){this.getUrlAll=()=>"".concat(this.rootUrl,"?api_key=").concat(this.key,"&status=open"),this.getUrlBusinesses=e=>"".concat(this.rootUrl,"?api_key=").concat(this.key,"&code=").concat(e),this.getUrlApiAll=()=>{let e=(0,s.F)();return"".concat(e).concat(this.rootApiUrl)},this.getUrlApiBusinesses=e=>{let t=(0,s.F)();return"".concat(t).concat(this.rootApiUrl,"?code=").concat(e)},this.getHearderHTTP=()=>({"Content-type":"application/json",Accept:"application/json",Authorization:""}),this.debug=e,this.key=t.PARTOO_APIKEY,this.rootUrl=t.PARTOO_URL,this.rootApiUrl=t.PARTOO_API_URL}}class d{async getDatas(e){try{let t={method:"GET",headers:this.client.getHearderHTTP()},i=await a()(e,t);return await i.json()}catch(e){}}async getAll(){return await this.getDatas(this.client.getUrlApiAll()).then(e=>e).catch(e=>{console.error(e)})}async getBusinesses(e){let t;return(t=this.getDatas(this.client.getUrlApiBusinesses(e.code)))?await t.then(e=>e?e.businesses:[]).catch(e=>{console.error(e)}):[]}async getPartooDatas(e){let t=new l;try{let i=e?t.getUrlBusinesses(e):t.getUrlAll(),n=await a()(i);if(!n.ok)throw Error("ERROR_PARTOO_CALL");return await n.json()}catch(e){throw e}}constructor(){this.client=new l}}},44970:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(26514);i(75834);let a=e=>(0,n.jsx)("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",...e,children:(0,n.jsx)("path",{d:"M26.6 53.2C11.93 53.2 0 41.27 0 26.6C0 11.93 11.93 0 26.6 0C41.27 0 53.2 11.93 53.2 26.6C53.2 41.27 41.27 53.2 26.6 53.2ZM9.67 9.27C4.96 13.87 2.36 20.03 2.36 26.6C2.36 39.96 13.23 50.84 26.6 50.84C31.98 50.84 37.08 49.11 41.34 45.83L41.68 45.57L37.24 40.45H13.94C11.54 40.45 9.59 38.5 9.59 36.1V20.28C9.59 17.88 11.54 15.93 13.94 15.93H15.99L9.97 8.98L9.67 9.28V9.27ZM29.76 11.17C30.08 11.17 30.37 11.29 30.6 11.52L35 15.92H39.26C41.66 15.92 43.61 17.87 43.61 20.27V36.09C43.61 37.87 42.49 39.5 40.83 40.14L40.3 40.35L43.46 44L43.76 43.7C48.32 39.12 50.84 33.05 50.84 26.6C50.84 13.24 39.97 2.36 26.6 2.36C21.34 2.36 16.33 4.03 12.11 7.18L11.77 7.44L18.7 15.43L22.6 11.53C22.82 11.31 23.12 11.18 23.44 11.18H29.77L29.76 11.17ZM26.6 19.08C30.74 19.08 34.11 22.45 34.11 26.59C34.11 28.2 33.6 29.74 32.64 31.04L32.45 31.3L38.31 38.07H39.25C40.34 38.07 41.23 37.18 41.23 36.09V20.27C41.23 19.18 40.34 18.29 39.25 18.29H34.5C34.18 18.29 33.89 18.17 33.66 17.94L29.26 13.54H23.91L20.23 17.22L22.75 20.13L23.03 19.98C24.11 19.4 25.34 19.09 26.58 19.09L26.6 19.08ZM13.94 18.28C12.85 18.28 11.96 19.17 11.96 20.26V36.08C11.96 37.17 12.85 38.06 13.94 38.06H35.19L30.7 32.88L30.41 33.05C29.26 33.73 27.94 34.09 26.6 34.09C22.46 34.09 19.09 30.72 19.09 26.58C19.09 24.86 19.66 23.23 20.74 21.89L20.95 21.63L18.04 18.27H13.94V18.28ZM22.22 23.89C21.72 24.7 21.45 25.63 21.45 26.59C21.45 29.43 23.76 31.74 26.6 31.74C27.31 31.74 28 31.6 28.65 31.31L29.15 31.09L22.51 23.43L22.22 23.89ZM26.6 21.44C26.02 21.44 25.44 21.54 24.89 21.73L24.34 21.93L30.89 29.49L31.16 28.97C31.54 28.24 31.75 27.42 31.75 26.59C31.75 23.75 29.44 21.44 26.6 21.44Z",fill:"#575B66",fillOpacity:"0.5"})})},57056:(e,t,i)=>{"use strict";i.d(t,{m:()=>N});var n=i(26514),a=i(75834),r=i(13742),s=i(17941),o=i(85502);let l=r.default.div.withConfig({componentId:"sc-d2e1aabf-0"})(["display:flex;justify-content:flex-start;align-items:flex-start;label{cursor:pointer;}.RadioButton--cell{",' input[type="radio"]{visibility:hidden;position:absolute;}input[type="radio"]:checked ~ label .check::before{background:',";}label{position:relative;display:inline-flex;justify-content:flex-start;color:",";padding:0px 0px 0px 30px;font-size:1rem;line-height:18px;.check{margin-right:8px;display:block;position:absolute;border:1px solid ",';border-radius:100%;height:22px;width:22px;top:50%;transform:translateY(-50%);left:0px;z-index:5;transition:border 0.25s linear;-webkit-transition:border 0.25s linear;&::before{display:block;position:absolute;content:"";border-radius:100%;height:12px;width:12px;left:50%;
1top:50%;transform:translate(-50%,-50%);margin:auto;transition:all 0.25s linear;-webkit-transition:all 0.25s linear;}}}}'],e=>e.theme.cell,e=>e.color,e=>e.color,e=>e.color),d={cell:{paddingLeft:"20px"},square:{position:"absolute",top:"1px",left:"-20px"}},c={cell:{display:"block"},square:{position:"relative",float:"left",marginRight:"6px"}},p=e=>{let{data:t,onCheck:i,checkValue:a,disabled:p=!1,children:u,defaultColor:m}=e,h=t.theme,x=t.id,f=t.value,g=t.labelText,b=t.quantity,v=t.tooltip,y={outside:d,inside:c};return(0,n.jsx)(r.ThemeProvider,{theme:h?y[h]:y.inside,children:(0,n.jsx)(l,{color:t.color||m||s.Jy.black,children:(0,n.jsxs)("div",{className:"RadioButton--cell",children:[(0,n.jsx)("input",{type:"radio",id:"".concat(x,"_").concat(f),name:x,value:f,checked:a,disabled:p,onChange:e=>i(e)}),(0,n.jsxs)("label",{htmlFor:"".concat(x,"_").concat(f),children:[(0,n.jsx)("div",{className:"check"}),g,b&&" (".concat(b,")"),u&&u]}),v&&(0,n.jsx)(o.m,{content:v})]})})})};var u=i(70007);let m=r.default.div.withConfig({componentId:"sc-e95dc324-0"})(["display:flex;justify-content:center;align-items:center;width:140px;@media ","{width:auto;}.RadioButtonIcon--cell{",' input[type="radio"]{visibility:hidden;position:absolute;}label{margin:0 auto;cursor:pointer;position:relative;display:flex;flex-direction:column;color:',";font-size:1rem;.RadioButtonIcon--svg{width:50px;height:50px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;border-radius:50%;background-color:",";color:",';margin:12px auto 0;&:before{z-index:-1;content:"";position:absolute;width:60px;height:60px;border-radius:50%;background-color:',";}&.checked{background:",";color:",";&:before{background-color:",";opacity:0.3;}}.picto{font-size:2.5rem;}}}}"],s.uk.tablet,e=>e.theme.cell,e=>e.color,e=>e.iconColorOff,e=>e.iconColorOn,s.Jy.whiteSmoke,e=>e.iconColorOn,e=>e.iconColorOff,e=>e.iconColorOn),h=e=>{let{data:t,onCheck:i,checkValue:a,icon:r,iconColorOn:l,iconColorOff:d}=e,c=t.id,p=t.value,u=t.labelText,h=t.quantity,x=t.color,f=t.tooltip;return(0,n.jsx)(m,{color:x||s.Jy.charcoal,iconColorOn:l,iconColorOff:d,children:(0,n.jsxs)("div",{className:"RadioButtonIcon--cell",children:[(0,n.jsx)("input",{type:"radio",id:"".concat(c,"_").concat(p),name:c,value:p,checked:a,onChange:e=>i(e)}),(0,n.jsxs)("label",{htmlFor:"".concat(c,"_").concat(p),children:[u,h&&" (".concat(h,")"),(0,n.jsx)("span",{className:"RadioButtonIcon--svg ".concat(a?"checked":""),children:(0,n.jsx)("i",{className:"picto",children:r})})]}),f&&(0,n.jsx)(o.m,{content:f})]})})},x=r.default.div.withConfig({componentId:"sc-88ff7ebf-0"})(["position:relative;*{box-sizing:border-box;}"]),f=r.default.span.withConfig({componentId:"sc-88ff7ebf-1"})(["min-height:44px;font-size:16px !important;line-height:22px;color:",";font-family:",";@media ","{font-size:14px !important;line-height:18px;}"],s.Jy.blueDark,s.vX.NunitoSansBold,s.uk.mobileL),g=r.default.label.withConfig({componentId:"sc-88ff7ebf-2"})(["transition:all 0.3s ease;border:1px solid ",";padding:15px;.informations{opacity:0;transition:all 0.3s ease;font-family:",";font-size:16px;line-height:22px;background:",";color:",";padding:20px 50px;text-align:center;position:absolute;bottom:85px;left:50%;transform:translateX(-50%);width:450px;border:1px solid ",";z-index:1;@media ","{display:none;}b{font-family:",';}&:before{content:"";position:absolute;left:50%;transform:translateX(-50%);bottom:-17px;width:0;height:0;border-left:17px solid transparent;border-right:17px solid transparent;border-top:17px solid ',';}&:after{content:"";position:absolute;left:50%;transform:translateX(-50%);bottom:-15px;width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-top:15px solid ',";}}&:hover{.informations{opacity:1;}}"],s.Jy.blueDark,s.vX.NunitoSansRegular,s.Jy.white,s.Jy.black,s.Jy.fillGrey,s.uk.mobileL,s.vX.NunitoSansBold,s.Jy.fillGrey,s.Jy.white),b=r.default.img.withConfig({componentId:"sc-88ff7ebf-3"})(["width:100%;"]),v=r.default.input.withConfig({componentId:"sc-88ff7ebf-4"})(["opacity:0;position:absolute;&:checked{background:red;}&:checked + ","{background:",";","{color:",";}}"],g,s.Jy.blueDark,f,s.Jy.white),y=e=>{let{data:t,onCheck:i,checkValue:a,disabled:r=!1,children:s}=e;return(0,n.jsxs)(x,{children:[(0,n.jsx)(v,{type:"radio",id:"".concat(t.id,"_").concat(t.value),name:t.id,value:t.value,checked:a,disabled:r,onChange:i}),(0,n.jsxs)(g,{htmlFor:"".concat(t.id,"_").concat(t.value),children:[(0,n.jsx)(b,{src:"/img/desktop/services/pose/".concat(t.value,".jpg"),alt:t.value}),(0,n.jsx)(f,{dangerouslySetInnerHTML:{__html:t.labelText}}),s]})]})},j=r.default.div.withConfig({componentId:"sc-849a4e1a-0"})(["position:relative;*{box-sizing:border-box;}input{opacity:0;position:absolute;&:checked{background:red;}&:checked + label{background:",";color:",";}}label{border:1px solid ",";display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:",";font-size:14px;padding:10px 22px;min-height:40px;white-space:nowrap;cursor:pointer;border-radius:25px;@media ","{padding:8px 22px;min-height:initial;}}"],s.Jy.black,s.Jy.white,s.Jy.black,s.vX.NunitoSansRegular,s.uk.mobileL),w=e=>{let{data:t,onCheck:i,checkValue:a,disabled:r=!1}=e;return(0,n.jsxs)(j,{children:[(0,n.jsx)("input",{type:"radio",id:"".concat(t.id,"_").concat(t.value),name:t.id,value:t.value,checked:a,disabled:r,onChange:i}),(0,n.jsx)("label",{htmlFor:"".concat(t.id,"_").concat(t.value),children:t.labelText})]})},C=r.default.div.withConfig({componentId:"sc-b083fb6-0"})(["display:flex;justify-content:flex-start;align-items:flex-start;flex-direction:column;margin:0.75rem 0;font-family:",";font-size:16px;line-height:18px;label{cursor:pointer;position:relative;display:block;margin-bottom:10px;transition:all 0.2s ease-in;color:",";font-family:",";span{margin-top:5px;font-size:0.75rem;display:block;text-align:center;}}.list{display:flex;margin:0;padding:0;li{label{font-family:",";}&:first-child{margin:0 1rem 0 0;}margin:0 1rem;display:block;position:relative;float:left;&.is-disabled{opacity:0.7;}}}.icon{color:",";font-size:1.25rem;z-index:1;width:20px;height:20px;visibility:hidden;opacity:0;transition:all 0.25s linear;-webkit-transition:all 0.25s linear;}.msgError{margin:0.3125rem 0 0;display:none;color:",";}&.error{textarea{border:1px solid ",";&:focus{border-color:",";}}.icon{opacity:1;visibility:visible;}.msgError{display:flex;}}"],s.vX.NunitoSansRegular,s.Jy.black,s.vX.NunitoSansBold,s.vX.NunitoSansRegular,s.Jy.persianRed,s.Jy.persianRed,s.Jy.persianRed,s.Jy.persianRed),N=e=>{let{data:t,type:i="default",onChange:r,mainLabelStyle:s={}}=e,[o,l]=(0,a.useState)({isValid:!0,value:t.value});(0,a.useEffect)(()=>
1{l({value:t.value,isValid:t.valid})},[t.value]);let d=e=>{r?r(e):l({isValid:!0,value:e.currentTarget.value})};return(0,n.jsxs)(C,{className:"".concat(o.isValid?"":"error"),children:[t.labelText&&(0,n.jsx)("label",{className:"main-label",htmlFor:t.id,dangerouslySetInnerHTML:{__html:"".concat(t.labelText," ").concat(t.required&&!t.maskError?"<em>*</em>":""," ").concat(t.help?'<span className="help">'.concat(t.help,"</span>"):"")},style:s}),(0,n.jsxs)("ul",{className:"list",children:[t.children.map((e,a)=>(0,n.jsx)("li",{className:e.isDisabled?"is-disabled":e.isChecked?"is-checked":"",children:"picture"===i?(0,n.jsx)(y,{data:{...t,labelText:e.label,value:e.value},checkValue:e.isChecked,onCheck:d,children:e.children,disabled:e.isDisabled}):"button"===i?(0,n.jsx)(w,{data:{...t,labelText:e.label,value:e.value},checkValue:e.isChecked,onCheck:d,children:e.children,disabled:e.isDisabled}):"default"===i?(0,n.jsx)(p,{data:{...t,labelText:e.label,value:e.value},checkValue:o.value==e.value,onCheck:d,children:e.children,disabled:e.isDisabled,defaultColor:e.iconColorOn}):(0,n.jsx)(h,{data:{...t,labelText:e.label,value:e.value},checkValue:o.value==e.value,onCheck:d,icon:e.icon,iconColorOn:e.iconColorOn,iconColorOff:e.iconColorOff})},a)),t.required&&!o.isValid&&!t.maskError&&(0,n.jsx)("li",{children:(0,n.jsx)("span",{className:"picto icon",children:(0,n.jsx)(u.default,{})})})]}
1),!o.isValid&&(0,n.jsx)("span",{className:"msgError",children:t.errMsg})]})}},60366:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/espace-personnel/[page]",function(){return i(93687)}])},70916:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(26514);i(75834);let a=function(e){return(0,n.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 80 80",...e,children:[(0,n.jsx)("path",{d:"M1.952,0A1.886,1.886,0,0,0,0,1.952,1.888,1.888,0,0,0,1.952,3.907,1.888,1.888,0,0,0,3.9,1.952,1.886,1.886,0,0,0,1.952,0",transform:"translate(38.405 55.117)",fill:"#e5a033"}),(0,n.jsx)("path",{d:"M34,68A34,34,0,1,1,68,34,34.04,34.04,0,0,1,34,68ZM34,2.918A31.046,31.046,0,1,0,65.01,34,31.081,31.081,0,0,0,34,2.918Z",transform:"translate(5.999 5.999)",fill:"#13123a"}),(0,n.jsx)("path",{d:"M11.365,28.812A1.513,1.513,0,0,1,9.981,27.43l-.006-.141V21.474a1.517,1.517,0,0,1,1.531-1.528,8.441,8.441,0,1,0-8.447-8.44,1.517,1.517,0,0,1-1.528,1.531A1.517,1.517,0,0,1,0,11.506a11.5,11.5,0,1,1,13.668,11.24l-.292.052-.343.055v4.436a1.513,1.513,0,0,1-1.388,1.522l-.141.006Z",transform:"translate(28.853 21.966)",fill:"#e5a033"})]})}},84446:(e,t,i)=>{"use strict";i.d(t,{_:()=>g});var n=i(26514),a=i(75834),r=i(13742),s=i(17941),o=i(70007),l=i(73366),d=i(80769),c=i(30332),p=i(32898),u=i(78495);let m=r.default.div.withConfig({componentId:"sc-c3c9c670-0"})(["display:flex;justify-content:flex-start;flex-direction:column;align-items:baseline;margin:0.75rem 0;font-family:",";font-size:0.875rem;position:relative;label{cursor:pointer;position:relative;display:block;margin-bottom:10px;transition:all 0.2s ease-in;color:",";em{color:",";}}.field{display:flex;position:relative;box-sizing:border-box;max-width:170px;border:1px solid ",";-webkit-transition:all 0.25s linear;background:",";font-size:16px;&.disabled{background:",";}&.focused{border-color:",";}input{min-width:0;border:none;outline:none;height:36px;width:100%;margin:0;color:",";-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:all 0.25s linear;-webkit-transition:all 0.25s linear;-webkit-appearance:none;text-align:center;height:50px;&:focus{border-color:",";}::placeholder{line-height:39px;@media ",'{line-height:normal;}}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type="number"]{-moz-appearance:textfield;}.error-icon{color:',";background-color:",";position:relative;font-size:1.25rem;padding:0 8px;top:8px;z-index:1;width:20px;height:20px;visibility:hidden;opacity:0;display:none;transition:all 0.25s linear;-webkit-transition:all 0.25s linear;}.update-icon{color:",";position:relative;font-size:1.25rem;top:8px;padding:0 8px;z-index:1;width:20px;height:20px;}.eyes-icon{position:relative;font-size:1.5rem;top:12px;padding:0;z-index:1;width:13px;height:13px;right:11px;margin-left:8px;cursor:pointer;transition:color 0.2s ease-in;&.hidden{color:",";&:hover{color:",";}}&.visible{color:",";}}}.field-icon{color:",";font-size:0.75rem;position:relative;padding:0 8px;display:flex;align-items:center;justify-content:center;margin:0;border:none;line-height:0;overflow:hidden;}.msgError{margin:0.3125rem 0 0;display:none;color:",";}&.error{.field{border:1px solid ",";&:focus{border-color:",";}}input{}.error-icon{opacity:1;visibility:visible;display:block;}.msgError{display:flex;}}.input-icon{outline:none;position:absolute;top:0;bottom:0;border:0;background:none;font-weight:bold;cursor:pointer;color:rgb(0,0,0);transition:color 100ms ease 0s;&.more{right:8px;margin:auto 0;}&.minus{left:8px;margin:auto 0;}}.nb-input-title{font-size:20px;font-family:",";}.field-container{display:flex;align-items:center;.suffix-label{margin-left:20px;}}"],s.vX.NunitoSansBold,s.Jy.dimGray,s.Jy.yellowSea,s.Jy.fillGrey,s.Jy.white,s.Jy.whiteSmoke,s.Jy.yellowSea,e=>e.colorText,s.Jy.yellowSea,s.uk.tablet,s.Jy.redClassic,s.Jy.white,s.Jy.yellowSea,s.Jy.darkgrey,s.Jy.dimGray,s.Jy.yellowSea,s.Jy.darkgrey,s.Jy.persianRed,s.Jy.persianRed,s.Jy.persianRed,s.vX.Glendale),h={inactif:{color:s.Jy.charcoal},actif:{color:s.Jy.white},overlay:{opacity:1}},x={inactif:{color:s.Jy.charcoal},actif:{color:s.Jy.white},overlay:{opacity:.8}},f={inactif:{color:s.Jy.white},actif:{color:s.Jy.white},overlay:{opacity:.8}},g=e=>{let{data:t,colorTheme:i,colorText:g,children:b,onBlur:v,onFocus:y,onChange:j,onKeyPress:w,forwardedRef:C,isAutocomplete:N=!0,updateMode:_=!1,disable:k=!1,hiddenMode:S=!1,maxLength:I,min:A,max:E,suffixLabel:T,labelStyle:z={},quantityFromUrl:L}=e,[P,O]=(0,a.useState)(null!=L?L:Number(t.value)),[R,J]=(0,a.useState)(!0),[M,D]=(0,a.useState)(k||_&&void 0!=t.value&&""!=t.value),[F,V]=(0,a.useState)(!1),q=a.useRef(null),B=a.useRef(null),X={primary:h,lightColor:x,colorfull:f};(0,a.useEffect)(()=>{D(k||_&&void 0!=t.value&&""!=t.value)},[k]),(0,a.useEffect)(()=>{L?O(L):O(Number(t.value))},[L,t.value]),(0,a.useEffect)(()=>{J(t.valid)},[t]),(0,a.useEffect)(()=>{H(B.current)},[P]);let H=e=>{e.value<A||e.value>E||(j&&j(e),""!=e?J(!0):t.required&&J(!1))};return(0,n.jsx)(r.ThemeProvider,{theme:t.theme?X[t.theme]:X.primary,children:(0,n.jsxs)(m,{colorTheme:i||s.Jy.dimGray,colorText:g||s.Jy.dimGray,className:"NumberFieldPlusMinus".concat(R?"":" error"),children:["nbAdults"===t.id&&(0,n.jsx)("h3",{className:"nb-input-title",children:"NOMBRE DâADULTES DANS LE FOYER"}),"nbChilds"===t.id&&(0,n.jsx)("h3",{className:"nb-input-title",children:"NOMBRE DâENFANTS DANS LE FOYER"}
1),t.labelText?(0,n.jsxs)("label",{htmlFor:t.id,style:z,children:[t.labelText,t.required&&!t.maskError&&(0,n.jsx)("em",{children:"*"})]}):null,(0,n.jsxs)("div",{className:"field-container",children:[(0,n.jsxs)("div",{ref:q,className:"field".concat(M?" disabled":""),children:[(0,n.jsx)(u.default,{onClick:()=>{P!=A&&O(P-1)},className:"input-icon minus"}),(0,n.jsx)("input",{type:t.type?function(e,t,i){return i?t?"text":"password":e}(t.type,F,S):"text",id:t.id,name:t.id,placeholder:t.placeholder,disabled:M&&R,onFocus:e=>{q.current.classList.add("focused"),y&&y(e)},onKeyPress:e=>{w&&w(e)},onBlur:e=>{q.current.classList.remove("focused"),v&&v(e)},onChange:e=>{H(e.currentTarget)},required:t.required,ref:B,autoComplete:N?(0,d.lV)(t.id):"off",min:"number"===t.type?"0":null,maxLength:I||null,value:P}),(0,n.jsx)(p.default,{onClick:()=>{E&&P==E||O(P+1)},className:"input-icon more"}),(0,n.jsx)("span",{className:"picto error-icon ".concat(b?"child":""),children:(0,n.jsx)(o.default,{})}),b&&(0,n.jsx)("span",{className:"btn",children:b}),S&&(0,n.jsx)("span",{onClick:e=>{F?V(!1):V(!0)},className:"btn picto eyes-icon ".concat(F?"visible":"hidden"),children:(0,n.jsx)(c.default,{})}),_&&(0,n.jsx)("span",{onClick:e=>D(!M),className:"btn picto update-icon ".concat(b?"child":""),children:(0,n.jsx)(l.default,{})})]}),(0,n.jsx)("span",{className:"suffix-label",children:T})]}),!R&&!t.maskError&&t.errMsg&&(0,n.jsx)("span",{className:"msgError",children:t.errMsg})]})})}},93687:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>aU});var n=i(26514),a=i(75834),r=i(46225),s=i.n(r),o=i(13742),l=i(17941),d=i(94741),c=i(65266),p=i(95706),u=i(78495),m=i(59376),h=i(31209),x=i(15250),f=i(83298),g=i(36756),b=i(88121),v=i(43437),y=i(5124),j=i(96157),w=i(60900);let C={RETRAIT_MAGASIN:"Retrait en magasin",DOMICILE:"A domicile : Livraison sur le trottoir",DANS_LA_PIECE:"A domicile : Livraison dans la pi\xe8ce",LAD:"Livraison \xe0 domicile pi\xe8ce de choix",LAD_EXP:"Livraison \xe0 domicile trottoir",NORMAL:"Retrait en magasin"},N=new Date("2024-01-01"),_=(e,t,i)=>{var n,a;if(i.getTime()<N.getTime()||!t)return null;let r=e=>{var i,n;return(null==(i=e.metadata)?void 0:i.order_id)!=null&&(null==(n=e.metadata)?void 0:n.order_id)===t};return{purchase:null==(n=e.purchases.find(r))?void 0:n.name,invoice:null==(a=e.invoices.find(r))?void 0:a.name}};var k=i(77785),S=i(88735),I=i(80769),A=i(48738);let E=e=>{let t=new Date(e.created_at),{day:i,mounth:n,year:a}=(0,I.zJ)(t),r="".concat(i,"/").concat(n,"/").concat(a);return{id:e.id,orderIndex:e.store_id,fromWeb:"050"===e.store_id,tsmFormattedOrderNumber:e.id,status:e.status,date:new Date(e.created_at),dateFormatted:r,totalTTCPrice:(0,A.d6)(e.amount_in_euros),cardProducts:null,documents:{purchase:null,invoice:null}}};async function T(e){{let t=(0,S.F)(),i=await fetch("".concat(t,"/api/customer/orders"),{method:"POST",body:JSON.stringify({clientToken:e}),headers:{"Content-Type":"application/json"}});if(!i.ok)throw console.error("Bad response",await i.text()),Error("Bad response");return await i.json()}}let z=async e=>{let{orders:t}=await T(e);return t.map(E)};var L=i(859),P=i(67110);let O=e=>e.toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit",year:"numeric"});var R=i(79506);let J=e=>{var t;return{qct:e.productCode,image:{src:null!=(t=e.productImage)?t:"",alt:e.productName}}},M=e=>{var t,i,n,a;let r,s=null!=e.initialTotalPrice&&e.initialTotalPrice>e.totalPrice,o=null!=(t=e.unit)?t:"";switch(e.productType){case R.po.PAQUET:r="paquet".concat(e.quantity>1?"s":""," de ").concat(e.packageSize).concat(o?" "+o:"");break;case R.po.PIECE:r=R.po.PIECE;break;default:r=o}return{qct:e.productCode,title:e.productName,size:"",reference:e.productCode,unitPrice:(0,P.pH)(e.unitPrice),totalPrice:(0,P.pH)(e.totalPrice),totalCompareAtPrice:s?(0,P.pH)(e.initialTotalPrice):{amount:0,currencyCode:"EUR",formatted:""},quantity:e.quantity,packageSize:null!=(i=e.packageSize)?i:null,unitLabel:r,url:null!=(n=e.productUrl)?n:"",image:{src:null!=(a=e.productImage)?a:"",alt:e.productName}}},D=e=>{var t,i,n;let a=new Date(e.createdAt);return{id:e.merchantOrderId,orderIndex:e.merchantOrderId,fromWeb:!0,tsmFormattedOrderNumber:null!=(t=e.axOrderNumber)?t:"-",status:e.orderStatus,date:a,dateFormatted:O(a),totalTTCPrice:(0,P.pH)(e.amount),cardProducts:(null!=(i=e.lineDetails)?i:[]).map(J),shippingMode:null!=(n=e.deliveryMode)?n:void 0,documents:{purchase:void 0,invoice:void 0}}};var F=i(40985);let V=async()=>{var e;let t=await fetch(L.S.orders.userOrders,{method:"GET",credentials:"include"});return t.ok?(null!=(e=(await t.json()).orders)?e:[]).map(D):(F.v.warn("[dbEcommerceOrders] getEcommerceCustomerOrders failed",{status:t.status}),[])},q=async e=>{F.v.info("[dbEcommerceOrders] getCustomerOrderDetails",{orderId:e});let t=L.S.orders.userOrderById(e),i=await fetch(t,{method:"GET",credentials:"include"});if(!i.ok)throw F.v.error("[dbEcommerceOrders] getCustomerOrderDetails failed",{orderId:e,status:i.status}),Error("Order ".concat(e," not found"));let n=(await i.json()).order;try{var a,r;let t=(e=>{var t,i,n,a,r,s,o,l,d,c,p,u,m,h;let x=e.createdAt?new Date(e.createdAt):new Date,f=(0,P.sp)(Number(e.amount)||0)-(0,P.sp)(Number(e.tva)||0),g={firstName:null!=(t=e.firstName)?t:"",lastName:null!=(i=e.lastName)?i:"",phone:null!=(n=e.phoneNumber)?n:""};return{fromWeb:!0,id:e.merchantOrderId,hasOrderNumber:!!e.axOrderNumber,tsmFormattedOrderNumber:null!=(a=e.axOrderNumber)?a:"-",date:x,dateFormatted:O(x),shippingPrice:(0,P.pH)(e.deliveryPrice),subTotalPrice:(0,P.pH)(e.subTotal),totalTTCPrice:(0,P.pH)(e.amount),totalHTPrice:{amount:f,currencyCode:"EUR",formatted:String((0,P.$g)(f))},taxPrice:(0,P.pH)(e.tva),discountPrice:(0,P.pH)(e.discountTotal),status:e.orderStatus,shippingAddress:{...g,address1:null!=(r=e.shippingStreet)?r:"",address2:"",city:null!=(s=e.shippingCity)?s:"",zip:null!=(o=e.shippingZip)?o:"",country:null!=(l=e.shippingCountryCode)?l:""}
1,billingAddress:{...g,address1:null!=(d=e.billingStreet)?d:"",address2:"",city:null!=(c=e.billingCity)?c:"",zip:null!=(p=e.billingZip)?p:"",country:null!=(u=e.billingCountryCode)?u:""},products:(null!=(m=e.lineDetails)?m:[]).map(M),shippingMode:null!=(h=e.deliveryMode)?h:void 0,documents:{purchase:void 0,invoice:void 0}}})(n);return F.v.info("[dbEcommerceOrders] mapped successfully",{orderId:e,productCount:null!=(r=null==(a=t.products)?void 0:a.length)?r:0}),t}catch(t){throw F.v.error("[dbEcommerceOrders] mapping failed",{orderId:e,error:t instanceof Error?t.message:String(t)}),t}};async function B(e,t,i){{let n=(0,S.F)(),a=await fetch("".concat(n,"/api/customer/documents/document-url"),{method:"POST",body:JSON.stringify({clientToken:e,name:t,type:i}),headers:{"Content-Type":"application/json"}});if(!a.ok)throw console.error("Bad response",await a.text()),Error("Bad response");return await a.text()}}let X=async(e,t,i)=>await B(e,t,i);async function H(e,t,i,n){{let a=(0,S.F)(),r=await fetch("".concat(a,"/api/customer/documents/documents-by-type"),{method:"POST",body:JSON.stringify({clientToken:e,range:t,page:i,type:n}),headers:{"Content-Type":"application/json"}});if(!r.ok)throw console.error("Bad response",await r.text()),Error("Bad response");return await r.json()}}let G=async(e,t)=>{let i=[],n=1;for(;;){let a=await H(e,20,n,t);if(i.push(...a),a.length<20)return i;n++}};var U=function(e){return e.QUOTE="quote",e.ORDER="order",e.INVOICE="invoice",e.CREDIT_NOTE="credit_note",e}({}),W=i(38531);let Q=new Date("2024-01-01"),Z=async e=>{let t=new k.CQ,[i,n]=await Promise.all([z(e).catch(e=>(console.warn("[getOrderCards] TSM orders fetch failed",e),[])),V(e)]),a=null==n?void 0:n.map(e=>{let t=i.find(t=>t.id===e.tsmFormattedOrderNumber);return{...e,status:t?t.status:null,fromWeb:!t||t.fromWeb}});for(let e of i.filter(e=>!e.fromWeb))e.storeName=await t.getStoreNameById(e.orderIndex),a.push(e);return a},$=(()=>{let e=null;return(0,j.un)(v.kQ,(t,i)=>{let n=e;if(e=t,n===t)return;if(!t)return void i({loading:!1,data:null});i({loading:!0});let a=t.getCurrentToken(),r=!1;return Promise.all([G(a,U.ORDER),G(a,U.INVOICE)]).then(e=>{let[t,n]=e;r||i({loading:!1,data:{purchases:t,invoices:n}})}).catch(e=>{console.error("Failed to fetch order documents for user: %s",t.clientId,e),r||i({loading:!1,error:!0})}),()=>{r=!0}},{loading:!0})})(),Y=async(e,t)=>{let i,n=(0,v.wz)(),a=n.getCurrentToken();if(t)i=await q(e);else{let t=new W.oz,a={userToken:n.getCurrentToken(),orderId:e};i=await t.getUserOrderInfo(a)}if(i&&(i.fromWeb=t),t)return i.documents||(i.documents={purchase:void 0,invoice:void 0}),i;try{let e=await z(a),t=null==e?void 0:e.find(e=>e.id===(null==i?void 0:i.tsmFormattedOrderNumber));t&&(i.status=t.status)}catch(e){console.warn("[getOrderDetail] TSM orders fetch failed",e)}if((null==i?void 0:i.date.getTime())>Q.getTime())try{var r,s;let[e,t]=await Promise.all([G(a,U.ORDER),G(a,U.INVOICE)]),n=null==e||null==(r=e.find(e=>e.id===(null==i?void 0:i.tsmFormattedOrderNumber)))?void 0:r.name,o=null==t||null==(s=t.find(e=>e.id===(null==i?void 0:i.tsmFormattedOrderNumber)))?void 0:s.name;i.documents||(i.documents={purchase:void 0,invoice:void 0}),i.documents.invoice=o,i.documents.purchase=n}catch(e){console.warn("[getOrderDetail] TSM documents fetch failed",e),i.documents||(i.documents={purchase:void 0,invoice:void 0})}return i},K=(0,j.T5)(null),ee=(0,j.T5)(null),et=(0,j.un)([K,ee],(e,t)=>{let[i,n]=e;if(!i)return void t({loading:!1,data:null});t({loading:!0}),Y(i,n).then(e=>{t({loading:!1,data:e})}).catch(e=>{console.error("Failed to fetch order's detail for order: %s",i,e),t({loading:!1,error:!0})})},{loading:!0}),ei=(0,j.un)([et,$],e=>{let[t,i]=e;if(t.error)return{loading:!1,error:!0};if(!0===t.loading||!0===i.loading)return{loading:!0};if("error"in i&&!0===i.error||!("data"in i))return console.error("Failed to get documents for order %s",t.data.id),t;let n=_(i.data,t.data.tsmFormattedOrderNumber,t.data.date);return n?{loading:!1,data:{...t.data,documents:n}}:t}),en=(0,j.T5)(0),ea=()=>{en.update(w.GV)},er=null,es=0,eo=(0,j.un)([v.kQ,en],(e,t)=>{let[i,n]=e,a=er;if(er=i,a===i&&es===n)return;if(es=n,!i)return void t({loading:!1,data:null});a!==i&&t({loading:!0});let r=i.getCurrentToken();if(!r)return;let s=!1;return Z(r).then(async e=>{s||t({loading:!1,data:e})}).catch(e=>{console.error("Failed to load customer orders for client",null==i?void 0:i.clientId,e),s||t({loading:!1,error:!0})}),()=>{s=!0}},{loading:!0}),el=(0,j.un)(eo,e=>e.loading),ed=(0,j.un)([eo,$],e=>{let[t,i]=e;return!0===t.loading||!0===i.loading?{loading:!0}:t.error?{loading:!1,error:!0}:"error"in i&&!0===i.error||!("data"in i)?(console.error("Failed to load documents for order cards"),t):t.data?{loading:!1,data:t.data.map(e=>{let t=_(i.data,e.tsmFormattedOrderNumber,e.date);return t?{...e,documents:t}:e})}:{loading:!1}}),ec=e=>(e&&(0,a.useEffect)(ea,e),(0,j.Pj)(ed)),ep=(0,j.un)(ed,e=>{if(!e.loading&&"data"in e)return(e=>{let t=e.sort((e,t)=>
1e.date.getTime()-t.date.getTime());return t[t.length-1]})(e.data)});var eu=i(25867);let em=o.default.div.withConfig({componentId:"sc-46472ee5-0"})(["width:24%;max-width:330px;@media ","{width:100%;max-width:none;}ul{list-style-type:none;padding:0;border:solid ",";border-width:1px 1px 0 1px;li{width:100%;a{width:100%;}}}.accordion{.accordion--content--inner{margin:0;}.accordion--title{padding:0;border:solid ",";border-width:0 0 1px 0;.menu-item{border:none;}.icon-dropdown{margin-right:10px;width:20px;height:20px;flex-shrink:0;}}.accordion-section{border:none;&.active{.accordion--title{background-color:",";color:white;path{fill:",";}}}}}.menu-item{&.active{font-weight:bold;}display:flex;height:60px;align-items:center;padding:15px 10px;width:100%;box-sizing:border-box;border:solid ",";border-width:0 0 1px 0;@media ","{height:40px;}.next-arrow-icon{margin-left:auto;width:20px;height:20px;flex-shrink:0;}.menu-item-icon{margin-right:10px;width:40px;height:40px;flex-shrink:0;@media ","{width:20px;height:20px;}}.menu-item-label{font-family:",";}&.main-menu-item{&.active{background-color:",";color:white;path{fill:",";transition:fill ease 300ms;}rect{fill:",";transition:fill ease 100ms;}}}&.child-item{&.active{fill:",";}.menu-item-icon{margin-right:10px;width:40px;height:20px;flex-shrink:0;@media ","{width:20px;height:20px;}}}}.menu-title{font-family:",";text-transform:uppercase;font-size:20px;}.logout-link{color:",";text-decoration:underline;cursor:pointer;font-family:",";}"],l.uk.tablet,l.Jy.fillGrey,l.Jy.fillGrey,l.Jy.blueDark,l.Jy.white,l.Jy.fillGrey,l.uk.tablet,l.uk.tablet,l.vX.NunitoSansRegular,l.Jy.blueDark,l.Jy.white,l.Jy.blueDark,l.Jy.yellowSea,l.uk.tablet,l.vX.Glendale,l.Jy.ocher,l.vX.NunitoSansBold),eh=e=>{let{active:t,label:i,href:a="",hrefTarget:r=null,isParent:s=!1,isChild:o=!1,icon:l=null,onClick:d=()=>{},iconProps:c={}}=e;return s?(0,n.jsxs)("div",{"data-testid":i,onClick:d,className:"menu-item ".concat(!o?"main-menu-item":""," ").concat(t?"active":""," "),children:[l&&(0,n.jsx)(l,{...c,className:"menu-item-icon"}),(0,n.jsx)("span",{className:"menu-item-label",children:i})]}):(0,n.jsx)(x.m,{href:a,target:r,children:(0,n.jsxs)("div",{"data-testid":i,className:"menu-item ".concat(!o?"main-menu-item":"child-item"," ").concat(t?"active":""," "),children:[o?(0,n.jsx)(u.default,{className:"menu-item-icon"}):l&&(0,n.jsx)(l,{...c,className:"menu-item-icon"}),(0,n.jsx)("span",{className:"menu-item-label",children:i}),!o&&(0,n.jsx)(m.default,{width:19,height:19,className:"next-arrow-icon"})]})})},ex=e=>{let{sections:t,onLogOut:i}=e,{setLogOut:r}=(0,a.useContext)(h.Rs),{setLogOut:o}=(0,eu.kH)(),l=ec(),{clientId:d,firstName:c}=(0,v.NW)()||{},p=(0,g.nG)(),u=async()=>{i&&i(),await fetch(L.S.user.logout,{method:"POST"}),r(),o()};return(0,n.jsxs)(em,{children:[(0,n.jsxs)("div",{className:"profile-container",children:[(0,n.jsxs)("h2",{className:"menu-title",children:["Bonjour ",p?c:""]}),b.R5&&p&&(0,n.jsxs)("div",{children:["N\xb0 de client\xa0: ",d]})]}),(0,n.jsx)("ul",{children:t.map((e,t)=>null!=e.children?(0,n.jsx)("li",{"data-testid":e.label,children:(0,n.jsx)(f.n,{theme:"primary",children:(0,n.jsx)(f.K,{title:(0,n.jsx)(eh,{active:!1,label:e.label,isParent:!0,icon:e.icon,onClick:()=>{e.children[0].active||s().push(e.children[0].href)},iconProps:e.iconProps}),isOpen:!!e.children.find(e=>!0==e.active),children:e.children.map(e=>(0,n.jsx)(eh,{label:e.label,active:e.active,href:e.href,hrefTarget:e.hrefTarget,isChild:!0},e.section))},t)})},t):"Parrainage"!==e.label||(0,y.H)(l)?(0,n.jsx)("li",{"data-testid":e.label,children:(0,n.jsx)(eh,{label:e.label,icon:e.icon,active:e.active,href:e.href,hrefTarget:e.hrefTarget,iconProps:e.iconProps})},t):void 0)}),(0,n.jsx)("span",{className:"logout-link",onClick:()=>u(),children:"D\xe9connexion"})]})};var ef=i(79737),eg=function(e){return e.LOGIN="login",e.ACCOUNT="creer-un-compte",e.MDP="mot-de-passe",e.INFOS_PERSOS="informations-personnelles",e.ALL_ESTIMATE="historique-estimations",e.CONTACT_LIST="liste-demande-contact",e.MY_HABITATION="mon-habitation",e.MY_HOME="mon-foyer",e.POL_PROJECTS="mes-estimations-de-pose",e.DASHBOARD="mon-tableau-de-bord",e.HELP_CONTACT="aide-et-contact",e.COMMUNICATION="preferences-communication",e.MY_STORE="mon-magasin",e.PERSONAL_DATA="donnees-personnelles",e.ORDERS="mes-commandes",e.E_RESERVATIONS="mes-ereservations",e.WISHLIST="mes-favoris",e.ADRESSES="mon-adresse",e.SIMULATIONS="mes-simulations-3d",e.CSM="sur-mesure",e.POSE_ESTIMATION="mes-estimations-de-pose",e.MY_APPOINTMENTS="mes-rendez-vous",e.MY_FAVOURITES=" mes-favoris",e.QUOTES="mes-devis",e.PARRAINAGE="parrainage",e}({}),eb=i(99817),ev=i(22496),ey=i(25938),ej=i(69378);let ew=["informations-personnelles","historique-estimations","liste-demande-contact","mes favoris","mon-habitation","mon-foyer","mon-tableau-de-bord","aide-et-contact","preferences-communication","donnees-personnelles","mon-magasin","mes-commandes","mes-ereservations","mes-favoris","mon-adresse","mes-simulations-3d","mes-estimations-de-pose","sur-mesure","mes-rendez-vous","mes-devis",b.tf&&"parrainage"].filter(
1Boolean),eC={[eg.LOGIN]:ey.dE.epLogin,[eg.ACCOUNT]:ey.dE.epCreateAccount,[eg.INFOS_PERSOS]:ey.dE.epInfosPerso,[eg.ALL_ESTIMATE]:ey.dE.epEstimation,[eg.CONTACT_LIST]:ey.dE.epContact,[eg.MY_HABITATION]:ey.dE.epHabitation,...b.OX&&{[eg.POL_PROJECTS]:ej.V},[eg.MY_HOME]:ey.dE.epHome,[eg.DASHBOARD]:ey.dE.epDashboard,[eg.HELP_CONTACT]:ey.dE.epHelpAndContact,[eg.COMMUNICATION]:ey.dE.epCommunicationPreference,[eg.PERSONAL_DATA]:ey.dE.epPersonalData,[eg.MY_STORE]:ey.dE.epMyStore,[eg.ORDERS]:ey.dE.epOrders,[eg.E_RESERVATIONS]:ey.dE.epEreservations,[eg.WISHLIST]:ey.dE.epWishlist,[eg.ADRESSES]:ey.dE.epAddresses,[eg.SIMULATIONS]:ey.dE.epSimulations,[eg.POSE_ESTIMATION]:ey.dE.epEstimationPose,[eg.CSM]:ey.dE.epCSM,[eg.MY_APPOINTMENTS]:ey.dE.epMyAppointments,[eg.QUOTES]:ey.dE.epQuotes,...b.tf&&{[eg.PARRAINAGE]:ey.dE.epParrainage}};var eN=i(10318),e_=i(70916),ek=i(21816),eS=i(22479),eI=i(14057),eA=i(24139),eE=i(34308),eT=i(39621),ez=i(20577);let eL=o.default.div.withConfig({componentId:"sc-18ccf83c-0"})(["position:relative;display:flex;flex-direction:column;align-items:center;box-shadow:0 0 10px 0 rgba(87,91,102,0.3);padding:20px 25px;box-sizing:border-box;min-height:415px;@media ","{min-height:0;}.card-title{font-family:",";font-size:20px;text-align:center;}.card-description{font-family:",";text-align:center;margin-bottom:20px;width:100%;}.card-icon{width:64px;height:64px;@media ","{width:51px;height:51px;}}.new-tag{position:absolute;font-size:14px;top:0;left:0;font-family:",";margin:10px;}.button{width:100%;@media ","{font-size:16px;}@media ","{font-size:14px;}}"],l.uk.tablet,l.vX.Glendale,l.vX.NunitoSansRegular,l.uk.tablet,l.vX.Glendale,l.uk.laptopL,l.uk.laptop),eP=e=>{let{title:t,description:i,svg:a,buttonOnClickHandle:s,buttonLabel:o,isNew:l=!1,className:d=""}=e;return(0,r.useRouter)(),(0,n.jsxs)(eL,{className:d,children:[a,(0,n.jsx)("h2",{className:"card-title",children:t}),(0,n.jsx)("div",{className:"card-description",children:i}),o&&(0,n.jsx)(ez.$,{isOnBgColor:!0,text:o,theme:"primaryRefonte",onClick:s,style:{width:"100%",marginTop:"auto"}}),l&&(0,n.jsx)("span",{className:"new-tag",children:"NOUVEAU !"})]})},eO=o.default.div.withConfig({componentId:"sc-db2ee96a-0"})(["width:100%;display:flex;justify-content:space-around;@media ","{margin:0;}.ep-help-and-contact{width:100%;@media ","{margin:0;}}.grid-container{display:grid;grid-template-columns:repeat(3,1fr);grid-column-gap:30px;grid-row-gap:30px;@media ","{grid-template-columns:repeat(1,1fr);grid-column-gap:20px;grid-row-gap:20px;}}.page-title{font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";}"],l.uk.tablet,l.uk.tablet,l.uk.tablet,l.vX.Glendale,l.Jy.darkblue);var eR=i(79161),eJ=i(87888),eM=i(24204),eD=i(5593),eF=i(96397);let eV=o.default.div.withConfig({componentId:"sc-c22c0f2c-0"})(["width:100%;display:flex;justify-content:space-around;@media ","{margin:0;}.ep-personal-data{width:100%;.page-title{font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";}.card-title{font-size:20px;font-family:",";margin-top:20px;text-align:center;text-transform:uppercase;}.card-description{width:100%;font-size:16px;text-align:center;margin:25px 0;font-family:",";}svg{margin-bottom:24px;}}"],l.uk.tablet,l.vX.Glendale,l.Jy.darkblue,l.vX.Glendale,l.vX.NunitoSansRegular),eq=o.default.div.withConfig({componentId:"sc-c22c0f2c-1"})(["position:relative;display:flex;flex-direction:column;align-items:center;box-shadow:0 0 10px 0 rgba(87,91,102,0.3);padding:20px 25px;margin-bottom:30px;"]),eB=o.default.div.withConfig({componentId:"sc-c22c0f2c-2"})(["margin:0 70px;a{text-decoration:underline;}"]),eX=o.default.form.withConfig({componentId:"sc-c22c0f2c-3"})([".checkbox--cell{label{color:black;}margin:10px 0;}"]),eH=()=>{let e=(0,eD.DS)(),[t,i]=(0,a.useState)({field:e.optoutValiuz,local:"1"==e.optoutValiuz.value,remote:"1"==e.optoutValiuz.value}),r=(0,v.Jd)(),s=(0,v.Py)(),[o,d]=(0,a.useState)(!1),[c,p]=(0,a.useState)(""),[u,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(s.error)return void m(!0)},[!!s.error]),(0,a.useEffect)(()=>{if(s.value){let e=s.value.valiuzOptout;i(t=>({...t,remote:e,local:e}))}else i(e=>({...e,remote:!1,local:!1})),p("")},[s.value]);let h=async e=>{e.preventDefault(),d(!0);let i=t.local;
1try{await W.Ay.updateValiuzOptout(r.getCurrentToken(),i),await s.refresh()}catch(e){console.error("Failed to update Valiuz opt out for user %s to %s",r.clientId,i,e),p("Une erreur est survenue lors de l'enregistrement de votre choix, veuillez r\xe9essayer ult\xe9rieurement.")}finally{d(!1)}};return(0,n.jsxs)(eB,{children:["Dans le cadre de l'alliance Valiuz, Saint Maclou s'allie \xe0 d'autres enseignes telles que Leroy Merlin, Boulanger, Jules (",(0,n.jsx)("a",{href:"https://www.valiuz.com/liste-des-membres/",target:"_blank",title:"Liste des membres",children:"liste compl\xe8te ici"}),") pour mieux comprendre vos habitudes d'achat et personnaliser les offres et publicit\xe9s que vous recevez.",t.remote?(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:"Refus\xe9\xa0:"})," vous ne souhaitez pas que vos informations soient partag\xe9es avec Valiuz."]}):u?(0,n.jsx)("p",{children:eR.IW.GLOBAL}):s.loading?(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}):(0,n.jsxs)(eX,{onSubmit:h,noValidate:!0,id:"contactForm",method:"post",children:[(0,n.jsx)(eF.S,{onCheck:e=>{let t=!!e.checked;i(e=>({...e,local:t}))},checkValue:t.local,data:t.field,actifColor:l.Jy.blueDark}),c&&(0,n.jsx)("p",{children:c}),(0,n.jsx)(ez.$,{isLoading:o,disabled:t.local===t.remote,type:"submit",text:"Sauvegarder la modification",theme:"primaryRefonte"})]})]})};var eG=i(19389),eU=i(43553),eW=i(37651),eQ=i(54073),eZ=i(34489);let e$=o.default.div.withConfig({componentId:"sc-48126446-0"})(["width:100%;font-family:",";font-size:16px;line-height:19px;*{box-sizing:border-box;}@media ","{margin:0;}"],l.vX.NunitoSansRegular,l.uk.tablet),eY=o.default.div.withConfig({componentId:"sc-48126446-1"})([""]),eK=o.default.h2.withConfig({componentId:"sc-48126446-2"})(["text-transform:uppercase;font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";@media ","{font-size:22px;line-height:28px;}"],l.vX.Glendale,l.Jy.darkblue,l.uk.tablet),e0=o.default.div.withConfig({componentId:"sc-48126446-3"})(["display:flex;@media ","{flex-direction:column;}"],l.uk.tablet),e1=o.default.div.withConfig({componentId:"sc-48126446-4"})(["width:45%;margin-right:30px;@media ","{width:100%;margin:0 0 30px 0;}"],l.uk.tablet),e2=o.default.div.withConfig({componentId:"sc-48126446-5"})(["width:55%;@media ","{width:100%;}"],l.uk.tablet),e5=o.default.div.withConfig({componentId:"sc-48126446-6"})(["flex:1;&:first-of-type{margin-right:30px;@media ","{margin:0 0 30px 0;}}"],l.uk.tablet),e3=o.default.div.withConfig({componentId:"sc-48126446-7"})(["width:100%;height:800px;margin:0 auto 4rem;box-sizing:border-box;background-color:",";iframe{border:none;background-color:",";}input{font-size:16px;}@media ","{height:500px;}"],l.Jy.gainsboro,l.Jy.gainsboro,l.uk.tablet),e4=o.default.h3.withConfig({componentId:"sc-48126446-8"})(["text-transform:uppercase;color:",";font-size:20px;lien-height:24px;margin-bottom:5px;font-family:",";"],l.Jy.black,l.vX.Glendale),e6=o.default.a.withConfig({componentId:"sc-48126446-9"})(["cursor:pointer;text-decoration:underline;"]),e8=o.default.div.withConfig({componentId:"sc-48126446-10"})(["display:flex;margin-top:30px;@media ","{flex-direction:column;}.link{font-family:",";font-size:16px;line-height:22px;text-decoration:underline;&.marg-bot-10{margin-bottom:10px;}&.marg-top-20{margin-top:20px;}}"],l.uk.laptopL,l.vX.NunitoSansBold),e9=o.default.h4.withConfig({componentId:"sc-48126446-11"})(["font-family:",";margin:0 0 10px 0;font-size:16px;line-height:22px;"],l.vX.NunitoSansBold),e7=o.default.div.withConfig({componentId:"sc-48126446-12"})(["margin-top:15px;"]),te=o.default.div.withConfig({componentId:"sc-48126446-13"})([""]),tt=o.default.div.withConfig({componentId:"sc-48126446-14"})(["padding:0;text-align:left;max-width:300px;"]),ti=o.default.ul.withConfig({componentId:"sc-48126446-15"})(["padding:0;margin:0;.strong{font-family:",";}li{display:flex;line-height:normal;:not(:first-of-type){padding:5px 0;}span{flex:0 0 58%;&:first-child{flex:0 0 42%;}}}.store-hours{white-space:nowrap;}"],l.vX.NunitoSansBold),tn=o.default.li.withConfig({componentId:"sc-48126446-16"})([""]),ta=o.default.div.withConfig({componentId:"sc-48126446-17"})(["padding:15px;margin-top:20px;background-color:",";text-align:center;strong{font-family:",";}"],l.Jy.fillGrey,l.vX.NunitoSansBold),tr=(0,h.ID)(e=>{let{userContext:t,onTokenError:i,goToSection:r}=e,[s,o]=(0,a.useState)(),[d,c]=(0,a.useState)(),{store:p,setMyStore:u}=(0,eW.L)(),{showSearchShopModal:m}=(0,eQ.hS)(),h=e=>{u(e)};(0,a.useEffect)(()=>{p&&(null==p?void 0:p.value)&&(!async function(){let e=new eU.f,t={code:null==p?void 0:p.value};o((await e.getBusinesses(t))[0])}(),new k.CQ().getStoreById(null==p?void 0:p.value).then(e=>{c(e)}))}
1,[p]),(0,a.useEffect)(()=>{s&&((0,I.nW)(eR.VI.URL,"woosapi",()=>{(0,I.nW)("https://www.google.com/jsapi","jsapi",()=>{if(window.WebApp){let e=new window.WebApp("store-locator","woos-f18d5648-dd6d-3b4f-a016-93cf40231608");e.setConf((()=>{let e="/img/desktop/pins/storeloc-default.png";return{internationalization:{lang:"fr",period:"fr-FR",unitSystem:0},maps:{provider:"google",apiKey:"AIzaSyCmXle6nHYm5uoG3ShRlUQ-jU64E3pol8E",localities:{language:"fr",componentRestrictions:{country:["fr"]}}},woosmapview:{initialCenter:{lat:Number(s.lat),lng:Number(s.long)},initialZoom:16,breakPoint:5,style:{default:{icon:{url:e,scaledSize:{width:50,height:77}},selectedIcon:{scaledSize:{width:60,height:93},url:e},numberedIcon:{scaledSize:{width:60,height:93},url:e}}}}}})()),e.render((0,I.Fr)())}})}),f=(0,I.n4)(s.contacts[0].phone_numbers[0]))},[s]);let f=null,g=e=>{e.preventDefault(),m({onSelectStore:h,ResultComponent:eZ.c,nLoadedStores:139})};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e$,{children:(0,n.jsxs)(eY,{children:[(0,n.jsx)(eK,{className:"page-title",children:"Mon magasin"}),s?p?(0,n.jsxs)(e0,{children:[(0,n.jsxs)(e1,{children:[(0,n.jsxs)(e4,{children:["Saint Maclou ",p.label]}),(0,n.jsx)(e6,{onClick:g,children:"Changer de magasin"}),d&&(0,n.jsx)(e7,{children:(0,n.jsx)(eG.V,{store:d,hasDot:!1,hasColorText:!0})}),(0,n.jsxs)(e8,{children:[(0,n.jsxs)(e5,{children:[(0,n.jsx)(e9,{children:"Informations pratiques"}),(0,n.jsxs)(te,{children:[s.address,(0,n.jsx)("br",{}),"".concat(s.city," ").concat(s.zipcode),(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:"tel:".concat(f),children:f}),(0,n.jsx)("br",{}),(0,n.jsx)(x.m,{title:"Trouver itin\xe9raire",href:"https://www.google.com/maps/dir/?api=1&destination=".concat(s.lat,",").concat(s.long,"&travelmode=driving&destination_place_id=").concat(s.google_place_id),target:"_blank",className:"link marg-bot-10 marg-top-20",color:l.Jy.ocher,children:(0,n.jsx)("span",{children:"Itin\xe9raire"})}),(0,n.jsx)(ez.z,{text:"Prendre RDV",url:"/appointment-scheduling",target:"_blank",theme:"primaryRefonte",trackOrigin:!0,children:(0,n.jsx)(eE.default,{}),border:!1,align:"left"}),(0,n.jsx)(x.m,{title:"Contacter notre \xe9quipe",href:ey.dE.contactConseiller,target:"_blank",className:"link marg-top-20",color:l.Jy.ocher,children:(0,n.jsx)("span",{children:"Contacter notre \xe9quipe"})})]})]}),(0,n.jsxs)(e5,{children:[(0,n.jsx)(e9,{children:"Horaires"}),(0,n.jsxs)(te,{children:[s.open_hours&&(0,n.jsx)(tt,{children:(0,n.jsx)(ti,{children:[{index:1,label:"Lundi",data:"monday"},{index:2,label:"Mardi",data:"tuesday"},{index:3,label:"Mercredi",data:"wednesday"},{index:4,label:"Jeudi",data:"thursday"},{index:5,label:"Vendredi",data:"friday"},{index:6,label:"Samedi",data:"saturday"},{index:0,label:"Dimanche",data:"sunday"}].map(e=>{let t;return(0,n.jsxs)(tn,{className:(t=e.index,new Date().getDay()==t?"strong":""),children:[(0,n.jsxs)("span",{children:[e.label," : "]}),(0,n.jsx)("span",{className:"store-hours",dangerouslySetInnerHTML:{__html:(e=>0==e.length?"Ferm\xe9":(e.length>1?e.join("<br />"):e[0]).replace(/-/g," - ").replace(/:/g,"h"))(s.open_hours[e.data])}})]},e.index)})})}),!(0,I.x7)(s)&&s.specific_hours&&(s.specific_hours.close.length>0||s.specific_hours.open.length>0)&&(0,n.jsxs)(ta,{children:[s.specific_hours.open.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("strong",{children:"Ouverture exceptionnelle"}),(0,n.jsx)("br",{}),s.specific_hours.open.map(e=>"Du ".concat(e.starts_at," au ").concat(e.ends_at," : ").concat(e.open_hours.map(e=>e))),(0,n.jsx)("br",{}),"-",(0,n.jsx)("br",{})]}),s.specific_hours.close.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("strong",{children:"Fermeture exceptionnelle"}),(0,n.jsx)("br",{}),s.specific_hours.close.map(e=>"Du ".concat(e.starts_at," au ").concat(e.ends_at))]})]})]})]})]})]}),(0,n.jsx)(e2,{children:(0,n.jsx)(e3,{id:"store-locator"})})]}):(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(e6,{onClick:g,children:"Trouver mon magasin le plus proche"})]})})})});var ts=i(54642);let to=(0,j.un)(v.eF,(e,t)=>{let{loading:i,error:n,value:a}=e;if(i)return void t({loading:i});n&&t({loading:!1,error:n});let r=null==a?void 0:a.ProchainRdv;if(!r)return void t({loading:!1,value:null});let s=!1;return new k.CQ().getStoreNameById(null==a?void 0:a.ProchainRdv.magasin_id).then(e=>{s||t({loading:!1,value:{...r,magasin_nom:e}}
1)}).catch(e=>{s||(console.error("Failed to get appointment store name",e),t({loading:!1,value:{...r,magasin_nom:"Magasin inconnu"}}))}),()=>{s=!0}});var tl=i(2376),td=i(24356);let tc=o.default.div.withConfig({componentId:"sc-bdba176f-0"})(["span{display:block;white-space:break-spaces;&:first-of-type{font-weight:bold;}&:last-of-type{font-style:italic;}}a{text-decoration:underline;font-family:",";margin-top:20px;}.store-open-hour{margin-top:20px;}"],l.vX.NunitoSansBold),tp=o.default.a.withConfig({componentId:"sc-bdba176f-1"})(["cursor:pointer;text-decoration:underline;color:",";font-family:",";"],l.Jy.ocher,l.vX.NunitoSansBold),tu=e=>{let{myStoreData:t}=e,{showSearchShopModal:i}=(0,eQ.hS)(),a=e=>{e&&(0,ts.q5)(e)};if(!t)return(0,n.jsx)(tp,{onClick:e=>{e.preventDefault(),i({onSelectStore:a,ResultComponent:eZ.c,nLoadedStores:139})},children:"Trouver mon magasin le plus proche"});{let e=(0,I.n4)(t.phone);return(0,n.jsxs)(tc,{className:"dashboard-store-description",children:[(0,n.jsx)("span",{children:t.label}),(0,n.jsx)("span",{children:t.address}),(0,n.jsxs)("span",{children:[t.zipcode," ",t.city]}),(0,n.jsx)("span",{children:e}),t.isOpen?(0,n.jsxs)("span",{className:"store-open-hour",children:["Ouvert jusqu'\xe0 ",t.endOpen]}):(0,n.jsxs)("span",{className:"store-open-hour",children:["Actuellement ferm\xe9,"," ",(0,n.jsx)("span",{children:t.isOnPause?"Ouvre \xe0 ".concat(t.nextOpen):"Ouvre le ".concat(t.nextOpenDay," \xe0 ").concat(t.nextOpen)})]}),(0,n.jsx)(x.m,{href:ey.dE.contactConseiller,title:"",color:l.Jy.ocher,children:"Contacter notre \xe9quipe"})]})}},tm=o.default.svg.withConfig({componentId:"sc-6377fe7b-0"})(["display:block;margin:0;max-width:100%;.svg-circle-bg{fill:none;}.svg-circle{fill:none;-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;}.svg-circle-text{font-size:16px;text-anchor:middle;fill:black;font-weight:bold;}"]),th=e=>{let{size:t=64,progress:i=0,strokeWidth:a=7,circleOneStroke:r="#E9EAED",circleTwoStroke:s="#46DBA9"}=e,o=t/2,l=t/2-a/2,d=2*Math.PI*l;return(0,n.jsxs)(tm,{width:t,height:t,children:[(0,n.jsx)("circle",{className:"svg-circle-bg",stroke:r,cx:o,cy:o,r:l,strokeWidth:a}),(0,n.jsx)("circle",{className:"svg-circle",stroke:s,cx:o,cy:o,r:l,style:{transition:"stroke-dashoffset 850ms ease-in-out"},strokeWidth:a,strokeDasharray:d,strokeDashoffset:(100-i)/100*d}),(0,n.jsxs)("text",{x:"".concat(o),y:"".concat(o+6),className:"svg-circle-text",children:[i,"%"]})]})};var tx=i(96456),tf=i.n(tx),tg=i(89323);let tb=o.default.div.withConfig({componentId:"sc-d83a2de8-0"})([""]),tv=o.default.div.withConfig({componentId:"sc-d83a2de8-1"})(["a{text-decoration:underline;font-family:",";}"],l.vX.NunitoSansBold),ty=o.default.div.withConfig({componentId:"sc-d83a2de8-2"})(["text-align:left;"]),tj=o.default.p.withConfig({componentId:"sc-d83a2de8-3"})(["margin:0;&:not(:last-of-type){margin-bottom:5px;}b{font-family:",";font-weight:initial;}"],l.vX.NunitoSansBold),tw=o.default.div.withConfig({componentId:"sc-d83a2de8-4"})(["margin-top:12px;a{font-family:",";color:",";text-decoration:underline;}"],l.vX.NunitoSansBold,l.Jy.ocher),tC=e=>{let{order:t,isLoading:i}=e,a=!!(null==t?void 0:t.tsmFormattedOrderNumber)&&(null==t?void 0:t.tsmFormattedOrderNumber)!=="-",r=t&&a&&t.shippingMode&&t.shippingMode!==tg.Mg.RETRAIT_MAGASIN;return(0,n.jsx)(tb,{children:i?(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}):t?(0,n.jsxs)(ty,{children:[(0,n.jsxs)(tj,{children:[(0,n.jsx)("b",{children:"Date de commande\xa0:"})," ",t.dateFormatted]}),a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(tj,{children:[(0,n.jsx)("b",{children:"Num\xe9ro de commande\xa0:"})," ",t.tsmFormattedOrderNumber]}),r&&(0,n.jsxs)(tj,{children:[(0,n.jsx)("b",{children:"Statut d'exp\xe9dition\xa0:"})," ",(0,n.jsx)(x.m,{href:"".concat(ey.dE.suiviCommande,"/").concat(t.tsmFormattedOrderNumber),children:"Suivre ma commande"})]})]}),(0,n.jsxs)(tj,{children:[(0,n.jsx)("b",{children:"Montant TTC\xa0:"})," ",t.totalTTCPrice.formatted," â¬"]}),t.fromWeb&&(0,n.jsx)(tw,{children:(0,n.jsx)(tf(),{href:{pathname:ey.dE.epOrders,query:{id:t.id}},children:"Voir le d\xe9tail"})})]}):(0,n.jsxs)(tv,{children:["Vous nâavez pas de commande en cours, pas de panique pour d\xe9couvrir tous nos produits"," ",(0,n.jsx)(x.m,{href:ey.dE.boutiqueVenteEnLigne,title:"",color:l.Jy.ocher,children:"câest par ici\xa0!"})]})})};var tN=i(14949);let t_=o.default.div.withConfig({componentId:"sc-eab33dbf-0"})(["width:100%;display:flex;justify-content:space-around;@media ","{margin:25px 0 0 0;}.ep-dashboard{width:100%;display:grid;grid-template-columns:repeat(3,1fr);grid-column-gap:30px;grid-row-gap:30px;@media ","{grid-template-columns:repeat(1,1fr);grid-column-gap:20px;grid-row-gap:20px;margin:0;}}.favorite-products{a{text-decoration:underline;font-family:",";}}.appointment-line-info{text-align:left;font-size:16px;letter-spacing:0;line-height:22px;margin-bottom:5px;.line-info-heading{font-family:",";}}"],l.uk.tablet,l.uk.tablet,l.vX.NunitoSansBold,l.vX.NunitoSansBold);var tk=i(81402),tS=i(57056),tI=i(86309);let tA=o.default.div.withConfig({componentId:"sc-decf0313-0"})(["width:100%;position:relative;form{display:flex;justify-content:space-around;flex-direction:column;align-items:flex-start;@media ","{flex-direction:column;align-items:center;}}.ep-InfosPersos--form{max-width:385px;width:100%;overflow:hidden;@media ","{max-width:none;}&.error{max-width:unset;}h2{font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";text-transform:uppercase;}.ep-InfosPersos--form-header{text-align:center;color:",";position:relative;margin-top:1.5rem;background-color:",";.ep-InfosPersos--form-header--information{padding:1.25rem 0 3rem;margin:0 auto 2rem;max-width:290px;@media ","{padding:1.5rem 1.25rem;}a{font-family:",";color:",";margin-top:0.5rem;}hr{margin:2rem 0;color:",";}& > div{margin:0.3rem 0;}}}.required{color:",";font-size:0.75rem;em{color:",";}}.ep-InfosPersos--error{text-align:center;font-size:0.875rem;margin:0.3125rem 0;color:",";}.ep-InfosPersos--button{margin:1.5rem 0 4.5rem;}}.hide-desktop{display:none;@media ","{display:block;}}.hide-mobile{@media ","{display:none;}}.modal-content{margin:0;.ep-InfosPersos--popin{width:700px;margin:-1rem 0 0.5rem;h3{margin:0;}@media ","{width:100%;margin:0;}}}.enable-input-button{text-decoration:underline;font-size:16px;letter-spacing:0;line-height:22px;margin-top:36px;cursor:pointer;display:inline-block;}.input-group-title{color:",";font-family:",";font-size:18px;font-weight:bold;letter-spacing:0;line-height:24px;}.textfield{width:100%;font-family:",";.disabled{display:inline;background-color:",";border:none;}}.field-info-container{margin:6px 0;.field-value{float:right;}}.pass-section-form{a{text-decoration:underline;}}.section-form{margin-bottom:56px;}label{font-family:",";em{color:",";font-style:normal;}}.help-info-required{position:absolute;font-size:10px;right:30px;}"],l.uk.tablet,l.uk.tablet,l.vX.Glendale,l.Jy.darkblue,l.Jy.charcoal,l.Jy.whiteSmoke,l.uk.tablet,l.vX.NunitoSansExtraBold,l.Jy.yellowSea,l.Jy.darkgrey,l.Jy.dimGray,l.Jy.yellowSea,l.Jy.persianRed,l.uk.tablet,l.uk.tablet,l.uk.tablet,l.Jy.black,l.vX.NunitoSansRegular,l.vX.NunitoSansRegular,l.Jy.white,l.vX.NunitoSansRegular,l.Jy.black),tE=[];class tT extends a.Component{componentDidMount(){tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"informations personnelles"}),this.unsubscribeUserInfo=v.eF.subscribe(e=>{if(!0===e.loading)return void this.setState({fetchInitData:!0});if(e.error)return void this.setState({fetchInitError:!0});let t=e.value;if(!t)return;let i=this.state.gender;
1i.color=l.Jy.black,t.CiviliteId&&(i.value="MME"==t.CiviliteId?"Mme":t.CiviliteId);let n=this.state.lastname;t.Nom&&(n.value=t.Nom[0]+t.Nom.slice(1).toLowerCase());let a=this.state.firstname;t.Prenom&&(a.value=t.Prenom[0]+t.Prenom.slice(1).toLowerCase());let r=this.state.phone;t.TelephoneMobile&&(r.value=t.TelephoneMobile);let s=this.state.address;t.Adresse&&t.Adresse.AdressePostaleLigne1&&(s.value=t.Adresse.AdressePostaleLigne1);let o=this.state.city;t.Adresse&&t.Adresse.AdressePostaleVille&&"NONE"!=t.Adresse.AdressePostaleVille&&(o.value=t.Adresse.AdressePostaleVille);let d=this.state.zipcode;t.Adresse&&t.Adresse.AdressePostaleCodePostal&&(d.value=t.Adresse.AdressePostaleCodePostal);let c=this.state.email;t.AdresseEmail&&(c.value=t.AdresseEmail);let p=this.state.optinEmail;p.value=t.AdresseEmailOptIn?"1":"0";let u=this.state.optinSms;u.value=t.TelephoneMobileOptIn?"1":"0";let m=this.state.userKind;m.color=l.Jy.black,m.theme="",m.children.map(e=>{e.iconColorOn=l.Jy.black,e.iconColorOff=l.Jy.black}),m.value=t.TypeClientId,"2"==m.value&&this.setState({userIsProfessional:!0});let h=this.state.siret;h.value=t.SIRET,h.placeholder="XXX XXX XXX XXXXX";let x=this.state.society;x.value=t.RaisonSociale,this.setState({fetchInitData:!1,fetchInitError:!1,gender:i,lastname:n,firstname:a,phone:r,address:s,city:o,zipcode:d,email:c,optinEmail:p,optinSms:u,userKind:m,siret:h,society:x})})}componentWillUnmount(){this.unsubscribeUserInfo&&this.unsubscribeUserInfo()}render(){let{gender:e,lastname:t,firstname:i,phone:a,email:r,formValid:s,formEmailError:o,formCoordError:d,fetchInitData:c,fetchInitError:u,connexionInputDisabled:m,coordInputDisabled:h,siret:f,society:g,userKind:b,isCoordLoading:v,isEmailLoa
1ding:y}=this.state;return(0,n.jsxs)(tA,{children:[c?(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}):(0,n.jsx)(n.Fragment,{children:u?(0,n.jsx)("div",{className:"ep-InfosPersos--form error",children:(0,n.jsx)("h2",{children:"Mon profil"})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"ep-InfosPersos--form",children:[(0,n.jsx)("h2",{children:"Mon profil"}),(0,n.jsxs)("div",{className:"email-section-form section-form",children:[!m&&(0,n.jsx)("span",{className:"help-info-required",children:"* Champs obligatoires"}),(0,n.jsx)("p",{className:"input-group-title",children:"Identifiant de connexion"}),m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:r.labelText}),(0,n.jsx)("span",{className:"field-value",children:r.value})]}),(0,n.jsx)("p",{className:"enable-input-button",onClick:()=>{this.toggleEmailForm()},children:"Modifier mon e-mail"})]}):(0,n.jsxs)("form",{onSubmit:this.handleEmailSubmit,noValidate:!0,id:"contactForm",method:"post",children:[(0,n.jsx)(tk.A,{data:r,onBlur:e=>this.handleCheckField(e),updateMode:!1,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0}),o&&(0,n.jsx)("p",{className:"ep-InfosPersos--error",children:eR.IW.GLOBAL}),(0,n.jsx)(ez.$,{isOnBgColor:!0,theme:"primaryRefonte",fullWidth:!1,text:"Sauvegarder mon email",style:{textAlign:"left"},buttonStyle:{fontSize:"16px"},type:"submit",isLoading:y})]})]}),(0,n.jsxs)("div",{className:"pass-section-form section-form",children:[(0,n.jsx)("p",{className:"input-group-title",children:"Mot de passe"}),(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:"Mot de passe"}),(0,n.jsx)("span",{className:"field-value",children:"**********"})]}),(0,n.jsx)(x.m,{href:ey.dE.epResetPassword,className:"enable-input-button",children:(0,n.jsx)("span",{children:"Changer mon mot de passe"})})]}),(0,n.jsxs)("div",{className:"coord-section-form section-form",children:[!h&&(0,n.jsx)("span",{className:"help-info-required",children:"* Champs obligatoire"}),(0,n.jsx)("p",{className:"input-group-title",children:"Coordonn\xe9es"}),h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:e.labelText}),(0,n.jsx)("span",{className:"field-value",children:e.value})]}),(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:t.labelText}),(0,n.jsx)("span",{className:"field-value",children:t.value})]}),(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:i.labelText}),(0,n.jsx)("span",{className:"field-value",children:i.value})]}),(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:a.labelText}),(0,n.jsx)("span",{className:"field-value",children:(0,I.n4)(a.value)})]}),this.state.userIsProfessional&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:f.labelText}),(0,n.jsx)("span",{className:"field-value",children:f.value})]}),(0,n.jsxs)("p",{className:"field-info-container",children:[(0,n.jsx)("span",{children:g.labelText}),(0,n.jsx)("span",{className:"field-value",children:g.value})]})]}),(0,n.jsx)("p",{className:"enable-input-button",onClick:()=>{let e=this.state.gender,t=e.children.map(e=>({...e,isDisabled:!1}));e.children=t,this.toggleCoordForm(),this.setState({gender:e})},children:"Modifier mes coordonn\xe9es"})]}):(0,n.jsxs)("form",{onSubmit:this.handleCoordSubmit,noValidate:!0,id:"contactForm",method:"post",children:[(0,n.jsx)(tS.m,{data:b,onChange:e=>this.handleCheckField(e)}),this.state.userIsProfessional&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tk.A,{data:f,onBlur:e=>this.handleCheckField(e),updateMode:!1,disable:h,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0}),(0,n.jsx)(tk.A,{data:g,onBlur:e=>this.handleCheckField(e),updateMode:!1,disable:h,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0})]}),(0,n.jsx)(tS.m,{data:e}),(0,n.jsx)(tk.A,{data:t,onBlur:e=>this.handleCheckField(e),updateMode:!1,disable:h,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0}),(0,n.jsx)(tk.A,{data:i,onBlur:e=>this.handleCheckField(e),updateMode:!1,disable:h,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0}),(0,n.jsx)(tk.A,{data:a,onBlur:e=>this.handleCheckField(e),updateMode:!1,disable:h,colorLabel:l.Jy.black,requiredLabelColor:l.Jy.black,colorText:l.Jy.black,hidePictoError:!0}),d&&(0,n.jsx)("p",{className:"ep-InfosPersos--error",children:eR.IW.GLOBAL}),(0,n.jsx)(ez.$,{isOnBgColor:!0,theme:"primaryRefonte",fullWidth:!1,text:"Sauvegarder mes coordonn\xe9es",onClick:()=>{},style:{textAlign:"left"},buttonStyle:{fontSize:"16px"},type:"submit",isLoading:v})]})]})]})})}),(0,n.jsx)(p.E,{id:"confirmation",visible:s&&!o&&!d,onClose:()=>{this.setState({formValid:!1})},center:!0,children:(0,n.jsxs)("div",{className:"ep-InfosPersos--popin",children:[(0,n.jsx)("h2",{children:"Merci !"}),(0,n.jsx)("p",{children:"Vos modifications ont bien \xe9t\xe9 enregistr\xe9es"})]})})]})}constructor(e){super(e),this.fields=(0,eD.DS)(),this.toggleCoordForm=()=>{this.setState({coordInputDisabled:!this.state.coordInputDisabled})},this.toggleEmailForm=()=>{this.setState({connexionInputDisabled:!this.state.connexionInputDisabled}),this.setState({emailFormUpdated:!1})},this.handleCoordSubmit=e=>{e.preventDefault();let t=this.state.siret.value.replace(/\D/g,""),{isValid:i,formValues:n}=(0,eD.BT)(e.currentTarget.elements,this.state),a=this;if(this.setState({addressesError:!1}),i){this.setState({isCoordLoading:!0}),(0,I.iw)("Connaissance client","Modification information client",this.state.arrTrackingField.join());let e=new W.oz,r=this.props.userContext;if(r&&r.islogged){let s={ClientId:r.clientId,CiviliteId:n.gender.value,Nom:n.lastname.value,Prenom:n.firstname.value,TelephoneMobile:n.phone.value,SIRET:"2"!=n.userKind.value?"":t,RaisonSociale:"2"!=n.userKind.value?"":n.society.value,TypeClientId:n.userKind.value};e.SetHomeUser(s,r.tokenSession).then(e=>{this.toggleCoordForm();let t=this.state.gender,r=t.children.map(e=>({...e,isDisabled:!0}));t.children=r,a.setState({...n,isCoordLoading:!1,formValid:i,formCoordError:"200"!=e.Status})}).catch(e=>{console.error("Failed to save coords",e)})}else this.props.goToSection(eg.LOGIN)}else this.setState({...n,formValid:i})},this.handleEmailSubmit=e=>{e.preventDefault();let{isValid:t,formValues:i}=(0,eD.BT)(e.currentTarget.elements,this.state);if(!this.state.emailFormUpdated)return void this.toggleEmailForm();let n=this;
1if(t){this.setState({isEmailLoading:!0}),(0,I.iw)("Connaissance client","Modification information client",this.state.arrTrackingField.join());let e=new W.oz,a=this.props.userContext;if(a&&a.islogged){let r={ClientId:a.clientId,AdresseEmail:i.email.value};e.SetHomeUser(r,a.tokenSession).then(e=>{this.toggleEmailForm(),n.setState({...i,isEmailLoading:!1,formValid:t,formEmailError:"200"!=e.Status})}).catch(e=>{console.error("Failed to change user email",e)})}else this.props.goToSection(eg.LOGIN)}else this.setState({...i,formValid:t})},this.activeButtonForm=()=>{this.state.formUpdated||this.setState({formUpdated:!0})},this.setRequiredAddressFields=e=>{this.setState(t=>({city:{...t.city,required:e},zipcode:{...t.zipcode,required:e},address:{...t.address,required:e}}))},this.handleCheckField=e=>{switch(e.currentTarget.id){case"address":case"city":case"zipcode":this.setRequiredAddressFields(""!==e.currentTarget.value)}if("userKind"==e.currentTarget.name){let t="2"==e.currentTarget.value;this.setState({userIsProfessional:t})}"email"==e.currentTarget.name&&e.currentTarget.value!=this.state.email.value&&this.setState({emailFormUpdated:!0});let t=(0,eD.BT)([e.currentTarget],this.state);this.setState({...t.formValues,formUpdated:!0}),t.isValid&&(tE.push(e.currentTarget.id),this.setState({arrTrackingField:tE}))},this.toggleCheckbox=e=>{let t=e.checked,i=e.id,n={};Object.assign(n,{[i]:this.state[i]}),n[i].value=t?"1":"0",this.setState({...n,formUpdated:!0}),"optinEmail"===i&&(t?(0,I.iw)("Connaissance client","Opt-in","newsletter_activaction"):(0,I.iw)("Connaissance client","Opt-in","newsletter_desactivation")),"optinSms"===i&&(t?(0,I.iw)("Connaissance client","Opt-in","sms_activaction"):(0,I.iw)("Connaissance client","Opt-in","sms_desactivation"))},this.state={gender:this.fields.gender,lastname:this.fields.lastname,firstname:this.fields.firstname,phone:this.fields.phone,email:this.fields.email,address:this.fields.address,city:this.fields.city,zipcode:this.fields.zipcode,optinEmail:this.fields.optinEmail,optinSms:this.fields.optinSms,formValid:!1,formEmailError:!1,formCoordError:!1,formUpdated:!1,fetchInitData:!0,isEmailLoading:!1,isCoordLoading:!1,fetchInitError:!1,arrTrackingField:[],addressesError:!1,connexionInputDisabled:!0,coordInputDisabled:!0,userIsProfessional:!1,siret:this.fields.siret,society:this.fields.society,userKind:this.fields.userKind,emailFormUpdated:!1},this.handleCoordSubmit=this.handleCoordSubmit.bind(this),this.handleEmailSubmit=this.handleEmailSubmit.bind(this)}}let tz=(0,h.ID)(tT);var tL=i(91742),tP=i(84446);let tO=o.default.div.withConfig({componentId:"sc-d0174e66-0"})(["margin:1rem 0 0;@media ","{margin:1rem 0 80px;}width:100%;@media ","{margin:1rem 0 80px;}.ep-Family--form{overflow:hidden;font-family:",";color:",";h2{font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";}.ep-Family--form--field{max-width:400px;@media ","{max-width:none;}}.ep-Family--form-header{color:",";position:relative;margin-top:1.5rem;background-color:",";.ep-Family--form-header--information{padding:1.25rem 0 3rem;margin:0 auto 2rem;max-width:290px;@media ","{padding:1.5rem 1.25rem;}a{font-family:",";color:",";margin-top:0.5rem;}hr{margin:2rem 0;color:",";}& > div{margin:0.3rem 0;}}}.required{color:",";font-size:0.75rem;em{color:",";}}.ep-Family--error{text-align:center;font-size:0.875rem;margin:1.5rem 0 0.3125rem;color:",";}.ep-Family--button{margin:3rem 0 3rem;div{text-align:left;}}.advertising-text{font-size:14px;color:",";line-height:19px;a{text-decoration:underline;}}}.hide-desktop{display:none;@media ","{display:block;}}.hide-mobile{@media ","{display:none;}}.modal-content{margin:0;.ep-Family--popin{width:700px;margin:-1rem 0 0.5rem;h3{margin:0;}@media ","{width:100%;margin:0;}}}.cell-member{padding-top:0.25rem;&:first-child{padding-top:0rem;}}.cell-separator{margin-top:50px;margin-bottom:40px;color:",";}.selection{z-index:8;text-align:left;padding:0 10px;}.option{text-align:left;}label{color:",";em{font-style:normal;color:",";}}.selection{height:51px;}"],l.uk.tablet,l.uk.tablet,l.vX.NunitoSansRegular,l.Jy.black,l.vX.Glendale,l.Jy.darkblue,l.uk.tablet,l.Jy.charcoal,l.Jy.whiteSmoke,l.uk.tablet,l.vX.NunitoSansExtraBold,l.Jy.yellowSea,l.Jy.darkgrey,l.Jy.dimGray,l.Jy.yellowSea,l.Jy.persianRed,l.Jy.black,l.uk.tablet,l.uk.tablet,l.uk.tablet,l.Jy.darkgrey,l.Jy.black,l.Jy.black);class tR extends a.Component{componentDidMount(){tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mon foyer"}),this.unsubscribeUserInfo=v.eF.subscribe(e=>{var t,i,n;if(!0===e.loading)return void this.setState({fetchInitData:!0});if(e.error)return void this.setState({fetchInitError:!0});let a=null==(n=e.value)||null==(i=n.sections)||null==(t=i.famille)?void 0:t.Famille;if(!a)return;let r=this.state.nbAdults;a.NombreAdultes&&""!=a.NombreAdultes&&(r.value=a.NombreAdultes,a.Adultes.length>Number.parseInt(r.value)&&(a.Adultes=a.Adultes.slice(a.Adultes.length-Number.parseInt(r.value),a.Adultes.length)),this.createDynamicFields(Number.parseInt(a.NombreAdultes),"Adult",a.Adultes));let s=this.state.nbChilds;a.NombreEnfants&&""!=a.NombreEnfants&&(s.value=a.NombreEnfants,a.Enfants.length>Number.parseInt(s.value)&&(a.Enfants=a.Enfants.slice(a.Enfants.length-Number.parseInt(s.value),a.Enfants.length)),this.createDynamicFields(Number.parseInt(a.NombreEnfants),"Child",a.Enfants)),this.setState({fetchInitData:!1,nbAdults:r,nbChilds:s})})}componentWillUnmount(){this.unsubscribeUserInfo&&this.unsubscribeUserInfo()}render(){let{nbAdults:e,nbChilds:t,arrayAgeChilds:i,arrayAgeAdults:a,formValid:r,formError:s,nbMemberError:o,fetchInitData:d,fetchInitError:c}=this.state;return(0,n.jsxs)(tO,{children:[(0,n.jsx)("form",{onSubmit:this.handleSubmit,noValidate:!0,id:"contactForm",method:"post",children:(0,n.jsxs)("div",{className:"ep-Family--form",children:[(0,n.jsx)("h2",{children:"MA FAMILLE ET MON FOYER"}),(0,n.jsx)("span",{children:"Afin de vous proposer une exp\xe9rience toujours plus personnalis\xe9e dites-nous en plus sur votre foyer.*"}),d&&(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}),c&&(0,n.jsx)("div",{className:"ep-Family--form--field",children:(0,n.jsx)("p",{className:"ep-Family--error",children:eR.IW.GLOBAL})}),!c&&!d&&(0,n.jsxs)("div",{className:"ep-Family--form--field",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"cell-group",children:[(0,n.jsx)(tP._,{data:e,onChange:this.handleCheckField,min:0,max:8,maxLength:2,colorText:l.Jy.black}),a.map((e,t)=>(0,n.jsxs)("div",{className:"cell-member",children:[(0,n.jsx)(tS.m,{data:this.state[e[0]],mainLabelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black}}),(0,n.jsx)(tL.A,{data:this.state[e[1]],fullWidth:!1,roundedBorder:!1,borderColor:l.Jy.grisWhite,optionTextColor:l.Jy.black}),(0,n.jsx)("input",{type:"hidden",id:this.state[e[2]].id,name:this.state[e[2]].id,defaultValue:this.state[e[2]].value})]},t))]}),(0,n.jsxs)("div",{className:"cell-group",children:[(0,n.jsx)(tP._,{data:t,onChange:e=>this.handleCheckField(e),min:0,max:8,colorText:l.Jy.black}),i.map((e,t)=>(0,n.jsxs)("div",{className:"cell-member",children:[(0,n.jsx)(tS.m,{data:this.state[e[0]],mainLabelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black}}),(0,n.jsx)(tL.A,{data:this.state[e[1]],fullWidth:!1,roundedBorder:!1,borderColor:l.Jy.grisWhite,optionTextColor:l.Jy.black}),(0,n.jsx)("input",{type:"hidden",id:this.state[e[2]].id,name:this.state[e[2]].id,defaultValue:this.state[e[2]].value})]},t))]})]}),s&&(0,n.jsx)("p",{className:"ep-Family--error",children:eR.IW.GLOBAL}),o&&(0,n.jsx)("p",{className:"ep-Family--error",children:"Vous devez indiquer 1 adulte au minimum."}),(0,n.jsx)("div",{className:"ep-Family--button",children:(0,n.jsx)(ez.$,{isLoading:this.state.isLoading,type:"submit",text:"Enregistrer",theme:"primaryRefonte",color:l.Jy.blueDark,buttonStyle:{minWidth:"200px"}})}),(0,n.jsxs)("span",{className:"advertising-text",children:["* Rendez-vous sur notre"," ",(0,n.jsx)(x.m,{href:ey.dE.epGeneralDataProtectionPolicy,children:"Politique de confidentialit\xe9"})]})]})]})}),(0,n.jsx)(p.E,{id:"confirmation",visible:r&&!s&&!o,onClose:()=>{this.setState({formValid:!1})},children:(0,n.jsxs)("div",{className:"ep-Family--popin",children:[(0,n.jsx)("h2",{children:"Merci !"}),(0,n.jsx)("p",{children:"Vos modifications ont bien \xe9t\xe9 enregistr\xe9es"})]})})]})}constructor(e){var t;super(e),t=this,this.handleSubmit=e=>{e.preventDefault();let{isValid:t,formValues:i}=(0,eD.BT)(e.currentTarget.elements,this.state),n=!1,a=this;this.props.onTokenError;let r=""!=i.nbChilds.value?Number.parseInt(i.nbChilds.value):0,s=""!=i.nbAdults.value?Number.parseInt(i.nbAdults.value):0,o=r+s;if(r>0&&s<1&&(n=!0),t&&!n){(0,I.iw)("Connaissance client","Foyer","nbrPers_".concat(o)),this.setState({isLoading:!0});let e=new W.oz,n=this.props.userContext;if(n&&n.islogged){let r={ClientId:n.clientId,Famille:{NombrePersonnes:o.toString(),NombreEnfants:i.nbChilds.value,Adultes:this.state.arrayAgeAdults.map(e=>({Genre:i[e[0]].value,TrancheAge:i[e[1]].value,EnfantId:i[e[2]].value})),NombreAdultes:i.nbAdults.value,Enfants:this.state.arrayAgeChilds.map(e=>({Genre:i[e[0]].value,TrancheAge:i[e[1]].value,EnfantId:i[e[2]].value}))}};e.SetFamilyUser(r,n.tokenSession).then(e=>{a.setState({...i,isLoading:!1,formValid:t,formError:"200"!=e.Status})}).catch(e=>{console.error("Failed to save family infos",e),a.setState({isLoading:!1,formError:!0})})}}else this.setState({...i,nbMemberError:n,formValid:!n&&t})},this.handleCheckField=e=>{let t=e.currentTarget?e.currentTarget:e;if(("nbChilds"==t.id||"nbAdults"==t.id)&&t.value>100)return;let i=(0,eD.BT)([t],this.state);this.setState({...i.formValues,nbMemberError:!1}),"nbChilds"==t.id?this.createDynamicFields(t.value,"Child"):"nbAdults"==t.id&&this.createDynamicFields(t.value,"Adult")},this.getIndex=e=>{let t=e+1;return 0===e?t+"er":t+"\xe8me"},this.createDynamicFields=function(e,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=[],r={},s="gender".concat(i),o="Child"!=i,l=o?"Adulte":"Enfant",d="age".concat(i),c="id".concat(i),p=0,u=0;for(let m=0;m<e;m++){let e=Object.assign({}
1,"Child"==i?eD.d$.idChild:eD.d$.idAdult);e.id="".concat(c).concat(m),e.value=String(o?++p+2e3:++u+1e3);let h=Object.assign({},"Child"==i?eD.d$.genderChild:eD.d$.genderAdult);h.id="".concat(s).concat(m),h.labelText="".concat(t.getIndex(m)," ").concat(l),n&&n[m]?h.value=n[m].Genre:t.state[h.id]&&(h.value=t.state[h.id].value);let x=Object.assign({},"Child"==i?eD.d$.ageChild:eD.d$.ageAdult);x.id="".concat(d).concat(m),n&&n[m]?x.value=n[m].TrancheAge:t.state[x.id]&&(x.value=t.state[x.id].value),Object.assign(r,{[h.id]:h}),Object.assign(r,{[x.id]:x}),Object.assign(r,{[e.id]:e}),a.push([h.id,x.id,e.id])}"Child"==i?t.setState({...r,arrayAgeChilds:a}):t.setState({...r,arrayAgeAdults:a})},this.state={nbAdults:eD.d$.nbAdults,nbChilds:eD.d$.nbChilds,arrayAgeChilds:[],arrayAgeAdults:[],formValid:!1,formError:!1,nbMemberError:!1,fetchInitData:!0,fetchInitError:!1,isLoading:!1},this.handleSubmit=this.handleSubmit.bind(this)}}let tJ=(0,h.ID)(tR),tM=o.default.div.withConfig({componentId:"sc-a9d86bb5-0"})(["width:100%;@media ","{margin:0;}"],l.uk.tablet),tD=o.default.div.withConfig({componentId:"sc-a9d86bb5-1"})([""]),tF=o.default.h2.withConfig({componentId:"sc-a9d86bb5-2"})(["text-transform:uppercase;font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";@media ","{font-size:22px;line-height:28px;}"],l.vX.Glendale,l.Jy.darkblue,l.uk.tablet),tV=o.default.p.withConfig({componentId:"sc-a9d86bb5-3"})(["margin:0;font-family:",";font-size:14px;line-height:19px;"," b{font-family:",";}"],l.vX.NunitoSansRegular,e=>{let{bigger:t}=e;return t&&(0,o.css)(["font-size:16px;line-height:22px;"])},l.vX.NunitoSansBold),tq=o.default.form.withConfig({componentId:"sc-a9d86bb5-4"})(["margin:40px 0;div{text-align:left;}.checkbox--cell{margin-bottom:30px;label{font-family:",";font-size:14px;line-height:19px;align-items:center;color:",";.info-mail{font-family:",";display:block;}}}"],l.vX.NunitoSansBold,l.Jy.black,l.vX.NunitoSansRegular),tB=o.default.p.withConfig({componentId:"sc-a9d86bb5-5"})(["color:",";"],l.Jy.redVif),tX=(0,h.ID)(e=>{let{userContext:t,onTokenError:i,goToSection:r}=e,s=(0,eD.DS)(),[o,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!0),[m,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)({optinEmail:s.optinEmail,optinSms:s.optinSms}),[b,y]=(0,a.useState)(),[j,w]=(0,a.useState)({formValid:!1,formError:!1,formUpdated:!1}),C=(0,v.Py)();(0,a.useEffect)(()=>{if(C.loading)return void u(!0);if(C.error)return void h(!0);if(!C.value)return void r(eg.LOGIN);y(C.value);let e=f.optinEmail;null!==C.value.AdresseEmail&&(e.labelText='Par e-mail :<span class="info-mail">'.concat(C.value.AdresseEmail,"</span>")),e.value=C.value.AdresseEmailOptIn?"1":"0";let t=f.optinSms;null!==C.value.TelephoneMobile&&(t.labelText="Par sms : au ".concat(C.value.TelephoneMobile)),t.value=C.value.TelephoneMobileOptIn?"1":"0",g({optinEmail:e,optinSms:t}),h(!1),u(!1)},[C]);let N=e=>{let t=e.checked,i=e.id,n=f[i];n.value=t?"1":"0",g(e=>({...e,[i]:n})),w({...j,formUpdated:!0}),"optinEmail"===i?(0,I.iw)("Connaissance client","Opt-in",t?"newsletter_activaction":"newsletter_desactivation"):"optinSms"===i&&(0,I.iw)("Connaissance client","Opt-in",t?"sms_activaction":"sms_desactivation")};return(0,n.jsxs)(tM,{children:[(0,n.jsxs)(tD,{children:[(0,n.jsx)(tF,{className:"page-title",children:"Pr\xe9f\xe9rences de communication"}),m?(0,n.jsx)("p",{children:eR.IW.GLOBAL}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tV,{bigger:!0,children:(0,n.jsx)("b",{children:"Je souhaite \xeatre inform\xe9(e) des actualit\xe9s, des conseils, des meilleures offres et jâaccepte le suivi de mes interactions (ouverture, clics) afin dâadapter la fr\xe9quence des communications et de recevoir des contenus personnalis\xe9s"})}),c?(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}):(0,n.jsxs)(tq,{onSubmit:e=>{e.preventDefault();let{isValid:i,formValues:n}=(0,eD.BT)(e.currentTarget.elements,f);if(i){d(!0);let e=new W.oz;if(t&&t.islogged){let a={ClientId:t.clientId,AdresseEmailOptIn:""!=n.optinEmail.value,TelephoneMobileOptIn:""!=n.optinSms.value};e.SetHomeUser(a,t.tokenSession).then(e=>{d(!1),w({...j,formValid:i,formError:"200"!=e.Status})}).catch(e=>{console.error("Failed to load user informations",e),d(!1),w({...j,formError:!0})})}else r(eg.LOGIN)}else w({...j,formValid:i})},noValidate:!0,id:"contactForm",method:"post",children:[(0,n.jsx)(eF.S,{data:f.optinEmail,checkValue:"1"==f.optinEmail.value,onCheck:e=>N(e),actifColor:l.Jy.blueDark}),(0,n.jsx)(eF.S,{data:f.optinSms,checkValue:"1"==f.optinSms.value,onCheck:e=>N(e),actifColor:l.Jy.blueDark}),(0,n.jsx)(ez.$,{isLoading:o,disabled:!j.formUpdated,type:"submit",text:"Sauvegarder les modifications",theme:"primaryRefonte"}),j.formError&&(0,n.jsx)(tB,{children:eR.IW.GLOBAL})]}),(0,n.jsxs)(tV,{children:[(0,n.jsx)("b",{children:"Veuillez noter que vous pouvez vous d\xe9sinscrire \xe0 tout moment et que vous ne recevrez aucun e-mail non sollicit\xe9."}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Votre adresse de messagerie est uniquement utilis\xe9e pour vous envoyer les lettres d'information de SAINT MACLOU. Vous pouvez \xe0 tout moment utiliser le lien de d\xe9sabonnement int\xe9gr\xe9 dans la newsletter.",(0,n.jsx)("br",{}),(0,n.jsx)(x.m,{href:ey.dE.epGeneralDataProtectionPolicy,title:"En savoir plus sur la gestion de vos donn\xe9es et vos droits.",color:l.Jy.black,children:"En savoir plus sur la gestion de vos donn\xe9es et vos droits."})]})]})]}),(0,n.jsx)(p.E,{id:"confirmation",visible:j.formValid&&!j.formError,onClose:()=>{w({...j,formValid:!1})},width:"700px",children:(0,n.jsxs)("div",{className:"ep-InfosPersos--popin",children:[(0,n.jsx)("h2",{children:"Merci !"}),(0,n.jsx)("p",{children:"Vos modifications ont bien \xe9t\xe9 enregistr\xe9es"})]})})]})});var tH=i(25138),tG=i(34288),tU=i(44970),tW=i(62636),tQ=i(53719),tZ=i(57215),t$=i(21757);let tY=async(e,t)=>{let i=(0,v.wz)().getCurrentToken();return await X(i,e,t)},tK=async(e,t)=>{let i=await tY(e,t);window.open(i,"_blank").focus()},t0=o.default.div.withConfig({componentId:"sc-d890bdbe-0"})(["b{font-family:",";}.title{font-family:",";font-size:20px;color:black;margin-bottom:20px;&--main{font-size:24px;}}.order{&__tracking{margin-bottom:30px;border:0;width:100%;min-height:430px;}&__info{border:1px solid ",";margin-bottom:30px;padding:20px;
1display:flex;justify-content:space-between;align-items:center;&-line{margin:0;line-height:28px;}@media ","{flex-direction:column;align-items:flex-start;row-gap:20px;}}&__image{width:100%;height:100%;object-fit:cover;}&__thumbnail{width:100%;max-width:90px;aspect-ratio:1 / 1;margin-right:12px;}&__empty-thumbnail{margin-right:10px;svg{width:90px;height:90px;background:rgba(237,237,240,1);padding:10px;}}&__action{display:flex;flex-direction:column;row-gap:10px;align-items:center;@media ","{align-items:flex-start;}}&__contact{color:",";text-align:center;span{display:flex;align-items:center;justify-content:center;column-gap:5px;margin-top:8px;}&.mobile{display:none;}@media ","{&.mobile{display:block;}&.desktop{display:none;}}}}"],l.vX.NunitoSansBold,l.vX.NunitoSansBold,l.Jy.fillGrey,l.uk.tablet,l.uk.tablet,l.Jy.blueDark,l.uk.tablet),t1=o.default.a.withConfig({componentId:"sc-d890bdbe-1"})(["margin-bottom:20px;display:flex;align-items:center;color:",";font-family:",";svg{margin-right:2px;}"],l.Jy.blueDark,l.vX.NunitoSansBold),t2=o.default.div.withConfig({componentId:"sc-d890bdbe-2"})(["margin-bottom:30px;"]),t5=o.default.div.withConfig({componentId:"sc-d890bdbe-3"})(["display:flex;justify-content:flex-end;margin-top:20px;"]),t3=o.default.div.withConfig({componentId:"sc-d890bdbe-4"})([""]),t4=o.default.div.withConfig({componentId:"sc-d890bdbe-5"})(["display:flex;padding:20px;border:1px solid ",";margin-top:30px;justify-content:space-between;> *{flex:1;}@media ","{flex-direction:column;padding:0 20px;}"],l.Jy.fillGrey,l.uk.tablet),t6=o.default.table.withConfig({componentId:"sc-d890bdbe-6"})(["border-collapse:collapse;border:1px solid ",";"],l.Jy.fillGrey),t8=o.default.thead.withConfig({componentId:"sc-d890bdbe-7"})(["background:",";@media ","{display:none;}"],l.Jy.fillGrey,l.uk.tablet),t9=o.default.tbody.withConfig({componentId:"sc-d890bdbe-8"})([""]),t7=o.default.tr.withConfig({componentId:"sc-d890bdbe-9"})([""]),ie=o.default.th.withConfig({componentId:"sc-d890bdbe-10"})(["font-size:16px;line-height:22px;font-family:",";padding:9px 15px;border-bottom:1px solid ",";color:",";text-align:left;&:first-of-type{width:40%;padding-left:20px;}&:last-of-type{padding-right:20px;}"],l.vX.NunitoSansBold,l.Jy.fillGrey,l.Jy.blueDark),it=o.default.tr.withConfig({componentId:"sc-d890bdbe-11"})(['position:relative;&:after{content:"";width:100%;height:1px;background:',";}&:not(:last-of-type){border-bottom:1px solid ",";}@media ","{display:block;padding:15px 10px;}"],l.Jy.fillGrey,l.Jy.fillGrey,l.uk.tablet),ii=o.default.td.withConfig({componentId:"sc-d890bdbe-12"})(["padding:15px 15px;text-align:left;&:first-of-type{padding-left:20px;}&.last-of-type{padding-right:20px;}&.quantity{.label{font-size:11px;line-height:15px;display:block;margin-top:5px;@media ","{margin:0 0 0 5px;font-size:14px;}}}&.total,&.price{.price{font-size:20px;line-height:27px;sup{font-size:12px;top:-7px;margin-left:2px;}}.unit{font-size:12px;}}&.price{.rate{display:none;}div{text-align:center;justify-content:center;}}.mobile{display:none;}@media ","{display:flex;align-items:center;border-bottom:none;padding:0;text-align:left;font-size:14px;line-height:20px;margin-bottom:5px;&:first-of-type{padding-left:0;margin-bottom:10px;}&.last-of-type{padding-right:0;}&.quantity,&.total{font-size:inherit;line-height:inherit;}&.price{div:nth-of-type(2){margin-left:5px;}.price__wrapper{.price__total{font-family:",";sup{font-family:",";}}}}&.price,&.total{.price__wrapper{.price__total{font-size:14px;sup{font-size:14px;top:-3px;}}}}&.total{.price__wrapper{.price__total{sup{font-family:",";}}.price__before-discount{font-size:14px;}}}.mobile{display:initial;font-size:14px;line-height:20px;margin-right:10px;}}"],l.uk.tablet,l.uk.tablet,l.vX.NunitoSansRegular,l.vX.NunitoSansRegular,l.vX.NunitoSansBold),ia=o.default.div.withConfig({componentId:"sc-d890bdbe-13"})(["max-width:310px;@media ","{max-width:initial;padding:20px 0;&.recap{order:-1;}}"],l.uk.tablet),ir=o.default.h4.withConfig({componentId:"sc-d890bdbe-14"})(["margin:0 0 10px 0;font-family:",";font-size:16px;line-height:22px;"],l.vX.NunitoSansBold),is=o.default.div.withConfig({componentId:"sc-d890bdbe-15"})([""]),io=o.default.p.withConfig({componentId:"sc-d890bdbe-16"})(["margin:0;.uppercase{text-transform:uppercase;}.right{float:right;}"]),il=o.default.p.withConfig({componentId:"sc-d890bdbe-17"})(["margin:30px 0 0 0;color:",";font-family:",";font-size:18px;line-height:24px;@media ","{margin:20px 0 0 0;}.right{float:right;}"],l.Jy.ocher,l.vX.NunitoSansBold,l.uk.tablet),id=o.default.a.withConfig({componentId:"sc-d890bdbe-18"})(["font-size:16px;line-height:22px;&:hover{text-decoration:underline;}@media ","{font-size:14px;}"],l.uk.tablet),ic=o.default.div.withConfig({componentId:"sc-d890bdbe-19"})(["font-size:16px;line-height:22px;.sub-text{font-size:13px;color:",";}@media ","{font-size:14px;.sub-text{font-size:12px;}}"],l.Jy.redClassic,l.uk.tablet),ip=o.default.div.withConfig({componentId:"sc-d890bdbe-20"})(["display:flex;align-items:center;&.center{justify-content:center;}"]),iu=o.default.div.withConfig({componentId:"sc-d890bdbe-21"})([""]),im=o.default.div.withConfig({componentId:"sc-d890bdbe-22"})(["font-size:14px;margin-top:5px;"]),ih=e=>{var t,i,r,o,d,c,p,u,m,h,f,g,v,w,N,_,k,S,A,E,T,z,L,P;let{orderId:O,fromWeb:R}=e,{loading:J,error:M,data:D}=(K.set(O),ee.set(R),(0,j.Pj)(ei)),F=ec();(0,a.useEffect)(()=>{tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"ma commande en d\xe9tail"})},[]);let V=D&&(R&&D.shippingMode&&D.shippingMode!==tg.Mg.RETRAIT_MAGASIN||!R)&&D.tsmFormattedOrderNumber&&"-"!==D.tsmFormattedOrderNumber;return(0,n.jsx)(n.Fragment,{children:J||!D?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eJ.Ay,{})}):M?(0,n.jsx)(n.Fragment,{children:"Une erreur est survenue lors du chargement du d\xe9tail de votre commande"}):(0,n.jsxs)(t0,{children:[(0,n.jsx)(tf(),{href:ey.dE.epOrders,passHref:!0,legacyBehavior:!0,children:(0,n.jsxs)(t1,{
1children:[(0,n.jsx)(tH.default,{width:14}),(0,n.jsx)("span",{children:"Toutes mes commandes"})]})}),(0,n.jsxs)("div",{className:"title title--main",children:["D\xe9tail de la commande N\xb0",D.tsmFormattedOrderNumber]}),(0,n.jsxs)(t2,{children:[(0,n.jsxs)("div",{className:"order__info",children:[(0,n.jsxs)("div",{className:"order__info-wording",children:[(0,n.jsxs)("p",{className:"order__info-line",children:[(0,n.jsx)("b",{children:"Date de commande :"})," ",D.dateFormatted]}),(0,n.jsxs)("p",{className:"order__info-line",children:[(0,n.jsx)("b",{children:"Type de commande :"})," ",D.fromWeb?"web":"magasin"]}),D.shippingMode&&(0,n.jsxs)("p",{className:"order__info-line",children:[(0,n.jsx)("b",{children:"Mode de livraison :"})," ",C[D.shippingMode]]}),D.pickupStore&&(0,n.jsxs)("p",{className:"order__info-line",children:[(0,n.jsx)("b",{children:"Mon magasin :"})," ",(0,n.jsxs)(x.m,{href:D.pickupStore.url,children:["Saint-Maclou ",D.pickupStore.label]})]})]}),(D.documents.invoice||D.documents.purchase||b.tf)&&(0,n.jsxs)("div",{className:"order__action",children:[D.documents.invoice&&(0,n.jsx)(ez.$,{onClick:()=>tK(D.documents.invoice,U.INVOICE),text:"Consulter la facture",theme:"secondaryRefonte",fullWidth:!0,border:!0}),D.documents.purchase&&(0,n.jsx)(ez.$,{onClick:()=>tK(D.documents.purchase,U.ORDER),text:"Consulter le bon de commande",theme:"secondaryRefonte",fullWidth:!0,border:!0}),b.tf&&(0,y.H)(F)&&(0,n.jsxs)(ez.$,{onClick:()=>{s().push(ey.dE.epParrainage)},theme:"secondaryRefonte",fullWidth:!0,border:!0,borderColor:l.Jy.ocher,children:[(0,n.jsx)(eI.default,{}),"Parrainer un proche"]}),(null==(t=D.pickupStore)?void 0:t.phone)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"order__contact desktop",children:["Contacter mon magasin au\xa0 :",(0,n.jsxs)("span",{children:[(0,n.jsx)(tZ.default,{width:"20",height:"20"}),(0,n.jsx)("strong",{children:(0,I.n4)(D.pickupStore.phone)})]})]}),(0,n.jsx)("div",{className:"order__contact mobile",children:(0,n.jsxs)(t$.A,{url:"tel:".concat(D.pickupStore.phone),theme:"primaryRefonte",fullWidth:!0,border:!1,children:[(0,n.jsx)(tZ.default,{})," Appeler mon magasin"]})})]})]})]}),(0,n.jsx)(t5,{children:(0,n.jsx)(ez.$,{onClick:()=>{s().push(ey.dE.contactFormulaire)},theme:"secondaryRefonte",borderColor:l.Jy.ocher,children:"Me r\xe9tracter"})}),V&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"title",children:"Suivi de commande"}),(0,n.jsx)("iframe",{className:"order__tracking",src:"".concat("https://tracking.saint-maclou.com","/?SalesId=").concat(D.tsmFormattedOrderNumber,"&iframe=true")})]}),(0,n.jsx)("div",{className:"title",children:"D\xe9tails commande"}),(0,n.jsx)(t3,{children:(0,n.jsxs)(t6,{children:[(0,n.jsx)(t8,{children:(0,n.jsxs)(t7,{children:[(0,n.jsx)(ie,{children:"Produit"}),(0,n.jsx)(ie,{children:"R\xe9f\xe9rence"}),(0,n.jsx)(ie,{children:"Prix unitaire"}),(0,n.jsx)(ie,{children:"Quantit\xe9"}),(0,n.jsx)(ie,{children:"Sous total"})]})}),(0,n.jsx)(t9,{children:D.products.map((e,t)=>{var i,a;let r=e.packageSize?(e.unitPrice.amount*e.packageSize).toFixed(2):e.unitPrice.formatted;return(0,n.jsxs)(it,{children:[(0,n.jsx)(ii,{className:"product",children:(0,n.jsxs)(ip,{children:[(null==(i=e.image)?void 0:i.src)?(0,n.jsx)("div",{className:"order__thumbnail",children:(0,n.jsx)(tW.A,{src:e.image.src,alt:e.image.alt||"",width:90,height:90,className:"order__image"},t)}):(0,n.jsx)("div",{className:"order__empty-thumbnail",children:(0,n.jsx)(tU.default,{})}),(0,n.jsxs)(iu,{children:[e.url?(0,n.jsx)(tf(),{href:"/produit/[product]",as:e.url,passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(id,{title:e.title,children:e.title})}):(0,n.jsxs)(ic,{children:[(0,n.jsx)("div",{children:e.title}),(0,n.jsx)("div",{className:"sub-text",children:"Le produit n'est plus disponible \xe0 la vente en ligne"})]}),(0,n.jsx)(im,{children:e.size})]})]})}),(0,n.jsxs)(ii,{className:"reference",children:[(0,n.jsx)("span",{className:"mobile",children:"R\xe9f\xe9rence\xa0: "}),e.reference?e.reference:(0,tQ.W4)(e.qct)]}),(0,n.jsxs)(ii,{className:"price",children:[(0,n.jsx)("span",{className:"mobile",children:"Prix unitaire\xa0: "}),(0,n.jsx)(tG.A,{price:r})]}),(0,n.jsxs)(ii,{className:"quantity",children:[(0,n.jsx)("span",{className:"mobile",children:"Quantit\xe9\xa0: "}),e.quantity,e.unitLabel&&" ".concat(e.unitLabel)]}),(0,n.jsxs)(ii,{className:"total",children:[(0,n.jsx)("span",{className:"mobile",children:"Sous total\xa0: "}),(0,n.jsx)(tG.A,{price:e.totalPrice.formatted,priceWithoutDiscount:(null==(a=e.totalCompareAtPrice)?void 0:a.formatted)?e.totalCompareAtPrice.formatted:null,showSticker:!1})]})]},t)})})]})}),(0,n.jsxs)(t4,{children:[(0,n.jsxs)(ia,{children:[(0,n.jsx)(ir,{children:"Adresse de livraison"}),(0,n.jsxs)(is,{children:[(0,n.jsxs)(io,{children:[(0,n.jsx)("span",{className:"uppercase",children:null==D||null==(i=D.shippingAddress)?void 0:i.lastName})," ",null==D||null==(r=D.shippingAddress)?void 0:r.firstName]}),(0,n.jsx)(io,{children:null==D||null==(o=D.shippingAddress)?void 0:o.address1}),(null==D||null==(d=D.shippingAddress)?void 0:d.address2)&&(0,n.jsx)(io,{children:null==D||null==(c=D.shippingAddress)?void 0:c.address2}),(0,n.jsxs)(io,{children:[(0,n.jsx)("span",{className:"uppercase",children:null==D||null==(p=D.shippingAddress)?void 0:p.city}),", ",null==D||null==(u=D.shippingAddress)?void 0:u.zip]}),D.shippingAddress&&D.shippingAddress.province&&(0,n.jsx)(io,{children:D.shippingAddress.province}
1),(0,n.jsx)(io,{children:null==D||null==(m=D.shippingAddress)?void 0:m.country})]})]}),(0,n.jsxs)(ia,{children:[(0,n.jsx)(ir,{children:"Adresse de facturation"}),(0,n.jsxs)(is,{children:[(0,n.jsxs)(io,{children:[(0,n.jsx)("span",{className:"uppercase",children:null==D||null==(h=D.billingAddress)?void 0:h.lastName})," ",null==D||null==(f=D.billingAddress)?void 0:f.firstName]}),(0,n.jsx)(io,{children:null==D||null==(g=D.billingAddress)?void 0:g.address1}),(null==D||null==(v=D.billingAddress)?void 0:v.address2)&&(0,n.jsx)(io,{children:null==D||null==(w=D.billingAddress)?void 0:w.address2}),(0,n.jsxs)(io,{children:[(0,n.jsx)("span",{className:"uppercase",children:null==D||null==(N=D.billingAddress)?void 0:N.city}),", ",null==D||null==(_=D.billingAddress)?void 0:_.zip]}),(null==D||null==(k=D.billingAddress)?void 0:k.province)&&(0,n.jsx)(io,{children:null==D||null==(S=D.billingAddress)?void 0:S.province}),(0,n.jsx)(io,{children:null==D||null==(A=D.billingAddress)?void 0:A.country})]})]}),(0,n.jsxs)(ia,{className:"recap",children:[(0,n.jsx)(ir,{children:"R\xe9capitulatif de commande"}),(0,n.jsxs)(is,{children:[(0,n.jsxs)(io,{children:["Articles\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[null==D||null==(E=D.subTotalPrice)?void 0:E.formatted," â¬"]})]}),(0,n.jsxs)(io,{children:["Livraison\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[null==D||null==(T=D.shippingPrice)?void 0:T.formatted," â¬"]})]}),D.discountPrice&&(0,n.jsxs)(io,{children:["Remise\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[D.discountPrice.formatted," â¬"]})]}),(0,n.jsxs)(io,{children:["Taxes\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[null==D||null==(z=D.taxPrice)?void 0:z.formatted," â¬"]})]}),(0,n.jsxs)(io,{children:["Total HT\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[null==D||null==(L=D.totalHTPrice)?void 0:L.formatted," â¬"]})]})]}),(0,n.jsxs)(il,{children:["Montant total TTC\xa0:"," ",(0,n.jsxs)("span",{className:"right",children:[null==D||null==(P=D.totalTTCPrice)?void 0:P.formatted," â¬"]})]})]})]})]})]})})};var ix=i(33819),ig=i(66125),ib=i(82190),iv=i(17429),iy=i(47957),ij=i(71528);let iw=o.default.div.withConfig({componentId:"sc-9e990bcf-0"})(["background:",";text-align:center;box-shadow:rgb(112 112 112 / 50%) 0px 0px 8px 0px;padding:45px 20px;margin-bottom:50px;"],l.Jy.white),iC=o.default.h3.withConfig({componentId:"sc-9e990bcf-1"})(["text-transform:uppercase;font-size:20px;line-height:24px;font-family:",";margin:0 0 16px;text-align:center;"],l.vX.Glendale),iN=o.default.p.withConfig({componentId:"sc-9e990bcf-2"})(["margin:0 0 20px;"]),i_=()=>{let[e,t]=(0,a.useState)(),i=(0,v.Jd)();return(0,a.useEffect)(()=>{let e=new ig.MA(6),n=document&&document.cookie?(0,iy.Ri)("tsm-my-store",document.cookie):null,a=n?JSON.parse((0,ij.u)(n)).code:null;i&&a&&(e.advanced={store:a}),new iv.h().getSimplePageContent(e).then(t).catch(e=>{console.error("Failed to load viewed products",e),t(null)})},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(iw,{children:[(0,n.jsx)(iC,{children:"Pas encore de commande\xa0?"}),(0,n.jsxs)(iN,{children:["Nous attendons avec impatience votre premi\xe8re commande.",(0,n.jsx)("br",{}),"Nâh\xe9sitez pas \xe0 parcourir nos univers\xa0!"]}),(0,n.jsx)(ez.z,{url:ey.dE.tendances,text:"Je m'inspire",theme:"primaryRefonte",fullWidth:!1})]}),e&&e.cards&&e.cards.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(iC,{children:"Derniers articles consult\xe9s"}),(0,n.jsx)(ib.A,{products:e.cards,nbSlidesToShow:3})]})]})},ik=o.default.div.withConfig({componentId:"sc-b7e56d38-0"})(["font-family:",";strong{font-family:",";}.order-link{text-decoration:underline;font-size:14px;line-height:19px;}.order{&__list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));@media ","{grid-template-columns:repeat(2,minmax(0,1fr));}@media ","{grid-template-columns:repeat(1,minmax(0,1fr));}grid-column-gap:30px;grid-row-gap:30px;margin:0 0 50px;padding:0;}&__item{box-shadow:0 0 10px 0 rgba(87,91,102,0.3);list-style:none;display:flex;flex-direction:column;a{margin-top:10px;font-family:",";color:",";text-decoration:underline;}}&__illustration{height:120px;background:rgba(237,237,240,1);display:flex;align-items:center;img{width:100%;height:100%;object-fit:cover;}svg{margin:0 auto;}}
1&__products-thumbnails{display:flex;column-gap:8px;margin:0 20px;}&__thumbnail{width:65px;height:65px;img{width:100%;height:100%;object-fit:cover;}&-more{width:65px;height:65px;background:white;display:flex;align-items:center;justify-content:center;}}&__type{background:",";color:white;padding:6px 10px;display:inline-flex;align-items:center;margin-bottom:20px;width:fit-content;svg{margin-right:8px;path{fill:white;}}}&__content{padding:15px 20px;flex-grow:1;display:flex;flex-direction:column;}&__line{margin:0;&:last-of-type{margin-bottom:20px;}}&__total{font-family:",";font-size:20px;margin-top:auto;div{display:inline-block;}.price__wrapper{.price__list{.price__total{font-size:20px;sup{font-size:14px;top:-4px;}}}}}&__button{color:",";font-family:",";text-decoration:underline;margin-top:10px;cursor:pointer;}}"],l.vX.NunitoSansRegular,l.vX.NunitoSansBold,l.uk.tablet,l.uk.mobileL,l.vX.NunitoSansBold,l.Jy.ocher,l.Jy.blueDark,l.vX.NunitoSansBold,l.Jy.ocher,l.vX.NunitoSansBold),iS=o.default.div.withConfig({componentId:"sc-b7e56d38-1"})(["display:flex;align-items:center;margin:0 0 15px;@media ","{display:none;}.find-command{padding-left:15px;font-family:",";}"],l.uk.tablet,l.vX.NunitoSansRegular),iI=o.default.div.withConfig({componentId:"sc-b7e56d38-2"})(["max-width:280px;width:100%;&:not(:last-of-type){margin-right:20px;}"]),iA=o.default.div.withConfig({componentId:"sc-b7e56d38-3"})([""]),iE=e=>{let{onOrderDetailClick:t}=e,i=(0,a.useRef)(null),r=ec(),[s,o]=(0,a.useState)([]),[l,d]=(0,a.useState)(1);(0,a.useEffect)(()=>{tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes commandes"})},[]),(0,a.useEffect)(()=>{"data"in r&&c(["0"],r.data)},[r]);let c=(0,a.useCallback)((e,t)=>{let i=[...t||s];i.sort((t,i)=>(parseInt(e[0])?t.date:i.date).getTime()-(parseInt(e[0])>0?i.date:t.date).getTime()),o(i)},[s]),p=(0,a.useCallback)(()=>{d(l+1)},[l]),u=6*l;return(0,n.jsx)(n.Fragment,{children:!0===r.loading?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eJ.Ay,{})}):!0===r.error?(0,n.jsx)(i_,{}):r.data.length>0?(0,n.jsx)(ik,{ref:i,children:(0,n.jsxs)(iA,{children:[(0,n.jsxs)(iS,{children:[(0,n.jsx)(iI,{children:(0,n.jsx)(tL.A,{theme:"rounded",data:{id:"page",value:"page",valid:!0,typeMismatch:!0,placeholder:"Trier par date",labelText:"",required:!1,children:[{label:"Du plus r\xe9cent au plus ancien",value:"0"},{label:"Du plus ancien au plus r\xe9cent",value:"1"}]},onChange:e=>{c(e)}})}),(0,n.jsx)("p",{className:"find-command",children:"Si vous venez de passer commande en magasin, elle s'affichera ici sous quelques heures."})]}),(0,n.jsx)("ul",{className:"order__list",children:s.length>0?s.slice(0,u).map((e,i)=>{var a,r,s;return(0,n.jsxs)("li",{className:"order__item",children:[(0,n.jsx)("div",{className:"order__illustration",children:(null==(a=e.cardProducts)?void 0:a.length)>0?(0,n.jsxs)("div",{className:"order__products-thumbnails",children:[null==(r=e.cardProducts)?void 0:r.map((e,t)=>{if(t<3)return(0,n.jsx)("div",{className:"order__thumbnail",children:(0,n.jsx)(tW.A,{src:e.image.src,alt:e.image.alt||"",width:65,height:65},t)},t)}),(null==(s=e.cardProducts)?void 0:s.length)>3&&(0,n.jsxs)("div",{className:"order__thumbnail-more",children:["+ ",e.cardProducts.length-3]})]}):e.fromWeb?(0,n.jsx)(tU.default,{}):(0,n.jsx)("img",{src:"/img/desktop/orders/placeholder_store.png",alt:"Store"})}),(0,n.jsxs)("div",{className:"order__content",children:[(0,n.jsx)("div",{className:"order__type",children:e.fromWeb?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ix.default,{width:20,height:20})," Commande web"]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tl.default,{width:20,height:20}),"St Maclou - ",e.storeName]})}),(0,n.jsxs)("p",{className:"order__line",children:[(0,n.jsx)("strong",{children:"Command\xe9 le :"})," ",(0,w.s4)(e.date)]}),(0,n.jsxs)("p",{className:"order__line",children:[(0,n.jsx)("strong",{children:"Num\xe9ro :"})," ",e.tsmFormattedOrderNumber]}),e.fromWeb&&e.status&&(0,n.jsxs)("p",{className:"order__line",children:[(0,n.jsx)("strong",{children:"Statut :"})," ",e.status]}),(0,n.jsxs)("div",{className:"order__total",children:["TOTAL :"," ",(0,n.jsx)(tG.A,{price:e.totalTTCPrice.amount,small:!0})]}),(0,n.jsx)("div",{className:"order__button",onClick:()=>t(e.fromWeb?e.id:(e=>{let t=new Date(e.date),{day:i,mounth:n,year:a}=(0,I.zJ)(t),r="".concat(a,"-").concat(n,"-").concat(i);return r+"|"+(0,I.C1)(e.orderIndex)+"|"+e.id.slice(-4)})(e),e.fromWeb),children:"Voir le d\xe9tail"})]})]},i)}):(0,n.jsx)(n.Fragment,{children:"Aucune commande"})}),r.data.length>u&&(0,n.jsxs)(ez.$,{type:"button",theme:"primaryRefonte",border:!0,onClick:()=>{p()},children:["Voir plus de commandes (",r.data.length-u,")"]})]})}):(0,n.jsx)(i_,{})})},iT=o.default.div.withConfig({componentId:"sc-90f35398-0"})([""]),iz=o.default.div.withConfig({componentId:"sc-90f35398-1"})([""]),iL=o.default.h2.withConfig({componentId:"sc-90f35398-2"})(["text-transform:uppercase;font-family:",";color:",";font-size:34px;line-height:44px;margin:0 0 30px 0;@media ","{font-size:22px;line-height:28px;}"],l.vX.Glendale,l.Jy.darkblue,l.uk.tablet),iP=(0,h.ID)(()=>{var e;let t=(0,r.useRouter)(),[i,s]=(0,a.useState)(null),[o,l]=(0,a.useState)(!0);(0,tI.Or)({cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes commandes"}),(0,a.useEffect)(()=>{let e=t.query;if(!e.id)return void s(null);s(e.id),l("true"===e.fromWeb)});let d=(0,a.useCallback)((e,i)=>{t.push({pathname:ey.dE.epOrders,query:{id:e,fromWeb:i}},void 0,{shallow:!0}),s(e)},[]);return(0,n.jsx)(iT,{children:(0,n.jsxs)(iz,{children:[(0,n.jsx)(iL,{children:"Mes commandes"}),i?(0,n.jsx)(ih,{orderId:i,fromWeb:o}):!(null==(e=t.query)?void 0:e.id)&&(0,n.jsx)(iE,{onOrderDetailClick:d})]})})});var iO=i(53460),iR=i(55671),iJ=i(37331),iM=i(32564),iD=i(36239);let iF=o.default.div.withConfig({componentId:"sc-f27603ca-0"})(["box-sizing:border-box;list-style:none;text-align:center;width:330px;padding:5px;text-align:left;cursor:pointer;@media ","{padding:0;}*{box-sizing:border-box;}"],l.uk.mobileL),iV=o.default.a.withConfig({componentId:"sc-f27603ca-1"})(["padding:0 10px 10px 10px;transition:all 0.2s ease-in-out;display:flex;flex-direction:column;height:100%;&:hover{-webkit-box-shadow:0px 0px 8px 0px rgba(112,112,112,0.5);-moz-box-shadow:0px 0px 8px 0px rgba(112,112,112,0.5);box-shadow:0px 0px 8px 0px rgba(112,112,112,0.5);.on-hover{opacity:1;}}@media ","{flex:initial;&:hover{box-shadow:none;}}"],l.uk.mobileL),iq=o.default.div.withConfig({componentId:"sc-f27603ca-2"})(["position:relative;"]),iB=o.default.h3.withConfig({componentId:"sc-f27603ca-3"})(["font-size:14px;line-height:20px;max-height:66px;font-family:",";margin:10px 0px 10px 0px;overflow:hidden;@media ","{line-height:18px;font-size:12px;max-height:54px;padding:0 5px;}"],l.vX.NunitoSansRegular,l.uk.mobileL),iX=o.default.div.withConfig({componentId:"sc-f27603ca-4"})(["margin-top:auto;opacity:0;",""],e=>{let{buyButton:t}=e;return t?(0,o.css)(["opacity:1;"]):(0,o.css)(["transition:all 0.2s ease-in-out;@media (hover:none){display:none;}@media ","{display:none;}"],l.uk.mobileL)}),iH=o.default.div.withConfig({componentId:"sc-f27603ca-5"}
1)(["height:40px;margin:15px 0 10px;display:flex;align-items:center;"]),iG=o.default.div.withConfig({componentId:"sc-f27603ca-6"})(["margin-bottom:15px;.price,.unit{font-family:",";}@media ","{padding:0 5px;.price{font-size:22px;sup{font-size:14px;}}.unit{font-size:16px;}}"],l.vX.NunitoSansBold,l.uk.mobileL),iU=o.default.div.withConfig({componentId:"sc-f27603ca-7"})(["margin-top:5px;display:flex;width:100%;position:relative;div,.comparator__icon{svg{width:24px;height:24px;}}"]),iW=o.default.div.withConfig({componentId:"sc-f27603ca-8"})(["display:flex;position:absolute;right:0;> div{margin-right:5px;}"]),iQ=o.default.div.withConfig({componentId:"sc-f27603ca-9"})(["width:100%;min-height:24px;.netreviews_review_rate_and_stars{.nr-icon.gold{color:"," !important;}div{font-size:14px;}}.netreviews_reviews_rate{@media ","{display:none;}}"],l.Jy.ocher,l.uk.tablet),iZ=e=>{let{product:t,className:i}=e,{productCard:r}=(e=>"productCard"in e?e:{productCard:e})(t);return(0,a.useEffect)(()=>{(0,iD.S)()},[r]),(0,n.jsx)(iF,{className:i&&i,children:(0,n.jsx)(tf(),{href:r.url,legacyBehavior:!0,children:(0,n.jsxs)(iV,{title:"D\xe9couvrir",children:[(0,n.jsx)(iH,{children:r.salesPlan?(0,n.jsx)(iR.fs,{}):r.stickers?(0,n.jsx)(n.Fragment,{children:r.stickers.map((e,t)=>(0,n.jsx)(iR.P8,{data:e},t))}):r.isNew&&(0,n.jsx)(iR.Vr,{children:"Nouveau !"})}),(0,n.jsx)(iq,{children:(0,n.jsx)(iO.VI,{srcDesktop:r.img,alt:r.text,adaptativeContent:!0})}),(0,n.jsxs)(iU,{children:[(0,n.jsx)(iQ,{className:"NETREVIEWS_PRODUCT_STARS","data-
1product-id":r.sku}),(0,n.jsxs)(iW,{children:[(null==r?void 0:r.productFamily)&&(null==r?void 0:r.productSubFamily)&&r.sku&&(0,n.jsx)(iM.A,{productId:r.sku,productFamily:r.productFamily,productSubFamily:r.productSubFamily}),(0,n.jsx)(iJ.A,{productCategory:r.categoryParentName,entryId:r.sku,name:r.text})]})]}),(0,n.jsx)(iB,{children:r.text}),(0,n.jsx)(iG,{children:r.price&&(0,n.jsx)(tG.A,{price:r.price,priceWithoutDiscount:r.promo,fromPrice:r.fromPrice,unit:r.unit,discountPercent:r.promoTag?r.promoTag[0].replace(/[-%]/g,""):void 0})}),(0,n.jsx)(iX,{className:"on-hover",buyButton:!1,children:(0,n.jsx)(ez.$,{text:"D\xe9couvrir",theme:"primaryRefonte",fullWidth:!0})})]})})})};var i$=i(66482);let iY=o.default.h3.withConfig({componentId:"sc-a20e248d-0"})(["text-transform:uppercase;font-size:20px;line-height:24px;font-family:",";margin:0 0 16px;text-align:center;"],l.vX.Glendale),iK=o.default.div.withConfig({componentId:"sc-a20e248d-1"})([".wishList--empty{padding:45px 20px;box-sizing:content-box;text-align:center;box-shadow:0 0 10px 0 rgba(87,91,102,0.3);margin-bottom:50px;@media ","{padding:2.938rem 1rem 3rem;width:auto;}.wishlist-empty-description{margin-bottom:20px;span{display:block;}}.wishList--heading-text{margin-bottom:0px;}}.bold{font-family:",";}"],l.uk.tablet,l.vX.NunitoSansBold),i0=()=>{let[e,t]=(0,a.useState)(),i=(0,v.Jd)();return(0,a.useEffect)(()=>{let e=new ig.MA(6),n=new iv.h,a=document&&document.cookie?(0,iy.Ri)("tsm-my-store",document.cookie):null,r=a?JSON.parse((0,ij.u)(a)).code:null;i&&r&&(e.advanced={store:r}),n.getSimplePageContent(e).then(t).catch(e=>{console.error("Failed to load viewed products",e),t(null)})},[]),(0,n.jsxs)(iK,{children:[(0,n.jsxs)("div",{className:"wishList--empty wishList--heading",children:[(0,n.jsx)(i$.A,{type:"h2",className:"wishList--heading-title",children:(0,n.jsx)("span",{className:"wishList--heading-title-text",children:"PAS ENCORE DE FAVORIS ?"})}),(0,n.jsx)("div",{className:"wishList--heading-text",children:(0,n.jsxs)("div",{className:"wishlist-empty-description",children:[(0,n.jsx)("div",{className:"bold ocre",style:{marginBottom:".33em"},children:"Aucun article sauvegard\xe9"}),(0,n.jsxs)("span",{children:["Vous n'avez pas encore de produits favoris, pour d\xe9couvrir votre prochain coup de coeur,"," ",(0,n.jsx)(x.m,{className:"bold ocre",href:"/produits/boutique-vente-en-ligne",title:"Boutique vente en ligne",children:"c'est par ici"}),"\xa0!"]})]})})]}),(null==e?void 0:e.cards)&&e.cards.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(iY,{children:"Derniers articles consult\xe9s"}),(0,n.jsx)(ib.A,{products:e.cards,nbSlidesToShow:3})]})]})},i1=o.default.div.withConfig({componentId:"sc-b038d19c-0"})(["display:flex;line-height:32px;align-items:center;justify-content:center;@media ","{font-size:14px;line-height:26px;}.list-number-page{display:flex;list-style-type:none;margin:0 10px;padding:0;}.page-item{margin:0 10px;@media ","{margin:0;}.page-link{text-align:center;width:32px;height:32px;@media ","{width:26px;height:26px;}}&.active{.page-link{border-radius:50%;background-color:",";color:",";}}}.pagination-nav-button{color:",";text-decoration:underline;cursor:pointer;font-family:",";display:flex;align-items:center;&.disabled{cursor:default;text-decoration:none;}svg{width:18px;path{fill:",";}&.disabled{path{fill:",";}}}}"],l.uk.tablet,l.uk.tablet,l.uk.tablet,l.Jy.ocher,l.Jy.white,l.Jy.ocher,l.vX.NunitoSansBold,l.Jy.ocher,l.Jy.dimGray),i2="POINT",i5=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=e,a=[];for(;n<=t;)a.push(n),n+=i;return a},i3=a.memo(e=>{let{totalRecords:t=0,startingPage:i=1,pageLimit:r=12,pageNeighbours:s=1,onPageChanged:o}=e,[d,c]=(0,a.useState)(i),p=Math.ceil(t/r),u=(0,a.useRef)(o);u.current=o,(0,a.useEffect)(()=>{c(i)},[i]),(0,a.useEffect)(()=>{u.current(d)},[d]);let h=(()=>{let e=2*s+3;if(p>e){let t=[],i=d-s,n=d+s,a=p-1,r=i>2?i:2,o=n<a?n:a,l=e-(t=i5(r,o)).length-1,c=r>2,u=o<a;return c&&!u?t=[i2,...i5(r-l,r-1),...t]:!c&&u?t=[...t,...i5(o+1,o+l),i2]:c&&u&&(t=[i2,...t,i2]),[1,...t,p]}return i5(1,p)})();return(0,n.jsxs)(i1,{children:[(0,n.jsxs)(x.m,{href:"#",title:"",color:1===d?l.Jy.darkgrey:l.Jy.ocher,className:"pagination-nav-button ".concat(1===d&&"disabled"),onClick:e=>{e.preventDefault(),1!=d&&c(d-1)},children:[(0,n.jsx)(tH.default,{className:"".concat(1===d&&"disabled")}),"Pr\xe9c\xe9dent"]}),(0,n.jsx)("ul",{className:"list-number-page",children:h.map((e,t)=>e===i2?(0,n.jsx)("li",{className:"page-item",children:(0,n.jsx)("span",{className:"sr-only",children:"..."})},t):(0,n.jsx)("li",{className:"page-item".concat(d===e?" active":""),children:(0,n.jsx)("a",{className:"page-link",href:"#",onClick:t=>{t.preventDefault(),c(e)},children:e})},t))}),(0,n.jsxs)(x.m,{href:"#",title:"",color:d===p?l.Jy.darkgrey:l.Jy.ocher,className:"pagination-nav-button ".concat(d===p&&"disabled"),onClick:e=>{e.preventDefault(),d!=p&&c(d+1)},children:["Suivant",(0,n.jsx)(m.default,{className:"".concat(d===p&&"disabled")})]})]})});var i4=i(90376),i6=i(50171),i8=i(56402);let i9=o.default.div.withConfig({componentId:"sc-f79a22e9-0"})(["display:flex;justify-content:flex-start;flex-direction:column;@media ","{margin:25px 0 0 0;}.page-title{font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";}.ocre{color:",";}.product-card{& > a{width:100%;}}.wishList--content{display:flex;flex-wrap:wrap;margin-bottom:3rem;min-width:320px;& > div{display:inline-flex;width:calc(100% / 3);@media ","{width:calc(100% / 2);}& > div{display:flex;flex-grow:1;}}.product-container{width:100%;}.product-detail{display:flex;flex-direction:column;padding-right:1.5rem;div:first-child{flex:1 0 auto;}}.product--unavailable{.product--unavailable-container{position:relative;border:1px solid #acacac;margin-bottom:1.875rem;}.product--unavailable-content{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;width:100%;padding:1rem 1.5rem 0 1.25rem;}.product-close-btn{top:8px;right:8px;}.product--unavailable-name{font-size:1.125rem;font-family:",";color:",";margin:0 0 10px;@media ","{margin:0;font-size:0.875rem;line-height:1rem;font-family:",";}}.product--unavailable-state{display:inline-block;margin:0 0 15px;text-align:left;color:",";}}}.wishList--heading{h2{margin-top:0;font-family:",";text-align:center;color:",";}}.wishList--heading-title{display:flex;justify-content:center;@media ","{flex-direction:column;width:80%;margin:0px auto 3.214rem;}.wishList--heading-title-text{font-size:20px;}}.share-wishlist{font-family:",";margin:10px 0;text-decoration:underline;margin-left:auto;display:flex;align-items:center;@media ","{text-align:right;}svg{margin-right:10px;width:40px;height:40px;}&:hover{opacity:0.8;}}.content-button-share{display:flex;justify-content:space-between;align-items:center;position:relative;@media ","{flex-direction:column;div{width:100%;}.button{margin-bottom:20px;width:100%;}}.infoBulle{opacity:0;position:absolute;top:-60px;left:0;z-index:1;overflow:hidden;transition:opacity 0.2s ease-in;&.active{opacity:1;}.content-infoBulle{position:relative;box-sizing:border-box;height:50px;padding:10px 20px;line-height:30px;margin-bottom:20px;background-color:",";span{font-family:",";color:",';z-index:1;}&:after{position:absolute;bottom:-10px;left:25%;z-index:0;content:"";display:block;width:20px;height:20px;transform:rotate(45deg);background-color:',";}}}}.modal-content{.form--error{text-align:center;font-family:",";font-size:1rem;font-size:0.875rem;margin:0.3125rem 0 1rem;color:",";}.confirm--popin{width:700px;margin:-1rem 0 0.5rem;h3{margin:0;}@media ","{width:100%;margin:0;}}}"],l.uk.tablet,l.vX.Glendale,l.Jy.darkblue,l.Jy.ocher,l.uk.tablet,l.vX.NunitoSansExtraBold,l.Jy.charcoal,l.uk.tablet,l.vX.NunitoSansRegular,l.Jy.redClassic,l.vX.Glendale,l.Jy.blueDark,l.uk.tablet,l.vX.NunitoSansBold,l.uk.tablet,l.uk.tabletS,l.Jy.lightGrey,l.vX.NunitoSansExtraBold,l.Jy.dimGray,l.Jy.lightGrey,l.vX.NunitoSansRegular,l.Jy.persianRed,l.uk.tablet);var i7=i(70007);let ne=o.default.div.withConfig({componentId:"sc-f3dd8e10-0"})(["display:flex;justify-content:flex-start;align-items:flex-start;flex-direction:column;margin:0.75rem 0;font-family:",";font-size:0.875rem;& > label{cursor:pointer;position:relative;margin-bottom:10px;transition:all 0.2s ease-in;color:",";text-align:center;em{color:",";}span.help{margin-top:5px;font-size:0.75rem;display:block;}}.list{display:flex;margin:0;padding:0;width:100%;justify-content:space-between;.checkbox--cell{label{font-size:1rem;}}li{margin:0 1rem;display:block;position:relative;float:left;&:first-child{margin:0 1rem 0 0;}}}.icon{font-size:1.25rem;z-index:1;width:20px;height:20px;visibility:hidden;opacity:0;transition:all 0.25s linear;-webkit-transition:all 0.25s linear;}.msgError{font-size:14px;font-family:",";font-style:italic;display:none;color:",";}&.error{textarea{border:1px solid ",";&:focus{border-color:",";}}.icon{opacity:1;visibility:visible;}.msgError{display:flex;}}"],l.vX.NunitoSansRegular,l.Jy.dimGray,l.Jy.yellowSea,l.vX.NunitoSansRegular,l.Jy.persianRed,l.Jy.persianRed,l.Jy.persianRed),nt=e=>{let{data:t,onChange:i,mainLabelStyle:r={}}=e,[s,o]=(0,a.useState)({isValid:!t.required,value:t.value?t.value.split(","):[]}),[l,d]=(0,a.useState)(t.id),c=a.useRef(null);(0,a.useEffect)(()=>{i&&i(c.current,l)},[s]);let p=e=>{let i=s.value.indexOf(e.value),n=s.value;
1-1==i?n.push(e.value):n.splice(i,1),o({isValid:!t.required||n.length>0,value:n})};return(0,n.jsxs)(ne,{className:"".concat(s.isValid?"":"error"),children:[t.labelText&&(0,n.jsx)("label",{htmlFor:t.id,dangerouslySetInnerHTML:{__html:"".concat(t.labelText," ").concat(t.required&&!t.maskError?"<em>*</em>":""," ").concat(t.help?'<span className="help">'.concat(t.help,"</span>"):"")},style:r}),(0,n.jsx)("input",{ref:c,type:"hidden",id:l,name:l,value:s.value}),(0,n.jsxs)("div",{className:"list",children:[t.children.map((e,i)=>(0,n.jsx)(eF.S,{data:{...e,id:"".concat(t.id,"_").concat(i),labelText:e.label,color:t.color},checkValue:s.value.indexOf(e.value)>-1,onCheck:p,actifColor:e.iconColorOn},i)),t.required&&!s.isValid&&(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"icon",children:(0,n.jsx)(i7.default,{})})})]}),!s.isValid&&(0,n.jsx)("span",{className:"msgError",children:t.errMsg})]})},ni=o.default.div.withConfig({componentId:"sc-8cc4bdbd-0"})(["width:100%;position:relative;h2{font-family:",";text-transform:uppercase;}.ep-Habitation--form,.address-section{max-width:385px;}@media ","{margin:25px 0 0 0;}.ep-Habitation--form{@media ","{max-width:none;}h2{font-size:20px;margin:25px 0;}.ep-Habitation--error{text-align:center;font-size:0.875rem;margin:1.5rem 0 0.3125rem;color:",";}label{font-size:16px;}}.address-section{h2{font-size:20px;margin:25px 0;}label{font-family:",";color:",";font-size:16px;}}.help-info-required{position:absolute;font-size:10px;right:30px;}"],l.vX.Glendale,l.uk.tablet,l.uk.tablet,l.Jy.persianRed,l.vX.NunitoSansBold,l.Jy.black),nn=o.default.h2.withConfig({componentId:"sc-8cc4bdbd-1"})(["text-transform:uppercase;font-size:34px;line-height:44px;margin:0 0 30px 0;font-family:",";text-align:left;color:",";@media ","{font-size:22px;line-height:28px;}"],l.vX.Glendale,l.Jy.blueDark,l.uk.tablet),na=(0,h.ID)(e=>{let{userContext:t,onTokenError:i,goToSection:r}=e,[s,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!0),[h,x]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[b,y]=(0,a.useState)({idHome:"",typeHome:eD.d$.typeHome,typeStatut:eD.d$.typeStatut,area:eD.d$.area,nbRooms:eD.d$.nbRooms,outsideList:eD.d$.outsideList,address:eD.d$.address,city:eD.d$.city,zipcode:eD.d$.zipcode}),j=(0,a.useRef)(),w=(0,v.rl)(),C=e=>{let t=e.currentTarget?e.currentTarget:e,i=(0,eD.BT)([t],b);y({...b,...i.formValues})};return(0,a.useEffect)(()=>{tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mon habitation"})},[]),(0,a.useEffect)(()=>{var e;if(w.loading)return void m(!0);if(w.error)return void x(!0);if(!w.value)return void r(eg.LOGIN);let t=w.value,i=t.Habitation,n=t.Adresse,a=b.address;a.value=[n.AdressePostaleLigne1,n.AdressePostaleLigne2,n.AdressePostaleLigne3,n.AdressePostaleLigne4].filter(Boolean).join(", ");let s=b.zipcode;s.value=n.AdressePostaleCodePostal;let o=b.city;o.value=n.AdressePostaleVille;let d=b.idHome;d=i.HabitationId;let c=b.typeHome;c.color=l.Jy.black,c.value=i.TypeHabitation;let p=b.typeStatut;p.color=l.Jy.black,p.value=i.Statut;let u=b.nbRooms;u.value=i.NombrePieces;let h=b.area;h.color=l.Jy.black,h.value=(null==i||null==(e=i.SuperficieInterieur)?void 0:e.indexOf(".0"))>-1?Number.parseInt(i.SuperficieInterieur).toString():i.SuperficieInterieur;let f=b.outsideList;f.color=l.Jy.black,f.value=i.ListeExterieur&&i.ListeExterieur.map(e=>e.Exterieur).join(","),y({typeHome:c,typeStatut:p,nbRooms:u,area:h,idHome:d,outsideList:f,address:a,zipcode:s,city:o}),x(!1),m(!1)},[w]),(0,n.jsxs)(ni,{children:[h&&(0,n.jsx)("div",{className:"ep-Habitation--form--field",children:(0,n.jsx)("p",{className:"ep-Habitation--error",children:eR.IW.GLOBAL})}),u&&!h&&(0,n.jsx)("div",{style:{padding:"3rem 0"},children:(0,n.jsx)(eJ.Ay,{})}),!u&&!h&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("form",{ref:j,onSubmit:e=>{e.preventDefault();let n=(0,eD.BT)(e.currentTarget.elements,b),{isValid:a,formValues:r}=n;if(a){(0,I.iw)("Connaissance client","habitation","habitat_ ".concat(n.formValues.typeHome.value,"|statuthabitation_").concat(n.formValues.typeStatut.value,"|superficie_").concat(n.formValues.area.value,"|Exterieur_").concat(n.formValues.outsideList.value&&n.formValues.outsideList.value.replace(/,/gi,"/")));let e=new W.oz;if(t&&t.islogged){let n={Adresse:{AdressePostaleLigne1:"",AdressePostaleLigne2:"",AdressePostaleLigne3:r.address.value,AdressePostaleLigne4:"",AdressePostaleVille:r.city.value,AdressePostaleC
1odePostal:r.zipcode.value},Habitation:{HabitationId:b.idHome,TypeHabitation:r.typeHome.value,Statut:r.typeStatut.value,SuperficieInterieur:r.area.value,NombrePieces:r.nbRooms?r.nbRooms.value:"",ListeExterieur:r.outsideList.value.split(",").map(e=>({Exterieur:e}))}};g(!0),e.updateUserHabitationAddress(t.tokenSession,n).then(()=>{g(!1),o(!0)}).catch(e=>{(null==e?void 0:e.isTokenExpired)?i():console.error("Failed to update addresss data",e),c(!0),g(!1)})}}else y({...b,...r}),o(!1)},noValidate:!0,id:"contactForm",method:"post",children:[(0,n.jsx)(nn,{children:"Mon adresse"}),(0,n.jsxs)("div",{className:"address-section",children:[(0,n.jsx)("h2",{children:"Modifier mon Adresse"}),(0,n.jsx)("span",{className:"help-info-required",children:"* Champs obligatoires"}),(0,n.jsx)(tk.A,{data:b.address,onBlur:e=>C(e),requiredLabelColor:l.Jy.black}),(0,n.jsx)(tk.A,{data:b.zipcode,onBlur:e=>C(e),requiredLabelColor:l.Jy.black}),(0,n.jsx)(tk.A,{data:b.city,onBlur:e=>C(e),requiredLabelColor:l.Jy.black})]}),(0,n.jsxs)("div",{className:"ep-Habitation--form",children:[(0,n.jsx)("h2",{children:"Mon habitation"}),(0,n.jsxs)("div",{className:"ep-Habitation--form--field",children:[(0,n.jsx)(tS.m,{data:b.typeHome,mainLabelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black},onChange:C}),(0,n.jsx)(tS.m,{data:b.typeStatut,mainLabelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black},onChange:C}),(0,n.jsx)(tP._,{data:b.area,onChange:C,min:0,max:9999,suffixLabel:"m2",colorText:l.Jy.black,labelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black}}),(0,n.jsx)(nt,{data:b.outsideList,onChange:e=>C(e),mainLabelStyle:{fontFamily:l.vX.NunitoSansBold,color:l.Jy.black}}),d&&(0,n.jsx)("p",{className:"ep-Habitation--error",children:eR.IW.GLOBAL}),(0,n.jsx)("div",{className:"ep-Habitation--button",children:(0,n.jsx)(ez.$,{isLoading:f,type:"submit",text:"Enregistrer",theme:"primaryRefonte",style:{textAlign:"left",marginTop:"40px"},buttonStyle:{minWidth:"200px"}})})]})]})]})}),(0,n.jsx)(p.E,{id:"confirmation",visible:s&&!d,onClose:()=>{o(!1)},center:!0,children:(0,n.jsxs)("div",{className:"ep-Habitation--popin",children:[(0,n.jsx)("h2",{children:"Merci !"}),(0,n.jsx)("p",{children:"Vos modifications ont bien \xe9t\xe9 enregistr\xe9es"})]})})]})});var nr=i(62556),ns=i(23287),no=i(89144);let nl=new k.CQ,nd={};async function nc(e){if(!(0,w.Bd)())return await nl.getStoreById(e);{if(nd[e])return nd[e];let t=await nl.getStoreById(e);return nd[e]=t,t}}async function np(e){let t=async e=>{let t,i,{day:n,mounth:a,year:r}=(0,I.zJ)(new Date(e.DateCreation)),s=await nc(e.MagasinId),o=Array.isArray(e.RefProduit)?e.RefProduit[0]:e.RefProduit,l=await (0,no.yj)(o);if(l){let e=(l.productSizeVariants?l.productSizeVariants.find(e=>e.entryId===o):null)||l;i={name:e?l.productName+" "+e.sizeLabel:l.productName,picture:l.productImagePush,url:e.url,price:e.unitCompareAtPrice?e.unitCompareAtPrice:e.unitPrice,unit:e.bySalesUnit,promo:e.unitCompareAtPrice?e.unitPrice:null,promoSaleRate:Number(String(e.productSaleRate).replace(/[-%]/g,""))}}return s&&(t={name:s.label,city:s.city,address:s.address,zipcode:s.zipcode,phone:s.phone?(0,I.n4)(s.phone):null,position:s.position}),{id:e.Id,date:new Date(e.DateCreation),statut:e.StatutProjetId,finished:e.StatutProjetId===nr.M$.STATUT_FINISHED,canceled:e.Canceled,productId:o,dateFormat:"".concat(n,"/").concat(a,"/").concat(r),quantity:e.Quantite,product:i,place:t}};return Promise.all(e.map(async e=>{try{return await t(e)}catch(e){return console.error("Failed to hydrate eresa",e),null}})).then(e=>e.filter(Boolean))}let nu=new W.oz,nm=async(e,t)=>nu.cancelEresaProject(t,{project_id:e}),nh=Promise.resolve(),nx=(0,j.un)(v.eF,(e,t)=>{if(e.loading)t({loading:!0});else if(e.error)t({loading:!1,error:e.error});else if(e.value){let i=e.value.Eresa;i?nh=np(i).then(e=>{t({loading:!1,value:e})}).catch(e=>{t({loading:!1,error:e})}):t({loading:!1,value:[]})}else t({loading:!1})},{loading:!0}),nf=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];await (0,v.xJ)(e),await nh},ng=o.default.div.withConfig({componentId:"sc-4626e5c-0"})([".order-link{text-decoration:underline;font-size:14px;line-height:19px;}"]),nb=o.default.div.withConfig({componentId:"sc-4626e5c-1"})(["display:flex;align-items:center;margin:0 0 15px;@media ","{display:none;}"],l.uk.tablet),nv=o.default.div.withConfig({componentId:"sc-4626e5c-2"})(["max-width:280px;width:100%;&:not(:last-of-type){margin-right:20px;}"]),ny=o.default.table.withConfig({componentId:"sc-4626e5c-3"})(["border-collapse:collapse;font-size:14px;line-height:19px;p{font-size:14px;line-height:19px;}"]),nj=o.default.thead.withConfig({componentId:"sc-4626e5c-4"})(["background:",";color:",";font-family:",";font-size:16px;line-height:22px;border:1px solid ",";@media ","{display:none;}"],l.Jy.fillGrey,l.Jy.blueDark,l.vX.NunitoSansBold,l.Jy.fillGrey,l.uk.tablet),nw=o.default.tbody.withConfig({componentId:"sc-4626e5c-5"})(["border:1px solid ",";@media ","{border:none;}"],l.Jy.fillGrey,l.uk.tablet),nC=o.default.tr.withConfig({componentId:"sc-4626e5c-6"})([""]),nN=o.default.th.withConfig({componentId:"sc-4626e5c-7"})(["padding:10px;text-align:left;&:nth-of-type(1),&:nth-of-type(4){width:15%;}&:nth-of-type(2),&:nth-of-type(3){width:30%;}&:nth-of-type(4){width:20%;}&:nth-of-type(5){width:10%;}"]),n_=o.default.tr.withConfig({componentId:"sc-4626e5c-8"})(["&:not(:last-of-type){border-bottom:1px solid ",";}@media ","{border:1px solid ",";display:block;padding:15px;&:not(:last-of-type){margin-bottom:10px;}}"],l.Jy.fillGrey,l.uk.tablet,l.Jy.fillGrey),nk=o.default.th.withConfig({componentId:"sc-4626e5c-9"})(["padding:20px 10px;text-align:left;font-size:16px;line-height:22px;font-family:",";font-weight:normal;&:nth-of-type(1),&:nth-of-type(4){width:10%;}&:nth-of-type(2),&:nth-of-type(3){width:30%;}&:nth-of-type(4){width:20%;}&:nth-of-type(5){width:20%;}a{display:block;}.link{text-decoration:underline;margin-top:5px;font-family:",";}.showOnMobile{font-family:",";display:none;}@media ","{display:block;height:auto;text-align:left;margin-bottom:5px;padding:0;&:nth-of-type(1),&:nth-of-type(2),&:nth-of-type(3),&:nth-of-type(4),&:nth-of-type(5){width:100%;margin-bottom:15px;}&:last-of-type{border-top:1px solid #ededf0;padding-top:15px;text-align:center;margin:15px 0 0;display:flex;align-items:center;justify-content:center;flex-direction:column;> span{margin-bottom:10px;}}.showOnMobile{display:initial;}}"],l.vX.NunitoSansRegular,l.vX.NunitoSansBold,l.vX.NunitoSansBold,l.uk.tablet),nS=o.default.div.withConfig({componentId:"sc-4626e5c-10"})(["max-width:90px;height:auto;margin-right:12px;"]),nI=o.default.a.withConfig({componentId:"sc-4626e5c-11"})(["flex:1;font-size:16px;line-height:22px;&:hover{text-decoration:underline;}"]),nA=o.default.div.withConfig({componentId:"sc-4626e5c-12"})(["display:flex;align-items:center;"]),nE=o.default.div.withConfig({componentId:"sc-4626e5c-13"})([""]),nT=o.default.a.withConfig({componentId:"sc-4626e5c-14"})(["text-decoration:underline;cursor:pointer;opacity:0.8;&:hover{opacity:1;}span{display:none;@media ","{display:initial;}}"],l.uk.tablet),nz=o.default.div.withConfig({componentId:"sc-4626e5c-15"})(["color:",';font-weight:bold;margin:0.5em 0;white-space:nowrap;&::before{content:" ";display:inline-block;width:0.5em;height:0.5em;margin-right:0.33em;position:relative;top:-0.1em;background:',";border-radius:50%;}"],e=>{let{success:t,warning:i}=e;return t?l.Jy.greenVif:i?l.Jy.persianRed:""},e=>{let{success:t,warning:i}=e;return t?l.Jy.greenVif:i?l.Jy.persianRed:""}),nL=e=>{let{eresa:t}=e;return t.canceled?(0,n.jsx)(nz,{warning:!0,children:"Annul\xe9e"}):t.finished?(0,n.jsx)(nz,{children:"Termin\xe9e"}):(0,n.jsx)(nz,{success:!0,children:"En cours"})};o.default.input.withConfig({componentId:"sc-4626e5c-16"}
1)(["height:40px;width:300px;border:1px solid ",";font-family:",";font-size:14px;line-height:19px;border-radius:30px;padding:10px 18px;color:",";&:focus,&:active,&:hover{outline:none;}&::placeholder{color:",";}"],l.Jy.blueDark,l.vX.NunitoSansRegular,l.Jy.blueDark,l.Jy.blueDark),o.default.div.withConfig({componentId:"sc-4626e5c-17"})(["cursor:pointer;position:absolute;right:-5px;top:55%;transform:translateY(-50%);"]),o.default.div.withConfig({componentId:"sc-4626e5c-18"})(["position:relative;"]);let nP=o.default.div.withConfig({componentId:"sc-4626e5c-19"})(["margin:40px;svg{display:block;margin:0 auto 15px;}"]),nO=o.default.div.withConfig({componentId:"sc-4626e5c-20"})(["display:flex;justify-content:center;align-items:center;margin-top:30px;a:first-of-type{margin-right:30px;}"]);o.default.div.withConfig({componentId:"sc-4626e5c-21"})(["margin-top:15px;font-size:14px;line-height:20px;"]);let nR=e=>{let{reservations:t}=e,i=(0,a.useRef)(null),r=(0,j.Pj)(v.kQ),[s,o]=(0,a.useState)(!1),d=(0,a.useRef)(""),[c,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,y]=(0,a.useState)(1),[w,C]=(0,a.useState)("all"),N=(0,a.useMemo)(()=>{let e=t;return b&&e.sort((e,t)=>new Date(b>0?t.date:e.date).getTime()-new Date(b?e.date:t.date).getTime()),"ongoing"===w?(e=e.filter(e=>e.statut!==nr.M$.STATUT_FINISHED),d.current="en cours"):"finished"===w?(e=e.filter(e=>e.statut===nr.M$.STATUT_FINISHED),d.current="termin\xe9e"):d.current="",e},[t,b,w]),_=(0,a.useCallback)(e=>{y(parseInt(e[0]))},[y]),k=(0,a.useCallback)(e=>{C(e[0])},[t]);return(0,a.useEffect)(()=>{f||o(!1)},[f]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ng,{ref:i,children:(0,n.jsxs)(nE,{children:[(0,n.jsxs)(nb,{children:[(0,n.jsx)(nv,{children:(0,n.jsx)(tL.A,{theme:"rounded",data:{id:"page",value:"page",valid:!0,typeMismatch:!0,placeholder:"Trier par date",labelText:"",required:!1,children:[{label:"Du plus r\xe9cent au plus ancien",value:"1"},{label:"Du plus ancien au plus r\xe9cent",value:"0"}]},onChange:_})}),(0,n.jsx)(nv,{children:(0,n.jsx)(tL.A,{data:{id:"page",value:"page",valid:!0,typeMismatch:!0,placeholder:"Filtrer par statut",labelText:"",required:!1,children:[{label:"Toutes",value:"all"},{label:"En cours",value:"ongoing"},{label:"Termin\xe9es",value:"finished"}]},onChange:k})})]}),(0,n.jsxs)(ny,{children:[(0,n.jsx)(nj,{children:(0,n.jsxs)(nC,{children:[(0,n.jsx)(nN,{children:"Date"}),(0,n.jsx)(nN,{children:"Produit"}),(0,n.jsx)(nN,{children:"Lieu"}),(0,n.jsx)(nN,{children:"Quantit\xe9"}),(0,n.jsx)(nN,{children:"Statut"})]})}),(0,n.jsx)(nw,{children:N.length>0?N.map((e,t)=>{var i,a;return(0,n.jsxs)(n_,{children:[(0,n.jsxs)(nk,{children:[(0,n.jsx)("span",{className:"showOnMobile",children:"Date : "}),e.dateFormat]}),(0,n.jsx)(nk,{children:(0,n.jsx)(nA,{children:(null==e?void 0:e.product)&&(0,n.jsxs)(n.Fragment,{children:[(null==e||null==(i=e.product)?void 0:i.picture)&&(0,n.jsx)(nS,{children:(0,n.jsx)(iO.VI,{srcDesktop:e.product.picture,alt:e.product.name,adaptativeContent:!0})}),(0,n.jsx)(tf(),{href:"/produit/[product]",as:e.product.url,passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(nI,{title:e.product.name,children:e.product.name})})]})})}),(0,n.jsx)(nk,{children:(null==(a=e.place)?void 0:a.city)?(0,n.jsxs)(n.Fragment,{children:[e.place.name,(0,n.jsx)("br",{}),e.place.address,(0,n.jsx)("br",{}),e.place.city," ",e.place.zipcode,(0,n.jsx)("br",{}),e.place.phone,(0,n.jsx)(x.m,{title:"Trouver itin\xe9raire",href:"https://www.google.com/maps?daddr=".concat(e.place.position.latitude,",").concat(e.place.position.longitude),target:"_blank",className:"link",color:l.Jy.ocher,children:(0,n.jsx)("span",{children:"Itin\xe9raire"})})]}):"Aucun magasin n'a \xe9t\xe9 trouv\xe9"}),(0,n.jsxs)(nk,{children:[(0,n.jsx)("span",{className:"showOnMobile",children:"Quantit\xe9 : "}),(0,n.jsx)("span",{children:e.quantity})]}),(0,n.jsxs)(nk,{children:[(0,n.jsx)(nL,{eresa:e}),!e.finished&&(0,n.jsxs)(nT,{onClick:t=>{t.preventDefault,g(e)},children:["Annuler ",(0,n.jsx)("span",{children:"la e-r\xe9servation"})]})]})]},t)}):(0,n.jsx)(n_,{children:(0,n.jsxs)(nk,{colSpan:6,className:"empty",children:["Aucune e-r\xe9servation ",d.current]})})})]})]})}),(0,n.jsx)(p.E,{id:"deleteConfirmation",visible:null!=f,setShowModal:()=>g(null),children:(0,n.jsx)(nP,{children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eJ.Ay,{}),(0,n.jsx)("p",{children:"Annulation de la r\xe9servation"})]}):m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Une erreur a \xe9t\xe9 rencontr\xe9e lors de l'annulation. Veuillez r\xe9essayer ult\xe9rieurement."}),(0,n.jsx)(ez.z,{text:"Fermer",theme:"primaryRefonte",border:!1,onClick:e=>{e.preventDefault(),h(!1),g(null)}})]}):s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{children:[(0,n.jsx)(ns.default,{}),"La e-r\xe9servation a bien \xe9t\xe9 annul\xe9e."]}),(0,n.jsx)(ez.z,{text:"OK",theme:"primaryRefonte",border:!1,onClick:e=>{e.preventDefault(),h(!1),g(null)}})]}):(0,n.jsxs)(n.Fragment,{children:["Voulez-vous vraiment annuler cette e-reservation ?",(0,n.jsxs)(nO,{children:[(0,n.jsx)(ez.z,{text:"Oui",theme:"primaryRefonte",border:!1,onClick:e=>{e.preventDefault(),r&&(u(!0),nm(f.id,r.getCurrentToken()).then(async()=>{try{await nf()}catch(e){console.warn("Failed to refresh eresa",e)}f==f&&(u(!1),h(!1),o(!0))}).catch(e=>{console.error("Failed to cancel Eresa",e),u(!1)}))}}),(0,n.jsx)(ez.z,{text:"Non",theme:"primaryRefonte",border:!1,onClick:e=>{e.preventDefault(),g(null)}})]})]})})})]})},nJ=o.default.div.withConfig({componentId:"sc-aaf19e9e-0"})(["background:",";text-align:center;box-shadow:rgb(112 112 112 / 50%) 0px 0px 8px 0px;padding:45px 20px;margin-bottom:50px;"],l.Jy.white),nM=o.default.h3.withConfig({componentId:"sc-aaf19e9e-1"})(["text-transform:uppercase;font-size:20px;line-height:24px;font-family:",";margin:0 0 16px;text-align:center;"],l.vX.Glendale),nD=o.default.p.withConfig({componentId:"sc-aaf19e9e-2"})(["margin:0 0 20px;"]),nF=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(nJ,{children:[(0,n.jsx)(nM,{children:"Pas encore de e-r\xe9servations\xa0?"}),(0,n.jsxs)(nD,{children:["Nous attendons avec impatience votre premi\xe8re e-r\xe9servation.",(0,n.jsx)("br",{}),"Nâh\xe9sitez pas \xe0 parcourir nos univers\xa0!"]}),(0,n.jsx)(ez.z,{url:ey.dE.tendances,text:"Je m'inspire",theme:"primaryRefonte",fullWidth:!1})]})}),nV=o.default.div.withConfig({componentId:"sc-c5bcb2a4-0"})([""]),nq=o.default.h2.withConfig({componentId:"sc-c5bcb2a4-1"})(["text-transform:uppercase;font-family:",";color:",";font-size:34px;line-height:44px;margin:0 0 30px 0;@media ","{font-size:22px;line-height:28px;}"],l.vX.Glendale,l.Jy.darkblue,l.uk.tablet);var nB=i(41053);let nX=o.default.div.withConfig({componentId:"sc-1e89d733-0"})([".back-button{margin-bottom:20px;
1display:flex;align-items:center;color:",";font-family:",";cursor:pointer;svg{margin-right:2px;}}.h3-title{color:",";font-family:Glendale;font-size:20px;letter-spacing:0;line-height:24px;text-transform:uppercase;margin:0 0 15px 0;}.bold{font-family:",";}.ocher{color:",";}"],l.Jy.blueDark,l.vX.NunitoSansBold,l.Jy.black,l.vX.NunitoSansBold,l.Jy.ocher),nH=o.default.div.withConfig({componentId:"sc-1e89d733-1"})(["box-sizing:border-box;border:1px solid #ededf0;padding:20px;display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin-bottom:50px;div{margin:0 0 10px 0;}.delete-button{cursor:pointer;display:flex;align-items:center;.delete-button-text{font-size:16px;letter-spacing:0;line-height:22px;margin-left:10px;@media ","{display:none;}}}"],l.uk.mobileL),nG=o.default.div.withConfig({componentId:"sc-1e89d733-2"})(["display:flex;@media ","{flex-direction:column;}.project-description{width:100%;margin-left:60px;border:1px solid ",";@media ","{margin:0;}}.header-description{background-color:",";height:70px;display:flex;align-items:center;justify-content:center;.h3-title{margin:0;}}.content-description{padding:15px 20px;.category-description-title{font-size:18px;margin:0;}}.product-card-container{display:flex;flex-direction:column;align-items:center;.h3-title{margin:0;}}"],l.uk.tablet,l.Jy.grisWhite,l.uk.tablet,l.Jy.grisWhite),nU=o.default.div.withConfig({componentId:"sc-1e89d733-3"})(["margin-top:30px;text-align:center;.third-section-cards-container{display:flex;@media ","{flex-direction:column;}}.third-section-card{p{margin:0 0 15px 0;}display:flex;align-items:center;justify-content:center;width:100%;height:477px;box-shadow:0 0 10px 0 rgba(87,91,102,0.3);flex-direction:column;padding:10px 90px;&:first-child{margin:0 30px 0 0;@media ","{margin:0 0 30px 0;}}.h3-title{margin:15px 0;}.address-line{text-transform:capitalize;}.text-link{cursor:pointer;text-decoration:underline;margin:15px 0;}.download-pdf{a{font-family:",";text-decoration:underline;display:flex;align-items:center;svg{margin-right:10px;}}}.store-coord{span{font-size:16px;letter-spacing:0;line-height:22px;display:block;}}}"],l.uk.tablet,l.uk.tablet,l.vX.NunitoSansBold),nW=e=>{let{estimationData:t}=e,[i,s]=(0,a.useState)(null),[o,l]=(0,a.useState)(!0),[d,c]=(0,a.useState)(!1),{store:p,setMyStore:u}=(0,eW.L)(),{showSearchShopModal:m}=(0,eQ.hS)(),h=e=>{u(e)};(0,a.useEffect)(()=>
1{l(!0),(0,no.eH)(t.ArtPrj[0].ProduitQct).then(e=>{s((e=>({url:e.url,price:e.unitCompareAtPrice?e.unitCompareAtPrice:e.unitPrice,unit:e.bySalesUnit,isNew:!1,promoTag:e.productSaleRate?[e.productSaleRate.toString()]:null,stickers:null,img:e.productImagePush,text:e.productName,sku:e.entryId,promo:e.unitCompareAtPrice?e.unitPrice:null,contentTypeId:e.contentTypeId}))(e)),l(!1)}).catch(e=>{console.error("Failed to load product linked to estimation",e),l(!1),c(!0),s(null)})},[t.ArtPrj[0].ProduitQct]);let f=(0,r.useRouter)();return(0,n.jsxs)(nX,{children:[(0,n.jsx)(tf(),{href:ey.dE.epEstimation,children:(0,n.jsxs)("div",{className:"back-button",children:[(0,n.jsx)(tH.default,{width:14}),(0,n.jsx)("span",{children:"Retour"})]})}),(0,n.jsxs)(nH,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"h3-title",children:"Titre"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"bold",children:"Cr\xe9\xe9 le : "}),(0,n.jsx)("span",{children:t.DateProjet})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"bold",children:"Surface :"}),(0,n.jsxs)("span",{children:[" ",t.surface]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"bold",children:"Quantit\xe9 : "}),(0,n.jsx)("span",{children:t.quantity})]}),(0,n.jsxs)("div",{className:"bold ocher",children:[(0,n.jsx)("span",{children:"Estimation : "}),(0,n.jsx)("span",{children:0})]})]}),(0,n.jsxs)("div",{onClick:()=>{},className:"delete-button",children:[(0,n.jsx)(nB.default,{width:21,height:21}),(0,n.jsx)("span",{className:"delete-button-text",children:"Supprimer"})]})]}),(0,n.jsx)(nG,{children:(0,n.jsxs)("div",{className:"product-card-container",children:[(0,n.jsx)("h3",{className:"h3-title",children:"Le produit qui m'int\xe9resse"}),d?(0,n.jsx)("p",{children:eR.IW.GLOBAL}):!o&&i?(0,n.jsx)(iZ,{product:i}):(0,n.jsx)(eJ.Ay,{})]})}),(0,n.jsxs)(nU,{children:[(0,n.jsx)("h2",{className:"page-title",children:"Je finalise mon projet"}),(0,n.jsx)("div",{className:"third-section-cards-container",children:(0,n.jsxs)("div",{className:"third-section-card",children:[(0,n.jsx)(tl.default,{width:64,height:64}),(0,n.jsx)("h3",{className:"h3-title",children:"Mon magasin"}),p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{children:["Rendez-vous dans votre magasin Saint Maclou de ",p.label]}),(0,n.jsxs)(ez.$,{onClick:()=>{f.push(ey.dE.appointmentScheduling)},theme:"primaryRefonte",children:[(0,n.jsx)(eE.default,{}),"Prendre RDV"]}),(0,n.jsx)(x.m,{href:"#",className:"text-link",children:"Changer de magasin"}),(0,n.jsx)("p",{children:(0,n.jsxs)("i",{children:["Ouvert aujourd'hui jusqu'\xe0 ",p.endOpen]})}),(0,n.jsxs)("div",{className:"store-coord",children:[(0,n.jsx)("span",{className:"address-line",children:p.address}),(0,n.jsxs)("span",{children:[p.city," ",p.zipcode]}),(0,n.jsx)("span",{children:(0,I.n4)(p.phone)})]}),(0,n.jsx)(x.m,{href:ey.dE.magasinsDeco+"?direction="+p.value,className:"ocher text-link bold",children:"Itineraire"})]}):(0,n.jsx)(x.m,{href:"#",onClick:e=>{e.preventDefault(),m({onSelectStore:h,ResultComponent:eZ.c,nLoadedStores:139})},children:"Trouver mon magasin le plus proche"})]})})]})]})};var nQ=i(29076),nZ=i(69280);let n$=o.default.div.withConfig({componentId:"sc-44014e7f-0"})(["position:relative;display:flex;flex-direction:column;align-items:center;box-shadow:0 0 10px 0 rgba(87,91,102,0.3);padding:20px;box-sizing:border-box;min-height:415px;@media ","{min-height:0;}.card-title{font-family:",";font-size:20px;text-align:left;width:100%;margin:10px 0;text-transform:uppercase;line-height:24px;letter-spacing:0;}.card-description{font-family:",";text-align:left;margin-bottom:20px;width:100%;}.button{width:100%;@media ","{font-size:16px;}@media ","{font-size:14px;}}.estimation-price{color:",";font-family:",";margin-bottom:10px;margin-top:15px;}.bold-text{font-family:",";}"],l.uk.tablet,l.vX.Glendale,l.vX.NunitoSansRegular,l.uk.laptopL,l.uk.laptop,l.Jy.darkblue,l.vX.NunitoSansBold,l.vX.NunitoSansBold),nY=o.default.div.withConfig({componentId:"sc-44014e7f-1"})(["width:100%;display:flex;height:40px;align-items:center;margin-bottom:25px;@media ","{border-top:2px solid ",";}span{margin-left:14px;color:",";font-family:",";text-transform:uppercase;font-size:14px;height:10px;}"],l.uk.tablet,l.Jy.ocher,l.Jy.ocher,l.vX.Glendale),nK=e=>{let{title:t,date:i,buttonOnClickHandle:a,className:r="",estimationPrice:s,totalPrice:o,imageBase64:l,imageUrl:d,csmType:c,productName:p,projectName:u}=e,m=s||o;return(0,n.jsxs)(n$,{className:r,children:[l?(0,n.jsx)(iO.VI,{srcDesktop:"data:image/jpg;base64,"+l,alt:"",adaptativeContent:!0}):d&&(0,n.jsx)(iO.VI,{srcDesktop:d,alt:"",adaptativeContent:!0,rawSrc:!0}),c&&(0,n.jsx)(nY,{children:"carpet"===c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(nQ.default,{width:40,height:40}),(0,n.jsx)("span",{children:"Tapis sur mesure"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(nZ.default,{width:40,height:40}),(0,n.jsx)("span",{children:"R\xe9novation dâescalier"})]})}),t&&(0,n.jsx)("h3",{className:"card-title",children:t}),(0,n.jsxs)("div",{className:"card-description",children:[u&&(0,n.jsxs)("div",{className:"description-line",children:[(0,n.jsx)("span",{className:"bold-text",children:"Nom du projet\xa0: "}),u]}),(0,n.jsxs)("div",{className:"description-line",children:[(0,n.jsx)("span",{className:"bold-text",children:"Cr\xe9\xe9 le\xa0: "}),String(i).replace(/-/g,".")]}),p&&(0,n.jsxs)("div",{className:"description-line",children:[(0,n.jsx)("span",{className:"bold-text",children:"Produit\xa0: "}),p]}),m&&!Number.isNaN(m)?(0,n.jsxs)("div",{className:"estimation-price",children:[s?(0,n.jsx)(n.Fragment,{children:"Estimation\xa0: "}):(0,n.jsx)(n.Fragment,{children:"Total\xa0: "}),(0,P.DK)(m)]}):null]}),"string"==typeof a?(0,n.jsx)(ez.z,{isOnBgColor:!0,text:"Voir le d\xe9tail",theme:"primaryRefonte",url:a,style:{width:"100%",marginTop:"auto"}}):(0,n.jsx)(ez.$,{isOnBgColor:!0,text:c?"Ouvrir ma configuration":"Voir le d\xe9tail",theme:"primaryRefonte",onClick:a,style:{width:"100%",marginTop:"auto"}})]})},n0=o.default.div.withConfig({componentId:"sc-f6b6c669-0"})(["width:100%;.page-content{width:100%;display:grid;grid-template-columns:repeat(3,1fr);grid-column-gap:30px;grid-row-gap:30px;margin-bottom:50px;}.page-title{font-family:",";text-transform:uppercase;font-size:34px;line-height:44px;color:",";margin:0 0 30px 0;}"],l.vX.Glendale,l.Jy.darkblue);var n1=i(30241);let n2=o.default.div.withConfig({componentId:"sc-c1f08c58-0"})(["h2,h3{font-family:",";text-align:left;color:",";text-transform:uppercase;}h3{font-size:20px;text-align:center;}.page-title{font-size:34px;line-height:44px;margin:0 0 30px 0;}.dot{height:8px;width:8px;background-color:",";border-radius:50%;display:inline-block;margin-right:6px;}.greenVif{color:",";}.underline{text-decoration:underline;}"],l.vX.Glendale,l.Jy.darkblue,l.Jy.greenVif,l.Jy.greenVif),n5=o.default.div.withConfig({componentId:"sc-c1f08c58-1"})(["box-shadow:0 0 10px 0 rgba(87,91,102,0.3);text-align:center;padding:20px;margin-bottom:50px;.next-appointment-title{font-size:20px;letter-spacing:0;line-height:24px;text-align:center;}.next-appointment-date{color:",";font-family:",";}"],l.Jy.ocher,l.vX.NunitoSansBold),n3=o.default.table.withConfig({componentId:"sc-c1f08c58-2"})(["border-collapse:collapse;font-size:14px;line-height:19px;p{font-size:14px;line-height:19px;}"]),n4=o.default.thead.withConfig({componentId:"sc-c1f08c58-3"})(["background:",";color:",";font-family:",";font-size:16px;line-height:22px;border:1px solid ",";@media ","{display:none;}"],l.Jy.fillGrey,l.Jy.blueDark,l.vX.NunitoSansBold,l.Jy.fillGrey,l.uk.tablet),n6=o.default.tbody.withConfig({componentId:"sc-c1f08c58-4"})(["border:1px solid ",";@media ","{border:none;}"],l.Jy.fillGrey,l.uk.tablet),n8=o.default.tr.withConfig({componentId:"sc-c1f08c58-5"})([""]),n9=o.default.th.withConfig({componentId:"sc-c1f08c58-6"})(["padding:10px;text-align:left;width:15%;"]),n7=o.default.tr.withConfig({componentId:"sc-c1f08c58-7"})(["&:not(:last-of-type){border-bottom:1px solid ",";}@media ","{border:1px solid ",";display:block;padding:15px;&:not(:last-of-type){margin-bottom:10px;}}"],l.Jy.fillGrey,l.uk.tablet,l.Jy.fillGrey),ae=o.default.th.withConfig({componentId:"sc-c1f08c58-8"})(["padding:20px 10px;width:20%;text-align:left;font-size:16px;line-height:22px;font-family:",';font-weight:normal;width:15%;a{display:block;}
1&.status{p{display:inline-block;margin:0;position:relative;padding-left:20px;&:before{content:"";width:14px;height:14px;position:absolute;left:0;top:50%;transform:translateY(-55%);background:',";border-radius:50%;}&.red{&:before{background:",";}}&.green{&:before{background:",";}}&.orange{&:before{background:",";}}}}span.mobile{font-family:",";}.mobile{display:none;}@media ","{display:block;height:auto;text-align:left;margin-bottom:5px;width:100%;padding:0;.mobile{display:inline-block;}}"],l.vX.NunitoSansRegular,l.Jy.black,l.H9.red,l.H9.green,l.H9.orange,l.vX.NunitoSansBold,l.uk.tablet),at=o.default.div.withConfig({componentId:"sc-c1f08c58-9"})(["display:flex;@media ","{flex-direction:column;}div{margin-right:5px;}"],l.uk.mobileL),ai={pending:{label:"En cours de validit\xe9",color:l.Jy.yellowOrange},signed:{label:"Accept\xe9s",color:l.Jy.greenVif},expired:{label:"Expir\xe9s",color:l.Jy.greyPrimary}};var an=function(e){return e.ALL="all",e.PENDING="pending",e.SIGNED="signed",e.EXPIRED="expired",e}({});let aa=Object.values(an);async function ar(e){{let t=(0,S.F)(),i=await fetch("".concat(t,"/api/customer/quotes"),{method:"POST",body:JSON.stringify({clientToken:e}),headers:{"Content-Type":"application/json"}});if(!i.ok)throw console.error("Bad response",await i.text()),Error("Bad response");return await i.json()}}let as=async e=>{let{quotes:t}=await ar(e),i={},n=new k.CQ,a=await G(e,U.QUOTE);return await Promise.all(t.filter(e=>"cancelled"!==e.status).map(async e=>{var t;let r=await (e=>(i[e]||(i[e]=n.getStoreById(e)),i[e]))(e.store_id),s=null==a||null==(t=a.find(t=>t.id===e.id))?void 0:t.name;return((e,t,i)=>{let n=new Date(e.updated_at),{day:a,mounth:r,year:s}=(0,I.zJ)(n),o="".concat(a,"/").concat(r,"/").concat(s),l=new Date,d=new Date(e.updated_at);d.setDate(d.getDate()+30);let c=e.status===an.PENDING&&l.getTime()>d.getTime();return{id:e.id,status:c?an.EXPIRED:e.status,date:n,dateFormat:o,price:parseFloat((0,w.Ar)(e.amount_in_cent)),documentName:t,store:i?{label:i.label,phone:i.phone,url:i.slug}:null}})(e,s,r)}))},ao=async e=>await as(e),al=(0,j.T5)(!1),ad=(0,j.T5)(0),ac=()=>{ad.update(w.GV)},ap=null,au=0,am=(0,j.un)([v.kQ,ad],(e,t)=>{let[i,n]=e,a=ap;if(ap=i,a===i&&au===n)return;if(au=n,a!==i&&t([]),!i)return void al.set(!1);let r=i.getCurrentToken();if(!r)return;a!==i&&al.set(!0);let s=!1;return ao(r).then(async e=>{s||(t(e),al.set(!1))}).catch(e=>{console.error("Failed to load customer quotes for client",null==i?void 0:i.clientId,e),s||al.set(!1)}),()=>{s=!0}},[]);(0,j.un)(am,e=>{let t=e.sort((e,t)=>e.date.getTime()-t.date.getTime());return t[t.length-1]});var ah=i(67914);let ax=o.default.div.withConfig({componentId:"sc-71fd5d8a-0"})(["border:1px solid ",";padding:30px;column-gap:20px;row-gap:15px;display flex;align-items:center;@media ","{flex-direction:column;padding:15px;align-items:flex-start;}strong{font-family:",";}.quote-line{&__column{&:nth-of-type(1){flex:0 0 25%;}&:nth-of-type(2){flex:0 0 25%;}&:nth-of-type(3){flex:0 0 15%;text-align:right;margin:0 30px 0 auto;}@media ","{width:100%;&:nth-of-type(1),&:nth-of-type(2),&:nth-of-type(3){flex:initial;}&:nth-of-type(3){text-align:left;margin:0;}}}&__number{strong{font-size:20px;display:block;}}&__status{margin-top:5px;color:",';position:relative;padding-left:15px;&:before{content:"";width:8px;height:8px;border-radius:50%;position:absolute;background-color:',";top:5px;left:0;}}&__price{font-size:24px;strong{white-space:nowrap;}@media ","{font-size:20px;}}&__store{margin-top:7px;a{text-decoration:underline;}}&__contact{color:",";margin-top:15px;text-align:center;span{display:flex;align-items:center;justify-content:center;column-gap:5px;margin-top:8px;}&.mobile{display:none;}@media ","{&.mobile{display:block;}&.desktop{display:none;}}}}"],l.Jy.grisWhite,l.uk.tablet,l.vX.NunitoSansBold,l.uk.tablet,e=>{let{statusColor:t}=e;return t},e=>{let{statusColor:t}=e;return t},l.uk.tablet,l.Jy.blueDark,l.uk.tablet),af=e=>{let{quote:t}=e;return(0,n.jsxs)(ax,{statusColor:ai[t.status].color,children:[(0,n.jsxs)("div",{className:"quote-line__column",children:[(0,n.jsxs)("div",{className:"quote-line__number",children:["Devis n\xb0",(0,n.jsx)("strong",{children:t.id})]}),(0,n.jsx)("div",{className:"quote-line__status",children:ai[t.status].label})]}),(0,n.jsxs)("div",{className:"quote-line__column",children:[(0,n.jsxs)("div",{className:"quote-line__date",children:[(0,n.jsx)("strong",{children:"En date du :"})," ",t.dateFormat]}),t.store&&(0,n.jsxs)("div",{className:"quote-line__store",children:["\xe0"," ",(0,n.jsx)(x.m,{href:t.store.url,children:(0,n.jsxs)(n.Fragment,{children:["Saint-Maclou ",t.store.label]})})]})]}),(0,n.jsx)("div",{className:"quote-line__column",children:(0,n.jsx)("div",{className:"quote-line__price",children:(0,n.jsx)("strong",{children:(0,P.DK)(t.price)})})}),(0,n.jsxs)("div",{className:"quote-line__column",children:[t.documentName&&(0,n.jsx)(ez.$,{onClick:()=>tK(t.documentName,U.QUOTE),text:"Consulter mon devis",theme:"secondaryRefonte",fullWidth:!0,border:!0}),t.store&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"quote-line__contact desktop",children:["Contacter mon magasin au\xa0 :",(0,n.jsxs)("span",{children:[(0,n.jsx)(ah.IconPhone,{width:"20",height:"20"}),(0,n.jsx)("strong",{children:(0,I.n4)(t.store.phone)})]})]}),(0,n.jsx)("div",{className:"quote-line__contact mobile",children:(0,n.jsxs)(t$.A,{url:"tel:".concat(t.store.phone),theme:"primaryRefonte",fullWidth:!0,border:!1,children:[(0,n.jsx)(ah.IconPhone,{})," Appeler mon magasin"]})})]})]})]})},ag=o.default.div.withConfig({componentId:"sc-f57f108f-0"})(["background:",";text-align:center;box-shadow:rgb(112 112 112 / 50%) 0px 0px 8px 0px;padding:45px 20px;margin-bottom:50px;text-transform:uppercase;font-size:20px;line-height:24px;font-family:",";margin:0 0 16px;text-align:center;"],l.Jy.white,l.vX.Glendale),ab=()=>(0,n.jsx)(ag,{children:(0,n.jsx)("div",{children:"Vous n'avez pas encore de devis"})}),av=o.default.div.withConfig({componentId:"sc-7e2a4000-0"})([".quotes{&__list{gap:30px;display:grid;}&__sort{margin-bottom:30px;> div{max-width:280px;}}&__pagination{margin-top:50px;}}"]),ay=e=>{let{quoteLines:t,quoteLinesIsLoading:i}=e,[r,s]=(0,a.useState)([]),[o,l]=(0,a.useState)(1),[d,c]=(0,a.useState)(["0"]);(0,a.useEffect)(()=>{p(d,t)},[t,d]),(0,a.useEffect)(()=>{tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes devis"})},[]);let p=(0,a.useCallback)((e,t)=>{let i=[...t||r];i.sort((t,i)=>(parseInt(e[0])?t.date:i.date).getTime()-(parseInt(e[0])>0?i.date:t.date).getTime()),c(e),s(i)},[r]),u=(0,a.useCallback)(()=>{l(o+1)},[o]),m=6*o;return(0,n.jsx)(av,{children:i?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eJ.Ay,{})}):t.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"quotes__sort",children:(0,n.jsx)(tL.A,{theme:"rounded",data:{id:"page",value:"page",valid:!0,t
1ypeMismatch:!0,placeholder:"Trier par date",labelText:"",required:!1,children:[{label:"Du plus r\xe9cent au plus ancien",value:"0"},{label:"Du plus ancien au plus r\xe9cent",value:"1"}]},onChange:e=>{p(e)}})}),(0,n.jsx)("div",{className:"quotes__list",children:r.length>0&&r.slice(0,m).map((e,t)=>(0,n.jsx)(af,{quote:e},t))}),t.length>m&&(0,n.jsx)("div",{className:"quotes__pagination",children:(0,n.jsxs)(ez.$,{type:"button",theme:"primaryRefonte",border:!1,onClick:()=>{u()},children:["Voir plus de devis (",t.length-m,")"]})})]}):(0,n.jsx)(ab,{})})};var aj=i(98457);let aw=o.default.div.withConfig({componentId:"sc-19407103-0"})([".quotes{&__filters{display:flex;margin-bottom:30px;@media ","{font-size:16px;overflow-x:auto;}}&__filter{flex:1;padding:20px 0;text-align:center;font-family:",";font-size:20px;cursor:pointer;border-bottom:1px solid ",";color:rgba(87,91,102,0.5);@media ","{font-size:16px;flex:initial;flex-shrink:0;padding:15px;}&.active{color:",";border-bottom:5px solid ",";}}}"],l.uk.tablet,l.vX.NunitoSansBold,l.Jy.grisWhite,l.uk.tablet,l.Jy.blueDark,l.Jy.blueDark),aC=()=>{let{quoteLines:e,quoteLinesIsLoading:t}=(e=>(e&&(0,a.useEffect)(ac,e),{quoteLines:(0,j.Pj)(am),quoteLinesIsLoading:(0,j.Pj)(al)}))(),[i,r]=(0,a.useState)(e),[s,o]=(0,a.useState)(an.ALL);(0,a.useEffect)(()=>{e&&l(s)},[e]);let l=t=>{if(o(t),t===an.ALL)return void r(e);r(e.filter(e=>e.status===t))};return(0,n.jsxs)(aw,{children:[(0,n.jsx)("div",{className:"quotes__filters",children:aa.map((e,t)=>(0,n.jsx)("div",{className:(0,aj.A)("quotes__filter",s===e&&"active"),onClick:()=>l(e),children:e===an.ALL?"Tous les devis":ai[e].label},t))}),(0,n.jsx)(ay,{quoteLines:i,quoteLinesIsLoading:t})]})},aN=o.default.div.withConfig({componentId:"sc-b9890d74-0"})([".quotes{&__title{text-transform:uppercase;font-family:",";color:",";font-size:34px;line-height:44px;margin:0 0 30px 0;@media ","{font-size:22px;line-height:28px;}}}"],l.vX.Glendale,l.Jy.darkblue,l.uk.tablet),a_=(0,h.ID)(()=>((0,tI.Or)({cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes devis"}),(0,n.jsx)(aN,{children:(0,n.jsxs)("div",{className:"quotes__container",children:[(0,n.jsx)("h2",{className:"quotes__title",children:"Mes devis en magasin"}),(0,n.jsx)("p",{className:"quotes__info",children:"Si vous venez d'obtenir un devis il s'affichera ici sous quelques heures."}),(0,n.jsx)(aC,{})]})})));var ak=i(64770),aS=i(14697),aI=i(39082),aA=i(59892),aE=i(8557),aT=i(21585),az=i(6958);async function aL(e){{let t=await fetch("/api/buyapowa/user_token",{method:"GET",headers:{"x-tsm-user-auth":e}});if(!t.ok)throw Error("HTTP Error (".concat(t.status,"): ").concat(await t.text()));return await t.json()}}let aP=o.default.div.withConfig({componentId:"sc-e036cd6d-0"})(['.c-parrainage__contentWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:8px 16px 16px;}.c-parrainage__contentWrapper__title{font-size:32px;font-weight:550;font-family:Jost;text-align:center;line-height:38px;& sup{font-size:15px;}}.c-parrainage__inputContainer{display:flex;align-items:center;position:relative;max-width:424px;width:100%;}.c-parrainage__button{position:absolute;right:4px;bottom:4px;height:100%;}.c-parrainage__input{position:relative;width:100%;&:after{content:"";position:absolute;top:50%;left:4px;width:95%;height:24px;background-color:rgba(245,246,248,0.4);backdrop-filter:blur(3px);}}.c-parrainage__contentWrapper__text{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:8px;}.c-parrainage__separator{width:100%;height:1px;background-color:#e0e0e0;border:none;margin:48px 0;}.c-parrainage__iframe{display:flex;justify-content:center;align-items:center;height:496px;width:100%;background-color:#f5f5f5;border-radius:8px;}.c-parrainage__faq{display:flex;flex-direction:column;padding:24px 16px;gap:8px;align-items:center;.c-parrainage__faq__content{width:100%;display:flex;flex-direction:column;gap:24px;}.c-parrainage__faq__title{font-size:28px;font-family:Jost,sans-serif;font-weight:550;text-align:left;width:100%;margin:0;}}.c-parrainage__terms{display:flex;flex-direction:column;gap:8px;padding:72px 24px 0px;
1& .c-parrainage__terms__content{& .c-parrainage__terms_contentTitle{font-size:12px;font-weight:700;}& .c-parrainage__terms__contentText{font-size:12px;}}}.c-parrainage__link{text-decoration:underline;}.list-style{list-style:disc;margin-left:20px;}']),aO=(0,o.default)(aA.A).withConfig({componentId:"sc-e036cd6d-1"})(['.c-modalParrainageInfo__content{padding:24px 40px;display:flex;flex-direction:column;align-items:center;gap:32px;@media screen and (max-width:768px){padding:32px 24px 24px;}}.c-modalParrainageInfo__title{font-size:24px;font-family:"Jost";font-weight:550;color:var(--color-text);text-align:left;width:100%;}.c-modalParrainageInfo__separator{width:100%;height:1px;background-color:#e0e0e0;border:none;margin:24px 0;}.c-modalParrainageInfo__text{display:flex;flex-direction:column;gap:16px;font-size:18px;font-family:"Nunito";.c-modalParrainageInfo__textItem strong{font-family:',";font-weight:700;}}.c-modalParrainageInfo__containerText{display:flex;flex-direction:column;gap:12px;.c-modalParrainageInfo__textItemLight{color:#4b5563;}}"],aE.vX.NunitoSansBold);function aR(){let e=(0,a.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(aP,{children:[(0,n.jsxs)("div",{className:"c-parrainage__contentWrapper",children:[(0,n.jsxs)("p",{className:"c-parrainage__contentWrapper__title",children:["Parrainez vos proches et soyez r\xe9compens\xe9\xa0",(0,n.jsx)("sup",{children:"(1)"})]}),(0,n.jsxs)("div",{className:"c-parrainage__inputContainer",children:[(0,n.jsx)(aS.A,{type:"text",placeholder:"https://saint-maclou.com/parrainage",className:"c-parrainage__input",disabled:!0,children:"Votre lien de parrainage :"}),(0,n.jsx)(aI.A,{className:"c-parrainage__button",variant:"secondary",style:"ghost",icon:"icon-chevron-right",disabled:!0})]}),(0,n.jsxs)("div",{className:"c-parrainage__contentWrapper__text",children:[(0,n.jsx)("p",{children:"Vous ne pouvez pas encore parrainer vos proches."}),(0,n.jsx)(aI.A,{style:"link",size:"xl",onClick:()=>{var t;return null==(t=e.current)?void 0:t.open()},children:"Comment devenir parrain\xa0?"})]})]}),(0,n.jsx)(aJ,{modalRef:e}),(0,n.jsx)("hr",{className:"c-parrainage__separator"})]}),(0,n.jsx)(ak.A,{title:"Le parrainage Saint Maclou",titleSup:"(2)"})]})}let aJ=e=>{let{modalRef:t}=e;return(0,n.jsx)(aO,{title:"Comment obtenir mon lien de parrainage ?",variant:"sidebar",size:"xxs",ref:t,noHeader:!0,children:(0,n.jsxs)("div",{className:"c-modalParrainageInfo__content",children:[(0,n.jsx)("p",{className:"c-modalParrainageInfo__title",children:"Comment devenir parrain ?"}),(0,n.jsxs)("div",{className:"c-modalParrainageInfo__text",children:[(0,n.jsxs)("p",{className:"c-modalParrainageInfo__textItem",children:["Pour pouvoir parrainer vos proches, vous devez avoir r\xe9alis\xe9"," ",(0,n.jsx)("strong",{children:"un achat de plus de 500\xa0â¬"})," depuis le 1er janvier 2022."," "]}),(0,n.jsx)("hr",{className:"c-modalParrainageInfo__separator"}),(0,n.jsxs)("div",{className:"c-modalParrainageInfo__textItem c-modalParrainageInfo__containerText",children:[(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"Vous pensez remplir les conditions mais vous n'avez pas acc\xe8s \xe0 votre code ?"})}),(0,n.jsx)("p",{className:"c-modalParrainageInfo__textItemLight",children:"Une erreur est peut-\xeatre survenue. Contactez-nous pour obtenir plus d'aide."})]})]}),(0,n.jsx)(aI.A,{variant:"secondary",style:"solid",size:"xl",isLink:!0,onClick:()=>s().push(ey.dE.contactFormulaire),children:"Contacter le service client"})]})})};function aM(e){let{userContext:t}=e,i=(0,a.useRef)(null),[{loading:r,error:s},o]=(0,a.useState)({loading:!0,error:!1});return((0,tI.Or)({cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"parrainage"}),(0,a.useEffect)(()=>{let e=!1,i=(0,w.cY)(),n=eo.subscribe(e=>{!0!==e.loading&&(e.error?i.reject(e.error):i.resolve(e.data))});return Promise.all([i.promise,(0,az.k)({src:"//cdn.co-buying.com/embedding.min.js"})]).then(async i=>{let[n]=i;if(e)return;(0,y.H)(n);let a=await aL(t.tokenSession);e||(new Buyapowa({url:"https://bp.saint-maclou.com",market:"saintmacloufr"},"bp_div","bp_error").embedReferAFriend({campaign:"saintmacloufr_raf1",locale:"fr",auto:!0,clear_url:!0,...a}),o({loading:!1,error:!1}))}).catch(e=>{console.error("Failed to get buyapowa user token",e),o({loading:!1,error:!0})}),()=>{n(),e=!0}},[t.tokenSession]),s)?(0,n.jsx)("div",{id:"bp_error",className:"c-parrainage__error",children:"Sorry, something went wrong"}):(0,n.jsxs)(aP,{children:[(0,n.jsx)("div",{id:"bp_error",style:{display:"none"},children:"Sorry, something went wrong"}),(0,n.jsx)("div",{id:"bp_div",ref:i,style:{minHeight:300,position:"relative"},children:r&&(0,n.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(eJ.aH,{})})}),(0,n.jsx)("hr",{className:"c-parrainage__separator"}),(0,n.jsx)("section",{className:"c-parrainage__faq",children:(0,n.jsxs)("div",{className:"c-parrainage__faq__content",children:[(0,n.jsx)("h2",{className:"c-parrainage__faq__title",children:"Questions fr\xe9quentes"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(aT.A,{question:"Quâest-ce quâun programme de parrainage ?",children:(0,n.jsx)("p",{children:"Un programme de parrainage vous permet de recommander nos services \xe0 vos proches, de leur offrir une remise sp\xe9cifique et de recevoir une r\xe9compense d\xe8s quâun de vos filleuls effectue son premier ach
1at."})}),(0,n.jsxs)(aT.A,{question:"Quelle est la r\xe9compense du parrain ?",children:[(0,n.jsx)("p",{children:"Vous avez recommand\xe9 Saint Maclou \xe0 un proche ? Bravo ! Vous recevrez un bon d'achat de 50 ⬠lorsque votre filleul aura effectu\xe9 un achat avec votre code de parrainage."}),(0,n.jsx)("br",{}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:"Conditions d'utilisation des bons dâachat :"}),(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{className:"list-style",children:"Valables 3 mois \xe0 compter de leur r\xe9ception,"}),(0,n.jsx)("li",{className:"list-style",children:"Utilisables uniquement en magasin Saint Maclou, en une ou plusieurs fois"}),(0,n.jsx)("li",{className:"list-style",children:"Cumulables avec d'autres bons d'achat et remises,"}),(0,n.jsx)("li",{className:"list-style",children:"Ni remboursables, ni \xe9changeables"})]})]}),(0,n.jsx)("br",{}),(0,n.jsx)("p",{children:"Si le montant de votre achat d\xe9passe 50 â¬, la diff\xe9rence restera \xe0 votre charge."})]}),(0,n.jsx)(aT.A,{question:"Qui peut devenir filleul ?",children:(0,n.jsxs)("p",{children:["Tout nouveau client (nâayant jamais effectu\xe9 dâachat en magasin Saint Maclou ou sur"," ",(0,n.jsx)("span",{children:(0,n.jsx)(tf(),{href:"#",className:"c-parrainage__link",children:"saint-maclou.com"})}),") r\xe9alisant un achat sup\xe9rieur \xe0 500 â¬."]})}),(0,n.jsxs)(aT.A,{question:"Quelle est la r\xe9compense du filleul ?",children:[(0,n.jsx)("p",{children:"Le filleul b\xe9n\xe9ficie de 15 % de remise sur le produit de son choix \xe0 partir de 500 ⬠dâachat. La remise passe \xe0 20 % sâil confie la pose de son projet \xe0 Saint Maclou."}),(0,n.jsx)("br",{}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:"Conditions de lâoffre :"}),(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{className:"list-style",children:"Valable 6 mois \xe0 compter de la r\xe9ception du code de parrainage"}),(0,n.jsxs)("li",{className:"list-style",children:["Utilisable en magasin ou sur"," ",(0,n.jsx)("span",{children:(0,n.jsx)(tf(),{href:"#",className:"c-parrainage__link",children:"saint-maclou.com"})})]}),(0,n.jsx)("li",{className:"list-style",children:"Remise appliqu\xe9e sur le produit, hors : accessoires, consommables (colle, sous-couche, plinthe, produits dâentretien, enduit de ragr\xe9age, primaire, outillage, barre de seuil, plaque de protection, plot, cale), prestations de service, paillassons, tapis sur mesure et commandes en cours"}),(0,n.jsx)("li",{className:"list-style",children:"Non cumulable avec dâautres promotions en cours"})]})]})]}),(0,n.jsx)(aT.A,{question:"Quand vais-je recevoir ma r\xe9compense en tant que Parrain ?",children:(0,n.jsx)("p",{children:"Vous recevrez votre r\xe9compense une fois que votre filleul a valid\xe9 son achat, r\xe9gl\xe9 sa facture, et que le d\xe9lai de r\xe9tractation de 30 jours est \xe9coul\xe9."})}),(0,n.jsx)(aT.A,{question:"Combien de proches puis-je parrainer ?",children:(0,n.jsx)("p",{children:"Vous pouvez parrainer jusquâ\xe0 10 proches par ann\xe9e civile, et ainsi gagner jusquâ\xe0 500 ⬠de bons dâachat (10 \xd7 50 â¬)."})})]})]})}),(0,n.jsxs)("section",{className:"c-parrainage__terms",children:[(0,n.jsxs)("div",{className:"c-parrainage__terms__content",children:[(0,n.jsx)("p",{className:"c-parrainage__terms_contentTitle",children:"Conditions dâ\xe9ligibilit\xe9 au programme de parrainage Saint Maclou :"}),(0,n.jsxs)("p",{className:"c-parrainage__terms__contentText",children:["Pour \xeatre parrain : avoir effectu\xe9 un achat dâun montant minimum de 500 ⬠depuis le 01/01/2022, en magasin ou sur"," ",(0,n.jsx)("span",{children:(0,n.jsx)(tf(),{href:"#",className:"c-parrainage__link",children:"saint-maclou.com"})}),", dans la limite de 10 parrainages par ann\xe9e civile. ",(0,n.jsx)("br",{})," Pour \xeatre filleul : \xeatre un nouveau client, nâayant jamais effectu\xe9 dâachat en magasin Saint Maclou ni sur"," ",(0,n.jsx)("span",{children:(0,n.jsx)(tf(),{href:"#",className:"c-parrainage__link",children:"saint-maclou.com"})})," ","et r\xe9aliser un premier achat dâun montant sup\xe9rieur \xe0 500 â¬."]})]}),(0,n.jsxs)("div",{className:"c-parrainage__terms__content",children:[(0,n.jsx)("p",{className:"c-parrainage__terms_contentTitle",children:"Conditions d'obtention des r\xe9compenses :"}),(0,n.jsx)("p",{className:"c-parrainage__terms__contentText",children:"Le parrain re\xe7oit une r\xe9compense une fois que le filleul a valid\xe9 son premier ach
1at \xe9ligible en ayant utilis\xe9 le code de parrainage. Le filleul b\xe9n\xe9ficie quant \xe0 lui dâune remise d\xe9di\xe9e lors de cet achat \xe0 travers le code de parrainage. Saint Maclou se r\xe9serve le droit de suspendre ou annuler un parrainage en cas de fraude, tentative de fraude ou utilisation non conforme aux pr\xe9sentes conditions."})]}),(0,n.jsxs)("div",{className:"c-parrainage__terms__content",children:[(0,n.jsx)("p",{className:"c-parrainage__terms_contentTitle",children:"Conditions d'utilisation des bons dâachat parrain\xa0:"}),(0,n.jsx)("p",{className:"c-parrainage__terms__contentText",children:"Bon dâachat dâune valeur de 50 â¬, valable 3 mois \xe0 compter de sa date de r\xe9ception. Utilisable uniquement en magasin Saint Maclou, en une ou plusieurs fois. Ce bon est cumulable avec les remises en cours et avec dâautres bons dâachat. Il est non remboursable, non \xe9changeable, m\xeame en cas de perte ou de fin de validit\xe9. Si le montant de votre achat d\xe9passe la valeur du bon, la diff\xe9rence reste \xe0 votre charge."})]}),(0,n.jsxs)("div",{className:"c-parrainage__terms__content",children:[(0,n.jsx)("p",{className:"c-parrainage__terms_contentTitle",children:"Conditions d'utilisation de lâoffre filleul\xa0:"}),(0,n.jsxs)("p",{className:"c-parrainage__terms__contentText",children:["15 % de remise sur le produit \xe0 partir de 500 ⬠dâachat sur pr\xe9sentation du code de parrainage. La remise passe \xe0 20 % si la pose est confi\xe9e \xe0 Saint Maclou. Offre valable 6 mois \xe0 compter de la r\xe9ception du code, utilisable en magasin ou sur"," ",(0,n.jsx)("span",{children:(0,n.jsx)(tf(),{href:"#",className:"c-parrainage__link",children:"saint-maclou.com"})}),". Remise appliqu\xe9e sur le produit, hors : accessoires, consommables (colle, sous-couche, plinthe, produits dâentretien, enduit de ragr\xe9age, primaire, outillage, barre de seuil, plaque de protection, plot, cale), prestations de service, paillassons, tapis sur mesure et commandes en cours. Non cumulable avec dâautres promotions en cours."]})]})]})]})}let aD=(0,h.ID)(e=>{let{userContext:t}=e,[i,r]=(0,a.useState)(null);return((0,a.useEffect)(()=>{let e=eo.subscribe(e=>{!0!==e.loading&&(e.error?r(!1):r((0,y.H)(e)))});return()=>e()},[]),null===i)?(0,n.jsx)(eJ.aH,{}):i?(0,n.jsx)(aM,{userContext:t}):(0,n.jsx)(aR,{})}),aF={awesomegrid:{...l.AD,container:{xs:"full",sm:"full",md:90,lg:90,xl:90}}},aV=b.JD,aq=[{label:"Mon tableau de bord",icon:eA.default,section:eg.DASHBOARD,component:()=>{let e=(0,r.useRouter)(),{myStore:t,setMyStore:i}=(0,ts.LG)(),{lastOrderCard:s,isLoading:o}=(e=>(e&&(0,a.useEffect)(ea,e),{lastOrderCard:(0,j.Pj)(ep),isLoading:(0,j.Pj)(el)}))(),d=tN.A.useProducts(),[c,p]=(0,a.useState)(0);(0,a.useEffect)(()=>{d&&p(d.length)},[d]);let u=(0,v.hx)(),m=(0,j.Pj)(to),{showSearchShopModal:h}=(0,eQ.hS)(),f=e=>{i(e)};return(0,n.jsx)(t_,{children:(0,n.jsxs)("div",{className:"ep-dashboard",children:[(0,n.jsx)(eP,{title:"MON PROFIL",buttonLabel:"Compl\xe9ter mon profil",buttonOnClickHandle:()=>e.push(ey.dE.epInfosPerso),description:u.loading||u.error?(0,n.jsx)(eJ.Ay,{}):(0,n.jsxs)("span",{children:["Votre profil a \xe9t\xe9 compl\xe9t\xe9 \xe0"," ",(0,n.jsxs)("strong",{children:[u.value,"%","\xa0","!"]})," ",u.value<100&&(0,n.jsx)(n.Fragment,{children:"Veuillez compl\xe9ter votre profil afin que nous puissions mieux vous conna\xeetre."})]}),isNew:!1,svg:(0,n.jsx)(th,{progress:u.value,strokeWidth:7,size:64,circleOneStroke:"#E9EAED",circleTwoStroke:"#46DBA9"})}),(0,n.jsx)(eP,{title:"MES COMMANDES",buttonLabel:"Voir mes commandes",buttonOnClickHandle:()=>e.push(ey.dE.epOrders),description:(0,n.jsx)(tC,{order:s,isLoading:o}),isNew:!1,svg:(0,n.jsx)(ek.default,{className:"card-icon"})}),(0,n.jsx)(eP,{title:"MES FAVORIS",buttonLabel:c>0?"Voir mes favoris":"",buttonOnClickHandle:()=>e.push(ey.dE.epWishlist),description:c>0?"Pour retrouver tous vos produits pr\xe9f\xe9r\xe9s câest par ici\xa0!":(0,n.jsxs)("span",{className:"favorite-products",children:["Vous n'avez pas encore de produits favoris, pour d\xe9couvrir votre prochain coup de coeur,"," ",(0,n.jsxs)(x.m,{href:ey.dE.boutiqueVenteEnLigne,title:"",color:l.Jy.ocher,children:["câest par ici","\xa0","!"]})," "]}),isNew:!1,svg:(0,n.jsx)(td.default,{hoverOff:!0,className:"card-icon"})}),!1,(0,n.jsx)(eP,{title:"MON MAGASIN",buttonLabel:t?"Plus d'informations":"Trouver un magasin",buttonOnClickHandle:()=>{t?e.push(t.slug):h({onSelectStore:f,ResultComponent:eZ.c,nLoadedStores:139})},description:(0,n.jsx)(tu,{myStoreData:t}),isNew:!1,svg:(0,n.jsx)(tl.default,{className:"card-icon"})}),b.o6&&(0,n.jsx)(eP,{title:"MON PROCHAIN RENDEZ-VOUS",buttonLabel:"Voir tous mes rendez-vous",buttonOnClickHandle:()=>e.push(ey.dE.epMyAppointments),description:m.loading?(0,n.jsx)(eJ.Ay,{}):m.error?(0,n.jsx)("span",{children:"Erreur de chargement"}):m.value?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"appointment-line-info",children:[(0,n.jsx)("span",{className:"line-info-heading",children:"Date : "}),(0,n.jsx)("span",{children:m.value.date})]}),(0,n.jsxs)("div",{className:"appointment-line-info",children:[(0,n.jsx)("span",{className:"line-info-heading",children:"Heure : "}),(0,I.EN)(new Date(m.value.date_iso)),(0,n.jsx)("span",{})]}),(0,n.jsxs)("div",{className:"appointment-line-info",children:[(0,n.jsx)("span",{className:"line-info-heading",children:"Type de RDV : "}),(0,n.jsx)("span",{children:m.value.type_rdv})]}),(0,n.jsxs)("div",{className:"appointment-line-info",children:[(0,n.jsx)("span",{className:"line-info-heading",children:"Magasin : "}),(0,n.jsx)("span",{children:m.value.magasin_nom})]})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{children:"Aucun rendez-vous proch
1ainement"})}),isNew:!1,svg:(0,n.jsx)(eE.default,{className:"card-icon"})}),(0,n.jsx)(eP,{title:"FAQ",buttonLabel:"Voir nos r\xe9ponses",buttonOnClickHandle:()=>e.push(ey.dE.faq),description:"Une demande\xa0? Une question\xa0? La r\xe9ponse se trouve s\xfbrement par ici.",isNew:!1,svg:(0,n.jsx)(e_.default,{className:"card-icon"})})]})})},pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mon tableau de bord"}},{label:"Mon profil",icon:eN.default,children:[{label:"Mes informations personnelles",section:eg.INFOS_PERSOS,component:tz},{label:"Mon adresse",section:eg.ADRESSES,component:na},{label:"Ma famille et mon foyer",section:eg.MY_HOME,component:tJ},{label:"Mes pr\xe9f\xe9rences de communication",section:eg.COMMUNICATION,component:tX,pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes pr\xe9f\xe9rences de communication"}},{label:"Mon magasin",section:eg.MY_STORE,component:tr,pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mon magasin"}},{label:"Donn\xe9es personnelles / gestion des cookies",section:eg.PERSONAL_DATA,component:e=>{let{goToSection:t}=e,i=(0,v.Jd)();return(0,a.useEffect)(()=>{if(!i)return void t(eg.LOGIN)},[!!i]),(0,n.jsx)(eV,{children:(0,n.jsxs)("div",{className:"ep-personal-data",children:[(0,n.jsx)("h2",{className:"page-title",children:"DONN\xc9ES PERSONNELLES"}),(0,n.jsxs)(eq,{children:[(0,n.jsx)("span",{className:"card-title",children:"La politique g\xe9n\xe9rale de protection des donn\xe9es de tapis Saint Maclou"}),(0,n.jsx)("div",{className:"card-description",children:"La politique de donn\xe9es personnelles mise en place par la soci\xe9t\xe9 TAPIS SAINT MACLOU concerne lâensemble des traitements quâelle effectue avec les donn\xe9es collect\xe9es aupr\xe8s des clients dans le cadre des diff\xe9rents services quâelle propose que ce soit en magasin ou \xe0 partir de son site Internet et de ses applications mobiles (smartphone, tablette etc.). La politique de donn\xe9es personnelles est accessible depuis ce lien ci-dessous :"}),(0,n.jsx)(ez.$,{isOnBgColor:!0,text:"En savoir plus",theme:"primaryRefonte",onClick:()=>{s().push(ey.dE.epGeneralDataProtectionPolicy)},style:{width:"100%",marginTop:"auto"}})]}),(0,n.jsxs)(eq,{children:[(0,n.jsx)("span",{className:"card-title",children:"Mes cookies"}),(0,n.jsx)("div",{className:"card-description",children:"Si vous souhaitez mettre \xe0 jour votre consentement relatif au d\xe9p\xf4t de cookies, vous pouvez les g\xe9rer avec le lien ci-dessous :"}),(0,n.jsx)(eM.default,{}),(0,n.jsx)(ez.$,{isOnBgColor:!0,text:"G\xe9rer mes cookies",theme:"primaryRefonte",onClick:()=>{Didomi.preferences.show()},style:{width:"100%",marginTop:"auto"}})]}),!b.Sk&&(0,n.jsxs)(eq,{children:[(0,n.jsx)("span",{className:"card-title",children:"Exp\xe9rience multi-marques"}),(0,n.jsx)("div",{className:"card-description",children:"Lâexp\xe9rience client est devenue la cl\xe9 dâun bon commer\xe7ant. Les entreprises fran\xe7aises, qui ont une relation privil\xe9gi\xe9e avec chacun dâentre vou
1s, souhaitent vous faire b\xe9n\xe9ficier de ces technologies qui font d\xe9sormais partie de notre quotidien."}),(0,n.jsx)(ez.$,{isOnBgColor:!0,text:"G\xe9rer mes pr\xe9f\xe9rences",theme:"primaryRefonte",onClick:()=>{(0,I.iw)("espace personnel - donn\xe9es personnelles","g\xe9rer mes pr\xe9f\xe9rences","valiuz_consent_change")},style:{width:"100%",marginTop:"auto"}})]}),b.Sk&&(0,n.jsx)(eH,{})]})})},pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"donn\xe9es personnelles / gestions des cookies"}}]},{label:b.ej?"Mes commandes et e-r\xe9servation":"Mes commandes",icon:ek.default,children:[{label:"Mes commandes",section:eg.ORDERS,component:iP},b.ej&&{label:"Mes e-r\xe9servations",section:eg.E_RESERVATIONS,component:()=>{let{loading:e,error:t,value:i}=(0,j.Pj)(nx);return(0,a.useEffect)(()=>{tI.Ay.sendPageView({env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes e-r\xe9servation"})},[]),(0,n.jsxs)(nV,{children:[(0,n.jsx)(nq,{children:"Mes e-r\xe9servations"}),t?(0,n.jsx)(n.Fragment,{children:eR.IW.GLOBAL}):e?(0,n.jsx)(eJ.Ay,{}):i.length>0?(0,n.jsx)(nR,{reservations:i}):(0,n.jsx)(nF,{})]})}}].filter(Boolean)},{label:"Mes devis",icon:eS.default,children:[{label:"Mes devis en magasin",section:eg.QUOTES,component:a_},...b.OX?[{label:"Mes devis estimatifs de pose",section:eg.POSE_ESTIMATION,href:ej.V,hrefTarget:"_blank",component:null,pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes devis estimatifs de pose"}}]:[]]},...aV?[{label:"Mes projets",icon:eS.default,children:[...b.JD?[{label:"Mes devis en cours",section:eg.ALL_ESTIMATE,component:e=>{let{onTokenError:t}=e,[i,s]=(0,a.useState)([]),[o,l]=(0,a.useState)(!1),[d,c]=(0,a.useState)([]),p=(0,a.useContext)(h.Rs),u=(0,r.useRouter)();(0,a.useEffect)(()=>{f(1)},[d]);let m=(0,a.useCallback)(e=>{u.push({pathname:ey.dE.epEstimation,query:{id:e}},void 0,{shallow:!0})},[]);(0,a.useEffect)(()=>{let e=new W.oz;if(p&&p.islogged){l(!0);let i={ClientId:p.clientId};e.GetEstimateUser(i,p.tokenSession).then(e=>{l(!1),"100"==e.Status?t():"200"==e.Status&&e.Projets&&c(e.Projets)}).catch(e=>console.error("Failed to load estimates ",e))}else u.push(ey.dE.epLogin)},[]);let x=(0,a.useMemo)(()=>d.find(e=>{var t;return e.ProjetId===(null==u||null==(t=u.query)?void 0:t.id)}),[u.query.id,d]),f=e=>{let t=(e-1)*21;s(d.slice(t,t+21)),window.scrollTo({top:0,left:0,behavior:"smooth"})};return(0,n.jsxs)(n0,{children:[(0,n.jsx)("h2",{className:"page-title",children:"Mes devis en cours"}),o?(0,n.jsx)(eJ.Ay,{}):(0,n.jsx)(n.Fragment,{children:x?(0,n.jsx)(nW,{estimationData:x}):i.length<=0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"empty-simulation-text",children:"Vous n'avez pas encore enregistr\xe9 d'estimation de pose. Choisissez le produit de votre choix, et estimez le prix de la pose par les experts Saint Maclou"}),(0,n.jsx)(ez.$,{onClick:()=>{u.push(ey.dE.produitsRevetementSol)},theme:"primaryRefonte",style:{textAlign:"left",marginBottom:"34px"},children:"Choisir mon produit"}),(0,n.jsx)(iO.VI,{height:426,srcDesktop:"pose-parquet-top-banner.jpg",alt:"",width:1050,adaptativeContent:!0})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"page-content",children:i.map(e=>(0,n.jsx)(nK,{title:"titre",estimationPrice:0,date:e.DateProjet,imageBase64:e.ArtPrj[0].ProduitImage,productName:e.ArtPrj[0].ProduitNom,buttonOnClickHandle:()=>{m(e.ProjetId)}},e.ProjetId))}),d.length>21&&(0,n.jsx)(i3,{pageLimit:21,onPageChanged:f,totalRecords:d.length})]})})]})}}]:[]]}]:[],b.o6&&{label:"Mes rendez-vous",icon:eE.default,section:eg.MY_APPOINTMENTS,component:e=>{var t;let{goToSection:i}=e,s=(0,r.useRouter)(),[o,l]=(0,a.useState)({appointments:null,earliestAppointment:null}),[d,c]=(0,a.useState)([]),[p,u]=(0,a.useState)({}),[m,x]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!0),b=(0,a.useContext)(h.Rs),v=new k.CQ,y=p[null==o||null==(t=o.earliestAppointment)?void 0:t.magasin_id]||"";(0,a.useEffect)(()=>{if(b&&b.islogged){let e=new W.oz,t={ClientId:b.clientId};e.GetHomeUser(t,b.tokenSession).then(e=>(l({appointments:e.RendezVous,earliestAppointment:e.ProchainRdv}),c(e.RendezVous),g(!1),e)).catch(e=>{console.error("Failed to initialize user data",e),x(!0),g(!1)})}else i(eg.LOGIN)},[]),(0,a.useEffect)(()=>
1{if(o.appointments){let e=new Set;for(let t of o.appointments)e.add(t.magasin_id);for(let t of e)v.getStoreNameById(t).then(e=>{e&&u(i=>({...i,[t]:e}))}).catch(e=>{console.error("Failed to load store name",e),u({}),x(!0)})}},[o]);let j=(0,a.useCallback)(e=>{if(d){let t=[...d];t.sort((t,i)=>new Date(parseInt(e[0])>0?i.date_iso:t.date_iso).getTime()-new Date(parseInt(e[0])?t.date_iso:i.date_iso).getTime()),c(t)}},[d]),w=(0,a.useCallback)(e=>{if(o.appointments){let t=e[0];c("all"===t?o.appointments:o.appointments.filter(e=>e.statut_projet===t))}},[d]);return(0,n.jsxs)(n2,{children:[(0,n.jsx)("h2",{className:"page-title",children:"Mes rendez-vous"}),m?(0,n.jsx)(n.Fragment,{children:eR.IW.GLOBAL}):f?(0,n.jsx)(eJ.Ay,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(n5,{children:o.earliestAppointment?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eE.default,{width:62,height:62}),(0,n.jsx)("h2",{className:"next-appointment-title",children:"Mon prochain rendez-vous"}),(0,n.jsx)("div",{className:"next-appointment-date",children:(e=>{let t=e.toLocaleDateString("fr-FR",{year:"numeric",month:"long",day:"numeric",weekday:"long"});return(t=t.charAt(0).toUpperCase()+t.slice(1))+" \xe0 "+(0,I.EN)(e)})(new Date(o.earliestAppointment.date_iso))}),(0,n.jsx)("div",{className:"next-appointment-store",children:"Avec le magasin de "+y})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h3",{children:"Aucun rendez-vous \xe0 venir"}),(0,n.jsx)(ez.$,{theme:"primaryRefonte",onClick:()=>{s.push(n1.dE.appointmentScheduling)},children:"Prendre RDV"})]})}),(0,n.jsxs)(at,{children:[(0,n.jsx)(tL.A,{theme:"rounded",data:{id:"page",value:"page",valid:!0,typeMismatch:!0,placeholder:"Trier par date",labelText:"",required:!1,children:[{label:"Du plus r\xe9cent au plus ancien",value:"1"},{label:"Du plus ancien au plus r\xe9cent",value:"0"}]},onChange:j}),(0,n.jsx)(tL.A,{theme:"rounded",data:{id:"page",value:"page",valid:!0,typeMismatch:!0,placeholder:"Trier par statut",labelText:"",required:!1,children:(()=>{let e=[];for(let t in e.push({value:"all",label:"Tous"}),eR.Sr)e.push({value:eR.Sr[t],label:eR.Sr[t]});return e})()},onChange:w})]}),(0,n.jsxs)(n3,{children:[(0,n.jsx)(n4,{children:(0,n.jsxs)(n8,{children:[(0,n.jsx)(n9,{children:"Date du RDV"}),(0,n.jsx)(n9,{children:"Heure"}),(0,n.jsx)(n9,{children:"Magasin"}),(0,n.jsx)(n9,{children:"Mode de RDV"}),(0,n.jsx)(n9,{children:"Statut"})]})}),(0,n.jsx)(n6,{children:(null==d?void 0:d.length)>0?d.map((e,t)=>{let i=new Date(e.date_iso),a=(0,I.EN)(i);return(0,n.jsxs)(n7,{children:[(0,n.jsxs)(ae,{className:"date",children:[(0,n.jsx)("span",{className:"mobile",children:"Date du RDV"}),e.date]}),(0,n.jsx)(ae,{className:"date",children:a}),(0,n.jsxs)(ae,{className:"price",children:[(0,n.jsx)("span",{className:"mobile",children:"Magasin\xa0:\xa0"}),Object.keys(p).length>0?p[e.magasin_id]:"Magasin inconnu"]}),(0,n.jsxs)(ae,{className:"status",children:[(0,n.jsx)("span",{className:"mobile",children:"Mode de RDV\xa0:\xa0"}),e.type_rdv]}),(0,n.jsxs)(ae,{className:"status",children:[(0,n.jsx)("span",{className:"mobile",children:"Statut\xa0:\xa0"}),e.statut_projet===eR.Sr.INCOMMING?(0,n.jsx)("span",{className:"dot"}):null,(0,n.jsx)("span",{className:"".concat(e.statut_projet===eR.Sr.INCOMMING?"greenVif":""," "),children:e.statut_projet})]})]},t)}):(0,n.jsx)(n7,{children:(0,n.jsx)(ae,{colSpan:6,className:"empty",children:"Aucun rendez-vous"})})})]})]})]})},pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes rendez-vous"}},{label:"Mes favoris",icon:td.default,section:eg.WISHLIST,component:()=>{let e=tN.A.useEntries().map(e=>e.id),t=tN.A.useProducts(),[i,r]=(0,a.useState)(!0),[s,o]=(0,a.useState)([]),[d,c]=(0,a.useState)([]),[p,u]=(0,a.useState)(1);(0,a.useEffect)(()=>{r(!t||!t.length),o(t?t.map((t,i)=>(0,i4.Uz)(t,e[i])):[])},[t]),(0,a.useEffect)(()=>{let e=(Math.min(p,Math.ceil(s.length/9))-1)*9,t=Math.min(e+9,s.length);c(s.slice(e,t))},[s,p]);let{showShareWhishlistModal:m}=(0,eQ.hS)();return(0,n.jsxs)(i9,{children:[(0,n.jsx)("h2",{className:"page-title",children:"MES FAVORIS"}),t?(0,n.jsxs)(n.Fragment,{children:[i?(0,n.jsx)(i0,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x.m,{href:"#",title:"Partager ma wishlist",color:l.Jy.yellowSea,className:"share-wishlist",onClick:e=>{e.preventDefault(),m()},children:[(0,n.jsx)(i8.default,{}),"Partager"]}),(0,n.jsx)("div",{className:"wishList--content",children:d.map((e,t)=>(0,n.jsx)(iZ,{className:"product-card",product:e},t))})]}),s.length>9&&(0,n.jsx)(i3,{totalRecords:s.length,onPageChanged:e=>{u(e)},pageNeighbours:1,pageLimit:9})]}):(0,n.jsx)(eJ.Ay,{}),(0,n.jsx)(i6.A,{})]})},iconProps:{hoverOff:!0},pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"mes favoris"}},b.tf&&{label:"Mes parrainages",icon:eI.default,section:eg.PARRAINAGE,component:aD,pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"parrainage"}},{label:"Aide et Contact",icon:e_.default,section:eg.HELP_CONTACT,component:e=>{let{onTokenError:t,goToSection:i}=e,[s,o]=(0,a.useState)(!1),[l,d]=(0,a.useState)(!1),[c,p]=(0,a.useState)(!1),u=(0,r.useRouter)();return(0,n.jsx)(eO,{children:(0,n.jsxs)("div",{className:"ep-help-and-contact",children:[(0,n.jsx)("h2",{className:"page-title",children:"AIDE ET CONTACT"}),(0,n.jsxs)("div",{className:"grid-container",children:[(0,n.jsx)(eP,{title:"AVEZ VOUS PENS\xc9 \xe0 CONSULTER NOTRE FAQ ?",buttonLabel:"Des questions ?",buttonOnClickHandle:()=>u.push(ey.dE.faq),description:"Trouvez des r\xe9ponses \xe0 nos questions les plus fr\xe9quentes",isNew:!1,svg:(0,n.jsx)(e_.default,{className:"card-icon"})}),(0,n.jsx)(eP,{title:"CONTACTEZ NOUS !",buttonLabel:"Acc\xe9der au formulaire",buttonOnClickHandle:()=>u.push(ey.dE.contactFormulaire),description:"Besoin d'aide ? N'h\xe9sitez pas \xe0 contacter notre service client",isNew:!1,svg:(0,n.jsx)(eT.default,{className:"card-icon"})}),(0,n.jsx)(eP,{title:"PRENDRE RENDEZ-VOUS",buttonLabel:"Prendre RDV",buttonOnClickHandle:()=>u.push(ey.dE.appointmentScheduling),description:"Vous avez un projet ? Prenez rendez-vous avec un conseiller en magasin, \xe0 votre domicile, ou par t\xe9l\xe9phone",isNew:!1,svg:(0,n.jsx)(eE.default,{className:"card-icon"})})]})]})})},pageView:{env_type_contenu:eb.Qp.ACCOUNT,cd2_pageCategory:"espace personnel",cd3_pageSubCategory:"aide et contact"}}
1].filter(Boolean),aB=o.default.div.withConfig({componentId:"sc-44e030e5-0"})([".modal-content{margin:0;.ep-PrivateSpace--popin{width:700px;margin:-1rem 0 0.5rem;h3{margin:0;}@media ","{width:100%;margin:0;}}}",""],l.uk.tablet,e=>{let{ready:t}=e;return!t&&(0,o.css)(["min-height:30rem;*{display:none;}"])}),aX=o.default.div.withConfig({componentId:"sc-44e030e5-1"})(["margin-top:45px;display:flex;font-family:",";*{box-sizing:border-box;}@media ","{flex-direction:column;align-items:center;}"],l.vX.NunitoSansRegular,l.uk.tablet),aH=o.default.div.withConfig({componentId:"sc-44e030e5-2"})(["width:76%;max-width:1040px;margin-left:30px;@media ","{margin:20px 0 0;width:100%;}"],l.uk.tablet),aG=e=>{let{initialComponent:t=eg.INFOS_PERSOS,sectionsUrls:i=eC}=e,s=(0,v.Jd)(),l=(0,a.useRef)(!!s),c=(0,r.useRouter)(),{sections:u,activeSection:m,goToSection:h}=((e,t)=>{let i=(0,r.useRouter)(),[n,s]=(0,a.useState)(null);(0,a.useEffect)(()=>{s(t)},[t]);let o=(0,a.useCallback)(t=>e[t],[e]),l=(0,a.useCallback)(e=>{i.push(o(e))},[i,o]),{sections:d,activeSection:c}=(0,a.useMemo)(()=>{let e,t=i=>{let a=i.href||o(i.section),r=i.children&&i.children.map(t).filter(Boolean);if(!a&&!(null==r?void 0:r.length))return null;let s=i.section===n,l={...i,children:r,active:s,href:a};return s&&(e=l),l};return{sections:aq.map(t).filter(Boolean),activeSection:e}},[n,o]);return{sections:d,activeSection:c,goToSection:l}})(i,t),[x,f]=(0,a.useState)(!1),[g,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(!1),w=(0,a.useCallback)(()=>{l.current=null,j(!0)},[]),C=(0,a.useRef)(!0);(0,a.useEffect)(()=>()=>{C.current=!1},[]);let N=(0,a.useCallback)(()=>{s||(b(!0),setTimeout(()=>{C.current&&h(eg.LOGIN)},5e3))},[s,h]);(0,a.useEffect)(()=>{s&&(ev.k4("espace_client"),f(!0))},[s,c]),(0,a.useEffect)(()=>{(null==m?void 0:m.pageView)&&tI.Ay.sendPageView(null==m?void 0:m.pageView)},[null==m?void 0:m.pageView]);let _=null==m?void 0:m.component;return(0,n.jsxs)(aB,{ready:x,children:[(0,n.jsx)(o.ThemeProvider,{theme:aF,children:(0,n.jsx)(d.Container,{children:(0,n.jsx)(d.Row,{children:(0,n.jsx)(d.Col,{children:(0,n.jsxs)(aX,{children:[(0,n.jsx)(ex,{sections:u,onLogOut:w}),(0,n.jsx)(aH,{children:!y&&_&&(0,n.jsx)(_,{goToSection:h,onTokenError:N})})]})})})})}),(0,n.jsx)(p.E,{visible:g,children:(0,n.jsxs)("div",{className:"ep-PrivateSpace--popin",children:[(0,n.jsx)("h2",{children:"La session a expir\xe9"}),(0,n.jsx)("p",{children:"Nous vous invitons \xe0 vous reconnecter"})]})}),(0,n.jsx)(p.E,{visible:y,children:(0,n.jsxs)("div",{className:"ep-PrivateSpace--popin",children:[(0,n.jsx)("h2",{children:"D\xe9connexion !"}),(0,n.jsx)("p",{children:"Merci de patienter"})]})})]})};aG.layout=c.Ay,aG.layoutProps={metaTags:{title:"Mes informations personnelles | Saint Maclou",description:"Bienvenue dans votre espace. Vous pouvez y modifier vos infos personnelles, suivre vos demandes dâestimation et de contact et \xe9toffer votre profil. Faites comme chez-vous !",type:ef.g.website,image:"",robots:"",canonical:""},withMarginEndContent:!0},aG.getInitialProps=async e=>{let{res:t,query:i}=e,{page:n}=i,a=String(n),r=null;return!ew.includes(a)&&(r=404,t&&(t.statusCode=r)),{initialComponent:a,statusCode:r||200}};let aU=aG},95706:(e,t,i)=>{"use strict";i.d(t,{E:()=>h});var n=i(26514),a=i(75834),r=i(13742),s=i(98457),o=i(17941),l=i(80769),d=i(52715),c=i(54073);let p=r.default.div.withConfig({componentId:"sc-b950588b-0"})(['visibility:hidden;opacity:0;position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0 auto;max-width:1410px;overflow:auto;transition:all 0.3s;pointer-events:none;padding:20px;box-sizing:border-box;&:before{content:"";position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0,0,0,0.5);}&:target,&.show{visibility:visible;opacity:1;pointer-events:auto;}&.fs{width:100vw;height:100vh;}*{box-sizing:border-box;}']),u=r.default.div.withConfig({componentId:"sc-b950588b-1"})(["color:",";position:absolute;top:",";left:50%;transform:translate(-50%,-50%);background:",";width:",";height:",";height:",";text-align:center;transition:all 0.5s ease-in-out;padding:",";overflow-y:scroll;max-width:100%;"," div{box-shadow:none;}&.left{top:",";left:20px;transform:",";}&.right{top:",";right:20px;left:initial;transform:",";}&.center{top:",";left:50%;transform:translate(-50%,-50%);
1height:",";max-height:calc(100vh - 40px);max-height:calc(var(--vh,1vh) * 100 - 40px);}&.top{top:",";left:50%;transform:translateX(-50%);height:",";max-height:calc(var(--vh,1vh) * 100 - 40px);}@media ","{&.fs + .top,&.fs + .center{transform:none;max-height:none;top:0;bottom:0;left:0;right:0;}}@media ","{width:100vw;height:100vh;height:calc(100 * var(--vh,1vh));&.right{right:0;top:50%;transform:translateY(-50%);}&.top{top:0;bottom:0;max-height:calc(var(--vh,1vh) * 100);}&.fs:not(&.center){position:absolute;transform:none;top:0;bottom:0;}}"],o.Jy.charcoal,e=>{let{top:t}=e;return t||"50%"},e=>e.bgColor,e=>{let{width:t}=e;return t||"570px"},e=>{let{height:t}=e;return t||"calc(100vh - 40px)"},e=>{let{height:t}=e;return t||"calc(100 * var(--vh, 1vh) - 40px)"},e=>{let{wPadding:t}=e;return t?"20px":"0px"},e=>{let{wScrollbar:t}=e;return!t&&(0,r.css)(["&::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;"])},e=>{let{top:t}=e;return t||"50%"},e=>{let{top:t}=e;return t?"initial":"translateY(-50%)"},e=>{let{top:t}=e;return t||"50%"},e=>{let{top:t}=e;return t?"initial":"translateY(-50%)"},e=>{let{top:t}=e;return t||"50%"},e=>{let{height:t}=e;return t||"auto"},e=>{let{top:t}=e;return t||"20px"},e=>{let{height:t}=e;return t||"auto"},o.uk.tabletS,o.uk.mobileL),m=r.default.button.withConfig({componentId:"sc-b950588b-2"})(["position:absolute;transition:all 200ms;right:20px;top:20px;z-index:1;cursor:pointer;background:none;border:none;"]),h=e=>{let{id:t,className:i,visible:r=!1,bgColor:h=o.Jy.white,children:x,onClose:f,setShowModal:g,width:b,height:v,fullscreen:y=!0,center:j,position:w=c.x_.center,wPadding:C=!0,wScrollbar:N=!1,top:_}=e,k=(0,a.useRef)();return(0,a.useEffect)(()=>()=>{(0,l._2)("auto")},[]),(0,a.useEffect)(()=>{let e=()=>{if(!k)return;let e=.01*window.innerHeight;k.current.style.setProperty("--vh","".concat(e,"px"))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,n.jsx)(p,{ref:k,id:t,className:(0,s.A)(i,r&&"show",y&&"fs"),onClick:e=>{g?g(!1):f&&f(e)},children:(0,n.jsxs)(u,{bgColor:h,width:b,height:v,className:(0,s.A)(j&&"center",y&&"fs",w),onClick:e=>{e.stopPropagation()},wPadding:C,wScrollbar:N,top:_,children:[(g||f)&&(0,n.jsx)(m,{onClick:e=>{g?g(!1):f&&f(e)},children:(0,n.jsx)(d.default,{width:16,height:16})}),x]})})}}},e=>{e.O(0,[24726,82940,42547,80975,56435,8305,90636,46593,38792],()=>e(e.s=60366)),_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.