!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]="6ae57d29-ae0e-428a-b53a-5c3c118ef53b",e._sentryDebugIdIdentifier="sentry-dbid-6ae57d29-ae0e-428a-b53a-5c3c118ef53b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5247],{8385:(e,t,s)=>{s.d(t,{Oz:()=>i,ai:()=>l,fK:()=>o,mn:()=>a});var n=s(21377),r=s(71046),l=function(e){return e[e.Home=1]="Home",e[e.Away=2]="Away",e}({});function i(e,t){return e.scoring===t?"onSurface.nLv1":"onSurface.nLv3"}function a(e,t){let s,n;return void 0===e.score.scoring&&t===e.points.length-1?{homeColor:"sofaSingles.live",awayColor:"sofaSingles.live"}:(1===e.score.throwing?(s=t%2==0?"onSurface.nLv1":"onSurface.nLv3",n=t%2!=0?"onSurface.nLv1":"onSurface.nLv3"):(s=t%2!=0?"onSurface.nLv1":"onSurface.nLv3",n=t%2==0?"onSurface.nLv1":"onSurface.nLv3"),{homeColor:s,awayColor:n})}let o=e=>(0,r.c5)(e)===n.QCR.Darts?n.bnp.pointByPoint(e.id):null},19240:(e,t,s)=>{s.d(t,{e:()=>a});var n=s(6029),r=s(33144),l=s(76356),i=s(68379);let a=e=>{var t;let{team:s,isRight:a,seeding:o,hasFlag:d=!0}=e;return null==s||!s.country||s.national?(0,n.jsx)(r.p,{size:48,id:s.id,name:s.name}):(0,n.jsxs)(l.az,{position:"relative",children:[d?(0,n.jsx)(r.p,{hasFlag:!0,id:s.id,name:s.name,size:40,alpha2:null==(t=s.country)?void 0:t.alpha2,right:a}):(0,n.jsx)(r.p,{id:s.id,name:s.name,size:20}),o&&(0,n.jsx)(i.J,{seed:o,left:a?"0":void 0,right:a?void 0:"0",h:"md",minW:"lg",textStyle:"assistive.micro",bottom:"2xs"})]})}},58918:(e,t,s)=>{s.d(t,{K:()=>o});var n=s(6029),r=s(33144),l=s(76356),i=s(70591),a=s(68379);let o=e=>{var t,s;let{sport:o,teams:d,seeding:c,size:u,hideFlags:x,ignoreLink:m}=e;return(0,n.jsxs)(l.so,{children:[(0,n.jsx)(i.gT,{sport:o,team:d[0],ignoreLink:m,children:(0,n.jsx)(r.p,{hasFlag:!0,id:d[0].id,name:d[0].name,size:u||40,alpha2:x||null==(t=d[0].country)?void 0:t.alpha2,boxProps:{mr:-8}})}),(0,n.jsx)(i.gT,{sport:o,team:d[1],ignoreLink:m,children:(0,n.jsx)(r.p,{hasFlag:!0,id:d[1].id,name:d[1].name,size:u||40,alpha2:x||null==(s=d[1].country)?void 0:s.alpha2,right:!0})}),(0,n.jsx)(a.J,{seed:c,transform:"translateX(100%)"})]})}},68379:(e,t,s)=>{s.d(t,{J:()=>o});var n=s(6029),r=s(95083),l=s(76356),i=s(93338),a=s(55365);let o=e=>{let{seed:t,colorless:s,position:o="absolute",left:d,right:c,bottom:u="0",h:x="lg",minW:m="xl",textStyle:g="assistive.default",...h}=e;return t?(0,n.jsx)(l.ov,{display:"inline-flex",position:o,bottom:u,left:d,right:c,br:"sm",style:s?void 0:{background:i.S.var((0,a.mq)(t))},h:x,minW:m,zIndex:"button",...h,children:(0,n.jsx)(r.EY,{textStyle:g,color:s?"neutrals.nLv1":"surface.s1",lineHeight:1,children:t})}):null}},95247:(e,t,s)=>{s.d(t,{g:()=>eR});var n=s(6029),r=s(21377),l=s(55729),i=s(62859),a=s(76356),o=s(98559),d=s(19168),c=s(95083),u=s(90248);let x=()=>{let{event:e,leftScore:t,rightScore:s}=(0,l.useContext)(i.y$),a=e.status.type===r.XUj.InProgress;return(0,n.jsxs)(c.EY,{textStyle:"assistive.default",color:a?"status.live":"neutrals.nLv3",children:[(0,n.jsx)(u.A,{id:"event.aggregated.short"}),": ",t.aggregated," - "," ",s.aggregated]})};var m=s(21501),g=s(73022);function h(e){let{event:t}=e;return(0,m.hX)()?null:(0,n.jsx)(g.iV,{referenceTime:t.startTimestamp,modifier:-1,children:e=>{let{timeParts:t,delta:s,formattedTime:r}=e,[l]=t;return s<0||l>=1?null:(0,n.jsx)(c.EY,{mt:"sm",textAlign:"center",textStyle:"display.small",color:"neutrals.nLv3",display:"block",children:r})}})}var j=s(93338),p=s(54409);let v={[r.sAb.Distance]:"mma_position_stance",[r.sAb.Ground]:"ground_mma",[r.sAb.GroundGrappleRed]:"ground_grapple_red_mma",[r.sAb.GroundGrappleBlue]:"ground_grapple_blue_mma",[r.sAb.GrappleRed]:"mma_position_clinch_by_red",[r.sAb.GrappleBlue]:"mma_position_clinch_by_blue",[r.sAb.Pause]:"pause"};function f(e){let{fightState:t}=e;return v[t]?(0,n.jsx)(u.A,{id:v[t]}):null}let y=e=>[r.sAb.GroundGrappleBlue,r.sAb.Distance,r.sAb.Ground,r.sAb.GrappleBlue].includes(e),b=e=>[r.sAb.GroundGrappleRed,r.sAb.Distance,r.sAb.Ground,r.sAb.GrappleRed].includes(e),S=e=>{let{fightState:t}=e,s=b(t),l=y(t);return(0,n.jsxs)(a.ov,{w:"100%",h:"8xl",px:"sm",flexDirection:"column",children:[(0,n.jsx)(c.EY,{color:"neutrals.nLv1",h:"lg",textStyle:"display.medium",mb:"md",mt:"sm",children:(0,n.jsx)(u.A,{id:"current_position_mma"})}),(0,n.jsxs)(a.so,{h:"2xl",w:"100%",p:"sm",backgroundColor:"surface.s2",br:"md",align:"center",justify:"space-between",children:[(0,n.jsx)(p.p0t,{fill:s?"mmaSpecific.red.default":"onSurface.nLv3"}),(0,n.jsx)(c.EY,{style:{color:j.S.var(function(e,t,s){return e===r.sAb.Pause?"colors.neutrals.nLv3":t&&!s?"colors.mma.red.primary":s&&!t?"colors.mma.blue.primary":"colors.neutrals.nLv1"}(t,s,l))},textStyle:"body.medium",children:(0,n.jsx)(f,{fightState:t})}),(0,n.jsx)(p.p0t,{fill:l?"mmaSpecific.blue.default":"onSurface.nLv3",style:{transform:"scaleX(-1)"}})]})]})};var w=s(41249),L=s(8703),T=s(65078),C=s(87763);let _=e=>{let{isWinner:t}=e;return(0,n.jsx)(w.EY,{font:"display.extraLarge",c:t?"onSurface.nLv1":"onSurface.nLv3",block:!0,children:(0,n.jsx)(u.A,{id:t?"standings.label.wins":"standings.label.losses"})})},A=e=>{let{event:t}=e;return t.fightState===r.sAb.Pause?(0,n.jsx)(u.A,{id:"stoppage_mma"}):t.status.type===r.XUj.InProgress?(0,n.jsx)(u.A,{id:"in_progress_mma"}):(0,n.jsx)(C.fP,{id:(0,d.B_)(t)})},E=e=>{let{winnerCode:t,event:s}=e,l=(0,L.Mh)(s);return t===r.Jfo.NoContest||t===r.Jfo.Draw?(0,n.jsxs)(w.az,{children:[(0,n.jsx)(w.EY,{font:"display.extraLarge",c:"onSurface.nLv1",as:"div",align:"center",children:(0,n.jsx)(u.A,{id:t===r.Jfo.Draw?"draw":"no_contest_mma"})}),(0,n.jsx)(w.EY,{c:"onSurface.nLv3",as:"div",align:"center",children:s.finalRound?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{id:"status_round",values:{round:s.finalRound}})," ",l&&(0,n.jsxs)(n.Fragment,{children:["(",l,")"]})]}):(0,n.jsx)(n.Fragment,{children:"-"})})]}):t===r.Jfo.Left||t===r.Jfo.Right?(0,n.jsxs)(w.az,{children:[(0,n.jsxs)(w.so,{justify:"center",children:[(0,n.jsx)(_,{isWinner:t===r.Jfo.Left}),(0,n.jsx)(w.EY,{as:"div",font:"display.extraLarge",c:"onSurface.nLv3",w:24,h:24,align:"center",children:"-"}),(0,n.jsx)(_,{isWinner:t===r.Jfo.Right})]}),(0,n.jsx)(w.so,{justify:"center",align:"center",h:"lg",children:(0,n.jsxs)(w.EY,{c:"onSurface.nLv3",as:"div",px:"xss",align:"center",children:[s.winType&&s.winType+" | ",(0,n.jsx)(u.A,{id:"status_round",values:{round:s.finalRound}})," ",l&&(0,n.jsxs)(n.Fragment,{children:["(",l,")"]})]})})]}):null},Y=e=>{let{event:t}=e,{status:s,startTimestamp:l}=t,i=s.code===r.sum.Started,a=s.type===r.XUj.NotStarted,o=(0,L.Sw)(t),c=i||a&&1e3*l{let{innings:t,scoreKeys:s,isWinner:r,isLive:l}=e;return(0,n.jsx)(n.Fragment,{children:s.map(e=>{let s=null==t?void 0:t[e];return(0,n.jsx)(c.EY,{display:"block",textStyle:"display.medium",color:l?"status.live":r?"neutrals.nLv1":"neutrals.nLv3",children:R.gj(s)},e)})})};function W(){let{event:e,leftScore:t,rightScore:s,leftTeam:o,rightTeam:d}=(0,l.useContext)(i.y$),u=e.status.type===r.XUj.InProgress,x=e.winnerCode===r.Jfo.Left,m=e.winnerCode===r.Jfo.Right,g=[...new Set([...Object.keys(t.innings||{}),...Object.keys(s.innings||{})])].sort(),h=R.KY(g,t.innings),j=R.KY(g,s.innings);return(0,n.jsxs)(a.ov,{children:[(0,n.jsx)(a.az,{flexGrow:0,flexShrink:0,flexBasis:"8xl",children:(0,n.jsxs)(a.so,{align:"flex-end",direction:"column",children:[(0,n.jsx)(I,{innings:t.innings,scoreKeys:g,isWinner:x,isLive:u&&e.currentBattingTeamId===o.id}),(0,n.jsxs)(c.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",children:[h," ov"]})]})}),(0,n.jsx)(a.cG,{color:"neutrals.nLv4",borderInlineEndStyle:"solid",orientation:"vertical",mx:"sm",h:"2xl"}),(0,n.jsx)(a.az,{flexGrow:0,flexShrink:0,flexBasis:"8xl",children:(0,n.jsxs)(a.so,{align:"flex-start",direction:"column",children:[(0,n.jsx)(I,{innings:s.innings,scoreKeys:g,isWinner:m,isLive:u&&e.currentBattingTeamId===d.id}),(0,n.jsxs)(c.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",children:[j," ov"]})]})})]})}let z=e=>{let{leftScore:t,rightScore:s}=e;return void 0===t.bottomScore&&void 0===s.bottomScore?(0,n.jsx)(c.EY,{color:"status.live",children:(0,n.jsx)(u.A,{id:"started"})}):(0,n.jsxs)(a.so,{columnGap:"xs",children:[void 0!==t.bottomScore&&void 0!==s.bottomScore&&(0,n.jsxs)(a.so,{children:[(0,n.jsx)(c.EY,{color:"status.live",children:t.bottomScore}),(0,n.jsx)(c.EY,{color:"status.live",children:"-"}),(0,n.jsx)(c.EY,{color:"status.live",children:s.bottomScore})]}),void 0!==t.bottomScoreExtra&&void 0!==s.bottomScoreExtra&&(0,n.jsxs)(a.so,{children:[(0,n.jsxs)(c.EY,{color:"status.live",children:["(",t.bottomScoreExtra]}),(0,n.jsx)(c.EY,{color:"status.live",children:"-"}),(0,n.jsxs)(c.EY,{color:"status.live",children:[s.bottomScoreExtra,")"]})]})]})};var F=s(8385),U=s(82169);let X=e=>{let{eventId:t,throwing:s,leftScore:r,rightScore:l}=e,{isDesktopLarge:i}=(0,c.$c)();return(0,n.jsxs)(a.so,{columnGap:"xs",align:"center",children:[s===F.ai.Home?(0,n.jsx)(p.v1,{fill:"sofaSingles.live"}):(0,n.jsx)(a.az,{w:"lg"}),(0,n.jsxs)(a.so,{justify:"center",align:"center",columnGap:"xs",children:[(0,n.jsx)(U.cU,{eventId:t,changeKey:"homeScore.display",score:r.topScore,fontSize:i?28:20,h:i?30:22,w:i?52:36,fontWeight:"bold",color:"sofaSingles.live"}),(0,n.jsx)(c.EY,{fontSize:i?"2xl":"xl",fontWeight:700,color:"status.live",children:"-"}),(0,n.jsx)(U.cU,{eventId:t,changeKey:"awayScore.display",score:l.topScore,fontSize:i?28:20,h:i?30:22,w:i?52:36,fontWeight:"bold",color:"sofaSingles.live",align:"flex-start"})]}),s===F.ai.Away?(0,n.jsx)(p.v1,{fill:"sofaSingles.live"}):(0,n.jsx)(a.az,{w:"lg"})]})};var G=s(69759);let D=e=>{let{event:t,homeScore:s,awayScore:r}=e,l=(0,G.J)(t,s),i=(0,G.J)(t,r);return(0,n.jsxs)(a.so,{direction:"column",gap:"sm",align:"center",children:[(0,n.jsx)(X,{eventId:t.id,throwing:t.firstToServe,leftScore:l,rightScore:i}),(0,n.jsx)(z,{leftScore:l,rightScore:i})]})};var P=s(84719);let Q=()=>{let{event:e,leftScore:t,rightScore:s}=(0,l.useContext)(i.y$);return e.status.type===r.XUj.InProgress?(0,n.jsx)(D,{event:e,homeScore:t,awayScore:s}):(0,n.jsx)(P.A,{})};var H=s(41735);let B=["period1","period2","period3","period4","period5"],J=(e,t)=>Object.keys(e).filter(s=>B.includes(s)&&void 0!==e[s]&&void 0!==t[s]),$=(e,t,s,n,r,l)=>s&&r===l?"onColor.default":(n?e>t:t>e)?"onSurface.nLv1":"onSurface.nLv3",M=(e,t,s,n,r)=>e?"secondary.default":n&&r&&(t?n>r:r>n)||s===(t?1:2)?"onSurface.nLv1":"onSurface.nLv3",N=(e,t,s,n)=>{let l=e.status.type===r.XUj.Finished;if(e.status.type===r.XUj.InProgress||e.status.code===r.sum.Interrupted){var i,a;return n?null!=(i=t.point)?i:0:null!=(a=s.point)?a:0}if(l)if("Ended"===e.status.description)return n?t.current:s.current;else if(n)return 1===e.winnerCode?"W":"L";else return 2===e.winnerCode?"W":"L"},O=()=>{let{event:e,leftScore:t,rightScore:s}=(0,l.useContext)(i.y$),o=e.status.type===r.XUj.InProgress,d=J(t,s),x=d?d.length-1:0,m=(0,l.useContext)(H.ThemeContext),g="rtl"===m.settings.textDirection,h=m.colors.secondary.default,j=void 0!==e.winnerCode,v=e.status.type===r.XUj.Finished&&e.status.code===r.sum.Walkover,f=e.status.type===r.XUj.Finished&&[r.sum.HomeDefaulted,r.sum.AwayDefaulted].includes(e.status.code),y=(0,n.jsx)(p.OXq,{fill:h,position:"absolute",w:"12",h:"16",style:g?{right:-16}:{left:-16}});return(0,n.jsxs)(a.so,{w:"100%",justify:"flex-end",children:[d.map((r,l)=>(0,n.jsxs)(a.so,{direction:"column",justify:"space-between",align:"flex-end",py:"xs",children:[(0,n.jsxs)(a.az,{position:"relative",children:[1===e.firstToServe&&o&&0===l&&y,(0,n.jsx)(U.cU,{eventId:e.id,changeKey:"homeScore.".concat(r),score:t[r],fontWeight:"bold",color:$(t[r],s[r],o,!0,l,x),backgroundColor:o&&l===x?"sofaSingles.live":"unset"})]}),(0,n.jsxs)(a.az,{position:"relative",children:[2===e.firstToServe&&o&&0===l&&y,(0,n.jsx)(U.cU,{eventId:e.id,changeKey:"awayScore.".concat(r),score:s[r],fontWeight:"bold",color:$(t[r],s[r],o,!1,l,x),backgroundColor:o&&l===x?"sofaSingles.live":"unset"})]})]},r)),v&&j&&(0,n.jsxs)(a.so,{direction:"column",justify:"space-between",py:"xs",children:[(0,n.jsx)(a.az,{children:1===e.winnerCode&&(0,n.jsx)(c.EY,{color:"neutrals.nLv3",children:(0,n.jsx)(u.A,{id:"walkover"})})}),(0,n.jsx)(a.az,{children:2===e.winnerCode&&(0,n.jsx)(c.EY,{color:"neutrals.nLv3",children:(0,n.jsx)(u.A,{id:"walkover"})})})]}),(void 0!==t.current&&void 0!==s.current||o||v||f)&&(0,n.jsxs)(a.so,{direction:"column",h:"100%",justify:"space-between",gap:"2xl",children:[(0,n.jsxs)(a.ov,{h:"xl",mb:"2xs",children:[(0,n.jsx)(a.cG,{orientation:"vertical",borderInlineEndStyle:"solid",color:"neutrals.nLv4",mx:"sm"}),(0,n.jsx)(U.cU,{eventId:e.id,score:N(e,t,s,!0),height:o?"16px":"24px",fontSize:o?"14px":"18px",pt:o?0:"xxs",fontWeight:"bold",color:M(o,!0,e.winnerCode,t.current,s.current),"data-testid":"left_score"})]}),(0,n.jsxs)(a.ov,{h:"xl",mt:"2xs",children:[(0,n.jsx)(a.cG,{orientation:"vertical",borderInlineEndStyle:"solid",color:"neutrals.nLv4",mx:"sm"}),(0,n.jsx)(U.cU,{eventId:e.id,score:N(e,t,s,!1),height:o?"16px":"24px",fontSize:o?"14px":"18px",pt:o?0:"xxs",fontWeight:"bold",color:M(o,!1,e.winnerCode,t.current,s.current),"data-testid":"right_score"})]})]})]})};function K(){let{event:e}=(0,l.useContext)(i.y$);switch(e.tournament.category.sport.slug){case r.QCR.Cricket:return(0,n.jsx)(W,{});case r.QCR.MMA:return(0,n.jsx)(k,{event:e});case r.QCR.Tennis:return(0,n.jsx)(O,{});case r.QCR.Darts:return(0,n.jsx)(Q,{});default:return(0,n.jsx)(P.A,{})}}var V=s(4967),q=s(90510);function Z(e){let{hasBorder:t=!1}=e,{event:s,leftScore:o,rightScore:x}=(0,l.useContext)(i.y$),m="number"==typeof o.current&&"number"==typeof x.current,g=(0,T.gm)(s,"winnerCode"),h=d.Ig.includes(s.status.code)&&g,j=h&&g===r.Jfo.Left,p=h&&g===r.Jfo.Right,v=s.tournament.category.sport.slug===r.QCR.Tennis,f=s.status.type;if(s.status.code===r.sum.Retired?f="retired":s.status.code===r.sum.Walkover?f="walkover":(s.status.code===r.sum.HomeDefaulted||s.status.code===r.sum.AwayDefaulted)&&(f="defaulted"),/^abandoned/i.test(s.status.description)&&(f="abandoned"),s.status.code===r.sum.Postponed||s.status.code===r.sum.Canceled||s.status.code===r.sum.Walkover){let e=(0,V.cK)(s.startTimestamp),l=(0,V.ef)(s.startTimestamp);return(0,n.jsxs)(a.az,{borderLeft:t?"1px solid {colors.neutrals.nLv4}":void 0,maxW:{mdToLg:"[100px]"},pl:t?"sm":void 0,children:[!v&&s.status.code===r.sum.Walkover&&h&&(0,n.jsxs)(a.so,{justify:"center",align:"center",gap:"sm",children:[(0,n.jsx)(c.EY,{textStyle:"display.large",color:j?"neutrals.nLv1":"neutrals.nLv3",children:j?"W":p?"L":""}),(0,n.jsx)(c.EY,{textStyle:"display.large",color:"neutrals.nLv3",children:" - "}),(0,n.jsx)(c.EY,{textStyle:"display.large",color:p?"neutrals.nLv1":"neutrals.nLv3",children:p?"W":j?"L":""})]}),(0,n.jsx)(c.EY,{textStyle:"display.large",textAlign:"center",display:"block",children:(0,n.jsx)(C.fP,{id:f})}),(0,n.jsx)(c.EY,{color:"neutrals.nLv3",textAlign:v?"right":"center",display:"block",children:e||l?(0,n.jsx)(u.A,{id:e?"today":"tomorrow"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(q.XU,{value:1e3*s.startTimestamp}),", ",(0,n.jsx)(q.ib,{value:1e3*s.startTimestamp})]})})]})}return(0,n.jsxs)(a.az,{children:[(0,n.jsxs)(a.az,{textAlign:"center",children:[(0,n.jsx)(c.EY,{textStyle:"display.extraLarge",color:j?"neutrals.nLv1":"neutrals.nLv3",children:m?o.current:j?"W":p?"L":""}),(0,n.jsx)(c.EY,{textStyle:"display.extraLarge",color:"neutrals.nLv3",children:" - "}),(0,n.jsx)(c.EY,{textStyle:"display.extraLarge",color:p?"neutrals.nLv1":"neutrals.nLv3",children:m?x.current:p?"W":j?"L":""})]}),(0,n.jsx)(c.EY,{color:"neutrals.nLv3",textAlign:"center",display:"block",children:(0,n.jsx)(C.fP,{id:f})})]})}let ee=e=>{let{teamId:t,isRight:s}=e,{event:o}=(0,l.useContext)(i.y$);return!function(e,t){let{homeTeam:s,bonusInfo:n}=e,l=s.id===t?null==n?void 0:n.hasHomeBonus:null==n?void 0:n.hasAwayBonus;return(0,L.c5)(e)===r.QCR.Basketball&&e.status.type===r.XUj.InProgress&&l}(o,t)?null:(0,n.jsx)(a.ov,{w:"xl",br:"sm",bg:"status.val",position:"absolute",bottom:"0",left:s?"0":void 0,right:s?void 0:"0",textStyle:"assistive.default",color:"onColor.primary",children:"B"})};var et=s(46009),es=s(8973),en=s(70591);let er=e=>{var t;let{team:s,sport:i,isRight:o,disableFollow:d,children:c}=e,u=(0,l.useContext)(et.w),x=(null==(t=s.subTeams)?void 0:t.length)===2;return(0,n.jsx)(a.az,{h:"100%","data-testid":o?"right_team":"left_team",children:(0,n.jsxs)(a.so,{align:"center",direction:o?"row-reverse":"row",children:[!d&&!x&&(0,n.jsx)(et.e,{isDisabled:s.disabled,id:s.id,entity:r.bq7.Teams,location:u,type:es.b.Team,"data-testid":"event_team_follow"}),x?c:(0,n.jsx)(en.gT,{sport:i,team:s,ignoreLink:d,children:c})]})})};function el(e){if(!e)return;let{wins:t,draws:s,losses:n}=e;return"".concat(t,"-").concat(n).concat(void 0!==s?"-".concat(s):"")}function ei(){let{event:e}=(0,l.useContext)(i.y$),t=(0,T.g3)(),s=t?e.awayTeamSeasonHistoricalForm:e.homeTeamSeasonHistoricalForm,n=t?e.homeTeamSeasonHistoricalForm:e.awayTeamSeasonHistoricalForm;return{leftWLD:el(s),rightWLD:el(n)}}var ea=s(33144),eo=s(58918);let ed=e=>{var t;let{team:s,isRight:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.so,{position:"absolute",bottom:"0",left:r?"0":"2xl",zIndex:"button",children:r?(0,n.jsx)(p.tFn,{fill:"mmaSpecific.blue.default"}):(0,n.jsx)(p.wOd,{fill:"mmaSpecific.red.default"})}),(0,n.jsx)(ea.p,{hasFlag:!0,id:s.id,alpha2:null==(t=s.country)?void 0:t.alpha2,right:r,flagSize:20,size:48,sport:s.sport,gender:s.gender})]})};var ec=s(19240);function eu(e){var t;let{sport:s,team:l,seeding:i,isRight:a}=e;if((null==(t=l.subTeams)?void 0:t.length)===2)return(0,n.jsx)(eo.K,{sport:s,teams:l.subTeams,seeding:i});switch(s){case r.QCR.MMA:return(0,n.jsx)(ed,{team:l,isRight:a});case r.QCR.Tennis:return(0,n.jsx)(ec.e,{team:l,isRight:a,seeding:i});default:return(0,n.jsx)(ea.p,{size:48,id:l.id,name:l.name})}}var ex=s(94604);let em=e=>{var t;let{team:s,isRight:r,additionalTeamInfo:l}=e,i=(0,T.g3)();return(null==(t=s.subTeams)?void 0:t.length)===2?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Ym,{maxW:{base:"[100px]",md:"8xl",lg:"[120px]"},textStyle:"display.micro",display:"block",truncate:!0,children:(0,n.jsx)(ex.Rm,{team:s.subTeams[0],short:!0})}),(0,n.jsx)(c.Ym,{maxW:{base:"[100px]",md:"8xl",lg:"[120px]"},textStyle:"display.micro",display:"block",truncate:!0,children:(0,n.jsx)(ex.Rm,{team:s.subTeams[1],short:!0})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.Ym,{maxW:{base:"[100px]",md:"8xl",lg:"[120px]"},textStyle:"display.micro",truncate:!0,display:"block",lineHeight:"16px",_rtl:{textAlign:"right"},children:[i&&r?"@":null,(0,n.jsx)(ex.Rm,{team:s,short:!0})]}),l&&(0,n.jsx)(c.Ym,{maxW:{base:"[100px]",md:"8xl",lg:"[120px]"},textStyle:"display.micro",color:"neutrals.nLv3",truncate:!0,display:"block",_rtl:{textAlign:"right"},children:l})]})};function eg(e){var t;let{team:s,sport:o,isRight:d,disableFollow:c}=e,{event:u}=(0,l.useContext)(i.y$),x=(null==(t=s.subTeams)?void 0:t.length)===2,{leftWLD:m,rightWLD:g}=ei(),h=d?g:m,j=o===r.QCR.Basketball&&u.status.type===r.XUj.InProgress;return(0,n.jsx)(er,{team:s,sport:o,isRight:d,disableFollow:c,children:(0,n.jsxs)(a.so,{position:"relative",justify:"center",mr:!c&&d?"sm":void 0,ml:c||d?void 0:"sm",minW:c?{base:"[100px]",md:"8xl",lg:"[120px]"}:void 0,children:[(0,n.jsx)(eu,{team:s,sport:o,isRight:d}),(0,n.jsx)(ee,{teamId:s.id,isRight:d}),(0,n.jsx)(a.so,{direction:"column",align:"center",style:{position:"absolute",bottom:x?-40:h?-36:-22,left:"50%",transform:"translateX(-50%)"},children:(0,n.jsx)(em,{team:s,additionalTeamInfo:j?void 0:h,isRight:d})})]})})}function eh(e){let{team:t,seeding:s,disableFollow:l}=e,i=t.gender&&t.ranking?t.gender===r.YT8.Male?"ATP ".concat(t.ranking,"."):"WTA ".concat(t.ranking,"."):void 0;return(0,n.jsx)(er,{sport:r.QCR.Tennis,team:t,disableFollow:l,children:(0,n.jsxs)(a.so,{position:"relative",justify:"flex-start",align:"center",marginInlineStart:l?void 0:"sm",minW:l?{base:"[100px]",md:"8xl",lg:"[120px]"}:void 0,gap:"lg",children:[(0,n.jsx)(eu,{team:t,sport:r.QCR.Tennis,seeding:s}),(0,n.jsx)("div",{children:(0,n.jsx)(em,{team:t,additionalTeamInfo:i})})]})})}var ej=s(62042);let ep=(e,t)=>{let s=(0,V.cK)(t),r=(0,V.ef)(t);return e?{primary:"-"}:s||r?{primary:(0,n.jsx)(q.ib,{value:t}),secondary:(0,n.jsx)(u.A,{id:s?"today":"tomorrow"})}:{primary:(0,n.jsx)(q.XU,{value:t}),secondary:(0,n.jsx)(q.ib,{value:t})}};function ev(e){let{event:t,hasBorder:s=!1}=e,l=(0,m.hX)(),i=(0,V.pp)(t.startTimestamp),o=t.tournament.category.sport.slug===r.QCR.Tennis;return l?null:(0,n.jsx)(g.iV,{referenceTime:t.startTimestamp,modifier:-1,children:e=>{let{delta:t}=e,{primary:r,secondary:l}=ep(t<0,i);return(0,n.jsxs)(a.az,{borderInlineStart:s?"1px solid {colors.neutrals.nLv4}":void 0,paddingInlineStart:s?"sm":void 0,children:[(0,n.jsx)(c.EY,{textAlign:"center",textStyle:"display.large",color:"neutrals.nLv1",display:"block",className:(0,ej.AH)({"&:first-letter":{textTransform:"capitalize"}}),children:r}),(0,n.jsx)(c.EY,{textAlign:o?"right":"center",textStyle:"body.medium",color:"neutrals.nLv3",display:"block",children:l})]})}})}let ef=e=>e.player?"".concat(e.player.id):e.playerName?e.playerName:"Goal",ey=e=>{let t=[],s={};return e.forEach(e=>{let n=ef(e);t.includes(n)||t.push(n),s[n]?s[n].push(e):s[n]=[e]}),[t,s]},eb=e=>{let{teamGoals:t,isLeftTeam:s=!1}=e,[r,l]=ey(t),i=e=>Array.from(r).slice(e).reduce((e,t)=>{var s,n;return e+(null!=(n=null==(s=l[t])?void 0:s.length)?n:0)},0);return(0,n.jsx)(n.Fragment,{children:r.map((e,t)=>{var o,d,x;let m=e,g=null==(o=l[e])?void 0:o.find(e=>!!e.player),h=(null==g||null==(d=g.player)?void 0:d.shortName)||(null==g||null==(x=g.player)?void 0:x.name);return h?m=h:"Goal"===e&&(m=(0,n.jsx)(u.A,{id:l[e].length>1?"goals":"goal"})),(0,n.jsxs)(a.so,{children:[(t<3||4===r.length)&&l[e]&&(0,n.jsxs)(c.EY,{color:"neutrals.nLv3",textStyle:"body.small",mr:"2xs",textAlign:s?"right":"left",children:[m," ",l[e].map(e=>{let t=-1===e.time||void 0===e.time?"-":e.time.toString(),s=e.addedTime?"+".concat(e.addedTime):"",n="penalty"===e.incidentClass?" (Pen.)":"ownGoal"===e.incidentClass?" (OG)":"";return"".concat(t).concat(s).concat(n)}).join(", ")]}),3===t&&r.length>4&&(0,n.jsx)(c.Ym,{color:"neutrals.nLv3",textStyle:"body.small",w:"fit",whiteSpace:"nowrap",children:(0,n.jsx)(u.A,{id:"event.goals.more",values:{n:i(t)}})})]},e)})})};var eS=s(34765);let ew=e=>16*Math.min(4,Math.max(e.homeScore.display||0,e.awayScore.display||0));function eL(){let{incidents:e,isLoading:t}=(0,eS.L)(),{event:s}=(0,l.useContext)(i.y$),r=(0,T.g3)(),o=e.filter(e=>"goal"===e.incidentType&&e.time),d=(null==o?void 0:o.filter(e=>r?!e.isHome:e.isHome))||[],c=(null==o?void 0:o.filter(e=>r?e.isHome:!e.isHome))||[];return t?(0,n.jsx)("div",{style:{height:ew(s)}}):0===d.length&&0===c.length||(null==o?void 0:o.every(e=>!e.player&&!e.playerName))?null:(0,n.jsxs)(a.so,{w:"100%",justify:"center",grow:1,align:"flex-start","data-testid":"scorer_list",children:[(0,n.jsx)(a.so,{w:"100%",maxW:"[148px]",direction:"column",justify:"center",align:"flex-end",grow:1,mr:"lg",ml:"sm",children:d&&(0,n.jsx)(eb,{teamGoals:d,isLeftTeam:!0})}),(0,n.jsx)(a.az,{w:"lg",children:(0,n.jsx)(p.NcS,{icon:"football-ball",fill:"secondary.default"})}),(0,n.jsx)(a.so,{w:"100%",maxW:"[148px]",direction:"column",justify:"center",align:"flex-start",grow:1,ml:"lg",mr:"sm",children:c&&(0,n.jsx)(eb,{teamGoals:c})})]})}let eT=()=>{let{event:e}=(0,l.useContext)(i.y$),t=new Date(1e3*e.startTimestamp);return(0,n.jsxs)(a.so,{align:"center",br:"lg",backgroundColor:"surface.s2",py:"xs",px:"sm",mb:"xs",h:"[26px]",children:[(0,n.jsx)(c.EY,{textStyle:"body.small",lineHeight:1,children:(0,n.jsx)(q.XU,{value:t,...V.or.fullDateWithLongYear})}),(0,n.jsx)(a.az,{w:"xs",h:"xs",br:"50%",bg:"neutrals.nLv1",mx:"sm",position:"relative"}),(0,n.jsx)(c.EY,{textStyle:"body.small",lineHeight:1,children:(0,n.jsx)(q.XU,{value:t,hour:"numeric",minute:"numeric"})})]})};function eC(e){let{activeTimeout:t}=e,{leftTeam:s,rightTeam:o}=(0,l.useContext)(i.y$),d=function(e){switch(e){case r.gVr.TeamTimeout:return"basketball_status_timeout_short";case r.gVr.ChallengeTimeout:return"basketball_status_coaches_challenge_short";case r.gVr.OfficialTimeout:return"basketball_status_referee_timeout";case r.gVr.TVTimeout:return"basketball_status_tv_timeout";default:return}}(t.type);if(!d)return null;let x=function(e,t,s){let n,l=e.type===r.gVr.TeamTimeout,i=e.teamId===t.id,a=e.teamId===s.id;return l&&(n=i?t.nameCode:a?s.nameCode:void 0),{teamName:n?"".concat(n," "):"",isLeftTeam:i,isRightTeam:a}}(t,s,o);return(0,n.jsxs)(a.so,{align:"center",gap:"2xs",bg:"status.liveHighlight",br:"lg",pl:(null==x?void 0:x.isLeftTeam)?"xs":"sm",pr:(null==x?void 0:x.isRightTeam)?"xs":"sm",children:[(null==x?void 0:x.isLeftTeam)&&(0,n.jsx)(p.yiO,{fill:"sofaSingles.live"}),(0,n.jsxs)(c.EY,{textStyle:"assistive.default",color:"status.live",children:[null==x?void 0:x.teamName,(0,n.jsx)(u.A,{id:d})]}),(null==x?void 0:x.isRightTeam)&&(0,n.jsx)(p.DxT,{fill:"sofaSingles.live"})]})}let e_=e=>{let{totalTimeouts:t,remainingTimeouts:s,isLeftTeam:r}=e,l=(82-(t-1)*2)/t;return(0,n.jsxs)(a.so,{align:"center",gap:"sm",children:[r&&(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(u.A,{id:"basketball_status_timeout_short"})}),(0,n.jsx)(a.so,{gap:"2xs",children:Array(t).fill(0).map((e,t)=>(0,n.jsx)(a.az,{bg:t+1<=s?"secondary.default":"neutrals.nLv4",style:{width:l},h:"xs"},"timeout-".concat(t)))}),!r&&(0,n.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,n.jsx)(u.A,{id:"basketball_status_timeout_short"})})]})};function eA(e){let{totalTimeouts:t,remainingTimeouts:s,isLeftTeam:r}=e;return(0,n.jsx)(a.so,{align:"center",gap:"sm",children:t>7?(0,n.jsxs)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:[(0,n.jsx)(u.A,{id:"basketball_status_timeout_short"}),": ".concat(s,"/").concat(t)]}):(0,n.jsx)(e_,{totalTimeouts:t,remainingTimeouts:s,isLeftTeam:r})})}function eE(e){let{timeouts:t}=e,{totalTimeouts:s,activeTimeout:r}=t,[l,i]=(0,T.jr)(t,"homeTimeoutsRemaining","awayTimeoutsRemaining");return l&&i?(0,n.jsxs)(a.so,{justify:"space-between",align:"center",px:s>7?"4xl":"md",mx:s>7?"2xs":void 0,pb:"sm",children:[(0,n.jsx)(eA,{totalTimeouts:s,remainingTimeouts:l,isLeftTeam:!0}),!!r&&(0,n.jsx)(eC,{activeTimeout:r}),(0,n.jsx)(eA,{totalTimeouts:s,remainingTimeouts:i})]}):null}let eY=e=>{var t,s;let{disableFollow:c,hasCountdown:u,hideIncidents:m,hideTimeouts:g}=e,{event:j,leftTeam:p,rightTeam:v,leftScore:f,rightScore:y}=(0,l.useContext)(i.y$),{leftWLD:b,rightWLD:w}=ei(),L=j.tournament.category.sport.slug,C=j.status.type===r.XUj.InProgress,_=j.status.type===r.XUj.WillContinue,A=!!(0,T.gm)(j,"aggregatedWinnerCode")&&void 0!==f.aggregated&&void 0!==y.aggregated,E=j.status.type===r.XUj.Finished,Y=(0,d.sw)(j)&&!(0,d.ux)(j)&&j.status.type!==r.XUj.WillContinue&&!j.isAwarded,k=j.status.type===r.XUj.NotStarted&&(L!==r.QCR.MMA||(0,o.xO)(j)),R=!!p.subTeams&&2===p.subTeams.length,I=L===r.QCR.Basketball,W=!!(null==(t=j.timeouts)?void 0:t.homeTimeoutsRemaining)&&!!(null==(s=j.timeouts)?void 0:s.awayTimeoutsRemaining),z=!g&&I&&C&&W;return(0,n.jsxs)(a.az,{br:{md:"lg"},pt:E?void 0:"sm",pb:"sm",children:[E&&(0,n.jsx)(a.so,{w:"100%",justify:"center",children:(0,n.jsx)(eT,{})}),(0,n.jsxs)(a.so,{h:R?"10xl":b||w?"[100px]":"[86px]",py:"sm",px:"md",justify:"space-between",align:"center",children:[(0,n.jsx)(eg,{team:p,sport:L,seeding:j.homeTeamSeed,disableFollow:c}),Y?(0,n.jsx)(Z,{}):k?(0,n.jsxs)("div",{children:[(0,n.jsx)(ev,{event:j}),u&&(0,n.jsx)(h,{event:j})]}):(0,n.jsxs)(a.so,{direction:"column",w:"100%",align:"center",justify:"center",children:[A&&(0,n.jsx)(x,{}),(0,n.jsx)(K,{})]}),(0,n.jsx)(eg,{team:v,sport:L,seeding:j.awayTeamSeed,disableFollow:c,isRight:!0})]}),z&&!!j.timeouts&&(0,n.jsx)(eE,{timeouts:j.timeouts}),L===r.QCR.MMA&&(C||_)&&j.fightState&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.cG,{}),(0,n.jsx)(S,{fightState:j.fightState})]}),L===r.QCR.Football&&!m&&(0,n.jsx)(eL,{})]})},ek=e=>{let{disableFollow:t}=e,{event:s,leftTeam:c,rightTeam:u}=(0,l.useContext)(i.y$),x=(0,d.rW)(s)&&!(0,d.ux)(s),m=s.status.code===r.sum.Walkover,g=void 0!==s.winnerCode,h=s.status.type===r.XUj.NotStarted&&(0,o.xO)(s),j=s.status.type===r.XUj.Finished;return(0,n.jsxs)(a.az,{br:{md:"lg"},children:[j&&(0,n.jsx)(a.so,{w:"100%",justify:"center",children:(0,n.jsx)(eT,{})}),(0,n.jsxs)(a.so,{py:"sm",px:"lg",justify:"space-between",align:"center",children:[(0,n.jsxs)(a.so,{direction:"column",gap:"sm",children:[(0,n.jsx)(eh,{team:c,sport:r.QCR.Tennis,seeding:s.homeTeamSeed,disableFollow:t}),(0,n.jsx)(eh,{team:u,sport:r.QCR.Tennis,seeding:s.awayTeamSeed,disableFollow:t})]}),x||m&&!g?(0,n.jsx)(Z,{hasBorder:!0}):h?(0,n.jsx)(ev,{event:s,hasBorder:!0}):(0,n.jsx)(a.ov,{flexDirection:"column",w:"100%",children:(0,n.jsx)(K,{})})]})]})},eR=e=>{let{disableFollow:t,hasCountdown:s,hideIncidents:a=!1,hideTimeouts:o=!1}=e,{event:d}=(0,l.useContext)(i.y$);return d.tournament.category.sport.slug===r.QCR.Tennis?(0,n.jsx)(ek,{disableFollow:t}):(0,n.jsx)(eY,{disableFollow:t,hasCountdown:s,hideIncidents:a,hideTimeouts:o})}},98559:(e,t,s)=>{s.d(t,{Ap:()=>o,FY:()=>d,Q6:()=>c,Zq:()=>g,xO:()=>u,zx:()=>m});var n=s(21377),r=s(494);s(45860),s(7263);var l=s(19168),i=s(3518),a=s(57126);let o=1708,d=19906;function c(e){let t=(0,r.d4)(a.YG);return t===i.i.Metric&&(e=e?Math.round((0,l.C6)(+e,"m").to("cm"))+" cm":"-"),t===i.i.Imperial&&(e=e?Math.round((0,l.C6)(+e,"m").to("in"))+'"':"-"),e}let u=e=>e.status.type===n.XUj.NotStarted&&1e3*e.startTimestamp>Date.now(),x=e=>{var t;return[e.stadium.name,e.city.name,(null==(t=e.country)?void 0:t.alpha2)||""].filter(e=>e.length>0).join(", ")},m=(e,t)=>e?x(e):t||"",g=(e,t)=>{let s=t===n.Jfo.Left,r=t===n.Jfo.Right,l=e===n.XUj.Finished&&!s&&!r,i=e===n.XUj.Canceled||e===n.XUj.Postponed;return{hasLeftTeamOpacity:i||l||r,hasRightTeamOpacity:i||l||s}}}}]);