!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]="31d0e25f-7b2e-44cd-9545-76d7baee753e",e._sentryDebugIdIdentifier="sentry-dbid-31d0e25f-7b2e-44cd-9545-76d7baee753e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4719],{55365:(e,t,i)=>{i.d(t,{KY:()=>d,UR:()=>f,gj:()=>c,lZ:()=>l,mq:()=>u});var s=i(6029),r=i(21377),o=i(93338),n=i(54409),a=i(98516);let l=(e,t,i)=>{let s=e.status.type===r.XUj.InProgress,n=s&&e.crowdsourcingDataDisplayEnabled,a=t===r.Jfo.Left,l=t===r.Jfo.Right;return n?o.S.var("colors.status.crowdsourcingLive"):s?o.S.var("colors.status.live"):i?a?o.S.var("colors.neutrals.nLv1"):o.S.var("colors.neutrals.nLv3"):l?o.S.var("colors.neutrals.nLv1"):o.S.var("colors.neutrals.nLv3")};function c(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 d=(e,t)=>(0,a.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)(n.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)(n.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},84719:(e,t,i)=>{i.d(t,{A:()=>A});var s=i(6029),r=i(55729);function o(e,t){var i,s;let o=(0,r.useRef)();return(0,r.useEffect)(()=>{o.current&&o.current.eventId===t?o.current.value=e:o.current={value:void 0,eventId:t}},[e,t]),(null==(i=o.current)?void 0:i.eventId)===t?null==(s=o.current)?void 0:s.value:void 0}var n=i(21377),a=i(44194),l=i(76356),c=i(90248),d=i(41735),u=i(62859),f=i(54409),p=i(41249);let v=e=>{let{leftScore:t,rightScore:i,prevLeftScore:s,prevRightScore:o,isLive:n,isLiveCrowdsourcing:a}=e,[l,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[f,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e,r,l=t.display&&(null==s?void 0:s.display)!==void 0&&t.display>s.display,d=i.display&&(null==o?void 0:o.display)!==void 0&&i.display>o.display;return(l||d)&&(n||a)&&(c(!0),e=window.setTimeout(()=>{c(!1),u(!0),r=window.setTimeout(()=>{u(!1),p(!0)},2e3)},5e3)),l||d||(c(!1),u(!1),p(!1)),()=>{clearTimeout(e),clearTimeout(r)}},[t.display,i.display,n,a]),{showBlinkGoalText:l,showGoalText:d,showAnimatedText:f}},m=(0,d.default)(p.EY).withConfig({componentId:"GoalAnimationBlinkText"}).withConfig({componentId:"sc-7b1b5ae9-0"})(["animation:blink 1s infinite;@keyframes blink{0%{opacity:0;}50%{opacity:1;}100%{opacity:0;}}"]),y=(0,d.default)(p.az).withConfig({componentId:"GoalAnimationTextWrapper"}).withConfig({componentId:"sc-7b1b5ae9-1"})(["animation:",";@keyframes slideUp{from{transform:translateY(25%);}to{transform:translateY(0);}}"],e=>{let{showAnimation:t}=e;return t?"slideUp 0.5s ease-in-out":"none"}),x=e=>{let{leftScore:t,rightScore:i,prevLeftScore:o,prevRightScore:n,isLive:a,isLiveCrowdsourcing:l,isFootball:d,statusColor:u,isSmall:f,setIsGoalAnimation:x,children:g}=e,{showBlinkGoalText:h,showGoalText:b,showAnimatedText:j}=v({leftScore:t,rightScore:i,prevLeftScore:o,prevRightScore:n,isLive:a,isLiveCrowdsourcing:l});return(0,r.useEffect)(()=>{h&&x&&x(!0),h||b||!x||x(!1)},[h,b]),(0,s.jsxs)(s.Fragment,{children:[h&&d&&(0,s.jsxs)(m,{color:u,align:"center",block:!0,lineClamp:1,textTransform:"uppercase",children:[(0,s.jsx)(c.A,{id:"goal"}),"!"]}),b&&d&&(0,s.jsxs)(p.EY,{color:u,align:"center",block:!0,lineClamp:1,textTransform:"uppercase",children:[(0,s.jsx)(c.A,{id:"goal"}),"!"]}),!h&&!b&&g&&(0,s.jsx)(y,{showAnimation:j,children:(0,s.jsx)(p.EY,{position:"relative",color:u,align:"center",block:!0,lineClamp:1,font:f?"assistive.micro":"body.medium",children:g})})]})};var g=i(73022),h=i(98368),b=i(65078),j=i(71046),w=i(87763),S=i(62827),C=i(55365);let E=(e,t,i)=>{if(i)return(0,w.Iv)((0,S.B_)(e),t,i);let s=(0,w.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===n.QCR.AmericanFootball)return"final_score";return"finished";default:return s}},L=(e,t,i,s,r)=>{if(s===n.QCR.Tennis){if(![typeof t.point,typeof i.point,typeof e.lastPeriod].includes("undefined")){let s="".concat(t[e.lastPeriod],"-").concat(i[e.lastPeriod]),o="(".concat(t.point,":").concat(i.point,")");return"rtl"===r&&(s="".concat(i[e.lastPeriod],"-").concat(t[e.lastPeriod]),o="(".concat(i.point,":").concat(t.point,")")),"".concat(s," ").concat(o)}}else if(s===n.QCR.AmericanFootball){let{yardDistance:t}=e;return t&&(0,h.XB)(t)?(0,h.XE)(t,e):void 0}};function A(e){let{shortStatus:t,isSmall:i}=e,{event:p,leftScore:v,rightScore:m}=(0,r.useContext)(u.y$),{settings:y}=(0,d.useTheme)(),h=o(v,p.id),A=o(m,p.id),R=p.status.type===n.XUj.InProgress,P=R&&p.crowdsourcingDataDisplayEnabled,T=p.crowdsourcingDataDisplayEnabled&&p.status.type===n.XUj.Finished,I=p.tournament.category.sport.slug,k=(0,b.gm)(p.yardDistance,"currentPossession",p)===n.Jfo.Right||p.firstToServe===n.Jfo.Right,D=R?(0,C.UR)(I,p.yardDistance,p.firstToServe):void 0,_=[n.QCR.AmericanFootball,n.QCR.Tennis].includes(I),Y=(0,b.gm)(p,"winnerCode"),F=(0,b.gm)(p,"aggregatedWinnerCode"),J=(0,C.lZ)(p,Y,!0),Q=P?"status.crowdsourcingLive":R?"status.live":"neutrals.nLv3",U=(0,C.lZ)(p,Y,!1),z=E(p,I,t),X=(0,w.bO)(t?(0,S.B_)(p):p.status.description)||void 0,B=R&&_&&L(p,v,m,I,y.textDirection),G=(0,j.Sw)(p),M=(0,w.Iv)(p.status.description,I,!0),N=G&&M,O=(0,g.zV)(p),W=I===n.QCR.Football,Z=W&&(p.status.code===n.sum.AP||p.status.code===n.sum.Penalties),q=R&&!!p.finalResultOnly;return(0,s.jsxs)(l.az,{children:[(0,s.jsxs)(l.az,{position:"relative",textAlign:"center",children:[D&&(0,s.jsx)(l.az,{px:"xs",position:"absolute",right:k?"0":void 0,left:k?void 0:"0",top:"[50%]",transform:k?"translate(100%, -50%)":"translate(-100%, -50%)",children:D}),(0,s.jsxs)(a.EY,{truncate:!0,children:[(0,s.jsxs)(a.EY,{position:"relative",textStyle:i?"display.medium":"display.extraLarge",style:{color:J},children:[void 0!==v.display?v.display:v.current,F===n.Jfo.Left&&(0,s.jsx)(l.az,{position:"absolute",top:"2xs",right:"[-6px]",children:(0,s.jsx)(f.UFI,{fill:"onSurface.nLv1"})})]}),(0,s.jsx)(a.EY,{textStyle:i?"display.medium":"display.extraLarge",color:Q,children:" - "}),(0,s.jsxs)(a.EY,{position:"relative",textStyle:i?"display.medium":"display.extraLarge",style:{color:U},children:[void 0!==m.display?m.display:m.current,F===n.Jfo.Right&&(0,s.jsx)(l.az,{position:"absolute",top:"2xs",right:"[-6px]",children:(0,s.jsx)(f.UFI,{fill:"onSurface.nLv1"})})]})]})]}),(0,s.jsx)(x,{leftScore:v,rightScore:m,prevLeftScore:h,prevRightScore:A,isLive:R,isLiveCrowdsourcing:P,isFootball:W,statusColor:Q,isSmall:i,children:(0,s.jsx)(a.EY,{position:"relative",color:Q,textAlign:"center",display:"block",lineClamp:1,textStyle:i?"assistive.micro":"body.medium",children:N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.A,{id:M,values:X})," (",G,")"]}):q?(0,s.jsx)(c.A,{id:"live"}):P?(0,s.jsxs)(l.so,{justify:"center",align:"center",children:[(0,s.jsx)(f.Mv5,{mr:"xs",fill:"sofaSingles.crowdsourcingLive"}),(0,s.jsx)(a.EY,{textStyle:"body.small",color:"[inherit]",children:(0,s.jsx)(c.A,{id:"live"})})]}):O?(0,s.jsx)(g.lx,{time:p.time,status:p.status,lastPeriod:p.lastPeriod,currentPeriodStartTimestamp:p.currentPeriodStartTimestamp}):B||(p.isAwarded||T?(0,s.jsx)(c.A,{id:T?"basic.awaitingConfirmation":"awarded"}):Z?(0,s.jsxs)(a.EY,{textStyle:i?"assistive.micro":"body.medium",color:Q,children:[(0,s.jsx)(c.A,{id:"penalties_short"})," ",v.penalties," - ",m.penalties]}):(0,s.jsx)(c.A,{id:z,values:X,defaultMessage:z}))})})]})}}}]);