!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]="8cf11cc0-2f07-463d-9a37-0fdaf8102477",e._sentryDebugIdIdentifier="sentry-dbid-8cf11cc0-2f07-463d-9a37-0fdaf8102477")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70201],{5635:(e,t,s)=>{s.d(t,{r:()=>d});var i=s(6029),l=s(28349),n=s(76356),a=s(90248),r=s(52466);let d=e=>{let{isOpen:t,onClick:s}=e;return(0,i.jsx)(n.so,{align:"center",justify:"center",p:"lg",children:(0,i.jsx)(n.I4.button,{onClick:s,padding:"0",cursor:"pointer",children:(0,i.jsxs)(n.so,{align:"center",children:[(0,i.jsx)(l.EY,{textStyle:"display.small",color:"primary.default",children:(0,i.jsx)(a.A,{id:t?"see_less":"basic.seeMore"})}),t?(0,i.jsx)(r.t8v,{fill:"primary.default",ml:"xs"}):(0,i.jsx)(r.QtO,{fill:"primary.default",ml:"xs"})]})})})}},14676:(e,t,s)=>{s.d(t,{_:()=>M});var i=s(6029),l=s(28349),n=s(76356),a=s(36882),r=s(70251),d=s(64006),o=s(90510);let c=e=>{let{stages:t}=e;if(!t||t.length<=1)return null;let s=t[0].startDateTimestamp,n=t[t.length-1],a=n.endDateTimestamp||n.startDateTimestamp,r=s&&a&&new Date(1e3*s).getMonth()===new Date(1e3*a).getMonth();return(0,i.jsxs)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[s&&(0,i.jsx)(o.XU,{value:1e3*s,day:"numeric",month:r?void 0:"short"}),a&&(0,i.jsxs)(i.Fragment,{children:["\xa0 - \xa0",(0,i.jsx)(o.XU,{value:1e3*a,day:"numeric",month:"short"})]})]})};var u=s(21377),x=s(4967),h=s(55729),p=s(90248),g=s(52466),m=s(16480),j=s(51755),v=s(41442);let f=(0,s(62042).Fj)({base:{},variants:{status:{notStarted:{color:"neutrals.nLv3"},finished:{color:"neutrals.nLv3"},today:{color:"neutrals.nLv1"},live:{color:"status.live"}}}}),y=(0,n.I4)(n.so,f),L=e=>{let{stage:t}=e,s=t.substages||t.eventSubstages||[],a=s.length>0?s[s.length-1]:t,r=(null==a?void 0:a.startDateTimestamp)||t.startDateTimestamp;return(0,i.jsxs)(n.so,{px:"md",justify:"space-between",children:[r&&(0,i.jsxs)(l.EY,{textStyle:"body.small",color:"neutrals.nLv3",ml:"2xs",children:[(0,i.jsx)(g.ABt,{mr:"sm",fill:"currentcolor"}),(0,i.jsx)(o.XU,{value:1e3*r,...x.or.dateTime})," •"," ",(0,i.jsx)(v.N,{id:a.description})]}),t.winner&&(0,i.jsxs)(n.zt,{gap:"sm",flexShrink:0,children:[(0,i.jsx)(g.$dv,{fill:"sofaSingles.value"}),(0,i.jsx)(l.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:t.winner.name})]})]})},b=e=>{let{stage:t,isTimeline:s,isLast:n}=e,a=null==t?void 0:t.startDateTimestamp;if(!a)return null;let r=t.status.type===u.hzM.inprogress,d=t.status.type===u.hzM.notstarted,c=(0,x.cK)(1e3*a);return(0,i.jsxs)(y,{position:"relative",gap:"sm",align:"center",status:(e=>{let{isLive:t,isToday:s,notStartedYet:i}=e;return t?"live":s&&i?"today":i?"notStarted":"finished"})({isLive:r,isToday:c,notStartedYet:d}),_before:{content:'""',bg:"neutrals.nLv3",w:"[1px]",h:"[10px]",position:"absolute",left:"[3px]",top:"[16px]",display:s&&!n?"block":"none"},children:[(0,i.jsx)(m.m,{status:t.status.type,isToday:c}),(0,i.jsxs)(l.EY,{textStyle:"body.small",color:"[currentcolor]",children:[r?(0,i.jsx)(p.A,{id:"live"}):c?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{id:"today"}),", ",(0,i.jsx)(o.ib,{value:1e3*a})]}):(0,x.ef)(1e3*a)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{id:"tomorrow"}),", ",(0,i.jsx)(o.ib,{value:1e3*a})]}):(0,i.jsx)(o.XU,{value:1e3*a,...x.or.dateTime})," ","• ",(0,i.jsx)(v.N,{id:t.description})]})]})},S=e=>{let{substages:t,timelineOpened:s}=e,l=(0,j.VL)(t);return(0,i.jsx)(i.Fragment,{children:s?(0,i.jsx)(i.Fragment,{children:t.map((e,s)=>(0,i.jsx)(b,{stage:e,isTimeline:!0,isLast:s===t.length-1},e.id))}):(0,i.jsx)(b,{stage:l})})},w=e=>{let{stage:t}=e,[s,a]=(0,h.useState)(!1),r=t.substages||t.eventSubstages||[],d=(0,j.YQ)(t.status.type),o=r.some(e=>void 0!==e.startDateTimestamp);return(0,h.useEffect)(()=>{a(function(e){if(!e)return!1;let t=new Date,s=t.getDay(),i=new Date(t);i.setHours(0,0,0,0),i.setDate(t.getDate()+(0===s?-6:1-s));let l=new Date(i);return l.setDate(i.getDate()+6),l.setHours(23,59,59,999),e.some(e=>{let t=new Date(1e3*e);return t>=i&&t<=l})}(r.map(e=>e.startDateTimestamp).filter(e=>void 0!==e)))},[t]),(0,i.jsxs)(n.so,{px:"md",justify:"space-between",cursor:"pointer",onClick:e=>{!d&&o&&(a(e=>!e),e.stopPropagation(),e.preventDefault())},children:[(0,i.jsx)(n.BJ,{ml:"[6px]",mt:"xs",children:r.length<=1?(0,i.jsx)(b,{stage:t}):o?(0,i.jsx)(S,{substages:r,timelineOpened:s}):(0,i.jsx)(b,{stage:t})}),d?(0,i.jsx)(l.EY,{textStyle:"body.small",color:"status.error.default",children:(0,i.jsx)(p.A,{id:"canceled"})}):(0,i.jsx)(i.Fragment,{children:r.length>1&&o&&(0,i.jsx)(n.so,{w:"xl",h:"xl",color:"neutrals.nLv3",children:(0,i.jsx)(g.zQC,{icon:"chevron-down",fill:"onSurface.nLv3",style:{transition:"0.2s all",transform:"rotate(".concat(180*!!s,"deg)")}})})})]})},C=e=>{let{stage:t}=e;return t.status.type===u.hzM.finished?(0,i.jsx)(L,{stage:t}):(0,i.jsx)(w,{stage:t})};var T=s(62304);let M=e=>{var t,s;let{stage:o,sport:u,isSelected:x,isLast:h,onClick:p}=e,g=!!(null==(t=o.info)?void 0:t.borderColor);return(0,i.jsx)(d.LC,{stage:o,sportSlug:u,onClick:p,"data-stage-id":o.id,children:(0,i.jsx)(n.az,{py:"md",ps:"lg",bg:{base:"surface.s1",md:x?"neutral.highlight":"surface.s1"},mdDown:{elevation:"2",br:"lg",borderBottom:g?"2px solid var(--cycling-border-color)":"none",border:g?"2px solid var(--cycling-border-color)":"none"},md:{borderBottom:"1px solid",borderBottomColor:h?"[transparent]":"neutrals.nLv4",borderLeft:g?"[4px solid var(--cycling-border-color)]":void 0,_hover:{bg:"surface.s0"}},style:{"--cycling-border-color":null==(s=o.info)?void 0:s.borderColor},children:(0,i.jsxs)(n.BJ,{children:[(0,i.jsxs)(n.so,{justify:"space-between",children:[(0,i.jsxs)(n.zt,{children:[(0,i.jsx)(T.Q,{stage:o,size:24}),(0,i.jsxs)(n.BJ,{gap:"2xs",children:[(0,i.jsx)(l.EY,{textStyle:"body.large",lineHeight:1,children:o.description}),(0,i.jsx)(c,{stages:(null==o?void 0:o.substages)||(null==o?void 0:o.eventSubstages)||[]})]})]}),(0,i.jsx)(n.so,{w:"4xl",h:"2xl",align:"center",justify:"center",borderStart:"1px solid",borderColor:"neutrals.nLv4",flexShrink:0,children:(0,i.jsx)(r.x,{id:o.id,uniqueStage:o.uniqueStage,location:a.y.RacesTab})})]}),(0,i.jsx)(C,{stage:o})]})})})}},16480:(e,t,s)=>{s.d(t,{b:()=>w,m:()=>j});var i=s(6029),l=s(21377),n=s(4967),a=s(28349),r=s(76356),d=s(90510),o=s(90248),c=s(74664),u=s(52466),x=s(36882),h=s(70251),p=s(64006),g=s(62304),m=s(41442);let j=e=>{let{status:t,isToday:s}=e;switch(t){case l.hzM.inprogress:return(0,i.jsx)(r.az,{minW:"sm",h:"sm",br:"[100%]",bg:"status.live"});case l.hzM.finished:return(0,i.jsx)(r.az,{minW:"sm",h:"sm",br:"[100%]",bg:"neutrals.nLv3"});default:return(0,i.jsx)(r.so,{align:"center",justify:"center",minW:"[8px]",h:"sm",br:"sm",bg:s?"neutrals.nLv1":"neutrals.nLv3",children:(0,i.jsx)(r.az,{w:"xs",h:"xs",br:"[100%]",bg:"surface.s1"})})}},v=e=>{let{startDateTimestamp:t,live:s}=e;return t?(0,i.jsx)(r.az,{flexGrow:1,flexShrink:0,children:(0,i.jsx)(a.EY,{textStyle:"body.small",color:s?"status.live":"neutrals.nLv3",lineHeight:1,children:(0,i.jsx)(d.XU,{value:1e3*t,...n.or.dateTime})})}):null},f=e=>{let{winner:t}=e;return t?(0,i.jsxs)(r.so,{gap:"sm",align:"center",children:[(0,i.jsx)(u.$dv,{fill:"sofaSingles.value"}),(0,i.jsx)(a.EY,{lineHeight:"1",textStyle:"body.small",color:"neutrals.nLv3",children:t.name})]}):null},y=e=>{let{description:t,live:s}=e;return t?(0,i.jsxs)(r.so,{gap:"sm",children:[(0,i.jsx)(a.EY,{textStyle:"body.small",lineHeight:1,color:s?"status.live":"neutrals.nLv3",children:"•"}),(0,i.jsx)(a.EY,{textStyle:"body.small",lineHeight:1,truncate:!0,maxW:{base:"[250px]",md:"[150px]",lg:"[200px]"},color:s?"status.live":"neutrals.nLv3",children:(0,i.jsx)(m.N,{id:t})})]}):null},L=e=>{let{live:t}=e;return t?(0,i.jsx)(r.so,{bg:"status.live",px:"sm",br:"lg",h:"lg",align:"center",children:(0,i.jsx)(a.EY,{lineHeight:1,textStyle:"assistive.default",color:"[white]",children:(0,i.jsx)(o.A,{id:"live"})})}):null},b=e=>{var t,s,n,d,c,u;let{stage:x,categoryId:h}=e,p=(null==(t=x.substage)?void 0:t.status.type)===l.hzM.canceled,m=(null==(s=x.substage)?void 0:s.status.type)===l.hzM.inprogress;return(0,i.jsxs)(r.so,{flexGrow:1,justify:"space-between",align:"center",children:[(0,i.jsxs)(r.BJ,{gap:"xs",flexGrow:1,children:[(0,i.jsxs)(r.so,{align:"center",gap:"md",children:[(0,i.jsx)(g.Q,{stage:x,size:16,categoryId:h}),(0,i.jsx)(a.EY,{textStyle:"body.small",lineHeight:1,children:x.name})]}),(0,i.jsxs)(r.so,{children:[(0,i.jsx)(r.az,{minW:"[28px]"}),(0,i.jsxs)(r.so,{flexGrow:1,justify:"space-between",wrap:"wrap",gap:"sm",children:[(0,i.jsxs)(r.so,{gap:"sm",align:"center",wrap:"wrap",children:[(0,i.jsx)(j,{status:null==(n=x.substage)?void 0:n.status.type}),(0,i.jsx)(v,{startDateTimestamp:null==(d=x.substage)?void 0:d.startDateTimestamp,live:m}),(0,i.jsx)(y,{description:null==(c=x.substage)?void 0:c.description,live:m})]}),(0,i.jsx)(r.so,{align:"center",children:p?(0,i.jsx)(a.EY,{textStyle:"body.small",color:"status.live",lineHeight:1,children:(0,i.jsx)(o.A,{id:"canceled"})}):(0,i.jsx)(f,{winner:null==(u=x.substage)?void 0:u.winner})})]})]})]}),(0,i.jsx)(L,{live:m})]})},S=e=>{var t,s;let{stage:n}=e;return(null==(t=n.substage)?void 0:t.winner)||(null==(s=n.substage)?void 0:s.status.type)===l.hzM.canceled?null:(0,i.jsxs)(r.so,{gap:"sm",flexShrink:0,children:[(0,i.jsx)(r.cG,{w:"[1px]",bg:"neutrals.nLv4"}),(0,i.jsx)(h.x,{id:n.id,uniqueStage:n.uniqueStage,location:x.y.MainMatches})]})},w=e=>{let{stage:t,categoryId:s}=e,l=(0,c.o)();return(0,i.jsx)(p.LC,{stage:t,sportSlug:l,children:(0,i.jsxs)(r.so,{justify:"space-between",px:"md",align:"center",pb:"md",gap:"xs",children:[(0,i.jsx)(b,{stage:t,categoryId:s}),(0,i.jsx)(S,{stage:t})]})},t.id)}},23405:(e,t,s)=>{s.d(t,{d:()=>d});var i=s(6029);let l=e=>{let{fill:t="#CB1818"}=e;return(0,i.jsxs)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("mask",{id:"mask0_14506_63640",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"18",children:[(0,i.jsx)("mask",{id:"path-1-inside-1_14506_63640",fill:"white",children:(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z"})}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z",fill:"#D8D8D8"}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.6039 1.1073L15.4835 0.530294L14.9204 0.356159L14.625 1.31152ZM15.75 6.7041L16.3133 7.53037L16.8654 7.15399L16.7289 6.49988L15.75 6.7041ZM14.0625 7.85449L13.4992 7.02822L13.0625 7.32594V7.85449H14.0625ZM2.6875 18L2.6875 19H2.6875V18ZM1.6875 7.85449H2.6875V7.32594L2.25078 7.02822L1.6875 7.85449ZM0 6.7041L-0.978924 6.49988L-1.11539 7.15399L-0.563277 7.53037L0 6.7041ZM1.125 1.31152L0.829508 0.356178L0.266442 0.530337L0.146076 1.1073L1.125 1.31152ZM5.36523 0L6.13702 -0.63588L5.71052 -1.15354L5.06974 -0.955345L5.36523 0ZM10.3838 0L10.6792 -0.955364L10.0387 -1.15342L9.61224 -0.636174L10.3838 0ZM14.625 1.31152L13.6461 1.51575L14.7711 6.90832L15.75 6.7041L16.7289 6.49988L15.6039 1.1073L14.625 1.31152ZM15.75 6.7041L15.1867 5.87783L13.4992 7.02822L14.0625 7.85449L14.6258 8.68076L16.3133 7.53037L15.75 6.7041ZM14.0625 7.85449H13.0625V17H14.0625H15.0625V7.85449H14.0625ZM14.0625 17H13.0625V18V19C14.1671 19 15.0625 18.1046 15.0625 17H14.0625ZM13.0625 18V17H2.6875V18V19H13.0625V18ZM2.6875 18L2.6875 17H2.6875H1.6875H0.6875C0.6875 18.1046 1.58293 19 2.6875 19L2.6875 18ZM1.6875 17H2.6875V7.85449H1.6875H0.6875V17H1.6875ZM1.6875 7.85449L2.25078 7.02822L0.563277 5.87783L0 6.7041L-0.563277 7.53037L1.12422 8.68076L1.6875 7.85449ZM0 6.7041L0.978924 6.90832L2.10392 1.51575L1.125 1.31152L0.146076 1.1073L-0.978924 6.49988L0 6.7041ZM1.125 1.31152L1.42049 2.26687L5.66073 0.955345L5.36523 0L5.06974 -0.955345L0.829508 0.356178L1.125 1.31152ZM5.36523 0L4.59345 0.63588C5.30943 1.50489 6.59356 1.94922 7.875 1.94922V0.949219V-0.0507812C6.96188 -0.0507812 6.3481 -0.379683 6.13702 -0.63588L5.36523 0ZM7.875 0.949219V1.94922C9.15673 1.94922 10.4395 1.5043 11.1553 0.636174L10.3838 0L9.61224 -0.636174C9.4007 -0.379615 8.78721 -0.0507812 7.875 -0.0507812V0.949219ZM10.3838 0L10.0884 0.955364L14.3296 2.26689L14.625 1.31152L14.9204 0.356159L10.6792 -0.955364L10.3838 0Z",fill:"#979797",mask:"url(#path-1-inside-1_14506_63640)"})]}),(0,i.jsxs)("g",{mask:"url(#mask0_14506_63640)",children:[(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 -3.00012)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"-3.00012",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"-3.00012",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 0.999878)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"0.999878",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 4.99988)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"4.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"4.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 8.99988)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"8.99988",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 12.9999)",fill:"white"}),(0,i.jsx)("rect",{x:"1.875",y:"12.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"9.875",y:"12.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{width:"28",height:"4",transform:"translate(-6.125 16.9999)",fill:"white"}),(0,i.jsx)("rect",{x:"-2.125",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"5.875",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("rect",{x:"13.875",y:"16.9999",width:"4",height:"4",rx:"2",fill:t}),(0,i.jsx)("path",{d:"M1.6875 13.5H14.0625V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V13.5Z",fill:"url(#paint0_linear_14506_63640)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.0628 7.86292L13.5003 8.22604L13.5003 0.960584L14.6281 1.31363L15.7461 6.6927L14.0628 7.86292Z",fill:"url(#paint1_linear_14506_63640)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.69977 7.86279L2.25026 8.22192V0.961919L1.11964 1.31001L-0.00195312 6.69699L1.69977 7.86279Z",fill:"url(#paint2_linear_14506_63640)"})]}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.54673V17.4245H13.5V7.54673L15.1202 6.44171L14.1442 1.7637L10.5457 0.650199C9.90399 1.21285 8.91119 1.52506 7.875 1.52506C6.83881 1.52506 5.84601 1.21285 5.20434 0.650199L1.60578 1.7637L0.62984 6.44171L2.25 7.54673ZM0 6.70377L1.125 1.31124L5.36263 2.41011e-08C5.82578 0.563289 6.7769 0.949588 7.875 0.949588C8.9731 0.949588 9.92422 0.563289 10.3874 0L14.625 1.31124L15.75 6.70377L14.0625 7.85472V17.4245C14.0625 17.7423 13.8107 18 13.5 18H2.25C1.93934 18 1.6875 17.7424 1.6875 17.4245V7.85472L0 6.70377Z",fill:"black","fill-opacity":"0.25"}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"paint0_linear_14506_63640",x1:"1.6875",y1:"13.5",x2:"1.6875",y2:"18",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.01"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.1"})]}),(0,i.jsxs)("linearGradient",{id:"paint1_linear_14506_63640",x1:"13.5003",y1:"8.22608",x2:"13.5003",y2:"1.12983",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]}),(0,i.jsxs)("linearGradient",{id:"paint2_linear_14506_63640",x1:"2.25026",y1:"8.44651",x2:"2.25026",y2:"1.34994",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]})]})]})},n=e=>{let{fill:t}=e;return(0,i.jsxs)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("mask",{id:"mask0_14506_63652",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"18",children:[(0,i.jsx)("mask",{id:"path-1-inside-1_14506_63652",fill:"white",children:(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z"})}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.75 6.7041L14.0625 7.85449V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V7.85449L0 6.7041L1.125 1.31152L5.36523 0C5.82877 0.562604 6.77772 0.949219 7.875 0.949219C8.97197 0.949219 9.92011 0.562343 10.3838 0L14.625 1.31152Z",fill:"#D8D8D8"}),(0,i.jsx)("path",{d:"M14.625 1.31152L15.6039 1.1073L15.4835 0.530294L14.9204 0.356159L14.625 1.31152ZM15.75 6.7041L16.3133 7.53037L16.8654 7.15399L16.7289 6.49988L15.75 6.7041ZM14.0625 7.85449L13.4992 7.02822L13.0625 7.32594V7.85449H14.0625ZM2.6875 18L2.6875 19H2.6875V18ZM1.6875 7.85449H2.6875V7.32594L2.25078 7.02822L1.6875 7.85449ZM0 6.7041L-0.978924 6.49988L-1.11539 7.15399L-0.563277 7.53037L0 6.7041ZM1.125 1.31152L0.829508 0.356178L0.266442 0.530337L0.146076 1.1073L1.125 1.31152ZM5.36523 0L6.13702 -0.63588L5.71052 -1.15354L5.06974 -0.955345L5.36523 0ZM10.3838 0L10.6792 -0.955364L10.0387 -1.15342L9.61224 -0.636174L10.3838 0ZM14.625 1.31152L13.6461 1.51575L14.7711 6.90832L15.75 6.7041L16.7289 6.49988L15.6039 1.1073L14.625 1.31152ZM15.75 6.7041L15.1867 5.87783L13.4992 7.02822L14.0625 7.85449L14.6258 8.68076L16.3133 7.53037L15.75 6.7041ZM14.0625 7.85449H13.0625V17H14.0625H15.0625V7.85449H14.0625ZM14.0625 17H13.0625V18V19C14.1671 19 15.0625 18.1046 15.0625 17H14.0625ZM13.0625 18V17H2.6875V18V19H13.0625V18ZM2.6875 18L2.6875 17H2.6875H1.6875H0.6875C0.6875 18.1046 1.58293 19 2.6875 19L2.6875 18ZM1.6875 17H2.6875V7.85449H1.6875H0.6875V17H1.6875ZM1.6875 7.85449L2.25078 7.02822L0.563277 5.87783L0 6.7041L-0.563277 7.53037L1.12422 8.68076L1.6875 7.85449ZM0 6.7041L0.978924 6.90832L2.10392 1.51575L1.125 1.31152L0.146076 1.1073L-0.978924 6.49988L0 6.7041ZM1.125 1.31152L1.42049 2.26687L5.66073 0.955345L5.36523 0L5.06974 -0.955345L0.829508 0.356178L1.125 1.31152ZM5.36523 0L4.59345 0.63588C5.30943 1.50489 6.59356 1.94922 7.875 1.94922V0.949219V-0.0507812C6.96188 -0.0507812 6.3481 -0.379683 6.13702 -0.63588L5.36523 0ZM7.875 0.949219V1.94922C9.15673 1.94922 10.4395 1.5043 11.1553 0.636174L10.3838 0L9.61224 -0.636174C9.4007 -0.379615 8.78721 -0.0507812 7.875 -0.0507812V0.949219ZM10.3838 0L10.0884 0.955364L14.3296 2.26689L14.625 1.31152L14.9204 0.356159L10.6792 -0.955364L10.3838 0Z",fill:"#979797",mask:"url(#path-1-inside-1_14506_63652)"})]}),(0,i.jsx)("g",{mask:"url(#mask0_14506_63652)",children:(0,i.jsx)("rect",{width:"15.75",height:"32",transform:"translate(0 -7)",fill:t})}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.54673V17.4245H13.5V7.54673L15.1202 6.44171L14.1442 1.7637L10.5457 0.650199C9.90399 1.21285 8.91119 1.52506 7.875 1.52506C6.83881 1.52506 5.84601 1.21285 5.20434 0.650199L1.60578 1.7637L0.62984 6.44171L2.25 7.54673ZM0 6.70377L1.125 1.31124L5.36263 2.41011e-08C5.82578 0.563289 6.7769 0.949588 7.875 0.949588C8.9731 0.949588 9.92422 0.563289 10.3874 0L14.625 1.31124L15.75 6.70377L14.0625 7.85472V17.4245C14.0625 17.7423 13.8107 18 13.5 18H2.25C1.93934 18 1.6875 17.7424 1.6875 17.4245V7.85472L0 6.70377Z",fill:"black","fill-opacity":"0.25"}),(0,i.jsx)("path",{d:"M1.6875 13.5H14.0625V17C14.0625 17.5523 13.6148 18 13.0625 18H2.6875C2.13522 18 1.6875 17.5523 1.6875 17V13.5Z",fill:"url(#paint0_linear_14506_63652)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.0628 7.86292L13.5003 8.22604L13.5003 0.960584L14.6281 1.31363L15.7461 6.6927L14.0628 7.86292Z",fill:"url(#paint1_linear_14506_63652)"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.69977 7.86279L2.25026 8.22192V0.961919L1.11964 1.31001L-0.00195312 6.69699L1.69977 7.86279Z",fill:"url(#paint2_linear_14506_63652)"}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"paint0_linear_14506_63652",x1:"1.6875",y1:"13.5",x2:"1.6875",y2:"18",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.01"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.1"})]}),(0,i.jsxs)("linearGradient",{id:"paint1_linear_14506_63652",x1:"13.5003",y1:"8.22608",x2:"13.5003",y2:"1.12983",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]}),(0,i.jsxs)("linearGradient",{id:"paint2_linear_14506_63652",x1:"2.25026",y1:"8.44651",x2:"2.25026",y2:"1.34994",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{"stop-opacity":"0.1"}),(0,i.jsx)("stop",{offset:"1","stop-opacity":"0.01"})]})]})]})};var a=s(32033);let r={"tour-de-france":{young:"#FFFFFF",general:"#FFE418",sprint:"#15B168",climb:"#CB1818"},"giro-ditalia":{young:"#FFFFFF",general:"#FF286E",sprint:"#98458C",climb:"#374DF5"},"vuelta-a-espana":{young:"#FFFFFF",general:"#C8102E",sprint:"#00A651",climb:"#0066CC"}};function d(e){var t;let{shirt:s}=e,{stage:d}=(0,a.a)();if("climb"===s&&("tour-de-france"===d.slug||"vuelta-a-espana"===d.slug))return(0,i.jsx)(l,{fill:r[d.slug].climb});let o=null==(t=r[d.slug])?void 0:t[s];return o?(0,i.jsx)(n,{fill:o}):null}},25747:(e,t,s)=>{s.d(t,{M:()=>p});var i=s(6029),l=s(21377),n=s(15480),a=s(75837),r=s(92589),d=s(78148),o=s(38253),c=s(70941),u=s(68789),x=s(32033);let h=e=>{let{stage:t}=e,s=(0,u.Ae)(),{stage:l}=(0,x.a)(),{data:r,isLoading:c,error:h}=(0,d.K)(l.id);if(c)return(0,i.jsx)(n.t,{provider:s});if(!r||h)return null;let p={...r[0],choices:r.map(e=>e.choice)};return(0,i.jsx)(a.C,{stage:t,children:(0,i.jsx)(o.W,{market:p,stage:l})})},p=e=>{let{stage:t,isFeaturedOdds:s=!1}=e,d=(0,u.Ae)(),{stage:p}=(0,x.a)(),{data:g,isLoading:m,error:j}=(0,r.r)(p.id);if(m)return(0,i.jsx)(n.t,{provider:d});if(j||!g)return null;let v=function(e,t){let s=(0,c.tP)(t),i=t.status.type===l.hzM.inprogress;return e.find(e=>{var l;return e.marketId===s&&e.isLive===i&&(null==(l=e.stage)?void 0:l.id)===t.id})}(g,t);return s||void 0===v?(0,i.jsx)(h,{stage:t}):(0,i.jsx)(a.C,{stage:t,children:(0,i.jsx)(o.W,{market:v,stage:t})})}},32033:(e,t,s)=>{s.d(t,{K:()=>a,a:()=>r});var i=s(6029),l=s(55729);let n=(0,l.createContext)(void 0),a=e=>{let{children:t,stage:s}=e;return(0,i.jsx)(n.Provider,{value:{stage:s},children:t})},r=()=>{let e=(0,l.useContext)(n);if(!e)throw Error();return e}},38253:(e,t,s)=>{s.d(t,{W:()=>y});var i=s(6029),l=s(28349),n=s(76356),a=s(17763),r=s(22909),d=s(64046),o=s(78151),c=s(49519),u=s(21377),x=s(12927);let h=e=>{let{choice:t}=e;return(0,i.jsx)(n.so,{w:"100%",justify:"center",children:(0,i.jsx)(x.A,{team:t.team,outrightType:u.SNJ.Competitor,children:(0,i.jsxs)(n.az,{w:"2xl",h:"2xl",position:"relative",br:"50%",color:"neutrals.nLv4",children:[(0,i.jsx)(c.p,{id:t.team.id,name:t.team.name,w:32,h:32,br:"50%",style:{border:"1px solid currentcolor"}}),void 0!==t.team.country&&(0,i.jsx)(c.w,{alpha2:t.team.country.alpha2,w:16,h:16,style:{position:"absolute",right:"0",bottom:"0"}})]})})})};var p=s(11036),g=s(99012);let m=e=>{let{market:t,stage:s}=e,{ref:l,onSendClickImpression:a}=(0,g.A)({stageId:s.id,category:o.zK[s.type.id],location:o.ew.StageResults,position:d.ki.OddsValue,type:d.jF.Additional,status:s.status.type});return(0,i.jsx)(n.so,{gap:"sm",ref:l,children:t.choices.slice(0,3).map(e=>(0,i.jsxs)(n.BJ,{gap:"xs",flexGrow:1,w:"[0px]",children:[(0,i.jsx)(h,{choice:e}),(0,i.jsx)(p.K,{market:t,choice:e,label:e.team.nameCode||e.team.shortName||e.name,onClick:a})]},e.id))})};var j=s(50526),v=s(68789),f=s(63464);let y=e=>{let{market:t,stage:s}=e,c=(0,v.Ae)();return(0,i.jsxs)(n.BJ,{children:[(0,i.jsx)(a.A,{countryOddsProvider:c,children:(0,i.jsxs)(n.BJ,{children:[(0,i.jsxs)(n.so,{justify:"space-between",align:"center",children:[(0,i.jsx)(l.EY,{textStyle:"display.micro",children:(0,i.jsx)(f.C,{market:t,stage:s})}),(0,i.jsx)(r.p,{id:s.id,location:o.ew.StageResults,category:o.Nu[s.type.id],type:d.jF.Additional})]}),(0,i.jsx)(m,{market:t,stage:s})]})}),(0,i.jsx)(j.A,{})]})}},51755:(e,t,s)=>{s.d(t,{CS:()=>n,Jx:()=>d,VL:()=>a,YQ:()=>r});var i=s(21377);let l=["vuelta-a-espana","tour-de-france","giro-ditalia"],n=e=>{let t=Math.floor(Date.now()/1e3),s=e.filter(e=>e.status.type===i.hzM.inprogress),n=s.find(e=>l.some(t=>e.slug===t));if(n)return n;if(s.length>0)return s[0];let a=e.filter(e=>{switch(e.status.type){case i.hzM.finished:var t;return(null!=(t=e.endDateTimestamp)?t:0)!==0;case i.hzM.notstarted:return 0!==e.startDateTimestamp;default:return!1}});if(a.length>0)return a.reduce((e,s)=>{var l,n,a,r;let d=Math.abs(t-(e.status.type===i.hzM.finished?null!=(l=e.endDateTimestamp)?l:0:null!=(n=e.startDateTimestamp)?n:0));return Math.abs(t-(s.status.type===i.hzM.finished?null!=(a=s.endDateTimestamp)?a:0:null!=(r=s.startDateTimestamp)?r:0))e.status.type===i.hzM.notstarted);return r||(e.length>0?e[e.length-1]:null)},a=e=>{let t=e[0],s=Number.MAX_VALUE,l=Date.now()/1e3;for(let n=0;n[i.hzM.canceled,i.hzM.cancelled,i.hzM.postponed].indexOf(e)>-1,d=e=>["MotoGP","Moto3","Moto2","Superbike"].indexOf(e)>-1?"riders.bikes":e.toLowerCase().indexOf("cycling")>-1?"cycling_rider":"drivers"},54521:(e,t,s)=>{s.d(t,{C:()=>a});var i=s(55729),l=s(494),n=s(72753);function a(e){let t=(0,i.useMemo)(()=>(0,n.vt)(),[]);return(0,l.d4)(t,e)}},54804:(e,t,s)=>{s.d(t,{E:()=>u});var i=s(6029),l=s(28349),n=s(76356),a=s(90248),r=s(64046),d=s(22909),o=s(78151),c=s(20725);let u=e=>{let{stageId:t,location:s,stageTypeId:u}=e,{countryOddsProvider:x}=(0,c.D)();return(null==x?void 0:x.branded)?(0,i.jsx)(n.so,{justify:"flex-end",children:(0,i.jsxs)(n.so,{gap:"sm",align:"center",children:[(0,i.jsx)(l.EY,{textStyle:"body.small",color:"neutrals.nLv3",children:(0,i.jsx)(a.A,{id:"featured_by"})}),(0,i.jsx)(d.p,{id:t,location:s,category:o.Nu[u],type:r.jF.Additional})]})}):null}},56737:(e,t,s)=>{s.d(t,{UB:()=>U,GO:()=>eb,CS:()=>M.CS,VL:()=>M.VL});var i=s(6029),l=s(21377),n=s(55729),a=s(45860),r=s(46222),d=s(18970),o=s(8329),c=s(28349),u=s(99064),x=s(41735),h=s(15340),p=s(36882),g=s(64006),m=s(94156),j=s(76356),v=s(74664);let f={[l.QCR.Motorsport]:4,[l.QCR.Cycling]:4},y=()=>{var e;let t=null!=(e=f[(0,v.o)()])?e:4;return(0,i.jsx)(i.Fragment,{children:[...Array(t)].map((e,t)=>(0,i.jsx)(j.az,{h:"4xl",display:{base:"none",mdDown:"block"}},t))})};var L=s(4967),b=s(90510),S=s(90248),w=s(52466),C=s(70251),T=s(41442),M=s(51755),_=s(62304);let A=e=>(0,i.jsx)(u.az,{display:"inline-block",w:8,h:8,bg:"onSurface.nLv3",br:"50%",...e,children:e.isHollow&&(0,i.jsx)(u.az,{bg:"surface.s1",w:4,h:4,m:2,br:"50%"})}),z=e=>{let{stageId:t,fallbackRace:s}=e,{data:r}=(0,a.Ay)(l.dVR.substages(t)),d=(0,n.useMemo)(()=>r?(0,M.VL)(r.stages):s||null,[t,r,s]);if(!d)return null;if(!d.startDateTimestamp)return(0,i.jsx)(u.so,{minH:"32"});let o=((e,t)=>{switch(e){case l.hzM.inprogress:return"sofaSingles.live";case l.hzM.finished:default:return"onSurface.nLv3"}})(d.status.type);return(0,i.jsxs)(u.so,{pt:"xs",pb:"md",pr:"sm",children:[(0,i.jsx)(u.az,{children:(0,i.jsx)(A,{w:8,h:8,bg:o,my:"xs",mr:"sm",isHollow:![l.hzM.inprogress,l.hzM.finished].includes(d.status.type)})}),(0,i.jsxs)(u.EY,{lineHeight:"16px",font:"body.small",color:o,lineClamp:1,children:[d.startDateTimestamp&&(0,i.jsx)(b.XU,{value:1e3*d.startDateTimestamp,...L.or.dateTime}),r?(0,i.jsxs)(i.Fragment,{children:[d.startDateTimestamp&&d.description&&" • ",(0,i.jsx)(T.N,{id:d.description})]}):null]})]})},E=e=>{let{stage:t}=e;return(0,M.YQ)(t.status.type)?(0,i.jsx)(u.EY,{pt:"xs",pb:"md",lineHeight:"16px",font:"body.small",color:"error.default",children:(0,i.jsx)(S.A,{id:t.status.type})}):t.winner?(0,i.jsxs)(u.so,{pt:"xs",pb:"md",pr:"0",align:"center",children:[(0,i.jsx)(u.az,{children:(0,i.jsx)(w.$dv,{fill:"onSurface.nLv3",mr:"xs"})}),(0,i.jsx)(u.EY,{as:"bdi",lineHeight:"16px",font:"body.small",color:"onSurface.nLv3",lineClamp:1,children:t.winner.name})]}):null},k=e=>{let{stage:t,selected:s,small:a,isFirst:r}=e,o=(0,n.useContext)(d.Ws);return(0,i.jsx)(g.LC,{stage:t,sportSlug:o,children:(0,i.jsxs)(u.az,{borderTop:[void 0,r||a?void 0:"onSurface.nLv4"],py:"xs",px:"sm",h:[90,"auto",90],hoverBg:"surface.s2",bg:a?void 0:["surface.s1",s?"neutral.highlight":void 0],mt:[r?"md":"sm",0],mx:a?void 0:["sm",0],br:a?void 0:["sm",0],elevation:a?void 0:[2,void 0],children:[(0,i.jsxs)(u.so,{h:[48,"auto",48],py:6,align:"center",justify:"space-between",px:"lg",children:[(0,i.jsx)(_.Q,{stage:t}),(0,i.jsx)(u.EY,{style:{flexGrow:1},font:"body.large",color:"onSurface.nLv1",ml:"lg",children:t.description}),(0,i.jsx)(u.cG,{vertical:!0,mx:"md"}),(0,i.jsx)(C.x,{id:t.id,uniqueStage:t.uniqueStage,location:a?p.y.MainMatches:p.y.RacesTab})]}),(0,i.jsxs)(u.so,{align:"center",justify:"space-between",pl:"56px",pr:["xs","lg"],children:[(0,i.jsx)(z,{stageId:t.id,fallbackRace:o===l.QCR.Cycling?t:void 0}),!a&&(0,i.jsx)(E,{stage:t})]})]})})},D=(0,x.default)(u.so).withConfig({componentId:"sc-a40480ec-0"})({"& > *":{width:"100%"}}),V=e=>{let{uniqueStage:t,selected:s,selectedEventStageId:a,isFirst:r}=e,x=(0,n.useContext)(d.Ws),{isMobile:j}=(0,c.$c)();return(0,i.jsxs)(u.az,{borderTop:r?void 0:"onSurface.nLv4",hoverBg:"surface.s2",bg:s?[void 0,"neutral.highlight"]:void 0,children:[(0,i.jsxs)(u.so,{cursor:"pointer",justify:"space-between",children:[(0,i.jsx)(D,{w:"100%",children:(0,i.jsx)(g.So,{uniqueStage:t,sportSlug:x,children:(0,i.jsxs)(u.so,{p:"md",align:"center",children:[(0,i.jsx)(o.w,{name:t.name,categoryId:t.category.id,size:24}),(0,i.jsx)(u.EY,{lineHeight:"24px",font:"body.large",color:"onSurface.nLv1",ml:"xl",children:(0,i.jsx)(m.c,{entity:t})})]})})}),j&&(0,i.jsxs)(u.so,{py:"sm",px:"md",children:[(0,i.jsx)(u.cG,{vertical:!0,color:"onSurface.nLv4",mr:"md"}),(0,i.jsx)(h.e,{entity:l.bq7.UniqueStages,id:t.id,location:p.y.MainLeagues,type:p.b.UniqueStages})]})]}),!j&&t.featuredStages&&t.featuredStages.map(e=>(0,i.jsx)(k,{stage:e,selected:a===e.id,small:!0},e.id))]})},H=e=>{var t;let{data:s,error:n}=(0,a.Ay)(l.ZXN.uniqueStages(e.categoryId));if(void 0===s&&!n)return(0,i.jsx)(y,{});if(n||!(null==s||null==(t=s.uniqueStages)?void 0:t.length))return null;let r=((e,t)=>{let s=t.reduce((e,t)=>{if(t.uniqueStage){let s=t.uniqueStage.id;e[s]?e[s].push(t):e[s]=[t]}return e},{});return e.forEach(e=>{s[e.id]&&(e.featuredStages=s[e.id])}),e})(s.uniqueStages,e.featuredStages);return(0,i.jsx)(i.Fragment,{children:r.map(t=>(0,i.jsx)(V,{isFirst:e.isFirst,uniqueStage:t,selected:!!e.selectedUniqueStageId&&e.selectedUniqueStageId===t.id,selectedEventStageId:e.selectedEventStageId},t.id))})},I=e=>{let{categories:t,selectedUniqueStageId:s,selectedEventStageId:l,featuredStages:n}=e;return(0,i.jsx)(i.Fragment,{children:t.sort((e,t)=>{let s=(t.priority||0)-(e.priority||0);return 0===s?t.name{var a;return(0,i.jsx)(H,{categoryId:e.id,isFirst:!t,featuredStages:null!=(a=null==n?void 0:n.stages)?a:[],selectedUniqueStageId:s,selectedEventStageId:l},e.id)})})},U=e=>{let{selectedUniqueStageId:t,selectedEventStageId:s}=e,o=(0,n.useContext)(d.Ws),{data:c,error:u}=(0,a.Ay)(l.t3g.categories(o)),{data:x}=(0,a.Ay)(l.dVR.featuredStages(o),{refreshInterval:6e4});return(null==c?void 0:c.categories)&&!u?(0,i.jsx)(r.BU,{children:(0,i.jsxs)(r.Zp,{children:[(0,i.jsx)(r.Zp.Header,{titleId:"tournament.series"}),(0,i.jsx)(I,{categories:c.categories,featuredStages:x,selectedEventStageId:s,selectedUniqueStageId:t}),(0,i.jsx)(r.Zp.Footer,{})]})}):null};var Z=s(62042),F=s(494),Y=s(62389),O=s(95084),R=s(72753),q=s(53594),P=s(33398);let B=e=>{let{id:t,location:s}=e,a=(0,n.useMemo)(()=>(0,q.Uy)(),[]),r=(0,F.d4)(e=>a(e,t)),d=(0,F.d4)(R.fg),o=(0,F.wA)();return(0,i.jsx)(P.A,{disabled:d,isFollowed:r,onClick:()=>{r?(o((0,Y.q$)(l.bq7.UniqueStages,t)),(0,O.g2)({id:t,type:p.b.UniqueStages,location:s,isFollowed:!1})):(o((0,Y.UQ)(l.bq7.UniqueStages,t)),(0,O.g2)({id:t,type:p.b.UniqueStages,location:s,isFollowed:!0}))}})},N=e=>{let{seasons:t,activeSeasonId:s,setActiveSeasonId:n}=e,a=(0,v.o)(),r=t[0].uniqueStage;return r?(0,i.jsx)(j.so,{justify:"space-between",bg:{mdDown:"surface.s1"},children:(0,i.jsxs)(j.so,{w:"100%",px:"lg",py:"sm",justify:"space-between",align:"center",children:[(0,i.jsxs)(j.zt,{gap:{base:"md",md:"lg"},children:[a!==l.QCR.Cycling&&(0,i.jsx)(o.w,{name:r.name,categoryId:r.category.id,size:40}),(0,i.jsxs)(j.BJ,{gap:"xs",pt:{md:"2xs"},children:[(0,i.jsx)(c.EY,{textStyle:"assistive.default",lineHeight:1,children:(0,i.jsx)(m.c,{entity:r})}),(0,i.jsx)(j.az,{className:(0,Z.AH)({"& button":{padding:"0",bg:"[transparent]","&:focus:not(:active)":{boxShadow:"[none]"}}}),children:(0,i.jsx)(u.ms,{items:t,selectedItem:t.find(e=>e.id===s),onSelectedItemChange:e=>n(e.selectedItem.id),renderItem:(e,t)=>e?t?(0,i.jsx)(c.EY,{textStyle:"display.large",children:e.year||e.description}):(0,i.jsx)(i.Fragment,{children:e.year||e.description}):null})})]})]}),(0,i.jsx)(B,{id:r.id,location:p.y.Header})]})}):null};var J=s(56132);let K={};async function W(e,t){try{let s=await (0,l.TtD)(l.dVR.extended(t));if(e===l.QCR.Cycling){let e=s.stage.substages;if(void 0===e)return[];return e.reduce((e,t)=>{var s;return e.concat(null!=(s=t.substages)?s:[])},[])}return s.stage.substages||[]}catch(e){return[]}}var G=s(93640),Q=s(31830),X=s(92673),$=s(81495),ee=s(37455),et=s(80055),es=s(6813),ei=s(92589),el=s(54804),en=s(78151),ea=s(173),er=s(53148),ed=s(5635),eo=s(60376),ec=s(99012),eu=s(20725),ex=s(70941),eh=s(64046),ep=s(8785);let eg=e=>{let{market:t,stage:s}=e,[a,r]=(0,n.useState)("hidden"),{countryOddsProvider:d}=(0,eu.D)(),{ref:o,onSendClickImpression:u}=(0,ec.A)({stageId:s.id,category:en.Df.Season,location:en.ew.CategoryInfo,position:eh.ki.OddsValue,type:eh.jF.Additional,status:l.XUj.InProgress});if((0,n.useEffect)(()=>{if(t.marketId===en.On.ToWinOutrightConstructorChampionship)return void r("hidden");r("few-visible")},[t]),!d)return null;let x=["all-visible","hidden"].includes(a);return(0,i.jsxs)(j.BJ,{mdDown:{p:"sm"},ref:o,children:[(0,i.jsxs)(j.BJ,{gap:"lg",mdDown:{bg:"surface.s1",p:"md",br:"md",elevation:"2"},children:[(0,i.jsx)(c.EY,{textStyle:"display.small",children:(0,i.jsx)(S.A,{id:"motorsport_odds_championship_winner"})}),(0,i.jsx)(j.BJ,{children:(0,ex.JJ)(t.choices,x).map(e=>(0,i.jsxs)(j.so,{align:"center",children:[(0,i.jsx)(j.az,{flex:"[1 1 0px]",children:(0,i.jsx)(eo.i,{choice:e})}),(0,i.jsx)(j.az,{flex:"[1 1 0px]",children:(0,i.jsx)(er.i,{hideChoiceName:!0,choice:{...e,change:(0,ex.zN)(e)},countryOddsProvider:d,betSlipLink:(0,ep.Iz)(e,t,d),isLive:t.isLive,onClick:u})})]},e.team.id))}),"hidden"!==a&&(0,i.jsx)(ed.r,{isOpen:"all-visible"===a,onClick:()=>r(e=>"all-visible"===e?"few-visible":"all-visible")})]}),(0,i.jsx)(ea.z,{provider:d,showTailingRegulation:!0})]})},em=e=>{let{markets:t,stage:s}=e,[a,r]=(0,n.useState)(en.On.ToWinOutrightDriverChampionship),d=t.find(e=>e.marketId===a);return(0,i.jsx)(j.BJ,{gap:"md",md:{p:"md",bg:"surface.s1"},children:(0,i.jsxs)(u.tU,{value:a,onChange:e=>r(e),variant:"secondary",children:[(0,i.jsx)(j.az,{mdDown:{p:"sm",borderBottom:"1px solid",borderColor:"neutrals.nLv4",bg:"surface.s1"},children:(0,i.jsxs)(u.tU.List,{children:[(0,i.jsx)(u.tU.Tab,{tabKey:en.On.ToWinOutrightDriverChampionship,children:(0,i.jsx)(S.A,{id:"drivers"})}),(0,i.jsx)(u.tU.Tab,{tabKey:en.On.ToWinOutrightConstructorChampionship,children:(0,i.jsx)(S.A,{id:"teams"})})]})}),void 0!==d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.az,{mdDown:{px:"sm"},children:(0,i.jsx)(el.E,{stageId:s.id,stageTypeId:l.CEM.Season,location:en.ew.CategoryInfo})}),(0,i.jsx)(u.tU.Panel,{tabKey:en.On.ToWinOutrightDriverChampionship,children:(0,i.jsx)(eg,{market:d,stage:s})}),(0,i.jsx)(u.tU.Panel,{tabKey:en.On.ToWinOutrightConstructorChampionship,children:(0,i.jsx)(eg,{market:d,stage:s})})]}):(0,i.jsx)(es.p,{graphic:"no-data",titleMessageId:"No odds"})]})})},ej=e=>{let{currentSeason:t}=e,{data:s,error:l,isLoading:n}=(0,ei.r)(t.id);return n?(0,i.jsx)(j.az,{h:"[900px]"}):l||!s?(0,i.jsx)(j.az,{md:{bg:"surface.s1"},children:(0,i.jsx)(es.p,{graphic:"no-data",titleMessageId:"No odds"})}):(0,i.jsx)(em,{markets:s,stage:t})};var ev=s(14676);let ef=e=>{let{stages:t}=e,{selectedEventStageId:s}=(0,G.F)(),l=(0,v.o)();return(0,i.jsx)(j.so,{direction:"column",mdDown:{p:"sm",gap:"sm"},children:t.map((e,n)=>(0,i.jsx)(ev._,{stage:e,sport:l,isSelected:s===e.id,isLast:n===t.length-1},e.id))})},ey=e=>{let{activeSeasonId:t,setActiveStage:s}=e,{selectedEventStageId:r}=(0,G.F)(),{stages:d,loading:o,error:c}=(e=>{let t=(0,v.o)(),{data:s,error:i,isLoading:n}=(0,a.Ay)(["STAGE_SPORT_EXTENDED_SUBSTAGES",l.dVR.extended(e)],()=>W(t,e));return{stages:s||[],error:i,loading:n}})(t);return((0,n.useEffect)(()=>{s(d.find(e=>e.id===r)||null)},[d,r]),c||o)?(0,i.jsx)(j.az,{h:"[900px]"}):(0,i.jsx)(ef,{stages:d})},eL=e=>{let{activeSeasonId:t,activeTab:s,setActiveTab:a,seasons:r}=e,d=(0,v.o)(),o=(0,Q.A)(),{shouldShowOddsTab:c,setActiveStage:x}=(()=>{let[e,t]=(0,n.useState)(null),s=(0,F.d4)(ee.BF),i=(0,F.d4)((0,ee.ce)(e));return{shouldShowOddsTab:!s&&i,setActiveStage:t}})(),h=r[0],p=h.uniqueStage,g=c&&(null==p?void 0:p.id)===$.h.F1;return p?(0,i.jsxs)(u.tU,{variant:"primary",fullWidthTabs:!0,value:s,onChange:a,children:[(0,i.jsx)(j.az,{color:"onColor.primary",bg:"surface.s1",children:(0,i.jsxs)(u.tU.List,{underline:!0,children:[(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Races,children:(0,i.jsx)(S.A,{id:"races"})}),d!==l.QCR.Cycling&&(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Rankings,children:(0,i.jsx)(S.A,{id:"app.standings"})}),g&&(0,i.jsx)(u.tU.Tab,{tabKey:J.x.Odds,children:(0,i.jsx)(S.A,{id:"odds"})})]})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Races,children:(0,i.jsx)(ey,{activeSeasonId:t,setActiveStage:e=>x(e)})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Rankings,children:(0,i.jsx)(j.az,{bg:"surface.s1",children:(0,i.jsx)(X.n,{stageId:t,uniqueStageName:(0,et.s)(p,o)})})}),(0,i.jsx)(u.tU.Panel,{tabKey:J.x.Odds,children:(0,i.jsx)(ej,{currentSeason:h})})]}):null},eb=()=>{let{seasons:e,error:t,loading:s}=(()=>{let{selectedUniqueStageId:e}=(0,G.F)(),{data:t,error:s,isLoading:i}=(0,a.Ay)(l.qLD.seasons(e));return{seasons:(null==t?void 0:t.seasons)||[],error:s,loading:i}})(),{activeTab:o,setActiveTab:c,activeSeasonId:u,setActiveSeasonId:x}=(()=>{let{selectedSeasonId:e}=(0,G.F)(),[t,s]=(0,n.useState)(e),[i,r]=(0,n.useState)(J.x.Races),[o,c]=function(e){let t=(0,n.useContext)(d.Ws)===l.QCR.Cycling,{data:s}=(0,a.Ay)(l.dVR.substages(e)),{data:i}=(0,a.Ay)(t&&s?s.stages.map(e=>l.dVR.substages(e.id)):null,{fetcher:async e=>(await Promise.allSettled(e.map(l.TtD))).map(e=>"fulfilled"===e.status?e.value:null).filter(Boolean)}),r=null==i?void 0:i.map((e,t)=>(e.stages.forEach(e=>{if(e.stageParent&&(null==s?void 0:s.stages[t].stageParent)){var i;K[e.stageParent.id]=null==s||null==(i=s.stages[t].stageParent)?void 0:i.id}}),e.stages)).flat().sort((e,t)=>e.startDateTimestamp&&t.startDateTimestamp?e.startDateTimestamp-t.startDateTimestamp:0);return t?[r,K]:[null==s?void 0:s.stages,K]}(t);return{activeSeasonId:t,setActiveSeasonId:s,activeTab:i,setActiveTab:r,races:o,stageMapping:c}})();return s?(0,i.jsx)(j.az,{h:"[900px]"}):t?null:(0,i.jsxs)(r.Zp,{variant:"desktop-only",children:[(0,i.jsx)(N,{seasons:e,activeSeasonId:u,setActiveSeasonId:x}),(0,i.jsx)(eL,{activeTab:o,setActiveTab:c,seasons:e,activeSeasonId:u})]})}},62304:(e,t,s)=>{s.d(t,{Q:()=>a});var i=s(6029),l=s(8329),n=s(41735);let a=e=>{var t,s;let{stage:a,size:r=24,national:d,categoryId:o}=e,c=(0,n.useTheme)();return(null==(t=a.info)?void 0:t.discipline)==="World Tour 1 Grand Tour"?(0,i.jsx)("img",{width:r,height:r,src:"/static/images/cycling/".concat(a.slug,"-").concat(c.name,".png"),alt:a.name,style:{objectFit:"contain"}}):(0,i.jsx)(l.w,{alpha2:null==(s=a.country)?void 0:s.alpha2,categoryId:o,size:r,national:d,fallback:(0,i.jsx)(l.w,{categoryId:1506,size:r})})}},63464:(e,t,s)=>{s.d(t,{C:()=>d,T:()=>r});var i=s(6029),l=s(21377),n=s(90248),a=s(97340);let r=e=>{var t;let{market:s,stage:l}=e,a=(null==(t=l.uniqueStage)?void 0:t.slug)==="cycling-women"?"F":"M";switch(s.marketName){case"To Win Outright":return(0,i.jsx)(n.A,{id:"cycling_odds_race_winner",values:{gender:a}});case"Race Winner":case"To Win Stage":return(0,i.jsx)(n.A,{id:"cycling_odds_stage_winner",values:{gender:a,n:l.sequence}});default:return null}},d=e=>{var t;return(null==(t=e.stage.uniqueStage)?void 0:t.category.sport.slug)===l.QCR.Cycling?(0,i.jsx)(r,{...e}):(0,i.jsx)(a.f,{id:e.market.marketName})}},78148:(e,t,s)=>{s.d(t,{K:()=>r});var i=s(21377),l=s(4967),n=s(45860),a=s(78151);let r=e=>{let{data:t,isLoading:s,error:r}=(0,n.Ay)(i.dVR.featuredOdds(e,a.z4),{refreshInterval:15*l.Z2});return{data:null==t?void 0:t.featured,error:r,isLoading:s}}},78551:(e,t,s)=>{s.d(t,{p:()=>u});var i=s(6029),l=s(8329),n=s(28349),a=s(76356),r=s(12927),d=s(23405);let o={Disqualified:"DSQ"},c=e=>{var t,s,d,o;let{row:c,isDisabled:u}=e,x="Peloton"===c.team.name;return x?(0,i.jsxs)(a.BJ,{gap:"2xs",flexGrow:1,children:[(0,i.jsxs)(a.zt,{gap:"sm",children:[(0,i.jsx)(n.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"table.medium",children:c.team.name}),!x&&(0,i.jsx)(l.w,{alpha2:(null==(d=c.team.country)?void 0:d.alpha2)||"international",size:12})]}),(0,i.jsx)(n.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:null==(o=c.parentTeam)?void 0:o.name})]}):(0,i.jsx)(r.A,{team:c.team,style:{flexGrow:1},children:(0,i.jsxs)(a.BJ,{gap:"2xs",flexGrow:1,children:[(0,i.jsxs)(a.zt,{gap:"sm",children:[(0,i.jsx)(n.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"table.medium",children:c.team.name}),(0,i.jsx)(l.w,{alpha2:(null==(t=c.team.country)?void 0:t.alpha2)||"international",size:12})]}),(0,i.jsx)(n.EY,{textStyle:"assistive.micro",color:"neutrals.nLv3",children:null==(s=c.parentTeam)?void 0:s.name})]})})},u=e=>{let{row:t,statsValue:s,positionKey:l="position",isLast:r}=e,u=!!t.comment;return(0,i.jsx)(a.VJ,{inline:"sm",children:(0,i.jsxs)(a.zt,{gap:"lg",p:"sm",h:"4xl",borderBottom:"1px solid",borderBottomColor:r?"[transparent]":"neutrals.nLv4",children:[(0,i.jsx)(n.EY,{color:u?"neutrals.nLv3":"neutrals.nLv1",textStyle:"body.medium",textAlign:"center",w:"xl",children:u?"-":t[l]||"-"}),(0,i.jsx)(c,{row:t,isDisabled:u}),t.shirt&&(0,i.jsx)(d.d,{shirt:t.shirt}),u?(0,i.jsx)(n.EY,{color:"neutrals.nLv3",textAlign:"center",w:"4xl",textStyle:"table.medium",children:o[t.comment]||t.comment}):(0,i.jsx)(i.Fragment,{children:s||(0,i.jsxs)(a.zt,{children:[(0,i.jsx)(n.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:t.time||"-"}),(0,i.jsx)(n.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:t.gap||"-"})]})})]})})}},92589:(e,t,s)=>{s.d(t,{r:()=>r});var i=s(21377),l=s(4967),n=s(45860),a=s(78151);let r=e=>{let{data:t,isLoading:s,error:r}=(0,n.Ay)(i.dVR.allOdds(e,a.z4),{refreshInterval:15*l.Z2});return{data:null==t?void 0:t.markets,error:r,isLoading:s}}},92673:(e,t,s)=>{s.d(t,{n:()=>q});var i=s(6029),l=s(32523),n=s(21377),a=s(21501),r=s(99064),d=s(90248),o=s(45860),c=s(6813),u=s(70344),x=s(51755),h=s(4967),p=s(28349),g=s(76356),m=s(55729),j=s(90510),v=s(46222),f=s(18970),y=s(52466);function L(e){let{children:t,closedHeight:s=64,...l}=e,[n,a]=(0,m.useState)(!1),[r,o]=(0,m.useState)(0),c=(0,m.useCallback)(()=>a(e=>!e),[]),{mediaBreakpoint:u}=(0,p.$c)(),x=(0,m.useRef)(null);(0,m.useEffect)(()=>{var e;o((null==x||null==(e=x.current)?void 0:e.scrollHeight)||0)},[x,t,u]);let h=r>s;return(0,i.jsxs)(g.az,{...l,children:[(0,i.jsx)(p.EY,{textStyle:"body.small",color:"neutrals.nLv1",lineClamp:!n&&h?4:void 0,ref:x,display:"block",children:t}),h&&(0,i.jsx)(g.az,{cursor:"pointer",onClick:c,mt:"sm",children:(0,i.jsxs)(p.EY,{textStyle:{base:"assistive.default",md:"display.small"},color:"action.primary.default",textAlign:"end",display:"block",children:[(0,i.jsx)(d.A,{id:n?"show_less":"show_more"}),n?(0,i.jsx)(y.t8v,{ml:"xs",fill:"action.primary.default"}):(0,i.jsx)(y.QtO,{ml:"xs",fill:"action.primary.default"})]})})]})}var b=s(64183);let S=JSON.parse('{"3":{"gap":"gap"},"4":{"gap":"gap"},"5":{"gap":"gap"},"victories":"wins","points":"Pts","sprint":"Pts","climb":"Pts","youngRider":"young_rider","gap":"time","lapTime":"bestLap","totalTime":"time","Finished":"stage_result_finished","Accident":"stage_result_accident","Fuelpump":"stage_result_fuelpump","Reargear":"stage_result_reargear","Electrical":"stage_result_electrical","Transmission":"stage_result_transmission","Garage":"stage_result_garage","Clutch":"stage_result_clutch","Brakes":"stage_result_brakes","Engine":"stage_result_engine","Suspension":"stage_result_suspension","Tooslow":"stage_result_too_slow"}');var w=s(91113);let C=e=>{let{id:t,selectedStageTypeId:s,children:l}=e,n=(0,w.O)(S,t,"".concat(s));return(0,i.jsx)(d.A,{id:n,children:e=>"function"==typeof l?l(e):(0,i.jsx)(i.Fragment,{children:e})})};var T=s(18858),M=function(e){return e.Time="time",e.Young="young",e.Sprint="sprint",e.Climb="climb",e}({});let _=(e,t)=>{let s=((e,t)=>{if(t===n.CEM.Season)return{victories:!1,polePositions:!1,podiums:!1,points:!0};if(!e)return{};let{gridPosition:s,pitStops:i,laps:l,gap:a,lapTime:r,lapsLed:d,status:o,totalTime:c}=e,u={};return s&&(u.gridPosition=!0),i&&l&&void 0!==a?u={...u,pitStops:!0,laps:!0,points:!1,gap:!0}:l&&r&&void 0!==a?u={...u,laps:!0,lapTime:!0,points:!1,gap:!0}:l&&d&&o?u={...u,laps:!0,lapsLed:!0,points:!1,status:!0}:l&&void 0!==a&&c?u=u.gridPosition?{...u,laps:!0,points:!1,gap:!0}:{...u,laps:!0,gap:!0,points:!1,totalTime:!0}:l&&r?u={...u,laps:!0,points:!1,lapTime:!0}:l&&void 0!==a?u={...u,laps:!0,points:!1,gap:!0}:l?u={...u,points:!1,laps:!0}:void 0!==a&&(u={...u,points:!1,gap:!0}),u})(e[0],t);return e.reduce((e,t)=>(t.updatedAtTimestamp>e.updatedAtTimestamp&&(e.updatedAtTimestamp=t.updatedAtTimestamp),t.isLive&&(e.isLive=!0),Object.keys(s).forEach(s=>{t[s]&&(e.columns[s]=!0)}),e),{columns:{...s},isLive:!1,updatedAtTimestamp:0})};var A=s(32033),z=s(25747),E=s(78551),k=s(23405);let D={[M.Young]:"youngRider",[M.Sprint]:"sprint",[M.Climb]:"climb"},V={[M.Young]:"youngRiderPosition",[M.Sprint]:"sprintPosition",[M.Climb]:"climbPosition"},H=e=>{let{results:t,stageTypeId:s,outrightTeamType:l,uniqueStageName:a,info:o}=e,{stage:c}=(0,A.a)(),u=l===n.SNJ.Team,{isDesktop:v}=(0,p.$c)(),f=(0,T.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),y=v?b.Rl+b.pB:f,{updatedAtTimestamp:S}=_(t,s),[w,H]=(0,m.useState)(M.Time),I={[w===M.Young?"time":w]:!0},U=Object.keys(I).filter(e=>!!I[e]),Z=t.some(e=>void 0!==e.youngRiderPosition||void 0!==e.youngRider),F=t.some(e=>void 0!==e.sprintPosition||void 0!==e.sprint),Y=t.some(e=>void 0!==e.climbPosition||void 0!==e.climb),O=Z||F||Y,R=t.filter(e=>w===M.Time||!!e.position&&e[V[w]]).sort((e,t)=>e[V[w]]&&t[V[w]]?e[V[w]]-t[V[w]]:0);return(0,i.jsxs)(g.az,{bg:"surface.s1",children:[O&&(0,i.jsx)(g.az,{borderTop:s===n.CEM.Season?void 0:[void 0,"onSurface.nLv4"],borderBottom:["onSurface.nLv4",void 0],px:"md",py:"sm",children:(0,i.jsxs)(g.BJ,{gap:"md",children:[(0,i.jsx)(z.M,{isFeaturedOdds:!0,stage:c}),(0,i.jsx)(g.az,{children:(0,i.jsxs)(r.tU,{value:w,variant:"tertiary",onChange:e=>{H(e)},children:[(0,i.jsx)(r.tU.Tab,{tabKey:M.Time,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"general"}),(0,i.jsx)(d.A,{id:"general_classification_short"})]})}),F&&(0,i.jsx)(r.tU.Tab,{tabKey:M.Sprint,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"sprint"}),(0,i.jsx)(d.A,{id:"cycling_sprint_standings"})]})}),Z&&(0,i.jsx)(r.tU.Tab,{tabKey:M.Young,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"young"}),(0,i.jsx)(d.A,{id:"cycling_young_standings"})]})}),Y&&(0,i.jsx)(r.tU.Tab,{tabKey:M.Climb,children:(0,i.jsxs)(g.zt,{h:"[14px]",gap:"xs",children:[(0,i.jsx)(k.d,{shirt:"climb"}),(0,i.jsx)(d.A,{id:"cycling_climb_standings"})]})})]})})]})}),(0,i.jsx)(r.PI,{top:y,isStickingDisabled:v,children:e=>{var t;return(0,i.jsxs)(g.so,{px:"sm",h:"4xl",align:"center",bg:"surface.s1",elevation:e?"2":void 0,children:[(0,i.jsx)(g.so,{h:"lg",me:"sm",align:"center",children:(0,i.jsx)(p.EY,{w:"2xl",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",display:"block",children:(0,i.jsx)(d.A,{id:"position.short"})})}),(0,i.jsx)(g.so,{h:"lg",grow:1,me:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,i.jsx)(d.A,{id:u?"team":(0,x.Jx)(a),values:{gender:(null==(t=R[0].team)?void 0:t.gender)||n.YT8.Male}})})}),U.map(e=>(0,i.jsx)(p.EY,{w:"[80px]",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",children:(0,i.jsx)(C,{id:e},e)},e))]})}}),(0,i.jsx)(g.az,{px:"sm",pb:"lg",children:R.map((e,t)=>(0,i.jsx)(E.p,{row:e,statsValue:(0,i.jsx)(g.zt,{pe:"lg",children:(0,i.jsx)(p.EY,{textAlign:"center",w:"4xl",textStyle:"table.medium",children:"time"===w?e.totalTime||e.time||e.gap:e[D[w]]})}),isLast:t===R.length-1,positionKey:V[w]},e.id))}),(0,i.jsx)(p.EY,{display:"block",textStyle:"body.small",p:"lg",pb:"sm",textAlign:"end",children:(0,i.jsx)(d.A,{id:"basic.lastUpdated",values:{dateTime:(0,i.jsx)(j.XU,{value:1e3*S,...h.or.dateTime})}})}),(null==o?void 0:o.note)&&(0,i.jsx)(L,{p:"lg",pt:"sm",children:o.note})]})};var I=s(12927);let U=e=>{var t;let{fastestLapData:s,outrightTeamType:l}=e;return(0,i.jsx)(r.az,{p:"sm",children:(0,i.jsxs)(r.so,{br:"lg",bg:"surface.s2",p:"md",align:"center",children:[(0,i.jsx)(y._Ll,{mr:"md",fill:"#A32090"}),(0,i.jsxs)(r.az,{grow:1,children:[(0,i.jsx)(I.A,{team:s.team,outrightType:l,children:(0,i.jsx)(r.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",hover:!0,children:s.team.name})}),(0,i.jsx)(r.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(null==(t=s.parentTeam)?void 0:t.name)||""})]}),s.time&&(0,i.jsxs)(r.az,{children:[(0,i.jsx)(r.EY,{font:"table.medium",color:"onSurface.nLv1",as:"div",children:s.time}),(0,i.jsx)(r.EY,{font:"assistive.micro",color:"onSurface.nLv3",as:"div",children:(0,i.jsx)(d.A,{id:"fastestLap.label"})})]})]})})};var Z=s(49519);let F=(e,t)=>{let s=28;return["gap","totalTime","lapTime","status","time"].includes(e)?s=80:"points"===e&&t&&(s=40),s},Y=e=>{var t,s,l,n;let{stageResults:a,columns:d,showImage:o,positionKey:c="position",isTeam:u,outrightType:x,showTeamColor:h,isHighlighted:p,isFirst:g,hasLongPoints:m}=e,j=u?a.team.teamColors.primary:null==(s=a.parentTeam)||null==(t=s.teamColors)?void 0:t.primary,v=!!a.status&&"Finished"!==a.status,f=!a.position||v,L=0;a.position&&(L=a.gridPosition?a.gridPosition-a.position:a.previousPosition?a.previousPosition-a.position:0);let b=Object.keys(d).filter(e=>d[e]),S=b.reduce((e,t)=>e+F(t,m),0);return(0,i.jsx)(I.A,{team:a.team,outrightType:x,children:(0,i.jsxs)(r.so,{h:48,align:"center",justify:"space-between",bg:p?"neutral.highlight":void 0,hoverBg:"surface.s2",cursor:"pointer",borderTop:g?void 0:"1px solid onSurface.nLv4",children:[h&&(0,i.jsx)(r.az,{bg:f?"neutral.default":j,minW:4,w:4,h:36,br:"0 2px 2px 0"}),(0,i.jsxs)(r.so,{h:32,direction:"column",align:"center",pl:"sm",pr:"lg",children:[(0,i.jsx)(y.kKd,{fill:L>0?"success.default":"transparent"}),(0,i.jsx)(r.EY,{w:16,font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",align:"center",as:"div",children:a[c]||"-"}),(0,i.jsx)(y.kKd,{fill:L<0?"error.default":"transparent",style:{transform:"rotate(180deg)"}})]}),o&&(0,i.jsx)(r.az,{pr:"md",children:(0,i.jsx)(Z.p,{id:a.team.id,name:a.team.name,size:32})}),(0,i.jsxs)(r.so,{direction:"column",overflow:"hidden",flex:"1 1 auto",justify:"flex-start",children:[u&&(0,i.jsx)(r.EY,{as:"bdi",font:"table.medium",color:"onSurface.nLv1",lineClamp:1,children:a.team.name}),!u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.so,{align:"center",mb:"xxs",children:[(0,i.jsx)(r.EY,{as:"bdi",font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",mr:"xs",lineClamp:1,children:a.team.name}),(0,i.jsx)(Z.w,{alpha2:null==(l=a.team.country)?void 0:l.alpha2,national:!0,size:12,d:"inline-block"})]}),(null==a||null==(n=a.parentTeam)?void 0:n.name)&&(0,i.jsx)(r.EY,{as:"bdi",font:"assistive.micro",color:"onSurface.nLv3",lineClamp:1,ellipsis:!0,children:a.parentTeam.name})]})]}),(0,i.jsx)(r.so,{mr:"md",grow:1,maxW:S,justify:"space-between",children:b.map(e=>{let t=a[e]||(["gap","time"].includes(e)?"":0);return"status"===e&&(t=(0,i.jsx)(C,{id:t})),(0,i.jsx)(r.EY,{font:"table.medium",color:f?"onSurface.nLv3":"onSurface.nLv1",w:F(e,m),align:"right",children:t},e)})})]})})},O=e=>{let{results:t,fastestLapData:s,stageTypeId:l,outrightTeamType:a,uniqueStageName:o,highlightedTeamId:c,selectedStageType:u,info:m}=e,v=a===n.SNJ.Team,{columns:f,updatedAtTimestamp:y}=_(t,l),{isDesktop:S}=(0,p.$c)(),w=(0,T.Ay)({isInMobileTabs:!1,isSportMenuVisible:!0}),M=S?b.Rl+b.pB:w,A="Formula 1"===o,z=Object.keys(f).filter(e=>!!f[e]),E=t.some(e=>e.points&&e.points.toString().length>2);return(0,i.jsxs)(g.az,{pb:"sm",children:[(0,i.jsx)(p.EY,{display:"block",textStyle:"body.small",p:"sm",textAlign:"end",children:(0,i.jsx)(d.A,{id:"basic.lastUpdated",values:{dateTime:(0,i.jsx)(j.XU,{value:1e3*y,...h.or.dateTime})}})}),"Formula 1"===o&&s&&(0,i.jsx)(U,{fastestLapData:s,outrightTeamType:n.SNJ.Competitor}),(0,i.jsx)(r.PI,{top:M,isStickingDisabled:S,children:e=>(0,i.jsx)(g.az,{elevation:e?"2":void 0,bg:"surface.s1",children:(0,i.jsxs)(g.so,{h:"4xl",align:"center",pl:A?"xs":void 0,pr:"sm",children:[(0,i.jsx)(g.so,{h:"lg",mr:"sm",align:"center",children:(0,i.jsx)(p.EY,{w:"2xl",textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",display:"block",children:(0,i.jsx)(d.A,{id:"position.short"})})}),(0,i.jsx)(g.so,{h:"lg",grow:1,mr:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,i.jsx)(d.A,{id:v?"team":(0,x.Jx)(o)})})}),z.map((e,t)=>(0,i.jsx)(g.so,{h:"lg",borderStart:t?"neutrals.nLv4":void 0,px:"sm",align:"center",children:(0,i.jsx)(p.EY,{textStyle:"table.medium",color:"neutrals.nLv3",textAlign:"center",children:(0,i.jsx)(C,{id:e,selectedStageTypeId:null==u?void 0:u.id},e)})},e))]})})}),t.map((e,t)=>(0,i.jsx)(Y,{stageResults:e,columns:f,showImage:l!==n.CEM.Event,showTeamColor:A,isTeam:v,outrightType:a,isHighlighted:e.team.id===c,isFirst:0===t,hasLongPoints:E},e.team.id)),(null==m?void 0:m.note)&&(0,i.jsx)(L,{p:"lg",pt:"sm",children:m.note})]})},R=e=>{let{stageId:t,stageTypeId:s,outrightTeamType:l,uniqueStageName:a,selectedStageType:r,info:d}=e,{data:u,error:x}=(0,o.Ay)(n.dVR.standings(t,l),{refreshInterval:15e3}),h=(0,m.useContext)(f.Ws),p=(0,m.useMemo)(()=>{let e=null==u?void 0:u.standings.find(e=>!!e.fastestLapTime);return e?{team:e.team,parentTeam:e.parentTeam,time:e.fastestLapTime}:void 0},[u]);return x?(0,i.jsx)(v.Zp,{variant:"mobile-only",children:(0,i.jsx)(c.p,{graphic:"no-standings",descriptionMessageId:"stats.noResults"})}):u?h===n.QCR.Cycling?(0,i.jsx)(H,{results:u.standings,stageTypeId:s,outrightTeamType:l,fastestLapData:p,uniqueStageName:a,info:d}):(0,i.jsx)(v.Zp,{variant:"mobile-only",children:(0,i.jsx)(O,{results:u.standings,stageTypeId:s,outrightTeamType:l,fastestLapData:p,uniqueStageName:a,selectedStageType:r,info:d})}):(0,i.jsx)(g.az,{p:"sm",h:"[1100px]",bg:"surface.s2"})};function q(e){let{stageId:t,uniqueStageName:s}=e,{data:h,error:p}=(0,o.Ay)([n.dVR.standings(t,n.SNJ.Competitor),"HEAD"],{fetcher:u.n}),{data:g}=(0,o.Ay)([n.dVR.standings(t,n.SNJ.Team),"HEAD"],{fetcher:u.n});return(0,a.hX)()||void 0===h&&!p?(0,i.jsx)(l.E,{uniqueKey:"unique-stage-container-cl",height:1179,py:"sm",animate:!0}):void 0===h||void 0===g?null:h&&g?(0,i.jsxs)(r.tU,{variant:"secondary",initialValue:1,children:[(0,i.jsxs)(r.so,{bg:"surface.s1",p:"sm",borderBottom:"onSurface.nLv4",children:[(0,i.jsx)(r.tU.Tab,{tabKey:1,children:(0,i.jsx)(d.A,{id:(0,x.Jx)(s)})}),(0,i.jsx)(r.tU.Tab,{tabKey:2,children:(0,i.jsx)(d.A,{id:"teams"})})]}),(0,i.jsx)(r.tU.Panel,{tabKey:1,children:(0,i.jsx)(R,{stageId:t,stageTypeId:n.CEM.Season,uniqueStageName:s,outrightTeamType:n.SNJ.Competitor})}),(0,i.jsx)(r.tU.Panel,{tabKey:2,children:(0,i.jsx)(R,{stageId:t,stageTypeId:n.CEM.Season,uniqueStageName:s,outrightTeamType:n.SNJ.Team})})]}):h?(0,i.jsx)(R,{stageId:t,stageTypeId:n.CEM.Season,uniqueStageName:s,outrightTeamType:n.SNJ.Competitor}):(0,i.jsx)(c.p,{graphic:"race-start",descriptionMessageId:"stats.noResults"})}},93640:(e,t,s)=>{s.d(t,{F:()=>r,X:()=>a});var i=s(6029),l=s(55729);let n=(0,l.createContext)(void 0),a=e=>{let{children:t,...s}=e;return(0,i.jsx)(n.Provider,{value:{...s},children:t})},r=()=>{let e=(0,l.useContext)(n);if(!e)throw Error();return e}}}]);