@golstats/lilini-player-detection 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FilterConditions-55d68355-DnIkhTXe-BANkP4np.js → FilterConditions-55d68355-CP2ipYfk-DsMEue33.js} +1 -1
- package/dist/{FilterConditions-55d68355-C_om1TMK.js → FilterConditions-55d68355-CT68f9CL.js} +1 -1
- package/dist/{FilterField-59a73e38-Dcx_hr8d-DgLodlGz.js → FilterField-59a73e38-CGz4ySSg-BhA-mg-9.js} +1 -1
- package/dist/{FilterField-59a73e38-CrOtZ68f.js → FilterField-59a73e38-Cud17izu.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-DzXxrfrk-CuaVYnuE.js → FilterSubcategories-a9b32cc9-BbXk2Zfr-JuLJPHub.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-DyWRdTJm.js → FilterSubcategories-a9b32cc9-cFp6LiBb.js} +1 -1
- package/dist/{index-CaiyUEer.js → index-BnA-0Fwp.js} +94 -94
- package/dist/lilini-player-detection.css +1 -1
- package/dist/lilini-player-detection.es.js +1 -1
- package/dist/lilini-player-detection.umd.js +1 -1
- package/package.json +2 -2
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div class="custom-tooltip-apexchart">
|
|
28
28
|
<div class="__title">${Number.isNaN(v[O])?"N/A":`${Math.floor(v[O])}%`}</div>
|
|
29
29
|
</div>
|
|
30
|
-
`}}}));t.watch(()=>a.players,N=>{if(N&&N.length){const P=n.value.length!==N.length;let O=!1;for(const T of N){const v=T.player_id;if(!n.value.some(w=>w.player_id===v)){O=!0;break}}(P||O)&&(n.value=N.map(T=>({...T,statsGraph:[]})),p())}else l.value=[]},{immediate:!0});let y=[],u="",h="";async function p(){try{const N=n.value.map(w=>w.objeto_player?w.objeto_player.player_id||w.objeto_player.id:w.id||w.player_id),P=`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/stats?months=6`,O={players:N,tournament_id_for_max_value:0,all_players:a.allPlayers.map(w=>w.objeto_player?w.objeto_player.player_id||w.objeto_player.id:w.id||w.player_id)};if(y.length===N.length&&y.every(w=>N.includes(w))||(y=[...N]),a.customCategories)O.variables=i.value.productivityFilters.reduce((w,A)=>{if(A.isSelected){const k={...A};delete k.isSelected,w.push(k)}return w},[]);else if(a.dynamicCategories&&i.value){const w=[];O.categories=i.value.productivityFilters.reduce((A,k)=>{if(k.isSelected){w.push(...k.id);const E={ids:k.id,name:k.name};k.parameters&&(E.parameters={...k.parameters}),A.push(E)}return A},[])}if(!O.variables&&!O.categories)return;const T=JSON.stringify(O);if(u===P&&h===T)return;u=P,h=T;const v=await(await fetch(P,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:a.token},body:T})).json();g(v,!!i.value)}catch(N){console.error("Error",N)}}function g(N,P=!1){const O={...N};if(!O.max||!O.data)return;if(a.applyAdditionalData&&Ru.emit("set-additional-data",O.additional_data),P){const w=new Map,A=Object.entries(O.data).reduce((E,[B,F],L)=>{const K={playerId:B,categoriesByName:new Map};return F.forEach(ae=>{const le=K.categoriesByName.get(ae[1]),C=w.get(ae[1]);if(le){if(le.categoriesIds.push(ae[0]),le.categoriesIds.sort(),le.totals.push(ae[2]),L===0&&C){const M=O.max.find(Y=>Y[0]===ae[0]);M&&(C.categoriesIds.push(ae[0]),C.categoriesIds.sort(),C.max.push(M[1]))}}else if(K.categoriesByName.set(ae[1],{categoriesIds:[ae[0]],totals:[ae[2]]}),L===0){const M=O.max.find(Y=>Y[0]===ae[0]);M&&w.set(ae[1],{categoriesIds:[ae[0]],max:[M[1]]})}}),E.push(K),E},[]);O.data=A.reduce((E,B)=>{const F=[];return B.categoriesByName.forEach((L,K)=>{F.push([Array.from(L.categoriesIds).reduce((ae,le)=>`${ae}-${le}`,""),K,L.totals.reduce((ae,le)=>ae+le,0)])}),E[B.playerId]=F,E},{});const k=Array.from(w);O.max=k.map(E=>[E[1].categoriesIds.reduce((B,F)=>`${B}-${F}`,""),E[1].max.reduce((B,F)=>B+F,0)])}const T=O.max.reduce((w,[A,k])=>(w.set(A,k),w),new Map),v=Object.entries(O.data).reduce((w,[A,k])=>(w.set(Number(A),k),w),new Map);l.value=[],n.value.forEach(w=>{const A=v.get(w.objeto_player?w.objeto_player.player_id:w.id||w.player_id);w.statsGraph=[],A&&(w.statsGraph=A.map((k,E)=>{const B=Number(T.get(k[0])),F=k[2],L=E+1;return l.value.length<A.length&&l.value.push({position:L,name:k[1]}),{position:L,name:k[1],playerStat:F,leagueMax:B,id:k[0],playerPercentage:B?Math.floor(F/B*100):F,isVisible:!0}}))})}function S(N){i.value=N,p()}function b(N){o("click-parameters",N)}return(N,P)=>{const O=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock("div",{class:"graph-spider",style:t.normalizeStyle(s.value)},[e.hasHeader?(t.openBlock(),t.createElementBlock("div",CD,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",xD,[t.createElementVNode("div",VD,[e.dynamicCategories?(t.openBlock(),t.createBlock(t.unref(Wp),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:e.dynamicCategories,"filter-type":t.unref(R).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":3,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:e.componentWidth>650?"650px":"390px",maxWidth:e.componentWidth>650?"940px":"390px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":S,onClickParameters:b},null,8,["button-filter-props","filters","filter-type","template-props"])):e.customCategories?(t.openBlock(),t.createBlock(t.unref(Wp),{key:1,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:e.customCategories,"filter-type":t.unref(R).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":3,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"fit-content",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":S},null,8,["button-filter-props","filters","filter-type"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",ND,[t.createVNode(O,{ref_key:"spiderChart",ref:r,type:"radar",options:f.value,series:c.value},null,8,["options","series"])]),t.createElementVNode("div",BD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.position,class:"list-variables__variable"},[t.createElementVNode("div",FD,t.toDisplayString(T.position),1),t.createElementVNode("div",TD,t.toDisplayString(T.name),1)]))),128))])])],4)}}},Gp=so(vD,[["__scopeId","data-v-8bb7e5ff"]]),Fl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(Number).sort((a,r)=>a-r);o.length===this.lastSelectedSections.length&&o.every(a=>this.lastSelectedSections.includes(a))||(this.lastSelectedSections=[...o],this.$emit("sections-changed",o))},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(e=>{const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())});else for(let e=1;e<=16;e++){const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())}this.updateSelectAllState()},isSelected(e){return this.selectedSections.has(e.toString())},toggleSection(e){const o=Math.ceil(e/4);if(!this.isQuarterEnabled(o))return;const a=e.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let e=1;e<=16;e++)this.selectedSections.add(e.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=e.toString(),r=Math.ceil(e/4);if(this.isQuarterEnabled(r)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(e,o){return(e-1)*4+o},getSectionIndex(e,o){return(e-1)*4+o},selectColumn(e){if(!this.isQuarterEnabled(e))return;const o=(e-1)*4+1,a=e*4;if(Array.from({length:4},(r,i)=>(o+i).toString()).every(r=>this.selectedSections.has(r))&&this.selectedSections.size>4)for(let r=o;r<=a;r++)this.selectedSections.delete(r.toString());else for(let r=o;r<=a;r++)this.selectedSections.add(r.toString());this.updateSelectAllState()},isQuarterSelected(e){const o=(e-1)*4+1;return Array.from({length:4},(a,r)=>(o+r).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(e){return this.quarters.includes(e)}}},Yp=()=>{t.useCssVars(e=>({"55dc5bcf":e.fieldWidth+"px","9f08aa04":e.fieldHeight+"px","5d3732c9":e.displayMode?"-28px":"0"}))},Zp=Fl.setup;Fl.setup=Zp?(e,o)=>(Yp(),Zp(e,o)):Yp;const AD={class:"field-template-element"},$D={class:"field-container"},RD=["onMouseenter","onMousedown"],OD={class:"column-buttons"},MD=["onClick","disabled"];function PD(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",AD,[t.createElementVNode("div",$D,[t.createElementVNode("div",{class:t.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[t.createElementVNode("span",null,t.toDisplayString(a.title),1)],2),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[1]||(o[1]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[2]||(o[2]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"field-column"},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(n.getSectionIndex(l,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(n.getSectionIndex(l,s)),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(n.getSectionIndex(l,s)),["prevent"])},null,42,RD)),64))])),64))],32),t.createElementVNode("div",OD,[a.displayMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"column-label"},t.toDisplayString(l)+"/4 tos ",1)),64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},t.renderList(4,l=>t.createElementVNode("button",{key:l,class:t.normalizeClass(["column-button",{selected:n.isQuarterSelected(l),disabled:!n.isQuarterEnabled(l)}]),onClick:s=>n.selectColumn(l),disabled:!n.isQuarterEnabled(l)},t.toDisplayString(l)+"/4 tos ",11,MD)),64))])])])}const Jp=so(Fl,[["render",PD],["__scopeId","data-v-6797bc51"]]),LD={name:"InputTemplateElement",props:{width:{type:Number,default:200},height:{type:Number,default:40},modelValue:{type:[String,Number],default:""},type:{type:String,default:"time",validator:e=>["tx","time","m","km","degrees"].includes(e)},maxValue:{type:Number,default:126},minValue:{type:Number,default:0}},computed:{inputType(){return"text"}},data(){return{inputValue:"0"}},watch:{modelValue:{immediate:!0,handler(e){this.inputValue=this.type==="time"?e||"0:00":this.type==="tx"||this.type==="degrees"||this.type==="km"||this.type==="m"?e||"0":e||""}},type:{immediate:!0,handler(e){e==="time"&&!this.inputValue&&(this.inputValue="0:00")}},inputValue(e,o){this.$emit("value-changed",{newValue:e,oldValue:o,type:this.type})}},methods:{handleInput(){let e=this.inputValue;switch(this.type){case"m":e=this.inputValue.replace(/[^\d.-]/g,"");const o=parseFloat(e);isNaN(o)||(o>this.maxValue?e=String(this.maxValue):o<this.minValue&&(e=String(this.minValue)));break;case"km":e=this.inputValue.replace(/[^\d.]/g,"");const a=parseFloat(e);!isNaN(a)&&a>50&&(e="50");break;case"tx":e=this.inputValue.replace(/[^\d.]/g,"");const r=parseFloat(e);!isNaN(r)&&r>10&&(e="10");const i=e.split(".").length-1;if(i>1)e=e.slice(0,-1);else if(i===1){const l=e.indexOf(".");e.length-1-l>2&&(e=e.slice(0,l+3))}break;case"degrees":e=this.inputValue.replace(/[^\d.]/g,"");const n=parseFloat(e);!isNaN(n)&&n>360&&(e="360");break;case"time":e=this.formatTimeValue(e);break}this.inputValue=e,this.$emit("update:modelValue",e)},formatTimeValue(e){e=e.replace(/[^\d:]/g,"");const o=e.split(":");let a=parseInt(o[0]||0),r=parseInt(o[1]||0);return r>59&&(a+=Math.floor(r/60),r=r%60),(a>8||a===8&&r>20)&&(a=8,r=20),`${a}:${r.toString().padStart(2,"0")}`},incrementValue(){if(this.type==="m"){const e=parseFloat(this.inputValue)||0;e<this.maxValue&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="km"){const e=parseFloat(this.inputValue)||0;e<50&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="tx"){const e=parseFloat(this.inputValue)||0;e<10&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="degrees"){const e=parseFloat(this.inputValue)||0;e<360&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="time"){const[e,o]=this.inputValue.split(":").map(Number);let a=e*60+o+1;a>500&&(a=500);const r=Math.floor(a/60),i=a%60;this.inputValue=`${r}:${i.toString().padStart(2,"0")}`,this.$emit("update:modelValue",this.inputValue)}},decrementValue(){if(this.type==="m"){const e=parseFloat(this.inputValue)||0,o=Math.max(this.minValue,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="km"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="tx"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="degrees"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="time"){const[e,o]=this.inputValue.split(":").map(Number);let a=e*60+o-1;a=Math.max(0,a);const r=Math.floor(a/60),i=a%60;this.inputValue=`${r}:${i.toString().padStart(2,"0")}`,this.$emit("update:modelValue",this.inputValue)}}}},Kp=e=>(t.pushScopeId("data-v-275559d5"),e=e(),t.popScopeId(),e),ID={class:"input-template-container"},DD={class:"input-with-arrows"},zD={class:"input-wrapper"},jD={key:0,class:"unit-prefix"},UD=["type"],HD={key:1,class:"unit-suffix"},WD={key:2,class:"unit-suffix km-suffix"},qD={key:3,class:"unit-suffix"},GD={key:4,class:"unit-suffix"},YD={class:"arrows-container"},ZD=Kp(()=>t.createElementVNode("span",{class:"arrow-icon up"},null,-1)),JD=[ZD],KD=Kp(()=>t.createElementVNode("span",{class:"arrow-icon down"},null,-1)),XD=[KD];function QD(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",ID,[t.createElementVNode("div",DD,[t.createElementVNode("div",zD,[a.type==="km"?(t.openBlock(),t.createElementBlock("span",jD,">")):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("input",{type:n.inputType,class:t.normalizeClass(["custom-input",{"m-type":a.type==="m","km-type":a.type==="km","time-type":a.type==="time","tx-type":a.type==="tx"}]),style:t.normalizeStyle({width:`${a.width}px`,height:`${a.height}px`}),"onUpdate:modelValue":o[0]||(o[0]=l=>i.inputValue=l),onInput:o[1]||(o[1]=(...l)=>n.handleInput&&n.handleInput(...l))},null,46,UD),[[t.vModelDynamic,i.inputValue]]),a.type==="m"?(t.openBlock(),t.createElementBlock("span",HD,"m")):t.createCommentVNode("",!0),a.type==="km"?(t.openBlock(),t.createElementBlock("span",WD,"km/h")):t.createCommentVNode("",!0),a.type==="tx"?(t.openBlock(),t.createElementBlock("span",qD,"xT")):t.createCommentVNode("",!0),a.type==="degrees"?(t.openBlock(),t.createElementBlock("span",GD,"°")):t.createCommentVNode("",!0)]),t.createElementVNode("div",YD,[t.createElementVNode("button",{class:"arrow-button up",onClick:o[2]||(o[2]=(...l)=>n.incrementValue&&n.incrementValue(...l))},JD),t.createElementVNode("button",{class:"arrow-button down",onClick:o[3]||(o[3]=(...l)=>n.decrementValue&&n.decrementValue(...l))},XD)])])])}const Uo=so(LD,[["render",QD],["__scopeId","data-v-275559d5"]]),Tl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(n=>{const[l,s]=n.split("-").map(Number);return{row:l,col:s,value:this.getSequentialNumber(l,s)}}),a={};o.forEach(n=>{a[n.col]||(a[n.col]=[]),a[n.col].push(n)});const r=[];Object.values(a).forEach(n=>{n.sort((s,d)=>d.row-s.row);let l=[n[0]];for(let s=1;s<n.length;s++){const d=n[s];n[s-1].row-d.row===1?l.push(d):(l.length>0&&r.push(l),l=[d])}l.length>0&&r.push(l)});const i=r.sort((n,l)=>{const s=Math.min(...n.map(c=>c.value)),d=Math.min(...l.map(c=>c.value));return s-d}).map(n=>{const l=n.map(s=>s.value).sort((s,d)=>d-s);return l.length===1?[l[0],l[0]]:[l[0],l[l.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(e=>{if(Array.isArray(e)&&e.length===2){const[o,a]=e,r=17-Math.floor((o-1)/21),i=(o-1)%21+1,n=17-Math.floor((a-1)/21),l=(a-1)%21+1;if(i===l){const s=Math.min(r,n),d=Math.max(r,n);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,l),d=Math.max(i,l);for(let c=s;c<=d;c++){const m=c===i?r:1,f=c===l?n:17;for(let y=Math.min(m,f);y<=Math.max(m,f);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));this.updateSelectAllState()},getSectionId(e,o){return`${e}-${o}`},isSelected(e,o){return this.selectedSections.has(this.getSectionId(e,o))},toggleSection(e,o){const a=this.getSectionId(e,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let e=357;this.selectAll=this.selectedSections.size===e})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const r=this.getSectionId(e,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(r)),this.dragSelectMode?this.selectedSections.add(r):this.selectedSections.delete(r),this.updateSelectAllState()},getSequentialNumber(e,o){return(17-e)*21+o}}},Xp=()=>{t.useCssVars(e=>({f4642dbe:e.fieldWidth+"px",82700512:(e.displayMode?e.fieldHeight-24:e.fieldHeight)+"px"}))},Qp=Tl.setup;Tl.setup=Qp?(e,o)=>(Xp(),Qp(e,o)):Xp;const ez=e=>(t.pushScopeId("data-v-7ae64b45"),e=e(),t.popScopeId(),e),tz={class:"field-template-element"},oz={class:"field-container"},az={key:0,class:"select-all-container"},rz={class:"select-all-label"},nz=ez(()=>t.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),iz=["onMouseenter","onMousedown"],lz=t.createStaticVNode('<div class="attack-direction" data-v-7ae64b45><div class="arrow-line" data-v-7ae64b45></div><span class="attack-text" data-v-7ae64b45>Ataca</span><div class="arrow-line" data-v-7ae64b45></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-7ae64b45><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-7ae64b45></polygon></svg></div>',1);function sz(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",tz,[t.createElementVNode("div",oz,[a.displayMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",az,[t.createElementVNode("label",rz,[nz,t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=l=>i.selectAll=l),onChange:o[1]||(o[1]=(...l)=>n.toggleAllSections&&n.toggleAllSections(...l))},null,544),[[t.vModelCheckbox,i.selectAll]])])])),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[3]||(o[3]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[4]||(o[4]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(17,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(21,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(l,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(l,s),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(l,s),["prevent"])},null,42,iz)),64))],64))),64))],32),lz])])}const e1=so(Tl,[["render",sz],["__scopeId","data-v-7ae64b45"]]),ot=e=>(t.pushScopeId("data-v-ad3ea53b"),e=e(),t.popScopeId(),e),cz={class:"modal-header"},dz=ot(()=>t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{opacity:".8",stroke:"#fff","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M5 15 15 5M15 15 5 5"})])],-1)),uz=[dz],pz={class:"modal-body"},mz={key:0,class:"modal-body__fields"},fz={key:1,class:"field-complex"},hz=ot(()=>t.createElementVNode("div",{class:"title"}," Elige la zona de origen del balón: ",-1)),yz={key:1,class:"field-complex"},gz=ot(()=>t.createElementVNode("div",{class:"title"}," Elige la zona de destino del balón: ",-1)),bz=ot(()=>t.createElementVNode("div",{class:"separator",style:{width:"100%","max-width":"82%"}},null,-1)),Sz={class:"modal-body__distances"},_z={class:"modal-body__distances__min"},wz=ot(()=>t.createElementVNode("div",{class:"title"}," Distancia mínima del pase: ",-1)),kz={class:"parameters"},Ez={class:"parameters__parameter"},Cz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje X de la cancha (de portería a portería) ",-1)),xz={class:"parameters__parameter__value"},Vz={class:"parameters__parameter"},Nz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje Y de la cancha (de banda a banda) ",-1)),Bz={class:"parameters__parameter__value"},Fz={class:"parameters__parameter"},Tz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Distancia total (No importa si va diagonal) ",-1)),vz={class:"parameters__parameter__value"},Az={class:"modal-body__distances__max"},$z=ot(()=>t.createElementVNode("div",{class:"title"}," Distancia máxima del pase: ",-1)),Rz={class:"parameters"},Oz={class:"parameters__parameter"},Mz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje X de la cancha (de portería a portería) ",-1)),Pz={class:"parameters__parameter__value"},Lz={class:"parameters__parameter"},Iz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje Y de la cancha (de banda a banda) ",-1)),Dz={class:"parameters__parameter__value"},zz={class:"parameters__parameter"},jz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Distancia total (No importa si va diagonal) ",-1)),Uz={class:"parameters__parameter__value"},Hz=ot(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Wz={__name:"ModalPassParameters",props:{modelValue:{type:Boolean,default:!1},zIndex:{type:Number,default:1002},variable:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref([]),n=t.ref([]),l=t.ref([]),s=t.ref([]),d=[{quarter:1,sections:[1,2,3,4]},{quarter:2,sections:[5,6,7,8]},{quarter:3,sections:[9,10,11,12]},{quarter:4,sections:[13,14,15,16]}],c=t.computed(()=>{if(r.variable&&r.variable.parameters&&r.variable.parameters.destiny_zones&&r.variable.parameters.zone_type===1&&r.variable.parameters.destiny_zones.length){const P=d.find(O=>{const T=r.variable.parameters.destiny_zones[0];return O.sections.includes(T)});if(P)return[P.quarter]}return[]}),m=t.computed(()=>({"--z-index-overlay":r.zIndex})),f=()=>{a("update:modelValue",!0)};t.watch(()=>r.modelValue,P=>{P?(y(),document.body.classList.add("modal-open")):document.body.classList.remove("modal-open")});function y(){r.variable&&r.variable.parameters&&(r.variable.parameters.zone_type===2?(i.value=[...r.variable.parameters.origin_zones],n.value=[...r.variable.parameters.destiny_zones]):(l.value=[...r.variable.parameters.origin_zones],s.value=[...r.variable.parameters.destiny_zones]))}function u(){r.variable.isSelected||N(),a("update:model-value",!1)}function h(){r.variable.isSelected=!0,a("update:modelValue",!1)}function p(P){r.variable.parameters.origin_zones=[...P]}function g(P){P.length&&(r.variable.parameters.destiny_zones=[...P])}function S(P){r.variable.parameters.origin_zones=P}function b(P){r.variable.parameters.destiny_zones=P}function N(){r.variable.parameters={...r.variable.parametersDefault,origin_zones:[...r.variable.parametersDefault.origin_zones],destiny_zones:[...r.variable.parametersDefault.destiny_zones]},y()}return o({showModal:f}),(P,O)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"modal"},{default:t.withCtx(()=>{var T,v;return[e.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:O[6]||(O[6]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",cz,[t.createElementVNode("div",null,[t.createElementVNode("div",null,t.toDisplayString((v=(T=e.variable)==null?void 0:T.parametersConditions)==null?void 0:v.title),1)]),t.createElementVNode("div",{class:"modal-content__close",onClick:u},uz)]),t.createElementVNode("div",pz,[e.variable&&e.variable.parameters?(t.openBlock(),t.createElementBlock("div",mz,[t.createElementVNode("div",null,[e.variable.parameters.zone_type===1?(t.openBlock(),t.createBlock(Jp,{key:0,title:"Elige la zona de origen del balón:","initial-sections":l.value,onSectionsChanged:p},null,8,["initial-sections"])):(t.openBlock(),t.createElementBlock("div",fz,[hz,t.createVNode(e1,{"display-mode":!1,"initial-sections":i.value,onSectionsChanged:S},null,8,["initial-sections"])]))]),t.createElementVNode("div",null,[e.variable.parameters.zone_type===1?(t.openBlock(),t.createBlock(Jp,{key:0,title:"Elige la zona de destino del balón:","initial-sections":e.variable.parameters.destiny_zones,quarters:c.value,onSectionsChanged:g},null,8,["initial-sections","quarters"])):(t.openBlock(),t.createElementBlock("div",yz,[gz,t.createVNode(e1,{"display-mode":!1,"initial-sections":n.value,onSectionsChanged:b},null,8,["initial-sections"])]))])])):t.createCommentVNode("",!0),bz,t.createElementVNode("div",Sz,[t.createElementVNode("div",_z,[wz,t.createElementVNode("div",kz,[t.createElementVNode("div",Ez,[Cz,t.createElementVNode("div",xz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_distance_x,"onUpdate:modelValue":O[0]||(O[0]=w=>e.variable.parameters.minimum_distance_x=w)},{maxValue:Number(e.variable.parameters.maximum_distance_x),minValue:e.variable.parametersConditions.x.min}),null,16,["modelValue"])])]),t.createElementVNode("div",Vz,[Nz,t.createElementVNode("div",Bz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_distance_y,"onUpdate:modelValue":O[1]||(O[1]=w=>e.variable.parameters.minimum_distance_y=w)},{maxValue:Number(e.variable.parameters.maximum_distance_y),minValue:e.variable.parametersConditions.y.min}),null,16,["modelValue"])])]),t.createElementVNode("div",Fz,[Tz,t.createElementVNode("div",vz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_total_distance,"onUpdate:modelValue":O[2]||(O[2]=w=>e.variable.parameters.minimum_total_distance=w)},{maxValue:Number(e.variable.parameters.maximum_total_distance),minValue:e.variable.parametersConditions.total.min}),null,16,["modelValue"])])])])]),t.createElementVNode("div",Az,[$z,t.createElementVNode("div",Rz,[t.createElementVNode("div",Oz,[Mz,t.createElementVNode("div",Pz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_distance_x,"onUpdate:modelValue":O[3]||(O[3]=w=>e.variable.parameters.maximum_distance_x=w)},{maxValue:e.variable.parametersConditions.x.max,minValue:Number(e.variable.parameters.minimum_distance_x)}),null,16,["modelValue"])])]),t.createElementVNode("div",Lz,[Iz,t.createElementVNode("div",Dz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_distance_y,"onUpdate:modelValue":O[4]||(O[4]=w=>e.variable.parameters.maximum_distance_y=w)},{maxValue:e.variable.parametersConditions.y.max,minValue:Number(e.variable.parameters.minimum_distance_y)}),null,16,["modelValue"])])]),t.createElementVNode("div",zz,[jz,t.createElementVNode("div",Uz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_total_distance,"onUpdate:modelValue":O[5]||(O[5]=w=>e.variable.parameters.maximum_total_distance=w)},{maxValue:e.variable.parametersConditions.total.max,minValue:Number(e.variable.parameters.minimum_total_distance)}),null,16,["modelValue"])])])])])])]),Hz,t.createElementVNode("div",{class:"modal-footer"},[t.createElementVNode("div",{role:"button",onClick:N,class:"button-cancel button"}," Quitar filtros "),t.createElementVNode("div",{role:"button",class:"button-save button active",onClick:h}," Aplicar ")])],512)],4)):t.createCommentVNode("",!0)]}),_:1})]))}},qz=so(Wz,[["__scopeId","data-v-ad3ea53b"]]),Gz=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Ho=e=>(t.pushScopeId("data-v-af8cb1a8"),e=e(),t.popScopeId(),e),Yz={class:"players-limit"},Zz=Ho(()=>t.createElementVNode("div",{class:"players-limit__content__body"}," No puedes comparar más de 10 jugadores a la vez. ",-1)),Jz=Ho(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Kz={key:0,class:"header-tools header-tools-graph"},Xz=Ho(()=>t.createElementVNode("br",null,null,-1)),Qz=Ho(()=>t.createElementVNode("br",null,null,-1)),ej={key:1,class:"add-player-container"},tj=Ho(()=>t.createElementVNode("div",null,"Agregar jugador",-1)),oj=Ho(()=>t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),aj=[tj,oj],rj={key:0,class:"radar"},nj={key:1,class:"radar"},ij={__name:"GSC-TableAndRadar",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDgyMTcxMTQsImV4cCI6MTc3OTc1MzExNH0.08YqLIH66doeBS-NLf1CPJM7WnvHLcB2Ypxm5LtBADg"},dynamicCategories:{type:Object,default:()=>({})},positionIds:{type:Array,default:()=>[]},customVariables:{type:Array,default:()=>[]},customVariablesOnly:{type:Boolean,default:!1},dynamicVariablesOnly:{type:Boolean,default:!1},isRankingVisible:{type:Boolean,default:!0},isDeletePlayerVisible:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]},applyAdditionalData:{type:Boolean,default:!1},isAddPlayerVisible:{type:Boolean,default:!0},isAddToListVisible:{type:Boolean,default:!0},componentWidth:{type:Number,default:800},tableHeaderMobile:{type:Boolean,default:!1}},emits:["view-profile","add-player","delete-player","list-created"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref([]),n=t.ref([]),l=t.ref([]),s=t.ref([]),d=t.ref(!1),c=t.ref(0),m=t.computed(()=>({"--grid-template-columns":r.dynamicVariablesOnly||r.customVariablesOnly?"1fr":"repeat(2, 1fr)"})),f=t.computed(()=>l.value.map(L=>{const K={...L};return delete K.isExpanded,K}));function y(L){const K=new Date;let ae=K.getFullYear()-L.getFullYear();const le=K.getMonth()-L.getMonth();return(le<0||le===0&&K.getDate()<L.getDate())&&ae--,ae}const u=t.computed(()=>{const L=r.positionIds&&r.positionIds.length>0?r.positionIds.reduce((K,ae)=>`${K}${K==="?"?"":"&"}p=${ae}`,"?"):"";return`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${r.userId}/variables${L}`});t.watch(u,(L,K)=>{L&&L!==K&&(r.customVariables&&r.customVariables.length?s.value=r.customVariables.map(ae=>({...ae,isSelected:!0})):h(L))},{immediate:!0}),t.watch(()=>r.isEditMode,L=>{L&&i.value.forEach(K=>{K.isSelected=!1})});async function h(L){try{const K=await(await fetch(L,{method:"GET",headers:{"Content-Type":"application/json",Authorization:r.token}})).json();s.value=K.data?K.data.map(ae=>({...ae,isSelected:ae.checked})):[]}catch(K){console.error("Error fetching user variables:",K)}}function p(L){l.value=L}function g(L){const[K,ae]=L.split(","),le=K.split(" ");let C="";for(const M of le)if(C+=` ${M}`,M.length>3)break;return ae&&K?`${ae.trim()} ${C}`:""}function S(L){i.value=L.map((K,ae)=>{const le=ae+1;return K.position&&(console.log("typeof player.position",typeof K.position),typeof K.position=="string"?K.position_name=K.position:typeof K.position=="number"&&(K.position_id=K.position)),{...K,position:le<10?`0${le}`:`${le}`,isSelected:!1,isExpanded:!1,isOdd:ae%2!==0,countryFlagUrl:`https://golstatsimages.blob.core.windows.net/flags/${K.nationality_id}.jpg`,playerPosition:K.position_name?K.position_name:Gz.get(K.position_id)||"",age:y(new Date(K.dob)),shortName:g(K.name),index:ae}}),n.value=i.value.map(K=>({...K})),c.value+=1}function b(L){i.value.forEach(ae=>{ae.isNew=!1});const K=i.value.find(ae=>ae.id&&L.id&&ae.id===L.id||ae.objeto_player&&ae.objeto_player.player_id===L.player_id||ae.player_id&&L.player_id&&ae.player_id===L.player_id||ae.id&&L.player_id&&ae.id===L.player_id||ae.player_id&&L.id&&ae.player_id===L.id);setTimeout(()=>{K||(L.name=g(L.name),L.isNew=!0,i.value.unshift(L))},500)}function N(L){d.value=L,L&&(document.body.style.overflow="hidden",document.html.style.overflow="hidden")}function P(){a("click-add-player")}function O(L){a("view-profile",L)}function T(L){a("add-player",L)}function v(L){a("delete-player",L)}function w(){a("list-created")}const A=t.ref(!1),k=t.ref(null);function E(L){k.value=L,A.value=!0}function B(L){A.value=L}function F(){d.value=!1,document.body.style.overflow="auto",document.html.style.overflow="auto"}return o({setPlayers:S,addPlayer:b}),(L,K)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",Yz,[t.createElementVNode("div",{class:"players-limit__content"},[Zz,Jz,t.createElementVNode("div",{class:"players-limit__content__footer"},[t.createElementVNode("div",{role:"button",class:"button-success",onClick:F}," Aceptar ")])])],512),[[t.vShow,d.value]])]),_:1})])),t.createVNode(qz,{"model-value":A.value,variable:k.value,"onUpdate:modelValue":B},null,8,["model-value","variable"]),t.createElementVNode("div",{class:"table-radars",style:t.normalizeStyle([m.value,e.tableHeaderMobile?"flex-direction: column-reverse;":""])},[t.createElementVNode("div",{class:"table-radars__table",style:t.normalizeStyle(e.tableHeaderMobile?"max-width: 100%; min-width:300px":"")},[e.tableHeaderMobile?(t.openBlock(),t.createElementBlock("div",Kz,[t.createElementVNode("div",{class:"ht-left",style:t.normalizeStyle(e.componentWidth<450?"gap:5px;":"")},[t.createElementVNode("span",{class:"ht-title",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},"Rank",4),e.dynamicVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:"ht-action",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},[t.createTextVNode("Agregar"),Xz,t.createTextVNode("a lista")],4)),t.createElementVNode("span",{class:"ht-action",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},[t.createTextVNode("Ver"),Qz,t.createTextVNode("en spider")],4)],4)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(IV,{key:c.value,players:i.value,"is-ranking-visible":e.isRankingVisible,"is-delete-player-visible":e.isDeletePlayerVisible,lists:e.lists,"component-width":e.componentWidth,"dynamic-variables-only":e.dynamicVariablesOnly,"custom-variables-only":e.customVariablesOnly,token:e.token,"user-id":e.userId,"is-add-to-list-visible":e.isAddToListVisible,onChangeSelectedPlayers:p,onClickCheckbox:N,onViewProfile:O,onAddPlayer:T,onDeletePlayer:v,onListCreated:w},null,8,["players","is-ranking-visible","is-delete-player-visible","lists","component-width","dynamic-variables-only","custom-variables-only","token","user-id","is-add-to-list-visible"])),e.isAddPlayerVisible?(t.openBlock(),t.createElementBlock("div",ej,[t.createElementVNode("div",{role:"button",class:"button-add-player",onClick:P},aj)])):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"table-radars__radars",style:t.normalizeStyle(e.componentWidth<=500?"--grid-template-columns: repeat(1fr, 1fr)":"")},[e.dynamicVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",rj,[t.createVNode(Gp,{title:"Tipos de jugadas Profesor Lillini:",players:f.value,"all-players":i.value,"custom-categories":s.value,"user-id":e.userId,token:e.token,"has-header":!e.customVariablesOnly,"apply-additional-data":e.applyAdditionalData,"component-width":e.componentWidth,"is-mobile":""},null,8,["players","all-players","custom-categories","user-id","token","has-header","apply-additional-data","component-width"])])),e.customVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nj,[t.createVNode(Gp,{title:"Variables Dinámicas:",players:f.value,"all-players":i.value,"dynamic-categories":e.dynamicCategories,"user-id":e.userId,token:e.token,"is-mobile":"","component-width":e.componentWidth,"apply-additional-data":e.applyAdditionalData,onClickParameters:E},null,8,["players","all-players","dynamic-categories","user-id","token","component-width","apply-additional-data"])]))],4)],4)],64))}},lj=so(ij,[["__scopeId","data-v-af8cb1a8"]]);function sj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},t1;function cj(){if(t1)return nn.exports;t1=1;function e(){}return e.prototype={on:function(o,a,r){var i=this.e||(this.e={});return(i[o]||(i[o]=[])).push({fn:a,ctx:r}),this},once:function(o,a,r){var i=this;function n(){i.off(o,n),a.apply(r,arguments)}return n._=a,this.on(o,n,r)},emit:function(o){var a=[].slice.call(arguments,1),r=((this.e||(this.e={}))[o]||[]).slice(),i=0,n=r.length;for(i;i<n;i++)r[i].fn.apply(r[i].ctx,a);return this},off:function(o,a){var r=this.e||(this.e={}),i=r[o],n=[];if(i&&a)for(var l=0,s=i.length;l<s;l++)i[l].fn!==a&&i[l].fn._!==a&&n.push(i[l]);return n.length?r[o]=n:delete r[o],this}},nn.exports=e,nn.exports.TinyEmitter=e,nn.exports}var vl,o1;function dj(){if(o1)return vl;o1=1;var e=cj();return vl=new e,vl}var uj=dj();const Na=sj(uj),pj={class:"graph-view"},mj=yt({__name:"GraphView",props:{dynamicCategories:{type:Object,default:()=>null},isScouting:{type:Boolean,default:!0},componentWidth:{type:Number,default:800},tableHeaderMobile:{type:Boolean,default:!1},userId:{type:Number,default:0},positionIds:{type:Array,default:()=>[]},lists:{type:Array,default:()=>[]},token:{type:String,default:""},isAddPlayerVisible:{type:Boolean,default:!1}},emits:["showProfile","playerAdded","click-add-player"],setup(e,{emit:o}){const a=t.ref(null);Na.on("set-players",s=>{a.value&&a.value.setPlayers([...s])}),Na.on("add-player",s=>{console.count("add-player"),a.value&&a.value.addPlayer(s)});const r=o;function i(s){r("showProfile",s)}function n(){r("playerAdded")}function l(){r("click-add-player")}return(s,d)=>(t.openBlock(),t.createElementBlock("div",pj,[t.createVNode(t.unref(lj),{ref_key:"tableAndRadar",ref:a,"user-id":e.userId,"dynamic-categories":e.dynamicCategories,"position-ids":e.positionIds,token:e.token,lists:e.lists,"component-width":e.componentWidth,"table-header-mobile":e.tableHeaderMobile,"dynamic-variables-only":e.isScouting,"is-add-to-list-visible":!e.isScouting,"is-add-player-visible":e.isAddPlayerVisible,onViewProfile:i,onListCreated:n,onClickAddPlayer:l},null,8,["user-id","dynamic-categories","position-ids","token","lists","component-width","table-header-mobile","dynamic-variables-only","is-add-to-list-visible","is-add-player-visible"])]))}},[["__scopeId","data-v-98c1c696"]]),Al=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},$l={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){if(this.lastSelectedSections.every(a=>e.has(a)))return;const o=Array.from(e).map(Number).sort((a,r)=>a-r);this.lastSelectedSections=[...o],this.$emit("sections-changed",o)},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(e=>{const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())});else for(let e=1;e<=16;e++){const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())}this.updateSelectAllState()},isSelected(e){return this.selectedSections.has(e.toString())},toggleSection(e){const o=Math.ceil(e/4);if(!this.isQuarterEnabled(o))return;const a=e.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let e=1;e<=16;e++)this.selectedSections.add(e.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=e.toString(),r=Math.ceil(e/4);if(this.isQuarterEnabled(r)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(e,o){return(e-1)*4+o},getSectionIndex(e,o){return(e-1)*4+o},selectColumn(e){if(!this.isQuarterEnabled(e))return;const o=(e-1)*4+1,a=e*4;if(Array.from({length:4},(r,i)=>(o+i).toString()).every(r=>this.selectedSections.has(r))&&this.selectedSections.size>4)for(let r=o;r<=a;r++)this.selectedSections.delete(r.toString());else for(let r=o;r<=a;r++)this.selectedSections.add(r.toString());this.updateSelectAllState()},isQuarterSelected(e){const o=(e-1)*4+1;return Array.from({length:4},(a,r)=>(o+r).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(e){return this.quarters.includes(e)}}},a1=()=>{t.useCssVars(e=>({"3f07ccca":e.fieldWidth+"px","26834d3a":e.fieldHeight+"px","1711e604":e.displayMode?"-28px":"0"}))},r1=$l.setup;$l.setup=r1?(e,o)=>(a1(),r1(e,o)):a1;const fj={class:"field-template-element"},hj={class:"field-container"},yj=["onMouseenter","onMousedown"],gj={class:"column-buttons"},bj=["onClick","disabled"];function Sj(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",fj,[t.createElementVNode("div",hj,[t.createElementVNode("div",{class:t.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[t.createElementVNode("span",null,t.toDisplayString(a.title),1)],2),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[1]||(o[1]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[2]||(o[2]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"field-column"},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(n.getSectionIndex(l,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(n.getSectionIndex(l,s)),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(n.getSectionIndex(l,s)),["prevent"])},null,42,yj)),64))])),64))],32),t.createElementVNode("div",gj,[a.displayMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"column-label"},t.toDisplayString(l)+"/4 tos ",1)),64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},t.renderList(4,l=>t.createElementVNode("button",{key:l,class:t.normalizeClass(["column-button",{selected:n.isQuarterSelected(l),disabled:!n.isQuarterEnabled(l)}]),onClick:s=>n.selectColumn(l),disabled:!n.isQuarterEnabled(l)},t.toDisplayString(l)+"/4 tos ",11,bj)),64))])])])}const _j=Al($l,[["render",Sj],["__scopeId","data-v-1f6351a4"]]),Rl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(n=>{const[l,s]=n.split("-").map(Number);return{row:l,col:s,value:this.getSequentialNumber(l,s)}}),a={};o.forEach(n=>{a[n.col]||(a[n.col]=[]),a[n.col].push(n)});const r=[];Object.values(a).forEach(n=>{n.sort((s,d)=>d.row-s.row);let l=[n[0]];for(let s=1;s<n.length;s++){const d=n[s];n[s-1].row-d.row===1?l.push(d):(l.length>0&&r.push(l),l=[d])}l.length>0&&r.push(l)});const i=r.sort((n,l)=>{const s=Math.min(...n.map(c=>c.value)),d=Math.min(...l.map(c=>c.value));return s-d}).map(n=>{const l=n.map(s=>s.value).sort((s,d)=>d-s);return l.length===1?[l[0],l[0]]:[l[0],l[l.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(e=>{if(Array.isArray(e)&&e.length===2){const[o,a]=e,r=17-Math.floor((o-1)/21),i=(o-1)%21+1,n=17-Math.floor((a-1)/21),l=(a-1)%21+1;if(i===l){const s=Math.min(r,n),d=Math.max(r,n);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,l),d=Math.max(i,l);for(let c=s;c<=d;c++){const m=c===i?r:1,f=c===l?n:17;for(let y=Math.min(m,f);y<=Math.max(m,f);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));this.updateSelectAllState()},getSectionId(e,o){return`${e}-${o}`},isSelected(e,o){return this.selectedSections.has(this.getSectionId(e,o))},toggleSection(e,o){const a=this.getSectionId(e,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let e=357;this.selectAll=this.selectedSections.size===e})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const r=this.getSectionId(e,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(r)),this.dragSelectMode?this.selectedSections.add(r):this.selectedSections.delete(r),this.updateSelectAllState()},getSequentialNumber(e,o){return(17-e)*21+o}}},n1=()=>{t.useCssVars(e=>({"7dc153b4":e.fieldWidth+"px","3cee0bfc":(e.displayMode?e.fieldHeight-24:e.fieldHeight)+"px"}))},i1=Rl.setup;Rl.setup=i1?(e,o)=>(n1(),i1(e,o)):n1;const wj={class:"field-template-element"},kj={class:"field-container"},Ej={key:0,class:"select-all-container"},Cj={class:"select-all-label"},xj=["onMouseenter","onMousedown"];function Vj(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",wj,[t.createElementVNode("div",kj,[a.displayMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ej,[t.createElementVNode("label",Cj,[o[5]||(o[5]=t.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=l=>i.selectAll=l),onChange:o[1]||(o[1]=(...l)=>n.toggleAllSections&&n.toggleAllSections(...l))},null,544),[[t.vModelCheckbox,i.selectAll]])])])),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[3]||(o[3]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[4]||(o[4]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(17,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(21,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(l,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(l,s),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(l,s),["prevent"])},null,42,xj)),64))],64))),64))],32),o[6]||(o[6]=t.createStaticVNode('<div class="attack-direction" data-v-389c50fa><div class="arrow-line" data-v-389c50fa></div><span class="attack-text" data-v-389c50fa>Ataca</span><div class="arrow-line" data-v-389c50fa></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-389c50fa><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-389c50fa></polygon></svg></div>',1))])])}const Nj=Al(Rl,[["render",Vj],["__scopeId","data-v-389c50fa"]]),Bj={components:{FieldGolStatsTemplates:_j,FieldTemplatesElement:Nj},name:"ModalPassConditions",props:{isVisible:{type:Boolean,required:!0},parameters:{type:Object,required:!0}},data(){return{quarters:[1,2],userId:24254,originSelection:[],destinationSelection:[],selectAllOrigin:!1,selectAllDestination:!1,minDistanceX:.5,minDistanceY:.5,minDistanceTotal:.5}},methods:{isArrayOfArrays(e){return Array.isArray(e)&&e.length>0&&e.every(o=>Array.isArray(o))},closeModal(){this.$emit("update:isVisible",!1)},updateOriginSelection(e){this.originSelection=e},updateDestinationSelection(e){this.destinationSelection=e},clearFilters(){this.originSelection=[],this.destinationSelection=[],this.selectAllOrigin=!1,this.selectAllDestination=!1,this.minDistanceX=0,this.minDistanceY=0,this.minDistanceTotal=0},applyFilters(){this.$emit("update:isVisible",!1)}}},Fj={key:0,class:"modal-wrapper"},Tj={class:"modal-overlay"},vj={class:"modal-container"},Aj={class:"modal-content"},$j={class:"modal-header"},Rj={class:"fields-container"},Oj={class:"field-section"},Mj={class:"field-section"},Pj={class:"distance-section"},Lj={class:"distance-info"},Ij={class:"info-row"},Dj={class:"info-value"},zj={class:"info-row"},jj={class:"info-value"},Uj={class:"info-row"},Hj={class:"info-value"},Wj={class:"distance-section"},qj={class:"distance-info"},Gj={class:"info-row"},Yj={class:"info-value"},Zj={class:"info-row"},Jj={class:"info-value"},Kj={class:"info-row"},Xj={class:"info-value"};function Qj(e,o,a,r,i,n){var l,s,d,c,m,f,y,u,h,p,g,S;const b=t.resolveComponent("FieldGolStatsTemplates"),N=t.resolveComponent("FieldTemplatesElement");return a.isVisible?(t.openBlock(),t.createElementBlock("div",Fj,[t.createElementVNode("div",Tj,[t.createElementVNode("div",vj,[t.createElementVNode("div",Aj,[t.createElementVNode("div",$j,[o[2]||(o[2]=t.createStaticVNode('<div class="header-content" data-v-834c0128><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-inspector="src/components/GSCTemplates.vue:100:15" data-v-a08c9209="" data-v-834c0128><path d="M5.18088 2.68185L3.12463 4.74435L2.31838 3.93185C2.20069 3.81416 2.04107 3.74805 1.87463 3.74805C1.70819 3.74805 1.54857 3.81416 1.43088 3.93185C1.31319 4.04954 1.24707 4.20917 1.24707 4.3756C1.24707 4.54204 1.31319 4.70166 1.43088 4.81935L2.68088 6.06935C2.73898 6.12793 2.80811 6.17443 2.88427 6.20616C2.96043 6.23789 3.04212 6.25423 3.12463 6.25423C3.20714 6.25423 3.28883 6.23789 3.36499 6.20616C3.44115 6.17443 3.51028 6.12793 3.56838 6.06935L6.06838 3.56935C6.12665 3.51108 6.17288 3.4419 6.20442 3.36576C6.23595 3.28962 6.25218 3.20802 6.25218 3.1256C6.25218 3.04319 6.23595 2.96159 6.20442 2.88545C6.17288 2.80931 6.12665 2.74013 6.06838 2.68185C6.0101 2.62358 5.94092 2.57735 5.86478 2.54582C5.78864 2.51428 5.70704 2.49805 5.62463 2.49805C5.54222 2.49805 5.46061 2.51428 5.38447 2.54582C5.30833 2.57735 5.23915 2.62358 5.18088 2.68185Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:101:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 8.125H2.5C2.33424 8.125 2.17527 8.19085 2.05806 8.30806C1.94085 8.42527 1.875 8.58424 1.875 8.75V11.25C1.875 11.4158 1.94085 11.5747 2.05806 11.6919C2.17527 11.8092 2.33424 11.875 2.5 11.875H5C5.16576 11.875 5.32473 11.8092 5.44194 11.6919C5.55915 11.5747 5.625 11.4158 5.625 11.25V8.75C5.625 8.58424 5.55915 8.42527 5.44194 8.30806C5.32473 8.19085 5.16576 8.125 5 8.125ZM4.375 10.625H3.125V9.375H4.375V10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:104:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 13.75H2.5C2.33424 13.75 2.17527 13.8158 2.05806 13.9331C1.94085 14.0503 1.875 14.2092 1.875 14.375V16.875C1.875 17.0408 1.94085 17.1997 2.05806 17.3169C2.17527 17.4342 2.33424 17.5 2.5 17.5H5C5.16576 17.5 5.32473 17.4342 5.44194 17.3169C5.55915 17.1997 5.625 17.0408 5.625 16.875V14.375C5.625 14.2092 5.55915 14.0503 5.44194 13.9331C5.32473 13.8158 5.16576 13.75 5 13.75ZM4.375 16.25H3.125V15H4.375V16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:107:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 9.375H13.125C13.2908 9.375 13.4497 9.30915 13.5669 9.19194C13.6842 9.07473 13.75 8.91576 13.75 8.75C13.75 8.58424 13.6842 8.42527 13.5669 8.30806C13.4497 8.19085 13.2908 8.125 13.125 8.125H8.125C7.95924 8.125 7.80027 8.19085 7.68306 8.30806C7.56585 8.42527 7.5 8.58424 7.5 8.75C7.5 8.91576 7.56585 9.07473 7.68306 9.19194C7.80027 9.30915 7.95924 9.375 8.125 9.375Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:110:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 10.625H8.125C7.95924 10.625 7.80027 10.6908 7.68306 10.8081C7.56585 10.9253 7.5 11.0842 7.5 11.25C7.5 11.4158 7.56585 11.5747 7.68306 11.6919C7.80027 11.8092 7.95924 11.875 8.125 11.875H18.125C18.2908 11.875 18.4497 11.8092 18.5669 11.6919C18.6842 11.5747 18.75 11.4158 18.75 11.25C18.75 11.0842 18.6842 10.9253 18.5669 10.8081C18.4497 10.6908 18.2908 10.625 18.125 10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:113:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 15H13.125C13.2908 15 13.4497 14.9342 13.5669 14.8169C13.6842 14.6997 13.75 14.5408 13.75 14.375C13.75 14.2092 13.6842 14.0503 13.5669 13.9331C13.4497 13.8158 13.2908 13.75 13.125 13.75H8.125C7.95924 13.75 7.80027 13.8158 7.68306 13.9331C7.56585 14.0503 7.5 14.2092 7.5 14.375C7.5 14.5408 7.56585 14.6997 7.68306 14.8169C7.80027 14.9342 7.95924 15 8.125 15Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:116:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 16.25H8.125C7.95924 16.25 7.80027 16.3158 7.68306 16.4331C7.56585 16.5503 7.5 16.7092 7.5 16.875C7.5 17.0408 7.56585 17.1997 7.68306 17.3169C7.80027 17.4342 7.95924 17.5 8.125 17.5H18.125C18.2908 17.5 18.4497 17.4342 18.5669 17.3169C18.6842 17.1997 18.75 17.0408 18.75 16.875C18.75 16.7092 18.6842 16.5503 18.5669 16.4331C18.4497 16.3158 18.2908 16.25 18.125 16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:119:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 3.75H13.125C13.2908 3.75 13.4497 3.68415 13.5669 3.56694C13.6842 3.44973 13.75 3.29076 13.75 3.125C13.75 2.95924 13.6842 2.80027 13.5669 2.68306C13.4497 2.56585 13.2908 2.5 13.125 2.5H8.125C7.95924 2.5 7.80027 2.56585 7.68306 2.68306C7.56585 2.80027 7.5 2.95924 7.5 3.125C7.5 3.29076 7.56585 3.44973 7.68306 3.56694C7.80027 3.68415 7.95924 3.75 8.125 3.75Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:122:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 6.25H18.125C18.2908 6.25 18.4497 6.18415 18.5669 6.06694C18.6842 5.94973 18.75 5.79076 18.75 5.625C18.75 5.45924 18.6842 5.30027 18.5669 5.18306C18.4497 5.06585 18.2908 5 18.125 5H8.125C7.95924 5 7.80027 5.06585 7.68306 5.18306C7.56585 5.30027 7.5 5.45924 7.5 5.625C7.5 5.79076 7.56585 5.94973 7.68306 6.06694C7.80027 6.18415 7.95924 6.25 8.125 6.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:125:17" data-v-a08c9209="" data-v-834c0128></path></svg><span data-v-834c0128>Elige las condiciones del pase</span></div>',1)),t.createElementVNode("button",{class:"close-button",onClick:o[0]||(o[0]=P=>e.$emit("update:isVisible",!1))},o[1]||(o[1]=[t.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})],-1)]))]),t.createElementVNode("div",Rj,[t.createElementVNode("div",Oj,[n.isArrayOfArrays((l=a.parameters)==null?void 0:l.origin_zones)?(t.openBlock(),t.createBlock(N,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(d=a.parameters)==null?void 0:d.origin_zones},null,8,["initial-sections"])):(t.openBlock(),t.createBlock(b,{key:0,title:"Elige la zona de origen del balón:","initial-sections":(s=a.parameters)==null?void 0:s.origin_zones,"display-mode":!0},null,8,["initial-sections"]))]),t.createElementVNode("div",Mj,[n.isArrayOfArrays((c=a.parameters)==null?void 0:c.destiny_zones)?(t.openBlock(),t.createBlock(N,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(f=a.parameters)==null?void 0:f.destiny_zones},null,8,["initial-sections"])):(t.openBlock(),t.createBlock(b,{key:0,title:"Elige la zona de destino del balón:","initial-sections":(m=a.parameters)==null?void 0:m.destiny_zones,"display-mode":!0},null,8,["initial-sections"]))])]),t.createElementVNode("div",Pj,[o[6]||(o[6]=t.createElementVNode("h3",null,"Distancia mínima del pase:",-1)),t.createElementVNode("div",Lj,[t.createElementVNode("div",Ij,[o[3]||(o[3]=t.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),t.createElementVNode("span",Dj,t.toDisplayString((y=a.parameters)==null?void 0:y.minimum_distance_x)+" m",1)]),t.createElementVNode("div",zj,[o[4]||(o[4]=t.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),t.createElementVNode("span",jj,t.toDisplayString((u=a.parameters)==null?void 0:u.minimum_distance_y)+" m",1)]),t.createElementVNode("div",Uj,[o[5]||(o[5]=t.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),t.createElementVNode("span",Hj,t.toDisplayString((h=a.parameters)==null?void 0:h.minimum_total_distance)+" m",1)])])]),t.createElementVNode("div",Wj,[o[10]||(o[10]=t.createElementVNode("h3",null,"Distancia máxima del pase:",-1)),t.createElementVNode("div",qj,[t.createElementVNode("div",Gj,[o[7]||(o[7]=t.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),t.createElementVNode("span",Yj,t.toDisplayString((p=a.parameters)==null?void 0:p.maximum_distance_x)+" m",1)]),t.createElementVNode("div",Zj,[o[8]||(o[8]=t.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),t.createElementVNode("span",Jj,t.toDisplayString((g=a.parameters)==null?void 0:g.maximum_distance_y)+" m",1)]),t.createElementVNode("div",Kj,[o[9]||(o[9]=t.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),t.createElementVNode("span",Xj,t.toDisplayString((S=a.parameters)==null?void 0:S.maximum_total_distance)+" m",1)])])])])])])])):t.createCommentVNode("",!0)}const l1=Al(Bj,[["render",Qj],["__scopeId","data-v-834c0128"]]),eU={key:0,class:"loading-container"},tU={key:1},oU={class:"tooltip-list"},aU=["onClick"],rU={class:"folder-icon"},nU={key:0,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iU={key:1,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lU=yt({__name:"AddToListTooltip",props:{lists:{type:Array,default:()=>[]},isModalOpen:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:""},selectedPlayer:{type:Object,default:()=>({})}},emits:["selectList","close","createNewList","playerAdded"],setup(e,{emit:o}){const a=e,r=t.ref(null),i=t.ref(!0),n=t.ref(!1),l=o;t.watch(()=>a.isModalOpen,y=>{i.value=!y});function s(){l("createNewList")}function d(y){i.value&&r.value&&!r.value.contains(y.target)&&l("close")}async function c(y){try{n.value=!0;const u={dob:a.selectedPlayer.dob,is_female:0,jersey:0,name:a.selectedPlayer.name,nationality:a.selectedPlayer.nationality,nationality_id:a.selectedPlayer.nationality_id,player_id:a.selectedPlayer.player_id,position:a.selectedPlayer.position_id,team_id:a.selectedPlayer.team_id},h={user_id:a.userId,id:y.id,players:[u]};(await we.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${y.id}/players`,h)).status===200&&(l("playerAdded"),l("selectList",y),l("close"))}catch(u){console.error("Error al agregar jugador a la lista:",u),n.value=!1}}function m(y){i.value&&y.target===r.value&&l("close")}function f(y){var u;return(u=y.players)==null?void 0:u.some(h=>h.player_id===a.selectedPlayer.player_id)}return t.onMounted(()=>{window.addEventListener("mousedown",d)}),t.onUnmounted(()=>{window.removeEventListener("mousedown",d)}),(y,u)=>(t.openBlock(),t.createElementBlock("div",{class:"add-to-list-tooltip",ref_key:"tooltipRef",ref:r,onClick:m},[u[5]||(u[5]=t.createElementVNode("div",{class:"tooltip-title"},"Agregar a lista existente:",-1)),n.value?(t.openBlock(),t.createElementBlock("div",eU,u[0]||(u[0]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1),t.createElementVNode("span",null,"Agregando jugador...",-1)]))):(t.openBlock(),t.createElementBlock("div",tU,[t.createElementVNode("div",oU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lists,h=>(t.openBlock(),t.createElementBlock("div",{key:h.id,class:t.normalizeClass(["tooltip-list-item",{disabled:f(h)}]),onClick:p=>!f(h)&&c(h)},[t.createElementVNode("span",rU,[f(h)?(t.openBlock(),t.createElementBlock("svg",iU,u[2]||(u[2]=[t.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M6 9L8 11L12 7",stroke:"#9b9b9a","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(t.openBlock(),t.createElementBlock("svg",nU,u[1]||(u[1]=[t.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1)])))]),t.createElementVNode("span",{class:t.normalizeClass(["list-name",{"disabled-text":f(h)}])},t.toDisplayString(h.name),3)],10,aU))),128))]),u[4]||(u[4]=t.createElementVNode("div",{class:"tooltip-divider"},null,-1)),t.createElementVNode("div",{class:"tooltip-create",onClick:s},u[3]||(u[3]=[t.createElementVNode("span",{class:"plus-icon"},[t.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#98a2b3",stroke:"#FFFFFF","stroke-width":"0.091682"})])],-1),t.createElementVNode("span",{class:"create-text"},"Crear nueva lista",-1)]))]))],512))}},[["__scopeId","data-v-cc992b53"]]),sU={class:"modal-overlay"},cU={key:0,class:"modal-content"},dU={class:"modal-select-container"},uU={class:"modal-input-wrapper"},pU=["disabled"],mU={key:0,class:"modal-input-loading"},fU={key:0,class:"modal-dropdown"},hU={key:0,class:"modal-dropdown-empty"},yU={key:1,class:"modal-dropdown-scroll"},gU={class:"variable-selection"},bU=["value"],SU={class:"variable-text"},_U={class:"modal-dropdown-actions"},wU={key:1,class:"modal-error"},kU={key:0,class:"modal-name-error"},EU={class:"modal-actions"},CU=["disabled"],xU=yt({__name:"CreateListModal",props:{userId:{type:String,required:!0},token:{type:String,required:!0},lists:{type:Array,default:()=>[]},selectedPlayer:{type:Object,default:()=>({})}},emits:["close","createList","listCreated"],setup(e,{emit:o}){const a=o,r=e,i=t.ref(""),n=t.ref(""),l=t.ref([]),s=t.ref(!1),d=t.ref(!1),c=t.ref([]),m=t.ref(!1),f=t.ref(null),y=t.computed(()=>r.lists.some(A=>A.name.toLowerCase()===i.value.toLowerCase().trim())),u=t.computed(()=>i.value.trim()!==""&&l.value.length>0&&!y.value);async function h(){var A,k;try{m.value=!0;const B=await we.create({headers:{Authorization:`${r.token}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${r.userId}/variables`);c.value=B.data.data.map(F=>({...F,checked:F.checked||!1}))}catch(E){f.value=((k=(A=E.response)==null?void 0:A.data)==null?void 0:k.message)||"Error al obtener las variables",console.error("Error fetching variables:",E)}finally{m.value=!1}}const p=t.computed(()=>{if(!c.value.length)return[];const A=n.value.toLowerCase().trim();return A?c.value.filter(k=>k.name.toLowerCase().includes(A)):c.value});t.watch(c,A=>{l.value=A.filter(k=>k.checked)},{immediate:!0});function g(){s.value=!0}function S(){s.value=!s.value}function b(){s.value=!0}function N(){n.value=""}function P(){n.value="",s.value=!1}async function O(){var A,k;try{if(i.value&&l.value.length){const E=we.create({headers:{Authorization:`${r.token}`}}),B={user_id:parseInt(r.userId),name:i.value,variables:l.value},F=await E.post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${r.userId}/in-followed`,B);F.data&&(a("createList",{nombre:i.value,variables:l.value,id:F.data.data.id}),a("listCreated"),i.value="",l.value=[],n.value="",s.value=!1,a("close"))}}catch(E){console.error("Error creating list:",E),f.value=((k=(A=E.response)==null?void 0:A.data)==null?void 0:k.message)||"Error al crear la lista"}}function T(){s.value=!1,a("close")}function v(){document.body.style.overflow="hidden"}function w(){document.body.style.overflow=""}return t.onMounted(async()=>{d.value=!0,s.value=!1,v(),await h()}),t.onUnmounted(()=>{w()}),(A,k)=>(t.openBlock(),t.createElementBlock("div",sU,[t.createVNode(t.Transition,{name:"slide-up"},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createElementBlock("div",cU,[t.createElementVNode("button",{class:"modal-close",onClick:T},"×"),k[7]||(k[7]=t.createElementVNode("div",{class:"modal-title"},[t.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#FFFFFF",stroke:"#FFFFFF","stroke-width":"0.091682"})]),t.createTextVNode(" Crear nueva lista ")],-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":k[0]||(k[0]=E=>i.value=E),class:"modal-input",type:"text",placeholder:"Nombre de tu lista"},null,512),[[t.vModelText,i.value]]),t.createElementVNode("div",dU,[t.createElementVNode("div",uU,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=E=>n.value=E),class:"modal-input",type:"text",placeholder:"Selecciona las variables que quieres que se vean",onFocus:g,onBlur:N,onInput:b,disabled:m.value},null,40,pU),[[t.vModelText,n.value]]),m.value?(t.openBlock(),t.createElementBlock("div",mU,k[4]||(k[4]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1)]))):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["modal-select-arrow",{"arrow-up":s.value}]),onClick:S},k[5]||(k[5]=[t.createElementVNode("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 6L6 1L11 6",stroke:"#8EA2AB","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2))]),s.value&&!m.value&&!f.value?(t.openBlock(),t.createElementBlock("div",fU,[p.value.length===0?(t.openBlock(),t.createElementBlock("div",hU," No se encontraron variables ")):(t.openBlock(),t.createElementBlock("div",yU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,E=>(t.openBlock(),t.createElementBlock("div",{key:E.custom_id,class:"modal-dropdown-item"},[t.createElementVNode("label",gU,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",value:E,"onUpdate:modelValue":k[2]||(k[2]=B=>l.value=B),onClick:k[3]||(k[3]=t.withModifiers(()=>{},["stop"]))},null,8,bU),[[t.vModelCheckbox,l.value]]),t.createElementVNode("span",SU,t.toDisplayString(E.name),1)])]))),128))])),t.createElementVNode("div",_U,[t.createElementVNode("button",{class:"modal-listo-btn",onMousedown:t.withModifiers(P,["prevent"])},"Listo",32)])])):t.createCommentVNode("",!0),f.value?(t.openBlock(),t.createElementBlock("div",wU,[k[6]||(k[6]=t.createElementVNode("span",{class:"error-icon"},"!",-1)),t.createTextVNode(" "+t.toDisplayString(f.value),1)])):t.createCommentVNode("",!0)]),y.value?(t.openBlock(),t.createElementBlock("div",kU," Ya existe una lista con este nombre, utiliza otro para poder continuar. ")):t.createCommentVNode("",!0),k[8]||(k[8]=t.createElementVNode("div",{class:"modal-divider"},null,-1)),t.createElementVNode("div",EU,[t.createElementVNode("button",{class:"modal-cancel",onClick:T},"Cancelar"),t.createElementVNode("button",{class:t.normalizeClass(["modal-create",{"modal-create--disabled":!u.value}]),onClick:O,disabled:!u.value}," Crear lista ",10,CU)])])):t.createCommentVNode("",!0)]),_:1})]))}},[["__scopeId","data-v-a48ee35c"]]),VU={class:"player-card"},NU={class:"player-card__image"},BU={key:0,class:"checkbox-container"},FU=["checked"],TU=["src"],vU={class:"player-card__right-data"},AU={class:"player-card__age"},$U={class:"player-card__flag"},RU={class:"player-card__details"},OU={class:"player-card__name"},MU={class:"player-card__position"},PU={key:0,class:"button-row"},LU={class:"stat-header"},IU={class:"stat-left"},DU=["onClick"],zU={class:"stat-label"},jU={class:"stat-value"},UU={class:"stat-bar-container"},HU={key:1,class:"loading-overlay"},WU=yt({__name:"GscPlayerCard",props:{player:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},isScouting:{type:Boolean,default:!0},countryFlag:{type:String,default:""},jersey:{type:Number,default:0},player_id:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position:{type:String,default:"-"},photo:{type:String,default:""},is_female:{type:Number,default:0},isImgFullWidth:{type:Boolean,default:!1},stats:{type:Object,default:()=>({})},max:{type:Object,default:()=>({})},additionalData:{type:Object,default:()=>({})},deleteActive:{type:Boolean,default:!1},userId:{type:Number,default:0},categories:{type:Array,default:()=>[],required:!0},token:{type:String,default:""},statsPromise:{type:Promise,required:!0},isSelected:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]}},emits:["showTooltip","hideTooltip","openModal","playerAdded"],setup(e,{emit:o}){const a=e,r=o,i=t.ref(null),n=t.ref(!1),l=t.ref(!1),s=t.ref(null),d=[{id:1,nombre:"Laterales mundial sub 20"},{id:2,nombre:"Delanteros 2008"},{id:3,nombre:"Promesas Liga MX"}],c=t.ref(null),m=t.ref("center"),f=t.ref(!1);t.watch(l,v=>{v&&(f.value=!0)}),t.watch(()=>a.showTooltip,v=>{v&&t.nextTick(()=>{y()})},{immediate:!0}),t.onMounted(()=>{document.addEventListener("click",v=>{const w=v.target.closest(".add-to-list-tooltip"),A=v.target.closest(".add-button");!w&&!A&&a.showTooltip&&r("hideTooltip",a.player_id)})});function y(){const v=c.value;if(!v)return;const w=v.getBoundingClientRect(),A=window.innerWidth;w.right>A?m.value="left":m.value="center"}t.onMounted(async()=>{try{i.value=a.stats.map(v=>{var B,F;const w=v[0],A=v[2],k=((F=(B=a.max)==null?void 0:B.find(L=>L[0]===w||L[0]===parseInt(w)||L[0].toString()===w.toString()))==null?void 0:F[1])||0,E=k>0?A/k*100:0;return{name:v[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,L=>L.toUpperCase()),value:A,category:w,percentage:Math.min(E,100)}})}catch(v){console.error("Error cargando estadísticas:",v)}}),t.computed(()=>a.stats&&Object.keys(a.stats).length>0);const u=v=>{s.value=v,n.value=!0},h=()=>{n.value=!1,s.value=null};function p(){f.value=!0,r("showTooltip",a.player_id)}function g(){l.value||(f.value=!1,r("hideTooltip",a.player_id))}function S(){l.value=!0,f.value=!0}async function b(v){try{const w={dob:a.player.dob,is_female:0,jersey:0,name:a.player.name,nationality:a.player.nationality,nationality_id:a.player.nationality_id,player_id:a.player.player_id,position:a.player.position_id,team_id:a.player.team_id},A={user_id:parseInt(a.userId),id:v.id,players:[w]};await we.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${v.id}/players`,A),d.push(v),l.value=!1,P()}catch(w){console.error("Error al agregar jugador a la lista:",w)}}function N(v){}function P(){r("playerAdded")}const O=v=>{if(!v)return 0;const w=new Date(v),A=new Date;let k=A.getFullYear()-w.getFullYear();const E=A.getMonth()-w.getMonth();return(E<0||E===0&&A.getDate()<w.getDate())&&k--,k},T=t.computed(()=>{if(!a.name)return"-";const v=a.name.split(",");if(v.length!==2)return a.name;const w=v[0].trim().split(" "),A=v[1].trim(),k=w[0];return`${A} ${k}`});return(v,w)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",VU,[t.createElementVNode("div",NU,[e.deleteActive?(t.openBlock(),t.createElementBlock("div",BU,[t.createElementVNode("input",{type:"checkbox",class:"player-checkbox",checked:e.isSelected,onChange:w[0]||(w[0]=A=>v.$emit("toggleSelection")),onClick:w[1]||(w[1]=t.withModifiers(()=>{},["stop"]))},null,40,FU)])):t.createCommentVNode("",!0),t.createElementVNode("img",{class:t.normalizeClass(["player-card__photo",{"full-width":e.isImgFullWidth}]),src:e.photo,alt:"Player Image"},null,10,TU),t.createElementVNode("div",vU,[t.createElementVNode("div",AU,t.toDisplayString(O(e.player.dob))+" años",1),t.createElementVNode("div",$U,[t.createElementVNode("div",{class:"player-card__flag-container",style:t.normalizeStyle({"background-image":`url(${a.countryFlag})`})},null,4)])])]),t.createElementVNode("div",RU,[t.createElementVNode("p",OU,t.toDisplayString(T.value),1),t.createElementVNode("p",MU,t.toDisplayString(e.position),1)]),t.createElementVNode("div",{class:t.normalizeClass(["player-card__actions",{"hide-buttons":e.deleteActive}])},[!e.deleteActive&&!e.isScouting?(t.openBlock(),t.createElementBlock("div",PU,[t.createElementVNode("button",{class:"action-button add-button",onClick:t.withModifiers(p,["stop"])},w[5]||(w[5]=[t.createStaticVNode(' Agregar a Lista <span class="button-icon" data-v-be195ff0><svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-be195ff0><path d="M12.8345 16.4999V14.8333C12.8345 13.9492 12.4833 13.1014 11.8582 12.4763C11.2331 11.8512 10.3852 11.5 9.5012 11.5H4.50126C3.61722 11.5 2.76938 11.8512 2.14427 12.4763C1.51915 13.1014 1.16797 13.9492 1.16797 14.8333V16.4999" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path><path d="M7.00126 8.16658C8.84219 8.16658 10.3346 6.67422 10.3346 4.83329C10.3346 2.99237 8.84219 1.5 7.00126 1.5C5.16033 1.5 3.66797 2.99237 3.66797 4.83329C3.66797 6.67422 5.16033 8.16658 7.00126 8.16658Z" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path><path d="M15.332 5.66602V10.666M17.832 8.16598H12.832" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path></svg></span>',2)])),f.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref:c.value,class:t.normalizeClass(["tooltip-container",m.value]),style:{position:"absolute",left:"0",right:"0","z-index":"2000","margin-top":"40px"}},[t.createVNode(lU,{lists:e.lists,isModalOpen:l.value,token:e.token,"user-id":e.userId,"selected-player":e.player,onSelectList:N,onCreateNewList:S,onClose:g,onPlayerAdded:P},null,8,["lists","isModalOpen","token","user-id","selected-player"])],2)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.deleteActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:1,class:"action-button profile-button",onClick:w[2]||(w[2]=t.withModifiers(A=>v.$emit("showProfile",{player_id:a.player_id,season_id:e.player.season_id,team_id:e.player.team_id,name:a.name,position:a.position,age:a.age,nationality:a.nationality,photo:a.photo,stats:a.stats}),["stop"]))}," Ver perfil "))],2),t.createElementVNode("div",{class:t.normalizeClass(["player-card__stats",{"disabled-stats":e.deleteActive}])},[e.loading?(t.openBlock(),t.createElementBlock("div",HU,w[7]||(w[7]=[t.createElementVNode("div",{class:"loading-animation"},null,-1)]))):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.value,(A,k)=>(t.openBlock(),t.createElementBlock("div",{class:"stat-row",key:k},[t.createElementVNode("div",LU,[t.createElementVNode("div",IU,[A.parametros&&A.parametros!="no"?(t.openBlock(),t.createElementBlock("button",{key:0,class:"stat-info-button",onClick:E=>u(A.parametros)},w[6]||(w[6]=[t.createElementVNode("svg",{width:"8",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.17355 0.761719C6.44909 0.761719 5.77355 1.23716 5.56275 1.90573L0.887836 1.90458C0.572235 1.90458 0.316406 2.16058 0.316406 2.47601C0.316406 2.79144 0.572235 3.04744 0.887836 3.04744L5.56275 3.04688C5.8188 3.74688 6.44909 4.1903 7.17355 4.1903C7.89801 4.1903 8.53475 3.74574 8.79527 3.04231L10.0307 3.04744C10.3463 3.04744 10.6021 2.79144 10.6021 2.47601C10.6021 2.16058 10.3463 1.90458 10.0307 1.90458H8.79041C8.51527 1.20801 7.89801 0.761719 7.17355 0.761719ZM7.17355 1.90458C7.48915 1.90458 7.74498 2.16058 7.74498 2.47601C7.74498 2.79144 7.48915 3.04744 7.17355 3.04744C6.85795 3.04744 6.60212 2.79144 6.60212 2.47601C6.60212 2.16058 6.85795 1.90458 7.17355 1.90458ZM3.74498 5.04744C2.99184 5.04744 2.36144 5.51602 2.13127 6.19142C2.05092 6.19657 0.887836 6.19028 0.887836 6.19028C0.572235 6.19028 0.316406 6.44628 0.316406 6.76171C0.316406 7.07714 0.572235 7.33314 0.887836 7.33314C0.887836 7.33314 2.06064 7.32114 2.13372 7.32857C2.3639 8.004 2.99184 8.476 3.74498 8.476C4.46943 8.476 5.09023 8.032 5.36177 7.33485L10.0307 7.33314C10.3463 7.33314 10.6021 7.07714 10.6021 6.76171C10.6021 6.44628 10.3463 6.19028 10.0307 6.19028L5.3588 6.18519C5.10835 5.50346 4.46943 5.04744 3.74498 5.04744ZM3.74498 6.19028C4.06058 6.19028 4.31641 6.44628 4.31641 6.76171C4.31641 7.07714 4.06058 7.33314 3.74498 7.33314C3.42938 7.33314 3.17355 7.07714 3.17355 6.76171C3.17355 6.44628 3.42938 6.19028 3.74498 6.19028ZM7.17355 9.33314C6.44909 9.33314 5.7864 9.81029 5.56235 10.4703L0.887836 10.476C0.572235 10.476 0.316406 10.732 0.316406 11.0474C0.316406 11.3629 0.572235 11.6189 0.887836 11.6189L5.55389 11.6194C5.79098 12.2966 6.44909 12.7617 7.17355 12.7617C7.89801 12.7617 8.52264 12.3086 8.79784 11.6194L10.0307 11.6189C10.3463 11.6189 10.6021 11.3629 10.6021 11.0474C10.6021 10.732 10.3463 10.476 10.0307 10.476L8.79264 10.4726C8.54595 9.79663 7.89801 9.33314 7.17355 9.33314ZM7.17355 10.476C7.48915 10.476 7.74498 10.732 7.74498 11.0474C7.74498 11.3629 7.48915 11.6189 7.17355 11.6189C6.85795 11.6189 6.60212 11.3629 6.60212 11.0474C6.60212 10.732 6.85795 10.476 7.17355 10.476Z",fill:"white"})],-1)]),8,DU)):t.createCommentVNode("",!0),t.createElementVNode("span",zU,t.toDisplayString(A.name),1)]),t.createElementVNode("span",jU,t.toDisplayString(A.value),1)]),t.createElementVNode("div",UU,[t.createElementVNode("div",{style:t.normalizeStyle({width:`${A.percentage}%`}),class:"stat-bar"},null,4)])]))),128))],2)]),t.createVNode(t.unref(l1),{isVisible:n.value,"onUpdate:isVisible":w[3]||(w[3]=A=>n.value=A),onClose:h,parameters:s.value},null,8,["isVisible","parameters"]),l.value?(t.openBlock(),t.createBlock(xU,{key:0,token:e.token,lists:e.lists,"user-id":e.userId,"selected-player":e.player,onListCreated:P,onClose:w[4]||(w[4]=A=>l.value=!1),onCreateList:b},null,8,["token","lists","user-id","selected-player"])):t.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-be195ff0"]]),qU={class:"grid-view"},GU={key:0,class:"loading-container"},YU={key:1,class:"cards-container"},ZU=yt({__name:"GridView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},isScouting:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},max:{type:Object,default:()=>{}},lists:{type:Array,default:()=>[]},token:{type:String,default:""}},emits:["playerAdded","showProfile"],setup(e,{emit:o}){const a=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"],[10,"Desconocida"]]),r=new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),i=o,n=t.reactive({}),l=t.ref(!1),s=t.ref(null);function d(p,g=!1){return(g?r:a).get(p)||"Desconocida"}function c(p){Object.keys(n).forEach(g=>{n[g]=!1}),n[p]=!0}function m(p){n[p]&&(n[p]=!1)}function f(p){Object.keys(n).forEach(g=>{n[g]=!1}),s.value=p,l.value=!0}function y(p){const g=p.target.closest(".add-to-list-tooltip"),S=p.target.closest(".add-button"),b=p.target.closest(".modal-overlay")||p.target.closest(".modal-content");!g&&!S&&!b&&Object.keys(n).forEach(N=>{n[N]=!1})}function u(){i("playerAdded")}function h(p){i("showProfile",p)}return t.onMounted(()=>{document.addEventListener("mousedown",y)}),t.onUnmounted(()=>{document.removeEventListener("mousedown",y)}),(p,g)=>(t.openBlock(),t.createElementBlock("div",qU,[e.playersScouting?(t.openBlock(),t.createElementBlock("div",YU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.playersScouting,S=>(t.openBlock(),t.createBlock(WU,{key:S.player_id,loading:!1,statsPromise:!1,player_id:S.player_id,name:S.name,player:S,"is-scouting":e.isScouting,position:d(S.position_id,S.is_female),age:S.age,nationality:S.nationality,photo:S.photo,"type-productivity":e.typeProductivity,countryFlag:S.countryFlag,stats:e.typeProductivity==1?S.internal_stats:S.stats,max:e.typeProductivity==1?e.max.internal_max:e.max.max,"user-id":e.userId,lists:e.lists,token:e.token,onShowProfile:h,onShowTooltip:c,onHideTooltip:m,onOpenModal:f,onPlayerAdded:u},null,8,["player_id","name","player","is-scouting","position","age","nationality","photo","type-productivity","countryFlag","stats","max","user-id","lists","token"]))),128))])):(t.openBlock(),t.createElementBlock("div",GU,g[2]||(g[2]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1),t.createElementVNode("span",null,"Cargando jugadores...",-1)]))),l.value?(t.openBlock(),t.createBlock(t.unref(l1),{key:2,isVisible:l.value,"onUpdate:isVisible":g[0]||(g[0]=S=>l.value=S),parameters:s.value,onClose:g[1]||(g[1]=S=>l.value=!1)},null,8,["isVisible","parameters"])):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a80d86e5"]]),JU=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},KU={key:1},XU={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QU=["fill"],eH={key:0,class:"checkbox__teams"},tH={class:"checkbox__teams__logo"},oH=["src"],aH={class:"checkbox__teams__logo"},rH=["src"],nH={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(e){return["left","right","top","bottom"].includes(e)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:o}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const r=t.ref(!1),i=t.computed(()=>{const c={color:a.boxValueColor,"font-family":a.fontFamily,height:a.boxWidthAndHeight,width:a.boxWidthAndHeight,minWidth:a.boxWidthAndHeight,"border-radius":a.boxBorderRadius,"margin-top":a.boxMarginTop};return r.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),n=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),l=t.computed(()=>{const c={color:a.labelColor,"font-family":a.fontFamily,"font-size":a.labelFontSize,"white-space":a.labelWhiteSpace,"text-align":a.boxPosition==="top"||a.boxPosition==="bottom"?"center":a.boxPosition};return(a.boxPosition==="left"||a.boxPosition==="right")&&(c[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),c});t.watch(()=>a.modelValue,c=>{c!==r.value&&(r.value=c)},{immediate:!0});function s(){a.avoidInteraction||!r.value&&a.avoidToCheck||(r.value=!r.value,o("update:modelValue",r.value))}function d(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:s},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle(i.value)},[r.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.boxValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"checkbox__box__value",style:t.normalizeStyle(n.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",KU,[(t.openBlock(),t.createElementBlock("svg",XU,[t.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:e.boxValueColor},null,8,QU)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",eH,[t.createElementVNode("div",tH,[t.createElementVNode("img",{src:d(e.teamsIds[0]),alt:""},null,8,oH)]),t.createElementVNode("div",aH,[t.createElementVNode("img",{src:d(e.teamsIds[1]),alt:""},null,8,rH)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(l.value)},t.toDisplayString(e.label),5)],2))}},iH=JU(nH,[["__scopeId","data-v-b6f124d8"]]),lH=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},Ol={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},s1=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},c1=Ol.setup;Ol.setup=c1?(e,o)=>(s1(),c1(e,o)):s1;const sH=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),cH=["src"],dH={key:1,class:"text"},uH=["src"],pH={class:"stats"},mH=sH(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),fH={class:"numstats"},hH={class:"leyend"};function yH(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([n.customStyle,i.status&&a.typeOnOff&&n.customActive]),onClick:o[0]||(o[0]=(...l)=>n.btnClick&&n.btnClick(...l))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,cH)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",dH,t.toDisplayString(a.textValue),1)):t.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,uH)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...l)=>n.btnClick&&n.btnClick(...l))},[t.createElementVNode("div",pH,[mH,t.createElementVNode("div",fH,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",hH,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const gH=lH(Ol,[["render",yH],["__scopeId","data-v-f3ee6b2b"]]),d1=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},Ml=e=>(t.pushScopeId("data-v-764bd788"),e=e(),t.popScopeId(),e),bH={key:0,class:"overlay"},SH=["onClick"],_H=Ml(()=>t.createElementVNode("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.50558 0C6.78112 0 6.10558 0.475441 5.89478 1.14401L1.21987 1.14286C0.904267 1.14286 0.648438 1.39886 0.648438 1.71429C0.648438 2.02972 0.904267 2.28572 1.21987 2.28572L5.89478 2.28516C6.15083 2.98516 6.78112 3.42858 7.50558 3.42858C8.23004 3.42858 8.86678 2.98402 9.1273 2.28059L10.3627 2.28572C10.6783 2.28572 10.9342 2.02972 10.9342 1.71429C10.9342 1.39886 10.6783 1.14286 10.3627 1.14286H9.12244C8.8473 0.446287 8.23004 0 7.50558 0ZM7.50558 1.14286C7.82118 1.14286 8.07701 1.39886 8.07701 1.71429C8.07701 2.02972 7.82118 2.28572 7.50558 2.28572C7.18998 2.28572 6.93415 2.02972 6.93415 1.71429C6.93415 1.39886 7.18998 1.14286 7.50558 1.14286ZM4.07701 4.28572C3.32387 4.28572 2.69347 4.7543 2.4633 5.42971C2.38295 5.43485 1.21987 5.42856 1.21987 5.42856C0.904267 5.42856 0.648438 5.68456 0.648438 5.99999C0.648438 6.31542 0.904267 6.57142 1.21987 6.57142C1.21987 6.57142 2.39267 6.55942 2.46575 6.56685C2.69593 7.24228 3.32387 7.71428 4.07701 7.71428C4.80146 7.71428 5.42226 7.27028 5.69381 6.57314L10.3627 6.57142C10.6783 6.57142 10.9342 6.31542 10.9342 5.99999C10.9342 5.68456 10.6783 5.42856 10.3627 5.42856L5.69083 5.42348C5.44038 4.74174 4.80146 4.28572 4.07701 4.28572ZM4.07701 5.42856C4.39261 5.42856 4.64844 5.68456 4.64844 5.99999C4.64844 6.31542 4.39261 6.57142 4.07701 6.57142C3.76141 6.57142 3.50558 6.31542 3.50558 5.99999C3.50558 5.68456 3.76141 5.42856 4.07701 5.42856ZM7.50558 8.57142C6.78112 8.57142 6.11844 9.04857 5.89438 9.70857L1.21987 9.71428C0.904267 9.71428 0.648438 9.97028 0.648438 10.2857C0.648438 10.6011 0.904267 10.8571 1.21987 10.8571L5.88592 10.8577C6.12301 11.5349 6.78112 12 7.50558 12C8.23004 12 8.85467 11.5469 9.12987 10.8577L10.3627 10.8571C10.6783 10.8571 10.9342 10.6011 10.9342 10.2857C10.9342 9.97028 10.6783 9.71428 10.3627 9.71428L9.12467 9.71091C8.87798 9.03491 8.23004 8.57142 7.50558 8.57142ZM7.50558 9.71428C7.82118 9.71428 8.07701 9.97028 8.07701 10.2857C8.07701 10.6011 7.82118 10.8571 7.50558 10.8571C7.18998 10.8571 6.93415 10.6011 6.93415 10.2857C6.93415 9.97028 7.18998 9.71428 7.50558 9.71428Z",fill:"white"})],-1)),wH=[_H],kH=["onClick"],EH=Ml(()=>t.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),CH=[EH],xH=Ml(()=>t.createElementVNode("div",{class:"column-title-2"},null,-1)),VH=["onClick"],NH={__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},isMobile:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref(null),n=t.ref(null),l=t.ref(0);t.ref(!1);const s=t.computed(()=>{const h=r.availablePlayers[0];return h?h.stats:[]}),d=t.computed(()=>{const h=`repeat(${s.value.length}, max-content) 36px`;let p="";return l.value>0&&document.querySelectorAll(".column-title-2").forEach(g=>{p+=`${g.offsetWidth}px `}),{"--grid-template-columns":h,"--grid-template-columns-totals":p||h}});function c(){i.value=new ResizeObserver(h=>{for(const p of h){const{width:g}=p.contentRect;l.value=g}}),i.value.observe(n.value)}function m(h,p){const g=document.querySelectorAll(".scrollable-row-totals")[h+1];g&&(g.style.marginTop=`${p}px`)}function f({player:h,stat:p}){!p.total||p==="0%"||!p.seasons||!p.seasons.length||a("open-media",{...h,stat:p})}function y(h){!h||h==="no"||a("click-parameters",h)}function u(h){a("sort",h)}return t.onMounted(()=>{c()}),o({setMarginTopDetails:m}),(h,p)=>(t.openBlock(),t.createElementBlock("div",{class:"scroll-columns",style:t.normalizeStyle(d.value)},[e.isEditMode?(t.openBlock(),t.createElementBlock("div",bH)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"titlesRow",ref:n,class:"scrollable-row-2"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(g,S)=>(t.openBlock(),t.createElementBlock("div",{key:`t-${S}`,class:"column-title-2"},[g.parameters&&g.parameters!=="no"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:b=>y(g.parameters)},wH,8,SH)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"name",style:t.normalizeStyle(e.isMobile?"font-size: 10px;":"")},t.toDisplayString(g.name),5),(t.openBlock(),t.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:b=>u(g)},CH,8,kH))]))),128)),xH],512),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.availablePlayers,(g,S)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${g.id}`,class:"row scrollable-row-totals"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.stats,b=>(t.openBlock(),t.createElementBlock("div",{key:b.category_id,class:t.normalizeClass(["row data-info",{odd:S%2!==0,underline:!!b.total&&b.total!=="0%"&&b.seasons&&b.seasons.length}])},[t.createElementVNode("span",{onClick:N=>f({player:g,stat:b})},t.toDisplayString(b.total),9,VH)],2))),128))]))),128))],4))}},BH=d1(NH,[["__scopeId","data-v-764bd788"]]);function u1(e,o){return function(){return e.apply(o,arguments)}}const{toString:FH}=Object.prototype,{getPrototypeOf:Pl}=Object,{iterator:ln,toStringTag:p1}=Symbol,sn=(e=>o=>{const a=FH.call(o);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),ut=e=>(e=e.toLowerCase(),o=>sn(o)===e),cn=e=>o=>typeof o===e,{isArray:Wo}=Array,Ba=cn("undefined");function TH(e){return e!==null&&!Ba(e)&&e.constructor!==null&&!Ba(e.constructor)&&Xe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m1=ut("ArrayBuffer");function vH(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&m1(e.buffer),o}const AH=cn("string"),Xe=cn("function"),f1=cn("number"),dn=e=>e!==null&&typeof e=="object",$H=e=>e===!0||e===!1,un=e=>{if(sn(e)!=="object")return!1;const o=Pl(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(p1 in e)&&!(ln in e)},RH=ut("Date"),OH=ut("File"),MH=ut("Blob"),PH=ut("FileList"),LH=e=>dn(e)&&Xe(e.pipe),IH=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Xe(e.append)&&((o=sn(e))==="formdata"||o==="object"&&Xe(e.toString)&&e.toString()==="[object FormData]"))},DH=ut("URLSearchParams"),[zH,jH,UH,HH]=["ReadableStream","Request","Response","Headers"].map(ut),WH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fa(e,o,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Wo(e))for(r=0,i=e.length;r<i;r++)o.call(null,e[r],r,e);else{const n=a?Object.getOwnPropertyNames(e):Object.keys(e),l=n.length;let s;for(r=0;r<l;r++)s=n[r],o.call(null,e[s],s,e)}}function h1(e,o){o=o.toLowerCase();const a=Object.keys(e);let r=a.length,i;for(;r-- >0;)if(i=a[r],o===i.toLowerCase())return i;return null}const go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,y1=e=>!Ba(e)&&e!==go;function Ll(){const{caseless:e}=y1(this)&&this||{},o={},a=(r,i)=>{const n=e&&h1(o,i)||i;un(o[n])&&un(r)?o[n]=Ll(o[n],r):un(r)?o[n]=Ll({},r):Wo(r)?o[n]=r.slice():o[n]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fa(arguments[r],a);return o}const qH=(e,o,a,{allOwnKeys:r}={})=>(Fa(o,(i,n)=>{a&&Xe(i)?e[n]=u1(i,a):e[n]=i},{allOwnKeys:r}),e),GH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),YH=(e,o,a,r)=>{e.prototype=Object.create(o.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),a&&Object.assign(e.prototype,a)},ZH=(e,o,a,r)=>{let i,n,l;const s={};if(o=o||{},e==null)return o;do{for(i=Object.getOwnPropertyNames(e),n=i.length;n-- >0;)l=i[n],(!r||r(l,e,o))&&!s[l]&&(o[l]=e[l],s[l]=!0);e=a!==!1&&Pl(e)}while(e&&(!a||a(e,o))&&e!==Object.prototype);return o},JH=(e,o,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=o.length;const r=e.indexOf(o,a);return r!==-1&&r===a},KH=e=>{if(!e)return null;if(Wo(e))return e;let o=e.length;if(!f1(o))return null;const a=new Array(o);for(;o-- >0;)a[o]=e[o];return a},XH=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&Pl(Uint8Array)),QH=(e,o)=>{const a=(e&&e[ln]).call(e);let r;for(;(r=a.next())&&!r.done;){const i=r.value;o.call(e,i[0],i[1])}},eW=(e,o)=>{let a;const r=[];for(;(a=e.exec(o))!==null;)r.push(a);return r},tW=ut("HTMLFormElement"),oW=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,r){return a.toUpperCase()+r}),g1=(({hasOwnProperty:e})=>(o,a)=>e.call(o,a))(Object.prototype),aW=ut("RegExp"),b1=(e,o)=>{const a=Object.getOwnPropertyDescriptors(e),r={};Fa(a,(i,n)=>{let l;(l=o(i,n,e))!==!1&&(r[n]=l||i)}),Object.defineProperties(e,r)},rW=e=>{b1(e,(o,a)=>{if(Xe(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const r=e[a];if(Xe(r)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},nW=(e,o)=>{const a={},r=i=>{i.forEach(n=>{a[n]=!0})};return Wo(e)?r(e):r(String(e).split(o)),a},iW=()=>{},lW=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function sW(e){return!!(e&&Xe(e.append)&&e[p1]==="FormData"&&e[ln])}const cW=e=>{const o=new Array(10),a=(r,i)=>{if(dn(r)){if(o.indexOf(r)>=0)return;if(!("toJSON"in r)){o[i]=r;const n=Wo(r)?[]:{};return Fa(r,(l,s)=>{const d=a(l,i+1);!Ba(d)&&(n[s]=d)}),o[i]=void 0,n}}return r};return a(e,0)},dW=ut("AsyncFunction"),uW=e=>e&&(dn(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),S1=((e,o)=>e?setImmediate:o?((a,r)=>(go.addEventListener("message",({source:i,data:n})=>{i===go&&n===a&&r.length&&r.shift()()},!1),i=>{r.push(i),go.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",Xe(go.postMessage)),pW=typeof queueMicrotask<"u"?queueMicrotask.bind(go):typeof process<"u"&&process.nextTick||S1,mW=e=>e!=null&&Xe(e[ln]),H={isArray:Wo,isArrayBuffer:m1,isBuffer:TH,isFormData:IH,isArrayBufferView:vH,isString:AH,isNumber:f1,isBoolean:$H,isObject:dn,isPlainObject:un,isReadableStream:zH,isRequest:jH,isResponse:UH,isHeaders:HH,isUndefined:Ba,isDate:RH,isFile:OH,isBlob:MH,isRegExp:aW,isFunction:Xe,isStream:LH,isURLSearchParams:DH,isTypedArray:XH,isFileList:PH,forEach:Fa,merge:Ll,extend:qH,trim:WH,stripBOM:GH,inherits:YH,toFlatObject:ZH,kindOf:sn,kindOfTest:ut,endsWith:JH,toArray:KH,forEachEntry:QH,matchAll:eW,isHTMLForm:tW,hasOwnProperty:g1,hasOwnProp:g1,reduceDescriptors:b1,freezeMethods:rW,toObjectSet:nW,toCamelCase:oW,noop:iW,toFiniteNumber:lW,findKey:h1,global:go,isContextDefined:y1,isSpecCompliantForm:sW,toJSONObject:cW,isAsyncFn:dW,isThenable:uW,setImmediate:S1,asap:pW,isIterable:mW};function me(e,o,a,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),a&&(this.config=a),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const _1=me.prototype,w1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{w1[e]={value:e}}),Object.defineProperties(me,w1),Object.defineProperty(_1,"isAxiosError",{value:!0}),me.from=(e,o,a,r,i,n)=>{const l=Object.create(_1);return H.toFlatObject(e,l,function(s){return s!==Error.prototype},s=>s!=="isAxiosError"),me.call(l,e.message,o,a,r,i),l.cause=e,l.name=e.name,n&&Object.assign(l,n),l};const fW=null;function Il(e){return H.isPlainObject(e)||H.isArray(e)}function k1(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function E1(e,o,a){return e?e.concat(o).map(function(r,i){return r=k1(r),!a&&i?"["+r+"]":r}).join(a?".":""):o}function hW(e){return H.isArray(e)&&!e.some(Il)}const yW=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});function pn(e,o,a){if(!H.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,a=H.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,h){return!H.isUndefined(h[u])});const r=a.metaTokens,i=a.visitor||c,n=a.dots,l=a.indexes,s=(a.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(o);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(H.isDate(u))return u.toISOString();if(!s&&H.isBlob(u))throw new me("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(u)||H.isTypedArray(u)?s&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function c(u,h,p){let g=u;if(u&&!p&&typeof u=="object"){if(H.endsWith(h,"{}"))h=r?h:h.slice(0,-2),u=JSON.stringify(u);else if(H.isArray(u)&&hW(u)||(H.isFileList(u)||H.endsWith(h,"[]"))&&(g=H.toArray(u)))return h=k1(h),g.forEach(function(S,b){!(H.isUndefined(S)||S===null)&&o.append(l===!0?E1([h],b,n):l===null?h:h+"[]",d(S))}),!1}return Il(u)?!0:(o.append(E1(p,h,n),d(u)),!1)}const m=[],f=Object.assign(yW,{defaultVisitor:c,convertValue:d,isVisitable:Il});function y(u,h){if(!H.isUndefined(u)){if(m.indexOf(u)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(u),H.forEach(u,function(p,g){(!(H.isUndefined(p)||p===null)&&i.call(o,p,H.isString(g)?g.trim():g,h,f))===!0&&y(p,h?h.concat(g):[g])}),m.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return y(e),o}function C1(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function Dl(e,o){this._pairs=[],e&&pn(e,this,o)}const x1=Dl.prototype;x1.append=function(e,o){this._pairs.push([e,o])},x1.toString=function(e){const o=e?function(a){return e.call(this,a,C1)}:C1;return this._pairs.map(function(a){return o(a[0])+"="+o(a[1])},"").join("&")};function gW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function V1(e,o,a){if(!o)return e;const r=a&&a.encode||gW;H.isFunction(a)&&(a={serialize:a});const i=a&&a.serialize;let n;if(i?n=i(o,a):n=H.isURLSearchParams(o)?o.toString():new Dl(o,a).toString(r),n){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}let N1=class{constructor(){this.handlers=[]}use(e,o,a){return this.handlers.push({fulfilled:e,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(o){o!==null&&e(o)})}};const B1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bW=typeof URLSearchParams<"u"?URLSearchParams:Dl,SW=typeof FormData<"u"?FormData:null,_W=typeof Blob<"u"?Blob:null,wW={isBrowser:!0,classes:{URLSearchParams:bW,FormData:SW,Blob:_W},protocols:["http","https","file","blob","url","data"]},zl=typeof window<"u"&&typeof document<"u",jl=typeof navigator=="object"&&navigator||void 0,kW=zl&&(!jl||["ReactNative","NativeScript","NS"].indexOf(jl.product)<0),EW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CW=zl&&window.location.href||"http://localhost",xW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zl,hasStandardBrowserEnv:kW,hasStandardBrowserWebWorkerEnv:EW,navigator:jl,origin:CW},Symbol.toStringTag,{value:"Module"})),De={...xW,...wW};function VW(e,o){return pn(e,new De.classes.URLSearchParams,Object.assign({visitor:function(a,r,i,n){return De.isNode&&H.isBuffer(a)?(this.append(r,a.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},o))}function NW(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function BW(e){const o={},a=Object.keys(e);let r;const i=a.length;let n;for(r=0;r<i;r++)n=a[r],o[n]=e[n];return o}function F1(e){function o(a,r,i,n){let l=a[n++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),d=n>=a.length;return l=!l&&H.isArray(i)?i.length:l,d?(H.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!H.isObject(i[l]))&&(i[l]=[]),o(a,r,i[l],n)&&H.isArray(i[l])&&(i[l]=BW(i[l])),!s)}if(H.isFormData(e)&&H.isFunction(e.entries)){const a={};return H.forEachEntry(e,(r,i)=>{o(NW(r),i,a,0)}),a}return null}function FW(e,o,a){if(H.isString(e))try{return(o||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(e)}const Ta={transitional:B1,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const a=o.getContentType()||"",r=a.indexOf("application/json")>-1,i=H.isObject(e);if(i&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return r?JSON.stringify(F1(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return VW(e,this.formSerializer).toString();if((n=H.isFileList(e))||a.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return pn(n?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||r?(o.setContentType("application/json",!1),FW(e)):e}],transformResponse:[function(e){const o=this.transitional||Ta.transitional,a=o&&o.forcedJSONParsing,r=this.responseType==="json";if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(a&&!this.responseType||r)){const i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(n){if(i)throw n.name==="SyntaxError"?me.from(n,me.ERR_BAD_RESPONSE,this,null,this.response):n}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{Ta.headers[e]={}});const TW=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vW=e=>{const o={};let a,r,i;return e&&e.split(`
|
|
30
|
+
`}}}));t.watch(()=>a.players,N=>{if(N&&N.length){const P=n.value.length!==N.length;let O=!1;for(const T of N){const v=T.player_id;if(!n.value.some(w=>w.player_id===v)){O=!0;break}}(P||O)&&(n.value=N.map(T=>({...T,statsGraph:[]})),p())}else l.value=[]},{immediate:!0});let y=[],u="",h="";async function p(){try{const N=n.value.map(w=>w.objeto_player?w.objeto_player.player_id||w.objeto_player.id:w.id||w.player_id),P=`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/stats?months=6`,O={players:N,tournament_id_for_max_value:0,all_players:a.allPlayers.map(w=>w.objeto_player?w.objeto_player.player_id||w.objeto_player.id:w.id||w.player_id)};if(y.length===N.length&&y.every(w=>N.includes(w))||(y=[...N]),a.customCategories)O.variables=i.value.productivityFilters.reduce((w,A)=>{if(A.isSelected){const k={...A};delete k.isSelected,w.push(k)}return w},[]);else if(a.dynamicCategories&&i.value){const w=[];O.categories=i.value.productivityFilters.reduce((A,k)=>{if(k.isSelected){w.push(...k.id);const E={ids:k.id,name:k.name};k.parameters&&(E.parameters={...k.parameters}),A.push(E)}return A},[])}if(!O.variables&&!O.categories)return;const T=JSON.stringify(O);if(u===P&&h===T)return;u=P,h=T;const v=await(await fetch(P,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:a.token},body:T})).json();g(v,!!i.value)}catch(N){console.error("Error",N)}}function g(N,P=!1){const O={...N};if(!O.max||!O.data)return;if(a.applyAdditionalData&&Ru.emit("set-additional-data",O.additional_data),P){const w=new Map,A=Object.entries(O.data).reduce((E,[B,F],L)=>{const K={playerId:B,categoriesByName:new Map};return F.forEach(ae=>{const le=K.categoriesByName.get(ae[1]),C=w.get(ae[1]);if(le){if(le.categoriesIds.push(ae[0]),le.categoriesIds.sort(),le.totals.push(ae[2]),L===0&&C){const M=O.max.find(Y=>Y[0]===ae[0]);M&&(C.categoriesIds.push(ae[0]),C.categoriesIds.sort(),C.max.push(M[1]))}}else if(K.categoriesByName.set(ae[1],{categoriesIds:[ae[0]],totals:[ae[2]]}),L===0){const M=O.max.find(Y=>Y[0]===ae[0]);M&&w.set(ae[1],{categoriesIds:[ae[0]],max:[M[1]]})}}),E.push(K),E},[]);O.data=A.reduce((E,B)=>{const F=[];return B.categoriesByName.forEach((L,K)=>{F.push([Array.from(L.categoriesIds).reduce((ae,le)=>`${ae}-${le}`,""),K,L.totals.reduce((ae,le)=>ae+le,0)])}),E[B.playerId]=F,E},{});const k=Array.from(w);O.max=k.map(E=>[E[1].categoriesIds.reduce((B,F)=>`${B}-${F}`,""),E[1].max.reduce((B,F)=>B+F,0)])}const T=O.max.reduce((w,[A,k])=>(w.set(A,k),w),new Map),v=Object.entries(O.data).reduce((w,[A,k])=>(w.set(Number(A),k),w),new Map);l.value=[],n.value.forEach(w=>{const A=v.get(w.objeto_player?w.objeto_player.player_id:w.id||w.player_id);w.statsGraph=[],A&&(w.statsGraph=A.map((k,E)=>{const B=Number(T.get(k[0])),F=k[2],L=E+1;return l.value.length<A.length&&l.value.push({position:L,name:k[1]}),{position:L,name:k[1],playerStat:F,leagueMax:B,id:k[0],playerPercentage:B?Math.floor(F/B*100):F,isVisible:!0}}))})}function S(N){i.value=N,p()}function b(N){o("click-parameters",N)}return(N,P)=>{const O=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock("div",{class:"graph-spider",style:t.normalizeStyle(s.value)},[e.hasHeader?(t.openBlock(),t.createElementBlock("div",CD,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",xD,[t.createElementVNode("div",VD,[e.dynamicCategories?(t.openBlock(),t.createBlock(t.unref(Wp),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Visualizar más jugadas"},"show-badge-on-filter-full":!1,filters:e.dynamicCategories,"filter-type":t.unref(R).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":3,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:e.componentWidth>650?"650px":"390px",maxWidth:e.componentWidth>650?"940px":"390px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":S,onClickParameters:b},null,8,["button-filter-props","filters","filter-type","template-props"])):e.customCategories?(t.openBlock(),t.createBlock(t.unref(Wp),{key:1,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Selector"},"show-badge-on-filter-full":!1,filters:e.customCategories,"filter-type":t.unref(R).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":3,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"fit-content",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":S},null,8,["button-filter-props","filters","filter-type"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",ND,[t.createVNode(O,{ref_key:"spiderChart",ref:r,type:"radar",options:f.value,series:c.value},null,8,["options","series"])]),t.createElementVNode("div",BD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,T=>(t.openBlock(),t.createElementBlock("div",{key:T.position,class:"list-variables__variable"},[t.createElementVNode("div",FD,t.toDisplayString(T.position),1),t.createElementVNode("div",TD,t.toDisplayString(T.name),1)]))),128))])])],4)}}},Gp=so(vD,[["__scopeId","data-v-393a9050"]]),Fl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(Number).sort((a,r)=>a-r);o.length===this.lastSelectedSections.length&&o.every(a=>this.lastSelectedSections.includes(a))||(this.lastSelectedSections=[...o],this.$emit("sections-changed",o))},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(e=>{const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())});else for(let e=1;e<=16;e++){const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())}this.updateSelectAllState()},isSelected(e){return this.selectedSections.has(e.toString())},toggleSection(e){const o=Math.ceil(e/4);if(!this.isQuarterEnabled(o))return;const a=e.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let e=1;e<=16;e++)this.selectedSections.add(e.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=e.toString(),r=Math.ceil(e/4);if(this.isQuarterEnabled(r)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(e,o){return(e-1)*4+o},getSectionIndex(e,o){return(e-1)*4+o},selectColumn(e){if(!this.isQuarterEnabled(e))return;const o=(e-1)*4+1,a=e*4;if(Array.from({length:4},(r,i)=>(o+i).toString()).every(r=>this.selectedSections.has(r))&&this.selectedSections.size>4)for(let r=o;r<=a;r++)this.selectedSections.delete(r.toString());else for(let r=o;r<=a;r++)this.selectedSections.add(r.toString());this.updateSelectAllState()},isQuarterSelected(e){const o=(e-1)*4+1;return Array.from({length:4},(a,r)=>(o+r).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(e){return this.quarters.includes(e)}}},Yp=()=>{t.useCssVars(e=>({"55dc5bcf":e.fieldWidth+"px","9f08aa04":e.fieldHeight+"px","5d3732c9":e.displayMode?"-28px":"0"}))},Zp=Fl.setup;Fl.setup=Zp?(e,o)=>(Yp(),Zp(e,o)):Yp;const AD={class:"field-template-element"},$D={class:"field-container"},RD=["onMouseenter","onMousedown"],OD={class:"column-buttons"},MD=["onClick","disabled"];function PD(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",AD,[t.createElementVNode("div",$D,[t.createElementVNode("div",{class:t.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[t.createElementVNode("span",null,t.toDisplayString(a.title),1)],2),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[1]||(o[1]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[2]||(o[2]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"field-column"},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(n.getSectionIndex(l,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(n.getSectionIndex(l,s)),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(n.getSectionIndex(l,s)),["prevent"])},null,42,RD)),64))])),64))],32),t.createElementVNode("div",OD,[a.displayMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"column-label"},t.toDisplayString(l)+"/4 tos ",1)),64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},t.renderList(4,l=>t.createElementVNode("button",{key:l,class:t.normalizeClass(["column-button",{selected:n.isQuarterSelected(l),disabled:!n.isQuarterEnabled(l)}]),onClick:s=>n.selectColumn(l),disabled:!n.isQuarterEnabled(l)},t.toDisplayString(l)+"/4 tos ",11,MD)),64))])])])}const Jp=so(Fl,[["render",PD],["__scopeId","data-v-6797bc51"]]),LD={name:"InputTemplateElement",props:{width:{type:Number,default:200},height:{type:Number,default:40},modelValue:{type:[String,Number],default:""},type:{type:String,default:"time",validator:e=>["tx","time","m","km","degrees"].includes(e)},maxValue:{type:Number,default:126},minValue:{type:Number,default:0}},computed:{inputType(){return"text"}},data(){return{inputValue:"0"}},watch:{modelValue:{immediate:!0,handler(e){this.inputValue=this.type==="time"?e||"0:00":this.type==="tx"||this.type==="degrees"||this.type==="km"||this.type==="m"?e||"0":e||""}},type:{immediate:!0,handler(e){e==="time"&&!this.inputValue&&(this.inputValue="0:00")}},inputValue(e,o){this.$emit("value-changed",{newValue:e,oldValue:o,type:this.type})}},methods:{handleInput(){let e=this.inputValue;switch(this.type){case"m":e=this.inputValue.replace(/[^\d.-]/g,"");const o=parseFloat(e);isNaN(o)||(o>this.maxValue?e=String(this.maxValue):o<this.minValue&&(e=String(this.minValue)));break;case"km":e=this.inputValue.replace(/[^\d.]/g,"");const a=parseFloat(e);!isNaN(a)&&a>50&&(e="50");break;case"tx":e=this.inputValue.replace(/[^\d.]/g,"");const r=parseFloat(e);!isNaN(r)&&r>10&&(e="10");const i=e.split(".").length-1;if(i>1)e=e.slice(0,-1);else if(i===1){const l=e.indexOf(".");e.length-1-l>2&&(e=e.slice(0,l+3))}break;case"degrees":e=this.inputValue.replace(/[^\d.]/g,"");const n=parseFloat(e);!isNaN(n)&&n>360&&(e="360");break;case"time":e=this.formatTimeValue(e);break}this.inputValue=e,this.$emit("update:modelValue",e)},formatTimeValue(e){e=e.replace(/[^\d:]/g,"");const o=e.split(":");let a=parseInt(o[0]||0),r=parseInt(o[1]||0);return r>59&&(a+=Math.floor(r/60),r=r%60),(a>8||a===8&&r>20)&&(a=8,r=20),`${a}:${r.toString().padStart(2,"0")}`},incrementValue(){if(this.type==="m"){const e=parseFloat(this.inputValue)||0;e<this.maxValue&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="km"){const e=parseFloat(this.inputValue)||0;e<50&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="tx"){const e=parseFloat(this.inputValue)||0;e<10&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="degrees"){const e=parseFloat(this.inputValue)||0;e<360&&(this.inputValue=String(e+1),this.$emit("update:modelValue",this.inputValue))}else if(this.type==="time"){const[e,o]=this.inputValue.split(":").map(Number);let a=e*60+o+1;a>500&&(a=500);const r=Math.floor(a/60),i=a%60;this.inputValue=`${r}:${i.toString().padStart(2,"0")}`,this.$emit("update:modelValue",this.inputValue)}},decrementValue(){if(this.type==="m"){const e=parseFloat(this.inputValue)||0,o=Math.max(this.minValue,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="km"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="tx"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="degrees"){const e=parseFloat(this.inputValue)||0,o=Math.max(0,e-1);this.inputValue=String(o),this.$emit("update:modelValue",this.inputValue)}else if(this.type==="time"){const[e,o]=this.inputValue.split(":").map(Number);let a=e*60+o-1;a=Math.max(0,a);const r=Math.floor(a/60),i=a%60;this.inputValue=`${r}:${i.toString().padStart(2,"0")}`,this.$emit("update:modelValue",this.inputValue)}}}},Kp=e=>(t.pushScopeId("data-v-275559d5"),e=e(),t.popScopeId(),e),ID={class:"input-template-container"},DD={class:"input-with-arrows"},zD={class:"input-wrapper"},jD={key:0,class:"unit-prefix"},UD=["type"],HD={key:1,class:"unit-suffix"},WD={key:2,class:"unit-suffix km-suffix"},qD={key:3,class:"unit-suffix"},GD={key:4,class:"unit-suffix"},YD={class:"arrows-container"},ZD=Kp(()=>t.createElementVNode("span",{class:"arrow-icon up"},null,-1)),JD=[ZD],KD=Kp(()=>t.createElementVNode("span",{class:"arrow-icon down"},null,-1)),XD=[KD];function QD(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",ID,[t.createElementVNode("div",DD,[t.createElementVNode("div",zD,[a.type==="km"?(t.openBlock(),t.createElementBlock("span",jD,">")):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("input",{type:n.inputType,class:t.normalizeClass(["custom-input",{"m-type":a.type==="m","km-type":a.type==="km","time-type":a.type==="time","tx-type":a.type==="tx"}]),style:t.normalizeStyle({width:`${a.width}px`,height:`${a.height}px`}),"onUpdate:modelValue":o[0]||(o[0]=l=>i.inputValue=l),onInput:o[1]||(o[1]=(...l)=>n.handleInput&&n.handleInput(...l))},null,46,UD),[[t.vModelDynamic,i.inputValue]]),a.type==="m"?(t.openBlock(),t.createElementBlock("span",HD,"m")):t.createCommentVNode("",!0),a.type==="km"?(t.openBlock(),t.createElementBlock("span",WD,"km/h")):t.createCommentVNode("",!0),a.type==="tx"?(t.openBlock(),t.createElementBlock("span",qD,"xT")):t.createCommentVNode("",!0),a.type==="degrees"?(t.openBlock(),t.createElementBlock("span",GD,"°")):t.createCommentVNode("",!0)]),t.createElementVNode("div",YD,[t.createElementVNode("button",{class:"arrow-button up",onClick:o[2]||(o[2]=(...l)=>n.incrementValue&&n.incrementValue(...l))},JD),t.createElementVNode("button",{class:"arrow-button down",onClick:o[3]||(o[3]=(...l)=>n.decrementValue&&n.decrementValue(...l))},XD)])])])}const Uo=so(LD,[["render",QD],["__scopeId","data-v-275559d5"]]),Tl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(n=>{const[l,s]=n.split("-").map(Number);return{row:l,col:s,value:this.getSequentialNumber(l,s)}}),a={};o.forEach(n=>{a[n.col]||(a[n.col]=[]),a[n.col].push(n)});const r=[];Object.values(a).forEach(n=>{n.sort((s,d)=>d.row-s.row);let l=[n[0]];for(let s=1;s<n.length;s++){const d=n[s];n[s-1].row-d.row===1?l.push(d):(l.length>0&&r.push(l),l=[d])}l.length>0&&r.push(l)});const i=r.sort((n,l)=>{const s=Math.min(...n.map(c=>c.value)),d=Math.min(...l.map(c=>c.value));return s-d}).map(n=>{const l=n.map(s=>s.value).sort((s,d)=>d-s);return l.length===1?[l[0],l[0]]:[l[0],l[l.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(e=>{if(Array.isArray(e)&&e.length===2){const[o,a]=e,r=17-Math.floor((o-1)/21),i=(o-1)%21+1,n=17-Math.floor((a-1)/21),l=(a-1)%21+1;if(i===l){const s=Math.min(r,n),d=Math.max(r,n);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,l),d=Math.max(i,l);for(let c=s;c<=d;c++){const m=c===i?r:1,f=c===l?n:17;for(let y=Math.min(m,f);y<=Math.max(m,f);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));this.updateSelectAllState()},getSectionId(e,o){return`${e}-${o}`},isSelected(e,o){return this.selectedSections.has(this.getSectionId(e,o))},toggleSection(e,o){const a=this.getSectionId(e,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let e=357;this.selectAll=this.selectedSections.size===e})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const r=this.getSectionId(e,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(r)),this.dragSelectMode?this.selectedSections.add(r):this.selectedSections.delete(r),this.updateSelectAllState()},getSequentialNumber(e,o){return(17-e)*21+o}}},Xp=()=>{t.useCssVars(e=>({f4642dbe:e.fieldWidth+"px",82700512:(e.displayMode?e.fieldHeight-24:e.fieldHeight)+"px"}))},Qp=Tl.setup;Tl.setup=Qp?(e,o)=>(Xp(),Qp(e,o)):Xp;const ez=e=>(t.pushScopeId("data-v-7ae64b45"),e=e(),t.popScopeId(),e),tz={class:"field-template-element"},oz={class:"field-container"},az={key:0,class:"select-all-container"},rz={class:"select-all-label"},nz=ez(()=>t.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),iz=["onMouseenter","onMousedown"],lz=t.createStaticVNode('<div class="attack-direction" data-v-7ae64b45><div class="arrow-line" data-v-7ae64b45></div><span class="attack-text" data-v-7ae64b45>Ataca</span><div class="arrow-line" data-v-7ae64b45></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-7ae64b45><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-7ae64b45></polygon></svg></div>',1);function sz(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",tz,[t.createElementVNode("div",oz,[a.displayMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",az,[t.createElementVNode("label",rz,[nz,t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=l=>i.selectAll=l),onChange:o[1]||(o[1]=(...l)=>n.toggleAllSections&&n.toggleAllSections(...l))},null,544),[[t.vModelCheckbox,i.selectAll]])])])),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[3]||(o[3]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[4]||(o[4]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(17,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(21,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(l,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(l,s),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(l,s),["prevent"])},null,42,iz)),64))],64))),64))],32),lz])])}const e1=so(Tl,[["render",sz],["__scopeId","data-v-7ae64b45"]]),ot=e=>(t.pushScopeId("data-v-ad3ea53b"),e=e(),t.popScopeId(),e),cz={class:"modal-header"},dz=ot(()=>t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{opacity:".8",stroke:"#fff","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M5 15 15 5M15 15 5 5"})])],-1)),uz=[dz],pz={class:"modal-body"},mz={key:0,class:"modal-body__fields"},fz={key:1,class:"field-complex"},hz=ot(()=>t.createElementVNode("div",{class:"title"}," Elige la zona de origen del balón: ",-1)),yz={key:1,class:"field-complex"},gz=ot(()=>t.createElementVNode("div",{class:"title"}," Elige la zona de destino del balón: ",-1)),bz=ot(()=>t.createElementVNode("div",{class:"separator",style:{width:"100%","max-width":"82%"}},null,-1)),Sz={class:"modal-body__distances"},_z={class:"modal-body__distances__min"},wz=ot(()=>t.createElementVNode("div",{class:"title"}," Distancia mínima del pase: ",-1)),kz={class:"parameters"},Ez={class:"parameters__parameter"},Cz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje X de la cancha (de portería a portería) ",-1)),xz={class:"parameters__parameter__value"},Vz={class:"parameters__parameter"},Nz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje Y de la cancha (de banda a banda) ",-1)),Bz={class:"parameters__parameter__value"},Fz={class:"parameters__parameter"},Tz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Distancia total (No importa si va diagonal) ",-1)),vz={class:"parameters__parameter__value"},Az={class:"modal-body__distances__max"},$z=ot(()=>t.createElementVNode("div",{class:"title"}," Distancia máxima del pase: ",-1)),Rz={class:"parameters"},Oz={class:"parameters__parameter"},Mz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje X de la cancha (de portería a portería) ",-1)),Pz={class:"parameters__parameter__value"},Lz={class:"parameters__parameter"},Iz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Eje Y de la cancha (de banda a banda) ",-1)),Dz={class:"parameters__parameter__value"},zz={class:"parameters__parameter"},jz=ot(()=>t.createElementVNode("div",{class:"parameters__parameter__name"}," Distancia total (No importa si va diagonal) ",-1)),Uz={class:"parameters__parameter__value"},Hz=ot(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Wz={__name:"ModalPassParameters",props:{modelValue:{type:Boolean,default:!1},zIndex:{type:Number,default:1002},variable:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref([]),n=t.ref([]),l=t.ref([]),s=t.ref([]),d=[{quarter:1,sections:[1,2,3,4]},{quarter:2,sections:[5,6,7,8]},{quarter:3,sections:[9,10,11,12]},{quarter:4,sections:[13,14,15,16]}],c=t.computed(()=>{if(r.variable&&r.variable.parameters&&r.variable.parameters.destiny_zones&&r.variable.parameters.zone_type===1&&r.variable.parameters.destiny_zones.length){const P=d.find(O=>{const T=r.variable.parameters.destiny_zones[0];return O.sections.includes(T)});if(P)return[P.quarter]}return[]}),m=t.computed(()=>({"--z-index-overlay":r.zIndex})),f=()=>{a("update:modelValue",!0)};t.watch(()=>r.modelValue,P=>{P?(y(),document.body.classList.add("modal-open")):document.body.classList.remove("modal-open")});function y(){r.variable&&r.variable.parameters&&(r.variable.parameters.zone_type===2?(i.value=[...r.variable.parameters.origin_zones],n.value=[...r.variable.parameters.destiny_zones]):(l.value=[...r.variable.parameters.origin_zones],s.value=[...r.variable.parameters.destiny_zones]))}function u(){r.variable.isSelected||N(),a("update:model-value",!1)}function h(){r.variable.isSelected=!0,a("update:modelValue",!1)}function p(P){r.variable.parameters.origin_zones=[...P]}function g(P){P.length&&(r.variable.parameters.destiny_zones=[...P])}function S(P){r.variable.parameters.origin_zones=P}function b(P){r.variable.parameters.destiny_zones=P}function N(){r.variable.parameters={...r.variable.parametersDefault,origin_zones:[...r.variable.parametersDefault.origin_zones],destiny_zones:[...r.variable.parametersDefault.destiny_zones]},y()}return o({showModal:f}),(P,O)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"modal"},{default:t.withCtx(()=>{var T,v;return[e.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:O[6]||(O[6]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",cz,[t.createElementVNode("div",null,[t.createElementVNode("div",null,t.toDisplayString((v=(T=e.variable)==null?void 0:T.parametersConditions)==null?void 0:v.title),1)]),t.createElementVNode("div",{class:"modal-content__close",onClick:u},uz)]),t.createElementVNode("div",pz,[e.variable&&e.variable.parameters?(t.openBlock(),t.createElementBlock("div",mz,[t.createElementVNode("div",null,[e.variable.parameters.zone_type===1?(t.openBlock(),t.createBlock(Jp,{key:0,title:"Elige la zona de origen del balón:","initial-sections":l.value,onSectionsChanged:p},null,8,["initial-sections"])):(t.openBlock(),t.createElementBlock("div",fz,[hz,t.createVNode(e1,{"display-mode":!1,"initial-sections":i.value,onSectionsChanged:S},null,8,["initial-sections"])]))]),t.createElementVNode("div",null,[e.variable.parameters.zone_type===1?(t.openBlock(),t.createBlock(Jp,{key:0,title:"Elige la zona de destino del balón:","initial-sections":e.variable.parameters.destiny_zones,quarters:c.value,onSectionsChanged:g},null,8,["initial-sections","quarters"])):(t.openBlock(),t.createElementBlock("div",yz,[gz,t.createVNode(e1,{"display-mode":!1,"initial-sections":n.value,onSectionsChanged:b},null,8,["initial-sections"])]))])])):t.createCommentVNode("",!0),bz,t.createElementVNode("div",Sz,[t.createElementVNode("div",_z,[wz,t.createElementVNode("div",kz,[t.createElementVNode("div",Ez,[Cz,t.createElementVNode("div",xz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_distance_x,"onUpdate:modelValue":O[0]||(O[0]=w=>e.variable.parameters.minimum_distance_x=w)},{maxValue:Number(e.variable.parameters.maximum_distance_x),minValue:e.variable.parametersConditions.x.min}),null,16,["modelValue"])])]),t.createElementVNode("div",Vz,[Nz,t.createElementVNode("div",Bz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_distance_y,"onUpdate:modelValue":O[1]||(O[1]=w=>e.variable.parameters.minimum_distance_y=w)},{maxValue:Number(e.variable.parameters.maximum_distance_y),minValue:e.variable.parametersConditions.y.min}),null,16,["modelValue"])])]),t.createElementVNode("div",Fz,[Tz,t.createElementVNode("div",vz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.minimum_total_distance,"onUpdate:modelValue":O[2]||(O[2]=w=>e.variable.parameters.minimum_total_distance=w)},{maxValue:Number(e.variable.parameters.maximum_total_distance),minValue:e.variable.parametersConditions.total.min}),null,16,["modelValue"])])])])]),t.createElementVNode("div",Az,[$z,t.createElementVNode("div",Rz,[t.createElementVNode("div",Oz,[Mz,t.createElementVNode("div",Pz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_distance_x,"onUpdate:modelValue":O[3]||(O[3]=w=>e.variable.parameters.maximum_distance_x=w)},{maxValue:e.variable.parametersConditions.x.max,minValue:Number(e.variable.parameters.minimum_distance_x)}),null,16,["modelValue"])])]),t.createElementVNode("div",Lz,[Iz,t.createElementVNode("div",Dz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_distance_y,"onUpdate:modelValue":O[4]||(O[4]=w=>e.variable.parameters.maximum_distance_y=w)},{maxValue:e.variable.parametersConditions.y.max,minValue:Number(e.variable.parameters.minimum_distance_y)}),null,16,["modelValue"])])]),t.createElementVNode("div",zz,[jz,t.createElementVNode("div",Uz,[t.createVNode(Uo,t.mergeProps({width:92,height:33,style:{"margin-left":"30px"},type:"m",modelValue:e.variable.parameters.maximum_total_distance,"onUpdate:modelValue":O[5]||(O[5]=w=>e.variable.parameters.maximum_total_distance=w)},{maxValue:e.variable.parametersConditions.total.max,minValue:Number(e.variable.parameters.minimum_total_distance)}),null,16,["modelValue"])])])])])])]),Hz,t.createElementVNode("div",{class:"modal-footer"},[t.createElementVNode("div",{role:"button",onClick:N,class:"button-cancel button"}," Quitar filtros "),t.createElementVNode("div",{role:"button",class:"button-save button active",onClick:h}," Aplicar ")])],512)],4)):t.createCommentVNode("",!0)]}),_:1})]))}},qz=so(Wz,[["__scopeId","data-v-ad3ea53b"]]),Gz=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Ho=e=>(t.pushScopeId("data-v-a5a0021d"),e=e(),t.popScopeId(),e),Yz={class:"players-limit"},Zz=Ho(()=>t.createElementVNode("div",{class:"players-limit__content__body"}," No puedes comparar más de 10 jugadores a la vez. ",-1)),Jz=Ho(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Kz={key:0,class:"header-tools header-tools-graph"},Xz=Ho(()=>t.createElementVNode("br",null,null,-1)),Qz=Ho(()=>t.createElementVNode("br",null,null,-1)),ej={key:1,class:"add-player-container"},tj=Ho(()=>t.createElementVNode("div",null,"Agregar jugador",-1)),oj=Ho(()=>t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),aj=[tj,oj],rj={key:0,class:"radar"},nj={key:1,class:"radar"},ij={__name:"GSC-TableAndRadar",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDgyMTcxMTQsImV4cCI6MTc3OTc1MzExNH0.08YqLIH66doeBS-NLf1CPJM7WnvHLcB2Ypxm5LtBADg"},dynamicCategories:{type:Object,default:()=>({})},positionIds:{type:Array,default:()=>[]},customVariables:{type:Array,default:()=>[]},customVariablesOnly:{type:Boolean,default:!1},dynamicVariablesOnly:{type:Boolean,default:!1},isRankingVisible:{type:Boolean,default:!0},isDeletePlayerVisible:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]},applyAdditionalData:{type:Boolean,default:!1},isAddPlayerVisible:{type:Boolean,default:!0},isAddToListVisible:{type:Boolean,default:!0},componentWidth:{type:Number,default:800},tableHeaderMobile:{type:Boolean,default:!1}},emits:["view-profile","add-player","delete-player","list-created"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref([]),n=t.ref([]),l=t.ref([]),s=t.ref([]),d=t.ref(!1),c=t.ref(0),m=t.computed(()=>({"--grid-template-columns":r.dynamicVariablesOnly||r.customVariablesOnly?"1fr":"repeat(2, 1fr)"})),f=t.computed(()=>l.value.map(L=>{const K={...L};return delete K.isExpanded,K}));function y(L){const K=new Date;let ae=K.getFullYear()-L.getFullYear();const le=K.getMonth()-L.getMonth();return(le<0||le===0&&K.getDate()<L.getDate())&&ae--,ae}const u=t.computed(()=>{const L=r.positionIds&&r.positionIds.length>0?r.positionIds.reduce((K,ae)=>`${K}${K==="?"?"":"&"}p=${ae}`,"?"):"";return`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${r.userId}/variables${L}`});t.watch(u,(L,K)=>{L&&L!==K&&(r.customVariables&&r.customVariables.length?s.value=r.customVariables.map(ae=>({...ae,isSelected:!0})):h(L))},{immediate:!0}),t.watch(()=>r.isEditMode,L=>{L&&i.value.forEach(K=>{K.isSelected=!1})});async function h(L){try{const K=await(await fetch(L,{method:"GET",headers:{"Content-Type":"application/json",Authorization:r.token}})).json();s.value=K.data?K.data.reduce((ae,le)=>(le.checked&&ae.push({...le,isSelected:!0}),ae),[]):[]}catch(K){console.error("Error fetching user variables:",K)}}function p(L){l.value=L}function g(L){const[K,ae]=L.split(","),le=K.split(" ");let C="";for(const M of le)if(C+=` ${M}`,M.length>3)break;return ae&&K?`${ae.trim()} ${C}`:""}function S(L){i.value=L.map((K,ae)=>{const le=ae+1;return K.position&&(console.log("typeof player.position",typeof K.position),typeof K.position=="string"?K.position_name=K.position:typeof K.position=="number"&&(K.position_id=K.position)),{...K,position:le<10?`0${le}`:`${le}`,isSelected:!1,isExpanded:!1,isOdd:ae%2!==0,countryFlagUrl:`https://golstatsimages.blob.core.windows.net/flags/${K.nationality_id}.jpg`,playerPosition:K.position_name?K.position_name:Gz.get(K.position_id)||"",age:y(new Date(K.dob)),shortName:g(K.name),index:ae}}),n.value=i.value.map(K=>({...K})),c.value+=1}function b(L){i.value.forEach(ae=>{ae.isNew=!1});const K=i.value.find(ae=>ae.id&&L.id&&ae.id===L.id||ae.objeto_player&&ae.objeto_player.player_id===L.player_id||ae.player_id&&L.player_id&&ae.player_id===L.player_id||ae.id&&L.player_id&&ae.id===L.player_id||ae.player_id&&L.id&&ae.player_id===L.id);setTimeout(()=>{K||(L.name=g(L.name),L.isNew=!0,i.value.unshift(L))},500)}function N(L){d.value=L,L&&(document.body.style.overflow="hidden",document.html.style.overflow="hidden")}function P(){a("click-add-player")}function O(L){a("view-profile",L)}function T(L){a("add-player",L)}function v(L){a("delete-player",L)}function w(){a("list-created")}const A=t.ref(!1),k=t.ref(null);function E(L){k.value=L,A.value=!0}function B(L){A.value=L}function F(){d.value=!1,document.body.style.overflow="auto",document.html.style.overflow="auto"}return o({setPlayers:S,addPlayer:b}),(L,K)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",Yz,[t.createElementVNode("div",{class:"players-limit__content"},[Zz,Jz,t.createElementVNode("div",{class:"players-limit__content__footer"},[t.createElementVNode("div",{role:"button",class:"button-success",onClick:F}," Aceptar ")])])],512),[[t.vShow,d.value]])]),_:1})])),t.createVNode(qz,{"model-value":A.value,variable:k.value,"onUpdate:modelValue":B},null,8,["model-value","variable"]),t.createElementVNode("div",{class:"table-radars",style:t.normalizeStyle([m.value,e.tableHeaderMobile?"flex-direction: column-reverse;":""])},[t.createElementVNode("div",{class:"table-radars__table",style:t.normalizeStyle(e.tableHeaderMobile?"max-width: 100%; min-width:300px":"")},[e.tableHeaderMobile?(t.openBlock(),t.createElementBlock("div",Kz,[t.createElementVNode("div",{class:"ht-left",style:t.normalizeStyle(e.componentWidth<450?"gap:5px;":"")},[t.createElementVNode("span",{class:"ht-title",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},"Rank",4),e.dynamicVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:"ht-action",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},[t.createTextVNode("Agregar"),Xz,t.createTextVNode("a lista")],4)),t.createElementVNode("span",{class:"ht-action",style:t.normalizeStyle(e.componentWidth<450?"font-size:8px;":"")},[t.createTextVNode("Ver"),Qz,t.createTextVNode("en spider")],4)],4)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(IV,{key:c.value,players:i.value,"is-ranking-visible":e.isRankingVisible,"is-delete-player-visible":e.isDeletePlayerVisible,lists:e.lists,"component-width":e.componentWidth,"dynamic-variables-only":e.dynamicVariablesOnly,"custom-variables-only":e.customVariablesOnly,token:e.token,"user-id":e.userId,"is-add-to-list-visible":e.isAddToListVisible,onChangeSelectedPlayers:p,onClickCheckbox:N,onViewProfile:O,onAddPlayer:T,onDeletePlayer:v,onListCreated:w},null,8,["players","is-ranking-visible","is-delete-player-visible","lists","component-width","dynamic-variables-only","custom-variables-only","token","user-id","is-add-to-list-visible"])),e.isAddPlayerVisible?(t.openBlock(),t.createElementBlock("div",ej,[t.createElementVNode("div",{role:"button",class:"button-add-player",onClick:P},aj)])):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"table-radars__radars",style:t.normalizeStyle(e.componentWidth<=500?"--grid-template-columns: repeat(1fr, 1fr)":"")},[e.dynamicVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",rj,[t.createVNode(Gp,{title:"Tipos de jugadas Profesor Lillini:",players:f.value,"all-players":i.value,"custom-categories":s.value,"user-id":e.userId,token:e.token,"has-header":!e.customVariablesOnly,"apply-additional-data":e.applyAdditionalData,"component-width":e.componentWidth,"is-mobile":""},null,8,["players","all-players","custom-categories","user-id","token","has-header","apply-additional-data","component-width"])])),e.customVariablesOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nj,[t.createVNode(Gp,{title:"Variables Dinámicas:",players:f.value,"all-players":i.value,"dynamic-categories":e.dynamicCategories,"user-id":e.userId,token:e.token,"is-mobile":"","component-width":e.componentWidth,"apply-additional-data":e.applyAdditionalData,onClickParameters:E},null,8,["players","all-players","dynamic-categories","user-id","token","component-width","apply-additional-data"])]))],4)],4)],64))}},lj=so(ij,[["__scopeId","data-v-a5a0021d"]]);function sj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},t1;function cj(){if(t1)return nn.exports;t1=1;function e(){}return e.prototype={on:function(o,a,r){var i=this.e||(this.e={});return(i[o]||(i[o]=[])).push({fn:a,ctx:r}),this},once:function(o,a,r){var i=this;function n(){i.off(o,n),a.apply(r,arguments)}return n._=a,this.on(o,n,r)},emit:function(o){var a=[].slice.call(arguments,1),r=((this.e||(this.e={}))[o]||[]).slice(),i=0,n=r.length;for(i;i<n;i++)r[i].fn.apply(r[i].ctx,a);return this},off:function(o,a){var r=this.e||(this.e={}),i=r[o],n=[];if(i&&a)for(var l=0,s=i.length;l<s;l++)i[l].fn!==a&&i[l].fn._!==a&&n.push(i[l]);return n.length?r[o]=n:delete r[o],this}},nn.exports=e,nn.exports.TinyEmitter=e,nn.exports}var vl,o1;function dj(){if(o1)return vl;o1=1;var e=cj();return vl=new e,vl}var uj=dj();const Na=sj(uj),pj={class:"graph-view"},mj=yt({__name:"GraphView",props:{dynamicCategories:{type:Object,default:()=>null},isScouting:{type:Boolean,default:!0},componentWidth:{type:Number,default:800},tableHeaderMobile:{type:Boolean,default:!1},userId:{type:Number,default:0},positionIds:{type:Array,default:()=>[]},lists:{type:Array,default:()=>[]},token:{type:String,default:""},isAddPlayerVisible:{type:Boolean,default:!1}},emits:["showProfile","playerAdded","click-add-player"],setup(e,{emit:o}){const a=t.ref(null);Na.on("set-players",s=>{a.value&&a.value.setPlayers([...s])}),Na.on("add-player",s=>{console.count("add-player"),a.value&&a.value.addPlayer(s)});const r=o;function i(s){r("showProfile",s)}function n(){r("playerAdded")}function l(){r("click-add-player")}return(s,d)=>(t.openBlock(),t.createElementBlock("div",pj,[t.createVNode(t.unref(lj),{ref_key:"tableAndRadar",ref:a,"user-id":e.userId,"dynamic-categories":e.dynamicCategories,"position-ids":e.positionIds,token:e.token,lists:e.lists,"component-width":e.componentWidth,"table-header-mobile":e.tableHeaderMobile,"dynamic-variables-only":e.isScouting,"is-add-to-list-visible":!e.isScouting,"is-add-player-visible":e.isAddPlayerVisible,onViewProfile:i,onListCreated:n,onClickAddPlayer:l},null,8,["user-id","dynamic-categories","position-ids","token","lists","component-width","table-header-mobile","dynamic-variables-only","is-add-to-list-visible","is-add-player-visible"])]))}},[["__scopeId","data-v-98c1c696"]]),Al=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},$l={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){if(this.lastSelectedSections.every(a=>e.has(a)))return;const o=Array.from(e).map(Number).sort((a,r)=>a-r);this.lastSelectedSections=[...o],this.$emit("sections-changed",o)},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(e=>{const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())});else for(let e=1;e<=16;e++){const o=Math.ceil(e/4);this.isQuarterEnabled(o)&&this.selectedSections.add(e.toString())}this.updateSelectAllState()},isSelected(e){return this.selectedSections.has(e.toString())},toggleSection(e){const o=Math.ceil(e/4);if(!this.isQuarterEnabled(o))return;const a=e.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let e=1;e<=16;e++)this.selectedSections.add(e.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=e.toString(),r=Math.ceil(e/4);if(this.isQuarterEnabled(r)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(e,o){return(e-1)*4+o},getSectionIndex(e,o){return(e-1)*4+o},selectColumn(e){if(!this.isQuarterEnabled(e))return;const o=(e-1)*4+1,a=e*4;if(Array.from({length:4},(r,i)=>(o+i).toString()).every(r=>this.selectedSections.has(r))&&this.selectedSections.size>4)for(let r=o;r<=a;r++)this.selectedSections.delete(r.toString());else for(let r=o;r<=a;r++)this.selectedSections.add(r.toString());this.updateSelectAllState()},isQuarterSelected(e){const o=(e-1)*4+1;return Array.from({length:4},(a,r)=>(o+r).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(e){return this.quarters.includes(e)}}},a1=()=>{t.useCssVars(e=>({"3f07ccca":e.fieldWidth+"px","26834d3a":e.fieldHeight+"px","1711e604":e.displayMode?"-28px":"0"}))},r1=$l.setup;$l.setup=r1?(e,o)=>(a1(),r1(e,o)):a1;const fj={class:"field-template-element"},hj={class:"field-container"},yj=["onMouseenter","onMousedown"],gj={class:"column-buttons"},bj=["onClick","disabled"];function Sj(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",fj,[t.createElementVNode("div",hj,[t.createElementVNode("div",{class:t.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[t.createElementVNode("span",null,t.toDisplayString(a.title),1)],2),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[1]||(o[1]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[2]||(o[2]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"field-column"},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(n.getSectionIndex(l,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(n.getSectionIndex(l,s)),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(n.getSectionIndex(l,s)),["prevent"])},null,42,yj)),64))])),64))],32),t.createElementVNode("div",gj,[a.displayMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},t.renderList(4,l=>t.createElementVNode("div",{key:l,class:"column-label"},t.toDisplayString(l)+"/4 tos ",1)),64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},t.renderList(4,l=>t.createElementVNode("button",{key:l,class:t.normalizeClass(["column-button",{selected:n.isQuarterSelected(l),disabled:!n.isQuarterEnabled(l)}]),onClick:s=>n.selectColumn(l),disabled:!n.isQuarterEnabled(l)},t.toDisplayString(l)+"/4 tos ",11,bj)),64))])])])}const _j=Al($l,[["render",Sj],["__scopeId","data-v-1f6351a4"]]),Rl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(e){const o=Array.from(e).map(n=>{const[l,s]=n.split("-").map(Number);return{row:l,col:s,value:this.getSequentialNumber(l,s)}}),a={};o.forEach(n=>{a[n.col]||(a[n.col]=[]),a[n.col].push(n)});const r=[];Object.values(a).forEach(n=>{n.sort((s,d)=>d.row-s.row);let l=[n[0]];for(let s=1;s<n.length;s++){const d=n[s];n[s-1].row-d.row===1?l.push(d):(l.length>0&&r.push(l),l=[d])}l.length>0&&r.push(l)});const i=r.sort((n,l)=>{const s=Math.min(...n.map(c=>c.value)),d=Math.min(...l.map(c=>c.value));return s-d}).map(n=>{const l=n.map(s=>s.value).sort((s,d)=>d-s);return l.length===1?[l[0],l[0]]:[l[0],l[l.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(e=>{if(Array.isArray(e)&&e.length===2){const[o,a]=e,r=17-Math.floor((o-1)/21),i=(o-1)%21+1,n=17-Math.floor((a-1)/21),l=(a-1)%21+1;if(i===l){const s=Math.min(r,n),d=Math.max(r,n);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,l),d=Math.max(i,l);for(let c=s;c<=d;c++){const m=c===i?r:1,f=c===l?n:17;for(let y=Math.min(m,f);y<=Math.max(m,f);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));this.updateSelectAllState()},getSectionId(e,o){return`${e}-${o}`},isSelected(e,o){return this.selectedSections.has(this.getSectionId(e,o))},toggleSection(e,o){const a=this.getSectionId(e,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let e=1;e<=17;e++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(e,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let e=357;this.selectAll=this.selectedSections.size===e})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(e,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const r=this.getSectionId(e,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(r)),this.dragSelectMode?this.selectedSections.add(r):this.selectedSections.delete(r),this.updateSelectAllState()},getSequentialNumber(e,o){return(17-e)*21+o}}},n1=()=>{t.useCssVars(e=>({"7dc153b4":e.fieldWidth+"px","3cee0bfc":(e.displayMode?e.fieldHeight-24:e.fieldHeight)+"px"}))},i1=Rl.setup;Rl.setup=i1?(e,o)=>(n1(),i1(e,o)):n1;const wj={class:"field-template-element"},kj={class:"field-container"},Ej={key:0,class:"select-all-container"},Cj={class:"select-all-label"},xj=["onMouseenter","onMousedown"];function Vj(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",wj,[t.createElementVNode("div",kj,[a.displayMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ej,[t.createElementVNode("label",Cj,[o[5]||(o[5]=t.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),t.withDirectives(t.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=l=>i.selectAll=l),onChange:o[1]||(o[1]=(...l)=>n.toggleAllSections&&n.toggleAllSections(...l))},null,544),[[t.vModelCheckbox,i.selectAll]])])])),t.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...l)=>n.startDragging&&n.startDragging(...l)),onMouseup:o[3]||(o[3]=(...l)=>n.stopDragging&&n.stopDragging(...l)),onMouseleave:o[4]||(o[4]=(...l)=>n.stopDragging&&n.stopDragging(...l))},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(17,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(21,s=>t.createElementVNode("div",{key:`${l}-${s}`,class:t.normalizeClass(["field-section",{selected:n.isSelected(l,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&n.handleDragSelect(l,s),onMousedown:t.withModifiers(d=>!a.displayMode&&n.toggleSection(l,s),["prevent"])},null,42,xj)),64))],64))),64))],32),o[6]||(o[6]=t.createStaticVNode('<div class="attack-direction" data-v-389c50fa><div class="arrow-line" data-v-389c50fa></div><span class="attack-text" data-v-389c50fa>Ataca</span><div class="arrow-line" data-v-389c50fa></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-389c50fa><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-389c50fa></polygon></svg></div>',1))])])}const Nj=Al(Rl,[["render",Vj],["__scopeId","data-v-389c50fa"]]),Bj={components:{FieldGolStatsTemplates:_j,FieldTemplatesElement:Nj},name:"ModalPassConditions",props:{isVisible:{type:Boolean,required:!0},parameters:{type:Object,required:!0}},data(){return{quarters:[1,2],userId:24254,originSelection:[],destinationSelection:[],selectAllOrigin:!1,selectAllDestination:!1,minDistanceX:.5,minDistanceY:.5,minDistanceTotal:.5}},methods:{isArrayOfArrays(e){return Array.isArray(e)&&e.length>0&&e.every(o=>Array.isArray(o))},closeModal(){this.$emit("update:isVisible",!1)},updateOriginSelection(e){this.originSelection=e},updateDestinationSelection(e){this.destinationSelection=e},clearFilters(){this.originSelection=[],this.destinationSelection=[],this.selectAllOrigin=!1,this.selectAllDestination=!1,this.minDistanceX=0,this.minDistanceY=0,this.minDistanceTotal=0},applyFilters(){this.$emit("update:isVisible",!1)}}},Fj={key:0,class:"modal-wrapper"},Tj={class:"modal-overlay"},vj={class:"modal-container"},Aj={class:"modal-content"},$j={class:"modal-header"},Rj={class:"fields-container"},Oj={class:"field-section"},Mj={class:"field-section"},Pj={class:"distance-section"},Lj={class:"distance-info"},Ij={class:"info-row"},Dj={class:"info-value"},zj={class:"info-row"},jj={class:"info-value"},Uj={class:"info-row"},Hj={class:"info-value"},Wj={class:"distance-section"},qj={class:"distance-info"},Gj={class:"info-row"},Yj={class:"info-value"},Zj={class:"info-row"},Jj={class:"info-value"},Kj={class:"info-row"},Xj={class:"info-value"};function Qj(e,o,a,r,i,n){var l,s,d,c,m,f,y,u,h,p,g,S;const b=t.resolveComponent("FieldGolStatsTemplates"),N=t.resolveComponent("FieldTemplatesElement");return a.isVisible?(t.openBlock(),t.createElementBlock("div",Fj,[t.createElementVNode("div",Tj,[t.createElementVNode("div",vj,[t.createElementVNode("div",Aj,[t.createElementVNode("div",$j,[o[2]||(o[2]=t.createStaticVNode('<div class="header-content" data-v-834c0128><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-inspector="src/components/GSCTemplates.vue:100:15" data-v-a08c9209="" data-v-834c0128><path d="M5.18088 2.68185L3.12463 4.74435L2.31838 3.93185C2.20069 3.81416 2.04107 3.74805 1.87463 3.74805C1.70819 3.74805 1.54857 3.81416 1.43088 3.93185C1.31319 4.04954 1.24707 4.20917 1.24707 4.3756C1.24707 4.54204 1.31319 4.70166 1.43088 4.81935L2.68088 6.06935C2.73898 6.12793 2.80811 6.17443 2.88427 6.20616C2.96043 6.23789 3.04212 6.25423 3.12463 6.25423C3.20714 6.25423 3.28883 6.23789 3.36499 6.20616C3.44115 6.17443 3.51028 6.12793 3.56838 6.06935L6.06838 3.56935C6.12665 3.51108 6.17288 3.4419 6.20442 3.36576C6.23595 3.28962 6.25218 3.20802 6.25218 3.1256C6.25218 3.04319 6.23595 2.96159 6.20442 2.88545C6.17288 2.80931 6.12665 2.74013 6.06838 2.68185C6.0101 2.62358 5.94092 2.57735 5.86478 2.54582C5.78864 2.51428 5.70704 2.49805 5.62463 2.49805C5.54222 2.49805 5.46061 2.51428 5.38447 2.54582C5.30833 2.57735 5.23915 2.62358 5.18088 2.68185Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:101:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 8.125H2.5C2.33424 8.125 2.17527 8.19085 2.05806 8.30806C1.94085 8.42527 1.875 8.58424 1.875 8.75V11.25C1.875 11.4158 1.94085 11.5747 2.05806 11.6919C2.17527 11.8092 2.33424 11.875 2.5 11.875H5C5.16576 11.875 5.32473 11.8092 5.44194 11.6919C5.55915 11.5747 5.625 11.4158 5.625 11.25V8.75C5.625 8.58424 5.55915 8.42527 5.44194 8.30806C5.32473 8.19085 5.16576 8.125 5 8.125ZM4.375 10.625H3.125V9.375H4.375V10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:104:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 13.75H2.5C2.33424 13.75 2.17527 13.8158 2.05806 13.9331C1.94085 14.0503 1.875 14.2092 1.875 14.375V16.875C1.875 17.0408 1.94085 17.1997 2.05806 17.3169C2.17527 17.4342 2.33424 17.5 2.5 17.5H5C5.16576 17.5 5.32473 17.4342 5.44194 17.3169C5.55915 17.1997 5.625 17.0408 5.625 16.875V14.375C5.625 14.2092 5.55915 14.0503 5.44194 13.9331C5.32473 13.8158 5.16576 13.75 5 13.75ZM4.375 16.25H3.125V15H4.375V16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:107:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 9.375H13.125C13.2908 9.375 13.4497 9.30915 13.5669 9.19194C13.6842 9.07473 13.75 8.91576 13.75 8.75C13.75 8.58424 13.6842 8.42527 13.5669 8.30806C13.4497 8.19085 13.2908 8.125 13.125 8.125H8.125C7.95924 8.125 7.80027 8.19085 7.68306 8.30806C7.56585 8.42527 7.5 8.58424 7.5 8.75C7.5 8.91576 7.56585 9.07473 7.68306 9.19194C7.80027 9.30915 7.95924 9.375 8.125 9.375Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:110:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 10.625H8.125C7.95924 10.625 7.80027 10.6908 7.68306 10.8081C7.56585 10.9253 7.5 11.0842 7.5 11.25C7.5 11.4158 7.56585 11.5747 7.68306 11.6919C7.80027 11.8092 7.95924 11.875 8.125 11.875H18.125C18.2908 11.875 18.4497 11.8092 18.5669 11.6919C18.6842 11.5747 18.75 11.4158 18.75 11.25C18.75 11.0842 18.6842 10.9253 18.5669 10.8081C18.4497 10.6908 18.2908 10.625 18.125 10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:113:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 15H13.125C13.2908 15 13.4497 14.9342 13.5669 14.8169C13.6842 14.6997 13.75 14.5408 13.75 14.375C13.75 14.2092 13.6842 14.0503 13.5669 13.9331C13.4497 13.8158 13.2908 13.75 13.125 13.75H8.125C7.95924 13.75 7.80027 13.8158 7.68306 13.9331C7.56585 14.0503 7.5 14.2092 7.5 14.375C7.5 14.5408 7.56585 14.6997 7.68306 14.8169C7.80027 14.9342 7.95924 15 8.125 15Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:116:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 16.25H8.125C7.95924 16.25 7.80027 16.3158 7.68306 16.4331C7.56585 16.5503 7.5 16.7092 7.5 16.875C7.5 17.0408 7.56585 17.1997 7.68306 17.3169C7.80027 17.4342 7.95924 17.5 8.125 17.5H18.125C18.2908 17.5 18.4497 17.4342 18.5669 17.3169C18.6842 17.1997 18.75 17.0408 18.75 16.875C18.75 16.7092 18.6842 16.5503 18.5669 16.4331C18.4497 16.3158 18.2908 16.25 18.125 16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:119:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 3.75H13.125C13.2908 3.75 13.4497 3.68415 13.5669 3.56694C13.6842 3.44973 13.75 3.29076 13.75 3.125C13.75 2.95924 13.6842 2.80027 13.5669 2.68306C13.4497 2.56585 13.2908 2.5 13.125 2.5H8.125C7.95924 2.5 7.80027 2.56585 7.68306 2.68306C7.56585 2.80027 7.5 2.95924 7.5 3.125C7.5 3.29076 7.56585 3.44973 7.68306 3.56694C7.80027 3.68415 7.95924 3.75 8.125 3.75Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:122:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 6.25H18.125C18.2908 6.25 18.4497 6.18415 18.5669 6.06694C18.6842 5.94973 18.75 5.79076 18.75 5.625C18.75 5.45924 18.6842 5.30027 18.5669 5.18306C18.4497 5.06585 18.2908 5 18.125 5H8.125C7.95924 5 7.80027 5.06585 7.68306 5.18306C7.56585 5.30027 7.5 5.45924 7.5 5.625C7.5 5.79076 7.56585 5.94973 7.68306 6.06694C7.80027 6.18415 7.95924 6.25 8.125 6.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:125:17" data-v-a08c9209="" data-v-834c0128></path></svg><span data-v-834c0128>Elige las condiciones del pase</span></div>',1)),t.createElementVNode("button",{class:"close-button",onClick:o[0]||(o[0]=P=>e.$emit("update:isVisible",!1))},o[1]||(o[1]=[t.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})],-1)]))]),t.createElementVNode("div",Rj,[t.createElementVNode("div",Oj,[n.isArrayOfArrays((l=a.parameters)==null?void 0:l.origin_zones)?(t.openBlock(),t.createBlock(N,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(d=a.parameters)==null?void 0:d.origin_zones},null,8,["initial-sections"])):(t.openBlock(),t.createBlock(b,{key:0,title:"Elige la zona de origen del balón:","initial-sections":(s=a.parameters)==null?void 0:s.origin_zones,"display-mode":!0},null,8,["initial-sections"]))]),t.createElementVNode("div",Mj,[n.isArrayOfArrays((c=a.parameters)==null?void 0:c.destiny_zones)?(t.openBlock(),t.createBlock(N,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(f=a.parameters)==null?void 0:f.destiny_zones},null,8,["initial-sections"])):(t.openBlock(),t.createBlock(b,{key:0,title:"Elige la zona de destino del balón:","initial-sections":(m=a.parameters)==null?void 0:m.destiny_zones,"display-mode":!0},null,8,["initial-sections"]))])]),t.createElementVNode("div",Pj,[o[6]||(o[6]=t.createElementVNode("h3",null,"Distancia mínima del pase:",-1)),t.createElementVNode("div",Lj,[t.createElementVNode("div",Ij,[o[3]||(o[3]=t.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),t.createElementVNode("span",Dj,t.toDisplayString((y=a.parameters)==null?void 0:y.minimum_distance_x)+" m",1)]),t.createElementVNode("div",zj,[o[4]||(o[4]=t.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),t.createElementVNode("span",jj,t.toDisplayString((u=a.parameters)==null?void 0:u.minimum_distance_y)+" m",1)]),t.createElementVNode("div",Uj,[o[5]||(o[5]=t.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),t.createElementVNode("span",Hj,t.toDisplayString((h=a.parameters)==null?void 0:h.minimum_total_distance)+" m",1)])])]),t.createElementVNode("div",Wj,[o[10]||(o[10]=t.createElementVNode("h3",null,"Distancia máxima del pase:",-1)),t.createElementVNode("div",qj,[t.createElementVNode("div",Gj,[o[7]||(o[7]=t.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),t.createElementVNode("span",Yj,t.toDisplayString((p=a.parameters)==null?void 0:p.maximum_distance_x)+" m",1)]),t.createElementVNode("div",Zj,[o[8]||(o[8]=t.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),t.createElementVNode("span",Jj,t.toDisplayString((g=a.parameters)==null?void 0:g.maximum_distance_y)+" m",1)]),t.createElementVNode("div",Kj,[o[9]||(o[9]=t.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),t.createElementVNode("span",Xj,t.toDisplayString((S=a.parameters)==null?void 0:S.maximum_total_distance)+" m",1)])])])])])])])):t.createCommentVNode("",!0)}const l1=Al(Bj,[["render",Qj],["__scopeId","data-v-834c0128"]]),eU={key:0,class:"loading-container"},tU={key:1},oU={class:"tooltip-list"},aU=["onClick"],rU={class:"folder-icon"},nU={key:0,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iU={key:1,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lU=yt({__name:"AddToListTooltip",props:{lists:{type:Array,default:()=>[]},isModalOpen:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:""},selectedPlayer:{type:Object,default:()=>({})}},emits:["selectList","close","createNewList","playerAdded"],setup(e,{emit:o}){const a=e,r=t.ref(null),i=t.ref(!0),n=t.ref(!1),l=o;t.watch(()=>a.isModalOpen,y=>{i.value=!y});function s(){l("createNewList")}function d(y){i.value&&r.value&&!r.value.contains(y.target)&&l("close")}async function c(y){try{n.value=!0;const u={dob:a.selectedPlayer.dob,is_female:0,jersey:0,name:a.selectedPlayer.name,nationality:a.selectedPlayer.nationality,nationality_id:a.selectedPlayer.nationality_id,player_id:a.selectedPlayer.player_id,position:a.selectedPlayer.position_id,team_id:a.selectedPlayer.team_id},h={user_id:a.userId,id:y.id,players:[u]};(await we.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${y.id}/players`,h)).status===200&&(l("playerAdded"),l("selectList",y),l("close"))}catch(u){console.error("Error al agregar jugador a la lista:",u),n.value=!1}}function m(y){i.value&&y.target===r.value&&l("close")}function f(y){var u;return(u=y.players)==null?void 0:u.some(h=>h.player_id===a.selectedPlayer.player_id)}return t.onMounted(()=>{window.addEventListener("mousedown",d)}),t.onUnmounted(()=>{window.removeEventListener("mousedown",d)}),(y,u)=>(t.openBlock(),t.createElementBlock("div",{class:"add-to-list-tooltip",ref_key:"tooltipRef",ref:r,onClick:m},[u[5]||(u[5]=t.createElementVNode("div",{class:"tooltip-title"},"Agregar a lista existente:",-1)),n.value?(t.openBlock(),t.createElementBlock("div",eU,u[0]||(u[0]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1),t.createElementVNode("span",null,"Agregando jugador...",-1)]))):(t.openBlock(),t.createElementBlock("div",tU,[t.createElementVNode("div",oU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lists,h=>(t.openBlock(),t.createElementBlock("div",{key:h.id,class:t.normalizeClass(["tooltip-list-item",{disabled:f(h)}]),onClick:p=>!f(h)&&c(h)},[t.createElementVNode("span",rU,[f(h)?(t.openBlock(),t.createElementBlock("svg",iU,u[2]||(u[2]=[t.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M6 9L8 11L12 7",stroke:"#9b9b9a","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(t.openBlock(),t.createElementBlock("svg",nU,u[1]||(u[1]=[t.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1),t.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1)])))]),t.createElementVNode("span",{class:t.normalizeClass(["list-name",{"disabled-text":f(h)}])},t.toDisplayString(h.name),3)],10,aU))),128))]),u[4]||(u[4]=t.createElementVNode("div",{class:"tooltip-divider"},null,-1)),t.createElementVNode("div",{class:"tooltip-create",onClick:s},u[3]||(u[3]=[t.createElementVNode("span",{class:"plus-icon"},[t.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#98a2b3",stroke:"#FFFFFF","stroke-width":"0.091682"})])],-1),t.createElementVNode("span",{class:"create-text"},"Crear nueva lista",-1)]))]))],512))}},[["__scopeId","data-v-cc992b53"]]),sU={class:"modal-overlay"},cU={key:0,class:"modal-content"},dU={class:"modal-select-container"},uU={class:"modal-input-wrapper"},pU=["disabled"],mU={key:0,class:"modal-input-loading"},fU={key:0,class:"modal-dropdown"},hU={key:0,class:"modal-dropdown-empty"},yU={key:1,class:"modal-dropdown-scroll"},gU={class:"variable-selection"},bU=["value"],SU={class:"variable-text"},_U={class:"modal-dropdown-actions"},wU={key:1,class:"modal-error"},kU={key:0,class:"modal-name-error"},EU={class:"modal-actions"},CU=["disabled"],xU=yt({__name:"CreateListModal",props:{userId:{type:String,required:!0},token:{type:String,required:!0},lists:{type:Array,default:()=>[]},selectedPlayer:{type:Object,default:()=>({})}},emits:["close","createList","listCreated"],setup(e,{emit:o}){const a=o,r=e,i=t.ref(""),n=t.ref(""),l=t.ref([]),s=t.ref(!1),d=t.ref(!1),c=t.ref([]),m=t.ref(!1),f=t.ref(null),y=t.computed(()=>r.lists.some(A=>A.name.toLowerCase()===i.value.toLowerCase().trim())),u=t.computed(()=>i.value.trim()!==""&&l.value.length>0&&!y.value);async function h(){var A,k;try{m.value=!0;const B=await we.create({headers:{Authorization:`${r.token}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${r.userId}/variables`);c.value=B.data.data.map(F=>({...F,checked:F.checked||!1}))}catch(E){f.value=((k=(A=E.response)==null?void 0:A.data)==null?void 0:k.message)||"Error al obtener las variables",console.error("Error fetching variables:",E)}finally{m.value=!1}}const p=t.computed(()=>{if(!c.value.length)return[];const A=n.value.toLowerCase().trim();return A?c.value.filter(k=>k.name.toLowerCase().includes(A)):c.value});t.watch(c,A=>{l.value=A.filter(k=>k.checked)},{immediate:!0});function g(){s.value=!0}function S(){s.value=!s.value}function b(){s.value=!0}function N(){n.value=""}function P(){n.value="",s.value=!1}async function O(){var A,k;try{if(i.value&&l.value.length){const E=we.create({headers:{Authorization:`${r.token}`}}),B={user_id:parseInt(r.userId),name:i.value,variables:l.value},F=await E.post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${r.userId}/in-followed`,B);F.data&&(a("createList",{nombre:i.value,variables:l.value,id:F.data.data.id}),a("listCreated"),i.value="",l.value=[],n.value="",s.value=!1,a("close"))}}catch(E){console.error("Error creating list:",E),f.value=((k=(A=E.response)==null?void 0:A.data)==null?void 0:k.message)||"Error al crear la lista"}}function T(){s.value=!1,a("close")}function v(){document.body.style.overflow="hidden"}function w(){document.body.style.overflow=""}return t.onMounted(async()=>{d.value=!0,s.value=!1,v(),await h()}),t.onUnmounted(()=>{w()}),(A,k)=>(t.openBlock(),t.createElementBlock("div",sU,[t.createVNode(t.Transition,{name:"slide-up"},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createElementBlock("div",cU,[t.createElementVNode("button",{class:"modal-close",onClick:T},"×"),k[7]||(k[7]=t.createElementVNode("div",{class:"modal-title"},[t.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#FFFFFF",stroke:"#FFFFFF","stroke-width":"0.091682"})]),t.createTextVNode(" Crear nueva lista ")],-1)),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":k[0]||(k[0]=E=>i.value=E),class:"modal-input",type:"text",placeholder:"Nombre de tu lista"},null,512),[[t.vModelText,i.value]]),t.createElementVNode("div",dU,[t.createElementVNode("div",uU,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":k[1]||(k[1]=E=>n.value=E),class:"modal-input",type:"text",placeholder:"Selecciona las variables que quieres que se vean",onFocus:g,onBlur:N,onInput:b,disabled:m.value},null,40,pU),[[t.vModelText,n.value]]),m.value?(t.openBlock(),t.createElementBlock("div",mU,k[4]||(k[4]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1)]))):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["modal-select-arrow",{"arrow-up":s.value}]),onClick:S},k[5]||(k[5]=[t.createElementVNode("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 6L6 1L11 6",stroke:"#8EA2AB","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2))]),s.value&&!m.value&&!f.value?(t.openBlock(),t.createElementBlock("div",fU,[p.value.length===0?(t.openBlock(),t.createElementBlock("div",hU," No se encontraron variables ")):(t.openBlock(),t.createElementBlock("div",yU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,E=>(t.openBlock(),t.createElementBlock("div",{key:E.custom_id,class:"modal-dropdown-item"},[t.createElementVNode("label",gU,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",value:E,"onUpdate:modelValue":k[2]||(k[2]=B=>l.value=B),onClick:k[3]||(k[3]=t.withModifiers(()=>{},["stop"]))},null,8,bU),[[t.vModelCheckbox,l.value]]),t.createElementVNode("span",SU,t.toDisplayString(E.name),1)])]))),128))])),t.createElementVNode("div",_U,[t.createElementVNode("button",{class:"modal-listo-btn",onMousedown:t.withModifiers(P,["prevent"])},"Listo",32)])])):t.createCommentVNode("",!0),f.value?(t.openBlock(),t.createElementBlock("div",wU,[k[6]||(k[6]=t.createElementVNode("span",{class:"error-icon"},"!",-1)),t.createTextVNode(" "+t.toDisplayString(f.value),1)])):t.createCommentVNode("",!0)]),y.value?(t.openBlock(),t.createElementBlock("div",kU," Ya existe una lista con este nombre, utiliza otro para poder continuar. ")):t.createCommentVNode("",!0),k[8]||(k[8]=t.createElementVNode("div",{class:"modal-divider"},null,-1)),t.createElementVNode("div",EU,[t.createElementVNode("button",{class:"modal-cancel",onClick:T},"Cancelar"),t.createElementVNode("button",{class:t.normalizeClass(["modal-create",{"modal-create--disabled":!u.value}]),onClick:O,disabled:!u.value}," Crear lista ",10,CU)])])):t.createCommentVNode("",!0)]),_:1})]))}},[["__scopeId","data-v-a48ee35c"]]),VU={class:"player-card"},NU={class:"player-card__image"},BU={key:0,class:"checkbox-container"},FU=["checked"],TU=["src"],vU={class:"player-card__right-data"},AU={class:"player-card__age"},$U={class:"player-card__flag"},RU={class:"player-card__details"},OU={class:"player-card__name"},MU={class:"player-card__position"},PU={key:0,class:"button-row"},LU={class:"stat-header"},IU={class:"stat-left"},DU=["onClick"],zU={class:"stat-label"},jU={class:"stat-value"},UU={class:"stat-bar-container"},HU={key:1,class:"loading-overlay"},WU=yt({__name:"GscPlayerCard",props:{player:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},isScouting:{type:Boolean,default:!0},countryFlag:{type:String,default:""},jersey:{type:Number,default:0},player_id:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position:{type:String,default:"-"},photo:{type:String,default:""},is_female:{type:Number,default:0},isImgFullWidth:{type:Boolean,default:!1},stats:{type:Object,default:()=>({})},max:{type:Object,default:()=>({})},additionalData:{type:Object,default:()=>({})},deleteActive:{type:Boolean,default:!1},userId:{type:Number,default:0},categories:{type:Array,default:()=>[],required:!0},token:{type:String,default:""},statsPromise:{type:Promise,required:!0},isSelected:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]}},emits:["showTooltip","hideTooltip","openModal","playerAdded"],setup(e,{emit:o}){const a=e,r=o,i=t.ref(null),n=t.ref(!1),l=t.ref(!1),s=t.ref(null),d=[{id:1,nombre:"Laterales mundial sub 20"},{id:2,nombre:"Delanteros 2008"},{id:3,nombre:"Promesas Liga MX"}],c=t.ref(null),m=t.ref("center"),f=t.ref(!1);t.watch(l,v=>{v&&(f.value=!0)}),t.watch(()=>a.showTooltip,v=>{v&&t.nextTick(()=>{y()})},{immediate:!0}),t.onMounted(()=>{document.addEventListener("click",v=>{const w=v.target.closest(".add-to-list-tooltip"),A=v.target.closest(".add-button");!w&&!A&&a.showTooltip&&r("hideTooltip",a.player_id)})});function y(){const v=c.value;if(!v)return;const w=v.getBoundingClientRect(),A=window.innerWidth;w.right>A?m.value="left":m.value="center"}t.onMounted(async()=>{try{i.value=a.stats.map(v=>{var B,F;const w=v[0],A=v[2],k=((F=(B=a.max)==null?void 0:B.find(L=>L[0]===w||L[0]===parseInt(w)||L[0].toString()===w.toString()))==null?void 0:F[1])||0,E=k>0?A/k*100:0;return{name:v[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,L=>L.toUpperCase()),value:A,category:w,percentage:Math.min(E,100)}})}catch(v){console.error("Error cargando estadísticas:",v)}}),t.computed(()=>a.stats&&Object.keys(a.stats).length>0);const u=v=>{s.value=v,n.value=!0},h=()=>{n.value=!1,s.value=null};function p(){f.value=!0,r("showTooltip",a.player_id)}function g(){l.value||(f.value=!1,r("hideTooltip",a.player_id))}function S(){l.value=!0,f.value=!0}async function b(v){try{const w={dob:a.player.dob,is_female:0,jersey:0,name:a.player.name,nationality:a.player.nationality,nationality_id:a.player.nationality_id,player_id:a.player.player_id,position:a.player.position_id,team_id:a.player.team_id},A={user_id:parseInt(a.userId),id:v.id,players:[w]};await we.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${v.id}/players`,A),d.push(v),l.value=!1,P()}catch(w){console.error("Error al agregar jugador a la lista:",w)}}function N(v){}function P(){r("playerAdded")}const O=v=>{if(!v)return 0;const w=new Date(v),A=new Date;let k=A.getFullYear()-w.getFullYear();const E=A.getMonth()-w.getMonth();return(E<0||E===0&&A.getDate()<w.getDate())&&k--,k},T=t.computed(()=>{if(!a.name)return"-";const v=a.name.split(",");if(v.length!==2)return a.name;const w=v[0].trim().split(" "),A=v[1].trim(),k=w[0];return`${A} ${k}`});return(v,w)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",VU,[t.createElementVNode("div",NU,[e.deleteActive?(t.openBlock(),t.createElementBlock("div",BU,[t.createElementVNode("input",{type:"checkbox",class:"player-checkbox",checked:e.isSelected,onChange:w[0]||(w[0]=A=>v.$emit("toggleSelection")),onClick:w[1]||(w[1]=t.withModifiers(()=>{},["stop"]))},null,40,FU)])):t.createCommentVNode("",!0),t.createElementVNode("img",{class:t.normalizeClass(["player-card__photo",{"full-width":e.isImgFullWidth}]),src:e.photo,alt:"Player Image"},null,10,TU),t.createElementVNode("div",vU,[t.createElementVNode("div",AU,t.toDisplayString(O(e.player.dob))+" años",1),t.createElementVNode("div",$U,[t.createElementVNode("div",{class:"player-card__flag-container",style:t.normalizeStyle({"background-image":`url(${a.countryFlag})`})},null,4)])])]),t.createElementVNode("div",RU,[t.createElementVNode("p",OU,t.toDisplayString(T.value),1),t.createElementVNode("p",MU,t.toDisplayString(e.position),1)]),t.createElementVNode("div",{class:t.normalizeClass(["player-card__actions",{"hide-buttons":e.deleteActive}])},[!e.deleteActive&&!e.isScouting?(t.openBlock(),t.createElementBlock("div",PU,[t.createElementVNode("button",{class:"action-button add-button",onClick:t.withModifiers(p,["stop"])},w[5]||(w[5]=[t.createStaticVNode(' Agregar a Lista <span class="button-icon" data-v-be195ff0><svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-be195ff0><path d="M12.8345 16.4999V14.8333C12.8345 13.9492 12.4833 13.1014 11.8582 12.4763C11.2331 11.8512 10.3852 11.5 9.5012 11.5H4.50126C3.61722 11.5 2.76938 11.8512 2.14427 12.4763C1.51915 13.1014 1.16797 13.9492 1.16797 14.8333V16.4999" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path><path d="M7.00126 8.16658C8.84219 8.16658 10.3346 6.67422 10.3346 4.83329C10.3346 2.99237 8.84219 1.5 7.00126 1.5C5.16033 1.5 3.66797 2.99237 3.66797 4.83329C3.66797 6.67422 5.16033 8.16658 7.00126 8.16658Z" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path><path d="M15.332 5.66602V10.666M17.832 8.16598H12.832" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-be195ff0></path></svg></span>',2)])),f.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref:c.value,class:t.normalizeClass(["tooltip-container",m.value]),style:{position:"absolute",left:"0",right:"0","z-index":"2000","margin-top":"40px"}},[t.createVNode(lU,{lists:e.lists,isModalOpen:l.value,token:e.token,"user-id":e.userId,"selected-player":e.player,onSelectList:N,onCreateNewList:S,onClose:g,onPlayerAdded:P},null,8,["lists","isModalOpen","token","user-id","selected-player"])],2)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.deleteActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:1,class:"action-button profile-button",onClick:w[2]||(w[2]=t.withModifiers(A=>v.$emit("showProfile",{player_id:a.player_id,season_id:e.player.season_id,team_id:e.player.team_id,name:a.name,position:a.position,age:a.age,nationality:a.nationality,photo:a.photo,stats:a.stats}),["stop"]))}," Ver perfil "))],2),t.createElementVNode("div",{class:t.normalizeClass(["player-card__stats",{"disabled-stats":e.deleteActive}])},[e.loading?(t.openBlock(),t.createElementBlock("div",HU,w[7]||(w[7]=[t.createElementVNode("div",{class:"loading-animation"},null,-1)]))):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.value,(A,k)=>(t.openBlock(),t.createElementBlock("div",{class:"stat-row",key:k},[t.createElementVNode("div",LU,[t.createElementVNode("div",IU,[A.parametros&&A.parametros!="no"?(t.openBlock(),t.createElementBlock("button",{key:0,class:"stat-info-button",onClick:E=>u(A.parametros)},w[6]||(w[6]=[t.createElementVNode("svg",{width:"8",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.17355 0.761719C6.44909 0.761719 5.77355 1.23716 5.56275 1.90573L0.887836 1.90458C0.572235 1.90458 0.316406 2.16058 0.316406 2.47601C0.316406 2.79144 0.572235 3.04744 0.887836 3.04744L5.56275 3.04688C5.8188 3.74688 6.44909 4.1903 7.17355 4.1903C7.89801 4.1903 8.53475 3.74574 8.79527 3.04231L10.0307 3.04744C10.3463 3.04744 10.6021 2.79144 10.6021 2.47601C10.6021 2.16058 10.3463 1.90458 10.0307 1.90458H8.79041C8.51527 1.20801 7.89801 0.761719 7.17355 0.761719ZM7.17355 1.90458C7.48915 1.90458 7.74498 2.16058 7.74498 2.47601C7.74498 2.79144 7.48915 3.04744 7.17355 3.04744C6.85795 3.04744 6.60212 2.79144 6.60212 2.47601C6.60212 2.16058 6.85795 1.90458 7.17355 1.90458ZM3.74498 5.04744C2.99184 5.04744 2.36144 5.51602 2.13127 6.19142C2.05092 6.19657 0.887836 6.19028 0.887836 6.19028C0.572235 6.19028 0.316406 6.44628 0.316406 6.76171C0.316406 7.07714 0.572235 7.33314 0.887836 7.33314C0.887836 7.33314 2.06064 7.32114 2.13372 7.32857C2.3639 8.004 2.99184 8.476 3.74498 8.476C4.46943 8.476 5.09023 8.032 5.36177 7.33485L10.0307 7.33314C10.3463 7.33314 10.6021 7.07714 10.6021 6.76171C10.6021 6.44628 10.3463 6.19028 10.0307 6.19028L5.3588 6.18519C5.10835 5.50346 4.46943 5.04744 3.74498 5.04744ZM3.74498 6.19028C4.06058 6.19028 4.31641 6.44628 4.31641 6.76171C4.31641 7.07714 4.06058 7.33314 3.74498 7.33314C3.42938 7.33314 3.17355 7.07714 3.17355 6.76171C3.17355 6.44628 3.42938 6.19028 3.74498 6.19028ZM7.17355 9.33314C6.44909 9.33314 5.7864 9.81029 5.56235 10.4703L0.887836 10.476C0.572235 10.476 0.316406 10.732 0.316406 11.0474C0.316406 11.3629 0.572235 11.6189 0.887836 11.6189L5.55389 11.6194C5.79098 12.2966 6.44909 12.7617 7.17355 12.7617C7.89801 12.7617 8.52264 12.3086 8.79784 11.6194L10.0307 11.6189C10.3463 11.6189 10.6021 11.3629 10.6021 11.0474C10.6021 10.732 10.3463 10.476 10.0307 10.476L8.79264 10.4726C8.54595 9.79663 7.89801 9.33314 7.17355 9.33314ZM7.17355 10.476C7.48915 10.476 7.74498 10.732 7.74498 11.0474C7.74498 11.3629 7.48915 11.6189 7.17355 11.6189C6.85795 11.6189 6.60212 11.3629 6.60212 11.0474C6.60212 10.732 6.85795 10.476 7.17355 10.476Z",fill:"white"})],-1)]),8,DU)):t.createCommentVNode("",!0),t.createElementVNode("span",zU,t.toDisplayString(A.name),1)]),t.createElementVNode("span",jU,t.toDisplayString(A.value),1)]),t.createElementVNode("div",UU,[t.createElementVNode("div",{style:t.normalizeStyle({width:`${A.percentage}%`}),class:"stat-bar"},null,4)])]))),128))],2)]),t.createVNode(t.unref(l1),{isVisible:n.value,"onUpdate:isVisible":w[3]||(w[3]=A=>n.value=A),onClose:h,parameters:s.value},null,8,["isVisible","parameters"]),l.value?(t.openBlock(),t.createBlock(xU,{key:0,token:e.token,lists:e.lists,"user-id":e.userId,"selected-player":e.player,onListCreated:P,onClose:w[4]||(w[4]=A=>l.value=!1),onCreateList:b},null,8,["token","lists","user-id","selected-player"])):t.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-be195ff0"]]),qU={class:"grid-view"},GU={key:0,class:"loading-container"},YU={key:1,class:"cards-container"},ZU=yt({__name:"GridView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},isScouting:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},max:{type:Object,default:()=>{}},lists:{type:Array,default:()=>[]},token:{type:String,default:""}},emits:["playerAdded","showProfile"],setup(e,{emit:o}){const a=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"],[10,"Desconocida"]]),r=new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),i=o,n=t.reactive({}),l=t.ref(!1),s=t.ref(null);function d(p,g=!1){return(g?r:a).get(p)||"Desconocida"}function c(p){Object.keys(n).forEach(g=>{n[g]=!1}),n[p]=!0}function m(p){n[p]&&(n[p]=!1)}function f(p){Object.keys(n).forEach(g=>{n[g]=!1}),s.value=p,l.value=!0}function y(p){const g=p.target.closest(".add-to-list-tooltip"),S=p.target.closest(".add-button"),b=p.target.closest(".modal-overlay")||p.target.closest(".modal-content");!g&&!S&&!b&&Object.keys(n).forEach(N=>{n[N]=!1})}function u(){i("playerAdded")}function h(p){i("showProfile",p)}return t.onMounted(()=>{document.addEventListener("mousedown",y)}),t.onUnmounted(()=>{document.removeEventListener("mousedown",y)}),(p,g)=>(t.openBlock(),t.createElementBlock("div",qU,[e.playersScouting?(t.openBlock(),t.createElementBlock("div",YU,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.playersScouting,S=>(t.openBlock(),t.createBlock(WU,{key:S.player_id,loading:!1,statsPromise:!1,player_id:S.player_id,name:S.name,player:S,"is-scouting":e.isScouting,position:d(S.position_id,S.is_female),age:S.age,nationality:S.nationality,photo:S.photo,"type-productivity":e.typeProductivity,countryFlag:S.countryFlag,stats:e.typeProductivity==1?S.internal_stats:S.stats,max:e.typeProductivity==1?e.max.internal_max:e.max.max,"user-id":e.userId,lists:e.lists,token:e.token,onShowProfile:h,onShowTooltip:c,onHideTooltip:m,onOpenModal:f,onPlayerAdded:u},null,8,["player_id","name","player","is-scouting","position","age","nationality","photo","type-productivity","countryFlag","stats","max","user-id","lists","token"]))),128))])):(t.openBlock(),t.createElementBlock("div",GU,g[2]||(g[2]=[t.createElementVNode("div",{class:"loading-spinner"},null,-1),t.createElementVNode("span",null,"Cargando jugadores...",-1)]))),l.value?(t.openBlock(),t.createBlock(t.unref(l1),{key:2,isVisible:l.value,"onUpdate:isVisible":g[0]||(g[0]=S=>l.value=S),parameters:s.value,onClose:g[1]||(g[1]=S=>l.value=!1)},null,8,["isVisible","parameters"])):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a80d86e5"]]),JU=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},KU={key:1},XU={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QU=["fill"],eH={key:0,class:"checkbox__teams"},tH={class:"checkbox__teams__logo"},oH=["src"],aH={class:"checkbox__teams__logo"},rH=["src"],nH={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(e){return["left","right","top","bottom"].includes(e)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:o}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const r=t.ref(!1),i=t.computed(()=>{const c={color:a.boxValueColor,"font-family":a.fontFamily,height:a.boxWidthAndHeight,width:a.boxWidthAndHeight,minWidth:a.boxWidthAndHeight,"border-radius":a.boxBorderRadius,"margin-top":a.boxMarginTop};return r.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),n=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),l=t.computed(()=>{const c={color:a.labelColor,"font-family":a.fontFamily,"font-size":a.labelFontSize,"white-space":a.labelWhiteSpace,"text-align":a.boxPosition==="top"||a.boxPosition==="bottom"?"center":a.boxPosition};return(a.boxPosition==="left"||a.boxPosition==="right")&&(c[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),c});t.watch(()=>a.modelValue,c=>{c!==r.value&&(r.value=c)},{immediate:!0});function s(){a.avoidInteraction||!r.value&&a.avoidToCheck||(r.value=!r.value,o("update:modelValue",r.value))}function d(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:s},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle(i.value)},[r.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.boxValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"checkbox__box__value",style:t.normalizeStyle(n.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",KU,[(t.openBlock(),t.createElementBlock("svg",XU,[t.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:e.boxValueColor},null,8,QU)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",eH,[t.createElementVNode("div",tH,[t.createElementVNode("img",{src:d(e.teamsIds[0]),alt:""},null,8,oH)]),t.createElementVNode("div",aH,[t.createElementVNode("img",{src:d(e.teamsIds[1]),alt:""},null,8,rH)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(l.value)},t.toDisplayString(e.label),5)],2))}},iH=JU(nH,[["__scopeId","data-v-b6f124d8"]]),lH=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},Ol={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},s1=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},c1=Ol.setup;Ol.setup=c1?(e,o)=>(s1(),c1(e,o)):s1;const sH=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),cH=["src"],dH={key:1,class:"text"},uH=["src"],pH={class:"stats"},mH=sH(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),fH={class:"numstats"},hH={class:"leyend"};function yH(e,o,a,r,i,n){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([n.customStyle,i.status&&a.typeOnOff&&n.customActive]),onClick:o[0]||(o[0]=(...l)=>n.btnClick&&n.btnClick(...l))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,cH)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",dH,t.toDisplayString(a.textValue),1)):t.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,uH)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...l)=>n.btnClick&&n.btnClick(...l))},[t.createElementVNode("div",pH,[mH,t.createElementVNode("div",fH,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",hH,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const gH=lH(Ol,[["render",yH],["__scopeId","data-v-f3ee6b2b"]]),d1=(e,o)=>{const a=e.__vccOpts||e;for(const[r,i]of o)a[r]=i;return a},Ml=e=>(t.pushScopeId("data-v-764bd788"),e=e(),t.popScopeId(),e),bH={key:0,class:"overlay"},SH=["onClick"],_H=Ml(()=>t.createElementVNode("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.50558 0C6.78112 0 6.10558 0.475441 5.89478 1.14401L1.21987 1.14286C0.904267 1.14286 0.648438 1.39886 0.648438 1.71429C0.648438 2.02972 0.904267 2.28572 1.21987 2.28572L5.89478 2.28516C6.15083 2.98516 6.78112 3.42858 7.50558 3.42858C8.23004 3.42858 8.86678 2.98402 9.1273 2.28059L10.3627 2.28572C10.6783 2.28572 10.9342 2.02972 10.9342 1.71429C10.9342 1.39886 10.6783 1.14286 10.3627 1.14286H9.12244C8.8473 0.446287 8.23004 0 7.50558 0ZM7.50558 1.14286C7.82118 1.14286 8.07701 1.39886 8.07701 1.71429C8.07701 2.02972 7.82118 2.28572 7.50558 2.28572C7.18998 2.28572 6.93415 2.02972 6.93415 1.71429C6.93415 1.39886 7.18998 1.14286 7.50558 1.14286ZM4.07701 4.28572C3.32387 4.28572 2.69347 4.7543 2.4633 5.42971C2.38295 5.43485 1.21987 5.42856 1.21987 5.42856C0.904267 5.42856 0.648438 5.68456 0.648438 5.99999C0.648438 6.31542 0.904267 6.57142 1.21987 6.57142C1.21987 6.57142 2.39267 6.55942 2.46575 6.56685C2.69593 7.24228 3.32387 7.71428 4.07701 7.71428C4.80146 7.71428 5.42226 7.27028 5.69381 6.57314L10.3627 6.57142C10.6783 6.57142 10.9342 6.31542 10.9342 5.99999C10.9342 5.68456 10.6783 5.42856 10.3627 5.42856L5.69083 5.42348C5.44038 4.74174 4.80146 4.28572 4.07701 4.28572ZM4.07701 5.42856C4.39261 5.42856 4.64844 5.68456 4.64844 5.99999C4.64844 6.31542 4.39261 6.57142 4.07701 6.57142C3.76141 6.57142 3.50558 6.31542 3.50558 5.99999C3.50558 5.68456 3.76141 5.42856 4.07701 5.42856ZM7.50558 8.57142C6.78112 8.57142 6.11844 9.04857 5.89438 9.70857L1.21987 9.71428C0.904267 9.71428 0.648438 9.97028 0.648438 10.2857C0.648438 10.6011 0.904267 10.8571 1.21987 10.8571L5.88592 10.8577C6.12301 11.5349 6.78112 12 7.50558 12C8.23004 12 8.85467 11.5469 9.12987 10.8577L10.3627 10.8571C10.6783 10.8571 10.9342 10.6011 10.9342 10.2857C10.9342 9.97028 10.6783 9.71428 10.3627 9.71428L9.12467 9.71091C8.87798 9.03491 8.23004 8.57142 7.50558 8.57142ZM7.50558 9.71428C7.82118 9.71428 8.07701 9.97028 8.07701 10.2857C8.07701 10.6011 7.82118 10.8571 7.50558 10.8571C7.18998 10.8571 6.93415 10.6011 6.93415 10.2857C6.93415 9.97028 7.18998 9.71428 7.50558 9.71428Z",fill:"white"})],-1)),wH=[_H],kH=["onClick"],EH=Ml(()=>t.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),CH=[EH],xH=Ml(()=>t.createElementVNode("div",{class:"column-title-2"},null,-1)),VH=["onClick"],NH={__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},isMobile:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(e,{expose:o,emit:a}){const r=e,i=t.ref(null),n=t.ref(null),l=t.ref(0);t.ref(!1);const s=t.computed(()=>{const h=r.availablePlayers[0];return h?h.stats:[]}),d=t.computed(()=>{const h=`repeat(${s.value.length}, max-content) 36px`;let p="";return l.value>0&&document.querySelectorAll(".column-title-2").forEach(g=>{p+=`${g.offsetWidth}px `}),{"--grid-template-columns":h,"--grid-template-columns-totals":p||h}});function c(){i.value=new ResizeObserver(h=>{for(const p of h){const{width:g}=p.contentRect;l.value=g}}),i.value.observe(n.value)}function m(h,p){const g=document.querySelectorAll(".scrollable-row-totals")[h+1];g&&(g.style.marginTop=`${p}px`)}function f({player:h,stat:p}){!p.total||p==="0%"||!p.seasons||!p.seasons.length||a("open-media",{...h,stat:p})}function y(h){!h||h==="no"||a("click-parameters",h)}function u(h){a("sort",h)}return t.onMounted(()=>{c()}),o({setMarginTopDetails:m}),(h,p)=>(t.openBlock(),t.createElementBlock("div",{class:"scroll-columns",style:t.normalizeStyle(d.value)},[e.isEditMode?(t.openBlock(),t.createElementBlock("div",bH)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"titlesRow",ref:n,class:"scrollable-row-2"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(g,S)=>(t.openBlock(),t.createElementBlock("div",{key:`t-${S}`,class:"column-title-2"},[g.parameters&&g.parameters!=="no"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:b=>y(g.parameters)},wH,8,SH)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"name",style:t.normalizeStyle(e.isMobile?"font-size: 10px;":"")},t.toDisplayString(g.name),5),(t.openBlock(),t.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:b=>u(g)},CH,8,kH))]))),128)),xH],512),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.availablePlayers,(g,S)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${g.id}`,class:"row scrollable-row-totals"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.stats,b=>(t.openBlock(),t.createElementBlock("div",{key:b.category_id,class:t.normalizeClass(["row data-info",{odd:S%2!==0,underline:!!b.total&&b.total!=="0%"&&b.seasons&&b.seasons.length}])},[t.createElementVNode("span",{onClick:N=>f({player:g,stat:b})},t.toDisplayString(b.total),9,VH)],2))),128))]))),128))],4))}},BH=d1(NH,[["__scopeId","data-v-764bd788"]]);function u1(e,o){return function(){return e.apply(o,arguments)}}const{toString:FH}=Object.prototype,{getPrototypeOf:Pl}=Object,{iterator:ln,toStringTag:p1}=Symbol,sn=(e=>o=>{const a=FH.call(o);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),ut=e=>(e=e.toLowerCase(),o=>sn(o)===e),cn=e=>o=>typeof o===e,{isArray:Wo}=Array,Ba=cn("undefined");function TH(e){return e!==null&&!Ba(e)&&e.constructor!==null&&!Ba(e.constructor)&&Xe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m1=ut("ArrayBuffer");function vH(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&m1(e.buffer),o}const AH=cn("string"),Xe=cn("function"),f1=cn("number"),dn=e=>e!==null&&typeof e=="object",$H=e=>e===!0||e===!1,un=e=>{if(sn(e)!=="object")return!1;const o=Pl(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(p1 in e)&&!(ln in e)},RH=ut("Date"),OH=ut("File"),MH=ut("Blob"),PH=ut("FileList"),LH=e=>dn(e)&&Xe(e.pipe),IH=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Xe(e.append)&&((o=sn(e))==="formdata"||o==="object"&&Xe(e.toString)&&e.toString()==="[object FormData]"))},DH=ut("URLSearchParams"),[zH,jH,UH,HH]=["ReadableStream","Request","Response","Headers"].map(ut),WH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fa(e,o,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Wo(e))for(r=0,i=e.length;r<i;r++)o.call(null,e[r],r,e);else{const n=a?Object.getOwnPropertyNames(e):Object.keys(e),l=n.length;let s;for(r=0;r<l;r++)s=n[r],o.call(null,e[s],s,e)}}function h1(e,o){o=o.toLowerCase();const a=Object.keys(e);let r=a.length,i;for(;r-- >0;)if(i=a[r],o===i.toLowerCase())return i;return null}const go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,y1=e=>!Ba(e)&&e!==go;function Ll(){const{caseless:e}=y1(this)&&this||{},o={},a=(r,i)=>{const n=e&&h1(o,i)||i;un(o[n])&&un(r)?o[n]=Ll(o[n],r):un(r)?o[n]=Ll({},r):Wo(r)?o[n]=r.slice():o[n]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fa(arguments[r],a);return o}const qH=(e,o,a,{allOwnKeys:r}={})=>(Fa(o,(i,n)=>{a&&Xe(i)?e[n]=u1(i,a):e[n]=i},{allOwnKeys:r}),e),GH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),YH=(e,o,a,r)=>{e.prototype=Object.create(o.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),a&&Object.assign(e.prototype,a)},ZH=(e,o,a,r)=>{let i,n,l;const s={};if(o=o||{},e==null)return o;do{for(i=Object.getOwnPropertyNames(e),n=i.length;n-- >0;)l=i[n],(!r||r(l,e,o))&&!s[l]&&(o[l]=e[l],s[l]=!0);e=a!==!1&&Pl(e)}while(e&&(!a||a(e,o))&&e!==Object.prototype);return o},JH=(e,o,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=o.length;const r=e.indexOf(o,a);return r!==-1&&r===a},KH=e=>{if(!e)return null;if(Wo(e))return e;let o=e.length;if(!f1(o))return null;const a=new Array(o);for(;o-- >0;)a[o]=e[o];return a},XH=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&Pl(Uint8Array)),QH=(e,o)=>{const a=(e&&e[ln]).call(e);let r;for(;(r=a.next())&&!r.done;){const i=r.value;o.call(e,i[0],i[1])}},eW=(e,o)=>{let a;const r=[];for(;(a=e.exec(o))!==null;)r.push(a);return r},tW=ut("HTMLFormElement"),oW=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,r){return a.toUpperCase()+r}),g1=(({hasOwnProperty:e})=>(o,a)=>e.call(o,a))(Object.prototype),aW=ut("RegExp"),b1=(e,o)=>{const a=Object.getOwnPropertyDescriptors(e),r={};Fa(a,(i,n)=>{let l;(l=o(i,n,e))!==!1&&(r[n]=l||i)}),Object.defineProperties(e,r)},rW=e=>{b1(e,(o,a)=>{if(Xe(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const r=e[a];if(Xe(r)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},nW=(e,o)=>{const a={},r=i=>{i.forEach(n=>{a[n]=!0})};return Wo(e)?r(e):r(String(e).split(o)),a},iW=()=>{},lW=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function sW(e){return!!(e&&Xe(e.append)&&e[p1]==="FormData"&&e[ln])}const cW=e=>{const o=new Array(10),a=(r,i)=>{if(dn(r)){if(o.indexOf(r)>=0)return;if(!("toJSON"in r)){o[i]=r;const n=Wo(r)?[]:{};return Fa(r,(l,s)=>{const d=a(l,i+1);!Ba(d)&&(n[s]=d)}),o[i]=void 0,n}}return r};return a(e,0)},dW=ut("AsyncFunction"),uW=e=>e&&(dn(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),S1=((e,o)=>e?setImmediate:o?((a,r)=>(go.addEventListener("message",({source:i,data:n})=>{i===go&&n===a&&r.length&&r.shift()()},!1),i=>{r.push(i),go.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",Xe(go.postMessage)),pW=typeof queueMicrotask<"u"?queueMicrotask.bind(go):typeof process<"u"&&process.nextTick||S1,mW=e=>e!=null&&Xe(e[ln]),H={isArray:Wo,isArrayBuffer:m1,isBuffer:TH,isFormData:IH,isArrayBufferView:vH,isString:AH,isNumber:f1,isBoolean:$H,isObject:dn,isPlainObject:un,isReadableStream:zH,isRequest:jH,isResponse:UH,isHeaders:HH,isUndefined:Ba,isDate:RH,isFile:OH,isBlob:MH,isRegExp:aW,isFunction:Xe,isStream:LH,isURLSearchParams:DH,isTypedArray:XH,isFileList:PH,forEach:Fa,merge:Ll,extend:qH,trim:WH,stripBOM:GH,inherits:YH,toFlatObject:ZH,kindOf:sn,kindOfTest:ut,endsWith:JH,toArray:KH,forEachEntry:QH,matchAll:eW,isHTMLForm:tW,hasOwnProperty:g1,hasOwnProp:g1,reduceDescriptors:b1,freezeMethods:rW,toObjectSet:nW,toCamelCase:oW,noop:iW,toFiniteNumber:lW,findKey:h1,global:go,isContextDefined:y1,isSpecCompliantForm:sW,toJSONObject:cW,isAsyncFn:dW,isThenable:uW,setImmediate:S1,asap:pW,isIterable:mW};function me(e,o,a,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),a&&(this.config=a),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const _1=me.prototype,w1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{w1[e]={value:e}}),Object.defineProperties(me,w1),Object.defineProperty(_1,"isAxiosError",{value:!0}),me.from=(e,o,a,r,i,n)=>{const l=Object.create(_1);return H.toFlatObject(e,l,function(s){return s!==Error.prototype},s=>s!=="isAxiosError"),me.call(l,e.message,o,a,r,i),l.cause=e,l.name=e.name,n&&Object.assign(l,n),l};const fW=null;function Il(e){return H.isPlainObject(e)||H.isArray(e)}function k1(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function E1(e,o,a){return e?e.concat(o).map(function(r,i){return r=k1(r),!a&&i?"["+r+"]":r}).join(a?".":""):o}function hW(e){return H.isArray(e)&&!e.some(Il)}const yW=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});function pn(e,o,a){if(!H.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,a=H.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,h){return!H.isUndefined(h[u])});const r=a.metaTokens,i=a.visitor||c,n=a.dots,l=a.indexes,s=(a.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(o);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(H.isDate(u))return u.toISOString();if(!s&&H.isBlob(u))throw new me("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(u)||H.isTypedArray(u)?s&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function c(u,h,p){let g=u;if(u&&!p&&typeof u=="object"){if(H.endsWith(h,"{}"))h=r?h:h.slice(0,-2),u=JSON.stringify(u);else if(H.isArray(u)&&hW(u)||(H.isFileList(u)||H.endsWith(h,"[]"))&&(g=H.toArray(u)))return h=k1(h),g.forEach(function(S,b){!(H.isUndefined(S)||S===null)&&o.append(l===!0?E1([h],b,n):l===null?h:h+"[]",d(S))}),!1}return Il(u)?!0:(o.append(E1(p,h,n),d(u)),!1)}const m=[],f=Object.assign(yW,{defaultVisitor:c,convertValue:d,isVisitable:Il});function y(u,h){if(!H.isUndefined(u)){if(m.indexOf(u)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(u),H.forEach(u,function(p,g){(!(H.isUndefined(p)||p===null)&&i.call(o,p,H.isString(g)?g.trim():g,h,f))===!0&&y(p,h?h.concat(g):[g])}),m.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return y(e),o}function C1(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function Dl(e,o){this._pairs=[],e&&pn(e,this,o)}const x1=Dl.prototype;x1.append=function(e,o){this._pairs.push([e,o])},x1.toString=function(e){const o=e?function(a){return e.call(this,a,C1)}:C1;return this._pairs.map(function(a){return o(a[0])+"="+o(a[1])},"").join("&")};function gW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function V1(e,o,a){if(!o)return e;const r=a&&a.encode||gW;H.isFunction(a)&&(a={serialize:a});const i=a&&a.serialize;let n;if(i?n=i(o,a):n=H.isURLSearchParams(o)?o.toString():new Dl(o,a).toString(r),n){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}let N1=class{constructor(){this.handlers=[]}use(e,o,a){return this.handlers.push({fulfilled:e,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(o){o!==null&&e(o)})}};const B1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bW=typeof URLSearchParams<"u"?URLSearchParams:Dl,SW=typeof FormData<"u"?FormData:null,_W=typeof Blob<"u"?Blob:null,wW={isBrowser:!0,classes:{URLSearchParams:bW,FormData:SW,Blob:_W},protocols:["http","https","file","blob","url","data"]},zl=typeof window<"u"&&typeof document<"u",jl=typeof navigator=="object"&&navigator||void 0,kW=zl&&(!jl||["ReactNative","NativeScript","NS"].indexOf(jl.product)<0),EW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CW=zl&&window.location.href||"http://localhost",xW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zl,hasStandardBrowserEnv:kW,hasStandardBrowserWebWorkerEnv:EW,navigator:jl,origin:CW},Symbol.toStringTag,{value:"Module"})),De={...xW,...wW};function VW(e,o){return pn(e,new De.classes.URLSearchParams,Object.assign({visitor:function(a,r,i,n){return De.isNode&&H.isBuffer(a)?(this.append(r,a.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},o))}function NW(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function BW(e){const o={},a=Object.keys(e);let r;const i=a.length;let n;for(r=0;r<i;r++)n=a[r],o[n]=e[n];return o}function F1(e){function o(a,r,i,n){let l=a[n++];if(l==="__proto__")return!0;const s=Number.isFinite(+l),d=n>=a.length;return l=!l&&H.isArray(i)?i.length:l,d?(H.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!H.isObject(i[l]))&&(i[l]=[]),o(a,r,i[l],n)&&H.isArray(i[l])&&(i[l]=BW(i[l])),!s)}if(H.isFormData(e)&&H.isFunction(e.entries)){const a={};return H.forEachEntry(e,(r,i)=>{o(NW(r),i,a,0)}),a}return null}function FW(e,o,a){if(H.isString(e))try{return(o||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(e)}const Ta={transitional:B1,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const a=o.getContentType()||"",r=a.indexOf("application/json")>-1,i=H.isObject(e);if(i&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return r?JSON.stringify(F1(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return VW(e,this.formSerializer).toString();if((n=H.isFileList(e))||a.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return pn(n?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||r?(o.setContentType("application/json",!1),FW(e)):e}],transformResponse:[function(e){const o=this.transitional||Ta.transitional,a=o&&o.forcedJSONParsing,r=this.responseType==="json";if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(a&&!this.responseType||r)){const i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(n){if(i)throw n.name==="SyntaxError"?me.from(n,me.ERR_BAD_RESPONSE,this,null,this.response):n}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{Ta.headers[e]={}});const TW=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vW=e=>{const o={};let a,r,i;return e&&e.split(`
|
|
31
31
|
`).forEach(function(n){i=n.indexOf(":"),a=n.substring(0,i).trim().toLowerCase(),r=n.substring(i+1).trim(),!(!a||o[a]&&TW[a])&&(a==="set-cookie"?o[a]?o[a].push(r):o[a]=[r]:o[a]=o[a]?o[a]+", "+r:r)}),o},T1=Symbol("internals");function va(e){return e&&String(e).trim().toLowerCase()}function mn(e){return e===!1||e==null?e:H.isArray(e)?e.map(mn):String(e)}function AW(e){const o=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=a.exec(e);)o[r[1]]=r[2];return o}const $W=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ul(e,o,a,r,i){if(H.isFunction(r))return r.call(this,o,a);if(i&&(o=a),!!H.isString(o)){if(H.isString(r))return o.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(o)}}function RW(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,a,r)=>a.toUpperCase()+r)}function OW(e,o){const a=H.toCamelCase(" "+o);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+a,{value:function(i,n,l){return this[r].call(this,o,i,n,l)},configurable:!0})})}let Qe=class{constructor(e){e&&this.set(e)}set(e,o,a){const r=this;function i(l,s,d){const c=va(s);if(!c)throw new Error("header name must be a non-empty string");const m=H.findKey(r,c);(!m||r[m]===void 0||d===!0||d===void 0&&r[m]!==!1)&&(r[m||s]=mn(l))}const n=(l,s)=>H.forEach(l,(d,c)=>i(d,c,s));if(H.isPlainObject(e)||e instanceof this.constructor)n(e,o);else if(H.isString(e)&&(e=e.trim())&&!$W(e))n(vW(e),o);else if(H.isObject(e)&&H.isIterable(e)){let l={},s,d;for(const c of e){if(!H.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[d=c[0]]=(s=l[d])?H.isArray(s)?[...s,c[1]]:[s,c[1]]:c[1]}n(l,o)}else e!=null&&i(o,e,a);return this}get(e,o){if(e=va(e),e){const a=H.findKey(this,e);if(a){const r=this[a];if(!o)return r;if(o===!0)return AW(r);if(H.isFunction(o))return o.call(this,r,a);if(H.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=va(e),e){const a=H.findKey(this,e);return!!(a&&this[a]!==void 0&&(!o||Ul(this,this[a],a,o)))}return!1}delete(e,o){const a=this;let r=!1;function i(n){if(n=va(n),n){const l=H.findKey(a,n);l&&(!o||Ul(a,a[l],l,o))&&(delete a[l],r=!0)}}return H.isArray(e)?e.forEach(i):i(e),r}clear(e){const o=Object.keys(this);let a=o.length,r=!1;for(;a--;){const i=o[a];(!e||Ul(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const o=this,a={};return H.forEach(this,(r,i)=>{const n=H.findKey(a,i);if(n){o[n]=mn(r),delete o[i];return}const l=e?RW(i):String(i).trim();l!==i&&delete o[i],o[l]=mn(r),a[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const o=Object.create(null);return H.forEach(this,(a,r)=>{a!=null&&a!==!1&&(o[r]=e&&H.isArray(a)?a.join(", "):a)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
|
|
32
32
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){const a=new this(e);return o.forEach(r=>a.set(r)),a}static accessor(e){const o=(this[T1]=this[T1]={accessors:{}}).accessors,a=this.prototype;function r(i){const n=va(i);o[n]||(OW(a,i),o[n]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}};Qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Qe.prototype,({value:e},o)=>{let a=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(r){this[a]=r}}}),H.freezeMethods(Qe);function Hl(e,o){const a=this||Ta,r=o||a,i=Qe.from(r.headers);let n=r.data;return H.forEach(e,function(l){n=l.call(a,n,i.normalize(),o?o.status:void 0)}),i.normalize(),n}function v1(e){return!!(e&&e.__CANCEL__)}function qo(e,o,a){me.call(this,e??"canceled",me.ERR_CANCELED,o,a),this.name="CanceledError"}H.inherits(qo,me,{__CANCEL__:!0});function A1(e,o,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?e(a):o(new me("Request failed with status code "+a.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function MW(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function PW(e,o){e=e||10;const a=new Array(e),r=new Array(e);let i=0,n=0,l;return o=o!==void 0?o:1e3,function(s){const d=Date.now(),c=r[n];l||(l=d),a[i]=s,r[i]=d;let m=n,f=0;for(;m!==i;)f+=a[m++],m=m%e;if(i=(i+1)%e,i===n&&(n=(n+1)%e),d-l<o)return;const y=c&&d-c;return y?Math.round(f*1e3/y):void 0}}function LW(e,o){let a=0,r=1e3/o,i,n;const l=(s,d=Date.now())=>{a=d,i=null,n&&(clearTimeout(n),n=null),e.apply(null,s)};return[(...s)=>{const d=Date.now(),c=d-a;c>=r?l(s,d):(i=s,n||(n=setTimeout(()=>{n=null,l(i)},r-c)))},()=>i&&l(i)]}const fn=(e,o,a=3)=>{let r=0;const i=PW(50,250);return LW(n=>{const l=n.loaded,s=n.lengthComputable?n.total:void 0,d=l-r,c=i(d),m=l<=s;r=l;const f={loaded:l,total:s,progress:s?l/s:void 0,bytes:d,rate:c||void 0,estimated:c&&s&&m?(s-l)/c:void 0,event:n,lengthComputable:s!=null,[o?"download":"upload"]:!0};e(f)},a)},$1=(e,o)=>{const a=e!=null;return[r=>o[0]({lengthComputable:a,total:e,loaded:r}),o[1]]},R1=e=>(...o)=>H.asap(()=>e(...o)),IW=De.hasStandardBrowserEnv?((e,o)=>a=>(a=new URL(a,De.origin),e.protocol===a.protocol&&e.host===a.host&&(o||e.port===a.port)))(new URL(De.origin),De.navigator&&/(msie|trident)/i.test(De.navigator.userAgent)):()=>!0,DW=De.hasStandardBrowserEnv?{write(e,o,a,r,i,n){const l=[e+"="+encodeURIComponent(o)];H.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),H.isString(r)&&l.push("path="+r),H.isString(i)&&l.push("domain="+i),n===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const o=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zW(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jW(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function O1(e,o,a){let r=!zW(o);return e&&(r||a==!1)?jW(e,o):o}const M1=e=>e instanceof Qe?{...e}:e;function bo(e,o){o=o||{};const a={};function r(c,m,f,y){return H.isPlainObject(c)&&H.isPlainObject(m)?H.merge.call({caseless:y},c,m):H.isPlainObject(m)?H.merge({},m):H.isArray(m)?m.slice():m}function i(c,m,f,y){if(H.isUndefined(m)){if(!H.isUndefined(c))return r(void 0,c,f,y)}else return r(c,m,f,y)}function n(c,m){if(!H.isUndefined(m))return r(void 0,m)}function l(c,m){if(H.isUndefined(m)){if(!H.isUndefined(c))return r(void 0,c)}else return r(void 0,m)}function s(c,m,f){if(f in o)return r(c,m);if(f in e)return r(void 0,c)}const d={url:n,method:n,data:n,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,m,f)=>i(M1(c),M1(m),f,!0)};return H.forEach(Object.keys(Object.assign({},e,o)),function(c){const m=d[c]||i,f=m(e[c],o[c],c);H.isUndefined(f)&&m!==s||(a[c]=f)}),a}const P1=e=>{const o=bo({},e);let{data:a,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:n,headers:l,auth:s}=o;o.headers=l=Qe.from(l),o.url=V1(O1(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let d;if(H.isFormData(a)){if(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((d=l.getContentType())!==!1){const[c,...m]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([c||"multipart/form-data",...m].join("; "))}}if(De.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(o)),r||r!==!1&&IW(o.url))){const c=i&&n&&DW.read(n);c&&l.set(i,c)}return o},UW=typeof XMLHttpRequest<"u",HW=UW&&function(e){return new Promise(function(o,a){const r=P1(e);let i=r.data;const n=Qe.from(r.headers).normalize();let{responseType:l,onUploadProgress:s,onDownloadProgress:d}=r,c,m,f,y,u;function h(){y&&y(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function g(){if(!p)return;const b=Qe.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:e,request:p};A1(function(P){o(P),h()},function(P){a(P),h()},N),p=null}"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(a(new me("Request aborted",me.ECONNABORTED,e,p)),p=null)},p.onerror=function(){a(new me("Network Error",me.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const N=r.transitional||B1;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),a(new me(b,N.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,p)),p=null},i===void 0&&n.setContentType(null),"setRequestHeader"in p&&H.forEach(n.toJSON(),function(b,N){p.setRequestHeader(N,b)}),H.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),l&&l!=="json"&&(p.responseType=r.responseType),d&&([f,u]=fn(d,!0),p.addEventListener("progress",f)),s&&p.upload&&([m,y]=fn(s),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",y)),(r.cancelToken||r.signal)&&(c=b=>{p&&(a(!b||b.type?new qo(null,e,p):b),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const S=MW(r.url);if(S&&De.protocols.indexOf(S)===-1){a(new me("Unsupported protocol "+S+":",me.ERR_BAD_REQUEST,e));return}p.send(i||null)})},WW=(e,o)=>{const{length:a}=e=e?e.filter(Boolean):[];if(o||a){let r=new AbortController,i;const n=function(c){if(!i){i=!0,s();const m=c instanceof Error?c:this.reason;r.abort(m instanceof me?m:new qo(m instanceof Error?m.message:m))}};let l=o&&setTimeout(()=>{l=null,n(new me(`timeout ${o} of ms exceeded`,me.ETIMEDOUT))},o);const s=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(n):c.removeEventListener("abort",n)}),e=null)};e.forEach(c=>c.addEventListener("abort",n));const{signal:d}=r;return d.unsubscribe=()=>H.asap(s),d}},qW=function*(e,o){let a=e.byteLength;if(a<o){yield e;return}let r=0,i;for(;r<a;)i=r+o,yield e.slice(r,i),r=i},GW=async function*(e,o){for await(const a of YW(e))yield*qW(a,o)},YW=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:a,value:r}=await o.read();if(a)break;yield r}}finally{await o.cancel()}},L1=(e,o,a,r)=>{const i=GW(e,o);let n=0,l,s=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:c,value:m}=await i.next();if(c){s(),d.close();return}let f=m.byteLength;if(a){let y=n+=f;a(y)}d.enqueue(new Uint8Array(m))}catch(c){throw s(c),c}},cancel(d){return s(d),i.return()}},{highWaterMark:2})},hn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",I1=hn&&typeof ReadableStream=="function",ZW=hn&&(typeof TextEncoder=="function"?(e=>o=>e.encode(o))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),D1=(e,...o)=>{try{return!!e(...o)}catch{return!1}},JW=I1&&D1(()=>{let e=!1;const o=new Request(De.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!o}),z1=64*1024,Wl=I1&&D1(()=>H.isReadableStream(new Response("").body)),yn={stream:Wl&&(e=>e.body)};hn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!yn[o]&&(yn[o]=H.isFunction(e[o])?a=>a[o]():(a,r)=>{throw new me(`Response type '${o}' is not supported`,me.ERR_NOT_SUPPORT,r)})})})(new Response);const KW=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(De.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await ZW(e)).byteLength},XW=async(e,o)=>H.toFiniteNumber(e.getContentLength())??KW(o),QW=hn&&(async e=>{let{url:o,method:a,data:r,signal:i,cancelToken:n,timeout:l,onDownloadProgress:s,onUploadProgress:d,responseType:c,headers:m,withCredentials:f="same-origin",fetchOptions:y}=P1(e);c=c?(c+"").toLowerCase():"text";let u=WW([i,n&&n.toAbortSignal()],l),h;const p=u&&u.unsubscribe&&(()=>{u.unsubscribe()});let g;try{if(d&&JW&&a!=="get"&&a!=="head"&&(g=await XW(m,r))!==0){let O=new Request(o,{method:"POST",body:r,duplex:"half"}),T;if(H.isFormData(r)&&(T=O.headers.get("content-type"))&&m.setContentType(T),O.body){const[v,w]=$1(g,fn(R1(d)));r=L1(O.body,z1,v,w)}}H.isString(f)||(f=f?"include":"omit");const S="credentials"in Request.prototype;h=new Request(o,{...y,signal:u,method:a.toUpperCase(),headers:m.normalize().toJSON(),body:r,duplex:"half",credentials:S?f:void 0});let b=await fetch(h);const N=Wl&&(c==="stream"||c==="response");if(Wl&&(s||N&&p)){const O={};["status","statusText","headers"].forEach(A=>{O[A]=b[A]});const T=H.toFiniteNumber(b.headers.get("content-length")),[v,w]=s&&$1(T,fn(R1(s),!0))||[];b=new Response(L1(b.body,z1,v,()=>{w&&w(),p&&p()}),O)}c=c||"text";let P=await yn[H.findKey(yn,c)||"text"](b,e);return!N&&p&&p(),await new Promise((O,T)=>{A1(O,T,{data:P,headers:Qe.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:h})})}catch(S){throw p&&p(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,e,h),{cause:S.cause||S}):me.from(S,S&&S.code,e,h)}}),ql={http:fW,xhr:HW,fetch:QW};H.forEach(ql,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const j1=e=>`- ${e}`,eq=e=>H.isFunction(e)||e===null||e===!1,U1={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:o}=e;let a,r;const i={};for(let n=0;n<o;n++){a=e[n];let l;if(r=a,!eq(a)&&(r=ql[(l=String(a)).toLowerCase()],r===void 0))throw new me(`Unknown adapter '${l}'`);if(r)break;i[l||"#"+n]=r}if(!r){const n=Object.entries(i).map(([s,d])=>`adapter ${s} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=o?n.length>1?`since :
|
|
33
33
|
`+n.map(j1).join(`
|