!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7958fae5-6bc1-4fc2-bb63-f440a3ba9f5a",e._sentryDebugIdIdentifier="sentry-dbid-7958fae5-6bc1-4fc2-bb63-f440a3ba9f5a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3596],{21075:(e,t,n)=>{n.d(t,{n:()=>W});var s=n(6029),r=n(33144),a=n(21377),i=n(37071),l=n(76356),o=n(55729),d=n(90510),c=n(62859),u=n(87930),x=n(65078),h=n(8973),m=n(39969),p=n(13266),j=n(47530),g=n(87763),v=n(94604),f=n(62827),y=n(4967),b=n(90248),w=n(494),T=n(41618),k=n(62213),S=n(85517),C=n(49821),I=n(4236),E=n(61836),A=n(10794),z=n(28600),D=n(62042),L=n(75791),_=n(31253);let B=(e,t,n)=>(0,D.AH)({display:"flex",justifyContent:"space-evenly",alignItems:"center",flex:"1",minW:"[0px]",minH:"[20px]",border:t?"1px solid":void 0,borderColor:t?"primary.default":n?"neutrals.nLv4":void 0,borderRadius:"xs",backgroundColor:"surface.s1",overflow:"hidden",_hover:{backgroundColor:e?"surface.s2":void 0}}),N=e=>{let{betSlipLink:t,onClick:n,title:r,clickable:a,winning:i,children:o,isOddsBranded:d}=e;return a&&t?(0,s.jsx)(l.I4.a,{href:t,target:"_blank",rel:"nofollow noopener noreferrer",onClick:n,title:r,className:B(a,i,d),children:o}):(0,s.jsx)(l.I4.div,{className:B(a,i),onClick:n,children:o})};function O(e){let{choice:t,isLive:n,betSlipLink:r,branded:a,onClick:o,isOddsBranded:d}=e,c=!!(r&&a);return(0,s.jsxs)(N,{clickable:c,title:t.name,betSlipLink:r,onClick:o,winning:t.winning,isOddsBranded:d,children:[(0,s.jsx)(i.EY,{display:"block",minW:"lg",textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"center",truncate:!0,children:(0,s.jsx)(z.G,{id:t.name})}),(0,s.jsxs)(l.so,{minW:"2xl",justify:"center",align:"center",gap:"2xs",children:[(0,s.jsx)(l.az,{mt:1===t.change?"2xs":void 0,children:(0,s.jsx)(_.A,{change:t.change})}),(0,s.jsx)(i.EY,{display:"block",textStyle:"display.micro",color:n?"status.val":"neutrals.nLv1",children:(0,s.jsx)(L.c,{fractionalValue:t.fractionalValue})})]})]})}let P=e=>{let{countryOddsProvider:t,setHasSelectedDayOdds:n,isOddsBranded:r}=e,{event:d}=(0,o.useContext)(c.y$),{featuredOdds:u,error:x}=(0,S.A)(t,d.id,d.status.type===a.XUj.InProgress,t.featuredOddsType);if((0,o.useEffect)(()=>{u&&n(!0)},[u]),!u&&!x)return d.startTimestamp*y.Z2-4*y.d_(0,E.Sj)({position:e,provider:t.provider.slug});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.so,{gap:"xs",pt:"md",pb:"xs",align:"center",children:[(0,s.jsx)(i.EY,{textStyle:"display.micro",children:(0,s.jsx)(z.f,{id:u.marketName})}),u.choiceGroup&&(0,s.jsx)(i.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(z.f,{id:u.choiceGroup})}),u.isLive&&(0,s.jsx)(i.EY,{textStyle:"assistive.default",color:"status.val",children:(0,s.jsx)(b.A,{id:"live"})})]}),(0,s.jsxs)(l.so,{pb:"sm",pt:"xs",gap:"lg",children:[(0,s.jsx)(l.so,{gap:"sm",grow:1,overflow:"hidden",children:u.choices.map(e=>(0,s.jsx)(O,{choice:e,isLive:u.isLive,betSlipLink:t&&(0,I.Iz)(e,u,t),branded:null==t?void 0:t.branded,onClick:()=>h(C.ki.OddsValue),isOddsBranded:r},e.name))}),(0,s.jsx)(l.az,{h:"[20px]",w:"4xl",children:(0,s.jsx)(T.r,{size:"48x20",selectedProvider:t,onClick:()=>h(C.ki.ProviderLogo),logClick:!1})})]})]})},Y=e=>{let{event:t}=(0,o.useContext)(c.y$),n=(0,w.d4)(A.LQ),r=(0,w.d4)(A.dg);return n&&k.aZ.includes(n)&&k.S1.includes(t.status.type)||n&&k.ZN.includes(n)&&!r||t.homeTeam.disabled||t.awayTeam.disabled?null:(0,s.jsx)(P,{...e})},R=e=>{let{preferDate:t}=e,{event:n,leftTeam:r,rightTeam:a}=(0,o.useContext)(c.y$);return(0,s.jsxs)(l.so,{h:"3xl",justify:"space-between",align:"center",children:[(0,s.jsx)(i.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",truncate:!0,children:t?(0,s.jsx)(d.XU,{value:1e3*n.startTimestamp}):(0,s.jsxs)(s.Fragment,{children:[n.tournament.isGroup&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.__,{name:n.tournament.groupName||n.tournament.name}),",\xa0"]}),(0,s.jsx)(j.DT,{round:n.roundInfo})]})}),(0,s.jsx)(l.az,{onClick:e=>{e.preventDefault(),e.stopPropagation()},position:"relative",children:(0,s.jsx)(m.h,{id:n.id,type:h.b.Event,location:h.y.Header,tournament:n.tournament,leftTeam:r,rightTeam:a})})]})},U=e=>{let{event:t}=e;return(0,s.jsx)(l.so,{justify:"center",align:"center",children:(0,s.jsx)(l.az,{bg:"status.error.default",px:"sm",br:"sm",h:"[16px]",mb:"sm",children:(0,s.jsx)(i.EY,{display:"block",color:"surface.s1",textStyle:"assistive.default",children:(0,s.jsx)(g.fP,{id:t.status.description})})})})},M=()=>{let{event:e,leftTeam:t,rightTeam:n}=(0,o.useContext)(c.y$),x=e.status.type===a.XUj.NotStarted||(0,f.sw)(e);return(0,s.jsxs)(l.so,{justify:"space-between",py:"sm",children:[(0,s.jsxs)(l.so,{gap:"lg",w:"5xl",flexGrow:1,align:"center",justify:"flex-end",overflow:"hidden",children:[(0,s.jsx)(i.EY,{display:"block",textStyle:"display.micro",truncate:!0,children:(0,s.jsx)(v.Rm,{team:t,short:!0})}),(0,s.jsx)(r.p,{id:t.id,name:t.name,size:32})]}),(0,s.jsxs)(l.so,{maxW:"[100px]",minW:"fit",px:"lg",grow:1,overflow:"hidden",justify:"center",align:"center",children:[!x&&(0,s.jsx)(u.A,{isSmall:!0,shortStatus:!0}),x&&(0,s.jsx)(i.EY,{display:"block",textAlign:"center",textStyle:"display.medium",color:"neutrals.nLv3",children:(0,s.jsx)(d.ib,{value:1e3*e.startTimestamp})})]}),(0,s.jsxs)(l.so,{gap:"lg",w:"5xl",grow:1,align:"center",overflow:"hidden",children:[(0,s.jsx)(r.p,{id:n.id,name:n.name,size:32}),(0,s.jsx)(i.EY,{display:"block",textStyle:"display.micro",truncate:!0,children:(0,s.jsx)(v.Rm,{team:n,short:!0})})]})]})},W=e=>{let{event:t,countryOddsProvider:n,setHasSelectedDayOdds:r,preferDateInHeader:a,isOddsBranded:i}=e,{event:o,...d}=(0,x.mJ)(t.id,{event:t,shouldRefresh:!0}),u=o||t,h=(0,f.sw)(u);return(0,s.jsx)(c.y$.Provider,{value:{event:u,...d,location:c.cb.SpecialEventWidget},children:(0,s.jsxs)(l.az,{minH:"10xl",px:"lg",pb:"sm",bg:"surface.s2",br:{base:"md",md:"lg"},children:[(0,s.jsxs)(p.tj,{event:u,children:[(0,s.jsx)(R,{preferDate:a}),h&&(0,s.jsx)(U,{event:u}),(0,s.jsx)(M,{})]}),n&&(0,s.jsx)(Y,{countryOddsProvider:n,setHasSelectedDayOdds:r,isOddsBranded:i})]})})}},21319:(e,t,n)=>{n.d(t,{H:()=>u});var s=n(6029),r=n(37071),a=n(76356),i=n(90248),l=n(85986),o=n(25022),d=n(53214);function c(e){var t,n;let{block:l,placementBlock:o,inCard:c}=e,u=null==(t=l.participants[0])?void 0:t.winner,x=null==(n=l.participants[1])?void 0:n.winner;return(0,s.jsxs)(a.so,{align:"center",justify:"center",position:"relative",children:[(0,s.jsx)(d.b8,{block:l,inCard:c}),(u||x)&&(0,s.jsx)(a.az,{position:"absolute",right:x?"[calc(50% - 90px)]":void 0,left:x?void 0:"[calc(50% - 90px)]",children:(0,s.jsx)(d.Xs,{})}),o&&(0,s.jsxs)(a.az,{position:"absolute",right:x?void 0:"[calc(50% - 130px)]",left:x?"[calc(50% - 130px)]":void 0,children:[(0,s.jsx)(d.b8,{block:o,hideTopConnector:!0,hideBottomConnector:!0,inCard:c}),(0,s.jsx)(r.EY,{display:"block",textAlign:"center",textStyle:"assistive.micro",color:"neutrals.nLv3",mt:"-md",children:(0,s.jsx)(i.A,{id:"3rdPlace"})})]})]})}function u(e){let{cupTree:t,inCard:n}=e,{sport:r}=(0,l.B)(),i=(0,o.TI)(t,r,null);return(0,s.jsxs)(a.az,{overflow:n?"hidden":"scroll",children:[(0,s.jsx)(d.Bg,{tree:i.left,inCard:n}),(0,s.jsx)(c,{block:i,placementBlock:i.thirdPlaceBlock,inCard:n}),(0,s.jsx)(d.Bg,{tree:i.right,initialOrientation:"bottom",inCard:n})]})}},53486:(e,t,n)=>{n.d(t,{n6:()=>C,MC:()=>h.MC,gY:()=>E,G:()=>L,ey:()=>D});var s=n(6029),r=n(87827),a=n(21377),i=n(21501),l=n(99064),o=n(55729),d=n(90248),c=n(494),u=n(62859),x=n(54409),h=n(60988),m=n(41735);let p=m.default.span.withConfig({componentId:"sc-8e60f6ed-0"})(["padding:3px;color:white;font-size:12px;font-weight:600;min-width:44px;border-radius:4px;text-align:center;display:inline-block;background:",";"],e=>e.isWinner?e.theme.colors.secondary.default:e.theme.colors.onSurface.nLv3),j=function(e){let{points:t,isWinner:n,...r}=e;return(0,s.jsx)(p,{isWinner:n,...r,children:"number"==typeof t?"".concat(t," pts"):"-"})};var g=n(8703),v=n(65078),f=n(16620),y=n(48886),b=n(8973),w=n(39969),T=n(13266);let k=(0,m.default)(T.tj).withConfig({componentId:"sc-3f813a14-0"})(["display:block;border-radius:2px;:hover{background:",";}:active{background:",";}"],e=>e.theme.colors.surface.s2,e=>e.theme.colors.surface.s0),S=(0,m.default)(l.$n).withConfig({componentId:"sc-3f813a14-1"})(["display:inline-block;&:hover > *{transform:scale(1.1);}"]);function C(e){let t=(0,o.useRef)(null),n=(0,c.d4)(t=>t.favorites.events[e.event.id],c.bN),[r,a]=(0,v.jr)(n,"homeTeam","awayTeam",n),[l,d]=(0,v.jr)(n,"homeScore","awayScore",n),x=(0,i.ZC)(null==n?void 0:n.status.type);return((0,o.useEffect)(()=>{e.mutate&&x&&(null==n?void 0:n.status.type)&&x!==n.status.type&&e.mutate()},[e.mutate,x,null==n?void 0:n.status.type]),n)?(0,s.jsx)(u.y$.Provider,{value:{event:n,leftTeam:r,rightTeam:a,leftScore:l,rightScore:d},children:(0,s.jsx)(k,{event:n,className:"event-hl-".concat(n.id),onClick:t=>{e.onClick&&e.onClick(t,(null==n?void 0:n.id)||-1,e.isMobile)},children:(0,s.jsx)("div",{ref:t,children:(0,s.jsx)(h.n6,{...e,event:n,location:e.location})})})}):null}let I=()=>{let{event:e,leftTeam:t,rightTeam:n}=(0,o.useContext)(u.y$),{location:r}=(0,h.lv)();return(0,s.jsx)(w.h,{id:e.id,tournament:e.tournament,leftTeam:t,rightTeam:n,type:b.b.Event,location:r})},E=e=>(0,s.jsx)(C,{...e,children:I}),A=e=>{let{referenceId:t,isReferenceTeamId:n}=e,r=(0,v.h2)(t,n),i={background:"onSurface.nLv3",char:"?"};switch(r){case a.h18.Win:i={background:"secondary.default",char:"W"};break;case a.h18.OvertimeLoss:case a.h18.Lose:i={background:"error.default",char:"L"};break;case a.h18.Draw:i={background:"onSurface.nLv3",char:"D"}}return(0,s.jsx)(l.az,{w:24,h:24,br:"50%",bg:i.background,mx:"xs",children:(0,s.jsx)(l.EY,{font:"display.small",color:"onColor.primary",lineHeight:"24px",w:24,align:"center",as:"div",children:i.char})})},z=e=>{let{event:t,leftTeam:n,rightTeam:r}=(0,o.useContext)(u.y$);return[a.XUj.NotStarted,a.XUj.InProgress].includes(t.status.type)?(0,s.jsx)(w.h,{type:b.b.Event,location:b.y.MatchesSection,id:t.id,tournament:t.tournament,leftTeam:n,rightTeam:r}):(0,s.jsx)(A,{...e})},D=e=>{let{referenceId:t,isReferenceTeamId:n,incidentsMap:r,...a}=e;return e=>(0,s.jsx)(C,{incidents:r?r[e.event.id]:void 0,isReferenceTeamId:n,...a,...e,children:()=>(0,s.jsx)(z,{referenceId:t,isReferenceTeamId:n})})},L=e=>{let{rating:t,points:n,player:i,playedFor:c,isOnBench:h,incidents:m,isReferenceTeamId:p}=e;return e=>(0,s.jsx)(C,{incidents:m,entity:a.wNW.Player,...e,isReferenceTeamId:p,children:(0,g.rK)(e.event)?()=>{let{openEventPlayerStatistics:e}=(0,f.d)(),{event:m,leftTeam:p,rightTeam:g}=(0,o.useContext)(u.y$),v=m.status.type,T=m.tournament.category.sport,k=m.winnerCode===a.Jfo.Left?p.id:g.id,C=T.slug===a.QCR.Football,I=T.slug===a.QCR.Basketball,E=v===a.XUj.NotStarted,A=I&&void 0!==n,z=!C&&!A;return h&&T.slug===a.QCR.Football?(0,s.jsx)(l.az,{w:"28",h:"28",children:(0,s.jsx)(x.IKQ,{width:24,height:24,fill:"onSurface.nLv3"})}):E?(0,s.jsx)(w.h,{id:m.id,type:b.b.Event,location:b.y.MatchesSection,tournament:m.tournament,leftTeam:p,rightTeam:g}):m.hasEventPlayerStatistics?(0,s.jsxs)(S,{onClickCapture:t=>{t.preventDefault(),t.stopPropagation(),m.hasEventPlayerStatistics&&i&&e({event:m,player:i},y._.EventCell)},variant:z?void 0:"unshielded",colorScheme:z?"secondary":void 0,p:"0",w:A?48:28,h:"28",children:[C&&(0,s.jsx)(r.G,{rating:t}),A&&(0,s.jsx)(j,{points:n,isWinner:k===c}),z&&(0,s.jsx)(x.Abd,{width:24,height:24,fill:"onColor.primary"})]}):(0,s.jsx)(l.so,{w:"28",h:"28",align:"center",justify:"center",children:(0,s.jsx)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",children:(0,s.jsx)(d.A,{id:"N/A"})})})}:null})}},62221:(e,t,n)=>{n.d(t,{C:()=>a});var s=n(55729),r=n(25022);let a=e=>{var t;let[n,a]=(0,s.useState)(0),[i,l]=(0,s.useState)(!0),[o,d]=(0,s.useState)(0);(0,s.useEffect)(()=>{let t=null==e?void 0:e[n];t&&("number"==typeof t.currentRound?d(t.currentRound-1):t.rounds.length>=1&&d(t.rounds.length-1))},[n]);let c=e[n],u=c.rounds.filter(r.bs),x={...c,rounds:u},h=u.length>0&&(0,r.P4)(x,null==(t=e[n])?void 0:t.rounds);return{cupTrees:e,knockoutPartCupTree:x,selectedCupTree:c,enableCompactView:h,renderKnockout:i,setRenderKnockout:l,selectedRoundIndex:o,setSelectedRoundIndex:d,selectedTreeIndex:n,setSelectedTreeIndex:a}}},66268:(e,t,n)=>{n.d(t,{Bd:()=>ep,Or:()=>ev,SR:()=>ef.SR,LS:()=>ef.LS});var s=n(6029),r=n(21377),a=n(21501),i=n(76356),l=n(55729),o=n(90248),d=n(33752),c=n(48683),u=n(49249),x=n(39676),h=n(37071),m=n(75751),p=n(85986),j=n(95195),g=n(62221),v=n(21319),f=n(25022),y=n(47530);let b=e=>{var t;let{uniqueTournamentId:n,seasonId:r,sport:a,cupTrees:l}=e,{knockoutPartCupTree:d,selectedCupTree:u,enableCompactView:x,renderKnockout:j}=(0,g.C)(l);if(!d||!x||!j)return null;let b=null==(t=u.rounds.find(e=>e.order===u.currentRound))?void 0:t.description;return(0,s.jsx)(m.t,{tag:"MobileCupTree",children:(0,s.jsx)(p.J,{sport:a,tournamentId:n,seasonId:r,sourceTreeId:u.id,sourceTreeName:u.name,showSingleParticipantByeBlocks:u.showSingleParticipantByeBlocks,rounds:u.rounds,entrantsPerRound:u.showSingleParticipantByeBlocks?[]:(0,f.BE)(u.rounds),children:(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)(i.az,{pt:"lg",children:[(0,s.jsx)(h.EY,{display:"block",textStyle:"display.medium",textAlign:"center",children:(0,s.jsx)(o.A,{id:"knockout"})}),b&&(0,s.jsx)(h.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",textAlign:"center",children:(0,s.jsx)(y.__,{name:b,sport:a})})]}),(0,s.jsx)(v.H,{cupTree:d,inCard:!0})]})})})},w=e=>{let{featured:t,uniqueTournament:n}=e,[a,l]=(0,j.Q)(t.id,t.seasonId);return l?(0,s.jsx)(i.az,{h:"[500px]"}):a?(0,s.jsx)(b,{cupTrees:a,seasonId:t.seasonId,uniqueTournamentId:t.id,sport:r.QCR.Football,categorySlug:n.category.slug,uniqueTournamentSlug:n.slug}):null};var T=n(75436),k=n(59721),S=n(46009),C=n(8973),I=n(41248),E=n(4967),A=n(3167);let z=e=>{let{value:t,messageId:n}=e;return(0,s.jsxs)(i.az,{w:"1/4",px:"[1px]",children:[(0,s.jsx)(h.EY,{display:"block",textStyle:"display.small",color:"onColor.primary",textAlign:"center",children:t}),(0,s.jsx)(h.EY,{display:"block",textStyle:"assistive.default",color:"onColor.primary",textAlign:"center",truncate:!0,children:(0,s.jsx)(o.A,{id:n})})]})},D=()=>(0,s.jsx)(i.az,{h:"2xl",w:"[1px]",backgroundColor:"onColor.secondary"}),L=e=>{let{now:t,start:n}=e,{days:r,hours:a,minutes:l,seconds:o}=(0,E.DU)(t,n);return(0,s.jsxs)(i.so,{w:"100%",justify:"space-between",bg:"[linear-gradient(0deg, {colors.onColor.highlight2} 0%, {colors.onColor.highlight2} 100%), {colors.graphics.dark}]",h:"4xl",br:"sm",p:"sm",mt:"sm",children:[(0,s.jsx)(z,{value:r,messageId:"days"}),(0,s.jsx)(D,{}),(0,s.jsx)(z,{value:a,messageId:"hours"}),(0,s.jsx)(D,{}),(0,s.jsx)(z,{value:l,messageId:"minutes"}),(0,s.jsx)(D,{}),(0,s.jsx)(z,{value:o,messageId:"seconds_left"})]})},_=e=>{let{start:t,end:n}=e,[r,o]=(0,l.useState)(new Date().getTime()),d=(0,a.hX)();if((0,l.useEffect)(()=>{let e=setInterval(()=>o(new Date().getTime()),1e3);return()=>clearInterval(e)},[]),!t||d)return(0,s.jsx)(i.az,{h:"5xl"});let c=1e3*t;return c>=r?(0,s.jsx)(L,{now:r,start:c}):(0,s.jsx)(A.G,{c:"onColor.primary",bg:"onColor.highlight.nLv2",datesProps:{mt:"xxs"},start:t,end:n,mt:"0",mb:"0",pt:"lg"})};var B=n(52695);let N=e=>{let{uniqueTournament:t,featuredType:n}=e;return(0,s.jsxs)(i.az,{position:"relative",children:[(0,s.jsx)(I.W,{tournament:n}),(0,s.jsxs)(i.az,{px:"lg",position:"relative",children:[(0,s.jsxs)(i.so,{py:"lg",gap:"lg",align:"center",children:[(0,s.jsx)(i.az,{w:"2xl",h:"2xl",children:(0,s.jsx)(k.e,{id:n.id,name:null==t?void 0:t.name,size:32})}),(0,s.jsx)(i.az,{overflow:"hidden",flexGrow:1,children:(0,s.jsx)(h.EY,{display:"block",textStyle:"display.medium",color:"onColor.primary",truncate:!0,children:t&&(0,s.jsx)(B.O,{uniqueTournament:t})})}),(0,s.jsx)(S.e,{id:n.id,entity:r.bq7.Tournaments,location:C.y.Header,type:C.b.UniqueTournament,isOnOverlay:!0})]}),(0,s.jsx)(i.az,{pb:"lg",children:(0,s.jsx)(_,{start:null==t?void 0:t.startDateTimestamp,end:null==t?void 0:t.endDateTimestamp})})]})]})};var O=n(5546),P=n(61836),Y=n(25745);let R=60*E.Z2,U=(e,t)=>{var n;let[s,r]=(0,l.useState)({}),[a,i]=(0,l.useState)({}),[o,d]=(0,l.useState)(Math.random()),c=(0,O.uZ)(),u=(0,Y.s)(null==c?void 0:c.impressionCostEncrypted),x=!!t&&!!s[t];return(0,l.useEffect)(()=>{if(!t||!x||!c)return;let e=Date.now();if(a[t]){let n=e-a[t];if(nd(Math.random()),n);return()=>clearTimeout(e)}}let n=async()=>{(0,P.Zb)({provider:c.provider.slug,value:await u})};i({...a,[t]:new Date().getTime()}),n();let s=setInterval(()=>n(),R);return()=>clearInterval(s)},[x,null==c||null==(n=c.provider)?void 0:n.id,t,o]),{hasSelectedDayOdds:x,setHasSelectedDayOdds:e=>{r(n=>t?{...n,[t]:e}:n)},resetOddsTracking:()=>{r({}),i({})}}};var M=n(37960),W=n(77988),q=n(52363),F=n(19944),H=n(12047),Z=n(54409),X=n(21075),G=n(58047);let $=(e,t,n,s)=>{let r=(null==t?void 0:t.count)||s;if(e&&r)return r*(96+36*!!n)+8*(r-1)},V=e=>{let{day:t,events:n,isLoading:r,uniqueTournament:a,seasonId:l,setHasSelectedDayOdds:d}=e,u=(0,O.uZ)();if(!r&&0===n.length)return null;let x=$(r,t,u,1);return(0,s.jsxs)(c.Zp,{children:[(0,s.jsx)(i.az,{style:{height:x?"".concat(x,"px"):void 0},children:(0,s.jsx)(c.BU,{children:n.sort((e,t)=>e.startTimestamp-t.startTimestamp).map(e=>(0,s.jsx)(X.n,{countryOddsProvider:u,event:e,setHasSelectedDayOdds:d},e.id))})}),(0,s.jsx)(T.S,{uniqueTournament:a,seasonId:l,tab:G.x.Matches,children:(0,s.jsxs)(i.so,{pb:"lg",pt:"sm",br:"md",bg:"surface.s1",justify:"center",align:"center",gap:"xs",children:[(0,s.jsx)(h.EY,{display:"block",textStyle:"display.small",color:"primary.default",children:(0,s.jsx)(o.A,{id:"see_all_matches_button"})}),(0,s.jsx)(Z.CCT,{fill:"primary.default"})]})})]})};var Q=n(10778),K=n(90510);let J=e=>{let{dateString:t,isSelected:n,onClick:r}=e,[l,d]=(0,a.c9)([]);(0,h.rF)(l,[n],()=>!!n);let c=t.split("-").map(Number),u=new Date(c[0],c[1]-1,c[2]);return(0,s.jsxs)(i.az,{ref:d,h:"4xl",minW:"5xl",bg:"surface.s1",onClick:n?void 0:r,cursor:n?void 0:"pointer",borderBottom:"[2px solid]",borderBottomColor:n?"primary.default":"[transparent]",style:{userSelect:"none"},flexShrink:0,pt:"xs",py:"xs",children:[(0,s.jsx)(h.EY,{display:"block",textStyle:"assistive.micro",textAlign:"center",whiteSpace:"nowrap",color:n?"primary.default":"neutrals.nLv3",mt:"xs",children:(0,E.cK)(u)?(0,s.jsx)(o.A,{id:"today"}):(0,s.jsx)(K.XU,{value:u,weekday:"short"})}),(0,s.jsx)(h.EY,{display:"block",textStyle:"display.micro",textAlign:"center",whiteSpace:"nowrap",mt:"2xs",children:(0,s.jsx)(K.XU,{value:u,day:"numeric",month:"short"})})]})},ee=e=>{let{selectedDate:t,setSelectedDate:n,dates:r}=e;return(0,s.jsx)(h.tR,{showButtons:"never",children:(0,s.jsx)(i.so,{bg:"surface.s1",minW:"fit",h:"4xl",justify:"space-between",children:r.length>0&&r.map(e=>(0,s.jsx)(J,{dateString:e.date,isSelected:(null==t?void 0:t.date)===e.date,onClick:()=>n(e)},e.date))})})};var et=n(45860),en=n(86679);let es=e=>{let{data:t}=(0,et.Ay)(r.tI9.seasonDatesWithEvents(e.seasonId,3600*(0,E.UW)())),{hasCupTree:n}=(0,en.A)({hasCupTree:{route:r.V3t.cupTrees(e.id,e.seasonId)}},[e.id,e.seasonId]),[s,a]=(0,l.useState)(),i=(null==t?void 0:t.dailySeasonEvents)||[];(0,l.useEffect)(()=>{if(i.length){let e=new Date().getTime(),t=i[0],n=Number.MAX_VALUE;i.forEach(s=>{let r=new Date(s.date),a=Math.abs(e-r.getTime());(0,E.cK)(r)&&(t=s,n=0),a{let{tournament:t,uniqueTournament:n}=e,h=(0,H.Ay)({isInMobileTabs:!1,isSportMenuVisible:!1}),{selectedDate:m,setSelectedDate:p,dates:j,showCupTree:g}=es(t),{events:v,isLoading:f}=(0,F.Y)(t.id,null==m?void 0:m.date),{hasSelectedDayOdds:y,setHasSelectedDayOdds:b}=U(t.id,null==m?void 0:m.date),k=(0,eh.h)(v),S=(0,O.uZ)(),C=(0,a.YU)();return(0,l.useEffect)(()=>{window.scrollTo({left:0,top:0})},[t.id]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.az,{position:"relative",children:[(0,s.jsx)(T.S,{uniqueTournament:n,seasonId:t.seasonId,children:(0,s.jsx)(N,{featuredType:t,uniqueTournament:n})}),(0,s.jsx)(d.B,{children:(0,s.jsx)(d.B.Title,{children:(0,s.jsx)(o.A,{id:"meta."+t.slug,defaultMessage:n.name})})}),(0,s.jsx)(i.az,{bg:"surface.s1",position:"sticky",zIndex:"sticky",elevation:"2",style:{top:h},children:(0,s.jsx)(ee,{selectedDate:m,setSelectedDate:p,dates:j})}),(0,s.jsx)(i.az,{bg:"surface.s0",children:(0,s.jsxs)(c.BU,{children:[(0,s.jsx)(V,{day:m,events:v,isLoading:f||!m,uniqueTournament:n,seasonId:t.seasonId,setHasSelectedDayOdds:b}),(0,s.jsx)(x.iN,{id:er.Rj.MOBILE_FEATURED_TOURNAMENT_TOP}),(0,s.jsx)(ea.pk,{utIds:null,logData:{type:"banner",name:"fantasy",location:"featured_tournament_tab"}}),g?(0,s.jsx)(w,{featured:t,uniqueTournament:n}):(0,s.jsx)(ex,{uniqueTournamentId:t.id,seasonId:t.seasonId,selectedTournamentId:k}),(0,s.jsx)(u.Z,{entity:"unique-tournament",entityId:t.id,bgImageUrl:r.V3t.image(t.id,!0),location:"featured_tournament_tab"})]})})]}),t.historyHighlightsEndYear&&(0,s.jsx)(Q.j,{uniqueTournament:n,tournament:t}),(0,s.jsx)(i.so,{justify:"center",align:"center",pt:t.historyHighlightsEndYear?"lg":"sm",pb:"4xl",px:"lg",gap:"sm",bg:"surface.s0",children:y&&(0,s.jsx)(W.A,{provider:S})}),(0,s.jsx)(q.hz,{uniqueTournamentId:n.id}),(0,s.jsx)(i.az,{position:"fixed",right:"0",left:"0",bottom:"0",zIndex:"bottomNavigation",style:{transition:"transform ".concat(M.x,"ms ease-out"),transform:"translateY(".concat(C===a.Dh.Down?0:-1*ei.E,"px)")},children:(0,s.jsx)(x.iN,{id:er.Rj.MOBILE_FEATURED_TOURNAMENT_BOTTOM})})]})},ep=e=>(0,s.jsx)(em,{...e}),ej=(e,t)=>{let n=e.localeCompare(t.defaultFrom);return n<0?0:0===n?1:e.localeCompare(t.showCupTreeFrom||t.visibleTo)>=0?2:4},eg=e=>{let{selectedDate:t,tournament:n}=e,{data:a}=(0,et.Ay)(r.V3t.details(n.id)),{data:l}=(0,et.Ay)(r.tI9.seasonDatesWithEvents(n.seasonId,3600*(0,E.UW)()),{dedupingInterval:E.dp}),{events:o,isLoading:d}=(0,F.Y)(n.id,t),u=(0,O.uZ)(),{setHasSelectedDayOdds:x}=U(n.id,t),h=ej(t,n),m=$(d,null==l?void 0:l.dailySeasonEvents.find(e=>e.date===t),u,h);return(0,s.jsx)(c.Zp,{children:(0,s.jsxs)(c.BU,{children:[(0,s.jsx)(T.S,{uniqueTournament:null==a?void 0:a.uniqueTournament,seasonId:n.seasonId,onClick:()=>(0,P.ke)({action:"click",location:"main_page",type:n.analyticsName}),children:(0,s.jsx)(i.az,{br:"lg",overflow:"hidden",children:(0,s.jsx)(N,{featuredType:n,uniqueTournament:null==a?void 0:a.uniqueTournament})})}),d&&Number(m)>0&&(0,s.jsx)(i.az,{style:{height:m?"".concat(m,"px"):void 0}}),o.sort((e,t)=>e.startTimestamp-t.startTimestamp).map(e=>(0,s.jsx)(X.n,{countryOddsProvider:u,event:e,setHasSelectedDayOdds:x},e.id))]})})},ev=e=>{let{date:t,tournaments:n}=e;return(0,s.jsx)(s.Fragment,{children:n.map(e=>(0,s.jsx)(eg,{tournament:e,selectedDate:t},e.id))})};var ef=n(79368)}}]);