!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]="a376520b-6ea7-4b82-910f-8173aa422594",e._sentryDebugIdIdentifier="sentry-dbid-a376520b-6ea7-4b82-910f-8173aa422594")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9097],{3881:(e,t,n)=>{"use strict";n.d(t,{E:()=>r});var s=n(64082),a=n(6029),l=n(99064),i=n(43451);function r(e){var{height:t=800,width:n="100%",rowHeight:r=45,wrapperStyle:o={},rows:d,animate:u=!1,rowGap:c=8,uniqueKey:m}=e,x=(0,s.T)(e,["height","width","rowHeight","wrapperStyle","rows","animate","rowGap","uniqueKey"]);return 0===t?null:(0,a.jsx)(l.az,Object.assign({maxW:"100%",bg:"surface.s1",overflow:"hidden"},x,{style:o},{children:(0,a.jsx)(i.D,Object.assign({animate:u,width:n,height:d&&r?d*(r+c):t,uniqueKey:m},{children:(0,a.jsx)(a.Fragment,{children:d?Array(d).fill(null).map((e,t)=>(0,a.jsx)("rect",{x:0,y:t*(r+c),width:"100%",height:r},t)):(0,a.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},4740:(e,t,n)=>{"use strict";n.d(t,{N:()=>m});var s=n(6029),a=n(94446),l=n(37071),i=n(76356),r=n(65078),o=n(16620),d=n(48886),u=n(13266),c=n(24159);let m=e=>{let{playerStatsOnEvent:t,index:n}=e,{event:m,player:x}=t,{openEventPlayerStatistics:p}=(0,o.d)(),[h,g]=(0,r.jr)(m,"homeScore","awayScore",m),[j,y]=(0,r.jr)(m,"homeTeam","awayTeam",m);return(0,s.jsx)(u.tj,{event:m,onClick:e=>{e.preventDefault(),p({event:m,player:x},d._.TopStats)},children:(0,s.jsxs)(i.so,{h:"5xl",p:"lg",pl:n?"sm":"lg",align:"center",_hover:{background:"surface.s2"},children:[n&&(0,s.jsx)(l.EY,{w:"lg",mr:"sm",textStyle:"body.small",textAlign:"center",children:n}),(0,s.jsx)(a.t,{id:x.id,name:x.name,size:40,mr:"lg"}),(0,s.jsxs)(i.az,{flexGrow:"1",flexShrink:"1",flexBasis:"[auto]",children:[(0,s.jsx)(l.EY,{display:"block",children:(0,s.jsx)(c.c,{entity:x})}),(0,s.jsxs)(i.so,{p:"xs",mt:"2xs",align:"center",br:"xs",bg:"surface.s2",style:{display:"inline-flex"},children:[(0,s.jsx)(a.p,{size:16,id:j.id,name:j.name}),(0,s.jsxs)(l.EY,{mx:"sm",display:"block",textStyle:"display.micro",lineHeight:"1",children:[h.display," - ",g.display]}),(0,s.jsx)(a.p,{size:16,id:y.id,name:y.name})]})]}),(0,s.jsx)(i.az,{alignSelf:"stretch",my:"auto",children:(0,s.jsx)(l.EY,{children:e.children})})]})})}},4866:(e,t,n)=>{"use strict";n.d(t,{e:()=>a.e,w:()=>s.w});var s=n(53192),a=n(33480)},5961:(e,t,n)=>{"use strict";n.d(t,{IJ:()=>x});let s=(e,t)=>t?{0:e?"var(--graphics-terrain-footballLineups)":"var(--heatmap-hm1)",.1:"var(--heatmap-hm2)",.35:"var(--heatmap-hm3)",.8:"var(--heatmap-hm4)",1:"var(--heatmap-hm5)"}:{0:"#f8d496",.05:"#fee644",.25:"#ff9000",.4:"#fc6800",.6:"#f00800",.75:"#cc0600",.85:"#b00400",.99:"#940000",1:"#780000"},a=e=>e?{MAX_POINT_VALUE:6,WIDTH:160,HEIGHT:100}:{MAX_POINT_VALUE:9,WIDTH:500,HEIGHT:363};function l(e,t){let n=[];for(let s=0;s2&&void 0!==arguments[2]?arguments[2]:10,s=[],a=1/n;for(let n=0;n<=e;n+=a)s.push(Math.exp(-n*n/(2*t*t)));return s},r=(e,t,n,s)=>Math.sqrt(Math.pow(n-e,2)+Math.pow(s-t,2)),o=(e,t,n)=>{let{width:s,height:a,influenceRadius:i,precisionLevel:o=10}=n,d=l(s,a);for(let n=0;n{let{height:s,width:a,gradientScaleFactor:l,gradientRange:i}=n,r=document.createElement("canvas");r.height=s,r.width=a;let o=r.getContext("2d");if(!o)throw Error("No heatmap canvas context found");let d=o.getImageData(0,0,a,s),u=d.data;for(let n=0;n{let s=Math.round(t),a=Math.round(n),l=Math.round(e);return ls?l:s:a},c=(e,t)=>{let{width:n,height:s,isFlipped:a=!1,pointMaximum:i=100,widthScaleFactor:r=1.6,heightScaleFactor:o=1,pointValue:d=1}=t,c=l(n,s);return e.forEach(e=>{let t=a?i-e.x:e.x,l=a?e.y:i-e.y,m=u(t*r,0,n-1),x=u(l*o,0,s-1);c[m][x]+=d*(e.count||1)}),c},m=(e,t,n,r,u)=>{let{containerId:m,isAway:x=!1,width:p,height:h,numberOfMatches:g,shootMapType:j=1,precisionLevel:y=10,isTransparentBackground:v}=n,{HEIGHT:f,WIDTH:b,MAX_POINT_VALUE:T}=a(e),w=document.getElementById(m);if(!w)throw Error("No DOM container element for HeatMap provided");let S=e?function(e){let t=14;return e&&e>1&&(t=Math.round((1-Math.pow(e/38,.28))*10+4)),t}(g||1):function(e){let t=20;return e>82?Math.round((1-Math.pow(e/110,.1))*8+12):Math.round((1-Math.pow(e/82,.1))*8+12)}(g||1),C=e?c(t,{isFlipped:x,width:b,height:f}):function(e,t,n,s){let a=l(n+1,s+1);return e.forEach(e=>{let{x:n,y:s,made:l,missed:i}=e;switch(t){case 1:a[n- -250][s- -40]+=l+i;break;case 2:a[n- -250][s- -40]+=l;break;default:a[n- -250][s- -40]+=i}}),a}(t,j,b,f);!e&&g&&g>5&&function(e,t,n,s){let a,l,i,r,o,d;for(r=0;r<=100;r++){for(a=0,l=0,i=0,o=2;o<=10;o++)++i,a+=s[r][80-o],l+=s[r][80+o];for(d=0;d<=2;d++)s[r][e+d]=(a+l)/(2*i),s[r][e-d]=(a+l)/(2*i)}}(80,2,0,C);let I=function(e,t,n,a,l){let i=document.createElement("canvas");i.width=1,i.height=1e3;let r=i.getContext("2d");if(!r)throw Error("No color gradient context for heatmap found");let o=r.createLinearGradient(0,0,1,1e3),d=s(l,n);return Object.keys(d).forEach(e=>{let n=d[e],s=Number(e);a&&s<.2?o.addColorStop(s,t.setAlpha(n,s+.2)):o.addColorStop(s,t.setAlpha(n,1))}),r.fillStyle=o,r.fillRect(0,0,1,e),r.getImageData(0,0,1,e).data}(1e3,r,e,v,u),_=d(o(C,i(S,S/3,y),{width:b,height:f,influenceRadius:S,precisionLevel:y}),I,{height:f,width:b,gradientScaleFactor:1e3/T,gradientRange:1e3}),k=document.createElement("canvas");k.height=h,k.width=p;let A=k.getContext("2d");if(!A)throw Error("Heatmap canvas context not found");A.drawImage(_,0,0,p,h),w.innerHTML="",w.appendChild(k)};function x(e,t,n,s){try{m(!0,e,t,n,s)}catch(e){console.error("In render football heatmap",e)}}},6244:(e,t,n)=>{"use strict";n.d(t,{l:()=>u,W:()=>c});var s=n(6029),a=n(21377),l=n(37071),i=n(62042),r=n(76356),o=n(67628);let d=(0,i.Fj)({base:{display:"inline-block",borderRadius:"md",px:"sm"},variants:{groundType:{[a.QWe.HardcourtIndoor]:{bg:"tennis.terrain.hardcourtIndoor"},[a.QWe.HardcourtOutdoor]:{bg:"tennis.terrain.hardcourtOutdoor"},[a.QWe.Hard]:{bg:"tennis.terrain.hardcourtOutdoor"},[a.QWe.CarpetIndoor]:{bg:"tennis.terrain.default"},[a.QWe.Grass]:{bg:"tennis.terrain.grass"},[a.QWe.Clay]:{bg:"tennis.terrain.clay"},[a.QWe.RedClay]:{bg:"tennis.terrain.clay"},[a.QWe.SyntheticOutdoor]:{bg:"tennis.terrain.default"},default:{bg:"tennis.terrain.default"}}}}),u=(0,r.I4)("div",d),c=e=>{let{groundType:t}=e;return t?(0,s.jsx)(u,{groundType:t,children:(0,s.jsx)(l.EY,{display:"block",textStyle:"assistive.default",h:"lg",color:"surface.s1",children:(0,s.jsx)(o.n,{id:t})})}):null}},11506:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Q});var s=n(6029),a=n(21377),l=n(4967),i=n(55729),r=n(90248),o=n(45860),d=n(75751),u=n(6354),c=n(79528),m=n(19944),x=n(83260),p=n(69435),h=n(86679),g=n(83318),j=n(97150),y=n(42078),v=n(77235),f=n(59721),b=n(76356),T=n(99064),w=n(68543),S=n(3539),C=n(50433);function I(e){let{standings:t,hasHomeAwayStandings:n}=(0,i.useContext)(p.P),l=t.find(t=>t.id===e.tableId);return l?(0,s.jsx)(S.d,{...e,children:(0,s.jsx)(w.A,{children:n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(T.tU.Panel,{tabKey:"all",children:(0,s.jsx)(C.G,{tableName:l.name,...e,type:a.lpv.Total})}),(0,s.jsx)(T.tU.Panel,{tabKey:"home",children:(0,s.jsx)(C.G,{tableName:l.name,...e,type:a.lpv.Home,loaderHeight:l.rows.length})}),(0,s.jsx)(T.tU.Panel,{tabKey:"away",children:(0,s.jsx)(C.G,{tableName:l.name,...e,type:a.lpv.Away,loaderHeight:l.rows.length})})]}):(0,s.jsx)(C.G,{tableName:l.name,type:a.lpv.Total,...e})})}):null}var _=n(37071),k=n(48683),A=n(11033),z=n(65457),M=n(82287),R=function(e){return e[e.AFC=1]="AFC",e[e.NFC=2]="NFC",e[e.OVERALL=3]="OVERALL",e}({});let E={1:"American",2:"National"},P={1:"AFC",2:"NFC"};function Y(e,t){return t.findIndex(e=>["AMERICAN","NATIONAL"].includes(e.name))>-1?E[e]:P[e]}var H=n(67149);let N=e=>{let{tab:t}=e,{standings:n,seasonId:l,isStandingsTableEmpty:r}=(0,i.useContext)(p.P),o=function(e,t){return 3===e?t.filter(e=>!(e.name.includes("AFC")||e.name.includes("NFC")||e.name.includes("AMERICAN")||e.name.includes("NATIONAL"))):1===e?t.filter(e=>e.name.includes("AFC")||e.name.includes("AMERICAN")):t.filter(e=>e.name.includes("NFC")||e.name.includes("NATIONAL"))}(t,n);return l?(0,s.jsx)(s.Fragment,{children:o.map((e,t)=>{let[n,l]=(0,H.Yp)(e.rows);return(0,s.jsx)(k.Zp,{children:(0,s.jsxs)(b.so,{direction:"column",py:"xs",children:[(0,s.jsxs)(b.so,{align:"center",px:"sm",pt:"sm",columnGap:"md",children:[(0,s.jsx)(f.e,{id:g.nJ,name:e.name,w:40,h:40}),(0,s.jsx)(_.EY,{textStyle:"display.large",children:e.name})]}),(0,s.jsxs)(M.C.Provider,{value:{colors:n,texts:l},children:[(0,s.jsx)(C.G,{tableName:e.name,type:a.lpv.Total}),!r&&(0,s.jsx)(A.K,{rows:e.rows,descriptions:e.descriptions,tieBreakingRule:e.tieBreakingRule,defaultOpenedFirstRules:0===t})]})]})},e.id)})}):null},q=()=>{let{standings:e,displayType:t,setDisplayType:n}=(0,i.useContext)(p.P),[a,l]=(0,i.useState)(R.AFC);return(0,s.jsxs)(b.so,{direction:"column",gap:"sm",children:[(0,s.jsx)(k.Zp,{children:(0,s.jsxs)(b.so,{p:"sm",justify:"space-between",children:[(0,s.jsx)("div",{children:(0,s.jsxs)(T.tU,{variant:"secondary",value:a,onChange:e=>l(e),children:[(0,s.jsx)(T.tU.Tab,{children:Y(R.AFC,e)}),(0,s.jsx)(T.tU.Tab,{children:Y(R.NFC,e)}),(0,s.jsx)(T.tU.Tab,{children:(0,s.jsx)(r.A,{id:"standings.overall"})})]})}),(0,s.jsx)(z.A,{displayType:t,setDisplayType:n,items:["short","form"],isNarrowLayout:!0})]})}),(0,s.jsx)(N,{tab:a})]})};var F=n(2438);function L(e){let{branding:t}=e,{isNarrowLayout:n,uniqueTournamentId:a,standings:l,seasonId:o}=(0,i.useContext)(p.P),[d,u]=(0,i.useState)(l[0]);if((0,i.useEffect)(()=>{u(l[0])},[l,o]),!d)return null;if(a===g.nJ&&n)return(0,s.jsx)(q,{});let c=(0,s.jsx)(b.az,{p:"sm",children:(0,s.jsx)(T.ms,{items:l,initialSelectedItem:d,selectedItem:d,renderItem:(e,t)=>{if(t&&e){var n,a;return(0,s.jsxs)(b.so,{align:"center",children:[(0,s.jsx)(b.az,{children:(0,s.jsx)(f.e,{id:(null==(n=e.tournament.uniqueTournament)?void 0:n.id)||e.tournament.id,name:null==(a=e.tournament.uniqueTournament)?void 0:a.name,size:24,ml:"-4",mr:"4"})}),(0,s.jsx)(b.az,{children:e.name})]})}return(0,s.jsx)(F.v,{table:e})},onSelectedItemChange:e=>{let{selectedItem:t}=e;null!==t&&u(t)}})});return(0,s.jsx)(I,{tableId:d.id,subheader:c,hasDropdown:!0,title:n?void 0:(0,s.jsx)(r.A,{id:"tournament.standings"}),branding:t})}var D=n(7263),O=n(31215);function W(e){let{sport:t,branding:n}=e,{uniqueTournamentId:l,tournamentId:r,seasonId:d,standings:u}=(0,i.useContext)(p.P),{data:c}=(0,o.Ay)(l&&d?[a.V3t.seasonRounds(l,d),"HEAD"]:null,{fetcher:D.n}),{data:m}=(0,o.Ay)(l&&d?[a.V3t.seasonGroups(l,d),"HEAD"]:null,{fetcher:D.n});return c&&m?(0,s.jsx)(b.so,{direction:"column",gap:{base:"sm",md:"md"},children:u.map(e=>(0,s.jsx)(I,{tableId:e.id,hasRounds:c&&m,subheader:(0,s.jsx)(b.az,{pt:"md",px:"sm",pb:"xs",children:(0,s.jsx)(O.A,{tournamentId:r,uniqueTournamentId:l,tournamentName:(0,s.jsx)(F.v,{table:e})})}),branding:n,sport:t},e.id))}):(0,s.jsx)(L,{branding:n})}function Q(e){let{uniqueTournament:t,seasonId:n,selectedSeason:f,isNarrowLayout:b}=e,{initialStandings:T}=(0,i.useContext)(u.O),[w,S]=(0,x.A)(g.s4,"short"),[C,_]=(0,i.useState)(),{data:k,error:A}=(0,o.Ay)(a.V3t.standings(t.id,n,a.lpv.Total),{keepPreviousData:!0}),z=(null==k?void 0:k.standings)||T||[],{hasGroups:M,hasDropdown:R,showHorizontalStandings:E,hasHomeAwayStandings:P}=function(e){let{standings:t,uniqueTournamentId:n,seasonId:s}=e,{initialHasHomeAway:l}=(0,i.useContext)(u.O),{hasHomeAway:r}=(0,h.A)({hasHomeAway:{route:a.V3t.standings(n,s,a.lpv.Home)}},[n,s]),o=n===a.G6l.Euro||n===a.G6l.CopaAmerica||n===a.G6l.ClubWorldCup,[d,c]=(0,i.useMemo)(()=>{let e,n=!1;for(let s=0,a=t.length;s1;return[n,s]},[t]);return{hasDropdown:c,hasGroups:d,showHorizontalStandings:o,hasHomeAwayStandings:null!=r?r:l}}({uniqueTournamentId:t.id,seasonId:n,standings:z}),{events:Y}=(0,m.Y)(t.id,(0,l.UG)(new Date),E),H=(0,c.b)(t.id,"standings");return A?null:(null==z?void 0:z.length)&&void 0!==P?(0,s.jsx)(d.t,{tag:"StandingsContainer",children:(0,s.jsx)(p.P.Provider,{value:{isNarrowLayout:!!b,uniqueTournamentId:t.id,seasonId:n,displayType:w,setDisplayType:S,standings:z,displayTypeOptions:[...a.ur4],homeTeamId:void 0,awayTeamId:void 0,selectedTeamId:void 0,hasPerformanceGraphFeature:!!t.hasPerformanceGraphFeature,tournamentId:E?(0,j.h)(Y):void 0,hasHomeAwayStandings:P,selectedSeason:f,isStandingsTableEmpty:C,setIsStandingsTableEmpty:_},children:E?(0,s.jsx)(v.A,{branding:H,utId:t.id}):M?(0,s.jsx)(W,{sport:t.category.sport.slug,branding:H}):R?(0,s.jsx)(L,{branding:H}):(0,s.jsx)(I,{tableId:z[0].id,hasDropdown:R,title:b?void 0:(0,s.jsx)(r.A,{id:"tournament.standings"}),hasDefaultRightTeamInPerformanceGraph:!0,branding:H})})}):(0,s.jsx)(y.d,{noSeasonPicker:!0,isNarrowLayout:b,branding:H})}},15771:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var s=n(6029),a=n(87827),l=n(21377),i=n(98516),r=n(52854);let o=e=>Math.round((e+Number.EPSILON)*100)/100,d=function(e){let{stat:t,sport:n}=e,{selectedStat:d}=e;switch(d=d.split(r.I)[0],n){case l.QCR.Football:var u,c,m=d;switch(m){case"accuratePasses":case"accurateLongBalls":case"accurateCrosses":case"shots":case"shotsOnTarget":case"successfulDribbles":case"tackles":case"interceptions":case"clearances":case"corners":case"fouls":return t?(0,i.M)(t[m]/t.matches,1):0;case"avgRating":return t?(0,s.jsx)(a.G,{format:"sideBox",rating:o(t[m])}):0;case"averageBallPossession":return t?"".concat((0,i.M)(t.averageBallPossession,1),"%"):0;case"penaltyGoals":return t?t.penaltiesTaken?"".concat(t.penaltyGoals," / ").concat(t.penaltiesTaken):t.penaltyGoals:0;case"penaltyGoalsConceded":return t?"".concat(t.penaltyGoalsConceded," / ").concat(t.penaltiesCommited):0;default:return t?o(t[m]):0}case l.QCR.Basketball:var x=d;switch(x){case"points":case"pointsAgainst":case"plusMinus":case"assists":case"rebounds":case"defensiveRebounds":case"offensiveRebounds":case"steals":case"turnovers":case"blocks":case"fastbreakPoints":return(0,i.M)(t[x]/t.matches,1);case"fieldGoalsPercentage":case"fieldGoalsPercentageAgainst":case"freeThrowsPercentage":case"threePointsPercentage":case"threePointsPercentageAgainst":return"".concat((0,i.M)(t[x],1),"%");default:return o(t[x])}case l.QCR.Handball:return["goalsScored","goalsConceded","fastbreakGoals","steals","twoMinutePenalties","goalsInPowerplay","shorthandedGoals"].includes(u=d)?(0,i.M)(t[u]/t.matches,1):["shootingPercentage"].includes(u)?(0,i.M)(t[u],1)+"%":"sevenMetersScored"===u?"".concat(t.sevenMetersScored,"/").concat(t.sevenMetersTotal):o(t[u]);case l.QCR.IceHockey:return["powerPlayPercentage","faceOffPercentage","penaltyKillPercentage"].includes(c=d)?(0,i.M)(t[c],1)+"%":"sevenMetersScored"===c?"".concat(t.sevenMetersScored,"/").concat(t.sevenMetersTotal):(0,i.M)(t[c]/t.matches,1);case l.QCR.Tennis:var p=d;switch(p){case"firstServePercentage":case"firstServePointsWonPercentage":case"secondServePercentage":case"secondServePointsWonPercentage":return(0,i.M)(t[p],1)+"%";case"avgAces":case"avgDoubleFaults":return(0,i.M)(t[p],1);case"breakPointsSavedPercentage":if(isNaN(t.opponentBreakPointsTotal)||isNaN(t.opponentBreakPointsScored))return 0;let h=t.opponentBreakPointsTotal-t.opponentBreakPointsScored;return"".concat(h,"/").concat(t.opponentBreakPointsTotal," (").concat((0,i.M)(t[p],1),"%)");case"breakPointsSavedConvertedPercentage":if(isNaN(t.breakPointsScored)||isNaN(t.breakPointsTotal))return 0;return"".concat(t.breakPointsScored,"/").concat(t.breakPointsTotal," (").concat((0,i.M)(t[p],1),"%)");case"tiebreakWinPercentage":let{tiebreaksWon:g,tiebreakLosses:j}=t;if(isNaN(g)||isNaN(j))return 0;let y=g+j;if(y>0)return"".concat(g,"/").concat(y," (").concat((0,i.M)(t[p],1),"%)");return"".concat(g,"/").concat(y," (0%)");default:return o(t[p])}default:return o(t[d])}}},18741:(e,t,n)=>{"use strict";n.d(t,{E5:()=>r,fz:()=>o,hE:()=>d});var s=n(6029),a=n(37071),l=n(90248),i=n(55803);function r(e){let{children:t,title:n,titleValues:r,titleHidden:o}=e;return t?(0,s.jsxs)(i.E,{children:[!o&&n&&(0,s.jsx)(a.H2,{textStyle:"display.medium",mb:"md",children:(0,s.jsx)(l.A,{id:n,values:r})}),t]}):null}function o(e){let{id:t,values:n}=e,i={...n||{},bold:function(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";n.d(t,{A:()=>o});var s=n(21377),a=n(55729),l=n(45860),i=n(62859),r=n(34209);function o(e){let{uniqueTournamentId:t,seasonId:n,division:o}=e,d=(0,a.useContext)(i.Ws),{types:u,currentType:c,setCurrentType:m,isLoading:x,isError:p}=(0,r.A)(t,n,d,"team"),h=d===s.QCR.Tennis?"mainDraw":c,g=t&&n&&!x?s.V3t.topTeams(t,n,h,o):null,{data:j,error:y}=(0,l.Ay)(g),v=null==j?void 0:j.topTeams,f=v?Object.keys(v):[],[b,T]=(0,a.useState)(""),w=v&&b&&v[b]?v[b].map(e=>({team:e.team,stats:e.statistics})):[];return(0,a.useEffect)(()=>{T("")},[t]),(0,a.useEffect)(()=>{f.length&&!b&&T(f[0])},[null==f?void 0:f.length]),{topTeams:v,stats:f,activeStat:b,setActiveStat:T,types:u,activeType:c,setActiveType:m,activeTeams:w,isError:!!y||p,isLoading:(!j||!b)&&!y}}},25635:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var s=n(64082),a=n(6029),l=n(21377),i=n(99064);function r(e){var{id:t,name:n,size:r=56,placeholder:o="/static/images/placeholders/manager.svg",style:d,className:u,grayscale:c}=e,m=(0,s.T)(e,["id","name","size","placeholder","style","className","grayscale"]);let x=m.w||m.width||r,p=m.h||m.height||r;return(0,a.jsx)(i._V,Object.assign({fallback:(0,a.jsx)(i._V,{br:"50%",style:d,w:x,h:p,src:o,alt:n}),src:t?l.ql2.image(t):"",alt:n,w:x,h:p,br:"50%",style:d,className:u,isGrayscale:c},m))}},25811:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});var s=n(6029),a=n(37071),l=n(62042),i=n(76356),r=n(99064),o=n(90248);function d(e){let{activeTabKey:t,onChange:n,tabs:d,variant:u,children:c,onTabClick:m,fullWidthTabs:x=!1}=e,p="secondary"===u;return(0,s.jsxs)(r.tU,{variant:"quaternary",value:t,onChange:n,children:[(0,s.jsx)(a.tR,{children:(0,s.jsx)(i.so,{gap:p?"xs":"sm",bg:p?"surface.s2":void 0,br:"lg",h:"[34px]",p:"2xs",className:p?(0,l.AH)({"--surface-s2":"transparent"}):void 0,w:x?"100%":"fit",mx:p?"auto":void 0,mb:x?"sm":void 0,children:d.map(e=>(0,s.jsx)(r.tU.Tab,{tabKey:e.tabKey,bg:e.tabKey===t?"neutrals.nLv1":void 0,display:"flex",h:"100%",px:"0",py:"0",br:"lg",ml:"0 !important",mr:"0 !important",onClick:()=>null==m?void 0:m(e.tabKey),w:x?"100%":void 0,children:e.isImage?(0,s.jsx)(i.az,{px:"lg",h:"xl",alignSelf:"center",children:e.tabValue}):(0,s.jsx)(a.EY,{display:"block",px:"tertiary"===u?"md":"lg",textStyle:p?"tab.secondary":"assistive.default",color:e.tabKey===t?"surface.s1":"neutrals.nLv1",textTransform:p?"uppercase":void 0,alignSelf:"center",children:"string"==typeof e.tabValue?(0,s.jsx)(o.A,{id:e.tabValue}):e.tabValue})},e.tabKey))})}),c]})}},28167:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/tournament",function(){return n(32154)}])},32154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>sO});var s=n(6029),a=n(21377),l=n(95669),i=n.n(l),r=n(19643),o=n(50417),d=n(73088),u=n(52951),c=n(947),m=n(58771),x=n(26331),p=n(97047);function h(e){let{uniqueTournament:t}=e,n=(0,c.A)(),l=(0,x.A)(),r=t.category,o=r.sport,u={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:n.formatMessage({id:"sport.".concat(o.slug)}),item:"".concat(a.VTF).concat(d.z.getTranslatedRoute(l,"eventList",{sport:o.slug}).route)},{"@type":"ListItem",position:2,name:n.formatMessage({id:r.slug}),item:"".concat(a.VTF).concat(d.z.getTranslatedRoute(l,"eventList.category",{sport:o.slug,category:r.slug}).route)},{"@type":"ListItem",position:3,name:t.name}]},h={"@context":"https://schema.org","@type":"SportsOrganization",name:t.name,sport:o.name,logo:a.V3t.image(t.id),url:"https://www.sofascore.com/tournament/".concat(o.slug,"/").concat(r.slug,"/").concat(t.slug,"/").concat(t.id),sameAs:(0,p._z)(t.id,l)};return(0,s.jsxs)(i(),{children:[(0,s.jsx)("script",{...(0,m.QQ)(u)}),",",(0,s.jsx)("script",{...(0,m.QQ)(h)}),","]})}var g=n(18741),j=n(13266);function y(){return(0,s.jsx)(g.fz,{id:"about.table.tennis.1",values:{ttlink:function(){for(var e=arguments.length,t=Array(e),n=0;n{switch(e){case 14749:case 14751:case 14747:case 14750:case 14748:return"ITTF Challenge Plus Oman Open";case 14691:case 14693:case 14689:case 14692:case 14690:return"ITTF Challenge Plus Portugal Open";case 14754:case 14752:case 14755:case 14753:return"ITTF Challenge Polish Open";case 14668:case 14666:case 14669:case 14664:case 14667:case 14665:return"ITTF Challenge Spanish Open";default:return null}},b=e=>e.includes("Women")?a.YT8.Female:e.includes("Mixed")?a.YT8.Mixed:e.includes("Boys")?"B":e.includes("Girls")?"G":a.YT8.Male,T=e=>e.includes("Doubles")?"D":"S";function w(e){let t=f(e.uniqueTournament.id);if(!t)return null;let n=b(e.uniqueTournament.name),a=T(e.uniqueTournament.name);return(0,s.jsxs)(v.J,{children:[(0,s.jsx)(g.fz,{id:"about.tt.ittf.challenge.1",values:{gender:n,type:a,tournamentName:t}}),(0,s.jsx)(y,{})]})}var S=n(76356),C=n(55729),I=n(33752),_=n(62859),k=n(19451),A=n(39676),z=n(29129),M=n(42678),R=n(98449),E=n(53486),P=n(8973),Y=n(21295),H=n(58047),N=n(87526),q=n(61836),F=n(27289),L=n(86679),D=n(30479),O=n(90248),W=n(69212);let Q={"davis-cup":"headerTitle.davis",challenger:"headerTitle.challenger",atp:"headerTitle.tennis.v1",wta:"headerTitle.tennis.v1","itf-men":"headerTitle.tennis.v1","itf-women":"headerTitle.tennis.v1"},G={1858:{id:"headerTitle.tt.bundesliga"},2122:{id:"headerTitle.tt.cl",values:{gender:a.YT8.Male}},9500:{id:"headerTitle.tt.cl",values:{gender:a.YT8.Female}},11457:{id:"headerTitle.tt.ec",values:{gender:a.YT8.Male,type:"D"}},11458:{id:"headerTitle.tt.ec",values:{gender:a.YT8.Female,type:"D"}},11459:{id:"headerTitle.tt.ec",values:{gender:a.YT8.Mixed,type:"D"}},11455:{id:"headerTitle.tt.ec",values:{gender:a.YT8.Male,type:"S"}},11456:{id:"headerTitle.tt.ec",values:{gender:a.YT8.Female,type:"S"}},9550:{id:"headerTitle.tt.ettu",values:{gender:a.YT8.Male}},9534:{id:"headerTitle.tt.ettu",values:{gender:a.YT8.Female}},564:{id:"headerTitle.tt.oly.wcships",values:{comp:"O",gender:a.YT8.Male,type:"S"}},565:{id:"headerTitle.tt.oly.wcships",values:{comp:"O",gender:a.YT8.Female,type:"S"}},1121:{id:"headerTitle.tt.oly.wcships",values:{comp:"O",gender:a.YT8.Male,type:"T"}},1123:{id:"headerTitle.tt.oly.wcships",values:{comp:"O",gender:a.YT8.Female,type:"T"}},11579:{id:"headerTitle.tt.oly.wcships",values:{comp:"WC",gender:a.YT8.Male,type:"S"}},11586:{id:"headerTitle.tt.oly.wcships",values:{comp:"WC",gender:a.YT8.Female,type:"S"}},11587:{id:"headerTitle.tt.oly.wcships",values:{comp:"WC",gender:a.YT8.Mixed,type:"D"}},11580:{id:"headerTitle.tt.oly.wcships",values:{comp:"WC",gender:a.YT8.Male,type:"D"}},11585:{id:"headerTitle.tt.oly.wcships",values:{comp:"WC",gender:a.YT8.Female,type:"D"}},1966:{id:"headerTitle.tt.wc",values:{gender:a.YT8.Male}},1964:{id:"headerTitle.tt.wc",values:{gender:a.YT8.Female}},11604:{id:"headerTitle.tt.junior.wc",values:{gender:a.YT8.Male,type:"S"}},10698:{id:"headerTitle.tt.junior.wc",values:{gender:a.YT8.Female,type:"S"}},10697:{id:"headerTitle.tt.junior.wc",values:{gender:a.YT8.Mixed,type:"D"}},10699:{id:"headerTitle.tt.junior.wc",values:{gender:a.YT8.Male,type:"D"}},10700:{id:"headerTitle.tt.junior.wc",values:{gender:a.YT8.Female,type:"D"}},15004:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"S",gender:a.YT8.Male}},15007:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"S",gender:a.YT8.Female}},15005:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"TT",gender:a.YT8.Male}},15009:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"TT",gender:a.YT8.Female}},15001:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"UWC",gender:a.YT8.Male}},15068:{id:"headerTitle.tt.setka.tt.uwc",values:{comp:"UWC",gender:a.YT8.Female}}};function U(e){let{uniqueTournament:t,year:n}=e,{meta:l,seoContent:i}=(0,C.useContext)(u.xV),r=(0,c.A)(),o=(0,W.N)(t);if(null==i?void 0:i.heading)return(0,s.jsx)(s.Fragment,{children:i.heading});if(l&&l.h1)return(0,s.jsx)(s.Fragment,{children:l.h1});if(t.id===a.G6l.Euro&&n)return(0,s.jsx)(O.A,{id:"headerTitle.ut.euro",values:{year:n}});if(t.id===a.G6l.WorldCup)return(0,s.jsx)(O.A,{id:"headerTitle.ut.worldCup"});let d=t.category.sport.slug;if(d===a.QCR.Tennis){let e=t.category.slug,n={categoryName:"itf-men"===e||"itf-women"===e?"ITF":t.category.name,tournamentName:t.name};if(0===n.tournamentName.indexOf(n.categoryName)&&(n.categoryName=""),2361===t.id||2600===t.id)return(0,s.jsx)(s.Fragment,{children:r.formatMessage({id:"headerTitle.tennis.v2"},n).trim()});if(Q[e])return(0,s.jsx)(s.Fragment,{children:r.formatMessage({id:Q[e]},n).trim()})}return d===a.QCR.TableTennis&&G[t.id]?(0,s.jsx)(O.A,{id:G[t.id].id,values:G[t.id].values}):(0,s.jsx)(O.A,{id:"headerTitle.standings",values:{item:o}})}var V=n(6354),B=n(32523),K=n(78383),Z=n.n(K),X=n(71024),J=n.n(X),$=n(48683),ee=n(75751),et=n(60988),en=n(42621),es=n(49249),ea=n(70010),el=n(61090),ei=n(37071),er=n(23727),eo=n(36937),ed=n(65078),eu=n(54075),ec=n(93338);function em(e){let{rating:t,round:n}=e,{formattedRating:a,ratingColorKey:l}=(0,eu.M)(n&&t?Math.round(t):t);return(0,s.jsx)(S.ov,{style:{backgroundColor:ec.S.var("colors.rating".concat(l.replace("scoreRating","")))},h:"xl",w:"xl",br:"md",children:(0,s.jsx)(ei.EY,{textStyle:"table.small",color:"onColor.primary",children:a})})}let ex=e=>{let{ordinal:t,event:n,rating:a}=e,l=(0,ed.AR)(n);return(0,s.jsx)(_.y$.Provider,{value:l,children:(0,s.jsx)(j.tj,{event:n,children:(0,s.jsxs)(S.so,{h:"4xl",py:"[6px]",px:"lg",justify:"space-between",_hover:{bg:"surface.s2"},children:[(0,s.jsxs)(S.so,{h:"100%",align:"center",children:[(0,s.jsxs)(ei.Ym,{minW:"xl",textAlign:"center",textStyle:"body.small",display:"block",children:[t,"."]}),(0,s.jsx)(S.cG,{color:"neutrals.nLv4",orientation:"vertical",borderInlineEndStyle:"solid",mx:"sm"}),(0,s.jsx)(eo.g,{})]}),(0,s.jsxs)(S.so,{align:"center",children:[(0,s.jsx)(eo.$,{}),(0,s.jsx)(S.cG,{color:"neutrals.nLv4",orientation:"vertical",borderInlineEndStyle:"solid",ml:"sm",mr:"md"}),(0,s.jsx)(em,{rating:a})]})]})})})},ep=e=>{let{rankings:t}=e;return(0,s.jsx)(s.Fragment,{children:t.map((e,t)=>(0,s.jsx)(ex,{ordinal:t+1,rating:e.rating,event:e.event},"rated-event-".concat(t)))})};var eh=n(59721),eg=n(54053),ej=n(52695),ey=n(45860);function ev(e){let{data:t,isLoading:n}=(0,ey.Ay)(e?a.bnp.fanRatingRanking(e):null,{dedupingInterval:6e4});return{ranking:(null==t?void 0:t.ranking)||[],isLoading:n}}let ef=e=>{let{uniqueTournament:t,seasonId:n,isOpen:a,setIsOpen:l}=e,{ranking:i}=ev(n);return(0,s.jsx)(eg.A,{isOpen:a,setIsOpen:l,header:(0,s.jsxs)(S.so,{p:{md:"lg"},align:"center",gap:"sm",w:{md:"[320px]"},children:[(0,s.jsx)(eh.e,{id:t.id,name:t.name}),(0,s.jsxs)(S.so,{direction:"column",children:[(0,s.jsx)(ei.EY,{textStyle:"display.large",children:(0,s.jsx)(ej.O,{uniqueTournament:t})}),(0,s.jsx)(ei.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(O.A,{id:"bestRatedFanMatches"})})]})]}),children:(0,s.jsx)(S.az,{w:{md:"[360px]"},maxH:{md:"[512px]"},children:(0,s.jsx)(ep,{rankings:i})})})};function eb(e){let{seasonId:t,uniqueTournament:n}=e,{ranking:a,isLoading:l}=ev(t),[i,r]=(0,C.useState)(!1),{isMobile:o}=(0,ei.$c)(),d=o?3:10;if(!t||!l&&!a.length||l)return null;let u=a.slice(0,d),c=a.length>d;return(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"bestRatedFanMatches"}),u.length?(0,s.jsx)(ep,{rankings:u}):(0,s.jsx)(B.E,{uniqueKey:"all-rated-games-cl",pt:"xs",rows:d,rowHeight:44,rowGap:4}),(0,s.jsx)(ef,{seasonId:t,uniqueTournament:n,isOpen:i,setIsOpen:r}),(0,s.jsx)($.Zp.Footer,{ctaParams:c?{messageId:"all_rated_matches",onClick:()=>r(!0),icon:er.X.Right}:void 0})]})}var eT=n(73463),ew=n(99326),eS=n(10778),eC=n(79368),eI=n(22088),e_=n(60908),ek=n(11506),eA=n(78177),ez=n(82554),eM=n(23685),eR=n(79528),eE=n(99064),eP=n(99397),eY=n(4967),eH=n(69559),eN=n(74761),eq=n(56602),eF=n(32427),eL=n(94493),eD=n(98516),eO=n(4740);let eW=(e,t)=>{switch(e){case"goalkeeperEfficiencyPercentage":return"".concat((0,eD.M)(100*t,2),"%");case"expectedGoals":case"expectedAssists":case"goalsPrevented":return(0,eD.M)(t,2);case"secondsPlayed":return(0,eY.OV)(t);default:return t}},eQ=e=>{var t;let{topStatistics:n}=e,l=(0,eH.o)(),i=Object.keys(n||{}),r=i.includes(a.iLq.Rating)||!i.length?a.iLq.Rating:i[0],[o,d]=(0,C.useState)(n?r:null),[u,c]=(0,C.useState)(!1),m=n&&o&&n[o]||[],x=m.length>5,p=u?m:m.slice(0,5);return(0,C.useEffect)(()=>{d(r)},[n]),(0,C.useEffect)(()=>{n&&!o&&d(r)},[!!n]),(0,s.jsxs)(ee.t,{tag:"TopStatsList",children:[(0,s.jsxs)(S.so,{px:"sm",align:"center",children:[!!i.length&&(0,s.jsx)(eE.ms,{items:i,onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&d(t)},selectedItem:o,renderItem:e=>e?(0,s.jsx)(eL.w,{id:e}):e||""}),o===a.iLq.Rating&&(0,s.jsx)(S.az,{ml:"sm",children:(0,s.jsx)(eq.D,{type:eq.D.type.SpecificRatingPlayer,rating:null==(t=p[0])?void 0:t.statistic,renderImage:e=>{var t;return(0,s.jsx)(eP.t,{id:null==(t=p[0])?void 0:t.player.id,...e})}})})]}),o===a.iLq.Rating&&l===a.QCR.Football&&(0,s.jsx)(eN.$,{mx:"sm",messageId:"rating_top_stats_general",children:(0,s.jsx)(O.A,{id:"rating_top_stats_specific"})}),(0,s.jsxs)(S.az,{children:[n&&o?(0,s.jsx)(S.az,{children:p.map((e,t)=>(0,s.jsx)(eO.N,{playerStatsOnEvent:e,index:t+1,children:o===a.iLq.Rating?(0,s.jsx)(eP.G,{rating:e.statistic}):eW(o,e.statistic)},"".concat(e.player.id,"-").concat(t)))}):(0,s.jsx)(eF.H,{}),(0,s.jsx)($.Zp.Footer,{ctaParams:x?{messageId:u?"show_less":"show_more",onClick:()=>c(e=>!e),icon:u?er.X.Up:er.X.Down}:void 0})]})]})};var eG=n(90863),eU=n(34209);let eV=e=>{let{uniqueTournamentId:t,seasonId:n}=e,l=(0,C.useContext)(_.Ws),{types:i,currentType:r,setCurrentType:o,isLoading:d}=(0,eU.A)(t,n,l,"player"),u=d?{}:{uniqueTournamentId:t,seasonId:n,type:l===a.QCR.Basketball||l===a.QCR.IceHockey?r:void 0},{isError:c,topPlayersPerGame:m}=(0,eG.A)(u);return c?null:(0,s.jsx)(ee.t,{tag:"TopStatsList",children:(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"top_stats"}),(0,s.jsxs)(S.so,{direction:"column",gap:"sm",pt:"sm",children:[!!(i.length&&r)&&(0,s.jsx)(eE.tU,{variant:"secondary",value:r,onChange:e=>o(e),children:(0,s.jsx)(S.so,{px:"sm",children:i.map(e=>(0,s.jsx)(eE.tU.Tab,{tabKey:e,children:(0,s.jsx)(O.A,{id:e})},e))})}),(0,s.jsx)(eQ,{topStatistics:null==m?void 0:m.topPlayers})]})]})})};var eB=n(33144),eK=n(57869),eZ=n(79977);function eX(e){let{types:t,activeType:n,setActiveType:a=Z(),stats:l,activeStat:i,setActiveStat:r,sport:o,firstTeam:d}=e,u=(0,eK.g)(o),c=u?u.map(e=>l.includes(e)?e:void 0):l;return(0,s.jsxs)(s.Fragment,{children:[!!t&&t.length>1&&!!n&&(0,s.jsx)(eE.tU,{variant:"secondary",value:n,onChange:e=>a(e),children:(0,s.jsx)(S.so,{px:"sm",children:t.map(e=>(0,s.jsx)(eE.tU.Tab,{tabKey:e,children:(0,s.jsx)(O.A,{id:e})},e))})}),(0,s.jsxs)(S.so,{px:"sm",align:"center",children:[!!(null==l?void 0:l.length)&&(0,s.jsx)(eE.ms,{items:c,renderItem:e=>e?(0,s.jsx)(eZ.A,{id:e}):null,initialSelectedItem:i,selectedItem:i,onSelectedItemChange:e=>{e.selectedItem&&r(e.selectedItem)}}),"avgRating"===i&&(0,s.jsx)(S.az,{ml:"sm",children:(0,s.jsx)(eq.D,{type:eq.D.type.AverageRatingTeam,rating:null==d?void 0:d.stats.avgRating,renderImage:e=>(0,s.jsx)(eB.p,{id:null==d?void 0:d.team.id,...e})})})]})]})}var eJ=n(15771),e$=n(94604);function e0(){return(0,s.jsx)(S.az,{children:Array.from({length:5}).map((e,t)=>(0,s.jsx)(S.az,{h:"5xl"},t))})}function e1(e){let{teams:t,activeStat:n,sport:a}=e;return(null==t?void 0:t.length)&&n?(0,s.jsx)(S.az,{children:t.map((e,t)=>{let l=e.team;return(0,s.jsx)(j.gT,{sport:a,team:l,children:(0,s.jsxs)(S.so,{h:"5xl",align:"center",gap:"sm",px:"sm",_hover:{bg:"surface.s2"},cursor:"pointer",children:[(0,s.jsx)(ei.EY,{textStyle:"body.small",w:"lg",textAlign:"center",display:"block",children:t+1}),(0,s.jsxs)(S.so,{grow:1,align:"center",children:[(0,s.jsx)(eB.p,{id:l.id,size:40}),(0,s.jsx)(ei.EY,{ml:"lg",display:"block",children:(0,s.jsx)(e$.Rm,{team:l})})]}),(0,s.jsx)(S.so,{minW:"6xl",justify:"flex-end",children:(0,s.jsx)(ei.EY,{children:(0,s.jsx)(eJ.A,{stat:e.stats,selectedStat:n,sport:a})})})]})},l.id)})}):(0,s.jsx)(e0,{})}var e9=n(25459);let e4=e=>{let{uniqueTournamentId:t,seasonId:n,gender:l=a.YT8.Male}=e,i=(0,e9.A)({uniqueTournamentId:t,seasonId:n}),[r,o]=(0,C.useState)(!1),d=(0,C.useContext)(_.Ws),u=d===a.QCR.Tennis;if(i.isError)return null;let c=r?i.activeTeams:i.activeTeams.slice(0,5),m=c.length!==i.activeTeams.length||r;return(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:u?"top_players":"top_teams",values:{gender:l}}),(0,s.jsxs)(S.so,{direction:"column",pt:"sm",gap:"sm",children:[(0,s.jsx)(eX,{stats:i.stats,activeStat:i.activeStat,setActiveStat:i.setActiveStat,types:i.types,activeType:i.activeType,setActiveType:i.setActiveType,sport:d,firstTeam:i.activeTeams[0]}),"avgRating"===i.activeStat&&(0,s.jsx)(eN.$,{mx:"sm",messageId:"rating_top_teams_general",children:(0,s.jsx)(O.A,{id:"rating_top_teams_specific"})}),(0,s.jsx)(e1,{teams:c,activeStat:i.activeStat,sport:d})]}),(0,s.jsx)($.Zp.Footer,{ctaParams:m?{messageId:r?"show_less":"show_more",onClick:()=>o(e=>!e),icon:r?er.X.Up:er.X.Down}:void 0})]})};function e6(e){let{team:t}=e;return t?(0,s.jsx)(g.fz,{id:"about.title.holder",values:{teamlink:function(){for(var e=arguments.length,n=Array(e),l=0;ln((0,tj.oU)(e.featuredEvents))});return(0,s.jsx)(tg.S,{isLoading:i,events:(null==l?void 0:l.featuredEvents)||[]})}var tv=n(4866),tf=n(14419),tb=n(34884),tT=n(46009),tw=n(64073),tS=n(54409),tC=n(70679);function tI(e){let{isOpen:t,setIsOpen:n,editorData:a}=e;return(0,s.jsx)(eg.A,{isOpen:t,setIsOpen:n,header:(0,s.jsx)(ei.EY,{textStyle:"display.large",lineHeight:"24px",display:"block",p:"lg",borderBottom:"1px solid {colors.neutrals.nLv4}",children:(0,s.jsx)(O.A,{id:"competition_editors_list_title"})}),children:null==a?void 0:a.editors.map(e=>(0,s.jsx)(j.N_,{routeKey:"user",params:{userId:e.id},onClick:()=>(0,q.Zs)("editor_league_modal"),children:(0,s.jsxs)(S.so,{align:"center",justify:"space-between",h:"5xl",px:"lg",py:"md",_hover:{bg:"surface.s2"},children:[(0,s.jsxs)(S.so,{align:"center",gap:"lg",children:[(0,s.jsx)(tC.A,{src:e.imageURL,size:32}),(0,s.jsx)(ei.EY,{textStyle:"table.medium",truncate:!0,children:e.nickname})]}),(0,s.jsx)(tS.CCT,{fill:"primary.default"})]})},e.id))})}var t_=n(3167),tk=n(48127),tA=n(6244),tz=n(45546);let tM=[8,17,23,34,35],tR=e=>{let{uniqueTournamentId:t,seasonYear:n}=e;return n&&tM.includes(t)?(0,s.jsxs)(s.Fragment,{children:[" ",(0,tz.b0)(n).join("/")]}):null};function tE(e){var t;let{uniqueTournament:n,seasons:l,seasonId:i,onSeasonChange:r}=e,o=(0,W.N)(n),d=!!(l.length&&i&&i===l[0].id)&&!!(n.startDateTimestamp&&n.startDateTimestamp!==n.endDateTimestamp),{data:u}=(0,ey.Ay)(a.V3t.seasonEditors(n.id,i)),[c,m]=(0,C.useState)(!1),x=(0,C.useMemo)(()=>l.find(e=>e.id===i),[i,l]),p=null==u?void 0:u.editors,h={nickname:(null==u?void 0:u.organizations.length)?null==u?void 0:u.organizations[0].name:(null==p?void 0:p.length)===1?p[0].editorName:void 0,numberOfEditors:null==p?void 0:p.length,eventLocation:(null==p?void 0:p.length)===1?"editor_league":void 0,hasStarted:!0,isInLeagueHeader:!0,isOrganization:!!(null==u?void 0:u.organizations.length),userId:p&&p.length>1||null==p||null==(t=p[0])?void 0:t.id,onClick:p&&p.length>1&&!(null==u?void 0:u.organizations.length)?()=>m(!0):void 0};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tf.Fs,{image:(0,s.jsx)(tv.e,{id:n.id,name:n.name,w:"100%",h:"100%"}),name:(0,s.jsxs)(s.Fragment,{children:[o," ",(0,s.jsx)(tR,{uniqueTournamentId:n.id,seasonYear:null==x?void 0:x.year})]}),titleLabel:(0,s.jsx)(tA.W,{groundType:n.groundType}),subtitleItems:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.so,{align:"center",gap:"sm",children:[(0,s.jsx)(tv.w,{alpha2:n.category.alpha2,name:n.category.name,categoryId:n.category.id,w:32,h:32}),(0,s.jsx)(ei.EY,{textStyle:"display.medium",children:(0,s.jsx)(R.m,{slug:n.category.slug,name:n.category.name,uniqueTournament:n})})]}),i&&(0,s.jsx)(S.az,{position:"relative",zIndex:"fixed",children:(0,s.jsx)(tk.s,{seasonId:i,seasons:l,onSeasonChange:r},n.id)})]}),actions:(0,s.jsxs)(s.Fragment,{children:[!!(null==u?void 0:u.editors.length)&&(0,s.jsx)(tb.i,{...h}),(0,s.jsx)(tT.e,{id:n.id,entity:a.bq7.Tournaments,location:P.y.Header,type:P.b.UniqueTournament,isNewButton:!0})]}),footer:d&&(0,s.jsx)(t_.G,{start:n.startDateTimestamp,end:n.endDateTimestamp,c:"onSurface.nLv1"})}),(0,s.jsxs)(tw.K,{id:n.id,name:o,entity:a.bq7.Tournaments,type:P.b.UniqueTournament,children:[(0,s.jsx)(tv.e,{size:32,mr:"lg",style:{verticalAlign:"top"},id:n.id,name:n.slug}),(0,s.jsx)(ei.EY,{textStyle:"display.medium",color:"primary.default",mr:"lg",children:o})]}),(0,s.jsx)(tI,{isOpen:c,setIsOpen:m,editorData:u})]})}var tP=n(90436),tY=n.n(tP),tH=n(9922),tN=n.n(tH),tq=n(95816),tF=n.n(tq),tL=n(98423);let tD=e=>{let{name:t,image:n}=e;return(0,s.jsxs)(S.so,{_hover:{bg:"surface.s2"},px:{mdDown:"sm",md:"lg"},py:"sm",gap:"lg",align:"center",children:[n,(0,s.jsx)(ei.EY,{children:t})]})};function tO(e){let{title:t,tournaments:n,teams:a,sport:l}=e,i=[];(null==n?void 0:n.length)&&i.push(...n.map(e=>(0,s.jsx)(j.tQ,{tournament:e,children:(0,s.jsx)(tD,{image:(0,s.jsx)(tL.e,{...e}),name:(0,s.jsx)(ej.O,{uniqueTournament:e})})},e.id)));let r=null==a?void 0:a.filter(Boolean);return((null==r?void 0:r.length)&&i.push(...r.map(e=>(0,s.jsx)(j.gT,{sport:l,team:e,children:(0,s.jsx)(tD,{image:(0,s.jsx)(tL.p,{...e}),name:(0,s.jsx)(e$.Rm,{team:e})})},e.id))),i.length)?(0,s.jsx)($.Zp,{children:(0,s.jsxs)(S.az,{pb:"md",children:[(0,s.jsx)(ei.EY,{p:["sm","lg"],pb:"sm",textStyle:"display.small",display:"block",children:(0,s.jsx)(O.A,{id:t})}),i]})}):null}var tW=n(85685);let tQ=JSON.parse('{"Division level":"divisionLevel","Number of rounds":"numberOfRounds","averageGoals":"football_avg_goals","homeTeamWins":"home_team_wins","Draws":"draws","awayTeamWins":"away_team_wins","Yellow cards":"yellow_cards","yellowCards":"football_yellow_cards","redCards":"red_cards","Total prize money":"totalPrizeMoney","Ground type":"surface","Start date":"startDate","End date":"endDate","Continent":"continent","Number of sets":"numberOfSets","Prize currency":"prizeCurrency","Number of competitors":"numberOfCompetitors"}');var tG=n(27892);let tU=e=>{let{id:t}=e;return(0,s.jsx)(O.A,{id:(0,tG.O)(tQ,t)})};function tV(e){let{facts:t,isCurrentSeason:n}=e;return(0,s.jsxs)(S.az,{pb:"sm",children:[(0,s.jsx)(ei.EY,{pt:"lg",px:{mdDown:"sm",md:"lg"},pb:"sm",textStyle:"display.small",textTransform:"capitalize",display:"block",children:(0,s.jsx)(O.A,{id:"tournament.facts"})}),Object.keys(t).map(e=>"winner"!==e&&void 0!==t[e]&&("numberOfCompetitors"!==e||n)&&"groundType"!==e?(0,s.jsxs)(S.so,{py:"sm",px:{mdDown:"sm",md:"lg"},justify:"space-between",align:"center",children:[(0,s.jsx)(ei.EY,{children:(0,s.jsx)(tU,{id:e})}),(0,s.jsx)(ei.EY,{children:"totalPrizeMoney"===e&&t.totalPrizeMoney?(0,s.jsx)(tW.o,{parsedMoney:(0,a.oaz)(t.totalPrizeMoney)}):t[e]})]},e):null)]})}function tB(e){let{countries:t,city:n}=e,a=(null==t?void 0:t.length)?t.join(", "):null,l=((null==t?void 0:t.length)||0)>1,i=(n||"").split(",").length>1;return a||n?(0,s.jsxs)(S.az,{pb:"sm",children:[(0,s.jsx)(ei.EY,{pt:"lg",px:{mdDown:"sm",md:"lg"},pb:"sm",textStyle:"display.small",textTransform:"capitalize",display:"block",children:(0,s.jsx)(O.A,{id:"tournament.host"})}),a&&(0,s.jsxs)(S.so,{py:"sm",px:{mdDown:"sm",md:"lg"},justify:"space-between",gap:"lg",children:[(0,s.jsx)(ei.EY,{children:(0,s.jsx)(O.A,{id:l?"countries":"country"})}),(0,s.jsx)(ei.EY,{textAlign:"end",children:a})]}),n&&(0,s.jsxs)(S.so,{py:"sm",px:{mdDown:"sm",md:"lg"},justify:"space-between",gap:"lg",children:[(0,s.jsx)(ei.EY,{children:(0,s.jsx)(O.A,{id:i?"cities":"city"})}),(0,s.jsx)(ei.EY,{textAlign:"end",children:n})]})]}):null}function tK(e){let{team:t,sport:n,text:a}=e;return(0,s.jsx)(S.az,{children:(0,s.jsx)(j.gT,{team:t,sport:n,children:(0,s.jsxs)(S.so,{pt:"sm",direction:"column",align:"center",children:[(0,s.jsx)(eB.p,{size:40,id:t.id,name:t.name}),(0,s.jsx)(ei.Ym,{px:"sm",mt:"xs",textStyle:"display.small",textAlign:"center",children:(0,s.jsx)(e$.Rm,{team:t})}),(0,s.jsx)(ei.EY,{px:"sm",textStyle:"assistive.default",color:"neutrals.nLv3",mt:"xs",h:a?"2xl":"xs",textAlign:"center",children:a})]})})})}function tZ(e){return(0,s.jsxs)(S.so,{align:"center",justify:"center",direction:"column",py:"md",children:[(0,s.jsx)(ei.EY,{display:"block",textStyle:"assistive.micro",color:"neutrals.nLv3",textTransform:"uppercase",children:e.label}),(0,s.jsx)(ei.EY,{display:"block",textStyle:"display.medium",children:e.value})]})}function tX(e){let{titleHolder:t,mostTitlesTeams:n,titleHolderTitles:l,mostTitles:i,sport:r,totalPrizeMoney:o,numberOfCompetitors:d,numberOfSets:u}=e,m=(0,c.A)(),x=l?"".concat(m.formatMessage({id:"title_holder"})," (").concat(l,")"):m.formatMessage({id:"title_holder"}),p=i&&i>1?"".concat(m.formatMessage({id:"most_titles"})," (").concat(i,")"):"",h=r===a.QCR.Tennis&&!!u||!!o||!!d;return h||t||n?(0,s.jsx)($.Zp,{children:(0,s.jsxs)(S.az,{p:"sm",children:[(0,s.jsx)(S.az,{display:["none","block"],children:(0,s.jsx)(ei.EY,{textStyle:"display.small",pt:"sm",pb:"xs",px:"sm",display:"block",children:(0,s.jsx)(O.A,{id:"titles"})})}),(0,s.jsxs)(S.so,{wrap:"wrap",align:"center",justify:"space-around",children:[t&&(0,s.jsx)(tK,{team:t,sport:r,text:x}),n?n.map(e=>(0,s.jsx)(tK,{team:e,sport:r,text:p},e.id)):void 0]}),h&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(S.so,{justify:"space-evenly",align:"center",borderTop:"1px solid {colors.neutrals.nLv4}",children:[u&&(0,s.jsx)(tZ,{label:(0,s.jsx)(O.A,{id:"sets"}),value:u}),o&&(0,s.jsx)(tZ,{label:(0,s.jsx)(O.A,{id:"totalPrizeMoney"}),value:(0,s.jsx)(tW.o,{parsedMoney:(0,a.oaz)(o)})}),d&&(0,s.jsx)(tZ,{label:(0,s.jsx)(O.A,{id:"competitors"}),value:d})]})})]})}):null}let tJ=["id","newcomersUpperDivision","newcomersLowerDivision","newcomersOther","totalPrizeMoneyCurrency","totalPrizeMoney","hostCity","hostCities","hostCountries"],t$=(e,t)=>{let n=Math.round(100*e);return t?"".concat(n,"%"):n/100};function t0(e){var t,n;let{tournament:l,info:i,seasonId:r,isCurrentSeason:o}=e,d=l.category.sport.slug,u={sport:d,category:l.category.slug},c=null==(t=(0,ey.Ay)(r?a.V3t.info(l.id,r):null,{fallbackData:o&&i?{info:i}:void 0}).data)?void 0:t.info,m=(0,C.useMemo)(()=>(function(e,t){if(void 0===e)return null;let n=Object.keys(e).filter(e=>-1===tJ.indexOf(e)).reduce((t,n)=>(Array.isArray(e[n])?e[n].length&&(t[n]=e[n].join(", ")):"totalPrizeMoneyRaw"===n&&void 0!==e.totalPrizeMoneyRaw?t.totalPrizeMoney=e.totalPrizeMoneyRaw:t[n]=e[n],t),{}),s={};t&&(t.groundType&&(s.groundType=t.groundType),t.numberOfSets&&(s.numberOfSets=t.numberOfSets),t.tier&&(s.tier=t.tier));let a=(n.homeTeamWins||0)+(n.awayTeamWins||0)+(n.draws||0);if(a){let e={...n,...s};if(n.goals){let t=t$(n.goals/a);e={goals:e.goals,averageGoals:t,...e}}return n.yellowCards&&(e.yellowCards=t$(n.yellowCards/a)),n.redCards&&(e.redCards=t$(n.redCards/a)),n.homeTeamWins&&(e.homeTeamWins=t$(n.homeTeamWins/a,!0)),n.awayTeamWins&&(e.awayTeamWins=t$(n.awayTeamWins/a,!0)),n.draws&&(e.draws=t$(n.draws/a,!0)),e}return{...n,...s}})(c,l),[r,c]),x={},p=null;d===a.QCR.Tennis?((null==m?void 0:m.totalPrizeMoney)&&(x.totalPrizeMoney=tN()(m.totalPrizeMoney)),x.numberOfCompetitors=tN()(null==m?void 0:m.numberOfCompetitors),x.numberOfSets=tN()(null==m?void 0:m.numberOfSets),m&&(null==(p=tN()(m))||delete p.totalPrizeMoney,null==p||delete p.numberOfCompetitors,null==p||delete p.numberOfSets,null==p||delete p.groundType)):m&&(p={...m});let h=o?l.titleHolder||(null==c?void 0:c.winner):void 0,g=o?l.mostTitlesTeams:void 0,j=[...[{title:"tournament.upperDivision",tournaments:l.upperDivisions},{title:"newcomers_upper",teams:null==c?void 0:c.newcomersUpperDivision},{title:"lower_division",tournaments:l.lowerDivisions},{title:"newcomers_lower",teams:null==c?void 0:c.newcomersLowerDivision},{title:"tournament.newcomersOther",teams:null==c?void 0:c.newcomersOther}].map(e=>{var t,n;return(null==(t=e.tournaments)?void 0:t.length)||(null==(n=e.teams)?void 0:n.length)?(0,s.jsx)(tO,{...e,...u},e.title):null}),tF()(p)?null:(0,s.jsx)(tV,{facts:p,isCurrentSeason:o},p.id),(null==c?void 0:c.hostCountries.length)||(null==c?void 0:c.hostCity)?(0,s.jsx)(tB,{countries:null==c?void 0:c.hostCountries,city:null==c?void 0:c.hostCity},c.id):null].filter(e=>!!e),y=!!h||!!(null==g?void 0:g.length)||!!(null==(n=l.linkedUniqueTournaments)?void 0:n.length),v=!!j.length;return y||v?(0,s.jsx)($.Zp,{children:(0,s.jsxs)($.WC,{variant:"inverse",children:[(0,s.jsx)($.Zp.Header,{titleId:"tournament.leagueInfo"}),(0,s.jsxs)(S.so,{direction:{mdDown:"column"},p:"sm",gap:"sm",children:[y&&(0,s.jsxs)(S.so,{w:{mdDown:"100%",md:v?"1/2":"100%"},direction:"column",gap:"sm",children:[(0,s.jsx)(tX,{titleHolder:h,titleHolderTitles:l.titleHolderTitles,mostTitlesTeams:g,mostTitles:l.mostTitles,sport:d,...x}),(0,s.jsx)(tO,{title:"tournament.sameDivision",tournaments:l.linkedUniqueTournaments,...u})]}),y&&v&&(0,s.jsx)(S.so,{direction:"column",gap:"sm",w:{mdDown:"100%",md:"1/2"},children:j.map(e=>(0,s.jsx)($.Zp,{children:e},null==e?void 0:e.key))}),!y&&v&&tY()(j,Math.ceil(j.length/2)).map((e,t)=>(0,s.jsx)(S.az,{w:"100%",children:(0,s.jsx)($.Zp,{children:e.map(e=>(0,s.jsx)(s.Fragment,{children:e}))})},t+"group"))]})]})}):null}var t1=n(21501),t9=n(22648),t4=n(9127),t6=n(62827);let t2=e=>{let{options:t,value:n,onChange:a}=e,[l]=(0,C.useState)(Math.random());return(0,s.jsx)(S.so,{gap:"sm",children:t.map(e=>(0,s.jsx)(ei.a,{id:""===e.value?"all-".concat(l):"".concat(String(e.value),"-").concat(l),name:"statistics",value:e.value,checked:n===e.value,onChange:()=>{a(e.value)},gap:"sm",px:"sm",children:(0,s.jsx)(ei.EY,{children:(0,s.jsx)(O.A,{id:e.label})})},String(e.value)))})};var t3=function(e){return e.GT="GT",e.LT="LT",e.EQ="EQ",e.IN="in",e}({});let t5=[{label:"basic.all",value:"total"},{label:"per_match",value:"perGame"},{label:"per_90_mins",value:"per90"}],t8=[{label:"all_players",value:""},{label:"stats.playersWithMinApps",value:"filtered"}],t7=[{label:"standings.overall",value:""},{label:"home",value:"home"},{label:"away",value:"away"}],ne=[{label:"basic.all",value:""},{label:"stats.moreThan",value:t3.GT},{label:"stats.equals",value:t3.EQ},{label:"stats.lessThan",value:t3.LT}],nt=[{label:"basic.all",value:""},{label:"stats.both",value:"Both"},{label:"basic.right",value:"Right"},{label:"basic.left",value:"Left"}],nn=[{label:"G",value:"G"},{label:"D",value:"D"},{label:"M",value:"M"},{label:"F",value:"F"}],ns=[{label:"basic.all",value:""},{label:"select",value:"choose"}],na=e=>{let{value:t,optionType:n}=e;switch(n){case"nationalities":return(0,s.jsx)(eE._V,{width:"18",height:"18",src:(0,a.RHm)(t),alt:""});case"teams":return(0,s.jsx)(eB.p,{size:18,id:Number.parseInt(t,10)});default:return null}},nl=e=>{let{values:t,options:n,onChange:a,optionsType:l,labelOnly:i=!1,TransComponent:r=e$.lC}=e;return(0,s.jsx)(S.so,{wrap:"wrap",children:n.map((e,n)=>{let o=t.includes(e.value);return(0,s.jsx)(eE.Sc,{w:"25%",gap:"sm",h:"32",py:"sm",size:18,name:e.label,id:e.value,checked:o,onChange:()=>{a(o?t.filter(t=>t!==e.value):[...t,e.value])},children:(0,s.jsxs)(S.so,{align:"center",gap:"xs",children:[!i&&l&&(0,s.jsx)(na,{value:e.value,optionType:l}),(0,s.jsx)(ei.EY,{maxW:"[148px]",display:"block",truncate:!0,textStyle:"body.small",children:(0,s.jsx)(r,{original:e.label,id:e.label})})]})},n)})})},ni=e=>{let{options:t,name:n,values:a,label:l,onChange:i}=e;return(0,s.jsxs)(S.az,{bg:"surface.s2",br:"md",mx:"md",mt:"xs",mb:"md",p:"sm",pb:"lg",children:[(0,s.jsxs)(S.so,{align:"center",justify:"space-between",py:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"display.small",pl:"lg",children:(0,s.jsx)(O.A,{id:l})}),(0,s.jsxs)(S.so,{align:"center",px:"sm",children:[(0,s.jsx)(eE.Sc,{name:n,id:"all",px:"sm",py:"xs",h:"34",gap:"sm",checked:a.length===t.length,onChange:()=>i(t.map(e=>e.value)),children:(0,s.jsx)(O.A,{id:"select_all"})}),(0,s.jsx)(eE.Sc,{name:n,id:"none",px:"sm",py:"xs",h:"34",gap:"sm",checked:!a.length,onChange:()=>i([]),children:(0,s.jsx)(O.A,{id:"deselect_all"})})]})]}),(0,s.jsx)(nl,{values:a,optionsType:n,options:t,onChange:e=>i(e)})]})},nr="sofa.leagueStatsFilters",no=e=>{(0,t6.kH)(nr,JSON.stringify(e))},nd=()=>{let e=(0,t6._9)(nr);return e?JSON.parse(e):null},nu=(e,t)=>{let n=[];return e<1||t<1?[]:e>t?1!==t?[1,t]:[1]:(e>2&&n.push(1),e>1&&n.push(e-1),n.push(e),e{let{label:t,relation:n,setRelation:a,quantity:l,setQuantity:i}=e,r=(0,C.useRef)(null),o=!n;return(0,s.jsxs)(S.so,{align:"center",ml:"md",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:t})}),(0,s.jsx)(ei.ms,{label:t,items:ne,selectedItem:ne.find(e=>e.value===n)||ne[0],renderItem:e=>(null==e?void 0:e.label)?(0,s.jsx)(O.A,{id:null==e?void 0:e.label}):"",onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&(a(t.value),t.value&&window.setTimeout(()=>{var e;null==(e=r.current)||e.focus()},0))}}),(0,s.jsx)(S.I4.input,{ref:r,type:"text",br:"sm",value:l||"",onChange:e=>{i(e.target.value)},h:"2xl",disabled:o,border:"1px solid {colors.neutrals.nLv4}",bg:o?"surface.s2":"surface.s1",color:"neutrals.nLv1",px:"sm",maxW:"4xl",pattern:"\\d*",style:{opacity:o?.7:1,cursor:o?"not-allowed":"pointer"}})]})};function nm(e){let{groups:t,values:n,onChange:l}=e,[i,r]=(0,C.useState)(""),o=t[i];return(0,s.jsxs)("div",{children:[(0,s.jsx)(S.so,{mb:"sm",gap:"sm",wrap:"wrap",children:Object.keys(t).map(e=>{let t=e===i,n="defence"===e?"defense":e;return(0,s.jsxs)(ei.$n,{size:"tertiary",variant:"clear",onClick:()=>{i===e?r(""):r(e)},py:"md",children:[(0,s.jsx)(O.A,{id:n,values:{gender:a.YT8.Male}}),t?(0,s.jsx)(tS.t8v,{ml:"xs"}):(0,s.jsx)(tS.QtO,{ml:"xs"})]},e)})}),(0,s.jsx)(t4.m.div,{initial:{height:0,opacity:0},animate:i?{height:"auto",opacity:1}:{height:0,opacity:0},children:(0,s.jsx)(nl,{labelOnly:!0,options:(null==o?void 0:o.map(e=>({value:e,label:e})))||[],values:n,onChange:l,TransComponent:eL.w})}),(0,s.jsx)(S.so,{mt:"sm",gap:"sm",wrap:"wrap",children:n.map(e=>(0,s.jsxs)(ei.$n,{onClick:()=>{l(n.filter(t=>t!==e))},size:"tertiary",colorPalette:"neutral",py:"2xs",children:[(0,s.jsx)(eL.w,{id:"rating"===e?"average_sofascore_rating":e,children:e=>(0,s.jsx)(s.Fragment,{children:e})}),(0,s.jsx)(tS.zQC,{icon:"close",width:"12",height:"12",ml:"sm"})]},e))})]})}let nx={accumulation:t5[0].value,location:t7[0].value,appearancesRelation:void 0,appearancesQuantity:void 0,ageRelation:void 0,ageQuantity:void 0,positions:nn.map(e=>e.value),foot:nt[0].value,selectNationalities:"",nationalities:[],selectTeams:"",teams:[],fields:["goals","successfulDribbles","tackles","assists","accuratePassesPercentage","rating"]};function np(e){var t;let{groups:n,hideHomeAndAway:a,setFilter:l,...i}=e,[r,o]=(0,C.useState)((null==(t=nd())?void 0:t.accumulation)||nx.accumulation),[d,u]=(0,C.useState)(nx.location),[m,x]=(0,C.useState)(nx.appearancesRelation),[p,h]=(0,C.useState)(nx.appearancesQuantity),[g,j]=(0,C.useState)(nx.ageRelation),[y,v]=(0,C.useState)(nx.ageQuantity),[f,b]=(0,C.useState)(nx.positions),[T,w]=(0,C.useState)(nx.foot),[I,_]=(0,C.useState)(nx.selectNationalities),[k,A]=(0,C.useState)(nx.nationalities),[z,M]=(0,C.useState)(nx.selectTeams),[R,E]=(0,C.useState)(nx.teams),[P,Y]=(0,C.useState)(nx.fields),H=(0,c.A)(),N=(0,C.useRef)();return(0,C.useEffect)(()=>{l({accumulation:r,location:d,appearancesRelation:m,appearancesQuantity:p,ageRelation:g,ageQuantity:y,positions:f,foot:T,nationalities:k,teams:R,fields:P})},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.so,{align:"center",justify:"space-between",px:"sm",my:"xs",minH:"[34px]",children:[!a&&(0,s.jsx)(t2,{value:d,options:t7,onChange:u}),(0,s.jsx)(nc,{label:"match_appearances",relation:m,setRelation:x,quantity:p,setQuantity:h}),(0,s.jsxs)(S.so,{align:"center",my:"[1px]",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"accumulation"})}),(0,s.jsx)(ei.ms,{label:H.formatMessage({id:"accumulation"}),items:t5,initialSelectedItem:t5.find(e=>e.value===r)||t5[0],renderItem:e=>(null==e?void 0:e.label)?(0,s.jsx)(O.A,{id:null==e?void 0:e.label}):"",onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&o(t.value)},alignRight:!0})]})]}),(0,s.jsx)(eE.cG,{}),(0,s.jsxs)(S.so,{align:"center",justify:"space-between",px:"sm",my:"xs",minH:"[34px]",children:[(0,s.jsx)(nc,{label:"stats.age",relation:g,setRelation:j,quantity:y,setQuantity:v}),(0,s.jsxs)(S.so,{align:"center",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"position"})}),(0,s.jsx)(S.so,{align:"center",children:nn.map(e=>{let t=f.includes(e.value);return(0,s.jsx)(eE.Sc,{name:e.value,checked:t,px:"sm",py:"xs",h:"34",gap:"sm",onChange:()=>{b(t?f.filter(t=>t!==e.value):[...f,e.value])},children:e.label},e.value)})})]}),(0,s.jsxs)(S.so,{align:"center",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"player_preferred_foot"})}),(0,s.jsx)(ei.ms,{label:H.formatMessage({id:"player_preferred_foot"}),items:nt,initialSelectedItem:nt.find(e=>e.value===T)||nt[0],renderItem:e=>(null==e?void 0:e.label)?(0,s.jsx)(O.A,{id:null==e?void 0:e.label}):"",onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&w(t.value)},alignRight:!0})]})]}),(0,s.jsx)(eE.cG,{}),(0,s.jsxs)(S.so,{align:"center",justify:"space-between",px:"sm",my:"xs",minH:"[34px]",children:[i.nationalities.length>0&&(0,s.jsxs)(S.so,{align:"center",px:"md",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"nationality"})}),(0,s.jsx)(t2,{value:I,options:ns,onChange:_})]}),(0,s.jsxs)(S.so,{align:"center",px:"md",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"team"})}),(0,s.jsx)(t2,{value:z,options:ns,onChange:M})]})]}),!!I&&(0,s.jsx)(t4.m.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},children:(0,s.jsx)(ni,{label:"nationality",name:"nationalities",values:k,options:i.nationalities,onChange:A})}),!!z&&(0,s.jsx)(t4.m.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},children:(0,s.jsx)(ni,{label:"team",name:"teams",values:R,options:i.teams,onChange:E})}),!!n&&(0,s.jsx)(S.az,{bg:"surface.s2",br:"md",mx:"md",mt:"xs",mb:"md",p:"sm",pb:"lg",children:(0,s.jsx)(nm,{groups:n,values:P,onChange:async e=>{e.length<=6?Y(e):(await (0,t6.Mx)(N.current),N.current=await (0,t6.MZ)((0,s.jsxs)(S.so,{dir:document.dir,align:"center",children:[(0,s.jsx)(tS.G_L,{fill:"onColor.primary",mr:"lg"}),(0,s.jsx)(ei.EY,{display:"block",color:"onColor.primary",textStyle:"body.medium",children:(0,s.jsx)(O.A,{id:"error_max_fields",defaultMessage:"Maximum number of filter fields already selected"})})]}),{autoClose:3e3,closeButton:!1,className:"sofa-toast--info",position:"bottom-center"}))}})}),(0,s.jsxs)(S.so,{px:"md",gap:"sm",mb:"md",children:[(0,s.jsxs)(ei.$n,{onClick:()=>{let e={accumulation:r,location:d,appearancesRelation:m,appearancesQuantity:p,ageRelation:g,ageQuantity:y,positions:f,foot:T,selectNationalities:I,nationalities:k,selectTeams:z,teams:R,fields:P};l(e),no(e)},children:[(0,s.jsx)(O.A,{id:"apply"}),(0,s.jsx)(tS.VsF,{width:16,height:16,ml:"xs",mt:"-2"})]}),(0,s.jsxs)(ei.$n,{colorPalette:"neutral",onClick:()=>{let e={...nx,fields:P};o(e.accumulation),u(e.location),x(e.appearancesRelation),h(e.appearancesQuantity),j(e.ageRelation),v(e.ageQuantity),b(e.positions),w(e.foot),_(e.selectNationalities),A(e.nationalities),M(e.selectTeams),E(e.teams),Y(e.fields),l(e),no(e)},children:[(0,s.jsx)(O.A,{id:"clear_filters"}),(0,s.jsx)(tS.xV8,{width:16,height:16,ml:"xs",mt:"-2"})]})]})]})}function nh(e){var t,n;let{setFilter:a}=e,[l,i]=(0,C.useState)((null==(t=nd())?void 0:t.accumulation)||t5[0].value),[r,o]=(0,C.useState)((null==(n=nd())?void 0:n.minApps)||""),d=(0,c.A)();return(0,C.useEffect)(()=>{a({accumulation:l,minApps:r}),no({accumulation:l,minApps:r})},[l,r]),(0,s.jsxs)(S.so,{align:"center",justify:"space-between",px:"sm",my:"xs",children:[(0,s.jsxs)(S.so,{align:"center",gap:"sm",children:[(0,s.jsx)(t2,{value:r,options:t8,onChange:o}),(0,s.jsx)(S.az,{children:(0,s.jsx)(eE.AM,{children:(0,s.jsx)(eE.AM.Content,{minW:"280",children:(0,s.jsx)(O.A,{id:"stats.playersWithMinAppsDescription"})})})})]}),(0,s.jsxs)(S.so,{align:"center",gap:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:"assistive.default",children:(0,s.jsx)(O.A,{id:"accumulation"})}),(0,s.jsx)(ei.ms,{label:d.formatMessage({id:"accumulation"}),items:t5,initialSelectedItem:t5.find(e=>e.value===l)||t5[0],renderItem:e=>(null==e?void 0:e.label)?(0,s.jsx)(O.A,{id:null==e?void 0:e.label}):"",onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&i(t.value)},alignRight:!0})]})]})}let ng=e=>{let{currentPage:t,totalPages:n,selectPage:a}=e,l=t>0&&t+1<=n,i=t>0&&t-1>0,r=nu(t,n);return(0,s.jsxs)(S.so,{py:"lg",align:"center",justify:"center",children:[(0,s.jsx)(ei.K0,{size:"primary",variant:"clear",disabled:!i,onClick:()=>{i&&a(t-1)},children:(0,s.jsx)(tS.zQC,{icon:"chevron-left"})}),(0,s.jsx)(S.so,{children:r.map((e,n)=>{let l=r[n+1]||e+1,i=e===t;return(0,s.jsxs)(C.Fragment,{children:[(0,s.jsx)(ei.$n,{size:"secondary",variant:i?"filled":"clear",mx:"xs",onClick:()=>{e!==t&&a(e)},children:e}),e+1!==l&&(0,s.jsx)(ei.EY,{textStyle:"display.medium",mx:"xs",mt:"sm",color:"neutrals.nLv3",children:"..."})]},e)})}),(0,s.jsx)(ei.K0,{size:"primary",variant:"clear",disabled:!l,onClick:()=>{l&&a(t+1)},children:(0,s.jsx)(tS.zQC,{icon:"chevron-right"})})]})};var nj=n(40237),ny=n(62042),nv=n(76868),nf=n(24159);let nb=(0,ny.JB)({slots:["table","headRow","bodyRow","playerLink"],base:{table:{width:"100%",borderCollapse:"collapse",borderSpacing:"0",textAlign:"center",textStyle:"body.small",tableLayout:"fixed","& th, & td":{py:"xs",px:"[6px]",border:"1px solid {colors.neutrals.nLv4}",textOverflow:"ellipsis",overflow:"hidden","&:first-child":{borderStart:"none"},"&:last-child":{borderEnd:"none"}},"& th":{color:"neutrals.nLv3",height:"5xl",position:"relative"}},headRow:{"&:nth-child(odd)":{bg:"surface.s2"}},bodyRow:{"&:nth-child(even)":{bg:"surface.s2"}},playerLink:{color:{base:"neutrals.nLv1",_hover:"primary.default"},display:"inherit"}}}),nT=e=>{let{header:t,data:n,activeTab:l,onSortClick:i,sort:r,indexOffset:o=0}=e,d=(0,c.A)(),{table:u,headRow:m,bodyRow:x,playerLink:p}=nb();return n.length?(0,s.jsxs)("table",{className:u,children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:m,children:[(0,s.jsx)(S.I4.th,{w:"2xl",children:(0,s.jsx)("span",{style:{position:"relative",top:-8},children:"#"})}),(0,s.jsx)(S.I4.th,{w:"3xl",px:"0!",children:(0,s.jsx)("span",{style:{position:"relative",top:-8},children:(0,s.jsx)(O.A,{id:"team"})})}),(0,s.jsx)(S.I4.th,{w:"[120px]",textAlign:"start",children:(0,s.jsx)("span",{style:{position:"relative",top:-8},children:(0,s.jsx)(O.A,{id:"basic.name"})})}),t.map(e=>(0,s.jsx)(eL.w,{id:"rating"===e?"average_sofascore_rating":e,children:t=>(0,s.jsxs)(S.I4.th,{w:"auto",cursor:"pointer",px:"0!",title:t.toString(),onClick:()=>{i(r==="-".concat(e)?e:"-".concat(e),l)},children:[(0,s.jsx)(ei.EY,{lineClamp:2,position:"relative",top:"-sm",textStyle:"body.small",color:"[inherit]",textAlign:"center",children:t}),(0,s.jsx)(tS.Bfd,{className:(0,ny.AH)({position:"absolute",bottom:"xs",left:"[calc(50% - 8px)]",transformOrigin:"center center"}),w:16,h:16,fill:-1!==r.indexOf(e)?"primary.default":"onSurface.nLv4",style:{transform:r===e?"rotate(180deg)":void 0}})]})},e))]})}),(0,s.jsx)("tbody",{children:n.map((e,n)=>(0,s.jsxs)("tr",{className:x,children:[(0,s.jsx)(S.I4.td,{w:"2xl",px:"0!",children:o+n+1}),(0,s.jsx)(S.I4.td,{w:"3xl",title:d.formatMessage({id:e.team.slug,defaultMessage:e.team.name}),children:(0,s.jsx)(j.gT,{team:e.team,sport:a.QCR.Football,style:{display:"block"},children:(0,s.jsx)(nj.p,{id:e.team.id,className:(0,ny.AH)({_hover:{opacity:.8},display:"inline-block",verticalAlign:"middle"}),name:e.team.name,size:21})})}),(0,s.jsx)(S.I4.td,{w:"[150px]",textAlign:"start",title:e.player.name,children:(0,s.jsx)(j.uc,{className:p,player:e.player,sportSlug:a.QCR.Football,children:(0,s.jsx)(nf.c,{entity:e.player})})}),t.map(t=>{let n="rating"===t?e[t]:null;return(0,s.jsx)(S.I4.td,{w:"auto",children:n?(0,s.jsx)(S.so,{justify:"center",children:(0,s.jsx)(nj.G,{rating:n,format:"sideBox"})}):(0,s.jsx)(s.Fragment,{children:e[t]})},t)})]},e.player.id))})]}):(0,s.jsx)(nv.p,{graphic:"no-statistics",descriptionMessageId:"stats.noResults"})},nw="goalkeeper",nS="detailed",nC=["summary","attack","defence","passing",nw,nS],nI={summary:"-rating",attack:"-goals",defence:"-tackles",passing:"-bigChancesCreated",[nw]:"-saves",[nS]:"-rating"},n_={summary:"statistics_general",attack:"attack",defence:"defense",goalkeeper:"goalkeeping",detailed:"detailed"},nk={limit:20},nA=(e,t,n)=>{let s="object"==typeof n?n.join("~"):String(n);return"".concat(e,".").concat(t,".").concat(s)},nz=e=>{let{uniqueTournamentId:t,seasonId:n,sport:l}=e,[i,r]=(0,C.useState)(),[o,d]=(0,C.useState)(nC[0]),[u,c]=(0,C.useState)(nk),[m,x]=(0,C.useState)(),[p,h]=(0,C.useState)(),[g,j]=(0,C.useState)(nI),y=(0,t1.ZC)(o),v=o===nS,f=(0,C.useCallback)(function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-rating";if(!i)return;x(void 0),h(void 0);let r={...nk,order:l,filtersConditions:[]};if(s>1&&(r.offset=(s-1)*20),o===nw&&r.filtersConditions.push(nA("position",t3.IN,"G")),e.accumulation&&(r.accumulation=e.accumulation),v){var d,u;e.fields&&(r.fields=e.fields.join(",")),e.location&&r.filtersConditions.push(nA("type",t3.EQ,e.location)),e.appearancesRelation&&e.appearancesQuantity&&r.filtersConditions.push(nA("appearances",e.appearancesRelation,e.appearancesQuantity)),e.ageRelation&&e.ageQuantity&&r.filtersConditions.push(nA("age",e.ageRelation,e.ageQuantity)),e.positions&&r.filtersConditions.push(nA("position",t3.IN,e.positions)),e.foot&&r.filtersConditions.push(nA("preferredFoot",t3.EQ,e.foot)),e.selectTeams&&(null==(d=e.teams)?void 0:d.length)&&r.filtersConditions.push(nA("team",t3.IN,e.teams)),e.selectNationalities&&(null==(u=e.nationalities)?void 0:u.length)&&r.filtersConditions.push(nA("nationality",t3.IN,e.nationalities))}else r.group=o,e.minApps&&(r.minApps="yes");r.filtersConditions.length&&(r.filters=r.filtersConditions.join(",")),delete r.filtersConditions,a.jFR.fetchTournamentStatistics(t,n,r).then(e=>{x(e.results),h({page:e.page,pages:e.pages})}).catch(console.error)},[t,n,i,o,g,v]),b=(0,C.useCallback)(e=>{p&&(h({page:e,pages:p.pages}),f(u,e,g[o]))},[f,p,g,v]),T=(0,C.useCallback)(e=>{c(e),f(e,1,g[o])},[f]),w=(0,C.useCallback)((e,t)=>{let n={...g};n[t]=e,j(n),f(u,1,e)},[f,u]);if((0,C.useEffect)(()=>{a.jFR.fetchTournamentStatisticsInfo(t,n).then(e=>{r({statisticsGroups:e.statisticsGroups,hideHomeAndAway:e.hideHomeAndAway,hasNationalities:!!e.nationalities,teams:e.teams.map(e=>({value:String(e.id),label:e.shortName||e.name})),nationalities:e.nationalities?Object.keys(e.nationalities).map(t=>({value:t,label:e.nationalities[t]})):[]}),d(nC[0]),c(nk),x(void 0),h(void 0),j(nI),f(u)}).catch(e=>{r(void 0),console.error(e)})},[t,n]),(0,C.useEffect)(()=>{y===nS||v||f(u,1,g[o])},[o]),!i||l!==a.QCR.Football)return null;let{nationalities:I,statisticsGroups:_,teams:k,hideHomeAndAway:A}=i,z=v?u.fields||[]:_[o];return(0,s.jsx)(ee.t,{tag:"LeagueStats",children:(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"player_stats"}),(0,s.jsxs)(eE.tU,{onChange:e=>{d(e)},value:o,variant:"tertiary",children:[(0,s.jsx)(S.az,{px:"lg",py:"sm",children:nC.map(e=>{var t;return(0,s.jsx)(eE.tU.Tab,{tabKey:e,children:(0,s.jsx)(O.A,{id:null!=(t=n_[e])?t:e})},"tab-"+e)})}),o===nS?(0,s.jsx)(np,{nationalities:I,teams:k,groups:_.detailed,setFilter:T,hideHomeAndAway:A}):(0,s.jsx)(nh,{setFilter:T}),nC.map(e=>(0,s.jsx)(eE.tU.Panel,{tabKey:e,children:(0,s.jsxs)("div",{style:{minHeight:364},children:[!m&&(0,s.jsx)(S.az,{style:{height:725},children:(0,s.jsx)(t9.a,{padding:294})}),m&&(0,s.jsx)(nT,{sort:g[o],activeTab:o,onSortClick:w,header:z,data:m,indexOffset:p?Math.max(20*(p.page-1),0):0}),p&&p.pages>1&&(0,s.jsx)(ng,{currentPage:p.page,totalPages:p.pages,selectPage:b})]})},e))]})]})})};var nM=n(78259),nR=n(83260);let nE=e=>{let{fill:t="white"}=e;return(0,s.jsx)("svg",{width:"133",height:"160",viewBox:"0 0 133 160",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsxs)("g",{fill:t,fillRule:"nonzero",children:[(0,s.jsx)("path",{d:"M56.988 114h19v19h-19z"}),(0,s.jsx)("g",{opacity:".8",children:(0,s.jsx)("path",{d:"M38 133h19v19H38zM57 133h19v19H57zM95 133h19v19H95zM38 114h19v19H38zM76 95h19v19H76zM95 95h19v19H95zM57 57h19v19H57zM95 57h19v19H95zM114 57h19v19h-19zM0 0h19v19H0zM57 0h19v19H57z"})}),(0,s.jsx)("g",{opacity:".5",children:(0,s.jsx)("path",{d:"M19 133h19v19H19zM114 133h19v19h-19zM76 114h19v19H76zM0 95h19v19H0zM57 95h19v19H57zM76 76h19v19H76zM95 76h19v19H95zM38 57h19v19H38zM76 57h19v19H76zM38 38h19v19H38zM76 38h19v19H76zM0 19h19v19H0z"})})]})})},nP=e=>{let{fill:t="white"}=e;return(0,s.jsx)("svg",{width:"133",height:"160",viewBox:"0 0 133 160",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsxs)("g",{fill:t,fillRule:"nonzero",children:[(0,s.jsx)("path",{d:"M76.012 114h-19v19h19z"}),(0,s.jsx)("g",{opacity:".5",children:(0,s.jsx)("path",{d:"M114 133H95v19h19zM19 133H0v19h19zM57 114H38v19h19zM133 95h-19v19h19zM76 95H57v19h19zM57 76H38v19h19zM38 76H19v19h19zM95 57H76v19h19zM57 57H38v19h19zM95 38H76v19h19zM57 38H38v19h19zM133 19h-19v19h19z"})}),(0,s.jsx)("g",{opacity:".8",children:(0,s.jsx)("path",{d:"M95 133H76v19h19zM76 133H57v19h19zM38 133H19v19h19zM95 114H76v19h19zM57 95H38v19h19zM38 95H19v19h19zM76 57H57v19h19zM38 57H19v19h19zM19 57H0v19h19zM133 0h-19v19h19zM76 0H57v19h19z"})})]})})},nY=e=>{let{isOpen:t,setIsOpen:n}=e;return(0,s.jsx)(eg.A,{isOpen:t,setIsOpen:n,header:(0,s.jsx)(ei.EY,{display:"block",textStyle:"display.large",color:"neutrals.nLv1",p:{md:"lg"},children:(0,s.jsx)(O.A,{id:"player_of_the_season_title"})}),children:(0,s.jsxs)(S.so,{direction:"column",p:"lg",pt:"0",gap:"lg",maxW:{md:"[320px]"},children:[(0,s.jsx)(S.so,{width:"100%",justify:"center",bgColor:"surface.s0",br:"sm",p:"lg",children:(0,s.jsx)("img",{width:264,height:183,src:"/static/images/player-of-the-season-award.png",alt:"Sofascore player of the season award"})}),(0,s.jsxs)(S.I4.a,{href:"https://corporate.sofascore.com/about/rating",rel:"noreferrer",textStyle:"display.small",color:"primary.default",target:"_blank",display:"flex",gap:"xs",cursor:"pointer",alignItems:"center",hideBelow:"md",children:[(0,s.jsx)(O.A,{id:"rating_learn_more_button"}),(0,s.jsx)(tS.CCT,{fill:"primary.default",width:16,height:16})]}),(0,s.jsx)(ei.EY,{display:"block",color:"neutrals.nLv1",textStyle:"body.mediumParagraph",children:(0,s.jsx)(O.A,{id:"rating_player_of_the_season_body_1"})}),(0,s.jsx)(ei.EY,{display:"block",color:"neutrals.nLv1",textStyle:"body.mediumParagraph",children:(0,s.jsx)(O.A,{id:"rating_player_of_the_season_body_2"})}),(0,s.jsx)(ei.$n,{onClick:()=>{window.open("https://corporate.sofascore.com/about/rating","_blank"),n(!1)},mt:"lg",display:{md:"none"},children:(0,s.jsx)(O.A,{id:"learn_more_button"})})]})})},nH=e=>{var t,n;let{uniqueTournamentId:l,seasonId:i,showLoader:r}=e,[o,d]=(0,C.useState)(!1),{data:u,isLoading:c,error:m}=(0,ey.Ay)(i?a.V3t.playerOfTheSeason(l,i):null),[x,p]=(0,nR.A)("playerOfTheSeason",{uniqueTournamentId:l,seasonId:i,playerId:null==u?void 0:u.player.id});if((0,C.useEffect)(()=>{i&&!m&&r&&!c&&(0,q.ke)({action:"impression",location:"league_details",type:"player_of_the_season"})},[l,i,m,r,c]),(0,C.useEffect)(()=>{p({uniqueTournamentId:l,seasonId:i,playerId:null==u?void 0:u.player.id})},[l,i,null==u?void 0:u.player.id]),m||!r&&!u)return null;let h=a.V3t.image(l),g=u&&a.qvj.image(u.player.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.az,{position:"relative",br:["lg","xl"],elevation:"2",h:"[152px]",overflow:"hidden",children:[(0,s.jsxs)(S.az,{position:"absolute",width:"100%",height:"100%",overflow:"hidden",br:"lg",children:[(0,s.jsx)(S.az,{position:"absolute",width:"100%",height:"100%",overflow:"hidden",br:"lg",transform:"scale(1.5)",style:{filter:"blur(50px)",backgroundImage:"url(".concat(h,")"),backgroundSize:"100% 100%",backgroundPosition:"center center"}}),(0,s.jsxs)(S.so,{position:"absolute",top:"0",left:"0",w:"100%",justify:"space-between",br:"lg",elevation:"3",opacity:"0.1",children:[(0,s.jsx)(nE,{}),(0,s.jsx)(nP,{})]})]}),(0,s.jsxs)(S.so,{direction:"column",justify:"space-between",w:"100%",h:"100%",p:"lg",pt:"md",bg:"overlay.darken3",children:[(0,s.jsxs)(S.so,{w:"100%",justify:"space-between",zIndex:"button",children:[(0,s.jsxs)(S.so,{align:"center",gap:"lg",children:[(0,s.jsx)(tS.gWL,{w:24,h:24,fill:"white"}),(0,s.jsx)(ei.EY,{textStyle:"display.medium",color:"onColor.primary",children:(0,s.jsx)(O.A,{id:"player_of_the_season",values:{gender:null!=(t=null==u?void 0:u.team.gender)?t:a.YT8.Male}})})]}),(0,s.jsx)(tS.G_L,{cursor:"pointer",fill:"onColor.primary",onClick:()=>d(!0)})]}),c?(0,s.jsx)(t9.a,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.so,{w:"100%",justify:"space-between",align:"center",zIndex:"button",children:[(0,s.jsx)(j.uc,{player:null==u?void 0:u.player,sportSlug:a.QCR.Football,hash:"tab:statistics",onClick:()=>{(0,q.ke)({action:"click",location:"league_details",type:"player_of_the_season"})},children:(0,s.jsxs)(S.so,{align:"center",children:[(0,s.jsx)(nM.tg,{src:g,size:48}),(0,s.jsxs)(S.az,{ml:"sm",children:[(0,s.jsx)(ei.EY,{display:"block",textStyle:"display.medium",color:"onColor.primary",children:(null==u?void 0:u.player)&&(0,s.jsx)(nf.c,{entity:null==u?void 0:u.player})}),(0,s.jsxs)(S.so,{mt:"xs",align:"center",children:[(0,s.jsx)(nM.pY,{id:null==u?void 0:u.team.id,size:16}),(0,s.jsx)(ei.EY,{display:"block",textStyle:"assistive.default",color:"onColor.primary",ml:"xs",mt:"2xs",children:(null==u?void 0:u.team)&&(0,s.jsx)(nf.c,{entity:null==u?void 0:u.team})})]})]})]})}),(0,s.jsx)(nM.GW,{rating:null==u?void 0:u.statistics.rating,format:"sideBox",isOnColor:!0})]}),(0,s.jsx)(S.so,{w:"100%",justify:"center",align:"center",zIndex:"button",children:(0,s.jsx)(j.uc,{player:null==u?void 0:u.player,sportSlug:a.QCR.Football,hash:"tab:statistics",onClick:()=>{(0,q.ke)({action:"click",location:"league_details",type:"player_of_the_season"})},children:(0,s.jsxs)(S.so,{align:"center",cursor:"pointer",children:[(0,s.jsx)(ei.Ym,{ml:"sm",textStyle:"display.small",color:"onColor.primary",children:(0,s.jsx)(O.A,{id:"see_player_statistics",values:{gender:null!=(n=null==u?void 0:u.team.gender)?n:a.YT8.Male}})}),(0,s.jsx)(tS.CCT,{fill:"onColor.primary",ml:"xs"})]})})})]})]})]}),(0,s.jsx)(nY,{isOpen:o,setIsOpen:d})]})},nN=e=>{var t,n,l;let{uniqueTournamentId:i,seasonId:r}=e,[o,d]=(0,C.useState)(!1),u=(0,C.useContext)(_.Ws),{data:c,error:m,isLoading:x}=(0,ey.Ay)(r?a.V3t.playerOfTheSeasonRace(i,r):null);if(m||!c||!(null==(t=c.topPlayers.rating)?void 0:t.length))return null;let p=null==c?void 0:c.topPlayers.rating,h=null!=(l=null==(n=p[0].team)?void 0:n.gender)?l:a.YT8.Male;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{title:(0,s.jsxs)(S.so,{w:"100%",justify:"space-between",zIndex:"button",children:[(0,s.jsxs)(S.so,{align:"center",gap:"lg",children:[(0,s.jsx)(tS.gWL,{w:24,h:24,fill:"onSurface.nLv1"}),(0,s.jsx)(ei.EY,{textStyle:"display.medium",children:(0,s.jsx)(O.A,{id:"player_of_the_season_race",values:{gender:h}})})]}),(0,s.jsx)(tS.G_L,{cursor:"pointer",fill:"onSurface.nLv1",onClick:()=>d(!0)})]})}),(0,s.jsx)(S.so,{direction:"column",overflow:"hidden",pb:{base:"lg",mdDown:"0"},children:x?(0,s.jsx)(S.so,{justify:"center",align:"center",w:"100%",children:(0,s.jsx)(t9.a,{})}):null==p?void 0:p.map((e,t)=>(0,s.jsx)(j.uc,{player:e.player,sportSlug:u,hash:"tab:statistics",onClick:()=>{(0,q.ke)({action:"click",location:"league_details",type:"player_of_the_season_race"})},children:(0,s.jsxs)(S.so,{w:"100%",justify:"space-between",align:"center",h:"5xl",px:"lg",cursor:"pointer",_hover:{bg:"surface.s2"},children:[(0,s.jsxs)(S.so,{align:"center",children:[(0,s.jsx)(ei.EY,{display:"block",w:"lg",h:"lg",mr:"xs",children:t+1}),(0,s.jsx)(nM.tg,{id:e.player.id,name:e.player.name,size:40}),(0,s.jsxs)(S.az,{flexGrow:1,ml:"lg",children:[(0,s.jsx)(ei.EY,{display:"block",children:e.player&&(0,s.jsx)(nf.c,{entity:e.player})}),(0,s.jsxs)(S.so,{align:"center",mt:"xs",children:[e.team&&(0,s.jsx)(nM.pY,{id:e.team.id,size:16,name:e.player.name}),(0,s.jsx)(ei.EY,{display:"block",textStyle:"assistive.default",color:"neutrals.nLv3",ml:"xs",children:(null==e?void 0:e.team)&&(0,s.jsx)(nf.c,{entity:null==e?void 0:e.team})})]})]})]}),(0,s.jsx)(nM.GW,{rating:null==e?void 0:e.statistics.rating,format:"sideBox"})]})},t))}),r&&(0,s.jsx)(S.I4.a,{onClick:()=>{window.location.hash="id:".concat(r,",tab:top_players")},hideFrom:"md",children:(0,s.jsx)($.Zp.Footer,{ctaParams:{messageId:"view_top_players",values:{gender:h},icon:er.X.Right}})})]}),(0,s.jsx)(nY,{isOpen:o,setIsOpen:d})]})};var nq=n(77015),nF=n(75414);let nL=e=>{let{player:t,team:n,popularityRanking:l}=e,i=a.USm.includes(n.sport.slug);return(0,s.jsx)(j.uc,{player:t,sportSlug:n.sport.slug,children:(0,s.jsxs)(S.so,{flexGrow:"1",align:"center",w:"100%",px:"lg",py:"sm",cursor:"pointer",_hover:{bg:"surface.s2"},direction:"row",justify:"space-between",children:[(0,s.jsxs)(S.so,{children:[(0,s.jsx)(S.so,{w:"lg",align:"center",justify:"center",children:(0,s.jsx)(ei.EY,{textStyle:"body.small",children:l})}),(0,s.jsxs)(S.az,{position:"relative",w:"3xl",h:"3xl",mx:"md",children:[(0,s.jsx)(nq.t,{id:t.id,name:t.name,size:40}),t.country&&(0,s.jsx)(S.so,{position:"absolute",bottom:"[0px]",right:"[0px]",children:(0,s.jsx)(nq.w,{alpha2:t.country.alpha2,h:"16px",w:"16px"})})]}),(0,s.jsxs)(S.so,{direction:"column",justify:"center",align:"flex-start",children:[(0,s.jsx)(ei.EY,{lineHeight:"md",children:(0,s.jsx)(nf.c,{entity:t})}),(0,s.jsx)(ei.EY,{display:"block",mt:"xs",textAlign:"end",textStyle:"assistive.default",color:"neutrals.nLv3",textTransform:"capitalize",children:(0,s.jsx)(O.A,{id:"basic.followersWithCount",values:{n:(0,s.jsx)(ei.EY,{textStyle:"assistive.default",color:"primary.default",children:(0,nF.A)(t.userCount)})}})})]})]}),i&&(0,s.jsx)(tT.e,{entity:a.bq7.Players,id:t.id,location:P.y.PopularPlayers,type:P.b.Player})]})})};function nD(e){let{popularPlayers:t}=e,[n,a]=(0,C.useState)(!1),l=t.length>5,i=n?t:t.slice(0,5);return(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"tournament.popularPlayers"}),i.map((e,t)=>(0,s.jsx)(nL,{team:e.team,player:e.player,popularityRanking:t+1},e.player.id)),(0,s.jsx)($.Zp.Footer,{ctaParams:l?{messageId:n?"show_less":"show_more",onClick:()=>a(e=>!e),icon:n?er.X.Up:er.X.Down}:void 0})]})}function nO(e){let{popularPlayers:t,uniqueTournament:n}=e,[a,l]=(0,C.useState)(!1),i=null==t?void 0:t.slice(0,3);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"tournament.popularPlayers"}),i.map((e,t)=>(0,s.jsx)(nL,{team:e.team,player:e.player,popularityRanking:t+1},e.player.id)),(0,s.jsx)($.Zp.Footer,{ctaParams:{messageId:"basic.seeAllPlayers",onClick:()=>l(e=>!e),icon:er.X.Right}})]}),(0,s.jsxs)(eE.Xn,{isOpen:a,onClose:()=>l(!1),children:[(0,s.jsx)(eE.Xn.Header,{children:(0,s.jsxs)(S.so,{children:[(0,s.jsx)(S.so,{children:(0,s.jsx)(eh.e,{id:n.id,h:"56px",w:"56px"})}),(0,s.jsxs)(S.so,{direction:"column",align:"flex-start",justify:"center",ml:"sm",children:[(0,s.jsx)(ei.H3,{textStyle:"display.large",children:n.name}),(0,s.jsx)(ei.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(O.A,{id:"tournament.popularPlayers"})})]})]})}),(0,s.jsx)(eE.Xn.Content,{children:(0,s.jsx)(S.so,{h:"100%",w:"100%",direction:"column",children:t.map((e,t)=>(0,s.jsx)(nL,{team:e.team,player:e.player,popularityRanking:t+1},e.player.id))})})]})]})}function nW(e){let{uniqueTournament:t,seasonId:n}=e,l=56953===n&&t.id===a.G6l.Euro||57114===n&&t.id===a.G6l.CopaAmerica,{data:i}=(0,ey.Ay)(l?a.V3t.topFollowedPlayers(t.id,n):null);return i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.az,{hideBelow:"md",maxW:"[440px]",children:(0,s.jsx)(nD,{popularPlayers:null==i?void 0:i.topFollowedPlayers})}),(0,s.jsx)(S.az,{display:{md:"none"},children:(0,s.jsx)(nO,{popularPlayers:null==i?void 0:i.topFollowedPlayers,uniqueTournament:t})})]}):null}let nQ=e=>{let{team:t,popularityRanking:n}=e,l=(0,eH.o)();return(0,s.jsx)(j.gT,{team:t,sport:l,children:(0,s.jsxs)(S.so,{flexGrow:"1",align:"center",w:"100%",px:"lg",py:"sm",cursor:"pointer",_hover:{bg:"surface.s2"},direction:"row",justify:"space-between",children:[(0,s.jsxs)(S.so,{children:[(0,s.jsx)(S.so,{w:"lg",align:"center",justify:"center",children:(0,s.jsx)(ei.EY,{textStyle:"body.small",color:"neutrals.nLv1",children:n})}),(0,s.jsx)(S.az,{position:"relative",w:"3xl",h:"3xl",mx:"md",children:(0,s.jsx)(eB.p,{id:t.id,name:t.name,size:40})}),(0,s.jsxs)(S.so,{direction:"column",justify:"center",align:"flex-start",children:[(0,s.jsx)(ei.EY,{lineHeight:"md",textStyle:"body.medium",color:"neutrals.nLv1",children:(0,s.jsx)(nf.c,{entity:t})}),(0,s.jsx)(ei.EY,{display:"block",mt:"xs",textAlign:"end",textStyle:"assistive.default",color:"neutrals.nLv3",textTransform:"capitalize",children:(0,s.jsx)(O.A,{id:"basic.followersWithCount",values:{n:(0,s.jsx)(ei.EY,{textStyle:"assistive.default",color:"primary.default",children:(0,nF.A)(t.userCount)})}})})]})]}),(0,s.jsx)(tT.e,{entity:a.bq7.Teams,id:t.id,location:P.y.PopularTeams,type:P.b.Team})]})})};function nG(e){let{uniqueTournament:t,seasonId:n}=e,l=74858===n&&t.id===a.G6l.SofascoreClubNXTU14,{data:i}=(0,ey.Ay)(l?a.V3t.topFollowedTeams(t.id,n):null),r=(null==i?void 0:i.topFollowedTeams)||[],{isMobile:o}=(0,ei.$c)(),[d,u]=(0,C.useState)(!1),c=[...r].slice(0,o?3:5);return r.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($.Zp,{children:[(0,s.jsx)($.Zp.Header,{titleId:"tournament.popularTeams"}),(!o&&d?r:c).map((e,t)=>(0,s.jsx)(nQ,{team:e,popularityRanking:t+1},e.id)),(0,s.jsx)($.Zp.Footer,{ctaParams:c.lengthu(e=>!e),icon:o?er.X.Right:d?er.X.Up:er.X.Down}})]}),o&&(0,s.jsxs)(eE.Xn,{isOpen:d,onClose:()=>u(!1),children:[(0,s.jsx)(eE.Xn.Header,{children:(0,s.jsxs)(S.so,{children:[(0,s.jsx)(S.so,{children:(0,s.jsx)(eh.e,{id:t.id,h:"56px",w:"56px"})}),(0,s.jsxs)(S.so,{direction:"column",align:"flex-start",justify:"center",ml:"sm",children:[(0,s.jsx)(ei.H3,{textStyle:"display.large",color:"neutrals.nLv1",children:t.name}),(0,s.jsx)(ei.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,s.jsx)(O.A,{id:"tournament.popularTeams"})})]})]})}),(0,s.jsx)(eE.Xn.Content,{children:(0,s.jsx)(S.so,{h:"100%",w:"100%",direction:"column",pb:"xl",children:r.map((e,t)=>(0,s.jsx)(nQ,{team:e,popularityRanking:t+1},e.id))})})]})]}):null}var nU=n(78144),nV=n(61703),nB=n(47530),nK=n(52827),nZ=n(45749),nX=n(10794),nJ=n(85625),n$=n(95868);let n0=e=>{let{tournamentId:t,roundId:n,eventHighlights:a}=e,{isMobile:l}=(0,ei.$c)(),i=(0,n$.MB)({type:"multiple",location:nJ.D.TournamentPage,tournamentId:t,roundId:n,screen:l?"mobile":"desktop",eventId:null});(0,nZ.P)({containerId:i,storyIds:a.map(e=>{let{sdkId:t}=e;return t}),location:nJ.D.TournamentPage});let r=(0,nK.i)(i);return(0,s.jsx)(S.az,{ref:r,id:i,h:"[188px]"})};function n1(e){let{uniqueTournamentId:t,seasonId:n,rounds:l,showPicker:i,selectedRound:r,setSelectedRound:o,sportSlug:d}=e,{eventHighlights:u,isLoading:c,isError:m}=function(e){let{eventId:t,uniqueTournamentId:n,seasonId:s,roundId:l}=e,i=(0,th.d4)(nX.LQ),{data:r,isLoading:o,error:d}=(0,ey.Ay)(i&&n&&s&&l?a.vCt.tournamentRoundVideoHighlights(i,n,s,l):null);return{eventHighlights:null==r?void 0:r.sportVideoHighlights.filter(e=>{var n;return!t||(null==(n=e.game)?void 0:n.eventId)===t}),isError:d,isLoading:o}}({uniqueTournamentId:t,seasonId:n,roundId:null==r?void 0:r.eventRoundId}),[x,p]=(0,C.useState)(!1),h=[a.QCR.Basketball,a.QCR.AmericanFootball].includes(d)?"game_highlights_title":"match_highlights_title";return((0,C.useEffect)(()=>{p(!0),setTimeout(()=>{p(!1)},0)},[null==r?void 0:r.eventRoundId]),m)?null:(0,s.jsxs)(S.az,{p:"sm",children:[(0,s.jsxs)(S.so,{justify:"space-between",align:"center",p:"sm",mb:"sm",children:[(0,s.jsx)(ei.EY,{textStyle:i?"display.medium":"display.small",children:(0,s.jsx)(O.A,{id:h})}),i&&r&&(0,s.jsx)(eE.ms,{items:l,onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&o(t)},initialSelectedItem:r,renderItem:e=>e?(0,s.jsx)(nB.rC,{roundName:null==e?void 0:e.roundName}):"",alignRight:!0})]}),(0,s.jsx)(S.az,{minH:"[188px]",position:"relative",children:x||!(null==r?void 0:r.eventRoundId)||c?null:(0,s.jsx)(n0,{tournamentId:t,roundId:null==r?void 0:r.eventRoundId,eventHighlights:u||[]})})]})}var n9=n(90510),n4=n(16620),n6=n(8298),n2=n(79387);let n3=(e,t,n)=>{let{uniqueTournamentId:s,uniqueTournamentName:l,uniqueTournamentSlug:i,categorySlug:r,sport:o,seasonId:u,roundId:c}=e,m="sofa-totw-embed-".concat(s,"-").concat(u,"-").concat(c),x=(0,k.vf)(t.locale),p="".concat(a.yuv).concat(x?"/".concat(x):"","/embed/unique-tournament/").concat(s,"/season/").concat(u,"/round/").concat(c,"/teamOfTheWeek"),h="?showCompetitionLogo=true&widgetTheme=light&widgetTitle=".concat(encodeURIComponent(l)),g=(0,a.Lo9)(d.z.getTranslatedRoute(n,"uniqueTournament",{sport:o,category:r,tournament:i,id:s},(0,D.HL)({id:u})).route,{isApiRoute:!1}),j='Sofascore'),y=t.formatMessage({id:"tournament.totw.backLink",defaultMessage:"Team of the Week provided by ".concat(j)},{linkToSofascore:j});return'\n
\n ').concat(y,"\n
")},n5=function(e){let t=(0,c.A)(),n=(0,x.A)();return(0,s.jsx)(n2.C,{callToAction:(0,s.jsx)(O.A,{id:"team_of_the_week_embed"}),embedString:n3(e,t,n),px:"0",my:"0"})};function n8(e){let{uniqueTournament:t,seasonId:n,selectedRound:l,setSelectedRound:i,rounds:r,showPicker:o,isRoundLoading:d}=e,{setTotwUrl:u}=(0,n4.d)(),c=(null==l?void 0:l.roundName.toLowerCase())==="season",m=(null==l?void 0:l.totwRoundId)&&n?a.V3t.teamOfTheWeekRoundDetails(t.id,n,l.totwRoundId):null,{data:x,isLoading:p}=(0,ey.Ay)(m);(0,C.useEffect)(()=>(u(m),()=>u(null)),[l]);let h=d||p;return h||x?(0,s.jsxs)(S.az,{children:[(0,s.jsx)($.Zp.Header,{titleId:c?"tournament.teamOfTheSeason":"team_of_the_week",variant:"left-aligned-desktop",actionComponent:o&&l?(0,s.jsx)(eE.ms,{items:r,onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&i(t)},initialSelectedItem:l,selectedItem:l,renderItem:e=>e?(0,s.jsx)(nB.rC,{roundName:null==e?void 0:e.roundName}):"",alignRight:!0}):(0,s.jsx)(S.az,{h:"2xl"})}),(0,s.jsxs)($.BU,{children:[(0,s.jsx)(eN.$,{messageId:c?"rating_team_of_the_season":"rating_team_of_the_week"}),(0,s.jsxs)(S.az,{children:[(0,s.jsx)(n6.I,{...x,isSeason:c}),(null==l?void 0:l.totwCreatedTimestamp)?(0,s.jsxs)(ei.EY,{my:"sm",mx:"2xs",display:"block",textAlign:"end",textStyle:"assistive.default",color:"neutrals.nLv3",children:[(0,s.jsx)(O.A,{id:"published"}),":"," ",(0,s.jsx)(n9.XU,{value:1e3*l.totwCreatedTimestamp,day:"numeric",month:"short"})]}):(0,s.jsx)(S.az,{h:"2xl"})]}),h&&(0,s.jsx)(S.az,{h:"4xl",bg:"surface.s2",br:"lg",hideBelow:"md"}),n&&l&&!h&&(0,s.jsx)(n5,{uniqueTournamentId:t.id,uniqueTournamentName:t.name,uniqueTournamentSlug:t.slug,categorySlug:t.category.slug,sport:t.category.sport.slug,seasonId:n,roundId:l.totwRoundId})]})]}):null}function n7(e){let{uniqueTournament:t,seasonId:n,sportSlug:l}=e,i=t.id,{rounds:r,isLoading:o,selectedRound:d,setSelectedRound:u,hasWSC:c,hasTOTW:m}=function(e,t){var n;let s=(0,th.d4)(nX.LQ),[l,i]=(0,C.useState)(void 0),r=t?a.V3t.teamOfTheWeekRounds(e,t):null,{data:o,isLoading:d}=(0,ey.Ay)(r),u=(null==o?void 0:o.rounds)||[],c=t&&s?a.vCt.tournamentRoundsWithVideoHighlights(s,e,t):null,{data:m,isLoading:x}=(0,ey.Ay)(c),p=(null==m?void 0:m.rounds.filter(e=>!u.find(t=>t.roundId===(null==e?void 0:e.eventRoundId))))||[],h=Array.from(new Set([...u.map(e=>e.roundSlug),...p.map(e=>e.roundSlug)])).map(e=>{var t;let n=u.find(t=>t.roundSlug===e),s=p.find(t=>t.roundSlug===e),a=(null==n?void 0:n.roundId)||(null==s?void 0:s.eventRoundId);return{eventRoundId:a,roundName:(null==n?void 0:n.roundName)||(null==s?void 0:s.eventRoundName)||a.toString(),roundSlug:(null==n?void 0:n.roundSlug)||(null==s?void 0:s.roundSlug),startDateTimestamp:null!=(t=(null==n?void 0:n.startDateTimestamp)||(null==s?void 0:s.startDateTimestamp))?t:null==n?void 0:n.createdAtTimestamp,totwRoundId:null==n?void 0:n.id,totwCreatedTimestamp:null==n?void 0:n.createdAtTimestamp}}).sort((e,t)=>{var n;return e.startDateTimestamp&&t.startDateTimestamp?t.startDateTimestamp-e.startDateTimestamp:null!=(n=t.startDateTimestamp)?n:0});return(0,C.useEffect)(()=>{i(h[0])},[t,null==(n=h[0])?void 0:n.roundSlug]),{rounds:h,isLoading:x||d,selectedRound:l,setSelectedRound:i,hasWSC:!!(null==m?void 0:m.rounds.length),hasTOTW:!!u.length}}(i,n),x=(0,eR.b)(i,"teamOfTheWeek"),p=l===a.QCR.AmericanFootball?"am_football_week_summary_title":"round_summary_title",h=n?(0,s.jsx)(n1,{uniqueTournamentId:i,seasonId:n,selectedRound:d,setSelectedRound:u,rounds:r,showPicker:!m,sportSlug:l}):null,g=(0,s.jsx)(n8,{uniqueTournament:t,seasonId:n,showPicker:!c,isRoundLoading:o,rounds:r,selectedRound:d,setSelectedRound:u});if(!o&&!m&&!c)return null;if(m&&c)return(0,s.jsxs)(nV.b,{branding:x,entityId:i,location:"league_totw",children:[(0,s.jsx)($.Zp.Header,{titleId:p,variant:"left-aligned",actionComponent:d?(0,s.jsx)(eE.ms,{items:r,onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&u(t)},initialSelectedItem:d,renderItem:e=>e?(0,s.jsx)(nB.rC,{roundName:null==e?void 0:e.roundName}):"",alignRight:!0}):void 0}),h,g]});if(m)return(0,s.jsx)(nV.b,{branding:x,entityId:i,location:"league_totw",children:g});if(c)return(0,s.jsx)($.Zp,{children:h});if(l===a.QCR.Football)return(0,s.jsx)(nV.b,{branding:x,entityId:i,location:"league_totw",children:g});else return null}var se=n(52363);let st=[a.QCR.Football,a.QCR.Handball,a.QCR.Basketball,a.QCR.IceHockey],sn=[a.QCR.Football,a.QCR.Handball,a.QCR.Basketball,a.QCR.IceHockey,a.QCR.Tennis],ss=J()(()=>n.e(8056).then(n.bind(n,8056)),{loadableGenerated:{webpack:()=>[8056]},ssr:!1,loading:()=>(0,s.jsx)(B.E,{uniqueKey:"unique-tournament-media-cl-2",br:"lg"})}),sa=J()(()=>Promise.all([n.e(4591),n.e(4824),n.e(3003)]).then(n.bind(n,73003)),{loadableGenerated:{webpack:()=>[73003]},loading:()=>(0,s.jsx)(tp.A,{})}),sl=J()(()=>n.e(4672).then(n.bind(n,54672)),{loadableGenerated:{webpack:()=>[54672]},ssr:!1}),si=[1,133,16];function sr(e){var t,n;let{uniqueTournament:l,seasons:i,info:r,seo:o,activeSeasonId:d,setActiveSeasonId:u=Z(),hasEvents:c}=e,m=eC.zK[l.id],x=m&&(null==m?void 0:m.historyHighlightsEndYear),p=eI.excludedSeasonIds.includes(d),h=l.category.sport.slug,g=h===a.QCR.Football,j=i[0],y=i.find(e=>e.id===d),v=i[1]?i[1].name:"",f=(null==j?void 0:j.id)===d,b=si.includes(l.id),T=!!d&&st.includes(h),w=sn.includes(h),C=(0,eR.b)(l.id,"banner"),{hasMedia:I,hasPlayerOfTheSeason:_}=(0,L.A)({hasMedia:{route:a.V3t.media(l.id)},hasPlayerOfTheSeason:{route:a.V3t.playerOfTheSeason(l.id,d),skipCheck:!d}},[d]),z=(null==(t=i[0])?void 0:t.id)===d;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tE,{uniqueTournament:l,seasons:i,seasonId:d,onSeasonChange:u}),(0,s.jsxs)(ea.xA,{py:"md",children:[(0,s.jsxs)(ea.fv,{flexGrow:1,children:[(!z||c||!d)&&(0,s.jsx)(ee.t,{tag:"UniqueTournamentEventList",children:(0,s.jsx)(et.MC.Provider,{value:{isNarrow:!0,isShort:a.HwS.includes(h),location:P.y.MatchesSection},children:d?(0,s.jsx)(sl,{uniqueTournamentId:l.id,seasonId:d},"UniqueTournamentEventList"):(0,s.jsx)(eT.A,{entity:a.wNW.UniqueTournament,id:l.id})})}),(0,s.jsx)(se.Br,{uniqueTournamentId:l.id}),d&&(0,s.jsx)(nU.default,{uniqueTournamentId:l.id,seasonId:d}),g&&_&&(0,s.jsx)(nH,{uniqueTournamentId:l.id,seasonId:d,showLoader:!!(!f||l.endDateTimestamp&&(null==l?void 0:l.endDateTimestamp)n.e(5151).then(n.bind(n,45151)),{loadableGenerated:{webpack:()=>[45151]}}),sy=J()(()=>n.e(4672).then(n.bind(n,54672)),{loadableGenerated:{webpack:()=>[54672]},ssr:!1});function sv(e){let{uniqueTournament:t,seasonId:n}=e;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.Matches,children:(0,s.jsx)(ee.t,{tag:"UniqueTournamentEventList",children:n?(0,s.jsx)(sy,{uniqueTournamentId:t.id,seasonId:n},"UniqueTournamentEventList"):(0,s.jsx)(sj,{entity:a.wNW.UniqueTournament,id:t.id})})})}let sf=J()(()=>n.e(8056).then(n.bind(n,8056)),{loadableGenerated:{webpack:()=>[8056]}});function sb(e){let{id:t}=e;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.Media,children:(0,s.jsx)($.BU,{children:(0,s.jsx)(sf,{uniqueTournamentId:t,hideTitle:!0})})})}let sT=J()(()=>Promise.resolve().then(n.bind(n,78144)),{loadableGenerated:{webpack:()=>[78144]}});function sw(e){let{id:t,seasonId:n}=e;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.PowerRankings,children:(0,s.jsx)($.BU,{children:(0,s.jsx)(sT,{uniqueTournamentId:t,seasonId:n})})})}let sS=J()(()=>Promise.resolve().then(n.bind(n,11506)),{loadableGenerated:{webpack:()=>[11506]}});function sC(e){let{uniqueTournament:t,seasonId:n,seo:a,lastSeasonName:l,info:i,currentSeason:r,selectedSeason:o}=e,d=(0,eR.b)(t.id,"standings");return(0,s.jsxs)(eE.tU.Panel,{tabKey:H.x.Standings,children:[d&&(0,s.jsx)(sd.O,{entityId:t.id,branding:d,bannerText:d.standingsText,location:"league_standings"}),(0,s.jsxs)($.BU,{children:[(0,s.jsx)(sS,{uniqueTournament:t,seasonId:n,selectedSeason:o,isNarrowLayout:!0}),(0,s.jsx)(ew.pk,{utIds:[t.id]}),(0,s.jsx)(tx,{info:i,seo:a,details:t,season:r,lastSeason:l})]})]})}var sI=n(46664);let s_=J()(()=>n.e(6344).then(n.bind(n,86344)),{loadableGenerated:{webpack:()=>[86344]}});function sk(e){let{uniqueTournament:t,seasonId:n}=e,l=(0,C.useContext)(_.Ws)===a.QCR.Tennis;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.TopPlayers,children:l?(0,s.jsx)(sI.default,{uniqueTournamentId:t.id,seasonId:n}):(0,s.jsx)(s_,{uTournamentId:t.id,seasonId:n,gender:t.gender})})}let sA=J()(()=>n.e(5470).then(n.bind(n,25470)),{loadableGenerated:{webpack:()=>[25470]}});function sz(e){let{uniqueTournament:t,seasonId:n,gender:l=a.YT8.Male}=e;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.TopStats,children:(0,s.jsx)(sA,{uniqueTournamentId:t.id,seasonId:n,gender:l})})}let sM=J()(()=>Promise.resolve().then(n.bind(n,46664)),{loadableGenerated:{webpack:()=>[46664]}});function sR(e){let{uniqueTournament:t,seasonId:n}=e;return(0,s.jsx)(eE.tU.Panel,{tabKey:H.x.TopTeams,children:(0,s.jsx)(sM,{uniqueTournamentId:t.id,seasonId:n})})}function sE(e){var t;let{uniqueTournament:n,seasons:l,seasonId:i,onSeasonChange:r}=e,{isMobile:o}=(0,ei.$c)(),d=(0,t1.hX)(),u=(0,W.N)(n),c=!!(l.length&&i&&i===l[0].id)&&!!(n.startDateTimestamp&&n.startDateTimestamp!==n.endDateTimestamp),m=!o&&!d,x=n.id===a.G6l.WorldCup,{data:p}=(0,ey.Ay)(a.V3t.seasonEditors(n.id,i)),[h,g]=(0,C.useState)(!1),j=(0,C.useMemo)(()=>l.find(e=>e.id===i),[i,l]),y=null==p?void 0:p.editors,v={nickname:(null==p?void 0:p.organizations.length)?null==p?void 0:p.organizations[0].name:(null==y?void 0:y.length)===1?y[0].editorName:void 0,numberOfEditors:null==y?void 0:y.length,eventLocation:(null==y?void 0:y.length)===1?"editor_league":void 0,hasStarted:!0,isInLeagueHeader:!0,isOrganization:!!(null==p?void 0:p.organizations.length),userId:y&&y.length>1||null==y||null==(t=y[0])?void 0:t.id,onClick:y&&y.length>1&&!(null==p?void 0:p.organizations.length)?()=>g(!0):void 0};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eE.az,{bg:"surface.s1",px:["lg",0],br:[void 0,"xl"],elevation:[void 0,3],position:"relative",children:[(0,s.jsxs)(tf.z4,{bgImageSrc:a.V3t.image(n.id),minH:[80,void 0],children:[(0,s.jsx)(eE.az,{br:"xs",w:[48,112],h:[48,112],ml:[0,"md"],mr:["md","xl"],bg:[void 0,"surface.s1"],elevation:[void 0,2],children:(0,s.jsx)(tv.e,{id:n.id,name:n.name,w:[48,88],h:[48,88],m:[0,"md"],mr:["xs","md"],style:{verticalAlign:"top"}})}),(0,s.jsxs)(eE.az,{flex:"1 1 auto",mr:[0,"lg"],children:[(0,s.jsxs)(eE.so,{align:"center",mt:["xs","sm"],wrap:"wrap",minH:"36",w:"100%",justify:"space-between",children:[(0,s.jsxs)(eE.az,{children:[(0,s.jsxs)(eE.so,{align:"center",children:[(0,s.jsxs)(eE.EY,{as:"h2",m:"0",font:["display.large","display.extraLarge"],c:["onSurface.nLv1","onColor.primary"],children:[u,(0,s.jsx)(tR,{uniqueTournamentId:n.id,seasonYear:null==j?void 0:j.year})]}),(0,s.jsx)(eE.az,{d:["none","inline-block"],mx:"sm",style:{verticalAlign:"middle"},children:(0,s.jsx)(tA.W,{groundType:n.groundType})}),m&&(0,s.jsx)(tT.e,{id:n.id,entity:a.bq7.Tournaments,location:P.y.Header,type:P.b.UniqueTournament,isOnOverlay:!0})]}),(0,s.jsx)(eE.so,{w:"100%",align:"center",justify:"space-between",children:(0,s.jsxs)(eE.so,{align:"center",children:[(0,s.jsx)(tv.w,{alpha2:n.category.alpha2,name:n.category.name,categoryId:n.category.id,w:[16,32],h:[16,32],mr:"sm"}),(0,s.jsxs)(eE.EY,{font:["body.medium","display.medium"],c:["onSurface.nLv1","onColor.primary"],mr:"sm",children:[" ",x?(0,s.jsx)(eE.EY,{as:"h3",font:["body.medium","display.medium"],c:["onSurface.nLv1","onColor.primary"],my:["sm",0],children:(0,s.jsx)(O.A,{id:"wc.history.title"})}):(0,s.jsx)(R.m,{slug:n.category.slug,name:n.category.name,uniqueTournament:n})]}),i&&(0,s.jsx)(eE.az,{position:"relative",zIndex:eE.Py.Fixed,children:(0,s.jsx)(tk.s,{seasonId:i,seasons:l,onSeasonChange:r},n.id)})]})})]}),!m&&(0,s.jsx)(tT.e,{id:n.id,entity:a.bq7.Tournaments,location:P.y.Header,type:P.b.UniqueTournament})]}),!m&&(0,s.jsx)(eE.az,{d:["block","none"],mt:"sm",children:(0,s.jsx)(tA.W,{groundType:n.groundType})}),c?(0,s.jsx)(eE.az,{d:["none","block"],children:(0,s.jsx)(t_.G,{start:n.startDateTimestamp,end:n.endDateTimestamp})}):null]}),m&&(0,s.jsxs)(tw.K,{id:n.id,name:u,entity:a.bq7.Tournaments,type:P.b.UniqueTournament,children:[(0,s.jsx)(tv.e,{size:32,mr:"lg",style:{verticalAlign:"top"},id:n.id,name:n.slug}),(0,s.jsx)(eE.EY,{font:"display.medium",color:"primary.default",mr:"lg",children:u})]}),m&&!!(null==p?void 0:p.editors.length)&&(0,s.jsx)(eE.az,{mt:"xs",children:(0,s.jsx)(tb.i,{...v})})]}),c&&(0,s.jsx)(eE.az,{d:["block","none"],px:"sm",pb:"xs",children:(0,s.jsx)(t_.G,{start:n.startDateTimestamp,end:n.endDateTimestamp})})]}),!m&&!!(null==p?void 0:p.editors.length)&&(0,s.jsx)(eE.az,{bg:"surface.s1",borderTop:"onSurface.nLv4",px:"sm",pt:"sm",children:(0,s.jsx)(tb.i,{...v})}),(0,s.jsx)(tI,{isOpen:h,setIsOpen:g,editorData:p})]})}function sP(e){var t,n,l;let{uniqueTournament:i,seasons:r,activeSeasonId:o,setActiveSeasonId:d=Z(),info:u,seo:c,activeTab:m,setActiveTab:x,hasStandingsData:p,hasEvents:h}=e,g=i.category.sport.slug,j=g===a.QCR.Tennis,y=r[0],v=r.find(e=>e.id===o),f=r[1]?r[1].name:"",{initialStandings:b}=(0,C.useContext)(V.O),T=j||!o||!sn.includes(g),{data:w}=(0,ey.Ay)(o&&st.includes(g)?a.V3t.seasonTypes(i.id,o,"player"):null),{hasKnockoutTab:I,hasTopPlayersTab:_,hasTeamSeasonTypes:k,hasMediaTab:z,hasPowerRankings:M}=(0,L.A)({hasKnockoutTab:{route:a.V3t.cupTrees(i.id,o),skipCheck:!o},hasTopPlayersTab:{route:a.V3t.seasonTypes(i.id,o,j?"team":"player"),skipCheck:!o||!(0,ez.w)(g,!0)},hasTeamSeasonTypes:{route:a.V3t.seasonTypes(i.id,o,"team"),skipCheck:T},hasMediaTab:{route:a.V3t.media(i.id)},hasPowerRankings:{route:a.V3t.powerRankingRounds(i.id,o)}},[o]),{data:R}=(0,ey.Ay)(T||!k?null:a.V3t.seasonTypes(i.id,o,"team")),{hasTopStatsTab:E}=(0,L.A)({hasTopStatsTab:{route:a.V3t.topPlayersPerGame(i.id,o,"all",(null==w?void 0:w.types[0])||a.Vw_.overall),skipCheck:!o||!st.includes(g)||!(null==w||null==(t=w.types)?void 0:t[0])}},[w,o]),{hasTopTeamsTab:P}=(0,L.A)({hasTopTeamsTab:{route:a.V3t.topTeams(i.id,o,(null==R?void 0:R.types[0])||a.Vw_.overall),skipCheck:T||!(null==R?void 0:R.types.length)}},[R,o]),Y=!!(null==b?void 0:b.length)||p,N=(null==(n=r[0])?void 0:n.id)!==o||h||!o,q=[{tabKey:H.x.Standings,item:"app.standings",isHidden:!Y},{tabKey:H.x.Details,item:"details"},{tabKey:H.x.Matches,item:"matches",values:{sport:(0,t6.ap)(g)},isHidden:!N},{tabKey:H.x.Knockout,item:"knockout",isHidden:!I},{tabKey:H.x.TopPlayers,item:"top_players",values:{gender:null!=(l=i.gender)?l:"M"},isHidden:!_},{tabKey:H.x.TopStats,item:"top_stats",isHidden:!E},{tabKey:H.x.TopTeams,item:"top_teams",isHidden:!P},{tabKey:H.x.Media,item:"media",isHidden:!z},{tabKey:H.x.PowerRankings,item:"Power Rankings",isHidden:!M}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(sE,{uniqueTournament:i,seasons:r,seasonId:o,onSeasonChange:d}),(0,s.jsxs)(so.A,{id:i.id,location:so.C.UniqueTournamentPage,seasonId:o,initialTabKey:m,customControls:[m,x],tabs:q,children:[Y&&(0,s.jsx)(sC,{uniqueTournament:i,seasonId:o,seo:c,lastSeasonName:f,currentSeason:y,selectedSeason:v,info:u}),(0,s.jsx)(sh,{uniqueTournament:i,seasonId:o,currentSeason:y,lastSeasonName:f,info:u,seo:c,onPowerRankingsClick:()=>x(H.x.PowerRankings),showAbout:!Y}),N&&(0,s.jsx)(sv,{uniqueTournament:i,seasonId:o}),I&&(0,s.jsx)(sg.A,{uniqueTournament:i,seasonId:o,sport:g}),_&&(0,s.jsx)(sk,{uniqueTournament:i,seasonId:o}),E&&(0,s.jsx)(sz,{uniqueTournament:i,seasonId:o,gender:i.gender}),P&&(0,s.jsx)(sR,{uniqueTournament:i,seasonId:o}),z&&(0,s.jsx)(sb,{id:i.id}),M&&(0,s.jsx)(sw,{id:i.id,seasonId:o})]}),(0,s.jsx)(se.hz,{uniqueTournamentId:i.id}),(0,s.jsx)(S.az,{mb:"sm",children:(0,s.jsx)(A.iN,{id:A.Rj.MOBILE_ENTITY_BOTTOM})})]})}function sY(e){var t,n,l,i;let{uniqueTournament:r,seasons:o,initialStandings:d,initialHasHomeAway:u,hasEvents:c}=e,m=!!(null==d?void 0:d.length),x=r.category.sport.slug,[p,h]=(0,C.useState)(m?H.x.Standings:H.x.Details),g=(0,C.useMemo)(()=>{var e;return{id:null==(e=o[0])?void 0:e.id,tab:p}},[null==(t=o[0])?void 0:t.id]),[y,v]=(0,D.Ay)({routeKey:"uniqueTournament",params:{sport:x,category:r.category.slug,tournament:r.slug,id:r.id}},g),f=null==y?void 0:y.id,b=o.find(e=>e.id===f),T=e=>v("id",null==e?void 0:e.toString()),{hasStandingsData:w}=(0,L.A)({hasStandingsData:{route:a.V3t.standings(r.id,f),skipCheck:!f}},[f]);(0,C.useEffect)(()=>{void 0!==w&&h(w?H.x.Standings:H.x.Details)},[w]),(0,C.useEffect)(()=>{if(!o.find(e=>e.id===Number(f))){var e;T(null==(e=o[0])?void 0:e.id)}},[r.id]),(0,C.useEffect)(()=>{o.length>0&&""===window.location.hash&&T(o[0].id)},[]);let O=(0,s.jsx)(S.az,{bg:{mdDown:"surface.s1"},children:(0,s.jsxs)(I.B,{children:[(0,s.jsx)(I.B.Item,{children:(0,s.jsx)(j.di,{translatedParams:{sport:x},children:(0,s.jsx)(F.o,{sportSlug:x})})}),(0,s.jsx)(I.B.Item,{children:(0,s.jsx)(j.Z6,{category:r.category,children:(0,s.jsx)(R.m,{...r.category,uniqueTournament:r})})}),(0,s.jsx)(I.B.Title,{children:(0,s.jsx)(U,{uniqueTournament:r,year:null==(n=o[0])?void 0:n.year})})]})});return(0,s.jsx)(V.O.Provider,{value:{uniqueTournamentId:r.id,uniqueTournamentName:r.name,seasonId:null==b?void 0:b.id,editor:null==b?void 0:b.editor,initialStandings:f===(null==(l=o[0])?void 0:l.id)?d:void 0,initialHasHomeAway:f===(null==(i=o[0])?void 0:i.id)?u:void 0},children:(0,s.jsx)(E.MC.Provider,{value:{isShort:a.HwS.includes(x),location:P.y.MatchesSection},children:(0,s.jsxs)(_.Ws.Provider,{value:x,children:[(0,s.jsx)(M.$B,{children:(0,s.jsxs)(z.YW,{children:[O,(0,s.jsx)(sP,{...e,activeSeasonId:f?Number(f):void 0,setActiveSeasonId:T,activeTab:(null==y?void 0:y.tab)||p,setActiveTab:e=>v("tab",e),hasStandingsData:w,hasEvents:c})]})}),(0,s.jsx)(M.h6,{children:(0,s.jsxs)(A.JR,{route:k.xW.UniqueTournament,children:[O,(0,s.jsx)(sr,{...e,activeSeasonId:f?Number(f):void 0,setActiveSeasonId:T,hasEvents:c})]})}),(0,s.jsx)(Y.A,{entity:a.bq7.MutedTournaments,entityGroup:"tournament",id:r.id,entityTournamentId:r.id}),(0,s.jsx)(N.N,{page:{location:q.XN.LeagueScreen,entity:r}})]})})})}var sH=n(71937),sN=n(25862),sq=n(65097);let sF=[a.QCR.Football,a.QCR.Tennis],sL={2122:{competitionName:"Champions League",gender:a.YT8.Male,type:"none"},9500:{competitionName:"Champions League",gender:a.YT8.Female,type:"none"},11457:{competitionName:"European Championship",gender:a.YT8.Male,type:"D"},11458:{competitionName:"European Championship",gender:a.YT8.Female,type:"D"},11459:{competitionName:"European Championship",gender:a.YT8.Mixed,type:"D"},11455:{competitionName:"European Championship",gender:a.YT8.Male,type:"S"},11456:{competitionName:"European Championship",gender:a.YT8.Female,type:"S"},9550:{competitionName:"ETTU Cup",gender:a.YT8.Male,type:"none"},9534:{competitionName:"ETTU Cup",gender:a.YT8.Female,type:"none"},564:{competitionName:"Olympic games",gender:a.YT8.Male,type:"S"},565:{competitionName:"Olympic games",gender:a.YT8.Female,type:"S"},1121:{competitionName:"Olympic games",gender:a.YT8.Male,type:"T"},1123:{competitionName:"Olympic games",gender:a.YT8.Female,type:"T"},11579:{competitionName:"World Championships",gender:a.YT8.Male,type:"S"},11586:{competitionName:"World Championships",gender:a.YT8.Female,type:"S"},11587:{competitionName:"World Championships",gender:a.YT8.Mixed,type:"D"},11580:{competitionName:"World Championships",gender:a.YT8.Male,type:"D"},11585:{competitionName:"World Championships",gender:a.YT8.Female,type:"D"},1966:{competitionName:"World Cup",gender:a.YT8.Male,type:"none"},1964:{competitionName:"World Cup",gender:a.YT8.Female,type:"none"},11604:{competitionName:"World Junior Championship",gender:void 0,type:"none"},10698:{competitionName:"World Junior Championship",gender:void 0,type:"none"},10697:{competitionName:"World Junior Championship",gender:void 0,type:"none"},10699:{competitionName:"World Junior Championship",gender:void 0,type:"none"},10700:{competitionName:"World Junior Championship",gender:void 0,type:"none"},15004:{competitionName:"Setka Cup",gender:a.YT8.Male,type:"none"},15007:{competitionName:"Setka Cup",gender:a.YT8.Female,type:"none"},15005:{competitionName:"TT Cup",gender:a.YT8.Male,type:"none"},15009:{competitionName:"TT Cup",gender:a.YT8.Female,type:"none"},15001:{competitionName:"Ukraine Win Cup",gender:a.YT8.Male,type:"none"},15068:{competitionName:"Ukraine Win Cup",gender:a.YT8.Female,type:"none"}},sD=[a.QCR.Football,a.QCR.Basketball,a.QCR.Cricket,a.QCR.Darts,a.QCR.IceHockey,a.QCR.Handball,a.QCR.Volleyball,a.QCR.Rugby,a.QCR.AmericanFootball,a.QCR.Baseball];function sO(e){var t;if("error"in e)return(0,s.jsx)(sq.default,{statusCode:404});let{uniqueTournament:n,seasons:l,seo:c,info:m,params:x,meta:p,seoContent:g,locale:j,standings:y,hasHomeAwayStandings:v,hasEvents:b}=e;if(!n)return null;let T=n.category.sport.slug,w=n.id===a.G6l.Euro,S=n.id===a.G6l.WorldCup,C=w&&l.length?"Euro ".concat(l[0].year):n.name,I=w&&l.length?"European Championship ".concat(l[0].year):n.name,_=sL[n.id]||void 0,k=sF.includes(T)||!!g||_||f(n.id),A=(null==(t=n.category.alpha2)?void 0:t.toLowerCase())||"",z=!p&&(l.every(e=>e.editor)?!(0,r.N)(A,j):!k||(0,o.v)(T,j));return(0,s.jsxs)(u.an,{value:{meta:p,seoContent:g},children:[(0,s.jsxs)(i(),{children:[z&&(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),(0,s.jsx)("link",{rel:"canonical",href:"https://www.sofascore.com".concat(d.z.getTranslatedCanonicalRoute(j,"uniqueTournament",x).route)}),(0,s.jsx)("link",{rel:"alternate",href:"android-app://com.sofascore.results/https/www.sofascore.com/league/".concat(x.id)})]}),(0,s.jsx)(h,{uniqueTournament:n}),(0,s.jsx)(u.Ay,{metaKey:_?"standings.tabletennis":"standings",titleKey:S?"ut.worldCup":w?"ut.euro":void 0,descriptionKey:S?"ut.worldCup":w?"ut.euro":void 0,values:{item:C,fullItem:I,..._||{}}}),(0,s.jsx)(sY,{uniqueTournament:n,seasons:l,seo:c,info:m,initialStandings:y,initialHasHomeAway:v,hasEvents:b})]})}sO.getInitialProps=sH.A.getInitialPageProps(e=>async t=>{let{query:n,req:s,res:l,...i}=t,r=s?s._originalUrl:i.asPath,o=d.z.getCurrentLocale(r),u=s&&s.params?s.params:n,c=Number(u.id),m=d.z.getSportKey(u.sport,o);try{let t,n,s,i,[r,x,p,h,g]=await Promise.allSettled([a.jFR.fetchUniqueTournamentDetails(c),a.jFR.fetchUniqueTournamentSeasons(c),a.jFR.fetchUniqueTournamentSeo(c),a.sdF.getEntityMeta("uniquetournament",c,o),sD.includes(m)?a.sdF.getSeoContent(a.wNW.UniqueTournament,c,o):Promise.reject()]);if("rejected"===r.status)throw Error("Unique tournament does not exist");let j=r.value.uniqueTournament,y="fulfilled"===x.status?x.value.seasons:[];l&&j.category.sport.slug===a.QCR.MMA&&(l.writeHead(301,{Location:d.z.getTranslatedRoute(o,"mma.organisation",{organisationId:j.id,slug:j.slug,sport:j.category.sport.slug}).route}),l.end()),l&&(j.slug!==u.tournament||j.category.slug!==u.category)&&(l.writeHead(301,{Location:d.z.getTranslatedRoute(o,"uniqueTournament",{...u,category:j.category.slug,tournament:j.slug}).route}),l.end());let v=y.length?y[0].id:void 0;if(v){let[e,l,r,o,d]=await Promise.allSettled([a.jFR.fetchUniqueTournamentInfo(c,v),a.jFR.fetchStandings(c,v),(0,a.m_X)(a.V3t.standings(c,v,a.lpv.Home)),(0,a.m_X)(a.V3t.events(c,v,!0)),(0,a.m_X)(a.V3t.events(c,v))]);t="fulfilled"===e.status?e.value.info:void 0,n="fulfilled"===l.status?l.value.standings:void 0,s="fulfilled"===r.status&&r.value,i="fulfilled"===o.status&&"fulfilled"===d.status?o.value||d.value:void 0}let f="fulfilled"===p.status?p.value.meta:void 0,b="fulfilled"===h.status?h.value.entityMeta:void 0,T="fulfilled"===g.status?g.value.content:void 0;return e.dispatch((0,sN.Vy)(j.category.sport.slug)),{uniqueTournament:j,seasons:y,seo:f,info:t,params:u,meta:b,seoContent:T,locale:o,standings:n,hasHomeAwayStandings:s,hasEvents:i}}catch(e){return l&&(l.statusCode=404),{error:e}}})},32312:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var s=n(6029),a=n(37071),l=n(76356),i=n(90248);let r=()=>(0,s.jsxs)(l.so,{px:"sm",mt:"sm",h:"xl",children:[(0,s.jsx)(a.EY,{minW:"xl",textAlign:"center",textStyle:"display.small",color:"neutrals.nLv3",children:"#"}),(0,s.jsx)(l.az,{flexGrow:1,flexShrink:1,ml:"lg",children:(0,s.jsx)(a.EY,{textStyle:"table.medium",color:"neutrals.nLv3",children:(0,s.jsx)(i.A,{id:"team"})})}),(0,s.jsx)(a.EY,{textStyle:"table.medium",color:"neutrals.nLv3",textTransform:"uppercase",children:(0,s.jsx)(i.A,{id:"Pts"})})]})},32523:(e,t,n)=>{"use strict";n.d(t,{E:()=>s.E});var s=n(3881)},33243:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var s=n(6029),a=n(91816),l=n(99064),i=n(947),r=n(50774);function o(e){let{person:t,hasImg:n,isLast:i,formattedRole:r}=e;return(0,s.jsxs)(l.so,{hoverBg:"surface.s2",children:[(0,s.jsx)(l.az,{px:"lg",py:"sm",children:(0,s.jsx)(a.d,{size:40,id:n?t.id:void 0,name:t.name})}),(0,s.jsx)(l.so,{borderBottom:i?void 0:"onSurface.nLv4",align:"center",flex:"1 1 auto",mr:"lg",children:(0,s.jsxs)(l.az,{flex:"1 1 auto",children:[(0,s.jsx)(l.so,{title:t.name,align:"center",children:(0,s.jsx)(l.EY,{font:"body.medium",color:"onSurface.nLv1",mr:"xs",pr:"xs",children:t.name})}),r&&(0,s.jsx)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",mx:"xxs",ml:"xs",children:r})]})})]},t.id)}function d(e){let{supportStaff:t,manager:n}=e,a=(0,i.A)();return(0,s.jsxs)(l.az,{pb:["sm","md"],children:[n&&(0,s.jsx)(o,{person:n,hasImg:!0,isLast:0===t.length,formattedRole:a.formatMessage({id:"manager"})}),null==t?void 0:t.map((e,n)=>{let l=n===t.length-1,i=(0,r.u)(e.role),d=a.formatMessage({id:i});return(0,s.jsx)(o,{person:e,isLast:l,formattedRole:d!==i?d:void 0},e.id)})]})}},34884:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var s=n(6029),a=n(37071),l=n(76356),i=n(90248),r=n(48683),o=n(54409),d=n(13266),u=n(61836);function c(e){let{numberOfEditors:t,isOrganization:n,eventLocation:c,nickname:m,userId:x,hasStarted:p,isInLeagueHeader:h,onClick:g}=e,{isDesktop:j}=(0,a.$c)(),y=m?(0,s.jsx)(i.A,{id:p?"edited_by":"event.createdBy",values:{nickname:m}}):(0,s.jsx)(i.A,{id:"edited_by_more_editors",values:{number:t}}),v=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.EY,{textStyle:"assistive.default",color:"primary.default",children:y}),(0,s.jsx)(o._jO,{ml:"sm",height:16,width:16,fill:"primary.default"})]}),f=(0,s.jsxs)(a.$n,{size:"secondary",children:[y,(0,s.jsx)(o._jO,{})]});return m||t?(0,s.jsx)(r.Zp,{variant:h?"never":"desktop-only",children:(0,s.jsx)(l.so,{justify:"flex-end",align:"center",md:h?void 0:{px:"lg",py:"sm"},children:g?(0,s.jsx)(l.az,{cursor:"pointer",onClick:g,children:h&&j?f:v}):n?(0,s.jsx)("a",{href:"https://torneo.sofascore.com/",target:"_blank",rel:"noreferrer",children:h&&j?f:v}):(0,s.jsx)(d.N_,{routeKey:"user",params:{userId:x},onClick:()=>(0,u.Zs)(c),children:h&&j?f:v})})}):null}},42021:(e,t,n)=>{"use strict";n.d(t,{h:()=>d});var s=n(6029),a=n(37071),l=n(55729),i=n(90248),r=n(54409),o=n(54053);let d=()=>{let[e,t]=(0,l.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>t(!0),children:(0,s.jsx)(r.G_L,{fill:"onSurface.nLv1"})}),(0,s.jsx)(o.A,{isOpen:e,setIsOpen:t,header:(0,s.jsx)(a.EY,{p:{md:"lg"},textStyle:"display.large",display:"block",children:(0,s.jsx)(i.A,{id:"sofascore_power_rankings"})}),children:(0,s.jsx)(a.EY,{display:"block",maxW:{md:"[312px]"},px:"lg",textStyle:"body.mediumParagraph",children:(0,s.jsx)(i.A,{id:"power_rankings_description"})})})]})}},42360:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(6029),a=n(76356),l=n(48683);function i(){return(0,s.jsx)(l.Zp,{children:(0,s.jsx)(a.az,{h:"[762px]"})})}},43783:(e,t,n)=>{"use strict";n.d(t,{Q:()=>l});var s=n(21377),a=n(45860);function l(e,t,n){var l,i;let{data:r}=(0,a.Ay)(s.V3t.powerRankingRounds(e,t)),o=n||(null==r||null==(i=r.powerRankingRounds)||null==(l=i[0])?void 0:l.id),{data:d}=(0,a.Ay)(o?s.V3t.powerRankings(e,t,o):null);return{rankings:null==d?void 0:d.powerRankings,rounds:null==r?void 0:r.powerRankingRounds}}},45749:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var s=n(55729),a=n(85625),l=n(95868);let i=null,r=!1;async function o(){if(!i)try{i=(await n.e(5831).then(n.t.bind(n,61985,23))).default,await i.Initialize("3de57cc21a364c9c918d8899d0aee6bf",{shouldModifyUrlWithStoryId:!1}),i.addDelegateListener(i.Delegations.onEventTriggered,l.hT)}catch(e){return console.error("WSC SDK initialization error:",e),!1}return!0}function d(e){let{containerId:t,storyIds:n,location:d}=e,[u,c]=(0,s.useState)(r);(0,s.useEffect)(()=>{o();let e=()=>{r=!0,c(!0)};return document.addEventListener("onBlazeSDKConnect",e),()=>{document.removeEventListener("onBlazeSDKConnect",e)}},[]),(0,s.useEffect)(()=>{if(!(null==n?void 0:n.length)||!i||!u||!t||!(0,l.R5)(t))return;let{eventId:e}=(0,l.Hw)(t);try{let s=i.Theme(d===a.D.TournamentPage?"row-rectangle":"row-rectangle-horizontal","story");s.layoutStyle.labelStyle.isVisible=!e,s.layoutStyle.statusLiveStyle.isVisible=!1,s.layoutStyle.statusUnreadStyle.isVisible=!1,s.layoutStyle.statusLiveUnreadStyle.isVisible=!1,s.layoutStyle.borderRadius=e?"0":"12px",s.layoutStyle.horizontalItemsSpacing=4,i.WidgetRowView(t,{dataSource:i.DataSourceBuilder().ids({ids:n}),theme:s,maxDisplayItemsCount:e?1:void 0})}catch(e){console.error(e)}},[n.length,t,u])}},46664:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>P});var s=n(6029),a=n(98423),l=n(21377),i=n(37071),r=n(76356),o=n(99064),d=n(55729),u=n(947),c=n(90248),m=n(48683),x=n(62859),p=n(74761),h=n(97918),g=n(57869),j=n(73404),y=n(56602),v=n(27892),f=n(12047),b=n(33144),T=n(13266),w=n(15771),S=n(94604);function C(){return(0,s.jsx)(r.az,{children:Array.from({length:3}).map((e,t)=>(0,s.jsx)(r.az,{h:"5xl"},t))})}function I(e){let{teams:t,selectedStat:n,showFullListWithIndexes:a,sport:l,children:o}=e,d=a?t:t.slice(0,3);return(null==t?void 0:t.length)&&n?(0,s.jsxs)(r.az,{pb:"sm",children:[d.map((e,t)=>(0,s.jsx)(T.gT,{sport:l,team:e.team,children:(0,s.jsxs)(r.so,{h:"5xl",align:"center",gap:"sm",px:"lg",_hover:{bg:"surface.s2"},cursor:"pointer",children:[a&&(0,s.jsx)(i.EY,{textStyle:"body.small",w:"lg",textAlign:"center",display:"block",children:t+1}),(0,s.jsxs)(r.so,{grow:1,align:"center",children:[(0,s.jsx)(b.p,{id:e.team.id,size:40}),(0,s.jsx)(i.EY,{ml:"lg",display:"block",children:(0,s.jsx)(S.Rm,{team:e.team})})]}),(0,s.jsx)(r.so,{minW:"6xl",justify:"flex-end",children:(0,s.jsx)(i.EY,{children:(0,s.jsx)(w.A,{stat:e.statistics,selectedStat:n,sport:l})})})]})},e.team.id)),o]}):(0,s.jsx)(C,{})}var _=n(45860),k=n(25459),A=n(79977),z=n(62666),M=n(6354);let R=e=>{let{options:t,sport:n}=e,a=(0,f.Ay)();return(0,s.jsx)(o.PI,{top:a,bg:"surface.s1",zIndex:o.Py.Sticky-1,children:e=>(0,s.jsx)(r.az,{borderBottom:e?void 0:"1px solid {colors.neutrals.nLv4}",elevation:e?"2":void 0,children:(0,s.jsx)(h.F,{items:t,sport:n})})})};function E(e){let{division:t,setDivision:n,divisions:u}=e,{uniqueTournamentId:c,uniqueTournamentName:m}=(0,d.useContext)(M.O);return(0,s.jsx)(o.ms,{items:[void 0,...u],renderItem:e=>(0,s.jsxs)(r.so,{align:"center",gap:"sm",children:[(0,s.jsx)(a.e,{id:c,size:24}),(0,s.jsx)(i.EY,{lineHeight:1,children:e?l.Wb[e]:null!=m?m:"-"})]}),selectedItem:t,onSelectedItemChange:e=>{var t;n(null!=(t=e.selectedItem)?t:void 0)}})}let P=e=>{let{uniqueTournamentId:t,seasonId:n}=e,h=(0,u.A)(),f=(0,d.useContext)(x.Ws),[b,T]=(0,d.useState)(!1),[w,S]=(0,d.useState)(""),[C,M]=(0,d.useState)([]),{division:P,setDivision:Y,divisions:H}=function(e,t){let[n,s]=(0,d.useState)(),{data:a,isLoading:i,error:r}=(0,_.Ay)(e&&t?l.V3t.divisions(e,t):null);if(i||r||!a)return{division:n,setDivision:s,divisions:[]};let o=function(e){let t=[],n=[];for(let{conference:s,divisions:a}of e.divisions)t.push(s),n.push(...a);return[...t,...n]}(a);return 35115===t&&(o=["central-division"]),{division:n,setDivision:s,divisions:o}}(t,n),N=(0,k.A)({uniqueTournamentId:t,seasonId:n,division:P}),q=f===l.QCR.Tennis,F=f?(0,g.f)(f):null,{topTeams:L,stats:D,types:O,activeType:W,setActiveType:Q}=N,G=null==D?void 0:D.map(e=>({value:e,label:q?h.formatMessage({id:(0,v.O)(l.QCR.Tennis,e)}):(0,j.b)(h,e,null==F?void 0:F.includes(e))})),U=(e,t)=>{T(!0),S(e),M(t)};return(0,s.jsxs)(s.Fragment,{children:[!!H.length&&(0,s.jsx)(r.so,{hideFrom:"md",bg:"surface.s1",p:"sm",elevation:"2",borderBottom:"1px solid {colors.neutrals.nLv4}",children:(0,s.jsx)(E,{division:P,setDivision:Y,divisions:H})}),!!O&&O.length>1&&!!W&&(0,s.jsx)(r.az,{hideFrom:"md",bg:"surface.s1",p:"sm",elevation:"2",borderBottom:"1px solid {colors.neutrals.nLv4}",children:(0,s.jsx)(z.A,{selectedType:W,setSelectedType:Q,types:O})}),(0,s.jsx)(R,{options:G,sport:f}),(0,s.jsx)(m.BU,{children:!!(null==G?void 0:G.length)&&G.map(e=>{var t,n,l;let o=L&&e&&L[e.value]||[],d=(0,g.g)(f);return((null==d?void 0:d.includes(e.value))||!d)&&(0,s.jsx)(m.Zp,{children:(0,s.jsxs)(r.az,{id:null==(t=e.value)?void 0:t.toLowerCase(),children:[(0,s.jsxs)(r.so,{align:"center",justify:"space-between",p:"lg",pr:"xs",children:[(0,s.jsxs)(r.so,{align:"center",children:[(0,s.jsx)(i.EY,{textStyle:"display.small",children:(0,s.jsx)(A.A,{id:e.value})}),"avgRating"===e.value&&(0,s.jsx)(y.D,{type:y.D.type.AverageRatingTeam,rating:null==o||null==(l=o[0])||null==(n=l.statistics)?void 0:n.avgRating,renderImage:e=>{var t;return(0,s.jsx)(a.p,{id:null==o||null==(t=o[0])?void 0:t.team.id,...e})}})]}),(0,s.jsx)(i.$n,{size:"tertiary",variant:"clear",onClick:()=>U(e.value,o),children:(0,s.jsx)(i.EY,{textStyle:"display.small",color:"primary.default",children:(0,s.jsx)(c.A,{id:"see_all"})})})]}),(0,s.jsx)(I,{teams:o,selectedStat:e.value,sport:f,children:"avgRating"===e.value&&(0,s.jsx)(p.$,{mx:"sm",messageId:"rating_top_teams_general"})})]})},e.value)})}),(0,s.jsxs)(o.Xn,{isOpen:b,onClose:e=>{null==e||e.stopPropagation(),T(!1)},children:[(0,s.jsx)(o.Xn.Header,{children:(0,s.jsx)(i.EY,{textStyle:"display.medium",display:"block",mb:"md",children:(0,s.jsx)(A.A,{id:w})})}),(0,s.jsxs)(o.Xn.Content,{children:["avgRating"===w&&(0,s.jsx)(p.$,{mx:"sm",mb:"sm",messageId:"rating_top_teams_specific"}),(0,s.jsx)(I,{teams:C,selectedStat:w,showFullListWithIndexes:!0,sport:f})]})]})]})}},48127:(e,t,n)=>{"use strict";n.d(t,{s:()=>d});var s=n(6029),a=n(99064),l=n(13731),i=n.n(l),r=n(59018),o=n.n(r);function d(e){let{onSeasonChange:t,seasons:n,seasonId:l,alignRight:r}=e,d=i()(n,"year"),u=o()(n.map(e=>e.year)),c=n.find(e=>e.id===l)||n[0],m=c&&d[c.year],x=(null==m?void 0:m.length)>1;return(0,s.jsxs)(a.so,{wrap:"wrap",flex:["1 1 100%",void 0],mt:[0,"sm","xs"],zIndex:a.Py.Dropdown,children:[(0,s.jsx)(a.ms,{mr:"sm",items:u,selectedItem:(null==c?void 0:c.year)||u[0],onSelectedItemChange:e=>{let{selectedItem:n}=e;if(n&&d[n]){let e=d[n];e.length&&t(e[0].id)}},alignRight:r}),x&&(0,s.jsx)(a.ms,{items:m,selectedItem:c,onSelectedItemChange:e=>{let{selectedItem:n}=e;n&&t(n.id)},renderItem:(e,t)=>{if(e){let n=(null==e?void 0:e.name)||"";return(0,s.jsx)(a.EY,{font:"body.small",color:"inherit",maxW:t?96:void 0,block:!0,ellipsis:!0,children:n.replace(c.year,"")})}return""},alignRight:!0,mt:[0,"sm",0]},c.year)]})}},49679:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var s=n(6029),a=n(32523),l=n(76356),i=n(33144),r=n(21377),o=n(37071),d=n(13266),u=n(94604);function c(e){return(0,s.jsx)(d.gT,{team:e.team,sport:r.QCR.Football,children:(0,s.jsxs)(l.so,{align:"center",px:"sm",py:"sm",_hover:{bg:"surface.s2"},children:[(0,s.jsx)(o.EY,{minW:"xl",textAlign:"center",textStyle:"display.small",children:e.rank}),(0,s.jsx)(i.p,{ml:"lg",mr:"sm",id:e.team.id,national:!0,size:32}),(0,s.jsx)(l.az,{flexGrow:"1",flexShrink:"1",children:(0,s.jsx)(o.EY,{textStyle:"table.medium",children:(0,s.jsx)(u.Rm,{team:e.team})})}),(0,s.jsx)(l.az,{children:(0,s.jsx)(o.EY,{textStyle:"table.medium",children:e.points})})]})})}let m=e=>{let{rankings:t}=e;return(0,s.jsx)(l.az,{minH:"[192px]",children:t?t.map(e=>(0,s.jsx)(c,{...e},e.rank)):(0,s.jsx)(a.E,{uniqueKey:"power-ranking-list-cl",pt:"xs",rows:4,rowHeight:44,rowGap:4,animate:!0})})}},50774:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,u:()=>l});var s=n(6029),a=n(90248);let l=e=>e.replaceAll("-","_"),i=e=>{let{role:t}=e;return(0,s.jsx)(a.A,{id:l(t)})}},52827:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var s=n(1815),a=n(61836),l=n(95868);function i(e){let t=(0,l.Hw)(e);return(0,s.e)(()=>(0,a.WG)({id:t.eventId||t.tournamentId,location:t.location}))}},54075:(e,t,n)=>{"use strict";n.d(t,{M:()=>s.MR});var s=n(19991)},55803:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});let s=(0,n(76356).I4)("div",{base:{bg:"surface.s1",border:"1px solid surface.s2",br:"lg",p:"lg",elevation:"2","& a":{color:"primary.default"},"& p":{margin:"0",paddingTop:"sm",paddingBottom:"md"},"& ul":{margin:"0",paddingBottom:"md",listStyleType:"none","& > li":{display:"flex","&:before":{content:"- ",mr:"sm"},"& + li":{marginTop:"sm"}}}}})},57869:(e,t,n)=>{"use strict";n.d(t,{f:()=>l,g:()=>a});var s=n(21377);function a(e){return e===s.QCR.IceHockey?["powerPlayPercentage","penaltyKillPercentage","goals","goalsAgainst","shots","shotsAgainst","hits","blocks","faceOffPercentage","penaltyMinutes"]:null}function l(e){return e===s.QCR.IceHockey?["goals","goalsAgainst","shots","shotsAgainst","hits","blocks","penaltyMinutes"]:null}},59754:(e,t,n)=>{"use strict";n.d(t,{C:()=>l,Z:()=>i});var s=n(494),a=n(151);let l=(e,t,n)=>{var s,a,l;let i=null==(s=e.tournament.uniqueTournament)?void 0:s.id;if(i&&(null==n||null==(l=n.uniqueTournaments)||null==(a=l[i])?void 0:a[t]))return null==n?void 0:n.uniqueTournaments[i]},i=(e,t)=>l(e,t,(0,s.d4)(a.g))},64073:(e,t,n)=>{"use strict";n.d(t,{K:()=>f});var s=n(6029),a=n(37071),l=n(76356),i=n(9127),r=n(90112),o=n(12364),d=n.n(o),u=n(55729),c=n(90248),m=n(494),x=n(83201),p=n(54409),h=n(8973),g=n(83260),j=n(12759),y=n(46009);let v=(0,i.m)(l.az);function f(e){let{id:t,name:n,entity:i,children:o,threshold:f=144,type:b}=e,[T,w]=(0,u.useState)(0),[S,C]=(0,g.A)("sticky_follow_header_closed_".concat(i),!1),I=(0,j.Pz)(i),_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,[n,s]=(0,u.useState)(e);return(0,u.useEffect)(()=>{let n=setTimeout(()=>{s(e)},t);return()=>clearTimeout(n)},[e]),n}((0,m.d4)(e=>e.favorites.lists[I[0]].includes(t)||2===I.length&&e.favorites.lists[I[1]].includes(t)));return(0,u.useEffect)(()=>{if(S)return;let e=d()(()=>{window.requestAnimationFrame(()=>{w(window.scrollY)})},300);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[T,S]),(0,s.jsx)(r.N,{children:T>f&&!_&&(0,s.jsx)(v,{position:"fixed",left:"0",right:"0",mt:"0 !important",h:"[168px]",bg:"surface.sp",textAlign:"center",initial:{top:-160,opacity:0},animate:{top:0,opacity:1},exit:{top:-160,opacity:0},transition:{type:"spring",bounce:.3,restDelta:.5},zIndex:"subheader",elevation:"3",children:(0,s.jsx)(l.az,{position:"absolute",bottom:"0",left:"0",right:"0",children:(0,s.jsx)(x.m,{h:"5xl",py:"sm",children:(0,s.jsxs)(l.so,{h:"[40px]",children:[(0,s.jsx)(l.so,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},justify:"flex-end",align:"center",flex:"[1 1 50%]",children:(0,s.jsxs)(l.so,{backgroundColor:"surface.s2",align:"center",px:"sm",py:"xs",br:"lg",cursor:"pointer",children:[o,(0,s.jsx)(y.e,{id:t,entity:i,type:b,location:h.y.FloatingHeader})]})}),(0,s.jsx)(l.so,{align:"center",flex:"[1 1 50%]",children:(0,s.jsx)(a.EY,{textStyle:"assistive.default",ml:"lg",children:(0,s.jsx)(c.A,{id:"add_to_favorites_text",values:{name:n}})})}),(0,s.jsx)(l.so,{align:"center",children:(0,s.jsx)(a.$n,{variant:"clear",p:"0",onClick:()=>{C(!0),w(0)},children:(0,s.jsx)(p.zQC,{icon:"close"})})})]})})})})})}},70115:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var s=n(6029),a=n(99064),l=n(71024),i=n.n(l),r=n(58047);let o=i()(()=>Promise.all([n.e(4824),n.e(8718)]).then(n.bind(n,63848)),{loadableGenerated:{webpack:()=>[63848]},ssr:!1});function d(e){let{uniqueTournament:t,seasonId:n,sport:l}=e;return(0,s.jsx)(a.tU.Panel,{tabKey:r.x.Knockout,children:(0,s.jsx)(o,{sport:l,uniqueTournamentId:t.id,uniqueTournamentSlug:t.slug,categorySlug:t.category.slug,seasonId:n})})}},73404:(e,t,n)=>{"use strict";n.d(t,{A:()=>m,b:()=>c});var s=n(6029),a=n(76356),l=n(99064),i=n(55729),r=n(90248),o=n(50677),d=n(27892),u=n(57869);function c(e,t,n,s,a){let l=a?(0,d.O)(o,t,s):t,i=e.formatMessage({id:"".concat(l)});if(n){let t=e.formatMessage({id:"per_match"}).toLocaleLowerCase();i=i.concat(" ").concat(t)}return i}function m(e){let{items:t,sport:n}=e,[o,d]=(0,i.useState)(0),c=n?(0,u.g)(n):null,m=t.filter(e=>!c||c.includes(e.value)).sort((e,t)=>e.label.localeCompare(t.label));(0,i.useEffect)(()=>{window.scrollTo({top:o,behavior:"smooth"})},[o]);let x=e=>{var t;let n=document.getElementById(null==(t=e.value)?void 0:t.toLowerCase());if(n){let e=document.body.getBoundingClientRect().top,t=n.getBoundingClientRect().top-e-105;o>t&&(t-=96),d(t)}};return(0,s.jsx)(a.az,{p:"sm",children:(0,s.jsx)(l.ms,{items:m,renderItem:(e,t)=>t?(0,s.jsx)(r.A,{id:"quick_find"}):(null==e?void 0:e.label)||null,onSelectedItemChange:e=>{e.selectedItem&&x(e.selectedItem)},forceMenuBelow:!0})})}},74761:(e,t,n)=>{"use strict";n.d(t,{$:()=>u});var s=n(6029),a=n(37071),l=n(62042),i=n(76356),r=n(90248),o=n(83260),d=n(54409);function u(e){let{messageId:t,children:n,onClick:u,...c}=e,[m,x,p]=(0,o.A)(t,!1);return!p||m?null:(0,s.jsxs)(i.so,{align:"center",bg:"surface.s2",br:"sm",py:"sm",pl:"lg",className:(0,l.AH)(c),children:[(0,s.jsx)(i.az,{children:(0,s.jsx)(d.G_L,{fill:"onSurface.nLv3"})}),(0,s.jsxs)(a.EY,{w:"100%",mx:"lg",my:"0",textStyle:"body.small",children:[(0,s.jsx)(r.A,{id:t,values:{strong:function(){for(var e=arguments.length,t=Array(e),n=0;n{null==u||u(),x(!0)},children:(0,s.jsx)(d.zQC,{icon:"close",width:"16",height:"16",fill:"onSurface.nLv1"})})]})}},75414:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=function(e){switch(!0){case e<1e3:return"".concat(e);case e<1e4&&e/1e3%1>=.1:let t="".concat((e/1e3).toPrecision(2));return t.endsWith(".0")&&(t=t.substring(0,t.length-2)),"".concat(t,"k");case e<1e6:let n=Math.round(e/1e3);if(1e3===n)return"1M";return"".concat(n,"k");case e<1e7:let s=(e/1e5).toFixed();return s=s.endsWith("0")?s.substring(0,s.length-1):"".concat(s[0],".").concat(s[1]),"".concat(s,"M");case e<1e8:return"".concat(Math.round(e/1e6),"M");case e<1e9:let a=Math.round(e/1e6);if(1e3===a)return"1B";return"".concat(a,"M");default:return"".concat(e)}}},77015:(e,t,n)=>{"use strict";n.d(t,{t:()=>a.t,w:()=>s.w});var s=n(53192),a=n(91407)},78144:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var s=n(6029),a=n(37071),l=n(99064),i=n(55729),r=n(90248),o=n(48683),d=n(23727),u=n(75751),c=n(47530),m=n(43783),x=n(49679),p=n(42021),h=n(32312);function g(e){let{isMobile:t}=(0,a.$c)(),[n,g]=(0,i.useState)(t),[j,y]=(0,i.useState)(),{rankings:v,rounds:f}=(0,m.Q)(e.uniqueTournamentId,e.seasonId,j);if((0,i.useEffect)(()=>f&&y(f[0].id),[f]),!(null==f?void 0:f.length))return null;let b=!t&&!!v&&v.length>5;return(0,s.jsx)(u.t,{tag:"PowerRankings",children:(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)(o.Zp.Header,{title:(0,s.jsx)(r.A,{id:"sofascore_power_rankings"}),actionComponent:(0,s.jsx)(p.h,{})}),f&&j&&(0,s.jsx)(l.az,{mb:"sm",p:"sm",children:(0,s.jsx)(l.ms,{items:f,initialSelectedItem:f[0],onSelectedItemChange:e=>{let{selectedItem:t}=e;t&&y(t.id)},renderItem:e=>(0,s.jsx)(c.DT,{round:null==e?void 0:e.round})})}),(0,s.jsx)(h.i,{}),(0,s.jsx)(x.a,{rankings:null==v?void 0:v.slice(0,n?v.length:5)}),(0,s.jsx)(o.Zp.Footer,{ctaParams:b?{messageId:n?"show_less":"show_more",onClick:()=>g(e=>!e),icon:n?d.X.Up:d.X.Down}:void 0})]})})}},79528:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var s=n(494),a=n(151);let l=(e,t)=>{var n,l;let i=(0,s.d4)(a.g);if(e&&(null==i||null==(l=i.uniqueTournaments)||null==(n=l[e])?void 0:n[t]))return null==i?void 0:i.uniqueTournaments[e]}},79977:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var s=n(6029),a=n(37071),l=n(55729),i=n(90248),r=n(62859),o=n(57869),d=n(27892);let u=JSON.parse('{"basketball":{"fastbreakPoints":"basketball_fast_break_points"},"tennis":{"firstServePercentage":"tennis_first_serve","firstServePointsWonPercentage":"tennis_first_serve_points_won","secondServePercentage":"tennis_second_serve","secondServePointsWonPercentage":"tennis_second_serve_points","avgAces":"tennis_average_aces_per_match","avgDoubleFaults":"tennis_average_double_faults_per_match","breakPointsSavedPercentage":"break_points_saved","breakPointsSavedConvertedPercentage":"break_points_converted","tiebreakWinPercentage":"tennis_tiebreaks_won"},"avgRating":"average_sofascore_rating","goalsScored":"football_goals_scored","goalsConceded":"football_goals_conceded","bigChances":"football_big_chances","bigChancesMissed":"football_big_chances_missed","hitWoodwork":"football_hit_woodwork","yellowCards":"yellow_cards","redCards":"red_cards","averageBallPossession":"football_ball_possession","accuratePasses":"football_accurate_passes","shots":"football_shots","shotsOnTarget":"football_shots_on_goal","tackles":"football_tackles","interceptions":"football_interceptions","clearances":"football_clearances","fouls":"football_fouls","penaltyGoals":"football_penalty_goals","assists":"football_assists","cleanSheets":"football_clean_sheets"}');function c(e){let{id:t}=e,n=(0,l.useContext)(r.Ws),c=n?(0,o.f)(n):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{id:(0,d.O)(u,t,n)}),(null==c?void 0:c.includes(t))&&(0,s.jsxs)(a.EY,{textStyle:"[inherit]",textTransform:"lowercase",children:[" ",(0,s.jsx)(i.A,{id:"per_match"})]})]})}},85625:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var s=function(e){return e.MainScreen="main_screen",e.EventPage="event_page",e.TournamentPage="league_screen",e.DetailsTab="details",e.MediaTab="media",e}({})},87526:(e,t,n)=>{"use strict";n.d(t,{N:()=>_});var s=n(6029),a=n(947),l=n(37071),i=n(76356),r=n(55729),o=n(90248),d=n(54053),u=n(61836);let c=e=>{let{url:t,onClick:n}=e;return(0,s.jsx)(l.$n,{children:(0,s.jsx)(i.I4.a,{color:"onColor.primary",h:"100%",w:"100%",display:"flex",justifyContent:"center",alignItems:"center",href:t,target:"_blank",rel:"noopener",onClick:n,children:(0,s.jsx)(o.A,{id:"claim_offer"})})})},m=e=>{let{logoUrl:t,promotionName:n,bgImageUrl:a,title:m,description:x,isOpen:p,setIsOpen:h,url:g,location:j}=e,{isDesktop:y}=(0,l.$c)(),v={backgroundImage:"url(".concat(a,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"};if((0,r.useEffect)(()=>{p&&(0,u.Z1)({type:"bottom_sheet",name:n,location:j})},[p]),!p)return null;let f=()=>h(!1);return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(d.A,{isOpen:p,setIsOpen:h,footer:null,renderAdPlaceholder:!1,sheetStyles:v,modalContentStyles:v,width:360,children:(0,s.jsxs)(i.az,{style:y?v:void 0,br:"lg",children:[(0,s.jsx)(i.so,{h:"8xl",px:"xl",pt:{md:"xl"},children:(0,s.jsx)(i.az,{w:"4xl",h:"4xl",children:(0,s.jsx)(l._V,{src:t,h:"4xl",w:"4xl",alt:n})})}),(0,s.jsxs)(i.so,{direction:"column",justify:"flex-end",minH:"[400px]",px:"lg",pb:"lg",gap:"2xl",children:[(0,s.jsxs)(i.so,{direction:"column",gap:"lg",children:[(0,s.jsx)(i.az,{textStyle:"display.extraLarge",color:"onColor.primary",children:m}),(0,s.jsx)(i.az,{textStyle:"body.mediumParagraph",color:"onColor.primary",children:x})]}),(0,s.jsxs)(i.so,{direction:"column",gap:"sm",pt:"xs",children:[(0,s.jsx)(c,{url:g,onClick:()=>{(0,u.AW)({type:"bottom_sheet",name:n,location:j}),f()}}),(0,s.jsx)(l.$n,{variant:"clear",color:"onColor.primary",onClick:f,children:(0,s.jsx)(o.A,{id:"maybe_later"})})]})]})]})})})};var x=n(66062);let p=e=>{let{isOpen:t,setIsOpen:n,location:l}=e,i=(0,a.A)();return(0,s.jsx)(m,{logoUrl:"/static/images/courtside-1891/logo.png",bgImageUrl:"/static/images/courtside-1891/modal-bg.png",promotionName:x.d.promotionName,title:i.formatMessage({id:"euro_basket_promo_drawer_header"}),description:i.formatMessage({id:"euro_basket_promo_drawer_body"}),url:x.d.url,isOpen:t,setIsOpen:n,location:l})};var h=n(83151),g=n(21501),j=n(494),y=n(41888),v=n(70116),f=n(10794),b=n(62827),T=n(83260),w=n(89606),S=n(32097);let C=(e,t)=>{let n=new Date().getTime();if(!e.hasModal||!e.modalCooldown||e.maxTotalViews&&(null==t?void 0:t.totalViews)&&e.maxTotalViews>t.totalViews)return!1;let s=null==t?void 0:t.lastView;return!s||n-s>e.modalCooldown},I=e=>{let t=(0,g.hX)(),{priorityModal:n,setModalAvailable:s,dismiss:a,isDismissed:l}=(0,v.Z)(),i=(0,j.d4)(f.LQ),[o,d]=(0,b.bL)("promotion-in-session",void 0),[u,c]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1),[h,I,_]=(0,T.A)("last-view-per-promotion",{}),k=t||!_?void 0:x.jI.find(n=>(0,w.y)(n,t,i)&&(0,S.H)(e,n)&&C(n,h[n.id]));return(0,r.useEffect)(()=>{k?s(y.w.PromotionModal,!0):n||l||s(y.w.PromotionModal,!1)},[k]),(0,r.useEffect)(()=>{if(n===y.w.PromotionModal&&k){let e=new Date().getTime();d(k.id),c(!0),p(!0),I(t=>{var n,s;let a=Object.keys(t).filter(e=>!!x.jI.find(t=>t.id===e)),l={};return a.forEach(e=>{l[e]=t[e]}),l[k.id]={lastView:e,totalViews:(null!=(s=null==(n=t[k.id])?void 0:n.totalViews)?s:0)+1},l})}},[n]),(0,r.useEffect)(()=>{!u&&m&&a()},[u]),{promotion:o,isOpen:u,setIsOpen:c}},_=e=>{let{page:t}=e,{promotion:n,isOpen:a,setIsOpen:l}=I(t);return n&&a&&n===h.v.Courtside1891?(0,s.jsx)(p,{isOpen:a,setIsOpen:l,location:t.location}):null}},90863:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var s=n(21377),a=n(45860);let l=function(e){let{uniqueTournamentId:t,seasonId:n,position:l="all",type:i=s.Vw_.overall}=e,r=t&&n?s.V3t.topPlayersPerGame(t,n,l,i):null,{data:o,error:d}=(0,a.Ay)(r);return{topPlayersPerGame:o,isError:d}}},91816:(e,t,n)=>{"use strict";n.d(t,{d:()=>s.d});var s=n(25635)},95868:(e,t,n)=>{"use strict";n.d(t,{MB:()=>r,Hw:()=>o,hT:()=>u,R5:()=>d});var s=n(61836),a=n(85625);let l="___sofa-wsc___",i=e=>{let t=new RegExp("".concat(l,"(.*?)").concat(l)),n=e.match(t);return n?n[1]:""},r=e=>{let{type:t,location:n,tournamentId:s,roundId:a,eventId:i,screen:r}=e;return"".concat(l).concat(r,"--").concat(t,"--").concat(n,"--").concat(s,"--").concat(a,"--").concat(i).concat(l)},o=e=>{let[t,n,s,a,l,r]=i(e||"").split("--");return{screen:t,type:n,location:s,tournamentId:Number(a),roundId:"null"===l||"undefined"===l?null:Number(l),eventId:"null"===r||"undefined"===r?null:Number(r)}},d=e=>{let{screen:t,type:n,location:s,tournamentId:l,roundId:i,eventId:r}=o(e),d="Invalid WSC widget containerId: ".concat(e);if(e&&["single","multiple"].includes(n)&&["mobile","desktop"].includes(t)&&Object.values(a.D).includes(s)){if(isNaN(Number(l)));else if(i&&isNaN(Number(i)));else if(!(r&&isNaN(Number(r))))return!0}throw Error(d)},u=e=>{var t,n;let a=null==(t=e.detail)?void 0:t.eventData,l=(null==a?void 0:a.widget_id)||(null==a?void 0:a.origin_widget_id),i=null==(n=e.detail)?void 0:n.eventType;if(i&&l){let{eventId:e,tournamentId:t,location:n}=o(l);switch(i){case"widget_click":(0,s.kA)({id:e||t,location:n});break;case"story_exit":(0,s.G9)({id:e||t,location:n,timeOnScreen:a.content_duration_viewed})}}}},97918:(e,t,n)=>{"use strict";n.d(t,{F:()=>s.A});var s=n(73404)},98423:(e,t,n)=>{"use strict";n.d(t,{e:()=>a.e,p:()=>s.p});var s=n(91603),a=n(33480)},99397:(e,t,n)=>{"use strict";n.d(t,{G:()=>a.A,t:()=>s.t});var s=n(91407),a=n(94400)}},e=>{var t=t=>e(e.s=t);e.O(0,[4092,9888,6591,395,4632,3170,4316,6618,4312,3338,4977,346,988,8217,9907,9462,8017,1254,7129,1350,9536,4025,200,7632,7674,2088,986,4885,8870,7363,3621,636,6593,8792],()=>t(28167)),_N_E=e.O()}]);