"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[63201,83326],{79669:(n,e,t)=>{t.r(e),t.d(e,{default:()=>D});var i,a,r,o,c,g,s,l,d,p,u,m=t(29439),h=(t(32564),t(26541),t(26833),t(92222),t(67294)),f=t(30168),y=t(71893),b=t(30305),v=t(46229),x=y.ZP.div(i||(i=(0,f.Z)(["\n display: flex;\n flex-direction: column;\n padding: ",";\n height: 100%;\n width: 100%;\n min-height: 23.705rem;\n min-width: 9.75rem;\n max-width: 15rem;\n box-sizing: border-box;\n margin: 0 auto;\n background: ",";\n border-radius: ",";\n\n "," {\n width: fit-content;\n margin-left: ",";\n }\n "," {\n margin: 0 auto;\n width: 100%;\n }\n "," {\n padding: ",";\n max-width: 16.5rem;\n min-height: 30rem;\n }\n"])),(function(n){return n.theme.spacing.spacing02}),(function(n){return n.bg}),(function(n){return n.theme.spacing.spacing005}),b.B.tabletPortrait,(function(n){return n.theme.spacing.spacing03}),b.B.tabletLandscape,b.B.desktop,(function(n){return n.theme.spacing.spacing03})),w=y.ZP.label(a||(a=(0,f.Z)(["\n color: ",";\n font-weight: ",";\n line-height: ",";\n font-size: ",";\n margin-bottom: ",";\n"])),(function(n){return n.theme.colors.white}),(function(n){return n.theme.typography.body2Regular.weight}),(function(n){return n.theme.typography.body2Regular.lineHeight}),(function(n){return n.theme.typography.body2Regular.size}),(function(n){return n.theme.spacing.spacing02})),k=(0,y.ZP)(v.z)(r||(r=(0,f.Z)(["\n padding: 0.188rem 0px;\n width: 100%;\n display: block;\n"]))),j=y.ZP.div(o||(o=(0,f.Z)(["\n max-width: 12rem;\n max-height: 12rem;\n margin: 0 auto;\n "," {\n margin: 0;\n max-width: 15rem;\n max-height: 15rem;\n }\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n"])),b.B.tabletLandscape),Z=y.ZP.p(c||(c=(0,f.Z)(["\n color: ",";\n font-weight: ",";\n line-height: ",";\n font-size: ",";\n width: 100%;\n &&& {\n margin: "," 0;\n }\n"])),(function(n){return n.theme.colors.white}),(function(n){return n.theme.typography.body2Bold.weight}),(function(n){return n.theme.typography.body2Bold.lineHeight}),(function(n){return n.theme.typography.body2Bold.size}),(function(n){return n.theme.spacing.spacing01})),C=y.ZP.div(g||(g=(0,f.Z)([""]))),T=y.ZP.div(s||(s=(0,f.Z)(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n font-weight: ",";\n line-height: ",";\n font-size: ",";\n color: ",";\n label {\n margin-bottom: ",";\n display: block;\n }\n"])),(function(n){return n.theme.typography.body2Regular.weight}),(function(n){return n.theme.typography.body2Regular.lineHeight}),(function(n){return n.theme.typography.body2Regular.size}),(function(n){return n.theme.colors.white}),(function(n){return n.theme.spacing.spacing01})),P=y.ZP.span(l||(l=(0,f.Z)(["\n font-weight: ",";\n line-height: ",";\n font-size: ",";\n background: ",";\n display: block;\n color: ",";\n border-radius: ",";\n padding: "," ",";\n"])),(function(n){return n.theme.typography.header.h5.weight}),(function(n){return n.theme.typography.header.h5.lineHeight}),(function(n){return n.theme.typography.header.h5.size}),(function(n){return n.theme.colors.white}),(function(n){return n.theme.colors.black}),(function(n){return n.theme.spacing.spacing005}),(function(n){return n.theme.spacing.spacing0025}),(function(n){return n.theme.spacing.spacing005})),I=y.ZP.label(d||(d=(0,f.Z)(["\n color: ",";\n font-weight: ",";\n line-height: ",";\n font-size: ",";\n margin-top: 0.188rem;\n display: block;\n"])),(function(n){return n.theme.colors.white}),(function(n){return n.theme.typography.captionRegular.weight}),(function(n){return n.theme.typography.captionRegular.lineHeight}),(function(n){return n.theme.typography.captionRegular.size})),S=y.ZP.ul(p||(p=(0,f.Z)(["\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n li {\n width: 1.5rem;\n text-align: center;\n margin-right: ",";\n margin-bottom: 0;\n }\n"])),(function(n){return n.theme.spacing.spacing005})),L=y.ZP.div(u||(u=(0,f.Z)(["\n display: none;\n"]))),B=t(28225),O=t(58029),H=t(85893);const D=function(n){var e=n.categoryName,t=n.endTime,i=n.campaignColor,a=n.campaignTitle,r=n.imageUrl,o=(0,B.$G)(),c=(0,m.Z)(o,1)[0],g=(0,h.useState)((0,O.j)(t)),s=(0,m.Z)(g,2),l=s[0],d=s[1],p=(0,h.useState)(!1),u=(0,m.Z)(p,2),f=u[0],y=u[1],b=(0,h.useRef)();(0,h.useEffect)((function(){return b.current=setTimeout((function(){var n=(0,O.j)(t);d(n),Object.values(n).every((function(n){return"00"===n}))&&(y(!0),b.current&&clearTimeout(b.current))}),1e3),function(){return b.current&&clearTimeout(b.current)}}),[l,t]);return(0,H.jsxs)(x,{bg:i.secondary,children:[(0,H.jsx)(j,{children:(0,H.jsx)("img",{src:r,alt:c("categories.list.bomb")})}),(e||a)&&(0,H.jsx)(Z,{children:"".concat(c("categories.list.offerIn")," ").concat(e||a||"")}),(0,H.jsx)(T,{children:f?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w,{children:c("categories.list.reloadPage")}),(0,H.jsx)(k,{secondary:!0,onClick:function(){window.location.reload()},children:c("categories.list.reloadNow")})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(C,{children:[(0,H.jsx)("label",{children:c("categories.list.beginsIn")}),(0,H.jsxs)(S,{children:[(0,H.jsxs)("li",{children:[(0,H.jsx)(P,{children:l.days}),(0,H.jsx)(I,{children:"D"})]}),(0,H.jsxs)("li",{children:[(0,H.jsx)(P,{children:l.hours}),(0,H.jsx)(I,{children:"H"})]}),(0,H.jsxs)("li",{children:[(0,H.jsx)(P,{children:l.minutes}),(0,H.jsx)(I,{children:"M"})]}),(0,H.jsxs)("li",{children:[(0,H.jsx)(P,{children:l.seconds}),(0,H.jsx)(I,{children:"S"})]})]})]}),(0,H.jsx)(L,{className:"campaign-bomb-subscription-holder",children:(0,H.jsx)(v.z,{className:"campaign-bomb-subscription-button",secondary:!0,fluid:!0,children:c("categories.list.subscribe")})})]})})]})}},26720:(n,e,t)=>{t.r(e),t.d(e,{default:()=>sn});var i,a=t(29439),r=t(28225),o=t(30168),c=t(30305),g=t(71893),s=g.ZP.div(i||(i=(0,o.Z)(["\n margin: 0 auto;\n width: 100vw;\n color: ",";\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n margin-bottom: ",";\n & > div > div {\n padding-left: ",";\n "," {\n padding-left: 0;\n }\n }\n"])),(function(n){return n.fontColor||n.theme.colors.black}),(function(n){return n.background||"transparent"}),(function(n){return n.verticalSpacing&&n.theme.spacing.spacing02}),(function(n){return(n.emptyQuery?"6.5rem":n.verticalSpacing&&n.theme.spacing.spacing02)||void 0}),(function(n){return n.withGap&&n.theme.spacing.spacing02}),(function(n){return n.theme.spacing.spacing02}),c.B.tabletPortrait),l=t(1721),d=t(93433),p=(t(89554),t(54747),t(9653),t(92222),t(21249),t(82526),t(41817),t(93601)),u=t(79669),m=t(55211),h=t(85893),f=function(n,e,t){return n.map((function(n){return(0,h.jsx)(u.default,{campaignColor:e,campaignTitle:t,categoryName:n.categoryName,endTime:n.dateTime,imageUrl:n.description},n.id)}))};const y=function(n){var e,t,i=n.onPageH1,a=n.domain,r=n.cards,o=n.campaignColor,c=n.onClickBuy,g=n.isDesktop,s=n.campaignTitle,l=n.campaignTitleForLinks;if((null===r||void 0===r||null===(e=r.articles)||void 0===e||!e.length)&&(null===r||void 0===r||null===(t=r.scheduled)||void 0===t||!t.length))return[];var u=[],h=[];return r.articles.forEach((function(n){return Number(null===n||void 0===n?void 0:n.stock)>0?u.push(n):h.push(n)})),[].concat((0,d.Z)((0,m.Z)({cards:u,onPageH1:i,domain:a,onClickBuy:c,isDesktop:g,cardType:p.e.BOMBS,campaignTitle:s,campaignTitleForLinks:l})),(0,d.Z)(f(r.scheduled,o,l||s)),(0,d.Z)((0,m.Z)({cards:h,onPageH1:i,domain:a,onClickBuy:c,isDesktop:g,cardType:p.e.BOMBS,campaignTitle:s,campaignTitleForLinks:l})))};const b=function(n){var e=n.campaignId,t=n.flashCards,i=n.campaignColor,o=n.campaignTitle,c=n.campaignTitleForLinks,g=n.onPageH1,d=n.domain,p=n.isDesktop,u=n.titleCategorySelected,m=n.onClickBuy,f=(0,r.$G)(),b=(0,a.Z)(f,1)[0],v=y({onPageH1:g,domain:d,cards:null===t||void 0===t?void 0:t.items,campaignColor:i,onClickBuy:m,isDesktop:p,campaignTitle:o,campaignTitleForLinks:c});return e&&!u?(0,h.jsx)(s,{background:i.background,secondary:i.secondary,fontColor:i.font,children:(0,h.jsx)(l.Z,{id:"carousel-bombs-".concat(e||""),items:v,title:b("categories.list.flashOffers"),settings:{loop:!1}})}):(0,h.jsx)(h.Fragment,{})};var v,x,w,k,j,Z,C,T,P,I,S,L,B,O=g.ZP.div(v||(v=(0,o.Z)(["\n overflow: hidden;\n height: 100%;\n max-width: 97.5rem;\n width: 100%;\n margin: 0 auto;\n padding-top: ",";\n"])),(function(n){return n.theme.spacing.spacing01})),H=g.ZP.div(x||(x=(0,o.Z)(["\n margin: 0 auto;\n width: 100vw;\n color: ",";\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n margin-bottom: ",";\n"])),(function(n){return n.fontColor||n.theme.colors.black}),(function(n){return n.background||"transparent"}),(function(n){return n.verticalSpacing&&n.theme.spacing.spacing04}),(function(n){return(n.emptyQuery?"6.5rem":n.verticalSpacing&&n.theme.spacing.spacing04)||void 0}),(function(n){return n.withGap&&n.theme.spacing.spacing02})),D=(t(57327),t(68309),t(98969)),F=(t(47941),t(38880),t(49337),t(33321),t(69070),t(4942)),N=t(51062),z=g.ZP.div(w||(w=(0,o.Z)(["\n align-items: center;\n background-color: ",";\n border: 0.188rem solid transparent;\n border-radius: 50%;\n display: flex;\n height: ",";\n justify-content: center;\n margin-bottom: ",";\n overflow: hidden;\n padding: 0;\n position: relative;\n width: ",";\n\n "," {\n height: 104px;\n width: 104px;\n }\n\n ","\n\n ","\n"])),(function(n){return n.theme.colors.environment.percent05}),(function(n){return n.theme.spacing.spacing09}),(function(n){return n.theme.spacing.spacing01}),(function(n){return n.theme.spacing.spacing09}),c.B.tabletPortrait,(function(n){var e=n.isSelected,t=n.$backgroundColor;return e?(0,g.iv)(k||(k=(0,o.Z)(["\n border: 0.188rem solid ",";\n "])),t):(0,g.iv)(j||(j=(0,o.Z)(["\n &:hover {\n border: 0.188rem solid ",";\n }\n "])),(function(n){return n.theme.colors.environment.percent20}))}),(function(n){return n.disabled&&(0,g.iv)(Z||(Z=(0,o.Z)(["\n &::after {\n content: '';\n background: ",";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n opacity: 0.5;\n }\n\n &:hover {\n cursor: not-allowed;\n }\n "])),(function(n){return n.theme.colors.environment.percent05}))})),R=g.ZP.div(C||(C=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n cursor: pointer;\n border: 0;\n margin-left: ",";\n "," {\n margin-left: ",";\n }\n "," {\n margin: 0 auto;\n }\n ","\n\n ",";\n"])),(function(n){return n.theme.spacing.spacing02}),c.B.tabletPortrait,(function(n){return n.theme.spacing.spacing03}),c.B.tabletLandscape,(function(n){var e=n.isSelected,t=n.selectedColor;return e?(0,g.iv)(T||(T=(0,o.Z)(["\n .image-container {\n border: 0.188rem solid ",";\n }\n "])),(function(n){var e=n.theme;return t||e.colors.brand.main})):(0,g.iv)(P||(P=(0,o.Z)(["\n &:hover {\n .image-container {\n border: 0.188rem solid ",";\n }\n }\n "])),(function(n){return n.theme.colors.environment.percent20}))}),(function(n){return n.disabled&&(0,g.iv)(I||(I=(0,o.Z)(["\n &:hover {\n cursor: not-allowed;\n }\n "])))})),_=g.ZP.img(S||(S=(0,o.Z)(["\n width: ",";\n height: ",";\n\n "," {\n width: 50px;\n height: 50px;\n }\n "," {\n width: 64px;\n height: 64px;\n }\n"])),(function(n){return n.theme.spacing.spacing06}),(function(n){return n.theme.spacing.spacing06}),c.B.tabletPortrait,c.B.desktop),A=g.ZP.div(L||(L=(0,o.Z)(["\n display: flex;\n justify-content: center;\n"]))),E=g.ZP.h3(B||(B=(0,o.Z)(["\n ",";\n margin-bottom: ",";\n text-align: center;\n --max-lines: 3;\n display: -webkit-box;\n -webkit-line-clamp: var(--max-lines);\n -webkit-box-orient: vertical;\n overflow: hidden;\n ","\n\n "," {\n ",";\n margin-bottom: ",";\n }\n"])),N.g.body2Regular,(function(n){return n.theme.spacing.spacing01}),(function(n){var e=n.theme,t=n.isSelected,i=n.selectedColor;return t&&"color: ".concat(i||e.colors.brand.main,";")}),c.B.tabletLandscape,N.g.body2Regular,(function(n){return n.theme.spacing.spacing005}));function G(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function U(n){for(var e=1;e0?(0,h.jsxs)(H,{background:i.background,secondary:i.secondary,fontColor:i.font,withGap:!0,verticalSpacing:!0,children:[!0===m&&(0,h.jsx)(O,{id:"banner-cabecera-promocion"}),v.length?(0,h.jsx)(l.Z,{id:"carousel-categories-".concat(e||""),"data-testid":"carousel-categories-".concat(e||""),items:v,settings:{loop:!1,breakpoints:an,slidesPerGroup:!0}}):(0,h.jsx)(h.Fragment,{})]}):(0,h.jsx)(h.Fragment,{})};var on,cn=g.ZP.div(on||(on=(0,o.Z)(["\n margin: 0 auto;\n width: 100vw;\n color: ",";\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n margin-bottom: ",";\n"])),(function(n){return n.fontColor||n.theme.colors.black}),(function(n){return n.background||"transparent"}),(function(n){return n.verticalSpacing&&n.theme.spacing.spacing02}),(function(n){return(n.emptyQuery?"6.5rem":n.verticalSpacing&&n.theme.spacing.spacing02)||void 0}),(function(n){return n.withGap&&n.theme.spacing.spacing02}));const gn=function(n){var e=n.campaignId,t=n.highlightsCards,i=n.campaignTitle,o=n.campaignTitleForLinks,c=n.onPageH1,g=n.domain,s=n.isDesktop,d=n.titleCategorySelected,u=n.onClickBuy,f=(0,r.$G)(),y=(0,a.Z)(f,1)[0],b=(0,m.Z)({cards:t,onPageH1:c,domain:g,isDesktop:s,cardType:p.e.CAROUSEL,campaignTitle:i,campaignTitleForLinks:o,onClickBuy:u});return Boolean(b.length)&&b.length>0?(0,h.jsx)(cn,{withGap:!0,children:b.length?(0,h.jsx)(l.Z,{id:"carousel-highlights-".concat(e||""),items:b,title:"".concat(y("categories.list.highlightedOffers")," ").concat(d||""),settings:{loop:!1}}):(0,h.jsx)(h.Fragment,{})}):(0,h.jsx)(h.Fragment,{})};const sn=function(n){var e=n.campaignId,t=n.campaignLegacyId,i=n.flashCards,a=n.campaignColor,r=n.categoryCards,o=n.highlightsCards,c=n.campaignName,g=n.campaignTitle,s=n.campaignTitleForLinks,l=n.onPageH1,d=n.domain,p=n.language,u=n.isDesktop,m=n.loading,f=n.campaignType,y=n.titleCategorySelected,v=n.onClickBuy,x=n.userId,w=n.cartId;return(0,h.jsxs)(h.Fragment,{children:[e&&i&&i.items&&i.items.articles.length+i.items.scheduled.length>=6&&(0,h.jsx)(b,{campaignId:e,flashCards:i,campaignColor:a,campaignTitle:g,campaignTitleForLinks:s,onPageH1:l,domain:d,isDesktop:u,titleCategorySelected:y,onClickBuy:v}),r&&!(null===r||void 0===r||!r.items.length)&&(0,h.jsx)(rn,{campaignId:e,campaignLegacyId:t,campaignColor:a,categoryCards:r,campaignName:c,campaignTitle:g,language:p,loading:m,campaignType:f,userId:x,cartId:w}),o&&o.length>=6&&(0,h.jsx)(gn,{campaignId:e,highlightsCards:o,campaignTitle:g,campaignTitleForLinks:s,onPageH1:l,domain:d,isDesktop:u,titleCategorySelected:y,onClickBuy:v})]})}}}]); //# sourceMappingURL=Carousels.js.map