1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54139],{54139:(e,l,t)=>{t.r(l),t.d(l,{DtvOfferCards:()=>y});var n=t(86828),i=t(41120),a=t(83527),o=t(74135),r=t(31678),d=t(85553),s=t(73065),u=t(29699),x=t(98772),p=t(51848),c=t(73520),g=t(18589),m=t(63522),f=t(51651);let b={trayBg:"rgba(16, 38, 65, 0.04)",trayBorderTop:"1px solid rgba(16, 38, 65, 0.12)",trayPadding:"2px",trayBorderRadius:"9999px",trayHeight:"40px",tabGap:"4px",tabPadding:"7.5px 16px",tabHeight:"36px",tabBorderRadius:"9999px",selectedBg:"#102641",selectedColor:"#FFFFFF",unselectedColor:"#747474",hoverBg:"rgba(16, 38, 65, 0.08)",focusOutline:"2px solid #1FBCF8",activeBg:"rgba(16, 38, 65, 0.2)",lineHeight:"1.3"};function h(e){let{id:l,tabs:t,defaultSelectedTab:a=0,ariaLabel:o,handleChange:r}=e,[d,s]=i.useState(a),u=(0,i.useRef)(null),x=(0,i.useMemo)(()=>({width:"fit-content",flexShrink:0,display:"flex",justifyContent:"flex-start",alignItems:"center",backgroundColor:b.trayBg,border:"none",borderTop:b.trayBorderTop,borderRadius:b.trayBorderRadius,padding:b.trayPadding,height:b.trayHeight,minHeight:b.trayHeight,"& .MuiTabs-indicator":{height:"100% !important",backgroundColor:b.selectedBg,borderRadius:b.tabBorderRadius,zIndex:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTabs-flexContainer":{gap:b.tabGap},"& .MuiTab-root":{zIndex:1,padding:b.tabPadding,textTransform:"none",width:"fit-content",minWidth:"auto",maxWidth:"none",minHeight:b.tabHeight,height:b.tabHeight,borderRadius:b.tabBorderRadius,color:b.unselectedColor,transition:"color 250ms ease",whiteSpace:"nowrap","&.Mui-selected":{color:"".concat(b.selectedColor," !important"),transition:"color 0.3s ease"},":hover":{backgroundColor:b.hoverBg},"&.Mui-focusVisible":{outline:b.focusOutline,outlineOffset:"-2px"},":active":{backgroundColor:b.activeBg}}}),[]);return(0,n.jsx)(g.A,{ref:u,sx:x,value:d,variant:"standard",onChange:(e,l)=>{s(l),null==r||r(l),requestAnimationFrame(()=>{let e=u.current;if(!e)return;let l=e.querySelector(".Mui-selected");null==l||l.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})})},children:t.map((e,t)=>{var i;return(0,n.jsx)(m.A,{disableRipple:!0,id:l?"".concat(l,"-tab-").concat(t):void 0,tabIndex:0,...(0,p.getAnalyticsAttrs)(null==(i=e.label)?void 0:i.toLowerCase(),"component_tab",window.location.href,"".concat(l,"-tab-").concat(t)),"aria-label":o||"Toggle to ".concat(e.label),label:(0,n.jsx)(f.default,{variant:"body2medium",sx:{lineHeight:b.lineHeight,zIndex:2},children:e.label})},t)})})}let v={threeupContainer:{display:"flex",alignItems:{xs:"center",sm:"start"},flexDirection:{xs:"column",sm:"row"}},section:{padding:{xs:"0px 0px 24px 0px",sm:"0px 0px 36px 0px",md:"0px 0px 32px 0px"},display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"column",flexShrink:0,boxShadow:"0px 2px 20px 0px rgba(0, 0, 0, 0.08)",position:"relative",borderRadius:"10px",background:"#FFF"},imageContainer:{width:"100%",flexShrink:0,borderRadius:"10px 10px 0px 0px",display:"flex",flexDirection:"column"},tileTopperContainer:{height:"31px",borderRadius:"10px 10px 0px 0px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},tileTopper:{height:"21px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"uppercase",letterSpacing:"0.5px"},bodyContainer:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:{xs:"20px",sm:"20px",md:"32px"},flexShrink:0},bodyHeaderContainer:{margin:{xs:"0px 20px",sm:"0px 8px",md:"0px 22.5px"},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",alignSelf:"stretch"},bodyHeading:{color:"#102641",textAlign:"center",alignSelf:"stretch"},bodySubHeading:{color:"#102641",display:"inline"},bodyButtonsContainer:{display:"inline",textAlign:"center",margin:{xs:"0px 20px",sm:"0px 13.5px",md:"0px 22.5px"},"& div":{width:"100%"},alignSelf:"stretch"},bodyPrimaryButton:{height:{xs:"36px",sm:"36px",md:"56px"},fontSize:{xs:"14px",sm:"14px",md:"16px"},marginBottom:{xs:"20px",sm:"16px",md:"16px"},padding:{xs:"0px 16px",sm:"0px 16px",md:"0px 24px"}},bodySecondaryButton:{width:"100%",height:{xs:"36px",sm:"36px",md:"56px"},fontSize:{xs:"14px",sm:"14px",md:"16px"},marginBottom:{xs:"20px",sm:"16px",md:"16px"},padding:{xs:"0px 16px",sm:"0px 16px",md:"0px 24px"}},bodyHelperText:{color:"#555",textAlign:"center"}};function y(e){try{var l,t;let r=(0,i.useRef)(null),{isMobile:g}=(0,x.useBreakPoints)(),m=e&&(null==e?void 0:e.cards)&&(null==e||null==(l=e.cards)?void 0:l.length)>0&&(null==e?void 0:e.cards),f=null==e?void 0:e.widths,b=null!=(t=null==e?void 0:e.layout)?t:"wrap",y=(null==e?void 0:e.filterTabs)&&e.filterTabs.length>0,[C,w]=(0,i.useState)(0),j=(0,i.useMemo)(()=>{var l;if(!m||!y)return m;let t=(null==(l=e.filterTabs[C])?void 0:l.value)||"all";return"all"===t?m:m.filter(e=>e.category===t)},[m,y,e.filterTabs,C]),k=(0,i.useMemo)(()=>y?e.filterTabs.map(e=>({label:e.label})):[],[y,e.filterTabs]),T=(0,i.useCallback)(e=>{w(e)}
1,[]),S=f||{Cmp2up:{xs:"332px",sm:"226px",md:"373px"},wide2up:{xs:"334px",sm:"342px",lg:"505px"}},B=(null==e?void 0:e.variant)==="wide2upoffercards",H="scroll"===b,[L,_]=(0,i.useState)(!1),I=()=>{if(r.current){let e=r.current;_((null==e?void 0:e.scrollWidth)>(null==e?void 0:e.clientWidth))}},A=(e,l,t)=>{(0,p.fireGa4ItemList)("select_item",[{item_id:null==e?void 0:e.toLowerCase(),item_name:null==e?void 0:e.toLowerCase(),item_variant:"",affiliation:"",coupon:null==l?void 0:l.toLowerCase(),discount:"",index:t,item_list_id:null==e?void 0:e.toLowerCase(),item_list_name:null==e?void 0:e.toLowerCase(),price:"",quantity:1}])},E=(0,i.useRef)(!1);(0,i.useEffect)(()=>{if(E.current||!m||0===m.length)return;E.current=!0;let e=m.map((e,l)=>{var t,n,i,a,o,r,d,s,u;return{item_id:null==e||null==(n=e.tileTopper)||null==(t=n.content)?void 0:t.toLowerCase(),item_name:null==e||null==(a=e.tileTopper)||null==(i=a.content)?void 0:i.toLowerCase(),item_variant:"",affiliation:"",coupon:null==e||null==(o=e.heading)?void 0:o.toLowerCase(),discount:"",index:l,item_list_id:null==e||null==(d=e.tileTopper)||null==(r=d.content)?void 0:r.toLowerCase(),item_list_name:null==e||null==(u=e.tileTopper)||null==(s=u.content)?void 0:s.toLowerCase(),price:"",quantity:1}});(0,p.fireGa4ItemList)("view_item_list",e)},[m]),(0,i.useEffect)(()=>(I(),window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}),[]);let R=B?{xs:"30px",sm:"20px"}:{xs:"24px",sm:"16px",md:"20px"},F={...v.threeupContainer,gap:R,...H?{margin:B?void 0:"0px 20px",overflowX:"auto",...(0,c.fusionScrollBarStyles)(),flexShrink:0,justifyContent:L?"start":"center"}:{flexWrap:"wrap",justifyContent:"center",maxWidth:B?"none":{sm:"710px",md:"1159px"},margin:B?void 0:{xs:"0px 20px",sm:"0 auto"}}},z=(e,l)=>{var t,i,r,x,c,m,f,b,h,y,C,w,j,k,T,L,_,I,E,R,F,z,D,M,q,W,P,G,O,U,V,N,X,Y,J,K,Q,Z,$,ee,el,et,en,ei;return(0,n.jsxs)(o.default,{sx:{...v.section,width:B?S.wide2up:S.Cmp2up,minWidth:B?S.wide2up:void 0,...H&&{flexShrink:0},gap:B?{xs:"15px"}:{xs:"18px",sm:"20px",md:"15px"}},children:[(0,n.jsxs)(o.default,{sx:{...v.imageContainer,height:B?void 0:"206px"},children:[(null==e||null==(t=e.tileTopper)?void 0:t.content)&&(0,n.jsx)(o.default,{sx:{...v.tileTopperContainer,background:null==e||null==(i=e.tileTopper)?void 0:i.backgroundColor},children:(0,n.jsx)(d.default,{content:null==e||null==(r=e.tileTopper)?void 0:r.content,variant:"eyebrowregular",sx:{...v.tileTopper,color:null==e||null==(x=e.tileTopper)?void 0:x.color}})}),(0,n.jsx)(o.default,{sx:{width:"100%",flexGrow:1,height:B?"237px":void 0},children:(0,n.jsxs)("picture",{children:[(0,n.jsx)("source",{media:"(min-width: ".concat(u.default.breakpoints.values.md,"px)"),srcSet:null==e||null==(c=e.backgroundImage)?void 0:c.desktop}),(0,n.jsx)("source",{media:"(min-width: ".concat(u.default.breakpoints.values.sm,"px)"),srcSet:null==e||null==(m=e.backgroundImage)?void 0:m.tablet}),(0,n.jsx)("source",{srcSet:null==e||null==(f=e.backgroundImage)?void 0:f.mobile,media:"(min-width: ".concat(u.default.breakpoints.values.xs,"px)")}),(0,n.jsx)("img",{alt:(null==e||null==(b=e.backgroundImage)?void 0:b.alt)||(null==e?void 0:e.id),id:"dtv-".concat(null==e?void 0:e.id,"-background"),loading:"lazy",src:null==e||null==(h=e.backgroundImage)?void 0:h.desktop,srcSet:null==e||null==(y=e.backgroundImage)?void 0:y.desktop,style:{width:"100%",height:"100%",objectFit:B?"fill":"cover",borderRadius:(null==e||null==(C=e.tileTopper)?void 0:C.content)?"0px":"10px 10px 0px 0px"}})]})})]}),(0,n.jsxs)(o.default,{sx:{...v.bodyContainer},children:[(0,n.jsxs)(o.default,{sx:{...v.bodyHeaderContainer,gap:B?{xs:"4px",sm:"0px"}:{xs:"4px",sm:"16px",md:"4px"}},children:[(0,n.jsx)(o.default,{sx:{display:"inline",textAlign:"center"},children:(0,n.jsx)(a.EqualHeightElement,{disable:g,name:"body-header-container",children:(0,n.jsx)(d.default,{content:null==e?void 0:e.heading,sx:{...v.bodyHeading},variant:"subhead2medium"})})}),(0,n.jsx)(o.default,{sx:B?{display:"block",maxWidth:{lg:"337px",xs:"282px"},width:{lg:"337px",xs:"282px"},margin:"0 auto",textAlign:"left",paddingY:"15px"}:{display:"inline"},children:(0,n.jsx)(a.EqualHeightElement,{disable:g,name:"offer-cards-subheading",children:(0,n.jsx)(d.default,{variant:"body3",content:(null==e||null==(k=e.subHeading)||null==(j=k.content)||null==(w=j.includes)?void 0:w.call(j,"[[tooltip]]"))?null==e||null==(E=e.subHeading)||null==(I=E.content)||null==(_=I.replace)?void 0:_.call(I,"[[tooltip]]",null==e||null==(L=e.subHeading)||null==(T=L.tooltip)?void 0:T.content):null==e||null==(R=e.subHeading)?void 0:R.content,sx:{...v.bodySubHeading,"& span":{fontSize:"15px !important",textAlign:B?"auto":"center"},"& ul, ol":{margin:"0",padding:B?void 0:"1em 0 1em 40px",textAlign:"left"},...B&&{"& p":{margin:"8px 0 0 0"}}}})})})]}),(0,n.jsxs)(o.default,{sx:{...v.bodyButtonsContainer},children:[(0,n.jsxs)(a.EqualHeightElement,{disable:g,name:"offer-cards-buttons",children:[(null==e||null==(F=e.primaryCta)?void 0:F.label)&&(0,n.jsx)(s.default,{label:null==e||null==(z=e.primaryCta)?void 0:z.label,sx:{...v.bodyPrimaryButton,width:B?{xs:"202px",lg:"332px"}:"100%",color:null==e||null==(D=e.primaryCta)?void 0:D.color},...null==e?void 0:e.primaryCta,googleAnalyticsData:(0,p.getAnalyticsAttrs)(null==e||null==(M=e.primaryCta)?void 0:M.label,"panel_offer card",null==e||null==(q=e.primaryCta)?void 0:q.targeturl),onClick:()=>{var t;A(null==e||null==(t=e.tileTopper)?void 0:t.content,null==e?void 0:e.heading,l)}}),(null==e||null==(W=e.secondaryCta)?void 0:W.label)&&(0,n.jsx)(s.default,{label:null==e||null==(P=e.secondaryCta)?void 0:P.label,mode:"dark",variant:"uxsecondary",sx:{...v.bodySecondaryButton,color:null==e||null==(G=e.secondaryCta)?void 0:G.color},...null==e?void 0:e.secondaryCta,googleAnalyticsData:(0,p.getAnalyticsAttrs)(null==e||null==(O=e.secondaryCta)?void 0:O.label,"panel_offer card",null==e||null==(U=e.secondaryCta)?void 0:U.targeturl),onClick:()=>{var t;A(null==e||null==(t=e.tileTopper)?void 0:t.content,null==e?void 0:e.heading,l)}})]}),(0,n.jsx)(a.EqualHeightElement,{disable:g,name:"offer-card-legal",children:(0,n.jsx)(d.default,{content:null==e||null==(V=e.cardLegal)?void 0:V.content,variant:"body3",cta:{label:(null==e||null==(X=e.cardLegal)||null==(N=X.cta)?void 0:N.label)||"",legalUrl:null==e||null==(J=e.cardLegal)||null==(Y=J.cta)?void 0:Y.legalUrl,position:null==e||null==(Q=e.cardLegal)||null==(K=Q.cta)?void 0:K.position,targeturl:null==e||null==($=e.cardLegal)||null==(Z=$.cta)?void 0:Z.targetUrl,sx:{marginBottom:"2px",fontSize:null==e||null==(el=e.cardLegal)||null==(ee=el.cta)?void 0:ee.fontSize,color:null==e||null==(en=e.cardLegal)||null==(et=en.cta)?void 0:et.color}},sx:{...v.bodyHelperText,"a:focus, button:focus":{outline:"2px s
1olid #2E70BD"}}})})]})]})]},null!=(ei=null==e?void 0:e.id)?ei:"card-".concat(l))},D=y?(0,n.jsx)(o.default,{sx:{marginBottom:{xs:"24px",sm:"24px",md:"32px"},overflowX:"auto",scrollPaddingInline:"16px",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},paddingLeft:"13px",paddingRight:"13px","& .MuiTabs-root":{margin:"0 auto"}},children:(0,n.jsx)(h,{ariaLabel:"Filter cards by category",defaultSelectedTab:0,handleChange:T,id:"".concat((null==e?void 0:e.id)||"dtv-offer-cards","-filter"),tabs:k})}):null;if(!H&&j&&j.length>3){let l=[];for(let e=0;e<j.length;e+=3)l.push(j.slice(e,e+3));return(0,n.jsxs)(n.Fragment,{children:[D,(0,n.jsx)(o.default,{id:(null==e?void 0:e.id)||"dtv-offer-cards",ref:r,sx:F,children:l.map((e,l)=>(0,n.jsx)(a.EqualHeight,{children:(0,n.jsx)(o.default,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"center",sm:"start"},justifyContent:"center",gap:R,width:"100%"},children:e.map((e,t)=>z(e,3*l+t))})},"".concat(C,"-").concat(l)))})]})}return(0,n.jsxs)(n.Fragment,{children:[D,(0,n.jsx)(a.EqualHeight,{children:(0,n.jsx)(o.default,{id:(null==e?void 0:e.id)||"dtv-offer-cards",ref:r,sx:F,children:j&&(null==j?void 0:j.map((e,l)=>z(e,l)))})},C)]})}catch(e){return(0,n.jsx)(r.default,{component:"DTV Offer Cards",error:e})}}}}]); 2//# sourceMappingURL=54139.7bb22e7e68753bc5.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.