!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]="e60dc764-510c-4208-93dc-67d6db923e57",e._sentryDebugIdIdentifier="sentry-dbid-e60dc764-510c-4208-93dc-67d6db923e57")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3172],{47530:(e,t,i)=>{i.d(t,{DT:()=>c,Xl:()=>u,__:()=>o,rC:()=>d});var s=i(6029),r=i(21377),n=i(90248),a=i(947),l=i(20336);let o=e=>{let{name:t,sport:i}=e,r=(0,l.g)(t,i);return(0,s.jsx)(s.Fragment,{children:r})};function d(e){let{roundName:t,sport:i}=e,a=i===r.QCR.AmericanFootball;if(!isNaN(+t))return(0,s.jsx)(n.A,{id:a?"week_number":"round_number",values:{n:t}});let l=t.match(/\d+/),c=t.match(/2nd leg/),u=t.match(/place/);if(l&&!c&&!u)return t.match(/qualification/i)?(0,s.jsx)(n.A,{id:"qualificationRoundN",values:{n:l[0]},defaultMessage:t}):t.match(/round of/i)||t.match(/\d+[/]\d+/i)||t.match(/R\d+/i)?(0,s.jsx)(o,{name:t,sport:i}):(0,s.jsx)(n.A,{id:a?"week_number":"round_number",values:{n:l[0]},defaultMessage:t});if(c&&c.index){let e=t.slice(0,c.index-1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d,{roundName:e})," ",(0,s.jsx)(n.A,{id:"tournament.totw.secondLeg",defaultMessage:c[0]})]})}return(0,s.jsx)(o,{name:t,sport:i})}let c=e=>{let{round:t,sport:i}=e;return t?(0,s.jsxs)(s.Fragment,{children:[t.prefix&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d,{roundName:t.prefix}),"\xa0"]}),(0,s.jsx)(d,{roundName:(null==t?void 0:t.name)||t.round.toString(),sport:i})]}):null},u=(e,t,i)=>{let s=(0,a.A)(),n=(0,l.g)(e,t),o=t===r.QCR.AmericanFootball;if(!e)return;if(!isNaN(+e))return s.formatMessage({id:o?"week_number":"round_number"},{n:e});let d=e.match(/\d+/),c=e.match(/2nd leg/),u=e.match(/place/);return!d||c||u?i?s.formatMessage({id:"winner"}):n:e.match(/qualification/i)?s.formatMessage({id:"qualificationRoundN",defaultMessage:e},{n:d[0]}):e.match(/round of/i)||e.match(/\d+[/]\d+/i)||e.match(/R\d+/i)?n:s.formatMessage({id:o?"week_number":"round_number",defaultMessage:e},{n:d[0]})}},55365:(e,t,i)=>{i.d(t,{KY:()=>c,UR:()=>f,gj:()=>d,lZ:()=>o,mq:()=>u});var s=i(6029),r=i(21377),n=i(93338),a=i(54409),l=i(98516);let o=(e,t,i)=>{let s=e.status.type===r.XUj.InProgress,a=s&&e.crowdsourcingDataDisplayEnabled,l=t===r.Jfo.Left,o=t===r.Jfo.Right;return a?n.S.var("colors.status.crowdsourcingLive"):s?n.S.var("colors.status.live"):i?l?n.S.var("colors.neutrals.nLv1"):n.S.var("colors.neutrals.nLv3"):o?n.S.var("colors.neutrals.nLv1"):n.S.var("colors.neutrals.nLv3")};function d(e){let t=(null==e?void 0:e.score)||0,i=(null==e?void 0:e.wickets)||0;return t||i?"".concat(t).concat(i>=0&&i<10?"-".concat(i):""):"-"}let c=(e,t)=>(0,l.M)(e.map(e=>{var i,s;return null!=(s=null==t||null==(i=t[e])?void 0:i.overs)?s:0}).reduce((e,t)=>e+t,0),1),u=e=>{switch(e){case"WC":case"LL":return"colors.playoffs.relegation";case"Q":case"A":case"PR":case"SE":return"colors.playoffs.promotionToXPlayoff";default:return"colors.playoffs.promotionToYPlayoff"}},f=(e,t,i)=>{if(e===r.QCR.Tennis)return i===r.Jfo.Left||i===r.Jfo.Right?(0,s.jsx)(a.OXq,{fill:"secondary.default"}):void 0;if(e===r.QCR.AmericanFootball){let e=null==t?void 0:t.currentPossession,i=Number(null==t?void 0:t.currentDown);return i>=1&&i<=4&&(e===r.Jfo.Left||e===r.Jfo.Right)?(0,s.jsx)(a.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},84719:(e,t,i)=>{i.d(t,{A:()=>S});var s=i(6029),r=i(55729);function n(e,t){var i,s;let n=(0,r.useRef)();return(0,r.useEffect)(()=>{n.current&&n.current.eventId===t?n.current.value=e:n.current={value:void 0,eventId:t}},[e,t]),(null==(i=n.current)?void 0:i.eventId)===t?null==(s=n.current)?void 0:s.value:void 0}var a=i(21377),l=i(44194),o=i(76356),d=i(90248),c=i(62859),u=i(54409);let f=e=>{let{leftScore:t,rightScore:i,prevLeftScore:s,prevRightScore:n,isLive:a,isLiveCrowdsourcing:l}=e,[o,d]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e,r,o=t.display&&(null==s?void 0:s.display)!==void 0&&t.display>s.display,c=i.display&&(null==n?void 0:n.display)!==void 0&&i.display>n.display;return(o||c)&&(a||l)&&(d(!0),e=window.setTimeout(()=>{d(!1),u(!0),r=window.setTimeout(()=>{u(!1),m(!0)},2e3)},5e3)),o||c||(d(!1),u(!1),m(!1)),()=>{clearTimeout(e),clearTimeout(r)}},[t.display,i.display,a,l]),{showBlinkGoalText:o,showGoalText:c,showAnimatedText:f}},m=e=>{let{leftScore:t,rightScore:i,prevLeftScore:n,prevRightScore:a,isLive:c,isLiveCrowdsourcing:u,isFootball:m,statusColor:p,isSmall:v,setIsGoalAnimation:x,children:g}=e,{showBlinkGoalText:y,showGoalText:h,showAnimatedText:j}=f({leftScore:t,rightScore:i,prevLeftScore:n,prevRightScore:a,isLive:c,isLiveCrowdsourcing:u});return(0,r.useEffect)(()=>{y&&x&&x(!0),y||h||!x||x(!1)},[y,h]),(0,s.jsxs)(s.Fragment,{children:[y&&m&&(0,s.jsxs)(o.az,{style:{color:p},textAlign:"center",display:"block",lineClamp:1,textTransform:"uppercase",animation:"blink 1s infinite",children:[(0,s.jsx)(d.A,{id:"goal"}),"!"]}),h&&m&&(0,s.jsxs)(l.EY,{style:{color:p},textAlign:"center",display:"block",lineClamp:1,textTransform:"uppercase",children:[(0,s.jsx)(d.A,{id:"goal"}),"!"]}),!y&&!h&&g&&(0,s.jsx)(o.az,{animation:j?"slideUp 0.5s ease-in-out":"none",children:(0,s.jsx)(l.EY,{position:"relative",style:{color:p},textAlign:"center",display:"block",lineClamp:1,textStyle:v?"assistive.micro":"body.medium",children:g})})]})};var p=i(73022),v=i(98368),x=i(65078),g=i(71046),y=i(87763),h=i(62827),j=i(55365);let b=(e,t,i)=>{if(i)return(0,y.Iv)((0,h.B_)(e),t,i);let s=(0,y.Iv)(e.status.description,t,i);switch(s){case"ap":return"afterPenalties";case"after_extra_time_short":return"afterExtraTime";case"ags":return"afterGoldenSet";case"ended":if(t===a.QCR.AmericanFootball)return"final_score";return"finished";default:return s}},w=(e,t,i,s,r)=>{if(s===a.QCR.Tennis){if(![typeof t.point,typeof i.point,typeof e.lastPeriod].includes("undefined")){let s="".concat(t[e.lastPeriod],"-").concat(i[e.lastPeriod]),n="(".concat(t.point,":").concat(i.point,")");return"rtl"===r&&(s="".concat(i[e.lastPeriod],"-").concat(t[e.lastPeriod]),n="(".concat(i.point,":").concat(t.point,")")),"".concat(s," ").concat(n)}}else if(s===a.QCR.AmericanFootball){let{yardDistance:t}=e;return t&&(0,v.XB)(t)?(0,v.XE)(t,e):void 0}};function S(e){let{shortStatus:t,isSmall:i}=e,{event:f,leftScore:v,rightScore:S}=(0,r.useContext)(c.y$),{textDirection:A}=(0,l.$c)(),R=n(v,f.id),C=n(S,f.id),_=f.status.type===a.XUj.InProgress,L=_&&f.crowdsourcingDataDisplayEnabled,E=f.crowdsourcingDataDisplayEnabled&&f.status.type===a.XUj.Finished,P=f.tournament.category.sport.slug,F=(0,x.gm)(f.yardDistance,"currentPossession",f)===a.Jfo.Right||f.firstToServe===a.Jfo.Right,T=_?(0,j.UR)(P,f.yardDistance,f.firstToServe):void 0,k=[a.QCR.AmericanFootball,a.QCR.Tennis].includes(P),D=(0,x.gm)(f,"winnerCode"),I=(0,x.gm)(f,"aggregatedWinnerCode"),M=(0,j.lZ)(f,D,!0),N=L?"status.crowdsourcingLive":_?"status.live":"neutrals.nLv3",Q=(0,j.lZ)(f,D,!1),Y=b(f,P,t),J=(0,y.bO)(t?(0,h.B_)(f):f.status.description)||void 0,z=_&&k&&w(f,v,S,P,A),U=(0,g.Sw)(f),X=(0,y.Iv)(f.status.description,P,!0),q=U&&X,B=(0,p.zV)(f),O=P===a.QCR.Football,Z=O&&(f.status.code===a.sum.AP||f.status.code===a.sum.Penalties),W=_&&!!f.finalResultOnly;return(0,s.jsxs)(o.az,{children:[(0,s.jsxs)(o.az,{position:"relative",textAlign:"center",children:[T&&(0,s.jsx)(o.az,{px:"xs",position:"absolute",right:F?"0":void 0,left:F?void 0:"0",top:"[50%]",transform:F?"translate(100%, -50%)":"translate(-100%, -50%)",children:T}),(0,s.jsxs)(l.EY,{truncate:!0,children:[(0,s.jsxs)(l.EY,{position:"relative",textStyle:i?"display.medium":"display.extraLarge",style:{color:M},children:[void 0!==v.display?v.display:v.current,I===a.Jfo.Left&&(0,s.jsx)(o.az,{position:"absolute",top:"2xs",right:"[-6px]",children:(0,s.jsx)(u.UFI,{fill:"onSurface.nLv1"})})]}),(0,s.jsx)(l.EY,{textStyle:i?"display.medium":"display.extraLarge",color:N,children:" - "}),(0,s.jsxs)(l.EY,{position:"relative",textStyle:i?"display.medium":"display.extraLarge",style:{color:Q},children:[void 0!==S.display?S.display:S.current,I===a.Jfo.Right&&(0,s.jsx)(o.az,{position:"absolute",top:"2xs",right:"[-6px]",children:(0,s.jsx)(u.UFI,{fill:"onSurface.nLv1"})})]})]})]}),(0,s.jsx)(m,{leftScore:v,rightScore:S,prevLeftScore:R,prevRightScore:C,isLive:_,isLiveCrowdsourcing:L,isFootball:O,statusColor:N,isSmall:i,children:(0,s.jsx)(l.EY,{position:"relative",color:N,textAlign:"center",display:"block",lineClamp:1,textStyle:i?"assistive.micro":"body.medium",children:q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{id:X,values:J})," (",U,")"]}):W?(0,s.jsx)(d.A,{id:"live"}):L?(0,s.jsxs)(o.so,{justify:"center",align:"center",children:[(0,s.jsx)(u.Mv5,{mr:"xs",fill:"sofaSingles.crowdsourcingLive"}),(0,s.jsx)(l.EY,{textStyle:"body.small",color:"[inherit]",children:(0,s.jsx)(d.A,{id:"live"})})]}):B?(0,s.jsx)(p.lx,{time:f.time,status:f.status,lastPeriod:f.lastPeriod,currentPeriodStartTimestamp:f.currentPeriodStartTimestamp}):z||(f.isAwarded||E?(0,s.jsx)(d.A,{id:E?"basic.awaitingConfirmation":"awarded"}):Z?(0,s.jsxs)(l.EY,{textStyle:i?"assistive.micro":"body.medium",color:N,children:[(0,s.jsx)(d.A,{id:"penalties_short"})," ",v.penalties," - ",S.penalties]}):(0,s.jsx)(d.A,{id:Y,values:J,defaultMessage:Y}))})})]})}}}]);