!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]="f7749793-a913-4c77-91c0-98d2e3e4f7e9",e._sentryDebugIdIdentifier="sentry-dbid-f7749793-a913-4c77-91c0-98d2e3e4f7e9")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85171],{2095:(e,t,a)=>{a.d(t,{M:()=>o});var o=function(e){return e.All="all",e.Total="total",e.PerGame="perGame",e}({})},12232:(e,t,a)=>{var o;a.d(t,{L:()=>o}),function(e){e.Made="made",e.Missed="missed",e.Total="total"}(o||(o={}))},16533:e=>{e.exports=JSON.parse('{"football":{"accurateChippedPasses":"football_accurate_chip_passes","accurateCrosses":"accCrosses","accurateLongBalls":"accLongPasses","accurateOppositionHalfPasses":"accPassesOppositionHalf","accurateOwnHalfPasses":"accPassesOwnHalf","accuratePasses":"accuratePerGame","appearances":"matches_total","cleanSheet":"football_clean_sheets","clearances":"football_clearances_per_game","dispossessed":"football_dispossessed","dribbledPast":"dribbledPast","errorLeadToGoal":"errors_leading_to_goal","errorLeadToShot":"errors_lead_to_shot","keyPasses":"football_key_passes_per_game","touches":"football_touches","freeKickGoal":"football_free_kick_goals","goalConversionPercentage":"goal_conversion","goalsConceded":"football_goals_conceded","goalsConcededInsideTheBox":"football_goals_concededInsideBox","goalsConcededOutsideTheBox":"football_goals_concededOutsideBox","interceptions":"interceptions_per_game","minutesPlayed":"minutes_per_game","penaltySave":"football_penalties_saved","possessionWonAttThird":"football_posession_won","savedShotsFromInsideTheBox":"football_saves_inside_box","savedShotsFromOutsideTheBox":"savesFromOutsideBox","saves":"savesMade","scoringFrequency":"goals_frequency","setPieceConversion":"football_free_kick_conversion","successfulDribbles":"football_successful_dribbles","successfulRunsOut":"succRunsOutPerGame","tackles":"football_tackles_per_game","totalShots":"football_shots_per_game","yellowCards":"football_yellow_card","yellowRedCards":"football_yellow_red","red":"football_red_card","redCards":"red_cards","offsides":"football_offsides","kilometersCovered":"football_running_distance_covered","topSpeed":"football_running_top_speed","numberOfSprints":"football_running_number_of_sprints"},"basketball":{"appearances":"gamesPlayed","benchPoints":"basketball_points_off_the_bench","defensiveRebounds":"defensive","effectiveFieldGoalPercentage":"basketball_effective_field_goal_pct","fastbreakMade":"basketball_fast_break_points","fieldGoalsMade":"fieldGoals","fieldGoalsPercentageAgainst":"basketball_opponent_field_goals_pct","flagrantFouls":"basketball_flagrant_fouls","freeThrowAttempts":"basketball_free_throws_attempted","freeThrowsMade":"freeThrows","minutesPlayed":"minutes_played","offensiveFoulsAgainst":"basketball_charges_drawn","offensiveRebounds":"offensive","personalFoulsAgainst":"basketball_fouls_drawn","pir":"pirStat","pointsInPaint":"basketball_points_in_paint","technicalFouls":"basketball_technical_fouls","threePointAttempts":"basketball_three_points_attempted","threePointsMade":"threePointers","trueShootingPercentage":"basketball_true_shooting_pct","twoPointsMade":"twoPointers","assists":"football_assists","secondChancePoints":"basketball_second_chance_points"},"american-football":{"appearances":"matches_total","defensiveAssistTackles":"assistTackles","defensiveCombineTackles":"combineTackles","defensiveForcedFumbles":"forcedFumbles","defensiveInterceptionsTouchdowns":"interceptionsTouchdowns","defensiveInterceptionsYards":"interceptionsYards","defensivePassesDefensed":"passesDefensed","defensiveTotalTackles":"amf_tackles","fumbleLost":"fumblesLost","fumbleRecovery":"fumbleRecoveries","fumbleSafety":"fumblesSafety","kickingExtraMade":"extraPointsMade","kickingFgBlocked":"overallBlocked","kickingFgMade":"overallMade","kickingFgMade20to29":"made20","kickingFgMade30to39":"made30","kickingFgMade40to49":"made40","kickingFgMade50plus":"made50","kickoffReturns":"returns","kickoffTotal":"totalPoints","passingLongest":"longestPass","puntingBlocked":"blocked","puntingTouchbacks":"touchbacks","receivingFirstDowns":"firstDowns","receivingLongest":"longestReception","rushingLongest":"longestRush"},"ice-hockey":{"appearances":{"id":"games","values":{"sport":"ice-hockey"}},"faceOffPercentage":"faceoffPercentage","goalkeeping":"goalkeeper","goalsAgainst":"football_goals_conceded","penalty":"hockey.stat.penalty","powerPlayGoals":"powerplayGoals","powerPlayPoints":"powerplayPoints","powerPlaySaves":"powerplaySaves","powerPlayShots":"powerplayShots","powerPlayTimeOnIce":"powerplayTimeOnIce","shortHandedGoals":"shorthandedGoals","shortHandedPoints":"shorthandedPoints","shortHandedSaves":"shorthandedSaves","shortHandedTimeOnIce":"shorthandedTimeOnIce"},"handball":{"gk6mSaves":"6mSaves","gk7mSaves":"7mSaves","gk9mSaves":"9mSaves","goalkeeperEfficiencyPercentage":"goalkeeperEfficiency","goals6m":"6mGoals","goals7m":"7mGoals","goals9m":"9mGoals","twoMinutePenalties":"twoMinPenalty"},"cricket":{"bowling":"bowlingFigures","economy":"economyRate","runsScored":"runs"},"futsal":{"accumulatedPenaltyGoals":"futsal_accumulated_penalty_goals","accumulatedFouls":"futsal_accumulated_fouls"},"volleyball":{"pointsTotal":"volleyball_points","aces":"volleyball_aces","serveEfficiency":"volleyball_serve_efficiency_percentage","blockPoints":"volleyball_block_points","attackPoints":"volleyball_attack_points","attacksEfficiency":"volleyball_attack_efficiency_percentage","attackErrors":"volleyball_attack_errors","serveErrors":"volleyball_serve_errors","receptionErrors":"volleyball_reception_errors","attacksBlocked":"volleyball_attacks_blocked"}}')},20990:(e,t,a)=>{a.d(t,{U:()=>d,k:()=>f});var o=a(6029),s=a(33698),n=a(21377),r=a(76356),l=a(55729),i=a(18970),c=a(24414);let d=()=>{let[e,t]=(0,l.useState)(s.L.Total);return{selectedType:e,setSelectedType:t,getNextType:e=>{switch(e){case s.L.Total:return s.L.Missed;case s.L.Missed:return s.L.Made;case s.L.Made:default:return s.L.Total}}}},f=e=>{let{selectedType:t,setSelectedType:a}=e,d=(0,l.useContext)(i.Ws),f=[{tabKey:s.L.Made,tabValue:d===n.QCR.Basketball?"player.shootmap.made":"goals"},{tabKey:s.L.Total,tabValue:"player.shootmap.total"},{tabKey:s.L.Missed,tabValue:"player.shootmap.missed"}];return(0,o.jsx)(r.az,{pb:"lg",children:(0,o.jsx)(c.n,{activeTabKey:t,onChange:e=>a(e),tabs:f,variant:"secondary"})})}},33698:(e,t,a)=>{a.d(t,{L:()=>o.L});var o=a(12232)},57534:(e,t,a)=>{a.d(t,{R:()=>r,h:()=>i});var o=a(2095),s=a(89827);let n=(e,t)=>{let a=e[t.key],o="";if(t.totalKey){let n=e[t.totalKey];o=n?" (".concat((0,s.M)(100*a/n),"%)"):" (0%)"}else if(t.percentageKey){let a=e[t.percentageKey];o=" (".concat(a?(0,s.M)(a):0,"%)")}else if(t.reverseKey){let n=e[t.reverseKey];o=" (".concat((0,s.M)(100*a/(a+n)),"%)")}return o},r=(e,t,a)=>{var r,l,i;let c="number"==typeof t.decimals?t.decimals:1,d=e[t.key];if("attackPointsPercentage"===t.key){if(isNaN(e.attackPoints)||isNaN(e.attacksTotal))return;return"".concat((0,s.M)(e.attackPoints/e.attacksTotal*100,1))}if(void 0!==d||"winRatio"===t.key){if(a===o.M.Total&&t.displayType&&t.displayType.length>0)return(null==(i=t.displayType)?void 0:i.includes(o.M.Total))?d:void 0;if(a!==o.M.PerGame||(null==(r=t.displayType)?void 0:r.includes(o.M.PerGame))){if(t.perGame||(null==(l=t.displayType)?void 0:l.includes(o.M.PerGame))){if(void 0===e.appearances)return;if("appearances"===t.key)return d;let a=n(e,t),o=d/e.appearances,r=o&&o<.1?2:c;return"".concat((0,s.M)(o,r)).concat(a)}if(t.percentageKey){let a=e[t.percentageKey]?(0,s.M)(e[t.percentageKey],c):0,o="number"==typeof t.decimals?(0,s.M)(d,c):d;return t.showValue?"".concat(o," (").concat(a,"%)"):"".concat(a,"%")}if(t.totalKey){let a=e[t.totalKey],o=t.showPercentage?n(e,t):"";return a?"".concat(d,"/").concat(a," ").concat(o):"".concat(d," ").concat(o)}if("kilometersCovered"===t.key)return"".concat((0,s.M)(d/e.minutesPlayed*90,c)," km");if("numberOfSprints"===t.key)return"".concat((0,s.M)(d/e.minutesPlayed*90,c));if("topSpeed"===t.key)return"".concat((0,s.M)(d,c)," km/h");if("firstServePercentage"===t.key){if(isNaN(e.firstServeTotal)||isNaN(e.firstServePointsTotal))return;if(0===e.firstServeTotal)return"0%";let t=e.firstServePointsTotal/e.firstServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("winRatio"===t.key){if(isNaN(e.wins)||isNaN(e.matches))return;let t=Math.round(e.wins/e.matches*100);return"".concat(e.wins,"/").concat(e.matches," (").concat(Math.round(10*t)/10,"%)")}if("tournamentsWonRatio"===t.key){if(isNaN(e.tournamentsWon)||isNaN(e.tournamentsPlayed))return;return"".concat(e.tournamentsWon,"/").concat(e.tournamentsPlayed," (").concat(Math.round(10*d)/10,"%)")}if("firstServePointsWonPercentage"===t.key){if(isNaN(e.firstServePointsScored)||isNaN(e.firstServePointsTotal))return;if(0===e.firstServePointsTotal)return"0%";let t=e.firstServePointsScored/e.firstServePointsTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePercentage"===t.key){if(isNaN(e.secondServeTotal)||isNaN(e.secondServePointsTotal))return;if(0===e.secondServeTotal)return"0%";let t=e.secondServePointsTotal/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("secondServePointsWonPercentage"===t.key){if(isNaN(e.secondServePointsScored)||isNaN(e.secondServePointsTotal))return;if(0===e.secondServePointsTotal)return"0%";let t=e.secondServePointsScored/e.secondServeTotal*100;return"".concat(Math.round(10*t)/10,"%")}if("avgAces"===t.key){if(isNaN(e.aces)||isNaN(e.matches))return;if(0===e.matches)return"0%";let t=e.aces/e.matches;return"".concat(Math.round(10*t)/10)}if("avgDoubleFaults"===t.key){if(isNaN(e.doubleFaults)||isNaN(e.matches))return;if(0===e.matches)return"0%";let t=e.doubleFaults/e.matches;return"".concat(Math.round(10*t)/10)}if("breakPointsSavedPercentage"===t.key){if(isNaN(e.opponentBreakPointsTotal)||isNaN(e.opponentBreakPointsScored))return;let t=e.opponentBreakPointsTotal-e.opponentBreakPointsScored,a=Math.round(10*e.breakPointsSavedPercentage)/10;return"".concat(t,"/").concat(e.opponentBreakPointsTotal," (").concat(a,"%)")}if("breakPointsSavedConvertedPercentage"===t.key){if(isNaN(e.breakPointsTotal)||isNaN(e.breakPointsScored))return;let t=Math.round(10*e.breakPointsSavedConvertedPercentage)/10;return"".concat(e.breakPointsScored,"/").concat(e.breakPointsTotal," (").concat(t,"%)")}if("tiebreakWinPercentage"===t.key){if(isNaN(e.tiebreaksWon)||isNaN(e.tiebreakLosses)||isNaN(e.tiebreakWinPercentage))return;let t=e.tiebreaksWon+e.tiebreakLosses;return t>0?"".concat(e.tiebreaksWon,"/").concat(t," (").concat(Math.round(10*e.tiebreakWinPercentage)/10,"%)"):"".concat(e.tiebreaksWon,"/").concat(t)}if("number"==typeof t.decimals)return["savePercentage","powerPlaySavePercentage","shortHandedSavePercentage","evenSavePercentage"].includes(t.key)?1===d?"1.00":".".concat((0,s.M)(d,c).slice(2)):"".concat((0,s.M)(d,c)).concat(t.sufix||"");return"".concat(d," ").concat(t.sufix||"")}}};function l(e){let t=Math.round(e),a=Math.floor(t/60),o=Math.floor(t%60).toString().padStart(2,"0");return"".concat(a,":").concat(o)}let i=e=>{let t={...e};return e.secondsPlayed&&(t.minutesPlayed=e.secondsPlayed/60),e.timeOnIce&&(t.timeOnIce=l(e.timeOnIce/e.appearances)),e.powerPlayTimeOnIce&&(t.powerPlayTimeOnIce=l(e.powerPlayTimeOnIce/e.appearances)),e.evenTimeOnIce&&(t.evenTimeOnIce=l(e.evenTimeOnIce/e.appearances)),e.shortHandedTimeOnIce&&(t.shortHandedTimeOnIce=l(e.shortHandedTimeOnIce/e.appearances)),t}},59721:(e,t,a)=>{a.d(t,{e:()=>o.e});var o=a(33480)},64023:(e,t,a)=>{a.d(t,{FV:()=>s,L3:()=>o,R3:()=>c,TH:()=>n,b6:()=>l,ie:()=>r,pu:()=>i});let o=void 0,s=-1,n="all";var r=function(e){return e[e.AllClubCompetitions=0]="AllClubCompetitions",e[e.DomesticLeagues=1]="DomesticLeagues",e[e.DomesticCups=2]="DomesticCups",e[e.InternationalCompetitions=3]="InternationalCompetitions",e[e.NationalTeamCompetitions=4]="NationalTeamCompetitions",e}({});let l=[{id:0,name:"football_all_club_competitions"},{id:1,name:"football_domestic_leagues"},{id:2,name:"football_domestic_cups"},{id:3,name:"football_international_competitions"},{id:4,name:"football_national_competitions"}],i=[{id:"overall",name:"total"},{id:"home",name:"home"},{id:"away",name:"away"}],c={id:-1,name:"all_teams"}},69627:(e,t,a)=>{a.d(t,{O:()=>k,b:()=>o});var o={};a.r(o),a.d(o,{getHeatmapState:()=>v});var s=a(64082),n=a(6029),r=a(21501),l=a(99064),i=a(55729),c=a(41735);let d={0:"#f8d496",.05:"#fee644",.25:"#ff9000",.4:"#fc6800",.6:"#f00800",.75:"#cc0600",.85:"#b00400",.99:"#940000",1:"#780000"};var f=a(97043),u=a(73276),p=a(12232),m=a(18130);let b=({canvasId:e,shotCoordinates:t,numberOfMatches:a,width:o=m.f7,height:s=m.IV,shotType:r,isTransparentBackground:b})=>{let h=(0,c.useTheme)();return(0,i.useEffect)(()=>{o&&function(e,t,a){try{((e,{containerId:t,width:a,height:o,numberOfMatches:s,shotType:n=p.L.Total,precisionLevel:r=f.K,isTransparentBackground:l},i)=>{var c;let m,b=document.getElementById(t);if(!b)throw Error("No DOM container element for HeatMap provided");let h=(c=s||1,m=20,c>82?Math.round((1-Math.pow(c/110,.1))*8+12):Math.round((1-Math.pow(c/82,.1))*8+12)),_=function(e,t,a,o){let s=(0,u.Cl)(501,441);return e.forEach(({x:e,y:a,made:o,missed:n})=>{switch(t){case p.L.Total:s[e- -250][a- -40]+=o+n;break;case p.L.Made:s[e- -250][a- -40]+=o;break;case p.L.Missed:default:s[e- -250][a- -40]+=n}}),s}(e,n,0,0);s&&s>5&&function(e,t,a,o){let s,n,r,l,i,c;for(l=0;l<=100;l++){for(s=0,n=0,r=0,i=2;i<=10;i++)++r,s+=o[l][80-i],n+=o[l][80+i];for(c=0;c<=2;c++)o[l][e+c]=(s+n)/(2*r),o[l][e-c]=(s+n)/(2*r)}}(80,2,0,_);let g=(0,u.m3)(1e3,d,l,i.setAlpha,.2),k=(0,u.RK)(h,h/3,r),v=(0,u.t6)(_,k,{width:500,height:440,influenceRadius:h,precisionLevel:r}),y=(0,u.Gj)(v,g,{height:440,width:500,gradientScaleFactor:1e3/9,gradientRange:1e3}),P=document.createElement("canvas");P.height=o,P.width=a,P.style.borderRadius="inherit";let T=P.getContext("2d");if(!T)throw Error("Heatmap canvas context not found");T.drawImage(y,0,0,a,o),b.innerHTML="",b.appendChild(P)})(e,t,a)}catch(e){console.error("In render basketball heatmap",e)}}(t,{containerId:e,width:o,height:s,shotType:r,numberOfMatches:a,precisionLevel:10,isTransparentBackground:b},h)},[o,s,t,a,b,r]),(0,n.jsx)(l.az,{id:e,w:o,h:s,position:"absolute",borderRadius:"xs"})};var h=a(67823),_=a(13369),g=a(11810);let k=e=>{var{showLines:t=!0,showBackground:a=!0,showOverlay:o=!0,linesColor:c,backgroundColor:d,shotCoordinates:f,numberOfMatches:u,shotType:p,canvasId:k}=e,v=(0,s.T)(e,["showLines","showBackground","showOverlay","linesColor","backgroundColor","shotCoordinates","numberOfMatches","shotType","canvasId"]);let[y,P]=(0,i.useState)(!1),T=(0,i.useRef)(null),M=(0,r.uc)(T,{},100,[y]);(0,i.useEffect)(()=>{P(!0)},[]);let w=Number(M),S=w?w/m._P:void 0;return(0,n.jsxs)(l.so,Object.assign({position:"relative",justify:"center",align:"center",w:"100%",h:"100%"},v,{children:[(0,n.jsxs)(h.A,Object.assign({ref:T,style:{zIndex:1}},{children:[a&&!o&&(0,n.jsx)(g.A,{courtColor:d}),t&&(0,n.jsx)(_.A,{fill:c})]})),o&&(0,n.jsx)(b,{canvasId:k,width:w,height:S,shotCoordinates:f,numberOfMatches:u,shotType:p,isTransparentBackground:!a})]}))},v=(e,t)=>P(y(e,t)),y=(e,t)=>{switch(e){case p.L.Made:return t.filter(e=>e.made);case p.L.Missed:return t.filter(e=>e.missed);case p.L.Total:return t;default:throw Error("Invalid state")}},P=e=>e.map(e=>e.y>=390?Object.assign(Object.assign({},e),{y:390}):e)},73276:(e,t,a)=>{a.d(t,{Cl:()=>s,Gj:()=>c,RK:()=>r,m3:()=>n,t6:()=>i});var o=a(97043);let s=(e,t)=>{let a=[];for(let o=0;o{let n=document.createElement("canvas");n.width=1,n.height=e;let r=n.getContext("2d");if(!r)throw Error("No color gradient context for heatmap found");let l=r.createLinearGradient(0,0,1,e);return Object.keys(t).forEach(e=>{let n=t[Number(e)],r=Number(e);a&&r{let s=[],n=1/a;for(let a=0;a<=e;a+=n)s.push(Math.exp(-a*a/(2*t*t)));return s},l=(e,t,a,o)=>Math.sqrt(Math.pow(a-e,2)+Math.pow(o-t,2)),i=(e,t,{width:a,height:n,influenceRadius:r,precisionLevel:i=o.K})=>{let c=s(a,n);for(let o=0;o{let r=document.createElement("canvas");r.height=a,r.width=o;let l=r.getContext("2d");if(!l)throw Error("No heatmap canvas context found");let i=l.getImageData(0,0,o,a),c=i.data;for(let r=0;r{a.d(t,{K:()=>o});let o=10}}]);