!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]="42ce532c-e724-47b6-a865-24999a423a08",e._sentryDebugIdIdentifier="sentry-dbid-42ce532c-e724-47b6-a865-24999a423a08")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3752],{3518:(e,t,i)=>{i.d(t,{Z:()=>c,i:()=>a.i});var n=i(6029),r=i(90510),o=i(494),s=i(5339),a=i(5921),l=i(52905);function c(e){let{value:t,fromUnit:i}=e,c=(0,o.d4)(l.Y);if(!t)return null;if((0,s.C)(t,i).to("m")>=1e3)return(0,n.jsx)(u,{value:t,fromUnit:i});if(c===a.i.Imperial){let e=function(e,t){let i=(0,s.C)(e,t).to("feet"),n=Math.floor(i),r=Math.round((0,s.C)(i-Math.floor(i),"ft").to("in"));return 12===r&&(n+=1,r=0),{ft:n,in:r}}(t,i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Gr,{value:e.ft,style:"unit",unit:"foot",unitDisplay:"narrow"}),"\xa0",(0,n.jsx)(r.Gr,{value:e.in,style:"unit",unit:"inch",unitDisplay:"narrow"})]})}return(0,n.jsx)(r.Gr,{value:(0,s.C)(t,i).to("cm"),style:"unit",unit:"centimeter",unitDisplay:"short"})}function u(e){let{value:t,fromUnit:i}=e,c=(0,o.d4)(l.Y);return t?c===a.i.Imperial?(0,n.jsx)(r.Gr,{value:(0,s.C)(t,i).to("mile"),style:"unit",unit:"mile",maximumFractionDigits:1,unitDisplay:"short"}):(0,n.jsx)(r.Gr,{value:(0,s.C)(t,i).to("km"),style:"unit",unit:"kilometer",maximumFractionDigits:1,unitDisplay:"short"}):null}},34765:(e,t,i)=>{i.d(t,{L:()=>l});var n=i(21377),r=i(55729),o=i(45860),s=i(62859),a=i(8703);function l(){let{event:e,initialIncidents:t}=(0,r.useContext)(s.y$),i={};e.status.type===n.XUj.InProgress&&(i.onErrorRetry=(e,t,i,n,r)=>{let{retryCount:o}=r;404===e.status&&setTimeout(()=>n({retryCount:o}),15e3)});let{data:l,isLoading:c,error:u}=(0,o.Ay)(n.bnp.incidents(e.id),(0,a.rf)(e,i));return{incidents:(null==l?void 0:l.incidents)||t||[],isLoading:(null==t||!t.length)&&c,isError:!!u}}},55365:(e,t,i)=>{i.d(t,{KY:()=>c,UR:()=>d,gj:()=>l,lZ:()=>a,mq:()=>u});var n=i(6029),r=i(21377),o=i(54409),s=i(98516);r.QCR.AussieRules,r.QCR.Football,r.QCR.Futsal,r.QCR.Handball,r.QCR.Rugby;let a=(e,t,i)=>{let n=e.status.type===r.XUj.InProgress,o=n&&e.crowdsourcingDataDisplayEnabled,s=t===r.Jfo.Left,a=t===r.Jfo.Right;return o?"sofaSingles.crowdsourcingLive":n?"sofaSingles.live":i?s?"onSurface.nLv1":"onSurface.nLv3":a?"onSurface.nLv1":"onSurface.nLv3"};function l(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,s.M)(e.map(e=>{var i,n;return null!=(n=null==t||null==(i=t[e])?void 0:i.overs)?n:0}).reduce((e,t)=>e+t,0),1),u=e=>{switch(e){case"WC":case"LL":return"playoffs.relegation";case"Q":case"A":case"PR":case"SE":return"playoffs.promotionToXPlayoff";default:return"playoffs.promotionToYPlayoff"}},d=(e,t,i)=>{if(e===r.QCR.Tennis)return i===r.Jfo.Left||i===r.Jfo.Right?(0,n.jsx)(o.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,n.jsx)(o.CvR,{icon:"af-touchdown",w:16,h:16,fill:"sofaSingles.live"}):void 0}}},84719:(e,t,i)=>{i.d(t,{A:()=>S});var n=i(6029),r=i(55729);function o(e,t){var i,n;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==(n=o.current)?void 0:n.value:void 0}var s=i(21377),a=i(41249),l=i(90248),c=i(41735),u=i(62859),d=i(54409);let f=e=>{let{leftScore:t,rightScore:i,prevLeftScore:n,prevRightScore:o,isLive:s,isLiveCrowdsourcing:a}=e,[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1),[f,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e,r,l=t.display&&(null==n?void 0:n.display)!==void 0&&t.display>n.display,u=i.display&&(null==o?void 0:o.display)!==void 0&&i.display>o.display;return(l||u)&&(s||a)&&(c(!0),e=window.setTimeout(()=>{c(!1),d(!0),r=window.setTimeout(()=>{d(!1),p(!0)},2e3)},5e3)),l||u||(c(!1),d(!1),p(!1)),()=>{clearTimeout(e),clearTimeout(r)}},[t.display,i.display,s,a]),{showBlinkGoalText:l,showGoalText:u,showAnimatedText:f}},p=(0,c.default)(a.EY).withConfig({componentId:"GoalAnimationBlinkText"}).withConfig({componentId:"sc-46a9cb1a-0"})(["animation:blink 1s infinite;@keyframes blink{0%{opacity:0;}50%{opacity:1;}100%{opacity:0;}}"]),v=(0,c.default)(a.az).withConfig({componentId:"GoalAnimationTextWrapper"}).withConfig({componentId:"sc-46a9cb1a-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"}),m=e=>{let{leftScore:t,rightScore:i,prevLeftScore:o,prevRightScore:s,isLive:c,isLiveCrowdsourcing:u,isFootball:d,statusColor:m,secondaryTextProps:y,setIsGoalAnimation:g,children:x}=e,{showBlinkGoalText:h,showGoalText:j,showAnimatedText:b}=f({leftScore:t,rightScore:i,prevLeftScore:o,prevRightScore:s,isLive:c,isLiveCrowdsourcing:u});return(0,r.useEffect)(()=>{h&&g&&g(!0),h||j||!g||g(!1)},[h,j]),(0,n.jsxs)(n.Fragment,{children:[h&&d&&(0,n.jsxs)(p,{color:m,align:"center",block:!0,lineClamp:1,textTransform:"uppercase",children:[(0,n.jsx)(l.A,{id:"goal"}),"!"]}),j&&d&&(0,n.jsxs)(a.EY,{color:m,align:"center",block:!0,lineClamp:1,textTransform:"uppercase",children:[(0,n.jsx)(l.A,{id:"goal"}),"!"]}),!h&&!j&&x&&(0,n.jsx)(v,{showAnimation:b,children:(0,n.jsx)(a.EY,{position:"relative",color:m,align:"center",block:!0,lineClamp:1,...y,children:x})})]})};var y=i(73022),g=i(9725),x=i(65078),h=i(71046),j=i(87763),b=i(19168),C=i(55365);let w=(e,t,i)=>{if(i)return(0,j.Iv)((0,b.B_)(e),t,i);let n=(0,j.Iv)(e.status.description,t,i);switch(n){case"ap":return"afterPenalties";case"after_extra_time_short":return"afterExtraTime";case"ags":return"afterGoldenSet";case"ended":if(t===s.QCR.AmericanFootball)return"final_score";return"finished";default:return n}},R=(e,t,i,n,r)=>{if(n===s.QCR.Tennis){if(![typeof t.point,typeof i.point,typeof e.lastPeriod].includes("undefined")){let n="".concat(t[e.lastPeriod],"-").concat(i[e.lastPeriod]),o="(".concat(t.point,":").concat(i.point,")");return"rtl"===r&&(n="".concat(i[e.lastPeriod],"-").concat(t[e.lastPeriod]),o="(".concat(i.point,":").concat(t.point,")")),"".concat(n," ").concat(o)}}else if(n===s.QCR.AmericanFootball){let{yardDistance:t}=e;return t&&(0,g.XB)(t)?(0,g.XE)(t,e):void 0}};function S(e){let{primaryTextProps:t,secondaryTextProps:i,shortStatus:f}=e,{event:p,leftScore:v,rightScore:g}=(0,r.useContext)(u.y$),{settings:S}=(0,c.useTheme)(),E=o(v,p.id),L=o(g,p.id),A=p.status.type===s.XUj.InProgress,D=A&&p.crowdsourcingDataDisplayEnabled,I=p.crowdsourcingDataDisplayEnabled&&p.status.type===s.XUj.Finished,P=p.tournament.category.sport.slug,T=(0,x.gm)(p.yardDistance,"currentPossession",p)===s.Jfo.Right||p.firstToServe===s.Jfo.Right,k=A?(0,C.UR)(P,p.yardDistance,p.firstToServe):void 0,_=[s.QCR.AmericanFootball,s.QCR.Tennis].includes(P),F=(0,x.gm)(p,"winnerCode"),Y=(0,x.gm)(p,"aggregatedWinnerCode"),Q=(0,C.lZ)(p,F,!0),U=D?"sofaSingles.crowdsourcingLive":A?"sofaSingles.live":"onSurface.nLv3",J=(0,C.lZ)(p,F,!1),G=w(p,P,f),X=(0,j.bO)(f?(0,b.B_)(p):p.status.description)||void 0,z=A&&_&&R(p,v,g,P,S.textDirection),M=(0,h.Sw)(p),B=(0,j.Iv)(p.status.description,P,!0),Z=M&&B,N=(0,y.zV)(p),O=P===s.QCR.Football,W=O&&(p.status.code===s.sum.AP||p.status.code===s.sum.Penalties),q=A&&!!p.finalResultOnly;return(0,n.jsxs)(a.az,{children:[(0,n.jsxs)(a.az,{position:"relative",textAlign:"center",children:[k&&(0,n.jsx)(a.az,{px:"xs",style:{position:"absolute",right:T?0:void 0,left:T?void 0:0,top:"50%",transform:"translate(".concat(T?100:-100,"%, -50%)")},children:k}),(0,n.jsxs)(a.EY,{ellipsis:!0,children:[(0,n.jsxs)(a.EY,{position:"relative",font:"display.extraLarge",color:Q,...t,"data-testid":"left_score",children:[void 0!==v.display?v.display:v.current,Y===s.Jfo.Left&&(0,n.jsx)(a.az,{position:"absolute",top:2,right:-6,children:(0,n.jsx)(d.UFI,{fill:"onSurface.nLv1"})})]}),(0,n.jsx)(a.EY,{font:"display.extraLarge",color:U,...t,children:" - "}),(0,n.jsxs)(a.EY,{position:"relative",font:"display.extraLarge",color:J,...t,"data-testid":"right_score",children:[void 0!==g.display?g.display:g.current,Y===s.Jfo.Right&&(0,n.jsx)(a.az,{position:"absolute",top:2,right:-6,children:(0,n.jsx)(d.UFI,{fill:"onSurface.nLv1"})})]})]})]}),(0,n.jsx)(m,{leftScore:v,rightScore:g,prevLeftScore:E,prevRightScore:L,isLive:A,isLiveCrowdsourcing:D,isFootball:O,statusColor:U,secondaryTextProps:i,children:(0,n.jsx)(a.EY,{position:"relative",color:U,align:"center",block:!0,lineClamp:1,...i,children:Z?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{id:B,values:X})," (",M,")"]}):q?(0,n.jsx)(l.A,{id:"live"}):D?(0,n.jsxs)(a.so,{justify:"center",align:"center",children:[(0,n.jsx)(d.Mv5,{mr:"xs",fill:"sofaSingles.crowdsourcingLive"}),(0,n.jsx)(a.EY,{font:"body.small",lineHeight:"16px",color:"inherit",children:(0,n.jsx)(l.A,{id:"live"})})]}):N?(0,n.jsx)(y.lx,{time:p.time,status:p.status,lastPeriod:p.lastPeriod,currentPeriodStartTimestamp:p.currentPeriodStartTimestamp}):z||(p.isAwarded||I?(0,n.jsx)(l.A,{id:I?"basic.awaitingConfirmation":"awarded"}):W?(0,n.jsxs)(a.EY,{font:"body.medium",color:U,children:[(0,n.jsx)(l.A,{id:"penalties_short"})," ",v.penalties," - ",g.penalties]}):(0,n.jsx)(l.A,{id:G,values:X,defaultMessage:G}))})})]})}}}]);