!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="55fdb110-ae05-4e76-9a45-ad0e278a27ac",e._sentryDebugIdIdentifier="sentry-dbid-55fdb110-ae05-4e76-9a45-ad0e278a27ac")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[743],{32206:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/wishlist",function(){return t(39870)}])},46596:function(e,n,t){"use strict";var i=t(85893),r=t(87536),l=t(8362),o=t(305);n.Z=function(e){var n;let{name:t,title:a,description:s,required:d,registerOptions:c={},validationMessage:u,options:h,defaultOption:p,onChange:m,className:g,placeholder:f,hideDescriptionOnMobile:v=!1,...x}=e,{register:w,formState:A,watch:T}=(0,r.Gc)()||{},E=null==w?void 0:w(t,{required:d,...c}),j=null==T?void 0:T(t);return(0,i.jsxs)("div",{className:g,children:[(0,i.jsx)(l.ar,{$isRequired:!!d,htmlFor:t,children:a}),s&&(0,i.jsx)(o.Fe,{$hideOnMobile:v,children:s}),(0,i.jsxs)(o.PQ,{className:"container",children:[(0,i.jsxs)(o.Qr,{as:"select",type:"select",required:!!d,"aria-required":!!d,"aria-describedby":t,id:t,$isValid:!(null==A?void 0:A.errors[t]),...x,...E,name:t,$isPlaceholder:!!f&&"default"===j,defaultValue:null==p?void 0:p.value,onChange:e=>{null==E||E.onChange(e),null==m||m(e)},children:[f&&(0,i.jsx)("option",{value:"default",disabled:!0,children:f}),h.map(e=>(0,i.jsx)("option",{value:e.value,children:e.name},"select-option-".concat(e.value)))]}),(0,i.jsx)(l.xL,{name:"caret-down"})]}),(null==A?void 0:A.errors[t])&&!1!==u&&(0,i.jsx)(l.BD,{children:u||(null==A?void 0:null===(n=A.errors[t])||void 0===n?void 0:n.message)||d||"Invalid input"})]})}},305:function(e,n,t){"use strict";t.d(n,{Fe:function(){return s},PQ:function(){return o},Qr:function(){return a}});var i=t(41686),r=t(8362),l=t(36219);let o=i.ZP.div.withConfig({componentId:"sc-3c155402-0"})(["position:relative;display:block;"]),a=(0,i.ZP)(r.ob).withConfig({componentId:"sc-3c155402-1"})(e=>{let{$isPlaceholder:n,theme:{COLOR:t}}=e;return(0,i.iv)(["appearance:none;cursor:pointer;padding-top:0;padding-bottom:0;border-color:",";background-color:",";"," &::-ms-expand{display:none;}"],t.black,t.white,n&&(0,i.iv)(["color:",";border-color:",";"],t.grey05,t.grey05))}),s=(0,i.ZP)(l.Z).withConfig({componentId:"sc-3c155402-2"})(e=>{let{theme:{FONT_SIZE:n,LAYOUT:t},$hideOnMobile:r}=e;return(0,i.iv)(["font-size:",";",""],n.MD,r&&(0,i.iv)(["@media screen and (max-width:","px){display:none;}"],t.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE-1))})},86629:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var i=t(85893),r=t(11163),l=t(79848),o=t(41686),a=t(40706),s=t(46292),d=t(58357);let c=o.ZP.li.withConfig({componentId:"sc-87edd74d-0"})(e=>{let{$showOnMobile:n,theme:{SPACINGS:t,LAYOUT:i,COLOR:r}}=e;return(0,o.iv)(["padding:"," 0;border-bottom:1px solid ",";",""],t.MD,r.grey02,!n&&(0,o.iv)(["@media screen and (max-width:","px){display:none;}"],i.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE-1))}),u=(0,o.ZP)(s.Z).withConfig({componentId:"sc-87edd74d-1"})(e=>{let{$isActive:n,theme:{SPACINGS:t,COLOR:i}}=e;return(0,o.iv)(["display:flex;gap:",";",""],t.SM,n&&(0,o.iv)(["color:",";"],i.blue))}),h=(0,o.ZP)(a.Z).withConfig({componentId:"sc-87edd74d-2"})(e=>{let{$isActive:n,theme:{COLOR:t}}=e;return(0,o.iv)(["",""],n&&(0,o.iv)(["fill:",";"],t.blue))}),p=(0,o.ZP)(d.Z).withConfig({componentId:"sc-87edd74d-3"})(["flex-grow:1;"]);var m=t(36830);function g(e){let{hasCarets:n}=e,t=(0,r.useRouter)(),o=(0,m.Z)(),s=[{label:o("account.navigation.item.overview"),link:l.H1.ACCOUNT_OVERVIEW,icon:"profile",showOnMobile:!1},{label:o("account.navigation.item.wishlist"),link:l.H1.ACCOUNT_WISHLIST,icon:"wishlist-none",showOnMobile:!0},{label:o("account.navigation.item.order"),link:l.H1.ACCOUNT_ORDERS,icon:"basket",showOnMobile:!1,isActive:e=>e.includes(l.H1.ACCOUNT_ORDERS)},{label:o("account.navigation.item.accountDetails"),link:l.H1.ACCOUNT_PREFERENCES_OVERVIEW,icon:"profile",showOnMobile:!1,isActive:e=>e.includes(l.H1.ACCOUNT_PREFERENCES_OVERVIEW)},{label:o("account.navigation.item.logout"),link:l.H1.ACCOUNT_LOGOUT,icon:"log-out",showOnMobile:!1}];return(0,i.jsx)("nav",{children:(0,i.jsx)("ul",{children:s.map(e=>{let r=e.isActive?e.isActive(t.route):t.route===e.link;return(0,i.jsx)(c,{$showOnMobile:e.showOnMobile,children:(0,i.jsxs)(u,{link:{href:e.link},$isActive:r,children:[(0,i.jsx)(h,{name:e.icon,$isActive:r}),(0,i.jsx)(p,{children:(0,i.jsx)(d.Z,{type:r?"BODY_BOLD":"BODY",as:"span",children:e.label})}),n&&(0,i.jsx)(a.Z,{name:"caret-right"})]})},"sidebar-navigation-item-".concat(e.label))})})})}},10869:function(e,n,t){"use strict";t.d(n,{B:function(){return o}});var i=t(11163),r=t(24645),l=t(50559);let o=e=>{let{page:n,totalPages:t}=e,o=(0,i.useRouter)(),{locale:a}=(0,i.useRouter)(),s={...o.query},d=(0,r.n)({languageCode:null!=a?a:"",querySlug:null==s?void 0:s.slug});delete s.slug;let c=n<t?(0,l.Z)({...s,p:String(n+1)},{prependOrigin:!1,baseUrl:d}):"",u=n>1?(0,l.Z)({...s,p:String(n-1)},{prependOrigin:!1,baseUrl:d}):d,h=n>1?(0,l.Z)({...s,p:String(n)},{prependOrigin:!1,baseUrl:d}):d,p=t>1?(0,l.Z)({...s,p:String(t)},{prependOrigin:!1,baseUrl:d}):d;return{base:d,current:h,next:c,prev:u,last:p}}},27121:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var i=t(85893),r=t(11163),l=t(10869),o=t(41686),a=t(40706),s=t(46292);let d="3.6rem",c="1.4rem",u=(0,o.iv)(["&:active{transform:scale(0.95);transition:transform 0.1s;}"]),h=o.ZP.div.withConfig({componentId:"sc-6f6caaf0-0"})(e=>{let{theme:{SPACINGS:n,LAYOUT:t}}=e;return(0,o.iv)(["display:flex;justify-content:flex-end;align-items:center;white-space:nowrap;width:100%;gap:",";@media (max-width:","px){justify-content:center;}"],n.SM,t.LAYOUT_BREAKPOINT.MOBILE_LARGE)}),p=o.ZP.ol.withConfig({componentId:"sc-6f6caaf0-1"})(e=>{let{theme:{SPACINGS:n,FONT_SIZE:t}}=e;return(0,o.iv)(["display:flex;align-items:center;gap:",";list-style:none;padding:0;margin:0;font-size:",";"],n.SM,t.MD)}),m=o.ZP.li.withConfig({componentId:"sc-6f6caaf0-2"})(e=>{let{active:n,theme:{BORDER_RADIUS:t,COLOR:i}}=e;return(0,o.iv)(["display:inline-flex;align-items:center;justify-content:center;min-width:3.2rem;height:",";border-radius:",";border:1px solid ",";background:none;cursor:pointer;font-size:",";user-select:none;"," "," &:hover{","}"],d,t.SM,i.grey03,c,u,n&&(0,o.iv)(["background:",";color:",";"],i.black,i.grey01),!n&&(0,o.iv)(["background:",";"],i.grey02))}),g=(0,o.ZP)(s.Z).withConfig({componentId:"sc-6f6caaf0-3"})(e=>{let{disabled:n,theme:{COLOR:t,BORDER_RADIUS:i,SPACINGS:r}}=e;return(0,o.iv)(["cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:",";padding:0 ",";height:",";border-radius:",";font-size:",";color:",";transition:opacity 0.2s;border:1px solid ",";user-select:none;"," "," &:hover{background:",";}"],r.SM,r.SM,d,i.SM,c,t.black,t.grey03,u,n&&(0,o.iv)(["display:none;"]),t.grey01)}),f=(0,o.ZP)(g).withConfig({componentId:"sc-6f6caaf0-4"})(e=>{let{theme:{LAYOUT:n,SPACINGS:t}}=e;return(0,o.iv)(["padding-right:",";@media (max-width:","px){padding-right:",";}"],t.MD,n.LAYOUT_BREAKPOINT.MOBILE_LARGE,t.SM)}),v=(0,o.ZP)(g).withConfig({componentId:"sc-6f6caaf0-5"})(e=>{let{theme:{LAYOUT:n,SPACINGS:t}}=e;return(0,o.iv)(["padding-left:",";@media (max-width:","px){padding-left:",";}"],t.MD,n.LAYOUT_BREAKPOINT.MOBILE_LARGE,t.SM)}),x=o.ZP.nav.withConfig({componentId:"sc-6f6caaf0-6"})(e=>{let{theme:{SPACINGS:n}}=e;return(0,o.iv)(["display:flex;justify-content:space-between;gap:",";"],n.SM)}),w=(0,o.ZP)(a.Z).withConfig({componentId:"sc-6f6caaf0-7"})(e=>{let{theme:{FONT_SIZE:n}}=e;return(0,o.iv)(["height:",";"],n.MD)}),A=o.ZP.span.withConfig({componentId:"sc-6f6caaf0-8"})(e=>{let{theme:{LAYOUT:n}}=e;return(0,o.iv)(["@media (max-width:","px){display:none;}"],n.LAYOUT_BREAKPOINT.MOBILE_LARGE)});var T=t(36830),E=function(e){let{pagination:n,shouldPush:t=!0,...o}=e,{query:a,push:s,pathname:d}=(0,r.useRouter)(),{p:c,...u}=a,{totalPages:g,page:E}=n,{next:j,prev:b}=(0,l.B)(n),O=(0,T.Z)(),y=()=>{var e;return null===(e=document.getElementById("page-wrapper"))||void 0===e?void 0:e.scrollTo({top:180,behavior:"smooth"})},Z=e=>{var n;y(),t&&(1===e?s({pathname:d,query:{...u}}):s({pathname:d,query:{...u,p:e}})),null===(n=o.handlePageClick)||void 0===n||n.call(o,e)};return g<=1?null:(0,i.jsx)(h,{children:(0,i.jsxs)(x,{children:[(0,i.jsxs)(f,{link:{href:b},as:t?"a":"span",disabled:1===E,onClick:o.handlePrevious?o.handlePrevious:()=>Z(E-1),children:[(0,i.jsx)(w,{name:"caret-left"}),(0,i.jsx)(A,{children:O("previous")})]}),(0,i.jsx)(p,{children:(function(){let e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(1===g)return[];let t=[],i=[];t.push(1);for(let e=E-n;e<=E+n;e++)e>1&&e<g&&t.push(e);return t.push(g),t.forEach(n=>{e&&(n-e>1?i.push("..."):n-e==2&&i.push(e+1)),i.push(n),e=n}),i})(1===E||E===g?2:1).map((e,n)=>"number"==typeof e?(0,i.jsx)(m,{active:E===e,onClick:()=>Z(e),children:e},n):(0,i.jsx)("span",{children:e},n))}),(0,i.jsxs)(v,{link:{href:j},as:t?"a":"span",disabled:E===g,onClick:o.handleNext?o.handleNext:()=>Z(E+1),children:[(0,i.jsx)(A,{children:O("next")}),(0,i.jsx)(w,{name:"caret-right"})]})]})})}},80348:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var i=t(85893),r=t(41686),l=t(92618),o=t(58357);let a=r.ZP.div.withConfig({componentId:"sc-76193df2-0"})(e=>{let{$isAlternative:n,theme:{COLOR:t,SPACINGS:i,LAYOUT:l}}=e;return(0,r.iv)(["background-color:",";border:1px solid ",";padding:",";margin:"," 0;text-align:center;@media screen and (min-width:","px){padding:",";}",""],t.grey01,t.grey03,i.MD,i.L,l.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE,i.XXL,n&&(0,r.iv)(["background-color:",";padding-top:",";padding-bottom:",";@media screen and (min-width:","px){padding-top:",";padding-bottom:",";}"],t.white,i.XXXL,i.XXXL,l.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE,i.XXXL,i.XXXL))}),s=(0,r.ZP)(o.Z).withConfig({componentId:"sc-76193df2-1"})(e=>{let{theme:{SPACINGS:n,LAYOUT:t}}=e;return(0,r.iv)(["margin-top:",";text-align:center;@media screen and (min-width:","px){margin-top:",";}"],n.SM,t.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE,n.SM)}),d=(0,r.ZP)(l.Z).withConfig({componentId:"sc-76193df2-2"})(e=>{let{theme:{SPACINGS:n,LAYOUT:t}}=e;return(0,r.iv)(["margin-top:",";@media screen and (min-width:","px){margin-top:",";}"],n.MD,t.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE,n.L)});var c=t(27291);function u(e){let{title:n,description:t,button:r,isAlternative:l,className:o}=e;return(0,i.jsxs)(a,{$isAlternative:l,className:o,children:[(0,i.jsx)(c.Z,{type:"HEADING_3",children:n}),t&&(0,i.jsx)(s,{type:"BODY",children:t}),r&&(0,i.jsx)(d,{isSecondary:!0,...r})]})}},39870:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return ea},default:function(){return es}});var i,r,l,o,a=t(85893),s=t(67294),d=t(35882),c=t(12991),u=t(43767),h=t(35462),p=t(64635),m=t(80348),g=t(41686),f=t(46596);let v=g.ZP.div.withConfig({componentId:"sc-6e5d681-0"})(e=>{let{theme:{LAYOUT:n},$hasFilters:t}=e;return(0,g.iv)(["margin-bottom:1.2em;"," ",""],t&&(0,g.iv)(["@media screen and (min-width:","px){width:100%;}@media screen and (min-width:","px){width:50%;&:nth-child(2n -1){padding-right:0.8em;}&:nth-child(2n){padding-left:0.8em;}}@media screen and (min-width:","px){width:33.33%;&:nth-child(3n -2){padding-right:1em;}&:nth-child(3n -1){padding-right:0.5em;padding-left:0.5em;}&:nth-child(3n){padding-left:1em;}}"],n.LAYOUT_BREAKPOINT.MOBILE,n.LAYOUT_BREAKPOINT.TABLET_PORTRAIT,n.LAYOUT_BREAKPOINT.DESKTOP),!t&&(0,g.iv)(["@media screen and (min-width:","px){width:100%;}@media screen and (min-width:","px){width:50%;&:nth-child(2n -1){padding-right:0.8em;}&:nth-child(2n){padding-left:0.8em;}}@media screen and (min-width:","px){width:33.33%;&:nth-child(3n -2){padding-right:1em;}&:nth-child(3n -1){padding-right:0.5em;padding-left:0.5em;}&:nth-child(3n){padding-left:1em;}}@media screen and (min-width:","px){width:25%;&:nth-child(4n-3){padding-right:1.2em;}&:nth-child(4n-2){padding-right:0.8em;padding-left:0.4em;}&:nth-child(4n-1){padding-left:0.8em;padding-right:0.4em;}&:nth-child(4n){padding-left:1.2em;}}"],n.LAYOUT_BREAKPOINT.MOBILE,n.LAYOUT_BREAKPOINT.TABLET_PORTRAIT,n.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE+100,n.LAYOUT_BREAKPOINT.DESKTOP))}),x=(0,g.ZP)(p.X2).withConfig({componentId:"sc-6e5d681-1"})(["justify-content:space-between;margin-bottom:3em;margin-left:0;padding-right:0.6em;width:100%;"]),w=(0,g.ZP)(f.Z).withConfig({componentId:"sc-6e5d681-2"})(e=>{let{theme:{LAYOUT:n}}=e;return(0,g.iv)(["display:none;width:25%;@media screen and (min-width:","px){display:flex;margin:0;.container{width:100%;select{margin-top:0;width:100%;}}}"],n.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE)});var A=t(27121),T=t(81076),E=t(58357),j=e=>[{name:e("sort.options.name.asc"),value:0},{name:e("sort.options.name.desc"),value:1},{name:e("sort.options.price.asc"),value:2},{name:e("sort.options.price.desc"),value:3}],b=t(2540),O=t(45582),y=t(36830),Z=t(126),I=t(80399);function P(e){let{wishlistProducts:n}=e,t=(0,y.Z)(),{customer:i}=(0,b.Z)(),{useManufacturers:r,useCategories:l}=(0,Z.Z)(),o=r().data,u=l().data,h=(0,O.Z)(),[m,g]=(0,s.useState)([...n]),f=m.length,[P,C]=(0,s.useState)(1),L=Math.ceil(f/12),_=(P-1)*12,N=12*P-1,R=d.$.ACCOUNT_WISHLIST,[S,B]=(0,s.useState)(!1);if(!S&&m.length>0){let{products:e}=(0,I.o)({manufacturers:o,products:m});(0,c.T)({products:e,gaItemList:R,customerId:null==i?void 0:i.id,categories:null!=u?u:[],customerType:h}),B(!0)}let k=t("account.overview.wishlist.summary",{count:f}),[D,M]=(0,s.useState)({field:1,type:0});return(0,s.useEffect)(()=>{var e;null===(e=document.getElementById("page-wrapper"))||void 0===e||e.scrollTo({top:0,behavior:"smooth"})},[P]),(0,s.useEffect)(()=>{let e=[...n].sort({0:(e,n)=>e.price.unitPrice.gross-n.price.unitPrice.gross,1:(e,n)=>e.name.localeCompare(n.name)}[D.field]);1===D.type&&e.reverse(),g([...e]),C(1)},[D.field,D.type,n]),(0,a.jsxs)(p.sg,{children:[(0,a.jsxs)(x,{children:[(0,a.jsxs)(E.Z,{children:[(0,a.jsx)("strong",{children:f})," ",(0,a.jsx)("span",{}),k]}),(0,a.jsx)(w,{name:"order",options:j(t),defaultOption:j(t)[0],required:!1,onChange:e=>{!function(e){switch(e.target.value){case"0":M({field:1,type:0});break;case"1":M({field:1,type:1});break;case"2":M({field:0,type:0});break;case"3":M({field:0,type:1})}}(e)}})]}),(0,a.jsx)(p.sg,{children:(0,a.jsx)(p.X2,{children:m.map((e,n)=>n<=N&&n>=_&&(0,a.jsx)(v,{$hasFilters:!1,children:(0,a.jsx)(T.Z,{product:e,listIndex:n,listItem:R},e.id)},"wishlist-body-wrapper-".concat(e.id)))})}),f>0&&(0,a.jsx)(A.Z,{pagination:{totalPages:L,page:P,total:f,limit:12},handleNext:()=>C(P+1),handlePrevious:()=>C(P-1),handlePageClick:e=>C(e)})]})}(i=l||(l={}))[i.Price=0]="Price",i[i.Name=1]="Name",(r=o||(o={}))[r.Asc=0]="Asc",r[r.Desc=1]="Desc";var C=t(40780),L=t(11163),_=t(40706),N=t(27291);let R=g.ZP.div.withConfig({componentId:"sc-72f8046-0"})(["position:relative;padding-left:0.8em;"]),S=g.ZP.div.withConfig({componentId:"sc-72f8046-1"})(e=>{let{theme:{SPACINGS:n}}=e;return(0,g.iv)(["display:flex;align-items:center;justify-content:space-between;margin-bottom:",";"],n.L)}),B=(0,g.ZP)(N.Z).withConfig({componentId:"sc-72f8046-2"})(e=>{let{theme:{LAYOUT:n,TYPOGRAPHY:t}}=e;return(0,g.iv)(["@media screen and (min-width:","px){",";}"],n.LAYOUT_BREAKPOINT.TABLET_LANDSCAPE,t.HEADING_2)}),k=(0,g.ZP)(_.Z).withConfig({componentId:"sc-72f8046-3"})(e=>{let{$isActive:n,theme:{COLOR:t}}=e;return(0,g.iv)(["&:hover{fill:",";}",""],t.blue,n&&(0,g.iv)(["fill:",";"],t.blue))});var D=t(78143),M=t(766),U=t(52293);let Y=g.ZP.li.withConfig({componentId:"sc-12635918-0"})(e=>{let{theme:{COLOR:n}}=e;return(0,g.iv)(["border-bottom:1px solid ",";"],n.grey02)}),K=g.ZP.ul.withConfig({componentId:"sc-12635918-1"})(e=>{let{$isAlternative:n,theme:{LAYOUT:t,SPACINGS:i,COLOR:r,Z_INDEX:l}}=e;return(0,g.iv)(["padding:"," ",";",""],i.L,i.MD,n&&(0,g.iv)(["@media screen and (min-width:","px){border:1px solid ",";width:28rem;background-color:",";z-index:",";padding-top:0;padding-bottom:0;position:absolute;right:0;top:100%;",":last-child{border-bottom:none;}}"],t.LAYOUT_BREAKPOINT.TABLET_PORTRAIT,r.black,r.white,l.MODAL,Y))}),X=(0,g.ZP)(U.Z).withConfig({componentId:"sc-12635918-2"})(e=>{let{theme:{SPACINGS:n}}=e;return(0,g.iv)(["padding:"," 0;width:100%;"],n.MD)});function H(e){let{addWishlistToCard:n,clearWishlist:t,totalAmount:i,taxIncluded:r,isAlternative:l}=e,o=(0,y.Z)();return(0,a.jsxs)(K,{$isAlternative:l,children:[(0,a.jsx)(Y,{children:(0,a.jsx)(X,{type:"button",icon:"plus",isReversed:!0,paragraphType:"BODY",onClick:n,label:o("account.overview.wishlist.options.buy",{amount:i,b:e=>(0,a.jsx)("strong",{children:e}),taxIncluded:o(r?"account.overview.order.total.incl":"account.overview.order.total.excl")})})}),(0,a.jsx)(Y,{children:(0,a.jsx)(X,{type:"button",className:"clear-wishlist",icon:"delete",isReversed:!0,paragraphType:"BODY",onClick:t,label:o("account.overview.wishlist.options.clear"),isDanger:!0})})]})}var $=t(79848),W=t(21964),V=t(31061),G=t(71425),q=t(61043),F=t(94362),z=t(36510),Q=t(14481),J=t(72115),ee=function(e){let{wishlist:n}=e,{clearWishlist:t}=(0,q.Z)(),{setCart:i}=(0,W.Z)(),{customer:r}=(0,b.Z)(),{useSetWishlistProductsIds:l}=(0,Z.Z)(),o=l(),d=(0,F.Z)(),c=(0,L.useRouter)(),[u,h]=(0,s.useState)(!1),p=(0,y.Z)(),m=(0,V.Z)(),g=(0,G.Z)(),f=n.reduce((e,n)=>e+(g?n.price.unitPrice.gross:n.price.unitPrice.net),0),v=async()=>{if(r){i(await (0,C.h6)(n.map(e=>({referencedId:e.id,type:"product"})),d)),h(!1);try{await c.push($.H1.CHECKOUT_CART)}catch(e){(0,Q.Z)(e,"Error while adding wishlist to cart")}}},x=async()=>{if(null==r?void 0:r.id){let e=n.map(e=>e.id);try{await t(e)}catch(e){(0,Q.Z)(e,"Error while clearing wishlist")}o([])}else localStorage.removeItem(J.n),o([]);h(!1)};return(0,a.jsxs)(R,{children:[(0,a.jsxs)(S,{children:[(0,a.jsx)(B,{type:"HEADING_1",children:p("account.overview.wishlist.detail")}),(0,a.jsx)("button",{type:"button","aria-label":"add-to-wishlist",className:"wishlist-options",onClick:()=>{h(e=>!e)},children:(0,a.jsx)(k,{name:"options",$isActive:u})})]}),u&&(0,a.jsx)(M.p,{$hideContentBreakpoint:z.Z.LAYOUT_BREAKPOINT.TABLET_PORTRAIT-1,children:(0,a.jsx)(H,{isAlternative:!0,taxIncluded:g,totalAmount:m(f,{showCurrencySymbol:!0}),addWishlistToCard:v,clearWishlist:x})}),(0,a.jsx)(M.t,{$showContentBreakpoint:z.Z.LAYOUT_BREAKPOINT.TABLET_PORTRAIT,children:(0,a.jsx)(D.Z,{onClose:()=>{h(!1)},isOpen:u,isSmall:!0,title:p("account.overview.wishlist.options"),children:(0,a.jsx)(H,{taxIncluded:g,totalAmount:m(f,{showCurrencySymbol:!0}),addWishlistToCard:v,clearWishlist:x})})})]})},en=t(98397),et=t(68220),ei=t(72042),er=t(35303),el=t(77536);function eo(){let e=(0,y.Z)(),n=(0,en.Z)(),{customer:t}=(0,b.Z)(),i=(0,O.Z)(),{useCategories:r}=(0,Z.Z)(),l=r().data,o=d.$.ACCOUNT_WISHLIST,p=(0,s.useRef)(!1),{useSetCurrentPageType:g}=(0,ei.Z)(),f=g(),{useWishlistProductsIds:v}=(0,Z.Z)(),x=v();(0,s.useEffect)(()=>{f("wishlist")},[f]),p.current||((0,u.Z)({customerId:null==t?void 0:t.id,customerType:i,pageType:"wishlist"}),p.current=!0);let{productListData:w,isLoading:A}=(0,et.r)(x,"wishlist",n);return(0,s.useEffect)(()=>{w&&w.length<1||(0,c.T)({categories:null!=l?l:[],customerId:null==t?void 0:t.id,products:w||void 0,gaItemList:o,customerType:i})},[i,o,l,null==t?void 0:t.id,w]),(0,a.jsxs)(h.Z,{hasSmallMarginTop:!0,children:[w&&(0,a.jsx)(ee,{wishlist:w}),!w&&!A&&(0,a.jsx)(m.Z,{className:"wishlist-is-empty",title:e("account.overview.wishlist.empty"),button:{label:e("products.view"),link:{href:(0,$.u2)("SEARCH_PATH",n)}}}),w&&w.length>0&&(0,a.jsx)(P,{wishlistProducts:w})]})}var ea=!0;function es(){var e;return(null===(e=(0,b.Z)().customer)||void 0===e?void 0:e.id)?(0,a.jsx)(er.Z,{children:(0,a.jsx)(eo,{})}):(0,a.jsx)(el.Z,{children:(0,a.jsx)(p.W2,{children:(0,a.jsx)(eo,{})})})}},35303:function(e,n,t){"use strict";var i=t(85893),r=t(11752),l=t.n(r),o=t(9008),a=t.n(o),s=t(11163),d=t(78462),c=t(35882),u=t(25781),h=t(81913),p=t(35462),m=t(86629),g=t(64635),f=t(36830),v=t(24645);n.Z=function(e){let{page:{seoTitle:n,seoDescription:t}={},children:r=null,hasRecentlyViewedProducts:o=!1}=e,x=(0,f.Z)(),{asPath:w,locales:A,locale:T}=(0,s.useRouter)(),E=c.$.ACCOUNT_RECENTLY_VIEWED,{publicRuntimeConfig:j}=l()(),b=!j.genesys.v2;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a(),{children:[(0,i.jsx)("title",{children:n||x("default.page.title")}),(0,i.jsx)("meta",{name:"description",content:t}),A&&A.filter(e=>e!==T).map(e=>{let n=(0,v.n)({languageCode:e,path:w});return(0,i.jsx)("link",{rel:"alternate",hrefLang:e,href:n},"account-page-".concat(e))})]}),(0,i.jsxs)(d.PQ,{children:[(0,i.jsx)(p.Z,{hasSmallMarginTop:!0,children:(0,i.jsx)(g.W2,{children:(0,i.jsxs)(g.X2,{children:[(0,i.jsx)(d.C,{columns:{TABLET_LANDSCAPE:4,DESKTOP:3},children:(0,i.jsx)(m.Z,{})}),(0,i.jsx)(g.sg,{columns:{TABLET_LANDSCAPE:8,DESKTOP:9},children:r})]})})}),o&&(0,i.jsx)(p.Z,{children:(0,i.jsx)(g.W2,{children:(0,i.jsx)(u.Z,{listItem:E})})})]}),b&&(0,i.jsx)(h.Z,{})]})}},77536:function(e,n,t){"use strict";var i=t(85893),r=t(11752),l=t.n(r),o=t(9008),a=t.n(o),s=t(11163),d=t(78462),c=t(81913),u=t(46909),h=t(36830),p=t(24645);n.Z=function(e){let{page:{seoTitle:n,seoDescription:t}={},children:r=null}=e,{publicRuntimeConfig:o}=l()(),{locale:m,locales:g,asPath:f}=(0,s.useRouter)(),v=(0,h.Z)(),x=(0,u.V)(o.brand),w=!o.genesys.v2;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a(),{children:[(0,i.jsx)("title",{children:n||v("default.page.title")}),(0,i.jsx)("meta",{name:"description",content:t}),(0,i.jsx)("meta",{name:"robots",content:"index, follow"}),(0,i.jsx)("link",{rel:"icon",href:x.favicon.ico,sizes:"any"}),x.favicon.svg&&(0,i.jsx)("link",{rel:"icon",href:x.favicon.svg,type:"image/svg+xml"}),g&&g.filter(e=>e!==m).map(e=>{let n=(0,p.n)({languageCode:e,path:f});return(0,i.jsx)("link",{rel:"alternate",hrefLang:e,href:n},"default-link-".concat(e))})]}),(0,i.jsx)(d.PQ,{children:r}),w&&(0,i.jsx)(c.Z,{})]})}},50559:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var i=t(11752),r=t.n(i);function l(e){let{prependOrigin:n=!0,baseUrl:t=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{publicRuntimeConfig:{appUrl:i}}=r()(),l=new URLSearchParams;if(Array.isArray(e))for(let n=0;n<e.length;n+=1){let t=e[n];(null==t?void 0:t.name)&&(null==t?void 0:t.value)&&l.set(t.name,t.value)}else{let n=Object.keys(e);for(let t=0;t<n.length;t+=1){let i=n[t];if(!i)continue;let r=e[i];r&&(Array.isArray(r)?r.forEach(e=>{l.append(i,e)}):l.set(i,r))}}let o=function e(n,t){let i=n;Array.isArray(t)||(t=[t]);for(let r=0;r<t.length;r+=1){let l=t[r];i.endsWith(l)&&(i=e(i=n.slice(0,-1),t))}return i}(t,["/","?"]),a="".concat(o,"?").concat(l.toString());return n?i+a:a}}},function(e){e.O(0,[146,925,786,888,774,179],function(){return e(e.s=32206)}),_N_E=e.O()}]);