(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5703],{75347:function(e,c,a){"use strict";a.d(c,{U:function(){return t.M}});var t=a(54287)},62483:function(e,c,a){"use strict";a.d(c,{y:function(){return b},G:function(){return _}}),a(4771);var t,r=a(74817),i=a(54907),o=a(71248);a(1088);var n=a(19191),l=a(83759),m=a(20144),h=a(64663),_=((t=_||{}).FIXTURE="fixture",t.LIVE="live",t.RESULT="result",t);let b=({competitionName:e,date:c,homeTeam:a,awayTeam:t,buttons:u,updateHomeTeamPrediction:f,updateAwayTeamPrediction:p,maxPredictionValue:x=30,matchStatus:v,homeTeamSavedPrediction:N,awayTeamSavedPrediction:j,homeTeamScore:T,awayTeamScore:L,points:S,childrenComponents:I,liveScoreTextComponent:A,shouldDisableCounter:C=!1})=>{let w=(0,n.u)(),P=(0,o.useRef)(null),[R,M]=(0,o.useState)(N||0),[y,k]=(0,o.useState)(j||0),[U,V]=(0,o.useState)(null);(0,o.useEffect)(()=>{f&&f(R)},[R,f]),(0,o.useEffect)(()=>{p&&p(y)},[y,p]);let E=e=>{P.current&&!P.current.contains(e.target)&&V(null)};(0,o.useEffect)(()=>(null!==U?document.addEventListener("click",E):document.removeEventListener("click",E),()=>{document.removeEventListener("click",E)}),[U]);let D=e=>{V(e)};return(0,r.jsxs)("div",{className:i("fco-match-prediction",{"fco-match-prediction--live":v===_.LIVE,"fco-match-prediction--result":v===_.RESULT}),children:[(0,r.jsxs)("div",{className:"fco-match-prediction__header",children:[(0,r.jsxs)("div",{className:"fco-match-prediction__headline",children:[(0,r.jsx)("div",{className:"fco-match-prediction__competition-name",children:e}),(0,r.jsx)("div",{className:"fco-match-prediction__match-date",children:c})]}),v===_.LIVE&&(0,r.jsxs)("div",{className:"fco-match-prediction__indicator-name",children:[(0,r.jsx)(h.P,{hideText:!0}),w("page.goal6.matchPrediction.live")]}),v===_.RESULT&&(0,r.jsx)("div",{className:"fco-match-prediction__indicator-name",children:w("page.goal6.matchPrediction.fullTime")})]}),(0,r.jsxs)("div",{className:"fco-match-prediction__set-result",children:[(0,r.jsxs)("div",{className:"fco-match-prediction__team",children:[(0,r.jsx)("img",{src:a.assets.logo,alt:a.code,className:"fco-match-prediction__team-img"}),(0,r.jsx)("span",{className:"fco-match-prediction__team-code",children:a.code})]}),(0,r.jsxs)("div",{className:i("fco-match-prediction__central-section",{"fco-match-prediction__central-section--fixture":v===_.FIXTURE}),children:[v===_.FIXTURE&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.C,{hideApostrophe:!0,isVertical:!0,maxValue:x,onChange:M,value:R,shouldDisableCounter:C}),(0,r.jsx)("span",{className:"fco-match-prediction__counters-separator",children:"-"}),(0,r.jsx)(l.C,{hideApostrophe:!0,isVertical:!0,onChange:k,maxValue:x,value:y,shouldDisableCounter:C})]}),[_.LIVE,_.RESULT].includes(v)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"fco-match-prediction__predicted-score",children:[(0,r.jsx)("div",{className:"fco-match-prediction__predicted-score-label",children:w("page.goal6.matchPrediction.yourPrediction")}),(0,r.jsxs)("div",{className:"fco-match-prediction__predicted-score-score",children:[N,(0,r.jsx)("span",{children:"-"}),j]})]}),(0,r.jsxs)("div",{className:"fco-match-prediction__predicted-score",children:[v===_.LIVE&&A,v===_.RESULT&&(0,r.jsx)("div",{className:"fco-match-prediction__predicted-score-label",children:w("page.goal6.matchPrediction.fullTimeScore")}),v===_.LIVE&&(0,r.jsxs)("div",{className:"fco-match-prediction__predicted-score-score",children:[T,(0,r.jsx)("span",{children:"-"}),L]}),v===_.RESULT&&(0,r.jsxs)("div",{className:"fco-match-prediction__predicted-score-score",children:[T,(0,r.jsx)("span",{children:"-"}),L]})]})]})]}),(0,r.jsxs)("div",{className:"fco-match-prediction__team",children:[(0,r.jsx)("img",{src:t.assets.logo,alt:t.code,className:"fco-match-prediction__team-img"}),(0,r.jsx)("span",{className:"fco-match-prediction__team-code",children:t.code})]})]}),(0,r.jsxs)("div",{className:"fco-match-prediction__display-child",ref:P,children:[(0,r.jsx)("div",{className:"fco-match-prediction__buttons-section",children:null==u?void 0:u.map((e,c)=>(0,r.jsx)("button",{className:i("fco-match-prediction__button",{"fco-match-prediction__button--active":U===c}),onClick:()=>{var a;null==(a=e.onClick)||a.call(e),D(c)},children:e.label},e.label))}),I&&(null==I?void 0:I.length)>0&&I.map((e,c)=>U!==c?null:(0,r.jsxs)("div",{className:"fco-match-prediction__child-component",children:[e.name&&(0,r.jsx)("div",{className:"fco-match-prediction__child-component-name",children:e.name}),e.component]},e.name))]}),void 0!==S&&v!==_.FIXTURE&&(0,r.jsx)(m.I,{content:w("page.goal6.matchPrediction.points",{count:S,param1:S})})]})}},54975:function(){},88204:function(){},4771:function(){},98627:function(){},23298:function(){},85546:function(){},76910:function(){},30169:function(e,c,a){"use strict";a.d(c,{M:function(){return W}}),a(54975);var t=a(74817),r=a(54907);a(1088),a(71248);var i=a(19191),o=a(69351),n=a(89506),l=a(64381),m=a(81814),h=a(65171);let D=e=>void 0!==e.teamA&&void 0!==e.teamB,g=e=>{let{penScore:c,aggScore:a,score:t,teamName:r}=e,i=c||a||t;return!!i&&(i[r]??0)<(i["teamA"===r?"teamB":"teamA"]??0)},W=({competitionName:e,round:c,state:a,period:_,startDate:u,teamA:f,teamB:p,score:x,aggScore:v,penScore:N,bottomText:j,...T})=>{let{placement:L="left",text:S,includeArrow:I,bold:A}=j??{},C=(0,i.u)(),w="LIVE"===a,P="RESULT"===a;return(0,t.jsxs)(n.L,{className:"fco-match-card",...T,"data-state":a,children:[(0,t.jsxs)("div",{className:"fco-match-card__header",children:[(0,t.jsx)("span",{className:"fco-match-card__competition",children:e}),(0,t.jsx)("div",{className:"fco-match-card__state",children:"FIXTURE"===a?(0,t.jsx)(l.M,{startDateISOString:u}):(0,t.jsxs)(t.Fragment,{children:[w&&(0,t.jsx)("span",{className:"fco-match-card__live-indicator"}),(0,t.jsx)(m.M,{state:a,period:_})]})})]}),(0,t.jsxs)("div",{className:r("fco-match-card__score-table",{"fco-match-card__score-table--agg":!!v,"fco-match-card__score-table--pen":!!N,"fco-match-card__score-table--agg-and-pen":!!v&&!!N}),children:[(0,t.jsx)("span",{className:"fco-match-card__round",children:c}),(0,t.jsx)("div",{className:r("fco-match-card__team","fco-match-card__team--home",{"fco-match-card__team--loser":P&&g({score:x,penScore:N,aggScore:v,teamName:"teamA"}),"fco-match-card__team--with-asterisk":null==f?void 0:f.includeAsterisk}),children:(0,t.jsx)(h.M,{...f})}),(0,t.jsx)("div",{className:r("fco-match-card__team","fco-match-card__team--away",{"fco-match-card__team--loser":P&&g({score:x,penScore:N,aggScore:v,teamName:"teamB"}),"fco-match-card__team--with-asterisk":null==p?void 0:p.includeAsterisk}),children:(0,t.jsx)(h.M,{...p})}),!!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:r("fco-match-card__score-heading","fco-match-card__score-heading--agg"),children:C("generic.match.agg")}),(0,t.jsxs)("div",{className:r("fco-match-card__result","fco-match-card__result--agg"),children:[(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--home"),children:v.teamA}),(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--away"),children:v.teamB})]})]}),!!N&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:r("fco-match-card__score-heading","fco-match-card__score-heading--pen"),children:C("generic.match.pen")}),(0,t.jsxs)("div",{className:r("fco-match-card__result","fco-match-card__result--pen",{"fco-match-card__result--active":w&&(null==_?void 0:_.type)==="PENALTY"}),children:[(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--home"),children:N.teamA}),(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--away"),children:N.teamB})]})]}),(0,t.jsxs)("div",{className:r("fco-match-card__result","fco-match-card__result--regular",{"fco-match-card__result--empty":!x||x&&!D(x),"fco-match-card__result--active":w&&(null==_?void 0:_.type)!=="PENALTY"}),children:[(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--home"),children:(null==x?void 0:x.teamA)??"-"}),(0,t.jsx)("span",{className:r("fco-match-card__score","fco-match-card__score--away"),children:(null==x?void 0:x.teamB)??"-"})]})]}),S&&(0,t.jsxs)("div",{className:r("fco-match-card__footer",{"fco-match-card__footer--aligned-to-right":"right"===L}),children:[(0,t.jsx)("p",{className:r("fco-match-card__bottom-text",{"fco-match-card__bottom-text--bold":A}),children:S}),I&&(0,t.jsx)(o.I,{glyph:"scroller-right"})]})]})}},54287:function(e,c,a){"use strict";a.d(c,{M:function(){return g}}),a(88204);var t=a(74817),r=a(54907);let g=({homeTeam:e,awayTeam:c,score:a,isFutureMatch:i})=>{var o,n,l,m;let h=null==(o=e.assets)?void 0:o.logo,_=null==(n=c.assets)?void 0:n.logo;return(0,t.jsxs)("div",{className:r("fco-match-pill"),children:[(0,t.jsx)("div",{className:"fco-match-pill__team",children:null!=(l=e.assets)&&l.logo?(0,t.jsx)("img",{className:"fco-match-pill__team-logo",src:null==h?void 0:h.src,width:null==h?void 0:h.width,height:null==h?void 0:h.height,alt:e.name}):e.name}),!i&&(0,t.jsxs)("div",{className:"fco-match-pill__score",children:[null==a?void 0:a.homeGoals,(0,t.jsx)("span",{className:"fco-match-pill__score-separator",children:" - "}),null==a?void 0:a.awayGoals]}),(0,t.jsx)("div",{className:"fco-match-pill__team",children:null!=(m=e.assets)&&m.logo?(0,t.jsx)("img",{className:"fco-match-pill__team-logo",src:null==_?void 0:_.src,width:null==_?void 0:_.width,height:null==_?void 0:_.height,alt:c.name}):c.name})]})}},64381:function(e,c,a){"use strict";a.d(c,{M:function(){return d}}),a(98627);var t=a(74817),r=a(79262);let d=({startDateISOString:e,href:c,rel:a,onClick:i})=>{let o=(0,r.u)(new Date(e),{hour:"numeric",minute:"numeric"});return c?(0,t.jsx)("a",{href:c,rel:a,className:"fco-match-start-date",onClick:i,children:(0,t.jsx)("time",{dateTime:e,children:o})}):(0,t.jsx)("time",{className:"fco-match-start-date",dateTime:e,children:o})}},81814:function(e,c,a){"use strict";a.d(c,{M:function(){return g}}),a(23298);var t=a(74817),r=a(54907);a(1088),a(71248);var i=a(19191),o=a(62997),n=a(98378),l=a(64663);let m={FIXTURE:null,LIVE:null,FIRST_HALF:null,SECOND_HALF:null,HALF_TIME:"generic.match.ht",EXTRA_TIME_PENDING:"generic.match.et",EXTRA_TIME_FIRST_HALF:null,EXTRA_TIME_HALF_TIME:"generic.match.htet",EXTRA_TIME_SECOND_HALF:null,PENALTY_PENDING:"generic.match.aet",PENALTY:"generic.match.pen",RESULT:"generic.match.ft",POSTPONED:"generic.match.postponed",SUSPENDED:"generic.match.suspended",CANCELLED:"generic.match.cancelled"},h=["FIRST_HALF","SECOND_HALF","EXTRA_TIME_FIRST_HALF","EXTRA_TIME_SECOND_HALF"],g=({state:e,period:c,indicator:a,href:_,rel:u,onClick:f})=>{let p=(0,i.u)(),x="LIVE"===e&&(null==c?void 0:c.type),v=["CANCELLED","POSTPONED"].includes(e);if(x&&(null==c?void 0:c.minute)&&h.includes(c.type))return(0,t.jsxs)(o.L,{href:_,rel:u,className:r("fco-match-state",{"fco-match-state--live":"LIVE"===e}),onClick:f,children:["LIVE"===e&&a&&(0,t.jsx)(l.P,{hideText:!0}),(0,t.jsx)(n.M,{minute:null==c?void 0:c.minute,extra:null==c?void 0:c.extra})]});{let a=m[x?c.type:e];return a?(0,t.jsx)(o.L,{onClick:f,href:_,rel:u,className:r("fco-match-state",{"fco-match-state__period":x,"fco-match-state--cancelled-or-postponed":v}),children:p(a)}):null}}},65171:function(e,c,a){"use strict";a.d(c,{M:function(){return F}}),a(85546);var t=a(74817),r=a(54907);a(1088),a(71248);var i=a(19191),o=a(99951),n=a(28462),l=a(89506);let F=({teamName:e,teamNameShort:c,crestPath:a,reversed:m,responsive:h,wrap:_,href:u,rel:f,matchTeamCrestImageProps:p,redCards:x,...v})=>{let{teamPlaceholderImageUrl:N}=(0,o.u)(),j=(0,i.u)();return(0,t.jsxs)(l.L,{href:u,rel:f,...v,className:r("fco-match-team-with-crest",v.className,{"fco-match-team-with-crest--reversed":m,"fco-match-team-with-crest--responsive":h,"fco-match-team-with-crest--wrap":_,[`fco-match-team-with-crest--${x}-red-cards`]:void 0!==x}),children:[a?(0,t.jsx)(n.I,{alt:`${e} crest`,src:a,onError:e=>{e.currentTarget.src=N},...p}):(0,t.jsx)("img",{className:"fco-image",src:N,alt:"team-logo"}),e||c?(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)("div",{className:"fco-team-name fco-long-name",children:e}),(0,t.jsx)("div",{className:"fco-team-name fco-short-name",children:c??e})]}):(0,t.jsx)("div",{className:"fco-team-name",children:j("generic.tbd")})]})}},98378:function(e,c,a){"use strict";a.d(c,{M:function(){return s}}),a(76910);var t=a(74817);let s=({minute:e,extra:c})=>(0,t.jsx)("span",{className:"fco-match-time",children:`${e??"0"}' ${c?` + ${c}'`:""}`})}}]);