PageSourceSearch

http://smartclub.ai/assets/usePhysicalData-DSumjjGq.js

js smartclub.ai collected 2026-10-05 15:07:58 UTC 4,467 bytes, 2 lines download raw bytes

1import{R as y,r as C}from"./vendor-vuetify-U1i-P9xV.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new e.Error().stack;m&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[m]="dac944ed-39de-4396-9a40-193d7cd9717a",e._sentryDebugIdIdentifier="sentry-dbid-dac944ed-39de-4396-9a40-193d7cd9717a")}catch{}function N(e,m){const b=C({peak_speed:["peak_psv_99","psv99","top5_psv_99"],total_distance:["total_distance_full_all","hi_distance_full_all","hsr_distance_full_all","sprint_distance_full_all"],physical_activity:["sprint_count_full_all","hsr_count_full_all","highaccel_count_full_all","medaccel_count_full_all"]}),_=y(()=>{if(!e.value?.league.matchesByPlayer)return[];const s=e.value.league.matchesByPlayer[e.value.player.playerId];return s?[...s].sort((n,t)=>new Date(n.match_date).getTime()-new Date(t.match_date).getTime()):[]}),f=y(()=>e.value?e.value.player.playerId in e.value.league.averages.players:!1),x=y(()=>{if(!(!m.value||!e.value))return e.value.league.averages.players[e.value.player.playerId]}),I=y(()=>{if(!_.value)return[{position:0,id:"",value:0,name:"",team:""}];const s=_.value.length>5?_.value.slice(1).slice(-5):_.value;let n=0;return s.forEach(t=>{t.psv99>n&&(n=t.psv99)}),s.map(t=>({position:0,id:n===t.psv99?"best-value-match":"",value:t.psv99,name:t.enemy_team_name,team:""}))});function M(s,n){const t=e.value?.league.averages.players,v=[];let l=0,p=0,g="",c="";for(const a in t){const r=t[a],u=e.value?.league.players[a]?.short_name??"",d=r[n],i=r[s];d>l&&(c=u,l=d),i>p&&(g=u,p=i),v.push({label:u,data:[{x:d,y:i}]})}return{dataset:v,maxYName:g,maxXName:c}}function P(s,n){const t=e.value?.comparison.averages.players;if(!t)return{dataset:[],maxYName:"",maxXName:""};const v=[];let l=0,p=0,g="",c="";for(const a in t){const r=t[a],u=e.value?.comparison.players[a]?.short_name??"",d=r[n],i=r[s];d>l&&(c=u,l=d),i>p&&(g=u,p=i),v.push({label:u,data:[{x:d,y:i}]})}return{dataset:v,maxYName:g,maxXName:c}}function S(s,n){if(!m.value||!e.value)return{label:"",data:[]};const t=e.value.league.averages.players[e.value.player.playerId];return t?{label:e.value.league.players[e.value.player.playerId]?.short_name||"",data:[{x:t[n],y:t[s]}]}:{label:"",data:[]}}function h(s,n=!1,t=!1){if(!m.value||!e.value)return{list:[],target:void 0};const v=t?{...e.value.comparison.averages.players}:{...e.value.league.averages.players};if(t){const a=e.value.league.averages.players[e.value.player.playerId];a&&(v[e.value.player.playerId]={...a,isTargetPlayer:!0})}const l=n?Object.entries(v).sort((a,r)=>a[1][s]-r[1][s]):Object.entries(v).sort((a,r)=>r[1][s]-a[1][s]),p=l.map(([a,r],o)=>{const u=r[s],d=t?e.value?.comparison.players:e.value?.league.players,i=r.isTargetPlayer?e.value?.league.players[a]:Array.isArray(d)?d.find(B=>B.player_id===+a):d?.[a];return{position:o+1,id:a,value:u,name:i?.short_name||"",team:i?.team_name||""}}),g=l.findIndex(([a])=>+a===e.value?.player.playerId),c=p[g];if(g>4&&!t){const a=p.slice(0,5);return a.push(c),{list:a,target:c}}return{list:p.slice(0,t?10:5),target:c}}function w(s,n,t=!1,v){const l={labels:[],datasets:[]};if(!e.value)return{data:l,targetName:""};const p=e.value.league.averages.players[e.value.player.playerId],g=e.value.league.players[e.value.player.playerId],c=e.value.comparison?.players?Object.entries(e.value.comparison.players).map(([a,r])=>({...r,player_id:a,averageStats:e.value?.comparison?.averages?.players?.[a]??null})):[];if(t&&l.labels.push("Target value","Medial value"),l.labels.push(g?.short_name||""),c.forEach(a=>{l.labels.push(a?.short_name||"")}),s.forEach((a,r)=>{const o={label:n[r],data:[]};t&&e.value?.comparison.targetMetrics&&o.data.push(e.value.comparison.targetMetrics[a].target,e.value.comparison.targetMetrics[a].average),o.data.push(p?.[a]??0),c?.forEach(u=>{o.data.push(u?.averageStats?u.averageStats[a]:0)}),l.datasets.push(o)}),v){const a=l.labels.map((r,o)=>o);a.sort((r,o)=>{const u=l.datasets[0].data[r],d=l.datasets[0].data[o];return v==="asc"?u-d:d-u}),l.labels=a.map(r=>l.labels[r]),l.datasets.forEach(r=>{r.data=a.map(o=>r.data[o])})}return{data:l,targetName:g?.short_name}}return{hasPlayerData:f,tableColumns:b,sortedMatches:_,tablesData:x,psv99last5matches:I,getScatterChartMainData:M,getScatterChartComparingMainData:P,getScatterChartPlayerData:S,getBestPerfBarData:h,getBarDataForComparingWithTargetPlayer:w}
1}export{N as u};
2//# sourceMappingURL=usePhysicalData-DSumjjGq.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.