1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([["cozy_desktop_components_promotionBanner_PromoBannerContainer_tsx"],{
1"./cozy/desktop/components/promotionBanner/PromoBannerContainer.tsx":function(e,t,n){"use strict";n.d(t,{Z:function(){return y}}),n("./node_modules/core-js/modules/web.dom-collections.iterator.js");var o=n("./node_modules/react/index.js"),r=n("./node_modules/react-redux/es/index.js"),i=n("./cozy/coco/components/PromoBanner/PromoBanner.tsx"),a=n("./cozy/coco/components/ItemCarousel/ItemCarousel.tsx"),c=(n("./node_modules/core-js/modules/web.url.js"),n("./node_modules/core-js/modules/web.url-search-params.js"),n("./cozy/desktop/styles/promotionBanner/PromoBannerPannelWeb.tsx")),s=n("./node_modules/react-router/esm/react-router.js"),l=n("./cozy/coco/styles/DesignSpec.tsx"),d=n("./cozy/coco/components/Button/Button.tsx"),p=n("./cozy/coco/components/DesignSpec/TextSpec.tsx"),u=n("./cozy/data/constants/PromoBannerConstants.tsx"),m=n("./cozy/data/services/AnalyticsService.tsx"),_=n("./node_modules/react/jsx-runtime.js"),h=(0,r.$j)()((e=>{let{entries:t,onClickUnlockCtaButton:n,bannerWidth:r,shouldUseMaxWidth:i}=e;const a=(0,s.k6)(),h=(0,o.useRef)(null),x=r&&r<900,g=e=>{try{const{origin:t}=window.location,n=new URL(e);n.origin===t?a.push(n.pathname):window.open(e)}catch{a.push(e)}};return(0,_.jsx)(c.Ci,{bannerWidth:r,shouldUseMaxWidth:i,aspectRatio:4,useBannerHeight:!0,children:t.slice(0,3).map(((e,t)=>{const o=e.spec_data,r=u.Er.PANNEL,i=o.title_text_spec||o.subtitle_text_spec||o.coupon_text_spec||o.cta_spec||o.disclaimer_text_spec;return((e,t,o,r,i)=>{var a,s,u,f,y,v,B,P,b;return(0,_.jsx)(c.vm,{className:t,backgroundSpec:e.spec_data.background_media_spec,onClick:t=>{return n=t,o=e.click_event_id,r=e.action_url,i=e.log_info,o&&(0,m.y)(o,i),r&&g(r),void(null==h||null===(a=h.current)||void 0===a||a.onFirePromoCodeCopy(n));var n,o,r,i,a},children:r&&(0,_.jsx)(l.fq,{bannerType:i,alignDirection:null===(a=e.spec_data.ui_layout_constraints_spec)||void 0===a?void 0:a.align_direction,className:t,children:(0,_.jsxs)(l.x8,{children:[e.spec_data.title_text_spec&&(0,_.jsx)(p.Z,{className:"banner-title",textSpec:e.spec_data.title_text_spec,overrideStyle:{letterSpacing:"col_1"==t?"0.025em":"0.017em",color:null===(s=e.title_text_spec)||void 0===s?void 0:s.text_color,fontWeight:700,lineHeight:"1.14em",...x?{fontSize:"col_1"==t?"1em":"0.8em"}:{}}}),e.spec_data.subtitle_text_spec&&(0,_.jsx)(p.Z,{className:"banner-subtitle",textSpec:e.spec_data.subtitle_text_spec,overrideStyle:{letterSpacing:"col_1"==t?"0.0175em":"0.015em",color:null===(u=e.spec_data.subtitle_text_spec)||void 0===u?void 0:u.text_color,fontWeight:400,lineHeight:"col_1"==t?"normal":"14px",display:e.spec_data.coupon_text_spec?"inline-flex":""}}),(0,_.jsxs)(_.Fragment,{children:[e.spec_data.cta_spec&&(0,_.jsx)(d.ZP,{clickEventId:e.click_event_id,onClick:()=>{return t=e.deeplink,o=e.action_url,t&&n&&n(t),void(o&&g(o));var t,o},isFocusable:!0,overrideStyle:{marginBottom:e.spec_data.disclaimer_text_spec?"6px":0,background:null===(f=e.spec_data.cta_spec)||void 0===f?void 0:f.background_color,color:null===(y=e.spec_data.cta_spec)||void 0===y?void 0:y.text_color,borderRadius:"999px",padding:"col_1"==t?"0px 16px":"8px 12px",fontSize:"".concat(null===(v=e.spec_data)||void 0===v||null===(B=v.cta_spec)||void 0===B?void 0:B.text_size,"px"),fontWeight:700,letterSpacing:"0.08px",...x?{padding:"",fontSize:"0.6em"}:{}},children:null===(P=e.spec_data.cta_spec)||void 0===P?void 0:P.text}),e.spec_data.disclaimer_text_spec&&"col_1"==t&&(0,_.jsx)(p.Z,{textSpec:e.spec_data.disclaimer_text_spec,overrideStyle:{letterSpacing:"0.1px",fontSize:"0.62em",fontWeight:400,color:null===(b=e.spec_data.disclaimer_text_spec)||void 0===b?void 0:b.text_color}})]})]})})},o)})(e,["col_1","col_2","col_3"][t],t,i,r)}))})})),x=n("./cozy/shared/styles/promotionBanner/PromotionBanner.tsx"),g=n("./cozy/desktop/styles/promotionBanner/PromotionBanner.tsx"),f=n("./cozy/data/actions/LoggedOutUserActions.tsx"),y=(0,r.$j)(null,(e=>({showProgressiveBottomSheet:()=>e((0,f.setProgressiveBottomSheetShow)())})))((e=>{let{promoBannerProps:t,bannerWidth:n,shouldUseWidth:r,shouldUseMaxWidth:c,overrideStyle:s={},showProgressiveBottomSheet:l}=e;const[d,p]=(0,o.useState)(!1),[f,y]=(0,o.useState)(!1),{items:v,impression_event_id:B,log_info:P,style:b}=t;(0,o.useEffect)((()=>{(0,m.y)(B,P)}),[]);const w=e=>{e===u.$q&&l()},C=v.filter((e=>Boolean(e))),k=C.map(((e,t)=>(0,_.jsx)(i.Z,{promoBannerItem:e,bannerWidth:n,shouldUseWidth:r,onClickUnlockCtaButton:w},t)));return(0,_.jsx)(g.Dm,{style:s,children:"3.1"==b?(0,_.jsx)(h,{entries:C,bannerWidth:n,onClickUnlockCtaButton:w}):(0,_.jsx)(x.vU,{onMouseEnter:()=>{p(!0),y(!0)},onMouseLeave:()=>{p(!1),y(!1)}
1,bannerWidth:r?n:0,shouldUseMaxWidth:c,children:(0,_.jsx)(a.ZP,{entries:k,rotate:!0,withDot:C.length>1,forceHorizontal:!1,showArrow:C.length>1&&d,arrowPosition:a.ZV.SIDE_WITH_CIRCLE,autoScroll:!f,autoScrollInterval:(e=>{if(e)return 1e3*e})(C[0].auto_scroll_delay_seconds),overrideStyle:{padding:0},isFocusable:!0})})})}))},
1"./cozy/desktop/styles/promotionBanner/PromotionBanner.tsx":function(e,t,n){"use strict";n.d(t,{nk:function(){return l},x7:function(){return d},AY:function(){return p},mw:function(){return u},Hp:function(){return m},HM:function(){return _},Ar:function(){return h},qI:function(){return x},zd:function(){return g},RX:function(){return f},Hk:function(){return y},aG:function(){return v},Lg:function(){return B},aS:function(){return P},Ao:function(){return b},IP:function(){return w},Ur:function(){return C},HG:function(){return k},y_:function(){return S},b7:function(){return I},iN:function(){return N},cK:function(){return Z},oq:function(){return z},qi:function(){return j},eB:function(){return W},AC:function(){return D},dg:function(){return R},UK:function(){return U},ll:function(){return H},CS:function(){return A},xu:function(){return F},nm:function(){return O},Dm:function(){return E}});var o,r=n("./node_modules/styled-components/dist/styled-components.browser.esm.js"),i=n("./node_modules/react-router-dom/esm/react-router-dom.js"),a=n("./cozy/shared/styles/Mixins.tsx"),c=n("./cozy/shared/styles/Utils.tsx"),s=n("./cozy/shared/styles/promotionBanner/PromotionBanner.tsx");const l=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedFullWidthBanner",componentId:"sc-6vftyu-0"})(["width:100%;display:flex;justify-content:center;background-size:100% 256px;background-image:url(",");background-position:center;background-repeat:no-repeat;height:252px;"],(e=>{let{imageUrl:t}=e;return t})),d=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingBannerWrapper",componentId:"sc-6vftyu-1"})(["width:","px;display:flex;align-items:center;"],(e=>{let{bannerWidth:t}=e;return t})),p=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingBannerDescription",componentId:"sc-6vftyu-2"})(["display:flex;flex-direction:column;justify-content:center;flex:1;"]),u=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingBannerTitle",componentId:"sc-6vftyu-3"})(["",";color:",";"],a.pJ,(e=>{let{color:t}=e;return t})),m=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingBannerSubtitleWrapper",componentId:"sc-6vftyu-4"})(["",";margin:10px 0 8px 0;color:",";"],a.Ps,(e=>{let{color:t}=e;return t})),_=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingBannerSubtitle",componentId:"sc-6vftyu-5"})(["",";color:",";margin-bottom:8px;:last-child{margin-bottom:0;}"],a.Ps,(e=>{let{color:t}=e;return t})),h=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingRightWrapper",componentId:"sc-6vftyu-6"})([""]),x=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingExpiryText",componentId:"sc-6vftyu-7"})(["",";color:",";text-align:right;margin-bottom:8px;"],a.NH,(e=>{let{theme:t,color:n}=e;return n||t.Grey1})),g=(0,r.ZP)(s.Zl).withConfig({displayName:"PromotionBanner__FeedRotatingActionText",componentId:"sc-6vftyu-8"})(["",";"],a.tO),f=r.ZP.div.withConfig({displayName:"PromotionBanner__ProductBannerWrapper",componentId:"sc-6vftyu-9"})(["position:relative;width:100%;height:150px;color:",";background-size:100% 150px;background-image:url(",");background-position:center;background-repeat:no-repeat;display:table;justify-content:center;flex-direction:column;padding:26px 48px;"],(e=>{let{color:t}=e;return t}),(e=>{let{imageUrl:t}=e;return t})),y=(0,r.ZP)(i.rU).withConfig({displayName:"PromotionBanner__ProductRotatingActionText",componentId:"sc-6vftyu-10"})(["display:flex;align-items:center;",";color:",";margin-top:8px;"],a.Lp,(e=>{let{theme:t,color:n}=e;return n||t.Grey1})),v=r.ZP.div.withConfig({displayName:"PromotionBanner__ProductBannerRotatingSubtitle",componentId:"sc-6vftyu-11"})([""," color:",";margin-bottom:8px;"],(e=>{let{isBold:t}=e;return t?a.tO:a.fb}),(e=>{let{color:t}=e;return t})),B=r.ZP.div.withConfig({displayName:"PromotionBanner__ProductBannerRotatingExpiryText",componentId:"sc-6vftyu-12"})(["position:absolute;right:14px;top:11px;",";color:",";"],a.NH,(e=>{let{theme:t,color:n}=e;return n||t.Grey1})),P=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerWrapper",componentId:"sc-6vftyu-13"})(["",";flex-direction:column;width:","px;height:","px;color:",";background-size:",";background-image:url(",");background-position:center;background-repeat:no-repeat;padding:24px 56px;position:relative;border-radius:4px;"],a.qO,(e=>{let{theme:t}=e;return t.splashBannerWidthDesktop}),(e=>{let{theme:t}=e;
1return t.splashBannerHeightDesktop}),(e=>{let{color:t}=e;return t}),(e=>{let{theme:t}=e;return"".concat(t.splashBannerWidthDesktop+4,"px ").concat(t.splashBannerHeightDesktop+4,"px")}),(e=>{let{imageUrl:t}=e;return t})),b=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerAnimationContainer",componentId:"sc-6vftyu-14"})(["width:","px;height:","px;position:absolute;top:0;"],(e=>{let{theme:t}=e;return t.splashBannerWidthDesktop}),(e=>{let{theme:t}=e;return t.splashBannerHeightDesktop})),w=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerDescription",componentId:"sc-6vftyu-15"})(["",";",";flex-direction:column;max-width:100%;z-index:",";"],a._h,a.qO,(e=>{let{theme:t,hasAnimation:n}=e;return n&&t.zIndexBase1})),C=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerSubtitle",componentId:"sc-6vftyu-16"})(["margin:4px 0px 12px 0px;max-width:100%;white-space:pre-wrap;"]),k=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerBody",componentId:"sc-6vftyu-17"})(["display:flex;flex-direction:column;",";font-size:",";font-weight:",";",";"],(e=>{let{isUserGiftPack:t,theme:n}=e;return t&&"color: ".concat(n.Grey2)}),(e=>{let{fontSize:t}=e;return t||"18px"}),(e=>{let{fontBold:t}=e;return t?700:400}),(0,c.V8)("margin")),S=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerBodyText",componentId:"sc-6vftyu-18"})(["font-size:",";font-weight:",";margin:16px 0 4px 0;"],(e=>{let{fontSize:t}=e;return t||"18px"}),(e=>{let{fontBold:t}=e;return t?700:400})),I=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerButtonWrapper",componentId:"sc-6vftyu-19"})(["",";"],(0,c.V8)("paddingTop","padding-top")),N=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingWrapper",componentId:"sc-6vftyu-20"})(["position:relative;display:flex;align-items:center;flex-direction:column;width:","px;height:","px;background-size:",";background-image:url(",");background-position:center;background-repeat:no-repeat;padding:56px 24px;border-radius:4px;"],(e=>{let{theme:t}=e;return t.splashBannerWidthDesktop}),(e=>{let{theme:t}=e;return t.splashBannerHeightDesktop}),(e=>{let{theme:t}=e;return"".concat(t.splashBannerWidthDesktop+4,"px ").concat(t.splashBannerHeightDesktop+4,"px")}),(e=>{let{imageUrl:t}=e;return t})),Z=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingDescription",componentId:"sc-6vftyu-21"})(["",";",";flex-direction:column;margin-bottom:32px;"],a._h,a.qO),z=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingTitle",componentId:"sc-6vftyu-22"})(["",";color:",";"],a.pJ,(e=>{let{color:t}=e;return t})),j=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingSubtitleSection",componentId:"sc-6vftyu-23"})(["color:",";margin:24px 0 12px 0;"],(e=>{let{color:t}=e;return t})),W=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingSubtitle",componentId:"sc-6vftyu-24"})(["",";color:",";margin-bottom:8px;:last-child{margin-bottom:0;}"],(e=>{let{isBold:t}=e;return t?a.tO:a.F3}),(e=>{let{color:t}=e;return t})),D=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashBannerRotatingExpiryText",componentId:"sc-6vftyu-25"})(["position:absolute;right:8px;bottom:8px;",";color:",";"],a.NH,(e=>{let{theme:t,color:n}=e;return n||t.Grey1})),R=r.ZP.div.withConfig({displayName:"PromotionBanner__SplashButtonWrapper",componentId:"sc-6vftyu-26"})(["min-width:50%;"]),U=(0,r.ZP)(i.rU).withConfig({displayName:"PromotionBanner__CardWrapper",componentId:"sc-6vftyu-27"})(["display:flex;flex-direction:column;background-color:",";border:"," 1px solid;width:",";height:",";"],(e=>{let{backgroundColor:t}=e;return t}),(e=>{let{borderColor:t}=e;return t}),(e=>{let{small:t}=e;return t?"308px":"354px"}),(e=>{let{small:t}=e;
1return t?"126px":"160px"})),H=r.ZP.div.withConfig({displayName:"PromotionBanner__CardTitle",componentId:"sc-6vftyu-28"})(["",";"," color:",";background-color:",";margin:0 auto;"],a.qO,(e=>{let{small:t}=e;return t?"\n ".concat(a.Mc,";\n padding: 8px 12px;\n "):"\n ".concat(a.fb,";\n padding: 8px 30px;\n ")}),(e=>{let{color:t}=e;return t}),(e=>{let{backgroundColor:t}=e;return t})),A=r.ZP.div.withConfig({displayName:"PromotionBanner__CardImageContainer",componentId:"sc-6vftyu-29"})(["display:flex;margin:auto;"]),F=r.ZP.div.withConfig({displayName:"PromotionBanner__CardImage",componentId:"sc-6vftyu-30"})([""," background-image:url(",");background-position:center;background-repeat:no-repeat;margin-right:6px;:last-child{margin-right:0;}"],(e=>{let{small:t}=e;return t?"\n width: 64px;\n height: 64px;\n background-size: 64px 64px;\n ":"\n width: 72px;\n height: 72px;\n background-size: 72px 72px;\n "}),(e=>{let{imageUrl:t}=e;return t})),O=r.ZP.div.withConfig({displayName:"PromotionBanner__FeedRotatingWrapper",componentId:"sc-6vftyu-31"})(["width:","px;margin:24px auto 0;"],(e=>{let{width:t}=e;return t})),E=r.ZP.div.withConfig({displayName:"PromotionBanner__PromoBannerFlexWapper",componentId:"sc-6vftyu-32"})(["",""],c.cy.desktop(o||(L=["\n display: flex;\n justify-content: center;\n "],T||(T=L.slice(0)),o=Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(T)}})))));var L,T}
1}]); 2//# sourceMappingURL=cozy_desktop_components_promotionBanner_PromoBannerContainer_tsx.b8b755d5a9f02b9e5dbe.js.map
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.