"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[941],{18488:function(e,t,n){n.d(t,{Z:function(){return f}});var a=n(85893),r=n(94184),o=n.n(r),i=n(69569),l=n(2884),s=n(24443),u=n(82729),c=n(31666),d=n(11010);function p(){let e=(0,u._)(["\n font-size: 12px;\n margin-bottom: 24px;\n\n @media all and (max-width: 820px) {\n margin-bottom: 8px;\n }\n\n .breadcrumb {\n color: ",";\n text-decoration: none;\n margin-left: 0.4em;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n cursor: pointer;\n\n &--underline {\n text-decoration: underline;\n }\n\n &:first-of-type {\n margin-left: 0;\n }\n\n &:hover {\n color: ",";\n }\n }\n"]);return p=function(){return e},e}function m(){let e=(0,u._)(["\n color: ",";\n font-weight: 700;\n margin-left: .4em;\n"]);return m=function(){return e},e}function g(){let e=(0,u._)(["\n color: ",";\n font-weight: 300;\n margin-left: .4em;\n"]);return g=function(){return e},e}let h=c.Z.p(p(),d.Z.buttonColorDimmed,d.Z.buttonColorDimmedLight),y=c.Z.span(m(),d.Z.buttonColorSecondaryLight),x=c.Z.span(g(),d.Z.buttonColorSecondaryLight);var f=e=>{let{inActives:t=[],showUnderline:n,active:r}=e;return(0,a.jsx)("div",{className:"bread-crumbs-wrapper",children:(0,a.jsxs)(h,{className:"bread-crumbs-container",children:[(0,a.jsx)(s.Z,{route:i.XX,children:(0,a.jsx)("span",{className:o()({breadcrumb:!0,"breadcrumb--underline":n}),children:"".concat((0,l.t)("WEB2_LOCALIZATION_homepage")," >")})}),t.map((e,t)=>(0,a.jsx)(s.Z,{route:e.route,params:e.routeParams,className:o()({breadcrumb:!0,"breadcrumb--underline":n}),children:(0,a.jsx)("span",{className:o()({breadcrumb:!0,"breadcrumb--underline":n}),children:"".concat(e.label," >")})},e.route.key+t)),!!r&&n&&(0,a.jsx)(x,{children:r}),!!r&&!n&&(0,a.jsx)(y,{children:r})]})})}},82712:function(e,t,n){var a=n(85893),r=n(94184),o=n.n(r);t.Z=e=>{let{children:t=null,className:n}=e;return(0,a.jsx)("div",{className:o()({"layout-page-container":!0,[n]:!!n}),children:t})}},54447:function(e,t,n){n.d(t,{Z:function(){return v}});var a=n(56225),r=n(85893);n(67294);var o=n(30053),i=n(48059),l=n(70724),s=n(2884),u=n(74532),c=n(99452),d=n(26555),p=n(57159),m=n(93556),g=n(82729),h=n(31666),y=n(11010);function x(){let e=(0,g._)(["\n display: flex;\n flex-direction: column;\n gap: 2.25rem;\n\n .list-body {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: stretch;\n /* margin: 3em 0; */\n gap: 0.94rem;\n\n &-align-left {\n justify-content: flex-start;\n\n .public-func-retailers-list-element {\n margin-right: 1em;\n }\n }\n }\n\n @media all and (max-width: ",") {\n gap: 16px;\n\n & > .layout-button {\n .button {\n padding: 12px 24px;\n font-size: 14px;\n border-width: 2px;\n\n .button-content {\n font-size: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: unset;\n }\n }\n }\n }\n"]);return x=function(){return e},e}var f=h.Z.div(x(),y.Z.mobileL),v=(0,a.$j)((e,t)=>({state:{market:e.markets.current.data}}))(e=>{let{collection:t,state:n,onLoad:a=e=>new Promise(t=>t(e)),hideButton:g,buttonLink:h,buttonRoute:y,buttonParams:x,enablePagination:v,customButton:b,style:C}=e,P=(0,l.OH)(),Z={seeMoreButton:(0,s.t)("WEB2_NEWSPAPERS_LIST_seeMoreButton")};return(0,r.jsxs)(f,{className:"public-func-selected-deals-list",style:C,children:[(0,r.jsx)(d.Z,{onLoad:e=>a?a(e):new Promise(t=>t(e)),collection:{...t,meta:v?t.meta:null},onMapElement:e=>{var t;return(0,r.jsx)(p.Z,{market:n.market,productId:e.id,productName:e.name,productSlug:e.originSlug,retailerSlug:e.retailer.slug,retailerName:e.retailer.name,image:(0,r.jsx)(m.Z,{alt:"product - ".concat(null==e?void 0:e.name," - ").concat(null==e?void 0:null===(t=e.retailer)||void 0===t?void 0:t.name),src:e.thumbnails.list}),description:e.name,priceOld:e.oldPrice&&o.Z.getItemPrice(e.oldPrice,n.market),price:e.price&&o.Z.getItemPrice(e.price,n.market),parcelPrice:e.parcelPrice&&o.Z.getParcelPrice(e.parcelPrice,e.parcelNumberOfMonths,n.market),parcelNumberOfMonths:e.parcelNumberOfMonths,forAdults:e.forAdults,displayDuration:e.displayDuration,buyNow:e.buyNow},e.id)}}),!g&&(0,r.jsx)(c.ZP,{style:c.AK.Secondary,variant:c.cT.Outline,element:c.vt.Anchor,href:h,route:y,routeParams:x,onClick:()=>(0,u.L)(i.o5.CategoryClick,{category:null==x?void 0:x.topCategorySlug,page_source:P}),children:Z.seeMoreButton}),(null==b?void 0:b.visible)&&(0,r.jsx)(r.Fragment,{children:(null==b?void 0:b.content)||(0,r.jsx)(c.ZP,{style:c.AK.Secondary,variant:c.cT.Outline,onClick:b.onClick,children:Z.seeMoreButton})})]})})},30941:function(e,t,n){n.d(t,{Z:function(){return en}});var a=n(56225),r=n(14890),o=n(32887),i=n(50509),l=n(69569),s=n(70724),u=n(13659),c=n(86463),d=n(96756),p=n(2836),m=n(33238),g=n(98400),h=n(21845);let y=e=>(t,n)=>t((0,g.lA)({getState:n,reduxType:h.R,method:"GET",path:(0,u.n)(m.TR,e),params:e,requestParams:e}));var x=n(77936),f=n(84018),v=n(85893),b=n(67294),C=n(11163),P=n(5152),Z=n.n(P),j=n(2884),T=n(18488),_=n(78360),E=n(34849),w=n(82712),N=n(36957),S=n(9029),A=n(42472),G=n(82729),O=n(31666),k=n(11010);function R(){let e=(0,G._)(["\n margin-bottom: 7em;\n\n .list-footer {\n max-width: 30em;\n margin: 0 auto;\n }\n\n @media all and (max-width: ",") {\n }\n"]);return R=function(){return e},e}var D=O.Z.div(R(),k.Z.tabletS),I=n(97708),L=e=>{let{collection:t,topCategory:n}=e;return(0,v.jsxs)(D,{className:"public-page-home-section-category-newspapers",children:[(0,v.jsx)(A.Z,{variant:A.t.Orange,children:(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("h1",{className:"title-heading",children:(0,j.t)("WEB2_CATEGORY_newspapersListHeadline",{categoryName:n.name})})})}),(0,v.jsx)(I.Z,{showPagination:!1,collection:t})]})};function B(){let e=(0,G._)(["\n margin-bottom: 7em;\n\n .list-footer {\n max-width: 30em;\n margin: 0 auto;\n }\n\n @media all and (max-width: ",") {\n }\n"]);return B=function(){return e},e}var q=O.Z.div(B(),k.Z.tabletS),Y=n(54447),W=e=>{let{collection:t,topCategory:n}=e;return(0,v.jsxs)(q,{className:"public-page-home-section-category-products",children:[(0,v.jsx)(A.Z,{variant:A.t.Orange,children:(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("h1",{className:"title-heading",children:(0,j.t)("WEB2_CATEGORY_productsListHeadline",{categoryName:n.name})})})}),(0,v.jsx)(Y.Z,{hideButton:!0,collection:t,enablePagination:"true"})]})};function M(){let e=(0,G._)(["\n margin-bottom: 7em;\n\n .list-footer {\n max-width: 30em;\n margin: 0 auto;\n }\n\n @media all and (max-width: ",") {\n }\n"]);return M=function(){return e},e}var H=O.Z.div(M(),k.Z.tabletS),U=n(37477),F=e=>{let{collection:t,topCategory:n}=e;return(0,v.jsxs)(H,{className:"public-page-home-section-category-shops",children:[(0,v.jsx)(A.Z,{variant:A.t.Orange,children:(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("h1",{className:"title-heading",children:(0,j.t)("WEB2_CATEGORY_shopsListHeadline",{categoryName:n.name})})})}),(0,v.jsx)(U.Z,{collection:{...t,meta:null}})]})},z=n(24443);function $(){let e=(0,G._)(["\n margin-bottom: 7em;\n\n .see-more-button {\n align-self: flex-end;\n }\n .shops-list {\n display: flex;\n flex-wrap: wrap;\n\n .shops-list-element {\n margin-right: 2em;\n }\n };\n\n .shops-list-element {\n margin-bottom: .5em;\n line-height: 1.75em;\n };\n\n .shops-link {\n color: #5D6771;\n font-size: .94em;\n text-decoration: underline;\n };\n\n .shops-button-container {\n margin-top: 3.125rem;\n display: flex;\n justify-content: center;\n };\n\n @media all and (max-width: ",") {\n }\n"]);return $=function(){return e},e}var V=O.Z.div($(),k.Z.tabletS),X=e=>{let{categoryName:t,data:n}=e;return(0,v.jsxs)(V,{className:"public-page-single-category-popular-products",children:[(0,v.jsx)(A.Z,{variant:A.t.Orange,children:(0,v.jsx)("h2",{className:"title-heading",children:(0,j.t)("WEB2_SINGLE_CATEGORY_popularProductsInLeaflets",{categoryName:t||"categoryName"})})}),(0,v.jsx)("div",{className:"shops-list-container",children:(0,v.jsx)("ul",{className:"shops-list",children:n.map(e=>(0,v.jsx)("li",{className:"shops-list-element",children:(0,v.jsx)(z.Z,{route:l.ZR,params:{query:e.slug},children:(0,v.jsxs)("a",{className:"shops-link",children:[e.tag,","]})})},e.id))})})]})};function K(){let e=(0,G._)(["\n @media all and (max-width: ",") {\n }\n"]);return K=function(){return e},e}function Q(){let e=(0,G._)(["\n color: ",";\n font-size: 12px;\n margin-bottom: 4.16em;\n"]);return Q=function(){return e},e}function J(){let e=(0,G._)(["\n color: ",";\n font-weight: 700;\n margin-left: .4em;\n"]);return J=function(){return e},e}var ee=O.Z.div(K(),k.Z.tabletS);O.Z.p(Q(),k.Z.buttonColorDimmed),O.Z.span(J(),k.Z.buttonColorSecondaryLight);var et=e=>{var t,a;let{state:r,actions:o,isLoaded:i}=e,{query:s}=(0,C.useRouter)(),u=s.page?parseInt(s.page):1,c=Z()(()=>Promise.all([n.e(3051),n.e(7416),n.e(5985)]).then(n.bind(n,15985)),{loadableGenerated:{webpack:()=>[15985]},ssr:!1}),d={metaTitleEmpty:(0,j.t)("WEB2_PRODUCTS_CATEGORY_meta_title",{category:""}),metaDescriptionEmpty:(0,j.t)("WEB2_PRODUCTS_CATEGORY_meta_description",{category:""}),productCategories:(0,j.t)("WEB2_NAVIGATION_productsCategories")};(0,b.useEffect)(()=>{i||o.singleTagTopCategory({slug:s.topCategorySlug.toString()})},[s.topCategorySlug]),(0,b.useEffect)(()=>{r.topCategory.data&&p()},[r.topCategory.data,u]),(0,b.useEffect)(()=>{r.retailers.elements.length>0&&m()},[r.retailers.elements.length]);let p=()=>{var e;o.listProducts({page:u,perPage:15,topCategoryIds:[r.topCategory.data.id]}),o.listTags({page:1,perPage:999,topCategoryId:[r.topCategory.data.id]}),o.listRetailers({page:1,perPage:12,topCategoryIds:[null===(e=r.topCategory)||void 0===e?void 0:e.data.id]}),m()},m=()=>{var e,t;o.listNewspapers({page:1,perPage:12,topCategoryIds:[null===(t=r.topCategory)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.id]})};if(!r.topCategory.data)return(0,v.jsxs)(ee,{className:"public-page-home",children:[(0,v.jsx)(_.Z,{title:d.metaTitleEmpty,description:d.metaDescriptionEmpty}),(0,v.jsx)(S.Z,{children:(0,v.jsx)(N.ZP,{})})]});let g={metaTitle:(0,j.t)("WEB2_PRODUCTS_CATEGORY_meta_title",{category:(null===(t=r.topCategory.data)||void 0===t?void 0:t.name)||""}),metaDesc:(0,j.t)("WEB2_PRODUCTS_CATEGORY_meta_description",{category:(null===(a=r.topCategory.data)||void 0===a?void 0:a.name)||""})};return(0,v.jsxs)(ee,{className:"public-page-home",children:[(0,v.jsx)(_.Z,{title:g.metaTitle,description:g.metaDesc}),(0,v.jsx)(S.Z,{children:(0,v.jsx)(w.Z,{children:(0,v.jsxs)(E.Z,{children:[(0,v.jsx)(T.Z,{inActives:[{label:d.productCategories,route:l.en}],active:r.topCategory.data.name}),r.products.elements.length>0&&(0,v.jsx)(W,{topCategory:r.topCategory.data,collection:r.products}),r.retailers.elements.length>0&&(0,v.jsx)(F,{topCategory:r.topCategory.data,collection:r.retailers}),r.newspapers.elements.length>0&&(0,v.jsx)(L,{topCategory:r.topCategory.data,collection:r.newspapers}),r.tags.elements.length>0&&(0,v.jsx)(X,{data:r.tags.elements,categoryName:r.topCategory.data.name}),r.topCategory.data.description&&(0,v.jsx)(c,{topCategory:r.topCategory.data})]})})})]})};et.getInitialProps=o.Y.getInitialPageProps(e=>async t=>{var n,a,r,o,c,p,m;let{query:g,req:h,pathname:x,res:f}=t;if(!h)return{};let v=null==h?void 0:h.url,b=null;if(v&&(null===(n=(0,s.pZ)(v,e.getState().translations.list.elements)[0])||void 0===n?void 0:n.key)===l.j$.key){let{categorySlug:t}=g,n=null===(c=(await e.dispatch((0,d.U_)({slug:t}))).payload)||void 0===c?void 0:null===(o=c.data)||void 0===o?void 0:null===(r=o.newspaperTagCategory)||void 0===r?void 0:null===(a=r.topCategory)||void 0===a?void 0:a.slug,i=(0,s.ZY)(l.iB,e.getState().translations.list.elements);return f.writeHead(301,{Location:n?(0,u.n)(i.value,{topCategorySlug:n}):"/"}),f.end()}try{b=(await e.dispatch(y({slug:g.topCategorySlug}))).payload.data[i.T8]}catch(e){throw f.statusCode=(null==e?void 0:null===(m=e.error)||void 0===m?void 0:null===(p=m.response)||void 0===p?void 0:p.status)||404,Error()}if((null==b?void 0:b.slug)!==g.topCategorySlug){let t=(0,s.ZY)(l.iB,e.getState().translations.list.elements);return f.writeHead(301,{Location:(0,u.n)(t.value,{topCategorySlug:null==b?void 0:b.slug})}),f.end()}return{isLoaded:!0}});var en=(0,a.$j)(e=>({state:{products:e.products.list,topCategory:e.newspaperTagTopCategories.single,tags:e.newspaperTags.listAll,retailers:e.retailers.list,newspapers:e.newspapers.list,market:e.markets.current.data}}),e=>({actions:{listProducts:(0,r.DE)(x.pb,e),singleTagTopCategory:(0,r.DE)(y,e),listTags:(0,r.DE)(p.aF,e),listRetailers:(0,r.DE)(f.pb,e),listNewspapers:(0,r.DE)(c.pb,e)}}))(et)},2836:function(e,t,n){n.d(t,{U_:function(){return l},_s:function(){return u},aF:function(){return s},kj:function(){return c}});var a=n(33238),r=n(13659),o=n(98400),i=n(5872);let l=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.b_,method:"GET",path:(0,r.n)(a.y$,e),params:e,requestParams:e})),s=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.Cj,method:"GET",path:a.V4,params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),u=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.y6,method:"GET",path:(0,r.n)(a.eF,e),params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),c=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.Ac,method:"GET",path:(0,r.n)(a.GQ,e),params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}}))},77936:function(e,t,n){n.d(t,{GR:function(){return g},H9:function(){return u},M0:function(){return p},ML:function(){return d},Oz:function(){return s},Zc:function(){return m},Zr:function(){return c},pb:function(){return l},wD:function(){return h}});var a=n(33238),r=n(13659),o=n(98400),i=n(16014);let l=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:e.reduxType||i.IY,method:"GET",path:a.Zy,params:e,ignoreState:e.ignoreState||!1,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),s=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.UZ,method:"GET",path:(0,r.n)(a.xG,e),params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),u=e=>(t,n)=>t((0,o.lA)({getState:n,method:"GET",path:a.Zy,ignoreState:!0,params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),c=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.RP,method:"GET",path:(0,r.n)(a.YC,e),params:e,requestParams:{retailerId:null==e?void 0:e.retailerId}})),d=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.H5,method:"GET",path:(0,r.n)(a.PC,e),params:e})),p=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.Xm,method:"GET",path:(0,r.n)(a.rV,e),params:e,cache:null==e?void 0:e.cache,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),m=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.U6,method:"GET",path:(0,r.n)(a.C2,e),params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}})),g=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.LY,method:"GET",path:a.Zy,params:e,ignoreState:e.ignoreState||!1,requestParams:{...e,page:e.page||1,perPage:e.perPage||10}})),h=e=>(t,n)=>t((0,o.lA)({getState:n,reduxType:i.k_,method:"GET",path:(0,r.n)(a.Zu,e),params:e,requestParams:{...e,page:e.page||1,perPage:e.perPage||20}}))}}]);