!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]="86f2d279-3126-45b2-8d3a-dfd2236afb84",e._sentryDebugIdIdentifier="sentry-dbid-86f2d279-3126-45b2-8d3a-dfd2236afb84")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4985],{3881:(e,t,s)=>{s.d(t,{E:()=>r});var i=s(64082),a=s(6029),l=s(99064),n=s(43451);function r(e){var{height:t=800,width:s="100%",rowHeight:r=45,wrapperStyle:o={},rows:c,animate:d=!1,rowGap:u=8,uniqueKey:p}=e,h=(0,i.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"},h,{style:o},{children:(0,a.jsx)(n.D,Object.assign({animate:d,width:s,height:c&&r?c*(r+u):t,uniqueKey:p},{children:(0,a.jsx)(a.Fragment,{children:c?Array(c).fill(null).map((e,t)=>(0,a.jsx)("rect",{x:0,y:t*(r+u),width:"100%",height:r},t)):(0,a.jsx)("rect",{x:0,y:0,width:"100%",height:t})})}))}))}},5326:(e,t,s)=>{s.d(t,{EN:()=>o,Oi:()=>r,aS:()=>a,sI:()=>n,v1:()=>l});var i=s(21377);let a="goalkeeperGroup",l="goalkeepersGroup",n="G",r={[i.QCR.Football]:{summaryGroup:"rating",attackGroup:"rating",defenceGroup:"rating",passingGroup:"rating",duelsGroup:"rating",goalkeeperGroup:"rating"},[i.QCR.Basketball]:{summaryGroup:"points",pointsGroup:"points",reboundsGroup:"rebounds",otherGroup:"assists"},[i.QCR.Handball]:{playersGroup:"goals",goalkeepersGroup:"goalkeeperEfficiencyPercentage"},[i.QCR.IceHockey]:{summaryGroup:"goals",attackingGroup:"goals",defensiveGroup:"blocked",goalkeeperGroup:"goalkeeperEfficiencyPercentage",otherGroup:"plusMinus"},[i.QCR.AmericanFootball]:{passingGroup:"passingYards",rushingGroup:"rushingAttempts",receivingGroup:"receivingReceptions",defensiveGroup:"defensiveCombineTackles",interceptionsGroup:"defensiveInterceptions",fumblesGroup:"fumbleFumbles",kickingGroup:"kickingTotalPoints",puntingGroup:"puntingTotal",kickReturnsGroup:"kickReturnsTotal",puntReturnsGroup:"puntReturnsTotal"}},o={[i.QCR.Football]:["G","D","M","F"],[i.QCR.Basketball]:["G","GF","FG","F","FC","CF","C"],[i.QCR.IceHockey]:["F","C","L","R","M","D","G"],[i.QCR.AmericanFootball]:["QB","RB","WR","TE","FB","OT","OG","G","C","T","OL","SS","FS","DB","CB","NT","DT","DE","OLB","LB","ILB","DL","SAF","MLB","P","LS","K","PR"],[i.QCR.Baseball]:["P","SP","RP","CP","RHP","LHP","RHS","LHS","LHR","RHR","C","DH","PH","B","PR","BR","1B","2B","3B","SS","IF","UT","UI","LF","CF","RF","OF","UO"]}},5998:(e,t,s)=>{s.d(t,{A:()=>k});var i=s(6029),a=s(33144),l=s(21377),n=s(99064),r=s(55729),o=s(16620),c=s(48886),d=s(70591),u=s(94604),p=s(61234),h=s(91407),x=s(12605),g=s(19991),f=s(90248),m=s(62859),y=s(54409),j=s(54917),v=s(84942),b=s(73488),_=s(76945);let w=e=>{let{summary:t,type:s}=e;return(0,i.jsxs)(n.so,{align:"center",mt:"xs",children:[(0,i.jsx)(b.FU,{isInjury:t.isInjury}),(0,i.jsx)(n.EY,{font:"assistive.default",color:"onSurface.nLv3",mx:"xxs",ml:"xs",children:t.time&&"".concat(t.time,"'")}),t.forPlayer&&(0,i.jsxs)(n.EY,{font:"assistive.default",color:"onSurface.nLv3",mx:"xxs",children:[(0,i.jsx)(f.A,{id:"out"===s?"substitution.in":"substitution_out"}),": \xa0",t.forPlayer]})]})};function C(e){var t,s,a,o,c,u;let{player:p,onClick:C,incidents:k,hasRating:M,isLast:S,isNotStarted:A,highlightStarter:P=!0,isPlayerOfTheMatch:H}=e,I=(null==p||null==(t=p.statistics)?void 0:t.rating)?Number(p.statistics.rating):void 0,{name:z,id:T}=p.player,R=(0,r.useMemo)(()=>k?(0,_.h$)({id:p.player.id,incidents:k,useShortName:p.substitute}):{},[p,k]),V=(0,v.z)(p.player),O=(0,_.sP)(V,p.captain,!0),E=(0,r.useContext)(m.Ws),L=E===l.QCR.Cricket,G="rtl"===document.dir,F=!p.substitute&&P;return!I&&A&&p.avgRating&&(I=p.avgRating),(0,i.jsx)(d.uc,{player:p.player,onClick:C,sportSlug:E,children:(0,i.jsxs)(n.so,{hoverBg:"surface.s2",cursor:"pointer",children:[(0,i.jsx)(n.az,{py:"xxs",children:(0,i.jsx)(n.az,{w:4,h:"100%",bg:F?"sofaSingles.value":"transparent"})}),(0,i.jsxs)(n.az,{position:"relative",pl:"md",pr:"lg",py:"sm",children:[(0,i.jsx)(h.t,{size:40,id:T,name:z}),H&&(0,i.jsx)(y.ue7,{position:"absolute",fill:(0,g.Et)(null==(s=p.statistics)?void 0:s.rating),bottom:8,left:16,w:16,h:16}),F&&(0,i.jsx)(n.az,{position:"absolute",bottom:4,left:"50%",style:{transform:G?"translateX(50%)":"translateX(-50%)"},bg:"sofaSingles.value",br:6,children:(0,i.jsx)(n.EY,{px:"6px",font:"assistive.micro",color:"surface.s1",as:"div",children:(0,i.jsx)(f.A,{id:"starter"})})})]}),(0,i.jsxs)(n.so,{borderBottom:S?void 0:"onSurface.nLv4",align:"center",flex:"1 1 auto",mr:"lg",children:[(0,i.jsxs)(n.az,{flex:"1 1 auto",children:[(0,i.jsxs)(n.so,{title:O,align:"center",children:[(0,i.jsxs)(n.EY,{font:"body.medium",color:"onSurface.nLv1",mr:"xs",children:[p.jerseyNumber&&(0,i.jsx)(n.az,{as:"bdi",mr:"xs",children:p.jerseyNumber}),(0,i.jsx)(n.az,{as:"span",children:O})]}),(0,i.jsx)(b.AG,{...R}),(0,i.jsx)(b.X0,{...R})]}),(null==(a=R.substitutionIn)?void 0:a.time)&&(null==(o=R.substitutionIn)?void 0:o.forPlayer)&&(0,i.jsx)(w,{summary:R.substitutionIn,type:"in"}),(null==(c=R.substitutionOut)?void 0:c.time)&&(0,i.jsx)(w,{summary:R.substitutionOut,type:"out"}),L&&p.position&&(0,i.jsx)(n.EY,{font:"assistive.default",color:"onSurface.nLv3",mx:"xxs",ml:"xs",children:(0,i.jsx)(j.F,{id:p.position})})]}),M||p.avgRating?(0,i.jsx)(n.az,{children:I||(null==(u=R.substitutionIn)?void 0:u.time)?(0,i.jsx)(x.A,{rating:I,format:M?"box":"sideBox"}):null}):null]})]})})}function k(e){let{players:t,team:s,event:h,manager:x,incidents:g,showLastMatches:f,hasTopBorder:m,hideTeamHeader:y,highlightStarters:j=!0,hasRating:v,playerOfTheMatchId:b}=e,_=h.tournament.category.sport.slug,{openEventPlayerStatistics:w}=(0,o.d)(),k=(0,r.useCallback)(e=>t=>{(f||h.hasEventPlayerStatistics)&&(t.preventDefault(),w({event:h,player:e},c._.Lineups))},[h,t,w]),M=t.length>0,S=!!x,A=_===l.QCR.Football;return M||S?(0,i.jsxs)(n.az,{pt:"sm",pb:["sm","md"],flex:"1 1 50%",borderTop:m?"onSurface.nLv4":void 0,children:[!y&&!A&&(0,i.jsx)(d.gT,{team:s,sport:_,children:(0,i.jsxs)(n.so,{align:"center",hoverBg:"surface.s2",cursor:"pointer",children:[(0,i.jsx)(n.az,{px:"lg",py:"sm",children:(0,i.jsx)(a.p,{id:s.id,name:s.name,size:40})}),(0,i.jsx)(n.az,{children:(0,i.jsx)(n.EY,{font:"display.large",children:(0,i.jsx)(u.Rm,{team:s})})})]})}),S&&!A&&(0,i.jsx)(p.A,{manager:x,isBorderHidden:!M,incidents:null==g?void 0:g.filter(e=>e.manager)}),t.map((e,s)=>(0,i.jsx)(C,{player:e,incidents:g,hasRating:v,onClick:k(e.player),isNotStarted:h.status.type===l.XUj.NotStarted,isLast:s===t.length-1,highlightStarter:j,isPlayerOfTheMatch:b===e.player.id},e.player.id))]}):null}},12174:(e,t,s)=>{s.d(t,{f:()=>_,Y:()=>n});var i=s(21377),a=s(45860),l=s(71046);function n(e){let t=e.tournament.category.sport.slug!==i.QCR.Football||e.status.type!==i.XUj.Finished,{data:s,isLoading:n}=(0,a.Ay)(t?null:i.bnp.bestPlayersSummary(e.id),(0,l.rf)(e)),r=null==s?void 0:s.playerOfTheMatch,o=null==s?void 0:s.bestHomeTeamPlayers.find(e=>e.player.id===(null==r?void 0:r.player.id));return{isLoading:!t&&n,bestPlayer:(null==r?void 0:r.label)==="rating"?r:void 0,team:r?o?e.homeTeam:e.awayTeam:void 0}}var r=s(6029),o=s(32190),c=s(44194),d=s(21501),u=s(76356),p=s(90248),h=s(65789),x=s(54409),g=s(61703),f=s(59754),m=s(16620),y=s(48886);function j(){return(0,r.jsx)("svg",{width:"133",height:"120",viewBox:"0 0 133 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Symbols",children:(0,r.jsx)("g",{id:"Cards/Player-Of-The-Season-Card-",children:(0,r.jsxs)("g",{id:"Pattern-Left",children:[(0,r.jsx)("path",{id:"Path",d:"M56.9883 114H75.9883V133H56.9883V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsxs)("g",{id:"Group",opacity:"0.8",children:[(0,r.jsx)("path",{id:"Path_2",d:"M38 114H57V133H38V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_3",d:"M76 95.0001H95V114H76V95.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_4",d:"M95 95.0001H114V114H95V95.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_5",d:"M57 56.9998H76V76H57V56.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_6",d:"M95 56.9998H114V76H95V56.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_7",d:"M114 56.9998H133V76H114V56.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_8",d:"M0 0H19V19H0V0Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_9",d:"M57 0H76V19H57V0Z",fill:"var(--primary-default)",fillOpacity:"0.15"})]}),(0,r.jsxs)("g",{id:"Group_2",opacity:"0.5",children:[(0,r.jsx)("path",{id:"Path_10",d:"M76 114H95V133H76V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_11",d:"M0 95H19V114H0V95Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_12",d:"M57 95H76V114H57V95Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_13",d:"M76 75.9999H95V94.9996H76V75.9999Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_14",d:"M95 75.9999H114V94.9996H95V75.9999Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_15",d:"M38 56.9998H57V75.9999H38V56.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_16",d:"M76 56.9998H95V75.9999H76V56.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_17",d:"M38 37.9998H57V56.9998H38V37.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_18",d:"M76 37.9998H95V56.9998H76V37.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_19",d:"M0 18.9999H19V37.9999H0V18.9999Z",fill:"var(--primary-default)",fillOpacity:"0.15"})]})]})})})})}function v(){return(0,r.jsx)("svg",{width:"133",height:"120",viewBox:"0 0 133 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Symbols",children:(0,r.jsx)("g",{id:"Cards/Player-Of-The-Season-Card-",children:(0,r.jsx)("g",{id:"Group-9",children:(0,r.jsxs)("g",{id:"Pattern-Right",children:[(0,r.jsx)("path",{id:"Path",d:"M76.0117 114H57.0117V133H76.0117V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsxs)("g",{id:"Group",opacity:"0.5",children:[(0,r.jsx)("path",{id:"Path_2",d:"M57 114H38V133H57V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_3",d:"M133 94.9998H114V114H133V94.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_4",d:"M76 94.9998H57V114H76V94.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_5",d:"M57 76.0002H38V94.9998H57V76.0002Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_6",d:"M38 76.0002H19V94.9998H38V76.0002Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_7",d:"M95 57.0001H76V75.9997H95V57.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_8",d:"M57 57.0001H38V75.9997H57V57.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_9",d:"M95 38H76V57.0001H95V38Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_10",d:"M57 38H38V57.0001H57V38Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_11",d:"M133 19H114V37.9999H133V19Z",fill:"var(--primary-default)",fillOpacity:"0.15"})]}),(0,r.jsxs)("g",{id:"Group_2",opacity:"0.8",children:[(0,r.jsx)("path",{id:"Path_12",d:"M95 114H76V133H95V114Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_13",d:"M57 94.9998H38V114H57V94.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_14",d:"M38 94.9998H19V114H38V94.9998Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_15",d:"M76 57.0001H57V75.9997H76V57.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_16",d:"M38 57.0001H19V75.9997H38V57.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_17",d:"M18.9999 57.0001H0V75.9997H18.9999V57.0001Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_18",d:"M133 0H114V18.9999H133V0Z",fill:"var(--primary-default)",fillOpacity:"0.15"}),(0,r.jsx)("path",{id:"Path_19",d:"M76 0H57V18.9999H76V0Z",fill:"var(--primary-default)",fillOpacity:"0.15"})]})]})})})})})}let b=e=>{let{bestPlayer:t,team:s}=e;return(0,r.jsxs)(u.so,{p:"lg",align:"center",justify:"space-between",children:[(0,r.jsxs)(u.so,{align:"center",children:[(0,r.jsx)(o.tg,{id:t.player.id,name:t.player.name,h:48,w:48}),(0,r.jsxs)(u.az,{ml:"sm",children:[(0,r.jsx)(c.EY,{textStyle:"display.medium",mb:"xs",display:"block",children:t.player.name}),(0,r.jsxs)(u.so,{align:"center",children:[(0,r.jsx)(o.pY,{id:s.id,name:s.name,h:16,w:16,mr:"xs"}),(0,r.jsx)(c.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:(0,r.jsx)(p.A,{id:s.slug,defaultMessage:s.name})})]})]})]}),(0,r.jsx)(o.GW,{rating:t.value})]})};function _(e){let{event:t}=e,{isLoading:s,bestPlayer:a,team:l}=n(t),{openEventPlayerStatistics:_}=(0,m.d)(),w=(0,f.Z)(t,"playerOfTheMatch"),C=(0,d.hX)();return t.tournament.category.sport.slug===i.QCR.Football&&t.status.type===i.XUj.Finished&&(C||s)?(0,r.jsx)(h.Zp,{isInverseDesktop:!0,children:(0,r.jsx)(u.az,{h:"[120px]"})}):s||a?(0,r.jsx)(g.b,{entityId:t.id,isInverseDesktop:!0,branding:w,location:"event_potm",children:(0,r.jsxs)(u.so,{position:"relative",h:"[120px]",justify:"space-between",bg:"surface.s2",elevation:{mdDown:"2"},roundedTop:w?void 0:"lg",roundedBottom:"lg",overflow:"hidden",cursor:"pointer",onClick:()=>a&&_({event:t,player:a.player},y._.PlayerOfTheMatch),children:[(0,r.jsx)(j,{}),(0,r.jsx)(v,{}),(0,r.jsxs)(u.az,{position:"absolute",top:"0",left:"0",w:"100%",children:[(0,r.jsxs)(u.so,{pt:"md",px:"lg",pb:"xs",align:"center",children:[(0,r.jsx)(x.ue7,{mr:"sm",w:24,h:24,fill:(0,o.Et)(null==a?void 0:a.value)}),(0,r.jsx)(c.EY,{textStyle:"display.medium",lineHeight:"24px",children:(0,r.jsx)(p.A,{id:"details.manOfMatch"})})]}),(0,r.jsx)(u.az,{minH:"8xl",children:a&&l&&(0,r.jsx)(b,{bestPlayer:a,team:l})})]})]})}):null}},12785:(e,t,s)=>{s.d(t,{Ko:()=>Q,g9:()=>Z});var i=s(6029),a=s(4967),l=s(99064),n=s(90248),r=s(12047),o=s(55529);function c(e){let{isNational:t,eventTimestamp:s,isHorizontalLayout:c,onTabChange:d,order:u}=e,p=(0,r.Ay)({isSportMenuVisible:!0,isInMobileTabs:!0}),h=1>(0,a.CF)(s),x=Object.values(o.kA).filter(e=>(e!==o.kA.MarketValue||!!h)&&(t?e!==o.kA.Nationality:e!==o.kA.Club));return(0,i.jsxs)(l.PI,{top:p,w:"100%",order:u,zIndex:l.Py.Sticky-1,bg:"surface.s1",children:[(0,i.jsx)(l.tU,{variant:"quaternary",initialValue:o.kA.Performance,onChange:d,children:(0,i.jsx)(l.tU.List,{px:c?void 0:"xs",py:"sm",children:x.map(e=>(0,i.jsx)(l.tU.Tab,{tabKey:e,children:(0,i.jsx)(n.A,{id:o.fP[e]})},"tab-".concat(e)))})}),!c&&(0,i.jsx)(l.cG,{})]})}var d=s(40237),u=s(21377),p=s(55729),h=s(41735),x=s(7322),g=s(34851),f=s(50154),m=s(3518),y=s(85685),j=s(94604);let v=function(){let[e,t]=(0,p.useState)(320);return(0,p.useEffect)(()=>{t(window.innerWidth);let e=()=>t(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e};function b(e){let{team:t,avgRating:s,teamSide:a,formation:r,jersey:c,isNotStarted:b,avgMessageId:_,avgData:w,chipType:C,order:k,isHorizontalLayout:M}=e,S=[o.kA.Age,o.kA.MarketValue,o.kA.Height].includes(C)&&w,A=v(),P=(0,p.useContext)(h.ThemeContext),{isAdsTestTreatment:H}=(0,f.Q)(),I="rtl"===P.settings.textDirection;return(0,i.jsx)(l.az,{w:"100%",h:"72px",maxH:"82px",br:[void 0,"lg"],flex:M?"1 1 45%":"1 1 100%",backgroundColor:M?"surface.s2":void 0,m:H?"left"===a?I?"0 sm sm xs":"0 xs sm sm":I?"0 xs sm sm":"0 sm sm xs":M?"left"===a?I?"0 0 sm xs":"0 xs sm 0":I?"0 xs sm 0":"0 0 sm xs":void 0,p:M?"0 sm":"sm sm",order:k,children:(0,i.jsxs)(l.so,{w:"100%",h:"100%",justify:"space-between",align:"center",direction:"left"!==a&&M?"row-reverse":"row",children:[(0,i.jsxs)(l.so,{h:"100%",align:"center",direction:"left"!==a&&M?"row-reverse":"row",children:[A>360&&!H&&(0,i.jsx)(d.p,{id:t.id,size:32,m:"left"===a?"0 sm 0 0":"0 0 0 sm"}),(0,i.jsxs)(l.so,{direction:"column",gap:"xs",align:"left"!==a&&M?"flex-end":"flex-start",ml:"sm",children:[(0,i.jsxs)(l.so,{gap:"sm",align:"center",h:"100%",grow:1,children:[(0,i.jsx)(l.EY,{font:"display.medium",lineHeight:"20px",lineClamp:2,children:(0,i.jsx)(j.Rm,{team:t,short:!0})}),s&&(0,i.jsxs)(l.so,{align:"center",h:"100%",children:[(0,i.jsx)(d.G,{rating:s,format:"sideBox"}),(0,i.jsx)(x.D,{type:b?g.J.AverageRatingTeam:g.J.AverageRating,rating:s,renderImage:e=>(0,i.jsx)(d.p,{id:t.id,...e})})]})]}),S&&(0,i.jsxs)(l.so,{direction:"row",justify:"left"!==a&&M?"flex-end":"flex-start",align:"center",wrap:"wrap",children:[(0,i.jsxs)(l.EY,{font:"body.small",lineHeight:"16px",color:"onSurface.nLv3",children:[(0,i.jsx)(n.A,{id:_})," • "]}),"\xa0",(0,i.jsx)(l.EY,{font:"display.micro",fontWeight:700,lineHeight:"14px",children:C===o.kA.Age?(0,i.jsxs)(i.Fragment,{children:[w," ",(0,i.jsx)(n.A,{id:"years_short"})]}):C===o.kA.MarketValue?(0,i.jsx)(y.o,{parsedMoney:(0,u.oaz)(w)}):C===o.kA.Height?(0,i.jsx)(m.Z,{value:w,fromUnit:"cm"}):void 0})]})]})]}),(0,i.jsxs)(l.so,{minW:"56px",w:"56px",direction:"column",justify:"center",align:"center",m:"xs",children:[(0,i.jsx)(l.EY,{font:"display.small",color:"onSurface.nLv1",children:r}),(0,i.jsx)(l.so,{w:"36px",h:"36px",br:"sm",backgroundColor:"neutral.highlight",justify:"center",align:"center",children:(0,i.jsx)(l._V,{w:"28px",h:"32px",src:c,alt:"Team jersey"})})]})]})})}function _(e){let{eventStatus:t,isConfirmed:s,shareButton:a,order:r,isHorizontalLayout:o}=e;return[u.XUj.Finished,u.XUj.InProgress].includes(t)?null:(0,i.jsxs)(l.so,{order:r,pt:"md",pb:"xs",px:["sm",o?"xs":"sm"],w:"100%",justify:[a?"space-between":"center","space-between"],align:"center",children:[(0,i.jsx)(l.EY,{font:"display.medium",lineHeight:"24px",children:(0,i.jsx)(n.A,{id:s?"football_confirmed_lineups":"football_possible_lineups"})}),a]})}var w=s(44194),C=s(16620),k=s(48886),M=s(95522);let S="rgba(255, 255, 255,0.3)",A=(0,h.default)(l.so).withConfig({componentId:"sc-f78c658b-0"})(["position:relative;width:",";flex:",";max-height:","px;background-color:",";",";"],e=>e.isHorizontalLayout?"50%":"calc(100% - 16px)",e=>e.isHorizontalLayout?"1 1 50%":"1 1 ".concat(430,"px"),430,e=>e.theme.colors.graphicsTerrain.footballLineups,e=>{let t="border: 2px solid ".concat(S,";");return e.isHorizontalLayout?"rtl"===e.theme.settings.textDirection?"right"===e.side&&(t+="border-right: none;"):"left"===e.side&&(t+="border-right: none;"):"left"===e.side&&(t+="border-bottom: none;"),t}),P=(0,h.default)(l.so).withConfig({componentId:"sc-f78c658b-1"})(["z-index:",";flex:",";"," flex-direction:",";",";"],l.Py.Button,e=>e.isHorizontalLayout?"1 1 50%":"1 1 ".concat(430,"px"),e=>e.isHorizontalLayout?"height: ".concat(430,"px;"):"max-height: ".concat(430,"px;"),e=>{let t=e.isHorizontalLayout?"row":"column";return"right"===e.side&&(t=e.isHorizontalLayout?"row-reverse":"column-reverse"),t},e=>{let t="";return e.isHorizontalLayout?"rtl"===e.theme.settings.textDirection?"right"===e.side?t+="border-right: none;":t+="border-left: none;":"left"===e.side?t+="border-right: none;":t+="border-left: none;":"left"===e.side?t+="border-bottom: none;":t+="border-top: none;",t}),H=h.default.div.withConfig({componentId:"sc-f78c658b-2"})(["position:absolute;z-index:",";top:0;left:0;width:100%;height:100%;"," user-select:none;"," .goal{position:absolute;z-index:",";left:calc(50% - 80px);top:-1px;","}.center{position:absolute;z-index:",";bottom:-1px;left:calc(50% - 64px);","}.c1,.c2{position:absolute;z-index:",";top:0;}.c1{left:0;}.c2{right:0;","}.logo{position:absolute;z-index:",";bottom:16px;right:12px;}"],l.Py.Backdrop,e=>e.isHorizontalLayout&&"height: ".concat(428,"px;"),e=>"rtl"===e.theme.settings.textDirection&&e.isHorizontalLayout?"left"===e.side&&"transform: rotate(180deg);":"right"===e.side&&"transform: rotate(180deg);",l.Py.Backdrop,e=>e.isHorizontalLayout&&"\n transform-origin: top left;\n transform: translateY(160px) rotate(-90deg);\n top: calc(50% - 80px);\n left: -1px;\n ",l.Py.Backdrop,e=>e.isHorizontalLayout&&"\n transform: rotate(-90deg);\n transform-origin: top;\n top: 50%;\n right: -1px;\n left: unset;\n ",l.Py.Backdrop,e=>e.isHorizontalLayout&&"\n transform: rotate(180deg);\n top: unset;\n right: unset;\n bottom: 0;\n left: 0;\n ",l.Py.Backdrop);var I=s(10292),z=s(84942);function T(e){let{value:t,eventTimestamp:s,characteristic:r}=e;return(0,i.jsx)(l.so,{border:t?"onColor.primary":"onSurface.nLv3",minW:"24px",maxH:"16px",justify:"center",align:"center",px:"xs",bg:"surface.s1",position:"absolute",top:"34px",children:(0,i.jsx)(l.EY,{font:"assistive.default",lineHeight:"16px",color:t?void 0:"onSurface.nLv3",style:{textWrap:"nowrap"},children:t?(0,i.jsxs)(i.Fragment,{children:[r===o.kA.Age&&(0,i.jsxs)(i.Fragment,{children:[(0,a.Dr)(t,s)," ",(0,i.jsx)(n.A,{id:"years_shorter"})]}),r===o.kA.MarketValue&&(0,i.jsx)(y.o,{parsedMoney:(0,u.oaz)(t)}),r===o.kA.Height&&"number"==typeof t&&(0,i.jsx)(m.Z,{value:t,fromUnit:"cm"})]}):"-"})})}var R=s(87827),V=s(54409);let O=e=>{let{incident:t,isNumber:s}=e;return(0,i.jsx)(l.so,{br:"50%",backgroundColor:s?t.color:"onColor.primary",border:s?"onColor.primary":"neutral.highlight",h:s?"14px":"16px",w:s?"14px":"16px",justify:"center",align:"center",children:s?(0,i.jsx)(l.EY,{font:"display.micro",fontWeight:700,lineHeight:"14px",color:"onColor.primary",children:t.count}):"matchMVP"===t.name?(0,i.jsx)(V.ue7,{w:12,h:12,fill:t.color}):t.icon&&(0,i.jsx)(V.NcS,{icon:t.icon,width:12,height:12,fill:t.color})})};function E(e){let{alignment:t,incidents:s,compactDisplay:a}=e;return(0,i.jsx)(l.so,{w:"right"===t?void 0:"16px",h:"50px",position:"relative",direction:"column",maxW:"22px",minW:"16px",gap:"1px",children:s.map(e=>e.isVisible?(0,i.jsxs)(l.so,{align:"center",children:[(0,i.jsx)(O,{incident:e}),"right"===t&&e.count&&e.count>=2&&(0,i.jsx)(l.so,{position:"absolute",gap:"1px",left:a?"1px":"8px",children:(0,i.jsx)(O,{incident:e,isNumber:!0})})]},e.name):(0,i.jsx)(l.az,{h:16},e.name))})}var L=s(76945);function G(e){var t;let{player:s,incidents:a,isMatchMVP:n,lineupsType:r,compactDisplay:c,hasRating:d}=e,{playerLeftStatistics:u,playerRightStatistics:p}=(0,L.H_)(s,a,n),h=(0,L.lV)(s,r);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.so,{w:"100%",h:"100%",px:c?void 0:"3px",position:"absolute",justify:r===o.V7.Confirmed?"space-between":"flex-start",children:[u&&(0,i.jsx)(E,{alignment:"left",incidents:u}),r===o.V7.Confirmed&&p&&(0,i.jsx)(E,{alignment:"right",incidents:p,compactDisplay:c})]}),d&&(0,i.jsx)(l.so,{position:"absolute",top:"33px",children:(0,i.jsx)(R.G,{rating:h,format:"box",decimalPoints:(null==(t=s.statistics)?void 0:t.rating)?void 0:2,size:"sm",isOnColor:!0})})]})}var F=s(49519);function N(e){var t,s;let{player:a,chipType:n}=e,r=null==(s=a.player)||null==(t=s.country)?void 0:t.alpha2;return(0,i.jsxs)(l.so,{p:"xxs",br:"xxs",bg:"onColor.primary",elevation:2,justify:"center",align:"center",position:"absolute",top:"31px",children:[n===o.kA.Club&&(0,i.jsx)(F.p,{id:null==a?void 0:a.teamId,size:16}),n===o.kA.Nationality&&(r?(0,i.jsx)(F.w,{alpha2:r,size:16}):(0,i.jsx)(l.az,{w:"lg",h:"lg",bg:"surface.s2",br:"50%"}))]})}let B=e=>{var t;let{player:s,isMatchMVP:a,incidents:n,chipType:r,lineupsType:c,numberOfPlayersInRow:d,eventTimestamp:u,hasRating:h}=e,{mediaBreakpoint:x,isDesktopMedium:g}=(0,w.$c)(),[f,m]=(0,p.useState)(),y=(0,z.z)(s.player,!0),j=r===o.kA.Performance,v=[o.kA.Club,o.kA.Nationality].includes(r),b=[o.kA.Age,o.kA.MarketValue,o.kA.Height].includes(r),_=(null==n?void 0:n.filter(e=>{var t;return(null==e||null==(t=e.player)?void 0:t.id)===s.player.id&&("red"===e.incidentClass||"yellowRed"===e.incidentClass)}).length)!==0&&j;return(0,p.useEffect)(()=>{var e,t,i;switch(r){case o.kA.Age:m(null==(e=s.player)?void 0:e.dateOfBirthTimestamp);break;case o.kA.MarketValue:m(null==(t=s.player)?void 0:t.proposedMarketValueRaw);break;case o.kA.Height:m(null==(i=s.player)?void 0:i.height)}},[r]),(0,i.jsxs)(l.so,{direction:"column",align:"center",children:[(0,i.jsxs)(l.so,{position:"relative",direction:"column",justify:"center",align:"center",w:"100%",h:"100%",maxW:"68px",maxH:"52px",children:[(0,i.jsx)(l.az,{w:"40px",h:"40px",br:"50%",bg:"surface.s0",children:(0,i.jsx)(I.t,{size:40,id:null==(t=s.player)?void 0:t.id,style:{opacity:_?.5:1}})}),j&&(0,i.jsx)(G,{player:s,incidents:n,isMatchMVP:a,lineupsType:c,compactDisplay:g||"xxs"===x&&5===d,hasRating:h}),v&&(0,i.jsx)(N,{player:s,chipType:r}),b&&(0,i.jsx)(T,{value:f,eventTimestamp:u,characteristic:r})]}),(0,i.jsxs)(l.EY,{font:"table.small",lineHeight:"12px",color:"onColor.primary",align:"center",mt:"md",px:"xs",w:"100%",block:!0,children:[(0,i.jsx)(l.EY,{font:"table.small",lineHeight:"12px",color:"onColor.secondary",display:"inline-block",mr:"xxs",children:s.jerseyNumber}),s.captain?"(c) ".concat(y):y]})]})};function Z(e){let{side:t,linesColor:s,isHorizontalLayout:a}=e;return(0,i.jsxs)(H,{side:t,isHorizontalLayout:a,children:[(0,i.jsx)("div",{className:"goal",children:(0,i.jsxs)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 160 70",width:"160",height:"70",children:[(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"cutoffRect",children:(0,i.jsx)("rect",{x:"0",y:"1",width:"160",height:"70"})})}),(0,i.jsxs)("g",{stroke:s,fill:"transparent",strokeWidth:"2",children:[(0,i.jsx)("rect",{clipPath:"url(#cutoffRect)",x:"1",y:"0",width:"158",height:"46"}),(0,i.jsx)("rect",{clipPath:"url(#cutoffRect)",x:"42",y:"0",width:"74",height:"24"}),(0,i.jsx)("path",{d:"M 39 46 A 50 50 0 0 0 119 46"})]})]})}),(0,i.jsx)("div",{className:"c1",children:(0,i.jsx)("svg",{viewBox:"0 0 14 14",height:"14",width:"14",children:(0,i.jsx)("circle",{stroke:s,fill:"transparent",strokeWidth:"2",cx:"0",cy:"0",r:"12"})})}),(0,i.jsx)("div",{className:"c2",children:(0,i.jsx)("svg",{viewBox:"0 0 14 14",height:"14",width:"14",children:(0,i.jsx)("circle",{stroke:s,fill:"transparent",strokeWidth:"2",cx:"14",cy:"0",r:"12"})})}),(0,i.jsx)("div",{className:"center",children:(0,i.jsx)("svg",{viewBox:"0 0 128 64",width:"128",height:"64",children:(0,i.jsx)("circle",{stroke:s,fill:"transparent",strokeWidth:"2",cx:"64",cy:"64",r:"62"})})})]})}function D(e){let{teamSide:t,playerFormation:s,incidents:a,playerOfTheMatchId:n,playerCharacteristic:r,lineupsType:o,isHorizontalLayout:c,order:d,event:p,showLastMatches:x,hasRatings:g}=e,f="rtl"===(0,h.useTheme)().settings.textDirection,{openEventPlayerStatistics:m}=(0,C.d)(),{mediaBreakpoint:y,isDesktopMedium:j}=(0,w.$c)(),v=x||p.hasEventPlayerStatistics?e=>m({event:p,player:e.player},k._.Lineups):void 0,b=j||"xxs"===y&&5===s.length;return(0,i.jsxs)(A,{side:t,isHorizontalLayout:c,mx:c?0:"sm",order:d,children:[(0,i.jsx)(P,{side:t,isHorizontalLayout:c,children:s.map((e,d)=>{let h=c?t===(f?"left":"right")?"column":"column-reverse":t===(f?"right":"left")?"row":"row-reverse";return(0,i.jsx)(l.so,{flex:"1 1 auto",align:"center",justify:"space-evenly",direction:h,children:(0,i.jsx)(l.so,{w:c?void 0:"100%",h:c?"100%":void 0,justify:"space-evenly",direction:h,children:e.map(t=>(0,i.jsx)(l.so,{direction:"column",justify:"flex-start",align:"center",flex:"1 1 100%",w:b?"60px":void 0,maxW:[112,5===s.length?86:108],minW:"60px",maxH:"76px",pt:c?0:"6px",cursor:"pointer",onClick:()=>{v&&v(t)},children:(0,i.jsx)(l.az,{w:"100%",children:(0,i.jsx)(M.A,{player:v?void 0:t.player,sportSlug:u.QCR.Football,children:(0,i.jsx)(B,{player:t,isMatchMVP:t.player.id===n,incidents:a,chipType:r,lineupsType:o,numberOfPlayersInRow:e.length,eventTimestamp:p.startTimestamp,hasRating:!!g},t.player.id)},t.player.id)})},t.player.id))})},d)})}),(0,i.jsx)(Z,{side:t,linesColor:S,isHorizontalLayout:c})]})}var Y=s(62859),U=s(61836),W=s(54863);let Q=(0,p.forwardRef)((e,t)=>{let{leftFormation:s,rightFormation:a,playerOfTheMatchId:n,shareButton:r}=e,{location:d,event:h,leftTeam:x,rightTeam:g}=(0,p.useContext)(Y.y$),m=h.tournament.category.sport.slug,y=h.status.type===u.XUj.NotStarted&&m===u.QCR.Football,{isDesktop:j}=(0,w.$c)(),v=j&&d===Y.cb.EventPage,[C,k]=(0,p.useState)(o.kA.Performance),[M,S]=(0,W.ax)(e.lineups),{isAdsTestTreatment:A}=(0,f.Q)();if(!s||!a)return null;let P=(0,L.ZB)(s,a,h.startTimestamp),H=e.lineups.left.players.some(e=>!!e.avgRating)||e.lineups.right.players.some(e=>!!e.avgRating),I=[...s||[],...a||[]].some(e=>e.some(e=>{var t;return null==(t=e.statistics)?void 0:t.rating})),z=h.status.type===u.XUj.NotStarted,T=m===u.QCR.Football?h.status.type===u.XUj.NotStarted?H:I:void 0,R=h.status.type===u.XUj.Finished||e.confirmed?o.V7.Confirmed:o.V7.Possible,V=[o.kA.Age,o.kA.MarketValue,o.kA.Height].includes(C);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.az,{px:A?"sm":void 0,children:[(0,i.jsx)(_,{isConfirmed:e.confirmed,eventStatus:h.status.type,shareButton:r,order:v?1:2,isHorizontalLayout:!!v}),(0,i.jsx)(c,{isNational:!!h.homeTeam.national&&!!h.awayTeam.national,eventTimestamp:h.startTimestamp,onTabChange:e=>{(0,U.ke)({action:"click",location:"event_lineups",type:e===o.kA.MarketValue?"market_value":e}),k(e)},order:v?2:1,isHorizontalLayout:!!v})]}),(0,i.jsxs)(l.so,{ref:t,position:"relative",w:"100%",direction:v?"row":"column",justify:"space-between",wrap:"wrap",children:[(0,i.jsx)(b,{team:x,teamSide:u.cxP.Left,formation:e.lineups.left.formation,jersey:e.lineups.leftJerseyUrls.player,chipType:C,avgRating:M,avgData:V?P[C].leftTeamValue:void 0,avgMessageId:V?P[C].messageId:void 0,order:3,isHorizontalLayout:v,isNotStarted:z}),(0,i.jsx)(D,{teamSide:u.cxP.Left,playerFormation:s,incidents:e.incidents,playerOfTheMatchId:n,lineupsType:R,playerCharacteristic:C,showLastMatches:y,isHorizontalLayout:v,order:v?4:3,event:h,hasRatings:T}),(0,i.jsx)(D,{teamSide:u.cxP.Right,playerFormation:a,incidents:e.incidents,playerOfTheMatchId:n,lineupsType:R,playerCharacteristic:C,showLastMatches:y,isHorizontalLayout:v,order:v?5:4,event:h,hasRatings:T}),(0,i.jsx)(b,{team:g,teamSide:u.cxP.Right,formation:e.lineups.right.formation,jersey:e.lineups.rightJerseyUrls.player,chipType:C,avgRating:S,avgData:V?P[C].rightTeamValue:void 0,avgMessageId:V?P[C].messageId:void 0,order:v?3:5,isHorizontalLayout:v,isNotStarted:z})]})]})})},16206:(e,t,s)=>{s.d(t,{A:()=>Q});var i=s(6029),a=s(44194),l=s(76356),n=s(99064),r=s(55729),o=s(62859),c=s(73011),d=s(9489),u=s(21377),p=s(48886),h=s(5326);let x=e=>{let t=e.statistics;for(let e=0;e0)return!0}return!1},g=(e,t,s)=>t===u.QCR.Football&&e===h.aS?s.player.position===h.sI:t===u.QCR.Handball?e!==h.v1||x(s):t===u.QCR.IceHockey?e!==h.aS||x(s):t!==u.QCR.AmericanFootball||x(s),f=(e,t)=>{var s,i,a,l,n;return!!e.value&&null!=(s=t.statistics)&&!!s[e.value]||!!e.secondaryValue&&null!=(i=t.statistics)&&!!i[e.secondaryValue]||!!e.madesValue&&null!=(a=t.statistics)&&!!a[e.madesValue]||!!e.attemptsValue&&null!=(l=t.statistics)&&!!l[e.attemptsValue]||e.replacementValue&&!!(null==(n=t.statistics)?void 0:n[e.replacementValue])},m=(e,t,s)=>s===u.QCR.AmericanFootball?Object.keys(e).filter(s=>e[s].find(e=>!!t.left.players.find(t=>f(e,t))||!!t.right.players.find(t=>f(e,t)))):Object.keys(e),y=e=>{let t={};return Object.keys(e).forEach(s=>{t[s]={stat:e[s],dir:p.U.DESC}}),t};var j=s(16620),v=s(40237),b=s(90248),_=s(69559),w=s(54409),C=s(35474),k=s(70591),M=s(94493),S=s(24159),A=s(54917),P=s(85306);let H=e=>{let{teamId:t,teamName:s}=e;return(0,i.jsx)(n.XI.Cell,{children:(0,i.jsx)(l.az,{py:"xs",px:"sm",children:(0,i.jsx)(v.p,{id:t,name:s,size:24})})})},I=e=>{let{player:t,onClick:s}=e,r=(0,_.o)(),o=r===u.QCR.Basketball&&!!t.ejected;return(0,i.jsx)(n.XI.Cell,{children:(0,i.jsx)(k.uc,{player:t,onClick:e=>s(e,t),sportSlug:r,children:(0,i.jsxs)(l.so,{direction:"column",py:"sm",px:"lg",align:"flex-start",children:[(0,i.jsx)(a.EY,{textStyle:"body.small",_hover:{color:"primary.default"},children:(0,i.jsx)(S.c,{entity:t})}),o&&(0,i.jsx)(l.so,{bg:"status.error.default",display:"inline-flex",h:"md",align:"center",br:"md",px:"sm",children:(0,i.jsx)(a.EY,{textStyle:"assistive.micro",color:"surface.s1",children:(0,i.jsx)(b.A,{id:"basketball_player_ejected_long"})})})]})})})},z=e=>{let{statistic:t,isSortBy:s,position:r}=e,o=t.configStatsKey.replacementValue,c=o&&"number"==typeof t.stats[o]?o:t.configStatsKey.value,d=(0,C.Rs)(t.stats,t.configStatsKey);return(0,i.jsxs)(n.XI.Cell,{style:{position:"relative",whiteSpace:"nowrap"},children:[(0,i.jsx)(l.az,{position:"absolute",top:"0",left:"0",w:"100%",h:"100%",bg:s?"surface.s2":void 0}),(0,i.jsx)(a.EY,{py:"sm",px:"lg",textStyle:"body.small",textAlign:"center",display:"block",position:"relative",children:c===P.K.ExpectedGoals?(0,i.jsx)(i.Fragment,{children:d||"-"}):c===P.K.Rating?(0,i.jsx)(l.so,{justify:"center",children:(0,i.jsx)(v.G,{rating:t.stats[c]})}):c===P.K.Position?r?(0,i.jsx)(A.F,{id:r,short:!0}):"-":c!==P.K.Notes?d:d.split("\n").map(e=>e.length?(0,i.jsx)("div",{children:e},e):null)})]})},T=e=>{let{filteredTeamId:t,onFilterClick:s,leftTeam:r,rightTeam:o}=e;return(0,i.jsx)(n.XI.HeadCell,{w:170,maxW:170,minW:160,children:(0,i.jsxs)(l.so,{py:"md",px:"sm",gap:"sm",align:"center",justify:"center",children:[(0,i.jsxs)(l.az,{minW:"fit",p:"xs",br:"[20px]",border:t?"none":"primary.highlight",bg:t?"surface.s2":"primary.highlight",onClick:()=>s(void 0),cursor:"pointer",children:[(0,i.jsx)(v.p,{id:r.id,name:r.name,size:24,style:{verticalAlign:"top"}}),(0,i.jsx)(a.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mx:"xs",children:"+"}),(0,i.jsx)(v.p,{id:o.id,name:o.name,size:24,style:{verticalAlign:"top"}})]}),(0,i.jsx)(l.az,{p:"xs",br:"50%",border:t===r.id?"primary.highlight":"none",bg:t===r.id?"primary.highlight":"surface.s2",onClick:()=>s(r.id),cursor:"pointer",children:(0,i.jsx)(v.p,{id:r.id,name:r.name,size:24,style:{verticalAlign:"top"}})}),(0,i.jsx)(l.az,{p:"xs",br:"50%",border:t===o.id?"primary.highlight":"none",bg:t===o.id?"primary.highlight":"surface.s2",onClick:()=>s(o.id),cursor:"pointer",children:(0,i.jsx)(v.p,{id:o.id,name:o.name,size:24,style:{verticalAlign:"top"}})})]})})},R=e=>{let{statistic:t,sortConfig:s,onColumnClick:r,sport:o}=e,c=t.configStatsKey.replacementValue,d="";d=c&&"number"==typeof t.stats[c]?c:t.configStatsKey.value;let h=s.stat.value===t.configStatsKey.value,x=h&&s.dir===p.U.ASC,g=d===P.K.Notes;return(0,i.jsx)(n.XI.HeadCell,{onClick:()=>{d!==P.K.Notes&&r(t.configStatsKey)},style:{position:"relative"},children:(0,i.jsxs)(l.az,{minW:g?"[124px]":o===u.QCR.AmericanFootball?"[100px]":void 0,p:"xs",textAlign:"center",cursor:g?"default":"pointer",children:[(0,i.jsx)(l.so,{position:"absolute",top:"0",left:"0",w:"100%",h:"100%",bg:h?"surface.s2":void 0}),(0,i.jsx)(l.ov,{minH:"2xl",position:"relative",children:(0,i.jsx)(a.EY,{textStyle:"body.small",color:"neutrals.nLv3",textAlign:"center",children:(0,i.jsx)(M.w,{id:d})})}),(0,i.jsx)(w.Bfd,{fill:g?"transparent":h?"primary.default":"onSurface.nLv4",style:{transition:"transform 0.3s ease-in-out",transform:" rotate(".concat(180*!!x,"deg)")}})]})})};var V=s(947),O=s(99586),E=s(50677),L=s(27892),G=s(4967);let F=(e,t,s)=>{let i=[];for(let a of e.players){let l=[];for(let s of t){let{statistics:t}=a;if(!e.players.every(e=>{var t;return!s.textualDescription&&!(null==(t=e.statistics)?void 0:t[s.value])&&s.hideIfNone})&&t){let e={stats:{},configStatsKey:{...s}};if(e.stats[s.value]=s.value in t?t[s.value]:0,"minutesPlayed"===s.value&&"number"==typeof e.stats[s.value]&&(e.stats[s.value]="".concat(e.stats[s.value],"'")),s.secondaryValue&&(e.stats[s.secondaryValue]=s.secondaryValue in t?t[s.secondaryValue]:0),s.madesValue&&(e.stats[s.madesValue]=s.madesValue in t?t[s.madesValue]:0),s.attemptsValue&&(e.stats[s.attemptsValue]=s.attemptsValue in t?t[s.attemptsValue]:0),s.textualDescription){let i=Object.keys(s.textualDescription),a={};for(let e of i)a[e]=Number(t[e]||0);e.stats[s.value]=a}s.replacementValue&&"number"==typeof t[s.replacementValue]&&(e.stats[s.replacementValue]=t[s.replacementValue]),l.push(e)}}i.push({player:{...a.player,...s(a.player.id),position:a.position,ejected:a.ejected},statistics:l})}return i},N=(e,t)=>{let s={};for(let i of e)if(i.statistics){if((t===u.QCR.Football||t===u.QCR.Basketball)&&!("minutesPlayed"in i.statistics)&&!("secondsPlayed"in i.statistics))continue;let e=Number(i.statistics.totalClearance||0)+Number(i.statistics.outfielderBlock||0)+Number(i.statistics.interceptionWon||0)+Number(i.statistics.totalTackle||0),a=Number(i.statistics.duelWon||0)+Number(i.statistics.duelLost||0),l=Number(i.statistics.aerialWon||0)+Number(i.statistics.aerialLost||0),n=a-l,r=i.statistics.aerialWon||a-n-Number(i.statistics.aerialLost||0),o=i.statistics.groundWon||Number(i.statistics.duelWon)-Number(r),c=Number(i.statistics.faceOffTaken||0),d=Number(i.statistics.kickingFgAttempts||0),p=i.statistics.minutesPlayed,h="-";!p&&i.statistics.secondsPlayed&&(t===u.QCR.IceHockey?h=(0,G.OV)(Number(i.statistics.secondsPlayed)):p=Math.floor(Number(i.statistics.secondsPlayed)/60));let x=0;"number"==typeof i.statistics.saves&&"number"==typeof i.statistics.gkShots&&i.statistics.gkShots>0&&(x=Number(i.statistics.saves)/Number(i.statistics.gkShots)*100),"number"==typeof i.statistics.saves&&"number"==typeof i.statistics.shotsAgainst&&i.statistics.shotsAgainst>0&&(x=Number(i.statistics.saves)/Number(i.statistics.shotsAgainst)*100);let g=0;"number"==typeof i.statistics.goals&&"number"==typeof i.statistics.shotsTaken&&i.statistics.shotsTaken>0&&(g=Number(i.statistics.goals)/Number(i.statistics.shotsTaken)*100);let f=0;(0,C.Kk)(i.statistics)&&(f=(0,C.C2)(i.statistics)),s[i.player.id]={...i,statistics:{...i.statistics,totalDefensiveActions:e,totalDuels:a,totalAerialDuels:l,totalGroundDuels:n,aerialWon:r,groundWon:o,duelWon:i.statistics.duelWon||0,minutesPlayed:p,timeOnIce:h,faceOffTakenOnly:c,kickingFg:d,goalkeeperEfficiencyPercentage:x,shotAccuracy:g,position:i.position||0,passingRating:f}}}return s},B=(e,t,s)=>{for(let i of e.statistics)if(i.configStatsKey.textualDescription)for(let e of Object.keys(i.configStatsKey.textualDescription))i.configStatsKey.textualDescription[e]=t.formatMessage({id:(0,L.O)(E,e,s)});return e},Z=(e,t,s,i,a,l)=>{let{event:n,leftTeam:c,rightTeam:d}=(0,r.useContext)(o.y$),u=(0,V.A)(),p=n.tournament.category.sport.slug,h={},x={},f=(e,t)=>{l&&l!==t.id||(h[e.player.id]={teamId:t.id,teamName:t.name},x[e.player.id]=e)};i.left.players.forEach(e=>f(e,c)),i.right.players.forEach(e=>f(e,d));let m=N(Object.values(x),p);return F({players:Object.values((0,O.C)(m,e,a,p))},s,e=>h[e]).filter(e=>g(t,p,e)).map(e=>B(e,u,p))};var D=s(71046);let Y=e=>{let{sortConfig:t,updateSortStatistic:s,filteredTeamId:a,onFilterClick:c,defaultSortStat:d,stats:u,lineups:h,groupName:x}=e,{event:g,leftTeam:f,rightTeam:m}=(0,r.useContext)(o.y$),{openEventPlayerStatistics:y}=(0,j.d)(),v=(e,t)=>{e.preventDefault(),g.hasEventPlayerStatistics&&y({event:g,player:t},p._.PlayerStats)},b=Z(t,x,u,h,d,a);return b.length?(0,i.jsxs)(n.XI,{w:"100%",children:[(0,i.jsx)(n.XI.Head,{children:(0,i.jsxs)(n.XI.Row,{children:[(0,i.jsx)(n.XI.HeadCell,{maxW:40,w:40,children:(0,i.jsx)(l.az,{w:"3xl",h:"xl"})}),(0,i.jsx)(T,{filteredTeamId:a,onFilterClick:c,leftTeam:f,rightTeam:m}),b[0].statistics.map(e=>(0,i.jsx)(R,{sport:(0,D.c5)(g),statistic:e,sortConfig:t,onColumnClick:()=>s(e.configStatsKey,x)},e.configStatsKey.value))]})}),(0,i.jsx)(n.XI.Body,{children:b.map(e=>(0,i.jsxs)(n.XI.Row,{children:[(0,i.jsx)(H,{teamId:e.player.teamId,teamName:e.player.teamName}),(0,i.jsx)(I,{player:e.player,onClick:v}),e.statistics.map(s=>(0,i.jsx)(z,{statistic:s,isSortBy:s.configStatsKey.value===t.stat.value,position:e.player.position},s.configStatsKey.value))]},e.player.id))})]}):null};var U=s(71306);let W=(e,t)=>{let s=(0,r.useMemo)(()=>{let s={};return Object.keys(h.Oi[e]).forEach(i=>{let a=h.Oi[e][i];s[i]=t[i].find(e=>e.value===a)||t[i][0]}),s},[e]),[i,a]=(0,r.useState)(()=>y(s));return{defaultSorts:s,sortConfigs:i,updateSortStatistic:(e,t)=>{a(s=>({...s,[t]:(0,U.I)(s[t],e)}))}}},Q=e=>{let{lineups:t}=e,s=(0,r.useContext)(o.Ws),u=(0,c.nm)(s),p=m(u,t,s),[h,x]=(0,r.useState)(p[0]),[g,f]=(0,r.useState)(),{defaultSorts:y,sortConfigs:j,updateSortStatistic:v}=W(s,u),b=(0,r.useCallback)(e=>f(e),[]);return p?(0,i.jsxs)(n.tU,{variant:"tertiary",initialValue:0,value:h||0,onChange:e=>x(e),children:[(0,i.jsx)(l.so,{px:"lg",pt:"sm",mb:"sm",align:"center",rowGap:"xs",wrap:"wrap",children:p.map(e=>(0,i.jsx)(n.tU.Tab,{ml:0,mr:"xs",mb:"sm",tabKey:e,children:(0,i.jsx)(a.EY,{textStyle:"assistive.default",textTransform:"capitalize",children:(0,i.jsx)(d.R,{id:e})})},e))}),p.map(e=>(0,i.jsx)(n.tU.Panel,{tabKey:e,children:(0,i.jsx)(l.az,{pb:"lg",children:(0,i.jsx)(l.az,{overflowX:"auto",children:(0,i.jsx)(Y,{sortConfig:j[e],updateSortStatistic:v,defaultSortStat:y[e],filteredTeamId:g,onFilterClick:b,stats:u[e],lineups:t,groupName:e})})})},e))]}):null}},22835:(e,t,s)=>{s.d(t,{M:()=>r});var i=s(21377),a=s(4967),l=s(52839),n=s(86679);let r=e=>{let t=t=>e.status.type===i.XUj.NotStarted&&e.season&&e.tournament.uniqueTournament&&e.seasonStatisticsType&&l.u.includes(e.tournament.category.sport.slug)?i.cWY.topPlayers(t,e.tournament.uniqueTournament.id,e.season.id,e.seasonStatisticsType):void 0,s=t(e.homeTeam.id),r=t(e.awayTeam.id),{hasHome:o,hasAway:c}=(0,n.A)({hasHome:{route:t(e.homeTeam.id),skipCheck:!s,deduplicationInterval:15*a.pY},hasAway:{route:t(e.awayTeam.id),skipCheck:!r,deduplicationInterval:15*a.pY}},[s,r]);return{hasPregameTopPlayers:!!o&&!!c,couldHavePregameTopPlayers:!1!==o&&!1!==c&&!!s&&!!r}}},23695:(e,t,s)=>{s.d(t,{K:()=>N});var i=s(6029),a=s(32523),l=s(21377),n=s(4967),r=s(44194),o=s(99064),c=s(55729),d=s(90248),u=s(45860),p=s(65789),h=s(62859),x=s(54409),g=s(7263),f=s(76356),m=s(28446),y=s(90112),j=s(9127),v=s(8703),b=s(67717),_=s(65078),w=s(44259);function C(e){let{selectedPlayer:t,setSelectedPlayer:s,showSubstitutes:a,substitutionIds:l,setShowSubstitutes:n,selectedSide:u,players:p}=e,{event:x}=(0,c.useContext)(h.y$),g=Array.from(l).reduce((e,t)=>{let s=p.find(e=>e.player.id===t);return s?[...e,s]:e},[]),f=(null==t?void 0:t.id)&&l.has(t.id);return(0,c.useEffect)(()=>{f&&!a&&n(!0)},[t]),(0,i.jsxs)(o.so,{br:"24",h:"92",mb:"xs",align:"flex-start",direction:"column",children:[(0,i.jsx)(o.Sc,{px:"lg",name:"showSubstitutes-".concat(x.id),onChange:e=>{let t=e.currentTarget.checked;n(t),(!t&&f||t&&!f)&&s(void 0)},checked:a,style:{overflow:"hidden"},boxColor:"onColor.primary",children:(0,i.jsx)(o.EY,{color:"onColor.primary",children:(0,i.jsx)(d.A,{id:"show_substitutions"})})}),(0,i.jsx)(r.tR,{buttonStyle:"clipped",colorPalette:"primary",children:(0,i.jsx)(o.so,{px:"lg",w:"fit-content",align:"center",h:44,children:(0,i.jsx)(y.N,{initial:!1,children:g.map(e=>{let{player:a,jersey:l,fillColor:n,numberColor:r,hasLowPoints:c}=e;return(0,i.jsx)(j.m.div,{initial:{opacity:0},animate:{opacity:(0,w.cl)(c,!!t,(null==t?void 0:t.id)===a.id)},exit:{opacity:0},transition:{duration:.2},onClick:()=>s(a),style:{cursor:"pointer"},children:(0,i.jsx)(o.so,{align:"center",p:"xs",w:"32",h:"32",br:"50%",ml:"xs",textAlign:"center",justify:"center",bg:n,style:{pointerEvents:"none",userSelect:"none"},children:(0,i.jsx)(o.EY,{font:"display.medium",color:r,children:l})})},a.id)})},u)})})]})}var k=s(10292),M=s(24159);function S(e){let{selectedPlayer:t,players:s,setSelectedPlayer:a}=e;return t?(0,i.jsx)(o.so,{position:"absolute",justify:"center",w:"100%",bottom:0,children:(0,i.jsxs)(o.so,{br:"xl",h:"48",mb:"xs",mx:"sm",bg:"surface.sp",py:"sm",pl:"xs",pr:"md",w:"100%",maxW:344,align:"center",justify:"space-between",onClick:()=>a(void 0),cursor:"pointer",children:[(0,i.jsxs)(o.so,{align:"center",children:[(0,i.jsx)(k.t,{size:40,id:t.id}),(0,i.jsxs)(o.az,{pl:"md",children:[(0,i.jsx)(o.EY,{block:!0,font:"display.medium",color:"onSurface.nLv1",children:(0,i.jsx)(M.c,{entity:t})}),s.find(e=>{let{player:s,hasLowPoints:i}=e;return s.id===t.id&&i})&&(0,i.jsx)(o.EY,{font:"assistive.default",color:"onSurface.nLv3",mt:"xxs",children:(0,i.jsx)(d.A,{id:"low_player_involvement"})})]})]}),(0,i.jsx)(o.$n,{w:"36",h:"36",p:"0",variant:"unshielded",children:(0,i.jsx)(x.zQC,{icon:"close",fill:"onSurface.nLv1"})})]})}):null}var A=s(41735),P=s(5961),H=s(94497);let I=(0,A.default)(o.az).withConfig({componentId:"sc-c80beed2-0"})(["canvas{transform:",";animation:"," 200ms ease-in-out 1;}"],e=>"rotate(-90deg) translate(-70px, ".concat(e.xTranslate,") scale(1, -1)"),H.qG),z={WIDTH:280,HEIGHT:420},T=e=>{let{heatmap:t,heatmapTransform:s,eventId:a,theme:l,isLineupsBackground:n}=e,o="".concat(a,"-avg-positions"),{textDirection:d}=(0,r.$c)();return((0,c.useEffect)(()=>{t&&(0,P.IJ)(t,{containerId:o,width:z.HEIGHT-16,height:z.WIDTH-16},l,n)},[t,o]),t)?(0,i.jsx)(I,{id:o,position:"absolute",w:z.WIDTH-16,h:z.HEIGHT-16,top:"sm",left:"sm",xTranslate:"rtl"===d?"70px":"-70px",style:{transform:s,overflow:"hidden"}}):null},R=e=>{let{eventId:t,heatmap:s,heatmapTransform:a,children:l,isLineupsBackground:n,...r}=e,c=(0,A.useTheme)(),d=c.colors;return(0,i.jsxs)(o.az,{position:"relative",m:"auto",w:z.WIDTH,h:z.HEIGHT,children:[(0,i.jsx)("svg",{style:{position:"absolute",top:0,left:0},width:z.WIDTH,height:z.HEIGHT,viewBox:"0 0 ".concat(z.WIDTH," ").concat(z.HEIGHT),xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,i.jsx)("rect",{fill:d.graphicsTerrain.footballLineups,width:z.WIDTH,height:z.HEIGHT,rx:"4"})})}),(0,i.jsx)(T,{heatmap:s,heatmapTransform:a,theme:c,eventId:t,isLineupsBackground:n}),(0,i.jsx)("svg",{style:{position:"absolute",top:0,left:0},width:z.WIDTH,height:z.HEIGHT,viewBox:"0 0 ".concat(z.WIDTH," ").concat(z.HEIGHT),xmlns:"http://www.w3.org/2000/svg",...r,children:(0,i.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round",d:"M9.333 9.333h261.333V210H9.333z"}),(0,i.jsx)("path",{d:"M168 210c0-15.464-12.536-28-28-28s-28 12.536-28 28M72.333 9.333h135.333V70H72.333zM116.667 70c.365.655.752 1.295 1.164 1.915C122.693 79.216 130.809 84 140 84c9.195 0 17.315-4.787 22.175-12.095A28.66 28.66 0 0 0 163.333 70",stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round"}),(0,i.jsx)("path",{stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round",d:"M107.333 9.333h65.333V28h-65.333z"}),(0,i.jsx)("circle",{cx:"2.333",cy:"2.333",r:"2.333",transform:"translate(137.667 51.333)",fill:d.onColor.primary}),(0,i.jsx)("path",{d:"M9.333 18.667a9.333 9.333 0 0 0 9.334-9.334M261.333 9.333a9.333 9.333 0 0 0 9.334 9.334",stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round"}),(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round",d:"M9.333 410.667h261.333V210H9.333z"}),(0,i.jsx)("path",{d:"M168 210c0 15.464-12.536 28-28 28s-28-12.536-28-28M72.333 410.667h135.333V350H72.333zM116.667 350c.365-.655.752-1.295 1.164-1.915C122.693 340.784 130.809 336 140 336c9.195 0 17.315 4.787 22.175 12.095.41.618.795 1.254 1.158 1.905",stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round"}),(0,i.jsx)("path",{stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round",d:"M107.333 410.667h65.333V392h-65.333z"}),(0,i.jsx)("circle",{cx:"2.333",cy:"2.333",r:"2.333",transform:"matrix(1 0 0 -1 137.667 368.667)",fill:d.onColor.primary}),(0,i.jsx)("path",{d:"M9.333 401.333a9.333 9.333 0 0 1 9.334 9.334M261.333 410.667a9.333 9.333 0 0 1 9.334-9.334",stroke:d.onColor.primary,strokeWidth:"2",strokeLinejoin:"round"})]}),(0,i.jsx)("g",{children:l})]})})})]})};var V=s(54863);let O=(0,f.I4)("div",{base:{position:"absolute",top:"[43px]",borderStart:"{sizes.md} solid transparent",borderEnd:"{sizes.md} solid transparent",borderBottom:"{sizes.sm} solid",borderBottomColor:"graphics.terrain.footballLineups"}}),E={left:{group:void 0,text:(0,w.$8)()?"translate(0 4)":void 0,heatmap:"scale(1, -1)"},right:{group:"matrix(-1 0 0 -1 0 0), translate(-".concat(z.WIDTH," -").concat(z.HEIGHT,")"),text:"scale(-1 -1) ".concat((0,w.$8)()?"translate(0 4)":""),heatmap:"scale(-1, 1)"}},L=(0,m.A)().domain([0,100]).range([8,z.WIDTH-8]),G=(0,m.A)().domain([0,100]).range([8,z.HEIGHT-8]);function F(){let{event:e,location:t}=(0,c.useContext)(h.y$),[s,n]=(0,c.useState)(l.cxP.Left),[r,o]=(0,c.useState)(!1),[d,p]=(0,c.useState)(void 0),[{group:x,text:g,heatmap:m},k]=(0,c.useState)(E[s]),M=t===h.cb.Widget,{data:A,error:P}=(0,u.Ay)(l.bnp.averagePositions(e.id),(0,v.rf)(e)),{data:H}=(0,u.Ay)(d?l.bnp.playerHeatmap(e.id,d.id):null),[I,z]=(0,_.jr)(A,"home","away"),{lineups:T,error:F}=(0,V.Ir)();(0,c.useLayoutEffect)(()=>{k(E[s]),p(void 0),o(!1)},[s]);let N="left"===s?I:z;if(!A)return(0,i.jsx)(a.E,{uniqueKey:"average-position-cl",br:"lg",h:"420"});if(P||F)return null;let B={in:new Set,out:new Set},Z=A.substitutions.sort((e,t)=>{var s,i;return(null!=(s=e.time)?s:0)-(null!=(i=t.time)?i:0)});for(let e=0;e({x:L(e.averageY),y:G(e.averageX),jersey:D[s].get(e.player.id),player:e.player,hasLowPoints:(0,w.XU)(e.pointsCount),...(0,w.jM)(e.player,null==T?void 0:T[s])}))),U=e=>()=>{(null==d?void 0:d.id)===e.id?p(void 0):p(e)};return(0,i.jsxs)(f.az,{children:[(0,i.jsxs)(f.so,{w:"100%",gap:"sm",align:"center",justify:"center",position:"relative",children:[(0,i.jsx)(b.n,{w:"100%",p:"sm",gap:"sm",activeTeam:s,onTeamClick:n,isBackgroundInverse:M}),s===l.cxP.Left?(0,i.jsx)(O,{left:"[calc(25% - 10px)]"}):(0,i.jsx)(O,{right:"[calc(25% - 10px)]"})]}),(0,i.jsxs)(f.az,{position:["initial","relative"],bg:"graphics.terrain.footballLineups",m:"auto",textAlign:"center",pt:"sm",pb:"4xl",children:[(0,i.jsx)(C,{selectedPlayer:d,setSelectedPlayer:p,substitutionIds:B.in,showSubstitutes:r,setShowSubstitutes:o,selectedSide:s,players:Y}),(0,i.jsx)(f.az,{position:"relative",children:(0,i.jsx)(R,{eventId:e.id,heatmap:null==H?void 0:H.heatmap,heatmapTransform:m,isLineupsBackground:!0,children:(0,i.jsx)("g",{transform:x,textAnchor:"middle",fontSize:"16px",fontWeight:"700",fontFamily:"'Sofascore Sans', sans-serif",children:(0,i.jsxs)(y.N,{children:[(0,i.jsxs)(j.m.g,{fill:"white",initial:{opacity:0},animate:{opacity:.5},transform:"translate(136 136)",children:[(0,i.jsx)("rect",{width:"8",height:"116"}),(0,i.jsx)("path",{d:"M16 8 4 16V0zM0 6h4v4H0z",transform:"translate(0 116), rotate(90), scale(2)",style:{transformOrigin:"4px 8px"}})]},s),Y.map(e=>{let{x:t,y:s,player:a,fillColor:l,hasLowPoints:n}=e;return(r?B.out.has(a.id):B.in.has(a.id))?null:(0,i.jsx)(j.m.circle,{initial:{opacity:0,r:0},animate:{opacity:(0,w.cl)(n,!!d,a.id===(null==d?void 0:d.id)),r:16},transition:r&&!d?{delay:.2}:void 0,fill:l,cx:t,cy:s,style:{cursor:"pointer"},onClick:U(a)},a.id+"circle")}),Y.map(e=>{let{x:t,y:s,player:a,jersey:l,numberColor:n,hasLowPoints:o}=e;return(r?B.out.has(a.id):B.in.has(a.id))?null:(0,i.jsx)(j.m.text,{initial:{opacity:0},animate:{opacity:(0,w.cl)(o,!!d,a.id===(null==d?void 0:d.id))},transition:r&&!d?{delay:.2}:void 0,x:t,y:s+1,style:{transformOrigin:"".concat(t,"px ").concat(s,"px"),zIndex:1,cursor:"pointer"},transform:g,fill:n,alignmentBaseline:"middle",onClick:U(a),children:l},a.id+"txt")})]})})})}),(0,i.jsx)(S,{selectedPlayer:d,setSelectedPlayer:p,players:Y})]})]})}function N(){let{event:e,location:t}=(0,c.useContext)(h.y$),[s,f]=(0,c.useState)(!1),{isDesktop:m}=(0,r.$c)(),{data:y}=(0,u.Ay)([l.bnp.averagePositions(e.id),"HEAD"],{fetcher:g.n}),j=25>(0,n.Ui)(Date.now(),e.startTimestamp,"minutes"),v=m&&t===h.cb.EventPage,b=v||j,_=!1;return(y?_=!0:e.status.type===l.XUj.InProgress&&(_=j&&1===e.detailId),_)?(0,i.jsxs)(p.Zp,{isInverseDesktop:!0,children:[b&&(0,i.jsxs)(o.so,{onClick:()=>{j||f(!s)},align:"center",cursor:j?"default":"pointer",hoverBg:j?void 0:"surface.s0",br:"lg",p:"md",children:[(0,i.jsx)(o.az,{mr:"md",h:"32",w:"24",children:(0,i.jsx)(x.uEu,{fill:"graphicsTerrain.football"})}),(0,i.jsxs)(o.so,{direction:"column",children:[(0,i.jsx)(o.EY,{font:"display.small",color:"primary.default",children:(0,i.jsx)(d.A,{id:"players_average_positions"})}),j&&(0,i.jsx)(o.EY,{mt:"xxs",font:"assistive.default",color:"onSurface.nLv3",children:(0,i.jsx)(d.A,{id:"average_positions_available_when"})})]})]}),j?null:v?(0,i.jsxs)(o.aF,{isOpen:s,onClose:()=>f(!1),w:"400",children:[(0,i.jsx)(o.EY,{as:"h3",align:"center",font:"display.large",color:"onSurface.nLv1",mb:"md",children:(0,i.jsx)(d.A,{id:"players_average_positions"})}),(0,i.jsx)(o.az,{br:"lg",overflow:"hidden",children:(0,i.jsx)(F,{})})]}):(0,i.jsxs)(o.az,{children:[(0,i.jsx)(o.EY,{as:"h3",align:"center",font:"display.large",color:"onSurface.nLv1",mb:0,children:(0,i.jsx)(d.A,{id:"players_average_positions"})}),(0,i.jsx)(o.az,{br:"0 0 lg lg",overflow:"hidden",children:(0,i.jsx)(F,{})})]})]}):void 0===y&&1===e.detailId&&e.status.type!==l.XUj.NotStarted?(0,i.jsx)(o.az,{children:(0,i.jsx)(a.E,{uniqueKey:"average-position-container-cl",h:56})}):null}},24985:(e,t,s)=>{s.d(t,{Vj:()=>a.A,g9:()=>i.g9,Ir:()=>l.Ir});var i=s(12785);s(75318),s(23695),s(31130),s(61777);var a=s(27778),l=s(54863);s(55529)},25635:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(64082),a=s(6029),l=s(21377),n=s(99064);function r(e){var{id:t,name:s,size:r=56,placeholder:o="/static/images/placeholders/manager.svg",style:c,className:d,grayscale:u}=e,p=(0,i.T)(e,["id","name","size","placeholder","style","className","grayscale"]);let h=p.w||p.width||r,x=p.h||p.height||r;return(0,a.jsx)(n._V,Object.assign({fallback:(0,a.jsx)(n._V,{br:"50%",style:c,w:h,h:x,src:o,alt:s}),src:t?l.ql2.image(t):"",alt:s,w:h,h:x,br:"50%",style:c,className:d,isGrayscale:u},p))}},27778:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(6029),a=s(21377),l=s(44194),n=s(21501),r=s(99064),o=s(55729),c=s(65789),d=s(62859),u=s(69559),p=s(56008),h=s(22835);function x(){let e=(0,u.o)(),{event:t,location:s,initialHasLineups:x}=(0,o.useContext)(d.y$),{couldHavePregameTopPlayers:g}=(0,h.M)(t),{isDesktop:f}=(0,l.$c)(),m=f&&s===d.cb.EventPage,y=(0,n.hX)();return e!==a.QCR.Football&&g?(0,i.jsx)(p.A,{}):y&&!x?null:m?(0,i.jsx)(c.Zp,{children:(0,i.jsxs)(r.az,{display:["none","block"],children:[(0,i.jsx)(r.az,{h:46}),(0,i.jsx)(r.az,{h:48}),(0,i.jsxs)(r.so,{pb:"sm",px:"sm",gap:"sm",children:[(0,i.jsx)(r.az,{h:72,w:"50%",bg:"surface.s2",br:"lg"}),(0,i.jsx)(r.az,{h:72,w:"50%",bg:"surface.s2",br:"lg"})]}),(0,i.jsx)(r.az,{h:432,bg:"surface.s2",mx:"sm"}),(0,i.jsx)(r.az,{h:56,m:"sm",bg:"surface.s2",br:"lg"}),(0,i.jsx)(r.az,{h:240})]})}):(0,i.jsx)(r.az,{display:["block","none"],h:946})}},30182:(e,t,s)=>{s.d(t,{m:()=>g});var i=s(6029),a=s(10292),l=s(44194),n=s(76356),r=s(55729),o=s(65789),c=s(5276),d=s(70591),u=s(24159),p=s(41078);function h(e){let{missingPlayer:t,left:s,first:r}=e;return t?(0,i.jsxs)(n.so,{h:"5xl",w:"100%",align:"center",direction:s?"row":"row-reverse",gap:"lg",overflow:"hidden",pl:s?"lg":void 0,pr:s?void 0:"lg",cursor:"pointer",_hover:{bg:"surface.s2"},children:[(0,i.jsx)(a.t,{size:40,id:t.player.id,style:{display:"block"}}),(0,i.jsxs)(n.so,{overflow:"hidden",direction:"column",justify:"center",align:s?"flex-start":"flex-end",gap:"xs",children:[(0,i.jsx)(l.EY,{children:(0,i.jsx)(u.c,{entity:t.player,short:!0})}),(0,i.jsx)(c.Ck,{missingPlayer:t})]})]}):r?(0,i.jsx)(p.A,{messageId:"no_missing_players",isInverted:!s}):null}function x(e){let{home:t,away:s,first:a}=e,l=(null==t?void 0:t.player)?d.uc:r.Fragment,o=(null==s?void 0:s.player)?d.uc:r.Fragment;return(0,i.jsxs)(n.so,{justify:t||a?"space-between":"flex-end",children:[(0,i.jsx)(l,{player:null==t?void 0:t.player,style:{width:"50%"},children:(0,i.jsx)(h,{missingPlayer:t,first:!!a,left:!0})}),(0,i.jsx)(o,{player:null==s?void 0:s.player,style:{width:"50%"},children:(0,i.jsx)(h,{missingPlayer:s,first:!!a})})]})}function g(e){let{home:t,away:s}=e;if(void 0===t&&void 0===s)return null;let a=Math.max((null==t?void 0:t.length)||0,(null==s?void 0:s.length)||0);return(0,i.jsxs)(o.Zp,{children:[(0,i.jsx)(o.Zp.Header,{titleId:"injuries_and_suspensions"}),Array.from({length:a}).map((e,a)=>{var l,n,r,o;return(0,i.jsx)(x,{home:null==t?void 0:t[a],away:null==s?void 0:s[a],first:0===a},"".concat(null==t||null==(n=t[a])||null==(l=n.player)?void 0:l.id).concat(null==s||null==(o=s[a])||null==(r=o.player)?void 0:r.id))}),(0,i.jsx)(o.Zp.Footer,{})]})}},30971:(e,t,s)=>{s.d(t,{A:()=>d});var i=s(6029),a=s(87827),l=s(21377),n=s(4967),r=s(95543),o=s(52854);function c(e){let t="rtl"===document.dir;if(100===e||1===e)return"1.00";let s=e<1?e:(0,r.M)(e/100,3),i="".concat(s).substring(1).padEnd(4,"0");return t?i.replace(".","").padEnd(4,"."):i}let d=function(e){var t,s,d,u,p;let{stat:h,sport:x}=e,{selectedStat:g}=e;switch(g=g.split(o.I)[0],x){case l.QCR.Football:return"rating"===(t=g)?(0,i.jsx)(a.G,{format:"sideBox",rating:h[t]}):"accuratePasses"===t?"".concat((0,r.M)(h.accuratePasses/h.appearances,1)," (").concat((0,r.M)(h.accuratePassesPercentage),"%)"):"successfulDribbles"===t?"".concat((0,r.M)(h.successfulDribbles/h.appearances,1)," (").concat((0,r.M)(h.successfulDribblesPercentage),"%)"):"penaltyGoals"===t?h.penaltiesTaken?"".concat(h.penaltyGoals," / ").concat(h.penaltiesTaken):h.penaltyGoals:"freeKickGoal"===t?"".concat(h.freeKickGoal," / ").concat(h.shotFromSetPiece):"scoringFrequency"===t?(0,r.M)(h[t]):"totalShots"===t?"".concat((0,r.M)(h.totalShots/h.appearances,1)):"shotsOnTarget"===t?"".concat((0,r.M)(h.shotsOnTarget/h.appearances,1)):"keyPasses"===t?(0,r.M)(h.keyPasses/h.appearances,1):"accurateLongBalls"===t?(0,r.M)(h.accurateLongBalls/h.appearances,1):"tackles"===t?(0,r.M)(h.tackles/h.appearances,1):"interceptions"===t?(0,r.M)(h.interceptions/h.appearances,1):"possessionLost"===t?(0,r.M)(h.possessionLost/h.appearances,1):"saves"===t?(0,r.M)(h.saves/h.appearances,1):"mostConceded"===t||"leastConceded"===t?(0,r.M)(h.goalsConceded/h.appearances,1):"clearances"===t?(0,r.M)(h.clearances/h.appearances,1):"expectedGoals"===t?"".concat((0,r.M)(h.expectedGoals,2)," (").concat(h.goals,")"):"expectedAssists"===t?"".concat((0,r.M)(h.expectedAssists,2)," (").concat(h.assists||0,")"):"goalsPrevented"===t?"".concat((0,r.M)(h.goalsPrevented,2)):h[t];case l.QCR.Basketball:return"rating"===(s=g)?(0,i.jsx)(a.G,{format:"sideBox",rating:h[s]}):"secondsPlayed"===s?(0,n.OV)(h.secondsPlayed/h.appearances):"fieldGoalsPercentage"===s?"".concat((0,r.M)(h.fieldGoalsPercentage),"% (").concat((0,r.M)(h.fieldGoalsMade/h.appearances,1),")"):"freeThrowsPercentage"===s?"".concat((0,r.M)(h.freeThrowsPercentage),"% (").concat((0,r.M)(h.freeThrowsMade/h.appearances,1),")"):"threePointsPercentage"===s?"".concat((0,r.M)(h.threePointsPercentage),"% (").concat((0,r.M)(h.threePointsMade/h.appearances,1),")"):"points"===s?(0,r.M)(h.points/h.appearances,1):"rebounds"===s?(0,r.M)(h.rebounds/h.appearances,1):"assists"===s?(0,r.M)(h.assists/h.appearances,1):"defensiveRebounds"===s?(0,r.M)(h.defensiveRebounds/h.appearances,1):"offensiveRebounds"===s?(0,r.M)(h.offensiveRebounds/h.appearances,1):"steals"===s?(0,r.M)(h.steals/h.appearances,1):"turnovers"===s?(0,r.M)(h.turnovers/h.appearances,1):"blocks"===s?(0,r.M)(h.blocks/h.appearances,1):"assistTurnoverRatio"===s?(0,r.M)(h.assistTurnoverRatio,2):"plusMinus"===s?(0,r.M)(h.plusMinus/h.appearances,1):"pir"===s?(0,r.M)(h.pir/h.appearances,1):h[s];case l.QCR.IceHockey:return"shotPercentage"===(d=g)?c(h.shotPercentage):"faceOffPercentage"===d?c(h.faceOffPercentage):"timeOnIce"===d?(0,n.OV)(h.timeOnIce/h.appearances):"penaltyMinutes"===d?(0,r.M)(h.penaltyMinutes/h.appearances,1):"savePercentage"===d?c(h.savePercentage):"goalsAgainstAverage"===d?(0,r.M)(h.goalsAgainstAverage,2):"shortHandedSavePercentage"===d?c(h.shortHandedSavePercentage):"powerPlaySavePercentage"===d?c(h.powerPlaySavePercentage):"evenSavePercentage"===d?c(h.evenSavePercentage):h[d];case l.QCR.AmericanFootball:return"passingCompletionPercentage"===(u=g)?"".concat((0,r.M)(h.passingCompletionPercentage),"% (").concat((0,r.M)(h.passingCompletions/h.appearances,1),")"):"kickingFgMade"===u?"".concat(h.kickingFgMade," / ").concat(h.kickingFgAttempts):"defensiveTotalTackles"===u?(0,r.M)(h.defensiveTotalTackles/h.appearances,1):"defensiveSacks"===u?(0,r.M)(h.defensiveSacks,1):"passingTouchdownInterceptionRatio"===u?(0,r.M)(h.passingTouchdownInterceptionRatio,2):"rushingYardsPerAttempt"===u?(0,r.M)(h.rushingYardsPerAttempt,1):"receivingYardsPerReception"===u?(0,r.M)(h.receivingYardsPerReception,1):h[u];case l.QCR.Handball:return"goalkeeperEfficiencyPercentage"===(p=g)?"".concat((0,r.M)(h.goalkeeperEfficiencyPercentage,2),"%"):"goals7m"===p?"".concat(h.goals7m," / ").concat(h.shots7m," (").concat((0,r.M)(h.goals7m/h.shots7m*100),"%)"):"gk7mSaves"===p?"".concat(h.gk7mSaves," / ").concat(h.gk7mShots," (").concat((0,r.M)(h.gk7mSaves/h.gk7mShots*100),"%)"):h[p];default:return h[g]}}},31130:(e,t,s)=>{s.d(t,{A:()=>m});var i=s(6029),a=s(21377),l=s(44194),n=s(99064),r=s(55729),o=s(65789),c=s(62859),d=s(67717),u=s(79853),p=s(54863),h=s(5276),x=s(33243),g=s(5998);function f(){return(0,i.jsx)(n.az,{h:900})}function m(){var e;let{event:t,leftTeam:s,rightTeam:m,location:y}=(0,r.useContext)(c.y$),{managers:j}=(0,u.K)(t),{lineups:v,error:b}=(0,p.Ir)({jerseyStyle:"fancy"}),[_,w]=(0,r.useState)(a.cxP.Left),{isDesktop:C}=(0,l.$c)(),k=C&&y===c.cb.EventPage;if(b)return null;if(!v)return(0,i.jsx)(f,{});let[M,S,A]=_===a.cxP.Left?[s,null==j?void 0:j.leftManager,v.left]:[m,null==j?void 0:j.rightManager,v.right],P=A.players.filter(e=>!e.substitute),H=A.players.filter(e=>e.substitute),I=!!S||A.supportStaff&&(null==(e=A.supportStaff)?void 0:e.length)>0;return(0,i.jsxs)(o.HH,{isCard:k,children:[k&&(0,i.jsx)(o.Zp.Header,{titleId:"squads",as:"h2"}),(0,i.jsx)(n.az,{bg:"surface.s1",w:"100%",position:"sticky",top:[50,0],zIndex:n.Py.Sticky,p:"sm",children:(0,i.jsx)(d.n,{activeTeam:_,onTeamClick:e=>w(e)})}),(0,i.jsxs)(n.so,{direction:"column",p:"sm",gap:"sm",children:[!!P.length&&(0,i.jsxs)(o.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(o.Zp.Header,{titleId:"team_playing_eleven"}),(0,i.jsx)(g.A,{players:P,team:M,event:t,hideTeamHeader:!0,highlightStarters:!1})]}),!!H.length&&(0,i.jsxs)(o.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(o.Zp.Header,{titleId:"rest_of_squad"}),(0,i.jsx)(g.A,{players:H,team:M,event:t,hideTeamHeader:!0})]}),I&&(0,i.jsxs)(o.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(o.Zp.Header,{titleId:"support_staff"}),(0,i.jsx)(x.A,{manager:S,supportStaff:A.supportStaff||[]})]}),!!(v.left.missingPlayers||v.right.missingPlayers)&&(0,i.jsx)(h.Sb,{missingPlayers:A.missingPlayers})]})]})}},32190:(e,t,s)=>{s.d(t,{Et:()=>n.Et,GW:()=>a.A,pY:()=>l.p,tg:()=>i.t});var i=s(91407),a=s(12605),l=s(91603),n=s(19991)},32523:(e,t,s)=>{s.d(t,{E:()=>i.E});var i=s(3881)},33007:(e,t,s)=>{s.r(t),s.d(t,{default:()=>en});var i=s(6029),a=s(32523),l=s(21377),n=s(44194),r=s(76356),o=s(55729),c=s(62859),d=s(44565),u=s(5276),p=s(83260),h=s(73011);let x="HIDDEN_STATISTICS_GROUP",g="DEFAULT_GROUP_NAME",f={"american-football":{passing:"passingCompletions",rushing:"rushingAttempts",receiving:"receivingReceptions",defensive:"defensiveCombineTackles",interceptions:"defensiveInterceptions",fumbles:"fumbleFumbles",kicking:"kickingFgMade",punting:"puntingTotal","kick returns":"kickReturnsTotal","punt returns":"puntReturnsTotal"},basketball:{DEFAULT_GROUP_NAME:"points"},"ice-hockey":{skater:"goals",goalkeeper:"savePercentage"},handball:{players:"goals",goalkeepers:"goalkeeperEfficiencyPercentage"}};var m=s(87827),y=s(90248),j=s(69559),v=s(54409),b=s(71306),_=s(48886),w=s(12047),C=s(35474),k=s(94446),M=s(16620),S=s(12153),A=s(24159),P=s(54917);let H=e=>{let{player:t,hideImage:s}=e,a=(0,o.useContext)(c.Ws)===l.QCR.Basketball&&!t.substitute,d="rtl"===document.dir;return(0,i.jsxs)(r.so,{align:"center",h:"5xl",mr:s?"lg":void 0,children:[(0,i.jsx)(r.az,{w:"xs",h:"[52px]",bg:a?"status.val":void 0}),!s&&(0,i.jsxs)(r.az,{position:"relative",py:"sm",px:"md",mr:"xs",children:[(0,i.jsx)(k.t,{id:t.player.id,size:40,name:t.player.name,style:{display:"block"}}),a&&(0,i.jsx)(r.az,{position:"absolute",bottom:"xs",left:"[50%]",style:{transform:d?"translateX(50%)":"translateX(-50%)"},bg:"status.val",br:"[6px]",children:(0,i.jsx)(n.EY,{px:"xs",textStyle:"assistive.micro",color:"surface.s1",display:"block",children:(0,i.jsx)(y.A,{id:"starter"})})})]})]})},I=e=>{let{player:t,showTeamLogo:s,useShortName:a}=e,o=(0,j.o)()===l.QCR.Basketball&&!!t.ejected;return(0,i.jsxs)(r.az,{overflowX:"clip",children:[o&&(0,i.jsx)(r.so,{bg:"status.error.default",display:"inline-flex",h:"md",align:"center",px:"sm",br:"md",mb:"2xs",children:(0,i.jsx)(n.EY,{textStyle:"assistive.micro",color:"surface.s1",lineHeight:1,children:(0,i.jsx)(y.A,{id:"basketball_player_ejected_long"})})}),(0,i.jsx)(n.EY,{mb:"2xs",textStyle:"display.small",color:t.inPlay?"primary.default":"neutrals.nLv1",display:"block",truncate:!0,children:(0,i.jsx)(A.c,{entity:t.player,short:a})}),(0,i.jsxs)(r.so,{w:"100%",gap:"sm",align:"center",children:[s&&t.teamId&&(0,i.jsx)(k.p,{id:t.teamId,size:16}),!!t.jerseyNumber&&(0,i.jsx)(n.EY,{textStyle:"body.medium",children:t.jerseyNumber}),!!t.position&&(0,i.jsx)(n.EY,{textStyle:"body.medium",color:"neutrals.nLv3",truncate:!0,children:(0,i.jsx)(P.F,{id:t.position})})]})]})};function z(e){let{player:t,isHovered:s,onHoverStart:a,onHoverEnd:l,children:n}=e,{event:d}=(0,o.useContext)(c.y$),{openEventPlayerStatistics:u}=(0,M.d)();return(0,i.jsx)(S.A,{routeKey:"player",params:{slug:t.slug,id:t.id,sport:d.tournament.category.sport.slug},onClick:e=>{d.hasEventPlayerStatistics&&(e.preventDefault(),u({event:d,player:t},_._.BoxScore))},onMouseOver:()=>null==a?void 0:a(t.id),onMouseLeave:()=>null==l?void 0:l(t.id),children:(0,i.jsx)(r.so,{bg:s?"surface.s2":void 0,title:t.name,children:n})})}function T(e){let{player:t,hideImage:s,showTeamLogo:a,useShortName:l,isHovered:n,isLast:o,onHoverStart:c,onHoverEnd:d}=e;return(0,i.jsx)(z,{player:t.player,onHoverStart:c,onHoverEnd:d,isHovered:n,children:(0,i.jsxs)(r.so,{h:"5xl",align:"center",w:"100%",borderBottom:o?void 0:"1px solid {colors.neutrals.nLv4}",children:[(0,i.jsx)(H,{player:t,hideImage:s}),(0,i.jsx)(I,{player:t,showTeamLogo:a,useShortName:l})]})})}var R=s(21501),V=s(12364),O=s.n(V);let E=e=>{var t,s;return e.wideBoxScore||(null!=(s=null==(t=e.short)?void 0:t.length)?s:0)>4?40:36};function L(e){let{stats:t,sortedPlayers:s,sortStatistic:a,hoveredPlayerId:l,onHoverStart:o,onHoverEnd:c}=e;return(0,i.jsx)(i.Fragment,{children:s.map((e,d)=>{let u=(0,C.$i)(e.statistics||{});return(0,i.jsx)(z,{player:e.player,onHoverStart:o,onHoverEnd:c,children:t.map(t=>{let o=E(t),c=a.short===t.short&&s.length>1;return(0,i.jsx)(r.ov,{h:"5xl",style:{width:o},bg:l===e.player.id?"surface.s2":void 0,borderBottom:d{let{name:t,items:s}=e;return(0,i.jsxs)("div",{children:[t===g?null:(0,i.jsx)(n.EY,{textStyle:"assistive.default",pt:"lg",pb:"sm",display:"block",children:(0,i.jsx)(F.R,{id:t})}),s.map(e=>(0,i.jsxs)(r.so,{gap:"lg",py:"sm",children:[(0,i.jsx)(r.az,{w:"[36px]",children:(0,i.jsx)(n.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",children:e.short})}),(0,i.jsx)(r.az,{children:(0,i.jsx)(n.EY,{textStyle:"body.small",children:(0,i.jsx)(B.w,{id:e.translationKey||e.value})})})]},e.short))]})},D=e=>{let{groups:t,defaultTab:s}=e,[a,l]=(0,o.useState)(s||"passingGroup");return(0,i.jsx)(r.az,{w:{md:"[400px]"},children:(0,i.jsxs)(N.tU,{variant:"tertiary",value:a,onChange:e=>l(e),children:[(0,i.jsx)(N.tU.List,{px:"md",py:"sm",children:Object.keys(t).map(e=>(0,i.jsx)(N.tU.Tab,{tabKey:e,children:(0,i.jsx)(F.R,{id:e})},"tab-".concat(e)))}),(0,i.jsx)(r.az,{children:Object.keys(t).map(e=>(0,i.jsx)(N.tU.Panel,{tabKey:e,children:(0,i.jsx)(r.az,{px:"lg",children:(0,i.jsx)(Z,{name:g,items:t[a]})})},"panel-".concat(e)))})]})})},Y=e=>{let{groups:t,sport:s,defaultTab:a}=e,{isMobile:o}=(0,n.$c)();return s===l.QCR.AmericanFootball&&o?(0,i.jsx)(D,{groups:t,defaultTab:a}):(0,i.jsx)(r.so,{px:"lg",direction:"column",gap:"lg",w:{md:"[400px]"},overflowY:"auto",children:Object.keys(t).map(e=>(0,i.jsx)(Z,{name:e,items:t[e]},e))})},U=e=>{var t,s;let{group:a,showFullStats:d}=e,[u,p]=(0,o.useState)(!1),[x,f]=(0,o.useState)(void 0),{mediaBreakpoint:m}=(0,n.$c)(),j=(0,o.useContext)(c.Ws),b=(0,h.mR)(j,!0),_=e=>{p(!0),j===l.QCR.AmericanFootball&&f(e)};return(0,i.jsxs)(r.az,{flexGrow:1,children:[(0,i.jsxs)(n.EY,{textStyle:"assistive.default",color:"primary.default",display:"inline-block",cursor:"pointer",mr:"2xs",style:{width:(t=m,s=b[a].length,d?"md"===t?6===s?32:50:"unset":"unset")},onClick:()=>_(a),truncate:!0,children:[(0,i.jsx)(F.R,{id:a===g?"legend_info_button_title":a}),(0,i.jsx)(v.G_L,{w:16,h:16,fill:"primary.default",ml:"xxs",mb:"xxs"})]}),(0,i.jsx)(G.A,{isOpen:u,setIsOpen:p,header:(0,i.jsx)(n.EY,{textStyle:"display.large",p:"lg",display:"block",children:(0,i.jsx)(y.A,{id:"bottom_sheet_stats_expl_title"})}),children:(0,i.jsx)(Y,{groups:b,sport:j,defaultTab:x})})]})};function W(e){let{iconDirection:t,hasPlayerRatings:s,onClick:a}=e,{isMobile:l}=(0,n.$c)(),o="right"===t;return(0,i.jsx)(r.ov,{h:"4xl",pb:"2xs",w:"[20px]",position:"relative",right:!s&&o?{md:"xs"}:void 0,children:(0,i.jsx)(n.K0,{variant:"clear",onClick:a,userSelect:"none",children:(0,i.jsx)(r.ov,{w:"[20px]",h:"[20px]",children:l?(0,i.jsx)(v.Bfd,{fill:"onSurface.nLv3",width:8,height:8,style:{transform:o?"rotate(270deg)":"rotate(90deg)"}}):(0,i.jsx)(v.QtO,{fill:"primary.default",width:16,height:16,style:{transform:o?"rotate(270deg)":"rotate(90deg)"}})})})})}let Q=e=>{let{isActive:t,stat:s,title:a}=e;return(0,i.jsx)(n.EY,{style:{width:E(s)},title:a,textStyle:"tab.secondary",color:t?"primary.default":"neutrals.nLv3",textAlign:"center",display:"block",children:s.shortTranslationKey?(0,i.jsx)(y.A,{id:s.shortTranslationKey}):s.short})},K=e=>{let{group:t,onLeftArrowClick:s,showFullStats:a}=e;return(0,i.jsxs)(r.so,{h:"4xl",align:"center",pl:"lg",pr:"xs",children:[(0,i.jsx)(U,{group:t,showFullStats:a}),s&&(0,i.jsx)(W,{onClick:s,iconDirection:"left"})]})};function $(e){let{stat:t,isActive:s,isSortable:a,sortDir:l,isLast:n,onClick:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.so,{position:"relative",h:"[20px]",align:"center",userSelect:"none",children:[(0,i.jsx)(B.w,{id:String(t.value),children:e=>(0,i.jsx)(r.az,{onClick:o,cursor:a?"pointer":void 0,mr:n?void 0:"[-1px]",children:(0,i.jsx)(Q,{title:e.toString(),stat:t,isActive:s})})}),!n&&(0,i.jsx)(r.cG,{color:"neutrals.nLv4",borderInlineEndStyle:"solid",orientation:"vertical"})]}),s&&(0,i.jsx)(r.az,{w:"lg",h:"lg",children:(0,i.jsx)(v.Bfd,{fill:"primary.default",width:16,height:16,style:s&&l===_.U.ASC?{transform:"rotate(180deg)"}:void 0})})]})}let X=(0,o.forwardRef)((e,t)=>{let{children:s,...a}=e,l=(0,w.Ay)()+48;return(0,i.jsx)(r.az,{...a,position:"sticky",bg:"surface.s1",zIndex:"sticky",style:{top:l},ref:t,children:s})}),q=()=>{let e=(0,j.o)(),{event:t}=(0,o.useContext)(c.y$);return t.tournament.uniqueTournament?e===l.QCR.Football||t.tournament.uniqueTournament&&[l.G6l.NBA,138,141].includes(t.tournament.uniqueTournament.id)?(0,i.jsx)(y.A,{id:"sofascore_rating_basketball_box_score"}):(0,i.jsx)(y.A,{id:"sofascore_rating_basketball_box_score_finished"}):null};function J(e){let{location:t}=(0,o.useContext)(c.y$),{mediaBreakpoint:s,isDesktop:a}=(0,n.$c)(),{statNames:l,group:d,sortedPlayers:u,showFullStats:p,updateSortStatistic:h,sortConfig:x}=e,g=u.map(e=>{var t;return{playerId:e.player.id,rating:null==(t=e.statistics)?void 0:t.rating}}),f=g.some(e=>"number"==typeof e.rating&&e.rating>0),y=f?a?20:12:0,{hoveredPlayerId:j,onHoverStart:b,onHoverEnd:_}=function(){let[e,t]=(0,o.useState)(void 0);return{hoveredPlayerId:e,onHoverStart:(0,o.useCallback)(e=>t(e),[]),onHoverEnd:(0,o.useCallback)(e=>t(t=>t===e?void 0:t),[])}}(),{leftColumnBasis:w,rightColumnBasis:C,...k}=function(e,t,s){let i=(0,o.useRef)(null),a=(0,o.useRef)(null),l=(0,o.useRef)(null),n=e.reduce((e,t)=>e+E(t),0),r=e.length>6?180-t:Math.min(n,220-t),c=Math.min(290-t-r,s?120-t:136-t),[d,u]=(0,o.useState)(void 0),[p,h]=(0,o.useState)(void 0),x=()=>{a.current&&(u(a.current.scrollLeft>0),h(a.current.scrollLeft{var t;i.current="header",null==(t=a.current)||t.scroll({left:Math.max(e,0),behavior:"smooth"}),x()};return(0,R.st)(()=>{x()},void 0,[s]),{currentElementInfo:i,headerRef:a,contentRef:l,leftColumnBasis:"".concat(c,"px"),rightColumnBasis:"".concat(r,"px"),leftColumnMax:"max(".concat(200-t,"px, calc(100% - ").concat(n,"px))"),rightColumnMax:n,rightCanGrow:n>r,onLeftClick:d?()=>{var e;return g(((null==(e=a.current)?void 0:e.scrollLeft)||0)-108)}:void 0,onRightClick:p?()=>{var e;return g(((null==(e=a.current)?void 0:e.scrollLeft)||0)+108)}:void 0,onScroll:O()(x,100)}}(l,y,p),M=a&&t===c.cb.EventPage;return(0,i.jsxs)(r.az,{pb:f?void 0:{base:"sm",md:"md"},children:[(0,i.jsxs)(r.so,{h:"100%",w:"100%",position:"relative",overflowX:"clip",justify:"space-between",children:[(0,i.jsxs)(r.az,{flexGrow:1,flexShrink:1,style:{flexBasis:w,width:w,maxWidth:k.leftColumnMax},children:[(0,i.jsx)(X,{children:(0,i.jsx)(K,{group:d,onLeftArrowClick:k.onLeftClick,showFullStats:p})}),(0,i.jsx)(r.so,{display:"flex",flexDirection:"column",overflow:"hidden",maxW:"100%",position:"relative",children:u.map((t,a)=>(0,i.jsx)(T,{player:t,stats:l,showTeamLogo:e.showTeamLogo,hideImage:["xxs","md"].includes(s)&&p&&!M,useShortName:p&&!M,isHovered:j===t.player.id,onHoverStart:b,onHoverEnd:_,isLast:u.length-1===a},t.player.id))})]}),(0,i.jsxs)(r.so,{direction:"column",flexGrow:k.rightCanGrow?1:void 0,flexShrink:k.rightCanGrow?1:void 0,style:{flexBasis:k.rightCanGrow?C:void 0,width:C,maxWidth:k.rightColumnMax},children:[(0,i.jsx)(X,{scrollbar:"hidden",ref:k.headerRef,overflow:"auto",onScroll:e=>{let t=e.target.scrollLeft;window.requestAnimationFrame(()=>{if("header"===k.currentElementInfo.current){var e;null==(e=k.contentRef.current)||e.scroll({left:t}),k.onScroll()}})},onMouseOver:()=>k.currentElementInfo.current="header",onTouchStart:()=>k.currentElementInfo.current="header",children:(0,i.jsx)(r.az,{children:(0,i.jsx)(r.so,{w:"100%",children:l.map((e,t)=>{let s=x.stat.short===e.short,a=u.length>1;return(0,i.jsx)(X,{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"center",h:"4xl",pb:s&&a?void 0:"lg",children:(0,i.jsx)($,{stat:e,isActive:a&&s,isSortable:a,sortDir:s?x.dir:void 0,isLast:l.length-1===t,onClick:()=>{var s;h(e),null==(s=k.headerRef.current)||s.scroll({left:Math.max(36*(t-2),0),behavior:"smooth"})}},e.value)},e.short)})})})}),(0,i.jsx)(r.az,{scrollbar:"hidden",ref:k.contentRef,w:"100%",overflowX:"auto",onScroll:e=>{let t=e.target.scrollLeft;window.requestAnimationFrame(()=>{if("content"===k.currentElementInfo.current){var e;null==(e=k.headerRef.current)||e.scroll({left:t}),k.onScroll()}})},onMouseOver:()=>k.currentElementInfo.current="content",onTouchStart:()=>k.currentElementInfo.current="content",children:(0,i.jsx)(L,{stats:l,sortStatistic:x.stat,sortedPlayers:u,hoveredPlayerId:j,onHoverStart:b,onHoverEnd:_})})]}),(0,i.jsxs)(r.so,{w:f?{base:"2xl",md:"3xl"}:{base:"[20px]",md:"xl"},direction:"column",position:"relative",children:[(0,i.jsx)(X,{w:f?{base:"2xl",md:"3xl"}:{base:"[20px]",md:"xl"},h:"4xl",children:k.onRightClick&&(0,i.jsx)(W,{iconDirection:"right",hasPlayerRatings:f,onClick:k.onRightClick})}),f&&(0,i.jsx)(i.Fragment,{children:g.map((e,t)=>(0,i.jsx)(z,{player:u[t].player,onHoverStart:b,onHoverEnd:_,children:(0,i.jsx)(r.az,{bg:j===e.playerId?"surface.s2":void 0,h:"5xl",py:"lg",px:"xs",borderBottom:t{e.showFullStats||void 0!==e.statNames.find(e=>e.short===t.stat.short)||s({stat:e.defaultSortStat,dir:_.U.DESC})},[e.showFullStats]),(0,i.jsx)(J,{statNames:e.statNames,showFullStats:e.showFullStats,showTeamLogo:e.showTeamLogo,group:e.group,sortConfig:t,sortedPlayers:a,updateSortStatistic:l})}function et(e){let{activeTab:t,players:s,showFull:a}=e,n=(0,o.useContext)(c.Ws),{leftTeam:r,rightTeam:d}=(0,o.useContext)(c.y$);if(!(t===l.cxP.Left?r:t===l.cxP.Right?d:r&&d)||!n)return null;let u=(0,h.mR)(n,a),p=n===l.QCR.Basketball?{[g]:s}:s.reduce((e,t)=>(t.statistics&&Object.keys(t.statistics).forEach(s=>{(function(e,t){let s=[],i=(0,h.mR)(t,!0);for(let t in i)i[t].some(t=>[t.value,t.attemptsValue,t.madesValue,t.secondaryValue].includes(e))&&s.push(t);return s.length?s:[x]})(s,n).forEach(i=>{if(n!==l.QCR.AmericanFootball||0!==t.statistics[s])if("G"===t.position&&["playersGroup","skatersGroup"].includes(i)&&!t.statistics[s])return;else e[i]?e[i][t.player.id]=t:e[i]={[t.player.id]:t}})}),e),{});return(0,i.jsx)(i.Fragment,{children:Object.keys(u).map(e=>{var l,r;if(e===x||!p[e])return null;let o=u[e].filter(e=>!e.hideIfNone||s.some(t=>{var s,i;return(null==(s=t.statistics)?void 0:s[null!=(i=e.compareValue)?i:e.value])!==void 0})),c=null!=(r=null==f||null==(l=f[n])?void 0:l[e])?r:"";return(0,i.jsx)(ee,{group:e,statNames:a?o:o.slice(0,3),showTeamLogo:"all"===t,lineup:p[e],defaultSortStat:o.find(e=>e.value===c)||o[0],showFullStats:a,sport:n},e)})})}var es=s(33144);function ei(e){let{activeTab:t,leftTeam:s,rightTeam:a,onTabChange:n}=e,o=(0,w.Ay)();return(0,i.jsx)(r.ov,{bg:"surface.s1",w:"100%",p:"sm",position:"sticky",style:{top:o},zIndex:"dropdown",children:(0,i.jsxs)(N.tU,{variant:"secondary",value:t,onChange:n,children:[(0,i.jsx)(N.tU.Tab,{tabKey:l.cxP.Left,h:32,grow:1,basis:0,textAlign:"center",style:{paddingBlock:"3px"},children:(0,i.jsx)(es.p,{size:24,id:s.id,name:s.name})}),(0,i.jsxs)(N.tU.Tab,{tabKey:"all",h:32,grow:1,basis:0,style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",paddingBlock:"3px"},children:[(0,i.jsx)(es.p,{size:24,id:s.id,name:s.name}),"+",(0,i.jsx)(es.p,{size:24,id:a.id,name:a.name})]}),(0,i.jsx)(N.tU.Tab,{tabKey:l.cxP.Right,h:32,grow:1,basis:0,textAlign:"center",style:{paddingBlock:"3px"},children:(0,i.jsx)(es.p,{size:24,id:a.id,name:a.name})})]})})}function ea(e){let{value:t,toggle:s}=e;return(0,i.jsxs)(r.so,{px:"lg",py:"md",align:"center",justify:"space-between",children:[(0,i.jsxs)(r.az,{children:[(0,i.jsx)(n.EY,{textStyle:"body.medium",display:"block",mb:"2xs",children:(0,i.jsx)(y.A,{id:"boxScoreAppearance"})}),(0,i.jsx)(n.EY,{textStyle:"body.small",display:"block",color:t?"primary.default":"neutrals.nLv3",children:(0,i.jsx)(y.A,{id:"toggleDetailedView"})})]}),(0,i.jsx)(N.lM,{checked:t,onChange:()=>s()})]})}var el=s(30182);function en(e){let{showDivider:t=!0}=e,{leftTeam:s,rightTeam:h,location:x}=(0,o.useContext)(c.y$),[g,f]=(0,o.useState)("all"),[m,y,j]=(0,p.A)("box-score-appearance-toggle-value",!1),{lineups:v,error:b}=(0,d.A)(),{isDesktop:_}=(0,n.$c)(),w=x===c.cb.EventPage&&_;if(b)return null;if(!v)return(0,i.jsx)(a.E,{uniqueKey:"box-score-cl",height:640,animate:!0});let C=v.left.players.map(e=>({...e,teamId:s.id})),k=v.right.players.map(e=>({...e,teamId:h.id})),M=g===l.cxP.Left?C:g===l.cxP.Right?k:[...C,...k];return s&&h&&j?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.az,{bg:"surface.s1",children:[!w&&(0,i.jsx)(ea,{value:m,toggle:()=>{y(e=>!e)}}),!w&&t&&(0,i.jsx)(r.cG,{color:"neutrals.nLv4",borderBlockEndStyle:"solid"}),(0,i.jsx)(ei,{activeTab:g,leftTeam:s,rightTeam:h,onTabChange:f}),(0,i.jsx)(et,{activeTab:g,players:M,showFull:m||w})]}),!!(v.left.missingPlayers||v.right.missingPlayers)&&(0,i.jsx)(r.az,{p:"sm",children:"all"===g?(0,i.jsx)(el.m,{home:v.left.missingPlayers,away:v.right.missingPlayers}):(0,i.jsx)(u.Sb,{missingPlayers:g===l.cxP.Left?v.left.missingPlayers:v.right.missingPlayers})})]}):null}},33243:(e,t,s)=>{s.d(t,{A:()=>c});var i=s(6029),a=s(91816),l=s(99064),n=s(947),r=s(50774);function o(e){let{person:t,hasImg:s,isLast:n,formattedRole:r}=e;return(0,i.jsxs)(l.so,{hoverBg:"surface.s2",children:[(0,i.jsx)(l.az,{px:"lg",py:"sm",children:(0,i.jsx)(a.d,{size:40,id:s?t.id:void 0,name:t.name})}),(0,i.jsx)(l.so,{borderBottom:n?void 0:"onSurface.nLv4",align:"center",flex:"1 1 auto",mr:"lg",children:(0,i.jsxs)(l.az,{flex:"1 1 auto",children:[(0,i.jsx)(l.so,{title:t.name,align:"center",children:(0,i.jsx)(l.EY,{font:"body.medium",color:"onSurface.nLv1",mr:"xs",pr:"xs",children:t.name})}),r&&(0,i.jsx)(l.EY,{font:"assistive.default",color:"onSurface.nLv3",mx:"xxs",ml:"xs",children:r})]})})]},t.id)}function c(e){let{supportStaff:t,manager:s}=e,a=(0,n.A)();return(0,i.jsxs)(l.az,{pb:["sm","md"],children:[s&&(0,i.jsx)(o,{person:s,hasImg:!0,isLast:0===t.length,formattedRole:a.formatMessage({id:"manager"})}),null==t?void 0:t.map((e,s)=>{let l=s===t.length-1,n=(0,r.u)(e.role),c=a.formatMessage({id:n});return(0,i.jsx)(o,{person:e,isLast:l,formattedRole:c!==n?c:void 0},e.id)})]})}},34765:(e,t,s)=>{s.d(t,{L:()=>o});var i=s(21377),a=s(55729),l=s(45860),n=s(62859),r=s(8703);function o(){let{event:e,initialIncidents:t}=(0,a.useContext)(n.y$),s={};if(e.status.type===i.XUj.InProgress)s.onErrorRetry=(e,t,s,i,a)=>{let{retryCount:l}=a;404===e.status&&setTimeout(()=>i({retryCount:l}),15e3)};else{let e={incidents:[]};s.onError=(t,s)=>{(0,l.Tk)(s,()=>e,!1)}}let{data:o,isLoading:c,error:d}=(0,l.Ay)(i.bnp.incidents(e.id),(0,r.rf)(e,s));return{incidents:(null==o?void 0:o.incidents)||t||[],isLoading:(null==t||!t.length)&&c,isError:!!d}}},41078:(e,t,s)=>{s.d(t,{A:()=>o});var i=s(6029),a=s(44194),l=s(76356),n=s(90248),r=s(54409);function o(e){let{messageId:t,isInverted:s}=e;return(0,i.jsxs)(l.so,{direction:s?"row-reverse":"row",gap:"sm",align:"center",h:"5xl",maxW:"100%",px:"sm",children:[(0,i.jsx)(r.G_L,{width:24,height:24,fill:"onSurface.nLv3",style:{display:"block",minWidth:"24px"}}),(0,i.jsx)(a.EY,{textStyle:"body.medium",color:"neutrals.nLv3",display:"block",children:(0,i.jsx)(n.A,{id:t})})]})}},44259:(e,t,s)=>{s.d(t,{$8:()=>o,T0:()=>n,XU:()=>c,cl:()=>d,eA:()=>l,jM:()=>r});var i=s(21377);class a{dist(e){return Math.sqrt((e.x-this.x)**2+(e.y-this.y)**2)}atan(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new a(0,0);return Math.atan2(this.y-e.y,this.x-e.x)}add(e,t){let s=this.atan(t);return this.x+=e*Math.cos(s),Math.abs(s-Math.PI)>.005&&(this.y+=e*Math.sin(s)),[this.x,this.y]}constructor(e,t){this.x=e,this.y=t}}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,i=e.map(e=>{let{x:t,y:s}=e;return new a(t,s)}),l=0;do for(let s=0;s({...e,...i[t]}))}let n=e=>{let t=new Map;if(e)for(let s=0;s{var s,i,a,l,n,r,o,c;let d=(null==t||null==(s=t.playerColor)?void 0:s.primary)||(null==t||null==(i=t.playerColor)?void 0:i.outline),u=(null==t||null==(a=t.playerColor)?void 0:a.fancyNumber)||(null==t||null==(l=t.playerColor)?void 0:l.number);return"G"===e.position&&(d=(null==t||null==(n=t.goalkeeperColor)?void 0:n.primary)||(null==t||null==(r=t.goalkeeperColor)?void 0:r.outline),u=(null==t||null==(o=t.goalkeeperColor)?void 0:o.fancyNumber)||(null==t||null==(c=t.goalkeeperColor)?void 0:c.number)),{fillColor:d=(null==d?void 0:d.startsWith("#"))?"#fff":"#"+d,numberColor:u=(null==u?void 0:u.startsWith("#"))?"#000":"#"+u}};function o(){let e=!1;return!(0,i.S$s)()&&"navigator"in window&&(e=/Firefox/.test(window.navigator.userAgent)),e}function c(e){return e>1&&e<=7}function d(e,t,s){return t?e?s?.75:.25:s?1:.5:e?.5:1}},44565:(e,t,s)=>{s.d(t,{A:()=>c});var i=s(21377),a=s(55729),l=s(45860),n=s(62859),r=s(8703),o=s(30720);function c(){let{swrConfig:e,event:t,shouldFetch:s=!0,jerseyStyle:c="fancy"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldFetch:!0},d={refreshInterval:6e4,...e},{event:u}=(0,a.useContext)(n.y$),p=s?t||u:void 0,{data:h,error:x,isLoading:g}=(0,l.Ay)(p?i.bnp.lineups(p.id):null,p?(0,r.rf)(p,d):d),[f,m]=(0,o.A)(h,"home","away"),y=p?{leftJerseyUrls:{player:i.bnp.playerJersey(p.id,"home",c),goalkeeper:i.bnp.goalkeeperJersey(p.id,"home",c)},rightJerseyUrls:{player:i.bnp.playerJersey(p.id,"away",c),goalkeeper:i.bnp.goalkeeperJersey(p.id,"away",c)}}:{leftJerseyUrls:{player:"",goalkeeper:""},rightJerseyUrls:{player:"",goalkeeper:""}},[j,v]=(0,o.A)(y,"leftJerseyUrls","rightJerseyUrls");return{lineups:h?{left:f,right:m,leftJerseyUrls:j,rightJerseyUrls:v}:void 0,isLoading:g,confirmed:null==h?void 0:h.confirmed,error:x}}},44742:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(6029),a=s(41735),l=s(39895);function n(e){let{colors:t}=(0,a.useTheme)();return(0,i.jsx)(l.A,Object.assign({width:"16",height:"16",viewBox:"0 0 16 16"},e,{children:(0,i.jsxs)("g",Object.assign({fill:"none",fillRule:"evenodd"},{children:[(0,i.jsx)("path",{fill:"none",d:"M0 0h16v16H0z"}),(0,i.jsx)("path",{d:"M12 9v2.25h3v1.5h-3V15h-1l-3-3 3-3h1z",fill:t.success.default}),(0,i.jsx)("path",{d:"M15 7.75h-1.5V2.5h-11v5.25H1V1h14v6.75zM1 15v-1l1.5-1.5h4L8 14v1H1zm3.5-3.25a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",fill:t.primary.default})]}))}))}},45527:(e,t,s)=>{s.d(t,{N:()=>a,i:()=>l});var i=s(6029);let a=(0,s(55729).createContext)("left"),l=e=>{let{side:t,children:s}=e;return(0,i.jsx)(a.Provider,{value:t,children:s})}},50774:(e,t,s)=>{s.d(t,{A:()=>n,u:()=>l});var i=s(6029),a=s(90248);let l=e=>e.replaceAll("-","_"),n=e=>{let{role:t}=e;return(0,i.jsx)(a.A,{id:l(t)})}},52839:(e,t,s)=>{s.d(t,{t:()=>l,u:()=>a});var i=s(21377);let a=[i.QCR.AmericanFootball,i.QCR.Basketball,i.QCR.Handball,i.QCR.IceHockey];function l(e){switch(e){case i.QCR.AmericanFootball:return["passingTouchdowns","rushingTouchdowns","receivingTouchdowns","passingCompletionPercentage","rushingYardsPerAttempt","receivingYardsPerReception","defensiveInterceptions","defensiveTotalTackles","defensiveSacks","kickingFgMade"];case i.QCR.Basketball:return["points","rebounds","assists","steals","blocks","turnovers","fieldGoalsPercentage","threePointsPercentage"];case i.QCR.Handball:return["goals","assists","goals7m","steals","twoMinutePenalties","saves","goalkeeperEfficiencyPercentage","gk7mSaves"];case i.QCR.IceHockey:return["points","goals","assists","plusMinus","timeOnIce","blocked","hits","goalsAgainstAverage","savePercentage","shutouts"];default:return null}}},52854:(e,t,s)=>{s.d(t,{I:()=>n,k:()=>o});var i=s(55729),a=s(947),l=s(73959);let n="-playoffs",r=(e,t,s)=>{let i=t.split(n),a=i[0],r=i.length>1;return{label:(0,l.y)(e,a,s,r),value:t}};function o(e,t){var s;let[l,n]=(0,i.useState)({label:"",value:""}),[o,c]=(0,i.useState)(),d=(0,a.A)(),u=e.map(e=>r(d,e,t));return(0,i.useEffect)(()=>{var e,t;if((null==(e=u[0])?void 0:e.value)!==(null==o?void 0:o.value)||!l.value&&u.length&&u[0]){let e=u.find(e=>"rating"===e.value);n(null!=(t=null!=e?e:u[0])?t:{label:"",value:""}),c(null!=e?e:u[0])}},[u.length,null==(s=u[0])?void 0:s.value]),{selectedStat:l,setSelectedStat:n,statItems:u}}},54863:(e,t,s)=>{s.d(t,{Ir:()=>i.A,ax:()=>c,rR:()=>h});var i=s(44565),a=s(21377),l=s(55729),n=s(45860),r=s(62859);function o(e){let t=e.reduce((e,t)=>t.statistics&&t.statistics.rating?{sum:e.sum+Number(t.statistics.rating),count:e.count+1}:e,{count:0,sum:0});return t.count?t.sum/t.count:void 0}function c(e){let{event:t}=(0,l.useContext)(r.y$),s=o(e.left.players),i=o(e.right.players),c=!!s&&!!i,{data:d}=(0,n.Ay)(c?null:a.bnp.prematchStandings(t.id));return((null==d?void 0:d.homeTeam.avgRating)||(null==d?void 0:d.awayTeam.avgRating))&&(s=null==d?void 0:d.homeTeam.avgRating,i=null==d?void 0:d.awayTeam.avgRating),[s,i]}var d=s(34765),u=s(79853),p=s(45527);function h(){let{event:e,leftTeam:t,rightTeam:s}=(0,l.useContext)(r.y$),{managers:a}=(0,u.K)(e),{lineups:n}=(0,i.A)(),{incidents:o}=(0,d.L)(),c=(0,l.useContext)(p.N);if(void 0===c)throw Error("useLineupSide must be used within a SideProvider");return"left"===c?{event:e,team:t,manager:a.leftManager,lineups:null==n?void 0:n.left,incidents:o,jersey:null==n?void 0:n.leftJerseyUrls.player,jerseyNumberColor:null==n?void 0:n.left.playerColor,startingPlayers:(null==n?void 0:n.left.players.filter(e=>!e.substitute))||[],substitutePlayers:(null==n?void 0:n.left.players.filter(e=>e.substitute))||[]}:{event:e,team:s,manager:a.rightManager,lineups:null==n?void 0:n.right,incidents:o,jersey:null==n?void 0:n.rightJerseyUrls.player,jerseyNumberColor:null==n?void 0:n.right.playerColor,startingPlayers:(null==n?void 0:n.right.players.filter(e=>!e.substitute))||[],substitutePlayers:(null==n?void 0:n.right.players.filter(e=>e.substitute))||[]}}},55529:(e,t,s)=>{s.d(t,{V7:()=>i,kA:()=>a,vD:()=>r,Cy:()=>o,Xj:()=>c,uU:()=>d,WM:()=>n,fP:()=>l});var i=function(e){return e.Possible="possible",e.Confirmed="confirmed",e}({}),a=function(e){return e.Performance="performance",e.Club="club",e.Nationality="nationality",e.Age="age",e.MarketValue="marketValue",e.Height="height",e}({});let l={performance:"manager.performance",nationality:"nationality",club:"lineups_chip_club",age:"age",marketValue:"market_value",height:"player_height"},n=2,r={1:{gridColumn:1,gridRow:1},2:{gridColumn:3,gridRow:1},3:{gridColumn:5,gridRow:1},4:{gridColumn:2,gridRow:2},5:{gridColumn:4,gridRow:2},6:{gridColumn:1,gridRow:3},7:{gridColumn:5,gridRow:3},8:{gridColumn:3,gridRow:3},9:{gridColumn:1,gridRow:4},10:{gridColumn:2,gridRow:5},11:{gridColumn:1,gridRow:7},12:{gridColumn:3,gridRow:5},13:{gridColumn:4,gridRow:5},14:{gridColumn:5,gridRow:7},15:{gridColumn:3,gridRow:7}},o={1:{top:"5%"},2:{top:"5%"},3:{top:"5%"},4:{top:"-10%"},5:{top:"-10%"},6:{top:"-20%"},7:{top:"-20%"},8:{top:"25%"},9:{top:"25%"},10:{top:"-20%"},11:{top:"-50%"},12:{top:"30%"},13:{top:"90%"},14:{top:"-50%"},15:{top:"10%"}},c={1:{gridColumn:1,gridRow:2},2:{gridColumn:2,gridRow:2},3:{gridColumn:3,gridRow:2},4:{gridColumn:1,gridRow:4},5:{gridColumn:2,gridRow:5},6:{gridColumn:3,gridRow:5},7:{gridColumn:4,gridRow:6}},d={1:{top:"-10%"},2:{top:"25%"},3:{top:"-10%"},4:{top:"55%"},5:{top:"5%"},6:{top:"60%"},7:{top:"25%"}}},56008:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(6029),a=s(21377),l=s(65789);function n(){return(0,i.jsxs)(l.Zp,{children:[(0,i.jsx)(l.Zp.Header,{titleId:"top_players",values:{gender:a.YT8.Male}}),(0,i.jsx)("div",{style:{height:780}})]})}},57773:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(6029),a=s(41735),l=s(39895);function n(e){let{colors:t}=(0,a.useTheme)();return(0,i.jsx)(l.A,Object.assign({width:"16",height:"16",viewBox:"0 0 16 16"},e,{children:(0,i.jsxs)("g",Object.assign({fill:"none",fillRule:"evenodd"},{children:[(0,i.jsx)("path",{fill:"none",d:"M0 0h16v16H0z"}),(0,i.jsx)("path",{d:"M15 7.75h-1.5V2.5h-11v5.25H1V1h14v6.75zM1 15v-1l1.5-1.5h4L8 14v1H1zm3.5-3.25a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",fill:t.primary.default}),(0,i.jsx)("path",{d:"M11 9v2.25H8v1.5h3V15h1l3-3-3-3h-1z",fill:t.error.default})]}))}))}},59709:(e,t,s)=>{s.d(t,{M:()=>et});var i=s(6029),a=s(43681),l=s(10953),n=s(91289),r=s(97080),o=s(13181),c=s(45079),d=s(84684),u=s(86877),p=s(39895);function h(e){return(0,i.jsxs)(p.A,Object.assign({width:"20",height:"20",viewBox:"0 0 20 20"},e,{children:[(0,i.jsx)("path",{id:"Vector",d:"M10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_2",d:"M6 15C5.45 15 5 15.45 5 16C5 16.55 5.45 17 6 17C6.55 17 7 16.55 7 16C7 15.45 6.55 15 6 15Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_3",d:"M9 12C8.45 12 8 12.45 8 13C8 13.55 8.45 14 9 14C9.55 14 10 13.55 10 13C10 12.45 9.55 12 9 12Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_4",d:"M6 9C5.45 9 5 9.45 5 10C5 10.55 5.45 11 6 11C6.55 11 7 10.55 7 10C7 9.45 6.55 9 6 9Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_5",d:"M3 12C2.45 12 2 12.45 2 13C2 13.55 2.45 14 3 14C3.55 14 4 13.55 4 13C4 12.45 3.55 12 3 12Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_6",d:"M15 12C14.45 12 14 12.45 14 13C14 13.55 14.45 14 15 14C15.55 14 16 13.55 16 13C16 12.45 15.55 12 15 12Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_7",d:"M12 15C11.45 15 11 15.45 11 16C11 16.55 11.45 17 12 17C12.55 17 13 16.55 13 16C13 15.45 12.55 15 12 15Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_8",d:"M12 9C11.45 9 11 9.45 11 10C11 10.55 11.45 11 12 11C12.55 11 13 10.55 13 10C13 9.45 12.55 9 12 9Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_9",d:"M15 6C14.45 6 14 6.45 14 7C14 7.55 14.45 8 15 8C15.55 8 16 7.55 16 7C16 6.45 15.55 6 15 6Z",fill:e.fill}),(0,i.jsx)("path",{id:"Vector_10",d:"M18 9C17.45 9 17 9.45 17 10C17 10.55 17.45 11 18 11C18.55 11 19 10.55 19 10C19 9.45 18.55 9 18 9Z",fill:e.fill})]}))}function x(e){return(0,i.jsxs)(p.A,Object.assign({width:"24",height:"24",viewBox:"0 0 24 24"},e,{children:[(0,i.jsx)("path",{d:"M7 16C6.45 16 6 16.45 6 17C6 17.55 6.45 18 7 18C7.55 18 8 17.55 8 17C8 16.45 7.55 16 7 16Z",fill:e.fill}),(0,i.jsx)("path",{d:"M10 15C9.45 15 9 15.45 9 16C9 16.55 9.45 17 10 17C10.55 17 11 16.55 11 16C11 15.45 10.55 15 10 15Z",fill:e.fill}),(0,i.jsx)("path",{d:"M13 16C12.45 16 12 16.45 12 17C12 17.55 12.45 18 13 18C13.55 18 14 17.55 14 17C14 16.45 13.55 16 13 16Z",fill:e.fill}),(0,i.jsx)("path",{d:"M13 13C12.45 13 12 13.45 12 14C12 14.55 12.45 15 13 15C13.55 15 14 14.55 14 14C14 13.45 13.55 13 13 13Z",fill:e.fill}),(0,i.jsx)("path",{d:"M15 10C14.45 10 14 10.45 14 11C14 11.55 14.45 12 15 12C15.55 12 16 11.55 16 11C16 10.45 15.55 10 15 10Z",fill:e.fill}),(0,i.jsx)("path",{d:"M0 0V9H2V2H18V9H20V0H0Z",fill:e.fill}),(0,i.jsx)("path",{d:"M10 7.75C12.89 7.75 15.25 10.11 15.25 13C15.25 15.89 12.89 18.25 10 18.25C7.11 18.25 4.75 15.89 4.75 13C4.75 10.11 7.11 7.75 10 7.75ZM10 6C6.13 6 3 9.13 3 13C3 16.87 6.13 20 10 20C13.87 20 17 16.87 17 13C17 9.13 13.87 6 10 6Z",fill:e.fill})]}))}var g=s(77749),f=s(80339),m=s(14532);function y(e){return(0,i.jsxs)(p.A,Object.assign({width:"20",height:"20",viewBox:"0 0 20 20"},e,{children:[(0,i.jsx)("path",{d:"M10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0Z",fill:e.fill}),(0,i.jsx)("path",{d:"M13 4C12.175 4 11.5 4.675 11.5 5.5C11.5 6.325 12.175 7 13 7C13.825 7 14.5 6.325 14.5 5.5C14.5 4.675 13.825 4 13 4Z",fill:e.fill}),(0,i.jsx)("path",{d:"M10 8.5C9.175 8.5 8.5 9.175 8.5 10C8.5 10.825 9.175 11.5 10 11.5C10.825 11.5 11.5 10.825 11.5 10C11.5 9.175 10.825 8.5 10 8.5Z",fill:e.fill}),(0,i.jsx)("path",{d:"M7.5 4C6.675 4 6 4.675 6 5.5C6 6.325 6.675 7 7.5 7C8.325 7 9 6.325 9 5.5C9 4.675 8.325 4 7.5 4Z",fill:e.fill}),(0,i.jsx)("path",{d:"M4.5 8.5C3.675 8.5 3 9.175 3 10C3 10.825 3.675 11.5 4.5 11.5C5.325 11.5 6 10.825 6 10C6 9.175 5.325 8.5 4.5 8.5Z",fill:e.fill})]}))}function j(e){return(0,i.jsxs)(p.A,Object.assign({width:"20",height:"20",viewBox:"0 0 20 20"},e,{children:[(0,i.jsx)("path",{d:"M12 9C11.45 9 11 9.45 11 10C11 10.55 11.45 11 12 11C12.55 11 13 10.55 13 10C13 9.45 12.55 9 12 9Z",fill:e.fill}),(0,i.jsx)("path",{d:"M10 12C9.45 12 9 12.45 9 13C9 13.55 9.45 14 10 14C10.55 14 11 13.55 11 13C11 12.45 10.55 12 10 12Z",fill:e.fill}),(0,i.jsx)("path",{d:"M8.5 9C7.95 9 7.5 9.45 7.5 10C7.5 10.55 7.95 11 8.5 11C9.05 11 9.5 10.55 9.5 10C9.5 9.45 9.05 9 8.5 9Z",fill:e.fill}),(0,i.jsx)("path",{d:"M6.5 12C5.95 12 5.5 12.45 5.5 13C5.5 13.55 5.95 14 6.5 14C7.05 14 7.5 13.55 7.5 13C7.5 12.45 7.05 12 6.5 12Z",fill:e.fill}),(0,i.jsx)("path",{d:"M20 0H0V9H2V2H18V9H20V0Z",fill:e.fill}),(0,i.jsx)("path",{d:"M10 7.75C12.89 7.75 15.25 10.11 15.25 13C15.25 15.89 12.89 18.25 10 18.25C7.11 18.25 4.75 15.89 4.75 13C4.75 10.11 7.11 7.75 10 7.75ZM10 6C6.13 6 3 9.13 3 13C3 16.87 6.13 20 10 20C13.87 20 17 16.87 17 13C17 9.13 13.87 6 10 6Z",fill:e.fill})]}))}var v=s(35518),b=s(31698),_=s(32256),w=s(51555),C=s(12275),k=s(44742),M=s(57773),S=s(65549),A=s(49336),P=s(26624),H=s(4653),I=s(67996),z=s(61390),T=s(84262),R=s(55217),V=s(61848),O=s(79826),E=s(23147),L=s(33787),G=s(2424),F=s(75341),N=s(86838),B=s(20191),Z=s(63788),D=s(27974),Y=s(55807),U=s(87234),W=s(18682);let Q={card:{yellow:{fill:"scoreRating.s65",Icon:e=>(0,i.jsx)(m.A,Object.assign({},e))},yellowRed:{Icon:e=>(0,i.jsx)(g.A,Object.assign({},e))},red:{fill:"error.default",Icon:e=>(0,i.jsx)(f.default,Object.assign({},e))}},goal:{football:{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(v.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(_.A,Object.assign({},e))},ownGoal:{fill:"error.default",Icon:e=>(0,i.jsx)(b.A,Object.assign({},e))}},futsal:{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(v.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(_.A,Object.assign({},e))},ownGoal:{fill:"error.default",Icon:e=>(0,i.jsx)(b.A,Object.assign({},e))},accumulatedPenalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(l.A,Object.assign({},e))}},minifootball:{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(v.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(_.A,Object.assign({},e))},accumulatedPenalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(l.A,Object.assign({},e))},ownGoal:{fill:"error.default",Icon:e=>(0,i.jsx)(b.A,Object.assign({},e))}},"american-football":{fieldGoal:{fill:"secondary.default",Icon:e=>(0,i.jsx)(r.A,Object.assign({},e))},rouge:{fill:"secondary.default",Icon:e=>(0,i.jsx)(o.A,Object.assign({},e))},twoPointConversion:{fill:"secondary.default",Icon:e=>(0,i.jsx)(u.A,Object.assign({},e))},touchdown:{fill:"secondary.default",Icon:e=>(0,i.jsx)(d.A,Object.assign({},e))},extraPoint:{fill:"secondary.default",Icon:e=>(0,i.jsx)(n.A,Object.assign({},e))},safety:{fill:"secondary.default",Icon:e=>(0,i.jsx)(c.A,Object.assign({},e))}},rugby:{onePoint:{fill:"secondary.default",Icon:e=>(0,i.jsx)(E.A,Object.assign({},e))},twoPoints:{fill:"secondary.default",Icon:e=>(0,i.jsx)(N.A,Object.assign({},e))},threePoints:{fill:"secondary.default",Icon:e=>(0,i.jsx)(G.A,Object.assign({},e))},try:{fill:"secondary.default",Icon:e=>(0,i.jsx)(F.A,Object.assign({},e))},penaltyTry:{fill:"secondary.default",Icon:e=>(0,i.jsx)(L.A,Object.assign({},e))}},"ice-hockey":{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(S.A,Object.assign({},e))},emptynet:{fill:"secondary.default",Icon:e=>(0,i.jsx)(S.A,Object.assign({},e))},ownGoal:{fill:"error.default",Icon:e=>(0,i.jsx)(A.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(P.A,Object.assign({},e))},powerplay:{fill:"secondary.default",Icon:e=>(0,i.jsx)(H.A,Object.assign({},e))},shorthanded:{fill:"secondary.default",Icon:e=>(0,i.jsx)(I.A,Object.assign({},e))}},handball:{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(w.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(C.A,Object.assign({},e))}},waterpolo:{regular:{fill:"secondary.default",Icon:e=>(0,i.jsx)(U.A,Object.assign({},e))},penalty:{fill:"secondary.default",Icon:e=>(0,i.jsx)(W.A,Object.assign({},e))}},bandy:{regular:{fill:"onSurface.nLv1",Icon:e=>(0,i.jsx)(h,Object.assign({},e))},penalty:{fill:"onSurface.nLv1",Icon:e=>(0,i.jsx)(x,Object.assign({},e))}},floorball:{regular:{fill:"onSurface.nLv1",Icon:e=>(0,i.jsx)(y,Object.assign({},e))},penalty:{fill:"onSurface.nLv1",Icon:e=>(0,i.jsx)(j,Object.assign({},e))}},regular:{Icon:()=>null}},substitution:{"ice-hockey":{goalkeeperIn:{fill:"primary.default",Icon:e=>(0,i.jsx)(k.A,Object.assign({},e))},goalkeeperOut:{fill:"primary.default",Icon:e=>(0,i.jsx)(M.A,Object.assign({},e))}},injury:{fill:"primary.default",Icon:e=>(0,i.jsx)(Z.A,Object.assign({},e))},temporary:{fill:"primary.default",Icon:e=>(0,i.jsx)(D.A,Object.assign({},e))},regular:{fill:"primary.default",Icon:e=>(0,i.jsx)(B.A,Object.assign({},e))}},penaltyShootout:{"ice-hockey":{scored:{fill:"secondary.default",Icon:e=>(0,i.jsx)(P.A,Object.assign({},e))}},waterpolo:{scored:{fill:"secondary.default",Icon:e=>(0,i.jsx)(W.A,Object.assign({},e))}},rugby:{scored:{fill:"secondary.default",Icon:e=>(0,i.jsx)(V.A,Object.assign({},e))},missed:{fill:"error.default",Icon:e=>(0,i.jsx)(R.A,Object.assign({},e))}},taker:{fill:"secondary.default",Icon:e=>(0,i.jsx)(O.A,Object.assign({},e))},scored:{fill:"secondary.default",Icon:e=>(0,i.jsx)(_.A,Object.assign({},e))},missed:{fill:"error.default",Icon:e=>(0,i.jsx)(T.A,Object.assign({},e))}},inGamePenalty:{taker:{fill:"secondary.default",Icon:e=>(0,i.jsx)(O.A,Object.assign({},e))},scored:{fill:"secondary.default",Icon:e=>(0,i.jsx)(_.A,Object.assign({},e))},missed:{fill:"error.default",Icon:e=>(0,i.jsx)(T.A,Object.assign({},e))}},varDecision:{regular:{fill:"primary.default",Icon:e=>(0,i.jsx)(Y.A,Object.assign({},e))}},suspension:{minifootball:{regular:{fill:"error.default",Icon:e=>(0,i.jsx)(a.A,Object.assign({},e))}},handball:{regular:{fill:"error.default",Icon:e=>(0,i.jsx)(a.A,Object.assign({},e))}},twoMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(a.A,Object.assign({},e))},"ice-hockey":{zeroMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))},twoMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))},fourMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))},fiveMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))},tenMinutes:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))},regular:{fill:"error.default",Icon:e=>(0,i.jsx)(z.A,Object.assign({},e))}}}};function K({incidentType:e,incidentClass:t,sport:s,title:a,svgProps:l,fallback:n=null}){var r,o,c,d,u,p;let h=(null==(o=null==(r=Q[e])?void 0:r[s])?void 0:o.regular)||(null==(c=Q[e])?void 0:c.regular);if(t&&(h=(null==(u=null==(d=Q[e])?void 0:d[s])?void 0:u[t])||(null==(p=Q[e])?void 0:p[t])||Q[e].regular),!(null==h?void 0:h.Icon))return n;let x=h.Icon;return(0,i.jsx)(x,Object.assign({width:24,height:24,fill:h.fill,title:a,style:{minWidth:(null==l?void 0:l.width)||"24px",display:"inline-block"}},l))}var $=s(76356),X=s(55729),q=s(947),J=s(62859),ee=s(78944);let et=e=>{var t;let s=(0,q.A)(),a=(0,X.useContext)(J.Ws),l=null!=(t=e.sport)?t:a,n=(0,ee.q6)(e.incidentType,e.incidentClass,l),r=n?s.formatMessage({id:n}):void 0;return(0,i.jsx)(K,{...e,sport:l,title:r,fallback:(0,i.jsx)($.az,{w:"lg"})})}},59754:(e,t,s)=>{s.d(t,{C:()=>l,Z:()=>n});var i=s(494),a=s(151);let l=(e,t,s)=>{var i,a,l;let n=null==(i=e.tournament.uniqueTournament)?void 0:i.id;if(n&&(null==s||null==(l=s.uniqueTournaments)||null==(a=l[n])?void 0:a[t]))return null==s?void 0:s.uniqueTournaments[n]},n=(e,t)=>l(e,t,(0,i.d4)(a.g))},61185:(e,t,s)=>{s.d(t,{A:()=>d});var i=s(6029),a=s(33144),l=s(21377),n=s(76356),r=s(55729),o=s(62859);function c(e){let{team:t,side:s,activeTeam:l,isBackgroundInverse:o,onTeamClick:c}=e,d=(0,r.useCallback)(()=>c(s),[c,s]),u=l===s;return(0,i.jsx)(n.ov,{h:"2xl",flexGrow:1,userSelect:"none",bg:u?"primary.highlight":o?"surface.s1":"surface.s2",br:"sm",onClick:d,cursor:"pointer",children:(0,i.jsx)(a.p,{size:24,id:t.id,name:t.name})})}function d(e){let{activeTeam:t,isBackgroundInverse:s,onTeamClick:a,...d}=e,{leftTeam:u,rightTeam:p}=(0,r.useContext)(o.y$);return(0,i.jsxs)(n.so,{justify:"space-between",gap:"lg",...d,children:[(0,i.jsx)(c,{team:u,side:l.cxP.Left,activeTeam:t,onTeamClick:a,isBackgroundInverse:s}),(0,i.jsx)(c,{team:p,side:l.cxP.Right,activeTeam:t,onTeamClick:a,isBackgroundInverse:s})]})}},61234:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(6029),a=s(91816),l=s(99064),n=s(55729),r=s(90248),o=s(65789),c=s(70591),d=s(84942),u=s(76945),p=s(73488);function h(e){let{manager:t,incidents:s,isBorderHidden:h,isCard:x=!1}=e,g=(0,d.z)(t),f=(0,n.useMemo)(()=>s?(0,u.h$)({id:t.id,incidents:s,type:"manager"}):{},[t,s]);return(0,i.jsx)(c.yI,{manager:t,style:{width:"100%"},children:(0,i.jsx)(o.HH,{isInverseDesktop:!0,isCard:!!x,children:(0,i.jsxs)(l.so,{children:[(0,i.jsx)(l.az,{px:"lg",py:"sm",children:(0,i.jsx)(a.d,{size:40,id:t.id,name:g})}),(0,i.jsx)(l.so,{borderBottom:h?void 0:"onSurface.nLv4",align:"center",flex:"1 1 auto",mr:"lg",children:(0,i.jsxs)(l.az,{flex:"1 1 auto",children:[(0,i.jsx)(l.so,{title:g,align:"center",children:(0,i.jsxs)(l.EY,{font:"body.medium",color:"onSurface.nLv1",mr:"xs",children:[(0,i.jsx)(l.az,{as:"span",mr:"xs",children:g}),f&&(0,i.jsx)(p.AG,{...f})]})}),(0,i.jsx)(l.EY,{font:"assistive.default",color:x?"primary.default":"onSurface.nLv3",mr:"xxs",ml:x?0:"xs",children:(0,i.jsx)(r.A,{id:"manager"})})]})})]})})})}},61777:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ej,excludedSeasonIds:()=>em});var i=s(6029),a=s(21377),l=s(44194),n=s(99064),r=s(55729),o=s(90248),c=s(45860),d=s(65789),u=s(62859),p=s(8703),h=s(16206),x=s(30182),g=s(10292),f=s(76356),m=s(947),y=s(54409),j=s(52839),v=s(70591),b=s(30971),_=s(73959),w=s(24159),C=s(41078),k=s(56008),M=s(65078);function S(e){let{statistic:t,topPlayer:s,sport:a,first:n,left:r}=e;return s?(0,i.jsxs)(f.so,{h:"5xl",w:"100%",align:"center",direction:r?"row":"row-reverse",gap:"lg",overflow:"hidden",_hover:{bg:"surface.s2"},cursor:"pointer",pl:r?"lg":void 0,pr:r?void 0:"lg",children:[(0,i.jsx)(g.t,{size:40,id:s.player.id,style:{display:"block"}}),(0,i.jsxs)(f.so,{overflow:"hidden",direction:"column",justify:"center",align:r?"flex-start":"flex-end",gap:"xs",children:[(0,i.jsx)(l.EY,{children:(0,i.jsx)(b.A,{sport:a,stat:s.statistics,selectedStat:t})}),(0,i.jsx)(l.EY,{w:"100%",textStyle:"assistive.default",color:"neutrals.nLv3",truncate:!0,display:"block",children:(0,i.jsx)(w.c,{entity:s.player,short:!0})})]})]}):n?(0,i.jsx)(C.A,{messageId:"yet.to.perform",isInverted:!r}):null}function A(e){let{statistic:t,homePlayer:s,awayPlayer:a,sport:l,first:n}=e;if(!s&&!a)return null;let o=(null==s?void 0:s.player)?v.uc:r.Fragment,c=(null==a?void 0:a.player)?v.uc:r.Fragment;return(0,i.jsxs)(f.so,{justify:s||n?"space-between":"flex-end",children:[(0,i.jsx)(o,{player:null==s?void 0:s.player,style:{width:"50%"},children:(0,i.jsx)(S,{statistic:t,topPlayer:s,sport:l,first:n,left:!0})}),(0,i.jsx)(c,{player:null==a?void 0:a.player,style:{width:"50%"},children:(0,i.jsx)(S,{statistic:t,topPlayer:a,sport:l,first:n})})]})}function P(e){let{statistic:t,homePlayers:s,awayPlayers:n,sport:o,type:c}=e,d=(0,m.A)(),[u,p]=(0,r.useState)(!1);return s.length||n.length?(0,i.jsxs)(f.az,{style:{userSelect:"none"},children:[(0,i.jsxs)(f.so,{bg:u?"surface.s2":void 0,pt:"md",pb:"xs",align:"center",justify:"center",onClick:()=>p(e=>!e),cursor:"pointer",children:[(0,i.jsx)(l.EY,{textStyle:"assistive.default",color:"neutrals.nLv3",mr:"xs",children:(0,_.y)(d,t,o,c===a.Vw_.playoffs)}),(0,i.jsx)(y.zQC,{icon:u?"chevron-up":"chevron-down",width:24,height:24,fill:"onSurface.nLv1"})]}),(0,i.jsx)(A,{statistic:t,homePlayer:s[0],awayPlayer:n[0],sport:o,first:!0}),u&&Array.from({length:4}).map((e,a)=>{let l=a+1;return(0,i.jsx)(A,{statistic:t,homePlayer:s[l],awayPlayer:n[l],sport:o},t+l)})]}):null}function H(e){let{homeTeamId:t,awayTeamId:s,sport:l,uniqueTournamentId:n,seasonId:o,type:u,gender:p}=e,{data:h,error:x}=(0,c.Ay)(a.cWY.topPlayers(t,n,o,u)),{data:g,error:m}=(0,c.Ay)(a.cWY.topPlayers(s,n,o,u)),y=(0,r.useMemo)(()=>(0,j.t)(l),[n]);return x&&m||!y?null:((null==h?void 0:h.topPlayers)||x)&&((null==g?void 0:g.topPlayers)||m)?(0,i.jsxs)(d.Zp,{children:[(0,i.jsx)(d.Zp.Header,{titleId:"top_players",values:{gender:null!=p?p:a.YT8.Male}}),(0,i.jsx)(f.az,{pb:{base:"sm",md:"md"},children:y.map(e=>(0,i.jsx)(P,{sport:l,statistic:e,homePlayers:((null==h?void 0:h.topPlayers[e])||[]).filter(e=>e.playedEnough),awayPlayers:((null==g?void 0:g.topPlayers[e])||[]).filter(e=>e.playedEnough),type:u},e))})]}):(0,i.jsx)(k.A,{})}function I(e){var t,s;let{event:a}=e,l=a.tournament.category.sport.slug,n=(0,M.g3)();return a.seasonStatisticsType&&(null==(t=a.tournament.uniqueTournament)?void 0:t.id)&&(null==(s=a.season)?void 0:s.id)&&-1!==j.u.indexOf(l)?(0,i.jsx)(H,{homeTeamId:n?a.awayTeam.id:a.homeTeam.id,awayTeamId:n?a.homeTeam.id:a.awayTeam.id,sport:l,uniqueTournamentId:a.tournament.uniqueTournament.id,seasonId:a.season.id,type:a.seasonStatisticsType,gender:a.awayTeam.gender}):null}var z=s(79853),T=s(22835),R=s(73011),V=s(54863),O=s(12174),E=s(50154),L=s(99382),G=s(26331),F=s(73088),N=s(28132),B=s(90715),Z=s(62827),D=s(83260),Y=s(30479),U=s(23695),W=s(12785),Q=s(19673),K=s(10234),$=s(52695);function X(e){let{event:t}=e,s=(0,G.A)(),l=(0,Q.y)(s);if(t.tournament.category.sport.slug!==a.QCR.Football||!t.hasEventPlayerStatistics)return null;let r=t.tournament.uniqueTournament?(0,i.jsx)($.O,{uniqueTournament:t.tournament.uniqueTournament}):(0,i.jsx)(K.J,{tournament:t.tournament});return(0,i.jsx)(d.Zp,{isInverseDesktop:!0,children:(0,i.jsxs)(n.so,{p:"md",gap:"lg",children:[(0,i.jsx)(y.G_L,{fill:"onSurface.nLv3",width:"24",height:"24",minW:24}),(0,i.jsxs)(n.az,{children:[(0,i.jsx)(n.EY,{block:!0,font:"body.small",color:"onSurface.nLv1",mb:"sm",children:(0,i.jsx)(o.A,{id:"rating_lineups_info",values:{name:r}})}),(0,i.jsxs)("a",{href:l,target:"_blank",rel:"noreferrer",children:[(0,i.jsx)(n.EY,{textTransform:"firstLetter",font:"assistive.default",color:"primary.default",children:(0,i.jsx)(o.A,{id:"read_more"})}),(0,i.jsx)(y.CCT,{width:"16",height:"16",ml:"xxs",fill:"primary.default",style:{verticalAlign:"middle"}})]})]})]})})}var q=s(67717),J=s(12047),ee=s(61234),et=s(5276),es=s(5998),ei=s(33144),ea=s(94604);let el=e=>{let{sportSlug:t,team:s}=e;return(0,i.jsx)(n.so,{w:"100%",grow:1,justify:"flex-start",pl:"lg",children:(0,i.jsx)(v.gT,{team:s,sport:t,children:(0,i.jsxs)(n.so,{align:"center",cursor:"pointer",gap:"lg",children:[(0,i.jsx)(ei.p,{id:s.id,name:s.name,size:40}),(0,i.jsx)(n.EY,{font:"display.large",children:(0,i.jsx)(ea.Rm,{team:s})})]})})})};function en(e){var t,s,l,o,c,p,h,x,g,f;let{event:m,leftTeam:y,rightTeam:j}=(0,r.useContext)(u.y$),v=m.tournament.category.sport.slug,b=v===a.QCR.Football,_=e.lineups.left.players.some(e=>e.substitute)||e.lineups.right.players.some(e=>e.substitute),w=!!(e.lineups.left.players.find(e=>e.statistics&&e.statistics.rating)||e.lineups.right.players.find(e=>e.statistics&&e.statistics.rating));return(0,i.jsxs)(n.so,{direction:"column",gap:"sm",children:[b&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.so,{gap:"sm",my:"sm",children:[(0,i.jsx)(el,{sportSlug:v,team:y}),(0,i.jsx)(el,{sportSlug:v,team:j})]}),(0,i.jsxs)(n.so,{gap:"sm",children:[(0,i.jsx)(n.so,{w:"100%",maxW:"50%",grow:1,children:(null==(t=e.managers)?void 0:t.leftManager)&&(0,i.jsx)(ee.A,{manager:null==(s=e.managers)?void 0:s.leftManager,isBorderHidden:!0,incidents:null==(l=e.incidents)?void 0:l.filter(e=>e.manager),isCard:!0})}),(0,i.jsx)(n.so,{w:"100%",maxW:"50%",grow:1,children:(null==(o=e.managers)?void 0:o.rightManager)&&(0,i.jsx)(ee.A,{manager:null==(c=e.managers)?void 0:c.rightManager,isBorderHidden:!0,incidents:null==(p=e.incidents)?void 0:p.filter(e=>e.manager),isCard:!0})})]})]}),!e.hasFormation&&b&&(0,i.jsxs)(d.Zp,{children:[(0,i.jsx)(d.Zp.Header,{titleId:"startingEleven.title"}),(0,i.jsxs)(n.so,{children:[(0,i.jsx)(es.A,{players:e.lineups.left.players.filter(e=>!e.substitute),team:y,manager:null==(h=e.managers)?void 0:h.leftManager,highlightStarters:!1,hasRating:w,event:m,...e},"left"),(0,i.jsx)(n.cG,{mt:"sm",mb:"md",vertical:!0,mx:"sm"}),(0,i.jsx)(es.A,{players:e.lineups.right.players.filter(e=>!e.substitute),team:j,manager:null==(x=e.managers)?void 0:x.rightManager,hasTopBorder:!1,highlightStarters:!1,hasRating:w,event:m,...e},"right")]})]}),_&&(0,i.jsxs)(d.Zp,{isInverseDesktop:b,children:[b&&(0,i.jsx)(d.Zp.Header,{titleId:"substitutions"}),(0,i.jsxs)(n.so,{children:[(0,i.jsx)(es.A,{players:b?e.lineups.left.players.filter(e=>e.substitute):e.lineups.left.players,team:y,manager:null==(g=e.managers)?void 0:g.leftManager,hasRating:w,event:m,...e},"left"),(0,i.jsx)(n.cG,{mt:"sm",mb:"md",vertical:!0,mx:"sm"}),(0,i.jsx)(es.A,{players:b?e.lineups.right.players.filter(e=>e.substitute):e.lineups.right.players,team:j,manager:null==(f=e.managers)?void 0:f.rightManager,hasTopBorder:!1,hasRating:w,event:m,...e},"right")]})]}),(0,i.jsx)(et.PM,{left:e.lineups.left.missingPlayers,right:e.lineups.right.missingPlayers})]})}function er(e){var t,s,l;let o=(0,J.Ay)({isSportMenuVisible:!0,isInMobileTabs:!0}),[c,p]=(0,r.useState)(a.cxP.Left),h=c===a.cxP.Left?e.lineups.left:e.lineups.right,{event:x,leftTeam:g,rightTeam:f}=(0,r.useContext)(u.y$),m=e.hasFormation?h.players.filter(e=>e.substitute):h.players,y=x.tournament.category.sport.slug===a.QCR.Football,j=c===a.cxP.Left?null==(t=e.managers)?void 0:t.leftManager:null==(s=e.managers)?void 0:s.rightManager,v=e.lineups.left.players.some(e=>e.substitute)||e.lineups.right.players.some(e=>e.substitute),b=e.lineups[c].players.filter(e=>!e.substitute),_=e.lineups[c].players.filter(e=>e.substitute),w=!!(e.lineups.left.players.find(e=>e.statistics&&e.statistics.rating)||e.lineups.right.players.find(e=>e.statistics&&e.statistics.rating)),C=y&&!!b.length;return(0,i.jsxs)(n.az,{children:[(0,i.jsx)(n.PI,{top:o,children:e=>(0,i.jsx)(n.az,{bg:[void 0,"surface.s1"],mt:-8,mx:-8,px:"sm",py:e?0:"sm",children:(0,i.jsx)(n.az,{bg:"surface.s1",br:e?void 0:"lg",elevation:[e?void 0:2,void 0],w:[e?"100vw":"100%","100%"],mx:[e?-8:0,0],py:["sm",0],children:(0,i.jsx)(q.n,{px:{mdDown:"sm"},gap:"sm",activeTeam:c,onTeamClick:p})})})}),(0,i.jsxs)(n.so,{direction:"column",gap:"sm",children:[j&&(0,i.jsx)(ee.A,{manager:j,incidents:null==(l=e.incidents)?void 0:l.filter(e=>e.manager),isCard:!0,isBorderHidden:!0}),!e.hasFormation&&(0,i.jsxs)(d.Zp,{isInverseDesktop:!0,children:[C&&(0,i.jsx)(d.Zp.Header,{titleId:"startingEleven.title",as:"h4"}),(0,i.jsx)(es.A,{hideTeamHeader:!0,players:y?b:m,team:c===a.cxP.Left?g:f,highlightStarters:!y,hasRating:w,event:x,...e},c)]}),v&&y&&!!_.length&&(0,i.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(d.Zp.Header,{titleId:"substitutions",as:"h4"}),(0,i.jsx)(es.A,{hideTeamHeader:!0,players:_,team:c===a.cxP.Left?g:f,hasRating:w,event:x,...e},c)]}),!!(e.lineups.left.missingPlayers||e.lineups.right.missingPlayers)&&(0,i.jsx)(et.Sb,{missingPlayers:h.missingPlayers})]})]})}function eo(e){let{isMobile:t,isDesktop:s}=(0,l.$c)(),{location:a}=(0,r.useContext)(u.y$),n=s&&a===u.cb.EventPage;return t||!n?(0,i.jsx)(er,{...e}):(0,i.jsx)(en,{...e})}function ec(e){let t,a,c=(0,G.A)(),{event:d,location:p}=(0,r.useContext)(u.y$),{bestPlayer:h}=(0,O.Y)(d),{isDesktop:x}=(0,l.$c)(),g=x&&p===u.cb.EventPage,{isAdsTestTreatment:f}=(0,E.Q)();try{t=e.lineups.left.formation?(0,B.V)(e.lineups.left.formation,e.lineups.left.players.filter(e=>!e.substitute)):void 0,a=e.lineups.right.formation?(0,B.V)(e.lineups.right.formation,e.lineups.right.players.filter(e=>!e.substitute)):void 0}catch(e){console.error(e)}let m=!!(t&&a),j=window.location.host+F.z.getTranslatedRoute(c,"event",{id:d.customId,name:d.slug,sport:d.tournament.category.sport.slug}).route,v="#"+(0,Y.HL)({id:d.id,tab:N.H.Lineups}),{isShareEnabled:b,componentRef:_,shareButton:w}=function(e,t){var a;let[l,c,d]=(0,D.A)("sofa.isComponentShareEnabled",!!(null==(a=window.navigator.clipboard)?void 0:a.write)),[u,p]=(0,r.useState)(!1),h=(0,r.useRef)(null),x={autoClose:5e3,closeButton:!1,className:"sofa-toast--info",position:"bottom-center"},g=(0,r.useCallback)(async()=>{if(h.current&&l)try{p(!0);let e=(await s.e(3933).then(s.t.bind(s,63067,23))).default,a=await e(h.current,{useCORS:!0,allowTaint:!0}),l=await new Promise(e=>a.toBlob(e)),r=new Blob([t||""],{type:"text/plain"});l&&(await window.navigator.clipboard.write([new ClipboardItem({"image/png":l,"text/plain":r})]),(0,Z.MZ)((0,i.jsxs)(n.so,{align:"center",children:[(0,i.jsx)(y.G_L,{fill:"onColor.primary",mr:"lg"}),(0,i.jsx)(n.EY,{block:!0,color:"onColor.primary",font:"display.small",children:(0,i.jsx)(o.A,{id:"basic.copiedToClipboard"})})]}),x))}catch(e){c(!1),(0,Z.MZ)((0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.so,{align:"center",children:[(0,i.jsx)(y.cgL,{fill:"onColor.primary",mr:"md"}),(0,i.jsx)(n.EY,{block:!0,c:"onColor.primary",font:"display.small",children:(0,i.jsx)(o.A,{id:"error.anErrorOccurred"})})]}),e.message&&(0,i.jsx)(n.EY,{block:!0,c:"onColor.primary",font:"body.small",mt:"sm",children:e.message})]}),{...x,className:"sofa-toast--error"})}finally{p(!1)}},[h.current,u,l]),f=d&&l?(0,i.jsx)(o.A,{id:"basic.share",children:t=>(0,i.jsx)(n.$n,{"aria-label":String(t),size:"xs",tertiary:!0,disabled:u,style:u?{cursor:"wait"}:void 0,onClick:g,children:e||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{id:"basic.share"}),(0,i.jsx)(y.VJ,{fill:"surface.s1",ml:"xxs",width:16,height:16})]})})}):null;return{isGeneratingScreenshot:u,shareButton:f,componentRef:h,isShareEnabled:l}}((0,i.jsxs)(n.so,{justify:"center",align:"center",children:[(0,i.jsx)(o.A,{id:"share_match_lineups"}),(0,i.jsx)(y.VJ,{fill:"surface.s1",ml:"xxs",width:"16",height:"16"})]}),j+v);return(0,i.jsxs)(n.az,{children:[m&&(0,i.jsx)(n.az,{bg:["surface.s1",void 0],px:[0,g&&!f?"sm":0],children:(0,i.jsx)(W.Ko,{...e,leftFormation:t,rightFormation:a,ref:_,playerOfTheMatchId:null==h?void 0:h.player.id,isShareEnabled:b,shareButton:w})}),(0,i.jsxs)(n.so,{direction:"column",gap:"sm",p:"sm",children:[(0,i.jsxs)(n.so,{direction:g?"column-reverse":"column",gap:"sm",children:[(0,i.jsx)(eo,{...e,hasFormation:m,playerOfTheMatchId:null==h?void 0:h.player.id}),(0,i.jsx)(U.K,{})]}),(0,i.jsx)(X,{event:d}),(0,i.jsx)(L.X,{event:d})]})]})}var ed=s(76868);function eu(e){let{lineups:t,managers:s}=e,[l,o]=(0,r.useState)(a.cxP.Left),{event:c,leftTeam:p,rightTeam:h}=(0,r.useContext)(u.y$),x=(0,J.Ay)(),[g,f,m]=l===a.cxP.Left?[p,s.leftManager,t.left]:[h,s.rightManager,t.right];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.az,{bg:"surface.s1",w:"100%",position:"sticky",top:[x,0],zIndex:n.Py.Sticky,p:"sm",children:(0,i.jsx)(q.n,{activeTeam:l,onTeamClick:e=>o(e)})}),(0,i.jsxs)(n.so,{p:"sm",gap:"sm",direction:"column",children:[(0,i.jsxs)(d.Zp,{isInverseDesktop:!0,children:[(0,i.jsx)(d.Zp.Header,{titleId:"probable_pitchers"}),(0,i.jsx)(es.A,{players:m.players,team:g,event:c,hideTeamHeader:!0}),0===m.players.length&&(0,i.jsx)(ed.p,{graphic:"no-data",descriptionMessageId:"probable_pitchers_empty"})]}),!!(t.left.missingPlayers||t.right.missingPlayers)&&(0,i.jsx)(et.Sb,{missingPlayers:m.missingPlayers})]})]})}function ep(){return(0,i.jsx)(n.az,{h:900})}function eh(){let{event:e}=(0,r.useContext)(u.y$),{managers:t}=(0,z.K)(e),{lineups:s,confirmed:l,error:n}=(0,V.Ir)({jerseyStyle:"fancy"}),{data:o}=(0,c.Ay)(a.bnp.incidents(e.id),(0,p.rf)(e));return n?null:s?l?(0,i.jsx)(ec,{lineups:s,incidents:null==o?void 0:o.incidents,managers:t,confirmed:l,showPlayerStatistics:!1}):(0,i.jsx)(eu,{lineups:s,managers:t}):(0,i.jsx)(ep,{})}var ex=s(31130),eg=s(27778),ef=s(75318);let em=[17564,17565,17566,17567,17568,17569,17570,17571,1151,2636,16,2531,7528],ey=e=>{let{showPlayerStatistics:t}=e,{event:s,location:g}=(0,r.useContext)(u.y$),f=s.tournament.category.sport.slug,{managers:m}=(0,z.K)(s),{lineups:y,confirmed:j,error:v}=(0,V.Ir)({jerseyStyle:f===a.QCR.Football?"clean":"fancy"}),{data:b}=(0,c.Ay)(a.bnp.incidents(s.id),(0,p.rf)(s)),{hasPregameTopPlayers:_}=(0,T.M)(s),{isDesktop:w}=(0,l.$c)(),C=w&&g===u.cb.EventPage,k=s.season&&em.includes(s.season.id);if(_&&(v||y&&!j))return(0,i.jsxs)(n.so,{direction:"column",p:["sm",0],gap:["sm","md"],children:[(0,i.jsx)(I,{event:s}),(0,i.jsx)(x.m,{home:null==y?void 0:y.left.missingPlayers,away:null==y?void 0:y.right.missingPlayers})]});if(!y)return(0,i.jsx)(eg.A,{});let M=f!==a.QCR.Football?(0,i.jsx)(d.Zp.Header,{titleId:R.bU.includes(f)?"boxScore":"players",values:{gender:s.gender||a.YT8.Male},as:"h2"}):null;return w&&t?(0,i.jsxs)(d.HH,{isCard:C,children:[M,(0,i.jsxs)(n.tU,{variant:"secondary",initialValue:1,children:[(0,i.jsxs)(n.az,{pt:"md",px:"md",children:[(0,i.jsx)(n.tU.Tab,{tabKey:1,children:(0,i.jsx)(o.A,{id:"lineups"})}),!k&&(0,i.jsx)(n.tU.Tab,{tabKey:2,children:(0,i.jsx)(o.A,{id:"player_stats"})})]}),(0,i.jsx)(n.tU.Panel,{tabKey:1,children:(0,i.jsx)(ec,{lineups:y,incidents:null==b?void 0:b.incidents,managers:m,confirmed:j})}),!k&&(0,i.jsx)(n.tU.Panel,{tabKey:2,children:(0,i.jsx)(h.A,{lineups:y})})]})]}):(0,i.jsxs)(d.HH,{isCard:C,children:[M,(0,i.jsx)(ec,{lineups:y,incidents:null==b?void 0:b.incidents,managers:m,confirmed:j,showPlayerStatistics:t})]})};function ej(e){let{hasLineups:t,showPlayerStatistics:s}=e,{event:l}=(0,r.useContext)(u.y$),n=l.tournament.category.sport.slug,o=n===a.QCR.ESports&&(0,p.f2)(l.tournament.category.id),{couldHavePregameTopPlayers:c}=(0,T.M)(l);return o||!1===t&&!c?null:n===a.QCR.Cricket?(0,i.jsx)(ex.A,{}):n===a.QCR.Rugby?(0,i.jsx)(ef.u,{}):n===a.QCR.Baseball?(0,i.jsx)(eh,{}):(0,i.jsx)(ey,{showPlayerStatistics:s})}},67717:(e,t,s)=>{s.d(t,{n:()=>i.A});var i=s(61185)},71306:(e,t,s)=>{s.d(t,{A:()=>r,I:()=>n});var i=s(55729),a=s(48886),l=s(99586);let n=(e,t)=>{let s=t.short||e.stat.short;return s&&t.short===e.stat.short||!s&&e.stat.value===t.value?{stat:e.stat,dir:e.dir===a.U.DESC?a.U.ASC:a.U.DESC}:{stat:t,dir:a.U.DESC}},r=(e,t,s)=>{let[r,o]=(0,i.useState)({stat:t,dir:a.U.DESC}),c=(0,l.C)(e,r,t,s),d=(0,i.useCallback)(e=>{o(t=>n(t,e))},[]);return{sortConfig:r,setSortConfig:o,sortedPlayers:c,updateSortStatistic:d}}},73488:(e,t,s)=>{s.d(t,{AG:()=>o,FU:()=>r,X0:()=>c});var i=s(6029),a=s(99064),l=s(54409),n=s(59709);let r=e=>{let{isInjury:t}=e;return t?(0,i.jsx)(l.NcS,{icon:"substitution-injured"}):(0,i.jsx)(l.NcS,{icon:"substitution"})},o=e=>{let{hasYellowCard:t,hasRedCard:s,hasYellowRedCard:a}=e;return a?(0,i.jsx)(l.NcS,{icon:"card-double-yellow",width:"16",height:"16"}):s?(0,i.jsx)(l.NcS,{icon:"card",width:"16",height:"16",fill:"error.default"}):t?(0,i.jsx)(l.NcS,{icon:"card",width:"16",height:"16",fill:"scoreRating.s65"}):null},c=e=>{let{goalsScored:t,hasScoredPenalty:s,hasScoredOwnGoal:r,inField:o}=e;if(r&&!t)return(0,i.jsx)(l.NcS,{icon:"football-own-goal",width:"16",height:"16",fill:"error.default"});if(s&&1===t)return(0,i.jsx)(l.NcS,{icon:"football-penalty",width:"16",height:"16",fill:"secondary.default"});if(t){if(o){let e=t>1;return(0,i.jsxs)(a.az,{position:"relative",left:e?"6":void 0,ml:"xxs",children:[e&&(0,i.jsx)(a.EY,{font:"table.small",color:"secondary.default",position:"relative",children:t}),(0,i.jsx)(n.M,{incidentType:"goal",incidentClass:"regular",svgProps:{fill:"secondary.default",width:16,height:16}})]})}return(0,i.jsx)(a.az,{position:"relative",ml:"xxs",children:Array(t).fill(0).map((e,t)=>(0,i.jsx)(n.M,{incidentType:"goal",incidentClass:"regular",svgProps:{fill:"secondary.default",width:16,height:16}},"goal-".concat(t)))})}return null}},73959:(e,t,s)=>{s.d(t,{y:()=>o});var i=s(21377),a=s(50677),l=s(16533),n=s(27892);let r={[i.QCR.Football]:["accuratePasses","tackles","interceptions","clearances","successfulDribbles","accurateLongBalls","keyPasses","totalShots","shotsOnTarget","possessionLost","saves","mostConceded","leastConceded"],[i.QCR.Basketball]:["plusMinus","pir"],[i.QCR.AmericanFootball]:["defensiveTotalTackles","plusMinus"],[i.QCR.IceHockey]:["penaltyMinutes"],[i.QCR.Handball]:[],[i.QCR.Cricket]:[]};function o(e,t,s,o){var c;let d=(null==(c=r[s])?void 0:c.indexOf(t))>-1;"expectedGoals"===t&&(t="football_stat_expected_goals_scored"),"expectedAssists"===t&&(t="football_stat_expected_assists_assisted"),"redCards"===t&&(t="red_cards");let u=e.formatMessage({id:"per_match"}),p=e.formatMessage({id:"playoffs"}),h=s===i.QCR.Cricket?l:a,x=e.formatMessage({id:"rating"===t?"average_sofascore_rating":(0,n.O)(h,t,s)});return d&&(x="".concat(x," ").concat(u.toLowerCase())),o&&(x="".concat(x," - ").concat(p)),x}},75318:(e,t,s)=>{s.d(t,{u:()=>D});var i=s(6029),a=s(44194),l=s(99064),n=s(55729),r=s(65789),o=s(62859),c=s(90248),d=s(33007),u=s(33144),p=s(8703),h=s(16620),x=s(48886),g=s(70591),f=s(24159),m=s(54863),y=s(55529),j=s(61234),v=s(5998),b=s(41735);let _=()=>{let{colors:e}=(0,b.useTheme)();return(0,i.jsx)("svg",{viewBox:"0 0 344 608",children:(0,i.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,i.jsx)("path",{fill:e.graphicsTerrain.football,d:"M0 0h344v608H0z"}),(0,i.jsx)("g",{fill:e.onSurface.nLv5,children:(0,i.jsx)("path",{d:"M4 52h336v72H4zM4 196h336v72H4zM4 340h336v72H4zM4 484h336v72H4z"})}),(0,i.jsxs)("g",{fill:e.surface.s1,fillRule:"nonzero",children:[(0,i.jsx)("path",{d:"M340 303H4v289h336V303zM5.953 305.001h332.094v285H5.953v-285z"}),(0,i.jsx)("path",{d:"M4 556.011h336v-2.054H4zM4 446.011h336v-2.054H4z"}),(0,i.jsx)("path",{d:"M28 458.011v-26h2v26zM134 532.012h25.436v-2.054H134zM112 356.012h26v-2.054h-26zM159 356.012h26v-2.054h-26zM205 356.012h26v-2.054h-26zM184 532.012h25.436v-2.054H184zM92 532.012H66v-2.054h12v-24.85h2v24.85h12zM92 356.027H80v11.985h-2v-11.985H66v-2.03h12v-11.985h2v11.985h12zM327 356.027h-12v11.985h-2v-11.985h-12v-2.03h12v-11.985h2v11.985h12zM42 356.027H30v11.985h-2v-11.985H16v-2.03h12v-11.985h2v11.985h12zM277 356.027h-12v11.985h-2v-11.985h-12v-2.03h12v-11.985h2v11.985h12zM280.339 532.012H255v-2.054h11.74v-24.85h2.054v24.85h11.545zM330.339 532.012H305v-2.054h11.74v-24.85h2.054v24.85h11.545zM42 532.012H16v-2.054h12v-24.85h2v24.85h12zM78 458.012v-26h2v26zM266.63 458.011v-26h2.054v26zM28 316.012h2v-12h-2zM78 316.012h2v-12h-2zM263 316.012h2v-12h-2zM313 316.012h2v-12h-2zM316.728 458.011v-26h2.055v26zM190.127 600.012l-3.509-34.731h-29.355l-3.507 34.693-1.965-.045 4.314-43.917h2.065l-.71 7.215h28.962l-.703-7.215h1.981l4.774 43.962z"}),(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{d:"M340 305.011H4v-289h336v289zM5.953 303.01h332.094v-285H5.953v285z"}),(0,i.jsx)("path",{d:"M4 52h336v2.054H4zM4 162h336v2.054H4z"}),(0,i.jsx)("path",{d:"M28 150v26h2v-26zM134 75.999h25.436v2.054H134zM112 251.999h26v2.054h-26zM159 251.999h26v2.054h-26zM205 251.999h26v2.054h-26zM184 75.999h25.436v2.054H184zM92 75.999H66v2.054h12v24.85h2v-24.85h12zM92 251.984H80V240h-2v11.985H66v2.03h12v11.985h2v-11.985h12zM327 251.984h-12V240h-2v11.985h-12v2.03h12v11.985h2v-11.985h12zM42 251.984H30V240h-2v11.985H16v2.03h12v11.985h2v-11.985h12zM277 251.984h-12V240h-2v11.985h-12v2.03h12v11.985h2v-11.985h12zM280.339 75.999H255v2.054h11.74v24.85h2.054v-24.85h11.545zM330.339 75.999H305v2.054h11.74v24.85h2.054v-24.85h11.545zM42 75.999H16v2.054h12v24.85h2v-24.85h12zM78 149.999v26h2v-26zM266.63 150v26h2.054v-26zM28 291.999h2v12h-2zM78 291.999h2v12h-2zM263 291.999h2v12h-2zM313 291.999h2v12h-2zM316.728 150v26h2.055v-26zM190.127 7.999l-3.509 34.731h-29.355l-3.507-34.693-1.965.045 4.314 43.917h2.065l-.71-7.215h28.962L185.72 52h1.981l4.774-43.962z"})]})]})]})})},w=e=>{let{type:t,children:s}=e;return(0,i.jsxs)(l.az,{position:"relative",children:[(0,i.jsx)(_,{}),(0,i.jsx)(l.az,{position:"absolute",w:"100%",h:"100%",px:"1%",py:"15%",left:0,top:0,children:(0,i.jsx)(l.az,{w:"100%",h:"100%",display:"grid",style:{gridTemplateColumns:"repeat(".concat("fifteens"===t?5:4,", 1fr)"),gridTemplateRows:"repeat(".concat(7,", 1fr)")},children:s})})]})};var C=s(12605),k=s(19991),M=s(21377),S=s(54409),A=s(84942),P=s(76945),H=s(73488);let I=(0,b.default)(g.uc).withConfig({componentId:"sc-2735a21f-0"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:center;position:relative;z-index:",";border-radius:4px;text-align:center;cursor:pointer;transition:opacity 0.1s ease-in-out;width:56px;height:72px;&:hover{opacity:0.8;}"],l.Py.Button);function z(e){var t,s,a;let{player:r,incidents:o,onClick:d,jersey:u,color:p,useShortName:h,showSubstitutionNames:x=!0,showGoalScorer:g=!0,nameWidth:f,hasRatings:m,isPlayerOfTheMatch:y}=e,j=(0,n.useMemo)(()=>o?(0,P.h$)({id:r.player.id,incidents:o,useShortName:h}):{},[r,o]),v=null==(t=r.statistics)?void 0:t.rating,b=1;void 0===v&&r.avgRating&&(v=r.avgRating,b=2);let _=(0,A.z)(r.player,(0,P.kx)(r,h)),w=(0,P.sP)(_,r.captain);return(0,i.jsxs)(I,{onClick:d,player:r.player,sportSlug:M.QCR.Rugby,children:[y&&(0,i.jsx)(S.ue7,{w:16,h:16,fill:(0,k.Et)(null==(s=r.statistics)?void 0:s.rating),position:"absolute",top:-16,left:"calc(50% - 8px)"}),(0,i.jsx)(l._V,{w:"28px",h:"32px",src:u,alt:""}),(0,i.jsx)(l.EY,{position:"absolute",top:"3px",left:"calc(50% - 12px)",align:"center",w:"xl",font:"table.large",fontSize:r.jerseyNumber&&r.jerseyNumber.length>=3?12:void 0,letterSpacing:"-0.2px",mt:r.jerseyNumber&&r.jerseyNumber.length>=3?"xxs":void 0,color:p?"#".concat(p.fancyNumber):"onSurface.nLv1",children:r.jerseyNumber}),j.substitutionIn&&(0,i.jsx)(l.az,{position:"absolute",top:"0",left:"-2",children:(0,i.jsx)(H.FU,{isInjury:j.substitutionIn.isInjury})}),!j.substitutionIn&&j.substitutionOut&&(0,i.jsx)(l.az,{position:"absolute",top:"0",left:"-2",children:(0,i.jsx)(H.FU,{isInjury:j.substitutionOut.isInjury})}),m&&(0,i.jsx)(l.az,{position:"absolute",top:"lg",left:-2,children:(0,i.jsx)(C.A,{rating:v,format:"box",size:"sm",decimalPoints:b})}),(0,i.jsx)(l.EY,{align:"center",lineHeight:1,font:"assistive.default",color:"onSurface.nLv1",pt:"xs",title:w,w:f,style:{hyphens:"auto"},children:w}),x&&(null==(a=j.substitutionIn)?void 0:a.forPlayer)&&(0,i.jsxs)(l.EY,{align:"center",lineHeight:1,font:"table.small",color:"onSurface.nLv3",title:j.substitutionIn.forPlayer,children:[(0,i.jsx)(c.A,{id:"injury_status_out"}),": ",j.substitutionIn.forPlayer]}),(0,i.jsx)(l.az,{position:"absolute",top:"0",right:"-2",children:(0,i.jsx)(H.AG,{...j})}),g&&(0,i.jsx)(l.az,{position:"absolute",top:"lg",right:"-2",children:(0,i.jsx)(H.X0,{...j,inField:!0})})]})}let T=e=>{let{type:t="fifteens",players:s,incidents:a,jersey:n,jerseyNumberColor:r,onPlayerClick:o}=e,c="fifteens"===t?y.vD:y.Xj,d="fifteens"===t?y.Cy:y.uU,u=(e,t)=>{o&&(e.preventDefault(),o(t))};return(0,i.jsx)(w,{type:t,children:s.map(e=>e.shirtNumber?(0,i.jsx)(l.so,{position:"relative",justify:"center",align:"center",style:c[e.shirtNumber],children:(0,i.jsx)(l.az,{position:"absolute",style:d[e.shirtNumber],children:(0,i.jsx)(z,{player:e,incidents:a,jersey:n,color:r,nameWidth:64,showSubstitutionNames:!1,showGoalScorer:!1,onClick:t=>u(t,e.player)})})},e.player.id):null)})},R=()=>{let{event:e,team:t,incidents:s,manager:a,jersey:n,startingPlayers:r,jerseyNumberColor:o,substitutePlayers:c}=(0,m.rR)(),{openEventPlayerStatistics:d}=(0,h.d)();return e.isEditor?(0,i.jsxs)(l.so,{direction:"column",gap:"md",children:[(0,i.jsx)(g.gT,{team:t,sport:(0,p.c5)(e),children:(0,i.jsxs)(l.so,{gap:"lg",align:"center",children:[(0,i.jsx)(u.p,{size:40,id:t.id,name:t.name}),(0,i.jsx)(l.EY,{font:"display.large",children:(0,i.jsx)(f.c,{entity:t})})]})}),(0,i.jsx)(l.az,{br:"sm",overflow:"hidden",children:(0,i.jsx)(T,{type:e.tournament.category.sportVariant===y.WM?"sevens":"fifteens",players:r,incidents:s,jersey:n,jerseyNumberColor:o,onPlayerClick:e.hasEventPlayerStatistics?t=>d({event:e,player:t},x._.Lineups):void 0})}),a&&(0,i.jsx)(j.A,{manager:a,incidents:null==s?void 0:s.filter(e=>e.manager),isCard:!0,isBorderHidden:!0})]}):(0,i.jsxs)(l.so,{direction:"column",children:[(0,i.jsx)(g.gT,{team:t,sport:(0,p.c5)(e),children:(0,i.jsxs)(l.so,{gap:"lg",align:"center",px:"lg",py:"sm",hoverBg:"surface.s2",children:[(0,i.jsx)(u.p,{size:40,id:t.id,name:t.name}),(0,i.jsx)(l.EY,{font:"display.large",children:(0,i.jsx)(f.c,{entity:t})})]})}),(0,i.jsx)(v.A,{manager:a,hideTeamHeader:!0,team:t,event:e,players:[...r,...c],incidents:s})]})};var V=s(45527);let O=()=>{let{event:e,team:t,substitutePlayers:s,incidents:a}=(0,m.rR)();return(0,i.jsx)(v.A,{hideTeamHeader:!0,event:e,team:t,players:s,incidents:a})},E=()=>{let{event:e}=(0,n.useContext)(o.y$),{lineups:t}=(0,m.Ir)();return e.isEditor&&(0,P.kr)(t)?(0,i.jsxs)(l.az,{children:[(0,i.jsx)(l.EY,{font:"display.medium",align:"center",display:"block",pt:"xl",pb:"lg",children:(0,i.jsx)(c.A,{id:"substitutions"})}),(0,i.jsxs)(l.so,{children:[(0,i.jsx)(l.az,{flex:"1 1 0",children:(0,i.jsx)(V.i,{side:"left",children:(0,i.jsx)(O,{})})}),(0,i.jsx)(l.cG,{vertical:!0,mx:"md"}),(0,i.jsx)(l.az,{flex:"1 1 0",children:(0,i.jsx)(V.i,{side:"right",children:(0,i.jsx)(O,{})})})]})]}):null},L=()=>(0,i.jsxs)(l.az,{p:"sm",children:[(0,i.jsxs)(l.so,{children:[(0,i.jsx)(l.az,{flex:"1 1 0",children:(0,i.jsx)(V.i,{side:"left",children:(0,i.jsx)(R,{})})}),(0,i.jsx)(l.cG,{vertical:!0,mx:"md"}),(0,i.jsx)(l.az,{flex:"1 1 0",children:(0,i.jsx)(V.i,{side:"right",children:(0,i.jsx)(R,{})})})]}),(0,i.jsx)(E,{})]}),G=()=>(0,i.jsx)(l.az,{py:"lg",children:(0,i.jsxs)(l.tU,{variant:"secondary",children:[(0,i.jsxs)(l.az,{px:"lg",children:[(0,i.jsx)(l.tU.Tab,{children:(0,i.jsx)(c.A,{id:"lineups"})}),(0,i.jsx)(l.tU.Tab,{children:(0,i.jsx)(c.A,{id:"rugby_box_score"})})]}),(0,i.jsx)(l.tU.Panel,{children:(0,i.jsx)(L,{})}),(0,i.jsx)(l.tU.Panel,{children:(0,i.jsx)(l.az,{px:"sm",pt:"md",children:(0,i.jsx)(d.default,{showDivider:!1})})})]})}),F=()=>{let{openEventPlayerStatistics:e}=(0,h.d)(),{event:t,team:s,manager:n,incidents:r,jersey:o,startingPlayers:d,substitutePlayers:u,jerseyNumberColor:p}=(0,m.rR)(),{isDesktop:g}=(0,a.$c)();return t.isEditor?(0,i.jsxs)(l.az,{children:[(0,i.jsx)(T,{type:t.tournament.category.sportVariant===y.WM?"sevens":"fifteens",players:d,incidents:r,jersey:o,jerseyNumberColor:p,onPlayerClick:t.hasEventPlayerStatistics?s=>e({event:t,player:s},x._.Lineups):void 0}),(0,i.jsxs)(l.so,{direction:"column",py:"md",children:[n&&(0,i.jsx)(l.az,{px:"sm",children:(0,i.jsx)(j.A,{manager:n,incidents:null==r?void 0:r.filter(e=>e.manager),isCard:!0,isBorderHidden:!0})}),u.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.EY,{font:"display.medium",align:"center",pt:"xl",children:(0,i.jsx)(c.A,{id:"substitutions"})}),(0,i.jsx)(v.A,{hideTeamHeader:!0,team:s,event:t,players:u,incidents:r})]})]})]}):(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(l.az,{px:"sm",py:"sm",children:(0,i.jsx)(j.A,{manager:n,incidents:null==r?void 0:r.filter(e=>e.manager),isCard:g,isBorderHidden:!0})}),(0,i.jsx)(v.A,{hideTeamHeader:!0,team:s,event:t,players:[...d,...u],incidents:r})]})},N={height:"32px",display:"flex",justifyContent:"center",alignItems:"center",padding:0},B=()=>{let{team:e}=(0,m.rR)();return(0,i.jsx)(u.p,{size:24,id:e.id,name:e.name})},Z=()=>(0,i.jsx)(l.az,{p:"sm",children:(0,i.jsx)(r.Zp,{isInverseDesktop:!0,children:(0,i.jsxs)(l.tU,{variant:"secondary",initialValue:M.cxP.Left,fullWidthTabs:!0,children:[(0,i.jsxs)(l.so,{p:"sm",children:[(0,i.jsx)(l.tU.Tab,{tabKey:M.cxP.Left,style:N,children:(0,i.jsx)(V.i,{side:"left",children:(0,i.jsx)(B,{})})}),(0,i.jsx)(l.az,{w:"lg"}),(0,i.jsx)(l.tU.Tab,{tabKey:M.cxP.Right,style:N,children:(0,i.jsx)(V.i,{side:"right",children:(0,i.jsx)(B,{})})})]}),(0,i.jsx)(l.tU.Panel,{tabKey:M.cxP.Left,children:(0,i.jsx)(V.i,{side:"left",children:(0,i.jsx)(F,{})})}),(0,i.jsx)(l.tU.Panel,{tabKey:M.cxP.Right,children:(0,i.jsx)(V.i,{side:"right",children:(0,i.jsx)(F,{})})})]})})});function D(){let{event:e,location:t}=(0,n.useContext)(o.y$),{isDesktop:s}=(0,a.$c)(),c=s&&t===o.cb.EventPage,{lineups:d,error:u}=(0,m.Ir)({jerseyStyle:"fancy"});return u?null:c?(0,i.jsxs)(r.Zp,{children:[(0,i.jsx)(r.Zp.Header,{titleId:"players"}),d?e.hasEventPlayerStatistics?(0,i.jsx)(G,{}):(0,i.jsx)(L,{}):(0,i.jsx)(l.az,{h:900})]}):d?(0,i.jsx)(Z,{}):(0,i.jsx)(l.az,{h:900})}},76945:(e,t,s)=>{s.d(t,{sP:()=>x,h$:()=>u,ZB:()=>o,H_:()=>f,lV:()=>g,kr:()=>d,kx:()=>h});var i=s(4967),a=s(55529);function l(e){let t={sum:0,count:0};return e.forEach(e=>{e.forEach(e=>{e.player.height&&(t.sum+=e.player.height,t.count+=1)})}),t.count>=7?Math.round(10*t.sum/t.count)/10:void 0}function n(e,t){let s={sum:0,count:0};return e.forEach(e=>{e.forEach(e=>{e.player.dateOfBirthTimestamp&&(s.sum+=(0,i.Dr)(e.player.dateOfBirthTimestamp,t),s.count+=1)})}),s.count>=7?Math.round(10*s.sum/s.count)/10:void 0}function r(e){let t={sum:0,count:0,currency:""};return e.forEach(e=>{e.forEach(e=>{var s;(null==(s=e.player.proposedMarketValueRaw)?void 0:s.value)&&(t.sum+=e.player.proposedMarketValueRaw.value,t.currency=e.player.proposedMarketValueRaw.currency,t.count+=1)})}),t.count>=7?{value:t.sum,currency:t.currency}:void 0}function o(e,t,s){let i={};return i[a.kA.Age]={messageId:"football_lineups_starters_average_age",leftTeamValue:n(e,s),rightTeamValue:n(t,s)},i[a.kA.MarketValue]={messageId:"football_lineups_starters_total_market_value",leftTeamValue:r(e),rightTeamValue:r(t)},i[a.kA.Height]={messageId:"football_lineups_starters_average_height",leftTeamValue:l(e),rightTeamValue:l(t)},i}var c=s(10387);function d(e){let t=null==e?void 0:e.left.players.filter(e=>e.substitute),s=null==e?void 0:e.right.players.filter(e=>e.substitute);return!!(t&&t.length>0||s&&s.length>0)}let u=e=>{let{id:t,incidents:s,useShortName:i,type:a="player"}=e;return s.filter(e=>{var s,i,l,n;return(null==(s=e[a])?void 0:s.id)===t||(null==(i=e.playerOut)?void 0:i.id)===t||(null==(l=e.playerIn)?void 0:l.id)===t||(null==(n=e.assist1)?void 0:n.id)===t}).reduce((e,s)=>{var a,l,n,r,o,c,d;switch(s.incidentType){case"card":switch(s.incidentClass){case"red":return{...e,hasRedCard:!0};case"yellow":return{...e,hasYellowCard:!0};case"yellowRed":return{...e,hasYellowRedCard:!0};default:return e}case"goal":if((null==(a=s.player)?void 0:a.id)===t)switch(s.incidentClass){case"ownGoal":return{...e,hasScoredOwnGoal:!0,ownGoalsScored:(e.ownGoalsScored||0)+1};case"penalty":return{...e,hasScoredPenalty:!0,penaltiesScored:(e.penaltiesScored||0)+1,goalsScored:(e.goalsScored||0)+1};default:return{...e,goalsScored:(e.goalsScored||0)+1}}if((null==(l=s.assist1)?void 0:l.id)===t)return{...e,goalsAssisted:(e.goalsAssisted||0)+1};return e;case"substitution":if((null==(n=s.playerOut)?void 0:n.id)===t)return{...e,substitutionOut:{forPlayer:(i?null==(r=s.playerIn)?void 0:r.shortName:null==(o=s.playerIn)?void 0:o.name)||s.playerNameIn,time:s.time,isInjury:"injury"===s.incidentClass}};return{...e,substitutionIn:{forPlayer:(i?null==(c=s.playerOut)?void 0:c.shortName:null==(d=s.playerOut)?void 0:d.name)||s.playerNameOut,time:s.time,isInjury:"injury"===s.incidentClass}};default:return e}},{})},p=(e,t)=>e.split(" ").map(e=>{let s=e;return e.length!==t||e.includes("-")||(s=e.slice(0,e.length/2)+"\xad"+e.slice(e.length/2)),s}).join(" ");function h(e,t){var s;return t||e.player.name.length>24||(null==(s=e.player.country)?void 0:s.alpha2)==="MG"}function x(e,t,s){let i=Math.max(...e.split(" ").map(e=>e.length));return i>=12&&(e=p(e,i)),t?s?"".concat(e," (c)"):"(c) ".concat(e):e}function g(e,t){if(t===a.V7.Confirmed){var s;return(null==(s=e.statistics)?void 0:s.rating)||e.avgRating}if(t===a.V7.Possible)return e.avgRating}function f(e,t,s){var i,a;let l=t?u({id:e.player.id,incidents:t,useShortName:!0}):{},n=l.hasYellowCard||l.hasYellowRedCard||l.hasRedCard,r={name:"card",icon:l.hasYellowRedCard?"card-double-yellow":"card",color:l.hasYellowRedCard?void 0:l.hasRedCard?"error.default":"scoreRating.s65",isVisible:!!n},o={name:"substitution",icon:(null==(i=l.substitutionOut)?void 0:i.isInjury)?"substitution-injured":"substitution",isVisible:!!l.substitutionOut},d={name:"goals",icon:l.goalsScored===l.penaltiesScored&&l.hasScoredPenalty?"football-penalty":"football-ball",count:l.goalsScored,color:"secondary.default",isVisible:!!l.goalsScored},p={name:"goalAssist",icon:"football-assist",count:l.goalsAssisted,color:"neutral.variant",isVisible:!!l.goalsAssisted},h={name:"ownGoals",icon:"football-own-goal",count:l.ownGoalsScored,color:"error.default",isVisible:!!l.ownGoalsScored};return{playerLeftStatistics:[r,o,{name:"matchMVP",color:(0,c.E)(null==(a=e.statistics)?void 0:a.rating),isVisible:!!s}],playerRightStatistics:[d,p,h]}}s(44259)},78944:(e,t,s)=>{s.d(t,{H7:()=>h,q6:()=>p});var i=s(6029),a=s(55729),l=s(947),n=s(90248),r=s(62859);let o=JSON.parse('{"rugby":{"goal.onePoint":"rugby.onePointGoal","goal.twoPoints":"rugby.twoPointGoal","goal.threePoints":"rugby.threePointGoal","goal.try":"rugby.try","goal.penaltyTry":"rugby.penaltyTry"},"basketball":{"One point":"basketball.onePoint","Two points":"basketball.twoPoints","Three points":"basketball.threePoints","Four points":"basketball_four_points"},"american-football":{"goal.touchdown":"touchdown","goal.extraPoint":"amf.extraPoint","goal.twoPointConversion":"amf.twoPointConversion","goal.defensive2ptConversion":"amf.defensive2ptConversion","goal.fieldGoal":"amf.fieldGoal","goal.safety":"amf.safety","goal.rouge":"amf.rouge"},"minifootball":{"accumulatedPenalty":"minifootball_accumulated_penalty"},"futsal":{"accumulatedPenalty":"minifootball_accumulated_penalty"},"ice-hockey":{"boarding":"penalty_boarding","broken_stick":"penalty_broken_stick","charging":"penalty_charging","closing_hand_on_puck":"penalty_closing_hand","cross_checking":"penalty_cross_checking","elbowing":"penalty_elbowing","clipping":"penalty_clipping","delay_game":"penalty_delay_of_game","illegal_check_to_head":"penalty_illegal_check","goalie_leave_crease":"penalty_goalie_leave_crease","hi_sticking":"penalty_hi_sticking","holding":"penalty_holding","holding_the_stick":"penalty_holding_the_stick","hooking":"penalty_hooking","illegal_stick":"penalty_illegal_stick","interference":"penalty_interference","instigator":"penalty_instigator","kneeing":"penalty_kneeing","interference_goalkeeper":"penalty_interference_on_gk","roughing":"penalty_roughing","slashing":"penalty_slashing","spearing":"penalty_spearing","tripping":"penalty_tripping","unsportsmanlike_conduct":"penalty_unsportsmanlike_conduct","delay_game_bench":"penalty_delay_of_game_bench","misconduct_10min":"penalty_misconduct","game_misconduct":"penalty_game_misconduct","goalie_participating_beyond_center":"penalty_goalie_beyond_the_center","aggressor":"penalty_aggressor","match_penalty":"penalty_match_penalty","ps_illegal_substitution":"penalty_shot_illegal_substitution","ps_goalkeeper_displaced_net":"penalty_shot_goalkeeper_displaced_net","ps_net_displaced":"penalty_shot_net_displaced","ps_covering_puck_in_crease":"penalty_shot_covering_puck","ps_picking_up_puck_in_crease":"penalty_shot_picking_up_puck","ps_throwing_object_on_ice":"penalty_shot_throwing_object","ps_interference_from_bench":"penalty_shot_interference_from_bench","ps_players_leaving_bench":"penalty_shot_players_leaving_bench","ps_throw_object_at_puck":"penalty_shot_throw_object_at_puck","ps_holding_on_breakaway":"penalty_shot_holding_on_breakaway","ps_holding_stick_on_breakaway":"penalty_shot_holding_stick_on_breakaway","ps_hooking_on_breakaway":"penalty_shot_hooking_on_breakaway","ps_tripping_on_breakaway":"penalty_shot_tripping_on_breakaway","ps_slash_on_breakaway":"penalty_shot_slash_on_breakaway","embellishment":"penalty_embellishment","minor":"penalty_minor","major":"penalty_major","bench":"penalty_bench","playing_without_a_helmet":"penalty_helmet","removing_opponents_helmet":"penalty_removing_opponents_helmet","goalie_removed_own_mask":"penalty_goalie_removed_mask","delay_game_unsucc_challenge":"penalty_delay_of_game_unsuccessful_challenge","licking":"penalty_kicking","attempt_to_injure":"penalty_attempt_to_injure","deliberate_injury":"penalty_deliberate_injury","checking_from_behind":"penalty_checking_from_behind","interference_bench":"penalty_interference_bench","throwing_stick":"penalty_throwing_stick","abusive_language":"penalty_abusive_language","fighting":"penalty_fighting","abuse_of_officials":"penalty_abuse_of_officials","refusal_to_play":"penalty_refusal_to_play","late_on_ice":"penalty_late_on_ice","not_proceeding_to_dressing_room":"penalty_not_proceeding_to_dressing_room","butt_ending":"penalty_butt_ending","head_butting":"penalty_head_butting","puck_thrown_fwd_goalkeeper":"penalty_puck_thrown_fwd_goalkeeper","removing_sweater":"penalty_removing_sweater","not_proceeding_dir_penbox":"penalty_not_proceeding_dir_penbox","leaving_penalty_box":"penalty_leaving_penalty_box","illegal_substitution":"penalty_illegal_substitution","protective_equipment":"penalty_protective_equipment","objects_on_ice":"penalty_objects_on_ice","interfere_with_official":"penalty_interfere_with_official","player_leaves_bench":"penalty_leaving_players_bench","leaving_players_penalty_bench":"penalty_leaving_penalty_bench","ineligible_player":"penalty_ineligible_player","unsustained_measurement":"penalty_unsustained_measurement","illegal_equipment":"penalty_illegal_equipment","too_many_men_on_ice":"penalty_too_many_men_on_ice","doubleMinor":"penalty_double_minor","goal.emptynet":"hockey_empty_net_goal","substitution.goalkeeperIn":"hockey_match_event_goalie_back_in","substitution.goalkeeperOut":"hockey_match_event_goalie_out"},"Goal":"goal","goal.regular":"goal","Own goal":"ownGoal","goal.ownGoal":"ownGoal","Substitution":"substitution","Substitution in":"substitutionIn","Substitution out":"substitutionOut","substitution.injury":"substitution","substitution.temporary":"rugby_temporary_substitution","Penalty":"penalty","goal.penalty":"penalty","inGamePenalty.scored":"penalty","penaltyShootout.scored":"penalty","Missed Penalty":"missedPenalty","inGamePenalty.missed":"missedPenalty","penaltyShootout.missed":"missedPenalty","Penalty taker":"penaltyTaker","Yellow card":"yellowCard","card.yellow":"yellowCard","2nd Yellow card (Red)":"2ndYellowCard","card.yellowRed":"2ndYellowCard","Red card":"redCard","card.red":"redCard","Argument":"argument","Dangerous play":"dangerousPlay","Simulation":"simulation","Other reason":"otherReason","Unallowed field entering":"unallowedFieldEntering","Fight":"fight","Foul":"foul","Handball":"handball","Leaving field":"leavingField","On bench":"onBench","Off the ball foul":"offTheBallFoul","Persistent fouling":"persistentFouling","Professional foul":"professionalFoul","Professional handball":"professionalHandball","Professional foul last man":"professionalFoulLastMan","Rescinded Card":"rescindedCard","Unsporting behaviour":"unsportingBehaviour","Time wasting":"timeWasting","Violent conduct":"violentConduct","Post match":"postMatch","Off target":"offTarget","Woodwork":"woodwork","Goalkeeper save":"goalkeeperSave","zeroMinutes":"penalty_suspension","twoMinutes":"penalty_two_min_suspension","fourMinutes":"penalty_four_min_suspension","fiveMinutes":"penalty_five_min_suspension","tenMinutes":"penalty_ten_min_suspension","mistakenIdentity.false":"reviewed","cardUpgrade.false":"cardUpgrade.changed","cardUpgrade.true":"cardUpgrade.noChange","review.false":"reviewed","review.true":"reviewed","varDecision.goalAwarded":"varDecision","varDecision.goalNotAwarded":"varDecision","varDecision.penaltyAwarded":"varDecision","varDecision.penaltyNotAwarded":"varDecision","varDecision.redCardGiven":"varDecision","varDecision.cardUpgrade":"varDecision","varDecision.mistakenIdentity":"varDecision","goal.powerplay":"powerplayGoal","goal.shorthanded":"shorthandedGoal"}');var c=s(27892);let d="DEFAULT",u=(e,t)=>(0,c.O)(o,e,t,d),p=(e,t,s)=>{let i=u(t?"".concat(e,".").concat(t):e,s);return i!==d||t&&(i=u(t,s))!==d?i:(i=u(e,s))!==d?i:void 0},h=e=>{let{id:t}=e,s=(0,l.A)(),o=u(t,(0,a.useContext)(r.Ws));if(o!==d)return(0,i.jsx)(n.A,{id:o});let c=s.formatMessage({id:t});return c!==t?(0,i.jsx)(i.Fragment,{children:c}):null}},79853:(e,t,s)=>{s.d(t,{K:()=>o});var i=s(21377),a=s(55729),l=s(45860),n=s(62859),r=s(30720);function o(e){let t=(0,a.useContext)(n.y$),s=e||t.event,{data:o,error:c}=(0,l.Ay)(i.bnp.managers(s.id)),[d,u]=(0,r.A)(o,"homeManager","awayManager",s),[p,h]=(0,r.A)(o,"homeManagerName","awayManagerName",s);return{managers:{leftManager:d,leftManagerName:p,rightManager:u,rightManagerName:h},error:c}}},85306:(e,t,s)=>{s.d(t,{K:()=>i});var i=function(e){return e.Position="position",e.Rating="rating",e.Notes="notes",e.ExpectedGoals="expectedGoals",e}({})},90715:(e,t,s)=>{s.d(t,{V:()=>i});function i(e,t){if(11!==t.length)throw Error("getFormationMatrix(): Insufficient players to form formation ".concat(e,"."));let s=[],i=["1",...e.split("-")].map(Number),a=[...t];return i.forEach(e=>{s.push(a.splice(0,e))}),s}},91816:(e,t,s)=>{s.d(t,{d:()=>i.d});var i=s(25635)},99382:(e,t,s)=>{s.d(t,{j:()=>p,X:()=>h});var i=s(6029),a=s(21377),l=s(947),n=s(90248),r=s(79387),o=s(19451),c=s(26331),d=s(73088),u=s(30479);let p=e=>{let{event:t}=e,s=(0,l.A)(),p=(0,c.A)();return(0,i.jsx)(r.C,{callToAction:(0,i.jsx)(n.A,{id:"chart_embed"}),embedString:function(e,t,s){let{id:i,customId:l,homeTeam:n,awayTeam:r,slug:c,tournament:p}=e,h=p.category.sport.slug,x=(0,o.vf)(t.locale),g="".concat(a.yuv).concat(x?"/".concat(x):"","/embed/attackMomentum?id=").concat(i,"&widgetTheme=light"),f=(0,a.Lo9)(d.z.getTranslatedRoute(s,"event",{id:l,name:c,sport:h},(0,u.HL)({id:i})).route,{isApiRoute:!1}),m="".concat(n.name," - ").concat(r.name),y=t.formatMessage({id:"event.embed.lineupsBackLink"},{eventName:m,a:e=>'\n ').concat(e,"\n ")});return'\n
').concat(y,"
")}(t,s,p),px:"0",mt:"0"})},h=e=>{let{event:t}=e,s=(0,l.A)(),p=(0,c.A)(),{id:h,customId:x,homeTeam:g,awayTeam:f,slug:m,tournament:y}=t,j=y.category.sport.slug,v=(0,o.vf)(s.locale),b="".concat(a.yuv).concat(v?"/".concat(v):"","/embed/lineups?id=").concat(h,"&widgetTheme=light"),_="sofa-lineups-embed-".concat(h),w=(0,a.Lo9)(d.z.getTranslatedRoute(p,"event",{id:x,name:m,sport:j},(0,u.HL)({id:h})).route,{isApiRoute:!1}),C="".concat(g.name," - ").concat(f.name),k=s.formatMessage({id:"event.embed.lineupsBackLink"},{eventName:C,a:e=>'\n ').concat(e,"\n ")}),M='\n
').concat(k,"
");return(0,i.jsx)(r.C,{callToAction:(0,i.jsx)(n.A,{id:"chart_embed"}),embedString:M,px:"0",mt:"0"})}},99586:(e,t,s)=>{s.d(t,{C:()=>o});var i=s(99452),a=s.n(i),l=s(5326),n=s(85306),r=s(48886);function o(e,t,s,i){let o=t.stat,c=t.dir,d=[],u=[];if(o.value===n.K.Position&&(d.push(e=>l.EN[i].indexOf(e.position)),u.push(t.dir)),o.percentageOnly&&(d.push(e=>{let t=e.statistics&&o.madesValue?e.statistics[o.madesValue]:0,s=e.statistics&&o.attemptsValue?e.statistics[o.attemptsValue]:0;return t&&s?t/s:0}),u.push(t.dir)),o.madesValue){let e=o.madesValue;if(d.push(t=>{var s,i;return null!=(i=null==(s=t.statistics)?void 0:s[e])?i:0}),u.push(c),o.attemptsValue&&o.reverseSecondCompare){let e=o.attemptsValue;d.push(t=>{var s,i;return null!=(i=null==(s=t.statistics)?void 0:s[e])?i:0}),u.push(c===r.U.ASC?r.U.DESC:r.U.ASC)}}let p=o.compareValue;return p&&(d.push(e=>{var t,s;return null!=(s=null==(t=e.statistics)?void 0:t[p])?s:0}),u.push(c)),d.push(e=>{var t,s;return null!=(s=null==(t=e.statistics)?void 0:t[o.value])?s:0}),u.push(c),d.push(e=>{var t,i;return null!=(i=null==(t=e.statistics)?void 0:t[s.value])?i:0}),u.push(r.U.DESC),d.push(e=>{var t;return null!=(t=e.player.shortName)?t:""}),u.push(r.U.ASC),a()(e,d,u)}}}]);