@golstats/gsc-reports 1.0.102 → 1.0.103
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/README.md +2 -2
- package/dist/{FilterConditions-55d68355-DMqzcKBO-BW5nRFNo-DQyVzX-y.js → FilterConditions-55d68355-DMqzcKBO-DBQHhFPL-DCfvp9hB.js} +1 -1
- package/dist/{FilterField-59a73e38-CNaE03Ge-C0SVDL43-Bowynuu-.js → FilterField-59a73e38-CNaE03Ge-Dtv1mDbh-H2LmmTO2.js} +1 -1
- package/dist/{FilterSubcategories-a9b32cc9-_h5FCZ4r-M98zqX2Q-Cnbz26MP.js → FilterSubcategories-a9b32cc9-_h5FCZ4r-I3ZzCxqB-CtLmb5fK.js} +1 -1
- package/dist/css/fonts.css +83 -83
- package/dist/gsc-reports.css +1 -1
- package/dist/gsc-reports.es.js +1 -1
- package/dist/gsc-reports.umd.js +6 -6
- package/dist/{index-BRXz4kDf.js → index-BUFLIGAV.js} +46 -44
- package/package.json +2 -2
- package/src/components/elementsTemplates/ModalDeleteTemplate.vue +249 -249
- package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
- package/src/components/elementsTemplates/ModalduplicateTemplate.vue +300 -300
- package/src/components/elementsTemplates/TooltipReportOptions.vue +97 -97
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +168 -168
- package/src/components/filters.vue +935 -935
- package/src/components/template-report-maker/CoverSelector.vue +165 -165
- package/src/components/template-report-maker/ReportView.vue +66 -66
- package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
- package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
- package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
- package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
- package/src/index.js +4 -4
- package/src/types.d.ts +45 -45
- package/src/utils/dateUtils.js +52 -52
package/dist/gsc-reports.umd.js
CHANGED
|
@@ -7977,7 +7977,7 @@ uniform ${gi} ${vi} u_${$i};
|
|
|
7977
7977
|
* MapLibre GL JS
|
|
7978
7978
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
|
|
7979
7979
|
*)
|
|
7980
|
-
*/return window.Plotly=r,r})})(wG);var cKe=wG.exports;const AP=lKe(cKe),uKe={id:"main-container"},dKe={id:"surface-container"},pKe={id:"label-left-zone"},hKe={id:"label-right-zone"},fKe=["id"],r9=39,Kw=76,mKe=0,TG=2,SG=4,kG=5,LG=6,EG=7,yKe=8,gKe=9,CG=10,NG=11,OG=13,vKe=14,bKe=15,xKe=18,SS=19,MG=800,VG=300,RP=.1208,zG=5,_Ke=2,wKe=3,TKe=4,SKe=7,kKe=-46,PG=100,AG=-14,LKe={__name:"CardField",props:{selected_category:{type:Number,default:31},selected_team:{type:[Array,Number],default:()=>[]},showBallPosition:{type:Boolean,default:!0},showdefault:{type:Boolean,default:!1},showPlayersPosition:{type:Boolean,default:!0},widthContainer:{type:Number,default:1280},dataPaintInfo:{type:Object,default:()=>{}},showTracks:{type:Boolean,default:!1},touches:{type:Number,default:1},showPlayersEndPosition:{type:Boolean,default:!1},secondStart:{type:Number,default:0},operationStart:{type:Number,default:0},secondEnd:{type:Number,default:1},operationEnd:{type:Number,default:1},inFavor:{type:Boolean,default:!0},lateralidad:{type:String,default:"left"}},setup(e){var r;let a=.75;const v=t.ref(null),$=t.ref(null),h=t.ref(0),u=t.ref(null),i=t.ref(`heatmap-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),p=new Set([583,585,587,589]),c=new Set([584,586,588,590]),n=new Set([122,128,136,142]),k=new Set([125,131,139,145]),T=new Set([124,130,138,144]),x=new Set([123,129,137,143]),d=e;let o=null;t.watch(()=>h.value,se=>{s(se),$.value&&($.value.style.height=`${f(se)}px`),u.value&&(u.value.style.top=`${g(f(se))}px`)});function l(){o=new ResizeObserver(se=>{for(const me of se)h.value=me.contentRect.width}),o.observe(v.value)}function s(se){if(v.value)try{const me=document.getElementById(i.value);me&&(me.data||me._fullLayout)&&AP.relayout(me,{width:se,height:f(se)})}catch(me){console.warn("Plotly relayout error:",me)}}function f(se){return Math.round(VG/MG*se,0)}function g(se){return AG+(se-PG)/(VG-PG)*(kKe-AG)}t.watch(()=>d.dataPaintInfo,se=>{N(se)},{deep:!0}),t.watch(()=>d.selected_team,se=>{se.data.length>0&&N(se)}),t.watch(()=>d.secondStart,se=>{N(se)});function S(se,me){let ge=.01321,be=.00929,xe=0,Ae=0,qe=[];const _e=me.length;let Ue=Math.floor(_e/10);for(;xe<Kw;)Ae=me.filter(je=>je[0]>=xe*ge&&je[0]<=(xe+1)*ge&&je[1]>=se*be&&je[1]<=(se+1)*be).map(je=>je[1]).length,Ue=Ue===0?1:Ue,qe.push(parseFloat((Ae/Ue).toFixed(4))),xe++;return qe.reverse()}function L(se,me){let ge=.01321,be=.01009,xe=0,Ae=0,qe=[];const _e=me.length;let Ue=Math.floor(_e/10);for(;xe<Kw;)Ae=me.filter(je=>je[0]>=xe*ge&&je[0]<=(xe+1)*ge&&je[1]>=se*be&&je[1]<=(se+1)*be).map(je=>je[1]).length,Ue=Ue===0?1:Ue,qe.push(parseFloat((Ae/Ue).toFixed(4))),xe++;return qe.reverse()}function M(se){let me=[z(Kw),z(Kw)],ge=[],be=r9;for(;be>0&&be<=r9;)ge=S(be,se),me.push(ge),be--;return me.push(z(Kw),z(Kw)),me}function A(se){let me=[z(Kw),z(Kw)],ge=[],be=r9;for(;be>0&&be<=r9;)ge=L(be,se),me.push(ge),be--;return me.push(z(Kw),z(Kw)),me}function z(se){return Array.from({length:se},()=>0)}function I(se,me,ge){const be=[];let xe=0,Ae=0;be.push(se[0]);for(let qe=1;qe<ge-1;qe++){const _e=[];_e.push(se[qe][0]);for(let Ue=1;Ue<me-1;Ue++)xe=se[qe][Ue-1],Ae=se[qe][Ue+1],_e.push(xe+.5*(se[qe][Ue]+Ae-xe));_e.push(se[qe][me-1]),be.push(_e)}be.push(se[ge-1]);for(let qe=1;qe<me-1;qe++)for(let _e=1;_e<ge-1;_e++)xe=be[_e-1][qe],Ae=be[_e+1][qe],be[_e][qe]=xe+.5*(be[_e][qe]+Ae-xe);return be}function j(se){var me=[];let ge=.14333333333333334;for(var be=0;be<se.length;be++)if(se[be][SS]==0&&se[be][SG]===d.selected_category){let xe=se[be][NG]-(ge-RP);me.push([se[be][CG],xe])}return me}function F(se,me,ge=1){let be=[],xe=[];return se.forEach(Ae=>{if(Ae[SG]===d.selected_category){let qe=se.filter(_e=>Ae[0]===_e[xKe]&&_e[SS]<=ge).sort((_e,Ue)=>_e[SS]-Ue[SS]);qe.length>0&&be.push(qe),Ae[SS]===0&&xe.push([Ae[mKe],Ae[OG],Ae[vKe],Ae[bKe]])}}),{sequences:be,main_plays:xe}}function W(se,me,ge,be,xe){let Ae=.1,qe=be*4,_e=be*3,Ue=[],je=[],Re=[],We=[],Qe=[],rt=[],pt=[],ut=[],He=[],st=[],ct=[],Ct=[],Vt=[];const Ot=.7,qt="rgba(253, 101, 36, 1)",Zt="rgba(249, 189, 50, 1)",Jt="rgba(145, 108, 255,1)",Qt="rgba(255, 255, 255,1)",cr="rgba(203, 238, 107, 1)",hr="rgba(55, 181, 252, 1)",$t="rgba(55, 252, 217, 1)",At="rgba(195, 198, 201, 1)",or=new Map([[p,{color:cr,symbol:"circle"}],[c,{color:hr,symbol:"circle"}],[n,{color:$t,symbol:"circle"}],[k,{color:At,symbol:"x"}],[T,{color:qt,symbol:"square"}],[x,{color:Zt,symbol:"triangle-up"}]]);return se.forEach(Gt=>{if(Gt.length===1){if(Gt[0][SS]===0)return;let Lt=Gt[0][LG]*ge,It=Gt[0][EG]*qe-_e,Pt=be*RP,gr=be*Ae,ur=It+Pt+gr;if(ur=ur>=be?be-1:ur,je.push(Lt),Re.push(ur-Ot),We.push(Lt),Qe.push(ur),xe===1){let vr=Gt[0][kG].split(","),Tr=!1;vr=vr.map(Number);for(const[Pr,Tt]of or)if(vr.some(Yt=>Pr.has(Yt))){rt.push(Tt.color),pt.push(Tt.symbol),Tr=!0;break}Tr||(rt.push(Jt),pt.push("circle"))}else Gt[0][TG]===me?rt.push(Qt):rt.push(qt)}else Gt.forEach((Lt,It)=>{if(Lt[SS]===0)return;let Pt=Lt[LG]*ge,gr=Lt[EG]*qe-_e,ur=be*RP,vr=be*Ae,Tr=gr+ur+vr;if(Tr=Tr>=be?be-1:Tr,je.push(Pt),Re.push(Tr-Ot),We.push(Pt),Qe.push(Tr),xe===1){let Pr=Gt[0][kG].split(","),Tt=!1;Pr=Pr.map(Number);for(const[Yt,er]of or)if(Pr.some(sr=>Yt.has(sr))){rt.push(er.color),pt.push(er.symbol),Tt=!0;break}Tt||(rt.push(Jt),pt.push("circle"))}else{let Pr=Lt[yKe]*ge,Tt=Lt[gKe]*qe-_e+ur+vr;Tt=Tt>=be?be-1:Tt;let Yt=Lt[CG]*ge,er=Lt[NG]*qe-_e+ur+vr;er=er>=be?be-1:er,Lt[TG]===me?rt.push(Qt):rt.push(qt),st.push(Pt,Pr,null),ct.push(Tr,Tt,null),ut.push(Pt,Pr),He.push(Tr,Tt),Gt.length-1===It&&(ut.push(Yt,null),He.push(er,null),Ct.push(Yt),Vt.push(er))}})}),Ue.shadowXPoints=je,Ue.shadowYPoints=Re,Ue.playerXPoints=We,Ue.playerYPoints=Qe,Ue.playerColorPoints=rt,Ue.trackX=ut,Ue.trackY=He,Ue.sprintX=st,Ue.sprintY=ct,Ue.arrowX=Ct,Ue.arrowY=Vt,Ue.symbols=pt,Ue}function U(se,me){return se.map((ge,be)=>ge.map((xe,Ae)=>{if(Ae===me){let[qe,_e,Ue]=xe.split(/[:.]/);return parseInt(qe)*60+parseInt(_e)}else return xe}))}function O(se,me,ge,be,xe=0,Ae){let qe=[];return be.forEach(_e=>{let Ue=xe===0?parseInt(_e[1])-parseInt(ge):parseInt(_e[1])+parseInt(ge);se.filter(je=>_e[0]===je[SKe]&&Ue===je[zG]&&me===je[_Ke]).forEach(je=>{let Re=je[wKe],We=je[TKe];We<=Ae&&qe.push([Re,We])})}),qe}function X(se){return se.flat().every(me=>me===0)}function N(se){se.data=U(se.data,OG),se.field_positions=U(se.field_positions,zG);let me=F(se.data,a,d.touches),ge=j(se.data),be=O(se.field_positions,d.selected_team,d.secondStart,me.main_plays,d.operationStart,a),xe=O(se.field_positions,d.selected_team,d.secondEnd,me.main_plays,d.operationEnd,a),Ae=A(ge),qe=M(be),_e=M(xe),Ue=Ae[0].length,je=Ae.length;Ae=I(I(Ae,Ue,je),Ue,je),qe=I(I(qe,Ue,je),Ue,je),_e=I(I(_e,Ue,je),Ue,je),Ue=Ae[0].length,je=Ae.length;let Re=W(me.sequences,d.selected_team,Ue,je,d.touches);var We=[[0,"rgba(12,31,82,0)"],[.2,"rgba(14, 55, 115, 0.8)"],[.4,"rgba(33, 85, 160, 0.8)"],[.6,"rgba(16, 124, 170, 0.8)"],[.8,"rgba(32, 154, 207, 0.8)"],[1,"rgba(32, 174, 207, 0.8)"]],Qe=[[0,"rgba(12,31,82,0)"],[.2,"rgba(73, 13, 67, 0.8)"],[.4,"rgba(98, 32, 91, 0.8)"],[.6,"rgba(121, 52, 114, 0.8)"],[.8,"rgba(176, 36, 121, 0.8)"],[1,"rgba(230, 49, 158, 0.8)"]],rt=[[0,"rgba(12,31,82,0)"],[.2,"rgba(94, 111, 79, 1)"],[.4,"rgba(111, 142, 28, 1)"],[.6,"rgba(142, 177, 50, 1)"],[.8,"rgba(169, 211, 57, 1)"],[1,"rgba(195, 229, 105, 1)"]],pt=[{z:Ae,type:"heatmap",connectgaps:!0,opacity:1,colorscale:rt,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],ut=[{z:qe,type:"heatmap",connectgaps:!0,opacity:1,colorscale:We,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],He=[{z:_e,type:"heatmap",connectgaps:!0,opacity:1,colorscale:Qe,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],st={x:Re.shadowXPoints,y:Re.shadowYPoints,mode:"markers",marker:{symbol:Re.symbols,color:"rgba(0, 0, 0, 0.5)",size:9}},ct={x:Re.playerXPoints,y:Re.playerYPoints,mode:"markers",marker:{symbol:Re.symbols,color:Re.playerColorPoints,size:8}},Ct={x:Re.trackX,y:Re.trackY,mode:"lines",line:{color:"rgba(255, 255, 255, 1)",width:1,dash:"2px 2px",arrowhead:"end"}},Vt={x:Re.sprintX,y:Re.sprintY,mode:"lines",line:{color:"rgba(255, 255, 255, 1)",width:1}},Ot={x:Re.arrowX,y:Re.arrowY,mode:"markers",marker:{symbol:"triangle-up",size:10,color:"rgba(255, 255, 255, 1)",angle:120}},qt=[];d.showTracks&&d.touches>1&&qt.push(Vt,Ct,Ot),d.showTracks&&qt.push(st,ct),d.showPlayersEndPosition&&!X(_e)&&qt.push(...He),d.showPlayersPosition&&!X(qe)&&qt.push(...ut),d.showBallPosition&&!X(Ae)&&qt.push(...pt);const Zt=[0,Ue],Jt=[0,je];if(r={showlegend:!1,width:h.value,height:f(h.value),xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:Zt},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:Jt},margin:{l:0,r:0,b:0,t:5}},!!v.value)try{AP.react(i.value,qt,r,{displayModeBar:!1,staticPlot:!0})}catch(Qt){console.warn("Error updating Plotly plot:",Qt)}}const Y=()=>{};return t.onBeforeUnmount(()=>{window.removeEventListener("resize",Y)}),t.onMounted(()=>{v.value&&(v.value.style.pointerEvents="none"),window.addEventListener("resize",Y),l(),setTimeout(()=>{if(v.value)try{const se=[],me=h.value||MG,ge={showlegend:!1,width:me,height:f(me),xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:[0,Kw]},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:[0,r9+2]},margin:{l:0,r:0,b:0,t:5}};AP.newPlot(i.value,se,ge,{displayModeBar:!1,staticPlot:!0},{responsive:!0})}catch(se){console.warn("Error creating Plotly plot in onMounted:",se)}},0)}),(se,me)=>(t.openBlock(),t.createElementBlock("div",uKe,[t.createElementVNode("div",dKe,[d.dataPaintInfo.data.length==0||d.showdefault?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([(e.widthContainer>=320&&e.widthContainer<768,"class-not-result-field"),e.widthContainer<320?"class-not-result-field-movil-small":""])},[d.showdefault?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.widthContainer<768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[me[0]||(me[0]=t.createTextVNode("No se muestran datos. Estamos",-1)),me[1]||(me[1]=t.createElementVNode("br",null,null,-1)),me[2]||(me[2]=t.createTextVNode(" en modo template.",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No se muestran datos. Estamos en modo template.")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.widthContainer<768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[me[3]||(me[3]=t.createTextVNode("No se muestran resultados debido",-1)),me[4]||(me[4]=t.createElementVNode("br",null,null,-1)),me[5]||(me[5]=t.createTextVNode(" a los filtros aplicados.",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No se muestran resultados debido a los filtros aplicados.")],64))],64))],2)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",pKe,null,512),[[t.vShow,d.lateralidad=="left"]]),t.withDirectives(t.createElementVNode("div",hKe,null,512),[[t.vShow,d.lateralidad=="right"]]),t.createElementVNode("div",{ref_key:"surfacePlot",ref:v,id:i.value,class:t.normalizeClass(["surface-plot-heatmap",e.inFavor?"":"against"])},null,10,fKe)])]))}},EKe={components:{GSCTrendPosition:oKe,CardField:LKe},props:{acronymHome:{type:String,default:""},acronymAway:{type:String,default:""},typePlay:{type:String,default:"A favor"},tournamentSelected:{type:Object,default:()=>({})},widthContainer:{type:Number,default:1280},touchAllData:{type:Array,default:()=>[]},playersData:{type:Object,default:()=>{}},homeTeam:{type:Number,default:0},awayTeam:{type:Number,default:0},selected_category:{type:Number,default:31},team:{type:Number,default:0},forGame:{type:Boolean,required:!1},teamsData:{type:Object,default:()=>{}},fieldPositionsAll:{type:Array,default:()=>[]},inFavor:{type:Boolean,required:!1},isTacticVisible:{type:Boolean,required:!1},lateralidad:{type:String,default:"left"},showBallGo:{type:Boolean,default:!0},showHeatMap:{type:Boolean,default:!0},ballOnOff:{type:String,default:"OFF"},showdefault:{type:Boolean,default:!1}},data(){return{type:"ball",show:!1,game:62276,trajectories:[],rival:3014,totalCorners:0,typepositioning:"Posición",numberTouches:1,playersList:{},timepositioning:-1,filterFieldPositions:[],timepositioningFinal:-1,arrayPlayers:{},season:1325,timepositioningend:1,zonesFilter:[],touchFilter:{},token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{touchAllData:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},zonesFilter:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},typepositioning:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},timepositioning:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},timepositioningend:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0}},computed:{firstTeam(){return this.homeTeam===this.team?this.acronymHome:this.acronymAway},secondTeam(){return this.homeTeam===this.team?this.acronymAway:this.acronymHome},firstTeam1Touch(){return this.inFavor?this.homeTeam===this.team?this.acronymHome:this.acronymAway:this.homeTeam===this.team?this.acronymAway:this.acronymHome},secondTeam1Touch(){return this.inFavor?this.homeTeam===this.team?this.acronymAway:this.acronymHome:this.homeTeam===this.team?this.acronymHome:this.acronymAway},reftrendteamsTouches(){const e=this.widthContainer;return e<=480?"ref-trend-teams-touches480":e<=768?"ref-trend-teams-touches768":"ref-trend-teams-touches"},reftrendteamslocal(){const e=this.widthContainer;return e<=480?"ref-trend-teams-local480":e<=768?"ref-trend-teams-local768":"ref-trend-teams-local"},reftrendteamsrival(){return this.widthContainer<=768?"ref-trend-teams-rival768":"ref-trend-teams-rival"},reftrendteamsall(){const e=this.widthContainer;return e<=480?"ref-trend-teams-all480":e<=768?"ref-trend-teams-all768":"ref-trend-teams-all"},refpointlebeltext(){const e=this.widthContainer;return e<=390?"ref-point-lebel-text390":e<=480?"ref-point-lebel-text480":e<=768?"ref-point-lebel-text768":e<=860?"ref-point-lebel-text870":"ref-point-lebel-text"},trendcontentcontrols(){return this.widthContainer<=768?"trend-content-controls768":["trend-content-controls","to-right"]},trendtitle(){return this.widthContainer<=768?"trend-title768":"trend-title"},trendtitlecontainer(){return this.widthContainer<=768?"trend-titlecontainer768":"trend-titlecontainer"},trendcontentcontrolscontainer(){const e=this.widthContainer;return e<=400?"trend-content-controls-container400":e<=860?"trend-content-controls-container860":"trend-content-controls-container"},trendcontentcontrolsleyendcheckscontent(){const e=this.widthContainer;return e<=400?"trend-content-controls-leyend-checkscontent400":e<=768?"trend-content-controls-leyend-checkscontent768":e<=1e3?"trend-content-controls-leyend-checkscontent1000":"trend-content-controls-leyend-checkscontent"},trendcontentcontrolsleyend(){const e=this.widthContainer;return e<=768?"trend-content-controls-leyend768":e<=1e3?"trend-content-controls-leyend1000":"trend-content-controls-leyend"},contDataClass(){return this.widthContainer<=768?"cont-data768":"cont-data"},contDataClass2(){return this.widthContainer<=768?"cont-data-ref768":"cont-data-ref"},contCollectorsClass(){const e=this.widthContainer;return e<=768?"cont-collectors768":e<=900?"cont-collectors900":"cont-collectors"},contCollectorsClass2(){const e=this.widthContainer;return e<=768?"cont-collectors-ref768":e<=900?"cont-collectors-ref900":"cont-collectors-ref"},contWhoCnnectedClass(){const e=this.widthContainer;return e<=768?"cont-who-connected768":e<=900?"cont-who-connected900":"cont-who-connected"},contWhoCnnectedClass2(){const e=this.widthContainer;return e<=768?"cont-who-connected-ref768":e<=900?"cont-who-connected-ref900":"cont-who-connected-ref"}},methods:{checkBallGo(){this.$emit("update:showBallGo",!this.showBallGo)},checkHeatMap(){this.$emit("update:showHeatMap",!this.showHeatMap)},getDataPosition(){if(this.touchAllData.length>0){const r=this.touchAllData.filter(n=>n[19]===0).map(n=>this.tiempoASegundosEnteros(n[13]));let a=[];this.timepositioning>=0?a=r.map(n=>n+this.timepositioning):a=r.map(n=>n-this.timepositioning);const v=this.fieldPositionsAll.filter(n=>a.includes(this.tiempoASegundosEnteros(n[5]))&&n[2]===this.team),$=this.contarYAgruparPorPosicion(v);let h=[];this.zonesFilter.length!=35?h=this.fieldPositionsAll.filter(n=>this.zonesFilter.includes(n[6])&&n[2]===this.team):h=this.fieldPositionsAll.filter(n=>this.zonesFilter.includes(n[6])&&n[2]===this.team),this.filterFieldPositions=h;let u=[],i=[];for(var e in this.arrayPlayers)this.arrayPlayers[e].selected&&u.push(this.arrayPlayers[e].id),i.push(this.arrayPlayers[e].id);u.length>0&&(this.filterFieldPositions=this.filterFieldPositions.filter(n=>u.includes(n[1])));const p=h.filter(n=>a.includes(this.tiempoASegundosEnteros(n[5]))&&n[2]===this.team),c=this.contarYAgruparPorPosicion(p);this.arrayPlayers={};for(let n=0;n<$.length;n++){const k=c.filter(function(T){return T.id_player==$[n].id_player});this.arrayPlayers[$[n].id_player]={id:$[n].id_player,corners:$[n].corners,cornersfilter:k[0]?k[0].corners:0,data:this.playersData[$[n].id_player]?this.playersData[$[n].id_player]:{name:"-",img:"-",position:11,id:"-",team:"-",nationality_id:"-",nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/undefined.jpg",jersey:"-"},selected:Object.keys(this.arrayPlayers).length>0&&i.includes($[n].id_player)?!!u.includes($[n].id_player):!0}}}else this.arrayPlayers={},this.filterFieldPositions=[]},getDataTrajectory(){if(this.touchAllData.length>0){const r=this.touchAllData.filter(x=>x[19]===0).map(x=>this.tiempoASegundosEnteros(x[13]));let a=[];this.timepositioning>=0?a=r.map(x=>x+Math.abs(this.timepositioning)):a=r.map(x=>x-Math.abs(this.timepositioning));let v=[];this.timepositioningend>=0?v=r.map(x=>x+Math.abs(this.timepositioningend)):v=r.map(x=>x-Math.abs(this.timepositioningend));const $=this.fieldPositionsAll.filter(x=>this.zonesFilter.includes(x[6])&&x[2]===this.team);this.filterFieldPositions=$;let h=[],u=[];for(var e in this.arrayPlayers)this.arrayPlayers[e].selected&&h.push(this.arrayPlayers[e].id),u.push(this.arrayPlayers[e].id);h.length>0&&(this.filterFieldPositions=this.filterFieldPositions.filter(x=>h.includes(x[1])));const i=this.fieldPositionsAll.filter(x=>r.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),p=$.filter(x=>a.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),c=$.filter(x=>v.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),n=this.contarYAgruparPorPosicion(i),k=this.contarYAgruparPorPosicion(p),T=this.contarYAgruparPorPosicion(c);for(let x=0;x<n.length;x++){const d=k.filter(function(l){return l.id_player==n[x].id_player}),o=T.filter(function(l){return l.id_player==n[x].id_player});this.arrayPlayers[n[x].id_player]={id:n[x].id_player,corners:n[x].corners,cornersfilter:d[0]?d[0].corners:0,cornersfilterfinal:o[0]?o[0].corners:0,data:this.playersData[n[x].id_player]?this.playersData[n[x].id_player]:{name:"-",img:"-",position:11,id:"-",team:"-",nationality_id:"-",nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/undefined.jpg",jersey:"-"},selected:Object.keys(this.arrayPlayers).length>0&&u.includes(n[x].id_player)?!!h.includes(n[x].id_player):!0}}}else this.arrayPlayers={},this.filterFieldPositions=[]},contarYAgruparPorPosicion(e){const r=e.reduce((a,v)=>{const $=v[1];return a[$]?a[$]+=1:a[$]=1,a},{});return Object.keys(r).map(a=>({id_player:parseInt(a,10),corners:r[a]}))},tiempoASegundosEnteros(e){let r=e.split(":"),a=parseInt(r[0],10),v=parseFloat(r[1]);return a*60+Math.floor(v)},getTimePositioning(e){this.timepositioning=e},getTimePositioningEnd(e){this.timepositioningend=e},getTypePositioning(e){this.typepositioning=e},getArrayZonesField(e){this.zonesFilter=e},selectcheckplayerall(e){for(let r in this.arrayPlayers)this.arrayPlayers[r].selected=e;this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},selectcheckplayer(e){this.arrayPlayers[e].selected=!this.arrayPlayers[e].selected,this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},clickTypeButton(e){this.type=e},clickAdvanced(){this.show=!this.show},async getData(){}},mounted(){}},CKe={key:0,class:"ref-trend-ball-player-container"},NKe={class:"ref-trend-favor-label"},OKe={class:"ref-trend-favor-label-text"},MKe={class:"ref-trend-ball-player"},VKe={class:"ref-trend-ball-player-label"},zKe={key:1,class:"ref-trend-ball-player-container-route"},PKe={class:"ref-trend-teams-rival-container-table"},AKe={class:"ref-trend-teams-rival-container-row1"},RKe={class:"ref-trend-teams-rival-container-row2"},UKe={class:"ref-trend-teams-rival-container-table"};function FKe(e,r,a,v,$,h){var u,i,p;const c=t.resolveComponent("GSCTrendPosition"),n=t.resolveComponent("CardField");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(a.widthContainer<=768?"gsc-trend-movil":"gsc-trend-plays")},[t.createElementVNode("div",{class:t.normalizeClass(h.contDataClass)},[t.withDirectives(t.createVNode(c,{onSelectcheckplayer:h.selectcheckplayer,onSelectcheckplayerall:h.selectcheckplayerall,data:$.arrayPlayers,onShowfield:h.getArrayZonesField,onTypepositioning:h.getTypePositioning,"width-container":a.widthContainer,onTimepositioning:h.getTimePositioning,onTimepositioningend:h.getTimePositioningEnd},null,8,["onSelectcheckplayer","onSelectcheckplayerall","data","onShowfield","onTypepositioning","width-container","onTimepositioning","onTimepositioningend"]),[[t.vShow,a.isTacticVisible&&$.type==="position"]]),t.createVNode(n,{"width-container":a.widthContainer,selected_team:a.team,"show-ball-position":a.showBallGo,"show-players-position":a.showHeatMap,selected_category:a.selected_category,"show-tracks":a.ballOnOff=="ON",touches:$.numberTouches,"operation-start":$.timepositioning>0?1:0,"second-start":Math.abs($.timepositioning),"second-end":$.timepositioningend>0?1:0,"operation-end":Math.abs($.timepositioningend),lateralidad:a.lateralidad,"show-players-end-position":$.typepositioning=="Recorrido","in-favor":a.inFavor,showdefault:a.showdefault,"data-paint-info":{data:a.touchAllData,field_positions:$.filterFieldPositions,home_atk_direction:1}},null,8,["width-container","selected_team","show-ball-position","show-players-position","selected_category","show-tracks","touches","operation-start","second-start","second-end","operation-end","lateralidad","show-players-end-position","in-favor","showdefault","data-paint-info"])],2),t.createElementVNode("div",{class:t.normalizeClass(h.contDataClass2)},[t.createElementVNode("div",{class:t.normalizeClass(h.contCollectorsClass2)},[$.typepositioning==="Posición"?(t.openBlock(),t.createElementBlock("div",CKe,[t.createElementVNode("div",NKe,[t.createElementVNode("div",OKe,[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("A Favor")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("En Contra")],64))]),r[0]||(r[0]=t.createElementVNode("div",{class:"ref-trend-favor-separator"},null,-1))]),r[2]||(r[2]=t.createElementVNode("div",{class:"ref-trend-ball-ball"},[t.createElementVNode("div",{class:"ref-trend-ball-ball-point"}),t.createElementVNode("div",{class:"ref-trend-ball-ball-label"},"BALÓN")],-1)),t.createElementVNode("div",MKe,[r[1]||(r[1]=t.createElementVNode("div",{class:"ref-trend-ball-playe-point"},null,-1)),t.createElementVNode("div",VKe,[a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("JUGADORAS ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("JUGADORAS ")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("JUGADORES ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("JUGADORES ")],64))],64))])])])):(t.openBlock(),t.createElementBlock("div",zKe,[...r[3]||(r[3]=[t.createStaticVNode('<div class="ref-trend-ball-ball" data-v-08393e58><div class="ref-trend-ball-ball-point" data-v-08393e58></div><div class="ref-trend-ball-ball-label" data-v-08393e58>BALÓN</div></div><div class="ref-trend-ball-player-route" data-v-08393e58><div class="ref-trend-ball-player-label" data-v-08393e58>RECORRIDOS: </div><div class="ref-trend-ball-playe-point" data-v-08393e58></div><div class="ref-trend-ball-player-label" data-v-08393e58>INICIO </div><div class="ref-trend-ball-playe-point-end" data-v-08393e58></div><div class="ref-trend-ball-player-label" data-v-08393e58>FINAL</div></div>',2)])]))],2),a.ballOnOff=="ON"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(h.contWhoCnnectedClass2),style:t.normalizeStyle($.numberTouches>1?"margin-left: 0%; display: flex; justify-content: center;":"")},[$.numberTouches>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(h.reftrendteamsTouches)},[t.createElementVNode("div",{class:"ref-trend-teams-rival-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center !important;":"")}," COORDENADAS: ",4),t.createElementVNode("div",PKe,[t.createElementVNode("div",AKe,[r[4]||(r[4]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/circle-my-team.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext),style:{"font-size":"9px"}},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.firstTeam),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(((u=a.teamsData[a.team])==null?void 0:u.acronym)||""),1)],64))],2)]),t.createElementVNode("div",RKe,[r[5]||(r[5]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(/circle-other-team.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext),style:{"font-size":"9px"}},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.secondTeam),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Rival")],64))],2)])])],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(h.reftrendteamsall)},[t.createElementVNode("div",{class:t.normalizeClass(h.reftrendteamslocal)},[t.createElementVNode("div",{class:"ref-trend-teams-local-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center !important;":"")},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.firstTeam1Touch),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(a.inFavor?((i=a.teamsData[a.team])==null?void 0:i.acronym)||"":"Rival"),1)],64))],4),t.createElementVNode("div",{class:t.normalizeClass(a.widthContainer<=980?"ref-trend-teams-local-container-table-movil":"ref-trend-teams-local-container-table")},[t.createElementVNode("div",{class:"ref-trend-teams-local-container-row1",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[7]||(r[7]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-gol.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[6]||(r[6]=[t.createTextVNode("Remata destino ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("portería fue gol",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row2",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[9]||(r[9]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-con-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[8]||(r[8]=[t.createTextVNode("Rematado destino ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("a portería no fue gol",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row3",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[11]||(r[11]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-sin-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[10]||(r[10]=[t.createTextVNode("Rematado sin ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("destino a portería",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row4",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[13]||(r[13]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/raso.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[12]||(r[12]=[t.createTextVNode("Raso al área/",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("En corto",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row5",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[14]||(r[14]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/sin-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},"Sin destino",2)],4)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(h.reftrendteamsrival)},[t.createElementVNode("div",{class:"ref-trend-teams-rival-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center;":"")},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.secondTeam1Touch),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(a.inFavor?"Rival":((p=a.teamsData[a.team])==null?void 0:p.acronym)||""),1)],64))],4),t.createElementVNode("div",UKe,[t.createElementVNode("div",{class:"ref-trend-teams-rival-container-row1",style:t.normalizeStyle(a.widthContainer<=980&&a.widthContainer>=768?"display: inline-block !important;":"")},[r[23]||(r[23]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/ganados-jugador-rival.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[a.widthContainer<=768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[15]||(r[15]=t.createTextVNode("Ganados ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadora ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugador ")],64)),r[16]||(r[16]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Ganados por defensivo")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[20]||(r[20]=t.createTextVNode("Ganados ",-1)),r[21]||(r[21]=t.createElementVNode("br",null,null,-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadora ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugador ")],64)),r[22]||(r[22]=t.createTextVNode(" rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[17]||(r[17]=t.createTextVNode("Ganados por",-1)),r[18]||(r[18]=t.createElementVNode("br",null,null,-1)),r[19]||(r[19]=t.createTextVNode("defensivo",-1))],64))],64))],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-rival-container-row2",style:t.normalizeStyle(a.widthContainer<=980&&a.widthContainer>=768?"display: inline-block !important;":"")},[r[33]||(r[33]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/ganados-portero.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[a.widthContainer<=768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[25]||(r[25]=t.createTextVNode("Ganados ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Portera ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Portero ")],64)),r[26]||(r[26]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[24]||(r[24]=t.createTextVNode("Ganados por ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("portera")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("portero")],64))],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[30]||(r[30]=t.createTextVNode("Ganados ",-1)),r[31]||(r[31]=t.createElementVNode("br",null,null,-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Portera ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Portero ")],64)),r[32]||(r[32]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[27]||(r[27]=t.createTextVNode("Ganados por",-1)),r[28]||(r[28]=t.createElementVNode("br",null,null,-1)),r[29]||(r[29]=t.createTextVNode("portero",-1))],64))],64))],2)],4)])],2)],2))],6)):t.createCommentVNode("",!0)],2)],2)}const IKe=t9(EKe,[["render",FKe],["__scopeId","data-v-08393e58"]]),UP={components:{GSCTrend:IKe},props:{game:{type:Object,required:!0},forseason:{type:Boolean,default:!1},forteam:{type:Boolean,default:!1},tournamentselected:{type:Object,default:()=>({})},forgame:{type:Boolean,default:!1},team:{type:Number,default:0},istacticvisible:{type:Boolean,default:!0},issynchronization:{type:Boolean,default:!1},seasonselected:{type:Object,default:()=>({})},canplayvideos:{type:Boolean,default:!0},clientprivilegesbyseasons:{type:Object,default:()=>null},videoprivilegesplayingas:{type:Set,default:()=>new Set([1,2])},infavoragainstteam:{type:Boolean,default:!0},lateralidad:{type:String,default:"left"},teamselected:{type:Number,default:0},filters:{type:Object,default:()=>({isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0})},showBallGo:{type:Boolean,default:!0},showHeatMap:{type:Boolean,default:!0},ballOnOff:{type:String,default:"OFF"},showdefault:{type:Boolean,default:!1}},data(){return{lastGamesBySeasonUrl:"",inFavorResponses:null,againstResponses:null,homeTeamResponses:null,awayTeamResponses:null,isSpecificPlaysVisible:!1,infavoragainst:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",touchAllDataHome:[],touchAllDataAway:[],regularflag:null,localFilters:{},containerWidth:0,openModal:!1,playersData:{},teamsData:{},teamCorners:{corners:0,cornersAgainst:0},gamesAllHome:[],gamesAllAway:[],touchDataSelected:[],auxChangeFilterPlayer:!0,auxChangeFilterGames:!0,positionsDataSelected:[],copyLastFilters:{},seasonId:0,totalDataCollection:{},seasonsByGame:{},matchesByGame:{},rivalsByGame:{},updateConnections:0,showCorners:0,filterPlayersAvailable:[],filterGamesAvailable:[],updateTrend:0,updateFilter:0,copyplayers:[],typePlay:"A favor",modalInitialData:{},areFiltersOpen:!1,heightFilters:"123px",isLoading:!1,adjustedPlays:new Set}},watch:{isLoading(e){this.isSpecificPlaysVisible=!e},infavoragainst:{immediate:!0,handler(){this.fillFilterGamesReset(),this.fillFilterPlayersReset(),this.updateConnections+=1}},infavoragainstteam:{immediate:!0,async handler(e,r){if(console.log("???????????????????????????????????????????????????????????????????????????????? ",e),this.infavoragainst=e,console.log("se asigno el valor: ",e),this.showdefault){this.updateTrend+=1;return}if(r===void 0&&e!==void 0){this.infavoragainst=e;return}if(e!==void 0&&e!==r)if(this.gamesAllHome.length>0||this.gamesAllAway.length>0){if(this.updateTrend+=1,this.infavoragainst=e,this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}))if(this.teamselected==this.currentGame.home_team){const a=`REQ-ORCH-HOME-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;console.log(`[${a}] GSCCornersGeneralTrend - Llamando requestOrchestrator (HOME):`,{games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game}),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game})}else{const a=`REQ-ORCH-AWAY-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;console.log(`[${a}] GSCCornersGeneralTrend - Llamando requestOrchestrator (AWAY):`,{games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game}),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game})}}else this.infavoragainst=e}},game:{immediate:!0,handler(e,r){this.createStorageGame(),this.showdefault?this.initializeEmptyData():this.getDataCorners(e)}},teamselected:{immediate:!0,async handler(e,r){if(this.showdefault){this.updateConnections+=1,this.updateTrend+=1,this.touchDataSelected=[],this.positionsDataSelected=[],this.totalDataCollection[this.currentGame.id]||this.createStorageGame();return}if(r===void 0&&e!==void 0){(this.gamesAllHome.length>0||this.gamesAllAway.length>0)&&(this.fillFilterGamesReset(),this.fillFilterPlayersReset(),this.updateConnections+=1);return}e!==void 0&&e!==r&&(this.updateConnections+=1,this.updateTrend+=1,this.touchDataSelected=[],this.gamesAllHome.length!=0&&this.gamesAllAway.length!=0&&(this.teamselected==this.currentGame.home_team?this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(console.log("requestOrchestrator 666666666666666666666666666666666666666666666666666666666666666666666666"),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})):this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(console.log("requestOrchestrator 55555555555555555555555555555555555555555555555555555555555555555555555"),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame}))),this.fillFilterGamesReset(),this.fillFilterPlayersReset())}},filters:{immediate:!0,handler(e,r){e&&typeof e=="object"?this.localFilters=JSON.parse(JSON.stringify(e)):this.localFilters={isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0}},deep:!0},calculationTouchesData:{immediate:!0,handler(e){this.showCorners=this.calculationTouchesData.filter(r=>r[19]==0).length}},forseason:{handler(e,r){}},forteam:{handler(e,r){}},forgame:{handler(e,r){}},team:{handler(e,r){}},istacticvisible:{handler(e,r){}},showBallGo:{handler(e,r){}},showHeatMap:{handler(e,r){}},ballOnOff:{handler(e,r){}},showdefault:{handler(e,r){}},lateralidad:{handler(e,r){}},tournamentselected:{handler(e,r){},deep:!0},seasonselected:{handler(e,r){},deep:!0}},computed:{currentGame(){return this.showdefault&&(!this.game||this.game===null||Object.keys(this.game||{}).length===0)?this.getDefaultGame():this.game},isGameOnly(){return this.forgame&&!this.forseason&&!this.forteam},calculateTotal(){return this.touchDataSelected.filter(e=>e[19]==0).length},calculationPositionsData(){return this.positionsDataSelected},calculationTouchesData(){let e=[],r=[];if(this.touchDataSelected.length>0){console.log(" ======================= FILTROS FILTERS:::::::::::::::",this.localFilters),this.updateCopyfilter(),this.localFilters.isMoment?r=this.touchDataSelected.filter(v=>this.localFilters.moment.includes(v[17])&&this.localFilters.playingAs.includes(v[14])&&this.localFilters.sections.includes(v[20])&&v[19]==0):r=this.touchDataSelected.filter(v=>this.localFilters.final.includes(v[16])&&this.localFilters.playingAs.includes(v[14])&&this.localFilters.sections.includes(v[20])&&v[19]==0),console.log("666666666666666666666 ==================================== la funcion es : ",r),this.updateGamesListFilter({corners:r}),this.localFilters.games.length>0&&(r=r.filter(v=>this.localFilters.games.includes(v[3]))),console.log("5555555555555555555555 ==================================== la funcion es : ",r),r=r.filter(v=>this.localFilters.cornertype==v[4]),console.log("22222222222222222222222222 ==================================== la funcion es : ",r),this.localFilters.zona.length!=35&&(r=r.filter(v=>this.localFilters.zona.includes(v[12]))),console.log("3333333333333333333333333333333333 ==================================== la funcion es : ",r),console.log("11111111111111111111111111111111111 ==================================== la funcion es : ",r),this.localFilters.whathappened.length!=24&&(r=r.filter(v=>v[5].split(",").map($=>parseInt($)).some($=>this.localFilters.whathappened.includes($))));const a=r.map(v=>v[18]);if(e=this.touchDataSelected.filter(v=>a.includes(v[18])),console.log("777777777 ==================================== la funcion es : ",e),e.length>0){let v=null,$=null,h=new Set;e.forEach(u=>{u[19]===0?(v=u[18],$=u):(u[18]===v&&$&&!h.has(u[18])&&(u[6]=1-$[10],u[7]=1-$[11],h.add(u[18])),$=u)}),console.log("66666666 ==================================== la funcion es : ",e),console.log("888888 ==================================== la funcion es : ",e),e.forEach(u=>{const i=u[5].split(",").map(n=>n.trim()),p=["125","139","131","145"],c=u[0];i.some(n=>p.includes(n))&&!this.adjustedPlays.has(c)&&this.adjustedPlays.add(c)})}}return console.log("==================================== la funcion es : ",e),e},cornersInFavor(){return"-"},cornersAgainst(){return"-"},isMovil(){return this.containerWidth<=768}},methods:{getDefaultGame(){return{id:0,home_team:1,away_team:2,home_acronym:"LOC",away_acronym:"VIS",season:2010,regularSeasonId:2010,logo_home:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",logo_away:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"}},setHeaderStickyListener(){const e=this.$refs.header.getBoundingClientRect().top-1+(window.scrollY||window.pageYOffset);window.onscroll=()=>{(window.scrollY||window.pageYOffset)>e&&(this.areFiltersOpen?this.heightFilters="282px":this.isMovil?this.forteam?this.heightFilters="170px":this.heightFilters="222px":this.heightFilters="123px")}},onChangeShowFilters(e){this.areFiltersOpen=e},fillFilterPlayersReset(){setTimeout(()=>{if(this.infavoragainst){const e=this.forgame?this.infavoragainst?this.teamselected:this.teamselected==this.currentGame.home_team?this.currentGame.away_team||this.currentGame.visiting_team:this.currentGame.home_team:this.teamselected,r=this.touchDataSelected.filter(v=>v[19]==0&&e).map(v=>v[1]),a=[...new Set(r)];this.getFilterTakenCorners({players:a})}},100)},fillFilterGamesReset(){setTimeout(()=>{const e=this.touchDataSelected.filter(a=>a[19]==0).map(a=>a[3]),r=[...new Set(e)];this.getFilterGames({games:r})},100)},updateCopyfilter(){this.copyLastFilters=this.localFilters},fillGameDataTeam(e){const r=this.currentGame;return{teamsIds:[e.home_team,e.visiting_team],label:`${e.matchday_abbreviation.replace("M","J")} ${this.teamsData[r.home_team].acronym} vs ${r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym}`,id:e.game_id,isSelected:!0,dateTimeMillis:Date.parse(e.date_time_utc),rivalTeam:{logo:r.home_team==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,team_id:r.home_team==e.home_team?e.visiting_team:e.home_team,provisional_logo:r.home_team==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,colloquial_name:r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,acronym:r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,team_name:r.home_team==e.home_team?this.teamsData[e.visiting_team].name:this.teamsData[e.home_team].name},roundAbbreviation:e.matchday_abbreviation.replace("M","J")}},fillGameData(e){return{teamsIds:[e.home_team,e.visiting_team],label:`${e.matchday_abbreviation.replace("M","J")} ${this.teamsData[this.teamselected].acronym} vs ${this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym}`,id:e.game_id,isSelected:!0,dateTimeMillis:Date.parse(e.date_time_utc),rivalTeam:{logo:this.teamselected==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,team_id:this.teamselected==e.home_team?e.visiting_team:e.home_team,provisional_logo:this.teamselected==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,colloquial_name:this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,acronym:this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,team_name:this.teamselected==e.home_team?this.teamsData[e.visiting_team].name:this.teamsData[e.home_team].name},roundAbbreviation:e.matchday_abbreviation.replace("M","J")}},updatePlayerListFilter(e){if(this.infavoragainst){let r={},a=[];for(let v=0;v<e.corners.length;v++){const $=e.corners[v];if($[19]===0&&$[2]===this.teamselected){const h=$[1],u=this.playersData[h];h in r||(r[h]=u,a.push(u))}}if(this.filterPlayersAvailable=a,e.players.length>0&&this.filterPlayersAvailable.length>0)for(let v=0;v<this.filterPlayersAvailable.length;v++)e.players.includes(this.filterPlayersAvailable[v].id)?this.filterPlayersAvailable[v].isSelected=!0:this.filterPlayersAvailable[v].isSelected=!1}},updateGamesListFilter(e){if(!this.forgame){this.filterGamesAvailable=[];const r=this.obtenerIDsGames(e.corners);this.forseason?this.teamselected==this.currentGame.home_team?this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllHome.find($=>$.game_id===a);if(v)return this.fillGameData(v)}):this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllAway.find($=>$.game_id===a);if(v)return this.fillGameData(v)}):this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllHome.find($=>$.game_id===a);if(v)return this.fillGameDataTeam(v)})}if(this.localFilters.games.length>0&&this.filterGamesAvailable.length>0)for(let r=0;r<this.filterGamesAvailable.length;r++)this.localFilters.games.includes(this.filterGamesAvailable[r].id)?this.filterGamesAvailable[r].isSelected=!0:this.filterGamesAvailable[r].isSelected=!1},getResetPlayers(){for(let e in this.playersData)this.playersData[e].isSelected=!0},getFilterZone(e){this.localFilters.zona=e,this.localFilters.isZoneFull=e.length===35},getFilterHowWasCorner(e){this.localFilters.cornertype=e.cornertype,this.localFilters.howWas=e.howWas},getFilterTakenCorners(e){const r=Array.isArray(e.players)?e.players:[];Array.isArray(this.localFilters.players)||(this.localFilters.players=[]),this.arraysAreEqual(this.localFilters.players,r)||(this.localFilters.players=r)},arraysAreEqual(e,r){if(!e&&!r)return!0;if(!e||!r||!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==r[a])return!1;return!0},getFilterGames(e){const r=Array.isArray(e.games)?e.games:[];Array.isArray(this.localFilters.games)||(this.localFilters.games=[]),this.areGamesIdsArraysContentEqual(this.localFilters.games,r)||(this.localFilters.games=r,this.fillFilterPlayersReset())},areGamesIdsArraysContentEqual(e,r){return!e&&!r?!0:!e||!r||!Array.isArray(e)||!Array.isArray(r)?!1:e.length===r.length&&e.every((a,v)=>a===r[v])},getFilterDetails(e){this.localFilters.playingAs=e.playingAs,this.localFilters.sections=e.sections,this.fillFilterGamesReset(),this.fillFilterPlayersReset()},getFilterResultsByTime(e){this.localFilters.final=e.final,this.localFilters.isMoment=e.isMoment,this.localFilters.moment=e.moment,this.fillFilterGamesReset(),this.fillFilterPlayersReset()},getFilterWhatHappened(e){this.localFilters.whathappened=e,this.localFilters.isWhatHappenedFull=e.length===24},obtenerIDsGames(e){return[...new Set(e.map(r=>r[3]))]},async getInFavorAgainstTeam(e){if(this.showdefault){this.updateTrend+=1,this.infavoragainst=e;return}this.updateTrend+=1,this.infavoragainst=e,this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(this.teamselected==this.currentGame.home_team?(console.log("requestOrchestrator 44444444444444444444444444444444444444444444444444444444444"),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})):(console.log("requestOrchestrator 3333333333333333333333333333333333333333333333333333333333333"),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})))},async getTeamSelected(e){},async fetchDataTeam(e,r){document.body.classList.add("no-scroll"),console.log("44444 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ");try{return(await r.get(e)).data}catch(a){throw console.error("Error al obtener datos:",a),a}},async requestOrchestrator(e){if(console.log("LATERALIDAD DEL COMPONENTE: ",this.lateralidad," TEAM SELECTED DEL COMPONENETE: ",this.teamselected," ES A FAVOR: ",this.infavoragainstteam),console.log("11111 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e),this.showdefault){this.loadDummyDataForTeam(e);return}console.log("PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e);let r=!1;(this.forgame||this.forseason)&&(r=this.teamselected===this.currentGame.home_team);let a=[],v=[];const $=S2.create({headers:{Authorization:`${this.token}`}});for(let i=0;i<e.games.length;i++)this.seasonId=e.games[i].season_id,a.push(e.inFavor?"https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/"+e.games[i].season_id+"/corners/trends/teams/"+e.team+"/"+e.games[i].game_id:"https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/"+e.games[i].season_id+"/corners/trends/teams/"+e.team+"/"+e.games[i].game_id+"?isR=1");v=a.map(i=>this.fetchDataTeam(i,$));let h=[],u=[];try{this.isLoading=!0;const i=this.forgame?r?await Promise.all(v):await Promise.all(v):this.inFavor?this.inFavorResponses||await Promise.all(v):this.againstResponses||await Promise.all(v);this.forgame||this.forseason?r?this.homeTeamResponses||(this.homeTeamResponses=i):this.awayTeamResponses||(this.awayTeamResponses=i):e.inFavor?this.inFavorResponses||(this.inFavorResponses=i):this.againstResponses||(this.againstResponses=i);for(let p=0;p<i.length;p++)i[p].data=this.changeLateralityCoordenatesPlays(i[p].data,!1),i[p].field_positions=this.changeLateralityCoordenatesPlays(i[p].field_positions,!0),h=h.concat(i[p].data),u=u.concat(i[p].field_positions),this.getDataPlayers(i[p].players),this.getDataPlayers(i[p].rival_players),this.getDataTeams(i[p].teams),this.getSeasonByGame({season:i[p]&&i[p].hasOwnProperty("season_name")?i[p].season_name:"",game:i[p].data[0]?i[p].data[0][3]:0}),this.getMatchByGame({match:i[p]&&i[p].hasOwnProperty("matchday_abbreviation")?i[p].matchday_abbreviation:"",game:i[p].data[0]?i[p].data[0][3]:0}),this.getRivalsByGame({rival:this.infavoragainstteam?this.teamselected==i[p].teams[0].team_id?i[p].teams[1].name:i[p].teams[0].name:this.teamselected==i[p].teams[0].team_id?i[p].teams[0].name:i[p].teams[1].name,game:i[p].data[0]?i[p].data[0][3]:0,team:this.teamselected,favor:this.infavoragainstteam});this.touchDataSelected=h,console.log("LOS TOCUH SELECTED SON: ",this.touchDataSelected),this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch=h,this.positionsDataSelected=u,this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions=u}catch(i){console.error("Error al obtener datos:",i)}finally{this.isLoading=!1,document.body.classList.remove("no-scroll")}console.log("this.totalDataCollection LATERALIDAD DEL COMPONENTE: ",this.lateralidad," TEAM SELECTED DEL COMPONENETE: ",this.teamselected," ES A FAVOR: ",this.infavoragainstteam,this.totalDataCollection)},getRowMatrix(e,r){let a=.01351,v=.02439,$=0,h=0,u=[];const i=r.length;let p=Math.floor(i/10);for(;$<74;)h=r.filter(c=>c[0]>=$*a&&c[0]<=($+1)*a&&c[1]>=e*v&&c[1]<=(e+1)*v).map(c=>c[1]).length,p=p===0?1:p,u.push(parseFloat((h/p).toFixed(4))),$++;return u.reverse()},getEmptyArray(e){return Array.from({length:e},()=>0)},getMatrix(e){let r=[this.getEmptyArray(74),this.getEmptyArray(74)],a=[],v=39;for(;v>0&&v<=39;)a=this.getRowMatrix(v,e),r.push(a),v--;return r.push(this.getEmptyArray(74),this.getEmptyArray(74)),r},getSoftData(e,r,a){const v=[];let $=0,h=0;v.push(e[0]);for(let u=1;u<a-1;u++){const i=[];i.push(e[u][0]);for(let p=1;p<r-1;p++)$=e[u][p-1],h=e[u][p+1],i.push($+.5*(e[u][p]+h-$));i.push(e[u][r-1]),v.push(i)}v.push(e[a-1]);for(let u=1;u<r-1;u++)for(let i=1;i<a-1;i++)$=v[i-1][u],h=v[i+1][u],v[i][u]=$+.5*(v[i][u]+h-$);return v},changeLateralityCoordenatesPlays(e,r){return r?e.forEach((a,v)=>{let $=0,h=0;this.infavoragainst?($=a[2]===this.teamselected?1-a[3]:a[3],h=a[2]===this.teamselected?1-a[4]:a[4]):($=a[2]===this.teamselected?a[3]:1-a[3],h=a[2]===this.teamselected?a[4]:1-a[4]),e[v][3]=$,e[v][4]=h}):e.forEach((a,v)=>{let $=0,h=0,u=0,i=0,p=0,c=0;a[19]!=0?this.infavoragainst?($=a[2]===this.teamselected?a[6]:1-a[6],h=a[2]===this.teamselected?1-a[7]:a[7],u=a[2]===this.teamselected?a[8]:1-a[8],i=a[2]===this.teamselected?1-a[9]:a[9],p=a[2]===this.teamselected?a[10]:1-a[10],c=a[2]===this.teamselected?1-a[11]:a[11]):($=a[2]===this.teamselected?1-a[6]:a[6],h=a[2]===this.teamselected?a[7]:1-a[7],u=a[2]===this.teamselected?1-a[8]:a[8],i=a[2]===this.teamselected?1-a[9]:a[9],p=a[2]===this.teamselected?1-a[10]:a[10],c=a[2]===this.teamselected?1-a[11]:a[11]):($=1-a[6],h=a[7],u=1-a[8],i=a[9],p=1-a[10],c=a[11]),e[v][6]=$,e[v][7]=h,e[v][8]=u,e[v][9]=i,e[v][10]=p,e[v][11]=c}),e},changeLateralityPlays(e){e.field_positions=e.field_positions.map(a=>[...a.slice(0,3),a[4],a[3],...a.slice(5)]);let r=[];return e.data.forEach(a=>{a[19]===0&&r.push([a[0],a[13],a[14],a[15]])}),r.forEach(a=>{e.field_positions.filter(v=>a[0]===v[7]&&this.teamselected===v[2]).forEach(v=>{let $=v[3],h=v[4];(e.homeTeamAtkDirection===1&&a[3]===1||e.homeTeamAtkDirection===2&&a[3]===2||e.homeTeamAtkDirection===1&&a[3]===3||e.homeTeamAtkDirection===2&&a[3]===4)&&($=1-$,h=1-h),v[3]=$,v[4]=h})}),e.field_positions},createStorageGame(){const e=this.currentGame;if(this.totalDataCollection[e.id]={},this.totalDataCollection[e.id][e.home_team]={},this.totalDataCollection[e.id][e.home_team].InFavor={},this.totalDataCollection[e.id][e.home_team].InFavor.touch=[],this.totalDataCollection[e.id][e.home_team].InFavor.positions=[],this.totalDataCollection[e.id][e.home_team].Against={},this.totalDataCollection[e.id][e.home_team].Against.touch=[],this.totalDataCollection[e.id][e.home_team].Against.positions=[],this.forgame||this.forseason){const r=e.away_team||e.visiting_team;this.totalDataCollection[e.id][r]={},this.totalDataCollection[e.id][r].InFavor={},this.totalDataCollection[e.id][r].InFavor.touch=[],this.totalDataCollection[e.id][r].InFavor.positions=[],this.totalDataCollection[e.id][r].Against={},this.totalDataCollection[e.id][r].Against.touch=[],this.totalDataCollection[e.id][r].Against.positions=[]}},validateDataLocalStorage(e){return this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch.length>0&&this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions.length>0?(this.touchDataSelected=this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch,this.positionsDataSelected=this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions,!1):!0},getGamesByTeam(e){this.forseason?e.type=="home"?this.gamesAllHome=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1}):this.gamesAllAway=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1}):this.forgame?e.type=="home"?this.gamesAllHome=e.games.filter(function(r){return r.game_id==e.game.id}):this.gamesAllAway=e.games.filter(function(r){return r.game_id==e.game.id}):this.gamesAllHome=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1})},async getDataCorners(e){if(this.showdefault){this.loadDummyData();return}console.log("33333 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e);const r=S2.create({headers:{Authorization:`${this.token}`}}),a="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons="+(e.season||e.season_id);if(this.lastGamesBySeasonUrl===a)return;this.lastGamesBySeasonUrl=a;let v=await r.get(a);v.data.data[0].games.filter($=>$.game_status===1).length===0?(this.regularflag=!0,v=await r.get("https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons="+this.currentGame.regularSeasonId)):this.regularflag=!1,this.forseason?(this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,type:"home"}),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.away_team||e.visiting_team,type:"away"}),this.validateDataLocalStorage({team:this.currentGame.home_team,inFavor:!0,game:this.currentGame})&&(console.log("requestOrchestrator 888888888888888888888888888888888888888888888888888888888888888888888888888888"),await this.requestOrchestrator({games:this.gamesAllHome,team:this.currentGame.home_team,inFavor:!0,game:this.currentGame}))):this.forgame?(this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,game:this.currentGame,type:"home"}),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.away_team||e.visiting_team,game:this.currentGame,type:"away"}),this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame})&&(console.log("VALORES --> requestOrchestrator 999999999999999999999999999999999999999999999999999999999",{games:this.teamselected==e.visiting_team?this.gamesAllAway:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}),await this.requestOrchestrator({games:this.teamselected==e.visiting_team?this.gamesAllAway:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}))):(console.log("requestOrchestrator 999999999999999999999999999999999999999999999999999999999"),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,type:"home"}),this.validateDataLocalStorage({team:e.home_team,inFavor:!0,game:this.currentGame})&&(console.log("requestOrchestrator 777777777777777777777777777777777777777777777777777777777777777777777"),await this.requestOrchestrator({games:this.gamesAllHome,team:e.home_team,inFavor:!0,game:this.currentGame})))},obtenerNombreAbreviado(e){let r=e.split(", ");if(r.length!==2)return e;let a=r[0],v=r[1],$=a.split(" ")[0];return v.charAt(0).toUpperCase()+". "+$},getDataPlayers(e){for(let r=0;r<e.length;r++)this.playersData.hasOwnProperty(e[r].player_id)||(this.playersData[e[r].player_id]={name:this.obtenerNombreAbreviado(e[r].name),last_name:e[r].name.includes(",")?e[r].name.split(",")[0].trim():"",first_name:e[r].name.includes(",")?e[r].name.split(",")[1].trim():"",img:e[r].photo,photo:e[r].photo,position:e[r].position_id,positions:[e[r].position_id],id:e[r].player_id,player_id:e[r].player_id,team_id:e[r].team_id,team:e[r].team_id,nationality_id:e[r].nationality_id,nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[r].nationality_id+".jpg",jersey:e[r].jersey,isSelected:!0})},getSeasonByGame(e){e.season!=""?this.seasonsByGame[e.game]=e.season:this.seasonsByGame[e.game]="-"},getMatchByGame(e){e.match!=""?this.matchesByGame[e.game]=e.match.replace("M","J"):this.matchesByGame[e.game]="-"},getRivalsByGame(e){this.rivalsByGame[e.favor?"InFavor":"Against"]?this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]?this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival:(this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival):(this.rivalsByGame[e.favor?"InFavor":"Against"]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival)},getDataTeams(e){for(let r=0;r<e.length;r++)this.teamsData.hasOwnProperty(e[r].team_id)||(this.teamsData[e[r].team_id]={name:e[r].name,acronym:e[r].acronym,img:"https://golstatsimages.blob.core.windows.net/teams-80/"+e[r].team_id+".png",id:e[r].team_id})},getTypePlay(e){typeof e=="string"&&(this.typePlay=e)},clickOpenModal(){this.openModal=!this.openModal,document.body.classList.add("no-scroll")},clickCloseFinal(){this.openModal=!1,document.body.classList.remove("no-scroll")},onCornersFilled({corners:e,cornersAgainst:r}){this.teamCorners={corners:e,cornersAgainst:r}},onOpenMediaPlayer(e){this.$emit("open-media-player",e)},onOpenMediaPlayerJson(e){let r={seasonId:this.seasonId,mainSectionType:1,playListType:3,categoryIds:this.forgame?[e.id]:this.infavoragainst?[e.id]:[e.rId+"_r"],gameIds:this.forgame?[this.currentGame.id]:null,playerIds:[],goalkeeperIds:[],teamId:this.forgame?this.infavoragainst?this.teamselected:this.teamselected==this.currentGame.home_team?this.currentGame.away_team||this.currentGame.visiting_team:this.currentGame.home_team:this.teamselected,matchResult:[1,2,3],playData:{},advancedFilter:{playListTitle:""}};this.$emit("open-media-player",r)},initializeEmptyData(){this.isLoading=!0;const e=this.currentGame;this.createStorageGame(),this.touchDataSelected=[],this.positionsDataSelected=[],this.playersData={},this.teamsData={},this.gamesAllHome=[],this.gamesAllAway=[],e.home_team&&(this.teamsData[e.home_team]={name:"Equipo Local",acronym:e.home_acronym||"LOC",img:e.logo_home||`https://golstatsimages.blob.core.windows.net/teams-80/${e.home_team}.png`,id:e.home_team});const r=e.away_team||e.visiting_team;r&&(this.teamsData[r]={name:"Equipo Visitante",acronym:e.away_acronym||e.visiting_team_acronym||"VIS",img:e.logo_away||`https://golstatsimages.blob.core.windows.net/teams-80/${r}.png`,id:r}),this.totalDataCollection[e.id]||this.createStorageGame(),this.totalDataCollection[e.id][this.teamselected]=this.totalDataCollection[e.id][this.teamselected]||{},this.totalDataCollection[e.id][this.teamselected].InFavor=this.totalDataCollection[e.id][this.teamselected].InFavor||{},this.totalDataCollection[e.id][this.teamselected].Against=this.totalDataCollection[e.id][this.teamselected].Against||{},this.totalDataCollection[e.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].touch=[],this.totalDataCollection[e.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].positions=[],this.updateTrend+=1,this.isLoading=!1,document.body.classList.remove("no-scroll")},loadDummyDataForTeam(e){this.isLoading=!0;const r=this.generateDummyDataForTeam(e);this.processDummyData(r),this.isLoading=!1,document.body.classList.remove("no-scroll")},generateDummyData(){const e=this.currentGame,r=e.id||90441,a=this.teamselected||e.home_team,v=e.season||e.season_id||2010,$=[];for(let p=0;p<15;p++){const c=[1,2,3][p%3],n=[1,2][p%2],k=[1,2,3,4,5,6][p%6],T=p%35+1,x=["120","126","327","133"][p%4];$.push([p+1,p+100,a,r,31,x,.3+p*.05,.4+p*.03,.5+p*.05,.5+p*.03,.6+p*.05,.6+p*.03,T,p*100+1e3,n,Math.floor(p/3)+1,c,c,p+1,0,k])}const h=[];for(let p=0;p<15;p++){const c=p*100+1e3;h.push([r,p+100,a,.4+p*.05,.5+p*.03,c,p%35+1,p+1,Math.floor(p/2)+1])}const u=[];for(let p=0;p<5;p++)u.push({player_id:p+100,name:`Jugador, Dummy ${p+1}`,photo:`https://golstatsimages.blob.core.windows.net/teams-80/${a}.png`,position_id:1,team_id:a,nationality_id:1,jersey:p+1});const i=[{team_id:e.home_team,name:"Equipo Local",acronym:e.home_acronym||"LOC"},{team_id:e.away_team||e.visiting_team,name:"Equipo Visitante",acronym:e.away_acronym||e.visiting_team_acronym||"VIS"}];return{data:$,field_positions:h,players:u,rival_players:[],teams:i,season_name:`Temporada ${v}`,matchday_abbreviation:"J1"}},generateDummyDataForTeam(e){const r=this.currentGame,a=e.game.id||r.id,v=e.team,$=r.season||r.season_id||2010,h=[];for(let c=0;c<15;c++){const n=[1,2,3][c%3],k=[1,2][c%2],T=[1,2,3,4,5,6][c%6],x=c%35+1,d=["120","126","327","133"][c%4];h.push([c+1,c+100,v,a,31,d,.3+c*.05,.4+c*.03,.5+c*.05,.5+c*.03,.6+c*.05,.6+c*.03,x,c*100+1e3,k,Math.floor(c/3)+1,n,n,c+1,0,T])}const u=[];for(let c=0;c<15;c++){const n=c*100+1e3;u.push([a,c+100,v,.4+c*.05,.5+c*.03,n,c%35+1,c+1,Math.floor(c/2)+1])}const i=[];for(let c=0;c<5;c++)i.push({player_id:c+100,name:`Jugador, Dummy ${c+1}`,photo:`https://golstatsimages.blob.core.windows.net/teams-80/${v}.png`,position_id:1,team_id:v,nationality_id:1,jersey:c+1});const p=[{team_id:r.home_team,name:"Equipo Local",acronym:r.home_acronym||"LOC"},{team_id:r.away_team||r.visiting_team,name:"Equipo Visitante",acronym:r.away_acronym||r.visiting_team_acronym||"VIS"}];return{data:h,field_positions:u,players:i,rival_players:[],teams:p,season_name:`Temporada ${$}`,matchday_abbreviation:"J1"}},processDummyData(e){let r=[],a=[];e.data=this.changeLateralityCoordenatesPlays(e.data,!1),e.field_positions=this.changeLateralityCoordenatesPlays(e.field_positions,!0),r=r.concat(e.data),a=a.concat(e.field_positions),this.getDataPlayers(e.players),this.getDataPlayers(e.rival_players),this.getDataTeams(e.teams);const v=this.currentGame,$=e.data[0]?e.data[0][3]:v.id;this.getSeasonByGame({season:e.season_name,game:$}),this.getMatchByGame({match:e.matchday_abbreviation,game:$}),this.getRivalsByGame({rival:this.infavoragainst?this.teamselected==e.teams[0].team_id?e.teams[1].name:e.teams[0].name:this.teamselected==e.teams[0].team_id?e.teams[0].name:e.teams[1].name,game:$,team:this.teamselected,favor:this.infavoragainst}),this.touchDataSelected=r,this.positionsDataSelected=a,this.totalDataCollection[v.id]||this.createStorageGame(),this.totalDataCollection[v.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].touch=r,this.totalDataCollection[v.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].positions=a,this.gamesAllHome.length===0&&(this.gamesAllHome=[{game_id:v.id,season_id:v.season||v.season_id||2010,home_team:v.home_team,visiting_team:v.away_team||v.visiting_team,matchday_abbreviation:"J1",date_time_utc:new Date().toISOString(),game_status:1}]),this.gamesAllAway.length===0&&(this.gamesAllAway=[{game_id:v.id,season_id:v.season||v.season_id||2010,home_team:v.home_team,visiting_team:v.away_team||v.visiting_team,matchday_abbreviation:"J1",date_time_utc:new Date().toISOString(),game_status:1}])}},mounted(){console.log("GSCCornersGeneralTrend - mounted - Props iniciales:",{game:this.game,forseason:this.forseason,forteam:this.forteam,forgame:this.forgame,team:this.team,teamselected:this.teamselected,istacticvisible:this.istacticvisible,infavoragainstteam:this.infavoragainstteam,lateralidad:this.lateralidad,showBallGo:this.showBallGo,showHeatMap:this.showHeatMap,ballOnOff:this.ballOnOff,showdefault:this.showdefault,filters:this.filters,tournamentselected:this.tournamentselected,seasonselected:this.seasonselected}),this.filters&&typeof this.filters=="object"?this.localFilters=JSON.parse(JSON.stringify(this.filters)):this.localFilters={isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0},this.showdefault?this.initializeEmptyData():(this.isLoading=!0,document.body.classList.add("no-scroll")),this.setHeaderStickyListener();const e=()=>{const r=document.querySelector(".gsc-set-piece");r?this.containerWidth=r.clientWidth:setTimeout(()=>{},400)};window.addEventListener("resize",e),this.$nextTick(e)}},RG=()=>{t.useCssVars(e=>({cd9647f4:e.heightFilters}))},UG=UP.setup;UP.setup=UG?(e,r)=>(RG(),UG(e,r)):RG;const qKe={class:"gsc-set-piece"},jKe={ref:"header",class:"gsc-set-piece__header"};function WKe(e,r,a,v,$,h){const u=t.resolveComponent("GSCTrend");return t.openBlock(),t.createElementBlock("div",qKe,[t.createElementVNode("div",jKe,null,512),(t.openBlock(),t.createBlock(u,{"players-data":$.playersData,"teams-data":$.teamsData,"tournament-selected":a.tournamentselected,"touch-all-data":h.calculationTouchesData,"field-positions-all":h.calculationPositionsData,"width-container":$.containerWidth,"in-favor":a.infavoragainstteam,"for-game":a.forgame,"home-team":h.currentGame.home_team,"away-team":h.currentGame.away_team||h.currentGame.visiting_team,"acronym-home":h.currentGame.home_acronym,"acronym-away":h.currentGame.away_acronym||h.currentGame.visiting_team_acronym,team:a.teamselected,"type-play":$.typePlay,selected_category:$.localFilters.cornertype,"is-tactic-visible":a.istacticvisible,lateralidad:a.lateralidad,"show-ball-go":a.showBallGo,"show-heat-map":a.showHeatMap,"ball-on-off":a.ballOnOff,showdefault:a.showdefault,"onUpdate:showBallGo":r[0]||(r[0]=i=>e.$emit("update:showBallGo",i)),"onUpdate:showHeatMap":r[1]||(r[1]=i=>e.$emit("update:showHeatMap",i)),key:$.updateTrend},null,8,["players-data","teams-data","tournament-selected","touch-all-data","field-positions-all","width-container","in-favor","for-game","home-team","away-team","acronym-home","acronym-away","team","type-play","selected_category","is-tactic-visible","lateralidad","show-ball-go","show-heat-map","ball-on-off","showdefault"]))])}const FG=t9(UP,[["render",WKe],["__scopeId","data-v-f232a086"]]),FP="/icons/icn-play.png",DKe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},KKe={key:1},BKe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},XKe=["fill"],GKe={key:0,class:"checkbox__teams"},ZKe={class:"checkbox__teams__logo"},JKe=["src"],HKe={class:"checkbox__teams__logo"},YKe=["src"],QKe={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",KKe,[(t.openBlock(),t.createElementBlock("svg",BKe,[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,XKe)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",GKe,[t.createElementVNode("div",ZKe,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,JKe)]),t.createElementVNode("div",HKe,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,YKe)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},IP=DKe(QKe,[["__scopeId","data-v-b6f124d8"]]),j6=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},$Ke={class:"gsc-playpc-contshileds"},eBe={class:"title-game-vs-playpc"},tBe={class:"score-game-vs-playpc"},rBe={class:"date-game-vs-playpc"},aBe={class:"arrow-game-vs-playpc"},nBe={key:0,"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iBe={key:1,"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oBe={key:0,class:"gsc-container-plays-hidden-title"},sBe=["onClick"],lBe={class:"gsc-itemplaypc-play-number"},cBe={class:"gsc-itemplaypc-play-info"},uBe={class:"gsc-itemplaypc-play-infodata text-1"},dBe={key:0,class:"gsc-itemplaypc-play-infodata text-2"},pBe={class:"gsc-itemplaypc-play-infodata text-1"},hBe={key:0},fBe={__name:"GSCItemPlayPC",props:{game:{type:Object,default:()=>({})},isAgainstMode:{type:Boolean,default:!1}},setup(e){const r=e,a=t.computed(()=>r.game.isExpanded),v=t.computed(()=>r.game.date.split("-").reverse().join("/")),$=t.computed(()=>{let u=[];r.isAgainstMode?(r.game.corners.forEach(p=>{p.isSelected=!1}),u=r.game.cornersAgainstTeam.filter(p=>p.isVisible)):(r.game.cornersAgainstTeam.forEach(p=>{p.isSelected=!1}),u=r.game.corners.filter(p=>p.isVisible));const i=u[0];return i&&(i.isSelected=!0),u.sort((p,c)=>p.momentOfPlayNumber-c.momentOfPlayNumber)});function h(u){r.game[`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(i=>{i.isSelected=i.play_id===u.play_id})}return(u,i)=>e.game.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-item-play-pc",style:t.normalizeStyle(e.game.isSelected?"border: 1px solid #e9ffaf !important":"border: none !important; padding-bottom: 0px !important; margin-bottom 0px !important;")},[t.createElementVNode("div",{class:"gsc-item-play-pc-container-title",style:t.normalizeStyle(e.game.isSelected?"":"border: none !important; padding-bottom: 0px !important; margin-bottom 0px !important;")},[t.createElementVNode("div",$Ke,[t.createElementVNode("div",{class:"gsc-playpc-contshileds-home",style:t.normalizeStyle({backgroundImage:`url(${e.game.home_team_logo})`})},null,4),t.createElementVNode("div",{class:"gsc-playpc-contshileds-away",style:t.normalizeStyle({backgroundImage:`url(${e.game.visiting_team_logo})`})},null,4)]),t.createElementVNode("div",eBe,t.toDisplayString(e.game.home_team_acronym)+" vs "+t.toDisplayString(e.game.visiting_team_acronym),1),t.createElementVNode("div",tBe,t.toDisplayString(e.game.score[0])+" - "+t.toDisplayString(e.game.score[1]),1),t.createElementVNode("div",rBe,t.toDisplayString(v.value),1),t.createElementVNode("div",aBe,[a.value?(t.openBlock(),t.createElementBlock("svg",nBe,[...i[0]||(i[0]=[t.createElementVNode("path",{"data-v-b548a08d":"",d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:"#9ca3af",transform:"rotate(90 5.36523 6.26377)"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",iBe,[...i[1]||(i[1]=[t.createElementVNode("path",{"data-v-b548a08d":"",d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:"#9ca3af",transform:"rotate(270 5.36523 6.26377)"},null,-1)])]))])],4),a.value?(t.openBlock(),t.createElementBlock("div",oBe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(p,c)=>(t.openBlock(),t.createElementBlock("div",{key:p.play_id,class:t.normalizeClass(["gsc-item-play-pc-container-play",{"is-selected":p.isSelected}]),onClick:t.withModifiers(n=>h(p),["stop"])},[t.createElementVNode("div",lBe,t.toDisplayString(c+1)+"/"+t.toDisplayString($.value.length),1),t.createElementVNode("div",cBe,[t.createElementVNode("div",uBe,t.toDisplayString(p.formattedMomentOfPlay),1),p&&p.player?(t.openBlock(),t.createElementBlock("div",dBe," Tiro de esquina | "+t.toDisplayString(p.player.shortName),1)):t.createCommentVNode("",!0),t.createElementVNode("div",pBe,[t.createTextVNode(t.toDisplayString(p.howWasCornerName)+" ",1),p.whatHappenedName?(t.openBlock(),t.createElementBlock("span",hBe,"|")):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(p.whatHappenedName),1)])])],10,sBe))),128))])):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)}},mBe=j6(fBe,[["__scopeId","data-v-c0f94125"]]),yBe={key:0,class:"gsc-selector-play-pc-title"},gBe={key:1,class:"gsc-selector-play-pc-title"},vBe={class:"gsc-selector-play-pc__filters-text"},bBe={class:"gsc-selector-play-pc-container"},xBe={__name:"GSCSelectorPlayPC",props:{gamesByTeam:{type:Array,default:()=>[]},isAgainstMode:{type:Boolean,default:!1},areFiltersOpen:{type:Boolean,default:!1}},setup(e){const r=e;function a(v){if(v.isExpanded){v.isExpanded=!1;return}else if(v.isSelected){v.isExpanded=!0;return}if(r.gamesByTeam.forEach($=>{$.isExpanded=!1}),v.isExpanded=!0,!v.isSelected){const $=`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`;r.gamesByTeam.forEach(h=>{h.isSelected=!1,h[$].forEach(u=>{u.isSelected=!1})}),v.isSelected=!0,v.isExpanded=!0}}return(v,$)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-selector-play-pc",style:t.normalizeStyle(e.areFiltersOpen?"height: 478px;":"")},[e.isAgainstMode?(t.openBlock(),t.createElementBlock("div",yBe,"Elige una jugada:")):(t.openBlock(),t.createElementBlock("div",gBe,"Elige un partido:")),t.withDirectives(t.createElementVNode("div",vBe,[...$[0]||($[0]=[t.createElementVNode("div",null,"Solo se muestran jugadas que cumplan con los criterios elegidos en los filtros.",-1)])],512),[[t.vShow,e.areFiltersOpen]]),t.createElementVNode("div",bBe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.gamesByTeam,h=>(t.openBlock(),t.createBlock(mBe,{key:h.game_id,game:h,show:h.isSelected,"is-against-mode":e.isAgainstMode,onClick:u=>a(h)},null,8,["game","show","is-against-mode","onClick"]))),128))]),$[1]||($[1]=t.createElementVNode("div",{class:"gsc-selector-play-pc-container-scroll"},[t.createElementVNode("svg",{"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"})],-1))],4))}},_Be=j6(xBe,[["__scopeId","data-v-7dd283c1"]]),wBe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},qP={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))}}},IG=()=>{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}))},qG=qP.setup;qP.setup=qG?(e,r)=>(IG(),qG(e,r)):IG;const TBe=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),SBe=["src"],kBe={key:1,class:"text"},LBe=["src"],EBe={class:"stats"},CBe=TBe(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),NBe={class:"numstats"},OBe={class:"leyend"};function MBe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",$.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([h.customStyle,$.status&&a.typeOnOff&&h.customActive]),onClick:r[0]||(r[0]=(...u)=>h.btnClick&&h.btnClick(...u))},[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,SBe)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",kBe,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,LBe)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...u)=>h.btnClick&&h.btnClick(...u))},[t.createElementVNode("div",EBe,[CBe,t.createElementVNode("div",NBe,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",OBe,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const VBe=wBe(qP,[["render",MBe],["__scopeId","data-v-f3ee6b2b"]]),zBe={class:"gsc-dropdown__main-container__item-selected"},PBe=["height","width"],ABe=["stroke"],RBe={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},UBe=["fill"],FBe={class:"gsc-dropdown__items-container"},IBe=["onClick"],qBe={key:0,class:"gsc-dropdown__items-footer"},jBe={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(r=>r in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(e){return[1,2].includes(e)}}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:r}){const a=e,v=t.ref({}),$=t.ref(null),h=t.ref(a.isMultipleOption?-1:0),u=t.ref(!1);t.watch(()=>a.items,(x,d)=>{if(!a.modelValue&&(!a.onlyFirstTime||!d||!d.length)&&x&&x.length){if(a.defaultItemByProp){const o=a.items.findIndex(l=>l[a.defaultItemByProp.propName]===a.defaultItemByProp.value);o!==-1?(h.value=o,v.value=x[o]):(h.value=0,v.value=x[0])}else v.value=x[a.defaultItemByIndex];r("input",v.value)}},{immediate:!0}),t.watch(()=>a.modelValue,x=>{if(x){const d=a.items.findIndex(o=>typeof x=="object"?JSON.stringify(o)===JSON.stringify(x):o===x);d!==-1&&(h.value=d,v.value=a.items[d],r("update:modelValue",v.value))}},{immediate:!0});const i=t.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),p=t.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(u.value=!u.value)}function n(x){$.value&&!$.value.contains(x.target)&&(u.value=!1)}function k(x,d){a.isMultipleOption?h.value=-1:(h.value=d,u.value=!1),v.value=x,r("input",v.value),r("update:modelValue",v.value)}function T(){u.value=!1,r("click-ready")}return t.onMounted(()=>{document.addEventListener("click",n)}),t.onBeforeMount(()=>{document.removeEventListener("click",n)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"dropDown",ref:$,class:"gsc-dropdown",style:t.normalizeStyle(i.value)},[t.createElementVNode("div",{class:"gsc-dropdown__main-container",style:t.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[t.createElementVNode("div",zBe,[t.renderSlot(x.$slots,"default",{selectedItem:v.value})]),t.createElementVNode("div",{class:t.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":u.value}]),style:t.normalizeStyle(p.value)},[e.iconType===1?(t.openBlock(),t.createElementBlock("svg",{key:0,height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,ABe)],8,PBe)):(t.openBlock(),t.createElementBlock("svg",RBe,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,UBe)]))],6)],4),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",FBe,[t.createElementVNode("div",null,[t.createElementVNode("div",{class:"gsc-dropdown__items",style:t.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-dropdown__items__item",{selected:l===h.value}]),key:l,onClick:s=>k(o,l)},[t.renderSlot(x.$slots,"availableItem",{item:o})],10,IBe)),[[t.vShow,!o.isHidden]])]))),256))],4),e.isFooterVisible?(t.openBlock(),t.createElementBlock("div",qBe,[t.createVNode(t.unref(VBe),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:T})])):t.createCommentVNode("",!0)])],512),[[t.vShow,u.value]])]),_:3})],4))}},WBe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},jP={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,r=this.$refs.content.scrollWidth;r>0&&e>0&&(r>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},jG=()=>{t.useCssVars(e=>({"26acffa8":e.backgroundColor,"3d95bef4":e.height,"86ba1cc0":e.arrowsPosition,"140b6ada":e.arrowsPadding+"px","7df46be5":e.arrowsBackground,"33f99798":e.arrowsHeight*2+"px","1c8a858d":e.arrowsWidth*2+"px","4a7876c9":e.arrowsRadius,"2ff67e63":e.arrowsBorder,"59c5dd08":e.arrowsMargin+"px","6658215d":e.arrowsContainerBgL,66582163:e.arrowsContainerBgR,e5900a2e:e.scrollColor}))},WG=jP.setup;jP.setup=WG?(e,r)=>(jG(),WG(e,r)):jG;const DBe={ref:"gscScrollableContainer",class:"scrollable-container"},KBe={class:"scrollable-arrows"},BBe=["width","height","viewBox"],XBe=["stroke"],GBe={class:"scrollable-wrapper"},ZBe={class:"scrollable-arrows"},JBe=["width","height","viewBox"],HBe=["stroke"];function YBe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",DBe,[a.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",h.hideShowLeftArrow]),onClick:r[0]||(r[0]=(...u)=>h.scrollLeft&&h.scrollLeft(...u))},[t.createElementVNode("div",KBe,[(t.openBlock(),t.createElementBlock("svg",{width:a.arrowsWidth,height:a.arrowsHeight,viewBox:h.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:a.arrowsColor},null,8,XBe)],8,BBe))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:r[1]||(r[1]=(...u)=>h.getScroll&&h.getScroll(...u))},[t.createElementVNode("div",GBe,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),a.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",h.hideShowRightArrow]),onClick:r[2]||(r[2]=(...u)=>h.scrollRight&&h.scrollRight(...u))},[t.createElementVNode("div",ZBe,[(t.openBlock(),t.createElementBlock("svg",{width:a.arrowsWidth,height:a.arrowsHeight,viewBox:h.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:a.arrowsColor},null,8,HBe)],8,JBe))])],2)):t.createCommentVNode("",!0)],512)}const QBe=WBe(jP,[["render",YBe],["__scopeId","data-v-7d0811ac"]]),$Be={class:"gsc-itemplaypc-play-number"},eXe={class:"gsc-itemplaypc-play-info"},tXe={class:"gsc-itemplaypc-play-infodata text-1"},rXe={class:"gsc-itemplaypc-play-infodata text-2"},aXe={class:"gsc-itemplaypc-play-infodata text-1"},nXe={key:0},iXe={__name:"CornerPlayMobile",props:{corner:{type:Object,required:!0},cornerNumber:{type:String,required:!0}},emits:["click-corner"],setup(e,{emit:r}){const a=r;function v(){a("click-corner")}return($,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-item-play-pc-container-play",e.corner.isSelected?"gsc-item-play-pc-container-play-selected":""]),onClick:v},[t.createElementVNode("div",$Be,t.toDisplayString(e.cornerNumber),1),t.createElementVNode("div",eXe,[t.createElementVNode("div",tXe,t.toDisplayString(e.corner.formattedMomentOfPlay),1),t.createElementVNode("div",rXe," Tiro de esquina | "+t.toDisplayString(e.corner.playConnections.mainPlay.player.shortName),1),t.createElementVNode("div",aXe,[t.createTextVNode(t.toDisplayString(e.corner.howWasCornerName)+" ",1),e.corner.whatHappenedName?(t.openBlock(),t.createElementBlock("span",nXe,"|")):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.corner.whatHappenedName),1)])])],2))}},oXe=j6(iXe,[["__scopeId","data-v-7c6dfe22"]]),sXe={class:"gsc-selector-play-mobile"},lXe={key:0,class:"item-selected-container"},cXe={class:"name-macth-select-plays-mobile"},uXe={key:0,class:"item-selected-container"},dXe={class:"name-macth-select-plays-mobile"},pXe={class:"gsc-selector-play-mobile__filters-text"},hXe={key:0,class:"selector-slider"},fXe={__name:"GSCSelectorPlayMobile",props:{gamesByTeam:{type:Array,default:()=>[]},isAgainstMode:{type:Boolean,default:!1},areFiltersOpen:{type:Boolean,default:!1}},setup(e){const r=e,a=t.ref(null);function v(u){a.value&&a.value[`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(i=>{i.isSelected=i.play_id===u.play_id})}function $(u){r.gamesByTeam.forEach(i=>{i.isSelected=!1,i.corners.forEach(p=>{p.isSelected=!1})}),u.isSelected=!0,u.corners[0]&&(u.corners[0].isSelected=!0),a.value=u}const h=t.computed(()=>{if(a.value){let u=[];r.isAgainstMode?(a.value.corners.forEach(p=>{p.isSelected=!1}),u=a.value.cornersAgainstTeam.isVisible):(a.value.cornersAgainstTeam.forEach(p=>{p.isSelected=!1}),u=a.value.corners.filter(p=>p.isVisible));const i=u[0];return i&&(i.isSelected=!0),u}});return(u,i)=>(t.openBlock(),t.createElementBlock("div",sXe,[t.createVNode(t.unref(jBe),{items:e.gamesByTeam,height:"49px",width:"100%","background-color":"#0d1d29","list-background-color":"#243A4C","hover-background-color":"#0d1d29","list-item-selected-background-color":"#0d1d29","list-border-color":"#666","list-item-color":"#FFF","list-item-selected-color":"#CBEE6B","is-list-same-width":!0,color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:$},{default:t.withCtx(({selectedItem:p})=>[p&&p.score?(t.openBlock(),t.createElementBlock("div",lXe,[t.createElementVNode("div",{class:"img-home-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.home_team_logo})`})},null,4),t.createElementVNode("div",cXe,t.toDisplayString(p.home_team_acronym)+" "+t.toDisplayString(p.score[0])+" - "+t.toDisplayString(p.score[1])+" "+t.toDisplayString(p.visiting_team_acronym),1),t.createElementVNode("div",{class:"img-away-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.visiting_team_logo})`})},null,4)])):t.createCommentVNode("",!0)]),availableItem:t.withCtx(({item:p})=>[p&&p.score?(t.openBlock(),t.createElementBlock("div",uXe,[t.createElementVNode("div",{class:"img-home-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.home_team_logo})`})},null,4),t.createElementVNode("div",dXe,t.toDisplayString(p.home_team_acronym)+" "+t.toDisplayString(p.score[0])+" - "+t.toDisplayString(p.score[1])+" "+t.toDisplayString(p.visiting_team_acronym),1),t.createElementVNode("div",{class:"img-away-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.visiting_team_logo})`})},null,4)])):t.createCommentVNode("",!0)]),_:1},8,["items"]),t.createElementVNode("div",null,[i[1]||(i[1]=t.createElementVNode("div",{class:"title-select-plays-mobile"},"Elige una jugada del partido:",-1)),t.withDirectives(t.createElementVNode("div",pXe,[...i[0]||(i[0]=[t.createElementVNode("div",null,"Solo se muestran jugadas que cumplan con los criterios elegidos en los filtros.",-1)])],512),[[t.vShow,e.areFiltersOpen]]),a.value?(t.openBlock(),t.createElementBlock("div",hXe,[t.createVNode(t.unref(QBe),{pxScroll:290,arrowsPadding:5,arrowsWidth:15,arrowsHeight:15,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,height:"90px",arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(p,c)=>(t.openBlock(),t.createBlock(oXe,{"corner-number":`${c+1}/${h.value.length}`,corner:p,key:p.play_id,onClickCorner:n=>v(p)},null,8,["corner-number","corner","onClickCorner"]))),128))]),_:1})])):t.createCommentVNode("",!0)])]))}},mXe=j6(fXe,[["__scopeId","data-v-7d965f0f"]]),yXe=["x1","y1","x2","y2","marker-end"],gXe=["x","y"],vXe=["fill"],bXe=["stroke"],DG=66/202,xXe={__name:"HalfSoccerPlayerPosition",props:{playerPosition:{type:Object,required:!0},teamIdForAnalysis:{type:Number,required:!0},visibleTeamsIds:{type:Array,required:!0},isAgainstCorner:{type:Boolean,default:!1}},emits:["player-position-click"],setup(e,{emit:r}){const a=e,v=r,$=t.computed(()=>a.playerPosition.isHomeTeam?"#336DFF":"#CBEE6B"),h=t.computed(()=>a.playerPosition.isHomeTeam?"#FFFFFF":"#183143"),u=t.computed(()=>k(a.playerPosition)),i=t.computed(()=>T(a.playerPosition,u.value)),p=t.computed(()=>a.playerPosition.finalPlayerPosition?k(a.playerPosition.finalPlayerPosition):null),c=t.computed(()=>a.playerPosition.finalPlayerPosition?T(a.playerPosition.finalPlayerPosition,p.value):null);function n(x){v("player-position-click",{event:x,playerPosition:a.playerPosition})}function k(x){let d=x.y;return a.isAgainstCorner?x.isTeamForAnalysis||(d=1-d):x.isTeamForAnalysis&&(d=1-d),d<=.8?d*404+26:null}function T(x,d){let o=x.x;a.isAgainstCorner?x.isTeamForAnalysis&&(o=1-o):x.isTeamForAnalysis||(o=1-o);const l=d-15;return d!==null?o*(446+DG*l)+(104-DG*l)-12:null}return(x,d)=>e.visibleTeamsIds.includes(e.playerPosition.teamId)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d[2]||(d[2]=t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:"arrowPlayerPosition",markerWidth:"10",markerHeight:"6",refX:"0",refY:"3",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("path",{d:"M0,0 L0,6 L9,3 z",fill:"#cbee6b"})])],-1)),p.value?(t.openBlock(),t.createElementBlock("line",{key:0,style:{stroke:"#cbee6b","stroke-width":"1"},"stroke-dasharray":"2 2",x1:i.value+12,y1:u.value+10,x2:c.value+12,y2:p.value+10,"marker-end":`url(${e.playerPosition.isFinalPosition?"#arrowPlayerPosition":""})`},null,8,yXe)):t.createCommentVNode("",!0),u.value!==null&&e.playerPosition.isFirstPosition?(t.openBlock(),t.createElementBlock("svg",{key:1,class:"half-soccer-player-position",width:"24",height:"21",viewBox:"0 0 24 21",x:i.value,y:u.value,fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n},[t.createElementVNode("path",{d:"M11.7542 15.0781C17.2599 15.0781 21.7232 11.98 21.7232 8.15841C21.7232 4.3368 17.2599 1.23877 11.7542 1.23877C6.24843 1.23877 1.78516 4.3368 1.78516 8.15841C1.78516 11.98 6.24843 15.0781 11.7542 15.0781Z",fill:$.value},null,8,vXe),d[0]||(d[0]=t.createElementVNode("path",{style:{"mix-blend-mode":"multiply"},opacity:"1",d:"M22.4478 18.2913C22.4478 19.5458 17.5475 20.5589 11.5021 20.5589C5.45669 20.5589 0.550781 19.5419 0.550781 18.2913C0.550781 17.0406 5.45108 16.0237 11.4965 16.0237C17.5419 16.0237 22.4422 17.0406 22.4422 18.2913H22.4478Z",fill:"url(#paint0_radial_2418_280062)"},null,-1)),d[1]||(d[1]=t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",{id:"paint0_radial_2418_280062",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(11.9694 18.346) scale(10.7452 2.0575)"},[t.createElementVNode("stop",{offset:"0","stop-color":"#808080"}),t.createElementVNode("stop",{offset:"1","stop-color":"#CCCBCB","stop-opacity":"1"})])],-1)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"8","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"10",stroke:h.value},t.toDisplayString(e.playerPosition.player.jersey),9,bXe)])],8,gXe)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)}},_Xe=j6(xXe,[["__scopeId","data-v-d03899c6"]]),KG=481,wXe=606,BG=210,TXe=BG*2,SXe=88,kXe=wXe-KG,LXe=kXe/BG,WP=18;function aN(e){return e*TXe}function nN(e,r){const a=e*KG,v=r*LXe+a,$=v-a;return v+(SXe-$)}const EXe=["x","y"],CXe=["font-size"],NXe=["x","y"],OXe=["font-size"],MXe=["stroke-dasharray","x1","y1","x2","y2","marker-end"],VXe={__name:"HalfSoccerConnectionPosition",props:{playConnection:{type:Object,required:!0},isAgainstCorner:{type:Boolean,default:!1}},setup(e){const r=e,a=t.computed(()=>aN(r.playConnection.previousPlayConnection?h(r.playConnection.previousPlayConnection.y3,r.playConnection.previousPlayConnection.isTeamForAnalysis):h(r.playConnection.y1,r.playConnection.isTeamForAnalysis))+WP),v=t.computed(()=>nN(r.playConnection.previousPlayConnection?u(r.playConnection.previousPlayConnection.x3,r.playConnection.previousPlayConnection.isTeamForAnalysis):u(r.playConnection.x1,r.playConnection.isTeamForAnalysis),a.value)),$=t.computed(()=>{const i=[],p=r.playConnection.x1===r.playConnection.x2&&r.playConnection.y1===r.playConnection.y2?1:2;let c=aN(r.playConnection.previousPlayConnection?h(r.playConnection.previousPlayConnection.y3,r.playConnection.previousPlayConnection.isTeamForAnalysis):h(r.playConnection.y1,r.playConnection.isTeamForAnalysis));const n=nN(r.playConnection.previousPlayConnection?u(r.playConnection.previousPlayConnection.x3,r.playConnection.previousPlayConnection.isTeamForAnalysis):u(r.playConnection.x1,r.playConnection.isTeamForAnalysis),c);let k=0,T=0;p===2&&(k=aN(h(r.playConnection.y2,r.playConnection.isTeamForAnalysis)),T=nN(u(r.playConnection.x2,r.playConnection.isTeamForAnalysis),k));const x=aN(h(r.playConnection.y3,r.playConnection.isTeamForAnalysis)),d=nN(u(r.playConnection.x3,r.playConnection.isTeamForAnalysis),x);return p===1?i.push({x1:n,y1:c,x2:d,y2:x}):(i.push({x1:n,y1:c,x2:T,y2:k}),i.push({x1:T,y1:k,x2:d,y2:x})),i});function h(i,p=!1){return(!p&&!r.isAgainstCorner||p&&r.isAgainstCorner)&&(i=1-i),i}function u(i,p=!1){return(!p&&!r.isAgainstCorner||p&&r.isAgainstCorner)&&(i=1-i),i}return(i,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[p[2]||(p[2]=t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"0",refY:"3",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("path",{d:"M0,0 L0,6 L9,3 z",fill:"#cbee6b"})]),t.createElementVNode("marker",{id:"bullet",markerWidth:"4",markerHeight:"4",refX:"2",refY:"2",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("circle",{cx:"2",cy:"2",r:"2",fill:"#cbee6b"})])],-1)),e.playConnection.isHomeTeam?(t.openBlock(),t.createElementBlock("svg",{key:0,x:v.value-13,y:a.value-35,width:"28",height:"38",viewBox:"0 0 28 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p[0]||(p[0]=t.createStaticVNode('<g clip-path="url(#clip0_2636_286118)"><path d="M17.012 0.257546C16.7113 -0.184315 16.18 0.0287746 15.5435 0.257546C14.907 0.488162 13.6331 0.452186 13.6331 0.452186C13.6331 0.452186 12.3591 0.488162 11.7226 0.257546C11.0861 0.0287746 10.5548 -0.184315 10.2541 0.257546C10.2052 0.328575 10.0917 0.436504 9.92383 0.572106C11.2799 1.45029 13.6331 1.39033 13.6331 1.39033C13.6331 1.39033 15.9863 1.45029 17.3423 0.572106C17.1744 0.436504 17.0609 0.327653 17.012 0.257546Z" fill="white"></path><path d="M21.3628 19.1451C21.5713 17.5575 21.8388 14.7985 21.8388 14.7985L22.4578 16.0899C24.8636 15.6822 27.2694 14.4092 27.2694 14.4092C27.2694 14.4092 26.1015 10.3577 25.9779 9.50812C25.8543 8.65853 25.9604 4.11263 23.0592 3.37005C20.9588 2.83225 18.886 1.67363 17.7873 0.905221C17.7753 0.896919 17.7652 0.890462 17.7541 0.88216C17.5918 0.767774 17.4534 0.663536 17.3381 0.571289C15.9821 1.44948 13.6298 1.38952 13.6298 1.38952C13.6298 1.38952 11.2775 1.44948 9.92056 0.571289C9.03777 1.28435 6.63751 2.74646 4.19944 3.37097C1.29921 4.11355 1.40529 8.65946 1.28168 9.50905C1.15807 10.3586 -0.00976562 14.4101 -0.00976562 14.4101C-0.00976562 14.4101 2.39602 15.6831 4.80181 16.0908L5.42078 14.7994C5.42078 14.7994 5.75748 18.2669 5.96965 19.6645C6.18182 21.0611 5.56192 24.4576 5.95212 25.9095C6.3414 27.3597 5.42078 30.3143 5.26212 31.0569C5.10253 31.7995 5.13851 33.0033 5.13851 33.0033C5.13851 33.0033 5.88939 33.982 7.66514 34.8298C9.01839 35.4764 10.9657 36.0465 13.6298 36.0465C14.2073 36.0465 14.7497 36.0198 15.2616 35.9709C17.8667 35.7246 19.6313 34.9119 20.718 34.2007C21.6921 33.5632 22.122 33.0042 22.122 33.0042C22.122 33.0042 22.1312 32.674 22.1183 32.2533C22.1054 31.8705 22.0731 31.412 21.9984 31.0578C21.8895 30.5505 21.4265 29.0136 21.2669 27.629C21.1931 26.9833 21.1848 26.3708 21.3084 25.9105C21.5455 25.0249 21.408 23.4143 21.3121 21.9771C21.2512 21.0583 21.2078 20.2096 21.2899 19.6663C21.313 19.515 21.337 19.3397 21.3628 19.1479V19.1451Z" fill="#477BFF"></path><path d="M27.2696 14.4112C27.2696 14.4112 24.8638 15.6842 22.458 16.0919L21.839 14.8005C21.8833 14.211 21.9424 13.6151 22.0198 13.0183C22.1545 11.9906 22.3418 10.9621 22.601 9.97137C22.6462 9.79426 22.6932 9.61991 22.7449 9.44557C22.8593 9.05352 22.9801 8.63933 23.0438 8.22791C23.1268 7.68735 23.1102 7.15417 22.8436 6.68555C22.6831 6.40328 22.4497 6.18189 22.1859 5.99002C21.923 5.79538 21.6306 5.63025 21.3511 5.46144C20.1583 4.73731 19.091 3.80562 18.2101 2.72172C17.6981 2.09168 17.3743 1.32973 17.2793 0.524414C18.1104 1.21718 20.566 2.73372 23.0604 3.37206C25.9615 4.11465 25.8554 8.66055 25.9791 9.51014C26.1027 10.3597 27.2705 14.4112 27.2705 14.4112H27.2696Z" fill="#477BFF"></path><path d="M21.839 14.7995C21.8833 14.21 21.9424 13.6141 22.0198 13.0173C22.1545 11.9897 22.3418 10.9611 22.601 9.9704C22.6462 9.79328 22.6932 9.61894 22.7449 9.44459C22.8593 9.05254 22.9801 8.63836 23.0438 8.22694C23.1268 7.68637 23.1102 7.15319 22.8436 6.68458C22.6831 6.4023 22.4497 6.18091 22.1859 5.98904C21.923 5.7944 21.6306 5.62928 21.3511 5.46047C20.1583 4.73633 19.091 3.80464 18.2101 2.72075C17.6981 2.0907 17.3743 1.32875 17.2793 0.523438" stroke="#382828" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path><path d="M-0.00976562 14.4112C-0.00976562 14.4112 2.39602 15.6842 4.80181 16.0919L5.42078 14.8005C5.3765 14.211 5.31747 13.6151 5.23998 13.0183C5.1053 11.9906 4.91804 10.9621 4.65883 9.97137C4.61363 9.79426 4.56658 9.61991 4.51492 9.44557C4.40054 9.05352 4.27969 8.63933 4.21604 8.22791C4.13302 7.68735 4.14963 7.15417 4.41622 6.68555C4.57673 6.40328 4.81011 6.18189 5.07394 5.99002C5.33684 5.79538 5.62926 5.63025 5.90877 5.46144C7.10151 4.73731 8.1688 3.80562 9.04976 2.72172C9.56173 2.09168 9.88551 1.32973 9.98052 0.524414C9.14938 1.21718 6.69378 2.73372 4.19944 3.37206C1.29921 4.11465 1.40529 8.66055 1.28168 9.51014C1.15807 10.3588 -0.00976562 14.4112 -0.00976562 14.4112Z" fill="#477BFF"></path><path d="M22.1641 15.4726L22.4602 16.0906C24.866 15.6829 27.2717 14.4099 27.2717 14.4099C27.2717 14.4099 27.1915 14.1322 27.0707 13.7061C26.2976 14.0926 24.4066 14.9625 22.1641 15.4717V15.4726Z" fill="#3A63CB"></path><path d="M5.09884 15.4726L4.80273 16.0907C2.39602 15.6839 -0.00976562 14.4109 -0.00976562 14.4109C-0.00976562 14.4109 0.0704888 14.1332 0.191332 13.707C0.964357 14.0935 2.85541 14.9634 5.09792 15.4726H5.09884Z" fill="#3A63CB"></path><path d="M22.1206 32.2529C21.3993 32.9789 18.6005 35.4317 13.6321 35.4317C8.66372 35.4317 5.86405 32.978 5.1436 32.2529C5.13069 32.6745 5.13991 33.0038 5.13991 33.0038C5.13991 33.0038 7.47559 36.0461 13.6321 36.0461C19.7886 36.0461 22.1243 33.0038 22.1243 33.0038C22.1243 33.0038 22.1336 32.6736 22.1206 32.2529Z" fill="#3A63CB"></path><path style="mix-blend-mode:multiply;" d="M21.8438 14.798L22.1666 15.4714L22.4627 16.0895C22.6177 16.0627 22.7727 16.0332 22.9276 16C22.6758 15.1412 22.8197 14.1892 23.0826 13.3193C23.3437 12.455 23.7145 11.6201 23.9165 10.7429C23.9497 10.598 23.7616 10.5049 23.6693 10.6202C23.578 10.7327 23.5051 10.8665 23.4396 10.9965C23.1186 11.6312 22.8382 12.2861 22.5956 12.9549C22.5088 13.1929 22.424 13.4411 22.2579 13.6329C22.1703 13.7335 22.0531 13.8165 21.9268 13.8599C21.8945 14.1735 21.8668 14.4862 21.8438 14.7971V14.798Z" fill="url(#paint0_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M25.3124 9.42413C25.3769 9.29314 25.5697 9.31252 25.6076 9.45273C25.6454 9.59202 25.6592 9.74054 25.6703 9.88444C25.7413 10.8106 25.7395 11.7423 25.6647 12.6684L25.4074 10.5726C25.3899 10.4315 25.2109 10.3844 25.1242 10.497C25.0633 10.5763 25.0126 10.6648 24.9637 10.7516C24.7727 11.0929 24.5818 11.4351 24.3908 11.7764C24.2967 11.9452 24.2026 12.1131 24.1086 12.2819C24.0329 12.4175 23.948 12.6629 23.8281 12.7552C23.8909 12.4563 24.0726 12.1436 24.1934 11.8613C24.3253 11.5523 24.46 11.2451 24.5984 10.9388C24.8281 10.4305 25.0661 9.92503 25.3114 9.42413H25.3124Z" fill="url(#paint1_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M5.42236 14.798L5.0995 15.4714L4.80339 16.0895C4.64841 16.0627 4.49344 16.0332 4.33847 16C4.5903 15.1412 4.4464 14.1892 4.18349 13.3193C3.92244 12.455 3.5516 11.6201 3.34959 10.7429C3.31638 10.598 3.50456 10.5049 3.59681 10.6202C3.68813 10.7327 3.761 10.8665 3.8265 10.9965C4.14752 11.6312 4.42795 12.2861 4.67055 12.9549C4.75727 13.1929 4.84213 13.4411 5.00818 13.6329C5.09581 13.7335 5.21296 13.8165 5.33934 13.8599C5.37163 14.1735 5.3993 14.4862 5.42236 14.7971V14.798Z" fill="url(#paint2_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M1.95086 9.42413C1.88628 9.29314 1.69349 9.31252 1.65567 9.45273C1.61785 9.59202 1.60401 9.74054 1.59294 9.88444C1.52191 10.8106 1.52375 11.7423 1.59847 12.6684L1.85584 10.5726C1.87337 10.4315 2.05233 10.3844 2.13904 10.497C2.19992 10.5763 2.25066 10.6648 2.29955 10.7516C2.4905 11.0929 2.68145 11.4351 2.8724 11.7764C2.96649 11.9452 3.06058 12.1131 3.15467 12.2819C3.23031 12.4175 3.31518 12.6629 3.4351 12.7552C3.37237 12.4563 3.19065 12.1436 3.0698 11.8613C2.93789 11.5523 2.80321 11.2451 2.66484 10.9388C2.43515 10.4305 2.19715 9.92503 1.95178 9.42413H1.95086Z" fill="url(#paint3_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M21.3155 21.9743C21.2546 21.0555 21.2113 20.2068 21.2934 19.6635C21.3164 19.5122 21.3404 19.337 21.3662 19.1451C21.0332 17.8214 20.6541 16.5078 20.2344 15.208C20.5406 17.4717 20.9216 19.7253 21.3155 21.9743Z" fill="url(#paint4_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M5.95113 21.9743C6.01201 21.0555 6.05536 20.2068 5.97327 19.6635C5.9502 19.5122 5.92622 19.337 5.90039 19.1451C6.2334 17.8214 6.61253 16.5078 7.03225 15.208C6.726 17.4717 6.34502 19.7253 5.95113 21.9743Z" fill="url(#paint5_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M19.386 24.2987C20.0621 27.4867 20.5049 30.7255 20.706 33.9772C20.7125 34.0768 20.825 34.1303 20.9062 34.0731C21.6165 33.5814 21.9938 33.158 22.0952 33.0372C22.1137 33.0151 22.1238 32.9883 22.1248 32.9588C22.1266 32.8564 22.1303 32.5815 22.1202 32.2513C22.1072 31.8684 22.075 31.41 22.0002 31.0557C21.8914 30.5502 21.432 29.0226 21.2706 27.6408C21.2696 27.6316 21.2678 27.6223 21.2641 27.614C20.8499 26.4185 20.2964 25.271 19.6184 24.2028C19.5419 24.0828 19.3564 24.1603 19.386 24.2996V24.2987Z" fill="url(#paint6_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M7.87576 24.2987C7.19959 27.4867 6.75681 30.7255 6.55571 33.9772C6.54926 34.0768 6.43672 34.1303 6.35554 34.0731C5.64524 33.5814 5.26795 33.158 5.16648 33.0372C5.14803 33.0151 5.13789 32.9883 5.13696 32.9588C5.13512 32.8564 5.13143 32.5815 5.14158 32.2513C5.15449 31.8684 5.18678 31.41 5.2615 31.0557C5.37035 30.5502 5.82973 29.0226 5.99117 27.6408C5.99209 27.6316 5.99393 27.6223 5.99762 27.614C6.41181 26.4185 6.96529 25.271 7.6433 24.2028C7.71986 24.0828 7.90528 24.1603 7.87576 24.2996V24.2987Z" fill="url(#paint7_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M7.66992 34.8297C9.02318 35.4764 10.9705 36.0464 13.6346 36.0464C14.212 36.0464 14.7544 36.0197 15.2664 35.9708C12.4723 31.1897 10.4244 25.975 9.22151 20.5693C8.17635 25.2425 7.87471 30.0394 7.66992 34.8297Z" fill="url(#paint8_linear_2636_286118)"></path><path d="M5.42672 14.7995C5.38244 14.21 5.3234 13.6141 5.24591 13.0173C5.11123 11.9897 4.92397 10.9611 4.66476 9.9704C4.61956 9.79328 4.57252 9.61894 4.52086 9.44459C4.40647 9.05254 4.28563 8.63836 4.22198 8.22694C4.13896 7.68637 4.15556 7.15319 4.42215 6.68458C4.58266 6.4023 4.81605 6.18091 5.07987 5.98904C5.34277 5.7944 5.63519 5.62928 5.9147 5.46047C7.10745 4.73633 8.17474 3.80464 9.05569 2.72075C9.56766 2.0907 9.89144 1.32875 9.98646 0.523438" stroke="#382828" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path></g><defs><linearGradient id="paint0_linear_2636_286118" x1="25.3427" y1="12.3692" x2="18.8946" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint1_linear_2636_286118" x1="24.1215" y1="13.8667" x2="27.7837" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint2_linear_2636_286118" x1="1.92346" y1="12.3692" x2="8.37148" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint3_linear_2636_286118" x1="3.14176" y1="13.8667" x2="-0.520426" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint4_linear_2636_286118" x1="21.3672" y1="18.5907" x2="20.2353" y2="18.5907" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint5_linear_2636_286118" x1="5.90039" y1="-0.0025094" x2="7.03225" y2="-0.0025094" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint6_linear_2636_286118" x1="20.4367" y1="23.8033" x2="21.3388" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint7_linear_2636_286118" x1="6.82507" y1="23.8033" x2="5.9229" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint8_linear_2636_286118" x1="9.28147" y1="18.8683" x2="12.0055" y2="39.4605" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#EEF9FF"></stop><stop offset="0.4" stop-color="#EBF6FC"></stop><stop offset="0.53" stop-color="#E4EEF4"></stop><stop offset="0.64" stop-color="#D8E1E6"></stop><stop offset="0.73" stop-color="#C6CED2"></stop><stop offset="0.81" stop-color="#AFB5B9"></stop><stop offset="0.89" stop-color="#939799"></stop><stop offset="0.96" stop-color="#727474"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><clipPath id="clip0_2636_286118"><rect width="27.28" height="38" fill="white"></rect></clipPath></defs>',2)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"10","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":e.playConnection.player.jersey>99?10:14,stroke:"white"},t.toDisplayString(e.playConnection.player.jersey),9,CXe)])],8,EXe)):(t.openBlock(),t.createElementBlock("svg",{key:1,x:v.value-13,y:a.value-35,width:"28",height:"38",viewBox:"0 0 28 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p[1]||(p[1]=t.createStaticVNode('<g clip-path="url(#clip0_2636_286087)"><path d="M17.012 0.257546C16.7113 -0.184315 16.18 0.0287746 15.5435 0.257546C14.907 0.488162 13.6331 0.452186 13.6331 0.452186C13.6331 0.452186 12.3591 0.488162 11.7226 0.257546C11.0861 0.0287746 10.5548 -0.184315 10.2541 0.257546C10.2052 0.328575 10.0917 0.436504 9.92383 0.572106C11.2799 1.45029 13.6331 1.39033 13.6331 1.39033C13.6331 1.39033 15.9863 1.45029 17.3423 0.572106C17.1744 0.436504 17.0609 0.327653 17.012 0.257546Z" fill="white"></path><path d="M21.3628 19.1451C21.5713 17.5575 21.8388 14.7985 21.8388 14.7985L22.4578 16.0899C24.8636 15.6822 27.2694 14.4092 27.2694 14.4092C27.2694 14.4092 26.1015 10.3577 25.9779 9.50812C25.8543 8.65853 25.9604 4.11263 23.0592 3.37005C20.9588 2.83225 18.886 1.67363 17.7873 0.905221C17.7753 0.896919 17.7652 0.890462 17.7541 0.88216C17.5918 0.767774 17.4534 0.663536 17.3381 0.571289C15.9821 1.44948 13.6298 1.38952 13.6298 1.38952C13.6298 1.38952 11.2775 1.44948 9.92056 0.571289C9.03777 1.28435 6.63751 2.74646 4.19944 3.37097C1.29921 4.11355 1.40529 8.65946 1.28168 9.50905C1.15807 10.3586 -0.00976562 14.4101 -0.00976562 14.4101C-0.00976562 14.4101 2.39602 15.6831 4.80181 16.0908L5.42078 14.7994C5.42078 14.7994 5.75748 18.2669 5.96965 19.6645C6.18182 21.0611 5.56192 24.4576 5.95212 25.9095C6.3414 27.3597 5.42078 30.3143 5.26212 31.0569C5.10253 31.7995 5.13851 33.0033 5.13851 33.0033C5.13851 33.0033 5.88939 33.982 7.66514 34.8298C9.01839 35.4764 10.9657 36.0465 13.6298 36.0465C14.2073 36.0465 14.7497 36.0198 15.2616 35.9709C17.8667 35.7246 19.6313 34.9119 20.718 34.2007C21.6921 33.5632 22.122 33.0042 22.122 33.0042C22.122 33.0042 22.1312 32.674 22.1183 32.2533C22.1054 31.8705 22.0731 31.412 21.9984 31.0578C21.8895 30.5505 21.4265 29.0136 21.2669 27.629C21.1931 26.9833 21.1848 26.3708 21.3084 25.9105C21.5455 25.0249 21.408 23.4143 21.3121 21.9771C21.2512 21.0583 21.2078 20.2096 21.2899 19.6663C21.313 19.515 21.337 19.3397 21.3628 19.1479V19.1451Z" fill="#02663D"></path><path d="M27.2696 14.4112C27.2696 14.4112 24.8638 15.6842 22.458 16.0919L21.839 14.8005C21.8833 14.211 21.9424 13.6151 22.0198 13.0183C22.1545 11.9906 22.3418 10.9621 22.601 9.97137C22.6462 9.79426 22.6932 9.61991 22.7449 9.44557C22.8593 9.05352 22.9801 8.63933 23.0438 8.22791C23.1268 7.68735 23.1102 7.15417 22.8436 6.68555C22.6831 6.40328 22.4497 6.18189 22.1859 5.99002C21.923 5.79538 21.6306 5.63025 21.3511 5.46144C20.1583 4.73731 19.091 3.80562 18.2101 2.72172C17.6981 2.09168 17.3743 1.32973 17.2793 0.524414C18.1104 1.21718 20.566 2.73372 23.0604 3.37206C25.9615 4.11465 25.8554 8.66055 25.9791 9.51014C26.1027 10.3597 27.2705 14.4112 27.2705 14.4112H27.2696Z" fill="#02673E"></path><path d="M21.839 14.7995C21.8833 14.21 21.9424 13.6141 22.0198 13.0173C22.1545 11.9897 22.3418 10.9611 22.601 9.9704C22.6462 9.79328 22.6932 9.61894 22.7449 9.44459C22.8593 9.05254 22.9801 8.63836 23.0438 8.22694C23.1268 7.68637 23.1102 7.15319 22.8436 6.68458C22.6831 6.4023 22.4497 6.18091 22.1859 5.98904C21.923 5.7944 21.6306 5.62928 21.3511 5.46047C20.1583 4.73633 19.091 3.80464 18.2101 2.72075C17.6981 2.0907 17.3743 1.32875 17.2793 0.523438" stroke="white" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path><path d="M-0.00976562 14.4112C-0.00976562 14.4112 2.39602 15.6842 4.80181 16.0919L5.42078 14.8005C5.3765 14.211 5.31747 13.6151 5.23998 13.0183C5.1053 11.9906 4.91804 10.9621 4.65883 9.97137C4.61363 9.79426 4.56658 9.61991 4.51492 9.44557C4.40054 9.05352 4.27969 8.63933 4.21604 8.22791C4.13302 7.68735 4.14963 7.15417 4.41622 6.68555C4.57673 6.40328 4.81011 6.18189 5.07394 5.99002C5.33684 5.79538 5.62926 5.63025 5.90877 5.46144C7.10151 4.73731 8.1688 3.80562 9.04976 2.72172C9.56173 2.09168 9.88551 1.32973 9.98052 0.524414C9.14938 1.21718 6.69378 2.73372 4.19944 3.37206C1.29921 4.11465 1.40529 8.66055 1.28168 9.51014C1.15807 10.3588 -0.00976562 14.4112 -0.00976562 14.4112Z" fill="#02673E"></path><path d="M22.1641 15.4726L22.4602 16.0906C24.866 15.6829 27.2717 14.4099 27.2717 14.4099C27.2717 14.4099 27.1915 14.1322 27.0707 13.7061C26.2976 14.0926 24.4066 14.9625 22.1641 15.4717V15.4726Z" fill="#014A2D"></path><path d="M5.09884 15.4726L4.80273 16.0907C2.39602 15.6839 -0.00976562 14.4109 -0.00976562 14.4109C-0.00976562 14.4109 0.0704888 14.1332 0.191332 13.707C0.964357 14.0935 2.85541 14.9634 5.09792 15.4726H5.09884Z" fill="#014A2D"></path><path d="M22.1206 32.2529C21.3993 32.9789 18.6005 35.4317 13.6321 35.4317C8.66372 35.4317 5.86405 32.978 5.1436 32.2529C5.13069 32.6745 5.13991 33.0038 5.13991 33.0038C5.13991 33.0038 7.47559 36.0461 13.6321 36.0461C19.7886 36.0461 22.1243 33.0038 22.1243 33.0038C22.1243 33.0038 22.1336 32.6736 22.1206 32.2529Z" fill="#222831"></path><path style="mix-blend-mode:multiply;" d="M21.8438 14.798L22.1666 15.4714L22.4627 16.0895C22.6177 16.0627 22.7727 16.0332 22.9276 16C22.6758 15.1412 22.8197 14.1892 23.0826 13.3193C23.3437 12.455 23.7145 11.6201 23.9165 10.7429C23.9497 10.598 23.7616 10.5049 23.6693 10.6202C23.578 10.7327 23.5051 10.8665 23.4396 10.9965C23.1186 11.6312 22.8382 12.2861 22.5956 12.9549C22.5088 13.1929 22.424 13.4411 22.2579 13.6329C22.1703 13.7335 22.0531 13.8165 21.9268 13.8599C21.8945 14.1735 21.8668 14.4862 21.8438 14.7971V14.798Z" fill="url(#paint0_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M25.3124 9.42413C25.3769 9.29314 25.5697 9.31252 25.6076 9.45273C25.6454 9.59202 25.6592 9.74054 25.6703 9.88444C25.7413 10.8106 25.7395 11.7423 25.6647 12.6684L25.4074 10.5726C25.3899 10.4315 25.2109 10.3844 25.1242 10.497C25.0633 10.5763 25.0126 10.6648 24.9637 10.7516C24.7727 11.0929 24.5818 11.4351 24.3908 11.7764C24.2967 11.9452 24.2026 12.1131 24.1086 12.2819C24.0329 12.4175 23.948 12.6629 23.8281 12.7552C23.8909 12.4563 24.0726 12.1436 24.1934 11.8613C24.3253 11.5523 24.46 11.2451 24.5984 10.9388C24.8281 10.4305 25.0661 9.92503 25.3114 9.42413H25.3124Z" fill="url(#paint1_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M5.42236 14.798L5.0995 15.4714L4.80339 16.0895C4.64841 16.0627 4.49344 16.0332 4.33847 16C4.5903 15.1412 4.4464 14.1892 4.18349 13.3193C3.92244 12.455 3.5516 11.6201 3.34959 10.7429C3.31638 10.598 3.50456 10.5049 3.59681 10.6202C3.68813 10.7327 3.761 10.8665 3.8265 10.9965C4.14752 11.6312 4.42795 12.2861 4.67055 12.9549C4.75727 13.1929 4.84213 13.4411 5.00818 13.6329C5.09581 13.7335 5.21296 13.8165 5.33934 13.8599C5.37163 14.1735 5.3993 14.4862 5.42236 14.7971V14.798Z" fill="url(#paint2_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M1.95086 9.42413C1.88628 9.29314 1.69349 9.31252 1.65567 9.45273C1.61785 9.59202 1.60401 9.74054 1.59294 9.88444C1.52191 10.8106 1.52375 11.7423 1.59847 12.6684L1.85584 10.5726C1.87337 10.4315 2.05233 10.3844 2.13904 10.497C2.19992 10.5763 2.25066 10.6648 2.29955 10.7516C2.4905 11.0929 2.68145 11.4351 2.8724 11.7764C2.96649 11.9452 3.06058 12.1131 3.15467 12.2819C3.23031 12.4175 3.31518 12.6629 3.4351 12.7552C3.37237 12.4563 3.19065 12.1436 3.0698 11.8613C2.93789 11.5523 2.80321 11.2451 2.66484 10.9388C2.43515 10.4305 2.19715 9.92503 1.95178 9.42413H1.95086Z" fill="url(#paint3_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M21.3155 21.9743C21.2546 21.0555 21.2113 20.2068 21.2934 19.6635C21.3164 19.5122 21.3404 19.337 21.3662 19.1451C21.0332 17.8214 20.6541 16.5078 20.2344 15.208C20.5406 17.4717 20.9216 19.7253 21.3155 21.9743Z" fill="url(#paint4_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M5.95113 21.9743C6.01201 21.0555 6.05536 20.2068 5.97327 19.6635C5.9502 19.5122 5.92622 19.337 5.90039 19.1451C6.2334 17.8214 6.61253 16.5078 7.03225 15.208C6.726 17.4717 6.34502 19.7253 5.95113 21.9743Z" fill="url(#paint5_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M19.386 24.2987C20.0621 27.4867 20.5049 30.7255 20.706 33.9772C20.7125 34.0768 20.825 34.1303 20.9062 34.0731C21.6165 33.5814 21.9938 33.158 22.0952 33.0372C22.1137 33.0151 22.1238 32.9883 22.1248 32.9588C22.1266 32.8564 22.1303 32.5815 22.1202 32.2513C22.1072 31.8684 22.075 31.41 22.0002 31.0557C21.8914 30.5502 21.432 29.0226 21.2706 27.6408C21.2696 27.6316 21.2678 27.6223 21.2641 27.614C20.8499 26.4185 20.2964 25.271 19.6184 24.2028C19.5419 24.0828 19.3564 24.1603 19.386 24.2996V24.2987Z" fill="url(#paint6_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M7.87576 24.2987C7.19959 27.4867 6.75681 30.7255 6.55571 33.9772C6.54926 34.0768 6.43672 34.1303 6.35554 34.0731C5.64524 33.5814 5.26795 33.158 5.16648 33.0372C5.14803 33.0151 5.13789 32.9883 5.13696 32.9588C5.13512 32.8564 5.13143 32.5815 5.14158 32.2513C5.15449 31.8684 5.18678 31.41 5.2615 31.0557C5.37035 30.5502 5.82973 29.0226 5.99117 27.6408C5.99209 27.6316 5.99393 27.6223 5.99762 27.614C6.41181 26.4185 6.96529 25.271 7.6433 24.2028C7.71986 24.0828 7.90528 24.1603 7.87576 24.2996V24.2987Z" fill="url(#paint7_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M7.66992 34.8297C9.02318 35.4764 10.9705 36.0464 13.6346 36.0464C14.212 36.0464 14.7544 36.0197 15.2664 35.9708C12.4723 31.1897 10.4244 25.975 9.22151 20.5693C8.17635 25.2425 7.87471 30.0394 7.66992 34.8297Z" fill="url(#paint8_linear_2636_286087)"></path><path d="M5.42672 14.7995C5.38244 14.21 5.3234 13.6141 5.24591 13.0173C5.11123 11.9897 4.92397 10.9611 4.66476 9.9704C4.61956 9.79328 4.57252 9.61894 4.52086 9.44459C4.40647 9.05254 4.28563 8.63836 4.22198 8.22694C4.13896 7.68637 4.15556 7.15319 4.42215 6.68458C4.58266 6.4023 4.81605 6.18091 5.07987 5.98904C5.34277 5.7944 5.63519 5.62928 5.9147 5.46047C7.10745 4.73633 8.17474 3.80464 9.05569 2.72075C9.56766 2.0907 9.89144 1.32875 9.98646 0.523438" stroke="white" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path></g><defs><linearGradient id="paint0_linear_2636_286087" x1="25.3427" y1="12.3692" x2="18.8946" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint1_linear_2636_286087" x1="24.1215" y1="13.8667" x2="27.7837" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint2_linear_2636_286087" x1="1.92346" y1="12.3692" x2="8.37148" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint3_linear_2636_286087" x1="3.14176" y1="13.8667" x2="-0.520426" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint4_linear_2636_286087" x1="21.3672" y1="18.5907" x2="20.2353" y2="18.5907" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint5_linear_2636_286087" x1="5.90039" y1="-0.0025094" x2="7.03225" y2="-0.0025094" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint6_linear_2636_286087" x1="20.4367" y1="23.8033" x2="21.3388" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint7_linear_2636_286087" x1="6.82507" y1="23.8033" x2="5.9229" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint8_linear_2636_286087" x1="9.28147" y1="18.8683" x2="12.0055" y2="39.4605" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#EEF9FF"></stop><stop offset="0.4" stop-color="#EBF6FC"></stop><stop offset="0.53" stop-color="#E4EEF4"></stop><stop offset="0.64" stop-color="#D8E1E6"></stop><stop offset="0.73" stop-color="#C6CED2"></stop><stop offset="0.81" stop-color="#AFB5B9"></stop><stop offset="0.89" stop-color="#939799"></stop><stop offset="0.96" stop-color="#727474"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><clipPath id="clip0_2636_286087"><rect width="27.28" height="38" fill="white"></rect></clipPath></defs>',2)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"10","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":e.playConnection.player.jersey>99?10:14,"font-family":"BebasNeueRegular, sans-serif",stroke:"white"},t.toDisplayString(e.playConnection.player.jersey),9,OXe)])],8,NXe)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(c,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[c.x1&&c.y1?(t.openBlock(),t.createElementBlock("line",{key:`${e.playConnection.playId}-${i.index}`,style:{stroke:"#cbee6b","stroke-width":"2"},"stroke-dasharray":n===0&&$.value.length===2?"none":"5,5",x1:c.x1,y1:c.y1+t.unref(WP),x2:c.x2,y2:c.y2+t.unref(WP),"marker-start":"url(#bullet)","marker-end":`url(${e.playConnection.isLastPlay&&n===$.value.length-1?"#arrow":""})`},null,8,MXe)):t.createCommentVNode("",!0)],64))),256))],64))}},zXe={class:"half-soccer-tooltip"},PXe={class:"half-soccer-tooltip__main-info"},AXe={class:"half-soccer-tooltip__main-info__jersey-and-photo"},RXe={class:"half-soccer-tooltip__main-info__jersey-and-photo__jersey"},UXe={class:"half-soccer-tooltip__main-info__jersey-and-photo__photo"},FXe=["src"],IXe={class:"half-soccer-tooltip__main-info__player-name"},qXe={class:"half-soccer-tooltip__minutes-info"},jXe={class:"half-soccer-tooltip__minutes-info__info"},WXe={class:"half-soccer-tooltip__minutes-info__info__value"},DXe={class:"half-soccer-tooltip__minutes-info__info"},KXe={class:"half-soccer-tooltip__minutes-info__info__value"},BXe={__name:"HalfSoccerTooltip",props:{player:{type:Object,required:!0}},emits:["close"],setup(e,{emit:r}){const a=r;function v(){a("close")}return($,h)=>(t.openBlock(),t.createElementBlock("div",zXe,[t.createElementVNode("div",{class:"half-soccer-tooltip__close",onClick:v},[...h[0]||(h[0]=[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"m6.708 6 3.15-3.145a.502.502 0 0 0-.71-.71l-3.145 3.15-3.145-3.15a.502.502 0 0 0-.71.71L5.298 6l-3.15 3.145a.5.5 0 0 0 .163.82.5.5 0 0 0 .547-.11l3.145-3.15 3.145 3.15a.5.5 0 0 0 .82-.163.5.5 0 0 0-.11-.547L6.708 6z",fill:"#A3ADB4",opacity:".7"})],-1)])]),t.createElementVNode("div",PXe,[t.createElementVNode("div",AXe,[t.createElementVNode("div",RXe,t.toDisplayString(e.player.jersey),1),t.createElementVNode("div",UXe,[t.createElementVNode("img",{src:e.player.photo,alt:"Player photo"},null,8,FXe)])]),t.createElementVNode("div",IXe,t.toDisplayString(e.player.firstNameAndFirstLastName),1)]),h[3]||(h[3]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-text"},[t.createElementVNode("div",null,[t.createElementVNode("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"m10.201 4.06.607-.6a.67.67 0 0 0-.947-.947l-.6.607a5.333 5.333 0 0 0-6.526 0l-.607-.613a.672.672 0 1 0-.947.953l.614.607A5.28 5.28 0 0 0 .668 7.333a5.333 5.333 0 1 0 9.533-3.273zm-4.2 7.273a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm-1.333-10h2.667a.667.667 0 1 0 0-1.333H4.668a.667.667 0 0 0 0 1.333zm2 4a.667.667 0 1 0-1.333 0v1.26a1 1 0 1 0 1.333 0v-1.26z",fill:"#A3ADB4"})])]),t.createElementVNode("div",null,"Minutos jugados")],-1)),t.createElementVNode("div",qXe,[t.createElementVNode("div",jXe,[h[1]||(h[1]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-info__info__text"},"Este partido:",-1)),t.createElementVNode("div",WXe,t.toDisplayString(e.player.game_minutes_played),1)]),t.createElementVNode("div",DXe,[h[2]||(h[2]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-info__info__text"},"Este torneo:",-1)),t.createElementVNode("div",KXe,t.toDisplayString(e.player.season_minutes_played),1)])])]))}},XXe=j6(BXe,[["__scopeId","data-v-3b4bd0a7"]]),GXe={key:0,class:"labels-container"},ZXe={__name:"HalfSoccerField",props:{widthContainer:{type:Number,default:1280},playersPositions:{type:Array,required:!0},playersPositionsByRange:{type:Array,required:!0},playConnections:{type:Array,required:!0},teamIdForAnalysis:{type:Number,required:!0},selectedCategory:{type:Number,default:31},areConnectionsVisible:{type:Boolean,default:!1},arePositionPathsVisible:{type:Boolean,default:!1},visibleTeamsIds:{type:Array,required:!0},isAgainstCorner:{type:Boolean,default:!1}},emits:["changelateralidad"],setup(e,{emit:r}){const a=e;let v=t.ref("left");const $=r;function h(T){v.value=T,$("changelateralidad",v.value)}const u=t.ref(!1),i=t.ref(0),p=t.ref(0),c=t.ref(null),n=t.computed(()=>a.arePositionPathsVisible?a.playersPositionsByRange.reduce((T,{playersPositions:x,finalPlayersPositions:d,areFirstPositions:o,areFinalPositions:l})=>(x.forEach((s,f)=>{T.push({...s,finalPlayerPosition:d[f],isFirstPosition:o,isFinalPosition:l})}),T),[]):a.playersPositions.map(T=>({...T,finalPlayerPosition:null,isFirstPosition:!0,isFinalPosition:!1})));t.watch(()=>a.selectedCategory,T=>{T==32?v.value="right":v.value="left"});function k({event:T,playerPosition:x}){c.value=x.player,i.value=T.layerX,p.value=T.layerY,u.value=!0}return(T,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.widthContainer<=768?(t.openBlock(),t.createElementBlock("div",GXe,[t.createElementVNode("div",{id:"label-left-zone-specific",class:"label-left-zone-specific-mobile",style:t.normalizeStyle(t.unref(v)=="left"?"":"opacity: 0.6"),onClick:x[0]||(x[0]=d=>h("left"))},null,4),t.createElementVNode("div",{id:"label-right-zone-specific",class:"label-right-zone-specific-mobile",style:t.normalizeStyle(t.unref(v)=="right"?"":"opacity: 0.6"),onClick:x[1]||(x[1]=d=>h("right"))},null,4)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"half-soccer-field",style:t.normalizeStyle(e.widthContainer<=768?"margin-top: 10px;":"")},[e.widthContainer>768?(t.openBlock(),t.createElementBlock("div",{key:0,id:"label-left-zone-specific",style:t.normalizeStyle(t.unref(v)=="left"?"":"opacity: 0.6"),onClick:x[2]||(x[2]=d=>h("left"))},null,4)):t.createCommentVNode("",!0),e.widthContainer>768?(t.openBlock(),t.createElementBlock("div",{key:1,id:"label-right-zone-specific",style:t.normalizeStyle(t.unref(v)=="right"?"":"opacity: 0.6"),onClick:x[3]||(x[3]=d=>h("right"))},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"half-soccer-field__player-info",style:t.normalizeStyle({x:i.value,y:p.value})},[u.value?(t.openBlock(),t.createBlock(XXe,{key:0,player:c.value,onClose:x[4]||(x[4]=d=>u.value=!1)},null,8,["player"])):t.createCommentVNode("",!0)],4),(t.openBlock(),t.createElementBlock("svg",{style:t.normalizeStyle(e.widthContainer>768?"margin-top: 22px":""),viewBox:"0 0 670 311",fill:"none",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.isAgainstCorner?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[x[5]||(x[5]=t.createStaticVNode('<g opacity="0.3" filter="url(#filter0_f_3194_305570)" data-v-3f051287><path d="M576.963 67.6699H88.6485L20.8687 290H649.101L576.963 67.6699Z" fill="#03080E" data-v-3f051287></path></g><path d="M576.963 32.3757H88.6485L20.8687 254.706H649.101L576.963 32.3757Z" fill="url(#paint0_linear_3194_305570)" data-v-3f051287></path><path d="M558.988 44.3523H106.623L48.5199 254.706H618.724L558.988 44.3523Z" stroke="url(#paint1_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M405 256C405 255.33 404.976 254.663 404.929 254C403.232 230.075 371.23 211 332 211C292.77 211 260.768 230.075 259.071 254" stroke="url(#paint2_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><ellipse cx="332" cy="81.5" rx="3" ry="1.5" fill="#38E3FF" data-v-3f051287></ellipse><mask id="path-6-inside-1_3194_305570" fill="white" data-v-3f051287><path d="M273 44L272 63H392L391 44" data-v-3f051287></path></mask><path d="M272 63L271.401 62.9685L271.368 63.6H272V63ZM392 63V63.6H392.632L392.599 62.9685L392 63ZM272.401 43.9685L271.401 62.9685L272.599 63.0315L273.599 44.0315L272.401 43.9685ZM272 63.6H392V62.4H272V63.6ZM392.599 62.9685L391.599 43.9685L390.401 44.0315L391.401 63.0315L392.599 62.9685Z" fill="#38E3FF" mask="url(#path-6-inside-1_3194_305570)" data-v-3f051287></path><path d="M332 113.5C351.793 113.5 369.589 108.109 382 99.5H282C294.411 108.095 312.207 113.5 332 113.5Z" stroke="url(#paint3_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M460 44.3525H332.742H332.053H204.5L195.5 99.5556H332.053H332.742H469L460 44.3525Z" stroke="url(#paint4_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M649.118 254.085H20.8826V267.32H649.118V254.085Z" fill="url(#paint5_linear_3194_305570)" data-v-3f051287></path><defs data-v-3f051287><filter id="filter0_f_3194_305570" x="0.706949" y="47.5082" width="668.556" height="262.654" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" data-v-3f051287></feBlend><feGaussianBlur stdDeviation="10.0809" result="effect1_foregroundBlur_3194_305570" data-v-3f051287></feGaussianBlur></filter><linearGradient id="paint0_linear_3194_305570" x1="488.72" y1="207.277" x2="263.075" y2="-9.19523" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1796A7" data-v-3f051287></stop><stop offset="0.497165" stop-color="#287B86" data-v-3f051287></stop><stop offset="0.896498" stop-color="#1F464F" data-v-3f051287></stop></linearGradient><linearGradient id="paint1_linear_3194_305570" x1="95.5004" y1="10.9329" x2="575.445" y2="387.185" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint2_linear_3194_305570" x1="274.592" y1="196.183" x2="437.669" y2="268.95" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint3_linear_3194_305570" x1="290.239" y1="97.2758" x2="316.04" y2="150.573" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint4_linear_3194_305570" x1="224.708" y1="35.2645" x2="352.918" y2="209.985" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint5_linear_3194_305570" x1="386.816" y1="250.933" x2="387.693" y2="282.433" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1A5162" data-v-3f051287></stop><stop offset="1" stop-color="#33849D" data-v-3f051287></stop></linearGradient></defs>',11))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[x[6]||(x[6]=t.createStaticVNode('<g opacity="0.3" filter="url(#filter0_f_3159_296620)" data-v-3f051287><path d="M576.963 67.6699H88.6485L20.8687 290H649.101L576.963 67.6699Z" fill="#03080E" data-v-3f051287></path></g><g filter="url(#filter1_b_3159_296620)" data-v-3f051287><path d="M576.963 32.3757H88.6485L20.8687 254.706H649.101L576.963 32.3757Z" fill="url(#paint0_radial_3159_296620)" fill-opacity="0.3" data-v-3f051287></path></g><path d="M558.988 44.3523H106.623L48.5199 254.706H618.724L558.988 44.3523Z" stroke="url(#paint1_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M405 256C405 255.33 404.976 254.663 404.929 254C403.232 230.075 371.23 211 332 211C292.77 211 260.768 230.075 259.071 254" stroke="url(#paint2_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><ellipse cx="332" cy="81.5" rx="3" ry="1.5" fill="#38E3FF" data-v-3f051287></ellipse><mask id="path-6-inside-1_3159_296620" fill="white" data-v-3f051287><path d="M273 44L272 63H392L391 44" data-v-3f051287></path></mask><path d="M272 63L271.401 62.9685L271.368 63.6H272V63ZM392 63V63.6H392.632L392.599 62.9685L392 63ZM272.401 43.9685L271.401 62.9685L272.599 63.0315L273.599 44.0315L272.401 43.9685ZM272 63.6H392V62.4H272V63.6ZM392.599 62.9685L391.599 43.9685L390.401 44.0315L391.401 63.0315L392.599 62.9685Z" fill="#38E3FF" mask="url(#path-6-inside-1_3159_296620)" data-v-3f051287></path><path d="M332 113.5C351.793 113.5 369.589 108.109 382 99.5H282C294.411 108.095 312.207 113.5 332 113.5Z" stroke="url(#paint3_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M460 44.3525H332.742H332.053H204.5L195.5 99.5556H332.053H332.742H469L460 44.3525Z" stroke="url(#paint4_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M649.118 254.085H20.8826V267.32H649.118V254.085Z" fill="url(#paint5_linear_3159_296620)" data-v-3f051287></path><defs data-v-3f051287><filter id="filter0_f_3159_296620" x="0.706949" y="47.5082" width="668.556" height="262.654" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" data-v-3f051287></feBlend><feGaussianBlur stdDeviation="10.0809" result="effect1_foregroundBlur_3159_296620" data-v-3f051287></feGaussianBlur></filter><filter id="filter1_b_3159_296620" x="15.5746" y="27.0816" width="638.821" height="232.918" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feGaussianBlur in="BackgroundImageFix" stdDeviation="2.64706" data-v-3f051287></feGaussianBlur><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_3159_296620" data-v-3f051287></feComposite><feBlend mode="normal" in="SourceGraphic" in2="effect1_backgroundBlur_3159_296620" result="shape" data-v-3f051287></feBlend></filter><radialGradient id="paint0_radial_3159_296620" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(128 74.4329) rotate(19.0828) scale(551.403 632.738)" data-v-3f051287><stop offset="0.0564278" stop-color="#4373BD" data-v-3f051287></stop><stop offset="0.455568" stop-color="#263D79" data-v-3f051287></stop><stop offset="0.918151" stop-color="#1B2949" data-v-3f051287></stop></radialGradient><linearGradient id="paint1_linear_3159_296620" x1="95.5004" y1="10.9329" x2="575.445" y2="387.185" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint2_linear_3159_296620" x1="274.592" y1="196.183" x2="437.669" y2="268.95" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint3_linear_3159_296620" x1="290.239" y1="97.2758" x2="316.04" y2="150.573" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint4_linear_3159_296620" x1="224.708" y1="35.2645" x2="352.918" y2="209.985" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint5_linear_3159_296620" x1="335" y1="247.933" x2="335" y2="283.433" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1F3E72" data-v-3f051287></stop><stop offset="1" stop-color="#15202E" stop-opacity="0" data-v-3f051287></stop></linearGradient></defs>',11))],64)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,d=>(t.openBlock(),t.createBlock(_Xe,{key:`${d.playId}-${d.playerId}`,"player-position":d,"team-id-for-analysis":e.teamIdForAnalysis,"visible-teams-ids":e.visibleTeamsIds,"is-against-corner":e.isAgainstCorner,onPlayerPositionClick:k},null,8,["player-position","team-id-for-analysis","visible-teams-ids","is-against-corner"]))),128)),e.areConnectionsVisible?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.playConnections,d=>(t.openBlock(),t.createBlock(VXe,{key:d.id,"play-connection":d,"is-against-corner":e.isAgainstCorner},null,8,["play-connection","is-against-corner"]))),128)):t.createCommentVNode("",!0)],4))],4)],64))}},JXe=j6(ZXe,[["__scopeId","data-v-3f051287"]]);function XG(e,r){return function(){return e.apply(r,arguments)}}const{toString:HXe}=Object.prototype,{getPrototypeOf:DP}=Object,{iterator:iN,toStringTag:GG}=Symbol,oN=(e=>r=>{const a=HXe.call(r);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Bw=e=>(e=e.toLowerCase(),r=>oN(r)===e),sN=e=>r=>typeof r===e,{isArray:Jk}=Array,Hk=sN("undefined");function a9(e){return e!==null&&!Hk(e)&&e.constructor!==null&&!Hk(e.constructor)&&J_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ZG=Bw("ArrayBuffer");function YXe(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&ZG(e.buffer),r}const QXe=sN("string"),J_=sN("function"),JG=sN("number"),n9=e=>e!==null&&typeof e=="object",$Xe=e=>e===!0||e===!1,lN=e=>{if(oN(e)!=="object")return!1;const r=DP(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(GG in e)&&!(iN in e)},eGe=e=>{if(!n9(e)||a9(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},tGe=Bw("Date"),rGe=Bw("File"),aGe=Bw("Blob"),nGe=Bw("FileList"),iGe=e=>n9(e)&&J_(e.pipe),oGe=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||J_(e.append)&&((r=oN(e))==="formdata"||r==="object"&&J_(e.toString)&&e.toString()==="[object FormData]"))},sGe=Bw("URLSearchParams"),[lGe,cGe,uGe,dGe]=["ReadableStream","Request","Response","Headers"].map(Bw),pGe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function i9(e,r,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let v,$;if(typeof e!="object"&&(e=[e]),Jk(e))for(v=0,$=e.length;v<$;v++)r.call(null,e[v],v,e);else{if(a9(e))return;const h=a?Object.getOwnPropertyNames(e):Object.keys(e),u=h.length;let i;for(v=0;v<u;v++)i=h[v],r.call(null,e[i],i,e)}}function HG(e,r){if(a9(e))return null;r=r.toLowerCase();const a=Object.keys(e);let v=a.length,$;for(;v-- >0;)if($=a[v],r===$.toLowerCase())return $;return null}const kS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YG=e=>!Hk(e)&&e!==kS;function KP(){const{caseless:e,skipUndefined:r}=YG(this)&&this||{},a={},v=($,h)=>{const u=e&&HG(a,h)||h;lN(a[u])&&lN($)?a[u]=KP(a[u],$):lN($)?a[u]=KP({},$):Jk($)?a[u]=$.slice():(!r||!Hk($))&&(a[u]=$)};for(let $=0,h=arguments.length;$<h;$++)arguments[$]&&i9(arguments[$],v);return a}const hGe=(e,r,a,{allOwnKeys:v}={})=>(i9(r,($,h)=>{a&&J_($)?e[h]=XG($,a):e[h]=$},{allOwnKeys:v}),e),fGe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mGe=(e,r,a,v)=>{e.prototype=Object.create(r.prototype,v),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),a&&Object.assign(e.prototype,a)},yGe=(e,r,a,v)=>{let $,h,u;const i={};if(r=r||{},e==null)return r;do{for($=Object.getOwnPropertyNames(e),h=$.length;h-- >0;)u=$[h],(!v||v(u,e,r))&&!i[u]&&(r[u]=e[u],i[u]=!0);e=a!==!1&&DP(e)}while(e&&(!a||a(e,r))&&e!==Object.prototype);return r},gGe=(e,r,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=r.length;const v=e.indexOf(r,a);return v!==-1&&v===a},vGe=e=>{if(!e)return null;if(Jk(e))return e;let r=e.length;if(!JG(r))return null;const a=new Array(r);for(;r-- >0;)a[r]=e[r];return a},bGe=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&DP(Uint8Array)),xGe=(e,r)=>{const a=(e&&e[iN]).call(e);let v;for(;(v=a.next())&&!v.done;){const $=v.value;r.call(e,$[0],$[1])}},_Ge=(e,r)=>{let a;const v=[];for(;(a=e.exec(r))!==null;)v.push(a);return v},wGe=Bw("HTMLFormElement"),TGe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,v){return a.toUpperCase()+v}),QG=(({hasOwnProperty:e})=>(r,a)=>e.call(r,a))(Object.prototype),SGe=Bw("RegExp"),$G=(e,r)=>{const a=Object.getOwnPropertyDescriptors(e),v={};i9(a,($,h)=>{let u;(u=r($,h,e))!==!1&&(v[h]=u||$)}),Object.defineProperties(e,v)},kGe=e=>{$G(e,(r,a)=>{if(J_(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const v=e[a];if(J_(v)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},LGe=(e,r)=>{const a={},v=$=>{$.forEach(h=>{a[h]=!0})};return Jk(e)?v(e):v(String(e).split(r)),a},EGe=()=>{},CGe=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function NGe(e){return!!(e&&J_(e.append)&&e[GG]==="FormData"&&e[iN])}const OGe=e=>{const r=new Array(10),a=(v,$)=>{if(n9(v)){if(r.indexOf(v)>=0)return;if(a9(v))return v;if(!("toJSON"in v)){r[$]=v;const h=Jk(v)?[]:{};return i9(v,(u,i)=>{const p=a(u,$+1);!Hk(p)&&(h[i]=p)}),r[$]=void 0,h}}return v};return a(e,0)},MGe=Bw("AsyncFunction"),VGe=e=>e&&(n9(e)||J_(e))&&J_(e.then)&&J_(e.catch),eZ=((e,r)=>e?setImmediate:r?((a,v)=>(kS.addEventListener("message",({source:$,data:h})=>{$===kS&&h===a&&v.length&&v.shift()()},!1),$=>{v.push($),kS.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",J_(kS.postMessage)),zGe=typeof queueMicrotask<"u"?queueMicrotask.bind(kS):typeof process<"u"&&process.nextTick||eZ,PGe=e=>e!=null&&J_(e[iN]),tu={isArray:Jk,isArrayBuffer:ZG,isBuffer:a9,isFormData:oGe,isArrayBufferView:YXe,isString:QXe,isNumber:JG,isBoolean:$Xe,isObject:n9,isPlainObject:lN,isEmptyObject:eGe,isReadableStream:lGe,isRequest:cGe,isResponse:uGe,isHeaders:dGe,isUndefined:Hk,isDate:tGe,isFile:rGe,isBlob:aGe,isRegExp:SGe,isFunction:J_,isStream:iGe,isURLSearchParams:sGe,isTypedArray:bGe,isFileList:nGe,forEach:i9,merge:KP,extend:hGe,trim:pGe,stripBOM:fGe,inherits:mGe,toFlatObject:yGe,kindOf:oN,kindOfTest:Bw,endsWith:gGe,toArray:vGe,forEachEntry:xGe,matchAll:_Ge,isHTMLForm:wGe,hasOwnProperty:QG,hasOwnProp:QG,reduceDescriptors:$G,freezeMethods:kGe,toObjectSet:LGe,toCamelCase:TGe,noop:EGe,toFiniteNumber:CGe,findKey:HG,global:kS,isContextDefined:YG,isSpecCompliantForm:NGe,toJSONObject:OGe,isAsyncFn:MGe,isThenable:VGe,setImmediate:eZ,asap:zGe,isIterable:PGe};function Am(e,r,a,v,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),a&&(this.config=a),v&&(this.request=v),$&&(this.response=$,this.status=$.status?$.status:null)}tu.inherits(Am,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:tu.toJSONObject(this.config),code:this.code,status:this.status}}});const tZ=Am.prototype,rZ={};["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=>{rZ[e]={value:e}}),Object.defineProperties(Am,rZ),Object.defineProperty(tZ,"isAxiosError",{value:!0}),Am.from=(e,r,a,v,$,h)=>{const u=Object.create(tZ);tu.toFlatObject(e,u,function(c){return c!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",p=r==null&&e?e.code:r;return Am.call(u,i,p,a,v,$),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",h&&Object.assign(u,h),u};const AGe=null;function BP(e){return tu.isPlainObject(e)||tu.isArray(e)}function aZ(e){return tu.endsWith(e,"[]")?e.slice(0,-2):e}function nZ(e,r,a){return e?e.concat(r).map(function(v,$){return v=aZ(v),!a&&$?"["+v+"]":v}).join(a?".":""):r}function RGe(e){return tu.isArray(e)&&!e.some(BP)}const UGe=tu.toFlatObject(tu,{},null,function(e){return/^is[A-Z]/.test(e)});function cN(e,r,a){if(!tu.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,a=tu.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,d){return!tu.isUndefined(d[x])});const v=a.metaTokens,$=a.visitor||c,h=a.dots,u=a.indexes,i=(a.Blob||typeof Blob<"u"&&Blob)&&tu.isSpecCompliantForm(r);if(!tu.isFunction($))throw new TypeError("visitor must be a function");function p(x){if(x===null)return"";if(tu.isDate(x))return x.toISOString();if(tu.isBoolean(x))return x.toString();if(!i&&tu.isBlob(x))throw new Am("Blob is not supported. Use a Buffer instead.");return tu.isArrayBuffer(x)||tu.isTypedArray(x)?i&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function c(x,d,o){let l=x;if(x&&!o&&typeof x=="object"){if(tu.endsWith(d,"{}"))d=v?d:d.slice(0,-2),x=JSON.stringify(x);else if(tu.isArray(x)&&RGe(x)||(tu.isFileList(x)||tu.endsWith(d,"[]"))&&(l=tu.toArray(x)))return d=aZ(d),l.forEach(function(s,f){!(tu.isUndefined(s)||s===null)&&r.append(u===!0?nZ([d],f,h):u===null?d:d+"[]",p(s))}),!1}return BP(x)?!0:(r.append(nZ(o,d,h),p(x)),!1)}const n=[],k=Object.assign(UGe,{defaultVisitor:c,convertValue:p,isVisitable:BP});function T(x,d){if(!tu.isUndefined(x)){if(n.indexOf(x)!==-1)throw Error("Circular reference detected in "+d.join("."));n.push(x),tu.forEach(x,function(o,l){(!(tu.isUndefined(o)||o===null)&&$.call(r,o,tu.isString(l)?l.trim():l,d,k))===!0&&T(o,d?d.concat(l):[l])}),n.pop()}}if(!tu.isObject(e))throw new TypeError("data must be an object");return T(e),r}function iZ(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return r[a]})}function XP(e,r){this._pairs=[],e&&cN(e,this,r)}const oZ=XP.prototype;oZ.append=function(e,r){this._pairs.push([e,r])},oZ.toString=function(e){const r=e?function(a){return e.call(this,a,iZ)}:iZ;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function FGe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sZ(e,r,a){if(!r)return e;const v=a&&a.encode||FGe;tu.isFunction(a)&&(a={serialize:a});const $=a&&a.serialize;let h;if($?h=$(r,a):h=tu.isURLSearchParams(r)?r.toString():new XP(r,a).toString(v),h){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+h}return e}class lZ{constructor(){this.handlers=[]}use(r,a,v){return this.handlers.push({fulfilled:r,rejected:a,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){tu.forEach(this.handlers,function(a){a!==null&&r(a)})}}const cZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},IGe=typeof URLSearchParams<"u"?URLSearchParams:XP,qGe=typeof FormData<"u"?FormData:null,jGe=typeof Blob<"u"?Blob:null,WGe={isBrowser:!0,classes:{URLSearchParams:IGe,FormData:qGe,Blob:jGe},protocols:["http","https","file","blob","url","data"]},GP=typeof window<"u"&&typeof document<"u",ZP=typeof navigator=="object"&&navigator||void 0,DGe=GP&&(!ZP||["ReactNative","NativeScript","NS"].indexOf(ZP.product)<0),KGe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",BGe=GP&&window.location.href||"http://localhost",XGe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:GP,hasStandardBrowserEnv:DGe,hasStandardBrowserWebWorkerEnv:KGe,navigator:ZP,origin:BGe},Symbol.toStringTag,{value:"Module"})),Wx={...XGe,...WGe};function GGe(e,r){return cN(e,new Wx.classes.URLSearchParams,{visitor:function(a,v,$,h){return Wx.isNode&&tu.isBuffer(a)?(this.append(v,a.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...r})}function ZGe(e){return tu.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function JGe(e){const r={},a=Object.keys(e);let v;const $=a.length;let h;for(v=0;v<$;v++)h=a[v],r[h]=e[h];return r}function uZ(e){function r(a,v,$,h){let u=a[h++];if(u==="__proto__")return!0;const i=Number.isFinite(+u),p=h>=a.length;return u=!u&&tu.isArray($)?$.length:u,p?(tu.hasOwnProp($,u)?$[u]=[$[u],v]:$[u]=v,!i):((!$[u]||!tu.isObject($[u]))&&($[u]=[]),r(a,v,$[u],h)&&tu.isArray($[u])&&($[u]=JGe($[u])),!i)}if(tu.isFormData(e)&&tu.isFunction(e.entries)){const a={};return tu.forEachEntry(e,(v,$)=>{r(ZGe(v),$,a,0)}),a}return null}function HGe(e,r,a){if(tu.isString(e))try{return(r||JSON.parse)(e),tu.trim(e)}catch(v){if(v.name!=="SyntaxError")throw v}return(a||JSON.stringify)(e)}const o9={transitional:cZ,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const a=r.getContentType()||"",v=a.indexOf("application/json")>-1,$=tu.isObject(e);if($&&tu.isHTMLForm(e)&&(e=new FormData(e)),tu.isFormData(e))return v?JSON.stringify(uZ(e)):e;if(tu.isArrayBuffer(e)||tu.isBuffer(e)||tu.isStream(e)||tu.isFile(e)||tu.isBlob(e)||tu.isReadableStream(e))return e;if(tu.isArrayBufferView(e))return e.buffer;if(tu.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let h;if($){if(a.indexOf("application/x-www-form-urlencoded")>-1)return GGe(e,this.formSerializer).toString();if((h=tu.isFileList(e))||a.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return cN(h?{"files[]":e}:e,u&&new u,this.formSerializer)}}return $||v?(r.setContentType("application/json",!1),HGe(e)):e}],transformResponse:[function(e){const r=this.transitional||o9.transitional,a=r&&r.forcedJSONParsing,v=this.responseType==="json";if(tu.isResponse(e)||tu.isReadableStream(e))return e;if(e&&tu.isString(e)&&(a&&!this.responseType||v)){const $=!(r&&r.silentJSONParsing)&&v;try{return JSON.parse(e,this.parseReviver)}catch(h){if($)throw h.name==="SyntaxError"?Am.from(h,Am.ERR_BAD_RESPONSE,this,null,this.response):h}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wx.classes.FormData,Blob:Wx.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tu.forEach(["delete","get","head","post","put","patch"],e=>{o9.headers[e]={}});const YGe=tu.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"]),QGe=e=>{const r={};let a,v,$;return e&&e.split(`
|
|
7980
|
+
*/return window.Plotly=r,r})})(wG);var cKe=wG.exports;const AP=lKe(cKe),uKe={id:"main-container"},dKe={id:"surface-container"},pKe={id:"label-left-zone"},hKe={id:"label-right-zone"},fKe=["id"],r9=39,Kw=76,mKe=0,TG=2,SG=4,kG=5,LG=6,EG=7,yKe=8,gKe=9,CG=10,NG=11,OG=13,vKe=14,bKe=15,xKe=18,SS=19,MG=800,VG=300,RP=.1208,zG=5,_Ke=2,wKe=3,TKe=4,SKe=7,kKe=-46,PG=100,AG=-14,LKe={__name:"CardField",props:{selected_category:{type:Number,default:31},selected_team:{type:[Array,Number],default:()=>[]},showBallPosition:{type:Boolean,default:!0},showdefault:{type:Boolean,default:!1},showPlayersPosition:{type:Boolean,default:!0},widthContainer:{type:Number,default:1280},dataPaintInfo:{type:Object,default:()=>{}},showTracks:{type:Boolean,default:!1},touches:{type:Number,default:1},showPlayersEndPosition:{type:Boolean,default:!1},secondStart:{type:Number,default:0},operationStart:{type:Number,default:0},secondEnd:{type:Number,default:1},operationEnd:{type:Number,default:1},inFavor:{type:Boolean,default:!0},lateralidad:{type:String,default:"left"}},setup(e){var r;let a=.75;const v=t.ref(null),$=t.ref(null),h=t.ref(0),u=t.ref(null),i=t.ref(`heatmap-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),p=new Set([583,585,587,589]),c=new Set([584,586,588,590]),n=new Set([122,128,136,142]),k=new Set([125,131,139,145]),T=new Set([124,130,138,144]),x=new Set([123,129,137,143]),d=e;let o=null;t.watch(()=>h.value,se=>{s(se),$.value&&($.value.style.height=`${f(se)}px`),u.value&&(u.value.style.top=`${g(f(se))}px`)});function l(){o=new ResizeObserver(se=>{for(const me of se)h.value=me.contentRect.width}),o.observe(v.value)}function s(se){if(v.value)try{const me=document.getElementById(i.value);me&&(me.data||me._fullLayout)&&AP.relayout(me,{width:se,height:f(se)})}catch(me){console.warn("Plotly relayout error:",me)}}function f(se){return Math.round(VG/MG*se,0)}function g(se){return AG+(se-PG)/(VG-PG)*(kKe-AG)}t.watch(()=>d.dataPaintInfo,se=>{N(se)},{deep:!0}),t.watch(()=>d.selected_team,se=>{se.data.length>0&&N(se)}),t.watch(()=>d.secondStart,se=>{N(se)});function S(se,me){let ge=.01321,be=.00929,xe=0,Ae=0,qe=[];const _e=me.length;let Ue=Math.floor(_e/10);for(;xe<Kw;)Ae=me.filter(je=>je[0]>=xe*ge&&je[0]<=(xe+1)*ge&&je[1]>=se*be&&je[1]<=(se+1)*be).map(je=>je[1]).length,Ue=Ue===0?1:Ue,qe.push(parseFloat((Ae/Ue).toFixed(4))),xe++;return qe.reverse()}function L(se,me){let ge=.01321,be=.01009,xe=0,Ae=0,qe=[];const _e=me.length;let Ue=Math.floor(_e/10);for(;xe<Kw;)Ae=me.filter(je=>je[0]>=xe*ge&&je[0]<=(xe+1)*ge&&je[1]>=se*be&&je[1]<=(se+1)*be).map(je=>je[1]).length,Ue=Ue===0?1:Ue,qe.push(parseFloat((Ae/Ue).toFixed(4))),xe++;return qe.reverse()}function M(se){let me=[z(Kw),z(Kw)],ge=[],be=r9;for(;be>0&&be<=r9;)ge=S(be,se),me.push(ge),be--;return me.push(z(Kw),z(Kw)),me}function A(se){let me=[z(Kw),z(Kw)],ge=[],be=r9;for(;be>0&&be<=r9;)ge=L(be,se),me.push(ge),be--;return me.push(z(Kw),z(Kw)),me}function z(se){return Array.from({length:se},()=>0)}function I(se,me,ge){const be=[];let xe=0,Ae=0;be.push(se[0]);for(let qe=1;qe<ge-1;qe++){const _e=[];_e.push(se[qe][0]);for(let Ue=1;Ue<me-1;Ue++)xe=se[qe][Ue-1],Ae=se[qe][Ue+1],_e.push(xe+.5*(se[qe][Ue]+Ae-xe));_e.push(se[qe][me-1]),be.push(_e)}be.push(se[ge-1]);for(let qe=1;qe<me-1;qe++)for(let _e=1;_e<ge-1;_e++)xe=be[_e-1][qe],Ae=be[_e+1][qe],be[_e][qe]=xe+.5*(be[_e][qe]+Ae-xe);return be}function j(se){var me=[];let ge=.14333333333333334;for(var be=0;be<se.length;be++)if(se[be][SS]==0&&se[be][SG]===d.selected_category){let xe=se[be][NG]-(ge-RP);me.push([se[be][CG],xe])}return me}function F(se,me,ge=1){let be=[],xe=[];return se.forEach(Ae=>{if(Ae[SG]===d.selected_category){let qe=se.filter(_e=>Ae[0]===_e[xKe]&&_e[SS]<=ge).sort((_e,Ue)=>_e[SS]-Ue[SS]);qe.length>0&&be.push(qe),Ae[SS]===0&&xe.push([Ae[mKe],Ae[OG],Ae[vKe],Ae[bKe]])}}),{sequences:be,main_plays:xe}}function W(se,me,ge,be,xe){let Ae=.1,qe=be*4,_e=be*3,Ue=[],je=[],Re=[],We=[],Qe=[],rt=[],pt=[],ut=[],He=[],st=[],ct=[],Ct=[],Vt=[];const Ot=.7,qt="rgba(253, 101, 36, 1)",Zt="rgba(249, 189, 50, 1)",Jt="rgba(145, 108, 255,1)",Qt="rgba(255, 255, 255,1)",cr="rgba(203, 238, 107, 1)",hr="rgba(55, 181, 252, 1)",$t="rgba(55, 252, 217, 1)",At="rgba(195, 198, 201, 1)",or=new Map([[p,{color:cr,symbol:"circle"}],[c,{color:hr,symbol:"circle"}],[n,{color:$t,symbol:"circle"}],[k,{color:At,symbol:"x"}],[T,{color:qt,symbol:"square"}],[x,{color:Zt,symbol:"triangle-up"}]]);return se.forEach(Gt=>{if(Gt.length===1){if(Gt[0][SS]===0)return;let Lt=Gt[0][LG]*ge,It=Gt[0][EG]*qe-_e,Pt=be*RP,gr=be*Ae,ur=It+Pt+gr;if(ur=ur>=be?be-1:ur,je.push(Lt),Re.push(ur-Ot),We.push(Lt),Qe.push(ur),xe===1){let vr=Gt[0][kG].split(","),Tr=!1;vr=vr.map(Number);for(const[Pr,Tt]of or)if(vr.some(Yt=>Pr.has(Yt))){rt.push(Tt.color),pt.push(Tt.symbol),Tr=!0;break}Tr||(rt.push(Jt),pt.push("circle"))}else Gt[0][TG]===me?rt.push(Qt):rt.push(qt)}else Gt.forEach((Lt,It)=>{if(Lt[SS]===0)return;let Pt=Lt[LG]*ge,gr=Lt[EG]*qe-_e,ur=be*RP,vr=be*Ae,Tr=gr+ur+vr;if(Tr=Tr>=be?be-1:Tr,je.push(Pt),Re.push(Tr-Ot),We.push(Pt),Qe.push(Tr),xe===1){let Pr=Gt[0][kG].split(","),Tt=!1;Pr=Pr.map(Number);for(const[Yt,er]of or)if(Pr.some(sr=>Yt.has(sr))){rt.push(er.color),pt.push(er.symbol),Tt=!0;break}Tt||(rt.push(Jt),pt.push("circle"))}else{let Pr=Lt[yKe]*ge,Tt=Lt[gKe]*qe-_e+ur+vr;Tt=Tt>=be?be-1:Tt;let Yt=Lt[CG]*ge,er=Lt[NG]*qe-_e+ur+vr;er=er>=be?be-1:er,Lt[TG]===me?rt.push(Qt):rt.push(qt),st.push(Pt,Pr,null),ct.push(Tr,Tt,null),ut.push(Pt,Pr),He.push(Tr,Tt),Gt.length-1===It&&(ut.push(Yt,null),He.push(er,null),Ct.push(Yt),Vt.push(er))}})}),Ue.shadowXPoints=je,Ue.shadowYPoints=Re,Ue.playerXPoints=We,Ue.playerYPoints=Qe,Ue.playerColorPoints=rt,Ue.trackX=ut,Ue.trackY=He,Ue.sprintX=st,Ue.sprintY=ct,Ue.arrowX=Ct,Ue.arrowY=Vt,Ue.symbols=pt,Ue}function U(se,me){return se.map((ge,be)=>ge.map((xe,Ae)=>{if(Ae===me){let[qe,_e,Ue]=xe.split(/[:.]/);return parseInt(qe)*60+parseInt(_e)}else return xe}))}function O(se,me,ge,be,xe=0,Ae){let qe=[];return be.forEach(_e=>{let Ue=xe===0?parseInt(_e[1])-parseInt(ge):parseInt(_e[1])+parseInt(ge);se.filter(je=>_e[0]===je[SKe]&&Ue===je[zG]&&me===je[_Ke]).forEach(je=>{let Re=je[wKe],We=je[TKe];We<=Ae&&qe.push([Re,We])})}),qe}function X(se){return se.flat().every(me=>me===0)}function N(se){se.data=U(se.data,OG),se.field_positions=U(se.field_positions,zG);let me=F(se.data,a,d.touches),ge=j(se.data),be=O(se.field_positions,d.selected_team,d.secondStart,me.main_plays,d.operationStart,a),xe=O(se.field_positions,d.selected_team,d.secondEnd,me.main_plays,d.operationEnd,a),Ae=A(ge),qe=M(be),_e=M(xe),Ue=Ae[0].length,je=Ae.length;Ae=I(I(Ae,Ue,je),Ue,je),qe=I(I(qe,Ue,je),Ue,je),_e=I(I(_e,Ue,je),Ue,je),Ue=Ae[0].length,je=Ae.length;let Re=W(me.sequences,d.selected_team,Ue,je,d.touches);var We=[[0,"rgba(12,31,82,0)"],[.2,"rgba(14, 55, 115, 0.8)"],[.4,"rgba(33, 85, 160, 0.8)"],[.6,"rgba(16, 124, 170, 0.8)"],[.8,"rgba(32, 154, 207, 0.8)"],[1,"rgba(32, 174, 207, 0.8)"]],Qe=[[0,"rgba(12,31,82,0)"],[.2,"rgba(73, 13, 67, 0.8)"],[.4,"rgba(98, 32, 91, 0.8)"],[.6,"rgba(121, 52, 114, 0.8)"],[.8,"rgba(176, 36, 121, 0.8)"],[1,"rgba(230, 49, 158, 0.8)"]],rt=[[0,"rgba(12,31,82,0)"],[.2,"rgba(94, 111, 79, 1)"],[.4,"rgba(111, 142, 28, 1)"],[.6,"rgba(142, 177, 50, 1)"],[.8,"rgba(169, 211, 57, 1)"],[1,"rgba(195, 229, 105, 1)"]],pt=[{z:Ae,type:"heatmap",connectgaps:!0,opacity:1,colorscale:rt,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],ut=[{z:qe,type:"heatmap",connectgaps:!0,opacity:1,colorscale:We,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],He=[{z:_e,type:"heatmap",connectgaps:!0,opacity:1,colorscale:Qe,autoscale:!1,showscale:!1,zsmooth:"best",showgrid:!1,showline:!1}],st={x:Re.shadowXPoints,y:Re.shadowYPoints,mode:"markers",marker:{symbol:Re.symbols,color:"rgba(0, 0, 0, 0.5)",size:9}},ct={x:Re.playerXPoints,y:Re.playerYPoints,mode:"markers",marker:{symbol:Re.symbols,color:Re.playerColorPoints,size:8}},Ct={x:Re.trackX,y:Re.trackY,mode:"lines",line:{color:"rgba(255, 255, 255, 1)",width:1,dash:"2px 2px",arrowhead:"end"}},Vt={x:Re.sprintX,y:Re.sprintY,mode:"lines",line:{color:"rgba(255, 255, 255, 1)",width:1}},Ot={x:Re.arrowX,y:Re.arrowY,mode:"markers",marker:{symbol:"triangle-up",size:10,color:"rgba(255, 255, 255, 1)",angle:120}},qt=[];d.showTracks&&d.touches>1&&qt.push(Vt,Ct,Ot),d.showTracks&&qt.push(st,ct),d.showPlayersEndPosition&&!X(_e)&&qt.push(...He),d.showPlayersPosition&&!X(qe)&&qt.push(...ut),d.showBallPosition&&!X(Ae)&&qt.push(...pt);const Zt=[0,Ue],Jt=[0,je];if(r={showlegend:!1,width:h.value,height:f(h.value),xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:Zt},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:Jt},margin:{l:0,r:0,b:0,t:5}},!!v.value)try{AP.react(i.value,qt,r,{displayModeBar:!1,staticPlot:!0})}catch(Qt){console.warn("Error updating Plotly plot:",Qt)}}const Y=()=>{};return t.onBeforeUnmount(()=>{window.removeEventListener("resize",Y)}),t.onMounted(()=>{v.value&&(v.value.style.pointerEvents="none"),window.addEventListener("resize",Y),l(),setTimeout(()=>{if(v.value)try{const se=[],me=h.value||MG,ge={showlegend:!1,width:me,height:f(me),xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:[0,Kw]},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,ticks:"",showbackground:!1,backgroundcolor:"transparent",range:[0,r9+2]},margin:{l:0,r:0,b:0,t:5}};AP.newPlot(i.value,se,ge,{displayModeBar:!1,staticPlot:!0},{responsive:!0})}catch(se){console.warn("Error creating Plotly plot in onMounted:",se)}},0)}),(se,me)=>(t.openBlock(),t.createElementBlock("div",uKe,[t.createElementVNode("div",dKe,[d.dataPaintInfo.data.length==0||d.showdefault?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([(e.widthContainer>=320&&e.widthContainer<768,"class-not-result-field"),e.widthContainer<320?"class-not-result-field-movil-small":""])},[d.showdefault?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.widthContainer<768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[me[0]||(me[0]=t.createTextVNode("No se muestran datos. Estamos",-1)),me[1]||(me[1]=t.createElementVNode("br",null,null,-1)),me[2]||(me[2]=t.createTextVNode(" en modo template.",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No se muestran datos. Estamos en modo template.")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.widthContainer<768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[me[3]||(me[3]=t.createTextVNode("No se muestran resultados debido",-1)),me[4]||(me[4]=t.createElementVNode("br",null,null,-1)),me[5]||(me[5]=t.createTextVNode(" a los filtros aplicados.",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No se muestran resultados debido a los filtros aplicados.")],64))],64))],2)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",pKe,null,512),[[t.vShow,d.lateralidad=="left"]]),t.withDirectives(t.createElementVNode("div",hKe,null,512),[[t.vShow,d.lateralidad=="right"]]),t.createElementVNode("div",{ref_key:"surfacePlot",ref:v,id:i.value,class:t.normalizeClass(["surface-plot-heatmap",e.inFavor?"":"against"])},null,10,fKe)])]))}},EKe={components:{GSCTrendPosition:oKe,CardField:LKe},props:{acronymHome:{type:String,default:""},acronymAway:{type:String,default:""},typePlay:{type:String,default:"A favor"},tournamentSelected:{type:Object,default:()=>({})},widthContainer:{type:Number,default:1280},touchAllData:{type:Array,default:()=>[]},playersData:{type:Object,default:()=>{}},homeTeam:{type:Number,default:0},awayTeam:{type:Number,default:0},selected_category:{type:Number,default:31},team:{type:Number,default:0},forGame:{type:Boolean,required:!1},teamsData:{type:Object,default:()=>{}},fieldPositionsAll:{type:Array,default:()=>[]},inFavor:{type:Boolean,required:!1},isTacticVisible:{type:Boolean,required:!1},lateralidad:{type:String,default:"left"},showBallGo:{type:Boolean,default:!0},showHeatMap:{type:Boolean,default:!0},ballOnOff:{type:String,default:"OFF"},showdefault:{type:Boolean,default:!1}},data(){return{type:"ball",show:!1,game:62276,trajectories:[],rival:3014,totalCorners:0,typepositioning:"Posición",numberTouches:1,playersList:{},timepositioning:-1,filterFieldPositions:[],timepositioningFinal:-1,arrayPlayers:{},season:1325,timepositioningend:1,zonesFilter:[],touchFilter:{},token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{touchAllData:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},zonesFilter:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},typepositioning:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},timepositioning:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0},timepositioningend:{handler(){this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},deep:!0}},computed:{firstTeam(){return this.homeTeam===this.team?this.acronymHome:this.acronymAway},secondTeam(){return this.homeTeam===this.team?this.acronymAway:this.acronymHome},firstTeam1Touch(){return this.inFavor?this.homeTeam===this.team?this.acronymHome:this.acronymAway:this.homeTeam===this.team?this.acronymAway:this.acronymHome},secondTeam1Touch(){return this.inFavor?this.homeTeam===this.team?this.acronymAway:this.acronymHome:this.homeTeam===this.team?this.acronymHome:this.acronymAway},reftrendteamsTouches(){const e=this.widthContainer;return e<=480?"ref-trend-teams-touches480":e<=768?"ref-trend-teams-touches768":"ref-trend-teams-touches"},reftrendteamslocal(){const e=this.widthContainer;return e<=480?"ref-trend-teams-local480":e<=768?"ref-trend-teams-local768":"ref-trend-teams-local"},reftrendteamsrival(){return this.widthContainer<=768?"ref-trend-teams-rival768":"ref-trend-teams-rival"},reftrendteamsall(){const e=this.widthContainer;return e<=480?"ref-trend-teams-all480":e<=768?"ref-trend-teams-all768":"ref-trend-teams-all"},refpointlebeltext(){const e=this.widthContainer;return e<=390?"ref-point-lebel-text390":e<=480?"ref-point-lebel-text480":e<=768?"ref-point-lebel-text768":e<=860?"ref-point-lebel-text870":"ref-point-lebel-text"},trendcontentcontrols(){return this.widthContainer<=768?"trend-content-controls768":["trend-content-controls","to-right"]},trendtitle(){return this.widthContainer<=768?"trend-title768":"trend-title"},trendtitlecontainer(){return this.widthContainer<=768?"trend-titlecontainer768":"trend-titlecontainer"},trendcontentcontrolscontainer(){const e=this.widthContainer;return e<=400?"trend-content-controls-container400":e<=860?"trend-content-controls-container860":"trend-content-controls-container"},trendcontentcontrolsleyendcheckscontent(){const e=this.widthContainer;return e<=400?"trend-content-controls-leyend-checkscontent400":e<=768?"trend-content-controls-leyend-checkscontent768":e<=1e3?"trend-content-controls-leyend-checkscontent1000":"trend-content-controls-leyend-checkscontent"},trendcontentcontrolsleyend(){const e=this.widthContainer;return e<=768?"trend-content-controls-leyend768":e<=1e3?"trend-content-controls-leyend1000":"trend-content-controls-leyend"},contDataClass(){return this.widthContainer<=768?"cont-data768":"cont-data"},contDataClass2(){return this.widthContainer<=768?"cont-data-ref768":"cont-data-ref"},contCollectorsClass(){const e=this.widthContainer;return e<=768?"cont-collectors768":e<=900?"cont-collectors900":"cont-collectors"},contCollectorsClass2(){const e=this.widthContainer;return e<=768?"cont-collectors-ref768":e<=900?"cont-collectors-ref900":"cont-collectors-ref"},contWhoCnnectedClass(){const e=this.widthContainer;return e<=768?"cont-who-connected768":e<=900?"cont-who-connected900":"cont-who-connected"},contWhoCnnectedClass2(){const e=this.widthContainer;return e<=768?"cont-who-connected-ref768":e<=900?"cont-who-connected-ref900":"cont-who-connected-ref"}},methods:{checkBallGo(){this.$emit("update:showBallGo",!this.showBallGo)},checkHeatMap(){this.$emit("update:showHeatMap",!this.showHeatMap)},getDataPosition(){if(this.touchAllData.length>0){const r=this.touchAllData.filter(n=>n[19]===0).map(n=>this.tiempoASegundosEnteros(n[13]));let a=[];this.timepositioning>=0?a=r.map(n=>n+this.timepositioning):a=r.map(n=>n-this.timepositioning);const v=this.fieldPositionsAll.filter(n=>a.includes(this.tiempoASegundosEnteros(n[5]))&&n[2]===this.team),$=this.contarYAgruparPorPosicion(v);let h=[];this.zonesFilter.length!=35?h=this.fieldPositionsAll.filter(n=>this.zonesFilter.includes(n[6])&&n[2]===this.team):h=this.fieldPositionsAll.filter(n=>this.zonesFilter.includes(n[6])&&n[2]===this.team),this.filterFieldPositions=h;let u=[],i=[];for(var e in this.arrayPlayers)this.arrayPlayers[e].selected&&u.push(this.arrayPlayers[e].id),i.push(this.arrayPlayers[e].id);u.length>0&&(this.filterFieldPositions=this.filterFieldPositions.filter(n=>u.includes(n[1])));const p=h.filter(n=>a.includes(this.tiempoASegundosEnteros(n[5]))&&n[2]===this.team),c=this.contarYAgruparPorPosicion(p);this.arrayPlayers={};for(let n=0;n<$.length;n++){const k=c.filter(function(T){return T.id_player==$[n].id_player});this.arrayPlayers[$[n].id_player]={id:$[n].id_player,corners:$[n].corners,cornersfilter:k[0]?k[0].corners:0,data:this.playersData[$[n].id_player]?this.playersData[$[n].id_player]:{name:"-",img:"-",position:11,id:"-",team:"-",nationality_id:"-",nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/undefined.jpg",jersey:"-"},selected:Object.keys(this.arrayPlayers).length>0&&i.includes($[n].id_player)?!!u.includes($[n].id_player):!0}}}else this.arrayPlayers={},this.filterFieldPositions=[]},getDataTrajectory(){if(this.touchAllData.length>0){const r=this.touchAllData.filter(x=>x[19]===0).map(x=>this.tiempoASegundosEnteros(x[13]));let a=[];this.timepositioning>=0?a=r.map(x=>x+Math.abs(this.timepositioning)):a=r.map(x=>x-Math.abs(this.timepositioning));let v=[];this.timepositioningend>=0?v=r.map(x=>x+Math.abs(this.timepositioningend)):v=r.map(x=>x-Math.abs(this.timepositioningend));const $=this.fieldPositionsAll.filter(x=>this.zonesFilter.includes(x[6])&&x[2]===this.team);this.filterFieldPositions=$;let h=[],u=[];for(var e in this.arrayPlayers)this.arrayPlayers[e].selected&&h.push(this.arrayPlayers[e].id),u.push(this.arrayPlayers[e].id);h.length>0&&(this.filterFieldPositions=this.filterFieldPositions.filter(x=>h.includes(x[1])));const i=this.fieldPositionsAll.filter(x=>r.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),p=$.filter(x=>a.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),c=$.filter(x=>v.includes(this.tiempoASegundosEnteros(x[5]))&&x[2]===this.team),n=this.contarYAgruparPorPosicion(i),k=this.contarYAgruparPorPosicion(p),T=this.contarYAgruparPorPosicion(c);for(let x=0;x<n.length;x++){const d=k.filter(function(l){return l.id_player==n[x].id_player}),o=T.filter(function(l){return l.id_player==n[x].id_player});this.arrayPlayers[n[x].id_player]={id:n[x].id_player,corners:n[x].corners,cornersfilter:d[0]?d[0].corners:0,cornersfilterfinal:o[0]?o[0].corners:0,data:this.playersData[n[x].id_player]?this.playersData[n[x].id_player]:{name:"-",img:"-",position:11,id:"-",team:"-",nationality_id:"-",nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/undefined.jpg",jersey:"-"},selected:Object.keys(this.arrayPlayers).length>0&&u.includes(n[x].id_player)?!!h.includes(n[x].id_player):!0}}}else this.arrayPlayers={},this.filterFieldPositions=[]},contarYAgruparPorPosicion(e){const r=e.reduce((a,v)=>{const $=v[1];return a[$]?a[$]+=1:a[$]=1,a},{});return Object.keys(r).map(a=>({id_player:parseInt(a,10),corners:r[a]}))},tiempoASegundosEnteros(e){let r=e.split(":"),a=parseInt(r[0],10),v=parseFloat(r[1]);return a*60+Math.floor(v)},getTimePositioning(e){this.timepositioning=e},getTimePositioningEnd(e){this.timepositioningend=e},getTypePositioning(e){this.typepositioning=e},getArrayZonesField(e){this.zonesFilter=e},selectcheckplayerall(e){for(let r in this.arrayPlayers)this.arrayPlayers[r].selected=e;this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},selectcheckplayer(e){this.arrayPlayers[e].selected=!this.arrayPlayers[e].selected,this.typepositioning=="Posición"?this.getDataPosition():this.getDataTrajectory()},clickTypeButton(e){this.type=e},clickAdvanced(){this.show=!this.show},async getData(){}},mounted(){}},CKe={key:0,class:"ref-trend-ball-player-container"},NKe={class:"ref-trend-favor-label"},OKe={class:"ref-trend-favor-label-text"},MKe={class:"ref-trend-ball-player"},VKe={class:"ref-trend-ball-player-label"},zKe={key:1,class:"ref-trend-ball-player-container-route"},PKe={class:"ref-trend-teams-rival-container-table"},AKe={class:"ref-trend-teams-rival-container-row1"},RKe={class:"ref-trend-teams-rival-container-row2"},UKe={class:"ref-trend-teams-rival-container-table"};function FKe(e,r,a,v,$,h){var u,i,p;const c=t.resolveComponent("GSCTrendPosition"),n=t.resolveComponent("CardField");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(a.widthContainer<=768?"gsc-trend-movil":"gsc-trend-plays")},[t.createElementVNode("div",{class:t.normalizeClass(h.contDataClass)},[t.withDirectives(t.createVNode(c,{onSelectcheckplayer:h.selectcheckplayer,onSelectcheckplayerall:h.selectcheckplayerall,data:$.arrayPlayers,onShowfield:h.getArrayZonesField,onTypepositioning:h.getTypePositioning,"width-container":a.widthContainer,onTimepositioning:h.getTimePositioning,onTimepositioningend:h.getTimePositioningEnd},null,8,["onSelectcheckplayer","onSelectcheckplayerall","data","onShowfield","onTypepositioning","width-container","onTimepositioning","onTimepositioningend"]),[[t.vShow,a.isTacticVisible&&$.type==="position"]]),t.createVNode(n,{"width-container":a.widthContainer,selected_team:a.team,"show-ball-position":a.showBallGo,"show-players-position":a.showHeatMap,selected_category:a.selected_category,"show-tracks":a.ballOnOff=="ON",touches:$.numberTouches,"operation-start":$.timepositioning>0?1:0,"second-start":Math.abs($.timepositioning),"second-end":$.timepositioningend>0?1:0,"operation-end":Math.abs($.timepositioningend),lateralidad:a.lateralidad,"show-players-end-position":$.typepositioning=="Recorrido","in-favor":a.inFavor,showdefault:a.showdefault,"data-paint-info":{data:a.touchAllData,field_positions:$.filterFieldPositions,home_atk_direction:1}},null,8,["width-container","selected_team","show-ball-position","show-players-position","selected_category","show-tracks","touches","operation-start","second-start","second-end","operation-end","lateralidad","show-players-end-position","in-favor","showdefault","data-paint-info"])],2),t.createElementVNode("div",{class:t.normalizeClass(h.contDataClass2)},[t.createElementVNode("div",{class:t.normalizeClass(h.contCollectorsClass2)},[$.typepositioning==="Posición"?(t.openBlock(),t.createElementBlock("div",CKe,[t.createElementVNode("div",NKe,[t.createElementVNode("div",OKe,[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("A Favor")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("En Contra")],64))]),r[0]||(r[0]=t.createElementVNode("div",{class:"ref-trend-favor-separator"},null,-1))]),r[2]||(r[2]=t.createElementVNode("div",{class:"ref-trend-ball-ball"},[t.createElementVNode("div",{class:"ref-trend-ball-ball-point"}),t.createElementVNode("div",{class:"ref-trend-ball-ball-label"},"BALÓN")],-1)),t.createElementVNode("div",MKe,[r[1]||(r[1]=t.createElementVNode("div",{class:"ref-trend-ball-playe-point"},null,-1)),t.createElementVNode("div",VKe,[a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("JUGADORAS ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("JUGADORAS ")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("JUGADORES ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("JUGADORES ")],64))],64))])])])):(t.openBlock(),t.createElementBlock("div",zKe,[...r[3]||(r[3]=[t.createStaticVNode('<div class="ref-trend-ball-ball" data-v-08393e58><div class="ref-trend-ball-ball-point" data-v-08393e58></div><div class="ref-trend-ball-ball-label" data-v-08393e58>BALÓN</div></div><div class="ref-trend-ball-player-route" data-v-08393e58><div class="ref-trend-ball-player-label" data-v-08393e58>RECORRIDOS: </div><div class="ref-trend-ball-playe-point" data-v-08393e58></div><div class="ref-trend-ball-player-label" data-v-08393e58>INICIO </div><div class="ref-trend-ball-playe-point-end" data-v-08393e58></div><div class="ref-trend-ball-player-label" data-v-08393e58>FINAL</div></div>',2)])]))],2),a.ballOnOff=="ON"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(h.contWhoCnnectedClass2),style:t.normalizeStyle($.numberTouches>1?"margin-left: 0%; display: flex; justify-content: center;":"")},[$.numberTouches>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(h.reftrendteamsTouches)},[t.createElementVNode("div",{class:"ref-trend-teams-rival-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center !important;":"")}," COORDENADAS: ",4),t.createElementVNode("div",PKe,[t.createElementVNode("div",AKe,[r[4]||(r[4]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/circle-my-team.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext),style:{"font-size":"9px"}},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.firstTeam),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(((u=a.teamsData[a.team])==null?void 0:u.acronym)||""),1)],64))],2)]),t.createElementVNode("div",RKe,[r[5]||(r[5]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(/circle-other-team.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext),style:{"font-size":"9px"}},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.secondTeam),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Rival")],64))],2)])])],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(h.reftrendteamsall)},[t.createElementVNode("div",{class:t.normalizeClass(h.reftrendteamslocal)},[t.createElementVNode("div",{class:"ref-trend-teams-local-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center !important;":"")},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.firstTeam1Touch),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(a.inFavor?((i=a.teamsData[a.team])==null?void 0:i.acronym)||"":"Rival"),1)],64))],4),t.createElementVNode("div",{class:t.normalizeClass(a.widthContainer<=980?"ref-trend-teams-local-container-table-movil":"ref-trend-teams-local-container-table")},[t.createElementVNode("div",{class:"ref-trend-teams-local-container-row1",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[7]||(r[7]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-gol.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[6]||(r[6]=[t.createTextVNode("Remata destino ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("portería fue gol",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row2",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[9]||(r[9]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-con-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[8]||(r[8]=[t.createTextVNode("Rematado destino ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("a portería no fue gol",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row3",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[11]||(r[11]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/rematado-sin-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[10]||(r[10]=[t.createTextVNode("Rematado sin ",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("destino a portería",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row4",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[13]||(r[13]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/raso.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[...r[12]||(r[12]=[t.createTextVNode("Raso al área/",-1),t.createElementVNode("br",null,null,-1),t.createTextVNode("En corto",-1)])],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-local-container-row5",style:t.normalizeStyle(a.widthContainer<=980?"display: inline-block !important;":"")},[r[14]||(r[14]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/sin-destino.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},"Sin destino",2)],4)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(h.reftrendteamsrival)},[t.createElementVNode("div",{class:"ref-trend-teams-rival-label-title",style:t.normalizeStyle(a.widthContainer<=768?"justify-content: center;":"")},[a.forGame?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(h.secondTeam1Touch),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(a.inFavor?"Rival":((p=a.teamsData[a.team])==null?void 0:p.acronym)||""),1)],64))],4),t.createElementVNode("div",UKe,[t.createElementVNode("div",{class:"ref-trend-teams-rival-container-row1",style:t.normalizeStyle(a.widthContainer<=980&&a.widthContainer>=768?"display: inline-block !important;":"")},[r[23]||(r[23]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/ganados-jugador-rival.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[a.widthContainer<=768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[15]||(r[15]=t.createTextVNode("Ganados ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadora ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugador ")],64)),r[16]||(r[16]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Ganados por defensivo")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[20]||(r[20]=t.createTextVNode("Ganados ",-1)),r[21]||(r[21]=t.createElementVNode("br",null,null,-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadora ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugador ")],64)),r[22]||(r[22]=t.createTextVNode(" rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[17]||(r[17]=t.createTextVNode("Ganados por",-1)),r[18]||(r[18]=t.createElementVNode("br",null,null,-1)),r[19]||(r[19]=t.createTextVNode("defensivo",-1))],64))],64))],2)],4),t.createElementVNode("div",{class:"ref-trend-teams-rival-container-row2",style:t.normalizeStyle(a.widthContainer<=980&&a.widthContainer>=768?"display: inline-block !important;":"")},[r[33]||(r[33]=t.createElementVNode("div",{class:"ref-point-view",style:{backgroundImage:"url(http://golstatsimages.blob.core.windows.net/content/ganados-portero.png)"}},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(h.refpointlebeltext)},[a.widthContainer<=768?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[25]||(r[25]=t.createTextVNode("Ganados ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Portera ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Portero ")],64)),r[26]||(r[26]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[24]||(r[24]=t.createTextVNode("Ganados por ",-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("portera")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("portero")],64))],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.inFavor?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r[30]||(r[30]=t.createTextVNode("Ganados ",-1)),r[31]||(r[31]=t.createElementVNode("br",null,null,-1)),a.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Portera ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Portero ")],64)),r[32]||(r[32]=t.createTextVNode("rival",-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r[27]||(r[27]=t.createTextVNode("Ganados por",-1)),r[28]||(r[28]=t.createElementVNode("br",null,null,-1)),r[29]||(r[29]=t.createTextVNode("portero",-1))],64))],64))],2)],4)])],2)],2))],6)):t.createCommentVNode("",!0)],2)],2)}const IKe=t9(EKe,[["render",FKe],["__scopeId","data-v-08393e58"]]),UP={components:{GSCTrend:IKe},props:{game:{type:Object,required:!0},forseason:{type:Boolean,default:!1},forteam:{type:Boolean,default:!1},tournamentselected:{type:Object,default:()=>({})},forgame:{type:Boolean,default:!1},team:{type:Number,default:0},istacticvisible:{type:Boolean,default:!0},issynchronization:{type:Boolean,default:!1},seasonselected:{type:Object,default:()=>({})},canplayvideos:{type:Boolean,default:!0},clientprivilegesbyseasons:{type:Object,default:()=>null},videoprivilegesplayingas:{type:Set,default:()=>new Set([1,2])},infavoragainstteam:{type:Boolean,default:!0},lateralidad:{type:String,default:"left"},teamselected:{type:Number,default:0},filters:{type:Object,default:()=>({isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0})},showBallGo:{type:Boolean,default:!0},showHeatMap:{type:Boolean,default:!0},ballOnOff:{type:String,default:"OFF"},showdefault:{type:Boolean,default:!1}},data(){return{lastGamesBySeasonUrl:"",inFavorResponses:null,againstResponses:null,homeTeamResponses:null,awayTeamResponses:null,isSpecificPlaysVisible:!1,infavoragainst:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",touchAllDataHome:[],touchAllDataAway:[],regularflag:null,localFilters:{},containerWidth:0,openModal:!1,playersData:{},teamsData:{},teamCorners:{corners:0,cornersAgainst:0},gamesAllHome:[],gamesAllAway:[],touchDataSelected:[],auxChangeFilterPlayer:!0,auxChangeFilterGames:!0,positionsDataSelected:[],copyLastFilters:{},seasonId:0,totalDataCollection:{},seasonsByGame:{},matchesByGame:{},rivalsByGame:{},updateConnections:0,showCorners:0,filterPlayersAvailable:[],filterGamesAvailable:[],updateTrend:0,updateFilter:0,copyplayers:[],typePlay:"A favor",modalInitialData:{},areFiltersOpen:!1,heightFilters:"123px",isLoading:!1,adjustedPlays:new Set}},watch:{isLoading(e){this.isSpecificPlaysVisible=!e},infavoragainst:{immediate:!0,handler(){this.fillFilterGamesReset(),this.fillFilterPlayersReset(),this.updateConnections+=1}},infavoragainstteam:{immediate:!0,async handler(e,r){if(console.log("???????????????????????????????????????????????????????????????????????????????? ",e),this.infavoragainst=e,console.log("se asigno el valor: ",e),this.showdefault){this.updateTrend+=1;return}if(r===void 0&&e!==void 0){this.infavoragainst=e;return}if(e!==void 0&&e!==r)if(this.gamesAllHome.length>0||this.gamesAllAway.length>0){if(this.updateTrend+=1,this.infavoragainst=e,this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}))if(this.teamselected==this.currentGame.home_team){const a=`REQ-ORCH-HOME-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;console.log(`[${a}] GSCCornersGeneralTrend - Llamando requestOrchestrator (HOME):`,{games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game}),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game})}else{const a=`REQ-ORCH-AWAY-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;console.log(`[${a}] GSCCornersGeneralTrend - Llamando requestOrchestrator (AWAY):`,{games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game}),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.game})}}else this.infavoragainst=e}},game:{immediate:!0,handler(e,r){this.createStorageGame(),this.showdefault?this.initializeEmptyData():this.getDataCorners(e)}},teamselected:{immediate:!0,async handler(e,r){if(this.showdefault){this.updateConnections+=1,this.updateTrend+=1,this.touchDataSelected=[],this.positionsDataSelected=[],this.totalDataCollection[this.currentGame.id]||this.createStorageGame();return}if(r===void 0&&e!==void 0){(this.gamesAllHome.length>0||this.gamesAllAway.length>0)&&(this.fillFilterGamesReset(),this.fillFilterPlayersReset(),this.updateConnections+=1);return}e!==void 0&&e!==r&&(this.updateConnections+=1,this.updateTrend+=1,this.touchDataSelected=[],this.gamesAllHome.length!=0&&this.gamesAllAway.length!=0&&(this.teamselected==this.currentGame.home_team?this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(console.log("requestOrchestrator 666666666666666666666666666666666666666666666666666666666666666666666666"),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})):this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(console.log("requestOrchestrator 55555555555555555555555555555555555555555555555555555555555555555555555"),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame}))),this.fillFilterGamesReset(),this.fillFilterPlayersReset())}},filters:{immediate:!0,handler(e,r){e&&typeof e=="object"?this.localFilters=JSON.parse(JSON.stringify(e)):this.localFilters={isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0}},deep:!0},calculationTouchesData:{immediate:!0,handler(e){this.showCorners=this.calculationTouchesData.filter(r=>r[19]==0).length}},forseason:{handler(e,r){}},forteam:{handler(e,r){}},forgame:{handler(e,r){}},team:{handler(e,r){}},istacticvisible:{handler(e,r){}},showBallGo:{handler(e,r){}},showHeatMap:{handler(e,r){}},ballOnOff:{handler(e,r){}},showdefault:{handler(e,r){}},lateralidad:{handler(e,r){}},tournamentselected:{handler(e,r){},deep:!0},seasonselected:{handler(e,r){},deep:!0}},computed:{currentGame(){return this.showdefault&&(!this.game||this.game===null||Object.keys(this.game||{}).length===0)?this.getDefaultGame():this.game},isGameOnly(){return this.forgame&&!this.forseason&&!this.forteam},calculateTotal(){return this.touchDataSelected.filter(e=>e[19]==0).length},calculationPositionsData(){return this.positionsDataSelected},calculationTouchesData(){let e=[],r=[];if(this.touchDataSelected.length>0){console.log(" ======================= FILTROS FILTERS:::::::::::::::",this.localFilters),this.updateCopyfilter(),this.localFilters.isMoment?r=this.touchDataSelected.filter(v=>this.localFilters.moment.includes(v[17])&&this.localFilters.playingAs.includes(v[14])&&this.localFilters.sections.includes(v[20])&&v[19]==0):r=this.touchDataSelected.filter(v=>this.localFilters.final.includes(v[16])&&this.localFilters.playingAs.includes(v[14])&&this.localFilters.sections.includes(v[20])&&v[19]==0),console.log("666666666666666666666 ==================================== la funcion es : ",r),this.updateGamesListFilter({corners:r}),this.localFilters.games.length>0&&(r=r.filter(v=>this.localFilters.games.includes(v[3]))),console.log("5555555555555555555555 ==================================== la funcion es : ",r),r=r.filter(v=>this.localFilters.cornertype==v[4]),console.log("22222222222222222222222222 ==================================== la funcion es : ",r),this.localFilters.zona.length!=35&&(r=r.filter(v=>this.localFilters.zona.includes(v[12]))),console.log("????????????????? **************************** 3333333333333333333333333333333333 ==================================== la funcion es : ",r),r=r.filter(v=>v[5].split(",").map($=>parseInt($)).some($=>this.localFilters.howWas.includes($))),console.log("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 11111111111111111111111111111111111 ==================================== la funcion es : ",r),this.localFilters.whathappened.length!=24&&(r=r.filter(v=>v[5].split(",").map($=>parseInt($)).some($=>this.localFilters.whathappened.includes($))));const a=r.map(v=>v[18]);if(e=this.touchDataSelected.filter(v=>a.includes(v[18])),console.log("777777777 ==================================== la funcion es : ",e),e.length>0){let v=null,$=null,h=new Set;e.forEach(u=>{u[19]===0?(v=u[18],$=u):(u[18]===v&&$&&!h.has(u[18])&&(u[6]=1-$[10],u[7]=1-$[11],h.add(u[18])),$=u)}),console.log("66666666 ==================================== la funcion es : ",e),console.log("888888 ==================================== la funcion es : ",e),e.forEach(u=>{const i=u[5].split(",").map(n=>n.trim()),p=["125","139","131","145"],c=u[0];i.some(n=>p.includes(n))&&!this.adjustedPlays.has(c)&&this.adjustedPlays.add(c)})}}return console.log("==================================== la funcion es : ",e),e},cornersInFavor(){return"-"},cornersAgainst(){return"-"},isMovil(){return this.containerWidth<=768}},methods:{getDefaultGame(){return{id:0,home_team:1,away_team:2,home_acronym:"LOC",away_acronym:"VIS",season:2010,regularSeasonId:2010,logo_home:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",logo_away:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"}},setHeaderStickyListener(){const e=this.$refs.header.getBoundingClientRect().top-1+(window.scrollY||window.pageYOffset);window.onscroll=()=>{(window.scrollY||window.pageYOffset)>e&&(this.areFiltersOpen?this.heightFilters="282px":this.isMovil?this.forteam?this.heightFilters="170px":this.heightFilters="222px":this.heightFilters="123px")}},onChangeShowFilters(e){this.areFiltersOpen=e},fillFilterPlayersReset(){setTimeout(()=>{if(this.infavoragainst){const e=this.forgame?this.infavoragainst?this.teamselected:this.teamselected==this.currentGame.home_team?this.currentGame.away_team||this.currentGame.visiting_team:this.currentGame.home_team:this.teamselected,r=this.touchDataSelected.filter(v=>v[19]==0&&e).map(v=>v[1]),a=[...new Set(r)];this.getFilterTakenCorners({players:a})}},100)},fillFilterGamesReset(){setTimeout(()=>{const e=this.touchDataSelected.filter(a=>a[19]==0).map(a=>a[3]),r=[...new Set(e)];this.getFilterGames({games:r})},100)},updateCopyfilter(){this.copyLastFilters=this.localFilters},fillGameDataTeam(e){const r=this.currentGame;return{teamsIds:[e.home_team,e.visiting_team],label:`${e.matchday_abbreviation.replace("M","J")} ${this.teamsData[r.home_team].acronym} vs ${r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym}`,id:e.game_id,isSelected:!0,dateTimeMillis:Date.parse(e.date_time_utc),rivalTeam:{logo:r.home_team==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,team_id:r.home_team==e.home_team?e.visiting_team:e.home_team,provisional_logo:r.home_team==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,colloquial_name:r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,acronym:r.home_team==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,team_name:r.home_team==e.home_team?this.teamsData[e.visiting_team].name:this.teamsData[e.home_team].name},roundAbbreviation:e.matchday_abbreviation.replace("M","J")}},fillGameData(e){return{teamsIds:[e.home_team,e.visiting_team],label:`${e.matchday_abbreviation.replace("M","J")} ${this.teamsData[this.teamselected].acronym} vs ${this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym}`,id:e.game_id,isSelected:!0,dateTimeMillis:Date.parse(e.date_time_utc),rivalTeam:{logo:this.teamselected==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,team_id:this.teamselected==e.home_team?e.visiting_team:e.home_team,provisional_logo:this.teamselected==e.home_team?this.teamsData[e.visiting_team].img:this.teamsData[e.home_team].img,colloquial_name:this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,acronym:this.teamselected==e.home_team?this.teamsData[e.visiting_team].acronym:this.teamsData[e.home_team].acronym,team_name:this.teamselected==e.home_team?this.teamsData[e.visiting_team].name:this.teamsData[e.home_team].name},roundAbbreviation:e.matchday_abbreviation.replace("M","J")}},updatePlayerListFilter(e){if(this.infavoragainst){let r={},a=[];for(let v=0;v<e.corners.length;v++){const $=e.corners[v];if($[19]===0&&$[2]===this.teamselected){const h=$[1],u=this.playersData[h];h in r||(r[h]=u,a.push(u))}}if(this.filterPlayersAvailable=a,e.players.length>0&&this.filterPlayersAvailable.length>0)for(let v=0;v<this.filterPlayersAvailable.length;v++)e.players.includes(this.filterPlayersAvailable[v].id)?this.filterPlayersAvailable[v].isSelected=!0:this.filterPlayersAvailable[v].isSelected=!1}},updateGamesListFilter(e){if(!this.forgame){this.filterGamesAvailable=[];const r=this.obtenerIDsGames(e.corners);this.forseason?this.teamselected==this.currentGame.home_team?this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllHome.find($=>$.game_id===a);if(v)return this.fillGameData(v)}):this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllAway.find($=>$.game_id===a);if(v)return this.fillGameData(v)}):this.filterGamesAvailable=r.map(a=>{let v=this.gamesAllHome.find($=>$.game_id===a);if(v)return this.fillGameDataTeam(v)})}if(this.localFilters.games.length>0&&this.filterGamesAvailable.length>0)for(let r=0;r<this.filterGamesAvailable.length;r++)this.localFilters.games.includes(this.filterGamesAvailable[r].id)?this.filterGamesAvailable[r].isSelected=!0:this.filterGamesAvailable[r].isSelected=!1},getResetPlayers(){for(let e in this.playersData)this.playersData[e].isSelected=!0},getFilterZone(e){this.localFilters.zona=e,this.localFilters.isZoneFull=e.length===35},getFilterHowWasCorner(e){this.localFilters.cornertype=e.cornertype,this.localFilters.howWas=e.howWas},getFilterTakenCorners(e){const r=Array.isArray(e.players)?e.players:[];Array.isArray(this.localFilters.players)||(this.localFilters.players=[]),this.arraysAreEqual(this.localFilters.players,r)||(this.localFilters.players=r)},arraysAreEqual(e,r){if(!e&&!r)return!0;if(!e||!r||!Array.isArray(e)||!Array.isArray(r)||e.length!==r.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==r[a])return!1;return!0},getFilterGames(e){const r=Array.isArray(e.games)?e.games:[];Array.isArray(this.localFilters.games)||(this.localFilters.games=[]),this.areGamesIdsArraysContentEqual(this.localFilters.games,r)||(this.localFilters.games=r,this.fillFilterPlayersReset())},areGamesIdsArraysContentEqual(e,r){return!e&&!r?!0:!e||!r||!Array.isArray(e)||!Array.isArray(r)?!1:e.length===r.length&&e.every((a,v)=>a===r[v])},getFilterDetails(e){this.localFilters.playingAs=e.playingAs,this.localFilters.sections=e.sections,this.fillFilterGamesReset(),this.fillFilterPlayersReset()},getFilterResultsByTime(e){this.localFilters.final=e.final,this.localFilters.isMoment=e.isMoment,this.localFilters.moment=e.moment,this.fillFilterGamesReset(),this.fillFilterPlayersReset()},getFilterWhatHappened(e){this.localFilters.whathappened=e,this.localFilters.isWhatHappenedFull=e.length===24},obtenerIDsGames(e){return[...new Set(e.map(r=>r[3]))]},async getInFavorAgainstTeam(e){if(this.showdefault){this.updateTrend+=1,this.infavoragainst=e;return}this.updateTrend+=1,this.infavoragainst=e,this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})&&(this.teamselected==this.currentGame.home_team?(console.log("requestOrchestrator 44444444444444444444444444444444444444444444444444444444444"),await this.requestOrchestrator({games:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})):(console.log("requestOrchestrator 3333333333333333333333333333333333333333333333333333333333333"),await this.requestOrchestrator({games:this.gamesAllAway,team:this.teamselected,inFavor:this.infavoragainst,game:this.currentGame})))},async getTeamSelected(e){},async fetchDataTeam(e,r){document.body.classList.add("no-scroll"),console.log("44444 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ");try{return(await r.get(e)).data}catch(a){throw console.error("Error al obtener datos:",a),a}},async requestOrchestrator(e){if(console.log("LATERALIDAD DEL COMPONENTE: ",this.lateralidad," TEAM SELECTED DEL COMPONENETE: ",this.teamselected," ES A FAVOR: ",this.infavoragainstteam),console.log("11111 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e),this.showdefault){this.loadDummyDataForTeam(e);return}console.log("PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e);let r=!1;(this.forgame||this.forseason)&&(r=this.teamselected===this.currentGame.home_team);let a=[],v=[];const $=S2.create({headers:{Authorization:`${this.token}`}});for(let i=0;i<e.games.length;i++)this.seasonId=e.games[i].season_id,a.push(e.inFavor?"https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/"+e.games[i].season_id+"/corners/trends/teams/"+e.team+"/"+e.games[i].game_id:"https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/"+e.games[i].season_id+"/corners/trends/teams/"+e.team+"/"+e.games[i].game_id+"?isR=1");v=a.map(i=>this.fetchDataTeam(i,$));let h=[],u=[];try{this.isLoading=!0;const i=this.forgame?r?await Promise.all(v):await Promise.all(v):this.inFavor?this.inFavorResponses||await Promise.all(v):this.againstResponses||await Promise.all(v);this.forgame||this.forseason?r?this.homeTeamResponses||(this.homeTeamResponses=i):this.awayTeamResponses||(this.awayTeamResponses=i):e.inFavor?this.inFavorResponses||(this.inFavorResponses=i):this.againstResponses||(this.againstResponses=i);for(let p=0;p<i.length;p++)i[p].data=this.changeLateralityCoordenatesPlays(i[p].data,!1),i[p].field_positions=this.changeLateralityCoordenatesPlays(i[p].field_positions,!0),h=h.concat(i[p].data),u=u.concat(i[p].field_positions),this.getDataPlayers(i[p].players),this.getDataPlayers(i[p].rival_players),this.getDataTeams(i[p].teams),this.getSeasonByGame({season:i[p]&&i[p].hasOwnProperty("season_name")?i[p].season_name:"",game:i[p].data[0]?i[p].data[0][3]:0}),this.getMatchByGame({match:i[p]&&i[p].hasOwnProperty("matchday_abbreviation")?i[p].matchday_abbreviation:"",game:i[p].data[0]?i[p].data[0][3]:0}),this.getRivalsByGame({rival:this.infavoragainstteam?this.teamselected==i[p].teams[0].team_id?i[p].teams[1].name:i[p].teams[0].name:this.teamselected==i[p].teams[0].team_id?i[p].teams[0].name:i[p].teams[1].name,game:i[p].data[0]?i[p].data[0][3]:0,team:this.teamselected,favor:this.infavoragainstteam});this.touchDataSelected=h,console.log("LOS TOCUH SELECTED SON: ",this.touchDataSelected),this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch=h,this.positionsDataSelected=u,this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions=u}catch(i){console.error("Error al obtener datos:",i)}finally{this.isLoading=!1,document.body.classList.remove("no-scroll")}console.log("this.totalDataCollection LATERALIDAD DEL COMPONENTE: ",this.lateralidad," TEAM SELECTED DEL COMPONENETE: ",this.teamselected," ES A FAVOR: ",this.infavoragainstteam,"isHomeTeamSelected: :",r,this.totalDataCollection)},getRowMatrix(e,r){let a=.01351,v=.02439,$=0,h=0,u=[];const i=r.length;let p=Math.floor(i/10);for(;$<74;)h=r.filter(c=>c[0]>=$*a&&c[0]<=($+1)*a&&c[1]>=e*v&&c[1]<=(e+1)*v).map(c=>c[1]).length,p=p===0?1:p,u.push(parseFloat((h/p).toFixed(4))),$++;return u.reverse()},getEmptyArray(e){return Array.from({length:e},()=>0)},getMatrix(e){let r=[this.getEmptyArray(74),this.getEmptyArray(74)],a=[],v=39;for(;v>0&&v<=39;)a=this.getRowMatrix(v,e),r.push(a),v--;return r.push(this.getEmptyArray(74),this.getEmptyArray(74)),r},getSoftData(e,r,a){const v=[];let $=0,h=0;v.push(e[0]);for(let u=1;u<a-1;u++){const i=[];i.push(e[u][0]);for(let p=1;p<r-1;p++)$=e[u][p-1],h=e[u][p+1],i.push($+.5*(e[u][p]+h-$));i.push(e[u][r-1]),v.push(i)}v.push(e[a-1]);for(let u=1;u<r-1;u++)for(let i=1;i<a-1;i++)$=v[i-1][u],h=v[i+1][u],v[i][u]=$+.5*(v[i][u]+h-$);return v},changeLateralityCoordenatesPlays(e,r){return r?e.forEach((a,v)=>{let $=0,h=0;this.infavoragainst?($=a[2]===this.teamselected?1-a[3]:a[3],h=a[2]===this.teamselected?1-a[4]:a[4]):($=a[2]===this.teamselected?a[3]:1-a[3],h=a[2]===this.teamselected?a[4]:1-a[4]),e[v][3]=$,e[v][4]=h}):e.forEach((a,v)=>{let $=0,h=0,u=0,i=0,p=0,c=0;a[19]!=0?this.infavoragainst?($=a[2]===this.teamselected?a[6]:1-a[6],h=a[2]===this.teamselected?1-a[7]:a[7],u=a[2]===this.teamselected?a[8]:1-a[8],i=a[2]===this.teamselected?1-a[9]:a[9],p=a[2]===this.teamselected?a[10]:1-a[10],c=a[2]===this.teamselected?1-a[11]:a[11]):($=a[2]===this.teamselected?1-a[6]:a[6],h=a[2]===this.teamselected?a[7]:1-a[7],u=a[2]===this.teamselected?1-a[8]:a[8],i=a[2]===this.teamselected?1-a[9]:a[9],p=a[2]===this.teamselected?1-a[10]:a[10],c=a[2]===this.teamselected?1-a[11]:a[11]):($=1-a[6],h=a[7],u=1-a[8],i=a[9],p=1-a[10],c=a[11]),e[v][6]=$,e[v][7]=h,e[v][8]=u,e[v][9]=i,e[v][10]=p,e[v][11]=c}),e},changeLateralityPlays(e){e.field_positions=e.field_positions.map(a=>[...a.slice(0,3),a[4],a[3],...a.slice(5)]);let r=[];return e.data.forEach(a=>{a[19]===0&&r.push([a[0],a[13],a[14],a[15]])}),r.forEach(a=>{e.field_positions.filter(v=>a[0]===v[7]&&this.teamselected===v[2]).forEach(v=>{let $=v[3],h=v[4];(e.homeTeamAtkDirection===1&&a[3]===1||e.homeTeamAtkDirection===2&&a[3]===2||e.homeTeamAtkDirection===1&&a[3]===3||e.homeTeamAtkDirection===2&&a[3]===4)&&($=1-$,h=1-h),v[3]=$,v[4]=h})}),e.field_positions},createStorageGame(){const e=this.currentGame;if(this.totalDataCollection[e.id]={},this.totalDataCollection[e.id][e.home_team]={},this.totalDataCollection[e.id][e.home_team].InFavor={},this.totalDataCollection[e.id][e.home_team].InFavor.touch=[],this.totalDataCollection[e.id][e.home_team].InFavor.positions=[],this.totalDataCollection[e.id][e.home_team].Against={},this.totalDataCollection[e.id][e.home_team].Against.touch=[],this.totalDataCollection[e.id][e.home_team].Against.positions=[],this.forgame||this.forseason){const r=e.away_team||e.visiting_team;this.totalDataCollection[e.id][r]={},this.totalDataCollection[e.id][r].InFavor={},this.totalDataCollection[e.id][r].InFavor.touch=[],this.totalDataCollection[e.id][r].InFavor.positions=[],this.totalDataCollection[e.id][r].Against={},this.totalDataCollection[e.id][r].Against.touch=[],this.totalDataCollection[e.id][r].Against.positions=[]}},validateDataLocalStorage(e){return this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch.length>0&&this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions.length>0?(this.touchDataSelected=this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].touch,this.positionsDataSelected=this.totalDataCollection[e.game.id][e.team][e.inFavor?"InFavor":"Against"].positions,!1):!0},getGamesByTeam(e){this.forseason?e.type=="home"?this.gamesAllHome=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1}):this.gamesAllAway=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1}):this.forgame?e.type=="home"?this.gamesAllHome=e.games.filter(function(r){return r.game_id==e.game.id}):this.gamesAllAway=e.games.filter(function(r){return r.game_id==e.game.id}):this.gamesAllHome=e.games.filter(function(r){return(r.home_team==e.idTeam||r.visiting_team==e.idTeam)&&r.game_status==1})},async getDataCorners(e){if(this.showdefault){this.loadDummyData();return}console.log("33333 PETICION DEL SINCRONIZADOR CON LOS VALORES QUE LLEGAN: ",e);const r=S2.create({headers:{Authorization:`${this.token}`}}),a="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons="+(e.season||e.season_id);if(this.lastGamesBySeasonUrl===a)return;this.lastGamesBySeasonUrl=a;let v=await r.get(a);v.data.data[0].games.filter($=>$.game_status===1).length===0?(this.regularflag=!0,v=await r.get("https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons="+this.currentGame.regularSeasonId)):this.regularflag=!1,this.forseason?(this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,type:"home"}),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.away_team||e.visiting_team,type:"away"}),this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame})&&await this.requestOrchestrator({games:this.teamselected==e.visiting_team||this.teamselected==e.away_team?this.gamesAllAway:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame})):this.forgame?(this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,game:this.currentGame,type:"home"}),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.away_team||e.visiting_team,game:this.currentGame,type:"away"}),this.validateDataLocalStorage({team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame})&&(console.log("VALORES --> requestOrchestrator 999999999999999999999999999999999999999999999999999999999",{games:this.teamselected==e.visiting_team?this.gamesAllAway:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}),await this.requestOrchestrator({games:this.teamselected==e.visiting_team?this.gamesAllAway:this.gamesAllHome,team:this.teamselected,inFavor:this.infavoragainstteam,game:this.currentGame}))):(console.log("requestOrchestrator 999999999999999999999999999999999999999999999999999999999"),this.getGamesByTeam({games:v.data.data[0].games,idTeam:e.home_team,type:"home"}),this.validateDataLocalStorage({team:e.home_team,inFavor:!0,game:this.currentGame})&&(console.log("requestOrchestrator 777777777777777777777777777777777777777777777777777777777777777777777"),await this.requestOrchestrator({games:this.gamesAllHome,team:e.home_team,inFavor:!0,game:this.currentGame})))},obtenerNombreAbreviado(e){let r=e.split(", ");if(r.length!==2)return e;let a=r[0],v=r[1],$=a.split(" ")[0];return v.charAt(0).toUpperCase()+". "+$},getDataPlayers(e){for(let r=0;r<e.length;r++)this.playersData.hasOwnProperty(e[r].player_id)||(this.playersData[e[r].player_id]={name:this.obtenerNombreAbreviado(e[r].name),last_name:e[r].name.includes(",")?e[r].name.split(",")[0].trim():"",first_name:e[r].name.includes(",")?e[r].name.split(",")[1].trim():"",img:e[r].photo,photo:e[r].photo,position:e[r].position_id,positions:[e[r].position_id],id:e[r].player_id,player_id:e[r].player_id,team_id:e[r].team_id,team:e[r].team_id,nationality_id:e[r].nationality_id,nationality_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[r].nationality_id+".jpg",jersey:e[r].jersey,isSelected:!0})},getSeasonByGame(e){e.season!=""?this.seasonsByGame[e.game]=e.season:this.seasonsByGame[e.game]="-"},getMatchByGame(e){e.match!=""?this.matchesByGame[e.game]=e.match.replace("M","J"):this.matchesByGame[e.game]="-"},getRivalsByGame(e){this.rivalsByGame[e.favor?"InFavor":"Against"]?this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]?this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival:(this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival):(this.rivalsByGame[e.favor?"InFavor":"Against"]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team]={},this.rivalsByGame[e.favor?"InFavor":"Against"][e.team][e.game]=e.rival)},getDataTeams(e){for(let r=0;r<e.length;r++)this.teamsData.hasOwnProperty(e[r].team_id)||(this.teamsData[e[r].team_id]={name:e[r].name,acronym:e[r].acronym,img:"https://golstatsimages.blob.core.windows.net/teams-80/"+e[r].team_id+".png",id:e[r].team_id})},getTypePlay(e){typeof e=="string"&&(this.typePlay=e)},clickOpenModal(){this.openModal=!this.openModal,document.body.classList.add("no-scroll")},clickCloseFinal(){this.openModal=!1,document.body.classList.remove("no-scroll")},onCornersFilled({corners:e,cornersAgainst:r}){this.teamCorners={corners:e,cornersAgainst:r}},onOpenMediaPlayer(e){this.$emit("open-media-player",e)},onOpenMediaPlayerJson(e){let r={seasonId:this.seasonId,mainSectionType:1,playListType:3,categoryIds:this.forgame?[e.id]:this.infavoragainst?[e.id]:[e.rId+"_r"],gameIds:this.forgame?[this.currentGame.id]:null,playerIds:[],goalkeeperIds:[],teamId:this.forgame?this.infavoragainst?this.teamselected:this.teamselected==this.currentGame.home_team?this.currentGame.away_team||this.currentGame.visiting_team:this.currentGame.home_team:this.teamselected,matchResult:[1,2,3],playData:{},advancedFilter:{playListTitle:""}};this.$emit("open-media-player",r)},initializeEmptyData(){this.isLoading=!0;const e=this.currentGame;this.createStorageGame(),this.touchDataSelected=[],this.positionsDataSelected=[],this.playersData={},this.teamsData={},this.gamesAllHome=[],this.gamesAllAway=[],e.home_team&&(this.teamsData[e.home_team]={name:"Equipo Local",acronym:e.home_acronym||"LOC",img:e.logo_home||`https://golstatsimages.blob.core.windows.net/teams-80/${e.home_team}.png`,id:e.home_team});const r=e.away_team||e.visiting_team;r&&(this.teamsData[r]={name:"Equipo Visitante",acronym:e.away_acronym||e.visiting_team_acronym||"VIS",img:e.logo_away||`https://golstatsimages.blob.core.windows.net/teams-80/${r}.png`,id:r}),this.totalDataCollection[e.id]||this.createStorageGame(),this.totalDataCollection[e.id][this.teamselected]=this.totalDataCollection[e.id][this.teamselected]||{},this.totalDataCollection[e.id][this.teamselected].InFavor=this.totalDataCollection[e.id][this.teamselected].InFavor||{},this.totalDataCollection[e.id][this.teamselected].Against=this.totalDataCollection[e.id][this.teamselected].Against||{},this.totalDataCollection[e.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].touch=[],this.totalDataCollection[e.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].positions=[],this.updateTrend+=1,this.isLoading=!1,document.body.classList.remove("no-scroll")},loadDummyDataForTeam(e){this.isLoading=!0;const r=this.generateDummyDataForTeam(e);this.processDummyData(r),this.isLoading=!1,document.body.classList.remove("no-scroll")},generateDummyData(){const e=this.currentGame,r=e.id||90441,a=this.teamselected||e.home_team,v=e.season||e.season_id||2010,$=[];for(let p=0;p<15;p++){const c=[1,2,3][p%3],n=[1,2][p%2],k=[1,2,3,4,5,6][p%6],T=p%35+1,x=["120","126","327","133"][p%4];$.push([p+1,p+100,a,r,31,x,.3+p*.05,.4+p*.03,.5+p*.05,.5+p*.03,.6+p*.05,.6+p*.03,T,p*100+1e3,n,Math.floor(p/3)+1,c,c,p+1,0,k])}const h=[];for(let p=0;p<15;p++){const c=p*100+1e3;h.push([r,p+100,a,.4+p*.05,.5+p*.03,c,p%35+1,p+1,Math.floor(p/2)+1])}const u=[];for(let p=0;p<5;p++)u.push({player_id:p+100,name:`Jugador, Dummy ${p+1}`,photo:`https://golstatsimages.blob.core.windows.net/teams-80/${a}.png`,position_id:1,team_id:a,nationality_id:1,jersey:p+1});const i=[{team_id:e.home_team,name:"Equipo Local",acronym:e.home_acronym||"LOC"},{team_id:e.away_team||e.visiting_team,name:"Equipo Visitante",acronym:e.away_acronym||e.visiting_team_acronym||"VIS"}];return{data:$,field_positions:h,players:u,rival_players:[],teams:i,season_name:`Temporada ${v}`,matchday_abbreviation:"J1"}},generateDummyDataForTeam(e){const r=this.currentGame,a=e.game.id||r.id,v=e.team,$=r.season||r.season_id||2010,h=[];for(let c=0;c<15;c++){const n=[1,2,3][c%3],k=[1,2][c%2],T=[1,2,3,4,5,6][c%6],x=c%35+1,d=["120","126","327","133"][c%4];h.push([c+1,c+100,v,a,31,d,.3+c*.05,.4+c*.03,.5+c*.05,.5+c*.03,.6+c*.05,.6+c*.03,x,c*100+1e3,k,Math.floor(c/3)+1,n,n,c+1,0,T])}const u=[];for(let c=0;c<15;c++){const n=c*100+1e3;u.push([a,c+100,v,.4+c*.05,.5+c*.03,n,c%35+1,c+1,Math.floor(c/2)+1])}const i=[];for(let c=0;c<5;c++)i.push({player_id:c+100,name:`Jugador, Dummy ${c+1}`,photo:`https://golstatsimages.blob.core.windows.net/teams-80/${v}.png`,position_id:1,team_id:v,nationality_id:1,jersey:c+1});const p=[{team_id:r.home_team,name:"Equipo Local",acronym:r.home_acronym||"LOC"},{team_id:r.away_team||r.visiting_team,name:"Equipo Visitante",acronym:r.away_acronym||r.visiting_team_acronym||"VIS"}];return{data:h,field_positions:u,players:i,rival_players:[],teams:p,season_name:`Temporada ${$}`,matchday_abbreviation:"J1"}},processDummyData(e){let r=[],a=[];e.data=this.changeLateralityCoordenatesPlays(e.data,!1),e.field_positions=this.changeLateralityCoordenatesPlays(e.field_positions,!0),r=r.concat(e.data),a=a.concat(e.field_positions),this.getDataPlayers(e.players),this.getDataPlayers(e.rival_players),this.getDataTeams(e.teams);const v=this.currentGame,$=e.data[0]?e.data[0][3]:v.id;this.getSeasonByGame({season:e.season_name,game:$}),this.getMatchByGame({match:e.matchday_abbreviation,game:$}),this.getRivalsByGame({rival:this.infavoragainst?this.teamselected==e.teams[0].team_id?e.teams[1].name:e.teams[0].name:this.teamselected==e.teams[0].team_id?e.teams[0].name:e.teams[1].name,game:$,team:this.teamselected,favor:this.infavoragainst}),this.touchDataSelected=r,this.positionsDataSelected=a,this.totalDataCollection[v.id]||this.createStorageGame(),this.totalDataCollection[v.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].touch=r,this.totalDataCollection[v.id][this.teamselected][this.infavoragainst?"InFavor":"Against"].positions=a,this.gamesAllHome.length===0&&(this.gamesAllHome=[{game_id:v.id,season_id:v.season||v.season_id||2010,home_team:v.home_team,visiting_team:v.away_team||v.visiting_team,matchday_abbreviation:"J1",date_time_utc:new Date().toISOString(),game_status:1}]),this.gamesAllAway.length===0&&(this.gamesAllAway=[{game_id:v.id,season_id:v.season||v.season_id||2010,home_team:v.home_team,visiting_team:v.away_team||v.visiting_team,matchday_abbreviation:"J1",date_time_utc:new Date().toISOString(),game_status:1}])}},mounted(){console.log("GSCCornersGeneralTrend - mounted - Props iniciales:",{game:this.game,forseason:this.forseason,forteam:this.forteam,forgame:this.forgame,team:this.team,teamselected:this.teamselected,istacticvisible:this.istacticvisible,infavoragainstteam:this.infavoragainstteam,lateralidad:this.lateralidad,showBallGo:this.showBallGo,showHeatMap:this.showHeatMap,ballOnOff:this.ballOnOff,showdefault:this.showdefault,filters:this.filters,tournamentselected:this.tournamentselected,seasonselected:this.seasonselected}),this.filters&&typeof this.filters=="object"?this.localFilters=JSON.parse(JSON.stringify(this.filters)):this.localFilters={isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0},this.showdefault?this.initializeEmptyData():(this.isLoading=!0,document.body.classList.add("no-scroll")),this.setHeaderStickyListener();const e=()=>{const r=document.querySelector(".gsc-set-piece");r?this.containerWidth=r.clientWidth:setTimeout(()=>{},400)};window.addEventListener("resize",e),this.$nextTick(e)}},RG=()=>{t.useCssVars(e=>({d3049444:e.heightFilters}))},UG=UP.setup;UP.setup=UG?(e,r)=>(RG(),UG(e,r)):RG;const qKe={class:"gsc-set-piece"},jKe={ref:"header",class:"gsc-set-piece__header"};function WKe(e,r,a,v,$,h){const u=t.resolveComponent("GSCTrend");return t.openBlock(),t.createElementBlock("div",qKe,[t.createElementVNode("div",jKe,null,512),(t.openBlock(),t.createBlock(u,{"players-data":$.playersData,"teams-data":$.teamsData,"tournament-selected":a.tournamentselected,"touch-all-data":h.calculationTouchesData,"field-positions-all":h.calculationPositionsData,"width-container":$.containerWidth,"in-favor":a.infavoragainstteam,"for-game":a.forgame,"home-team":h.currentGame.home_team,"away-team":h.currentGame.away_team||h.currentGame.visiting_team,"acronym-home":h.currentGame.home_acronym,"acronym-away":h.currentGame.away_acronym||h.currentGame.visiting_team_acronym,team:a.teamselected,"type-play":$.typePlay,selected_category:$.localFilters.cornertype,"is-tactic-visible":a.istacticvisible,lateralidad:a.lateralidad,"show-ball-go":a.showBallGo,"show-heat-map":a.showHeatMap,"ball-on-off":a.ballOnOff,showdefault:a.showdefault,"onUpdate:showBallGo":r[0]||(r[0]=i=>e.$emit("update:showBallGo",i)),"onUpdate:showHeatMap":r[1]||(r[1]=i=>e.$emit("update:showHeatMap",i)),key:$.updateTrend},null,8,["players-data","teams-data","tournament-selected","touch-all-data","field-positions-all","width-container","in-favor","for-game","home-team","away-team","acronym-home","acronym-away","team","type-play","selected_category","is-tactic-visible","lateralidad","show-ball-go","show-heat-map","ball-on-off","showdefault"]))])}const FG=t9(UP,[["render",WKe],["__scopeId","data-v-b0a1f64f"]]),FP="/icons/icn-play.png",DKe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},KKe={key:1},BKe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},XKe=["fill"],GKe={key:0,class:"checkbox__teams"},ZKe={class:"checkbox__teams__logo"},JKe=["src"],HKe={class:"checkbox__teams__logo"},YKe=["src"],QKe={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",KKe,[(t.openBlock(),t.createElementBlock("svg",BKe,[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,XKe)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",GKe,[t.createElementVNode("div",ZKe,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,JKe)]),t.createElementVNode("div",HKe,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,YKe)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},IP=DKe(QKe,[["__scopeId","data-v-b6f124d8"]]),j6=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},$Ke={class:"gsc-playpc-contshileds"},eBe={class:"title-game-vs-playpc"},tBe={class:"score-game-vs-playpc"},rBe={class:"date-game-vs-playpc"},aBe={class:"arrow-game-vs-playpc"},nBe={key:0,"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iBe={key:1,"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oBe={key:0,class:"gsc-container-plays-hidden-title"},sBe=["onClick"],lBe={class:"gsc-itemplaypc-play-number"},cBe={class:"gsc-itemplaypc-play-info"},uBe={class:"gsc-itemplaypc-play-infodata text-1"},dBe={key:0,class:"gsc-itemplaypc-play-infodata text-2"},pBe={class:"gsc-itemplaypc-play-infodata text-1"},hBe={key:0},fBe={__name:"GSCItemPlayPC",props:{game:{type:Object,default:()=>({})},isAgainstMode:{type:Boolean,default:!1}},setup(e){const r=e,a=t.computed(()=>r.game.isExpanded),v=t.computed(()=>r.game.date.split("-").reverse().join("/")),$=t.computed(()=>{let u=[];r.isAgainstMode?(r.game.corners.forEach(p=>{p.isSelected=!1}),u=r.game.cornersAgainstTeam.filter(p=>p.isVisible)):(r.game.cornersAgainstTeam.forEach(p=>{p.isSelected=!1}),u=r.game.corners.filter(p=>p.isVisible));const i=u[0];return i&&(i.isSelected=!0),u.sort((p,c)=>p.momentOfPlayNumber-c.momentOfPlayNumber)});function h(u){r.game[`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(i=>{i.isSelected=i.play_id===u.play_id})}return(u,i)=>e.game.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-item-play-pc",style:t.normalizeStyle(e.game.isSelected?"border: 1px solid #e9ffaf !important":"border: none !important; padding-bottom: 0px !important; margin-bottom 0px !important;")},[t.createElementVNode("div",{class:"gsc-item-play-pc-container-title",style:t.normalizeStyle(e.game.isSelected?"":"border: none !important; padding-bottom: 0px !important; margin-bottom 0px !important;")},[t.createElementVNode("div",$Ke,[t.createElementVNode("div",{class:"gsc-playpc-contshileds-home",style:t.normalizeStyle({backgroundImage:`url(${e.game.home_team_logo})`})},null,4),t.createElementVNode("div",{class:"gsc-playpc-contshileds-away",style:t.normalizeStyle({backgroundImage:`url(${e.game.visiting_team_logo})`})},null,4)]),t.createElementVNode("div",eBe,t.toDisplayString(e.game.home_team_acronym)+" vs "+t.toDisplayString(e.game.visiting_team_acronym),1),t.createElementVNode("div",tBe,t.toDisplayString(e.game.score[0])+" - "+t.toDisplayString(e.game.score[1]),1),t.createElementVNode("div",rBe,t.toDisplayString(v.value),1),t.createElementVNode("div",aBe,[a.value?(t.openBlock(),t.createElementBlock("svg",nBe,[...i[0]||(i[0]=[t.createElementVNode("path",{"data-v-b548a08d":"",d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:"#9ca3af",transform:"rotate(90 5.36523 6.26377)"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",iBe,[...i[1]||(i[1]=[t.createElementVNode("path",{"data-v-b548a08d":"",d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:"#9ca3af",transform:"rotate(270 5.36523 6.26377)"},null,-1)])]))])],4),a.value?(t.openBlock(),t.createElementBlock("div",oBe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(p,c)=>(t.openBlock(),t.createElementBlock("div",{key:p.play_id,class:t.normalizeClass(["gsc-item-play-pc-container-play",{"is-selected":p.isSelected}]),onClick:t.withModifiers(n=>h(p),["stop"])},[t.createElementVNode("div",lBe,t.toDisplayString(c+1)+"/"+t.toDisplayString($.value.length),1),t.createElementVNode("div",cBe,[t.createElementVNode("div",uBe,t.toDisplayString(p.formattedMomentOfPlay),1),p&&p.player?(t.openBlock(),t.createElementBlock("div",dBe," Tiro de esquina | "+t.toDisplayString(p.player.shortName),1)):t.createCommentVNode("",!0),t.createElementVNode("div",pBe,[t.createTextVNode(t.toDisplayString(p.howWasCornerName)+" ",1),p.whatHappenedName?(t.openBlock(),t.createElementBlock("span",hBe,"|")):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(p.whatHappenedName),1)])])],10,sBe))),128))])):t.createCommentVNode("",!0)],4)):t.createCommentVNode("",!0)}},mBe=j6(fBe,[["__scopeId","data-v-c0f94125"]]),yBe={key:0,class:"gsc-selector-play-pc-title"},gBe={key:1,class:"gsc-selector-play-pc-title"},vBe={class:"gsc-selector-play-pc__filters-text"},bBe={class:"gsc-selector-play-pc-container"},xBe={__name:"GSCSelectorPlayPC",props:{gamesByTeam:{type:Array,default:()=>[]},isAgainstMode:{type:Boolean,default:!1},areFiltersOpen:{type:Boolean,default:!1}},setup(e){const r=e;function a(v){if(v.isExpanded){v.isExpanded=!1;return}else if(v.isSelected){v.isExpanded=!0;return}if(r.gamesByTeam.forEach($=>{$.isExpanded=!1}),v.isExpanded=!0,!v.isSelected){const $=`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`;r.gamesByTeam.forEach(h=>{h.isSelected=!1,h[$].forEach(u=>{u.isSelected=!1})}),v.isSelected=!0,v.isExpanded=!0}}return(v,$)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-selector-play-pc",style:t.normalizeStyle(e.areFiltersOpen?"height: 478px;":"")},[e.isAgainstMode?(t.openBlock(),t.createElementBlock("div",yBe,"Elige una jugada:")):(t.openBlock(),t.createElementBlock("div",gBe,"Elige un partido:")),t.withDirectives(t.createElementVNode("div",vBe,[...$[0]||($[0]=[t.createElementVNode("div",null,"Solo se muestran jugadas que cumplan con los criterios elegidos en los filtros.",-1)])],512),[[t.vShow,e.areFiltersOpen]]),t.createElementVNode("div",bBe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.gamesByTeam,h=>(t.openBlock(),t.createBlock(mBe,{key:h.game_id,game:h,show:h.isSelected,"is-against-mode":e.isAgainstMode,onClick:u=>a(h)},null,8,["game","show","is-against-mode","onClick"]))),128))]),$[1]||($[1]=t.createElementVNode("div",{class:"gsc-selector-play-pc-container-scroll"},[t.createElementVNode("svg",{"data-v-b548a08d":"",width:"20",height:"20",viewBox:"-2 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"})],-1))],4))}},_Be=j6(xBe,[["__scopeId","data-v-7dd283c1"]]),wBe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},qP={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))}}},IG=()=>{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}))},qG=qP.setup;qP.setup=qG?(e,r)=>(IG(),qG(e,r)):IG;const TBe=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),SBe=["src"],kBe={key:1,class:"text"},LBe=["src"],EBe={class:"stats"},CBe=TBe(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),NBe={class:"numstats"},OBe={class:"leyend"};function MBe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",$.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([h.customStyle,$.status&&a.typeOnOff&&h.customActive]),onClick:r[0]||(r[0]=(...u)=>h.btnClick&&h.btnClick(...u))},[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,SBe)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",kBe,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,LBe)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...u)=>h.btnClick&&h.btnClick(...u))},[t.createElementVNode("div",EBe,[CBe,t.createElementVNode("div",NBe,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",OBe,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const VBe=wBe(qP,[["render",MBe],["__scopeId","data-v-f3ee6b2b"]]),zBe={class:"gsc-dropdown__main-container__item-selected"},PBe=["height","width"],ABe=["stroke"],RBe={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},UBe=["fill"],FBe={class:"gsc-dropdown__items-container"},IBe=["onClick"],qBe={key:0,class:"gsc-dropdown__items-footer"},jBe={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(r=>r in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(e){return[1,2].includes(e)}}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:r}){const a=e,v=t.ref({}),$=t.ref(null),h=t.ref(a.isMultipleOption?-1:0),u=t.ref(!1);t.watch(()=>a.items,(x,d)=>{if(!a.modelValue&&(!a.onlyFirstTime||!d||!d.length)&&x&&x.length){if(a.defaultItemByProp){const o=a.items.findIndex(l=>l[a.defaultItemByProp.propName]===a.defaultItemByProp.value);o!==-1?(h.value=o,v.value=x[o]):(h.value=0,v.value=x[0])}else v.value=x[a.defaultItemByIndex];r("input",v.value)}},{immediate:!0}),t.watch(()=>a.modelValue,x=>{if(x){const d=a.items.findIndex(o=>typeof x=="object"?JSON.stringify(o)===JSON.stringify(x):o===x);d!==-1&&(h.value=d,v.value=a.items[d],r("update:modelValue",v.value))}},{immediate:!0});const i=t.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),p=t.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(u.value=!u.value)}function n(x){$.value&&!$.value.contains(x.target)&&(u.value=!1)}function k(x,d){a.isMultipleOption?h.value=-1:(h.value=d,u.value=!1),v.value=x,r("input",v.value),r("update:modelValue",v.value)}function T(){u.value=!1,r("click-ready")}return t.onMounted(()=>{document.addEventListener("click",n)}),t.onBeforeMount(()=>{document.removeEventListener("click",n)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"dropDown",ref:$,class:"gsc-dropdown",style:t.normalizeStyle(i.value)},[t.createElementVNode("div",{class:"gsc-dropdown__main-container",style:t.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[t.createElementVNode("div",zBe,[t.renderSlot(x.$slots,"default",{selectedItem:v.value})]),t.createElementVNode("div",{class:t.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":u.value}]),style:t.normalizeStyle(p.value)},[e.iconType===1?(t.openBlock(),t.createElementBlock("svg",{key:0,height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,ABe)],8,PBe)):(t.openBlock(),t.createElementBlock("svg",RBe,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,UBe)]))],6)],4),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",FBe,[t.createElementVNode("div",null,[t.createElementVNode("div",{class:"gsc-dropdown__items",style:t.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-dropdown__items__item",{selected:l===h.value}]),key:l,onClick:s=>k(o,l)},[t.renderSlot(x.$slots,"availableItem",{item:o})],10,IBe)),[[t.vShow,!o.isHidden]])]))),256))],4),e.isFooterVisible?(t.openBlock(),t.createElementBlock("div",qBe,[t.createVNode(t.unref(VBe),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:T})])):t.createCommentVNode("",!0)])],512),[[t.vShow,u.value]])]),_:3})],4))}},WBe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},jP={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,r=this.$refs.content.scrollWidth;r>0&&e>0&&(r>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},jG=()=>{t.useCssVars(e=>({"26acffa8":e.backgroundColor,"3d95bef4":e.height,"86ba1cc0":e.arrowsPosition,"140b6ada":e.arrowsPadding+"px","7df46be5":e.arrowsBackground,"33f99798":e.arrowsHeight*2+"px","1c8a858d":e.arrowsWidth*2+"px","4a7876c9":e.arrowsRadius,"2ff67e63":e.arrowsBorder,"59c5dd08":e.arrowsMargin+"px","6658215d":e.arrowsContainerBgL,66582163:e.arrowsContainerBgR,e5900a2e:e.scrollColor}))},WG=jP.setup;jP.setup=WG?(e,r)=>(jG(),WG(e,r)):jG;const DBe={ref:"gscScrollableContainer",class:"scrollable-container"},KBe={class:"scrollable-arrows"},BBe=["width","height","viewBox"],XBe=["stroke"],GBe={class:"scrollable-wrapper"},ZBe={class:"scrollable-arrows"},JBe=["width","height","viewBox"],HBe=["stroke"];function YBe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",DBe,[a.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",h.hideShowLeftArrow]),onClick:r[0]||(r[0]=(...u)=>h.scrollLeft&&h.scrollLeft(...u))},[t.createElementVNode("div",KBe,[(t.openBlock(),t.createElementBlock("svg",{width:a.arrowsWidth,height:a.arrowsHeight,viewBox:h.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:a.arrowsColor},null,8,XBe)],8,BBe))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:r[1]||(r[1]=(...u)=>h.getScroll&&h.getScroll(...u))},[t.createElementVNode("div",GBe,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),a.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",h.hideShowRightArrow]),onClick:r[2]||(r[2]=(...u)=>h.scrollRight&&h.scrollRight(...u))},[t.createElementVNode("div",ZBe,[(t.openBlock(),t.createElementBlock("svg",{width:a.arrowsWidth,height:a.arrowsHeight,viewBox:h.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:a.arrowsColor},null,8,HBe)],8,JBe))])],2)):t.createCommentVNode("",!0)],512)}const QBe=WBe(jP,[["render",YBe],["__scopeId","data-v-7d0811ac"]]),$Be={class:"gsc-itemplaypc-play-number"},eXe={class:"gsc-itemplaypc-play-info"},tXe={class:"gsc-itemplaypc-play-infodata text-1"},rXe={class:"gsc-itemplaypc-play-infodata text-2"},aXe={class:"gsc-itemplaypc-play-infodata text-1"},nXe={key:0},iXe={__name:"CornerPlayMobile",props:{corner:{type:Object,required:!0},cornerNumber:{type:String,required:!0}},emits:["click-corner"],setup(e,{emit:r}){const a=r;function v(){a("click-corner")}return($,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-item-play-pc-container-play",e.corner.isSelected?"gsc-item-play-pc-container-play-selected":""]),onClick:v},[t.createElementVNode("div",$Be,t.toDisplayString(e.cornerNumber),1),t.createElementVNode("div",eXe,[t.createElementVNode("div",tXe,t.toDisplayString(e.corner.formattedMomentOfPlay),1),t.createElementVNode("div",rXe," Tiro de esquina | "+t.toDisplayString(e.corner.playConnections.mainPlay.player.shortName),1),t.createElementVNode("div",aXe,[t.createTextVNode(t.toDisplayString(e.corner.howWasCornerName)+" ",1),e.corner.whatHappenedName?(t.openBlock(),t.createElementBlock("span",nXe,"|")):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.corner.whatHappenedName),1)])])],2))}},oXe=j6(iXe,[["__scopeId","data-v-7c6dfe22"]]),sXe={class:"gsc-selector-play-mobile"},lXe={key:0,class:"item-selected-container"},cXe={class:"name-macth-select-plays-mobile"},uXe={key:0,class:"item-selected-container"},dXe={class:"name-macth-select-plays-mobile"},pXe={class:"gsc-selector-play-mobile__filters-text"},hXe={key:0,class:"selector-slider"},fXe={__name:"GSCSelectorPlayMobile",props:{gamesByTeam:{type:Array,default:()=>[]},isAgainstMode:{type:Boolean,default:!1},areFiltersOpen:{type:Boolean,default:!1}},setup(e){const r=e,a=t.ref(null);function v(u){a.value&&a.value[`${r.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(i=>{i.isSelected=i.play_id===u.play_id})}function $(u){r.gamesByTeam.forEach(i=>{i.isSelected=!1,i.corners.forEach(p=>{p.isSelected=!1})}),u.isSelected=!0,u.corners[0]&&(u.corners[0].isSelected=!0),a.value=u}const h=t.computed(()=>{if(a.value){let u=[];r.isAgainstMode?(a.value.corners.forEach(p=>{p.isSelected=!1}),u=a.value.cornersAgainstTeam.isVisible):(a.value.cornersAgainstTeam.forEach(p=>{p.isSelected=!1}),u=a.value.corners.filter(p=>p.isVisible));const i=u[0];return i&&(i.isSelected=!0),u}});return(u,i)=>(t.openBlock(),t.createElementBlock("div",sXe,[t.createVNode(t.unref(jBe),{items:e.gamesByTeam,height:"49px",width:"100%","background-color":"#0d1d29","list-background-color":"#243A4C","hover-background-color":"#0d1d29","list-item-selected-background-color":"#0d1d29","list-border-color":"#666","list-item-color":"#FFF","list-item-selected-color":"#CBEE6B","is-list-same-width":!0,color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:$},{default:t.withCtx(({selectedItem:p})=>[p&&p.score?(t.openBlock(),t.createElementBlock("div",lXe,[t.createElementVNode("div",{class:"img-home-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.home_team_logo})`})},null,4),t.createElementVNode("div",cXe,t.toDisplayString(p.home_team_acronym)+" "+t.toDisplayString(p.score[0])+" - "+t.toDisplayString(p.score[1])+" "+t.toDisplayString(p.visiting_team_acronym),1),t.createElementVNode("div",{class:"img-away-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.visiting_team_logo})`})},null,4)])):t.createCommentVNode("",!0)]),availableItem:t.withCtx(({item:p})=>[p&&p.score?(t.openBlock(),t.createElementBlock("div",uXe,[t.createElementVNode("div",{class:"img-home-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.home_team_logo})`})},null,4),t.createElementVNode("div",dXe,t.toDisplayString(p.home_team_acronym)+" "+t.toDisplayString(p.score[0])+" - "+t.toDisplayString(p.score[1])+" "+t.toDisplayString(p.visiting_team_acronym),1),t.createElementVNode("div",{class:"img-away-select-plays-mobile",style:t.normalizeStyle({backgroundImage:`url(${p.visiting_team_logo})`})},null,4)])):t.createCommentVNode("",!0)]),_:1},8,["items"]),t.createElementVNode("div",null,[i[1]||(i[1]=t.createElementVNode("div",{class:"title-select-plays-mobile"},"Elige una jugada del partido:",-1)),t.withDirectives(t.createElementVNode("div",pXe,[...i[0]||(i[0]=[t.createElementVNode("div",null,"Solo se muestran jugadas que cumplan con los criterios elegidos en los filtros.",-1)])],512),[[t.vShow,e.areFiltersOpen]]),a.value?(t.openBlock(),t.createElementBlock("div",hXe,[t.createVNode(t.unref(QBe),{pxScroll:290,arrowsPadding:5,arrowsWidth:15,arrowsHeight:15,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,height:"90px",arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(p,c)=>(t.openBlock(),t.createBlock(oXe,{"corner-number":`${c+1}/${h.value.length}`,corner:p,key:p.play_id,onClickCorner:n=>v(p)},null,8,["corner-number","corner","onClickCorner"]))),128))]),_:1})])):t.createCommentVNode("",!0)])]))}},mXe=j6(fXe,[["__scopeId","data-v-7d965f0f"]]),yXe=["x1","y1","x2","y2","marker-end"],gXe=["x","y"],vXe=["fill"],bXe=["stroke"],DG=66/202,xXe={__name:"HalfSoccerPlayerPosition",props:{playerPosition:{type:Object,required:!0},teamIdForAnalysis:{type:Number,required:!0},visibleTeamsIds:{type:Array,required:!0},isAgainstCorner:{type:Boolean,default:!1}},emits:["player-position-click"],setup(e,{emit:r}){const a=e,v=r,$=t.computed(()=>a.playerPosition.isHomeTeam?"#336DFF":"#CBEE6B"),h=t.computed(()=>a.playerPosition.isHomeTeam?"#FFFFFF":"#183143"),u=t.computed(()=>k(a.playerPosition)),i=t.computed(()=>T(a.playerPosition,u.value)),p=t.computed(()=>a.playerPosition.finalPlayerPosition?k(a.playerPosition.finalPlayerPosition):null),c=t.computed(()=>a.playerPosition.finalPlayerPosition?T(a.playerPosition.finalPlayerPosition,p.value):null);function n(x){v("player-position-click",{event:x,playerPosition:a.playerPosition})}function k(x){let d=x.y;return a.isAgainstCorner?x.isTeamForAnalysis||(d=1-d):x.isTeamForAnalysis&&(d=1-d),d<=.8?d*404+26:null}function T(x,d){let o=x.x;a.isAgainstCorner?x.isTeamForAnalysis&&(o=1-o):x.isTeamForAnalysis||(o=1-o);const l=d-15;return d!==null?o*(446+DG*l)+(104-DG*l)-12:null}return(x,d)=>e.visibleTeamsIds.includes(e.playerPosition.teamId)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d[2]||(d[2]=t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:"arrowPlayerPosition",markerWidth:"10",markerHeight:"6",refX:"0",refY:"3",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("path",{d:"M0,0 L0,6 L9,3 z",fill:"#cbee6b"})])],-1)),p.value?(t.openBlock(),t.createElementBlock("line",{key:0,style:{stroke:"#cbee6b","stroke-width":"1"},"stroke-dasharray":"2 2",x1:i.value+12,y1:u.value+10,x2:c.value+12,y2:p.value+10,"marker-end":`url(${e.playerPosition.isFinalPosition?"#arrowPlayerPosition":""})`},null,8,yXe)):t.createCommentVNode("",!0),u.value!==null&&e.playerPosition.isFirstPosition?(t.openBlock(),t.createElementBlock("svg",{key:1,class:"half-soccer-player-position",width:"24",height:"21",viewBox:"0 0 24 21",x:i.value,y:u.value,fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n},[t.createElementVNode("path",{d:"M11.7542 15.0781C17.2599 15.0781 21.7232 11.98 21.7232 8.15841C21.7232 4.3368 17.2599 1.23877 11.7542 1.23877C6.24843 1.23877 1.78516 4.3368 1.78516 8.15841C1.78516 11.98 6.24843 15.0781 11.7542 15.0781Z",fill:$.value},null,8,vXe),d[0]||(d[0]=t.createElementVNode("path",{style:{"mix-blend-mode":"multiply"},opacity:"1",d:"M22.4478 18.2913C22.4478 19.5458 17.5475 20.5589 11.5021 20.5589C5.45669 20.5589 0.550781 19.5419 0.550781 18.2913C0.550781 17.0406 5.45108 16.0237 11.4965 16.0237C17.5419 16.0237 22.4422 17.0406 22.4422 18.2913H22.4478Z",fill:"url(#paint0_radial_2418_280062)"},null,-1)),d[1]||(d[1]=t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",{id:"paint0_radial_2418_280062",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(11.9694 18.346) scale(10.7452 2.0575)"},[t.createElementVNode("stop",{offset:"0","stop-color":"#808080"}),t.createElementVNode("stop",{offset:"1","stop-color":"#CCCBCB","stop-opacity":"1"})])],-1)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"8","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"10",stroke:h.value},t.toDisplayString(e.playerPosition.player.jersey),9,bXe)])],8,gXe)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)}},_Xe=j6(xXe,[["__scopeId","data-v-d03899c6"]]),KG=481,wXe=606,BG=210,TXe=BG*2,SXe=88,kXe=wXe-KG,LXe=kXe/BG,WP=18;function aN(e){return e*TXe}function nN(e,r){const a=e*KG,v=r*LXe+a,$=v-a;return v+(SXe-$)}const EXe=["x","y"],CXe=["font-size"],NXe=["x","y"],OXe=["font-size"],MXe=["stroke-dasharray","x1","y1","x2","y2","marker-end"],VXe={__name:"HalfSoccerConnectionPosition",props:{playConnection:{type:Object,required:!0},isAgainstCorner:{type:Boolean,default:!1}},setup(e){const r=e,a=t.computed(()=>aN(r.playConnection.previousPlayConnection?h(r.playConnection.previousPlayConnection.y3,r.playConnection.previousPlayConnection.isTeamForAnalysis):h(r.playConnection.y1,r.playConnection.isTeamForAnalysis))+WP),v=t.computed(()=>nN(r.playConnection.previousPlayConnection?u(r.playConnection.previousPlayConnection.x3,r.playConnection.previousPlayConnection.isTeamForAnalysis):u(r.playConnection.x1,r.playConnection.isTeamForAnalysis),a.value)),$=t.computed(()=>{const i=[],p=r.playConnection.x1===r.playConnection.x2&&r.playConnection.y1===r.playConnection.y2?1:2;let c=aN(r.playConnection.previousPlayConnection?h(r.playConnection.previousPlayConnection.y3,r.playConnection.previousPlayConnection.isTeamForAnalysis):h(r.playConnection.y1,r.playConnection.isTeamForAnalysis));const n=nN(r.playConnection.previousPlayConnection?u(r.playConnection.previousPlayConnection.x3,r.playConnection.previousPlayConnection.isTeamForAnalysis):u(r.playConnection.x1,r.playConnection.isTeamForAnalysis),c);let k=0,T=0;p===2&&(k=aN(h(r.playConnection.y2,r.playConnection.isTeamForAnalysis)),T=nN(u(r.playConnection.x2,r.playConnection.isTeamForAnalysis),k));const x=aN(h(r.playConnection.y3,r.playConnection.isTeamForAnalysis)),d=nN(u(r.playConnection.x3,r.playConnection.isTeamForAnalysis),x);return p===1?i.push({x1:n,y1:c,x2:d,y2:x}):(i.push({x1:n,y1:c,x2:T,y2:k}),i.push({x1:T,y1:k,x2:d,y2:x})),i});function h(i,p=!1){return(!p&&!r.isAgainstCorner||p&&r.isAgainstCorner)&&(i=1-i),i}function u(i,p=!1){return(!p&&!r.isAgainstCorner||p&&r.isAgainstCorner)&&(i=1-i),i}return(i,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[p[2]||(p[2]=t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"0",refY:"3",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("path",{d:"M0,0 L0,6 L9,3 z",fill:"#cbee6b"})]),t.createElementVNode("marker",{id:"bullet",markerWidth:"4",markerHeight:"4",refX:"2",refY:"2",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("circle",{cx:"2",cy:"2",r:"2",fill:"#cbee6b"})])],-1)),e.playConnection.isHomeTeam?(t.openBlock(),t.createElementBlock("svg",{key:0,x:v.value-13,y:a.value-35,width:"28",height:"38",viewBox:"0 0 28 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p[0]||(p[0]=t.createStaticVNode('<g clip-path="url(#clip0_2636_286118)"><path d="M17.012 0.257546C16.7113 -0.184315 16.18 0.0287746 15.5435 0.257546C14.907 0.488162 13.6331 0.452186 13.6331 0.452186C13.6331 0.452186 12.3591 0.488162 11.7226 0.257546C11.0861 0.0287746 10.5548 -0.184315 10.2541 0.257546C10.2052 0.328575 10.0917 0.436504 9.92383 0.572106C11.2799 1.45029 13.6331 1.39033 13.6331 1.39033C13.6331 1.39033 15.9863 1.45029 17.3423 0.572106C17.1744 0.436504 17.0609 0.327653 17.012 0.257546Z" fill="white"></path><path d="M21.3628 19.1451C21.5713 17.5575 21.8388 14.7985 21.8388 14.7985L22.4578 16.0899C24.8636 15.6822 27.2694 14.4092 27.2694 14.4092C27.2694 14.4092 26.1015 10.3577 25.9779 9.50812C25.8543 8.65853 25.9604 4.11263 23.0592 3.37005C20.9588 2.83225 18.886 1.67363 17.7873 0.905221C17.7753 0.896919 17.7652 0.890462 17.7541 0.88216C17.5918 0.767774 17.4534 0.663536 17.3381 0.571289C15.9821 1.44948 13.6298 1.38952 13.6298 1.38952C13.6298 1.38952 11.2775 1.44948 9.92056 0.571289C9.03777 1.28435 6.63751 2.74646 4.19944 3.37097C1.29921 4.11355 1.40529 8.65946 1.28168 9.50905C1.15807 10.3586 -0.00976562 14.4101 -0.00976562 14.4101C-0.00976562 14.4101 2.39602 15.6831 4.80181 16.0908L5.42078 14.7994C5.42078 14.7994 5.75748 18.2669 5.96965 19.6645C6.18182 21.0611 5.56192 24.4576 5.95212 25.9095C6.3414 27.3597 5.42078 30.3143 5.26212 31.0569C5.10253 31.7995 5.13851 33.0033 5.13851 33.0033C5.13851 33.0033 5.88939 33.982 7.66514 34.8298C9.01839 35.4764 10.9657 36.0465 13.6298 36.0465C14.2073 36.0465 14.7497 36.0198 15.2616 35.9709C17.8667 35.7246 19.6313 34.9119 20.718 34.2007C21.6921 33.5632 22.122 33.0042 22.122 33.0042C22.122 33.0042 22.1312 32.674 22.1183 32.2533C22.1054 31.8705 22.0731 31.412 21.9984 31.0578C21.8895 30.5505 21.4265 29.0136 21.2669 27.629C21.1931 26.9833 21.1848 26.3708 21.3084 25.9105C21.5455 25.0249 21.408 23.4143 21.3121 21.9771C21.2512 21.0583 21.2078 20.2096 21.2899 19.6663C21.313 19.515 21.337 19.3397 21.3628 19.1479V19.1451Z" fill="#477BFF"></path><path d="M27.2696 14.4112C27.2696 14.4112 24.8638 15.6842 22.458 16.0919L21.839 14.8005C21.8833 14.211 21.9424 13.6151 22.0198 13.0183C22.1545 11.9906 22.3418 10.9621 22.601 9.97137C22.6462 9.79426 22.6932 9.61991 22.7449 9.44557C22.8593 9.05352 22.9801 8.63933 23.0438 8.22791C23.1268 7.68735 23.1102 7.15417 22.8436 6.68555C22.6831 6.40328 22.4497 6.18189 22.1859 5.99002C21.923 5.79538 21.6306 5.63025 21.3511 5.46144C20.1583 4.73731 19.091 3.80562 18.2101 2.72172C17.6981 2.09168 17.3743 1.32973 17.2793 0.524414C18.1104 1.21718 20.566 2.73372 23.0604 3.37206C25.9615 4.11465 25.8554 8.66055 25.9791 9.51014C26.1027 10.3597 27.2705 14.4112 27.2705 14.4112H27.2696Z" fill="#477BFF"></path><path d="M21.839 14.7995C21.8833 14.21 21.9424 13.6141 22.0198 13.0173C22.1545 11.9897 22.3418 10.9611 22.601 9.9704C22.6462 9.79328 22.6932 9.61894 22.7449 9.44459C22.8593 9.05254 22.9801 8.63836 23.0438 8.22694C23.1268 7.68637 23.1102 7.15319 22.8436 6.68458C22.6831 6.4023 22.4497 6.18091 22.1859 5.98904C21.923 5.7944 21.6306 5.62928 21.3511 5.46047C20.1583 4.73633 19.091 3.80464 18.2101 2.72075C17.6981 2.0907 17.3743 1.32875 17.2793 0.523438" stroke="#382828" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path><path d="M-0.00976562 14.4112C-0.00976562 14.4112 2.39602 15.6842 4.80181 16.0919L5.42078 14.8005C5.3765 14.211 5.31747 13.6151 5.23998 13.0183C5.1053 11.9906 4.91804 10.9621 4.65883 9.97137C4.61363 9.79426 4.56658 9.61991 4.51492 9.44557C4.40054 9.05352 4.27969 8.63933 4.21604 8.22791C4.13302 7.68735 4.14963 7.15417 4.41622 6.68555C4.57673 6.40328 4.81011 6.18189 5.07394 5.99002C5.33684 5.79538 5.62926 5.63025 5.90877 5.46144C7.10151 4.73731 8.1688 3.80562 9.04976 2.72172C9.56173 2.09168 9.88551 1.32973 9.98052 0.524414C9.14938 1.21718 6.69378 2.73372 4.19944 3.37206C1.29921 4.11465 1.40529 8.66055 1.28168 9.51014C1.15807 10.3588 -0.00976562 14.4112 -0.00976562 14.4112Z" fill="#477BFF"></path><path d="M22.1641 15.4726L22.4602 16.0906C24.866 15.6829 27.2717 14.4099 27.2717 14.4099C27.2717 14.4099 27.1915 14.1322 27.0707 13.7061C26.2976 14.0926 24.4066 14.9625 22.1641 15.4717V15.4726Z" fill="#3A63CB"></path><path d="M5.09884 15.4726L4.80273 16.0907C2.39602 15.6839 -0.00976562 14.4109 -0.00976562 14.4109C-0.00976562 14.4109 0.0704888 14.1332 0.191332 13.707C0.964357 14.0935 2.85541 14.9634 5.09792 15.4726H5.09884Z" fill="#3A63CB"></path><path d="M22.1206 32.2529C21.3993 32.9789 18.6005 35.4317 13.6321 35.4317C8.66372 35.4317 5.86405 32.978 5.1436 32.2529C5.13069 32.6745 5.13991 33.0038 5.13991 33.0038C5.13991 33.0038 7.47559 36.0461 13.6321 36.0461C19.7886 36.0461 22.1243 33.0038 22.1243 33.0038C22.1243 33.0038 22.1336 32.6736 22.1206 32.2529Z" fill="#3A63CB"></path><path style="mix-blend-mode:multiply;" d="M21.8438 14.798L22.1666 15.4714L22.4627 16.0895C22.6177 16.0627 22.7727 16.0332 22.9276 16C22.6758 15.1412 22.8197 14.1892 23.0826 13.3193C23.3437 12.455 23.7145 11.6201 23.9165 10.7429C23.9497 10.598 23.7616 10.5049 23.6693 10.6202C23.578 10.7327 23.5051 10.8665 23.4396 10.9965C23.1186 11.6312 22.8382 12.2861 22.5956 12.9549C22.5088 13.1929 22.424 13.4411 22.2579 13.6329C22.1703 13.7335 22.0531 13.8165 21.9268 13.8599C21.8945 14.1735 21.8668 14.4862 21.8438 14.7971V14.798Z" fill="url(#paint0_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M25.3124 9.42413C25.3769 9.29314 25.5697 9.31252 25.6076 9.45273C25.6454 9.59202 25.6592 9.74054 25.6703 9.88444C25.7413 10.8106 25.7395 11.7423 25.6647 12.6684L25.4074 10.5726C25.3899 10.4315 25.2109 10.3844 25.1242 10.497C25.0633 10.5763 25.0126 10.6648 24.9637 10.7516C24.7727 11.0929 24.5818 11.4351 24.3908 11.7764C24.2967 11.9452 24.2026 12.1131 24.1086 12.2819C24.0329 12.4175 23.948 12.6629 23.8281 12.7552C23.8909 12.4563 24.0726 12.1436 24.1934 11.8613C24.3253 11.5523 24.46 11.2451 24.5984 10.9388C24.8281 10.4305 25.0661 9.92503 25.3114 9.42413H25.3124Z" fill="url(#paint1_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M5.42236 14.798L5.0995 15.4714L4.80339 16.0895C4.64841 16.0627 4.49344 16.0332 4.33847 16C4.5903 15.1412 4.4464 14.1892 4.18349 13.3193C3.92244 12.455 3.5516 11.6201 3.34959 10.7429C3.31638 10.598 3.50456 10.5049 3.59681 10.6202C3.68813 10.7327 3.761 10.8665 3.8265 10.9965C4.14752 11.6312 4.42795 12.2861 4.67055 12.9549C4.75727 13.1929 4.84213 13.4411 5.00818 13.6329C5.09581 13.7335 5.21296 13.8165 5.33934 13.8599C5.37163 14.1735 5.3993 14.4862 5.42236 14.7971V14.798Z" fill="url(#paint2_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M1.95086 9.42413C1.88628 9.29314 1.69349 9.31252 1.65567 9.45273C1.61785 9.59202 1.60401 9.74054 1.59294 9.88444C1.52191 10.8106 1.52375 11.7423 1.59847 12.6684L1.85584 10.5726C1.87337 10.4315 2.05233 10.3844 2.13904 10.497C2.19992 10.5763 2.25066 10.6648 2.29955 10.7516C2.4905 11.0929 2.68145 11.4351 2.8724 11.7764C2.96649 11.9452 3.06058 12.1131 3.15467 12.2819C3.23031 12.4175 3.31518 12.6629 3.4351 12.7552C3.37237 12.4563 3.19065 12.1436 3.0698 11.8613C2.93789 11.5523 2.80321 11.2451 2.66484 10.9388C2.43515 10.4305 2.19715 9.92503 1.95178 9.42413H1.95086Z" fill="url(#paint3_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M21.3155 21.9743C21.2546 21.0555 21.2113 20.2068 21.2934 19.6635C21.3164 19.5122 21.3404 19.337 21.3662 19.1451C21.0332 17.8214 20.6541 16.5078 20.2344 15.208C20.5406 17.4717 20.9216 19.7253 21.3155 21.9743Z" fill="url(#paint4_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M5.95113 21.9743C6.01201 21.0555 6.05536 20.2068 5.97327 19.6635C5.9502 19.5122 5.92622 19.337 5.90039 19.1451C6.2334 17.8214 6.61253 16.5078 7.03225 15.208C6.726 17.4717 6.34502 19.7253 5.95113 21.9743Z" fill="url(#paint5_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M19.386 24.2987C20.0621 27.4867 20.5049 30.7255 20.706 33.9772C20.7125 34.0768 20.825 34.1303 20.9062 34.0731C21.6165 33.5814 21.9938 33.158 22.0952 33.0372C22.1137 33.0151 22.1238 32.9883 22.1248 32.9588C22.1266 32.8564 22.1303 32.5815 22.1202 32.2513C22.1072 31.8684 22.075 31.41 22.0002 31.0557C21.8914 30.5502 21.432 29.0226 21.2706 27.6408C21.2696 27.6316 21.2678 27.6223 21.2641 27.614C20.8499 26.4185 20.2964 25.271 19.6184 24.2028C19.5419 24.0828 19.3564 24.1603 19.386 24.2996V24.2987Z" fill="url(#paint6_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M7.87576 24.2987C7.19959 27.4867 6.75681 30.7255 6.55571 33.9772C6.54926 34.0768 6.43672 34.1303 6.35554 34.0731C5.64524 33.5814 5.26795 33.158 5.16648 33.0372C5.14803 33.0151 5.13789 32.9883 5.13696 32.9588C5.13512 32.8564 5.13143 32.5815 5.14158 32.2513C5.15449 31.8684 5.18678 31.41 5.2615 31.0557C5.37035 30.5502 5.82973 29.0226 5.99117 27.6408C5.99209 27.6316 5.99393 27.6223 5.99762 27.614C6.41181 26.4185 6.96529 25.271 7.6433 24.2028C7.71986 24.0828 7.90528 24.1603 7.87576 24.2996V24.2987Z" fill="url(#paint7_linear_2636_286118)"></path><path style="mix-blend-mode:multiply;" d="M7.66992 34.8297C9.02318 35.4764 10.9705 36.0464 13.6346 36.0464C14.212 36.0464 14.7544 36.0197 15.2664 35.9708C12.4723 31.1897 10.4244 25.975 9.22151 20.5693C8.17635 25.2425 7.87471 30.0394 7.66992 34.8297Z" fill="url(#paint8_linear_2636_286118)"></path><path d="M5.42672 14.7995C5.38244 14.21 5.3234 13.6141 5.24591 13.0173C5.11123 11.9897 4.92397 10.9611 4.66476 9.9704C4.61956 9.79328 4.57252 9.61894 4.52086 9.44459C4.40647 9.05254 4.28563 8.63836 4.22198 8.22694C4.13896 7.68637 4.15556 7.15319 4.42215 6.68458C4.58266 6.4023 4.81605 6.18091 5.07987 5.98904C5.34277 5.7944 5.63519 5.62928 5.9147 5.46047C7.10745 4.73633 8.17474 3.80464 9.05569 2.72075C9.56766 2.0907 9.89144 1.32875 9.98646 0.523438" stroke="#382828" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path></g><defs><linearGradient id="paint0_linear_2636_286118" x1="25.3427" y1="12.3692" x2="18.8946" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint1_linear_2636_286118" x1="24.1215" y1="13.8667" x2="27.7837" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint2_linear_2636_286118" x1="1.92346" y1="12.3692" x2="8.37148" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint3_linear_2636_286118" x1="3.14176" y1="13.8667" x2="-0.520426" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint4_linear_2636_286118" x1="21.3672" y1="18.5907" x2="20.2353" y2="18.5907" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint5_linear_2636_286118" x1="5.90039" y1="-0.0025094" x2="7.03225" y2="-0.0025094" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint6_linear_2636_286118" x1="20.4367" y1="23.8033" x2="21.3388" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint7_linear_2636_286118" x1="6.82507" y1="23.8033" x2="5.9229" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint8_linear_2636_286118" x1="9.28147" y1="18.8683" x2="12.0055" y2="39.4605" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#EEF9FF"></stop><stop offset="0.4" stop-color="#EBF6FC"></stop><stop offset="0.53" stop-color="#E4EEF4"></stop><stop offset="0.64" stop-color="#D8E1E6"></stop><stop offset="0.73" stop-color="#C6CED2"></stop><stop offset="0.81" stop-color="#AFB5B9"></stop><stop offset="0.89" stop-color="#939799"></stop><stop offset="0.96" stop-color="#727474"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><clipPath id="clip0_2636_286118"><rect width="27.28" height="38" fill="white"></rect></clipPath></defs>',2)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"10","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":e.playConnection.player.jersey>99?10:14,stroke:"white"},t.toDisplayString(e.playConnection.player.jersey),9,CXe)])],8,EXe)):(t.openBlock(),t.createElementBlock("svg",{key:1,x:v.value-13,y:a.value-35,width:"28",height:"38",viewBox:"0 0 28 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p[1]||(p[1]=t.createStaticVNode('<g clip-path="url(#clip0_2636_286087)"><path d="M17.012 0.257546C16.7113 -0.184315 16.18 0.0287746 15.5435 0.257546C14.907 0.488162 13.6331 0.452186 13.6331 0.452186C13.6331 0.452186 12.3591 0.488162 11.7226 0.257546C11.0861 0.0287746 10.5548 -0.184315 10.2541 0.257546C10.2052 0.328575 10.0917 0.436504 9.92383 0.572106C11.2799 1.45029 13.6331 1.39033 13.6331 1.39033C13.6331 1.39033 15.9863 1.45029 17.3423 0.572106C17.1744 0.436504 17.0609 0.327653 17.012 0.257546Z" fill="white"></path><path d="M21.3628 19.1451C21.5713 17.5575 21.8388 14.7985 21.8388 14.7985L22.4578 16.0899C24.8636 15.6822 27.2694 14.4092 27.2694 14.4092C27.2694 14.4092 26.1015 10.3577 25.9779 9.50812C25.8543 8.65853 25.9604 4.11263 23.0592 3.37005C20.9588 2.83225 18.886 1.67363 17.7873 0.905221C17.7753 0.896919 17.7652 0.890462 17.7541 0.88216C17.5918 0.767774 17.4534 0.663536 17.3381 0.571289C15.9821 1.44948 13.6298 1.38952 13.6298 1.38952C13.6298 1.38952 11.2775 1.44948 9.92056 0.571289C9.03777 1.28435 6.63751 2.74646 4.19944 3.37097C1.29921 4.11355 1.40529 8.65946 1.28168 9.50905C1.15807 10.3586 -0.00976562 14.4101 -0.00976562 14.4101C-0.00976562 14.4101 2.39602 15.6831 4.80181 16.0908L5.42078 14.7994C5.42078 14.7994 5.75748 18.2669 5.96965 19.6645C6.18182 21.0611 5.56192 24.4576 5.95212 25.9095C6.3414 27.3597 5.42078 30.3143 5.26212 31.0569C5.10253 31.7995 5.13851 33.0033 5.13851 33.0033C5.13851 33.0033 5.88939 33.982 7.66514 34.8298C9.01839 35.4764 10.9657 36.0465 13.6298 36.0465C14.2073 36.0465 14.7497 36.0198 15.2616 35.9709C17.8667 35.7246 19.6313 34.9119 20.718 34.2007C21.6921 33.5632 22.122 33.0042 22.122 33.0042C22.122 33.0042 22.1312 32.674 22.1183 32.2533C22.1054 31.8705 22.0731 31.412 21.9984 31.0578C21.8895 30.5505 21.4265 29.0136 21.2669 27.629C21.1931 26.9833 21.1848 26.3708 21.3084 25.9105C21.5455 25.0249 21.408 23.4143 21.3121 21.9771C21.2512 21.0583 21.2078 20.2096 21.2899 19.6663C21.313 19.515 21.337 19.3397 21.3628 19.1479V19.1451Z" fill="#02663D"></path><path d="M27.2696 14.4112C27.2696 14.4112 24.8638 15.6842 22.458 16.0919L21.839 14.8005C21.8833 14.211 21.9424 13.6151 22.0198 13.0183C22.1545 11.9906 22.3418 10.9621 22.601 9.97137C22.6462 9.79426 22.6932 9.61991 22.7449 9.44557C22.8593 9.05352 22.9801 8.63933 23.0438 8.22791C23.1268 7.68735 23.1102 7.15417 22.8436 6.68555C22.6831 6.40328 22.4497 6.18189 22.1859 5.99002C21.923 5.79538 21.6306 5.63025 21.3511 5.46144C20.1583 4.73731 19.091 3.80562 18.2101 2.72172C17.6981 2.09168 17.3743 1.32973 17.2793 0.524414C18.1104 1.21718 20.566 2.73372 23.0604 3.37206C25.9615 4.11465 25.8554 8.66055 25.9791 9.51014C26.1027 10.3597 27.2705 14.4112 27.2705 14.4112H27.2696Z" fill="#02673E"></path><path d="M21.839 14.7995C21.8833 14.21 21.9424 13.6141 22.0198 13.0173C22.1545 11.9897 22.3418 10.9611 22.601 9.9704C22.6462 9.79328 22.6932 9.61894 22.7449 9.44459C22.8593 9.05254 22.9801 8.63836 23.0438 8.22694C23.1268 7.68637 23.1102 7.15319 22.8436 6.68458C22.6831 6.4023 22.4497 6.18091 22.1859 5.98904C21.923 5.7944 21.6306 5.62928 21.3511 5.46047C20.1583 4.73633 19.091 3.80464 18.2101 2.72075C17.6981 2.0907 17.3743 1.32875 17.2793 0.523438" stroke="white" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path><path d="M-0.00976562 14.4112C-0.00976562 14.4112 2.39602 15.6842 4.80181 16.0919L5.42078 14.8005C5.3765 14.211 5.31747 13.6151 5.23998 13.0183C5.1053 11.9906 4.91804 10.9621 4.65883 9.97137C4.61363 9.79426 4.56658 9.61991 4.51492 9.44557C4.40054 9.05352 4.27969 8.63933 4.21604 8.22791C4.13302 7.68735 4.14963 7.15417 4.41622 6.68555C4.57673 6.40328 4.81011 6.18189 5.07394 5.99002C5.33684 5.79538 5.62926 5.63025 5.90877 5.46144C7.10151 4.73731 8.1688 3.80562 9.04976 2.72172C9.56173 2.09168 9.88551 1.32973 9.98052 0.524414C9.14938 1.21718 6.69378 2.73372 4.19944 3.37206C1.29921 4.11465 1.40529 8.66055 1.28168 9.51014C1.15807 10.3588 -0.00976562 14.4112 -0.00976562 14.4112Z" fill="#02673E"></path><path d="M22.1641 15.4726L22.4602 16.0906C24.866 15.6829 27.2717 14.4099 27.2717 14.4099C27.2717 14.4099 27.1915 14.1322 27.0707 13.7061C26.2976 14.0926 24.4066 14.9625 22.1641 15.4717V15.4726Z" fill="#014A2D"></path><path d="M5.09884 15.4726L4.80273 16.0907C2.39602 15.6839 -0.00976562 14.4109 -0.00976562 14.4109C-0.00976562 14.4109 0.0704888 14.1332 0.191332 13.707C0.964357 14.0935 2.85541 14.9634 5.09792 15.4726H5.09884Z" fill="#014A2D"></path><path d="M22.1206 32.2529C21.3993 32.9789 18.6005 35.4317 13.6321 35.4317C8.66372 35.4317 5.86405 32.978 5.1436 32.2529C5.13069 32.6745 5.13991 33.0038 5.13991 33.0038C5.13991 33.0038 7.47559 36.0461 13.6321 36.0461C19.7886 36.0461 22.1243 33.0038 22.1243 33.0038C22.1243 33.0038 22.1336 32.6736 22.1206 32.2529Z" fill="#222831"></path><path style="mix-blend-mode:multiply;" d="M21.8438 14.798L22.1666 15.4714L22.4627 16.0895C22.6177 16.0627 22.7727 16.0332 22.9276 16C22.6758 15.1412 22.8197 14.1892 23.0826 13.3193C23.3437 12.455 23.7145 11.6201 23.9165 10.7429C23.9497 10.598 23.7616 10.5049 23.6693 10.6202C23.578 10.7327 23.5051 10.8665 23.4396 10.9965C23.1186 11.6312 22.8382 12.2861 22.5956 12.9549C22.5088 13.1929 22.424 13.4411 22.2579 13.6329C22.1703 13.7335 22.0531 13.8165 21.9268 13.8599C21.8945 14.1735 21.8668 14.4862 21.8438 14.7971V14.798Z" fill="url(#paint0_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M25.3124 9.42413C25.3769 9.29314 25.5697 9.31252 25.6076 9.45273C25.6454 9.59202 25.6592 9.74054 25.6703 9.88444C25.7413 10.8106 25.7395 11.7423 25.6647 12.6684L25.4074 10.5726C25.3899 10.4315 25.2109 10.3844 25.1242 10.497C25.0633 10.5763 25.0126 10.6648 24.9637 10.7516C24.7727 11.0929 24.5818 11.4351 24.3908 11.7764C24.2967 11.9452 24.2026 12.1131 24.1086 12.2819C24.0329 12.4175 23.948 12.6629 23.8281 12.7552C23.8909 12.4563 24.0726 12.1436 24.1934 11.8613C24.3253 11.5523 24.46 11.2451 24.5984 10.9388C24.8281 10.4305 25.0661 9.92503 25.3114 9.42413H25.3124Z" fill="url(#paint1_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M5.42236 14.798L5.0995 15.4714L4.80339 16.0895C4.64841 16.0627 4.49344 16.0332 4.33847 16C4.5903 15.1412 4.4464 14.1892 4.18349 13.3193C3.92244 12.455 3.5516 11.6201 3.34959 10.7429C3.31638 10.598 3.50456 10.5049 3.59681 10.6202C3.68813 10.7327 3.761 10.8665 3.8265 10.9965C4.14752 11.6312 4.42795 12.2861 4.67055 12.9549C4.75727 13.1929 4.84213 13.4411 5.00818 13.6329C5.09581 13.7335 5.21296 13.8165 5.33934 13.8599C5.37163 14.1735 5.3993 14.4862 5.42236 14.7971V14.798Z" fill="url(#paint2_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M1.95086 9.42413C1.88628 9.29314 1.69349 9.31252 1.65567 9.45273C1.61785 9.59202 1.60401 9.74054 1.59294 9.88444C1.52191 10.8106 1.52375 11.7423 1.59847 12.6684L1.85584 10.5726C1.87337 10.4315 2.05233 10.3844 2.13904 10.497C2.19992 10.5763 2.25066 10.6648 2.29955 10.7516C2.4905 11.0929 2.68145 11.4351 2.8724 11.7764C2.96649 11.9452 3.06058 12.1131 3.15467 12.2819C3.23031 12.4175 3.31518 12.6629 3.4351 12.7552C3.37237 12.4563 3.19065 12.1436 3.0698 11.8613C2.93789 11.5523 2.80321 11.2451 2.66484 10.9388C2.43515 10.4305 2.19715 9.92503 1.95178 9.42413H1.95086Z" fill="url(#paint3_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M21.3155 21.9743C21.2546 21.0555 21.2113 20.2068 21.2934 19.6635C21.3164 19.5122 21.3404 19.337 21.3662 19.1451C21.0332 17.8214 20.6541 16.5078 20.2344 15.208C20.5406 17.4717 20.9216 19.7253 21.3155 21.9743Z" fill="url(#paint4_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M5.95113 21.9743C6.01201 21.0555 6.05536 20.2068 5.97327 19.6635C5.9502 19.5122 5.92622 19.337 5.90039 19.1451C6.2334 17.8214 6.61253 16.5078 7.03225 15.208C6.726 17.4717 6.34502 19.7253 5.95113 21.9743Z" fill="url(#paint5_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M19.386 24.2987C20.0621 27.4867 20.5049 30.7255 20.706 33.9772C20.7125 34.0768 20.825 34.1303 20.9062 34.0731C21.6165 33.5814 21.9938 33.158 22.0952 33.0372C22.1137 33.0151 22.1238 32.9883 22.1248 32.9588C22.1266 32.8564 22.1303 32.5815 22.1202 32.2513C22.1072 31.8684 22.075 31.41 22.0002 31.0557C21.8914 30.5502 21.432 29.0226 21.2706 27.6408C21.2696 27.6316 21.2678 27.6223 21.2641 27.614C20.8499 26.4185 20.2964 25.271 19.6184 24.2028C19.5419 24.0828 19.3564 24.1603 19.386 24.2996V24.2987Z" fill="url(#paint6_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M7.87576 24.2987C7.19959 27.4867 6.75681 30.7255 6.55571 33.9772C6.54926 34.0768 6.43672 34.1303 6.35554 34.0731C5.64524 33.5814 5.26795 33.158 5.16648 33.0372C5.14803 33.0151 5.13789 32.9883 5.13696 32.9588C5.13512 32.8564 5.13143 32.5815 5.14158 32.2513C5.15449 31.8684 5.18678 31.41 5.2615 31.0557C5.37035 30.5502 5.82973 29.0226 5.99117 27.6408C5.99209 27.6316 5.99393 27.6223 5.99762 27.614C6.41181 26.4185 6.96529 25.271 7.6433 24.2028C7.71986 24.0828 7.90528 24.1603 7.87576 24.2996V24.2987Z" fill="url(#paint7_linear_2636_286087)"></path><path style="mix-blend-mode:multiply;" d="M7.66992 34.8297C9.02318 35.4764 10.9705 36.0464 13.6346 36.0464C14.212 36.0464 14.7544 36.0197 15.2664 35.9708C12.4723 31.1897 10.4244 25.975 9.22151 20.5693C8.17635 25.2425 7.87471 30.0394 7.66992 34.8297Z" fill="url(#paint8_linear_2636_286087)"></path><path d="M5.42672 14.7995C5.38244 14.21 5.3234 13.6141 5.24591 13.0173C5.11123 11.9897 4.92397 10.9611 4.66476 9.9704C4.61956 9.79328 4.57252 9.61894 4.52086 9.44459C4.40647 9.05254 4.28563 8.63836 4.22198 8.22694C4.13896 7.68637 4.15556 7.15319 4.42215 6.68458C4.58266 6.4023 4.81605 6.18091 5.07987 5.98904C5.34277 5.7944 5.63519 5.62928 5.9147 5.46047C7.10745 4.73633 8.17474 3.80464 9.05569 2.72075C9.56766 2.0907 9.89144 1.32875 9.98646 0.523438" stroke="white" stroke-opacity="0.42" stroke-width="0.0922464" stroke-miterlimit="10" stroke-dasharray="0.18 0.18"></path></g><defs><linearGradient id="paint0_linear_2636_286087" x1="25.3427" y1="12.3692" x2="18.8946" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint1_linear_2636_286087" x1="24.1215" y1="13.8667" x2="27.7837" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint2_linear_2636_286087" x1="1.92346" y1="12.3692" x2="8.37148" y2="15.3146" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#EEF9FF"></stop><stop offset="0.35" stop-color="#CCD4D9"></stop><stop offset="0.86" stop-color="#77797A"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint3_linear_2636_286087" x1="3.14176" y1="13.8667" x2="-0.520426" y2="6.31266" gradientUnits="userSpaceOnUse"><stop offset="0.22" stop-color="#EEF9FF"></stop><stop offset="0.31" stop-color="#E6F0F6"></stop><stop offset="0.46" stop-color="#D0D9DE"></stop><stop offset="0.65" stop-color="#ADB3B7"></stop><stop offset="0.88" stop-color="#7D7F81"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint4_linear_2636_286087" x1="21.3672" y1="18.5907" x2="20.2353" y2="18.5907" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint5_linear_2636_286087" x1="5.90039" y1="-0.0025094" x2="7.03225" y2="-0.0025094" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint6_linear_2636_286087" x1="20.4367" y1="23.8033" x2="21.3388" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint7_linear_2636_286087" x1="6.82507" y1="23.8033" x2="5.9229" y2="36.4088" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF9FF"></stop><stop offset="0.98" stop-color="#626262"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><linearGradient id="paint8_linear_2636_286087" x1="9.28147" y1="18.8683" x2="12.0055" y2="39.4605" gradientUnits="userSpaceOnUse"><stop offset="0.17" stop-color="#EEF9FF"></stop><stop offset="0.4" stop-color="#EBF6FC"></stop><stop offset="0.53" stop-color="#E4EEF4"></stop><stop offset="0.64" stop-color="#D8E1E6"></stop><stop offset="0.73" stop-color="#C6CED2"></stop><stop offset="0.81" stop-color="#AFB5B9"></stop><stop offset="0.89" stop-color="#939799"></stop><stop offset="0.96" stop-color="#727474"></stop><stop offset="1" stop-color="#606060"></stop></linearGradient><clipPath id="clip0_2636_286087"><rect width="27.28" height="38" fill="white"></rect></clipPath></defs>',2)),t.createElementVNode("g",null,[t.createElementVNode("text",{x:"50%",y:"10","text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":e.playConnection.player.jersey>99?10:14,"font-family":"BebasNeueRegular, sans-serif",stroke:"white"},t.toDisplayString(e.playConnection.player.jersey),9,OXe)])],8,NXe)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(c,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[c.x1&&c.y1?(t.openBlock(),t.createElementBlock("line",{key:`${e.playConnection.playId}-${i.index}`,style:{stroke:"#cbee6b","stroke-width":"2"},"stroke-dasharray":n===0&&$.value.length===2?"none":"5,5",x1:c.x1,y1:c.y1+t.unref(WP),x2:c.x2,y2:c.y2+t.unref(WP),"marker-start":"url(#bullet)","marker-end":`url(${e.playConnection.isLastPlay&&n===$.value.length-1?"#arrow":""})`},null,8,MXe)):t.createCommentVNode("",!0)],64))),256))],64))}},zXe={class:"half-soccer-tooltip"},PXe={class:"half-soccer-tooltip__main-info"},AXe={class:"half-soccer-tooltip__main-info__jersey-and-photo"},RXe={class:"half-soccer-tooltip__main-info__jersey-and-photo__jersey"},UXe={class:"half-soccer-tooltip__main-info__jersey-and-photo__photo"},FXe=["src"],IXe={class:"half-soccer-tooltip__main-info__player-name"},qXe={class:"half-soccer-tooltip__minutes-info"},jXe={class:"half-soccer-tooltip__minutes-info__info"},WXe={class:"half-soccer-tooltip__minutes-info__info__value"},DXe={class:"half-soccer-tooltip__minutes-info__info"},KXe={class:"half-soccer-tooltip__minutes-info__info__value"},BXe={__name:"HalfSoccerTooltip",props:{player:{type:Object,required:!0}},emits:["close"],setup(e,{emit:r}){const a=r;function v(){a("close")}return($,h)=>(t.openBlock(),t.createElementBlock("div",zXe,[t.createElementVNode("div",{class:"half-soccer-tooltip__close",onClick:v},[...h[0]||(h[0]=[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"m6.708 6 3.15-3.145a.502.502 0 0 0-.71-.71l-3.145 3.15-3.145-3.15a.502.502 0 0 0-.71.71L5.298 6l-3.15 3.145a.5.5 0 0 0 .163.82.5.5 0 0 0 .547-.11l3.145-3.15 3.145 3.15a.5.5 0 0 0 .82-.163.5.5 0 0 0-.11-.547L6.708 6z",fill:"#A3ADB4",opacity:".7"})],-1)])]),t.createElementVNode("div",PXe,[t.createElementVNode("div",AXe,[t.createElementVNode("div",RXe,t.toDisplayString(e.player.jersey),1),t.createElementVNode("div",UXe,[t.createElementVNode("img",{src:e.player.photo,alt:"Player photo"},null,8,FXe)])]),t.createElementVNode("div",IXe,t.toDisplayString(e.player.firstNameAndFirstLastName),1)]),h[3]||(h[3]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-text"},[t.createElementVNode("div",null,[t.createElementVNode("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"m10.201 4.06.607-.6a.67.67 0 0 0-.947-.947l-.6.607a5.333 5.333 0 0 0-6.526 0l-.607-.613a.672.672 0 1 0-.947.953l.614.607A5.28 5.28 0 0 0 .668 7.333a5.333 5.333 0 1 0 9.533-3.273zm-4.2 7.273a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm-1.333-10h2.667a.667.667 0 1 0 0-1.333H4.668a.667.667 0 0 0 0 1.333zm2 4a.667.667 0 1 0-1.333 0v1.26a1 1 0 1 0 1.333 0v-1.26z",fill:"#A3ADB4"})])]),t.createElementVNode("div",null,"Minutos jugados")],-1)),t.createElementVNode("div",qXe,[t.createElementVNode("div",jXe,[h[1]||(h[1]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-info__info__text"},"Este partido:",-1)),t.createElementVNode("div",WXe,t.toDisplayString(e.player.game_minutes_played),1)]),t.createElementVNode("div",DXe,[h[2]||(h[2]=t.createElementVNode("div",{class:"half-soccer-tooltip__minutes-info__info__text"},"Este torneo:",-1)),t.createElementVNode("div",KXe,t.toDisplayString(e.player.season_minutes_played),1)])])]))}},XXe=j6(BXe,[["__scopeId","data-v-3b4bd0a7"]]),GXe={key:0,class:"labels-container"},ZXe={__name:"HalfSoccerField",props:{widthContainer:{type:Number,default:1280},playersPositions:{type:Array,required:!0},playersPositionsByRange:{type:Array,required:!0},playConnections:{type:Array,required:!0},teamIdForAnalysis:{type:Number,required:!0},selectedCategory:{type:Number,default:31},areConnectionsVisible:{type:Boolean,default:!1},arePositionPathsVisible:{type:Boolean,default:!1},visibleTeamsIds:{type:Array,required:!0},isAgainstCorner:{type:Boolean,default:!1}},emits:["changelateralidad"],setup(e,{emit:r}){const a=e;let v=t.ref("left");const $=r;function h(T){v.value=T,$("changelateralidad",v.value)}const u=t.ref(!1),i=t.ref(0),p=t.ref(0),c=t.ref(null),n=t.computed(()=>a.arePositionPathsVisible?a.playersPositionsByRange.reduce((T,{playersPositions:x,finalPlayersPositions:d,areFirstPositions:o,areFinalPositions:l})=>(x.forEach((s,f)=>{T.push({...s,finalPlayerPosition:d[f],isFirstPosition:o,isFinalPosition:l})}),T),[]):a.playersPositions.map(T=>({...T,finalPlayerPosition:null,isFirstPosition:!0,isFinalPosition:!1})));t.watch(()=>a.selectedCategory,T=>{T==32?v.value="right":v.value="left"});function k({event:T,playerPosition:x}){c.value=x.player,i.value=T.layerX,p.value=T.layerY,u.value=!0}return(T,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.widthContainer<=768?(t.openBlock(),t.createElementBlock("div",GXe,[t.createElementVNode("div",{id:"label-left-zone-specific",class:"label-left-zone-specific-mobile",style:t.normalizeStyle(t.unref(v)=="left"?"":"opacity: 0.6"),onClick:x[0]||(x[0]=d=>h("left"))},null,4),t.createElementVNode("div",{id:"label-right-zone-specific",class:"label-right-zone-specific-mobile",style:t.normalizeStyle(t.unref(v)=="right"?"":"opacity: 0.6"),onClick:x[1]||(x[1]=d=>h("right"))},null,4)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"half-soccer-field",style:t.normalizeStyle(e.widthContainer<=768?"margin-top: 10px;":"")},[e.widthContainer>768?(t.openBlock(),t.createElementBlock("div",{key:0,id:"label-left-zone-specific",style:t.normalizeStyle(t.unref(v)=="left"?"":"opacity: 0.6"),onClick:x[2]||(x[2]=d=>h("left"))},null,4)):t.createCommentVNode("",!0),e.widthContainer>768?(t.openBlock(),t.createElementBlock("div",{key:1,id:"label-right-zone-specific",style:t.normalizeStyle(t.unref(v)=="right"?"":"opacity: 0.6"),onClick:x[3]||(x[3]=d=>h("right"))},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"half-soccer-field__player-info",style:t.normalizeStyle({x:i.value,y:p.value})},[u.value?(t.openBlock(),t.createBlock(XXe,{key:0,player:c.value,onClose:x[4]||(x[4]=d=>u.value=!1)},null,8,["player"])):t.createCommentVNode("",!0)],4),(t.openBlock(),t.createElementBlock("svg",{style:t.normalizeStyle(e.widthContainer>768?"margin-top: 22px":""),viewBox:"0 0 670 311",fill:"none",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.isAgainstCorner?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[x[5]||(x[5]=t.createStaticVNode('<g opacity="0.3" filter="url(#filter0_f_3194_305570)" data-v-3f051287><path d="M576.963 67.6699H88.6485L20.8687 290H649.101L576.963 67.6699Z" fill="#03080E" data-v-3f051287></path></g><path d="M576.963 32.3757H88.6485L20.8687 254.706H649.101L576.963 32.3757Z" fill="url(#paint0_linear_3194_305570)" data-v-3f051287></path><path d="M558.988 44.3523H106.623L48.5199 254.706H618.724L558.988 44.3523Z" stroke="url(#paint1_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M405 256C405 255.33 404.976 254.663 404.929 254C403.232 230.075 371.23 211 332 211C292.77 211 260.768 230.075 259.071 254" stroke="url(#paint2_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><ellipse cx="332" cy="81.5" rx="3" ry="1.5" fill="#38E3FF" data-v-3f051287></ellipse><mask id="path-6-inside-1_3194_305570" fill="white" data-v-3f051287><path d="M273 44L272 63H392L391 44" data-v-3f051287></path></mask><path d="M272 63L271.401 62.9685L271.368 63.6H272V63ZM392 63V63.6H392.632L392.599 62.9685L392 63ZM272.401 43.9685L271.401 62.9685L272.599 63.0315L273.599 44.0315L272.401 43.9685ZM272 63.6H392V62.4H272V63.6ZM392.599 62.9685L391.599 43.9685L390.401 44.0315L391.401 63.0315L392.599 62.9685Z" fill="#38E3FF" mask="url(#path-6-inside-1_3194_305570)" data-v-3f051287></path><path d="M332 113.5C351.793 113.5 369.589 108.109 382 99.5H282C294.411 108.095 312.207 113.5 332 113.5Z" stroke="url(#paint3_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M460 44.3525H332.742H332.053H204.5L195.5 99.5556H332.053H332.742H469L460 44.3525Z" stroke="url(#paint4_linear_3194_305570)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M649.118 254.085H20.8826V267.32H649.118V254.085Z" fill="url(#paint5_linear_3194_305570)" data-v-3f051287></path><defs data-v-3f051287><filter id="filter0_f_3194_305570" x="0.706949" y="47.5082" width="668.556" height="262.654" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" data-v-3f051287></feBlend><feGaussianBlur stdDeviation="10.0809" result="effect1_foregroundBlur_3194_305570" data-v-3f051287></feGaussianBlur></filter><linearGradient id="paint0_linear_3194_305570" x1="488.72" y1="207.277" x2="263.075" y2="-9.19523" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1796A7" data-v-3f051287></stop><stop offset="0.497165" stop-color="#287B86" data-v-3f051287></stop><stop offset="0.896498" stop-color="#1F464F" data-v-3f051287></stop></linearGradient><linearGradient id="paint1_linear_3194_305570" x1="95.5004" y1="10.9329" x2="575.445" y2="387.185" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint2_linear_3194_305570" x1="274.592" y1="196.183" x2="437.669" y2="268.95" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint3_linear_3194_305570" x1="290.239" y1="97.2758" x2="316.04" y2="150.573" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint4_linear_3194_305570" x1="224.708" y1="35.2645" x2="352.918" y2="209.985" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint5_linear_3194_305570" x1="386.816" y1="250.933" x2="387.693" y2="282.433" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1A5162" data-v-3f051287></stop><stop offset="1" stop-color="#33849D" data-v-3f051287></stop></linearGradient></defs>',11))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[x[6]||(x[6]=t.createStaticVNode('<g opacity="0.3" filter="url(#filter0_f_3159_296620)" data-v-3f051287><path d="M576.963 67.6699H88.6485L20.8687 290H649.101L576.963 67.6699Z" fill="#03080E" data-v-3f051287></path></g><g filter="url(#filter1_b_3159_296620)" data-v-3f051287><path d="M576.963 32.3757H88.6485L20.8687 254.706H649.101L576.963 32.3757Z" fill="url(#paint0_radial_3159_296620)" fill-opacity="0.3" data-v-3f051287></path></g><path d="M558.988 44.3523H106.623L48.5199 254.706H618.724L558.988 44.3523Z" stroke="url(#paint1_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M405 256C405 255.33 404.976 254.663 404.929 254C403.232 230.075 371.23 211 332 211C292.77 211 260.768 230.075 259.071 254" stroke="url(#paint2_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><ellipse cx="332" cy="81.5" rx="3" ry="1.5" fill="#38E3FF" data-v-3f051287></ellipse><mask id="path-6-inside-1_3159_296620" fill="white" data-v-3f051287><path d="M273 44L272 63H392L391 44" data-v-3f051287></path></mask><path d="M272 63L271.401 62.9685L271.368 63.6H272V63ZM392 63V63.6H392.632L392.599 62.9685L392 63ZM272.401 43.9685L271.401 62.9685L272.599 63.0315L273.599 44.0315L272.401 43.9685ZM272 63.6H392V62.4H272V63.6ZM392.599 62.9685L391.599 43.9685L390.401 44.0315L391.401 63.0315L392.599 62.9685Z" fill="#38E3FF" mask="url(#path-6-inside-1_3159_296620)" data-v-3f051287></path><path d="M332 113.5C351.793 113.5 369.589 108.109 382 99.5H282C294.411 108.095 312.207 113.5 332 113.5Z" stroke="url(#paint3_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M460 44.3525H332.742H332.053H204.5L195.5 99.5556H332.053H332.742H469L460 44.3525Z" stroke="url(#paint4_linear_3159_296620)" stroke-width="0.6" stroke-miterlimit="10" data-v-3f051287></path><path d="M649.118 254.085H20.8826V267.32H649.118V254.085Z" fill="url(#paint5_linear_3159_296620)" data-v-3f051287></path><defs data-v-3f051287><filter id="filter0_f_3159_296620" x="0.706949" y="47.5082" width="668.556" height="262.654" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" data-v-3f051287></feBlend><feGaussianBlur stdDeviation="10.0809" result="effect1_foregroundBlur_3159_296620" data-v-3f051287></feGaussianBlur></filter><filter id="filter1_b_3159_296620" x="15.5746" y="27.0816" width="638.821" height="232.918" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-3f051287><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-3f051287></feFlood><feGaussianBlur in="BackgroundImageFix" stdDeviation="2.64706" data-v-3f051287></feGaussianBlur><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_3159_296620" data-v-3f051287></feComposite><feBlend mode="normal" in="SourceGraphic" in2="effect1_backgroundBlur_3159_296620" result="shape" data-v-3f051287></feBlend></filter><radialGradient id="paint0_radial_3159_296620" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(128 74.4329) rotate(19.0828) scale(551.403 632.738)" data-v-3f051287><stop offset="0.0564278" stop-color="#4373BD" data-v-3f051287></stop><stop offset="0.455568" stop-color="#263D79" data-v-3f051287></stop><stop offset="0.918151" stop-color="#1B2949" data-v-3f051287></stop></radialGradient><linearGradient id="paint1_linear_3159_296620" x1="95.5004" y1="10.9329" x2="575.445" y2="387.185" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint2_linear_3159_296620" x1="274.592" y1="196.183" x2="437.669" y2="268.95" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint3_linear_3159_296620" x1="290.239" y1="97.2758" x2="316.04" y2="150.573" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint4_linear_3159_296620" x1="224.708" y1="35.2645" x2="352.918" y2="209.985" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#38E3FF" data-v-3f051287></stop><stop offset="1" stop-color="#81A4FF" data-v-3f051287></stop></linearGradient><linearGradient id="paint5_linear_3159_296620" x1="335" y1="247.933" x2="335" y2="283.433" gradientUnits="userSpaceOnUse" data-v-3f051287><stop stop-color="#1F3E72" data-v-3f051287></stop><stop offset="1" stop-color="#15202E" stop-opacity="0" data-v-3f051287></stop></linearGradient></defs>',11))],64)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,d=>(t.openBlock(),t.createBlock(_Xe,{key:`${d.playId}-${d.playerId}`,"player-position":d,"team-id-for-analysis":e.teamIdForAnalysis,"visible-teams-ids":e.visibleTeamsIds,"is-against-corner":e.isAgainstCorner,onPlayerPositionClick:k},null,8,["player-position","team-id-for-analysis","visible-teams-ids","is-against-corner"]))),128)),e.areConnectionsVisible?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.playConnections,d=>(t.openBlock(),t.createBlock(VXe,{key:d.id,"play-connection":d,"is-against-corner":e.isAgainstCorner},null,8,["play-connection","is-against-corner"]))),128)):t.createCommentVNode("",!0)],4))],4)],64))}},JXe=j6(ZXe,[["__scopeId","data-v-3f051287"]]);function XG(e,r){return function(){return e.apply(r,arguments)}}const{toString:HXe}=Object.prototype,{getPrototypeOf:DP}=Object,{iterator:iN,toStringTag:GG}=Symbol,oN=(e=>r=>{const a=HXe.call(r);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Bw=e=>(e=e.toLowerCase(),r=>oN(r)===e),sN=e=>r=>typeof r===e,{isArray:Jk}=Array,Hk=sN("undefined");function a9(e){return e!==null&&!Hk(e)&&e.constructor!==null&&!Hk(e.constructor)&&J_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ZG=Bw("ArrayBuffer");function YXe(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&ZG(e.buffer),r}const QXe=sN("string"),J_=sN("function"),JG=sN("number"),n9=e=>e!==null&&typeof e=="object",$Xe=e=>e===!0||e===!1,lN=e=>{if(oN(e)!=="object")return!1;const r=DP(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(GG in e)&&!(iN in e)},eGe=e=>{if(!n9(e)||a9(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},tGe=Bw("Date"),rGe=Bw("File"),aGe=Bw("Blob"),nGe=Bw("FileList"),iGe=e=>n9(e)&&J_(e.pipe),oGe=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||J_(e.append)&&((r=oN(e))==="formdata"||r==="object"&&J_(e.toString)&&e.toString()==="[object FormData]"))},sGe=Bw("URLSearchParams"),[lGe,cGe,uGe,dGe]=["ReadableStream","Request","Response","Headers"].map(Bw),pGe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function i9(e,r,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let v,$;if(typeof e!="object"&&(e=[e]),Jk(e))for(v=0,$=e.length;v<$;v++)r.call(null,e[v],v,e);else{if(a9(e))return;const h=a?Object.getOwnPropertyNames(e):Object.keys(e),u=h.length;let i;for(v=0;v<u;v++)i=h[v],r.call(null,e[i],i,e)}}function HG(e,r){if(a9(e))return null;r=r.toLowerCase();const a=Object.keys(e);let v=a.length,$;for(;v-- >0;)if($=a[v],r===$.toLowerCase())return $;return null}const kS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YG=e=>!Hk(e)&&e!==kS;function KP(){const{caseless:e,skipUndefined:r}=YG(this)&&this||{},a={},v=($,h)=>{const u=e&&HG(a,h)||h;lN(a[u])&&lN($)?a[u]=KP(a[u],$):lN($)?a[u]=KP({},$):Jk($)?a[u]=$.slice():(!r||!Hk($))&&(a[u]=$)};for(let $=0,h=arguments.length;$<h;$++)arguments[$]&&i9(arguments[$],v);return a}const hGe=(e,r,a,{allOwnKeys:v}={})=>(i9(r,($,h)=>{a&&J_($)?e[h]=XG($,a):e[h]=$},{allOwnKeys:v}),e),fGe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mGe=(e,r,a,v)=>{e.prototype=Object.create(r.prototype,v),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),a&&Object.assign(e.prototype,a)},yGe=(e,r,a,v)=>{let $,h,u;const i={};if(r=r||{},e==null)return r;do{for($=Object.getOwnPropertyNames(e),h=$.length;h-- >0;)u=$[h],(!v||v(u,e,r))&&!i[u]&&(r[u]=e[u],i[u]=!0);e=a!==!1&&DP(e)}while(e&&(!a||a(e,r))&&e!==Object.prototype);return r},gGe=(e,r,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=r.length;const v=e.indexOf(r,a);return v!==-1&&v===a},vGe=e=>{if(!e)return null;if(Jk(e))return e;let r=e.length;if(!JG(r))return null;const a=new Array(r);for(;r-- >0;)a[r]=e[r];return a},bGe=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&DP(Uint8Array)),xGe=(e,r)=>{const a=(e&&e[iN]).call(e);let v;for(;(v=a.next())&&!v.done;){const $=v.value;r.call(e,$[0],$[1])}},_Ge=(e,r)=>{let a;const v=[];for(;(a=e.exec(r))!==null;)v.push(a);return v},wGe=Bw("HTMLFormElement"),TGe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,v){return a.toUpperCase()+v}),QG=(({hasOwnProperty:e})=>(r,a)=>e.call(r,a))(Object.prototype),SGe=Bw("RegExp"),$G=(e,r)=>{const a=Object.getOwnPropertyDescriptors(e),v={};i9(a,($,h)=>{let u;(u=r($,h,e))!==!1&&(v[h]=u||$)}),Object.defineProperties(e,v)},kGe=e=>{$G(e,(r,a)=>{if(J_(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const v=e[a];if(J_(v)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},LGe=(e,r)=>{const a={},v=$=>{$.forEach(h=>{a[h]=!0})};return Jk(e)?v(e):v(String(e).split(r)),a},EGe=()=>{},CGe=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function NGe(e){return!!(e&&J_(e.append)&&e[GG]==="FormData"&&e[iN])}const OGe=e=>{const r=new Array(10),a=(v,$)=>{if(n9(v)){if(r.indexOf(v)>=0)return;if(a9(v))return v;if(!("toJSON"in v)){r[$]=v;const h=Jk(v)?[]:{};return i9(v,(u,i)=>{const p=a(u,$+1);!Hk(p)&&(h[i]=p)}),r[$]=void 0,h}}return v};return a(e,0)},MGe=Bw("AsyncFunction"),VGe=e=>e&&(n9(e)||J_(e))&&J_(e.then)&&J_(e.catch),eZ=((e,r)=>e?setImmediate:r?((a,v)=>(kS.addEventListener("message",({source:$,data:h})=>{$===kS&&h===a&&v.length&&v.shift()()},!1),$=>{v.push($),kS.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",J_(kS.postMessage)),zGe=typeof queueMicrotask<"u"?queueMicrotask.bind(kS):typeof process<"u"&&process.nextTick||eZ,PGe=e=>e!=null&&J_(e[iN]),tu={isArray:Jk,isArrayBuffer:ZG,isBuffer:a9,isFormData:oGe,isArrayBufferView:YXe,isString:QXe,isNumber:JG,isBoolean:$Xe,isObject:n9,isPlainObject:lN,isEmptyObject:eGe,isReadableStream:lGe,isRequest:cGe,isResponse:uGe,isHeaders:dGe,isUndefined:Hk,isDate:tGe,isFile:rGe,isBlob:aGe,isRegExp:SGe,isFunction:J_,isStream:iGe,isURLSearchParams:sGe,isTypedArray:bGe,isFileList:nGe,forEach:i9,merge:KP,extend:hGe,trim:pGe,stripBOM:fGe,inherits:mGe,toFlatObject:yGe,kindOf:oN,kindOfTest:Bw,endsWith:gGe,toArray:vGe,forEachEntry:xGe,matchAll:_Ge,isHTMLForm:wGe,hasOwnProperty:QG,hasOwnProp:QG,reduceDescriptors:$G,freezeMethods:kGe,toObjectSet:LGe,toCamelCase:TGe,noop:EGe,toFiniteNumber:CGe,findKey:HG,global:kS,isContextDefined:YG,isSpecCompliantForm:NGe,toJSONObject:OGe,isAsyncFn:MGe,isThenable:VGe,setImmediate:eZ,asap:zGe,isIterable:PGe};function Am(e,r,a,v,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),a&&(this.config=a),v&&(this.request=v),$&&(this.response=$,this.status=$.status?$.status:null)}tu.inherits(Am,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:tu.toJSONObject(this.config),code:this.code,status:this.status}}});const tZ=Am.prototype,rZ={};["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=>{rZ[e]={value:e}}),Object.defineProperties(Am,rZ),Object.defineProperty(tZ,"isAxiosError",{value:!0}),Am.from=(e,r,a,v,$,h)=>{const u=Object.create(tZ);tu.toFlatObject(e,u,function(c){return c!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",p=r==null&&e?e.code:r;return Am.call(u,i,p,a,v,$),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",h&&Object.assign(u,h),u};const AGe=null;function BP(e){return tu.isPlainObject(e)||tu.isArray(e)}function aZ(e){return tu.endsWith(e,"[]")?e.slice(0,-2):e}function nZ(e,r,a){return e?e.concat(r).map(function(v,$){return v=aZ(v),!a&&$?"["+v+"]":v}).join(a?".":""):r}function RGe(e){return tu.isArray(e)&&!e.some(BP)}const UGe=tu.toFlatObject(tu,{},null,function(e){return/^is[A-Z]/.test(e)});function cN(e,r,a){if(!tu.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,a=tu.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,d){return!tu.isUndefined(d[x])});const v=a.metaTokens,$=a.visitor||c,h=a.dots,u=a.indexes,i=(a.Blob||typeof Blob<"u"&&Blob)&&tu.isSpecCompliantForm(r);if(!tu.isFunction($))throw new TypeError("visitor must be a function");function p(x){if(x===null)return"";if(tu.isDate(x))return x.toISOString();if(tu.isBoolean(x))return x.toString();if(!i&&tu.isBlob(x))throw new Am("Blob is not supported. Use a Buffer instead.");return tu.isArrayBuffer(x)||tu.isTypedArray(x)?i&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function c(x,d,o){let l=x;if(x&&!o&&typeof x=="object"){if(tu.endsWith(d,"{}"))d=v?d:d.slice(0,-2),x=JSON.stringify(x);else if(tu.isArray(x)&&RGe(x)||(tu.isFileList(x)||tu.endsWith(d,"[]"))&&(l=tu.toArray(x)))return d=aZ(d),l.forEach(function(s,f){!(tu.isUndefined(s)||s===null)&&r.append(u===!0?nZ([d],f,h):u===null?d:d+"[]",p(s))}),!1}return BP(x)?!0:(r.append(nZ(o,d,h),p(x)),!1)}const n=[],k=Object.assign(UGe,{defaultVisitor:c,convertValue:p,isVisitable:BP});function T(x,d){if(!tu.isUndefined(x)){if(n.indexOf(x)!==-1)throw Error("Circular reference detected in "+d.join("."));n.push(x),tu.forEach(x,function(o,l){(!(tu.isUndefined(o)||o===null)&&$.call(r,o,tu.isString(l)?l.trim():l,d,k))===!0&&T(o,d?d.concat(l):[l])}),n.pop()}}if(!tu.isObject(e))throw new TypeError("data must be an object");return T(e),r}function iZ(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return r[a]})}function XP(e,r){this._pairs=[],e&&cN(e,this,r)}const oZ=XP.prototype;oZ.append=function(e,r){this._pairs.push([e,r])},oZ.toString=function(e){const r=e?function(a){return e.call(this,a,iZ)}:iZ;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function FGe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sZ(e,r,a){if(!r)return e;const v=a&&a.encode||FGe;tu.isFunction(a)&&(a={serialize:a});const $=a&&a.serialize;let h;if($?h=$(r,a):h=tu.isURLSearchParams(r)?r.toString():new XP(r,a).toString(v),h){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+h}return e}class lZ{constructor(){this.handlers=[]}use(r,a,v){return this.handlers.push({fulfilled:r,rejected:a,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){tu.forEach(this.handlers,function(a){a!==null&&r(a)})}}const cZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},IGe=typeof URLSearchParams<"u"?URLSearchParams:XP,qGe=typeof FormData<"u"?FormData:null,jGe=typeof Blob<"u"?Blob:null,WGe={isBrowser:!0,classes:{URLSearchParams:IGe,FormData:qGe,Blob:jGe},protocols:["http","https","file","blob","url","data"]},GP=typeof window<"u"&&typeof document<"u",ZP=typeof navigator=="object"&&navigator||void 0,DGe=GP&&(!ZP||["ReactNative","NativeScript","NS"].indexOf(ZP.product)<0),KGe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",BGe=GP&&window.location.href||"http://localhost",XGe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:GP,hasStandardBrowserEnv:DGe,hasStandardBrowserWebWorkerEnv:KGe,navigator:ZP,origin:BGe},Symbol.toStringTag,{value:"Module"})),Wx={...XGe,...WGe};function GGe(e,r){return cN(e,new Wx.classes.URLSearchParams,{visitor:function(a,v,$,h){return Wx.isNode&&tu.isBuffer(a)?(this.append(v,a.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...r})}function ZGe(e){return tu.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function JGe(e){const r={},a=Object.keys(e);let v;const $=a.length;let h;for(v=0;v<$;v++)h=a[v],r[h]=e[h];return r}function uZ(e){function r(a,v,$,h){let u=a[h++];if(u==="__proto__")return!0;const i=Number.isFinite(+u),p=h>=a.length;return u=!u&&tu.isArray($)?$.length:u,p?(tu.hasOwnProp($,u)?$[u]=[$[u],v]:$[u]=v,!i):((!$[u]||!tu.isObject($[u]))&&($[u]=[]),r(a,v,$[u],h)&&tu.isArray($[u])&&($[u]=JGe($[u])),!i)}if(tu.isFormData(e)&&tu.isFunction(e.entries)){const a={};return tu.forEachEntry(e,(v,$)=>{r(ZGe(v),$,a,0)}),a}return null}function HGe(e,r,a){if(tu.isString(e))try{return(r||JSON.parse)(e),tu.trim(e)}catch(v){if(v.name!=="SyntaxError")throw v}return(a||JSON.stringify)(e)}const o9={transitional:cZ,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const a=r.getContentType()||"",v=a.indexOf("application/json")>-1,$=tu.isObject(e);if($&&tu.isHTMLForm(e)&&(e=new FormData(e)),tu.isFormData(e))return v?JSON.stringify(uZ(e)):e;if(tu.isArrayBuffer(e)||tu.isBuffer(e)||tu.isStream(e)||tu.isFile(e)||tu.isBlob(e)||tu.isReadableStream(e))return e;if(tu.isArrayBufferView(e))return e.buffer;if(tu.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let h;if($){if(a.indexOf("application/x-www-form-urlencoded")>-1)return GGe(e,this.formSerializer).toString();if((h=tu.isFileList(e))||a.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return cN(h?{"files[]":e}:e,u&&new u,this.formSerializer)}}return $||v?(r.setContentType("application/json",!1),HGe(e)):e}],transformResponse:[function(e){const r=this.transitional||o9.transitional,a=r&&r.forcedJSONParsing,v=this.responseType==="json";if(tu.isResponse(e)||tu.isReadableStream(e))return e;if(e&&tu.isString(e)&&(a&&!this.responseType||v)){const $=!(r&&r.silentJSONParsing)&&v;try{return JSON.parse(e,this.parseReviver)}catch(h){if($)throw h.name==="SyntaxError"?Am.from(h,Am.ERR_BAD_RESPONSE,this,null,this.response):h}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wx.classes.FormData,Blob:Wx.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tu.forEach(["delete","get","head","post","put","patch"],e=>{o9.headers[e]={}});const YGe=tu.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"]),QGe=e=>{const r={};let a,v,$;return e&&e.split(`
|
|
7981
7981
|
`).forEach(function(h){$=h.indexOf(":"),a=h.substring(0,$).trim().toLowerCase(),v=h.substring($+1).trim(),!(!a||r[a]&&YGe[a])&&(a==="set-cookie"?r[a]?r[a].push(v):r[a]=[v]:r[a]=r[a]?r[a]+", "+v:v)}),r},dZ=Symbol("internals");function s9(e){return e&&String(e).trim().toLowerCase()}function uN(e){return e===!1||e==null?e:tu.isArray(e)?e.map(uN):String(e)}function $Ge(e){const r=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let v;for(;v=a.exec(e);)r[v[1]]=v[2];return r}const eZe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function JP(e,r,a,v,$){if(tu.isFunction(v))return v.call(this,r,a);if($&&(r=a),!!tu.isString(r)){if(tu.isString(v))return r.indexOf(v)!==-1;if(tu.isRegExp(v))return v.test(r)}}function tZe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,a,v)=>a.toUpperCase()+v)}function rZe(e,r){const a=tu.toCamelCase(" "+r);["get","set","has"].forEach(v=>{Object.defineProperty(e,v+a,{value:function($,h,u){return this[v].call(this,r,$,h,u)},configurable:!0})})}let H_=class{constructor(e){e&&this.set(e)}set(e,r,a){const v=this;function $(u,i,p){const c=s9(i);if(!c)throw new Error("header name must be a non-empty string");const n=tu.findKey(v,c);(!n||v[n]===void 0||p===!0||p===void 0&&v[n]!==!1)&&(v[n||i]=uN(u))}const h=(u,i)=>tu.forEach(u,(p,c)=>$(p,c,i));if(tu.isPlainObject(e)||e instanceof this.constructor)h(e,r);else if(tu.isString(e)&&(e=e.trim())&&!eZe(e))h(QGe(e),r);else if(tu.isObject(e)&&tu.isIterable(e)){let u={},i,p;for(const c of e){if(!tu.isArray(c))throw TypeError("Object iterator must return a key-value pair");u[p=c[0]]=(i=u[p])?tu.isArray(i)?[...i,c[1]]:[i,c[1]]:c[1]}h(u,r)}else e!=null&&$(r,e,a);return this}get(e,r){if(e=s9(e),e){const a=tu.findKey(this,e);if(a){const v=this[a];if(!r)return v;if(r===!0)return $Ge(v);if(tu.isFunction(r))return r.call(this,v,a);if(tu.isRegExp(r))return r.exec(v);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=s9(e),e){const a=tu.findKey(this,e);return!!(a&&this[a]!==void 0&&(!r||JP(this,this[a],a,r)))}return!1}delete(e,r){const a=this;let v=!1;function $(h){if(h=s9(h),h){const u=tu.findKey(a,h);u&&(!r||JP(a,a[u],u,r))&&(delete a[u],v=!0)}}return tu.isArray(e)?e.forEach($):$(e),v}clear(e){const r=Object.keys(this);let a=r.length,v=!1;for(;a--;){const $=r[a];(!e||JP(this,this[$],$,e,!0))&&(delete this[$],v=!0)}return v}normalize(e){const r=this,a={};return tu.forEach(this,(v,$)=>{const h=tu.findKey(a,$);if(h){r[h]=uN(v),delete r[$];return}const u=e?tZe($):String($).trim();u!==$&&delete r[$],r[u]=uN(v),a[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return tu.forEach(this,(a,v)=>{a!=null&&a!==!1&&(r[v]=e&&tu.isArray(a)?a.join(", "):a)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
7982
7982
|
`)}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,...r){const a=new this(e);return r.forEach(v=>a.set(v)),a}static accessor(e){const r=(this[dZ]=this[dZ]={accessors:{}}).accessors,a=this.prototype;function v($){const h=s9($);r[h]||(rZe(a,$),r[h]=!0)}return tu.isArray(e)?e.forEach(v):v(e),this}};H_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),tu.reduceDescriptors(H_.prototype,({value:e},r)=>{let a=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(v){this[a]=v}}}),tu.freezeMethods(H_);function HP(e,r){const a=this||o9,v=r||a,$=H_.from(v.headers);let h=v.data;return tu.forEach(e,function(u){h=u.call(a,h,$.normalize(),r?r.status:void 0)}),$.normalize(),h}function pZ(e){return!!(e&&e.__CANCEL__)}function Yk(e,r,a){Am.call(this,e??"canceled",Am.ERR_CANCELED,r,a),this.name="CanceledError"}tu.inherits(Yk,Am,{__CANCEL__:!0});function hZ(e,r,a){const v=a.config.validateStatus;!a.status||!v||v(a.status)?e(a):r(new Am("Request failed with status code "+a.status,[Am.ERR_BAD_REQUEST,Am.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function aZe(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function nZe(e,r){e=e||10;const a=new Array(e),v=new Array(e);let $=0,h=0,u;return r=r!==void 0?r:1e3,function(i){const p=Date.now(),c=v[h];u||(u=p),a[$]=i,v[$]=p;let n=h,k=0;for(;n!==$;)k+=a[n++],n=n%e;if($=($+1)%e,$===h&&(h=(h+1)%e),p-u<r)return;const T=c&&p-c;return T?Math.round(k*1e3/T):void 0}}function iZe(e,r){let a=0,v=1e3/r,$,h;const u=(i,p=Date.now())=>{a=p,$=null,h&&(clearTimeout(h),h=null),e(...i)};return[(...i)=>{const p=Date.now(),c=p-a;c>=v?u(i,p):($=i,h||(h=setTimeout(()=>{h=null,u($)},v-c)))},()=>$&&u($)]}const dN=(e,r,a=3)=>{let v=0;const $=nZe(50,250);return iZe(h=>{const u=h.loaded,i=h.lengthComputable?h.total:void 0,p=u-v,c=$(p),n=u<=i;v=u;const k={loaded:u,total:i,progress:i?u/i:void 0,bytes:p,rate:c||void 0,estimated:c&&i&&n?(i-u)/c:void 0,event:h,lengthComputable:i!=null,[r?"download":"upload"]:!0};e(k)},a)},fZ=(e,r)=>{const a=e!=null;return[v=>r[0]({lengthComputable:a,total:e,loaded:v}),r[1]]},mZ=e=>(...r)=>tu.asap(()=>e(...r)),oZe=Wx.hasStandardBrowserEnv?((e,r)=>a=>(a=new URL(a,Wx.origin),e.protocol===a.protocol&&e.host===a.host&&(r||e.port===a.port)))(new URL(Wx.origin),Wx.navigator&&/(msie|trident)/i.test(Wx.navigator.userAgent)):()=>!0,sZe=Wx.hasStandardBrowserEnv?{write(e,r,a,v,$,h,u){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(r)}`];tu.isNumber(a)&&i.push(`expires=${new Date(a).toUTCString()}`),tu.isString(v)&&i.push(`path=${v}`),tu.isString($)&&i.push(`domain=${$}`),h===!0&&i.push("secure"),tu.isString(u)&&i.push(`SameSite=${u}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function lZe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cZe(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function yZ(e,r,a){let v=!lZe(r);return e&&(v||a==!1)?cZe(e,r):r}const gZ=e=>e instanceof H_?{...e}:e;function LS(e,r){r=r||{};const a={};function v(c,n,k,T){return tu.isPlainObject(c)&&tu.isPlainObject(n)?tu.merge.call({caseless:T},c,n):tu.isPlainObject(n)?tu.merge({},n):tu.isArray(n)?n.slice():n}function $(c,n,k,T){if(tu.isUndefined(n)){if(!tu.isUndefined(c))return v(void 0,c,k,T)}else return v(c,n,k,T)}function h(c,n){if(!tu.isUndefined(n))return v(void 0,n)}function u(c,n){if(tu.isUndefined(n)){if(!tu.isUndefined(c))return v(void 0,c)}else return v(void 0,n)}function i(c,n,k){if(k in r)return v(c,n);if(k in e)return v(void 0,c)}const p={url:h,method:h,data:h,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:i,headers:(c,n,k)=>$(gZ(c),gZ(n),k,!0)};return tu.forEach(Object.keys({...e,...r}),function(c){const n=p[c]||$,k=n(e[c],r[c],c);tu.isUndefined(k)&&n!==i||(a[c]=k)}),a}const vZ=e=>{const r=LS({},e);let{data:a,withXSRFToken:v,xsrfHeaderName:$,xsrfCookieName:h,headers:u,auth:i}=r;if(r.headers=u=H_.from(u),r.url=sZ(yZ(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&u.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),tu.isFormData(a)){if(Wx.hasStandardBrowserEnv||Wx.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(tu.isFunction(a.getHeaders)){const p=a.getHeaders(),c=["content-type","content-length"];Object.entries(p).forEach(([n,k])=>{c.includes(n.toLowerCase())&&u.set(n,k)})}}if(Wx.hasStandardBrowserEnv&&(v&&tu.isFunction(v)&&(v=v(r)),v||v!==!1&&oZe(r.url))){const p=$&&h&&sZe.read(h);p&&u.set($,p)}return r},uZe=typeof XMLHttpRequest<"u",dZe=uZe&&function(e){return new Promise(function(r,a){const v=vZ(e);let $=v.data;const h=H_.from(v.headers).normalize();let{responseType:u,onUploadProgress:i,onDownloadProgress:p}=v,c,n,k,T,x;function d(){T&&T(),x&&x(),v.cancelToken&&v.cancelToken.unsubscribe(c),v.signal&&v.signal.removeEventListener("abort",c)}let o=new XMLHttpRequest;o.open(v.method.toUpperCase(),v.url,!0),o.timeout=v.timeout;function l(){if(!o)return;const f=H_.from("getAllResponseHeaders"in o&&o.getAllResponseHeaders()),g={data:!u||u==="text"||u==="json"?o.responseText:o.response,status:o.status,statusText:o.statusText,headers:f,config:e,request:o};hZ(function(S){r(S),d()},function(S){a(S),d()},g),o=null}"onloadend"in o?o.onloadend=l:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(l)},o.onabort=function(){o&&(a(new Am("Request aborted",Am.ECONNABORTED,e,o)),o=null)},o.onerror=function(f){const g=f&&f.message?f.message:"Network Error",S=new Am(g,Am.ERR_NETWORK,e,o);S.event=f||null,a(S),o=null},o.ontimeout=function(){let f=v.timeout?"timeout of "+v.timeout+"ms exceeded":"timeout exceeded";const g=v.transitional||cZ;v.timeoutErrorMessage&&(f=v.timeoutErrorMessage),a(new Am(f,g.clarifyTimeoutError?Am.ETIMEDOUT:Am.ECONNABORTED,e,o)),o=null},$===void 0&&h.setContentType(null),"setRequestHeader"in o&&tu.forEach(h.toJSON(),function(f,g){o.setRequestHeader(g,f)}),tu.isUndefined(v.withCredentials)||(o.withCredentials=!!v.withCredentials),u&&u!=="json"&&(o.responseType=v.responseType),p&&([k,x]=dN(p,!0),o.addEventListener("progress",k)),i&&o.upload&&([n,T]=dN(i),o.upload.addEventListener("progress",n),o.upload.addEventListener("loadend",T)),(v.cancelToken||v.signal)&&(c=f=>{o&&(a(!f||f.type?new Yk(null,e,o):f),o.abort(),o=null)},v.cancelToken&&v.cancelToken.subscribe(c),v.signal&&(v.signal.aborted?c():v.signal.addEventListener("abort",c)));const s=aZe(v.url);if(s&&Wx.protocols.indexOf(s)===-1){a(new Am("Unsupported protocol "+s+":",Am.ERR_BAD_REQUEST,e));return}o.send($||null)})},pZe=(e,r)=>{const{length:a}=e=e?e.filter(Boolean):[];if(r||a){let v=new AbortController,$;const h=function(c){if(!$){$=!0,i();const n=c instanceof Error?c:this.reason;v.abort(n instanceof Am?n:new Yk(n instanceof Error?n.message:n))}};let u=r&&setTimeout(()=>{u=null,h(new Am(`timeout ${r} of ms exceeded`,Am.ETIMEDOUT))},r);const i=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(h):c.removeEventListener("abort",h)}),e=null)};e.forEach(c=>c.addEventListener("abort",h));const{signal:p}=v;return p.unsubscribe=()=>tu.asap(i),p}},hZe=function*(e,r){let a=e.byteLength;if(a<r){yield e;return}let v=0,$;for(;v<a;)$=v+r,yield e.slice(v,$),v=$},fZe=async function*(e,r){for await(const a of mZe(e))yield*hZe(a,r)},mZe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const r=e.getReader();try{for(;;){const{done:a,value:v}=await r.read();if(a)break;yield v}}finally{await r.cancel()}},bZ=(e,r,a,v)=>{const $=fZe(e,r);let h=0,u,i=p=>{u||(u=!0,v&&v(p))};return new ReadableStream({async pull(p){try{const{done:c,value:n}=await $.next();if(c){i(),p.close();return}let k=n.byteLength;if(a){let T=h+=k;a(T)}p.enqueue(new Uint8Array(n))}catch(c){throw i(c),c}},cancel(p){return i(p),$.return()}},{highWaterMark:2})},xZ=64*1024,{isFunction:pN}=tu,yZe=(({Request:e,Response:r})=>({Request:e,Response:r}))(tu.global),{ReadableStream:_Z,TextEncoder:wZ}=tu.global,TZ=(e,...r)=>{try{return!!e(...r)}catch{return!1}},gZe=e=>{e=tu.merge.call({skipUndefined:!0},yZe,e);const{fetch:r,Request:a,Response:v}=e,$=r?pN(r):typeof fetch=="function",h=pN(a),u=pN(v);if(!$)return!1;const i=$&&pN(_Z),p=$&&(typeof wZ=="function"?(d=>o=>d.encode(o))(new wZ):async d=>new Uint8Array(await new a(d).arrayBuffer())),c=h&&i&&TZ(()=>{let d=!1;const o=new a(Wx.origin,{body:new _Z,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!o}),n=u&&i&&TZ(()=>tu.isReadableStream(new v("").body)),k={stream:n&&(d=>d.body)};$&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!k[d]&&(k[d]=(o,l)=>{let s=o&&o[d];if(s)return s.call(o);throw new Am(`Response type '${d}' is not supported`,Am.ERR_NOT_SUPPORT,l)})});const T=async d=>{if(d==null)return 0;if(tu.isBlob(d))return d.size;if(tu.isSpecCompliantForm(d))return(await new a(Wx.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(tu.isArrayBufferView(d)||tu.isArrayBuffer(d))return d.byteLength;if(tu.isURLSearchParams(d)&&(d=d+""),tu.isString(d))return(await p(d)).byteLength},x=async(d,o)=>tu.toFiniteNumber(d.getContentLength())??T(o);return async d=>{let{url:o,method:l,data:s,signal:f,cancelToken:g,timeout:S,onDownloadProgress:L,onUploadProgress:M,responseType:A,headers:z,withCredentials:I="same-origin",fetchOptions:j}=vZ(d),F=r||fetch;A=A?(A+"").toLowerCase():"text";let W=pZe([f,g&&g.toAbortSignal()],S),U=null;const O=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let X;try{if(M&&c&&l!=="get"&&l!=="head"&&(X=await x(z,s))!==0){let be=new a(o,{method:"POST",body:s,duplex:"half"}),xe;if(tu.isFormData(s)&&(xe=be.headers.get("content-type"))&&z.setContentType(xe),be.body){const[Ae,qe]=fZ(X,dN(mZ(M)));s=bZ(be.body,xZ,Ae,qe)}}tu.isString(I)||(I=I?"include":"omit");const N=h&&"credentials"in a.prototype,Y={...j,signal:W,method:l.toUpperCase(),headers:z.normalize().toJSON(),body:s,duplex:"half",credentials:N?I:void 0};U=h&&new a(o,Y);let se=await(h?F(U,j):F(o,Y));const me=n&&(A==="stream"||A==="response");if(n&&(L||me&&O)){const be={};["status","statusText","headers"].forEach(_e=>{be[_e]=se[_e]});const xe=tu.toFiniteNumber(se.headers.get("content-length")),[Ae,qe]=L&&fZ(xe,dN(mZ(L),!0))||[];se=new v(bZ(se.body,xZ,Ae,()=>{qe&&qe(),O&&O()}),be)}A=A||"text";let ge=await k[tu.findKey(k,A)||"text"](se,d);return!me&&O&&O(),await new Promise((be,xe)=>{hZ(be,xe,{data:ge,headers:H_.from(se.headers),status:se.status,statusText:se.statusText,config:d,request:U})})}catch(N){throw O&&O(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Am("Network Error",Am.ERR_NETWORK,d,U),{cause:N.cause||N}):Am.from(N,N&&N.code,d,U)}}},vZe=new Map,SZ=e=>{let r=e&&e.env||{};const{fetch:a,Request:v,Response:$}=r,h=[v,$,a];let u=h.length,i=u,p,c,n=vZe;for(;i--;)p=h[i],c=n.get(p),c===void 0&&n.set(p,c=i?new Map:gZe(r)),n=c;return c};SZ();const YP={http:AGe,xhr:dZe,fetch:{get:SZ}};tu.forEach(YP,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const kZ=e=>`- ${e}`,bZe=e=>tu.isFunction(e)||e===null||e===!1;function xZe(e,r){e=tu.isArray(e)?e:[e];const{length:a}=e;let v,$;const h={};for(let u=0;u<a;u++){v=e[u];let i;if($=v,!bZe(v)&&($=YP[(i=String(v)).toLowerCase()],$===void 0))throw new Am(`Unknown adapter '${i}'`);if($&&(tu.isFunction($)||($=$.get(r))))break;h[i||"#"+u]=$}if(!$){const u=Object.entries(h).map(([p,c])=>`adapter ${p} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=a?u.length>1?`since :
|
|
7983
7983
|
`+u.map(kZ).join(`
|
|
@@ -7990,25 +7990,25 @@ uniform ${gi} ${vi} u_${$i};
|
|
|
7990
7990
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
7991
7991
|
*/const u_=new nHe;class Rh{static init(r={},a=".grid-stack"){if(typeof document>"u")return null;const v=Rh.getGridElement(a);return v?(v.gridstack||(v.gridstack=new Rh(v,ru.cloneDeep(r))),v.gridstack):(console.error(typeof a=="string"?'GridStack.initAll() no grid was found with selector "'+a+`" - element missing or wrong selector ?
|
|
7992
7992
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(r={},a=".grid-stack"){const v=[];return typeof document>"u"||(Rh.getGridElements(a).forEach($=>{$.gridstack||($.gridstack=new Rh($,ru.cloneDeep(r))),v.push($.gridstack)}),v.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+a+`" - element missing or wrong selector ?
|
|
7993
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),v}static addGrid(r,a={}){if(!r)return null;let v=r;if(v.gridstack){const $=v.gridstack;return a&&($.opts={...$.opts,...a}),a.children!==void 0&&$.load(a.children),$}return(!r.classList.contains("grid-stack")||Rh.addRemoveCB)&&(Rh.addRemoveCB?v=Rh.addRemoveCB(r,a,!0,!0):v=ru.createDiv(["grid-stack",a.class],r)),Rh.init(a,v)}static registerEngine(r){Rh.engineClass=r}get placeholder(){if(!this._placeholder){this._placeholder=ru.createDiv([this.opts.placeholderClass,T3.itemClass,this.opts.itemClass]);const r=ru.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(r.textContent=this.opts.placeholderText)}return this._placeholder}constructor(r,a={}){var v;this.el=r,this.opts=a,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},r.gridstack=this,this.opts=a=a||{},r.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),a.row&&(a.minRow=a.maxRow=a.row,delete a.row);const $=ru.toNumber(r.getAttribute("gs-row"));a.column==="auto"&&delete a.column,a.alwaysShowResizeHandle!==void 0&&(a._alwaysShowResizeHandle=a.alwaysShowResizeHandle);const h=a.columnOpts;if(h){const n=h.breakpoints;!h.columnWidth&&!(n!=null&&n.length)?delete a.columnOpts:(h.columnMax=h.columnMax||12,(n==null?void 0:n.length)>1&&n.sort((k,T)=>(T.w||0)-(k.w||0)))}const u={...ru.cloneDeep(T3),column:ru.toNumber(r.getAttribute("gs-column"))||T3.column,minRow:$||ru.toNumber(r.getAttribute("gs-min-row"))||T3.minRow,maxRow:$||ru.toNumber(r.getAttribute("gs-max-row"))||T3.maxRow,staticGrid:ru.toBool(r.getAttribute("gs-static"))||T3.staticGrid,sizeToContent:ru.toBool(r.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(a.handleClass?"."+a.handleClass:a.handle?a.handle:"")||T3.draggable.handle},removableOptions:{accept:a.itemClass||T3.removableOptions.accept,decline:T3.removableOptions.decline}};r.getAttribute("gs-animate")&&(u.animate=ru.toBool(r.getAttribute("gs-animate"))),a=ru.defaults(a,u),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(a),a.rtl==="auto"&&(a.rtl=r.style.direction==="rtl"),a.rtl&&this.el.classList.add("grid-stack-rtl");const i=this.el.closest("."+T3.itemClass),p=i==null?void 0:i.gridstackNode;if(p&&(p.subGrid=this,this.parentGridNode=p,this.el.classList.add("grid-stack-nested"),p.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=a.cellHeight==="auto",this._isAutoCellHeight||a.cellHeight==="initial")this.cellHeight(void 0);else{typeof a.cellHeight=="number"&&a.cellHeightUnit&&a.cellHeightUnit!==T3.cellHeightUnit&&(a.cellHeight=a.cellHeight+a.cellHeightUnit,delete a.cellHeightUnit);const n=a.cellHeight;delete a.cellHeight,this.cellHeight(n)}a.alwaysShowResizeHandle==="mobile"&&(a.alwaysShowResizeHandle=Xw),this._setStaticClass();const c=a.engineClass||Rh.engineClass||P4;if(this.engine=new c({column:this.getColumn(),float:a.float,maxRow:a.maxRow,onChange:n=>{n.forEach(k=>{const T=k.el;T&&(k._removeDOM?(T&&T.remove(),delete k._removeDOM):this._writePosAttr(T,k))}),this._updateContainerHeight()}}),a.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(n=>this._prepareElement(n)),delete this.engine._loading,this.batchUpdate(!1)),a.children){const n=a.children;delete a.children,n.length&&this.load(n)}this.setAnimation(),a.subGridDynamic&&!Nf.pauseDrag&&(Nf.pauseDrag=!0),((v=a.draggable)==null?void 0:v.pause)!==void 0&&(Nf.pauseDrag=a.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(r=this.opts){this.el.classList.add("gs-"+r.column),typeof r.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/r.column}%`)}addWidget(r){if(!r)return;if(typeof r=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(r.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(r);let a,v=r;if(v.grid=this,v.el?a=v.el:Rh.addRemoveCB?a=Rh.addRemoveCB(this.el,r,!0,!1):a=this.createWidgetDivs(v),!a)return;if(v=a.gridstackNode,v&&a.parentElement===this.el&&this.engine.nodes.find(h=>h._id===v._id))return a;const $=this._readAttr(a);return ru.defaults(r,$),this.engine.prepareNode(r),this.el.appendChild(a),this.makeWidget(a,r),a}createWidgetDivs(r){const a=ru.createDiv(["grid-stack-item",this.opts.itemClass]),v=ru.createDiv(["grid-stack-item-content"],a);return ru.lazyLoad(r)?r.visibleObservable||(r.visibleObservable=new IntersectionObserver(([$])=>{var h,u;$.isIntersecting&&((h=r.visibleObservable)==null||h.disconnect(),delete r.visibleObservable,Rh.renderCB(v,r),(u=r.grid)==null||u.prepareDragDrop(r.el))}),window.setTimeout(()=>{var $;return($=r.visibleObservable)==null?void 0:$.observe(a)})):Rh.renderCB(v,r),a}makeSubGrid(r,a,v,$=!0){var h,u,i;let p=r.gridstackNode;if(p||(p=this.makeWidget(r).gridstackNode),(h=p.subGrid)!=null&&h.el)return p.subGrid;let c,n=this;for(;n&&!c;)c=(u=n.opts)==null?void 0:u.subGridOpts,n=(i=n.parentGridNode)==null?void 0:i.grid;a=ru.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...c||{},...a||p.subGridOpts||{}}),p.subGridOpts=a;let k;a.column==="auto"&&(k=!0,a.column=Math.max(p.w||1,(v==null?void 0:v.w)||1),delete a.columnOpts);let T=p.el.querySelector(".grid-stack-item-content"),x,d;if($&&(this._removeDD(p.el),d={...p,x:0,y:0},ru.removeInternalForSave(d),delete d.subGridOpts,p.content&&(d.content=p.content,delete p.content),Rh.addRemoveCB?x=Rh.addRemoveCB(this.el,d,!0,!1):(x=ru.createDiv(["grid-stack-item"]),x.appendChild(T),T=ru.createDiv(["grid-stack-item-content"],p.el)),this.prepareDragDrop(p.el)),v){const l=k?a.column:p.w,s=p.h+v.h,f=p.el.style;f.transition="none",this.update(p.el,{w:l,h:s}),setTimeout(()=>f.transition=null)}const o=p.subGrid=Rh.addGrid(T,a);return v!=null&&v._moving&&(o._isTemp=!0),k&&(o._autoColumn=!0),$&&o.makeWidget(x,d),v&&(v._moving?window.setTimeout(()=>ru.simulateMouseEvent(v._event,"mouseenter",o.el),0):o.makeWidget(p.el,p)),this.resizeToContentCheck(!1,p),o}removeAsSubGrid(r){var a;const v=(a=this.parentGridNode)==null?void 0:a.grid;v&&(v.batchUpdate(),v.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach($=>{$.x+=this.parentGridNode.x,$.y+=this.parentGridNode.y,v.makeWidget($.el,$)}),v.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,r&&window.setTimeout(()=>ru.simulateMouseEvent(r._event,"mouseenter",v.el),0))}save(r=!0,a=!1,v=Rh.saveCB,$){const h=this.engine.save(r,v,$);if(h.forEach(u=>{var i;if(r&&u.el&&!u.subGrid&&!v){const p=u.el.querySelector(".grid-stack-item-content");u.content=p==null?void 0:p.innerHTML,u.content||delete u.content}else if(!r&&!v&&delete u.content,(i=u.subGrid)!=null&&i.el){const p=u.w||u.subGrid.getColumn(),c=u.subGrid.save(r,a,v,p);u.subGridOpts=a?c:{children:c},delete u.subGrid}delete u.el}),a){const u=ru.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const i=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,i!==void 0?u.alwaysShowResizeHandle=i:delete u.alwaysShowResizeHandle,ru.removeInternalAndSame(u,T3),u.children=h,u}return h}load(r,a=Rh.addRemoveCB||!0){r=ru.cloneDeep(r);const v=this.getColumn();r.forEach(n=>{n.w=n.w||n.minW||1,n.h=n.h||n.minH||1}),r=ru.sort(r),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let $=0;r.forEach(n=>{$=Math.max($,(n.x||0)+n.w)}),$>this.engine.defaultColumn&&(this.engine.defaultColumn=$),$>v&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=r,this.engine.columnChanged($,v,this.responseLayout),r=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(r,$,!0));const h=Rh.addRemoveCB;typeof a=="function"&&(Rh.addRemoveCB=a);const u=[];this.batchUpdate();const i=!this.engine.nodes.length,p=i&&this.opts.animate;p&&this.setAnimation(!1),!i&&a&&[...this.engine.nodes].forEach(n=>{n.id&&(ru.find(r,n.id)||(Rh.addRemoveCB&&Rh.addRemoveCB(this.el,n,!1,!1),u.push(n),this.removeWidget(n.el,!0,!1)))}),this.engine._loading=!0;const c=[];return this.engine.nodes=this.engine.nodes.filter(n=>ru.find(r,n.id)?(c.push(n),!1):!0),r.forEach(n=>{var k;const T=ru.find(c,n.id);if(T){if(ru.shouldSizeToContent(T)&&(n.h=T.h),this.engine.nodeBoundFix(n),(n.autoPosition||n.x===void 0||n.y===void 0)&&(n.w=n.w||T.w,n.h=n.h||T.h,this.engine.findEmptyPosition(n)),this.engine.nodes.push(T),ru.samePos(T,n)&&this.engine.nodes.length>1&&(this.moveNode(T,{...n,forceCollide:!0}),ru.copyPos(n,T)),this.update(T.el,n),(k=n.subGridOpts)!=null&&k.children){const x=T.el.querySelector(".grid-stack");x&&x.gridstack&&x.gridstack.load(n.subGridOpts.children)}}else a&&this.addWidget(n)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,h?Rh.addRemoveCB=h:delete Rh.addRemoveCB,p&&this.setAnimation(!0,!0),this}batchUpdate(r=!0){return this.engine.batchUpdate(r),r||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(r=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!r||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const a=this.el.querySelector("."+this.opts.itemClass);if(a){const $=ru.toNumber(a.getAttribute("gs-h"))||1;return Math.round(a.offsetHeight/$)}const v=parseInt(this.el.getAttribute("gs-current-row"));return v?Math.round(this.el.getBoundingClientRect().height/v):this.opts.cellHeight}cellHeight(r){if(r!==void 0&&this._isAutoCellHeight!==(r==="auto")&&(this._isAutoCellHeight=r==="auto",this._updateResizeEvent()),(r==="initial"||r==="auto")&&(r=void 0),r===void 0){const v=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;r=this.cellWidth()+v}const a=ru.parseHeight(r);return this.opts.cellHeightUnit===a.unit&&this.opts.cellHeight===a.h?this:(this.opts.cellHeightUnit=a.unit,this.opts.cellHeight=a.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(r=!1){var a;return r&&(a=this.opts.columnOpts)!=null&&a.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,a;const v=this.opts.columnOpts;if(!v||!v.columnWidth&&!((r=v.breakpoints)!=null&&r.length))return!1;const $=this.getColumn();let h=$;const u=this._widthOrContainer(!0);if(v.columnWidth)h=Math.min(Math.round(u/v.columnWidth)||1,v.columnMax);else{h=v.columnMax;let i=0;for(;i<v.breakpoints.length&&u<=v.breakpoints[i].w;)h=v.breakpoints[i++].c||$}if(h!==$){const i=(a=v.breakpoints)==null?void 0:a.find(p=>p.c===h);return this.column(h,(i==null?void 0:i.layout)||v.layout),!0}return!1}compact(r="compact",a=!0){return this.engine.compact(r,a),this._triggerChangeEvent(),this}column(r,a="moveScale"){if(!r||r<1||this.opts.column===r)return this;const v=this.getColumn();return this.opts.column=r,this.engine?(this.engine.column=r,this.el.classList.remove("gs-"+v),this._updateColumnVar(),this.engine.columnChanged(v,r,a),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=a,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(r=>r.matches("."+this.opts.itemClass)&&!r.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(r=!0){var a;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),r?this.el.parentNode.removeChild(this.el):(this.removeAll(r),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(a=this._placeholder)==null||delete a.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(r){return this.opts.float!==r&&(this.opts.float=this.engine.float=r,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(r,a=!1){const v=this.el.getBoundingClientRect();let $;a?$={top:v.top+document.documentElement.scrollTop,left:v.left}:$={top:this.el.offsetTop,left:this.el.offsetLeft};const h=r.left-$.left,u=r.top-$.top,i=v.width/this.getColumn(),p=v.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(h/i),y:Math.floor(u/p)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(r,a,v,$){return this.engine.isAreaEmpty(r,a,v,$)}makeWidget(r,a){const v=Rh.getElement(r);if(!v||v.gridstackNode)return v;v.parentElement||this.el.appendChild(v),this._prepareElement(v,!0,a);const $=v.gridstackNode;this._updateContainerHeight(),$.subGridOpts&&this.makeSubGrid(v,$.subGridOpts,void 0,!1);let h;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(h=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),h&&delete this._ignoreLayoutsNodeChange,v}on(r,a){return r.indexOf(" ")!==-1?(r.split(" ").forEach(v=>this.on(v,a)),this):(r==="change"||r==="added"||r==="removed"||r==="enable"||r==="disable"?(r==="enable"||r==="disable"?this._gsEventHandler[r]=v=>a(v):this._gsEventHandler[r]=v=>{v.detail&&a(v,v.detail)},this.el.addEventListener(r,this._gsEventHandler[r])):r==="drag"||r==="dragstart"||r==="dragstop"||r==="resizestart"||r==="resize"||r==="resizestop"||r==="dropped"||r==="resizecontent"?this._gsEventHandler[r]=a:console.error("GridStack.on("+r+") event not supported"),this)}off(r){return r.indexOf(" ")!==-1?(r.split(" ").forEach(a=>this.off(a)),this):((r==="change"||r==="added"||r==="removed"||r==="enable"||r==="disable")&&this._gsEventHandler[r]&&this.el.removeEventListener(r,this._gsEventHandler[r]),delete this._gsEventHandler[r],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(r=>this.off(r)),this}removeWidget(r,a=!0,v=!0){return r?(Rh.getElements(r).forEach($=>{if($.parentElement&&$.parentElement!==this.el)return;let h=$.gridstackNode;h||(h=this.engine.nodes.find(u=>$===u.el)),h&&(a&&Rh.addRemoveCB&&Rh.addRemoveCB(this.el,h,!1,!1),delete $.gridstackNode,this._removeDD($),this.engine.removeNode(h,a,v),a&&$.parentElement&&$.remove())}),v&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(r=!0,a=!0){return this.engine.nodes.forEach(v=>{r&&Rh.addRemoveCB&&Rh.addRemoveCB(this.el,v,!1,!1),delete v.el.gridstackNode,this.opts.staticGrid||this._removeDD(v.el)}),this.engine.removeAll(r,a),a&&this._triggerRemoveEvent(),this}setAnimation(r=this.opts.animate,a){return a?setTimeout(()=>{this.opts&&this.setAnimation(r)}):r?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=r,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(r,a=!0,v=!0){return!!this.opts.staticGrid===r?this:(r?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach($=>{this.prepareDragDrop($.el),$.subGrid&&v&&$.subGrid.setStatic(r,a,v)}),a&&this._setStaticClass(),this)}updateOptions(r){var a;const v=this.opts;return r===v?this:(r.acceptWidgets!==void 0&&(v.acceptWidgets=r.acceptWidgets,this._setupAcceptWidget()),r.animate!==void 0&&this.setAnimation(r.animate),r.cellHeight&&this.cellHeight(r.cellHeight),r.class!==void 0&&r.class!==v.class&&(v.class&&this.el.classList.remove(v.class),r.class&&this.el.classList.add(r.class)),r.columnOpts?(this.opts.columnOpts=r.columnOpts,this.checkDynamicColumn()):r.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof r.column=="number"&&this.column(r.column),r.margin!==void 0&&this.margin(r.margin),r.staticGrid!==void 0&&this.setStatic(r.staticGrid),r.disableDrag!==void 0&&!r.staticGrid&&this.enableMove(!r.disableDrag),r.disableResize!==void 0&&!r.staticGrid&&this.enableResize(!r.disableResize),r.float!==void 0&&this.float(r.float),r.row!==void 0?(v.minRow=v.maxRow=v.row=r.row,this._updateContainerHeight()):(r.minRow!==void 0&&(v.minRow=r.minRow,this._updateContainerHeight()),r.maxRow!==void 0&&(v.maxRow=r.maxRow)),(a=r.children)!=null&&a.length&&this.load(r.children),this)}update(r,a){return Rh.getElements(r).forEach(v=>{var $;const h=v==null?void 0:v.gridstackNode;if(!h)return;const u={...ru.copyPos({},h),...ru.cloneDeep(a)};this.engine.nodeBoundFix(u),delete u.autoPosition;const i=["x","y","w","h"];let p;if(i.some(k=>u[k]!==void 0&&u[k]!==h[k])&&(p={},i.forEach(k=>{p[k]=u[k]!==void 0?u[k]:h[k],delete u[k]})),!p&&(u.minW||u.minH||u.maxW||u.maxH)&&(p={}),u.content!==void 0){const k=v.querySelector(".grid-stack-item-content");k&&k.textContent!==u.content&&(h.content=u.content,Rh.renderCB(k,u),($=h.subGrid)!=null&&$.el&&(k.appendChild(h.subGrid.el),h.subGrid._updateContainerHeight())),delete u.content}let c=!1,n=!1;for(const k in u)k[0]!=="_"&&h[k]!==u[k]&&(h[k]=u[k],c=!0,n=n||!this.opts.staticGrid&&(k==="noResize"||k==="noMove"||k==="locked"));if(ru.sanitizeMinMax(h),p){const k=p.w!==void 0&&p.w!==h.w;this.moveNode(h,p),k&&h.subGrid?h.subGrid.onResize(this.hasAnimationCSS()?h.w:void 0):this.resizeToContentCheck(k,h),delete h._orig}(p||c)&&this._writeAttr(v,h),n&&this.prepareDragDrop(h.el),Rh.updateCB&&Rh.updateCB(h)}),this}moveNode(r,a){const v=r._updating;v||this.engine.cleanNodes().beginUpdate(r),this.engine.moveNode(r,a),this._updateContainerHeight(),v||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(r){var a,v;if(!r||(r.classList.remove("size-to-content-max"),!r.clientHeight))return;const $=r.gridstackNode;if(!$)return;const h=$.grid;if(!h||r.parentElement!==h.el)return;const u=h.getCellHeight(!0);if(!u)return;let i=$.h?$.h*u:r.clientHeight,p;if($.resizeToContentParent&&(p=r.querySelector($.resizeToContentParent)),p||(p=r.querySelector(Rh.resizeToContentParent)),!p)return;const c=r.clientHeight-p.clientHeight,n=$.h?$.h*u-c:p.clientHeight;let k;if($.subGrid){k=$.subGrid.getRow()*$.subGrid.getCellHeight(!0);const d=$.subGrid.el.getBoundingClientRect(),o=r.getBoundingClientRect();k+=d.top-o.top}else{if((v=(a=$.subGridOpts)==null?void 0:a.children)!=null&&v.length)return;{const d=p.firstElementChild;if(!d){console.error(`Error: GridStack.resizeToContent() widget id:${$.id} '${Rh.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}k=d.getBoundingClientRect().height||n}}if(n===k)return;i+=k-n;let T=Math.ceil(i/u);const x=Number.isInteger($.sizeToContent)?$.sizeToContent:0;x&&T>x&&(T=x,r.classList.add("size-to-content-max")),$.minH&&T<$.minH?T=$.minH:$.maxH&&T>$.maxH&&(T=$.maxH),T!==$.h&&(h._ignoreLayoutsNodeChange=!0,h.moveNode($,{h:T}),delete h._ignoreLayoutsNodeChange)}resizeToContentCBCheck(r){Rh.resizeToContentCB?Rh.resizeToContentCB(r):this.resizeToContent(r)}rotate(r,a){return Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;if(!ru.canBeRotated($))return;const h={w:$.h,h:$.w,minH:$.minW,minW:$.minH,maxH:$.maxW,maxW:$.maxH};if(a){const i=a.left>0?Math.floor(a.left/this.cellWidth()):0,p=a.top>0?Math.floor(a.top/this.opts.cellHeight):0;h.x=$.x+i-($.h-(p+1)),h.y=$.y+p-i}Object.keys(h).forEach(i=>{h[i]===void 0&&delete h[i]});const u=$._orig;this.update(v,h),$._orig=u}),this}margin(r){if(!(typeof r=="string"&&r.split(" ").length>1)){const a=ru.parseHeight(r);if(this.opts.marginUnit===a.unit&&this.opts.margin===a.h)return}return this.opts.margin=r,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(r){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const a=arguments;let v=0,$={x:a[v++],y:a[v++],w:a[v++],h:a[v++],autoPosition:a[v++]};return this.willItFit($)}return this.engine.willItFit(r)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const r=this.engine.getDirtyNodes(!0);return r&&r.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(r),this._triggerEvent("change",r)),this.engine.saveInitial(),this}_triggerAddEvent(){var r;if(this.engine.batchMode)return this;if((r=this.engine.addedNodes)!=null&&r.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(v=>{delete v._dirty});const a=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",a)}return this}_triggerRemoveEvent(){var r;if(this.engine.batchMode)return this;if((r=this.engine.removedNodes)!=null&&r.length){const a=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",a)}return this}_triggerEvent(r,a){const v=a?new CustomEvent(r,{bubbles:!1,detail:a}):new Event(r);let $=this;for(;$.parentGridNode;)$=$.parentGridNode.grid;return $.el.dispatchEvent(v),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const r=this.parentGridNode;let a=this.getRow()+this._extraDragRow;const v=this.opts.cellHeight,$=this.opts.cellHeightUnit;if(!v)return this;if(!r&&!this.opts.minRow){const h=ru.parseHeight(getComputedStyle(this.el).minHeight);if(h.h>0&&h.unit===$){const u=Math.floor(h.h/v);a<u&&(a=u)}}return this.el.setAttribute("gs-current-row",String(a)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),a&&(this.el.style[r?"minHeight":"height"]=a*v+$),r&&ru.shouldSizeToContent(r)&&r.grid.resizeToContentCBCheck(r.el),this}_prepareElement(r,a=!1,v){v=v||this._readAttr(r),r.gridstackNode=v,v.el=r,v.grid=this,v=this.engine.addNode(v,a),this._writeAttr(r,v),r.classList.add(T3.itemClass,this.opts.itemClass);const $=ru.shouldSizeToContent(v);return $?r.classList.add("size-to-content"):r.classList.remove("size-to-content"),$&&this.resizeToContentCheck(!1,v),ru.lazyLoad(v)||this.prepareDragDrop(v.el),this}_writePosAttr(r,a){return(!a._moving&&!a._resizing||this._placeholder===r)&&(r.style.top=a.y?a.y===1?"var(--gs-cell-height)":`calc(${a.y} * var(--gs-cell-height))`:null,r.style.left=a.x?a.x===1?"var(--gs-column-width)":`calc(${a.x} * var(--gs-column-width))`:null,r.style.width=a.w>1?`calc(${a.w} * var(--gs-column-width))`:null,r.style.height=a.h>1?`calc(${a.h} * var(--gs-cell-height))`:null),a.x>0?r.setAttribute("gs-x",String(a.x)):r.removeAttribute("gs-x"),a.y>0?r.setAttribute("gs-y",String(a.y)):r.removeAttribute("gs-y"),a.w>1?r.setAttribute("gs-w",String(a.w)):r.removeAttribute("gs-w"),a.h>1?r.setAttribute("gs-h",String(a.h)):r.removeAttribute("gs-h"),this}_writeAttr(r,a){if(!a)return this;this._writePosAttr(r,a);const v={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const $ in v)a[$]?r.setAttribute(v[$],String(a[$])):r.removeAttribute(v[$]);return this}_readAttr(r,a=!0){const v={};v.x=ru.toNumber(r.getAttribute("gs-x")),v.y=ru.toNumber(r.getAttribute("gs-y")),v.w=ru.toNumber(r.getAttribute("gs-w")),v.h=ru.toNumber(r.getAttribute("gs-h")),v.autoPosition=ru.toBool(r.getAttribute("gs-auto-position")),v.noResize=ru.toBool(r.getAttribute("gs-no-resize")),v.noMove=ru.toBool(r.getAttribute("gs-no-move")),v.locked=ru.toBool(r.getAttribute("gs-locked"));const $=r.getAttribute("gs-size-to-content");$&&($==="true"||$==="false"?v.sizeToContent=ru.toBool($):v.sizeToContent=parseInt($,10)),v.id=r.getAttribute("gs-id"),v.maxW=ru.toNumber(r.getAttribute("gs-max-w")),v.minW=ru.toNumber(r.getAttribute("gs-min-w")),v.maxH=ru.toNumber(r.getAttribute("gs-max-h")),v.minH=ru.toNumber(r.getAttribute("gs-min-h")),a&&(v.w===1&&r.removeAttribute("gs-w"),v.h===1&&r.removeAttribute("gs-h"),v.maxW&&r.removeAttribute("gs-max-w"),v.minW&&r.removeAttribute("gs-min-w"),v.maxH&&r.removeAttribute("gs-max-h"),v.minH&&r.removeAttribute("gs-min-h"));for(const h in v){if(!v.hasOwnProperty(h))return;!v[h]&&v[h]!==0&&h!=="sizeToContent"&&delete v[h]}return v}_setStaticClass(){const r=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...r),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...r),this.el.removeAttribute("gs-static")),this}onResize(r=(a=>(a=this.el)==null?void 0:a.clientWidth)()){if(!r||this.prevWidth===r)return;this.prevWidth=r,this.batchUpdate();let a=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),a=!0):a=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(v=>{v.subGrid&&v.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(a),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(r=!1,a=void 0){if(this.engine){if(r&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,a),this.animationDelay);if(a)ru.shouldSizeToContent(a)&&this.resizeToContentCBCheck(a.el);else if(this.engine.nodes.some(v=>ru.shouldSizeToContent(v))){const v=[...this.engine.nodes];this.batchUpdate(),v.forEach($=>{ru.shouldSizeToContent($)&&this.resizeToContentCBCheck($.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,a?[a]:this.engine.nodes)}}_updateResizeEvent(r=!1){const a=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(v=>v.sizeToContent));return!r&&a&&!this.resizeObserver?(this._sizeThrottle=ru.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(r||!a)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(r=".grid-stack-item"){return ru.getElement(r)}static getElements(r=".grid-stack-item"){return ru.getElements(r)}static getGridElement(r){return Rh.getElement(r)}static getGridElements(r){return ru.getElements(r)}_initMargin(){let r,a=0,v=[];typeof this.opts.margin=="string"&&(v=this.opts.margin.split(" ")),v.length===2?(this.opts.marginTop=this.opts.marginBottom=v[0],this.opts.marginLeft=this.opts.marginRight=v[1]):v.length===4?(this.opts.marginTop=v[0],this.opts.marginRight=v[1],this.opts.marginBottom=v[2],this.opts.marginLeft=v[3]):(r=ru.parseHeight(this.opts.margin),this.opts.marginUnit=r.unit,a=this.opts.margin=r.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(h=>{this.opts[h]===void 0?this.opts[h]=a:(r=ru.parseHeight(this.opts[h]),this.opts[h]=r.h,delete this.opts.margin)}),this.opts.marginUnit=r.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const $=this.el.style;return $.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return u_}static setupDragIn(r,a,v,$=document){(a==null?void 0:a.pause)!==void 0&&(Nf.pauseDrag=a.pause),a={appendTo:"body",helper:"clone",...a||{}},(typeof r=="string"?ru.getElements(r,$):r).forEach((h,u)=>{u_.isDraggable(h)||u_.dragIn(h,a),v!=null&&v[u]&&(h.gridstackNode=v[u])})}movable(r,a){return this.opts.staticGrid?this:(Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;$&&(a?delete $.noMove:$.noMove=!0,this.prepareDragDrop($.el))}),this)}resizable(r,a){return this.opts.staticGrid?this:(Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;$&&(a?delete $.noResize:$.noResize=!0,this.prepareDragDrop($.el))}),this)}disable(r=!0){if(!this.opts.staticGrid)return this.enableMove(!1,r),this.enableResize(!1,r),this._triggerEvent("disable"),this}enable(r=!0){if(!this.opts.staticGrid)return this.enableMove(!0,r),this.enableResize(!0,r),this._triggerEvent("enable"),this}enableMove(r,a=!0){return this.opts.staticGrid?this:(r?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(v=>{this.prepareDragDrop(v.el),v.subGrid&&a&&v.subGrid.enableMove(r,a)}),this)}enableResize(r,a=!0){return this.opts.staticGrid?this:(r?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(v=>{this.prepareDragDrop(v.el),v.subGrid&&a&&v.subGrid.enableResize(r,a)}),this)}cancelDrag(){var r;const a=(r=this._placeholder)==null?void 0:r.gridstackNode;a&&(a._isExternal?(a._isAboutToRemove=!0,this.engine.removeNode(a)):a._isAboutToRemove&&Rh._itemRemoving(a.el,!1),this.engine.restoreInitial())}_removeDD(r){return u_.draggable(r,"destroy").resizable(r,"destroy"),r.gridstackNode&&delete r.gridstackNode._initDD,delete r.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return u_.droppable(this.el,"destroy"),this;let r,a;const v=($,h,u)=>{var i;u=u||h;const p=u.gridstackNode;if(!p)return;if(!((i=p.grid)!=null&&i.el)){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const x=u.getBoundingClientRect();u.style.left=x.x+(this.dragTransform.xScale-1)*($.clientX-x.x)/this.dragTransform.xScale+"px",u.style.top=x.y+(this.dragTransform.yScale-1)*($.clientY-x.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:c,left:n}=u.getBoundingClientRect();const k=this.el.getBoundingClientRect();n-=k.left,c-=k.top;const T={position:{top:c*this.dragTransform.xScale,left:n*this.dragTransform.yScale}};if(p._temporaryRemoved){if(p.x=Math.max(0,Math.round(n/a)),p.y=Math.max(0,Math.round(c/r)),delete p.autoPosition,this.engine.nodeBoundFix(p),!this.engine.willItFit(p)){if(p.autoPosition=!0,!this.engine.willItFit(p)){u_.off(h,"drag");return}p._willFitPos&&(ru.copyPos(p,p._willFitPos),delete p._willFitPos)}this._onStartMoving(u,$,T,p,a,r)}else this._dragOrResize(u,$,T,p,a,r)};return u_.droppable(this.el,{accept:$=>{const h=$.gridstackNode||this._readAttr($,!1);if((h==null?void 0:h.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets($);else{const i=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=$.matches(i)}if(u&&h&&this.opts.maxRow){const i={w:h.w,h:h.h,minW:h.minW,minH:h.minH};u=this.engine.willItFit(i)}return u}}).on(this.el,"dropover",($,h,u)=>{let i=(u==null?void 0:u.gridstackNode)||h.gridstackNode;if((i==null?void 0:i.grid)===this&&!i._temporaryRemoved)return!1;if(i!=null&&i._sidebarOrig&&(i.w=i._sidebarOrig.w,i.h=i._sidebarOrig.h),i!=null&&i.grid&&i.grid!==this&&!i._temporaryRemoved&&i.grid._leave(h,u),u=u||h,a=this.cellWidth(),r=this.getCellHeight(!0),!i){const n=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(n){try{i=JSON.parse(n)}catch{console.error("Gridstack dropover: Bad JSON format: ",n)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}i||(i=this._readAttr(u)),i._sidebarOrig={w:i.w,h:i.h}}i.grid||(i.el||(i={...i}),i._isExternal=!0,u.gridstackNode=i);const p=i.w||Math.round(u.offsetWidth/a)||1,c=i.h||Math.round(u.offsetHeight/r)||1;return i.grid&&i.grid!==this?(h._gridstackNodeOrig||(h._gridstackNodeOrig=i),h.gridstackNode=i={...i,w:p,h:c,grid:this},delete i.x,delete i.y,this.engine.cleanupNode(i).nodeBoundFix(i),i._initDD=i._isExternal=i._temporaryRemoved=!0):(i.w=p,i.h=c,i._temporaryRemoved=!0),Rh._itemRemoving(i.el,!1),u_.on(h,"drag",v),v($,h,u),!1}).on(this.el,"dropout",($,h,u)=>{const i=(u==null?void 0:u.gridstackNode)||h.gridstackNode;return i&&(!i.grid||i.grid===this)&&(this._leave(h,u),this._isTemp&&this.removeAsSubGrid(i)),!1}).on(this.el,"drop",($,h,u)=>{var i,p,c;const n=(u==null?void 0:u.gridstackNode)||h.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const k=!!this.placeholder.parentElement,T=h!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,k&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const x=h._gridstackNodeOrig;if(delete h._gridstackNodeOrig,k&&x!=null&&x.grid&&x.grid!==this){const o=x.grid;o.engine.removeNodeFromLayoutCache(x),o.engine.removedNodes.push(x),o._triggerRemoveEvent()._triggerChangeEvent(),o.parentGridNode&&!o.engine.nodes.length&&o.opts.subGridDynamic&&o.removeAsSubGrid()}if(!n||(k&&(this.engine.cleanupNode(n),n.grid=this),(i=n.grid)==null||delete i._isTemp,u_.off(h,"drag"),u!==h?(u.remove(),h=u):h.remove(),this._removeDD(h),!k))return!1;const d=(c=(p=n.subGrid)==null?void 0:p.el)==null?void 0:c.gridstack;return ru.copyPos(n,this._readAttr(this.placeholder)),ru.removePositioningStyles(h),T&&(n.content||n.subGridOpts||Rh.addRemoveCB)?(delete n.el,h=this.addWidget(n)):(this._prepareElement(h,!0,n),this.el.appendChild(h),this.resizeToContentCheck(!1,n),d&&(d.parentGridNode=n),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...$,type:"dropped"},x&&x.grid?x:void 0,n),!1}),this}static _itemRemoving(r,a){if(!r)return;const v=r?r.gridstackNode:void 0;!(v!=null&&v.grid)||r.classList.contains(v.grid.opts.removableOptions.decline)||(a?v._isAboutToRemove=!0:delete v._isAboutToRemove,a?r.classList.add("grid-stack-item-removing"):r.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const r=document.querySelector(this.opts.removable);return r?(!this.opts.staticGrid&&!u_.isDroppable(r)&&u_.droppable(r,this.opts.removableOptions).on(r,"dropover",(a,v)=>Rh._itemRemoving(v,!0)).on(r,"dropout",(a,v)=>Rh._itemRemoving(v,!1)),this):this}prepareDragDrop(r,a=!1){const v=r==null?void 0:r.gridstackNode;if(!v)return;const $=v.noMove||this.opts.disableDrag,h=v.noResize||this.opts.disableResize,u=this.opts.staticGrid||$&&h;if((a||u)&&(v._initDD&&(this._removeDD(r),delete v._initDD),u&&r.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!a))return this;if(!v._initDD){let i,p;const c=(T,x)=>{this.triggerEvent(T,T.target),i=this.cellWidth(),p=this.getCellHeight(!0),this._onStartMoving(r,T,x,v,i,p)},n=(T,x)=>{this._dragOrResize(r,T,x,v,i,p)},k=T=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete v._moving,delete v._resizing,delete v._event,delete v._lastTried;const x=v.w!==v._orig.w,d=T.target;if(!(!d.gridstackNode||d.gridstackNode.grid!==this)){if(v.el=d,v._isAboutToRemove){const o=r.gridstackNode.grid;o._gsEventHandler[T.type]&&o._gsEventHandler[T.type](T,d),o.engine.nodes.push(v),o.removeWidget(r,!0,!0)}else ru.removePositioningStyles(d),v._temporaryRemoved?(this._writePosAttr(d,v),this.engine.addNode(v)):this._writePosAttr(d,v),this.triggerEvent(T,d);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),T.type==="resizestop"&&(Number.isInteger(v.sizeToContent)&&(v.sizeToContent=v.h),this.resizeToContentCheck(x,v))}};u_.draggable(r,{start:c,stop:k,drag:n}).resizable(r,{start:c,stop:k,resize:n}),v._initDD=!0}return u_.draggable(r,$?"disable":"enable").resizable(r,h?"disable":"enable"),this}_onStartMoving(r,a,v,$,h,u){var i;if(this.engine.cleanNodes().beginUpdate($),this._writePosAttr(this.placeholder,$),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=$,(i=$.grid)!=null&&i.el)this.dragTransform=ru.getValuesFromTransformedElement(r);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const p=this.placeholder.closest(".grid-stack");this.dragTransform=ru.getValuesFromTransformedElement(p)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if($.el=this.placeholder,$._lastUiPosition=v.position,$._prevYPix=v.position.top,$._moving=a.type==="dragstart",$._resizing=a.type==="resizestart",delete $._lastTried,a.type==="dropover"&&$._temporaryRemoved&&(this.engine.addNode($),$._moving=!0),this.engine.cacheRects(h,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),a.type==="resizestart"){const p=this.getColumn()-$.x,c=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-$.y;u_.resizable(r,"option","minWidth",h*Math.min($.minW||1,p)).resizable(r,"option","minHeight",u*Math.min($.minH||1,c)).resizable(r,"option","maxWidth",h*Math.min($.maxW||Number.MAX_SAFE_INTEGER,p)).resizable(r,"option","maxWidthMoveLeft",h*Math.min($.maxW||Number.MAX_SAFE_INTEGER,$.x+$.w)).resizable(r,"option","maxHeight",u*Math.min($.maxH||Number.MAX_SAFE_INTEGER,c)).resizable(r,"option","maxHeightMoveUp",u*Math.min($.maxH||Number.MAX_SAFE_INTEGER,$.y+$.h))}}_dragOrResize(r,a,v,$,h,u){const i={...$._orig};let p,c=this.opts.marginLeft,n=this.opts.marginRight,k=this.opts.marginTop,T=this.opts.marginBottom;const x=Math.round(u*.1),d=Math.round(h*.1);if(c=Math.min(c,d),n=Math.min(n,d),k=Math.min(k,x),T=Math.min(T,x),a.type==="drag"){if($._temporaryRemoved)return;const l=v.position.top-$._prevYPix;$._prevYPix=v.position.top,this.opts.draggable.scroll!==!1&&ru.updateScrollPosition(r,v.position,l);const s=v.position.left+(v.position.left>$._lastUiPosition.left?-n:c),f=v.position.top+(v.position.top>$._lastUiPosition.top?-T:k);i.x=Math.round(s/h),i.y=Math.round(f/u);const g=this._extraDragRow;if(this.engine.collide($,i)){const S=this.getRow();let L=Math.max(0,i.y+$.h-S);this.opts.maxRow&&S+L>this.opts.maxRow&&(L=Math.max(0,this.opts.maxRow-S)),this._extraDragRow=L}else this._extraDragRow=0;if(this._extraDragRow!==g&&this._updateContainerHeight(),$.x===i.x&&$.y===i.y)return}else if(a.type==="resize"){if(i.x<0||(ru.updateScrollResize(a,r,u),i.w=Math.round((v.size.width-c)/h),i.h=Math.round((v.size.height-k)/u),$.w===i.w&&$.h===i.h)||$._lastTried&&$._lastTried.w===i.w&&$._lastTried.h===i.h)return;const l=v.position.left+c,s=v.position.top+k;i.x=Math.round(l/h),i.y=Math.round(s/u),p=!0}$._event=a,$._lastTried=i;const o={x:v.position.left+c,y:v.position.top+k,w:(v.size?v.size.width:$.w*h)-c-n,h:(v.size?v.size.height:$.h*u)-k-T};if(this.engine.moveNodeCheck($,{...i,cellWidth:h,cellHeight:u,rect:o,resizing:p})){$._lastUiPosition=v.position,this.engine.cacheRects(h,u,k,n,T,c),delete $._skipDown,p&&$.subGrid&&$.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const l=a.target;$._sidebarOrig||this._writePosAttr(l,$),this.triggerEvent(a,l)}}triggerEvent(r,a){let v=this;for(;v.parentGridNode;)v=v.parentGridNode.grid;v._gsEventHandler[r.type]&&v._gsEventHandler[r.type](r,a)}_leave(r,a){a=a||r;const v=a.gridstackNode;if(!v||(a.style.transform=a.style.transformOrigin=null,u_.off(r,"drag"),v._temporaryRemoved))return;v._temporaryRemoved=!0,this.engine.removeNode(v),v.el=v._isExternal&&a?a:r;const $=v._sidebarOrig;v._isExternal&&this.engine.cleanupNode(v),v._sidebarOrig=$,this.opts.removable===!0&&Rh._itemRemoving(r,!0),r._gridstackNodeOrig?(r.gridstackNode=r._gridstackNodeOrig,delete r._gridstackNodeOrig):v._isExternal&&this.engine.restoreInitial()}commit(){return tHe(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}Rh.renderCB=(e,r)=>{e&&r!=null&&r.content&&(e.textContent=r.content)},Rh.resizeToContentParent=".grid-stack-item-content",Rh.Utils=ru,Rh.Engine=P4,Rh.GDRev="12.3.2";const iHe=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1},{id:24,name:"Oportunidades de gol",isSelected:!1},{id:25,name:"Balones recuperados en cancha rival",isSelected:!1}],A4=e=>iHe.find(r=>r.id===e),R4=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados",titleShort:"Pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados",titleShort:"Pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados",titleShort:"Balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos",titleShort:"Balones perdidos"}]])}],[1,{general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracción"}]]);class Qk{constructor(r,a=[],v,$=null,h=!1,u=!1,i=null,p=null,c=null){Lw(this,"id",""),Lw(this,"childViews",[]),Lw(this,"viewId",0),Lw(this,"dynamicFilters",null),Lw(this,"componentSpecificFilters",new Map),Lw(this,"isPostMatch",!1),Lw(this,"isTemplateMode",!1),Lw(this,"filtresJSON",null),Lw(this,"token",null),Lw(this,"_isUpdating",!1),Lw(this,"filters",null),this.id=r,this.viewId=v,this.childViews=a,this.dynamicFilters=$,this.isPostMatch=h,this.isTemplateMode=u,this.filtresJSON=i,this.token=p,this.filters=c,this.componentSpecificFilters=new Map}resetClass(){this.childViews.forEach(r=>{r.view.filterAndViewsContainer=new Qk(this.id,[r],this.viewId,this.dynamicFilters,this.isPostMatch,this.isTemplateMode,this.filtresJSON,this.token,this.filters)})}hasEventTypeId(r,a){return!r||!Array.isArray(r)?!1:r.some(v=>v&&v.event_type_id===a)}hasCategoryId(r,a){return!r||!Array.isArray(r)?!1:r.some(v=>v&&v.category_id===a)}getId(){return this.id}setViewId(r){this.viewId=r}setFiltersJSON(r){this.filtresJSON=r}setDynamicFilters(r,a=null){a?this.componentSpecificFilters.set(a,[...r]):this.dynamicFilters=r}setFilters(r){this.filters=r}getComponentDynamicFilters(r){return r&&this.componentSpecificFilters.has(r)?this.componentSpecificFilters.get(r):this.dynamicFilters}getAllComponentFilters(){return this.componentSpecificFilters}debugComponentFilters(){}static debugAllComponentFilters(){}clearAllComponentFilters(){this.componentSpecificFilters.clear()}getDynamicFilters(){return this.dynamicFilters}getHomeTeamViews(){return this.childViews.filter(r=>r.view.isHomeTeam)}getAwayTeamViews(){return this.childViews.filter(r=>!r.view.isHomeTeam)}addSpecificPlays(r){if(r.view.componentProps&&this.filters){const a=this.filters.selectedTeam.value;if(console.log("teamSelected: ",a),a===3){console.log("this.getHomeTeamViews(): ",this.getHomeTeamViews()),console.log("this.getAwayTeamViews(): ",this.getAwayTeamViews());const v=this.getHomeTeamViews().length,$=this.getAwayTeamViews().length;v===0&&$>0&&this.getAwayTeamViews().forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=!0,h.view.isHomeTeam=!0,h.view.filterMultiple&&(h.view.filterMultiple.isHomeTeam=!0)}),v<this.filters.howManyCorners?this.childViews.length===0?(r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.componentProps.howManyCorners=this.filters.howManyCorners,r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}):this.childViews.reduce((h,u,i,p)=>{let c={isAgainstMode:u.view.isAgainstMode,advancedFilters:u.view.componentProps.advancedFilters,isHomeTeamForAnalysis:u.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:u.view.isHomeTeam};return h&&(h.isHomeTeam&&!u.view.isHomeTeam?(u.view.componentProps.isAgainstMode=this.filters.isAgainstMode,u.view.componentProps.advancedFilters=this.filters.advancedFilters,u.view.componentProps.isHomeTeamForAnalysis=!0,u.view.isHomeTeam=!0,u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}):!h.isHomeTeam&&!u.view.isHomeTeam&&(u.view.componentProps.isAgainstMode=h.isAgainstMode,u.view.componentProps.advancedFilters=h.advancedFilters,u.view.componentProps.isHomeTeamForAnalysis=h.isHomeTeamForAnalysis,u.view.isHomeTeam=h.isHomeTeam,u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam,selectedCategory:u.view.componentProps.categories[0],advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}),i===p.length-1&&(r.view.componentProps.advancedFilters=c.advancedFilters,r.view.componentProps.isAgainstMode=c.isAgainstMode,r.view.componentProps.isHomeTeamForAnalysis=c.isHomeTeamForAnalysis,r.view.isHomeTeam=c.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode})),c},null):(r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode})}else{const v=a===1;r.view.componentProps.isHomeTeamForAnalysis=v,r.view.isHomeTeam=v,r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}}}console.log("++++++++++++++++++++++++++++++++++++++++++++++++++++++"),console.log("view: ",r)}addLastTouch(r){if(r.view.componentProps&&this.filters){let a=null;const v=this.filters.selectedCategories.map(h=>h.value),$=this.filters.selectedTeam.value;if($===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(p=>{p.view.componentProps.isHomeTeamForAnalysis=!0,p.view.isHomeTeam=!0,p.view.filterMultiple&&(p.view.filterMultiple.isHomeTeam=!0)});const h=this.getHomeTeamViews(),u=this.getAwayTeamViews();let i=!0;for(let p=0;p<v.length;p++){a=v[p];const c=h.find(k=>k.view.componentProps.categories[0].name===a.name),n=u.find(k=>k.view.componentProps.categories[0].name===a.name);if(!c||!n){i=!c;break}}i?this.childViews.length===0?(r.view.componentProps.categories=[a],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=a.name,r.view.titleShort=a.name,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}):this.childViews.reduce((p,c,n,k)=>{let T={categories:c.view.componentProps.categories,analysisType:c.view.componentProps.analysisType,isAssistZoneVisible:this.filters.isAssistZoneVisible,howManyGames:this.filters.howManyGamesSelected.value,title:c.view.title,isHomeTeamForAnalysis:c.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:c.view.isHomeTeam};return p&&(p.isHomeTeam&&!c.view.isHomeTeam?(c.view.componentProps.categories=[a],c.view.componentProps.analysisType=this.filters.selectedGamePhase.name,c.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,c.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,c.view.componentProps.isHomeTeamForAnalysis=!0,c.view.title=a.name,r.view.titleShort=a.name,c.view.isHomeTeam=!0,c.view.filterMultiple={isHomeTeam:c.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}):!p.isHomeTeam&&!c.view.isHomeTeam&&(c.view.componentProps.categories=p.categories,c.view.componentProps.analysisType=p.analysisType,c.view.componentProps.isHomeTeamForAnalysis=p.isHomeTeamForAnalysis,c.view.componentProps.isAssistZoneVisible=p.isAssistZoneVisible,c.view.componentProps.howManyGames=p.howManyGames,c.view.title=p.title,c.view.titleShort=p.titleShort,c.view.isHomeTeam=p.isHomeTeam,c.view.filterMultiple={isHomeTeam:c.view.isHomeTeam,selectedCategory:c.view.componentProps.categories[0],selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}),n===k.length-1&&(r.view.componentProps.categories=T.categories,r.view.componentProps.analysisType=T.analysisType,r.view.componentProps.isHomeTeamForAnalysis=T.isHomeTeamForAnalysis,r.view.componentProps.isAssistZoneVisible=T.isAssistZoneVisible,r.view.componentProps.howManyGames=T.howManyGames,r.view.title=T.title,r.view.titleShort=T.titleShort,r.view.isHomeTeam=T.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:r.view.componentProps.categories[0],selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible})),T},null):(r.view.componentProps.categories=[a],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=a.name,r.view.titleShort=a.name,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible})}else{const h=$===1,u=h?this.getHomeTeamViews():this.getAwayTeamViews();r.view.componentProps.isHomeTeamForAnalysis=h,r.view.isHomeTeam=h;for(let i=0;i<v.length;i++){const p=v[i];if(!u.find(c=>c.view.componentProps.categories[0].name===p.name)){r.view.componentProps.categories=[p],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=p.name,r.view.titleShort=p.name,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:p,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible};break}}}}}addView(r,a=!1){var v,$,h,u,i,p,c,n,k,T;if(r.view.filterAndViewsContainer=this,Sd.emit("component-added-to-container",this),this.viewId===5&&r.view.componentProps&&!a&&(r.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,r.view.filterMultiple={isHomeTeam:r.view.componentProps.preMatchType===1}),this.viewId===15&&r.view.componentProps&&!a&&(r.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,r.view.filterMultiple={isHomeTeam:r.view.componentProps.preMatchType===1}),this.viewId===17&&r.view.componentProps&&!a){this.dynamicFilters[0]!==void 0&&(r.view.componentProps.infavoragainstteam=!this.dynamicFilters[0]),this.dynamicFilters[1]!==void 0&&(r.view.componentProps.lateralidad=this.dynamicFilters[1]===32?"right":"left");const x=this.dynamicFilters[2]!==void 0?this.dynamicFilters[2]:this.dynamicFilters[0]||1,d=r.view.componentProps.game;if(x===3){const o=this.childViews.filter(l=>{var s;return((s=l.view.filterMultiple)==null?void 0:s.isHomeTeam)===!0}).length===0;d&&(r.view.componentProps.teamselected=o?d.home_team:d.away_team),r.view.filterMultiple={isHomeTeam:o}}else d&&(r.view.componentProps.teamselected=x===2?d.away_team:d.home_team),r.view.filterMultiple={isHomeTeam:x===1}}if(this.viewId===10&&r.view.componentProps&&!a&&(r.view.componentProps.isHomeTeamForAnalysis=this.dynamicFilters[0]!==3?this.dynamicFilters[0]===1:1,r.isHomeTeam=r.view.componentProps.isHomeTeamForAnalysis,r.view.filterMultiple={isHomeTeam:r.view.componentProps.isHomeTeamForAnalysis},r.view.filtersJSON=this.filtresJSON),this.viewId===7&&r.view.componentProps&&!a){const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d[0]===1?"offensive":"defensive",l=d[1]===1;r.view.componentProps.analysisType=o,r.view.componentProps.isHomeTeamForAnalysis=l,r.isHomeTeam=l,r.view.filterMultiple={isHomeTeam:l},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===1&&r.view.componentProps&&!a){const x=this.dynamicFilters[0]||[];if(x&&x.length>0){let d;if(Array.isArray(x)){const l=this.childViews.map(f=>{var g;return(g=f.view.componentProps)==null?void 0:g.type}).filter(f=>f!==void 0),s=x.filter(f=>!l.includes(f));s.length>0?d=s[0]:d=x[0]}else d=x;const o=R4.get(this.viewId);r.view.componentProps.type=d,r.view.componentProps.default=!1,r.view.title=`Comparativa ${o[d]}`,r.view.filterMultiple={category:d}}}if(this.viewId===9&&r.view.componentProps&&!a){const x=this.dynamicFilters[0].map(s=>s.join("-"));let d="";const o=this.dynamicFilters[1],l=R4.get(this.viewId);if(o===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(L=>{L.view.componentProps.isHomeTeamForAnalysis=!0,L.view.isHomeTeam=!0,L.view.filterMultiple&&(L.view.filterMultiple.isHomeTeam=!0)});let s=null;const f=this.getHomeTeamViews(),g=this.getAwayTeamViews();let S=!0;for(let L=0;L<x.length;L++){d=x[L],s=l.analysisTypes.get(x[L]);const M=f.find(z=>z.view.componentProps.analysisType===s.analysisType),A=g.find(z=>z.view.componentProps.analysisType===s.analysisType);if(!M||!A){S=!M;break}}S?this.childViews.length===0?(r.view.componentProps.analysisType=s.analysisType,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.title=s.title,r.view.titleShort=s.titleShort,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(L=>parseInt(L))}):this.childViews.reduce((L,M,A,z)=>{let I={analysisType:M.view.componentProps.analysisType,title:M.view.title,isHomeTeamForAnalysis:M.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:M.view.isHomeTeam};return L&&(L.isHomeTeam&&!M.view.isHomeTeam?(M.view.componentProps.analysisType=s.analysisType,M.view.componentProps.isHomeTeamForAnalysis=!0,M.view.title=s.title,r.view.titleShort=s.titleShort,M.view.isHomeTeam=!0,M.view.filterMultiple={isHomeTeam:M.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))}):!L.isHomeTeam&&!M.view.isHomeTeam&&(M.view.componentProps.analysisType=L.analysisType,M.view.componentProps.isHomeTeamForAnalysis=L.isHomeTeamForAnalysis,M.view.title=L.title,M.view.titleShort=L.titleShort,M.view.isHomeTeam=L.isHomeTeam,M.view.filterMultiple={isHomeTeam:M.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))}),A===z.length-1&&(r.view.componentProps.analysisType=I.analysisType,r.view.componentProps.isHomeTeamForAnalysis=I.isHomeTeamForAnalysis,r.view.title=I.title,r.view.titleShort=I.titleShort,r.view.isHomeTeam=I.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))})),I},null):(r.view.componentProps.analysisType=s.analysisType,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.title=s.title,r.view.titleShort=s.titleShort,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(L=>parseInt(L))})}else{const s=o===1,f=s?this.getHomeTeamViews():this.getAwayTeamViews();r.view.componentProps.isHomeTeamForAnalysis=s,r.view.isHomeTeam=s;for(let g=0;g<x.length;g++){const S=l.analysisTypes.get(x[g]);if(!f.find(L=>L.view.componentProps.analysisType===S.analysisType)){r.view.componentProps.analysisType=S.analysisType,r.view.title=S.title,r.view.titleShort=S.titleShort,r.view.filterMultiple={categoryIds:x[g].split("-").map(L=>parseInt(L)),isHomeTeam:r.view.isHomeTeam};break}}}}if(this.viewId===2&&!a&&r.view.componentProps){const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id),r.view.componentProps.game&&(r.view.componentProps.gameid=r.view.componentProps.game.id,r.view.componentProps.season=r.view.componentProps.game.season_id,r.view.componentProps.teamView=d[1]===2?r.view.componentProps.game.awayTeam.team_id:d[1]===1?r.view.componentProps.game.homeTeam.team_id:0);const o=this.dynamicFilters[0]||[];let l=null;if(Array.isArray(o)){if(o.length>0){const g=this.childViews.map(L=>{var M;const A=(M=L.view.componentProps)==null?void 0:M.categoryView;return A&&A.length>0?A[0].id:null}).filter(L=>L!==null),S=o.filter(L=>!g.includes(L));S.length>0&&(l=S[0])}}else{const g=o;g&&(this.childViews.find(S=>{var L;const M=(L=S.view.componentProps)==null?void 0:L.categoryView;return M&&M.length>0&&M[0].id===g})||(l=g))}let s=null;if(l)try{s=A4(l)}catch{}const f=d&&d.length>1?d[1]:1;r.view.filterMultiple={categoryId:l,teamType:f},r.view.componentProps.categoryView=s?[{id:l,name:s.name}]:l?[{id:l,name:`Category ${l}`}]:[{id:0,name:"Category"}]}if(this.viewId===8&&r.view.componentProps&&!a&&r.view.game&&(r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0),r.view.componentProps.areInactiveVisible=this.dynamicFilters[0]||!1,r.view.componentProps.game=(v=r.view)==null?void 0:v.game,r.view.componentProps.teamSelected={teamId:(h=($=r.view)==null?void 0:$.game)==null?void 0:h.home_team},r.view.componentProps.isDefault=!1,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===13&&r.view.componentProps&&!a&&(r.view.componentProps.isdefault=!0,r.view.componentProps.seasonid=2010,r.view.teamids=[1,2],r.view.componentProps.categoryids=[20,2],r.view.componentProps.teamsshow=[1,2],r.view.componentProps.analysistype=1,r.view.componentProps.gameid="",r.view.componentProps.teams=[],r.view.componentProps.game=""),this.viewId===15&&r.view.componentProps&&!a&&(r.view.componentProps.isdefault=!0,r.view.componentProps.view=1,r.view.numitems=3,r.view.typegame=1,r.view.componentProps.token=this.token,r.view.componentProps.data={season:2010,type:2,team:14}),this.viewId===17&&r.view.componentProps&&!a&&(console.log("6666666666666666666666666666 ddddddddddddddd LLEGO AQUI MERO ESTE COMPOENNETE ES: ---->>>> ",r.view.componentProps),r.view.componentProps.forseason=!1,r.view.componentProps.forteam=!0,r.view.componentProps.tournamentselected={id:1},r.view.componentProps.forgame=!1,r.view.componentProps.filters={},r.view.componentProps.showBallGo=!0,r.view.componentProps.showHeatMap=!0,r.view.componentProps.ballOnOff=!1,r.view.componentProps.showdefault=!0),this.viewId===14&&r.view.componentProps&&!a&&(r.view.componentProps.isReports=!0,r.view.componentProps.isDefault=!0,r.view.componentProps.type=0,r.view.componentProps.typeView=1,r.view.componentProps.showVideos=!1,r.view.componentProps.currentSeason=2010,r.view.componentProps.localTeam=2,r.view.componentProps.awayTeam=1),this.viewId===6&&r.view.componentProps&&!a){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d&&d.length>0?d[0]:[];if(o&&o.length>0){let l=0;for(const s of o)if(!this.childViews.find(f=>f.view.componentProps.gameNumber===s)){l=s;break}l&&(r.view.componentProps.gameNumber=l,r.view.filterMultiple={gameNumber:l})}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===3&&r.view.componentProps&&!a&&r.view.game){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d&&d.length>0?d[0]:!1;r.view.componentProps.desplegable=o,r.view.componentProps.key=o,r.view.componentProps.game=(u=r.view)==null?void 0:u.game,r.view.componentProps.defaultShields=!1,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===4&&r.view.componentProps&&!a&&r.view.game){if(r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0),this.isPostMatch){r.view.componentProps.key=!1,r.view.componentProps.isDefault=!1,r.view.componentProps.token=this.token,r.view.componentProps.gameId=(p=(i=r.view)==null?void 0:i.game)==null?void 0:p.game_id,r.view.componentProps.homeTeam=(n=(c=r.view)==null?void 0:c.game)==null?void 0:n.home_team,r.view.componentProps.awayTeam=(T=(k=r.view)==null?void 0:k.game)==null?void 0:T.visiting_team;const o=this.getComponentDynamicFilters(r.view.id),l=o||this.dynamicFilters;!o&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const s=l&&l.length>0?l[0]:[],f=this.hasEventTypeId(s,1),g=this.hasCategoryId(s,8),S=this.hasCategoryId(s,9),L=this.hasEventTypeId(s,3);r.view.componentProps.goals=f,r.view.componentProps.yellowCards=g,r.view.componentProps.redCards=S,r.view.componentProps.substitutions=L}const x=this.getComponentDynamicFilters(r.view.id)||this.dynamicFilters,d=x&&x.length>0?x[0]:[];r.view.componentProps.selectedEvents=d,r.view.componentProps.key=d.length>0,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:x})}this.viewId===16&&this.addLastTouch(r),this.viewId===18&&this.addSpecificPlays(r),this.childViews.push(r),Sd.emit("view-added")}getHowManyViewsToAdd(r,a=null){if(this.viewId===5||this.viewId===14||this.viewId===13||this.viewId===15)return 1;if(this.viewId===6){const v=r[0];return v===2||v===3?v:1}if(this.viewId===4)return r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0?1:0;if(this.viewId===9){const v=r[0],$=r[1];if($===1||$===2){const h=$===1?this.getHomeTeamViews():this.getAwayTeamViews();return v.length-h.length}else return v*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===16&&a){const v=a.selectedCategories||[],$=a.selectedTeam.value;if($===1||$===2){const h=$===1?this.getHomeTeamViews():this.getAwayTeamViews();return v.length-h.length}else return v.length*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===2){const v=r[0]||[],$=r[1]||1;if(!v||v.length===0)return 0;if(Array.isArray(v)){const h=this.childViews.map(u=>{var i;const p=(i=u.view.componentProps)==null?void 0:i.categoryView;return p&&p.length>0?p[0].id:null}).filter(u=>u!==null);return v.filter(u=>!h.includes(u)).length}else{const h=v;return this.childViews.find(u=>{var i,p;const c=(i=u.view.componentProps)==null?void 0:i.categoryView,n=((p=u.view.filterMultiple)==null?void 0:p.teamType)||1;return c&&c.length>0&&c[0].id===h&&n===$})?0:1}}if(this.viewId===1){const v=r[0]||[];if(!v||v.length===0)return 0;if(Array.isArray(v)){const $=this.childViews.map(h=>{var u;return(u=h.view.componentProps)==null?void 0:u.type}).filter(h=>h!==void 0);return v.filter(h=>!$.includes(h)).length}else{const $=v;return this.childViews.find(h=>{var u;return((u=h.view.componentProps)==null?void 0:u.type)===$})?0:1}}return 0}getRequiresAddView(r,a){if(console.log("getRequiresAddView - viewId:",this.viewId),console.log("filters:",a),this.viewId===5)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===15)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===17){const v=r[2]||1,$=r[2];return v===3||$===3?this.childViews.length<2:this.childViews.length===0}if(this.viewId===10)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===7)return r[1]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===6){const v=r[0];return v?v.length>this.childViews.length:this.childViews.length===0}if(this.viewId===4){const v=r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0;return this.childViews.length===0&&v}if(this.viewId===9)return this.getRequiresAddViewMultipleAndBothTeams(r);if(this.viewId===16&&a){const v=[a.selectedCategories,a.selectedTeam.value];return this.getRequiresAddViewMultipleAndBothTeams(v,a.totalCategoriesSelected)}if(this.viewId===18&&a){console.log("getRequiresAddView - GSCShotMapAnalysis"),console.log("dynamicFilters:",r),console.log("filters:",a);const v=[a.howManyCorners,a.selectedTeam.value],$=this.getRequiresAddViewMultipleAndBothTeams(v,a.howManyCorners);return console.count("before aux18 return"),console.log("aux18:",$),$}if(this.viewId===1){const v=r[0]||[];if(!v||v.length===0)return!1;if(Array.isArray(v)){const $=this.childViews.map(h=>{var u;return(u=h.view.componentProps)==null?void 0:u.type}).filter(h=>h!==void 0);return v.filter(h=>!$.includes(h)).length>0}else{const $=v;return!this.childViews.find(h=>{var u;return((u=h.view.componentProps)==null?void 0:u.type)===$})}}if(this.viewId===2){const v=r[0]||[];if(Array.isArray(v)){if(v.length>0){const $=this.childViews.map(h=>{var u;const i=(u=h.view.componentProps)==null?void 0:u.categoryView;return i&&i.length>0?i[0].id:null}).filter(h=>h!==null);return v.filter(h=>!$.includes(h)).length>0}return!1}else{const $=v,h=r[1]||1;return $?!this.childViews.find(u=>{var i,p;const c=(i=u.view.componentProps)==null?void 0:i.categoryView,n=((p=u.view.filterMultiple)==null?void 0:p.teamType)||1;return c&&c.length>0&&c[0].id===$&&n===h}):!1}}return this.viewId===8||this.viewId===3||this.viewId===14?this.childViews.length===0:!1}getRequiresAddViewMultipleAndBothTeams(r,a=null){const v=this.childViews.filter(c=>c.view.isHomeTeam),$=this.childViews.filter(c=>!c.view.isHomeTeam),h=a||r[0].length,u=r[1],i=h*(u===1||u===2?1:2),p=u===3?v.length+$.length:v.length||$.length;return i>p}getRequiresLessViews(r){if(this.viewId===5)return r[0]!==3&&this.childViews.length>1;if(this.viewId===15)return r[0]!==3&&this.childViews.length>1;if(this.viewId===17)return r[0]!==3&&this.childViews.length>1;if(this.viewId===6){const a=r[0];return a===2||a===3}return this.viewId,!1}updateSummary({dynamicFilters:r}){const a=this.childViews[0],v=document.querySelector(`[gs-id="${a.view.id}"]`),$=a.grid;if(a&&v&&$){const h=r[0],u=`min_column${h?"_2":""}`,i=`min_row${h?"_2":""}`,p=`max_column${h?"_2":""}`,c=`max_row${h?"_2":""}`,n=`colspan${h?"_2":""}`,k=`rowspan${h?"_2":""}`,T=a.view.coreView[n],x=a.view.coreView[k],d=a.view.coreView[u],o=a.view.coreView[i],l=a.view.coreView[p],s=a.view.coreView[c];a.view.w=T,a.view.h=x,a.view.maxWidth=l,a.view.maxHeight=s,a.view.minWidth=d,a.view.minHeight=o,v.setAttribute("gs-w",T),v.setAttribute("gs-h",x),v.setAttribute("gs-max-w",l),v.setAttribute("gs-max-h",s),v.setAttribute("gs-min-w",d),v.setAttribute("gs-min-h",o),$.update(v,{h:x,w:T,"gs-max-h":s,"gs-max-w":l,"gs-min-h":o,"gs-min-w":d})}}updateFilters(r){this.filters=r,this.viewId===16?this.updateLastTouchFilters(r):this.viewId===18&&this.updateSpecificPlaysFilters(r)}updateDynamicFilters(r,a=null){var v,$;if(!this._isUpdating){this._isUpdating=!0,a?this.componentSpecificFilters.set(a,[...r]):this.dynamicFilters=r,Sd.emit("component-added-to-container",this);try{if(this.viewId===5){const h=r[0]||1;if(h<3)if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:u.view.componentProps.preMatchType===1})}else{const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const k=p.items.findIndex(T=>T.id===u.view.id);k!==-1&&p.items.splice(k,1)}const n=this.childViews[0];n.view.componentProps&&(n.view.componentProps.preMatchType=h,n.view.filterMultiple={isHomeTeam:n.view.componentProps.preMatchType})}else this.childViews.forEach((u,i)=>{u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:u.view.componentProps.preMatchType}})}if(this.viewId===15){const h=r[0]||1;if(a){const u=this.childViews.find(i=>i.view.id===a);u&&u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}else if(h<3){if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}else if(this.childViews.length>1){for(;this.childViews.length>1;){const i=this.childViews.pop(),p=i.grid,c=i.page,n=document.querySelector(`[gs-id="${i.view.id}"]`);if(p&&n&&(p.removeWidget(n),c)){const k=c.items.findIndex(T=>T.id===i.view.id);k!==-1&&c.items.splice(k,1)}}const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}}else if(this.childViews.length===2)this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})});else if(this.childViews.length<2)this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})});else{for(;this.childViews.length>2;){const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const n=p.items.findIndex(k=>k.id===u.view.id);n!==-1&&p.items.splice(n,1)}}this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})})}}if(this.viewId===17){const h=r[0]||1,u=r[2],i=h===3||u===3;if(a){const p=this.childViews.find(c=>c.view.id===a);if(p&&p.view.componentProps&&(r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left"),r[2]!==void 0)){const c=r[2],n=p.view.componentProps.game;if(c===3){if(((v=p.view.filterMultiple)==null?void 0:v.isHomeTeam)!==void 0){const k=p.view.filterMultiple.isHomeTeam;n&&(p.view.componentProps.teamselected=(typeof k=="boolean"?k:k===1)?n.home_team:n.away_team)}}else n&&(p.view.componentProps.teamselected=c===2?n.away_team:n.home_team);p.view.filterMultiple={isHomeTeam:c===1||c===3&&(($=p.view.filterMultiple)==null?void 0:$.isHomeTeam)}}}else if(i)if(this.childViews.length===2)this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})});else if(this.childViews.length<2)this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})});else{for(;this.childViews.length>2;){const p=this.childViews.pop(),c=p.grid,n=p.page,k=document.querySelector(`[gs-id="${p.view.id}"]`);if(c&&k&&(c.removeWidget(k),n)){const T=n.items.findIndex(x=>x.id===p.view.id);T!==-1&&n.items.splice(T,1)}}this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})})}else if(this.childViews.length===1){const p=this.childViews[0];if(p.view.componentProps){r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left");const c=p.view.componentProps.game;if(r[2]!==void 0&&c){const n=r[2];p.view.componentProps.teamselected=n===2?c.away_team:c.home_team}p.view.filterMultiple={isHomeTeam:h===1}}}else if(this.childViews.length>1){for(;this.childViews.length>1;){const c=this.childViews.pop(),n=c.grid,k=c.page,T=document.querySelector(`[gs-id="${c.view.id}"]`);if(n&&T&&(n.removeWidget(T),k)){const x=k.items.findIndex(d=>d.id===c.view.id);x!==-1&&k.items.splice(x,1)}}const p=this.childViews[0];if(p.view.componentProps){r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left");const c=p.view.componentProps.game;if(r[2]!==void 0&&c){const n=r[2];p.view.componentProps.teamselected=n===2?c.away_team:c.home_team}p.view.filterMultiple={isHomeTeam:h===1}}}}if(this.viewId===10){const h=r[0]||1;if(h<3)if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.isHomeTeamForAnalysis=h===1,u.view.filterMultiple={isHomeTeam:u.view.componentProps.isHomeTeamForAnalysis})}else{const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const k=p.items.findIndex(T=>T.id===u.view.id);k!==-1&&p.items.splice(k,1)}const n=this.childViews[0];n.view.componentProps&&(n.view.componentProps.isHomeTeamForAnalysis=h===1,n.view.filterMultiple={isHomeTeam:n.view.componentProps.isHomeTeamForAnalysis})}else this.childViews.forEach((u,i)=>{u.view.componentProps.isHomeTeamForAnalysis=i%2===0,u.view.filterMultiple={isHomeTeam:u.view.componentProps.isHomeTeamForAnalysis}})}if(this.viewId===7){const h=r[1];if(h===3)this.childViews.forEach((u,i)=>{u.view.componentProps.isHomeTeamForAnalysis=i%2===0,u.view.isHomeTeam=i%2===0,u.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam}});else{const u=h===1;if(this.childViews.length>0){const i=this.childViews[0];i.view.componentProps.isHomeTeamForAnalysis=u,i.view.isHomeTeam=u,i.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",i.view.filterMultiple={isHomeTeam:u},this.childViews.length>1&&this.removeChildView(this.childViews[1])}}}if(this.viewId===9){const h=r[0],u=r[1];if(u===3){if(this.childViews.length>h.length){const i=h.map(p=>{const c=p.join("-");return R4.get(this.viewId).analysisTypes.get(c).analysisType});this.childViews.reduce((p,c)=>(i.includes(c.view.componentProps.analysisType)||p.push(c.view.componentProps.analysisType),p),[]).forEach(p=>{const c=this.childViews.findIndex(n=>n.view.componentProps.analysisType===p);if(c!==-1){const n=this.childViews[c];this.removeChildView(n)}})}}else{const i=u===1,p=this.getHomeTeamViews(),c=this.getAwayTeamViews();if(i&&p.length===0)c.forEach(n=>{n.view.componentProps.isHomeTeamForAnalysis=i,n.view.isHomeTeam=i,n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}});else if(!i&&c.length===0)p.forEach(n=>{n.view.componentProps.isHomeTeamForAnalysis=i,n.view.isHomeTeam=i,n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}});else if(p.length===c.length)i||p.forEach(n=>{n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}}),(i?c:p).forEach(n=>{this.removeChildView(n)});else{const n=i?this.getHomeTeamViews():this.getAwayTeamViews();if(n.length>h.length){const k=h.map(T=>{const x=T.join("-");return R4.get(this.viewId).analysisTypes.get(x).analysisType});n.forEach(T=>{k.includes(T.view.componentProps.analysisType)?T.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}:this.removeChildView(T)})}else n.forEach(k=>{k.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}})}}}if(this.viewId===2){const h=r[0]||[];if(Array.isArray(h)){const u=this.childViews.map(i=>{var p,c;const n=(p=i.view.componentProps)==null?void 0:p.categoryView,k=((c=i.view.filterMultiple)==null?void 0:c.teamType)||1,T=n&&n.length>0?n[0].id:null;return T?{categoryId:T,teamType:k,viewId:i.view.id}:null}).filter(i=>i!==null);if(a){const i=this.childViews.find(p=>p.view.id===a);if(i){const p=r[1]||1,c=h[0];if(c){let n=null;try{n=A4(c)}catch{}i.view.filterMultiple={categoryId:c,teamType:p},i.view.componentProps.game&&(p===1?i.view.componentProps.teamView=i.view.componentProps.game.homeTeam.team_id:p===2?i.view.componentProps.teamView=i.view.componentProps.game.awayTeam.team_id:i.view.componentProps.teamView=0),i.view.componentProps.categoryView=n?[{id:c,name:n.name}]:[{id:c,name:`Category ${c}`}]}}}if(!a){const i=r[1]||1;this.childViews.forEach(p=>{var c;const n=(c=p.view.componentProps)==null?void 0:c.categoryView;if(n&&n.length>0){const k=n[0].id;h.includes(k)&&(p.view.filterMultiple={categoryId:k,teamType:i})}})}if(u.map(i=>i.categoryId).filter(i=>!h.includes(i)).forEach(i=>{this.childViews.filter(p=>{var c;const n=(c=p.view.componentProps)==null?void 0:c.categoryView;return n&&n.length>0&&n[0].id===i}).forEach(p=>{this.removeChildView(p),Sd.emit("component-removed",{viewId:p.view.id,categoryId:i})})}),a){const i=h[0];if(i){const p=this.childViews.find(c=>c.view.id===a);if(p){let c=null;try{c=A4(i)}catch{}const n=r[1]||1;p.view.filterMultiple={categoryId:i,teamType:n},p.view.componentProps.game&&(p.view.componentProps.teamView=n===2?p.view.componentProps.game.awayTeam.team_id:n===1?p.view.componentProps.game.homeTeam.team_id:0),p.view.componentProps.categoryView=c?[{id:i,name:c.name}]:[{id:i,name:`Category ${i}`}]}}}}else{const u=h;if(u&&a){const i=this.childViews.find(p=>p.view.id===a);if(i){let p=null;try{p=A4(u)}catch{}const c=r[1]||1;i.view.filterMultiple={categoryId:u,teamType:c},i.view.componentProps.game&&(i.view.componentProps.teamView=c===2?i.view.componentProps.game.awayTeam.team_id:c===1?i.view.componentProps.game.homeTeam.team_id:0),i.view.componentProps.categoryView=p?[{id:u,name:p.name}]:[{id:u,name:`Category ${u}`}]}}}}if(this.viewId===8){const h=r[0]||!1;this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.areInactiveVisible=h,u.view.componentProps.key=h,Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}if(this.viewId===1){const h=r[0]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&this.updateComparative(u,r)}else if(this.childViews.reduce((u,i)=>(h.includes(i.view.componentProps.type)||u.push(i.view.componentProps.type),u),[]).forEach(u=>{const i=this.childViews.findIndex(p=>p.view.componentProps.type===u);if(i!==-1){for(let p=i;p<this.childViews.length;p++){const c=this.childViews[p+1],n=this.childViews[p];c&&(n.view.componentProps.type=c.view.componentProps.type,n.view.title=c.view.title)}this.removeChildView(this.childViews[this.childViews.length-1])}}),Array.isArray(h))this.childViews.length>0&&h.length>0&&this.childViews.forEach((u,i)=>{if(u.view.componentProps&&i<h.length){const p=h[i],c=R4.get(this.viewId);u.view.componentProps.type=p,u.view.componentProps.default=!1,u.view.title=`Comparativa ${c[p]}`,u.view.filterMultiple={category:p}}});else{const u=h;if(u&&this.childViews.length>0){const i=this.childViews[0];if(i.view.componentProps){const p=R4.get(this.viewId);i.view.componentProps.type=u,i.view.componentProps.default=!1,i.view.title=`Comparativa ${p[u]}`,i.view.filterMultiple={category:u}}}}}if(this.viewId===6){const h=r[0]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&this.updateGSCLineupsReports(u,r)}else{if(Array.isArray(h))if(h.length===0)for(;this.childViews.length>0;)this.removeChildView(this.childViews[0]);else this.childViews.reduce((u,i)=>(h.includes(i.view.componentProps.gameNumber)||u.push(i.view.componentProps.gameNumber),u),[]).forEach(u=>{const i=this.childViews.findIndex(p=>p.view.componentProps.gameNumber===u);if(i!==-1){for(let p=i;p<this.childViews.length;p++){const c=this.childViews[p+1],n=this.childViews[p];c&&(n.view.componentProps.gameNumber=c.view.componentProps.gameNumber,n.view.filterMultiple={gameNumber:c.view.componentProps.gameNumber})}this.removeChildView(this.childViews[this.childViews.length-1])}});this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}}if(this.viewId===3){if(a){this.setDynamicFilters(r,a);const h=this.childViews.find(u=>u.view.id===a);h&&this.updateMatchSummary(h,r)}else{const h=r[0]||!1;this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.desplegable=h,u.view.componentProps.key=h,Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}this.updateSummary({dynamicFilters:r})}if(this.viewId===13){const h=r[1]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&(u.view.componentProps&&(u.view.componentProps.categoryids=h,u.view.componentProps.analysistype=r[0]||1,u.view.componentProps.teamsshow=r[2]==1?[1]:r[2]==2?[2]:[1,2],u.view.dynamicFilters=r,u.view._updateKey=Date.now()),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))}else this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.categoryids=h,u.view.componentProps.analysistype=r[0]||1,u.view.componentProps.teamsshow=r[2]==1?[1]:r[2]==2?[2]:[1,2],u.view.dynamicFilters=r,u.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}else if(this.viewId===15){const h=r[0]||1,u=r[3]!==void 0?r[3]:typeof r[1]=="number"?r[1]:null;if(a){this.setDynamicFilters(r,a);const i=this.childViews.find(p=>p.view.id===a);i&&i.view.componentProps&&(i.view.componentProps.analysistype=h,u!==null&&(i.view.componentProps.numitems=u),i.view.dynamicFilters=r,i.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:i.view.id,componentProps:i.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:i.view.id,dynamicFilters:r}))}else this.childViews.forEach(i=>{i.view.componentProps&&(i.view.componentProps._isReactive||(i.view.componentProps=t.reactive(i.view.componentProps),i.view.componentProps._isReactive=!0),i.view.componentProps.analysistype=h,u!==null&&(i.view.componentProps.numitems=u),i.view.dynamicFilters=r,i.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:i.view.id,componentProps:i.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:i.view.id,dynamicFilters:r}))})}if(this.viewId===4){const h=r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0;if(a){const u=this.childViews.find(i=>i.view.id===a);u&&u.view.componentProps.selectedEvents}else if(!h&&this.childViews.length>0)this.childViews.forEach(u=>{this.removeChildView(u)});else if(h&&this.childViews.length===0){const u={pageId:null,view:{id:this.viewId,name:"Timeline",title:"Timeline",colspan:12,rowspan:6,max_column:12,max_row:12,min_column:6,min_row:4},filterAndWidgetContainer:this};Sd.emit("add-view",u)}else this.childViews.forEach(u=>{this.updateTimeline(u,r)})}}finally{this._isUpdating=!1}}}removeAllChildViews(){[...this.childViews].forEach(r=>{this.removeChildView(r)})}removeChildView(r,a=!1){const v=this.childViews.findIndex($=>$.view.id===r.view.id);if(v!==-1){const $=this.childViews[v];this.childViews.splice(v,1),$.view.id&&this.componentSpecificFilters.delete($.view.id);const h=$.grid,u=$.page,i=document.querySelector(`[gs-id="${$.view.id}"]`);if(h&&i&&(h.removeWidget(i),u&&!a)){const p=u.items.findIndex(c=>c.id===$.view.id);p!==-1&&(u.items.splice(p,1),u.items.length===0&&Sd.emit("empty-page",u))}}}updateView({view:r,dynamicFilters:a,filtersJSON:v,filters:$}){this.setFiltersJSON(v),this.dynamicFilters=a;const h=this.childViews.find(u=>{var i;return((i=u.view)==null?void 0:i.id)===r.view.id});if(h){h.view.filtersJSON=v,h.view.coreView&&(h.view.coreView.filtersJSON=v);let u=a;if(this.viewId===4){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===8){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===3){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i),this.updateSummary({dynamicFilters:u})}else if(this.viewId===1){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===6){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===7){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===9){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}this.viewId===5?this.updateVolumetricField(h,u):this.viewId===7?this.updateGoalData(h,u):this.viewId===9?this.updateFieldDataByZones(h,a):this.viewId===10?this.updateXg(h,u):this.viewId===3?this.updateMatchSummary(h,u):this.viewId===4?this.updateTimeline(h,u):this.viewId===8?this.updateFieldPosesion(h,u):this.viewId===1?this.updateComparative(h,u):this.viewId===2?this.updateGSCtops(h,u):this.viewId===6?this.updateGSCLineupsReports(h,u):this.viewId===16?this.updateLastTouchSingle(h,$):this.viewId===18&&this.updateSpecificPlaysFiltersSingle(h,$)}}updateComparative(r,a){if(r.view.componentProps){const v=a[0]||[];if(v&&v.length>0){let $;if(Array.isArray(v)){const u=this.childViews.findIndex(i=>i.view.id===r.view.id);u>=0&&u<v.length?$=v[u]:$=v[0]}else $=v;const h=R4.get(this.viewId);r.view.componentProps.type=$,r.view.componentProps.default=!1,r.view.title=`Comparativa ${h[$]}`,r.view.filterMultiple={category:$}}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateVolumetricField(r,a){if(r.view.componentProps){const v=a[0]||1;r.view.isHomeTeam=v===1,r.view.componentProps.preMatchType=v,r.view.filterMultiple={isHomeTeam:v},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateGoalData(r,a){if(r.view.componentProps){const v=a[0]===1?"offensive":"defensive",$=a[1]===1;r.view.componentProps.analysisType=v,r.view.componentProps.isHomeTeamForAnalysis=$,r.view.isHomeTeam=$,r.view.filterMultiple={isHomeTeam:$},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateFieldDataByZones(r,a){if(r.view.componentProps){const v=a[0],$=a[1]===1;if(r.view.componentProps.isHomeTeamForAnalysis=$,r.view.isHomeTeam=$,r.view.filterMultiple={categoryIds:v,isHomeTeam:$},v&&v.length){const h=v.join("-"),u=R4.get(this.viewId).analysisTypes.get(h);u&&(r.view.componentProps.analysisType=u.analysisType,r.view.title=u.title,r.view.titleShort=u.titleShort)}}}updateXg(r,a){const v=a[0]===1;r.view.componentProps&&(r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.filtersJSON=this.filtresJSON,r.view.filterMultiple={isHomeTeam:v})}updateMatchSummary(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=a&&a.length>0?a[0]:!1;r.view.componentProps.desplegable=v,r.view.componentProps.key=v,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateTimeline(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=this.getComponentDynamicFilters(r.view.id)||a,$=v&&v.length>0?v[0]:[];r.view.componentProps.selectedEvents=$,r.view.componentProps.key=$.length>0;const h=this.hasEventTypeId($,1),u=this.hasCategoryId($,8),i=this.hasCategoryId($,9),p=this.hasEventTypeId($,3);r.view.componentProps.goals=h,r.view.componentProps.yellowCards=u,r.view.componentProps.redCards=i,r.view.componentProps.substitutions=p,r.view.componentProps._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:v}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:v}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateFieldPosesion(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=a&&a.length>0?a[0]:!1;r.view.componentProps.areInactiveVisible=v,r.view.componentProps.key=v,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateGSCtops(r,a){if(r.view.componentProps){const v=a[0]||[];if(Array.isArray(v)){if(v.length>0){const $=v[0];let h=null;try{h=A4($)}catch(i){console.warn("Error getting category by ID:",i)}const u=a[1]||1;r.view.filterMultiple={categoryId:$,teamType:u},r.view.componentProps.game&&(u===1?r.view.componentProps.teamView=r.view.componentProps.game.homeTeam.team_id:u===2?r.view.componentProps.teamView=r.view.componentProps.game.awayTeam.team_id:r.view.componentProps.teamView=0),r.view.componentProps.categoryView=h?[{id:$,name:h.name}]:[{id:$,name:`Category ${$}`}]}}else{const $=v;if($){let h=null;try{h=A4($)}catch(i){console.warn("Error getting category by ID:",i)}const u=a[1]||1;r.view.filterMultiple={categoryId:$,teamType:u},r.view.componentProps.game&&(u===1?r.view.componentProps.teamView=r.view.componentProps.game.homeTeam.team_id:u===2?r.view.componentProps.teamView=r.view.componentProps.game.awayTeam.team_id:r.view.componentProps.teamView=0),r.view.componentProps.categoryView=h?[{id:$,name:h.name}]:[{id:$,name:`Category ${$}`}]}}}}updateGSCLineupsReports(r,a){if(r.view.componentProps){const v=a[0]||[];if(Array.isArray(v)){if(v.length>0){const $=v[0];r.view.filterMultiple={gameNumber:$},r.view.componentProps.gameNumber=$}}else{const $=v;$&&(r.view.filterMultiple={gameNumber:$},r.view.componentProps.gameNumber=$)}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}getCategoryIdFromAnalysisType(r,a){if(!r||!a)return null;for(const v of a){const $=v.join("-"),h=R4.get(this.viewId);if(h&&h.analysisTypes){const u=h.analysisTypes.get($);if(u&&u.analysisType===r)return v[0]||null}}return null}updateLastTouchFilters(){if(!this.filters){console.warn("No filters available in updateLastTouchFilters");return}this.childViews.forEach($=>{$.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,$.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,$.view.filterMultiple.howManyGamesSelected=this.filters.howManyGamesSelected,$.view.filterMultiple.isAssistZoneVisible=this.filters.isAssistZoneVisible});const r=this.filters.selectedCategories.map($=>$.value),a=r.map($=>$.name),v=this.filters.selectedTeam.value;if(v===3)this.childViews.length>r&&this.childViews.reduce(($,h)=>(a.includes(h.view.componentProps.categories[0].name)||$.push(h.view.componentProps.categories[0].name),$),[]).forEach($=>{const h=this.childViews.findIndex(u=>u.view.componentProps.categories[0].name===$);if(h!==-1){const u=this.childViews[h];this.removeChildView(u)}});else{const $=v===1,h=this.getHomeTeamViews(),u=this.getAwayTeamViews();if($&&h.length===0)u.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$});else if(!$&&u.length===0)h.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$});else if(h.length===u.length)$||h.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$}),($?u:h).forEach(i=>{this.removeChildView(i)});else{const i=$?this.getHomeTeamViews():this.getAwayTeamViews();if(i.length>r.length){const p=r.map(c=>c.name);i.forEach(c=>{p.includes(c.view.componentProps.categories[0].name)?c.view.filterMultiple.isHomeTeam=$:this.removeChildView(c)})}else i.forEach(p=>{p.view.filterMultiple.isHomeTeam=$})}}}updateLastTouchSingle(r,a){if(r.view.componentProps){const v=a.selectedTeam.value===1,$=a.selectedCategory.value;r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.componentProps.categories=[$],r.view.componentProps.analysisType=a.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAssistZoneVisible=a.isAssistZoneVisible,r.view.componentProps.howManyGames=a.howManyGamesSelected.value,r.view.title=$.name,r.view.titleShort=$.name,r.view.isHomeTeam=v,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:$,selectedGamePhase:a.selectedGamePhase,howManyGamesSelected:a.howManyGamesSelected,isAssistZoneVisible:a.isAssistZoneVisible}}}updateSpecificPlaysFilters(){if(console.log("updateSpecificPlaysFilters called"),!this.filters){console.warn("No filters available in updateCornershFilters");return}this.childViews.forEach(a=>{a.view.componentProps.advancedFilters=this.filters.advancedFilters,a.view.componentProps.howManyCorners=this.filters.howManyCorners,a.view.componentProps.isAgainstMode=this.filters.isAgainstMode,a.view.filterMultiple.advancedFilters=this.filters.advancedFilters,a.view.filterMultiple.isAgainstMode=this.filters.isAgainstMode});const r=this.filters.selectedTeam.value;if(r===3){const a=this.getHomeTeamViews(),v=this.getAwayTeamViews();if(a.length+v.length>this.filters.howManyCorners*2){const $=[];a.forEach((h,u)=>{u>=this.filters.howManyCorners&&$.push(h)}),v.forEach((h,u)=>{u>=this.filters.howManyCorners&&$.push(h)}),$.forEach(h=>{this.removeChildView(h)})}}else{const a=r===1,v=this.getHomeTeamViews(),$=this.getAwayTeamViews();if(a&&v.length===0)$.forEach(h=>{console.log("awayView before update:",h),h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a});else if(!a&&$.length===0)v.forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a});else if(v.length===$.length)a||v.forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a}),(a?$:v).forEach(h=>{this.removeChildView(h)});else{const h=a?this.getHomeTeamViews():this.getAwayTeamViews();h.length>this.filters.howManyCorners?h.forEach((u,i)=>{i>=this.filters.howManyCorners?this.removeChildView(u):u.view.filterMultiple.isHomeTeam=a}):h.forEach(u=>{u.view.filterMultiple.isHomeTeam=a})}}}updateSpecificPlaysFiltersSingle(r,a){if(console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),console.log("view:",r),console.log("filter:",a),console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),a.selectedTeam&&r.view.componentProps){const v=a.selectedTeam.value===1;r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.advancedFilters=a.advancedFilters,r.view.componentProps.isAgainstMode=a.isAgainstMode,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:a.advancedFilters,isAgainstMode:a.isAgainstMode}}}}const oHe={class:"template-page__header"},sHe={class:"template-page__header__name"},lHe=["value"],cHe={class:"template-page__header__details"},uHe={class:"template-page__header__details__teams"},dHe={class:"template-page__header__details__teams__team"},pHe={key:0,class:"template-page__header__details__teams__team__logo"},hHe=["src"],fHe={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mHe={class:"template-page__header__details__teams__team"},yHe={key:0,class:"template-page__header__details__teams__team__logo"},gHe=["src"],vHe={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bHe={class:"template-page__content"},xHe=["id"],_He=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position"],wHe=t.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},game:{type:Object,default:()=>null},lastGames:{type:Array,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},isFilterVisible:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view","dynamic-filters-changed"],setup(e,{emit:r}){var a,v,$,h,u,i,p;const c=t.ref(null);let n=null;const k=e,T=t.ref(!1),x=r,d=t.computed(()=>k.page.items.reduce((qe,_e)=>(qe.set(_e.id,_e),qe),new Map)),o=t.computed(()=>{var qe,_e,Ue,je;return k.game&&k.game.homeTeam&&k.game.awayTeam?{homeTeam:{name:((qe=k.game.homeTeam)==null?void 0:qe.acronym)||"LOC",logo:((_e=k.game.homeTeam)==null?void 0:_e.logo)||null},awayTeam:{name:((Ue=k.game.awayTeam)==null?void 0:Ue.acronym)||"VIS",logo:((je=k.game.awayTeam)==null?void 0:je.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}});let l=null,s=null,f=!1,g=null,S=!1;const L=()=>{S=!0},M=()=>{S=!1};function A(){S||(f=!0,g&&clearTimeout(g),g=setTimeout(()=>{f=!1},150))}function z(){const qe={root:null,rootMargin:"0px",threshold:.7};l=new IntersectionObserver(je=>{je.forEach(Re=>{if(f){s&&clearTimeout(s),s=setTimeout(()=>{x("intersection-changed",Re.isIntersecting)},100);return}s&&clearTimeout(s),s=setTimeout(()=>{x("intersection-changed",Re.isIntersecting)},50)})},qe);const _e=c.value;_e&&l.observe(_e);const Ue=document.querySelector(".container-main");Ue&&Ue.addEventListener("scroll",A,{passive:!0}),document.addEventListener("programmatic-scroll-start",L),document.addEventListener("programmatic-scroll-end",M)}function I(qe){k.page.title=qe.target.value,x("view-changed")}const j={game_id:0,season_id:0,prematch:!1},F={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},W=new Map([[5,{component:jI,componentName:"GSCVolumetricField",props:{isGamePreMatch:!k.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:k.isTemplateMode,isTemplateMode:k.isTemplateMode,preMatchType:1}}],[2,{component:Mj,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:k.game?k.game.id:F.gameId,game:k.game,season:k.game?(a=k==null?void 0:k.game)==null?void 0:a.season_id:F.seasonId,teamView:0,useDummyData:k.isTemplateMode}}],[8,{component:PW,componentName:"FieldPosesion",props:{widthSection:600,game:F,teamSelected:{teamId:0},areInactiveVisible:!0,showTitle:!1,isDefault:!0,key:!1}}],[6,{component:FK,componentName:"GSCLineupsReports",props:{selectedOption:k.isPostMatch?"Postmatch":"Prematch",game:j,gamehome:j,gameaway:j}}],[3,{component:UW,componentName:"GSCMatchSummary",props:{game:F,defaultShields:!0,desplegable:!1}}],[4,{component:_D,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:F.gameId,homeTeam:F.homeTeam.team_id,awayTeam:F.awayTeam.team_id,token:k.token,goals:!0,yellowCards:!0,redCards:!0,substitutions:!0}}],[7,{component:LB,componentName:"GSCGoalData",props:{game:k.game,isHomeTeamForAnalysis:!0,canInteract:!1,canPlayVideos:!1,isPreMatch:!k.isPostMatch,analysisType:1}}],[9,{component:IK,componentName:"GSCFieldDataByZones",props:{game:k.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!k.isPostMatch,negative:!0}}],[10,{component:nP,componentName:"GSCGameXg",props:{game:k.game,isHomeTeamForAnalysis:!0,isPostMatch:k.isPostMatch}}],[13,{component:HF,componentName:"GSCTimelapseTable",props:{isdefault:!0,seasonId:k.game?(v=k==null?void 0:k.game)==null?void 0:v.season_id:0,teamsIds:[8,13],categoryIds:[20,2],analysisType:1,teamsshow:[1],gameId:90401,teams:[{id:8,name:"MAZ",logo:"https://golstatsimages.blob.core.windows.net/teams-80/8.png"},{id:13,name:"SNL",logo:"https://golstatsimages.blob.core.windows.net/teams-80/13.png"}]}}],[14,{component:lF,componentName:"GSCGeneraltable",props:{isReports:!0,isDefault:!0,type:0,typeView:1,tournament:1,currentSeasonId:2010,showVideos:!1,localTeam:2,awayTeam:1}}],[15,{component:LX,componentName:"GSCStrengths",props:{token:k.token,view:1,numitems:3,typegame:1,isdefault:!0,data:{player:35240,season:1772,type:2,team:14}}}],[17,{component:FG,componentName:"GSCCornersGeneralTrend",props:{game:k.game?{id:k.game.id||k.game.game_id||k.game.gameId||null,home_team:k.game.home_team||null,away_team:k.game.visiting_team||null,season:k.game.seasonId||k.game.season_id||null,game_status:k.game.game_status||k.game.status||null,home_acronym:k.game.home_team_acronym||(($=k.game.homeTeam)==null?void 0:$.acronym)||null,away_acronym:k.game.visiting_team_acronym||((h=k.game.awayTeam)==null?void 0:h.acronym)||null,logo_home:((u=k.game.homeTeam)==null?void 0:u.logo)||null,logo_away:((i=k.game.awayTeam)==null?void 0:i.logo)||null}:null,infavoragainstteam:!0,forseason:!1,forteam:!0,showdefault:!0,tournamentselected:{id:1},forgame:!1,lateralidad:"right",teamselected:2,filters:{},showBallGo:!0,showHeatMap:!0,ballOnOff:!1}}],[10,{component:nP,componentName:"GSCGameXg",props:{game:k.game,isHomeTeamForAnalysis:!0,isPostMatch:k.isPostMatch}}],[1,{component:TB,componentName:"GSCComparativeReports",props:{gameId:k.game?k.game.id:"",homeLogo:k.game?k.game.homeTeam.logo:"",awayLogo:k.game?k.game.awayTeam.logo:"",seasonId:k.game?(p=k==null?void 0:k.game)==null?void 0:p.season_id:0,typeGame:k.isPostMatch,type:"stoppedBall",default:k.isTemplateMode}}],[16,{component:zX,componentName:"GSCLastTouch",props:{categories:[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,"35_r","54_r"],invert:[35,54],negative:!1,translationKey:"chalkboard.offensive.team.goals",singleName:"Gol",isDefaultSelected:!0}],gameIdsForAnalysis:[],isAssistZoneVisible:!1,seasonId:2010,analysisType:"offensive",teamIdForAnalysis:17,gameDataUTC:"2025-11-08T03:00:00Z",isHomeTeamForAnalysis:!0,isTemplateMode:k.isTemplateMode,isPreMatch:!k.isPostMatch}}],[18,{component:MZ,componentName:"GSCSpecificPlays",props:{isHomeTeamForAnalysis:!0,isTemplateMode:k.isTemplateMode,isPreMatch:!k.isPostMatch,seasonIdForAnalysis:1325,selectedCategory:31,teamIdForAnalysis:1,iaAgainstMode:!1,game:{id:62323,home_team:1,away_team:14,season:1325,game_status:4,home_acronym:"CHI",away_acronym:"SAN",logo_home:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",logo_away:"https://golstatsimages.blob.core.windows.net/teams-80/14.png"},advancedFilters:{areConnectionsVisible:!1,arePathsVisible:!1,secondsBefore:-1,secondsAfter:1,secondsBeforeAndAfter:0}}}]]);function U(qe){var _e,Ue,je;if(((_e=qe==null?void 0:qe.coreView)==null?void 0:_e.id)===17&&qe.dynamicFilters&&qe.dynamicFilters[2]!==void 0){const Re=qe.dynamicFilters[2];if(Re===1)return!0;if(Re===2)return!1;if(Re===3&&((Ue=qe.filterMultiple)==null?void 0:Ue.isHomeTeam)!==void 0)return typeof qe.filterMultiple.isHomeTeam=="boolean"?qe.filterMultiple.isHomeTeam:qe.filterMultiple.isHomeTeam===1}return(je=qe.componentProps)!=null&&je.preMatchType?qe.componentProps.preMatchType===1:qe.isHomeTeam}function O(qe){if(qe)if(typeof qe=="string"){let _e=null;switch(qe){case"GSCVolumetricField":_e=jI;break;case"GSCGoalData":_e=LB;break;case"GscTopPlayer":_e=Mj;break;case"FieldPosesion":_e=PW;break;case"GSCLineupsReports":_e=FK;break;case"GSCMatchSummary":_e=UW;break;case"GSCTimelineReports":_e=_D;break;case"GSCFieldDataByZones":_e=IK;break;case"GSCGeneraltable":_e=lF;break;case"GSCTimelapseTable":_e=HF;break;case"GSCGameXg":_e=nP;break;case"GSCComparativeReports":_e=TB;break;case"GSCStrengths":_e=LX;break;case"GSCCornersGeneralTrend":_e=FG;break;case"GSCLastTouch":_e=zX;break;case"GSCSpecificPlays":_e=MZ;break;default:_e=null}return _e}else return qe;return null}function X({pageId:qe,view:_e,filterAndWidgetContainer:Ue,applyMinimumSize:je=!1,dynamicFilters:Re=[],filters:We=null}){if(k.page.id===qe&&n){let Qe=!1;_e.id===3&&(Qe=Re[0]);const rt=`min_column${Qe?"_2":""}`,pt=`min_row${Qe?"_2":""}`,ut=`colspan${Qe?"_2":""}`,He=`rowspan${Qe?"_2":""}`,st={w:je?_e[rt]:_e[ut],h:je?_e[pt]:_e[He]};if(n.willItFit(0,0,st.w,st.h,!0)){const ct=n.addWidget(st),Ct=Number(ct.getAttribute("gs-x")||0),Vt=Number(ct.getAttribute("gs-y")||0);n.removeWidget(ct);const Ot=W.get(_e.id),qt=t.reactive({...JSON.parse(JSON.stringify(Ot.props))||{},_isReactive:!0}),Zt=t.reactive({pageId:qe,grid:n,page:k.page,view:{name:_e.name,title:_e.title,key:Date.now()-7*Math.random(),id:`w-${String(Date.now())}`,x:Ct,y:Vt,w:st.w,h:st.h,maxWidth:_e.max_column,maxHeight:_e.max_row,minWidth:_e.min_column,minHeight:_e.min_row,componentName:Ot.componentName,componentProps:qt,pageId:qe,coreView:_e}});Ue.addView(Zt),Sd.emit("add-page-view",Zt)}else Sd.emit("add-page-and-view",{pageId:qe,view:_e,filterAndWidgetContainer:Ue})}}function N(qe){if(n){const _e=document.querySelector(`[gs-id="${qe.id}"]`);_e&&(n.removeWidget(_e),x("delete-view",qe))}}function Y(qe){if(!qe.filterAndViewsContainer&&qe.coreView){const _e=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[qe],qe.coreView.id,qe.dynamicFilters||[],k.isPostMatch,k.isTemplateMode,qe.filtersJSON,null,qe.filters);qe.filterAndViewsContainer=_e}x("edit-view",qe)}function se(){x("delete-page",k.page)}function me(){Sd.emit("change-sort",k.page)}function ge(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.itemId||Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps),_e._updateKey=Date.now())}function be(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps),_e._updateKey=Date.now())}function xe(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps||{}),_e._updateKey=Date.now())}const Ae=function(){Sd.off("add-view",X),Sd.off("force-component-update",ge),Sd.off("component-props-updated",be),Sd.off("dynamic-filters-changed",xe);const qe=document.querySelector(".container-main");qe&&qe.removeEventListener("scroll",A),s&&clearTimeout(s),g&&clearTimeout(g)};return Sd.on("add-view",X),Sd.on("force-component-update",ge),Sd.on("component-props-updated",be),Sd.on("dynamic-filters-changed",xe),t.onMounted(async()=>{await t.nextTick(),n=Rh.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${k.id}`),n.on("change",(qe,_e)=>{const Ue=_e[0];if(Ue){const je=d.value.get(Ue.id);je&&(je.x=Ue.x,je.y=Ue.y,je.w=Ue.w,je.h=Ue.h,x("view-changed"))}}),z(),k.page.grid=n,k.page.offListeners=Ae}),t.onUnmounted(()=>{l&&l.disconnect(),Ae(),s&&clearTimeout(s),g&&clearTimeout(g),document.removeEventListener("programmatic-scroll-start",L),document.removeEventListener("programmatic-scroll-end",M)}),(qe,_e)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"templatePage",ref:c,class:"template-page"},[t.createElementVNode("div",oHe,[T.value?(t.openBlock(),t.createBlock(VZ,{key:0,"options-type":"page",onClick:_e[0]||(_e[0]=t.withModifiers(Ue=>T.value=!1,["self"])),onMouseleave:_e[1]||(_e[1]=Ue=>T.value=!1),onCloseTooltip:_e[2]||(_e[2]=Ue=>T.value=!1),onDeletePage:se,onChangeSort:me})):t.createCommentVNode("",!0),t.createElementVNode("div",sHe,[_e[4]||(_e[4]=t.createElementVNode("div",null,[t.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),t.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),_e[5]||(_e[5]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("input",{value:e.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:I},null,40,lHe)]),t.createElementVNode("div",cHe,[t.createElementVNode("div",uHe,[t.createElementVNode("div",dHe,[o.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",pHe,[t.createElementVNode("img",{src:o.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,hHe)])):(t.openBlock(),t.createElementBlock("svg",fHe,[..._e[6]||(_e[6]=[t.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])])),t.createElementVNode("span",null,t.toDisplayString(o.value.homeTeam.name),1)]),_e[8]||(_e[8]=t.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),t.createElementVNode("div",mHe,[t.createElementVNode("span",null,t.toDisplayString(o.value.awayTeam.name),1),o.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",yHe,[t.createElementVNode("img",{src:o.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,gHe)])):(t.openBlock(),t.createElementBlock("svg",vHe,[..._e[7]||(_e[7]=[t.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])]))])]),e.isTemplateMode&&!e.isFilterVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:_e[3]||(_e[3]=Ue=>T.value=!0)},[..._e[9]||(_e[9]=[t.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])])):t.createCommentVNode("",!0)])]),t.createElementVNode("div",bHe,[t.createElementVNode("div",{id:`grid-stack-${e.id}`,class:"grid-stack"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.page.items,Ue=>{var je;return t.openBlock(),t.createElementBlock("div",{class:"grid-stack-item",key:Ue.key,"gs-id":Ue.id,"gs-x":Ue.x,"gs-y":Ue.y,"gs-w":Ue.w,"gs-h":Ue.h,"gs-max-w":Ue.maxWidth,"gs-max-h":Ue.maxHeight,"gs-min-w":Ue.minWidth,"gs-min-h":Ue.minHeight,"gs-no-resize":!e.isTemplateMode,"gs-no-move":!k.isTemplateMode,"gs-auto-position":Ue.x===0&&Ue.y===0},[t.createElementVNode("div",{class:t.normalizeClass(["grid-stack-item-content",{"is-selected":Ue.isSelected}])},[t.createVNode(HJe,{view:Ue,"is-template-mode":e.isTemplateMode,"is-post-match":e.isPostMatch,game:e.game,lastGames:e.lastGames,"is-home-team":U(Ue),"is-filter-visible":e.isFilterVisible,"view-id":((je=Ue==null?void 0:Ue.coreView)==null?void 0:je.id)||0,onEdit:Re=>Y(Ue),onDelete:Re=>N(Ue)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(O(Ue.componentName)),t.mergeProps({ref_for:!0},Ue.componentProps,{key:`${Ue.id}-${Ue._updateKey||0}`}),null,16))]),_:2},1032,["view","is-template-mode","is-post-match","game","lastGames","is-home-team","is-filter-visible","view-id","onEdit","onDelete"])],2)],8,_He)}),128))],8,xHe)])],512))}}),THe=t2(wHe,[["__scopeId","data-v-b748331b"]]),SHe={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},kHe={key:0,class:"cover__main-logo cover__main-logo__home"},LHe={key:0,class:"team-logo"},EHe=["src"],CHe={key:1,width:"575",height:"675",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},NHe=["fill"],OHe={key:1,class:"cover__main-logo cover__main-logo__away"},MHe={key:0,class:"team-logo"},VHe=["src"],zHe={key:1,width:"575",height:"575",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PHe=["fill"],AHe={class:"cover__title-subtitle"},RHe={class:"cover__title-subtitle__title"},UHe={class:"cover__title-subtitle__subtitle"},FHe={key:2,class:"cover-type-one"},IHe={class:"team-info-one"},qHe={class:"team-data"},jHe={key:0,class:"team-logo"},WHe=["src"],DHe={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},KHe=["fill","opacity"],BHe={class:"team-name"},XHe={key:0,class:"team-events"},GHe={class:"score-one"},ZHe={key:0},JHe={class:"team-info-one"},HHe={class:"team-data"},YHe={key:0,class:"team-logo"},QHe=["src"],$He={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eYe=["fill","opacity"],tYe={class:"team-name"},rYe={key:0,class:"team-events"},aYe={key:3,class:"cover-type-two"},nYe={class:"team-data"},iYe={class:"team-info"},oYe={key:0,class:"team-logo"},sYe=["src"],lYe={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cYe=["fill","opacity"],uYe={key:2,class:"team-score-two"},dYe={key:0,class:"team-goals"},pYe={class:"team-data"},hYe={class:"team-info"},fYe={key:0,class:"team-score-two"},mYe={key:1,class:"team-logo"},yYe=["src"],gYe={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vYe=["fill","opacity"],bYe={key:0,class:"team-goals"},xYe={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(null),h=t.computed(()=>[1,2].includes(a.coverId)),u=t.computed(()=>[1,3].includes(a.coverId)),i=t.computed(()=>a.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:a.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),p=t.computed(()=>a.game&&a.game.score?a.game.score:["0","0"]),c=t.computed(()=>{var I,j,F,W,U,O,X,N;if(a.game&&a.game.homeTeam&&a.game.awayTeam){const Y={homeTeam:{name:((I=a.game.homeTeam)==null?void 0:I.acronym)||"LOC",logo:((j=a.game.homeTeam)==null?void 0:j.logo)||null},awayTeam:{name:((F=a.game.awayTeam)==null?void 0:F.acronym)||"VIS",logo:((W=a.game.awayTeam)==null?void 0:W.logo)||null}};return h.value?(Y.homeTeam.goalsMinutes=o(a.game.minutes.home_goals_minutes),Y.homeTeam.totalYellowCards=((U=a.game.minutes.home_yellow_cards_minutes)==null?void 0:U.length)||0,Y.homeTeam.totalRedCards=((O=a.game.minutes.home_red_cards_minutes)==null?void 0:O.length)||0,Y.awayTeam.goalsMinutes=o(a.game.minutes.visiting_goals_minutes),Y.awayTeam.totalYellowCards=((X=a.game.minutes.away_yellow_cards_minutes)==null?void 0:X.length)||0,Y.awayTeam.totalRedCards=((N=a.game.minutes.away_red_cards_minutes)==null?void 0:N.length)||0):(Y.homeTeam.goalsEvents=d(a.game.report_minutes.home_goals_minutes),Y.awayTeam.goalsEvents=d(a.game.report_minutes.visiting_goals_minutes)),Y}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),n=t.computed(()=>({"--background-image":u.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":a.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":a.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":a.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":a.isPostMatch?"100%":"fit-content"})),k=t.computed(()=>a.isPostMatch?"Postmatch":"Prematch"),T=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],x=t.computed(()=>{if(a.game){let I=SHe[a.game.matchday_abbreviation];I||(I=a.game.matchday_abbreviation.replace("M","J"));const[j,F,W]=a.game.date.split("-");return`${I} - ${W} ${T[Number(F)-1]}, ${j}`}return"Jornada - Día 00 Mes"});function d(I){return!I||!Array.isArray(I)||I.length===0?"":I.map(j=>{const F=j.split(", ");let W=F[0].replace("'","");W=W.replace("+",""),W=W.replace("’","");const U=W.split(" "),{strings:O,numbers:X}=U.reduce((se,me)=>(isNaN(Number(me))?se.strings.push(me):se.numbers.push(me),se),{strings:[],numbers:[]}),N=O.join(" "),Y=X.length===1?`${X[0]}'`:`${X[0]}' ${X.slice(1).join(" + ")}'`;return{playerName:N,goalTime:F.length===1?Y:`${Y}, ${F.reduce((se,me,ge)=>ge===0?se:`${se}${me}${ge<F.length-1?", ":""}`,"")}`}})}function o(I){return!I||!Array.isArray(I)||I.length===0?"":I.reduce((j,F,W)=>{const U=F.split(" ");let O="";return U.length===3?O=U[2]:U.length===5&&(O=`${U[2]} ${U[3]} ${U[4]}`),O&&(j+=`${O}${W<I.length-1?", ":""}`),j},"")}let l=null,s=null,f=!1,g=null,S=!1;const L=()=>{S=!0},M=()=>{S=!1};function A(){S||(f=!0,g&&clearTimeout(g),g=setTimeout(()=>{f=!1},150))}function z(){const I={root:null,rootMargin:"0px",threshold:.7};l=new IntersectionObserver(W=>{W.forEach(U=>{if(f){s&&clearTimeout(s),s=setTimeout(()=>{v("intersection-changed",U.isIntersecting)},100);return}s&&clearTimeout(s),s=setTimeout(()=>{v("intersection-changed",U.isIntersecting)},50)})},I);const j=$.value;j&&l.observe(j);const F=document.querySelector(".container-main");F&&F.addEventListener("scroll",A,{passive:!0}),document.addEventListener("programmatic-scroll-start",L),document.addEventListener("programmatic-scroll-end",M)}return t.onMounted(()=>{z()}),t.onUnmounted(()=>{l&&l.disconnect();const I=document.querySelector(".container-main");I&&I.removeEventListener("scroll",A),document.removeEventListener("programmatic-scroll-start",L),document.removeEventListener("programmatic-scroll-end",M),s&&clearTimeout(s),g&&clearTimeout(g)}),(I,j)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"coverPage",ref:$,class:"cover",style:t.normalizeStyle(n.value)},[h.value?(t.openBlock(),t.createElementBlock("div",kHe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",LHe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,EHe)])):(t.openBlock(),t.createElementBlock("svg",CHe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam},null,8,NHe)]))])):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createElementBlock("div",OHe,[c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",MHe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,VHe)])):(t.openBlock(),t.createElementBlock("svg",zHe,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam},null,8,PHe)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",AHe,[t.createElementVNode("div",RHe,[j[0]||(j[0]=t.createElementVNode("div",null,"Análisis",-1)),t.createElementVNode("div",null,t.toDisplayString(k.value),1)]),t.createElementVNode("div",UHe,t.toDisplayString(x.value),1)]),h.value?(t.openBlock(),t.createElementBlock("div",FHe,[t.createElementVNode("div",IHe,[t.createElementVNode("div",qHe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",jHe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,WHe)])):(t.openBlock(),t.createElementBlock("svg",DHe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam,opacity:i.value.opacity},null,8,KHe)])),t.createElementVNode("div",BHe,t.toDisplayString(c.value.homeTeam.name),1)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",XHe,[j[1]||(j[1]=t.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.goalsMinutes),1),j[2]||(j[2]=t.createElementVNode("div",{class:"separator"},null,-1)),j[3]||(j[3]=t.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.totalYellowCards),1),j[4]||(j[4]=t.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.totalRedCards),1)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",GHe,[e.isPostMatch?(t.openBlock(),t.createElementBlock("div",ZHe,t.toDisplayString(p.value[0])+" : "+t.toDisplayString(p.value[1]),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",JHe,[t.createElementVNode("div",HHe,[c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",YHe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,QHe)])):(t.openBlock(),t.createElementBlock("svg",$He,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam,opacity:i.value.opacity},null,8,eYe)])),t.createElementVNode("div",tYe,t.toDisplayString(c.value.awayTeam.name),1)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",rYe,[t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.totalYellowCards),1),j[5]||(j[5]=t.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.totalRedCards),1),j[6]||(j[6]=t.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),j[7]||(j[7]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.goalsMinutes),1),j[8]||(j[8]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1))])):t.createCommentVNode("",!0)])])):(t.openBlock(),t.createElementBlock("div",aYe,[t.createElementVNode("div",nYe,[t.createElementVNode("div",iYe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",oYe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,sYe)])):(t.openBlock(),t.createElementBlock("svg",lYe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam,opacity:i.value.opacity},null,8,cYe)])),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",uYe,t.toDisplayString(p.value[0]),1)):t.createCommentVNode("",!0)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",dYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value.homeTeam.goalsEvents,(F,W)=>(t.openBlock(),t.createElementBlock("div",{key:`goal-${W}`,class:"goal"},[t.createElementVNode("div",null,t.toDisplayString(F.playerName),1),j[9]||(j[9]=t.createElementVNode("div",{class:"bullet"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(F.goalTime),1),j[10]||(j[10]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1))]))),128))])):t.createCommentVNode("",!0)]),j[13]||(j[13]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",pYe,[t.createElementVNode("div",hYe,[e.isPostMatch?(t.openBlock(),t.createElementBlock("div",fYe,t.toDisplayString(p.value[1]),1)):t.createCommentVNode("",!0),c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",mYe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,yYe)])):(t.openBlock(),t.createElementBlock("svg",gYe,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam,opacity:i.value.opacity},null,8,vYe)]))]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",bYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value.awayTeam.goalsEvents,(F,W)=>(t.openBlock(),t.createElementBlock("div",{key:`goal-a-${W}`,class:"goal"},[j[11]||(j[11]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1)),t.createElementVNode("div",null,t.toDisplayString(F.goalTime),1),j[12]||(j[12]=t.createElementVNode("div",{class:"bullet"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(F.playerName),1)]))),128))])):t.createCommentVNode("",!0)])]))],4))}},_Ye=t2(xYe,[["__scopeId","data-v-6680cbcf"]]),wYe={class:"table-category-filters"},TYe={key:0,class:"custom-radio-group filter-inline"},SYe={class:"radio-label"},kYe={class:"radio-options"},LYe=["name","value","onUpdate:modelValue","onClick"],EYe=["data-filter-type","onClick","onMousedown","onMouseup"],CYe={class:"select-display"},NYe={class:"select-label"},OYe={key:0,class:"dropdown-menu type-menu simple-select-menu"},MYe={class:"simple-select-scroll-area"},VYe=["onClick"],zYe={class:"option-content"},PYe={class:"option-title"},AYe={key:0,class:"option-checkmark"},RYe={key:2,class:"filter-separator"},UYe={__name:"TableCategoryFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:13}},emits:["filters-changed","filter-updated"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=(S,L)=>{if(!L)return!0;for(let M=0;M<S.length;M++)if(!p(S[M],L[M]))return!0;return!1},p=(S,L)=>{if(Array.isArray(S)&&Array.isArray(L)){if(S.length!==L.length)return!1;for(let M=0;M<S.length;M++)if(S[M]!==L[M])return!1;return!0}return S===L},c=t.ref(null),n=t.ref([]);let k=!1,T=null;const x=()=>{T=null},d=()=>{setTimeout(()=>{k=!1},1e3)},o=(S,L=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]&&v.filters[1].options){const M=v.filters[0].options,A=v.filters[1].options;S!=null?M.findIndex(z=>z.value===S)!==-1&&A[S]?(n.value=A[S],L&&!(()=>{const z=h.value[1];return z==null?!1:Array.isArray(z)?z.length>0:z!==""})()&&!k&&n.value.length>0&&(h.value[1]=n.value[0].value,t.nextTick(()=>{}))):(n.value=[],h.value[1]=null):(n.value=[],h.value[1]=null)}},l=()=>{v.initialValues&&v.initialValues.length>0?h.value=[...v.initialValues]:h.value=v.filters.map(S=>{var L,M,A,z;return S.type==="select"?[]:S.type==="check"?!1:S.type==="radio-button"?((M=(L=S.options)==null?void 0:L[0])==null?void 0:M.value)||null:S.type==="select-simple"&&((z=(A=S.options)==null?void 0:A[0])==null?void 0:z.value)||null}),v.componentId===13&&h.value.some(S=>S!=null&&(Array.isArray(S)?S.length>0:S!==!1&&S!==""))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};l(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!k){const S=!(()=>{const L=h.value[1];return L==null?!1:Array.isArray(L)?L.length>0:L!==""})();o(h.value[0],S)}})},300),t.watch(()=>v.initialValues,S=>{const L=!p(h.value,S),M=S&&S.length>0&&!k&&L,A=v.isEditMode&&k;M&&!A?h.value=[...S]:k?T&&T.length>0&&(h.value=[...T]):A&&T&&T.length>0&&(h.value=[...T])},{deep:!0}),t.watch(()=>v.isEditMode,(S,L)=>{L===!0&&S===!1&&x()},{immediate:!0}),t.watch(h,(S,L)=>{S.some(M=>M!=null&&(Array.isArray(M)?M.length>0:M!==!1&&M!==""))&&i(S,u)&&(u=[...S],$("filters-changed",{componentId:v.componentId,filters:S,timestamp:new Date().toISOString()}))},{deep:!0,flush:"post"}),t.watch(()=>h.value[0],(S,L)=>{S!==L&&L!==void 0?o(S,!0):L===void 0&&S!==null&&S!==void 0&&o(S,!1)},{immediate:!0}),t.watch(()=>h.value,(S,L)=>{v.filters.map((M,A)=>M.type==="radio-button"?A:-1).filter(M=>M!==-1).forEach(M=>{})},{deep:!0}),t.watch(n,()=>{},{deep:!0});const s=S=>{c.value===S?c.value=null:c.value=S},f=(S,L)=>{if(k=!0,d(),h.value[S]=L,(S===0||S===1)&&(T=[...h.value]),c.value=null,S===0){h.value[1]!==void 0&&(h.value[1]=null);const M=k;k=!1,o(L,!0),k=M,h.value[1]!==null&&h.value[1]!==void 0&&(T=[...h.value])}},g=()=>{k=!0,setTimeout(()=>{k=!1},1e3)};return r({getCurrentValues:()=>h.value,initializeValues:l}),(S,L)=>(t.openBlock(),t.createElementBlock("div",wYe,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(M,A)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:A},[M.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",TYe,[t.createElementVNode("div",SYe,t.toDisplayString(M.label),1),t.createElementVNode("div",kYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.options,z=>(t.openBlock(),t.createElementBlock("label",{key:z.value,class:t.normalizeClass(["radio-option-card",{active:h.value[A]===z.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"table-radio-"+A,value:z.value,"onUpdate:modelValue":I=>h.value[A]=I,onChange:L[0]||(L[0]=()=>{g()}),onClick:I=>console.log("Click en radio button",A,z.value,"Valor actual:",h.value[A])},null,40,LYe),[[t.vModelRadio,h.value[A]]]),t.createElementVNode("span",null,t.toDisplayString(z.label),1)],2))),128))])])):M.type==="select-simple"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"custom-select dynamic-select filter-inline","data-filter-type":M.type,onClick:t.withModifiers(z=>s(A),["stop"]),onMousedown:z=>console.log("Mouse down en selector",A),onMouseup:z=>console.log("Mouse up en selector",A)},[t.createElementVNode("div",CYe,[L[2]||(L[2]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",NYe,t.toDisplayString(M.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:c.value===A}])},[...L[1]||(L[1]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),c.value===A?(t.openBlock(),t.createElementBlock("div",OYe,[t.createElementVNode("div",MYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(A===1?n.value:M.options,z=>(t.openBlock(),t.createElementBlock("div",{key:z.value,class:t.normalizeClass(["option-card simple-select-option",{active:p(h.value[A],z.value)}]),onClick:t.withModifiers(I=>f(A,z.value),["stop"])},[t.createElementVNode("div",zYe,[t.createElementVNode("div",PYe,t.toDisplayString(z.label),1)]),p(h.value[A],z.value)?(t.openBlock(),t.createElementBlock("div",AYe,[...L[3]||(L[3]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,VYe))),128))])])):t.createCommentVNode("",!0)],40,EYe)):t.createCommentVNode("",!0),A===1&&e.filters.length>2?(t.openBlock(),t.createElementBlock("div",RYe)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},FYe=t2(UYe,[["__scopeId","data-v-9d00f072"]]),IYe={class:"strengths-filters"},qYe={key:0,class:"custom-radio-group filter-inline"},jYe={class:"radio-label"},WYe={class:"radio-options"},DYe=["name","value","onUpdate:modelValue"],KYe={class:"filter-inline select-with-label"},BYe=["data-filter-type","onClick"],XYe={class:"select-display"},GYe={class:"select-label"},ZYe={key:0,class:"dropdown-menu type-menu simple-select-menu"},JYe={class:"simple-select-scroll-area"},HYe=["onClick"],YYe={class:"option-content"},QYe={class:"option-title"},$Ye={key:0,class:"option-checkmark"},eQe={key:2,class:"filter-separator"},tQe={__name:"StrengthsFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:15}},emits:["filters-changed","filter-updated"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=t.ref(null),p=t.ref([]);let c=!1,n=null;const k=(s,f)=>{if(Array.isArray(s)&&Array.isArray(f)){if(s.length!==f.length)return!1;for(let g=0;g<s.length;g++)if(s[g]!==f[g])return!1;return!0}return s===f},T=(s,f=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]&&v.filters[1].options){const g=v.filters[0].options,S=v.filters[1].options;s!=null?g.findIndex(L=>L.value===s)!==-1&&S[s]?(p.value=S[s],f&&!(()=>{const L=h.value[1];return L==null?!1:Array.isArray(L)?L.length>0:L!==""})()&&!c&&p.value.length>0&&(h.value[1]=p.value[0].value,t.nextTick(()=>{}))):(p.value=[],h.value[1]=null):(p.value=[],h.value[1]=null)}},x=()=>{if(v.initialValues&&v.initialValues.length>0){const f=v.initialValues.length>0&&(typeof v.initialValues[0]=="number"||typeof v.initialValues[0]=="boolean"||v.initialValues[0]===null||Array.isArray(v.initialValues[0]));console.log("StrengthsFilters initializeValues - isSimpleFormat:",f),f?(console.log("StrengthsFilters initializeValues - Usando formato simple, valores:",v.initialValues),h.value=[...v.initialValues]):v.isEditMode?h.value=v.filters.map((g,S)=>{var L,M,A,z,I,j,F,W,U,O;const X=v.initialValues[S];if(console.log(`StrengthsFilters initializeValues - filter[${S}]:`,g==null?void 0:g.type,"filterData:",X),!X)return console.log(`StrengthsFilters initializeValues - No hay filterData para índice ${S}, usando valor por defecto`),g.type==="select"?[]:g.type==="check"?!1:g.type==="radio-button"?((M=(L=g.options)==null?void 0:L[0])==null?void 0:M.value)||null:g.type==="select-simple"&&((z=(A=g.options)==null?void 0:A[0])==null?void 0:z.value)||null;if(g.type==="radio-button"&&X.selectedOption){console.log("StrengthsFilters initializeValues - filterData.selectedOption: ",X.selectedOption,"index:",S);const N=X.selectedOption.value;return console.log("StrengthsFilters initializeValues - selectedValue extraído:",N),N}else{if(g.type==="radio-button"&&!X.selectedOption)return console.log("StrengthsFilters initializeValues - filterData NO tiene selectedOption:",X,"index:",S),X.selectedValue!==void 0?(console.log("StrengthsFilters initializeValues - Usando selectedValue:",X.selectedValue),X.selectedValue):(console.log("StrengthsFilters initializeValues - Usando valor por defecto del filter"),((j=(I=g.options)==null?void 0:I[0])==null?void 0:j.value)||null);if(g.type==="select-simple"&&X.selectedValue!==void 0)return Array.isArray(X.selectedValue)?X.selectedValue[0]:X.selectedValue;if(g.type==="select"&&X.selectedOptions)return X.selectedOptions.map(N=>N.value);if(g.type==="check"&&X.isChecked!==void 0)return X.isChecked}return X.selectedValue!==void 0?X.selectedValue:g.type==="select"?[]:g.type==="check"?!1:g.type==="radio-button"?((W=(F=g.options)==null?void 0:F[0])==null?void 0:W.value)||null:g.type==="select-simple"&&((O=(U=g.options)==null?void 0:U[0])==null?void 0:O.value)||null}):h.value=[...v.initialValues]}else h.value=v.filters.map(f=>{var g,S,L,M;return f.type==="select"?[]:f.type==="check"?!1:f.type==="radio-button"?((S=(g=f.options)==null?void 0:g[0])==null?void 0:S.value)||null:f.type==="select-simple"&&((M=(L=f.options)==null?void 0:L[0])==null?void 0:M.value)||null});console.log("StrengthsFilters initializeValues - selectedValues.value final:",h.value);const s=h.value.some(f=>f!=null&&(Array.isArray(f)?f.length>0:f!==!1&&f!==""));console.log("StrengthsFilters initializeValues - hasValidValues:",s),s&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};x(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!c){const s=!(()=>{const f=h.value[1];return f==null?!1:Array.isArray(f)?f.length>0:f!==""})();T(h.value[0],s)}})},300),t.watch(()=>v.initialValues,(s,f)=>{if(!s||s.length===0)return;console.log("StrengthsFilters watch initialValues - newValues:",s),console.log("StrengthsFilters watch initialValues - oldValues:",f),console.log("StrengthsFilters watch initialValues - props.isEditMode:",v.isEditMode),console.log("StrengthsFilters watch initialValues - isUserInteracting:",c);const g=s.length>0&&(typeof s[0]=="number"||typeof s[0]=="boolean"||s[0]===null||Array.isArray(s[0]));console.log("StrengthsFilters watch initialValues - isSimpleFormat:",g);const S=!k(h.value,s),L=s&&s.length>0&&!c&&S,M=v.isEditMode&&c;console.log("StrengthsFilters watch initialValues - valuesAreDifferent:",S,"shouldUpdate:",L,"isEditModeProtection:",M),L&&!M?g?(console.log("StrengthsFilters watch initialValues - Usando formato simple, valores:",s),h.value=[...s]):v.isEditMode?h.value=v.filters.map((A,z)=>{const I=s[z];if(!I)return console.log("StrengthsFilters watch initialValues - No hay filterData para índice",z),h.value[z];if(A.type==="radio-button"&&I.selectedOption){console.log("StrengthsFilters watch initialValues - filterData.selectedOption: ",I.selectedOption,"index:",z);const j=I.selectedOption.value;return console.log("StrengthsFilters watch initialValues - selectedValue extraído:",j),j}else{if(A.type==="select-simple"&&I.selectedValue!==void 0)return Array.isArray(I.selectedValue)?I.selectedValue[0]:I.selectedValue;if(A.type==="select"&&I.selectedOptions)return I.selectedOptions.map(j=>j.value);if(A.type==="check"&&I.isChecked!==void 0)return I.isChecked}return I.selectedValue!==void 0?I.selectedValue:h.value[z]}):h.value=[...s]:c?n&&n.length>0&&(h.value=[...n]):M&&n&&n.length>0&&(h.value=[...n])},{deep:!0}),t.watch(()=>v.isEditMode,(s,f)=>{f===!0&&s===!1&&(n=null)},{immediate:!0}),t.watch(h,s=>{s.some(f=>f!=null&&(Array.isArray(f)?f.length>0:f!==!1&&f!==""))&&(()=>{if(!u)return!0;for(let f=0;f<s.length;f++)if(!k(s[f],u[f]))return!0;return!1})()&&(u=[...s],$("filters-changed",{componentId:v.componentId,filters:s,timestamp:new Date().toISOString()}))},{deep:!0,flush:"post"}),t.watch(()=>h.value[0],(s,f)=>{s!==f&&f!==void 0?T(s,!0):f===void 0&&s!==null&&s!==void 0&&T(s,!1)},{immediate:!0});const d=s=>{i.value===s?i.value=null:i.value=s},o=(s,f)=>{if(c=!0,setTimeout(()=>{c=!1},1e3),h.value[s]=f,(s===0||s===1)&&(n=[...h.value]),i.value=null,s===0){h.value[1]!==void 0&&(h.value[1]=null);const g=c;c=!1,T(f,!0),c=g,h.value[1]!==null&&h.value[1]!==void 0&&(n=[...h.value])}},l=()=>{c=!0,setTimeout(()=>{c=!1},400)};return r({getCurrentValues:()=>h.value,initializeValues:x}),(s,f)=>(t.openBlock(),t.createElementBlock("div",IYe,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(g,S)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:S},[g.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",qYe,[t.createElementVNode("div",jYe,t.toDisplayString(g.label),1),t.createElementVNode("div",WYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,L=>(t.openBlock(),t.createElementBlock("label",{key:L.value,class:t.normalizeClass(["radio-option-card",{active:h.value[S]===L.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"strengths-radio-"+S,value:L.value,"onUpdate:modelValue":M=>h.value[S]=M,onChange:l},null,40,DYe),[[t.vModelRadio,h.value[S]]]),t.createElementVNode("span",null,t.toDisplayString(L.label),1)],2))),128))])])):g.type==="select-simple"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[f[4]||(f[4]=t.createElementVNode("div",{class:"filter-separator"},null,-1)),t.createElementVNode("div",KYe,[f[3]||(f[3]=t.createElementVNode("div",{class:"radio-label"},"Mostrar: ",-1)),t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline","data-filter-type":g.type,onClick:t.withModifiers(L=>d(S),["stop"])},[t.createElementVNode("div",XYe,[f[1]||(f[1]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",GYe,t.toDisplayString(g.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:i.value===S}])},[...f[0]||(f[0]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),i.value===S?(t.openBlock(),t.createElementBlock("div",ZYe,[t.createElementVNode("div",JYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,L=>(t.openBlock(),t.createElementBlock("div",{key:L.value,class:t.normalizeClass(["option-card simple-select-option",{active:k(h.value[S],L.value)}]),onClick:t.withModifiers(M=>o(S,L.value),["stop"])},[t.createElementVNode("div",YYe,[t.createElementVNode("div",QYe,t.toDisplayString(L.label),1)]),k(h.value[S],L.value)?(t.openBlock(),t.createElementBlock("div",$Ye,[...f[2]||(f[2]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,HYe))),128))])])):t.createCommentVNode("",!0)],8,BYe)])],64)):t.createCommentVNode("",!0),S===1&&e.filters.length>2?(t.openBlock(),t.createElementBlock("div",eQe)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},rQe=t2(tQe,[["__scopeId","data-v-4c3876bd"]]),aQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},nQe={key:1},iQe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oQe=["fill"],sQe={key:0,class:"checkbox__teams"},lQe={class:"checkbox__teams__logo"},cQe=["src"],uQe={class:"checkbox__teams__logo"},dQe=["src"],pQe={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",nQe,[(t.openBlock(),t.createElementBlock("svg",iQe,[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,oQe)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",sQe,[t.createElementVNode("div",lQe,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,cQe)]),t.createElementVNode("div",uQe,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,dQe)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},iA=aQe(pQe,[["__scopeId","data-v-b6f124d8"]]),hQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},oA={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))}}},FZ=()=>{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}))},IZ=oA.setup;oA.setup=IZ?(e,r)=>(FZ(),IZ(e,r)):FZ;const fQe=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),mQe=["src"],yQe={key:1,class:"text"},gQe=["src"],vQe={class:"stats"},bQe=fQe(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xQe={class:"numstats"},_Qe={class:"leyend"};function wQe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",$.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([h.customStyle,$.status&&a.typeOnOff&&h.customActive]),onClick:r[0]||(r[0]=(...u)=>h.btnClick&&h.btnClick(...u))},[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,mQe)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",yQe,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,gQe)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...u)=>h.btnClick&&h.btnClick(...u))},[t.createElementVNode("div",vQe,[bQe,t.createElementVNode("div",xQe,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",_Qe,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const TQe=hQe(oA,[["render",wQe],["__scopeId","data-v-f3ee6b2b"]]),SQe={class:"gsc-dropdown__main-container__item-selected"},kQe=["height","width"],LQe=["stroke"],EQe={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},CQe=["fill"],NQe={class:"gsc-dropdown__items-container"},OQe=["onClick"],MQe={key:0,class:"gsc-dropdown__items-footer"},$k={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(r=>r in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(e){return[1,2].includes(e)}}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:r}){const a=e,v=t.ref({}),$=t.ref(null),h=t.ref(a.isMultipleOption?-1:0),u=t.ref(!1);t.watch(()=>a.items,(x,d)=>{if(!a.modelValue&&(!a.onlyFirstTime||!d||!d.length)&&x&&x.length){if(a.defaultItemByProp){const o=a.items.findIndex(l=>l[a.defaultItemByProp.propName]===a.defaultItemByProp.value);o!==-1?(h.value=o,v.value=x[o]):(h.value=0,v.value=x[0])}else v.value=x[a.defaultItemByIndex];r("input",v.value)}},{immediate:!0}),t.watch(()=>a.modelValue,x=>{if(x){const d=a.items.findIndex(o=>typeof x=="object"?JSON.stringify(o)===JSON.stringify(x):o===x);d!==-1&&(h.value=d,v.value=a.items[d],r("update:modelValue",v.value))}},{immediate:!0});const i=t.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),p=t.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(u.value=!u.value)}function n(x){$.value&&!$.value.contains(x.target)&&(u.value=!1)}function k(x,d){a.isMultipleOption?h.value=-1:(h.value=d,u.value=!1),v.value=x,r("input",v.value),r("update:modelValue",v.value)}function T(){u.value=!1,r("click-ready")}return t.onMounted(()=>{document.addEventListener("click",n)}),t.onBeforeMount(()=>{document.removeEventListener("click",n)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"dropDown",ref:$,class:"gsc-dropdown",style:t.normalizeStyle(i.value)},[t.createElementVNode("div",{class:"gsc-dropdown__main-container",style:t.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[t.createElementVNode("div",SQe,[t.renderSlot(x.$slots,"default",{selectedItem:v.value})]),t.createElementVNode("div",{class:t.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":u.value}]),style:t.normalizeStyle(p.value)},[e.iconType===1?(t.openBlock(),t.createElementBlock("svg",{key:0,height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,LQe)],8,kQe)):(t.openBlock(),t.createElementBlock("svg",EQe,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,CQe)]))],6)],4),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",NQe,[t.createElementVNode("div",null,[t.createElementVNode("div",{class:"gsc-dropdown__items",style:t.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-dropdown__items__item",{selected:l===h.value}]),key:l,onClick:s=>k(o,l)},[t.renderSlot(x.$slots,"availableItem",{item:o})],10,OQe)),[[t.vShow,!o.isHidden]])]))),256))],4),e.isFooterVisible?(t.openBlock(),t.createElementBlock("div",MQe,[t.createVNode(t.unref(TQe),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:T})])):t.createCommentVNode("",!0)])],512),[[t.vShow,u.value]])]),_:3})],4))}},sA={borderType:"solid",listBackgroundColor:"#2E3B46",listBorderColor:"rgba(255, 255, 255, 0.2)",listBorderRadius:"5px",height:"38px",borderWidth:.8,borderColor:"rgba(255, 255, 255, 0.2)",backgroundColor:"#2E3B46",color:"white",listItemColor:"white",listItemSelectedBackgroundColor:"#2E3B46",arrowColor:"#fff",width:"100%",listHeight:"200px",isListSameWidth:!1,isFooterVisible:!1,hoverBackgroundColor:"#2E3B46",iconType:2},VQe=[{label:"Goles recibidos",value:{name:"Goles recibidos",color:"#336DFF",points:[1,2,3],categories:[40],invert:[57,326,56,60,59,55],negative:!1,translationKey:"chalkboard.defensive.team.goals_received",singleName:"Gol recibido"}},{label:"Tiros a gol recibidos",value:{name:"Tiros a gol recibidos",color:"#7ED321",points:[1,2,3],categories:["510_r"],invert:[510],negative:!1,translationKey:"chalkboard.defensive.team.shots_on_goal_received",singleName:"Tiro a gol recibido"}},{label:"Tiros a gol recibidos (portería)",value:{name:"Tiros a gol recibidos (portería)",color:"#990BFF",points:[1,2,3],categories:["537_r","540_r","544_r","547_r"],invert:[537,540,544,547],negative:!1,translationKey:"chalkboard.defensive.team.shots_on_goal_received",singleName:"Tiro a gol recibido"}},{label:"Centros totales recibidos",value:{name:"Centros totales recibidos",color:"#FF9226",points:[1,2,3],categories:["13_r","25_r"],invert:[13,25],negative:!1,translationKey:"chalkboard.defensive.team.total_centers_received",singleName:"Centro recibido"}},{label:"Centros acertados por el rival",value:{name:"Centros acertados por el rival",color:"#28A3B2",points:[1,2,3],categories:["98_r","101_r","104_r","105_r","109_r","112_r","115_r","116_r"],invert:[98,101,104,105,109,112,115,116],negative:!1,translationKey:"chalkboard.defensive.team.successful_centers_by_opponent",singleName:"Centro acertado"}},{label:"Fuera de lugar provocados",value:{name:"Fuera de lugar provocados",color:"#00DD00",points:[1,2,3],categories:["33_r"],invert:[33],negative:!1,translationKey:"chalkboard.defensive.team.offsides_caused",singleName:"Fuera de lugar"}},{label:"Balones recuperados (en disputa)",value:{name:"Balones recuperados (en disputa)",color:"#FF3399",points:[1,2,3],categories:[483],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_recovered_in_challenge",singleName:"Balón recuperado",isDefaultSelected:!0}},{label:"Balones recuperados (sin disputa)",value:{name:"Balones recuperados (sin disputa)",color:"#B4005A",points:[1,2,3],categories:[484],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_recovered_without_challenge",singleName:"Balón recuperado"}},{label:"1 vs 1 exitosos defensivos",value:{name:"1 vs 1 exitosos defensivos",color:"#3A3838",points:[1],categories:[5],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.successful_1_on_1",singleName:"1 vs 1 defensivo"}},{label:"1 vs 1 no exitosos defensivos",value:{name:"1 vs 1 no exitosos defensivos",color:"#008B31",points:[1],categories:[209],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.unsuccessful_1_on_1",singleName:"1 vs 1 defensivo"}},{label:"Balones ganados en área propia",value:{name:"Balones ganados en área propia",color:"#305496",points:[1,2],categories:[23],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_won_own_penalty_box",singleName:"Balón ganado"}},{label:"Juego aéreo resto del campo",value:{name:"Juego aéreo resto del campo",color:"#FF8A4C",points:[1,2,3],categories:[24],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.arial_game_rest_pitch",singleName:"Juego aéreo"}},{label:"Barridas",value:{name:"Barridas",color:"#700000",points:[1],categories:[518],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.slide_tackles",singleName:"Barrida"}},{label:"Rechaces",value:{name:"Rechaces",color:"#CC0000",points:[1,2,3],categories:[34],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.clearances",singleName:"Rechace"}}],zQe=[{label:"Goles",value:{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,"35_r","54_r"],invert:[35,54],negative:!1,translationKey:"chalkboard.offensive.team.goals",singleName:"Gol",isDefaultSelected:!0}},{label:"Tiros a gol",value:{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[510],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.shots_on_goal",singleName:"Tiro a gol",isDefaultSelected:!1}},{label:"Tiros a gol (portería)",value:{name:"Tiros a gol (portería)",color:"#990BFF",points:[1,2,3],categories:[537,540,544,547],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.shots_on_goal_2",singleName:"Tiro a gol (portería)",isDefaultSelected:!1}},{label:"Centros totales",value:{name:"Centros totales",color:"#FF9226",points:[1,2,3],categories:[13,25],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.center_crosses",singleName:"Centro",isDefaultSelected:!1}},{label:"Centros acertados",value:{name:"Centros acertados",color:"#28A3B2",points:[1,2,3],categories:[98,101,104,105,109,112,115,116],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.successful_center_crosses",singleName:"Centro acertado",isDefaultSelected:!1}},{label:"Balones ganados en área rival",value:{name:"Balones ganados en área rival",color:"#FF0092",points:[1,2],categories:[11],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.balls_won_opponent_penalty_box",singleName:"Balón ganado",isDefaultSelected:!1}},{label:"1vs1 exitosos ofensivos",value:{name:"1vs1 exitosos ofensivos",color:"#3A3838",points:[1],categories:[4],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.successful_1_on_1_attacking",singleName:"1 vs 1 ofensivo",isDefaultSelected:!1}},{label:"1vs1 no exitosos ofensivos",value:{name:"1vs1 no exitosos ofensivos",color:"#008B31",points:[1],categories:[208],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.unsuccessful_1_on_1_attacking",singleName:"1 vs 1 ofensivo",isDefaultSelected:!1}},{label:"Remates con cabeza",value:{name:"Remates con cabeza",color:"#B4005A",points:[1,2,3],categories:[330,331,333,334,423,424,343,344],invert:[],negative:!1,translationKey:"",singleName:"Remate con cabeza",isDefaultSelected:!1}},{label:"Balón perdido en disputa",value:{name:"Balón perdido en disputa",color:"#9C08B0",points:[1,2,3],categories:[494],invert:[],negative:!1,translationKey:"",singleName:"Balón perdido en disputa",isDefaultSelected:!1}},{label:"Balón perdido sin disputa",value:{name:"Balón perdido sin disputa",color:"#700000",points:[1,2,3],categories:[495],invert:[],negative:!1,translationKey:"",singleName:"Balón perdido sin disputa",isDefaultSelected:!1}}],PQe={class:"last-touch"},AQe={class:"selected-item"},RQe={class:"available-item"},UQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},FQe={class:"selected-item"},IQe={class:"available-item"},qQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jQe={key:1},WQe={class:"selected-item"},DQe={class:"available-item"},KQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},BQe={class:"last-touch__how-many-games"},XQe={class:"selected-item"},GQe={class:"available-item"},ZQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},JQe={__name:"FilterLastTouch",props:{viewConfig:{type:Object,default:()=>({})},isEditMode:{type:Boolean,default:!1},defaultFilters:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!0}},emits:["change","remove-views"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([{label:"Ofensivo",value:2,name:"offensive"},{label:"Defensivo",value:3,name:"defensive"}]),h=t.ref({id:0,name:"Fases de juego",value:null}),u=t.ref(!1),i=t.ref([{id:1,name:"Último partido",value:1},{id:3,name:"Últimos 3 partidos",value:3},{id:0,name:"Todos mis partidos",value:0}]),p=t.ref(a.defaultFilters?null:i.value[0]),c=t.ref(null),n=t.computed(()=>({...sA})),k=t.computed(()=>({...sA,isFooterVisible:!a.isEditMode,isMultipleOption:!a.isEditMode})),T=t.computed(()=>{const ge=[];return x.value.options.forEach(be=>{be.forEach(xe=>{ge.push(xe)})}),ge}),x=t.ref(null),d=t.ref(null),o=t.ref(null),l=t.ref(null);t.watch(()=>a.viewConfig,ge=>{ge.filters&&(x.value||s(),d.value||f(),o.value||g(),l.value||A())},{immediate:!0});function s(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="categories");ge&&ge.options&&(x.value={label:ge.label,options:Object.entries(ge.options).reduce((be,[xe,Ae])=>(be.set(Number(xe),Ae),be),new Map)})}x.value={label:"Tipo de jugada",options:new Map([[2,zQe],[3,VQe]])}}function f(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="gamePhases");if(ge){d.value={label:ge.label,options:ge.options};return}}d.value={label:"Fases de juego",options:$.value}}function g(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="teamRadios");if(ge){o.value={options:ge.options},U(null,ge.options[0]);return}}o.value={label:"Equipo",options:a.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]},U(null,o.value.options[0])}const S=t.ref(a.defaultFilters?null:o.value.options[0]),L=t.ref(a.defaultFilters?null:d.value.options[0]),M=t.ref(a.defaultFilters?null:x.value.options.get(L.value.value)[0]);function A(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="assistZoneCheckbox");if(ge){l.value={label:ge.label},O(ge.value);return}}l.value={label:"Zona de asistencia"}}const z=t.computed(()=>{const ge={selectedGamePhase:L.value,selectedTeam:S.value,isAssistZoneVisible:u.value,howManyGamesSelected:p.value};return a.isEditMode?(ge.selectedCategory=M.value,ge.totalCategoriesSelected=1):(ge.selectedCategories=c.value,ge.totalCategoriesSelected=0,x.value.options.forEach(be=>{be.forEach(xe=>{xe.isSelected&&(ge.totalCategoriesSelected+=1)})})),ge}),I=t.computed(()=>L.value?x.value.options.get(L.value.value)||[]:[]);t.watch(()=>z.value,ge=>{j()&&(console.log("before emit change:",{areAllFiltersFilled:j(),filters:ge,view:a.viewConfig}),v("change",{areAllFiltersFilled:j(),filters:ge,view:a.viewConfig}))},{deep:!0});function j(){return L.value&&(a.isEditMode&&M.value||!a.isEditMode&&c.value&&c.value.length)&&S.value&&p.value}function F(ge){L.value=ge,N(null)}function W(ge){S.value=ge}function U(ge,be){console.log("onChangeRadio:",be.value)}function O(ge){u.value=ge}function X(ge){p.value=ge}function N(ge){M.value=ge}function Y(ge,be){be.isSelected=ge,c.value=T.value.filter(xe=>xe.isSelected)}function se(){a.defaultFilters&&(u.value=a.defaultFilters.isAssistZoneVisible,p.value=i.value.find(ge=>ge.value===a.defaultFilters.howManyGamesSelected.value)||i.value[0],L.value=d.value.options.find(ge=>ge.value===a.defaultFilters.selectedGamePhase.value)||d.value.options[0],S.value=o.value.options.find(ge=>ge.value===(a.defaultFilters.isHomeTeam?1:2))||o.value.options[0],M.value=x.value.options.get(L.value.value).find(ge=>ge.value.name===a.defaultFilters.selectedCategory.name)||x.value.options.get(L.value.value)[0])}function me(){I.value.forEach(ge=>{ge.isSelected=!1}),u.value=!1,p.value=i.value[0],L.value=null,S.value=null,M.value=null,c.value=null}return t.onBeforeUnmount(()=>{me()}),t.onMounted(()=>{setTimeout(()=>{se()},500)}),(ge,be)=>(t.openBlock(),t.createElementBlock("div",PQe,[t.createVNode(t.unref($k),t.mergeProps(n.value,{items:d.value.options,"model-value":L.value,"onUpdate:modelValue":F}),{default:t.withCtx(()=>[t.createElementVNode("div",AQe,[be[0]||(be[0]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(L.value?L.value.label:d.value.label||h.value.name),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",RQe,[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",UQe,[...be[1]||(be[1]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,L.value&&L.value.label===xe.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($k),t.mergeProps(k.value,{items:I.value,"model-value":M.value,"onUpdate:modelValue":N}),{default:t.withCtx(()=>[t.createElementVNode("div",FQe,[be[2]||(be[2]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(x.value.label),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",IQe,[e.isEditMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",qQe,[...be[3]||(be[3]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,M.value&&M.value.label===xe.label]])])],64)):(t.openBlock(),t.createElementBlock("div",jQe,[t.createVNode(t.unref(iA),{"model-value":xe.isSelected,label:xe.label,"onUpdate:modelValue":Ae=>Y(Ae,xe)},null,8,["model-value","label","onUpdate:modelValue"])]))])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($k),t.mergeProps(n.value,{items:o.value.options,"model-value":S.value,"onUpdate:modelValue":W}),{default:t.withCtx(()=>[t.createElementVNode("div",WQe,[be[4]||(be[4]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(S.value?S.value.label:o.value.label),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",DQe,[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",KQe,[...be[5]||(be[5]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,S.value&&S.value.label===xe.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref(iA),{"model-value":u.value,label:l.value.label,"onUpdate:modelValue":O},null,8,["model-value","label"]),t.withDirectives(t.createElementVNode("div",BQe,[t.createVNode(t.unref($k),t.mergeProps(n.value,{items:i.value,"model-value":p.value,"onUpdate:modelValue":X}),{default:t.withCtx(()=>[t.createElementVNode("div",XQe,[be[6]||(be[6]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(p.value?p.value.name:"Seleccione"),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",GQe,[t.createElementVNode("div",null,t.toDisplayString(xe.name),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",ZQe,[...be[7]||(be[7]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,p.value&&p.value.name===xe.name]])])])]),_:1},16,["items","model-value"])],512),[[t.vShow,!e.isPostMatch]])]))}},HQe=t2(JQe,[["__scopeId","data-v-b006bd89"]]),YQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},QQe={__name:"GSC-Menu",props:{menuMarginTop:{type:Number,default:0,validator(e){return!Number.isNaN(e)}},modelValue:{type:Boolean,default:!1},width:{type:String,default:"fit-content"},menuWidth:{type:String,default:"fit-content"},zIndexOpen:{type:Number,default:3},leftMenu:{type:String,default:"unset"}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e;t.useCssVars(x=>({"398d9242":e.width,f164e302:p.value,"4bb88040":e.menuWidth}));const v=t.ref(null),$=t.ref(!1),h=t.ref(null),u=t.ref({}),i=t.computed(()=>{const x={top:"0px","--left-menu":a.leftMenu};if(v.value){const d=v.value.getBoundingClientRect();x.top=`${d.height+a.menuMarginTop}px`}return x}),p=t.computed(()=>$.value?a.zIndexOpen:1);t.watch(()=>a.modelValue,x=>{x!==$.value&&($.value=x)},{immediate:!0}),t.watch($,x=>{x||setTimeout(()=>{u.value["--translate-x"]="0px"},500)});function c(x){const d=window.innerWidth,o=x.boundingClientRect.x,l=x.boundingClientRect.x+x.boundingClientRect.width,s=o<=0?Math.abs(o)+4:l>=d?d-(l+10):0;u.value["--translate-x"]=`${s}px`}function n(){new IntersectionObserver(x=>{x[0].intersectionRatio>0&&c(x[0])}).observe(h.value)}function k(){$.value=!$.value,r("update:modelValue",$.value)}function T(){$.value=!1,r("update:modelValue",$.value)}return t.onMounted(()=>{t.nextTick(()=>{n()})}),(x,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[$.value?(t.openBlock(),t.createElementBlock("div",{key:0,id:"menu-overlay",onClick:T})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"menu-container",style:t.normalizeStyle(u.value)},[t.createElementVNode("div",{ref_key:"trigger",ref:v,class:"menu-container__trigger",onClick:k},[t.renderSlot(x.$slots,"trigger",{},void 0,!0)],512),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{ref_key:"menu",ref:h,class:"menu-container__menu",style:t.normalizeStyle(i.value)},[t.renderSlot(x.$slots,"menu",{},void 0,!0)],4),[[t.vShow,$.value]])]),_:3})],4)],64))}},$Qe=YQe(QQe,[["__scopeId","data-v-18c0df61"]]),Kb={CORNERS_ADVANCED:"cornersAdvanced"},e$e={key:0,class:"button__icon"},t$e={key:0,width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r$e=["stroke"],a$e=["stroke"],n$e=["stroke"],i$e={key:1,width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o$e=["stroke"],s$e=["stroke"],l$e=["fill"],c$e={key:2,width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u$e=["fill"],d$e={key:3,width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p$e=["stroke"],h$e=["stroke"],f$e=["stroke"],m$e=["stroke"],y$e=["stroke"],g$e={key:4,width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v$e={key:5,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b$e={key:6,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x$e={key:7,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_$e={key:8,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w$e={class:"button__text"},T$e={key:0,class:"info-container"},S$e={key:1,style:{width:"20px"}},k$e={width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L$e=["fill"],E$e={__name:"ButtonFilter",props:{isActive:{type:Boolean,default:!1},showBadge:{type:Boolean,default:!0},showBadgeOnFilterFull:{type:Boolean,default:!0},text:{type:String,default:""},infoValue:{type:[String,Number],default:""},filtersTotal:{type:Number,default:0},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"14px"},fontColor:{type:String,default:"white"},infoBackgroundColor:{type:String,default:"#424D58"},infoFontColor:{type:String,default:"#CBEE6B"},infoFontFamily:{type:String,default:"sans-serif"},infoFontSize:{type:String,default:"10px"},infoBorderColor:{type:String,default:"#0D1D29"},infoBorderRadius:{type:String,default:"4px"},infoHeight:{type:String,default:"20px"},infoWidth:{type:String,default:"20px"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#0D1D29"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"#172531"},borderColorActive:{type:String,default:"white"},borderWidth:{type:String,default:"1px"},padding:{type:String,default:"12px"},arrowColor:{type:String,default:"#92929D"},iconColor:{type:String,default:"#92929D"},iconType:{type:String,default:"productivity"},showIcon:{type:Boolean,default:!0}},setup(e){const r=e,a=t.computed(()=>({"--height":r.height,"--width":r.width,"--text-font-family":r.textFontFamily,"--text-font-size":r.textFontSize,"--background-color":r.backgroundColor,"--border-radius":r.borderRadius,"--border-color":r.isActive?r.borderColorActive:r.borderColor,"--border-width":r.borderWidth,"--padding":r.padding,"--font-color":r.fontColor})),v=t.computed(()=>({"--info-background-color":r.infoValue?r.infoBackgroundColor:"transparent","--info-border-color":r.infoValue?r.infoBorderColor:"transparent","--info-border-radius":r.infoBorderRadius,"--info-font-family":r.infoFontFamily,"--info-font-size":r.infoFontSize,"--info-font-color":r.infoFontColor,"--info-height":r.infoHeight,"--info-width":r.infoWidth})),$=t.computed(()=>[Kb.PLAYS_TYPES,Kb.GOLSTATS,Kb.TOURNAMENTS,Kb.PLAYS,Kb.RESULTS,Kb.RESULTS_BY_TIME].includes(r.iconType)),h=t.computed(()=>[Kb.FIELD,Kb.GAMES].includes(r.iconType)),u=t.computed(()=>[Kb.DETAILS,Kb.UNIVERSE].includes(r.iconType)),i=t.computed(()=>[Kb.PERSONAL_DATA].includes(r.iconType)),p=t.computed(()=>[Kb.PRODUCTIVITY].includes(r.iconType)),c=t.computed(()=>(console.log("props.iconType",r.iconType),[Kb.CORNERS_ADVANCED].includes(r.iconType))),n=t.computed(()=>[Kb.HOW_WAS_CORNER].includes(r.iconType)),k=t.computed(()=>[Kb.TAKEN_CORNERS].includes(r.iconType)),T=t.computed(()=>[Kb.ZONE].includes(r.iconType)),x=t.computed(()=>[Kb.WHAT_HAPPENED].includes(r.iconType));return(d,o)=>(t.openBlock(),t.createElementBlock("div",{class:"button",style:t.normalizeStyle(a.value)},[e.showIcon?(t.openBlock(),t.createElementBlock("div",e$e,[i.value?(t.openBlock(),t.createElementBlock("svg",t$e,[t.createElementVNode("path",{d:"M12.6665 16.0001V14.3334C12.6665 13.4494 12.3153 12.6015 11.6902 11.9764C11.0651 11.3513 10.2173 11.0001 9.33323 11.0001H4.33329C3.44925 11.0001 2.60141 11.3513 1.9763 11.9764C1.35119 12.6015 1 13.4494 1 14.3334V16.0001",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,r$e),t.createElementVNode("path",{d:"M6.83329 7.66658C8.67422 7.66658 10.1666 6.17422 10.1666 4.33329C10.1666 2.49237 8.67422 1 6.83329 1C4.99237 1 3.5 2.49237 3.5 4.33329C3.5 6.17422 4.99237 7.66658 6.83329 7.66658Z",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,a$e),t.createElementVNode("path",{d:"M15.164 5.16663V10.1666M17.664 7.66659H12.6641",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,n$e)])):t.createCommentVNode("",!0),$.value||c.value?(t.openBlock(),t.createElementBlock("svg",i$e,[t.createElementVNode("path",{d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:e.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,o$e),t.createElementVNode("path",{d:"M15.9996 16.8727L14.8359 15.7091",stroke:e.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,s$e),t.createElementVNode("path",{d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:e.iconColor,stroke:"#353F47","stroke-width":"0.3"},null,8,l$e)])):t.createCommentVNode("",!0),u.value?(t.openBlock(),t.createElementBlock("svg",c$e,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 0C13.1944 0 17 3.80558 17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0ZM8.49751 1.54553C4.65662 1.54553 1.54297 4.65919 1.54297 8.50008C1.54297 12.341 4.65662 15.4546 8.49751 15.4546C12.3384 15.4546 15.4521 12.341 15.4521 8.50008C15.4521 4.65919 12.3384 1.54553 8.49751 1.54553ZM8.49929 3.09082C8.92605 3.09082 9.27202 3.43678 9.27202 3.86355V8.12198L12.451 10.5945C12.7878 10.8565 12.8485 11.342 12.5865 11.6789C12.3245 12.0157 11.839 12.0764 11.5022 11.8144L8.02488 9.10986C7.83666 8.96347 7.72656 8.73837 7.72656 8.49991V3.86355C7.72656 3.43678 8.07252 3.09082 8.49929 3.09082Z",fill:e.iconColor},null,8,u$e)])):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createElementBlock("svg",d$e,[t.createElementVNode("rect",{x:"1.16772",y:"1.16699",width:"19",height:"15.6667",stroke:e.iconColor},null,8,p$e),t.createElementVNode("rect",{x:"16.1677",y:"6.16699",width:"4",height:"5.66667",stroke:e.iconColor},null,8,h$e),t.createElementVNode("rect",{x:"1.16772",y:"6.16699",width:"4",height:"5.66667",stroke:e.iconColor},null,8,f$e),t.createElementVNode("path",{d:"M10.6677 0.666992V16.5003",stroke:e.iconColor},null,8,m$e),t.createElementVNode("path",{d:"M13.5033 9.00032C13.5033 10.5651 12.2348 11.8337 10.67 11.8337C9.1052 11.8337 7.83667 10.5651 7.83667 9.00032C7.83667 7.43552 9.1052 6.16699 10.67 6.16699C12.2348 6.16699 13.5033 7.43552 13.5033 9.00032Z",stroke:e.iconColor},null,8,y$e)])):t.createCommentVNode("",!0),p.value?(t.openBlock(),t.createElementBlock("svg",g$e,[...o[0]||(o[0]=[t.createElementVNode("path",{d:"M1.85113 13.0897C1.9303 13.2137 2.01739 13.3404 2.10447 13.4617C2.30239 13.7361 2.51878 14 2.74837 14.2507C3.74589 15.3298 5.01785 16.1504 6.41385 16.5963C6.4719 16.6148 6.52996 16.6332 6.58802 16.6491C6.60385 16.6544 6.61704 16.657 6.63024 16.6623C6.70413 16.6834 6.77538 16.7045 6.84927 16.723C7.54859 16.9077 8.27429 17 9.00264 17C9.73098 17 10.4593 16.9077 11.1586 16.7256C11.3064 16.686 11.4542 16.6438 11.5967 16.5989C11.9187 16.496 12.2353 16.372 12.5414 16.2322C12.7895 16.1187 13.0296 15.9921 13.2645 15.8549C14.2963 15.2533 15.2041 14.438 15.9034 13.467C15.9668 13.3799 16.0301 13.2876 16.0908 13.1926C16.1119 13.1609 16.133 13.1293 16.1541 13.095C16.9432 11.8681 17.405 10.4486 17.4868 8.98945C17.4947 8.84169 17.5 8.69393 17.5 8.54618C17.5 8.53034 17.5 8.51715 17.5 8.50132C17.5 6.90765 17.0646 5.37995 16.2386 4.04222C16.1198 3.85224 15.9932 3.66491 15.8612 3.48021C15.8586 3.47493 15.8559 3.4723 15.8533 3.46702C15.8084 3.40633 15.7636 3.34565 15.7161 3.2876C15.6712 3.22955 15.6237 3.1715 15.5789 3.1161C14.6526 1.98417 13.4466 1.10818 12.0928 0.580475C11.9556 0.525066 11.8105 0.474934 11.668 0.42744C10.8103 0.145118 9.91307 0 9.00264 0C8.09221 0 7.19497 0.14248 6.33732 0.424802C6.19482 0.472295 6.04967 0.525066 5.91245 0.577836C4.55604 1.10554 3.35005 1.98417 2.42378 3.11346C2.37364 3.17678 2.32086 3.24011 2.27072 3.30607C2.2285 3.35884 2.18892 3.41161 2.14933 3.46702C2.14933 3.46702 2.14933 3.46966 2.14669 3.4723C2.14669 3.47493 2.14405 3.47757 2.14142 3.48021C1.43418 4.44591 0.94598 5.53034 0.69792 6.68074C0.660975 6.85224 0.626669 7.02639 0.600279 7.20053C0.571251 7.39578 0.547501 7.59103 0.531667 7.78892C0.521111 7.91293 0.513195 8.03694 0.507917 8.16095C0.502639 8.27441 0.5 8.38786 0.5 8.50132V8.61214C0.502639 8.73615 0.507917 8.8628 0.513195 8.98945C0.595002 10.4486 1.05681 11.8681 1.84586 13.0923L1.85113 13.0897ZM1.82738 7.64908C1.82738 7.63325 1.83002 7.62005 1.83266 7.60422C1.84322 7.52771 1.85377 7.45119 1.86433 7.37731C1.86433 7.36412 1.86697 7.35092 1.86961 7.33773C1.8828 7.25594 1.89863 7.1715 1.91447 7.08971C1.91711 7.07124 1.92238 7.05541 1.92502 7.03694C1.94086 6.95778 1.95933 6.87599 1.9778 6.79683V6.78628C1.99891 6.70449 2.02266 6.62269 2.04378 6.5409C2.04905 6.52243 2.05433 6.5066 2.05961 6.48813C2.08336 6.40897 2.10711 6.32718 2.1335 6.24802L2.14142 6.22164C2.16517 6.14776 2.19156 6.07652 2.21794 6.00264C2.22322 5.98681 2.23114 5.97098 2.23642 5.95515C2.26545 5.87863 2.29711 5.79947 2.32878 5.72559C2.33406 5.70976 2.34197 5.69657 2.34725 5.68338C2.37628 5.61478 2.40795 5.54617 2.43962 5.47757C2.44489 5.46702 2.45017 5.45383 2.45545 5.44063C2.48975 5.36676 2.5267 5.29024 2.56628 5.21636C2.5742 5.20053 2.58212 5.1847 2.59267 5.16887C2.63226 5.09499 2.6692 5.02375 2.71143 4.94987V4.94195H2.7167L3.2656 6.63061L1.82738 7.67546C1.82738 7.67546 1.82738 7.65699 1.83002 7.64908H1.82738ZM4.08367 7.6095L5.62745 8.31926L6.52204 11.0712L5.62481 12.1108H2.74309C2.23642 11.2348 1.92238 10.2612 1.81683 9.25594L4.08367 7.6095ZM7.58026 1.41161C7.65942 1.39578 7.74123 1.37995 7.8204 1.36675C7.84151 1.36412 7.86262 1.35884 7.88109 1.3562C7.96026 1.34301 8.03679 1.33245 8.11596 1.32454C8.13971 1.3219 8.16346 1.31926 8.18721 1.31662C8.24791 1.30871 8.30596 1.30343 8.36666 1.29815C8.39305 1.29815 8.42207 1.29288 8.44846 1.29024C8.52235 1.28496 8.59361 1.27968 8.6675 1.27705C8.69916 1.27705 8.73347 1.27441 8.76514 1.27177C8.82319 1.27177 8.88125 1.26913 8.94194 1.26913C8.98153 1.26913 9.01847 1.26913 9.05806 1.26913C9.11611 1.26913 9.17681 1.26913 9.23487 1.27177C9.26653 1.27177 9.30084 1.27177 9.33251 1.27705C9.4064 1.27968 9.48029 1.28496 9.55154 1.29024C9.58057 1.29024 9.60696 1.29551 9.63334 1.29815C9.69404 1.30343 9.75473 1.30871 9.81279 1.31662C9.83654 1.31926 9.86029 1.3219 9.88668 1.32454C9.96585 1.33509 10.045 1.34565 10.1215 1.3562L10.1849 1.36675C10.264 1.37995 10.3459 1.39314 10.425 1.41161C10.4277 1.41161 10.4303 1.41161 10.4356 1.41161H10.4382L9 2.45646L7.56178 1.41161H7.56442C7.56442 1.41161 7.5697 1.41161 7.57234 1.41161H7.58026ZM9.00528 6.56728L11.1138 8.10026L10.3089 10.5805H7.70165L6.89677 8.10026L9.00528 6.56728ZM15.3018 4.94459V4.94987C15.3466 5.02111 15.3862 5.09499 15.4232 5.16887L15.4469 5.21636C15.4839 5.29024 15.5208 5.36676 15.5577 5.44063C15.563 5.45119 15.5683 5.46438 15.5736 5.47493C15.6052 5.54354 15.6369 5.61214 15.6659 5.68338C15.6712 5.69657 15.6791 5.7124 15.6844 5.72559C15.7161 5.80211 15.7478 5.87863 15.7768 5.95778C15.7821 5.97361 15.79 5.98945 15.7953 6.00528C15.8216 6.07916 15.848 6.1504 15.8718 6.22428C15.8744 6.23219 15.8771 6.24011 15.8797 6.25066C15.9061 6.32982 15.9298 6.40897 15.9536 6.49077C15.9589 6.50923 15.9641 6.52771 15.9694 6.54618C15.9905 6.62797 16.0143 6.70976 16.0328 6.78892C16.0328 6.7942 16.0328 6.79683 16.0328 6.80211C16.0512 6.88127 16.0697 6.96042 16.0855 7.03958L16.0961 7.09235C16.1119 7.17414 16.1278 7.25594 16.141 7.33773C16.141 7.35092 16.1462 7.36412 16.1462 7.37731C16.1568 7.45119 16.1673 7.52771 16.1779 7.60422C16.1779 7.62005 16.1805 7.63325 16.1832 7.64908C16.1832 7.65699 16.1832 7.66755 16.1858 7.67546L14.7476 6.63061L15.2965 4.93931L15.3018 4.94459ZM13.9295 7.61214L16.1937 9.25858C16.0882 10.2639 15.7715 11.2401 15.2675 12.1135H12.3858L11.4912 11.0739L12.3858 8.3219L13.9295 7.61214ZM14.3306 13.3879C14.3306 13.3879 14.3254 13.3931 14.3227 13.3958C14.2673 13.4565 14.2093 13.5172 14.1512 13.5752C14.138 13.5884 14.1248 13.6016 14.1116 13.6148C14.0536 13.6728 13.9929 13.7309 13.9322 13.7889C13.9216 13.7995 13.9111 13.81 13.8979 13.8206C13.8424 13.8707 13.7844 13.9235 13.729 13.971C13.7184 13.9789 13.7079 13.9894 13.6973 14C13.634 14.0554 13.5706 14.1055 13.5047 14.1583C13.4888 14.1715 13.473 14.1821 13.4598 14.1953C13.3938 14.2454 13.3278 14.2955 13.2619 14.3456C13.2619 14.3456 13.2566 14.3483 13.2566 14.3509C13.188 14.4011 13.1194 14.4486 13.0481 14.496C13.0323 14.5066 13.0165 14.5172 12.998 14.5277C12.9294 14.5726 12.8581 14.6174 12.7895 14.6623C12.7763 14.6702 12.7658 14.6781 12.7526 14.6834C12.6892 14.723 12.6233 14.7599 12.5573 14.7968C12.5441 14.8048 12.5283 14.8127 12.5151 14.8206C12.4438 14.8602 12.3699 14.8997 12.296 14.9367C12.2802 14.9446 12.2617 14.9525 12.2459 14.9631C12.1746 15 12.1007 15.0343 12.0295 15.0686C12.0242 15.0686 12.0189 15.0739 12.0137 15.0765H12.0084L12.5573 13.3879H14.3306ZM6.00217 15.0765L5.98898 15.0712C5.91509 15.0369 5.8412 15 5.76731 14.9631C5.75147 14.9551 5.73564 14.9472 5.71981 14.9393C5.64592 14.9024 5.57203 14.8628 5.49814 14.8206C5.48494 14.8127 5.47175 14.8048 5.45855 14.7995C5.39258 14.7625 5.32661 14.723 5.26063 14.6834C5.25008 14.6781 5.23688 14.6702 5.22633 14.6623C5.15508 14.6201 5.08646 14.5726 5.01521 14.5277C4.99938 14.5172 4.98355 14.5066 4.96771 14.496C4.89646 14.4486 4.82785 14.4011 4.75924 14.3509H4.75396C4.68799 14.2982 4.61937 14.248 4.5534 14.1953C4.53757 14.1821 4.52437 14.1715 4.50854 14.1583C4.44256 14.1055 4.37923 14.0554 4.3159 14C4.30534 13.9894 4.29478 13.9815 4.28159 13.971C4.22353 13.9208 4.16812 13.8707 4.1127 13.8206C4.10214 13.81 4.08895 13.7995 4.07839 13.7889C4.0177 13.7335 3.957 13.6755 3.89894 13.6148C3.88575 13.6016 3.87256 13.5884 3.85936 13.5752C3.8013 13.5172 3.74589 13.4591 3.69047 13.3984C3.68783 13.3958 3.68519 13.3931 3.67991 13.3879H5.45328L6.00217 15.0765C6.00217 15.0765 5.99954 15.0765 5.9969 15.0765H6.00217ZM7.50636 15.5726L6.63552 12.8971L7.53012 11.8602H10.4804L11.375 12.8971L10.5042 15.5726C9.52251 15.7784 8.48805 15.781 7.50373 15.5726H7.50636ZM14.3755 3.66755L13.4809 6.41953L11.9371 7.12929L9.6439 5.46174V3.57784L11.9503 1.90237C12.8713 2.31135 13.6999 2.91557 14.3781 3.66755H14.3755ZM6.06287 1.90237L8.3693 3.57784V5.46174L6.07606 7.12929L4.53229 6.41953L3.63769 3.66755C4.3159 2.91557 5.14452 2.31398 6.06551 1.90237H6.06287Z",fill:"#979DA2"},null,-1)])])):t.createCommentVNode("",!0),k.value?(t.openBlock(),t.createElementBlock("svg",v$e,[...o[1]||(o[1]=[t.createElementVNode("path",{d:"M17.182 5.9a.538.538 0 0 0-.13-.416L14.24 2.109a.558.558 0 0 0-.433-.203h-2.25c-.017 0-.034.012-.056.012a.557.557 0 0 0-.563.41 1.68 1.68 0 0 1-1.63 1.266 1.68 1.68 0 0 1-1.632-1.266.55.55 0 0 0-.563-.41c-.017 0-.033-.012-.056-.012h-2.25a.558.558 0 0 0-.433.203L1.561 5.484a.586.586 0 0 0-.129.416c.017.152.09.287.208.382l2.605 2.082v8.167c0 .31.253.563.562.563h9c.31 0 .563-.253.563-.563V8.364l2.604-2.082a.59.59 0 0 0 .208-.382zm-3.937 4.444H5.37V9.78h7.875v.563zM5.37 15.969v-4.5h7.875v4.5H5.37zm9-9.045v-.518a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v2.25H5.37v-2.25a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v.518L2.793 5.765l2.278-2.734h1.66A2.802 2.802 0 0 0 9.307 4.72a2.803 2.803 0 0 0 2.576-1.688h1.66l2.278 2.734-1.451 1.159z",fill:"#98A2B3"},null,-1)])])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createElementBlock("svg",b$e,[...o[2]||(o[2]=[t.createElementVNode("path",{d:"M15.426 3.353a2.384 2.384 0 0 0-2.381 2.381 2.384 2.384 0 0 0 2.381 2.382 2.384 2.384 0 0 0 2.381-2.382 2.384 2.384 0 0 0-2.381-2.38zm0 3.766a1.386 1.386 0 0 1-1.385-1.385c0-.763.622-1.384 1.385-1.384s1.385.621 1.385 1.384c0 .764-.622 1.385-1.385 1.385zM1.424 6.558a.497.497 0 0 0 .704 0l1.295-1.296L4.72 6.558a.497.497 0 0 0 .704 0 .498.498 0 0 0 0-.705L4.128 4.558l1.295-1.295a.498.498 0 0 0-.705-.705L3.423 3.853 2.128 2.558a.499.499 0 0 0-.704.705l1.295 1.295-1.295 1.295a.498.498 0 0 0 0 .705zM13.013 12.443a.498.498 0 0 0-.705 0l-1.295 1.295-1.295-1.295a.499.499 0 0 0-.704.704l1.295 1.295-1.295 1.295a.499.499 0 0 0 .704.705l1.295-1.295 1.295 1.295a.497.497 0 0 0 .705 0 .498.498 0 0 0 0-.705l-1.295-1.295 1.295-1.295a.498.498 0 0 0 0-.704zM12.052 5.455l-2.01-1.747a.498.498 0 0 0-.654.753l1.066.926c-3.145.411-5.008 2.055-6.043 3.444a9.569 9.569 0 0 0-1.501 3.012 2.384 2.384 0 0 0-2.103 2.364 2.384 2.384 0 0 0 2.381 2.381 2.384 2.384 0 0 0 2.381-2.381 2.385 2.385 0 0 0-1.647-2.265 8.674 8.674 0 0 1 1.312-2.547C6.53 7.674 8.33 6.66 10.594 6.372l-.992 1.142a.498.498 0 0 0 .752.654l1.747-2.01a.498.498 0 0 0-.05-.703zm-7.48 8.752c0 .763-.62 1.384-1.384 1.384a1.386 1.386 0 0 1-1.384-1.384c0-.764.62-1.385 1.384-1.385.763 0 1.385.622 1.385 1.385z",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":".3"},null,-1)])])):t.createCommentVNode("",!0),T.value?(t.openBlock(),t.createElementBlock("svg",x$e,[...o[3]||(o[3]=[t.createElementVNode("rect",{x:".707",y:".9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:"8.707",y:".9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:".707",y:"8.9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:"8.707",y:"8.9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)])])):t.createCommentVNode("",!0),x.value?(t.openBlock(),t.createElementBlock("svg",_$e,[...o[4]||(o[4]=[t.createStaticVNode('<g clip-path="url(#gpdeo9cu3a)" fill="#98A2B3" data-v-2df3c6a9><path d="M9.307.5C4.505.5.598 4.407.598 9.209c0 2 .69 3.938 1.946 5.486l-.754 3.159a.524.524 0 0 0 .727.599l3.038-1.384a8.743 8.743 0 0 0 3.752.848c4.802 0 8.709-3.907 8.709-8.708C18.016 4.407 14.109.5 9.307.5zm0 16.368a7.574 7.574 0 0 1-3.502-.845.525.525 0 0 0-.457-.011l-2.289 1.042.566-2.372a.524.524 0 0 0-.113-.465A7.657 7.657 0 0 1 1.647 9.21c0-4.224 3.436-7.66 7.66-7.66s7.66 3.436 7.66 7.66c0 4.223-3.436 7.66-7.66 7.66z" data-v-2df3c6a9></path><path d="M9.68 5.199c-1.094-.115-2.459.397-3.041 1.797a.524.524 0 0 0 .968.403c.375-.902 1.255-1.231 1.964-1.157.721.075 1.232.542 1.365 1.25.13.693-.136 1.097-1.097 1.662-1.042.613-1.372.874-1.372 2.27a.524.524 0 0 0 1.049 0c0-.479.033-.715.118-.843.094-.14.33-.283.737-.523.666-.392 1.905-1.12 1.596-2.76-.221-1.171-1.098-1.975-2.288-2.1zM9.145 12.673a.608.608 0 0 0-.506.17c-.13.13-.19.31-.17.505a.525.525 0 0 0 .939.263.523.523 0 0 0-.263-.938z" data-v-2df3c6a9></path></g><defs data-v-2df3c6a9><clipPath id="gpdeo9cu3a" data-v-2df3c6a9><path fill="#fff" transform="translate(.307 .5)" d="M0 0h18v18H0z" data-v-2df3c6a9></path></clipPath></defs>',2)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",w$e,t.toDisplayString(e.text),1),e.showBadge?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.showBadgeOnFilterFull?(t.openBlock(),t.createElementBlock("div",T$e,[t.createElementVNode("div",{class:"button__info",style:t.normalizeStyle(v.value)},[t.withDirectives(t.createElementVNode("span",null,t.toDisplayString(e.infoValue),513),[[t.vShow,e.infoValue]])],4)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.filtersTotal>0&&e.filtersTotal!=parseInt(e.infoValue)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"button__info",style:t.normalizeStyle(v.value)},[t.withDirectives(t.createElementVNode("span",null,t.toDisplayString(e.infoValue),513),[[t.vShow,e.infoValue]])],4)):e.filtersTotal>0?(t.openBlock(),t.createElementBlock("div",S$e)):t.createCommentVNode("",!0)],64))],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["button__arrow",{"rotated-180":e.isActive}])},[(t.openBlock(),t.createElementBlock("svg",k$e,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,L$e)]))],2)],4))}},C$e=t2(E$e,[["__scopeId","data-v-2df3c6a9"]]),N$e={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(null);t.watch(()=>a.modelValue,()=>{h()},{immediate:!0});function h(){$.value&&($.value.checked=a.modelValue)}function u(i){v("update:modelValue",i.target.checked)}return t.onMounted(()=>{h()}),(i,p)=>(t.openBlock(),t.createElementBlock("input",{ref_key:"switchCustom",ref:$,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:u},null,544))}},lA=t2(N$e,[["__scopeId","data-v-e3a6ae4e"]]),O$e={class:"corners"},M$e={class:"corners-type"},V$e={class:"selected-item"},z$e={class:"available-item"},P$e={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A$e={class:"advanced-filters-menu"},R$e={class:"toggle-group"},U$e={class:"toggle-group"},F$e={key:0,class:"time-control"},I$e={class:"stepper-container"},q$e={class:"stepper"},j$e={class:"stepper-value"},W$e={class:"time-control"},D$e={class:"stepper-container"},K$e={class:"stepper"},B$e={class:"stepper-value"},X$e={class:"time-control"},G$e={class:"stepper-container"},Z$e={class:"stepper"},J$e={class:"stepper-value"},H$e={class:"corners__how-many-games"},Y$e={class:"selected-item"},Q$e={class:"available-item"},$$e={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eet={__name:"FilterCorners",props:{viewConfig:{type:Object,default:()=>({})},isEditMode:{type:Boolean,default:!1},defaultFilters:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!0}},emits:["change","remove-views"],setup(e,{emit:r}){var a;const v=Array.from({length:10}).map((A,z)=>({id:z+1,name:`${z+1} ${z===0?"corner":"corners"}`,value:z+1})),$=e,h=r,u=t.ref([...v]),i=t.ref(u.value[0]),p=t.ref(l()),c=t.ref({backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"0 4px",textFontFamily:"'Poppins-Regular'",showIcon:!1}),n=t.ref({label:"Equipo",options:$.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]}),k=t.ref(!1),T=t.ref($.defaultFilters?$.defaultFilters.isAgainstMode:!1),x=t.ref($.defaultFilters?null:(a=n.value)==null?void 0:a.options[0]),d=t.computed(()=>({...sA}));t.watch(()=>$.viewConfig,A=>{A.filters&&(n.value||s())},{immediate:!0});const o=t.computed(()=>({isAgainstMode:T.value,selectedTeam:x.value,howManyCorners:i.value?i.value.value:null,advancedFilters:{...p.value}}));t.watch(()=>o.value,A=>{console.log("before emit change",A),console.log("props.viewConfig",$.viewConfig),h("change",{filters:{...A,advancedFilters:{...A.advancedFilters,areConnectionsVisible:!A.advancedFilters.areConnectionsVisible,arePathsVisible:!A.advancedFilters.arePathsVisible}},view:$.viewConfig})},{deep:!0,immediate:!0});function l(){return{areConnectionsVisible:!0,arePathsVisible:!0,secondsBefore:-1,secondsAfter:0,secondsBeforeAndAfter:0}}function s(){if($.viewConfig&&$.viewConfig.filters){const A=$.viewConfig.filters.find(z=>z.key==="teamRadios");if(A){n.value={options:A.options};return}}n.value={label:"Equipo",options:$.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]}}function f(){console.log("setDefaultValues called with props.defaultFilters:",$.defaultFilters),$.defaultFilters&&(x.value=n.value.options.find(A=>A.value===($.defaultFilters.isHomeTeam?1:2))||n.value.options[0],p.value={...$.defaultFilters.advancedFilters,areConnectionsVisible:!$.defaultFilters.advancedFilters.areConnectionsVisible,arePathsVisible:!$.defaultFilters.advancedFilters.arePathsVisible})}function g(A){x.value=A}function S(A){i.value=A}function L(A,z){const I=p.value[z]+A;if(!(I<-5||I>10)){if(["secondsBefore","secondsAfter"].includes(z)){if(z==="secondsBefore"){if(p.value.secondsAfter<I)return}else if(p.value.secondsBefore>I)return}p.value[z]=I}}function M(){k.value=!1}return t.onBeforeUnmount(()=>{}),t.onMounted(()=>{setTimeout(()=>{f()},500)}),(A,z)=>(t.openBlock(),t.createElementBlock("div",O$e,[t.withDirectives(t.createElementVNode("div",M$e,[t.createElementVNode("div",{class:t.normalizeClass(["label",{"switch-selected":!T.value}])}," A favor ",2),t.createVNode(lA,{modelValue:T.value,"onUpdate:modelValue":z[0]||(z[0]=I=>T.value=I)},null,8,["modelValue"]),t.createElementVNode("div",{class:t.normalizeClass(["label",{"switch-selected":T.value}])}," En contra ",2)],512),[[t.vShow,!e.isPostMatch]]),t.createVNode(t.unref($k),t.mergeProps(d.value,{items:n.value.options,"model-value":x.value,"onUpdate:modelValue":g}),{default:t.withCtx(()=>[t.createElementVNode("div",V$e,[z[10]||(z[10]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(x.value?x.value.label:n.value.label),1)])]),availableItem:t.withCtx(({item:I})=>[t.createElementVNode("div",z$e,[t.createElementVNode("div",null,t.toDisplayString(I.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",P$e,[...z[11]||(z[11]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,x.value&&x.value.label===I.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($Qe),{modelValue:k.value,"onUpdate:modelValue":z[9]||(z[9]=I=>k.value=I),width:"250px","left-menu":"0","menu-margin-top":18},{trigger:t.withCtx(()=>[t.createVNode(C$e,t.mergeProps(c.value,{text:"Filtros avanzados","show-badge-on-filter-full":!1,"filters-total":0,"is-active":k.value,"show-icon":!0,"icon-type":t.unref(Kb).CORNERS_ADVANCED}),null,16,["is-active","icon-type"])]),menu:t.withCtx(()=>[t.createElementVNode("div",A$e,[z[22]||(z[22]=t.createElementVNode("h2",{class:"menu-title"},"Mostrar Conexiones",-1)),t.createElementVNode("div",R$e,[z[12]||(z[12]=t.createElementVNode("label",{class:"toggle-label"},"Sí",-1)),t.createVNode(lA,{modelValue:p.value.areConnectionsVisible,"onUpdate:modelValue":z[1]||(z[1]=I=>p.value.areConnectionsVisible=I)},null,8,["modelValue"]),z[13]||(z[13]=t.createElementVNode("label",{class:"toggle-label"},"No",-1))]),z[23]||(z[23]=t.createElementVNode("hr",{class:"separator"},null,-1)),z[24]||(z[24]=t.createElementVNode("h2",{class:"menu-title"},"Mostrar recorridos",-1)),t.createElementVNode("div",U$e,[z[14]||(z[14]=t.createElementVNode("label",{class:"toggle-label"},"Sí",-1)),t.createVNode(lA,{modelValue:p.value.arePathsVisible,"onUpdate:modelValue":z[2]||(z[2]=I=>p.value.arePathsVisible=I)},null,8,["modelValue"]),z[15]||(z[15]=t.createElementVNode("label",{class:"toggle-label"},"No",-1))]),p.value.arePathsVisible?(t.openBlock(),t.createElementBlock("div",F$e,[z[17]||(z[17]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"antes"),t.createTextVNode(" / "),t.createElementVNode("span",{class:"highlight"},"después"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",I$e,[t.createElementVNode("div",q$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[3]||(z[3]=I=>L(-1,"secondsBeforeAndAfter"))},"−"),t.createElementVNode("span",j$e,t.toDisplayString(p.value.secondsBeforeAndAfter),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[4]||(z[4]=I=>L(1,"secondsBeforeAndAfter"))},"+")]),z[16]||(z[16]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",W$e,[z[19]||(z[19]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"antes"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",D$e,[t.createElementVNode("div",K$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[5]||(z[5]=I=>L(-1,"secondsBefore"))},"−"),t.createElementVNode("span",B$e,t.toDisplayString(p.value.secondsBefore),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[6]||(z[6]=I=>L(1,"secondsBefore"))},"+")]),z[18]||(z[18]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])]),t.createElementVNode("div",X$e,[z[21]||(z[21]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"después"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",G$e,[t.createElementVNode("div",Z$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[7]||(z[7]=I=>L(-1,"secondsAfter"))},"−"),t.createElementVNode("span",J$e,t.toDisplayString(p.value.secondsAfter),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[8]||(z[8]=I=>L(1,"secondsAfter"))},"+")]),z[20]||(z[20]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])])],64)),z[25]||(z[25]=t.createElementVNode("hr",{class:"separator"},null,-1)),t.createElementVNode("button",{class:"btn-ready",onClick:M},"Listo")])]),_:1},8,["modelValue"]),t.withDirectives(t.createElementVNode("div",H$e,[t.createVNode(t.unref($k),t.mergeProps(d.value,{items:u.value,"model-value":i.value,"onUpdate:modelValue":S}),{default:t.withCtx(()=>[t.createElementVNode("div",Y$e,[z[26]||(z[26]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(i.value?i.value.name:"Seleccione"),1)])]),availableItem:t.withCtx(({item:I})=>[t.createElementVNode("div",Q$e,[t.createElementVNode("div",null,t.toDisplayString(I.name),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",$$e,[...z[27]||(z[27]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,i.value&&i.value.name===I.name]])])])]),_:1},16,["items","model-value"])],512),[[t.vShow,!e.defaultFilters]])]))}},tet=t2(eet,[["__scopeId","data-v-fea60946"]]),ret={class:"resultados-filter"},aet={class:"filter-checkboxes"},net=["checked","disabled","onChange"],iet={class:"checkbox-label"},oet={class:"filter-actions"},set={__name:"ResultadosFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"iba-ganando",label:"Iba ganando"},{value:"iba-perdiendo",label:"Iba perdiendo"},{value:"iba-empatado",label:"Iba empatado"}],h=t.ref([]);t.watch(()=>a.selectedValues,k=>{var T;if(console.log("[ResultadosFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:k,filterValue:k==null?void 0:k[a.filterIndex],optionValue:(T=k==null?void 0:k[a.filterIndex])==null?void 0:T[a.optionIndex],isArray:Array.isArray(k),filterValueType:typeof(k==null?void 0:k[a.filterIndex])}),!k||!Array.isArray(k)){h.value.length===0&&(console.log("[ResultadosFilter] No hay valores en props, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"]);return}const x=k[a.filterIndex];if(x&&typeof x=="object"&&!Array.isArray(x))if(x[a.optionIndex]!==void 0){const d=Array.isArray(x[a.optionIndex])?x[a.optionIndex]:[];console.log("[ResultadosFilter] Valores encontrados para sincronizar:",d,"localSelectedValues actual:",h.value);const o=JSON.stringify(h.value.sort()),l=JSON.stringify(d.sort());o!==l?(console.log("[ResultadosFilter] Actualizando localSelectedValues con:",d),h.value=d.length>0?[...d]:[]):console.log("[ResultadosFilter] Los valores ya están sincronizados, no se actualiza");return}else console.log("[ResultadosFilter] filterValue existe pero no tiene optionIndex",a.optionIndex,"filterValue keys:",Object.keys(x));else console.log("[ResultadosFilter] filterValue no es un objeto válido:",x);h.value.length===0&&(console.log("[ResultadosFilter] No se encontraron valores guardados, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"])},{immediate:!0,deep:!0}),t.onMounted(()=>{var k,T,x;console.log("[ResultadosFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(k=a.selectedValues)==null?void 0:k[a.filterIndex],optionValue:(x=(T=a.selectedValues)==null?void 0:T[a.filterIndex])==null?void 0:x[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const d=a.selectedValues[a.filterIndex];if(d&&typeof d=="object"&&!Array.isArray(d)&&d[a.optionIndex]!==void 0){const o=Array.isArray(d[a.optionIndex])?d[a.optionIndex]:[];if(console.log("[ResultadosFilter] onMounted - Valores encontrados:",o),o.length>0){console.log("[ResultadosFilter] onMounted - Actualizando localSelectedValues con:",o),h.value=[...o];return}}}h.value.length===0&&(console.log("[ResultadosFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"])})});const u=k=>h.value.includes(k),i=k=>h.value.length===1&&h.value.includes(k),p=(k,T)=>{let x=[...h.value];if(T)x.includes(k)||x.push(k);else{if(x.length===1)return;x=x.filter(d=>d!==k)}x.length===0&&(x=[$[0].value]),h.value=x,v("update-selection",{optionIndex:a.optionIndex,values:x})},c=()=>{const k=$.map(T=>T.value);h.value=[...k],v("update-selection",{optionIndex:a.optionIndex,values:[...k]})},n=()=>{v("done")};return(k,T)=>(t.openBlock(),t.createElementBlock("div",ret,[t.createElementVNode("div",aet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,x=>t.createElementVNode("label",{key:x.value,class:"checkbox-item"},[t.createElementVNode("input",{type:"checkbox",checked:u(x.value),disabled:i(x.value),onChange:t.withModifiers(d=>p(x.value,d.target.checked),["stop"])},null,40,net),t.createElementVNode("span",iet,t.toDisplayString(x.label),1)])),64))]),t.createElementVNode("div",oet,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(c,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(n,["stop"])}," Listo ")])]))}},SN=t2(set,[["__scopeId","data-v-6b648e3f"]]),cet={class:"detalles-filter"},uet={class:"filter-header"},det={class:"checkbox-todos"},pet=["checked"],het={class:"time-section"},fet={class:"time-buttons"},met=["onClick"],yet={class:"time-section"},get={class:"time-buttons"},vet=["onClick"],bet={class:"filter-actions"},xet={__name:"DetallesFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"0-15",label:"0-15"},{value:"16-30",label:"16-30"},{value:"31-45",label:"31-45"}],h=[{value:"46-60",label:"46-60"},{value:"61-75",label:"61-75"},{value:"76-90",label:"76-90"}],u=[...$,...h].map(d=>d.value),i=t.ref([]);t.watch(()=>a.selectedValues,d=>{var o;if(console.log("[DetallesFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:d,filterValue:d==null?void 0:d[a.filterIndex],optionValue:(o=d==null?void 0:d[a.filterIndex])==null?void 0:o[a.optionIndex]}),!d||!Array.isArray(d))return;const l=d[a.filterIndex];if(l&&typeof l=="object"&&!Array.isArray(l)&&l[a.optionIndex]!==void 0){const s=Array.isArray(l[a.optionIndex])?l[a.optionIndex]:[];if(console.log("[DetallesFilter] Valores encontrados para sincronizar:",s),s.length>0){const f=JSON.stringify(i.value.sort()),g=JSON.stringify(s.sort());f!==g&&(console.log("[DetallesFilter] Actualizando localSelectedValues con:",s),i.value=[...s])}}},{immediate:!0,deep:!0});const p=t.computed(()=>[...$,...h].map(d=>d.value).every(d=>i.value.includes(d)));t.onMounted(()=>{var d,o,l;console.log("[DetallesFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(d=a.selectedValues)==null?void 0:d[a.filterIndex],optionValue:(l=(o=a.selectedValues)==null?void 0:o[a.filterIndex])==null?void 0:l[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const s=a.selectedValues[a.filterIndex];if(s&&typeof s=="object"&&!Array.isArray(s)&&s[a.optionIndex]!==void 0){const f=Array.isArray(s[a.optionIndex])?s[a.optionIndex]:[];if(console.log("[DetallesFilter] onMounted - Valores encontrados:",f),f.length>0){console.log("[DetallesFilter] onMounted - Actualizando localSelectedValues con:",f),i.value=[...f];return}}}i.value.length===0&&(console.log("[DetallesFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),i.value=[...u])})});const c=d=>i.value.includes(d),n=d=>{const o=d.target.checked;let l=[];o?l=[...$,...h].map(s=>s.value):l=[u[0]],i.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},k=d=>{let o=[...i.value];if(o.includes(d))if(o.length>1)o=o.filter(l=>l!==d);else return;else o.includes(d)||o.push(d);o.length===0&&(o=[u[0]]),i.value=o,v("update-selection",{optionIndex:a.optionIndex,values:o})},T=()=>{const d=[u[0]];i.value=d,v("update-selection",{optionIndex:a.optionIndex,values:d})},x=()=>{v("done")};return(d,o)=>(t.openBlock(),t.createElementBlock("div",cet,[t.createElementVNode("div",uet,[o[1]||(o[1]=t.createElementVNode("span",{class:"filter-title"},"En: (Elige el lapso de tiempo)",-1)),t.createElementVNode("label",det,[t.createElementVNode("input",{type:"checkbox",checked:p.value,onChange:t.withModifiers(n,["stop"])},null,40,pet),o[0]||(o[0]=t.createElementVNode("span",{class:"checkbox-label"},"Todos",-1))])]),t.createElementVNode("div",het,[o[2]||(o[2]=t.createElementVNode("div",{class:"time-label"},"1er tiempo",-1)),t.createElementVNode("div",fet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,l=>t.createElementVNode("button",{key:l.value,class:t.normalizeClass(["time-button",{active:c(l.value)}]),onClick:t.withModifiers(s=>k(l.value),["stop"])},t.toDisplayString(l.label),11,met)),64))])]),t.createElementVNode("div",yet,[o[3]||(o[3]=t.createElementVNode("div",{class:"time-label"},"2do tiempo",-1)),t.createElementVNode("div",get,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(h,l=>t.createElementVNode("button",{key:l.value,class:t.normalizeClass(["time-button",{active:c(l.value)}]),onClick:t.withModifiers(s=>k(l.value),["stop"])},t.toDisplayString(l.label),11,vet)),64))])]),t.createElementVNode("div",bet,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(T,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(x,["stop"])}," Listo ")])]))}},cA=t2(xet,[["__scopeId","data-v-7bea3520"]]),_et={class:"como-fue-cobrado-filter"},wet={class:"cobro-grid"},Tet=["onClick"],ket={class:"cobro-image-container"},Let=["src","alt"],Eet={class:"cobro-footer"},Cet={class:"cobro-label"},Net={class:"filter-actions"},Oet={__name:"ComoFueCobradoFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"comba-afuera",label:"Comba hacia afuera",image:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-izquierda.png",count:10},{value:"comba-adentro",label:"Comba hacia adentro",image:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-izquierda.png",count:2},{value:"raz-area",label:"Raz de área",image:"https://golstatsimages.blob.core.windows.net/content/raz-area-izquierda.png",count:0},{value:"en-corto",label:"En corto",image:"https://golstatsimages.blob.core.windows.net/content/en-corto-izquierda.png",count:1}],h=t.ref([]);t.watch(()=>a.selectedValues,n=>{var k;if(console.log("[ComoFueCobradoFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:n,filterValue:n==null?void 0:n[a.filterIndex],optionValue:(k=n==null?void 0:n[a.filterIndex])==null?void 0:k[a.optionIndex]}),!n||!Array.isArray(n)){h.value.length===0&&(h.value=[...$.map(x=>x.value)]);return}const T=n[a.filterIndex];if(T&&typeof T=="object"&&!Array.isArray(T)&&T[a.optionIndex]!==void 0){const x=Array.isArray(T[a.optionIndex])?T[a.optionIndex]:[];console.log("[ComoFueCobradoFilter] Valores encontrados para sincronizar:",x);const d=JSON.stringify(h.value.sort()),o=JSON.stringify(x.sort());d!==o&&(h.value=x.length>0?[...x]:[]);return}h.value.length===0&&(h.value=[...$.map(x=>x.value)])},{immediate:!0,deep:!0});const u=n=>h.value.includes(n),i=n=>{let k=[...h.value];k.includes(n)?k=k.filter(T=>T!==n):k.push(n),k.length===0&&(k=[...$.map(T=>T.value)]),h.value=k,v("update-selection",{optionIndex:a.optionIndex,values:k})};t.onMounted(()=>{var n,k,T;console.log("[ComoFueCobradoFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(n=a.selectedValues)==null?void 0:n[a.filterIndex],optionValue:(T=(k=a.selectedValues)==null?void 0:k[a.filterIndex])==null?void 0:T[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const x=a.selectedValues[a.filterIndex];if(x&&typeof x=="object"&&!Array.isArray(x)&&x[a.optionIndex]!==void 0){const d=Array.isArray(x[a.optionIndex])?x[a.optionIndex]:[];if(console.log("[ComoFueCobradoFilter] onMounted - Valores encontrados:",d),d.length>0){console.log("[ComoFueCobradoFilter] onMounted - Actualizando localSelectedValues con:",d),h.value=[...d];return}}}h.value.length===0&&(console.log("[ComoFueCobradoFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),h.value=["izquierda",...$.map(x=>x.value)])})});const p=()=>{const n=[...$.map(k=>k.value)];h.value=n,v("update-selection",{optionIndex:a.optionIndex,values:n})},c=()=>{v("done")};return(n,k)=>(t.openBlock(),t.createElementBlock("div",_et,[t.createElementVNode("div",wet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,T=>t.createElementVNode("div",{key:T.value,class:t.normalizeClass(["cobro-item",{active:u(T.value)}]),onClick:t.withModifiers(x=>i(T.value),["stop"])},[t.createElementVNode("div",ket,[t.createElementVNode("img",{src:T.image,alt:T.label,class:"cobro-image"},null,8,Let)]),t.createElementVNode("div",Eet,[t.createElementVNode("span",Cet,t.toDisplayString(T.label),1)])],10,Tet)),64))]),t.createElementVNode("div",Net,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(p,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(c,["stop"])}," Listo ")])]))}},kN=t2(Oet,[["__scopeId","data-v-fb6f9ab9"]]),Met={class:"zona-filter"},Vet={class:"template-zone"},zet={class:"controls-zone-container"},Pet={class:"controls-zone-container-title-checkcon"},Aet={class:"controls-zone-container-title-checkcon-check"},Ret={class:"gsc-field-img-container"},Uet=["fill"],Fet=["fill"],Iet=["fill"],qet=["fill"],jet=["fill"],Wet=["fill"],Det=["fill"],Ket=["fill"],Bet=["fill"],Xet=["fill"],Get=["fill"],Zet=["fill"],Jet=["fill"],Het=["fill"],Yet=["fill"],Qet=["fill"],$et=["fill"],ett=["fill"],ttt=["fill"],rtt=["fill"],att=["fill"],ntt=["fill"],itt=["fill"],ott=["fill"],stt=["fill"],ltt=["fill"],ctt=["fill"],utt=["fill"],dtt=["fill"],ptt=["fill"],htt=["fill"],ftt=["fill"],mtt=["fill"],ytt=["fill"],gtt=["fill"],vtt=["id"],btt=["mask"],xtt={class:"filter-actions"},_tt={__name:"ZonaFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=Array.from({length:35},(x,d)=>d+1),h=t.ref(!0),u=t.ref([]),i=t.computed(()=>u.value),p=t.computed(()=>new Date().getTime());t.watch(()=>a.selectedValues,x=>{var d;if(console.log("[ZonaFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:x,filterValue:x==null?void 0:x[a.filterIndex],optionValue:(d=x==null?void 0:x[a.filterIndex])==null?void 0:d[a.optionIndex]}),!x||!Array.isArray(x)){u.value.length===0&&(console.log("[ZonaFilter] No hay valores en props, usando valores por defecto"),u.value=[...$],h.value=!0);return}const o=x[a.filterIndex];if(o&&typeof o=="object"&&!Array.isArray(o)){if(o[a.optionIndex]!==void 0){const l=Array.isArray(o[a.optionIndex])?o[a.optionIndex]:[];console.log("[ZonaFilter] Valores encontrados para sincronizar:",l);const s=JSON.stringify(u.value.sort((g,S)=>g-S)),f=JSON.stringify(l.sort((g,S)=>g-S));s!==f&&(console.log("[ZonaFilter] Actualizando zonesLocal con:",l),u.value=l.length>0?[...l]:[],h.value=l.length===35);return}}else if(Array.isArray(o)&&o.length>0){console.log("[ZonaFilter] filterValue es array directo:",o);const l=JSON.stringify(u.value.sort((f,g)=>f-g)),s=JSON.stringify(o.sort((f,g)=>f-g));l!==s&&(console.log("[ZonaFilter] Actualizando zonesLocal con array directo:",o),u.value=[...o],h.value=o.length===35);return}u.value.length===0&&(console.log("[ZonaFilter] No se encontraron valores guardados, usando valores por defecto"),u.value=[...$],h.value=!0)},{immediate:!0,deep:!0}),t.watch(u,x=>{h.value=x.length===35,v("update-selection",{optionIndex:a.optionIndex,values:x})},{deep:!0});function c(x){console.log("value clickAllCheckbox: ",x),x?(u.value=[...$],h.value=!0):(u.value=[1],h.value=!1)}function n(x){u.value.includes(x)?u.value=u.value.filter(d=>d!==x):u.value.push(x),h.value=u.value.length===35}const k=()=>{u.value=[...$],h.value=!0},T=()=>{v("done")};return t.onMounted(()=>{var x,d,o;if(console.log("[ZonaFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(x=a.selectedValues)==null?void 0:x[a.filterIndex],optionValue:(o=(d=a.selectedValues)==null?void 0:d[a.filterIndex])==null?void 0:o[a.optionIndex]}),a.selectedValues&&Array.isArray(a.selectedValues)){const l=a.selectedValues[a.filterIndex];if(l&&typeof l=="object"&&!Array.isArray(l)&&l[a.optionIndex]!==void 0){const s=Array.isArray(l[a.optionIndex])?l[a.optionIndex]:[];if(console.log("[ZonaFilter] onMounted - Valores encontrados:",s),s.length>0){console.log("[ZonaFilter] onMounted - Actualizando zonesLocal con:",s),u.value=[...s],h.value=s.length===35;return}}}u.value.length===0&&(console.log("[ZonaFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),u.value=[...$],h.value=!0)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",Met,[t.createElementVNode("div",Vet,[t.createElementVNode("div",zet,[d[36]||(d[36]=t.createElementVNode("div",{class:"controls-zone-container-title"}," ¿A dónde fue el balón?: ",-1)),d[37]||(d[37]=t.createElementVNode("div",{class:"separator-line"},null,-1)),t.createElementVNode("div",Pet,[d[35]||(d[35]=t.createElementVNode("div",{class:"controls-zone-container-title-checkcon-label"}," Todas las zonas ",-1)),t.createElementVNode("div",Aet,[t.createVNode(t.unref(iA),{label:"",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":h.value,"onUpdate:modelValue":c},null,8,["model-value"])])])]),t.createElementVNode("div",Ret,[(t.openBlock(),t.createElementBlock("svg",{key:`field-${u.value.length}`,width:"100%",height:"177",viewBox:"0 0 380 177",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{onClick:d[0]||(d[0]=o=>n(1)),class:"sector-field",x:"0.347042",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:i.value.includes(1)?"#FFFF0030":"#2e3b46"},null,8,Uet),t.createElementVNode("rect",{onClick:d[1]||(d[1]=o=>n(9)),class:"sector-field",x:"288.347",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(9)?"#FFFF0030":"#2e3b46"},null,8,Fet),t.createElementVNode("rect",{onClick:d[2]||(d[2]=o=>n(17)),class:"sector-field",x:"0.347042",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(17)?"#FFFF0030":"#2e3b46"},null,8,Iet),t.createElementVNode("rect",{onClick:d[3]||(d[3]=o=>n(25)),class:"sector-field",x:"288.347",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(25)?"#FFFF0030":"#2e3b46"},null,8,qet),t.createElementVNode("rect",{onClick:d[4]||(d[4]=o=>n(26)),class:"sector-field",x:"0.347042",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(26)?"#FFFF0030":"#2e3b46"},null,8,jet),t.createElementVNode("rect",{onClick:d[5]||(d[5]=o=>n(27)),class:"sector-field",x:"91.347",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(27)?"#FFFF0030":"#2e3b46"},null,8,Wet),t.createElementVNode("rect",{onClick:d[6]||(d[6]=o=>n(28)),class:"sector-field",x:"157.015",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(28)?"#FFFF0030":"#2e3b46"},null,8,Det),t.createElementVNode("rect",{onClick:d[7]||(d[7]=o=>n(29)),class:"sector-field",x:"222.679",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(29)?"#FFFF0030":"#2e3b46"},null,8,Ket),t.createElementVNode("rect",{onClick:d[8]||(d[8]=o=>n(30)),class:"sector-field",x:"288.347",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(30)?"#FFFF0030":"#2e3b46"},null,8,Bet),t.createElementVNode("rect",{onClick:d[9]||(d[9]=o=>n(31)),class:"sector-field",x:"0.347042",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(31)?"#FFFF0030":"#2e3b46"},null,8,Xet),t.createElementVNode("rect",{onClick:d[10]||(d[10]=o=>n(32)),class:"sector-field",x:"91.347",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(32)?"#FFFF0030":"#2e3b46"},null,8,Get),t.createElementVNode("rect",{onClick:d[11]||(d[11]=o=>n(33)),class:"sector-field",x:"157.015",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(33)?"#FFFF0030":"#2e3b46"},null,8,Zet),t.createElementVNode("rect",{onClick:d[12]||(d[12]=o=>n(34)),class:"sector-field",x:"222.679",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(34)?"#FFFF0030":"#2e3b46"},null,8,Jet),t.createElementVNode("rect",{onClick:d[13]||(d[13]=o=>n(35)),class:"sector-field",x:"288.347",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(35)?"#FFFF0030":"#2e3b46"},null,8,Het),t.createElementVNode("rect",{onClick:d[14]||(d[14]=o=>n(2)),class:"sector-field",x:"91.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(2)?"#FFFF0030":"#2e3b46"},null,8,Yet),t.createElementVNode("rect",{onClick:d[15]||(d[15]=o=>n(3)),class:"sector-field",x:"114.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(3)?"#FFFF0030":"#2e3b46"},null,8,Qet),t.createElementVNode("rect",{onClick:d[16]||(d[16]=o=>n(4)),class:"sector-field",x:"137.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(4)?"#FFFF0030":"#2e3b46"},null,8,$et),t.createElementVNode("rect",{onClick:d[17]||(d[17]=o=>n(5)),class:"sector-field",x:"172.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(5)?"#FFFF0030":"#2e3b46"},null,8,ett),t.createElementVNode("rect",{onClick:d[18]||(d[18]=o=>n(6)),class:"sector-field",x:"207.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(6)?"#FFFF0030":"#2e3b46"},null,8,ttt),t.createElementVNode("rect",{onClick:d[19]||(d[19]=o=>n(7)),class:"sector-field",x:"242.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(7)?"#FFFF0030":"#2e3b46"},null,8,rtt),t.createElementVNode("rect",{onClick:d[20]||(d[20]=o=>n(8)),class:"sector-field",x:"265.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(8)?"#FFFF0030":"#2e3b46"},null,8,att),t.createElementVNode("rect",{onClick:d[21]||(d[21]=o=>n(10)),class:"sector-field",x:"91.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(10)?"#FFFF0030":"#2e3b46"},null,8,ntt),t.createElementVNode("rect",{onClick:d[22]||(d[22]=o=>n(11)),class:"sector-field",x:"114.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(11)?"#FFFF0030":"#2e3b46"},null,8,itt),t.createElementVNode("rect",{onClick:d[23]||(d[23]=o=>n(12)),class:"sector-field",x:"137.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(12)?"#FFFF0030":"#2e3b46"},null,8,ott),t.createElementVNode("rect",{onClick:d[24]||(d[24]=o=>n(13)),class:"sector-field",x:"172.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(13)?"#FFFF0030":"#2e3b46"},null,8,stt),t.createElementVNode("rect",{onClick:d[25]||(d[25]=o=>n(14)),class:"sector-field",x:"207.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(14)?"#FFFF0030":"#2e3b46"},null,8,ltt),t.createElementVNode("rect",{onClick:d[26]||(d[26]=o=>n(15)),class:"sector-field",x:"242.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(15)?"#FFFF0030":"#2e3b46"},null,8,ctt),t.createElementVNode("rect",{onClick:d[27]||(d[27]=o=>n(16)),class:"sector-field",x:"265.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(16)?"#FFFF0030":"#2e3b46"},null,8,utt),t.createElementVNode("rect",{onClick:d[28]||(d[28]=o=>n(18)),class:"sector-field",x:"91.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(18)?"#FFFF0030":"#2e3b46"},null,8,dtt),t.createElementVNode("rect",{onClick:d[29]||(d[29]=o=>n(19)),class:"sector-field",x:"114.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(19)?"#FFFF0030":"#2e3b46"},null,8,ptt),t.createElementVNode("rect",{onClick:d[30]||(d[30]=o=>n(20)),class:"sector-field",x:"137.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(20)?"#FFFF0030":"#2e3b46"},null,8,htt),t.createElementVNode("rect",{onClick:d[31]||(d[31]=o=>n(21)),class:"sector-field",x:"172.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(21)?"#FFFF0030":"#2e3b46"},null,8,ftt),t.createElementVNode("rect",{onClick:d[32]||(d[32]=o=>n(22)),class:"sector-field",x:"207.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(22)?"#FFFF0030":"#2e3b46"},null,8,mtt),t.createElementVNode("rect",{onClick:d[33]||(d[33]=o=>n(23)),class:"sector-field",x:"242.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(23)?"#FFFF0030":"#2e3b46"},null,8,ytt),t.createElementVNode("rect",{onClick:d[34]||(d[34]=o=>n(24)),class:"sector-field",x:"265.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(24)?"#FFFF0030":"#2e3b46"},null,8,gtt),d[40]||(d[40]=t.createElementVNode("rect",{x:"91.6",y:"0.6",width:"196.8",height:"87.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),d[41]||(d[41]=t.createElementVNode("rect",{x:"137.6",y:"0.782404",width:"104.8",height:"28.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),t.createElementVNode("mask",{id:p.value,style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"91",y:"88",width:"198",height:"25"},[...d[38]||(d[38]=[t.createElementVNode("rect",{width:"197.746",height:"24.6043",transform:"matrix(1 0 0 -1 91 113)",fill:"#D9D9D9"},null,-1)])],8,vtt),t.createElementVNode("g",{mask:`url(#${p.value})`},[...d[39]||(d[39]=[t.createElementVNode("circle",{cx:"185.329",cy:"56.5046",r:"52.6152",stroke:"#DFE3E2","stroke-width":"1.38817"},null,-1)])],8,btt),d[42]||(d[42]=t.createElementVNode("circle",{cx:"190.278",cy:"66.2782",r:"2.27817",fill:"white"},null,-1)),d[43]||(d[43]=t.createElementVNode("rect",{x:"0.7",y:"0.7",width:"378.6",height:"175.6",stroke:"#DFE3E2","stroke-width":"1.4"},null,-1))]))])]),t.createElementVNode("div",xtt,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(k,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(T,["stop"])}," Listo ")])]))}},uA=t2(_tt,[["__scopeId","data-v-203bc904"]]),wtt={class:"que-sucedio-filter"},Ttt={class:"filter-header"},Stt={class:"checkbox-item todos-header"},ktt=["checked"],Ltt={class:"filter-section"},Ett={class:"checkbox-item main-option"},Ctt=["checked"],Ntt={class:"sub-options"},Ott={class:"checkbox-item sub-option"},Mtt=["checked"],Vtt={class:"checkbox-item sub-option"},ztt=["checked"],Ptt={class:"filter-section"},Att={class:"checkbox-item main-option"},Rtt=["checked"],Utt={class:"sub-options"},Ftt={class:"checkbox-item sub-option"},Itt=["checked"],qtt={class:"checkbox-item sub-option"},jtt=["checked"],Wtt={class:"checkbox-item sub-option"},Dtt=["checked"],Ktt={class:"filter-actions"},Btt={__name:"QueSucedioFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],h={"rematado-destino-porteria":["fue-gol","no-fue-gol"],"rematado-sin-destino-porteria":["ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"]},u=t.ref([]);t.watch(()=>a.selectedValues,d=>{if(!d||!Array.isArray(d))return;const o=d[a.filterIndex];if(o&&typeof o=="object"&&!Array.isArray(o)&&o[a.optionIndex]!==void 0){const l=Array.isArray(o[a.optionIndex])?o[a.optionIndex]:[];if(l.length>0){const s=JSON.stringify(u.value.sort()),f=JSON.stringify(l.sort());s!==f&&(u.value=[...l])}}},{immediate:!0,deep:!0}),t.onMounted(()=>{t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const d=a.selectedValues[a.filterIndex];if(d&&typeof d=="object"&&!Array.isArray(d)&&d[a.optionIndex]!==void 0){const o=Array.isArray(d[a.optionIndex])?d[a.optionIndex]:[];if(o.length>0){u.value=[...o];return}}}u.value.length===0&&(u.value=[...$])})});const i=t.computed(()=>$.every(d=>u.value.includes(d))),p=d=>u.value.includes(d),c=d=>{d.target.checked?u.value=[...$]:u.value=[],v("update-selection",{optionIndex:a.optionIndex,values:[...u.value]})},n=(d,o)=>{let l=[...u.value];const s=h[d]||[];o?(l.includes(d)||l.push(d),s.forEach(f=>{l.includes(f)||l.push(f)})):l=l.filter(f=>f!==d&&!s.includes(f)),u.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},k=(d,o)=>{let l=[...u.value];const s=Object.keys(h).find(f=>h[f].includes(d));o?(l.includes(d)||l.push(d),s&&h[s].every(f=>l.includes(f))&&!l.includes(s)&&l.push(s)):(l=l.filter(f=>f!==d),s&&l.includes(s)&&(l=l.filter(f=>f!==s))),u.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},T=()=>{u.value=[...$],v("update-selection",{optionIndex:a.optionIndex,values:[...$]})},x=()=>{v("done")};return(d,o)=>(t.openBlock(),t.createElementBlock("div",wtt,[t.createElementVNode("div",Ttt,[t.createElementVNode("label",Stt,[o[7]||(o[7]=t.createElementVNode("span",{class:"checkbox-label"},"Todos",-1)),t.createElementVNode("input",{type:"checkbox",checked:i.value,onChange:t.withModifiers(c,["stop"])},null,40,ktt)])]),o[15]||(o[15]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",Ltt,[t.createElementVNode("label",Ett,[t.createElementVNode("input",{type:"checkbox",checked:p("rematado-destino-porteria"),onChange:o[0]||(o[0]=t.withModifiers(l=>n("rematado-destino-porteria",l.target.checked),["stop"]))},null,40,Ctt),o[8]||(o[8]=t.createElementVNode("span",{class:"checkbox-label"},"Rematado con destino a portería",-1))]),t.createElementVNode("div",Ntt,[t.createElementVNode("label",Ott,[t.createElementVNode("input",{type:"checkbox",checked:p("fue-gol"),onChange:o[1]||(o[1]=t.withModifiers(l=>k("fue-gol",l.target.checked),["stop"]))},null,40,Mtt),o[9]||(o[9]=t.createElementVNode("span",{class:"checkbox-label"},"Fue gol",-1))]),t.createElementVNode("label",Vtt,[t.createElementVNode("input",{type:"checkbox",checked:p("no-fue-gol"),onChange:o[2]||(o[2]=t.withModifiers(l=>k("no-fue-gol",l.target.checked),["stop"]))},null,40,ztt),o[10]||(o[10]=t.createElementVNode("span",{class:"checkbox-label"},"No fue gol",-1))])])]),o[16]||(o[16]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",Ptt,[t.createElementVNode("label",Att,[t.createElementVNode("input",{type:"checkbox",checked:p("rematado-sin-destino-porteria"),onChange:o[3]||(o[3]=t.withModifiers(l=>n("rematado-sin-destino-porteria",l.target.checked),["stop"]))},null,40,Rtt),o[11]||(o[11]=t.createElementVNode("span",{class:"checkbox-label"},"Rematado sin destino a portería",-1))]),t.createElementVNode("div",Utt,[t.createElementVNode("label",Ftt,[t.createElementVNode("input",{type:"checkbox",checked:p("ganados-por-portero-rival"),onChange:o[4]||(o[4]=t.withModifiers(l=>k("ganados-por-portero-rival",l.target.checked),["stop"]))},null,40,Itt),o[12]||(o[12]=t.createElementVNode("span",{class:"checkbox-label"},"Ganados por portero rival",-1))]),t.createElementVNode("label",qtt,[t.createElementVNode("input",{type:"checkbox",checked:p("ganados-por-jugador-rival"),onChange:o[5]||(o[5]=t.withModifiers(l=>k("ganados-por-jugador-rival",l.target.checked),["stop"]))},null,40,jtt),o[13]||(o[13]=t.createElementVNode("span",{class:"checkbox-label"},"Ganados por jugador rival",-1))]),t.createElementVNode("label",Wtt,[t.createElementVNode("input",{type:"checkbox",checked:p("sin-destino"),onChange:o[6]||(o[6]=t.withModifiers(l=>k("sin-destino",l.target.checked),["stop"]))},null,40,Dtt),o[14]||(o[14]=t.createElementVNode("span",{class:"checkbox-label"},"Sin destino",-1))])])]),t.createElementVNode("div",Ktt,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(T,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(x,["stop"])}," Listo ")])]))}},u9=t2(Btt,[["__scopeId","data-v-e3994cc8"]]),Xtt={class:"advanced-select-accordion"},Gtt=["onClick"],Ztt={class:"accordion-header-left"},Jtt={class:"accordion-icon"},Htt=["src","alt"],Ytt={class:"accordion-title"},Qtt={class:"accordion-header-right"},$tt={key:0,class:"accordion-badge"},ert={key:0,class:"accordion-content"},trt={class:"accordion-footer"},rrt={__name:"AdvancedSelectAccordion",props:{filter:{type:Object,required:!0},filterIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","close"],setup(e,{emit:r}){const a=e;t.watch(()=>a.selectedValues,x=>{console.log("Acorden inicla 55555555555v [AdvancedSelectAccordion] selectedValues recibidos:",{filterIndex:a.filterIndex,selectedValues:x,filterValue:x==null?void 0:x[a.filterIndex],filterValueType:typeof(x==null?void 0:x[a.filterIndex]),isArray:Array.isArray(x==null?void 0:x[a.filterIndex]),filterValueKeys:x!=null&&x[a.filterIndex]&&typeof(x==null?void 0:x[a.filterIndex])=="object"?Object.keys(x[a.filterIndex]):null})},{immediate:!0,deep:!0});const v=r,$=t.ref({}),h=x=>{$.value[x]?$.value[x]=!1:(Object.keys($.value).forEach(d=>{$.value[d]=!1}),$.value[x]=!0)},u=x=>{const d=a.filter.options[x];if(!d||!d.filters)return 0;const o=a.selectedValues[a.filterIndex];if(!o||!o[x])return 0;const l=o[x];return Array.isArray(l)?l.length:0},i=(x,d)=>x.icon?x.icon:`https://golstatsimages.blob.core.windows.net/todoelfut/f${d+1}.png`,p=x=>x==="Qué sucedió?"||x==="Qué sucedió"?"¿Qué sucedió?":x,c=x=>{const d={resultados:SN,detalles:cA,"como-fue-cobrado":kN,"como fue cobrado":kN,zona:uA,"que-sucedio":u9,"qué sucedió":u9,"que sucedio":u9},o=typeof x.value=="string"?x.value:String(x.value||""),l=typeof x.label=="string"?x.label:String(x.label||""),s=o.toLowerCase().trim(),f=l.toLowerCase().trim();if(s&&d[s])return d[s];if(f&&d[f])return d[f];const g=f.replace(/\s+/g,"-").replace(/[¿?]/g,"").replace(/[áéíóú]/g,S=>({á:"a",é:"e",í:"i",ó:"o",ú:"u"})[S]||S);return g&&d[g]?d[g]:SN},n=x=>{v("update-selection",{filterIndex:a.filterIndex,optionIndex:x.optionIndex,values:x.values})},k=x=>{$.value[x]=!1},T=()=>{v("close")};return(x,d)=>(t.openBlock(),t.createElementBlock("div",Xtt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filter.options,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:o.value||l,class:"accordion-item"},[t.createElementVNode("div",{class:"accordion-header",onClick:t.withModifiers(s=>h(l),["stop"])},[t.createElementVNode("div",Ztt,[t.createElementVNode("span",Jtt,[t.createElementVNode("img",{src:i(o,l),alt:o.label},null,8,Htt)]),t.createElementVNode("span",Ytt,t.toDisplayString(p(o.label)),1)]),t.createElementVNode("div",Qtt,[u(l)>0?(t.openBlock(),t.createElementBlock("span",$tt,t.toDisplayString(u(l)),1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass(["accordion-chevron",{open:$.value[l]}])},[...d[0]||(d[0]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)])],8,Gtt),t.createVNode(t.Transition,{name:"accordion"},{default:t.withCtx(()=>[$.value[l]?(t.openBlock(),t.createElementBlock("div",ert,[c(o)===SN?(t.openBlock(),t.createBlock(SN,{key:0,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===cA?(t.openBlock(),t.createBlock(cA,{key:1,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===kN?(t.openBlock(),t.createBlock(kN,{key:2,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===uA?(t.openBlock(),t.createBlock(uA,{key:3,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===u9?(t.openBlock(),t.createBlock(u9,{key:4,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]),_:2},1024)]))),128)),t.createElementVNode("div",trt,[d[1]||(d[1]=t.createElementVNode("div",{class:"footer-separator"},null,-1)),t.createElementVNode("button",{class:"btn-done-footer",onClick:t.withModifiers(T,["stop"])}," Listo ")])]))}},art=t2(rrt,[["__scopeId","data-v-92b4e8ad"]]),nrt={class:"corners-zone-filters"},irt={key:0,class:"custom-radio-group"},ort={class:"radio-label"},srt={class:"radio-options"},lrt=["name","value","onUpdate:modelValue"],crt={key:0,class:"filter-separator"},urt={class:"filter-inline select-with-label"},drt=["data-filter-type","onClick"],prt={class:"select-display"},hrt={class:"select-label"},frt={key:0,class:"dropdown-menu type-menu simple-select-menu"},mrt={class:"simple-select-scroll-area"},yrt=["onClick"],grt={class:"option-content"},vrt={class:"option-title"},brt={key:0,class:"option-checkmark"},xrt={class:"switch-group"},_rt={class:"switch-label"},wrt=["onClick"],Trt={key:0,class:"filter-separator"},Srt={key:3,class:"filter-inline advanced-select-wrapper"},krt=["data-filter-type","onClick"],Lrt={class:"select-display"},Ert={class:"select-label"},Crt={__name:"CornersZoneFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:17},viewConfig:{type:Object,default:()=>({})},defaultFilters:{type:Object,default:()=>null}},emits:["filters-changed","filter-updated","change","remove-views"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=t.ref(null),p=t.ref(null),c=t.ref([]);let n=!1,k=null;const T=(I,j)=>{if(Array.isArray(I)&&Array.isArray(j)){if(I.length!==j.length)return!1;for(let F=0;F<I.length;F++)if(I[F]!==j[F])return!1;return!0}return I===j},x=(I,j=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]){const F=v.filters[0],W=v.filters[1],U=F.options,O=W.options;U&&Array.isArray(U)&&O?I!=null?U.findIndex(X=>X.value===I)!==-1&&O[I]?(c.value=O[I],j&&!(()=>{const X=h.value[1];return X==null?!1:Array.isArray(X)?X.length>0:X!==""})()&&!n&&c.value.length>0&&(h.value[1]=c.value[0].value,t.nextTick(()=>{}))):(c.value=[],h.value[1]=null):(c.value=[],h.value[1]=null):c.value=[]}},d=()=>{var I,j,F;v.initialValues&&v.initialValues.length>0?v.initialValues.length>0&&(typeof v.initialValues[0]=="number"||typeof v.initialValues[0]=="boolean"||v.initialValues[0]===null||Array.isArray(v.initialValues[0]))?h.value=v.filters.map((O,X)=>{var N,Y,se,me;const ge=v.initialValues[X];if(ge!=null)return O.type==="switch"&&v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde initialValues en índice ${X} (formato simple):`,ge),ge;if(O.type==="radio-button")return((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null;if(O.type==="advanced-select"){console.log("8888888888888888888888888888 LLEgo auqi mero inicio de davances filters: ",O.type,O.options);const be={};let xe=!1;return O.options&&Array.isArray(O.options)&&(console.log("999999999999999999999999 LLEgo auqi mero inicio de davances filters: options",O.options),O.options.forEach((Ae,qe)=>{var _e,Ue,je,Re,We,Qe,rt;Ae.value==="zona"||(_e=Ae.label)!=null&&_e.toLowerCase().includes("zona")?(be[qe]=Array.from({length:35},(pt,ut)=>ut+1),xe=!0):Ae.value==="resultados"||(Ue=Ae.label)!=null&&Ue.toLowerCase().includes("resultados")?(be[qe]=["iba-ganando","iba-perdiendo","iba-empatado"],xe=!0):Ae.value==="que-sucedio"||Ae.value==="que sucedio"||(je=Ae.label)!=null&&je.toLowerCase().includes("qué sucedió")||(Re=Ae.label)!=null&&Re.toLowerCase().includes("que sucedio")?(be[qe]=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],xe=!0):Ae.value==="detalles"||(We=Ae.label)!=null&&We.toLowerCase().includes("detalles")?(be[qe]=["0-15","16-30","31-45","46-60","61-75","76-90"],xe=!0):(Ae.value==="como-fue-cobrado"||Ae.value==="como fue cobrado"||(Qe=Ae.label)!=null&&Qe.toLowerCase().includes("cómo fue cobrado")||(rt=Ae.label)!=null&&rt.toLowerCase().includes("como fue cobrado"))&&(be[qe]=["izquierda","comba-afuera","comba-adentro","raz-area","en-corto"],xe=!0)})),xe?be:{}}return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (formato simple):`,!1),!1):O.type==="select-simple"&&((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null}):v.isEditMode?(console.log("[CornersZoneFilters] ========== MODO EDICIÓN =========="),console.log("[CornersZoneFilters] initialValues completo:",v.initialValues),console.log("[CornersZoneFilters] initialValues[3] (filtro avanzado):",(I=v.initialValues)==null?void 0:I[3]),console.log("[CornersZoneFilters] Tipo de initialValues[3]:",typeof((j=v.initialValues)==null?void 0:j[3])),console.log("[CornersZoneFilters] Es array initialValues[3]:",Array.isArray((F=v.initialValues)==null?void 0:F[3])),h.value=v.filters.map((O,X)=>{var N,Y,se,me,ge,be,xe,Ae,qe,_e;const Ue=v.initialValues[X];if(X===3&&console.log(`[CornersZoneFilters] Procesando filtro en índice ${X} (FILTRO AVANZADO):`,{filterType:O.type,filterData:Ue,hasFilterData:!!Ue,filterDataKeys:Ue?Object.keys(Ue):null,selectedValue:Ue==null?void 0:Ue.selectedValue,selectedValueType:typeof(Ue==null?void 0:Ue.selectedValue),isDirectObject:Ue&&typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked}),!Ue)return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(je=>je.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (modo edición):`,!1),!1):O.type==="radio-button"?((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null:O.type==="select-simple"?((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null:O.type==="advanced-select"?{}:null;if(O.type==="advanced-select"){if(console.log(`[CornersZoneFilters] Modo edición - Filtro avanzado en índice ${X}:`,{filterIndex:X,filterType:O.type,filterData:Ue,selectedValue:Ue==null?void 0:Ue.selectedValue,selectedValueType:typeof(Ue==null?void 0:Ue.selectedValue),isArray:Array.isArray(Ue==null?void 0:Ue.selectedValue),isDirectObject:typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked}),Ue.selectedValue!==void 0&&Ue.selectedValue!==null){if(typeof Ue.selectedValue=="object"&&!Array.isArray(Ue.selectedValue)){const je=Object.keys(Ue.selectedValue).some(Re=>{const We=Number(Re);return!isNaN(We)&&We>=0});return console.log(`[CornersZoneFilters] Filtro avanzado ${X} - hasCorrectStructure:`,je,"selectedValue:",Ue.selectedValue),je?(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Retornando selectedValue directamente:`,Ue.selectedValue),Ue.selectedValue):(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Retornando selectedValue sin estructura correcta:`,Ue.selectedValue),Ue.selectedValue)}else if(Array.isArray(Ue.selectedValue)){console.log(`[CornersZoneFilters] Filtro avanzado ${X} - selectedValue es array, convirtiendo:`,Ue.selectedValue);const je={};return Ue.selectedValue.forEach((Re,We)=>{je[We]=Re}),console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Valor convertido:`,je),je}}return typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked&&Ue!==null&&Object.keys(Ue).some(je=>{const Re=Number(je);return!isNaN(Re)&&Re>=0})?(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - filterData es objeto directo guardado, retornando:`,Ue),Ue):(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - No hay valores guardados, retornando objeto vacío`),{})}if(O.type==="radio-button"&&Ue.selectedOption)return Ue.selectedOption.value;if(O.type==="radio-button"&&!Ue.selectedOption)return Ue.selectedValue!==void 0?Ue.selectedValue:((be=(ge=O.options)==null?void 0:ge[0])==null?void 0:be.value)||null;if(O.type==="select-simple"&&Ue.selectedValue!==void 0)return Array.isArray(Ue.selectedValue)?Ue.selectedValue[0]:Ue.selectedValue;if(O.type==="select"&&Ue.selectedOptions)return Ue.selectedOptions.map(je=>je.value);if(O.type==="check"&&Ue.isChecked!==void 0)return Ue.isChecked;if(O.type==="switch"&&(Ue.isChecked!==void 0||Ue.selectedValue!==void 0)){const je=Ue.isChecked!==void 0?Ue.isChecked:Ue.selectedValue;return v.filters.findIndex(Re=>Re.type==="switch")===X&&console.log(`[Primer Switch] Valor en modo edición (índice ${X}):`,je),je}return Ue.selectedValue!==void 0?Ue.selectedValue:O.type==="select"?[]:O.type==="check"||O.type==="switch"?!1:O.type==="radio-button"?((Ae=(xe=O.options)==null?void 0:xe[0])==null?void 0:Ae.value)||null:O.type==="select-simple"?((_e=(qe=O.options)==null?void 0:qe[0])==null?void 0:_e.value)||null:O.type==="advanced-select"?{}:null}),console.log("[CornersZoneFilters] ========== FIN MODO EDICIÓN =========="),console.log("[CornersZoneFilters] selectedValues después de mapear:",h.value),console.log("[CornersZoneFilters] selectedValues[3] (filtro avanzado):",h.value[3]),console.log("[CornersZoneFilters] Tipo de selectedValues[3]:",typeof h.value[3]),console.log("[CornersZoneFilters] Es array selectedValues[3]:",Array.isArray(h.value[3])),h.value[3]&&typeof h.value[3]=="object"&&(console.log("[CornersZoneFilters] Keys de selectedValues[3]:",Object.keys(h.value[3])),console.log("[CornersZoneFilters] selectedValues[3][0]:",h.value[3][0]),console.log("[CornersZoneFilters] selectedValues[3][1]:",h.value[3][1])),console.log("[CornersZoneFilters] ==========================================")):h.value=v.filters.map((O,X)=>{var N,Y,se,me;const ge=v.initialValues[X];if(ge!=null)return O.type==="switch"&&v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde initialValues en índice ${X} (modo agregar):`,ge),ge;if(O.type==="radio-button")return((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null;if(O.type==="advanced-select"){const be={};let xe=!1;return O.options&&Array.isArray(O.options)&&O.options.forEach((Ae,qe)=>{var _e,Ue,je,Re,We,Qe,rt;Ae.value==="zona"||(_e=Ae.label)!=null&&_e.toLowerCase().includes("zona")?(be[qe]=Array.from({length:35},(pt,ut)=>ut+1),xe=!0):Ae.value==="resultados"||(Ue=Ae.label)!=null&&Ue.toLowerCase().includes("resultados")?(be[qe]=["iba-ganando","iba-perdiendo","iba-empatado"],xe=!0):Ae.value==="que-sucedio"||Ae.value==="que sucedio"||(je=Ae.label)!=null&&je.toLowerCase().includes("qué sucedió")||(Re=Ae.label)!=null&&Re.toLowerCase().includes("que sucedio")?(be[qe]=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],xe=!0):Ae.value==="detalles"||(We=Ae.label)!=null&&We.toLowerCase().includes("detalles")?(be[qe]=["0-15","16-30","31-45","46-60","61-75","76-90"],xe=!0):(Ae.value==="como-fue-cobrado"||Ae.value==="como fue cobrado"||(Qe=Ae.label)!=null&&Qe.toLowerCase().includes("cómo fue cobrado")||(rt=Ae.label)!=null&&rt.toLowerCase().includes("como fue cobrado"))&&(be[qe]=["izquierda","comba-afuera","comba-adentro","raz-area","en-corto"],xe=!0)}),xe?be:{}}return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (modo agregar):`,!1),!1):O.type==="select-simple"&&((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null}):h.value=v.filters.map((O,X)=>{var N,Y,se,me;return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(ge=>ge.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (sin initialValues):`,!1),!1):O.type==="radio-button"?((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null:O.type==="select-simple"?((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null:O.type==="advanced-select"?{}:null});const W=h.value.some(O=>O!=null&&(Array.isArray(O)?O.length>0:typeof O=="object"&&!Array.isArray(O)?Object.keys(O).length>0:O!==!1&&O!=="")),U=v.filters.map((O,X)=>({index:X,type:O.type,label:O.label||O.label_1||O.label_2||`Filtro ${X}`,value:h.value[X]}));console.log("??????????????????????????????????? ---- ???????????????????????????????????"),console.log("Valores de filtros seteados:",U),console.log("selectedValues:",h.value),console.log("props.filters:",v.filters),console.log("??????????????????????????????????? ---- ???????????????????????????????????"),W&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};d(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!n){const I=!(()=>{const j=h.value[1];return j==null?!1:Array.isArray(j)?j.length>0:j!==""})();x(h.value[0],I),t.nextTick(()=>{h.value.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))&&(!u||h.value.length!==u.length||h.value.some((j,F)=>!T(j,u[F])))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))})}else setTimeout(()=>{h.value.some(I=>I!=null&&(Array.isArray(I)?I.length>0:typeof I=="object"&&!Array.isArray(I)?Object.keys(I).length>0:I!==!1&&I!==""))&&(!u||h.value.length!==u.length||h.value.some((I,j)=>!T(I,u[j])))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))},100)})},300),t.watch(()=>v.initialValues,I=>{if(!I||I.length===0)return;const j=I.length>0&&(typeof I[0]=="number"||typeof I[0]=="boolean"||I[0]===null||Array.isArray(I[0])),F=!T(h.value,I),W=I&&I.length>0&&!n&&F,U=v.isEditMode&&n;if(W&&!U)if(j){const O=v.filters.findIndex(X=>X.type==="switch");O!==-1&&I[O]!==void 0&&console.log(`[Primer Switch] Se setea valor desde watcher initialValues (formato simple) en índice ${O}:`,I[O]),h.value=[...I]}else v.isEditMode?h.value=v.filters.map((O,X)=>{const N=I[X];return N?O.type==="radio-button"&&N.selectedOption?N.selectedOption.value:O.type==="select-simple"&&N.selectedValue!==void 0?Array.isArray(N.selectedValue)?N.selectedValue[0]:N.selectedValue:O.type==="select"&&N.selectedOptions?N.selectedOptions.map(Y=>Y.value):O.type==="check"&&N.isChecked!==void 0?N.isChecked:O.type==="switch"&&N.isChecked!==void 0?(v.filters.findIndex(Y=>Y.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde isChecked en índice ${X} (modo edición):`,N.isChecked),N.isChecked):O.type==="switch"&&N.selectedValue!==void 0?(v.filters.findIndex(Y=>Y.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde selectedValue en índice ${X} (modo edición):`,N.selectedValue),N.selectedValue):O.type==="advanced-select"&&N.selectedValue!==void 0||N.selectedValue!==void 0?N.selectedValue:h.value[X]:h.value[X]}):h.value=[...I];else n?k&&k.length>0&&(h.value=[...k]):U&&k&&k.length>0&&(h.value=[...k])},{deep:!0}),t.watch(()=>v.isEditMode,(I,j)=>{j===!0&&I===!1&&(k=null)},{immediate:!0}),t.watch(h,I=>{if(I.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))){const j=[...I];if(u){for(;j.length<u.length;)j.push(void 0);for(let F=0;F<u.length;F++)u[F]!==void 0&&u[F]!==null&&(j[F]===void 0||j[F]===null)&&(j[F]=u[F])}if((()=>{if(!u||j.length!==u.length)return!0;for(let F=0;F<j.length;F++)if(!T(j[F],u[F]))return!0;return!1})()){u=[...j];const F=v.filters.map((W,U)=>({index:U,type:W.type,label:W.label||W.label_1||W.label_2||`Filtro ${U}`,value:j[U]}));console.log("Valores de filtros actualizados:",F),$("filters-changed",{componentId:v.componentId,filters:j,timestamp:new Date().toISOString()})}}},{deep:!0}),t.watch(()=>h.value[0],(I,j)=>{var F;if(I==null){const U=v.filters[0];if(U&&U.type==="radio-button"&&U.options&&U.options.length>0){const O=U.options[0].value;h.value[0]=O;return}}const W=(F=v.filters)==null?void 0:F[0];W&&W.type==="select-simple"&&(I!==j&&j!==void 0?x(I,!0):j===void 0&&I!==null&&I!==void 0&&x(I,!1))},{immediate:!0});const o=I=>{i.value===I?i.value=null:(i.value=I,p.value=null)},l=I=>{p.value===I?p.value=null:(p.value=I,i.value=null)},s=(I,j)=>{if(n=!0,setTimeout(()=>{n=!1},1e3),h.value[I]=j,(I===0||I===1)&&(k=[...h.value]),i.value=null,I===0){h.value[1]!==void 0&&(h.value[1]=null);const F=n;n=!1,x(j,!0),n=F,h.value[1]!==null&&h.value[1]!==void 0&&(k=[...h.value])}},f=()=>{n=!0,setTimeout(()=>{n=!1},400)},g=I=>{n=!0,setTimeout(()=>{n=!1},400);const j=h.value[I],F=!j;h.value[I]=F,v.filters.findIndex(W=>W.type==="switch")===I&&console.log(`[Primer Switch] Se setea valor en índice ${I} desde toggleSwitch:`,F,"(valor anterior:",j,")")},S=I=>{n=!0,setTimeout(()=>{n=!1},400),h.value[I.filterIndex]||(h.value[I.filterIndex]={}),h.value[I.filterIndex]={...h.value[I.filterIndex],[I.optionIndex]:I.values},t.nextTick(()=>{h.value.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))})},L=()=>h.value,M=(I,j)=>{const F=h.value[j];if(F==null)return null;if(j===1&&c.value.length>0){const W=c.value.find(U=>U.value===F);return W?W.label:null}if(I.options&&Array.isArray(I.options)){const W=I.options.find(U=>U.value===F);return W?W.label:null}return null},A=(I,j)=>{const F=h.value[j];if(!F||typeof F!="object"||Array.isArray(F))return null;const W=Object.values(F).reduce((U,O)=>Array.isArray(O)&&O.length>0?U+O.length:U,0);return W>0?`${W} seleccionado${W>1?"s":""}`:null},z=I=>{const j=I.target,F=j.closest(".advanced-select-dropdown"),W=j.closest(".advanced-select-menu"),U=j.closest(".advanced-select-accordion"),O=j.closest(".advanced-select-content"),X=j.closest(".custom-select.dynamic-select"),N=j.closest(".simple-select-menu");!(F||W||U||O)&&!(X||N)&&(p.value=null,i.value=null)};return t.onMounted(()=>{document.addEventListener("click",z)}),t.onUnmounted(()=>{document.removeEventListener("click",z)}),r({getCurrentValues:L,initializeValues:d}),(I,j)=>(t.openBlock(),t.createElementBlock("div",nrt,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(F,W)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:W},[F.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",irt,[t.createElementVNode("div",ort,t.toDisplayString(F.label),1),t.createElementVNode("div",srt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.options,U=>(t.openBlock(),t.createElementBlock("label",{key:U.value,class:t.normalizeClass(["radio-option-card",{active:h.value[W]===U.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"corners-zone-radio-"+W,value:U.value,"onUpdate:modelValue":O=>h.value[W]=O,onChange:f},null,40,lrt),[[t.vModelRadio,h.value[W]]]),t.createElementVNode("span",null,t.toDisplayString(U.label),1)],2))),128))])])):F.type==="select-simple"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[W==2?(t.openBlock(),t.createElementBlock("div",crt)):t.createCommentVNode("",!0),t.createElementVNode("div",urt,[t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline","data-filter-type":F.type,onClick:t.withModifiers(U=>o(W),["stop"])},[t.createElementVNode("div",prt,[j[3]||(j[3]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",hrt,t.toDisplayString(M(F,W)||F.label_2||F.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:i.value===W}])},[...j[2]||(j[2]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),i.value===W?(t.openBlock(),t.createElementBlock("div",frt,[t.createElementVNode("div",mrt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W===1?c.value:F.options,U=>(t.openBlock(),t.createElementBlock("div",{key:U.value,class:t.normalizeClass(["option-card simple-select-option",{active:T(h.value[W],U.value)}]),onClick:t.withModifiers(O=>s(W,U.value),["stop"])},[t.createElementVNode("div",grt,[t.createElementVNode("div",vrt,t.toDisplayString(U.label),1)]),T(h.value[W],U.value)?(t.openBlock(),t.createElementBlock("div",brt,[...j[4]||(j[4]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,yrt))),128))])])):t.createCommentVNode("",!0)],8,drt)])],64)):F.type==="switch"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",xrt,[t.createElementVNode("label",_rt,[F.label_1?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["switch-text switch-text-left",{"switch-text-selected":!h.value[W]}])},t.toDisplayString(F.label_1),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"switch",onClick:U=>g(W)},[t.createElementVNode("div",{class:t.normalizeClass(["switch-track",{"switch-on":h.value[W]}])},[t.createElementVNode("div",{class:t.normalizeClass(["switch-thumb",{on:h.value[W]}])},null,2)],2)],8,wrt),F.label_2?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["switch-text switch-text-right",{"switch-text-selected":h.value[W]}])},t.toDisplayString(F.label_2),3)):t.createCommentVNode("",!0)])]),W>=0?(t.openBlock(),t.createElementBlock("div",Trt)):t.createCommentVNode("",!0)],64)):F.type==="advanced-select"?(t.openBlock(),t.createElementBlock("div",Srt,[t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline advanced-select-dropdown","data-filter-type":F.type,onClick:t.withModifiers(U=>l(W),["stop"])},[t.createElementVNode("div",Lrt,[j[6]||(j[6]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",Ert,t.toDisplayString(A(F,W)||F.label||"Seleccionar"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:p.value===W}])},[...j[5]||(j[5]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),p.value===W?(t.openBlock(),t.createElementBlock("div",{key:0,class:"dropdown-menu type-menu advanced-select-menu",onClick:j[1]||(j[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",{class:"advanced-select-content",onClick:j[0]||(j[0]=t.withModifiers(()=>{},["stop"]))},[t.createVNode(art,{filter:F,"filter-index":W,"selected-values":h.value,onUpdateSelection:S,onClose:U=>l(W)},null,8,["filter","filter-index","selected-values","onClose"])])])):t.createCommentVNode("",!0)],8,krt)])):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},Nrt=t2(Crt,[["__scopeId","data-v-7c2a6c9f"]]),Ort={class:"floating-bar"},Mrt={class:"tab active"},Vrt={class:"select-display"},zrt={class:"select-icon"},Prt=["src"],Art={key:1,alt:"icono",class:"option-img-default",src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png"},Rrt={key:0,class:"select-placeholder select-label"},Urt={key:1,class:"select-label"},Frt={key:0,class:"dropdown-menu field-menu"},Irt=["onClick"],qrt={class:"option-icon"},jrt=["data-hover-src","src"],Wrt={class:"option-content"},Drt={class:"option-title"},Krt={key:0,class:"option-description"},Brt={class:"select-display"},Xrt={class:"select-icon"},Grt=["src"],Zrt=["src"],Jrt={class:"select-label"},Hrt={key:0,class:"dropdown-menu type-menu type-menu-grid"},Yrt={class:"option-grid"},Qrt=["onClick"],$rt={key:0,class:"option-grid-title"},eat={key:1,class:"option-grid-title"},tat={key:2,class:"option-grid-title"},rat={class:"option-grid-icon"},aat=["src"],nat={key:1,class:"filter-separator"},iat=["onClick"],oat={class:"select-display"},sat={key:0,class:"badge-categorias"},lat={key:0,class:"dropdown-menu type-menu multi-select-menu"},cat={class:"multi-select-scroll-area"},uat={class:"select-all-checkbox"},dat=["checked","indeterminate","onChange"],pat={class:"option-checkbox"},hat=["checked","onChange"],fat=["onClick"],mat={class:"option-title"},yat={class:"multi-select-footer"},gat={key:1,class:"custom-radio-group filter-inline"},vat={class:"radio-label"},bat={class:"radio-options"},xat=["onUpdate:modelValue","disabled","name","value","onChange"],_at={key:2,class:"check-group filter-inline"},wat=["onUpdate:modelValue","checked"],Tat=["data-filter-type","onClick"],Sat={class:"select-display"},kat={key:0,class:"dropdown-menu type-menu simple-select-menu"},Lat={class:"simple-select-scroll-area"},Eat=["onMouseenter","onClick"],Cat={class:"option-content"},Nat={class:"option-title"},Oat={key:0,class:"option-checkmark"},Mat={key:4,class:"filter-separator"},Vat=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1},filters_edition_mode:{type:Array,default:()=>null}},emits:["filters-changed","close"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref(new Map),u=t.ref([]);let i=null,p=null,c=null;const n=t.ref(!1),k=t.ref(!1),T=t.ref(!1),x=t.ref(!1),d=t.ref(!1),o=t.ref(!1),l=t.computed(()=>u.value),s=t.ref(null),f=t.computed(()=>l.value[s.value]||null),g=t.computed(()=>{var Tt;const Yt=((Tt=f.value)==null?void 0:Tt.views)||[];return U(Yt)}),S=t.ref(null),L=t.computed(()=>g.value.find(Tt=>Tt.id===S.value)||null),M=t.ref([]),A=t.computed(()=>{var Tt,Yt;return n.value?((Tt=L.value)==null?void 0:Tt.filters_edition_mode)||[]:((Yt=L.value)==null?void 0:Yt.filters)||[]});t.watch(n,Tt=>{Tt||(k.value=!1)}),t.watch(L,Tt=>{var Yt,er;if(!Tt){M.value=[];return}const sr=Tt.id===6&&v.isPostMatch,Cr=Tt.id===14;if(!Array.isArray(A.value)&&!sr&&!Cr){M.value=[];return}x.value||(sr||Cr?M.value=[]:M.value=A.value.map((Rr,sa)=>{var Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr;if(Rr.type==="select"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na){if(Na.selectedOptions&&Array.isArray(Na.selectedOptions))return Na.selectedOptions.map(rn=>rn.value);if(Na.selectedValue&&Array.isArray(Na.selectedValue))return Na.selectedValue.length>0&&Na.selectedValue[0]&&typeof Na.selectedValue[0]=="object"?or(Na.selectedValue):Na.selectedValue}}return Tt.id===4&&Rr.options&&Array.isArray(Rr.options)?Rr.options.map(Na=>Na.value):[]}else if(Rr.type==="radio-button"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.selectedOption){let rn=Na.selectedOption.value;if(Tt.id===15&&sa===0&&rn===3&&((qa=(Ia=p==null?void 0:p.view)==null?void 0:Ia.filterMultiple)==null?void 0:qa.isHomeTeam)!==void 0){const mn=p.view.filterMultiple.isHomeTeam;typeof mn=="boolean"?rn=mn?1:2:typeof mn=="number"&&(rn=mn===1?1:2)}return rn}}if(Tt.id===7&&n.value&&p!=null&&p.view){if(sa===0&&(bn=p.view.componentProps)!=null&&bn.analysisType)return p.view.componentProps.analysisType==="offensive"?1:2;if(sa===1&&((fn=p.view.filterMultiple)==null?void 0:fn.isHomeTeam)!==void 0)return p.view.filterMultiple.isHomeTeam?1:2}return((ea=(In=Rr.options)==null?void 0:In[0])==null?void 0:ea.value)??null}else if(Rr.type==="select-simple"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.selectedValue!==void 0){let rn;return Tt.id===2&&(fa=(Ur=p==null?void 0:p.view)==null?void 0:Ur.filterMultiple)!=null&&fa.categoryId?rn=p.view.filterMultiple.categoryId:Tt.id===1&&(Za=(Va=p==null?void 0:p.view)==null?void 0:Va.filterMultiple)!=null&&Za.category?rn=p.view.filterMultiple.category:Tt.id===6&&(Xr=(Oa=p==null?void 0:p.view)==null?void 0:Oa.filterMultiple)!=null&&Xr.gameNumber?rn=p.view.filterMultiple.gameNumber:rn=Array.isArray(Na.selectedValue)?Na.selectedValue[0]:Na.selectedValue,rn}}if(Tt.id===2&&n.value&&p!=null&&p.view){if(i&&p.view.id){const Na=i.getComponentDynamicFilters(p.view.id);if(Na&&Na[sa]!==void 0)return Na[sa]}if(p.view.filterMultiple){if(Rr.type==="select-simple"&&p.view.filterMultiple.categoryId){const Na=p.view.filterMultiple.categoryId;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Rr.type==="radio-button"&&p.view.filterMultiple.teamType!==void 0){const Na=p.view.filterMultiple.teamType;return(Rr.options||[]).find(rn=>rn.value==Na),Na}}}if(Tt.id===1&&n.value&&(ca=p==null?void 0:p.view)!=null&&ca.filterMultiple&&p.view.filterMultiple.category){const Na=p.view.filterMultiple.category;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Tt.id===9&&n.value&&(kr=p==null?void 0:p.view)!=null&&kr.filterMultiple&&Rr.type==="select-simple"&&p.view.filterMultiple.categoryIds){const Na=Array.isArray(p.view.filterMultiple.categoryIds)?p.view.filterMultiple.categoryIds:[p.view.filterMultiple.categoryIds],rn=(Rr.options||[]).filter(mn=>Array.isArray(mn.value)?hr(mn.value,Na):Na.includes(mn.value));return rn.length>0?rn[0].value:Na}if(Tt.id===6&&n.value&&(ua=p==null?void 0:p.view)!=null&&ua.filterMultiple&&p.view.filterMultiple.gameNumber){const Na=p.view.filterMultiple.gameNumber;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Tt.id===5&&n.value&&(Xa=p==null?void 0:p.view)!=null&&Xa.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Na=p.view.filterMultiple.isHomeTeam;let rn;if(typeof Na=="boolean"?rn=Na?1:2:typeof Na=="number"?rn=Na===1?1:2:rn=1,(Rr.options||[]).find(mn=>mn.value==rn),Rr.type==="radio-button"&&(Rr.label==="Equipo"||Rr.label==="Team"||Rr.label==="Equipo seleccionado"))return rn}if(Tt.id===15&&n.value&&(ja=p==null?void 0:p.view)!=null&&ja.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0&&Rr.type==="radio-button"&&sa===0){const Na=p.view.filterMultiple.isHomeTeam;let rn;if(typeof Na=="boolean"?rn=Na?1:2:typeof Na=="number"?rn=Na===1?1:2:rn=1,(Rr.options||[]).find(mn=>mn.value==rn))return rn}if(Tt.id===9&&n.value&&(on=p==null?void 0:p.view)!=null&&on.filterMultiple&&Rr.type==="radio-button"&&p.view.filterMultiple.isHomeTeam!==void 0){const Na=p.view.filterMultiple.isHomeTeam?1:2,rn=((Ha=Rr.options)==null?void 0:Ha.map(mn=>mn.value))||[];return rn.includes(Na)?Na:rn[0]||1}return((wr=(qr=Rr.options)==null?void 0:qr[0])==null?void 0:wr.value)??null}else if(Rr.type==="check"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.isChecked!==void 0)return Na.isChecked}if(Tt.id===8)return!0;if(Tt.id===3){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.isChecked!==void 0)return Na.isChecked}return!1}return!1}return null}),!((Yt=Tt.name)!=null&&Yt.toLowerCase().includes("tops players")||(er=Tt.title)!=null&&er.toLowerCase().includes("tops players"))&&(!n.value||sr)&&t.nextTick(()=>{var Rr,sa;Tt.id===4&&n.value&&(Rr=p==null?void 0:p.view)!=null&&Rr.id&&i&&i.setDynamicFilters(M.value,p.view.id),Tt.id===3&&n.value&&(sa=p==null?void 0:p.view)!=null&&sa.id&&i&&i.setDynamicFilters(M.value,p.view.id),He()}))},{immediate:!0}),t.watch(()=>i,Tt=>{Tt&&Tt.dynamicFilters&&Array.isArray(Tt.dynamicFilters)&&(x.value=!0,M.value=[...Tt.dynamicFilters],t.nextTick(()=>{x.value=!1}))},{deep:!0}),t.watch(()=>i==null?void 0:i.dynamicFilters,Tt=>{if(Tt&&Array.isArray(Tt)){if(d.value)return;x.value=!0,M.value=[...Tt],t.nextTick(()=>{x.value=!1})}},{deep:!0}),t.watch(()=>L.value,Tt=>{if(n.value&&c&&Tt&&Tt.filters){if(x.value||o.value)return;if(Tt.id===3){if(d.value||o.value)return;const Yt=c.dynamicFilters.find(er=>er.filterType==="check");Yt&&Yt.isChecked!==void 0&&M.value&&M.value.length>0&&(d.value=!0,M.value[0]=Yt.isChecked,t.nextTick(()=>{M.value=[...M.value],d.value=!1}))}setTimeout(()=>{(!M.value||M.value.length===0)&&($t(),Gt(),Lt()),Tt.id===4&&At()},100)}},{deep:!0}),t.watch(()=>{var Tt;return(Tt=L.value)==null?void 0:Tt.id},Tt=>{if(n.value&&c&&Tt===4){if(x.value||o.value)return;setTimeout(()=>{At()},200)}}),t.watch(()=>M.value,Tt=>{if(n.value&&c&&Tt&&Tt.length>0){if(x.value||d.value||o.value)return;setTimeout(()=>{var Yt;Pt()&&($t(),Gt(),Lt(),((Yt=L.value)==null?void 0:Yt.id)===4&&At())},50)}},{deep:!0});function z(Tt,Yt){var er,sr,Cr,Rr,sa;const Ia=M.value[Tt];if((er=L.value)==null||er.id,(sr=L.value)==null||sr.id,Array.isArray(Ia)){if(((Cr=L.value)==null?void 0:Cr.id)===4&&Tt===0){const qa=Ia.some(bn=>{if(Yt.category_id&&Yt.event_type_id){if(bn.category_id&&bn.event_type_id)return bn.category_id===Yt.category_id&&bn.event_type_id===Yt.event_type_id;if(bn.event_type_id&&!bn.category_id)return bn.event_type_id===Yt.event_type_id;if(bn.category_id&&!bn.event_type_id)return bn.category_id===Yt.category_id}else{if(Yt.event_type_id)return bn.event_type_id===Yt.event_type_id;if(Yt.category_id)return bn.category_id===Yt.category_id}return JSON.stringify(bn)===JSON.stringify(Yt)});return(Rr=L.value)==null||Rr.id,qa}return Ia.includes(Yt)}else if(Ia!=null)return(sa=L.value)==null||sa.id,Ia===Yt;return!1}function I(Tt,Yt){var er,sr,Cr;const Rr=(sr=(er=L.value)==null?void 0:er.filters)==null?void 0:sr[Tt];if((Rr==null?void 0:Rr.type)==="select-simple"){rt(Tt,Yt);return}Array.isArray(M.value[Tt])||(M.value[Tt]=[]);const sa=M.value[Tt];let Ia=-1;((Cr=L.value)==null?void 0:Cr.id)===4&&Tt===0?Ia=sa.findIndex(qa=>Yt.category_id&&Yt.event_type_id?qa.category_id===Yt.category_id&&qa.event_type_id===Yt.event_type_id:Yt.event_type_id?qa.event_type_id===Yt.event_type_id:Yt.category_id?qa.category_id===Yt.category_id:!1):Ia=sa.indexOf(Yt),Ia>-1?sa.splice(Ia,1):sa.push(Yt),n.value&&It(),He()}function j(Tt){var Yt,er;const sr=M.value[Tt],Cr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];return(Cr==null?void 0:Cr.type)==="select-simple"||!Cr||!Cr.options||!Array.isArray(sr)?!1:sr.length===Cr.options.length}function F(Tt){var Yt,er;const sr=M.value[Tt],Cr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];return(Cr==null?void 0:Cr.type)==="select-simple"||!Cr||!Cr.options||!Array.isArray(sr)?!1:sr.length>0&&sr.length<Cr.options.length}function W(){var Tt;return!(((Tt=L.value)==null?void 0:Tt.id)===6&&v.isPostMatch)}function U(Tt){return!Tt||!Array.isArray(Tt)?Tt:Tt.filter(Yt=>{const er=(Yt.name||Yt.title||"").toLowerCase();return v.isPostMatch?!0:!["resumen general","timeline","datos relevantes"].some(sr=>er.includes(sr))})}function O(){var Tt,Yt;const er=((Yt=(Tt=f.value)==null?void 0:Tt.name)==null?void 0:Yt.toLowerCase())||"";return er.includes("cancha")||er.includes("volumétrica")||er.includes("volumetric")}function X(Tt,Yt){if(!n.value||!O())return!1;const er=String(Tt||"").toLowerCase(),sr=String(Yt||"").toLowerCase();return er.includes("ambos")||sr.includes("ambos")}function N(Tt){var Yt,er;const sr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];if(!sr||!sr.options)return;const Cr=sr.options.map(Rr=>Rr.value);Array.isArray(M.value[Tt])||(M.value[Tt]=[]),j(Tt)?M.value[Tt]=[]:M.value[Tt]=[...Cr],ge.value=Tt,He()}const Y=t.ref("ambos"),se=t.ref(!1),me=t.ref(!1),ge=t.ref(null),be=t.ref(null);function xe(Tt,Yt=!1){const er="https://golstatsimages.blob.core.windows.net/images-library/",sr="https://golstatsimages.blob.core.windows.net/reports-images/",Cr={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},Rr=Object.keys(Cr).find(sa=>Tt==null?void 0:Tt.toLowerCase().includes(sa.toLowerCase()));if(Rr){const sa=Cr[Rr],Ia=Yt?"":"-def";return Rr.toLowerCase().includes("tabla")?`${sr}${sa}${Ia}@2x.png`:`${er}${sa}${Ia}@2x.png`}return`${er}icn_default${Yt?"":"-def"}.png`}function Ae(){return f.value?f.value.name:"Tipo de vista"}function qe(){return L.value?L.value.name||L.value.title:"Visualización"}function _e(){n.value||(se.value=!se.value,se.value&&(me.value=!1,t.nextTick(()=>{Jt()})))}function Ue(){n.value||f.value&&(me.value=!me.value,me.value&&(se.value=!1))}function je(Tt){n.value||(s.value=Tt,se.value=!1,S.value=null,He())}function Re(Tt){var Yt,er;n.value||(S.value=Tt.id,me.value=!1,(Yt=Tt.name)!=null&&Yt.toLowerCase().includes("tops players")||(er=Tt.title)==null||er.toLowerCase().includes("tops players"))}function We(Tt){var Yt;ge.value=ge.value===Tt?null:Tt,((Yt=L.value)==null?void 0:Yt.id)===4&&n.value&&Tt===0&&setTimeout(()=>{M.value=[...M.value]},50)}function Qe(Tt){be.value=be.value===Tt?null:Tt}function rt(Tt,Yt){var er,sr,Cr,Rr,sa;if(((er=L.value)==null?void 0:er.id)===2){const Ia=A.value.findIndex(qa=>qa.type==="select-simple"&&qa.label==="Tipo de análisis");Tt===Ia?M.value[0]=Yt:M.value[Tt]=Yt}else if(((sr=L.value)==null?void 0:sr.id)===1)M.value[0]=Yt;else if(((Cr=L.value)==null?void 0:Cr.id)===6)M.value[0]=Yt;else if(((Rr=L.value)==null?void 0:Rr.id)===9)if(Tt===0){Array.isArray(Yt)?M.value[Tt]=Yt:M.value[Tt]=[Yt];const Ia=((sa=A.value[Tt])==null?void 0:sa.options)||[],qa=Array.isArray(Yt)?Yt:[Yt],bn=Ia.find(fn=>Array.isArray(fn.value)?hr(fn.value,qa):qa.includes(fn.value));bn?M.value[Tt]=bn.value:M.value[Tt]=qa}else M.value[Tt]=Yt;else M.value[Tt]=Yt;be.value=null,n.value&&It(),He()}function pt(Tt){Tt.target.closest(".custom-select")||(se.value=!1,me.value=!1,be.value=null)}const ut=[16,18];function He(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua;if(ut.includes((Tt=L.value)==null?void 0:Tt.id)||x.value)return;let Xa=[],ja=[];L.value&&Array.isArray(A.value)&&A.value.forEach((wr,Na)=>{if(wr.type==="select"&&wr.label==="Tipo de análisis"&&wr.id===2){const rn=M.value[Na]||[];Array.isArray(rn)&&rn.length>0&&(Xa=rn.map(mn=>{var $a;const Hn=($a=wr.options)==null?void 0:$a.find(Pn=>Pn.value===mn);return{value:mn,label:(Hn==null?void 0:Hn.label)||mn}}))}});const on=((Yt=L.value)==null?void 0:Yt.id)===4;if(L.value&&Array.isArray(L.value.filters)&&L.value.filters.some(wr=>wr.type==="select"&&wr.label==="Tipo de análisis"&&wr.id===2)&&Xa.length===0&&!on)return;if(on&&M.value&&M.value.length>0){const wr=M.value[0];Array.isArray(wr)&&wr.length>0}ja=((er=A.value)==null?void 0:er.map((wr,Na)=>{var rn,mn,$a,Hn;const Pn=M.value[Na];let Yn=wr.id||`filter_${Na}`;return((rn=L.value)==null?void 0:rn.id)===3&&n.value&&(mn=p==null?void 0:p.view)!=null&&mn.id&&(Yn=`filter_${Na}_component_${p.view.id}`),{filterId:Yn,filterType:wr.type,filterLabel:wr.label,filterIcon:wr.icon||null,selectedValue:Pn,selectedOptions:wr.type==="select"&&Array.isArray(Pn)&&Pn.length>0?Pn.map(An=>{var Wn;const Ei=(Wn=wr.options)==null?void 0:Wn.find(Pi=>Pi.value===An);return{value:An,label:(Ei==null?void 0:Ei.label)||An,icon:(Ei==null?void 0:Ei.icon)||null}}):null,selectedOption:wr.type==="radio-button"&&Pn!=null?{value:Pn,label:((Hn=($a=wr.options)==null?void 0:$a.find(An=>An.value===Pn))==null?void 0:Hn.label)||Pn}:null,isChecked:wr.type==="check"?Pn:null}}))||[];const Ha={mainSelector:{id:((sr=f.value)==null?void 0:sr.id)||null,name:((Cr=f.value)==null?void 0:Cr.name)||null,url:((Rr=f.value)==null?void 0:Rr.url)||null},viewSelector:{id:((sa=L.value)==null?void 0:sa.id)||null,name:((Ia=L.value)==null?void 0:Ia.name)||((qa=L.value)==null?void 0:qa.title)||null,url:((bn=L.value)==null?void 0:bn.url)||null},team:Y.value,dynamicFilters:ja,categoriasSeleccionadas:Xa,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((fn=A.value)==null?void 0:fn.length)||0,activeFilters:((In=A.value)==null?void 0:In.filter((wr,Na)=>{const rn=M.value[Na];return Array.isArray(rn)?rn.length>0:rn!=null&&rn!==!1}).length)||0}},qr={main:f.value,view:L.value,team:Y.value,dynamicFilters:M.value,filtersJSON:Ha,filterAndViewsContainer:i,viewToEdit:p};if($("filters-changed",qr),n.value&&p){if(c=Ha,((ea=L.value)==null?void 0:ea.id)===2){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Tipo de análisis");wr!==-1&&(fa=(Ur=p.view)==null?void 0:Ur.filterMultiple)!=null&&fa.categoryId&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.categoryId)}if(((Va=L.value)==null?void 0:Va.id)===1){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Tipo de análisis");wr!==-1&&(Oa=(Za=p.view)==null?void 0:Za.filterMultiple)!=null&&Oa.category&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.category)}}if(((Xr=L.value)==null?void 0:Xr.id)===6&&n.value&&(ca=p==null?void 0:p.view)!=null&&ca.filterMultiple&&p.view.filterMultiple.gameNumber&&c){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Número de juego");wr!==-1&&(ua=(kr=p.view)==null?void 0:kr.filterMultiple)!=null&&ua.gameNumber&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.gameNumber)}i&&!n.value?i.setDynamicFilters(M.value):i&&n.value}function st(){p=null,c=null,i=null,s.value=null,S.value=null,Y.value="ambos",M.value=[],se.value=!1,me.value=!1,ge.value=null,be.value=null,n.value=!1,k.value=!1,T.value=!1}function ct(Tt){if(Tt&&Tt.dynamicFilters){if(d.value)return;Array.isArray(Tt.dynamicFilters)&&Tt.dynamicFilters.length>0&&(x.value=!0,M.value=[...Tt.dynamicFilters],t.nextTick(()=>{x.value=!1}))}}function Ct(Tt){if(n.value=!0,Tt.mainSelector&&Tt.mainSelector.id){const Yt=u.value.findIndex(er=>er.id===Tt.mainSelector.id);Yt!==-1&&(s.value=Yt)}Tt.viewSelector&&Tt.viewSelector.id&&f.value&&f.value.views.findIndex(Yt=>Yt.id===Tt.viewSelector.id)!==-1&&(S.value=Tt.viewSelector.id),Tt.dynamicFilters&&Array.isArray(Tt.dynamicFilters)&&t.nextTick(()=>{setTimeout(()=>{var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja;if(L.value&&A.value){if(x.value)return;if(d.value=!0,Tt.dynamicFilters.forEach((on,Ha)=>{var qr,wr,Na,rn,mn,$a,Hn,Pn,Yn,An,Wn,Ei,Pi;if(Ha<A.value.length){const Po=A.value[Ha];if(((qr=L.value)==null?void 0:qr.id)===3&&n.value,Po.type==="check"){const So=on.isChecked;typeof So=="boolean"&&(M.value[Ha]=So)}else if(Po.type==="select"&&on.selectedOptions){const So=on.selectedOptions.map(Vo=>Vo.value);M.value[Ha]=So}else if(Po.type==="select"&&on.selectedValue&&Array.isArray(on.selectedValue))if(on.selectedValue.length>0&&on.selectedValue[0]&&typeof on.selectedValue[0]=="object"){const So=or(on.selectedValue);M.value[Ha]=So}else M.value[Ha]=on.selectedValue;else if(Po.type==="radio-button"&&on.selectedOption)M.value[Ha]=on.selectedOption.value;else if(Po.type==="select-simple"&&on.selectedValue!==void 0){let So;((wr=L.value)==null?void 0:wr.id)===2&&(rn=(Na=p==null?void 0:p.view)==null?void 0:Na.filterMultiple)!=null&&rn.categoryId?So=p.view.filterMultiple.categoryId:((mn=L.value)==null?void 0:mn.id)===1&&(Hn=($a=p==null?void 0:p.view)==null?void 0:$a.filterMultiple)!=null&&Hn.category?So=p.view.filterMultiple.category:((Pn=L.value)==null?void 0:Pn.id)===6&&(An=(Yn=p==null?void 0:p.view)==null?void 0:Yn.filterMultiple)!=null&&An.gameNumber?So=p.view.filterMultiple.gameNumber:((Wn=L.value)==null?void 0:Wn.id)===9&&(Pi=(Ei=p==null?void 0:p.view)==null?void 0:Ei.filterMultiple)!=null&&Pi.categoryIds?So=p.view.filterMultiple.categoryIds:So=Array.isArray(on.selectedValue)?on.selectedValue[0]:on.selectedValue,M.value[Ha]=So}}}),((Yt=L.value)==null?void 0:Yt.id)===3&&n.value,((er=L.value)==null?void 0:er.id)===2&&n.value&&(sr=p==null?void 0:p.view)!=null&&sr.filterMultiple){if(p.view.filterMultiple.categoryId){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Tipo de análisis");if(on!==-1){const Ha=p.view.filterMultiple.categoryId;if(M.value[0]=Ha,p.view.componentProps&&Ha){let qr=`Category ${Ha}`,wr=null;try{wr=A4(Ha),wr&&(qr=wr.name)}catch{const Na=A.value.findIndex(rn=>rn.type==="select-simple"&&rn.label==="Tipo de análisis");if(Na!==-1){const rn=(((Cr=A.value[Na])==null?void 0:Cr.options)||[]).find(mn=>mn.value==Ha);rn&&(qr=rn.label)}}p.view.componentProps.categoryView=[{id:Ha,name:qr}]}(((Rr=A.value[on])==null?void 0:Rr.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.teamType!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button");if(on!==-1){const Ha=p.view.filterMultiple.teamType;M.value[on]=Ha,(((sa=A.value[on])==null?void 0:sa.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}}if(((Ia=L.value)==null?void 0:Ia.id)===9&&n.value&&(qa=p==null?void 0:p.view)!=null&&qa.filterMultiple){if(p.view.filterMultiple.categoryIds){const on=A.value.findIndex(Ha=>Ha.type==="select-simple");if(on!==-1){const Ha=Array.isArray(p.view.filterMultiple.categoryIds)?p.view.filterMultiple.categoryIds:[p.view.filterMultiple.categoryIds];M.value[0]=Ha;const qr=(((bn=A.value[on])==null?void 0:bn.options)||[]).filter(Na=>Array.isArray(Na.value)?hr(Na.value,Ha):Ha.includes(Na.value));if(qr.length>0){const Na=qr[0].value;M.value[on]=Na}else M.value[on]=Ha;const wr=M.value[on];hr(wr,Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.isHomeTeam!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button");if(on!==-1){const Ha=p.view.filterMultiple.isHomeTeam;let qr;typeof Ha=="boolean"?qr=Ha?1:2:typeof Ha=="number"?qr=Ha===1?1:2:qr=1,M.value[on]=qr,(((fn=A.value[on])==null?void 0:fn.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}}}if(((In=L.value)==null?void 0:In.id)===1&&n.value&&(ea=p==null?void 0:p.view)!=null&&ea.filterMultiple&&p.view.filterMultiple.category){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Tipo de análisis");if(on!==-1){const Ha=p.view.filterMultiple.category;M.value[0]=Ha,p.view.componentProps&&Ha&&(p.view.componentProps.type=Ha),(((Ur=A.value[on])==null?void 0:Ur.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(((fa=L.value)==null?void 0:fa.id)===6&&n.value&&(Va=p==null?void 0:p.view)!=null&&Va.filterMultiple&&p.view.filterMultiple.gameNumber){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Número de juego");if(on!==-1){const Ha=p.view.filterMultiple.gameNumber;M.value[0]=Ha,p.view.componentProps&&Ha&&(p.view.componentProps.gameNumber=Ha),(((Za=A.value[on])==null?void 0:Za.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(((Oa=L.value)==null?void 0:Oa.id)===7&&n.value&&p!=null&&p.view){if((Xr=p.view.componentProps)!=null&&Xr.analysisType&&A.value.length>0&&((ca=A.value[0])==null?void 0:ca.type)==="radio-button"){const on=p.view.componentProps.analysisType==="offensive"?1:2;M.value[0]=on}if(((kr=p.view.filterMultiple)==null?void 0:kr.isHomeTeam)!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button"&&Ha.label==="Equipo");if(on!==-1){const Ha=p.view.filterMultiple.isHomeTeam?1:2;M.value[1]=Ha}else if(A.value.length>1&&((ua=A.value[1])==null?void 0:ua.type)==="radio-button"){const Ha=p.view.filterMultiple.isHomeTeam,qr=Ha?1:2;M.value[1]=qr,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Ha),(((Xa=A.value[1])==null?void 0:Xa.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}if(on!==-1&&p.view.componentProps){const Ha=p.view.filterMultiple.isHomeTeam,qr=Ha?1:2;p.view.componentProps.isHomeTeamForAnalysis=Ha,(((ja=A.value[on])==null?void 0:ja.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}}}t.nextTick(()=>{d.value=!1})}},100)})}function Vt(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn;return{mainSelector:{id:((Tt=f.value)==null?void 0:Tt.id)||null,name:((Yt=f.value)==null?void 0:Yt.name)||null,url:((er=f.value)==null?void 0:er.url)||null},viewSelector:{id:((sr=L.value)==null?void 0:sr.id)||null,name:((Cr=L.value)==null?void 0:Cr.name)||((Rr=L.value)==null?void 0:Rr.title)||null,url:((sa=L.value)==null?void 0:sa.url)||null},team:Y.value,dynamicFilters:((Ia=A.value)==null?void 0:Ia.map((fn,In)=>{var ea,Ur;const fa=M.value[In];return{filterId:fn.id||`filter_${In}`,filterType:fn.type,filterLabel:fn.label,filterIcon:fn.icon||null,selectedValue:fa,selectedOptions:fn.type==="select"&&Array.isArray(fa)&&fa.length>0?fa.map(Va=>{var Za;const Oa=(Za=fn.options)==null?void 0:Za.find(Xr=>Xr.value===Va);return{value:Va,label:(Oa==null?void 0:Oa.label)||Va,icon:(Oa==null?void 0:Oa.icon)||null}}):null,selectedOption:fn.type==="radio-button"&&fa?{value:fa,label:((Ur=(ea=fn.options)==null?void 0:ea.find(Va=>Va.value===fa))==null?void 0:Ur.label)||fa}:null,isChecked:fn.type==="check"?fa:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((qa=A.value)==null?void 0:qa.length)||0,activeFilters:((bn=A.value)==null?void 0:bn.filter((fn,In)=>{const ea=M.value[In];return Array.isArray(ea)?ea.length>0:ea!=null&&ea!==!1}).length)||0}}}r({getCurrentFiltersJSON:Vt});function Ot(){st(),$("close",i)}function qt(){k.value=!1,Ot()}function Zt(){T.value&&(Sd.emit("filters-cancelled",i),T.value=!1),k.value=!1,Ot()}t.onMounted(async()=>{document.addEventListener("click",pt),t.nextTick(()=>{Jt()});const Tt="https://fb78a14uud.execute-api.us-east-2.amazonaws.com/qa/views";try{const Yt=await(await fetch(Tt,{headers:{Authorization:`${v.token}`}})).json();u.value=Yt.data||[],h.value.clear(),u.value&&(h.value=u.value.reduce((er,sr)=>(sr.views&&Array.isArray(sr.views)&&sr.views.forEach(Cr=>{Cr.filters&&Array.isArray(Cr.filters)&&er.set(Cr.id,Cr)}),er),new Map))}catch(Yt){console.error("Error al obtener datos:",Yt)}});function Jt(){document.querySelectorAll(".field-menu .option-card").forEach(Tt=>{const Yt=Tt.querySelector(".option-img");if(!Yt||!Yt.dataset.hoverSrc)return;const er=Yt.src,sr=Yt.dataset.hoverSrc;Tt.addEventListener("mouseenter",()=>{Yt.src=sr}),Tt.addEventListener("mouseleave",()=>{Yt.src=er})})}t.onUnmounted(()=>{document.removeEventListener("click",pt)}),Sd.on("set-filter-and-views-container",Tt=>{i=Tt,Tt&&ct(Tt)}),Sd.on("view-added",()=>{k.value=!0,T.value=!0}),Sd.on("component-added-to-container",Tt=>{(!n.value||i&&Tt.id===i.id)&&ct(Tt)}),Sd.on("edit-view",Tt=>{var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja;console.log("on edit-view event received for view:",Tt),p=Tt,i=((Yt=Tt.view)==null?void 0:Yt.filterAndViewsContainer)||null,c=null;const on=[(sr=(er=Tt.view)==null?void 0:er.coreView)==null?void 0:sr.filtersJSON,(Cr=Tt.view)==null?void 0:Cr.filtersJSON,(Rr=Tt.coreView)==null?void 0:Rr.filtersJSON,Tt.filtersJSON,(Ia=(sa=Tt.view)==null?void 0:sa.componentProps)==null?void 0:Ia.filtersJSON];for(const Ha of on)if(Ha){c=Ha;break}if(i&&(i.viewId===4||i.viewId===8||i.viewId===3||i.viewId===1||i.viewId===2||i.viewId===13)&&(qa=Tt.view)!=null&&qa.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha){let qr="Unknown";i.viewId===4?qr="Timeline":i.viewId===8?qr="FieldPosesion":i.viewId===3?qr="GSCMatchSummary":i.viewId===1?qr="GSCComparativeReports":i.viewId===2?qr="GscTopPlayer":i.viewId===13&&(qr="GSCTimelapseTable"),c&&(i.viewId===13?c={...c,dynamicFilters:Ha}:c={...c,dynamicFilters:Ha.map((wr,Na)=>Array.isArray(wr)?{selectedValue:wr,selectedOptions:wr.map(rn=>({value:rn,label:rn}))}:typeof wr=="boolean"?{isChecked:wr}:qr==="GSCComparativeReports"&&Na===0?{selectedValue:wr,selectedOptions:[{value:wr,label:wr}]}:qr==="GscTopPlayer"&&Na===0?{selectedValue:wr,selectedOptions:[{value:wr,label:wr}]}:qr==="GscTopPlayer"&&Na===1?{selectedOption:{value:wr,label:wr}}:{selectedOption:{value:wr,label:wr}})})}}if(i&&i.viewId===2&&(bn=Tt.view)!=null&&bn.filterMultiple){if(Tt.view.filterMultiple.categoryId&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Tipo de análisis");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.categoryId,selectedOptions:[{value:Tt.view.filterMultiple.categoryId,label:`Category ${Tt.view.filterMultiple.categoryId}`}]})}if(Tt.view.filterMultiple.teamType!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button");if(Ha!==-1){const qr=Tt.view.filterMultiple.teamType,wr=qr===1?"Mi equipo":qr===2?"Rival":qr===3?"Ambos":"Equipo";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:qr,label:wr}}}}}if(i&&i.viewId===1&&(fn=Tt.view)!=null&&fn.filterMultiple&&Tt.view.filterMultiple.category&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Tipo de análisis");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.category,selectedOptions:[{value:Tt.view.filterMultiple.category,label:Tt.view.filterMultiple.category}]})}if(i&&i.viewId===9&&(In=Tt.view)!=null&&In.filterMultiple){if(Tt.view.filterMultiple.categoryIds&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select"&&qr.filterLabel==="Tipo de análisis");if(Ha!==-1){const qr=Array.isArray(Tt.view.filterMultiple.categoryIds)?Tt.view.filterMultiple.categoryIds:[Tt.view.filterMultiple.categoryIds];c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:qr,selectedOptions:qr.map(rn=>({value:rn,label:`Category ${rn}`}))};const wr=Tt.view.filterMultiple.categoryIds;hr(wr,qr);const Na=(((ea=A.value[Ha])==null?void 0:ea.options)||[]).filter(rn=>Array.isArray(rn.value)?hr(rn.value,qr):qr.includes(rn.value));if(Na.length>0){const rn=Na[0];c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:rn.value,selectedOptions:[rn]}}}}if(Tt.view.filterMultiple.isHomeTeam!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam;let wr,Na;typeof qr=="boolean"?(wr=qr?1:2,Na=qr?"Mi equipo":"Rival"):typeof qr=="number"?(wr=qr===1?1:2,Na=qr===1?"Mi equipo":"Rival"):(wr=1,Na="Mi equipo"),c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}}if(i&&i.viewId===6&&(Ur=Tt.view)!=null&&Ur.filterMultiple&&Tt.view.filterMultiple.gameNumber&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Número de juego");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.gameNumber,selectedOptions:[{value:Tt.view.filterMultiple.gameNumber,label:`Juego ${Tt.view.filterMultiple.gameNumber}`}]})}if(i&&i.viewId===7&&Tt.view&&c){if((fa=Tt.view.componentProps)!=null&&fa.analysisType){const Ha=c.dynamicFilters.findIndex((qr,wr)=>qr.filterType==="radio-button"&&wr===0);if(Ha!==-1){const qr=Tt.view.componentProps.analysisType,wr=qr==="offensive"?1:2,Na=qr==="offensive"?"A favor":"En contra";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}if(((Va=Tt.view.filterMultiple)==null?void 0:Va.isHomeTeam)!==void 0){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button"&&qr.filterLabel==="Equipo");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam,wr=qr?1:2,Na=qr?"Equipo propio":"Equipo rival";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}}if(i&&i.viewId===10&&(Za=Tt.view)!=null&&Za.filterMultiple&&((Xr=(Oa=p==null?void 0:p.view)==null?void 0:Oa.coreView)==null?void 0:Xr.id)===10){const Ha=Tt.view.componentProps.isHomeTeamForAnalysis?{label:"Equipo propio",value:1}:{label:"Rival",value:2};c&&(c.dynamicFilters[0]={...c.dynamicFilters[0],selectedOption:Ha})}if(i&&i.viewId===15&&(ca=Tt.view)!=null&&ca.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha&&c)c={...c,dynamicFilters:Ha.map((qr,wr)=>{var Na,rn;if(wr===0){let mn=qr;if(qr===3&&((rn=(Na=Tt.view)==null?void 0:Na.filterMultiple)==null?void 0:rn.isHomeTeam)!==void 0){const $a=Tt.view.filterMultiple.isHomeTeam;typeof $a=="boolean"?mn=$a?1:2:typeof $a=="number"&&(mn=$a===1?1:2)}return{selectedOption:{value:mn,label:mn===1?"Mi equipo":"Rival"}}}else if(wr===1)return{selectedValue:qr,selectedOptions:[{value:qr,label:`${qr} fortalezas`}]};return typeof qr=="number"?{selectedValue:qr}:{selectedOption:{value:qr,label:String(qr)}}})};else if((kr=Tt.view)!=null&&kr.filterMultiple&&c&&Tt.view.filterMultiple.isHomeTeam!==void 0){const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button"&&wr.filterLabel==="Mi equipo");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Local":"Visitante"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Local":"Visitante"):(Na=1,rn="Local"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}if(i&&i.viewId===17&&(ua=Tt.view)!=null&&ua.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha&&c)console.log("Edit filters opt 1",c),c={...c,dynamicFilters:Ha.map((qr,wr)=>{var Na,rn,mn,$a,Hn,Pn;const Yn=(Na=A.value)==null?void 0:Na[wr];if(Yn&&Yn.type==="radio-button"){let An=qr;if(qr===3&&((mn=(rn=Tt.view)==null?void 0:rn.filterMultiple)==null?void 0:mn.isHomeTeam)!==void 0){const Wn=Tt.view.filterMultiple.isHomeTeam;typeof Wn=="boolean"?An=Wn?1:2:typeof Wn=="number"&&(An=Wn===1?1:2)}return{selectedOption:{value:An,label:An===1?"Mi equipo":An===2?"Rival":"Ambos"}}}else if(wr===2){let An=qr;if((qr===3||qr!==1&&qr!==2&&($a=Tt.view)!=null&&$a.filterMultiple)&&((Pn=(Hn=Tt.view)==null?void 0:Hn.filterMultiple)==null?void 0:Pn.isHomeTeam)!==void 0){const Wn=Tt.view.filterMultiple.isHomeTeam;typeof Wn=="boolean"?An=Wn?1:2:typeof Wn=="number"&&(An=Wn===1?1:2)}return Yn&&Yn.type==="select-simple"?{selectedValue:An,selectedOptions:[{value:An,label:String(An)}]}:Yn&&Yn.type==="radio-button"?{selectedOption:{value:An,label:An===1?"Mi equipo":An===2?"Rival":"Ambos"}}:typeof An=="number"?{selectedValue:An}:{selectedOption:{value:An,label:String(An)}}}else{if(Yn&&Yn.type==="switch")return typeof qr=="boolean"?{selectedValue:qr}:{selectedValue:qr};if(Yn&&Yn.type==="check")return typeof qr=="boolean"?{selectedValue:qr}:{selectedValue:qr}}return Array.isArray(qr)?{selectedValue:qr,selectedOptions:qr.map(An=>({value:An,label:String(An)}))}:typeof qr=="boolean"?{selectedValue:qr}:typeof qr=="object"&&qr!==null?qr:typeof qr=="number"?{selectedValue:qr}:{selectedOption:{value:qr,label:String(qr)}}})},console.log("Edit filters opt 1 finla --->",c);else if((Xa=Tt.view)!=null&&Xa.filterMultiple&&c&&(console.log("Edit filters opt 1 multiple"),Tt.view.filterMultiple.isHomeTeam!==void 0)){const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Mi equipo":"Rival"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Mi equipo":"Rival"):(Na=1,rn="Mi equipo"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}if(i&&i.viewId===5&&(ja=Tt.view)!=null&&ja.filterMultiple&&Tt.view.filterMultiple.isHomeTeam!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button"&&qr.filterLabel==="Equipo");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam;let wr,Na;typeof qr=="boolean"?(wr=qr?1:2,Na=qr?"Equipo propio":"Equipo rival"):typeof qr=="number"?(wr=qr===1?1:2,Na=qr===1?"Equipo propio":"Equipo rival"):(wr=1,Na="Equipo propio"),c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}else{const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Equipo propio":"Equipo rival"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Equipo propio":"Equipo rival"):(Na=1,rn="Equipo propio"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}c&&Ct(c),k.value=!0});function Qt(){ge.value=null}function cr(Tt,Yt){var er;(er=L.value)==null||er.id}function hr(Tt,Yt){if(!Array.isArray(Tt)||!Array.isArray(Yt)||Tt.length!==Yt.length)return!1;const er=[...Tt].sort((Cr,Rr)=>Cr-Rr),sr=[...Yt].sort((Cr,Rr)=>Cr-Rr);return JSON.stringify(er)===JSON.stringify(sr)}function $t(){if(n.value&&c&&c.dynamicFilters){if(o.value||x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Tt,Yt)=>{var er;if(Tt&&(er=A.value)!=null&&er[Yt]){const sr=A.value[Yt];if(sr.type==="check"&&Tt.isChecked!==void 0)M.value[Yt]=Tt.isChecked;else if(sr.type==="select"&&Tt.selectedOptions){const Cr=Tt.selectedOptions.map(Rr=>Rr.value);M.value[Yt]=Cr}else sr.type==="select"&&Tt.selectedValue&&Array.isArray(Tt.selectedValue)&&(M.value[Yt]=Tt.selectedValue)}}),t.nextTick(()=>{d.value=!1,o.value=!1})}}function At(){var Tt;if(n.value&&c&&c.dynamicFilters&&((Tt=L.value)==null?void 0:Tt.id)===4){if(o.value||x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Yt,er)=>{var sr,Cr;if(Yt&&((Cr=(sr=A.value)==null?void 0:sr[er])==null?void 0:Cr.type)==="select"){if(Yt.selectedOptions){const Rr=Yt.selectedOptions.map(sa=>sa.value);M.value[er]=Rr}else if(Yt.selectedValue&&Array.isArray(Yt.selectedValue))if(Yt.selectedValue.length>0&&Yt.selectedValue[0]&&typeof Yt.selectedValue[0]=="object"){const Rr=or(Yt.selectedValue);M.value[er]=Rr}else M.value[er]=Yt.selectedValue}}),setTimeout(()=>{var Yt;if(M.value=[...M.value],(Yt=p==null?void 0:p.view)!=null&&Yt.componentProps&&M.value&&M.value.length>0){const er=M.value[0];if(Array.isArray(er)&&er.length>0){const sr=er.some(Ia=>Ia.event_type_id===1||typeof Ia=="string"&&Ia.includes("1")),Cr=er.some(Ia=>Ia.category_id===8||typeof Ia=="string"&&Ia.includes("8")),Rr=er.some(Ia=>Ia.category_id===9||typeof Ia=="string"&&Ia.includes("9")),sa=er.some(Ia=>Ia.event_type_id===3||typeof Ia=="string"&&Ia.includes("3"));p.view.componentProps.selectedEvents=er,p.view.componentProps.goals=sr,p.view.componentProps.yellowCards=Cr,p.view.componentProps.redCards=Rr,p.view.componentProps.substitutions=sa,p.view.componentProps.key=er.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}},200),t.nextTick(()=>{d.value=!1,o.value=!1})}}function or(Tt){return!Array.isArray(Tt)||Tt.length===0?[]:Tt.map(Yt=>{if(Yt&&typeof Yt=="object"){if(Yt.event_type_id!==void 0||Yt.category_id!==void 0)return{event_type_id:Yt.event_type_id,category_id:Yt.category_id,...Yt.name&&{name:Yt.name},...Yt.label&&{label:Yt.label}};if(Yt.value&&typeof Yt.value=="object")return{event_type_id:Yt.value.event_type_id,category_id:Yt.value.category_id,...Yt.value.name&&{name:Yt.value.name},...Yt.value.label&&{label:Yt.value.label}};if(typeof Yt=="string"&&Yt.includes("-")){const[er,sr]=Yt.split("-");return{category_id:parseInt(er),event_type_id:parseInt(sr)}}}if(typeof Yt=="string")if(Yt.includes("-")){const[er,sr]=Yt.split("-");return{category_id:parseInt(er),event_type_id:parseInt(sr)}}else{const er=parseInt(Yt);if(!isNaN(er))return{event_type_id:er}}return Yt})}function Gt(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va;if(n.value&&c&&c.dynamicFilters&&A.value){if(o.value||x.value)return;if(o.value=!0,d.value=!0,c.dynamicFilters.forEach((Za,Oa)=>{var Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr,Na;if(Za&&((Xr=A.value[Oa])==null?void 0:Xr.type)==="select"){if(Za.selectedOptions){const rn=Za.selectedOptions.map(mn=>mn.value);M.value[Oa]=rn}else if(Za.selectedValue&&Array.isArray(Za.selectedValue))if(Za.selectedValue.length>0&&Za.selectedValue[0]&&typeof Za.selectedValue[0]=="object"){const rn=or(Za.selectedValue);M.value[Oa]=rn}else M.value[Oa]=Za.selectedValue}else if(Za&&((ca=A.value[Oa])==null?void 0:ca.type)==="select-simple"&&Za.selectedValue!==void 0){let rn;((kr=L.value)==null?void 0:kr.id)===2&&(Xa=(ua=p==null?void 0:p.view)==null?void 0:ua.filterMultiple)!=null&&Xa.categoryId?rn=p.view.filterMultiple.categoryId:((ja=L.value)==null?void 0:ja.id)===1&&(Ha=(on=p==null?void 0:p.view)==null?void 0:on.filterMultiple)!=null&&Ha.category?rn=p.view.filterMultiple.category:((qr=L.value)==null?void 0:qr.id)===6&&(Na=(wr=p==null?void 0:p.view)==null?void 0:wr.filterMultiple)!=null&&Na.gameNumber?rn=p.view.filterMultiple.gameNumber:rn=Array.isArray(Za.selectedValue)?Za.selectedValue[0]:Za.selectedValue,M.value[Oa]=rn}}),((Tt=L.value)==null?void 0:Tt.id)===4&&setTimeout(()=>{var Za;if(M.value=[...M.value],(Za=p==null?void 0:p.view)!=null&&Za.componentProps&&M.value&&M.value.length>0){const Oa=M.value[0];if(Array.isArray(Oa)&&Oa.length>0){const Xr=Oa.some(Xa=>Xa.event_type_id===1||typeof Xa=="string"&&Xa.includes("1")),ca=Oa.some(Xa=>Xa.category_id===8||typeof Xa=="string"&&Xa.includes("8")),kr=Oa.some(Xa=>Xa.category_id===9||typeof Xa=="string"&&Xa.includes("9")),ua=Oa.some(Xa=>Xa.event_type_id===3||typeof Xa=="string"&&Xa.includes("3"));p.view.componentProps.selectedEvents=Oa,p.view.componentProps.goals=Xr,p.view.componentProps.yellowCards=ca,p.view.componentProps.redCards=kr,p.view.componentProps.substitutions=ua,p.view.componentProps.key=Oa.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}},100),((Yt=L.value)==null?void 0:Yt.id)===2&&(er=p==null?void 0:p.view)!=null&&er.filterMultiple){if(p.view.filterMultiple.categoryId){const Za=A.value.findIndex(Oa=>Oa.type==="select-simple"&&Oa.label==="Tipo de análisis");if(Za!==-1){const Oa=p.view.filterMultiple.categoryId;if(M.value[0]=Oa,p.view.componentProps&&Oa){let Xr=`Category ${Oa}`,ca=null;try{ca=A4(Oa),ca&&(Xr=ca.name)}catch{const kr=A.value.findIndex(ua=>ua.type==="select-simple"&&ua.label==="Tipo de análisis");if(kr!==-1){const ua=(((sr=A.value[kr])==null?void 0:sr.options)||[]).find(Xa=>Xa.value==Oa);ua&&(Xr=ua.label)}}p.view.componentProps.categoryView=[{id:Oa,name:Xr}]}(((Cr=A.value[Za])==null?void 0:Cr.options)||[]).find(Xr=>Xr.value==Oa),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.teamType!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.teamType;M.value[Za]=Oa,(((Rr=A.value[Za])==null?void 0:Rr.options)||[]).find(Xr=>Xr.value==Oa),t.nextTick(()=>{M.value=[...M.value]})}}}if(((sa=L.value)==null?void 0:sa.id)===1&&(Ia=p==null?void 0:p.view)!=null&&Ia.filterMultiple&&p.view.filterMultiple.category&&A.value.findIndex(Za=>Za.type==="select-simple"&&Za.label==="Tipo de análisis")!==-1){const Za=p.view.filterMultiple.category;M.value[0]=Za,p.view.componentProps&&Za&&(p.view.componentProps.type=Za),t.nextTick(()=>{M.value=[...M.value]})}if(((qa=L.value)==null?void 0:qa.id)===6&&(bn=p==null?void 0:p.view)!=null&&bn.filterMultiple&&p.view.filterMultiple.gameNumber&&A.value.findIndex(Za=>Za.type==="select-simple"&&Za.label==="Número de juego")!==-1){const Za=p.view.filterMultiple.gameNumber;M.value[0]=Za,p.view.componentProps&&Za&&(p.view.componentProps.gameNumber=Za),t.nextTick(()=>{M.value=[...M.value]})}if(((fn=L.value)==null?void 0:fn.id)===5&&(In=p==null?void 0:p.view)!=null&&In.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0)if(A.value.findIndex(Za=>Za.type==="radio-button"&&Za.label==="Equipo")!==-1){const Za=p.view.filterMultiple.isHomeTeam;let Oa;typeof Za=="boolean"?Oa=Za?1:2:typeof Za=="number"?Oa=Za===1?1:2:Oa=1,M.value[0]=Oa,p.view.componentProps&&Za!==void 0&&(p.view.componentProps.isHomeTeamForAnalysis=Za===1),t.nextTick(()=>{M.value=[...M.value]})}else{const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.preMatchType=Oa),t.nextTick(()=>{M.value=[...M.value]})}}if(((ea=L.value)==null?void 0:ea.id)===15&&(Ur=p==null?void 0:p.view)!=null&&Ur.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;console.log("Strengths forceRadioFilterUpdate - isHomeTeam:",Oa,"type:",typeof Oa);let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,console.log("Strengths forceRadioFilterUpdate - teamValue calculado:",Xr,"teamFilterIndex:",Za),M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.preMatchType=Xr),t.nextTick(()=>{M.value=[...M.value],console.log("Strengths forceRadioFilterUpdate - dynamicFilters.value después:",M.value)})}else{const Oa=A.value.findIndex(Xr=>Xr.type==="radio-button");if(Oa!==-1){const Xr=p.view.filterMultiple.isHomeTeam;let ca;typeof Xr=="boolean"?ca=Xr?1:2:typeof Xr=="number"?ca=Xr===1?1:2:ca=1,M.value[Oa]=ca,p.view.componentProps&&Xr!==void 0&&(p.view.componentProps.preMatchType=ca),t.nextTick(()=>{M.value=[...M.value]})}}}if(((fa=L.value)==null?void 0:fa.id)===17&&(Va=p==null?void 0:p.view)!=null&&Va.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.teamselected=Xr),t.nextTick(()=>{M.value=[...M.value]})}else{const Oa=A.value.findIndex(Xr=>Xr.type==="radio-button");if(Oa!==-1){const Xr=p.view.filterMultiple.isHomeTeam;let ca;typeof Xr=="boolean"?ca=Xr?1:2:typeof Xr=="number"?ca=Xr===1?1:2:ca=1,M.value[Oa]=ca,p.view.componentProps&&Xr!==void 0&&(p.view.componentProps.teamselected=ca),t.nextTick(()=>{M.value=[...M.value]})}}}t.nextTick(()=>{d.value=!1,o.value=!1})}}function Lt(){if(!o.value&&n.value&&c&&c.dynamicFilters&&A.value){if(x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Tt,Yt)=>{var er;if(Tt&&((er=A.value[Yt])==null?void 0:er.type)==="radio-button"&&Tt.selectedOption&&Tt.selectedOption.value!==void 0){const sr=Tt.selectedOption.value;M.value[Yt]=sr}}),t.nextTick(()=>{d.value=!1,o.value=!1})}}function It(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr,Na,rn,mn,$a,Hn,Pn,Yn;if(i&&n.value&&p){if(x.value)return;if(d.value=!0,((Tt=L.value)==null?void 0:Tt.id)===4){if(i.setDynamicFilters(M.value,(Yt=p.view)==null?void 0:Yt.id),i.updateDynamicFilters(M.value,(er=p.view)==null?void 0:er.id),p.view.componentProps&&M.value&&M.value.length>0){const An=M.value[0];if(Array.isArray(An)&&An.length>0){const Wn=An.some(So=>So.event_type_id===1||typeof So=="string"&&So.includes("1")),Ei=An.some(So=>So.category_id===8||typeof So=="string"&&So.includes("8")),Pi=An.some(So=>So.category_id===9||typeof So=="string"&&So.includes("9")),Po=An.some(So=>So.event_type_id===3||typeof So=="string"&&So.includes("3"));p.view.componentProps.selectedEvents=An,p.view.componentProps.goals=Wn,p.view.componentProps.yellowCards=Ei,p.view.componentProps.redCards=Pi,p.view.componentProps.substitutions=Po,p.view.componentProps.key=An.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}}else if(((sr=L.value)==null?void 0:sr.id)===8)i.setDynamicFilters(M.value,(Cr=p.view)==null?void 0:Cr.id),i.updateDynamicFilters(M.value,(Rr=p.view)==null?void 0:Rr.id);else if(((sa=L.value)==null?void 0:sa.id)===3)i.setDynamicFilters(M.value,(Ia=p.view)==null?void 0:Ia.id),i.updateDynamicFilters(M.value,(qa=p.view)==null?void 0:qa.id);else if(((bn=L.value)==null?void 0:bn.id)===13){const An=(fn=p.view)==null?void 0:fn.id;i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An),p.view.componentProps&&(p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps}))}else if(((In=L.value)==null?void 0:In.id)===15){const An=(ea=p.view)==null?void 0:ea.id;if(i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An),p.view.componentProps){const Wn=Array.isArray(M.value)&&M.value[3]!==void 0?M.value[3]:null;Wn!==null&&(p.view.componentProps.numitems=Wn),p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}else if(((Ur=L.value)==null?void 0:Ur.id)===17){const An=(fa=p==null?void 0:p.view)==null?void 0:fa.id;i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An);const Wn=(Ei,Pi)=>{if(!Ei)return;const Po=M.value[0];Po!==void 0&&(Ei.infavoragainstteam=!Po);const So=M.value[1];So!==void 0&&(Ei.lateralidad=So===32?"right":"left");const Vo=M.value[2];Vo!==void 0&&Pi&&(Vo===3||(Ei.teamselected=Vo===2?Pi.away_team:Pi.home_team)),Ei._updateKey=Date.now()};if(p&&p.view&&p.view.componentProps){const Ei=p.view.componentProps.game;Wn(p.view.componentProps,Ei),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}else if(((Va=L.value)==null?void 0:Va.id)===2){i.setDynamicFilters(M.value,(Za=p.view)==null?void 0:Za.id),i.updateDynamicFilters(M.value,(Oa=p.view)==null?void 0:Oa.id);const An=M.value[0];if(An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.categoryId,p.view.filterMultiple.categoryId=An,p.view.componentProps)){let Ei=`Category ${An}`,Pi=null;try{Pi=A4(An),Pi&&(Ei=Pi.name)}catch{const Po=A.value.findIndex(So=>So.type==="select-simple"&&So.label==="Tipo de análisis");if(Po!==-1){const So=(((Xr=A.value[Po])==null?void 0:Xr.options)||[]).find(Vo=>Vo.value==An);So&&(Ei=So.label)}}p.view.componentProps.categoryView=[{id:An,name:Ei}],Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple})}const Wn=M.value[1];Wn!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.teamType,p.view.filterMultiple.teamType=Wn,p.view.componentProps&&p.view.componentProps.game&&(Wn===1?p.view.componentProps.teamView=p.view.componentProps.game.homeTeam.team_id:Wn===2?p.view.componentProps.teamView=p.view.componentProps.game.awayTeam.team_id:p.view.componentProps.teamView=0),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}))}else if(((ca=L.value)==null?void 0:ca.id)===1){i.setDynamicFilters(M.value,(kr=p.view)==null?void 0:kr.id),i.updateDynamicFilters(M.value,(ua=p.view)==null?void 0:ua.id);const An=M.value[0];An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.category,p.view.filterMultiple.category=An,p.view.componentProps&&(p.view.componentProps.type=An),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}))}else if(((Xa=L.value)==null?void 0:Xa.id)===6){i.setDynamicFilters(M.value,(ja=p.view)==null?void 0:ja.id),i.updateDynamicFilters(M.value,(on=p.view)==null?void 0:on.id);const An=M.value[0];An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.gameNumber,p.view.filterMultiple.gameNumber=An,p.view.componentProps&&(p.view.componentProps.gameNumber=An,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(Ha=L.value)==null?void 0:Ha.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})}))}else if(((qr=L.value)==null?void 0:qr.id)===7){i.setDynamicFilters(M.value,(wr=p.view)==null?void 0:wr.id),i.updateDynamicFilters(M.value,(Na=p.view)==null?void 0:Na.id);const An=M.value[0],Wn=M.value[1];if(An!==void 0&&p.view.componentProps){const Ei=An===1?"offensive":"defensive";p.view.componentProps.analysisType=Ei}if(Wn!==void 0){p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.isHomeTeam;const Ei=Wn===1;p.view.filterMultiple.isHomeTeam=Ei,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Ei,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(rn=L.value)==null?void 0:rn.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})}}else if(((mn=L.value)==null?void 0:mn.id)===5){i.setDynamicFilters(M.value,($a=p.view)==null?void 0:$a.id),i.updateDynamicFilters(M.value,(Hn=p.view)==null?void 0:Hn.id);const An=M.value[0];if(An!==void 0){p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.isHomeTeam;const Wn=An===1?1:2;p.view.filterMultiple.isHomeTeam=Wn,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Wn===1,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(Pn=L.value)==null?void 0:Pn.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})}}else((Yn=L.value)==null?void 0:Yn.id)===9||(i.setDynamicFilters(M.value),i.updateDynamicFilters(M.value));t.nextTick(()=>{d.value=!1})}}function Pt(){var Tt,Yt;if(!c||!c.dynamicFilters||!A.value)return!1;for(let er=0;er<c.dynamicFilters.length;er++){const sr=c.dynamicFilters[er],Cr=A.value[er],Rr=M.value[er];if(!(!sr||!Cr)){if(Cr.type==="check"){if(sr.isChecked!==Rr)return!0}else if(Cr.type==="radio-button"){if(((Tt=sr.selectedOption)==null?void 0:Tt.value)!==Rr)return!0}else if(Cr.type==="select"){const sa=((Yt=sr.selectedOptions)==null?void 0:Yt.map(qa=>qa.value))||sr.selectedValue||[],Ia=Array.isArray(Rr)?Rr:[];if(JSON.stringify(sa)!==JSON.stringify(Ia))return!0}}}return!1}function gr(Tt){var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa;if(M.value=Tt.filters,i){const Xr=((Yt=p==null?void 0:p.view)==null?void 0:Yt.id)||null;i.setDynamicFilters(M.value,Xr),i.updateDynamicFilters(M.value,Xr)}if(n.value&&p&&(Sd.emit("activate-save-button"),Sd.emit("force-component-update",{itemId:((er=p==null?void 0:p.view)==null?void 0:er.id)||null,componentProps:p.view.componentProps}),Sd.emit("dynamic-filters-changed",{containerViewId:((sr=p==null?void 0:p.view)==null?void 0:sr.id)||null,viewId:((Cr=p==null?void 0:p.view)==null?void 0:Cr.id)||null,dynamicFilters:M.value}),Sd.emit("dynamic-filters-changed",{containerViewId:((Rr=p==null?void 0:p.view)==null?void 0:Rr.id)||null,viewId:((sa=p==null?void 0:p.view)==null?void 0:sa.id)||null,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})),!n.value&&i&&(((Ia=L.value)==null?void 0:Ia.id)===15||((qa=L.value)==null?void 0:qa.id)===17)&&i.getRequiresAddView(M.value,A.value)){i.setDynamicFilters(M.value),$("filters-changed",{main:f.value,view:L.value,team:Y.value,dynamicFilters:M.value,filtersJSON:{mainSelector:{id:((bn=f.value)==null?void 0:bn.id)||null,name:((fn=f.value)==null?void 0:fn.name)||null,url:((In=f.value)==null?void 0:In.url)||null},viewSelector:{id:((ea=L.value)==null?void 0:ea.id)||null,name:((Ur=L.value)==null?void 0:Ur.name)||((fa=L.value)==null?void 0:fa.title)||null,url:((Va=L.value)==null?void 0:Va.url)||null},team:Y.value,dynamicFilters:M.value,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((Za=A.value)==null?void 0:Za.length)||0,activeFilters:((Oa=A.value)==null?void 0:Oa.filter((Xr,ca)=>{const kr=M.value[ca];return Array.isArray(kr)?kr.length>0:kr!=null&&kr!==!1}).length)||0}},filterAndViewsContainer:i,viewToEdit:p}),He();return}It()}function ur(Tt){Tt.filterIndex!==void 0&&Tt.value!==void 0&&(M.value[Tt.filterIndex]=Tt.value,n.value&&It(),He())}function vr(){Zt()}function Tr(Tt){var Yt,er,sr,Cr,Rr,sa,Ia;console.log("newFilters in onChangeFiltersAltMode:",Tt);const qa={mainSelector:{id:((Yt=f.value)==null?void 0:Yt.id)||null,name:((er=f.value)==null?void 0:er.name)||null,url:((sr=f.value)==null?void 0:sr.url)||null},viewSelector:{id:((Cr=L.value)==null?void 0:Cr.id)||null,name:((Rr=L.value)==null?void 0:Rr.name)||((sa=L.value)==null?void 0:sa.title)||null,url:((Ia=L.value)==null?void 0:Ia.url)||null}};$("filters-changed",{filters:Tt.filters,view:Tt.view,viewToEdit:p,filterAndViewsContainer:i,filtersJSON:qa,isAltMode:!0})}function Pr(Tt){return JSON.parse(JSON.stringify(Tt))}return(Tt,Yt)=>(t.openBlock(),t.createElementBlock("div",Ort,[t.createElementVNode("button",Mrt,t.toDisplayString(n.value?"Editando visualización":"Nueva visualización"),1),t.createElementVNode("div",{class:t.normalizeClass([{disabled:n.value},"custom-select main-select"]),onClick:_e},[t.createElementVNode("div",Vrt,[t.createElementVNode("span",zrt,[f.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:xe(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Prt)):(t.openBlock(),t.createElementBlock("img",Art))]),f.value?(t.openBlock(),t.createElementBlock("span",Urt,t.toDisplayString(Ae()),1)):(t.openBlock(),t.createElementBlock("span",Rrt,"Tipo de vista")),t.createElementVNode("span",{class:t.normalizeClass([{open:se.value},"arrow"])},[...Yt[5]||(Yt[5]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),se.value?(t.openBlock(),t.createElementBlock("div",Frt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(er,sr)=>(t.openBlock(),t.createElementBlock("div",{key:er.id,class:t.normalizeClass([{active:s.value===sr},"option-card"]),onClick:t.withModifiers(Cr=>je(sr),["stop"])},[t.createElementVNode("div",qrt,[t.createElementVNode("img",{"data-hover-src":xe(er.name,!0),src:xe(er.name,!1),alt:"icono",class:"option-img-34"},null,8,jrt)]),t.createElementVNode("div",Wrt,[t.createElementVNode("div",Drt,t.toDisplayString(er.name),1),er.description?(t.openBlock(),t.createElementBlock("div",Krt,t.toDisplayString(er.description),1)):t.createCommentVNode("",!0)])],10,Irt))),128))])):t.createCommentVNode("",!0)],2),f.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([{disabled:n.value},"custom-select second-select"]),onClick:Ue},[t.createElementVNode("div",Brt,[t.createElementVNode("span",Xrt,[L.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:L.value.url,alt:"icono",class:"option-img-graph2"},null,8,Grt)):f.value?(t.openBlock(),t.createElementBlock("img",{key:1,src:xe(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Zrt)):t.createCommentVNode("",!0)]),t.createElementVNode("span",Jrt,t.toDisplayString(qe()),1),t.createElementVNode("span",{class:t.normalizeClass([{open:me.value},"arrow"])},[...Yt[6]||(Yt[6]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),me.value&&f.value?(t.openBlock(),t.createElementBlock("div",Hrt,[t.createElementVNode("div",Yrt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,er=>(t.openBlock(),t.createElementBlock("div",{key:er.id,class:t.normalizeClass([{active:S.value===er.id},"option-card-grid"]),onClick:t.withModifiers(sr=>Re(er),["stop"])},[er.id===17?(t.openBlock(),t.createElementBlock("div",$rt,[...Yt[7]||(Yt[7]=[t.createElementVNode("div",null,"Tiros de esquina",-1),t.createElementVNode("div",null,"tendencia general",-1)])])):er.id===18?(t.openBlock(),t.createElementBlock("div",eat,[...Yt[8]||(Yt[8]=[t.createElementVNode("div",null,"Tactica fija",-1),t.createElementVNode("div",null,"jugadas especificas",-1)])])):(t.openBlock(),t.createElementBlock("div",tat,t.toDisplayString(er.name||er.title),1)),t.createElementVNode("div",rat,[t.createElementVNode("img",{src:er.url,alt:"icono",class:"option-img-grid"},null,8,aat)])],10,Qrt))),128))])])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),L.value?(t.openBlock(),t.createElementBlock("div",nat)):t.createCommentVNode("",!0),L.value&&L.value.id===13?(t.openBlock(),t.createBlock(FYe,{key:2,"component-id":13,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,onFiltersChanged:gr,onFilterUpdated:ur},null,8,["filters","initial-values","is-edit-mode"])):L.value&&L.value.id===16?(t.openBlock(),t.createBlock(HQe,{key:3,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,"is-edit-mode":!!t.unref(p),"is-post-match":e.isPostMatch,"view-config":Pr(h.value.get(16)),onChange:Tr,onRemoveViews:vr},null,8,["default-filters","is-edit-mode","is-post-match","view-config"])):L.value&&L.value.id===18?(t.openBlock(),t.createBlock(tet,{key:4,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,"view-config":Pr(h.value.get(18)),"is-post-match":e.isPostMatch,onChange:Tr,onRemoveViews:vr},null,8,["default-filters","view-config","is-post-match"])):L.value&&L.value.id===15?(t.openBlock(),t.createBlock(rQe,{key:5,"component-id":15,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,onFiltersChanged:gr,onFilterUpdated:ur},null,8,["filters","initial-values","is-edit-mode"])):L.value&&L.value.id===17?(t.openBlock(),t.createBlock(Nrt,{key:6,"component-id":17,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,"view-config":Pr(h.value.get(17)),onChange:Tr,onFiltersChanged:gr,onFilterUpdated:ur,onRemoveViews:vr},null,8,["default-filters","filters","initial-values","is-edit-mode","view-config"])):L.value&&A.value&&W()?(t.openBlock(),t.createElementBlock("div",{key:7,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":A.value.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(A.value,(er,sr)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:sr},[er.type==="select"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:t.withModifiers(Cr=>We(sr),["stop"])},[t.createElementVNode("div",oat,[Yt[10]||(Yt[10]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{alt:"icono categorías",src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),Yt[11]||(Yt[11]=t.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(M.value[sr])&&M.value[sr].length>0?(t.openBlock(),t.createElementBlock("span",sat,t.toDisplayString(M.value[sr].length),1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass([{open:ge.value===sr},"arrow"])},[...Yt[9]||(Yt[9]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),ge.value===sr?(t.openBlock(),t.createElementBlock("div",lat,[t.createElementVNode("div",cat,[t.createElementVNode("div",{class:"multi-select-header",onClick:Yt[1]||(Yt[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("label",uat,[t.createElementVNode("input",{checked:j(sr),indeterminate:F(sr),type:"checkbox",onChange:t.withModifiers(Cr=>N(sr),["stop"]),onClick:Yt[0]||(Yt[0]=t.withModifiers(()=>{},["stop"]))},null,40,dat),Yt[12]||(Yt[12]=t.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("div",{key:Cr.value,class:t.normalizeClass([{active:z(sr,Cr.value)},"option-card multi-select-option"]),onClick:Yt[2]||(Yt[2]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",pat,[t.createElementVNode("input",{checked:z(sr,Cr.value),type:"checkbox",onChange:t.withModifiers(Rr=>I(sr,Cr.value),["stop"])},null,40,hat)]),t.createElementVNode("div",{class:"option-content",onClick:Rr=>I(sr,Cr.value)},[t.createElementVNode("div",mat,t.toDisplayString(Cr.label),1)],8,fat)],2))),128))]),t.createElementVNode("div",yat,[t.createElementVNode("button",{class:"btn-listo",onClick:Yt[3]||(Yt[3]=t.withModifiers(Cr=>Qt(),["stop"]))},"Listo")])])):t.createCommentVNode("",!0)],8,iat)):er.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",gat,[t.createElementVNode("div",vat,t.toDisplayString(er.label),1),t.createElementVNode("div",bat,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("label",{key:Cr.value,class:t.normalizeClass([{active:M.value[sr]===Cr.value},"radio-option-card"])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":Rr=>M.value[sr]=Rr,disabled:X(Cr.value,Cr.label),name:"dynamic-radio-"+sr,value:Cr.value,type:"radio",onChange:()=>{var Rr,sa,Ia;if(((Rr=L.value.value)==null?void 0:Rr.id)===9&&n.value.value&&(Ia=(sa=t.unref(p))==null?void 0:sa.view)!=null&&Ia.filterMultiple){const qa=M.value[sr]===1;t.unref(p).view.filterMultiple.isHomeTeam=qa}n.value.value&&It(),He()}},null,40,xat),[[t.vModelRadio,M.value[sr]]]),t.createElementVNode("span",null,t.toDisplayString(Cr.label),1)],2))),128))])])):er.type==="check"?(t.openBlock(),t.createElementBlock("div",_at,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":Cr=>M.value[sr]=Cr,checked:M.value[sr],type:"checkbox",onChange:Yt[4]||(Yt[4]=()=>{n.value.value&&It(),He()})},null,40,wat),[[t.vModelCheckbox,M.value[sr]]]),t.createTextVNode(" "+t.toDisplayString(er.label),1)])])):er.type==="select-simple"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-filter-type":er.type,class:"custom-select dynamic-select filter-inline",onClick:t.withModifiers(Cr=>Qe(sr),["stop"])},[t.createElementVNode("div",Sat,[Yt[14]||(Yt[14]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{alt:"icono categorías",src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),Yt[15]||(Yt[15]=t.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),t.createElementVNode("span",{class:t.normalizeClass([{open:be.value===sr},"arrow"])},[...Yt[13]||(Yt[13]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),be.value===sr?(t.openBlock(),t.createElementBlock("div",kat,[t.createElementVNode("div",Lat,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("div",{key:Cr.value,class:t.normalizeClass([{active:M.value[sr]===Cr.value},"option-card simple-select-option"]),onMouseenter:Rr=>cr(sr,Cr.value),onClick:t.withModifiers(Rr=>rt(sr,Cr.value),["stop"])},[t.createElementVNode("div",Cat,[t.createElementVNode("div",Nat,t.toDisplayString(Cr.label),1)]),M.value[sr]===Cr.value?(t.openBlock(),t.createElementBlock("div",Oat,[...Yt[16]||(Yt[16]=[t.createElementVNode("svg",{fill:"none",height:"16",viewBox:"0 0 16 16",width:"16"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])])):t.createCommentVNode("",!0)],42,Eat))),128))])])):t.createCommentVNode("",!0)],8,Tat)):t.createCommentVNode("",!0),sr===1&&A.value.length>2?(t.openBlock(),t.createElementBlock("div",Mat)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0),n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:8,class:"cancel-btn",onClick:Zt},"Cancelar")),k.value?(t.openBlock(),t.createElementBlock("button",{key:9,class:"ok-btn",onClick:qt},"OK")):t.createCommentVNode("",!0)]))}}),zat=t2(Vat,[["__scopeId","data-v-9fa60fa7"]]),Pat={key:0,class:"modal-simple"},Aat={class:"modal-simple__content"},Rat={class:"modal-simple__content__header"},Uat={class:"modal-simple__content__body"},Fat={class:"modal-simple__content__footer"},Iat={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(e){return(r,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.modelValue?(t.openBlock(),t.createElementBlock("div",Pat,[t.createElementVNode("div",Aat,[t.createElementVNode("div",Rat,[t.renderSlot(r.$slots,"header",{},void 0,!0)]),t.createElementVNode("div",Uat,[t.renderSlot(r.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",Fat,[t.renderSlot(r.$slots,"footer",{},void 0,!0)])])])):t.createCommentVNode("",!0)]))}},qat=t2(Iat,[["__scopeId","data-v-1cc4f590"]]),jat={class:"footer"},Wat={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(e,{emit:r}){const a=r;function v(h){a("update:modelValue",h)}function $(h){a("action",h),a("update:modelValue",!1)}return(h,u)=>(t.openBlock(),t.createBlock(qat,{"modle-value":e.value,"onUpdate:modelValue":v},{header:t.withCtx(()=>[...u[2]||(u[2]=[t.createElementVNode("div",{class:"header"},"Descartar template",-1)])]),body:t.withCtx(()=>[...u[3]||(u[3]=[t.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])]),footer:t.withCtx(()=>[t.createElementVNode("div",jat,[t.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:u[0]||(u[0]=i=>$(!1))}," Seguir editando "),t.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:u[1]||(u[1]=i=>$(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},Dat=t2(Wat,[["__scopeId","data-v-ed9b5088"]]),Kat={key:0,class:"modal-simple"},Bat={__name:"ModalChangesSaved",props:{modelValue:{type:Boolean,default:!1}},setup(e){return(r,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.modelValue?(t.openBlock(),t.createElementBlock("div",Kat,[...a[0]||(a[0]=[t.createElementVNode("div",{class:"modal-simple__content"},[t.createElementVNode("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M29.3346 14.7823V16.0089C29.333 18.8842 28.402 21.6818 26.6804 23.9847C24.9589 26.2876 22.539 27.9722 19.7818 28.7875C17.0245 29.6027 14.0776 29.5048 11.3806 28.5084C8.68354 27.512 6.38084 25.6704 4.81592 23.2584C3.25099 20.8463 2.50769 17.993 2.69687 15.124C2.88605 12.255 3.99758 9.52404 5.86568 7.33836C7.73377 5.15269 10.2583 3.62944 13.0629 2.9958C15.8674 2.36215 18.8017 2.65205 21.428 3.82227",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M29.3333 5.33203L16 18.6787L12 14.6787",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})]),t.createElementVNode("div",{class:"modal-simple__content__text"}," Los cambios se han guardado correctamente ")],-1)])])):t.createCommentVNode("",!0)]),_:1})]))}},Xat=t2(Bat,[["__scopeId","data-v-2bc30783"]]),Gat={class:"template-maker__header"},Zat={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jat={class:"template-maker__content"},Hat={class:"template-maker__content__main"},Yat={id:"containerMain",class:"container-main"},Qat={class:"template-maker__content__main__cover-selector"},$at=["id"],ent={class:"page-indicator"},tnt={class:"page-indicator__index"},rnt=["onClick"],ant=["onClick"],nnt={key:0,class:"template-maker__content__main__footer"},int={class:"template-maker__content__main__footer__paginator"},ont={class:"template-maker__content__main__footer__paginator__nav"},snt={class:"template-maker__content__main__footer__paginator__numbers"},lnt=["onClick"],cnt={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:""},userTeamId:{type:Number,default:0}},emits:["close"],setup(e,{expose:r,emit:a}){const v=new Map,$=t.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),h=t.ref(null),u=t.ref(0),i=t.ref(!1),p=t.ref(null),c=t.ref(null),n=t.ref(!0),k=t.ref(!1),T=t.ref(!1),x=t.ref(0),d=t.ref(!1),o=t.ref(null),l=t.ref(new Map),s=t.ref(null),f=t.ref(null),g=t.ref(!1),S=t.ref(!1),L=t.ref(!1),M=new Map,A=new Map,z=t.computed(()=>({"--overflow-y-template-maker":k.value?"scroll":"hidden","--height-container-main":k.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(k.value,"0")})),I=t.computed(()=>u.value+1);t.watch(()=>i.value,$t=>{const At=document.getElementById("app");$t?(u.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",At&&(At.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",At&&(At.style.overflow=""))});function j($t){return $t<10?`0${$t}`:$t}async function F({templateId:$t,userId:At}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${At}/templates/${$t}`,{method:"GET",headers:{Authorization:pt.token}})).json()).data}catch(or){console.error("Error fetching template by ID:",or)}}async function W({reportId:$t,userId:At}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${At}/reports/${$t}`,{method:"GET",headers:{Authorization:pt.token}})).json()).data}catch(or){console.error("Error fetching report by ID:",or)}}let U=0;function O($t){h.value=$t,U>0&&(g.value=!0),U++}function X($t){$t&&st(null,!0)}let N=null;function Y($t,At){let or=$t.getBoundingClientRect(),Gt={height:$t.clientHeight,width:$t.clientWidth},Lt=At.getBoundingClientRect();if(!(Lt.top>=or.top&&Lt.bottom<=or.top+Gt.height)){const It=Lt.top-or.top,Pt=Lt.bottom-or.bottom;Math.abs(It)<Math.abs(Pt)?$t.scrollTop+=It:$t.scrollTop+=Pt}}function se($t,At){let or=$t.getBoundingClientRect();const Gt=At.getBoundingClientRect().top-or.top;$t.scrollTop+=Gt}function me($t,At=!1){const or={title:`Page ${$.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(Zt(),$t!==void 0&&$t>=-1?$.value.splice($t+1,0,or):$.value.push(or),t.nextTick(()=>{const Gt=$.value.findIndex(It=>It.id===or.id),Lt=document.getElementById(`page-${Gt+1}`);N||(N=document.getElementById("containerMain")),Lt&&N?Y(N,Lt):console.error("Page element or container main element not found")}),At)return or;g.value=!0}function ge($t){if($t<0||$t>$.value.length)return;u.value=$t;const At=document.getElementById(`page-${$t}`);if(N||(N=document.getElementById("containerMain")),At&&N){const or=new CustomEvent("programmatic-scroll-start");document.dispatchEvent(or),se(N,At),setTimeout(()=>{const Gt=new CustomEvent("programmatic-scroll-end");document.dispatchEvent(Gt)},300)}else console.error("Page element or container main element not found")}function be($t){s.value=$t,d.value=!0}function xe($t,At){const or=At+1;$t&&u.value!==or&&(u.value=or)}function Ae($t){d.value=!0,Sd.emit("edit-view",{view:$t})}async function qe({templateReportId:$t,userId:At,isTemplateMode:or}){try{return or?F({templateId:$t,userId:At}):W({reportId:$t,userId:At})}catch(Gt){throw new Error("Error fetching template or report by ID: "+Gt.message)}}function _e(){U=0,d.value=!1,u.value=0,s.value=null,f.value=null,l.value.clear(),N=null,p.value=null,c.value=null,h.value=null,x.value=0,$.value=[],T.value=!1,g.value=!1,S.value=!1,L.value=!1,M.forEach($t=>clearTimeout($t)),M.clear(),A.forEach($t=>clearTimeout($t)),A.clear(),Ue=[],v.clear()}let Ue=[];async function je($t){if(_e(),n.value=$t.isTemplateMode,k.value=!!$t.isPDFMode,$t.isPDFMode?p.value=await W({reportId:$t.reportId,userId:$t.userId}):(p.value=$t.template,p.value=await qe({templateReportId:$t.template.id,userId:$t.template.user_id,isTemplateMode:$t.isTemplateMode})),!p.value)return;p.value&&p.value.game&&(p.value.game=He(p.value.game)),c.value=JSON.parse(JSON.stringify(p.value)),T.value=p.value.template_type===2;const At=p.value.pages.find(or=>or.is_front_page);x.value=At?At.type:1,i.value=!0,console.log("isTemplateMode:",n.value),$t.isTemplateMode||(Ue=await rt(p.value),console.log("specificPlaysCorners fetched:",Ue)),$.value=p.value.pages.reduce((or,Gt,Lt)=>{if(!Gt.is_front_page){Gt.name||(Gt.name="");const It=Lt,Pt={originalPage:JSON.parse(JSON.stringify(Gt)),title:Gt.name,id:`p-${Date.now()-Lt*9}`,items:[],components:Gt.components};Gt.components&&Gt.components.length>0&&(Pt.items=Gt.components.map((gr,ur)=>{const vr=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],gr.coreView.id,gr.dynamicFilters,T.value,n.value,gr.filtersJSON||null,pt.token,gr.filters),Tr={originalComponent:JSON.parse(JSON.stringify(gr)),title:gr.title,shortTitle:gr.shortTitle||gr.title,game:p.value.game,idAux:gr.id,id:`w-${Date.now()-ur*7}`,x:gr.column,y:gr.row,w:gr.colspan,h:gr.rowspan,maxWidth:gr.max_column,maxHeight:gr.max_row,minWidth:gr.min_column,minHeight:gr.min_row,noResize:!n.value,noMove:!n.value,coreView:gr.coreView||null,isTemplateMode:n.value,componentName:gr.componentName,componentProps:Qe({currentProps:gr.componentProps,coreView:gr.coreView,isTemplateMode:n.value,templateToEdit:p.value,filterMultiple:gr.filterMultiple||null,game:p.value.game||null,dynamicFilters:gr.dynamicFilters,page:It,componentId:ur})||{},filterMultiple:gr.filterMultiple,isHomeTeam:We({game:p.value.game,isTemplateMode:n.value,currentIsHomeTeam:gr.isHomeTeam||gr.componentProps.isHomeTeamForAnalysis}),filtersJSON:gr.filtersJSON||null,dynamicFilters:gr.dynamicFilters||[],filterAndViewsContainer:vr},Pr=t.reactive({view:Tr});return vr.addView(Pr,!0),l.value.set(vr.getId(),vr),Tr})),or.push(Pt)}return or},[]),console.log("Pages loaded into template maker:",$.value)}function Re({game:$t,isTemplateMode:At}){const or=$t&&$t.homeTeam&&$t.awayTeam&&($t.homeTeam.team_id===pt.userTeamId||$t.awayTeam.team_id===pt.userTeamId);return{isUserTeamHome:or&&$t.homeTeam.team_id===pt.userTeamId,requiresUserTeamAdjustment:or&&!At}}function We({game:$t,isTemplateMode:At,currentIsHomeTeam:or}){const{isUserTeamHome:Gt,requiresUserTeamAdjustment:Lt}=Re({game:$t,isTemplateMode:At});return Lt?or?Gt:!Gt:or}function Qe({currentProps:$t,coreView:At,templateToEdit:or,isTemplateMode:Gt,filterMultiple:Lt,game:It,dynamicFilters:Pt,page:gr,componentId:ur}){var vr,Tr,Pr,Tt;if(!$t||!At)return $t||{};const{isUserTeamHome:Yt,requiresUserTeamAdjustment:er}=Re({game:It,isTemplateMode:Gt});console.log("currentProps:",$t);let sr={...$t};if(At.id===5&&(sr.isGhostEffect=Gt,er)){const Cr=sr.preMatchType===1;sr.preMatchType=Cr?Yt?1:2:Yt?2:1}if(At.id===7&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===9&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===18){if(!Gt&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(!Gt){const Cr=Ue.shift();Cr?(sr.specificPlaysCornersData=Cr,sr.teamIdForAnalysis=sr.isHomeTeamForAnalysis?It.home_team:It.visiting_team,sr.playIdForAnalysis=Cr.play_id,sr.gameIdForAnalysis=Cr.game_id,sr.seasonIdForAnalysis=It.season_id,sr.isTemplateMode=Gt,sr.isGameOnly=!0,sr.isCornerInfoVisible=!0):console.warn("No specific plays corner data available for this component")}}if(At.id===16){if(!Gt&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(!Gt){sr.isPreMatch=!T.value,sr.isTemplateMode=Gt,sr.seasonId=or.season_id,sr.teamIdForAnalysis=sr.isHomeTeamForAnalysis?or.game.home_team:or.game.visiting_team;const Cr=sr.isHomeTeamForAnalysis?or.last_games.last_home_games:or.last_games.last_visiting_games;T.value?sr.gamesIdsForAnalysis=[or.game.game_id]:sr.howManyGames?sr.gamesIdsForAnalysis=Cr.slice(0,sr.howManyGames).map(Rr=>Rr.game_id):(sr.gamesIdsForAnalysis=[],sr.gameDataUTC=or.game.date_time_utc)}}if(At.id===10&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===1&&(sr.gameId=It?It.id:"",sr.homeLogo=It?It.homeTeam.logo:"",sr.awayLogo=It?It.awayTeam.logo:"",sr.seasonId=It?It.season_id:0,sr.default=Gt),At.id===6&&(sr.game=It||"",sr.lastGames=or.last_games,sr.selectedOption=or.template_type===2?"Postmatch":"Prematch"),At.id===13&&(sr.isdefault=Gt,sr.seasonid=It?It.seasonId:2010,sr.datetimeutc=It?or.template_type===1?It?It.date_time_utc:"":null:"",sr.teamids=It?[It.home_team,It.visiting_team]:[1,2],sr.categoryids=Pt?Pt[1]:[20,2],sr.teamsshow=It?Pt?Pt[2]==1?[It.home_team]:Pt[2]==2?[It.visiting_team]:[It.home_team,It.visiting_team]:[1,2]:[1,2],sr.analysistype=Pt?Pt[0]:[],sr.gameid=or.template_type===1?null:It?It.id:"",sr.teams=It?[{id:It.home_team,name:It.home_team_acronym,logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+It.home_team+".png"},{id:It.visiting_team,name:It.visiting_team_acronym,logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+It.visiting_team+".png"}]:[]),At.id===15&&(sr.view=1,sr.token=pt.token,sr.numitems=Pt?Pt[1]:3,sr.isdefault=Gt,sr.reportid=or!=null&&or.id?or.id:0,sr.userid=or!=null&&or.user_id?or.user_id:0,sr.page=gr+1,sr.typegame=T.value?2:1,sr.componentid=ur+1,sr.data={season:It?It.seasonId:2010,type:2,game:It?It.id:0,team:Gt?2:Lt?Lt.isHomeTeam?It.home_team||2:It.visiting_team||2:2}),At.id===17){console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("LLEGO AQUI MERO ESTE COMPOENNETE ES: ---->>>> ",It),console.log("dynamicFiltersS: ---->>>> ",Pt),console.log("filters: =================================================================================="),console.log("lateralidad: ",Pt?Pt[1]==32?"right":"left":"right"),console.log("infavoragainstteam: ",Pt?Pt[0]:!0),console.log("teamselected: ",Lt?Lt.isHomeTeam?(It==null?void 0:It.home_team)||2:(It==null?void 0:It.visiting_team)||2:2),console.log("tournamentselected: ",or!=null&&or.tournament_id?{id:or.tournament_id}:{id:1}),sr.game=It?{id:It.id||It.game_id||It.gameId||null,home_team:It.home_team||null,away_team:It.visiting_team||null,season:It.seasonId||It.season_id||null,game_status:It.game_status||It.status||null,home_acronym:It.home_team_acronym||((vr=It.homeTeam)==null?void 0:vr.acronym)||null,away_acronym:It.visiting_team_acronym||((Tr=It.awayTeam)==null?void 0:Tr.acronym)||null,logo_home:((Pr=It.homeTeam)==null?void 0:Pr.logo)||null,logo_away:((Tt=It.awayTeam)==null?void 0:Tt.logo)||null}:null,sr.infavoragainstteam=Pt?!Pt[0]:!0,sr.forseason=!T.value,sr.forteam=!1,sr.tournamentselected=or!=null&&or.tournament_id?{id:or.tournament_id}:{id:1},sr.forgame=!!T.value,sr.lateralidad=Pt&&Pt[1]==32?"right":"left",sr.teamselected=Pt[2]==3?Lt?Lt.isHomeTeam?It==null?void 0:It.home_team:It==null?void 0:It.visiting_team:0:Pt[2]==2?It==null?void 0:It.visiting_team:It==null?void 0:It.home_team;const Cr=Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][4]!==void 0?Array.isArray(Pt[3][4])?Pt[3][4].filter(Rr=>Rr!=="rematado-destino-porteria").reduce((Rr,sa)=>(sa==="fue-gol"?Rr.push(583,585,587,589):sa==="no-fue-gol"?Rr.push(584,586,588,590):sa==="rematado-sin-destino-porteria"?Rr.push(125,131,139,145):sa==="sin-destino"?Rr.push(122,128,136,142):sa==="ganados-por-portero-rival"?Rr.push(123,129,137,143):sa==="ganados-por-jugador-rival"&&Rr.push(124,130,138,144),Rr),[]):[]:[];sr.filters={isMoment:!0,final:[1,2,3],moment:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][0]!==void 0?Array.isArray(Pt[3][0])?Pt[3][0].map(Rr=>Rr==="iba-ganando"?1:Rr==="iba-empatado"?3:Rr==="iba-perdiendo"?2:Rr):[]:[],playingAs:[1,2],sections:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][1]!==void 0?Array.isArray(Pt[3][1])?Pt[3][1].map(Rr=>Rr==="0-15"?1:Rr==="16-30"?2:Rr==="31-45"?3:Rr==="46-60"?4:Rr==="61-75"?5:Rr==="76-90"?6:Rr):[]:[],games:T.value?[It==null?void 0:It.game_id]:[],players:[],cornertype:Pt&&Pt[1]!==void 0?Pt[1]:null,howWas:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][2]!==void 0?Array.isArray(Pt[3][2])?Pt[3][2].filter(Rr=>Rr!=="izquierda"&&Rr!=="derecha").map(Rr=>{const sa=Pt&&(Pt[0]===!0||Pt[0]===1);return Rr==="comba-afuera"?sa?134:120:Rr==="comba-adentro"?sa?140:126:Rr==="raz-area"?sa?146:327:Rr==="en-corto"?sa?147:133:Rr}):[]:[],zona:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][3]!==void 0?Array.isArray(Pt[3][3])?Pt[3][3]:[]:[],whathappened:Cr,isWhatHappenedFull:Array.isArray(Cr)&&Cr.length===24,isZoneFull:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][3]!==void 0&&Array.isArray(Pt[3][3])?Pt[3][3].length===35:!1},console.log("propsAux.filters: ",sr.filters),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),sr.showBallGo=!0,sr.showHeatMap=!0,sr.ballOnOff="OFF",sr.showdefault=Gt}if(At.id===14&&(sr.isReports=!0,sr.isDefault=Gt,sr.type=or.tournament_type==1?1:0,sr.typeView=1,sr.tournament=or.tournament_id,sr.currentSeason=It?It.season_id:0,sr.currentSeasonId=It?It.season_id:0,sr.showVideos=!1,sr.localTeam=It?It.home_team:0,sr.awayTeam=It?It.visiting_team:0),At.id===3&&(sr.defaultShields=Gt),At.id===2){let Cr=!0,Rr=0,sa=0;It&&(Cr=or.main_team==It.home_team||or.main_team==It.visiting_team,Rr=Cr?or.main_team==(It==null?void 0:It.home_team)?It==null?void 0:It.home_team:It==null?void 0:It.visiting_team:It==null?void 0:It.home_team,sa=Cr?or.main_team==(It==null?void 0:It.home_team)?It==null?void 0:It.visiting_team:It==null?void 0:It.home_team:It==null?void 0:It.visiting_team),sr.gamed=It?It.id:"",sr.game=It||"",sr.season=It?It.season_id:0,sr.teamView=Lt.teamType==3?0:Lt.teamType==1?Rr:sa,sr.useDummyData=Gt}return At.id===8&&(sr.teamSelected=It?{teamId:It.home_team}:1,sr.isDefault=Gt),At.id===4&&(sr.gameId=It?It.id:"",sr.isDefault=Gt,sr.homeTeam=It?It==null?void 0:It.home_team:"",sr.awayTeam=It?It==null?void 0:It.visiting_team:""),sr}async function rt($t){try{const At=await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$t.user_id}/reports/${$t.id}/specific-plays-corners`,{method:"GET",headers:{Authorization:pt.token}})).json();return console.log("66666666666666666666666666666666666666"),console.log("data",At),At.data}catch(At){return console.error("Error fetching specific plays:",At),[]}}const pt=e,ut=a;t.watch(()=>pt.token,($t,At)=>{},{immediate:!0}),r({show:je}),Sd.on("add-page-view",$t=>{v.set($t.view.id,$t.view);const At=$.value.find(or=>or.id===$t.pageId);At&&(At.items||(At.items=[]),At.items.push($t.view),t.nextTick(()=>{const or=document.querySelector(`[gs-id="${$t.view.id}"]`);$t.grid.makeWidget(or)}))}),Sd.on("add-page-and-view",$t=>{const At=$.value.findIndex(or=>or.id===$t.pageId);if(At>-1){const or=me(At,!0);setTimeout(()=>{Sd.emit("add-view",{pageId:or.id,view:$t.view,filterAndWidgetContainer:$t.filterAndWidgetContainer}),f.value&&(or.stepBackPage=f.value),f.value=or},500)}else console.error("Page not found for adding view:",$t.pageId)}),Sd.on("empty-page",$t=>{d.value&&s.value&&s.value.id===$t.id||(Jt($t),f.value&&f.value.id===$t.id&&(f.value.stepBackPage?f.value=f.value.stepBackPage:f.value=null))}),Sd.on("filters-cancelled",$t=>{$t&&$t.removeAllChildViews()}),Sd.on("activate-save-button",()=>{g.value=!0});function He($t){return{...$t,gameId:$t.game_id,id:$t.game_id,seasonId:$t.season_id,status:$t.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${$t.home_team}.png`,team_id:$t.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${$t.home_team}.png`,colloquial_name:$t.home_team_name,acronym:$t.home_team_acronym,team_name:$t.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${$t.visiting_team}.png`,team_id:$t.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${$t.visiting_team}.png`,colloquial_name:$t.visiting_team_name,acronym:$t.visiting_team_acronym,team_name:$t.visiting_team_name}}}function st($t,At=!1){At||!n.value?(i.value=!1,_e(),ut("close")):g.value?S.value=!0:(i.value=!1,_e(),ut("close"))}function ct(){o.value=null,d.value=!1}function Ct({page:$t,view:At,applyMinimumSize:or=!1}){const Gt=$t.grid;if(!$t||!At||!Gt)return null;const Lt=or?{w:At.min_column,h:At.min_row}:{w:At.colspan,h:At.rowspan},It=Gt.willItFit(0,0,Lt.w,Lt.h,!0);return It?{willFit:It,applyMinimumSize:or}:or?null:Ct({page:$t,view:At,applyMinimumSize:!0})}const Vt=new Set([9]);function Ot($t){var At,or,Gt,Lt,It,Pt,gr,ur,vr,Tr,Pr,Tt,Yt,er,sr,Cr,Rr,sa,Ia;if(console.log("onFiltersChanged called with filters:",$t),$t.dynamicFilters&&$t.dynamicFilters.length>0&&$t.viewToEdit&&$t.viewToEdit.view){const qa=$t.viewToEdit.view.id;$.value.forEach(bn=>{bn.items.forEach(fn=>{fn.id===qa&&fn.coreView&&fn.coreView.id===3&&(fn.componentProps.desplegable=$t.dynamicFilters[0]||!1,fn.componentProps.key=$t.dynamicFilters[0]||!1,t.nextTick(()=>{Sd.emit("force-component-update",{itemId:fn.id,componentProps:fn.componentProps})}))})})}if($t.viewToEdit){if(!$t.viewToEdit.view.filterAndViewsContainer){const qa=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[$t.viewToEdit],((At=$t.viewToEdit.view.coreView)==null?void 0:At.id)||$t.viewToEdit.view.id,$t.dynamicFilters||[],T.value,n.value,$t.filtersJSON,pt.token,$t.filters);$t.viewToEdit.view.filterAndViewsContainer=qa}$t.viewToEdit.view.filterAndViewsContainer.updateView({view:$t.viewToEdit,dynamicFilters:$t.dynamicFilters||[],filtersJSON:$t.filtersJSON||null,filters:$t.filters}),g.value=!0}else if($t.view){$t.view.id&&$t.filterAndViewsContainer&&$t.view.id!==$t.filterAndViewsContainer.viewId&&($t.filterAndViewsContainer.removeAllChildViews(),$t.filterAndViewsContainer.setViewId($t.view.id),$t.filterAndViewsContainer.setFiltersJSON($t.filtersJSON||null)),$t.view.id&&Vt.has($t.view.id)&&$t.dynamicFilters[0]&&$t.dynamicFilters[0].length===0&&$t.filterAndViewsContainer&&($t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(Gt=(or=$t.viewToEdit)==null?void 0:or.view)==null?void 0:Gt.id),g.value=!0);const qa=f.value||s.value,bn=Ct({page:qa,view:$t.view,applyMinimumSize:!1});$t.view.filtersJSON=$t.filtersJSON||null;const fn=$t.filterAndViewsContainer,In=$.value.findIndex(ea=>ea.id===qa.id);if(fn){console.log("1111");const ea=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters);if(((Lt=$t.view)==null?void 0:Lt.id)===15){const Ur=(It=$t.filterAndViewsContainer)==null?void 0:It.getId();if(Ur&&M.has(Ur)){const fa=M.get(Ur);clearTimeout(fa),M.delete(Ur)}}if(((Pt=$t.view)==null?void 0:Pt.id)===17){const Ur=(gr=$t.filterAndViewsContainer)==null?void 0:gr.getId();if(Ur&&A.has(Ur)){const fa=A.get(Ur);clearTimeout(fa),A.delete(Ur)}}if(ea){if(fn.setFilters($t.filters),fn.setDynamicFilters($t.dynamicFilters),bn||In===$.value.length-1){Sd.emit("add-view",{pageId:qa.id,view:$t.view,filterAndWidgetContainer:fn,avoidWillFit:!1,applyMinimumSize:bn?bn.applyMinimumSize:!1,dynamicFilters:$t.dynamicFilters,filters:$t.filters}),$t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(vr=(ur=$t.viewToEdit)==null?void 0:ur.view)==null?void 0:vr.id),g.value=!0;let Ur=null;if(((Tr=$t.view)==null?void 0:Tr.id)===15?(t.nextTick(()=>{var fa;const Va=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters);((fa=$t.dynamicFilters)==null?void 0:fa[0])===3&&Va&&Ot($t)}),Ur=setTimeout(()=>{var fa,Va;const Za=(fa=$t.filterAndViewsContainer)==null?void 0:fa.getId();Za&&M.delete(Za),console.log("222222222222222222");const Oa=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters);((Va=$t.dynamicFilters)==null?void 0:Va[0])===3&&Oa&&Ot($t)},200)):((Pr=$t.view)==null?void 0:Pr.id)===17?(t.nextTick(()=>{var fa,Va;const Za=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters),Oa=(fa=$t.dynamicFilters)==null?void 0:fa[0],Xr=(Va=$t.dynamicFilters)==null?void 0:Va[2];(Oa===3||Xr===3)&&Za&&Ot($t)}),Ur=setTimeout(()=>{var fa,Va,Za;const Oa=(fa=$t.filterAndViewsContainer)==null?void 0:fa.getId();Oa&&A.delete(Oa);const Xr=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters),ca=(Va=$t.dynamicFilters)==null?void 0:Va[0],kr=(Za=$t.dynamicFilters)==null?void 0:Za[2];(ca===3||kr===3)&&Xr&&Ot($t)},200)):(console.log("33333333333333"),Ur=setTimeout(()=>{$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters)&&Ot($t)},1e3)),((Tt=$t.view)==null?void 0:Tt.id)===15&&Ur){const fa=(Yt=$t.filterAndViewsContainer)==null?void 0:Yt.getId();fa&&M.set(fa,Ur)}if(((er=$t.view)==null?void 0:er.id)===17&&Ur){const fa=(sr=$t.filterAndViewsContainer)==null?void 0:sr.getId();fa&&A.set(fa,Ur)}}}else $t.isAltMode?$t.viewToEdit||$t.filterAndViewsContainer.updateFilters($t.filters,(Rr=(Cr=$t.viewToEdit)==null?void 0:Cr.view)==null?void 0:Rr.id):$t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(Ia=(sa=$t.viewToEdit)==null?void 0:sa.view)==null?void 0:Ia.id),g.value=!0}else if(bn||In===$.value.length-1){const ea=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],$t.view.id,$t.dynamicFilters,T.value,n.value,$t.filtersJSON,pt.token,$t.filters);Sd.emit("set-filter-and-views-container",ea),l.value.set(ea.getId(),ea);const Ur=$t.dynamicFilters&&($t.dynamicFilters[0]===3||$t.dynamicFilters[2]===3)&&($t.view.id===15||$t.view.id===17);$t.dynamicFilters&&(Array.isArray($t.dynamicFilters[0])||Ur)?($t.filterAndViewsContainer=ea,Ot($t)):Sd.emit("add-view",{pageId:qa.id,view:$t.view,filterAndWidgetContainer:ea,avoidWillFit:!1,applyMinimumSize:bn?bn.applyMinimumSize:!1,dynamicFilters:$t.dynamicFilters,filters:$t.filters}),g.value=!0}}}async function qt(){if(g.value)try{const $t=[{is_front_page:!0,template_type:h.value.isPostMatch?2:1,type:h.value.id},...$.value.map(or=>({columns:or.originalPage?or.originalPage.columns:12,rows:or.originalPage?or.originalPage.rows:12,gap:or.originalPage?or.originalPage.gap:10,name:or.title,width:or.originalPage?or.originalPage.width:968,height:or.originalPage?or.originalPage.height:702,components:or.items.reduce((Gt,Lt)=>(Lt.isDeleted||Gt.push({min_column:Lt.minWidth,min_row:Lt.minHeight,max_column:Lt.maxWidth,max_row:Lt.maxHeight,column:Lt.x,row:Lt.y,colspan:Lt.w,rowspan:Lt.h,name:Lt.name,title:Lt.title,titleShort:Lt.titleShort||Lt.title,dynamicFilters:Lt.filterAndViewsContainer.getComponentDynamicFilters(Lt.id)||Lt.filterAndViewsContainer.getDynamicFilters()||[],coreView:Lt.coreView||null,componentName:Lt.componentName,componentProps:Lt.componentProps||{},isHomeTeam:Lt.isHomeTeam||Lt.componentProps.isHomeTeamForAnalysis,filterMultiple:Lt.filterMultiple}),Gt),[])}))],At=await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${p.value.user_id}/templates/${p.value.id}/pages`,{method:"PATCH",headers:{Authorization:pt.token},body:JSON.stringify({pages:$t})});L.value=!0,await At.json(),g.value=!1,setTimeout(()=>{L.value=!1},2e3)}catch($t){console.error("Error saving template:",$t)}}function Zt(){$.value.forEach($t=>{$t.offListeners&&$t.offListeners()})}function Jt($t){const At=$.value.findIndex(or=>or.id===$t.id);At>-1&&(Zt(),$.value=$.value.filter(or=>or.id!==$t.id),u.value>=At&&(u.value=Math.max(0,u.value-1)),g.value=!0)}function Qt(){g.value=!0}function cr($t){const At=$.value.find(or=>or.items.some(Gt=>Gt.id===$t.id));if(At){const or=At.items.find(Gt=>Gt.id===$t.id);or&&(or.isDeleted=!0,g.value=!0)}}function hr($t){}return($t,At)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Dat,{modelValue:S.value,"onUpdate:modelValue":At[0]||(At[0]=or=>S.value=or),onAction:X},null,8,["modelValue"]),t.createVNode(Xat,{"model-value":L.value},null,8,["model-value"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[i.value&&p.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"template-maker",style:t.normalizeStyle(z.value)},[t.withDirectives(t.createVNode(zat,{token:e.token,view:o.value,"is-post-match":T.value,onClose:ct,onFiltersChanged:Ot},null,8,["token","view","is-post-match"]),[[t.vShow,n.value&&d.value]]),t.createElementVNode("div",Gat,[t.createTextVNode(t.toDisplayString(p.value?p.value.name:"Nuevo template")+" ",1),t.createElementVNode("div",{class:"template-maker__header__close",onClick:st},[k.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("svg",Zat,[...At[6]||(At[6]=[t.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))])]),t.createElementVNode("div",Jat,[At[13]||(At[13]=t.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),t.createElementVNode("div",Hat,[t.createElementVNode("div",Yat,[t.createElementVNode("div",Qat,[t.withDirectives(t.createVNode(yQ,{"is-post-match":T.value,"initial-cover-id":x.value,onSelectCover:O},null,8,["is-post-match","initial-cover-id"]),[[t.vShow,n.value]])]),(t.openBlock(),t.createElementBlock("div",{class:"template-maker__content__main__pages",key:$.value.length},[h.value?(t.openBlock(),t.createBlock(_Ye,{key:0,id:"page-0",game:p.value.game||null,"cover-id":h.value.id,"is-post-match":h.value.isPostMatch,onIntersectionChanged:At[1]||(At[1]=or=>xe(or,-1))},null,8,["game","cover-id","is-post-match"])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"new-items-buttons",style:t.normalizeStyle({"margin-bottom":$.value.length===0?"30px":"0"})},[d.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:At[2]||(At[2]=or=>me(-1))},[...At[7]||(At[7]=[t.createElementVNode("div",null,"+ Nueva página",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]))],4)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(or,Gt)=>(t.openBlock(),t.createElementBlock("div",{key:Gt,id:`page-${Gt+1}`,class:"template-maker__content__main__pages__page"},[t.createElementVNode("div",ent,[t.createElementVNode("div",tnt,"Pag "+t.toDisplayString(j(Gt+2)),1)]),h.value?(t.openBlock(),t.createBlock(THe,{key:0,page:or,"is-template-mode":n.value,"is-post-match":h.value.isPostMatch,game:p.value.game||null,lastGames:p.value.lastGames||[],"is-filter-visible":d.value,onEditView:Ae,onIntersectionChanged:Lt=>xe(Lt,Gt),onChangeSort:hr,onDeletePage:Jt,onViewChanged:Qt,onDeleteView:cr},null,8,["page","is-template-mode","is-post-match","game","lastGames","is-filter-visible","onIntersectionChanged"])):t.createCommentVNode("",!0),n.value&&!d.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"new-items-buttons",style:t.normalizeStyle({"margin-bottom":Gt+1===$.value.length?"30px":"0","margin-top":"10px"})},[t.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:Lt=>me(Gt)},[...At[8]||(At[8]=[t.createElementVNode("div",null,"+ Nueva página",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,rnt),t.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:Lt=>be(or)},[...At[9]||(At[9]=[t.createElementVNode("div",null,"+ Agregar gráfico",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,ant)],4)):t.createCommentVNode("",!0)],8,$at))),128))]))]),k.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nnt,[t.createElementVNode("div",int,[t.createElementVNode("div",ont,[t.createElementVNode("div",null,"Páginas "+t.toDisplayString(I.value),1),t.createElementVNode("div",{class:t.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:u.value<=0}]),onClick:At[3]||(At[3]=or=>u.value>0&&ge(u.value-1))},[...At[10]||(At[10]=[t.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])],2),t.createElementVNode("div",{class:t.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:u.value>=$.value.length}]),onClick:At[4]||(At[4]=or=>u.value<$.value.length&&ge(u.value+1))},[...At[11]||(At[11]=[t.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)])],2)]),t.createElementVNode("div",snt,[t.createElementVNode("div",{role:"button",class:t.normalizeClass({active:u.value===0}),onClick:At[5]||(At[5]=or=>ge(0))},t.toDisplayString(j(1)),3),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(or,Gt)=>(t.openBlock(),t.createElementBlock("div",{role:"button",key:Gt,class:t.normalizeClass({active:Gt+1===u.value}),onClick:Lt=>ge(Gt+1)},t.toDisplayString(j(Gt+2)),11,lnt))),128))])]),n.value?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:t.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!g.value}]),onClick:qt},[...At[12]||(At[12]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),t.createElementVNode("div",null,"Guardar",-1)])],2)):t.createCommentVNode("",!0)]))])])],4)):t.createCommentVNode("",!0)]))],64))}},unt=t2(cnt,[["__scopeId","data-v-4428a0be"]]);function qZ(e,r){return function(){return e.apply(r,arguments)}}const{toString:dnt}=Object.prototype,{getPrototypeOf:dA}=Object,{iterator:LN,toStringTag:jZ}=Symbol,EN=(e=>r=>{const a=dnt.call(r);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Gw=e=>(e=e.toLowerCase(),r=>EN(r)===e),CN=e=>r=>typeof r===e,{isArray:e7}=Array,t7=CN("undefined");function d9(e){return e!==null&&!t7(e)&&e.constructor!==null&&!t7(e.constructor)&&Y_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const WZ=Gw("ArrayBuffer");function pnt(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&WZ(e.buffer),r}const hnt=CN("string"),Y_=CN("function"),DZ=CN("number"),p9=e=>e!==null&&typeof e=="object",fnt=e=>e===!0||e===!1,NN=e=>{if(EN(e)!=="object")return!1;const r=dA(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(jZ in e)&&!(LN in e)},mnt=e=>{if(!p9(e)||d9(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ynt=Gw("Date"),gnt=Gw("File"),vnt=Gw("Blob"),bnt=Gw("FileList"),xnt=e=>p9(e)&&Y_(e.pipe),_nt=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||Y_(e.append)&&((r=EN(e))==="formdata"||r==="object"&&Y_(e.toString)&&e.toString()==="[object FormData]"))},wnt=Gw("URLSearchParams"),[Tnt,Snt,knt,Lnt]=["ReadableStream","Request","Response","Headers"].map(Gw),Ent=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function h9(e,r,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let v,$;if(typeof e!="object"&&(e=[e]),e7(e))for(v=0,$=e.length;v<$;v++)r.call(null,e[v],v,e);else{if(d9(e))return;const h=a?Object.getOwnPropertyNames(e):Object.keys(e),u=h.length;let i;for(v=0;v<u;v++)i=h[v],r.call(null,e[i],i,e)}}function KZ(e,r){if(d9(e))return null;r=r.toLowerCase();const a=Object.keys(e);let v=a.length,$;for(;v-- >0;)if($=a[v],r===$.toLowerCase())return $;return null}const CS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BZ=e=>!t7(e)&&e!==CS;function pA(){const{caseless:e,skipUndefined:r}=BZ(this)&&this||{},a={},v=($,h)=>{const u=e&&KZ(a,h)||h;NN(a[u])&&NN($)?a[u]=pA(a[u],$):NN($)?a[u]=pA({},$):e7($)?a[u]=$.slice():(!r||!t7($))&&(a[u]=$)};for(let $=0,h=arguments.length;$<h;$++)arguments[$]&&h9(arguments[$],v);return a}const Cnt=(e,r,a,{allOwnKeys:v}={})=>(h9(r,($,h)=>{a&&Y_($)?e[h]=qZ($,a):e[h]=$},{allOwnKeys:v}),e),Nnt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ont=(e,r,a,v)=>{e.prototype=Object.create(r.prototype,v),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),a&&Object.assign(e.prototype,a)},Mnt=(e,r,a,v)=>{let $,h,u;const i={};if(r=r||{},e==null)return r;do{for($=Object.getOwnPropertyNames(e),h=$.length;h-- >0;)u=$[h],(!v||v(u,e,r))&&!i[u]&&(r[u]=e[u],i[u]=!0);e=a!==!1&&dA(e)}while(e&&(!a||a(e,r))&&e!==Object.prototype);return r},Vnt=(e,r,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=r.length;const v=e.indexOf(r,a);return v!==-1&&v===a},znt=e=>{if(!e)return null;if(e7(e))return e;let r=e.length;if(!DZ(r))return null;const a=new Array(r);for(;r-- >0;)a[r]=e[r];return a},Pnt=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&dA(Uint8Array)),Ant=(e,r)=>{const v=(e&&e[LN]).call(e);let $;for(;($=v.next())&&!$.done;){const h=$.value;r.call(e,h[0],h[1])}},Rnt=(e,r)=>{let a;const v=[];for(;(a=e.exec(r))!==null;)v.push(a);return v},Unt=Gw("HTMLFormElement"),Fnt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,v,$){return v.toUpperCase()+$}),XZ=(({hasOwnProperty:e})=>(r,a)=>e.call(r,a))(Object.prototype),Int=Gw("RegExp"),GZ=(e,r)=>{const a=Object.getOwnPropertyDescriptors(e),v={};h9(a,($,h)=>{let u;(u=r($,h,e))!==!1&&(v[h]=u||$)}),Object.defineProperties(e,v)},qnt=e=>{GZ(e,(r,a)=>{if(Y_(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const v=e[a];if(Y_(v)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},jnt=(e,r)=>{const a={},v=$=>{$.forEach(h=>{a[h]=!0})};return e7(e)?v(e):v(String(e).split(r)),a},Wnt=()=>{},Dnt=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function Knt(e){return!!(e&&Y_(e.append)&&e[jZ]==="FormData"&&e[LN])}const Bnt=e=>{const r=new Array(10),a=(v,$)=>{if(p9(v)){if(r.indexOf(v)>=0)return;if(d9(v))return v;if(!("toJSON"in v)){r[$]=v;const h=e7(v)?[]:{};return h9(v,(u,i)=>{const p=a(u,$+1);!t7(p)&&(h[i]=p)}),r[$]=void 0,h}}return v};return a(e,0)},Xnt=Gw("AsyncFunction"),Gnt=e=>e&&(p9(e)||Y_(e))&&Y_(e.then)&&Y_(e.catch),ZZ=((e,r)=>e?setImmediate:r?((a,v)=>(CS.addEventListener("message",({source:$,data:h})=>{$===CS&&h===a&&v.length&&v.shift()()},!1),$=>{v.push($),CS.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",Y_(CS.postMessage)),Znt=typeof queueMicrotask<"u"?queueMicrotask.bind(CS):typeof process<"u"&&process.nextTick||ZZ,au={isArray:e7,isArrayBuffer:WZ,isBuffer:d9,isFormData:_nt,isArrayBufferView:pnt,isString:hnt,isNumber:DZ,isBoolean:fnt,isObject:p9,isPlainObject:NN,isEmptyObject:mnt,isReadableStream:Tnt,isRequest:Snt,isResponse:knt,isHeaders:Lnt,isUndefined:t7,isDate:ynt,isFile:gnt,isBlob:vnt,isRegExp:Int,isFunction:Y_,isStream:xnt,isURLSearchParams:wnt,isTypedArray:Pnt,isFileList:bnt,forEach:h9,merge:pA,extend:Cnt,trim:Ent,stripBOM:Nnt,inherits:Ont,toFlatObject:Mnt,kindOf:EN,kindOfTest:Gw,endsWith:Vnt,toArray:znt,forEachEntry:Ant,matchAll:Rnt,isHTMLForm:Unt,hasOwnProperty:XZ,hasOwnProp:XZ,reduceDescriptors:GZ,freezeMethods:qnt,toObjectSet:jnt,toCamelCase:Fnt,noop:Wnt,toFiniteNumber:Dnt,findKey:KZ,global:CS,isContextDefined:BZ,isSpecCompliantForm:Knt,toJSONObject:Bnt,isAsyncFn:Xnt,isThenable:Gnt,setImmediate:ZZ,asap:Znt,isIterable:e=>e!=null&&Y_(e[LN])};function Rm(e,r,a,v,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),a&&(this.config=a),v&&(this.request=v),$&&(this.response=$,this.status=$.status?$.status:null)}au.inherits(Rm,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:au.toJSONObject(this.config),code:this.code,status:this.status}}});const JZ=Rm.prototype,HZ={};["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=>{HZ[e]={value:e}}),Object.defineProperties(Rm,HZ),Object.defineProperty(JZ,"isAxiosError",{value:!0}),Rm.from=(e,r,a,v,$,h)=>{const u=Object.create(JZ);au.toFlatObject(e,u,function(n){return n!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",p=r==null&&e?e.code:r;return Rm.call(u,i,p,a,v,$),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",h&&Object.assign(u,h),u};const Jnt=null;function hA(e){return au.isPlainObject(e)||au.isArray(e)}function YZ(e){return au.endsWith(e,"[]")?e.slice(0,-2):e}function QZ(e,r,a){return e?e.concat(r).map(function($,h){return $=YZ($),!a&&h?"["+$+"]":$}).join(a?".":""):r}function Hnt(e){return au.isArray(e)&&!e.some(hA)}const Ynt=au.toFlatObject(au,{},null,function(r){return/^is[A-Z]/.test(r)});function ON(e,r,a){if(!au.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,a=au.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(o,l){return!au.isUndefined(l[o])});const v=a.metaTokens,$=a.visitor||n,h=a.dots,u=a.indexes,p=(a.Blob||typeof Blob<"u"&&Blob)&&au.isSpecCompliantForm(r);if(!au.isFunction($))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(au.isDate(d))return d.toISOString();if(au.isBoolean(d))return d.toString();if(!p&&au.isBlob(d))throw new Rm("Blob is not supported. Use a Buffer instead.");return au.isArrayBuffer(d)||au.isTypedArray(d)?p&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function n(d,o,l){let s=d;if(d&&!l&&typeof d=="object"){if(au.endsWith(o,"{}"))o=v?o:o.slice(0,-2),d=JSON.stringify(d);else if(au.isArray(d)&&Hnt(d)||(au.isFileList(d)||au.endsWith(o,"[]"))&&(s=au.toArray(d)))return o=YZ(o),s.forEach(function(g,S){!(au.isUndefined(g)||g===null)&&r.append(u===!0?QZ([o],S,h):u===null?o:o+"[]",c(g))}),!1}return hA(d)?!0:(r.append(QZ(l,o,h),c(d)),!1)}const k=[],T=Object.assign(Ynt,{defaultVisitor:n,convertValue:c,isVisitable:hA});function x(d,o){if(!au.isUndefined(d)){if(k.indexOf(d)!==-1)throw Error("Circular reference detected in "+o.join("."));k.push(d),au.forEach(d,function(s,f){(!(au.isUndefined(s)||s===null)&&$.call(r,s,au.isString(f)?f.trim():f,o,T))===!0&&x(s,o?o.concat(f):[f])}),k.pop()}}if(!au.isObject(e))throw new TypeError("data must be an object");return x(e),r}function $Z(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(v){return r[v]})}function fA(e,r){this._pairs=[],e&&ON(e,this,r)}const eJ=fA.prototype;eJ.append=function(r,a){this._pairs.push([r,a])},eJ.toString=function(r){const a=r?function(v){return r.call(this,v,$Z)}:$Z;return this._pairs.map(function($){return a($[0])+"="+a($[1])},"").join("&")};function Qnt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tJ(e,r,a){if(!r)return e;const v=a&&a.encode||Qnt;au.isFunction(a)&&(a={serialize:a});const $=a&&a.serialize;let h;if($?h=$(r,a):h=au.isURLSearchParams(r)?r.toString():new fA(r,a).toString(v),h){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+h}return e}class rJ{constructor(){this.handlers=[]}use(r,a,v){return this.handlers.push({fulfilled:r,rejected:a,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){au.forEach(this.handlers,function(v){v!==null&&r(v)})}}const aJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$nt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fA,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mA=typeof window<"u"&&typeof document<"u",yA=typeof navigator=="object"&&navigator||void 0,eit=mA&&(!yA||["ReactNative","NativeScript","NS"].indexOf(yA.product)<0),tit=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rit=mA&&window.location.href||"http://localhost",Dx={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mA,hasStandardBrowserEnv:eit,hasStandardBrowserWebWorkerEnv:tit,navigator:yA,origin:rit},Symbol.toStringTag,{value:"Module"})),...$nt};function ait(e,r){return ON(e,new Dx.classes.URLSearchParams,{visitor:function(a,v,$,h){return Dx.isNode&&au.isBuffer(a)?(this.append(v,a.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...r})}function nit(e){return au.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function iit(e){const r={},a=Object.keys(e);let v;const $=a.length;let h;for(v=0;v<$;v++)h=a[v],r[h]=e[h];return r}function nJ(e){function r(a,v,$,h){let u=a[h++];if(u==="__proto__")return!0;const i=Number.isFinite(+u),p=h>=a.length;return u=!u&&au.isArray($)?$.length:u,p?(au.hasOwnProp($,u)?$[u]=[$[u],v]:$[u]=v,!i):((!$[u]||!au.isObject($[u]))&&($[u]=[]),r(a,v,$[u],h)&&au.isArray($[u])&&($[u]=iit($[u])),!i)}if(au.isFormData(e)&&au.isFunction(e.entries)){const a={};return au.forEachEntry(e,(v,$)=>{r(nit(v),$,a,0)}),a}return null}function oit(e,r,a){if(au.isString(e))try{return(r||JSON.parse)(e),au.trim(e)}catch(v){if(v.name!=="SyntaxError")throw v}return(a||JSON.stringify)(e)}const f9={transitional:aJ,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const v=a.getContentType()||"",$=v.indexOf("application/json")>-1,h=au.isObject(r);if(h&&au.isHTMLForm(r)&&(r=new FormData(r)),au.isFormData(r))return $?JSON.stringify(nJ(r)):r;if(au.isArrayBuffer(r)||au.isBuffer(r)||au.isStream(r)||au.isFile(r)||au.isBlob(r)||au.isReadableStream(r))return r;if(au.isArrayBufferView(r))return r.buffer;if(au.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let i;if(h){if(v.indexOf("application/x-www-form-urlencoded")>-1)return ait(r,this.formSerializer).toString();if((i=au.isFileList(r))||v.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return ON(i?{"files[]":r}:r,p&&new p,this.formSerializer)}}return h||$?(a.setContentType("application/json",!1),oit(r)):r}],transformResponse:[function(r){const a=this.transitional||f9.transitional,v=a&&a.forcedJSONParsing,$=this.responseType==="json";if(au.isResponse(r)||au.isReadableStream(r))return r;if(r&&au.isString(r)&&(v&&!this.responseType||$)){const u=!(a&&a.silentJSONParsing)&&$;try{return JSON.parse(r,this.parseReviver)}catch(i){if(u)throw i.name==="SyntaxError"?Rm.from(i,Rm.ERR_BAD_RESPONSE,this,null,this.response):i}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dx.classes.FormData,Blob:Dx.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};au.forEach(["delete","get","head","post","put","patch"],e=>{f9.headers[e]={}});const sit=au.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"]),lit=e=>{const r={};let a,v,$;return e&&e.split(`
|
|
7993
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),v}static addGrid(r,a={}){if(!r)return null;let v=r;if(v.gridstack){const $=v.gridstack;return a&&($.opts={...$.opts,...a}),a.children!==void 0&&$.load(a.children),$}return(!r.classList.contains("grid-stack")||Rh.addRemoveCB)&&(Rh.addRemoveCB?v=Rh.addRemoveCB(r,a,!0,!0):v=ru.createDiv(["grid-stack",a.class],r)),Rh.init(a,v)}static registerEngine(r){Rh.engineClass=r}get placeholder(){if(!this._placeholder){this._placeholder=ru.createDiv([this.opts.placeholderClass,T3.itemClass,this.opts.itemClass]);const r=ru.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(r.textContent=this.opts.placeholderText)}return this._placeholder}constructor(r,a={}){var v;this.el=r,this.opts=a,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},r.gridstack=this,this.opts=a=a||{},r.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),a.row&&(a.minRow=a.maxRow=a.row,delete a.row);const $=ru.toNumber(r.getAttribute("gs-row"));a.column==="auto"&&delete a.column,a.alwaysShowResizeHandle!==void 0&&(a._alwaysShowResizeHandle=a.alwaysShowResizeHandle);const h=a.columnOpts;if(h){const n=h.breakpoints;!h.columnWidth&&!(n!=null&&n.length)?delete a.columnOpts:(h.columnMax=h.columnMax||12,(n==null?void 0:n.length)>1&&n.sort((k,T)=>(T.w||0)-(k.w||0)))}const u={...ru.cloneDeep(T3),column:ru.toNumber(r.getAttribute("gs-column"))||T3.column,minRow:$||ru.toNumber(r.getAttribute("gs-min-row"))||T3.minRow,maxRow:$||ru.toNumber(r.getAttribute("gs-max-row"))||T3.maxRow,staticGrid:ru.toBool(r.getAttribute("gs-static"))||T3.staticGrid,sizeToContent:ru.toBool(r.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(a.handleClass?"."+a.handleClass:a.handle?a.handle:"")||T3.draggable.handle},removableOptions:{accept:a.itemClass||T3.removableOptions.accept,decline:T3.removableOptions.decline}};r.getAttribute("gs-animate")&&(u.animate=ru.toBool(r.getAttribute("gs-animate"))),a=ru.defaults(a,u),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(a),a.rtl==="auto"&&(a.rtl=r.style.direction==="rtl"),a.rtl&&this.el.classList.add("grid-stack-rtl");const i=this.el.closest("."+T3.itemClass),p=i==null?void 0:i.gridstackNode;if(p&&(p.subGrid=this,this.parentGridNode=p,this.el.classList.add("grid-stack-nested"),p.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=a.cellHeight==="auto",this._isAutoCellHeight||a.cellHeight==="initial")this.cellHeight(void 0);else{typeof a.cellHeight=="number"&&a.cellHeightUnit&&a.cellHeightUnit!==T3.cellHeightUnit&&(a.cellHeight=a.cellHeight+a.cellHeightUnit,delete a.cellHeightUnit);const n=a.cellHeight;delete a.cellHeight,this.cellHeight(n)}a.alwaysShowResizeHandle==="mobile"&&(a.alwaysShowResizeHandle=Xw),this._setStaticClass();const c=a.engineClass||Rh.engineClass||P4;if(this.engine=new c({column:this.getColumn(),float:a.float,maxRow:a.maxRow,onChange:n=>{n.forEach(k=>{const T=k.el;T&&(k._removeDOM?(T&&T.remove(),delete k._removeDOM):this._writePosAttr(T,k))}),this._updateContainerHeight()}}),a.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(n=>this._prepareElement(n)),delete this.engine._loading,this.batchUpdate(!1)),a.children){const n=a.children;delete a.children,n.length&&this.load(n)}this.setAnimation(),a.subGridDynamic&&!Nf.pauseDrag&&(Nf.pauseDrag=!0),((v=a.draggable)==null?void 0:v.pause)!==void 0&&(Nf.pauseDrag=a.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(r=this.opts){this.el.classList.add("gs-"+r.column),typeof r.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/r.column}%`)}addWidget(r){if(!r)return;if(typeof r=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(r.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(r);let a,v=r;if(v.grid=this,v.el?a=v.el:Rh.addRemoveCB?a=Rh.addRemoveCB(this.el,r,!0,!1):a=this.createWidgetDivs(v),!a)return;if(v=a.gridstackNode,v&&a.parentElement===this.el&&this.engine.nodes.find(h=>h._id===v._id))return a;const $=this._readAttr(a);return ru.defaults(r,$),this.engine.prepareNode(r),this.el.appendChild(a),this.makeWidget(a,r),a}createWidgetDivs(r){const a=ru.createDiv(["grid-stack-item",this.opts.itemClass]),v=ru.createDiv(["grid-stack-item-content"],a);return ru.lazyLoad(r)?r.visibleObservable||(r.visibleObservable=new IntersectionObserver(([$])=>{var h,u;$.isIntersecting&&((h=r.visibleObservable)==null||h.disconnect(),delete r.visibleObservable,Rh.renderCB(v,r),(u=r.grid)==null||u.prepareDragDrop(r.el))}),window.setTimeout(()=>{var $;return($=r.visibleObservable)==null?void 0:$.observe(a)})):Rh.renderCB(v,r),a}makeSubGrid(r,a,v,$=!0){var h,u,i;let p=r.gridstackNode;if(p||(p=this.makeWidget(r).gridstackNode),(h=p.subGrid)!=null&&h.el)return p.subGrid;let c,n=this;for(;n&&!c;)c=(u=n.opts)==null?void 0:u.subGridOpts,n=(i=n.parentGridNode)==null?void 0:i.grid;a=ru.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...c||{},...a||p.subGridOpts||{}}),p.subGridOpts=a;let k;a.column==="auto"&&(k=!0,a.column=Math.max(p.w||1,(v==null?void 0:v.w)||1),delete a.columnOpts);let T=p.el.querySelector(".grid-stack-item-content"),x,d;if($&&(this._removeDD(p.el),d={...p,x:0,y:0},ru.removeInternalForSave(d),delete d.subGridOpts,p.content&&(d.content=p.content,delete p.content),Rh.addRemoveCB?x=Rh.addRemoveCB(this.el,d,!0,!1):(x=ru.createDiv(["grid-stack-item"]),x.appendChild(T),T=ru.createDiv(["grid-stack-item-content"],p.el)),this.prepareDragDrop(p.el)),v){const l=k?a.column:p.w,s=p.h+v.h,f=p.el.style;f.transition="none",this.update(p.el,{w:l,h:s}),setTimeout(()=>f.transition=null)}const o=p.subGrid=Rh.addGrid(T,a);return v!=null&&v._moving&&(o._isTemp=!0),k&&(o._autoColumn=!0),$&&o.makeWidget(x,d),v&&(v._moving?window.setTimeout(()=>ru.simulateMouseEvent(v._event,"mouseenter",o.el),0):o.makeWidget(p.el,p)),this.resizeToContentCheck(!1,p),o}removeAsSubGrid(r){var a;const v=(a=this.parentGridNode)==null?void 0:a.grid;v&&(v.batchUpdate(),v.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach($=>{$.x+=this.parentGridNode.x,$.y+=this.parentGridNode.y,v.makeWidget($.el,$)}),v.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,r&&window.setTimeout(()=>ru.simulateMouseEvent(r._event,"mouseenter",v.el),0))}save(r=!0,a=!1,v=Rh.saveCB,$){const h=this.engine.save(r,v,$);if(h.forEach(u=>{var i;if(r&&u.el&&!u.subGrid&&!v){const p=u.el.querySelector(".grid-stack-item-content");u.content=p==null?void 0:p.innerHTML,u.content||delete u.content}else if(!r&&!v&&delete u.content,(i=u.subGrid)!=null&&i.el){const p=u.w||u.subGrid.getColumn(),c=u.subGrid.save(r,a,v,p);u.subGridOpts=a?c:{children:c},delete u.subGrid}delete u.el}),a){const u=ru.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const i=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,i!==void 0?u.alwaysShowResizeHandle=i:delete u.alwaysShowResizeHandle,ru.removeInternalAndSame(u,T3),u.children=h,u}return h}load(r,a=Rh.addRemoveCB||!0){r=ru.cloneDeep(r);const v=this.getColumn();r.forEach(n=>{n.w=n.w||n.minW||1,n.h=n.h||n.minH||1}),r=ru.sort(r),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let $=0;r.forEach(n=>{$=Math.max($,(n.x||0)+n.w)}),$>this.engine.defaultColumn&&(this.engine.defaultColumn=$),$>v&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=r,this.engine.columnChanged($,v,this.responseLayout),r=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(r,$,!0));const h=Rh.addRemoveCB;typeof a=="function"&&(Rh.addRemoveCB=a);const u=[];this.batchUpdate();const i=!this.engine.nodes.length,p=i&&this.opts.animate;p&&this.setAnimation(!1),!i&&a&&[...this.engine.nodes].forEach(n=>{n.id&&(ru.find(r,n.id)||(Rh.addRemoveCB&&Rh.addRemoveCB(this.el,n,!1,!1),u.push(n),this.removeWidget(n.el,!0,!1)))}),this.engine._loading=!0;const c=[];return this.engine.nodes=this.engine.nodes.filter(n=>ru.find(r,n.id)?(c.push(n),!1):!0),r.forEach(n=>{var k;const T=ru.find(c,n.id);if(T){if(ru.shouldSizeToContent(T)&&(n.h=T.h),this.engine.nodeBoundFix(n),(n.autoPosition||n.x===void 0||n.y===void 0)&&(n.w=n.w||T.w,n.h=n.h||T.h,this.engine.findEmptyPosition(n)),this.engine.nodes.push(T),ru.samePos(T,n)&&this.engine.nodes.length>1&&(this.moveNode(T,{...n,forceCollide:!0}),ru.copyPos(n,T)),this.update(T.el,n),(k=n.subGridOpts)!=null&&k.children){const x=T.el.querySelector(".grid-stack");x&&x.gridstack&&x.gridstack.load(n.subGridOpts.children)}}else a&&this.addWidget(n)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,h?Rh.addRemoveCB=h:delete Rh.addRemoveCB,p&&this.setAnimation(!0,!0),this}batchUpdate(r=!0){return this.engine.batchUpdate(r),r||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(r=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!r||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const a=this.el.querySelector("."+this.opts.itemClass);if(a){const $=ru.toNumber(a.getAttribute("gs-h"))||1;return Math.round(a.offsetHeight/$)}const v=parseInt(this.el.getAttribute("gs-current-row"));return v?Math.round(this.el.getBoundingClientRect().height/v):this.opts.cellHeight}cellHeight(r){if(r!==void 0&&this._isAutoCellHeight!==(r==="auto")&&(this._isAutoCellHeight=r==="auto",this._updateResizeEvent()),(r==="initial"||r==="auto")&&(r=void 0),r===void 0){const v=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;r=this.cellWidth()+v}const a=ru.parseHeight(r);return this.opts.cellHeightUnit===a.unit&&this.opts.cellHeight===a.h?this:(this.opts.cellHeightUnit=a.unit,this.opts.cellHeight=a.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(r=!1){var a;return r&&(a=this.opts.columnOpts)!=null&&a.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,a;const v=this.opts.columnOpts;if(!v||!v.columnWidth&&!((r=v.breakpoints)!=null&&r.length))return!1;const $=this.getColumn();let h=$;const u=this._widthOrContainer(!0);if(v.columnWidth)h=Math.min(Math.round(u/v.columnWidth)||1,v.columnMax);else{h=v.columnMax;let i=0;for(;i<v.breakpoints.length&&u<=v.breakpoints[i].w;)h=v.breakpoints[i++].c||$}if(h!==$){const i=(a=v.breakpoints)==null?void 0:a.find(p=>p.c===h);return this.column(h,(i==null?void 0:i.layout)||v.layout),!0}return!1}compact(r="compact",a=!0){return this.engine.compact(r,a),this._triggerChangeEvent(),this}column(r,a="moveScale"){if(!r||r<1||this.opts.column===r)return this;const v=this.getColumn();return this.opts.column=r,this.engine?(this.engine.column=r,this.el.classList.remove("gs-"+v),this._updateColumnVar(),this.engine.columnChanged(v,r,a),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=a,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(r=>r.matches("."+this.opts.itemClass)&&!r.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(r=!0){var a;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),r?this.el.parentNode.removeChild(this.el):(this.removeAll(r),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(a=this._placeholder)==null||delete a.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(r){return this.opts.float!==r&&(this.opts.float=this.engine.float=r,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(r,a=!1){const v=this.el.getBoundingClientRect();let $;a?$={top:v.top+document.documentElement.scrollTop,left:v.left}:$={top:this.el.offsetTop,left:this.el.offsetLeft};const h=r.left-$.left,u=r.top-$.top,i=v.width/this.getColumn(),p=v.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(h/i),y:Math.floor(u/p)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(r,a,v,$){return this.engine.isAreaEmpty(r,a,v,$)}makeWidget(r,a){const v=Rh.getElement(r);if(!v||v.gridstackNode)return v;v.parentElement||this.el.appendChild(v),this._prepareElement(v,!0,a);const $=v.gridstackNode;this._updateContainerHeight(),$.subGridOpts&&this.makeSubGrid(v,$.subGridOpts,void 0,!1);let h;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(h=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),h&&delete this._ignoreLayoutsNodeChange,v}on(r,a){return r.indexOf(" ")!==-1?(r.split(" ").forEach(v=>this.on(v,a)),this):(r==="change"||r==="added"||r==="removed"||r==="enable"||r==="disable"?(r==="enable"||r==="disable"?this._gsEventHandler[r]=v=>a(v):this._gsEventHandler[r]=v=>{v.detail&&a(v,v.detail)},this.el.addEventListener(r,this._gsEventHandler[r])):r==="drag"||r==="dragstart"||r==="dragstop"||r==="resizestart"||r==="resize"||r==="resizestop"||r==="dropped"||r==="resizecontent"?this._gsEventHandler[r]=a:console.error("GridStack.on("+r+") event not supported"),this)}off(r){return r.indexOf(" ")!==-1?(r.split(" ").forEach(a=>this.off(a)),this):((r==="change"||r==="added"||r==="removed"||r==="enable"||r==="disable")&&this._gsEventHandler[r]&&this.el.removeEventListener(r,this._gsEventHandler[r]),delete this._gsEventHandler[r],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(r=>this.off(r)),this}removeWidget(r,a=!0,v=!0){return r?(Rh.getElements(r).forEach($=>{if($.parentElement&&$.parentElement!==this.el)return;let h=$.gridstackNode;h||(h=this.engine.nodes.find(u=>$===u.el)),h&&(a&&Rh.addRemoveCB&&Rh.addRemoveCB(this.el,h,!1,!1),delete $.gridstackNode,this._removeDD($),this.engine.removeNode(h,a,v),a&&$.parentElement&&$.remove())}),v&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(r=!0,a=!0){return this.engine.nodes.forEach(v=>{r&&Rh.addRemoveCB&&Rh.addRemoveCB(this.el,v,!1,!1),delete v.el.gridstackNode,this.opts.staticGrid||this._removeDD(v.el)}),this.engine.removeAll(r,a),a&&this._triggerRemoveEvent(),this}setAnimation(r=this.opts.animate,a){return a?setTimeout(()=>{this.opts&&this.setAnimation(r)}):r?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=r,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(r,a=!0,v=!0){return!!this.opts.staticGrid===r?this:(r?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach($=>{this.prepareDragDrop($.el),$.subGrid&&v&&$.subGrid.setStatic(r,a,v)}),a&&this._setStaticClass(),this)}updateOptions(r){var a;const v=this.opts;return r===v?this:(r.acceptWidgets!==void 0&&(v.acceptWidgets=r.acceptWidgets,this._setupAcceptWidget()),r.animate!==void 0&&this.setAnimation(r.animate),r.cellHeight&&this.cellHeight(r.cellHeight),r.class!==void 0&&r.class!==v.class&&(v.class&&this.el.classList.remove(v.class),r.class&&this.el.classList.add(r.class)),r.columnOpts?(this.opts.columnOpts=r.columnOpts,this.checkDynamicColumn()):r.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof r.column=="number"&&this.column(r.column),r.margin!==void 0&&this.margin(r.margin),r.staticGrid!==void 0&&this.setStatic(r.staticGrid),r.disableDrag!==void 0&&!r.staticGrid&&this.enableMove(!r.disableDrag),r.disableResize!==void 0&&!r.staticGrid&&this.enableResize(!r.disableResize),r.float!==void 0&&this.float(r.float),r.row!==void 0?(v.minRow=v.maxRow=v.row=r.row,this._updateContainerHeight()):(r.minRow!==void 0&&(v.minRow=r.minRow,this._updateContainerHeight()),r.maxRow!==void 0&&(v.maxRow=r.maxRow)),(a=r.children)!=null&&a.length&&this.load(r.children),this)}update(r,a){return Rh.getElements(r).forEach(v=>{var $;const h=v==null?void 0:v.gridstackNode;if(!h)return;const u={...ru.copyPos({},h),...ru.cloneDeep(a)};this.engine.nodeBoundFix(u),delete u.autoPosition;const i=["x","y","w","h"];let p;if(i.some(k=>u[k]!==void 0&&u[k]!==h[k])&&(p={},i.forEach(k=>{p[k]=u[k]!==void 0?u[k]:h[k],delete u[k]})),!p&&(u.minW||u.minH||u.maxW||u.maxH)&&(p={}),u.content!==void 0){const k=v.querySelector(".grid-stack-item-content");k&&k.textContent!==u.content&&(h.content=u.content,Rh.renderCB(k,u),($=h.subGrid)!=null&&$.el&&(k.appendChild(h.subGrid.el),h.subGrid._updateContainerHeight())),delete u.content}let c=!1,n=!1;for(const k in u)k[0]!=="_"&&h[k]!==u[k]&&(h[k]=u[k],c=!0,n=n||!this.opts.staticGrid&&(k==="noResize"||k==="noMove"||k==="locked"));if(ru.sanitizeMinMax(h),p){const k=p.w!==void 0&&p.w!==h.w;this.moveNode(h,p),k&&h.subGrid?h.subGrid.onResize(this.hasAnimationCSS()?h.w:void 0):this.resizeToContentCheck(k,h),delete h._orig}(p||c)&&this._writeAttr(v,h),n&&this.prepareDragDrop(h.el),Rh.updateCB&&Rh.updateCB(h)}),this}moveNode(r,a){const v=r._updating;v||this.engine.cleanNodes().beginUpdate(r),this.engine.moveNode(r,a),this._updateContainerHeight(),v||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(r){var a,v;if(!r||(r.classList.remove("size-to-content-max"),!r.clientHeight))return;const $=r.gridstackNode;if(!$)return;const h=$.grid;if(!h||r.parentElement!==h.el)return;const u=h.getCellHeight(!0);if(!u)return;let i=$.h?$.h*u:r.clientHeight,p;if($.resizeToContentParent&&(p=r.querySelector($.resizeToContentParent)),p||(p=r.querySelector(Rh.resizeToContentParent)),!p)return;const c=r.clientHeight-p.clientHeight,n=$.h?$.h*u-c:p.clientHeight;let k;if($.subGrid){k=$.subGrid.getRow()*$.subGrid.getCellHeight(!0);const d=$.subGrid.el.getBoundingClientRect(),o=r.getBoundingClientRect();k+=d.top-o.top}else{if((v=(a=$.subGridOpts)==null?void 0:a.children)!=null&&v.length)return;{const d=p.firstElementChild;if(!d){console.error(`Error: GridStack.resizeToContent() widget id:${$.id} '${Rh.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}k=d.getBoundingClientRect().height||n}}if(n===k)return;i+=k-n;let T=Math.ceil(i/u);const x=Number.isInteger($.sizeToContent)?$.sizeToContent:0;x&&T>x&&(T=x,r.classList.add("size-to-content-max")),$.minH&&T<$.minH?T=$.minH:$.maxH&&T>$.maxH&&(T=$.maxH),T!==$.h&&(h._ignoreLayoutsNodeChange=!0,h.moveNode($,{h:T}),delete h._ignoreLayoutsNodeChange)}resizeToContentCBCheck(r){Rh.resizeToContentCB?Rh.resizeToContentCB(r):this.resizeToContent(r)}rotate(r,a){return Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;if(!ru.canBeRotated($))return;const h={w:$.h,h:$.w,minH:$.minW,minW:$.minH,maxH:$.maxW,maxW:$.maxH};if(a){const i=a.left>0?Math.floor(a.left/this.cellWidth()):0,p=a.top>0?Math.floor(a.top/this.opts.cellHeight):0;h.x=$.x+i-($.h-(p+1)),h.y=$.y+p-i}Object.keys(h).forEach(i=>{h[i]===void 0&&delete h[i]});const u=$._orig;this.update(v,h),$._orig=u}),this}margin(r){if(!(typeof r=="string"&&r.split(" ").length>1)){const a=ru.parseHeight(r);if(this.opts.marginUnit===a.unit&&this.opts.margin===a.h)return}return this.opts.margin=r,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(r){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const a=arguments;let v=0,$={x:a[v++],y:a[v++],w:a[v++],h:a[v++],autoPosition:a[v++]};return this.willItFit($)}return this.engine.willItFit(r)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const r=this.engine.getDirtyNodes(!0);return r&&r.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(r),this._triggerEvent("change",r)),this.engine.saveInitial(),this}_triggerAddEvent(){var r;if(this.engine.batchMode)return this;if((r=this.engine.addedNodes)!=null&&r.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(v=>{delete v._dirty});const a=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",a)}return this}_triggerRemoveEvent(){var r;if(this.engine.batchMode)return this;if((r=this.engine.removedNodes)!=null&&r.length){const a=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",a)}return this}_triggerEvent(r,a){const v=a?new CustomEvent(r,{bubbles:!1,detail:a}):new Event(r);let $=this;for(;$.parentGridNode;)$=$.parentGridNode.grid;return $.el.dispatchEvent(v),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const r=this.parentGridNode;let a=this.getRow()+this._extraDragRow;const v=this.opts.cellHeight,$=this.opts.cellHeightUnit;if(!v)return this;if(!r&&!this.opts.minRow){const h=ru.parseHeight(getComputedStyle(this.el).minHeight);if(h.h>0&&h.unit===$){const u=Math.floor(h.h/v);a<u&&(a=u)}}return this.el.setAttribute("gs-current-row",String(a)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),a&&(this.el.style[r?"minHeight":"height"]=a*v+$),r&&ru.shouldSizeToContent(r)&&r.grid.resizeToContentCBCheck(r.el),this}_prepareElement(r,a=!1,v){v=v||this._readAttr(r),r.gridstackNode=v,v.el=r,v.grid=this,v=this.engine.addNode(v,a),this._writeAttr(r,v),r.classList.add(T3.itemClass,this.opts.itemClass);const $=ru.shouldSizeToContent(v);return $?r.classList.add("size-to-content"):r.classList.remove("size-to-content"),$&&this.resizeToContentCheck(!1,v),ru.lazyLoad(v)||this.prepareDragDrop(v.el),this}_writePosAttr(r,a){return(!a._moving&&!a._resizing||this._placeholder===r)&&(r.style.top=a.y?a.y===1?"var(--gs-cell-height)":`calc(${a.y} * var(--gs-cell-height))`:null,r.style.left=a.x?a.x===1?"var(--gs-column-width)":`calc(${a.x} * var(--gs-column-width))`:null,r.style.width=a.w>1?`calc(${a.w} * var(--gs-column-width))`:null,r.style.height=a.h>1?`calc(${a.h} * var(--gs-cell-height))`:null),a.x>0?r.setAttribute("gs-x",String(a.x)):r.removeAttribute("gs-x"),a.y>0?r.setAttribute("gs-y",String(a.y)):r.removeAttribute("gs-y"),a.w>1?r.setAttribute("gs-w",String(a.w)):r.removeAttribute("gs-w"),a.h>1?r.setAttribute("gs-h",String(a.h)):r.removeAttribute("gs-h"),this}_writeAttr(r,a){if(!a)return this;this._writePosAttr(r,a);const v={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const $ in v)a[$]?r.setAttribute(v[$],String(a[$])):r.removeAttribute(v[$]);return this}_readAttr(r,a=!0){const v={};v.x=ru.toNumber(r.getAttribute("gs-x")),v.y=ru.toNumber(r.getAttribute("gs-y")),v.w=ru.toNumber(r.getAttribute("gs-w")),v.h=ru.toNumber(r.getAttribute("gs-h")),v.autoPosition=ru.toBool(r.getAttribute("gs-auto-position")),v.noResize=ru.toBool(r.getAttribute("gs-no-resize")),v.noMove=ru.toBool(r.getAttribute("gs-no-move")),v.locked=ru.toBool(r.getAttribute("gs-locked"));const $=r.getAttribute("gs-size-to-content");$&&($==="true"||$==="false"?v.sizeToContent=ru.toBool($):v.sizeToContent=parseInt($,10)),v.id=r.getAttribute("gs-id"),v.maxW=ru.toNumber(r.getAttribute("gs-max-w")),v.minW=ru.toNumber(r.getAttribute("gs-min-w")),v.maxH=ru.toNumber(r.getAttribute("gs-max-h")),v.minH=ru.toNumber(r.getAttribute("gs-min-h")),a&&(v.w===1&&r.removeAttribute("gs-w"),v.h===1&&r.removeAttribute("gs-h"),v.maxW&&r.removeAttribute("gs-max-w"),v.minW&&r.removeAttribute("gs-min-w"),v.maxH&&r.removeAttribute("gs-max-h"),v.minH&&r.removeAttribute("gs-min-h"));for(const h in v){if(!v.hasOwnProperty(h))return;!v[h]&&v[h]!==0&&h!=="sizeToContent"&&delete v[h]}return v}_setStaticClass(){const r=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...r),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...r),this.el.removeAttribute("gs-static")),this}onResize(r=(a=>(a=this.el)==null?void 0:a.clientWidth)()){if(!r||this.prevWidth===r)return;this.prevWidth=r,this.batchUpdate();let a=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),a=!0):a=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(v=>{v.subGrid&&v.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(a),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(r=!1,a=void 0){if(this.engine){if(r&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,a),this.animationDelay);if(a)ru.shouldSizeToContent(a)&&this.resizeToContentCBCheck(a.el);else if(this.engine.nodes.some(v=>ru.shouldSizeToContent(v))){const v=[...this.engine.nodes];this.batchUpdate(),v.forEach($=>{ru.shouldSizeToContent($)&&this.resizeToContentCBCheck($.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,a?[a]:this.engine.nodes)}}_updateResizeEvent(r=!1){const a=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(v=>v.sizeToContent));return!r&&a&&!this.resizeObserver?(this._sizeThrottle=ru.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(r||!a)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(r=".grid-stack-item"){return ru.getElement(r)}static getElements(r=".grid-stack-item"){return ru.getElements(r)}static getGridElement(r){return Rh.getElement(r)}static getGridElements(r){return ru.getElements(r)}_initMargin(){let r,a=0,v=[];typeof this.opts.margin=="string"&&(v=this.opts.margin.split(" ")),v.length===2?(this.opts.marginTop=this.opts.marginBottom=v[0],this.opts.marginLeft=this.opts.marginRight=v[1]):v.length===4?(this.opts.marginTop=v[0],this.opts.marginRight=v[1],this.opts.marginBottom=v[2],this.opts.marginLeft=v[3]):(r=ru.parseHeight(this.opts.margin),this.opts.marginUnit=r.unit,a=this.opts.margin=r.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(h=>{this.opts[h]===void 0?this.opts[h]=a:(r=ru.parseHeight(this.opts[h]),this.opts[h]=r.h,delete this.opts.margin)}),this.opts.marginUnit=r.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const $=this.el.style;return $.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),$.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return u_}static setupDragIn(r,a,v,$=document){(a==null?void 0:a.pause)!==void 0&&(Nf.pauseDrag=a.pause),a={appendTo:"body",helper:"clone",...a||{}},(typeof r=="string"?ru.getElements(r,$):r).forEach((h,u)=>{u_.isDraggable(h)||u_.dragIn(h,a),v!=null&&v[u]&&(h.gridstackNode=v[u])})}movable(r,a){return this.opts.staticGrid?this:(Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;$&&(a?delete $.noMove:$.noMove=!0,this.prepareDragDrop($.el))}),this)}resizable(r,a){return this.opts.staticGrid?this:(Rh.getElements(r).forEach(v=>{const $=v.gridstackNode;$&&(a?delete $.noResize:$.noResize=!0,this.prepareDragDrop($.el))}),this)}disable(r=!0){if(!this.opts.staticGrid)return this.enableMove(!1,r),this.enableResize(!1,r),this._triggerEvent("disable"),this}enable(r=!0){if(!this.opts.staticGrid)return this.enableMove(!0,r),this.enableResize(!0,r),this._triggerEvent("enable"),this}enableMove(r,a=!0){return this.opts.staticGrid?this:(r?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(v=>{this.prepareDragDrop(v.el),v.subGrid&&a&&v.subGrid.enableMove(r,a)}),this)}enableResize(r,a=!0){return this.opts.staticGrid?this:(r?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(v=>{this.prepareDragDrop(v.el),v.subGrid&&a&&v.subGrid.enableResize(r,a)}),this)}cancelDrag(){var r;const a=(r=this._placeholder)==null?void 0:r.gridstackNode;a&&(a._isExternal?(a._isAboutToRemove=!0,this.engine.removeNode(a)):a._isAboutToRemove&&Rh._itemRemoving(a.el,!1),this.engine.restoreInitial())}_removeDD(r){return u_.draggable(r,"destroy").resizable(r,"destroy"),r.gridstackNode&&delete r.gridstackNode._initDD,delete r.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return u_.droppable(this.el,"destroy"),this;let r,a;const v=($,h,u)=>{var i;u=u||h;const p=u.gridstackNode;if(!p)return;if(!((i=p.grid)!=null&&i.el)){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const x=u.getBoundingClientRect();u.style.left=x.x+(this.dragTransform.xScale-1)*($.clientX-x.x)/this.dragTransform.xScale+"px",u.style.top=x.y+(this.dragTransform.yScale-1)*($.clientY-x.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:c,left:n}=u.getBoundingClientRect();const k=this.el.getBoundingClientRect();n-=k.left,c-=k.top;const T={position:{top:c*this.dragTransform.xScale,left:n*this.dragTransform.yScale}};if(p._temporaryRemoved){if(p.x=Math.max(0,Math.round(n/a)),p.y=Math.max(0,Math.round(c/r)),delete p.autoPosition,this.engine.nodeBoundFix(p),!this.engine.willItFit(p)){if(p.autoPosition=!0,!this.engine.willItFit(p)){u_.off(h,"drag");return}p._willFitPos&&(ru.copyPos(p,p._willFitPos),delete p._willFitPos)}this._onStartMoving(u,$,T,p,a,r)}else this._dragOrResize(u,$,T,p,a,r)};return u_.droppable(this.el,{accept:$=>{const h=$.gridstackNode||this._readAttr($,!1);if((h==null?void 0:h.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets($);else{const i=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=$.matches(i)}if(u&&h&&this.opts.maxRow){const i={w:h.w,h:h.h,minW:h.minW,minH:h.minH};u=this.engine.willItFit(i)}return u}}).on(this.el,"dropover",($,h,u)=>{let i=(u==null?void 0:u.gridstackNode)||h.gridstackNode;if((i==null?void 0:i.grid)===this&&!i._temporaryRemoved)return!1;if(i!=null&&i._sidebarOrig&&(i.w=i._sidebarOrig.w,i.h=i._sidebarOrig.h),i!=null&&i.grid&&i.grid!==this&&!i._temporaryRemoved&&i.grid._leave(h,u),u=u||h,a=this.cellWidth(),r=this.getCellHeight(!0),!i){const n=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(n){try{i=JSON.parse(n)}catch{console.error("Gridstack dropover: Bad JSON format: ",n)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}i||(i=this._readAttr(u)),i._sidebarOrig={w:i.w,h:i.h}}i.grid||(i.el||(i={...i}),i._isExternal=!0,u.gridstackNode=i);const p=i.w||Math.round(u.offsetWidth/a)||1,c=i.h||Math.round(u.offsetHeight/r)||1;return i.grid&&i.grid!==this?(h._gridstackNodeOrig||(h._gridstackNodeOrig=i),h.gridstackNode=i={...i,w:p,h:c,grid:this},delete i.x,delete i.y,this.engine.cleanupNode(i).nodeBoundFix(i),i._initDD=i._isExternal=i._temporaryRemoved=!0):(i.w=p,i.h=c,i._temporaryRemoved=!0),Rh._itemRemoving(i.el,!1),u_.on(h,"drag",v),v($,h,u),!1}).on(this.el,"dropout",($,h,u)=>{const i=(u==null?void 0:u.gridstackNode)||h.gridstackNode;return i&&(!i.grid||i.grid===this)&&(this._leave(h,u),this._isTemp&&this.removeAsSubGrid(i)),!1}).on(this.el,"drop",($,h,u)=>{var i,p,c;const n=(u==null?void 0:u.gridstackNode)||h.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const k=!!this.placeholder.parentElement,T=h!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,k&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const x=h._gridstackNodeOrig;if(delete h._gridstackNodeOrig,k&&x!=null&&x.grid&&x.grid!==this){const o=x.grid;o.engine.removeNodeFromLayoutCache(x),o.engine.removedNodes.push(x),o._triggerRemoveEvent()._triggerChangeEvent(),o.parentGridNode&&!o.engine.nodes.length&&o.opts.subGridDynamic&&o.removeAsSubGrid()}if(!n||(k&&(this.engine.cleanupNode(n),n.grid=this),(i=n.grid)==null||delete i._isTemp,u_.off(h,"drag"),u!==h?(u.remove(),h=u):h.remove(),this._removeDD(h),!k))return!1;const d=(c=(p=n.subGrid)==null?void 0:p.el)==null?void 0:c.gridstack;return ru.copyPos(n,this._readAttr(this.placeholder)),ru.removePositioningStyles(h),T&&(n.content||n.subGridOpts||Rh.addRemoveCB)?(delete n.el,h=this.addWidget(n)):(this._prepareElement(h,!0,n),this.el.appendChild(h),this.resizeToContentCheck(!1,n),d&&(d.parentGridNode=n),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...$,type:"dropped"},x&&x.grid?x:void 0,n),!1}),this}static _itemRemoving(r,a){if(!r)return;const v=r?r.gridstackNode:void 0;!(v!=null&&v.grid)||r.classList.contains(v.grid.opts.removableOptions.decline)||(a?v._isAboutToRemove=!0:delete v._isAboutToRemove,a?r.classList.add("grid-stack-item-removing"):r.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const r=document.querySelector(this.opts.removable);return r?(!this.opts.staticGrid&&!u_.isDroppable(r)&&u_.droppable(r,this.opts.removableOptions).on(r,"dropover",(a,v)=>Rh._itemRemoving(v,!0)).on(r,"dropout",(a,v)=>Rh._itemRemoving(v,!1)),this):this}prepareDragDrop(r,a=!1){const v=r==null?void 0:r.gridstackNode;if(!v)return;const $=v.noMove||this.opts.disableDrag,h=v.noResize||this.opts.disableResize,u=this.opts.staticGrid||$&&h;if((a||u)&&(v._initDD&&(this._removeDD(r),delete v._initDD),u&&r.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!a))return this;if(!v._initDD){let i,p;const c=(T,x)=>{this.triggerEvent(T,T.target),i=this.cellWidth(),p=this.getCellHeight(!0),this._onStartMoving(r,T,x,v,i,p)},n=(T,x)=>{this._dragOrResize(r,T,x,v,i,p)},k=T=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete v._moving,delete v._resizing,delete v._event,delete v._lastTried;const x=v.w!==v._orig.w,d=T.target;if(!(!d.gridstackNode||d.gridstackNode.grid!==this)){if(v.el=d,v._isAboutToRemove){const o=r.gridstackNode.grid;o._gsEventHandler[T.type]&&o._gsEventHandler[T.type](T,d),o.engine.nodes.push(v),o.removeWidget(r,!0,!0)}else ru.removePositioningStyles(d),v._temporaryRemoved?(this._writePosAttr(d,v),this.engine.addNode(v)):this._writePosAttr(d,v),this.triggerEvent(T,d);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),T.type==="resizestop"&&(Number.isInteger(v.sizeToContent)&&(v.sizeToContent=v.h),this.resizeToContentCheck(x,v))}};u_.draggable(r,{start:c,stop:k,drag:n}).resizable(r,{start:c,stop:k,resize:n}),v._initDD=!0}return u_.draggable(r,$?"disable":"enable").resizable(r,h?"disable":"enable"),this}_onStartMoving(r,a,v,$,h,u){var i;if(this.engine.cleanNodes().beginUpdate($),this._writePosAttr(this.placeholder,$),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=$,(i=$.grid)!=null&&i.el)this.dragTransform=ru.getValuesFromTransformedElement(r);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const p=this.placeholder.closest(".grid-stack");this.dragTransform=ru.getValuesFromTransformedElement(p)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if($.el=this.placeholder,$._lastUiPosition=v.position,$._prevYPix=v.position.top,$._moving=a.type==="dragstart",$._resizing=a.type==="resizestart",delete $._lastTried,a.type==="dropover"&&$._temporaryRemoved&&(this.engine.addNode($),$._moving=!0),this.engine.cacheRects(h,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),a.type==="resizestart"){const p=this.getColumn()-$.x,c=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-$.y;u_.resizable(r,"option","minWidth",h*Math.min($.minW||1,p)).resizable(r,"option","minHeight",u*Math.min($.minH||1,c)).resizable(r,"option","maxWidth",h*Math.min($.maxW||Number.MAX_SAFE_INTEGER,p)).resizable(r,"option","maxWidthMoveLeft",h*Math.min($.maxW||Number.MAX_SAFE_INTEGER,$.x+$.w)).resizable(r,"option","maxHeight",u*Math.min($.maxH||Number.MAX_SAFE_INTEGER,c)).resizable(r,"option","maxHeightMoveUp",u*Math.min($.maxH||Number.MAX_SAFE_INTEGER,$.y+$.h))}}_dragOrResize(r,a,v,$,h,u){const i={...$._orig};let p,c=this.opts.marginLeft,n=this.opts.marginRight,k=this.opts.marginTop,T=this.opts.marginBottom;const x=Math.round(u*.1),d=Math.round(h*.1);if(c=Math.min(c,d),n=Math.min(n,d),k=Math.min(k,x),T=Math.min(T,x),a.type==="drag"){if($._temporaryRemoved)return;const l=v.position.top-$._prevYPix;$._prevYPix=v.position.top,this.opts.draggable.scroll!==!1&&ru.updateScrollPosition(r,v.position,l);const s=v.position.left+(v.position.left>$._lastUiPosition.left?-n:c),f=v.position.top+(v.position.top>$._lastUiPosition.top?-T:k);i.x=Math.round(s/h),i.y=Math.round(f/u);const g=this._extraDragRow;if(this.engine.collide($,i)){const S=this.getRow();let L=Math.max(0,i.y+$.h-S);this.opts.maxRow&&S+L>this.opts.maxRow&&(L=Math.max(0,this.opts.maxRow-S)),this._extraDragRow=L}else this._extraDragRow=0;if(this._extraDragRow!==g&&this._updateContainerHeight(),$.x===i.x&&$.y===i.y)return}else if(a.type==="resize"){if(i.x<0||(ru.updateScrollResize(a,r,u),i.w=Math.round((v.size.width-c)/h),i.h=Math.round((v.size.height-k)/u),$.w===i.w&&$.h===i.h)||$._lastTried&&$._lastTried.w===i.w&&$._lastTried.h===i.h)return;const l=v.position.left+c,s=v.position.top+k;i.x=Math.round(l/h),i.y=Math.round(s/u),p=!0}$._event=a,$._lastTried=i;const o={x:v.position.left+c,y:v.position.top+k,w:(v.size?v.size.width:$.w*h)-c-n,h:(v.size?v.size.height:$.h*u)-k-T};if(this.engine.moveNodeCheck($,{...i,cellWidth:h,cellHeight:u,rect:o,resizing:p})){$._lastUiPosition=v.position,this.engine.cacheRects(h,u,k,n,T,c),delete $._skipDown,p&&$.subGrid&&$.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const l=a.target;$._sidebarOrig||this._writePosAttr(l,$),this.triggerEvent(a,l)}}triggerEvent(r,a){let v=this;for(;v.parentGridNode;)v=v.parentGridNode.grid;v._gsEventHandler[r.type]&&v._gsEventHandler[r.type](r,a)}_leave(r,a){a=a||r;const v=a.gridstackNode;if(!v||(a.style.transform=a.style.transformOrigin=null,u_.off(r,"drag"),v._temporaryRemoved))return;v._temporaryRemoved=!0,this.engine.removeNode(v),v.el=v._isExternal&&a?a:r;const $=v._sidebarOrig;v._isExternal&&this.engine.cleanupNode(v),v._sidebarOrig=$,this.opts.removable===!0&&Rh._itemRemoving(r,!0),r._gridstackNodeOrig?(r.gridstackNode=r._gridstackNodeOrig,delete r._gridstackNodeOrig):v._isExternal&&this.engine.restoreInitial()}commit(){return tHe(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}Rh.renderCB=(e,r)=>{e&&r!=null&&r.content&&(e.textContent=r.content)},Rh.resizeToContentParent=".grid-stack-item-content",Rh.Utils=ru,Rh.Engine=P4,Rh.GDRev="12.3.2";const iHe=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1},{id:24,name:"Oportunidades de gol",isSelected:!1},{id:25,name:"Balones recuperados en cancha rival",isSelected:!1}],A4=e=>iHe.find(r=>r.id===e),R4=new Map([[9,{id:9,analysisTypes:new Map([["2-20",{analysisType:"successfulPasses",name:"Pases acertados",title:"Mapeo de pases acertados",titleShort:"Pases acertados"}],["3-21",{analysisType:"unsuccessfulPasses",name:"Pases no acertados",title:"Mapeo de pases no acertados",titleShort:"Pases no acertados"}],["222-223-224-225",{analysisType:"recoveredBalls",name:"Balones recuperados",title:"Mapeo de balones recuperados",titleShort:"Balones recuperados"}],["226-227-228-229",{analysisType:"lostBalls",name:"Balones perdidos",title:"Mapeo de balones perdidos",titleShort:"Balones perdidos"}]])}],[1,{general:"General",offensive:"Ofensivo",defensive:"Defensivo",possession:"Posesión",stoppedBall:"Balón parado",penalties:"Infracción"}]]);class Qk{constructor(r,a=[],v,$=null,h=!1,u=!1,i=null,p=null,c=null){Lw(this,"id",""),Lw(this,"childViews",[]),Lw(this,"viewId",0),Lw(this,"dynamicFilters",null),Lw(this,"componentSpecificFilters",new Map),Lw(this,"isPostMatch",!1),Lw(this,"isTemplateMode",!1),Lw(this,"filtresJSON",null),Lw(this,"token",null),Lw(this,"_isUpdating",!1),Lw(this,"filters",null),this.id=r,this.viewId=v,this.childViews=a,this.dynamicFilters=$,this.isPostMatch=h,this.isTemplateMode=u,this.filtresJSON=i,this.token=p,this.filters=c,this.componentSpecificFilters=new Map}resetClass(){this.childViews.forEach(r=>{r.view.filterAndViewsContainer=new Qk(this.id,[r],this.viewId,this.dynamicFilters,this.isPostMatch,this.isTemplateMode,this.filtresJSON,this.token,this.filters)})}hasEventTypeId(r,a){return!r||!Array.isArray(r)?!1:r.some(v=>v&&v.event_type_id===a)}hasCategoryId(r,a){return!r||!Array.isArray(r)?!1:r.some(v=>v&&v.category_id===a)}getId(){return this.id}setViewId(r){this.viewId=r}setFiltersJSON(r){this.filtresJSON=r}setDynamicFilters(r,a=null){a?this.componentSpecificFilters.set(a,[...r]):this.dynamicFilters=r}setFilters(r){this.filters=r}getComponentDynamicFilters(r){return r&&this.componentSpecificFilters.has(r)?this.componentSpecificFilters.get(r):this.dynamicFilters}getAllComponentFilters(){return this.componentSpecificFilters}debugComponentFilters(){}static debugAllComponentFilters(){}clearAllComponentFilters(){this.componentSpecificFilters.clear()}getDynamicFilters(){return this.dynamicFilters}getHomeTeamViews(){return this.childViews.filter(r=>r.view.isHomeTeam)}getAwayTeamViews(){return this.childViews.filter(r=>!r.view.isHomeTeam)}addSpecificPlays(r){if(r.view.componentProps&&this.filters){const a=this.filters.selectedTeam.value;if(console.log("teamSelected: ",a),a===3){console.log("this.getHomeTeamViews(): ",this.getHomeTeamViews()),console.log("this.getAwayTeamViews(): ",this.getAwayTeamViews());const v=this.getHomeTeamViews().length,$=this.getAwayTeamViews().length;v===0&&$>0&&this.getAwayTeamViews().forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=!0,h.view.isHomeTeam=!0,h.view.filterMultiple&&(h.view.filterMultiple.isHomeTeam=!0)}),v<this.filters.howManyCorners?this.childViews.length===0?(r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.componentProps.howManyCorners=this.filters.howManyCorners,r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}):this.childViews.reduce((h,u,i,p)=>{let c={isAgainstMode:u.view.isAgainstMode,advancedFilters:u.view.componentProps.advancedFilters,isHomeTeamForAnalysis:u.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:u.view.isHomeTeam};return h&&(h.isHomeTeam&&!u.view.isHomeTeam?(u.view.componentProps.isAgainstMode=this.filters.isAgainstMode,u.view.componentProps.advancedFilters=this.filters.advancedFilters,u.view.componentProps.isHomeTeamForAnalysis=!0,u.view.isHomeTeam=!0,u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}):!h.isHomeTeam&&!u.view.isHomeTeam&&(u.view.componentProps.isAgainstMode=h.isAgainstMode,u.view.componentProps.advancedFilters=h.advancedFilters,u.view.componentProps.isHomeTeamForAnalysis=h.isHomeTeamForAnalysis,u.view.isHomeTeam=h.isHomeTeam,u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam,selectedCategory:u.view.componentProps.categories[0],advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}),i===p.length-1&&(r.view.componentProps.advancedFilters=c.advancedFilters,r.view.componentProps.isAgainstMode=c.isAgainstMode,r.view.componentProps.isHomeTeamForAnalysis=c.isHomeTeamForAnalysis,r.view.isHomeTeam=c.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode})),c},null):(r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode})}else{const v=a===1;r.view.componentProps.isHomeTeamForAnalysis=v,r.view.isHomeTeam=v,r.view.componentProps.advancedFilters=this.filters.advancedFilters,r.view.componentProps.isAgainstMode=this.filters.isAgainstMode,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:this.filters.advancedFilters,howManyCorners:this.filters.howManyCorners,isAgainstMode:this.filters.isAgainstMode}}}console.log("++++++++++++++++++++++++++++++++++++++++++++++++++++++"),console.log("view: ",r)}addLastTouch(r){if(r.view.componentProps&&this.filters){let a=null;const v=this.filters.selectedCategories.map(h=>h.value),$=this.filters.selectedTeam.value;if($===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(p=>{p.view.componentProps.isHomeTeamForAnalysis=!0,p.view.isHomeTeam=!0,p.view.filterMultiple&&(p.view.filterMultiple.isHomeTeam=!0)});const h=this.getHomeTeamViews(),u=this.getAwayTeamViews();let i=!0;for(let p=0;p<v.length;p++){a=v[p];const c=h.find(k=>k.view.componentProps.categories[0].name===a.name),n=u.find(k=>k.view.componentProps.categories[0].name===a.name);if(!c||!n){i=!c;break}}i?this.childViews.length===0?(r.view.componentProps.categories=[a],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=a.name,r.view.titleShort=a.name,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}):this.childViews.reduce((p,c,n,k)=>{let T={categories:c.view.componentProps.categories,analysisType:c.view.componentProps.analysisType,isAssistZoneVisible:this.filters.isAssistZoneVisible,howManyGames:this.filters.howManyGamesSelected.value,title:c.view.title,isHomeTeamForAnalysis:c.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:c.view.isHomeTeam};return p&&(p.isHomeTeam&&!c.view.isHomeTeam?(c.view.componentProps.categories=[a],c.view.componentProps.analysisType=this.filters.selectedGamePhase.name,c.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,c.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,c.view.componentProps.isHomeTeamForAnalysis=!0,c.view.title=a.name,r.view.titleShort=a.name,c.view.isHomeTeam=!0,c.view.filterMultiple={isHomeTeam:c.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}):!p.isHomeTeam&&!c.view.isHomeTeam&&(c.view.componentProps.categories=p.categories,c.view.componentProps.analysisType=p.analysisType,c.view.componentProps.isHomeTeamForAnalysis=p.isHomeTeamForAnalysis,c.view.componentProps.isAssistZoneVisible=p.isAssistZoneVisible,c.view.componentProps.howManyGames=p.howManyGames,c.view.title=p.title,c.view.titleShort=p.titleShort,c.view.isHomeTeam=p.isHomeTeam,c.view.filterMultiple={isHomeTeam:c.view.isHomeTeam,selectedCategory:c.view.componentProps.categories[0],selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible}),n===k.length-1&&(r.view.componentProps.categories=T.categories,r.view.componentProps.analysisType=T.analysisType,r.view.componentProps.isHomeTeamForAnalysis=T.isHomeTeamForAnalysis,r.view.componentProps.isAssistZoneVisible=T.isAssistZoneVisible,r.view.componentProps.howManyGames=T.howManyGames,r.view.title=T.title,r.view.titleShort=T.titleShort,r.view.isHomeTeam=T.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:r.view.componentProps.categories[0],selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible})),T},null):(r.view.componentProps.categories=[a],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=a.name,r.view.titleShort=a.name,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:a,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible})}else{const h=$===1,u=h?this.getHomeTeamViews():this.getAwayTeamViews();r.view.componentProps.isHomeTeamForAnalysis=h,r.view.isHomeTeam=h;for(let i=0;i<v.length;i++){const p=v[i];if(!u.find(c=>c.view.componentProps.categories[0].name===p.name)){r.view.componentProps.categories=[p],r.view.componentProps.analysisType=this.filters.selectedGamePhase.name,r.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,r.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,r.view.title=p.name,r.view.titleShort=p.name,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:p,selectedGamePhase:this.filters.selectedGamePhase,howManyGamesSelected:this.filters.howManyGamesSelected,isAssistZoneVisible:this.filters.isAssistZoneVisible};break}}}}}addView(r,a=!1){var v,$,h,u,i,p,c,n,k,T;if(r.view.filterAndViewsContainer=this,Sd.emit("component-added-to-container",this),this.viewId===5&&r.view.componentProps&&!a&&(r.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,r.view.filterMultiple={isHomeTeam:r.view.componentProps.preMatchType===1}),this.viewId===15&&r.view.componentProps&&!a&&(r.view.componentProps.preMatchType=this.dynamicFilters[0]!==3&&this.dynamicFilters[0]||1,r.view.filterMultiple={isHomeTeam:r.view.componentProps.preMatchType===1}),this.viewId===17&&r.view.componentProps&&!a){this.dynamicFilters[0]!==void 0&&(r.view.componentProps.infavoragainstteam=!this.dynamicFilters[0]),this.dynamicFilters[1]!==void 0&&(r.view.componentProps.lateralidad=this.dynamicFilters[1]===32?"right":"left");const x=this.dynamicFilters[2]!==void 0?this.dynamicFilters[2]:this.dynamicFilters[0]||1,d=r.view.componentProps.game;if(x===3){const o=this.childViews.filter(l=>{var s;return((s=l.view.filterMultiple)==null?void 0:s.isHomeTeam)===!0}).length===0;d&&(r.view.componentProps.teamselected=o?d.home_team:d.away_team),r.view.filterMultiple={isHomeTeam:o}}else d&&(r.view.componentProps.teamselected=x===2?d.away_team:d.home_team),r.view.filterMultiple={isHomeTeam:x===1}}if(this.viewId===10&&r.view.componentProps&&!a&&(r.view.componentProps.isHomeTeamForAnalysis=this.dynamicFilters[0]!==3?this.dynamicFilters[0]===1:1,r.isHomeTeam=r.view.componentProps.isHomeTeamForAnalysis,r.view.filterMultiple={isHomeTeam:r.view.componentProps.isHomeTeamForAnalysis},r.view.filtersJSON=this.filtresJSON),this.viewId===7&&r.view.componentProps&&!a){const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d[0]===1?"offensive":"defensive",l=d[1]===1;r.view.componentProps.analysisType=o,r.view.componentProps.isHomeTeamForAnalysis=l,r.isHomeTeam=l,r.view.filterMultiple={isHomeTeam:l},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===1&&r.view.componentProps&&!a){const x=this.dynamicFilters[0]||[];if(x&&x.length>0){let d;if(Array.isArray(x)){const l=this.childViews.map(f=>{var g;return(g=f.view.componentProps)==null?void 0:g.type}).filter(f=>f!==void 0),s=x.filter(f=>!l.includes(f));s.length>0?d=s[0]:d=x[0]}else d=x;const o=R4.get(this.viewId);r.view.componentProps.type=d,r.view.componentProps.default=!1,r.view.title=`Comparativa ${o[d]}`,r.view.filterMultiple={category:d}}}if(this.viewId===9&&r.view.componentProps&&!a){const x=this.dynamicFilters[0].map(s=>s.join("-"));let d="";const o=this.dynamicFilters[1],l=R4.get(this.viewId);if(o===3){this.getHomeTeamViews().length===0&&this.getAwayTeamViews().length>0&&this.getAwayTeamViews().forEach(L=>{L.view.componentProps.isHomeTeamForAnalysis=!0,L.view.isHomeTeam=!0,L.view.filterMultiple&&(L.view.filterMultiple.isHomeTeam=!0)});let s=null;const f=this.getHomeTeamViews(),g=this.getAwayTeamViews();let S=!0;for(let L=0;L<x.length;L++){d=x[L],s=l.analysisTypes.get(x[L]);const M=f.find(z=>z.view.componentProps.analysisType===s.analysisType),A=g.find(z=>z.view.componentProps.analysisType===s.analysisType);if(!M||!A){S=!M;break}}S?this.childViews.length===0?(r.view.componentProps.analysisType=s.analysisType,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.title=s.title,r.view.titleShort=s.titleShort,r.view.isHomeTeam=!0,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(L=>parseInt(L))}):this.childViews.reduce((L,M,A,z)=>{let I={analysisType:M.view.componentProps.analysisType,title:M.view.title,isHomeTeamForAnalysis:M.view.componentProps.isHomeTeamForAnalysis,isHomeTeam:M.view.isHomeTeam};return L&&(L.isHomeTeam&&!M.view.isHomeTeam?(M.view.componentProps.analysisType=s.analysisType,M.view.componentProps.isHomeTeamForAnalysis=!0,M.view.title=s.title,r.view.titleShort=s.titleShort,M.view.isHomeTeam=!0,M.view.filterMultiple={isHomeTeam:M.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))}):!L.isHomeTeam&&!M.view.isHomeTeam&&(M.view.componentProps.analysisType=L.analysisType,M.view.componentProps.isHomeTeamForAnalysis=L.isHomeTeamForAnalysis,M.view.title=L.title,M.view.titleShort=L.titleShort,M.view.isHomeTeam=L.isHomeTeam,M.view.filterMultiple={isHomeTeam:M.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))}),A===z.length-1&&(r.view.componentProps.analysisType=I.analysisType,r.view.componentProps.isHomeTeamForAnalysis=I.isHomeTeamForAnalysis,r.view.title=I.title,r.view.titleShort=I.titleShort,r.view.isHomeTeam=I.isHomeTeam,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(j=>parseInt(j))})),I},null):(r.view.componentProps.analysisType=s.analysisType,r.view.componentProps.isHomeTeamForAnalysis=!1,r.view.title=s.title,r.view.titleShort=s.titleShort,r.view.isHomeTeam=!1,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,categoryIds:d.split("-").map(L=>parseInt(L))})}else{const s=o===1,f=s?this.getHomeTeamViews():this.getAwayTeamViews();r.view.componentProps.isHomeTeamForAnalysis=s,r.view.isHomeTeam=s;for(let g=0;g<x.length;g++){const S=l.analysisTypes.get(x[g]);if(!f.find(L=>L.view.componentProps.analysisType===S.analysisType)){r.view.componentProps.analysisType=S.analysisType,r.view.title=S.title,r.view.titleShort=S.titleShort,r.view.filterMultiple={categoryIds:x[g].split("-").map(L=>parseInt(L)),isHomeTeam:r.view.isHomeTeam};break}}}}if(this.viewId===2&&!a&&r.view.componentProps){const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id),r.view.componentProps.game&&(r.view.componentProps.gameid=r.view.componentProps.game.id,r.view.componentProps.season=r.view.componentProps.game.season_id,r.view.componentProps.teamView=d[1]===2?r.view.componentProps.game.awayTeam.team_id:d[1]===1?r.view.componentProps.game.homeTeam.team_id:0);const o=this.dynamicFilters[0]||[];let l=null;if(Array.isArray(o)){if(o.length>0){const g=this.childViews.map(L=>{var M;const A=(M=L.view.componentProps)==null?void 0:M.categoryView;return A&&A.length>0?A[0].id:null}).filter(L=>L!==null),S=o.filter(L=>!g.includes(L));S.length>0&&(l=S[0])}}else{const g=o;g&&(this.childViews.find(S=>{var L;const M=(L=S.view.componentProps)==null?void 0:L.categoryView;return M&&M.length>0&&M[0].id===g})||(l=g))}let s=null;if(l)try{s=A4(l)}catch{}const f=d&&d.length>1?d[1]:1;r.view.filterMultiple={categoryId:l,teamType:f},r.view.componentProps.categoryView=s?[{id:l,name:s.name}]:l?[{id:l,name:`Category ${l}`}]:[{id:0,name:"Category"}]}if(this.viewId===8&&r.view.componentProps&&!a&&r.view.game&&(r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0),r.view.componentProps.areInactiveVisible=this.dynamicFilters[0]||!1,r.view.componentProps.game=(v=r.view)==null?void 0:v.game,r.view.componentProps.teamSelected={teamId:(h=($=r.view)==null?void 0:$.game)==null?void 0:h.home_team},r.view.componentProps.isDefault=!1,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:this.dynamicFilters})),this.viewId===13&&r.view.componentProps&&!a&&(r.view.componentProps.isdefault=!0,r.view.componentProps.seasonid=2010,r.view.teamids=[1,2],r.view.componentProps.categoryids=[20,2],r.view.componentProps.teamsshow=[1,2],r.view.componentProps.analysistype=1,r.view.componentProps.gameid="",r.view.componentProps.teams=[],r.view.componentProps.game=""),this.viewId===15&&r.view.componentProps&&!a&&(r.view.componentProps.isdefault=!0,r.view.componentProps.view=1,r.view.numitems=3,r.view.typegame=1,r.view.componentProps.token=this.token,r.view.componentProps.data={season:2010,type:2,team:14}),this.viewId===17&&r.view.componentProps&&!a&&(console.log("6666666666666666666666666666 ddddddddddddddd LLEGO AQUI MERO ESTE COMPOENNETE ES: ---->>>> ",r.view.componentProps),r.view.componentProps.forseason=!1,r.view.componentProps.forteam=!0,r.view.componentProps.tournamentselected={id:1},r.view.componentProps.forgame=!1,r.view.componentProps.filters={},r.view.componentProps.showBallGo=!0,r.view.componentProps.showHeatMap=!0,r.view.componentProps.ballOnOff=!1,r.view.componentProps.showdefault=!0),this.viewId===14&&r.view.componentProps&&!a&&(r.view.componentProps.isReports=!0,r.view.componentProps.isDefault=!0,r.view.componentProps.type=0,r.view.componentProps.typeView=1,r.view.componentProps.showVideos=!1,r.view.componentProps.currentSeason=2010,r.view.componentProps.localTeam=2,r.view.componentProps.awayTeam=1),this.viewId===6&&r.view.componentProps&&!a){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d&&d.length>0?d[0]:[];if(o&&o.length>0){let l=0;for(const s of o)if(!this.childViews.find(f=>f.view.componentProps.gameNumber===s)){l=s;break}l&&(r.view.componentProps.gameNumber=l,r.view.filterMultiple={gameNumber:l})}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===3&&r.view.componentProps&&!a&&r.view.game){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const x=this.getComponentDynamicFilters(r.view.id),d=x||this.dynamicFilters;!x&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const o=d&&d.length>0?d[0]:!1;r.view.componentProps.desplegable=o,r.view.componentProps.key=o,r.view.componentProps.game=(u=r.view)==null?void 0:u.game,r.view.componentProps.defaultShields=!1,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:d})}if(this.viewId===4&&r.view.componentProps&&!a&&r.view.game){if(r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0),this.isPostMatch){r.view.componentProps.key=!1,r.view.componentProps.isDefault=!1,r.view.componentProps.token=this.token,r.view.componentProps.gameId=(p=(i=r.view)==null?void 0:i.game)==null?void 0:p.game_id,r.view.componentProps.homeTeam=(n=(c=r.view)==null?void 0:c.game)==null?void 0:n.home_team,r.view.componentProps.awayTeam=(T=(k=r.view)==null?void 0:k.game)==null?void 0:T.visiting_team;const o=this.getComponentDynamicFilters(r.view.id),l=o||this.dynamicFilters;!o&&this.dynamicFilters&&this.dynamicFilters.length>0&&this.setDynamicFilters(this.dynamicFilters,r.view.id);const s=l&&l.length>0?l[0]:[],f=this.hasEventTypeId(s,1),g=this.hasCategoryId(s,8),S=this.hasCategoryId(s,9),L=this.hasEventTypeId(s,3);r.view.componentProps.goals=f,r.view.componentProps.yellowCards=g,r.view.componentProps.redCards=S,r.view.componentProps.substitutions=L}const x=this.getComponentDynamicFilters(r.view.id)||this.dynamicFilters,d=x&&x.length>0?x[0]:[];r.view.componentProps.selectedEvents=d,r.view.componentProps.key=d.length>0,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:x})}this.viewId===16&&this.addLastTouch(r),this.viewId===18&&this.addSpecificPlays(r),this.childViews.push(r),Sd.emit("view-added")}getHowManyViewsToAdd(r,a=null){if(this.viewId===5||this.viewId===14||this.viewId===13||this.viewId===15)return 1;if(this.viewId===6){const v=r[0];return v===2||v===3?v:1}if(this.viewId===4)return r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0?1:0;if(this.viewId===9){const v=r[0],$=r[1];if($===1||$===2){const h=$===1?this.getHomeTeamViews():this.getAwayTeamViews();return v.length-h.length}else return v*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===16&&a){const v=a.selectedCategories||[],$=a.selectedTeam.value;if($===1||$===2){const h=$===1?this.getHomeTeamViews():this.getAwayTeamViews();return v.length-h.length}else return v.length*2-(this.getHomeTeamViews().length+this.getAwayTeamViews().length)}if(this.viewId===2){const v=r[0]||[],$=r[1]||1;if(!v||v.length===0)return 0;if(Array.isArray(v)){const h=this.childViews.map(u=>{var i;const p=(i=u.view.componentProps)==null?void 0:i.categoryView;return p&&p.length>0?p[0].id:null}).filter(u=>u!==null);return v.filter(u=>!h.includes(u)).length}else{const h=v;return this.childViews.find(u=>{var i,p;const c=(i=u.view.componentProps)==null?void 0:i.categoryView,n=((p=u.view.filterMultiple)==null?void 0:p.teamType)||1;return c&&c.length>0&&c[0].id===h&&n===$})?0:1}}if(this.viewId===1){const v=r[0]||[];if(!v||v.length===0)return 0;if(Array.isArray(v)){const $=this.childViews.map(h=>{var u;return(u=h.view.componentProps)==null?void 0:u.type}).filter(h=>h!==void 0);return v.filter(h=>!$.includes(h)).length}else{const $=v;return this.childViews.find(h=>{var u;return((u=h.view.componentProps)==null?void 0:u.type)===$})?0:1}}return 0}getRequiresAddView(r,a){if(console.log("getRequiresAddView - viewId:",this.viewId),console.log("filters:",a),this.viewId===5)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===15)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===17){const v=r[2]||1,$=r[2];return v===3||$===3?this.childViews.length<2:this.childViews.length===0}if(this.viewId===10)return r[0]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===7)return r[1]===3?this.childViews.length<2:this.childViews.length===0;if(this.viewId===6){const v=r[0];return v?v.length>this.childViews.length:this.childViews.length===0}if(this.viewId===4){const v=r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0;return this.childViews.length===0&&v}if(this.viewId===9)return this.getRequiresAddViewMultipleAndBothTeams(r);if(this.viewId===16&&a){const v=[a.selectedCategories,a.selectedTeam.value];return this.getRequiresAddViewMultipleAndBothTeams(v,a.totalCategoriesSelected)}if(this.viewId===18&&a){console.log("getRequiresAddView - GSCShotMapAnalysis"),console.log("dynamicFilters:",r),console.log("filters:",a);const v=[a.howManyCorners,a.selectedTeam.value],$=this.getRequiresAddViewMultipleAndBothTeams(v,a.howManyCorners);return console.count("before aux18 return"),console.log("aux18:",$),$}if(this.viewId===1){const v=r[0]||[];if(!v||v.length===0)return!1;if(Array.isArray(v)){const $=this.childViews.map(h=>{var u;return(u=h.view.componentProps)==null?void 0:u.type}).filter(h=>h!==void 0);return v.filter(h=>!$.includes(h)).length>0}else{const $=v;return!this.childViews.find(h=>{var u;return((u=h.view.componentProps)==null?void 0:u.type)===$})}}if(this.viewId===2){const v=r[0]||[];if(Array.isArray(v)){if(v.length>0){const $=this.childViews.map(h=>{var u;const i=(u=h.view.componentProps)==null?void 0:u.categoryView;return i&&i.length>0?i[0].id:null}).filter(h=>h!==null);return v.filter(h=>!$.includes(h)).length>0}return!1}else{const $=v,h=r[1]||1;return $?!this.childViews.find(u=>{var i,p;const c=(i=u.view.componentProps)==null?void 0:i.categoryView,n=((p=u.view.filterMultiple)==null?void 0:p.teamType)||1;return c&&c.length>0&&c[0].id===$&&n===h}):!1}}return this.viewId===8||this.viewId===3||this.viewId===14?this.childViews.length===0:!1}getRequiresAddViewMultipleAndBothTeams(r,a=null){const v=this.childViews.filter(c=>c.view.isHomeTeam),$=this.childViews.filter(c=>!c.view.isHomeTeam),h=a||r[0].length,u=r[1],i=h*(u===1||u===2?1:2),p=u===3?v.length+$.length:v.length||$.length;return i>p}getRequiresLessViews(r){if(this.viewId===5)return r[0]!==3&&this.childViews.length>1;if(this.viewId===15)return r[0]!==3&&this.childViews.length>1;if(this.viewId===17)return r[0]!==3&&this.childViews.length>1;if(this.viewId===6){const a=r[0];return a===2||a===3}return this.viewId,!1}updateSummary({dynamicFilters:r}){const a=this.childViews[0],v=document.querySelector(`[gs-id="${a.view.id}"]`),$=a.grid;if(a&&v&&$){const h=r[0],u=`min_column${h?"_2":""}`,i=`min_row${h?"_2":""}`,p=`max_column${h?"_2":""}`,c=`max_row${h?"_2":""}`,n=`colspan${h?"_2":""}`,k=`rowspan${h?"_2":""}`,T=a.view.coreView[n],x=a.view.coreView[k],d=a.view.coreView[u],o=a.view.coreView[i],l=a.view.coreView[p],s=a.view.coreView[c];a.view.w=T,a.view.h=x,a.view.maxWidth=l,a.view.maxHeight=s,a.view.minWidth=d,a.view.minHeight=o,v.setAttribute("gs-w",T),v.setAttribute("gs-h",x),v.setAttribute("gs-max-w",l),v.setAttribute("gs-max-h",s),v.setAttribute("gs-min-w",d),v.setAttribute("gs-min-h",o),$.update(v,{h:x,w:T,"gs-max-h":s,"gs-max-w":l,"gs-min-h":o,"gs-min-w":d})}}updateFilters(r){this.filters=r,this.viewId===16?this.updateLastTouchFilters(r):this.viewId===18&&this.updateSpecificPlaysFilters(r)}updateDynamicFilters(r,a=null){var v,$;if(!this._isUpdating){this._isUpdating=!0,a?this.componentSpecificFilters.set(a,[...r]):this.dynamicFilters=r,Sd.emit("component-added-to-container",this);try{if(this.viewId===5){const h=r[0]||1;if(h<3)if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:u.view.componentProps.preMatchType===1})}else{const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const k=p.items.findIndex(T=>T.id===u.view.id);k!==-1&&p.items.splice(k,1)}const n=this.childViews[0];n.view.componentProps&&(n.view.componentProps.preMatchType=h,n.view.filterMultiple={isHomeTeam:n.view.componentProps.preMatchType})}else this.childViews.forEach((u,i)=>{u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:u.view.componentProps.preMatchType}})}if(this.viewId===15){const h=r[0]||1;if(a){const u=this.childViews.find(i=>i.view.id===a);u&&u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}else if(h<3){if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}else if(this.childViews.length>1){for(;this.childViews.length>1;){const i=this.childViews.pop(),p=i.grid,c=i.page,n=document.querySelector(`[gs-id="${i.view.id}"]`);if(p&&n&&(p.removeWidget(n),c)){const k=c.items.findIndex(T=>T.id===i.view.id);k!==-1&&c.items.splice(k,1)}}const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.preMatchType=h,u.view.filterMultiple={isHomeTeam:h===1})}}else if(this.childViews.length===2)this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})});else if(this.childViews.length<2)this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})});else{for(;this.childViews.length>2;){const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const n=p.items.findIndex(k=>k.id===u.view.id);n!==-1&&p.items.splice(n,1)}}this.childViews.forEach((u,i)=>{u.view.componentProps&&(u.view.componentProps.preMatchType=i+1,u.view.filterMultiple={isHomeTeam:i===0})})}}if(this.viewId===17){const h=r[0]||1,u=r[2],i=h===3||u===3;if(a){const p=this.childViews.find(c=>c.view.id===a);if(p&&p.view.componentProps&&(r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left"),r[2]!==void 0)){const c=r[2],n=p.view.componentProps.game;if(c===3){if(((v=p.view.filterMultiple)==null?void 0:v.isHomeTeam)!==void 0){const k=p.view.filterMultiple.isHomeTeam;n&&(p.view.componentProps.teamselected=(typeof k=="boolean"?k:k===1)?n.home_team:n.away_team)}}else n&&(p.view.componentProps.teamselected=c===2?n.away_team:n.home_team);p.view.filterMultiple={isHomeTeam:c===1||c===3&&(($=p.view.filterMultiple)==null?void 0:$.isHomeTeam)}}}else if(i)if(this.childViews.length===2)this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})});else if(this.childViews.length<2)this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})});else{for(;this.childViews.length>2;){const p=this.childViews.pop(),c=p.grid,n=p.page,k=document.querySelector(`[gs-id="${p.view.id}"]`);if(c&&k&&(c.removeWidget(k),n)){const T=n.items.findIndex(x=>x.id===p.view.id);T!==-1&&n.items.splice(T,1)}}this.childViews.forEach((p,c)=>{p.view.componentProps&&(p.view.componentProps.teamselected=c+1,p.view.filterMultiple={isHomeTeam:c===0})})}else if(this.childViews.length===1){const p=this.childViews[0];if(p.view.componentProps){r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left");const c=p.view.componentProps.game;if(r[2]!==void 0&&c){const n=r[2];p.view.componentProps.teamselected=n===2?c.away_team:c.home_team}p.view.filterMultiple={isHomeTeam:h===1}}}else if(this.childViews.length>1){for(;this.childViews.length>1;){const c=this.childViews.pop(),n=c.grid,k=c.page,T=document.querySelector(`[gs-id="${c.view.id}"]`);if(n&&T&&(n.removeWidget(T),k)){const x=k.items.findIndex(d=>d.id===c.view.id);x!==-1&&k.items.splice(x,1)}}const p=this.childViews[0];if(p.view.componentProps){r[0]!==void 0&&(p.view.componentProps.infavoragainstteam=!r[0]),r[1]!==void 0&&(p.view.componentProps.lateralidad=r[1]===32?"right":"left");const c=p.view.componentProps.game;if(r[2]!==void 0&&c){const n=r[2];p.view.componentProps.teamselected=n===2?c.away_team:c.home_team}p.view.filterMultiple={isHomeTeam:h===1}}}}if(this.viewId===10){const h=r[0]||1;if(h<3)if(this.childViews.length===1){const u=this.childViews[0];u.view.componentProps&&(u.view.componentProps.isHomeTeamForAnalysis=h===1,u.view.filterMultiple={isHomeTeam:u.view.componentProps.isHomeTeamForAnalysis})}else{const u=this.childViews.pop(),i=u.grid,p=u.page,c=document.querySelector(`[gs-id="${u.view.id}"]`);if(i&&c&&(i.removeWidget(c),p)){const k=p.items.findIndex(T=>T.id===u.view.id);k!==-1&&p.items.splice(k,1)}const n=this.childViews[0];n.view.componentProps&&(n.view.componentProps.isHomeTeamForAnalysis=h===1,n.view.filterMultiple={isHomeTeam:n.view.componentProps.isHomeTeamForAnalysis})}else this.childViews.forEach((u,i)=>{u.view.componentProps.isHomeTeamForAnalysis=i%2===0,u.view.filterMultiple={isHomeTeam:u.view.componentProps.isHomeTeamForAnalysis}})}if(this.viewId===7){const h=r[1];if(h===3)this.childViews.forEach((u,i)=>{u.view.componentProps.isHomeTeamForAnalysis=i%2===0,u.view.isHomeTeam=i%2===0,u.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",u.view.filterMultiple={isHomeTeam:u.view.isHomeTeam}});else{const u=h===1;if(this.childViews.length>0){const i=this.childViews[0];i.view.componentProps.isHomeTeamForAnalysis=u,i.view.isHomeTeam=u,i.view.componentProps.analysisType=this.dynamicFilters[0]===1?"offensive":"defensive",i.view.filterMultiple={isHomeTeam:u},this.childViews.length>1&&this.removeChildView(this.childViews[1])}}}if(this.viewId===9){const h=r[0],u=r[1];if(u===3){if(this.childViews.length>h.length){const i=h.map(p=>{const c=p.join("-");return R4.get(this.viewId).analysisTypes.get(c).analysisType});this.childViews.reduce((p,c)=>(i.includes(c.view.componentProps.analysisType)||p.push(c.view.componentProps.analysisType),p),[]).forEach(p=>{const c=this.childViews.findIndex(n=>n.view.componentProps.analysisType===p);if(c!==-1){const n=this.childViews[c];this.removeChildView(n)}})}}else{const i=u===1,p=this.getHomeTeamViews(),c=this.getAwayTeamViews();if(i&&p.length===0)c.forEach(n=>{n.view.componentProps.isHomeTeamForAnalysis=i,n.view.isHomeTeam=i,n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}});else if(!i&&c.length===0)p.forEach(n=>{n.view.componentProps.isHomeTeamForAnalysis=i,n.view.isHomeTeam=i,n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}});else if(p.length===c.length)i||p.forEach(n=>{n.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}}),(i?c:p).forEach(n=>{this.removeChildView(n)});else{const n=i?this.getHomeTeamViews():this.getAwayTeamViews();if(n.length>h.length){const k=h.map(T=>{const x=T.join("-");return R4.get(this.viewId).analysisTypes.get(x).analysisType});n.forEach(T=>{k.includes(T.view.componentProps.analysisType)?T.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}:this.removeChildView(T)})}else n.forEach(k=>{k.view.filterMultiple={categoryIds:h[0],isHomeTeam:i}})}}}if(this.viewId===2){const h=r[0]||[];if(Array.isArray(h)){const u=this.childViews.map(i=>{var p,c;const n=(p=i.view.componentProps)==null?void 0:p.categoryView,k=((c=i.view.filterMultiple)==null?void 0:c.teamType)||1,T=n&&n.length>0?n[0].id:null;return T?{categoryId:T,teamType:k,viewId:i.view.id}:null}).filter(i=>i!==null);if(a){const i=this.childViews.find(p=>p.view.id===a);if(i){const p=r[1]||1,c=h[0];if(c){let n=null;try{n=A4(c)}catch{}i.view.filterMultiple={categoryId:c,teamType:p},i.view.componentProps.game&&(p===1?i.view.componentProps.teamView=i.view.componentProps.game.homeTeam.team_id:p===2?i.view.componentProps.teamView=i.view.componentProps.game.awayTeam.team_id:i.view.componentProps.teamView=0),i.view.componentProps.categoryView=n?[{id:c,name:n.name}]:[{id:c,name:`Category ${c}`}]}}}if(!a){const i=r[1]||1;this.childViews.forEach(p=>{var c;const n=(c=p.view.componentProps)==null?void 0:c.categoryView;if(n&&n.length>0){const k=n[0].id;h.includes(k)&&(p.view.filterMultiple={categoryId:k,teamType:i})}})}if(u.map(i=>i.categoryId).filter(i=>!h.includes(i)).forEach(i=>{this.childViews.filter(p=>{var c;const n=(c=p.view.componentProps)==null?void 0:c.categoryView;return n&&n.length>0&&n[0].id===i}).forEach(p=>{this.removeChildView(p),Sd.emit("component-removed",{viewId:p.view.id,categoryId:i})})}),a){const i=h[0];if(i){const p=this.childViews.find(c=>c.view.id===a);if(p){let c=null;try{c=A4(i)}catch{}const n=r[1]||1;p.view.filterMultiple={categoryId:i,teamType:n},p.view.componentProps.game&&(p.view.componentProps.teamView=n===2?p.view.componentProps.game.awayTeam.team_id:n===1?p.view.componentProps.game.homeTeam.team_id:0),p.view.componentProps.categoryView=c?[{id:i,name:c.name}]:[{id:i,name:`Category ${i}`}]}}}}else{const u=h;if(u&&a){const i=this.childViews.find(p=>p.view.id===a);if(i){let p=null;try{p=A4(u)}catch{}const c=r[1]||1;i.view.filterMultiple={categoryId:u,teamType:c},i.view.componentProps.game&&(i.view.componentProps.teamView=c===2?i.view.componentProps.game.awayTeam.team_id:c===1?i.view.componentProps.game.homeTeam.team_id:0),i.view.componentProps.categoryView=p?[{id:u,name:p.name}]:[{id:u,name:`Category ${u}`}]}}}}if(this.viewId===8){const h=r[0]||!1;this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.areInactiveVisible=h,u.view.componentProps.key=h,Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}if(this.viewId===1){const h=r[0]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&this.updateComparative(u,r)}else if(this.childViews.reduce((u,i)=>(h.includes(i.view.componentProps.type)||u.push(i.view.componentProps.type),u),[]).forEach(u=>{const i=this.childViews.findIndex(p=>p.view.componentProps.type===u);if(i!==-1){for(let p=i;p<this.childViews.length;p++){const c=this.childViews[p+1],n=this.childViews[p];c&&(n.view.componentProps.type=c.view.componentProps.type,n.view.title=c.view.title)}this.removeChildView(this.childViews[this.childViews.length-1])}}),Array.isArray(h))this.childViews.length>0&&h.length>0&&this.childViews.forEach((u,i)=>{if(u.view.componentProps&&i<h.length){const p=h[i],c=R4.get(this.viewId);u.view.componentProps.type=p,u.view.componentProps.default=!1,u.view.title=`Comparativa ${c[p]}`,u.view.filterMultiple={category:p}}});else{const u=h;if(u&&this.childViews.length>0){const i=this.childViews[0];if(i.view.componentProps){const p=R4.get(this.viewId);i.view.componentProps.type=u,i.view.componentProps.default=!1,i.view.title=`Comparativa ${p[u]}`,i.view.filterMultiple={category:u}}}}}if(this.viewId===6){const h=r[0]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&this.updateGSCLineupsReports(u,r)}else{if(Array.isArray(h))if(h.length===0)for(;this.childViews.length>0;)this.removeChildView(this.childViews[0]);else this.childViews.reduce((u,i)=>(h.includes(i.view.componentProps.gameNumber)||u.push(i.view.componentProps.gameNumber),u),[]).forEach(u=>{const i=this.childViews.findIndex(p=>p.view.componentProps.gameNumber===u);if(i!==-1){for(let p=i;p<this.childViews.length;p++){const c=this.childViews[p+1],n=this.childViews[p];c&&(n.view.componentProps.gameNumber=c.view.componentProps.gameNumber,n.view.filterMultiple={gameNumber:c.view.componentProps.gameNumber})}this.removeChildView(this.childViews[this.childViews.length-1])}});this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}}if(this.viewId===3){if(a){this.setDynamicFilters(r,a);const h=this.childViews.find(u=>u.view.id===a);h&&this.updateMatchSummary(h,r)}else{const h=r[0]||!1;this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.desplegable=h,u.view.componentProps.key=h,Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}this.updateSummary({dynamicFilters:r})}if(this.viewId===13){const h=r[1]||[];if(a){this.setDynamicFilters(r,a);const u=this.childViews.find(i=>i.view.id===a);u&&(u.view.componentProps&&(u.view.componentProps.categoryids=h,u.view.componentProps.analysistype=r[0]||1,u.view.componentProps.teamsshow=r[2]==1?[1]:r[2]==2?[2]:[1,2],u.view.dynamicFilters=r,u.view._updateKey=Date.now()),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))}else this.childViews.forEach(u=>{u.view.componentProps&&(u.view.componentProps._isReactive||(u.view.componentProps=t.reactive(u.view.componentProps),u.view.componentProps._isReactive=!0),u.view.componentProps.categoryids=h,u.view.componentProps.analysistype=r[0]||1,u.view.componentProps.teamsshow=r[2]==1?[1]:r[2]==2?[2]:[1,2],u.view.dynamicFilters=r,u.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:u.view.id,componentProps:u.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:u.view.id,dynamicFilters:r}))})}else if(this.viewId===15){const h=r[0]||1,u=r[3]!==void 0?r[3]:typeof r[1]=="number"?r[1]:null;if(a){this.setDynamicFilters(r,a);const i=this.childViews.find(p=>p.view.id===a);i&&i.view.componentProps&&(i.view.componentProps.analysistype=h,u!==null&&(i.view.componentProps.numitems=u),i.view.dynamicFilters=r,i.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:i.view.id,componentProps:i.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:i.view.id,dynamicFilters:r}))}else this.childViews.forEach(i=>{i.view.componentProps&&(i.view.componentProps._isReactive||(i.view.componentProps=t.reactive(i.view.componentProps),i.view.componentProps._isReactive=!0),i.view.componentProps.analysistype=h,u!==null&&(i.view.componentProps.numitems=u),i.view.dynamicFilters=r,i.view._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:i.view.id,componentProps:i.view.componentProps,dynamicFilters:r}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:i.view.id,dynamicFilters:r}))})}if(this.viewId===4){const h=r&&r.length>0&&Array.isArray(r[0])&&r[0].length>0;if(a){const u=this.childViews.find(i=>i.view.id===a);u&&u.view.componentProps.selectedEvents}else if(!h&&this.childViews.length>0)this.childViews.forEach(u=>{this.removeChildView(u)});else if(h&&this.childViews.length===0){const u={pageId:null,view:{id:this.viewId,name:"Timeline",title:"Timeline",colspan:12,rowspan:6,max_column:12,max_row:12,min_column:6,min_row:4},filterAndWidgetContainer:this};Sd.emit("add-view",u)}else this.childViews.forEach(u=>{this.updateTimeline(u,r)})}}finally{this._isUpdating=!1}}}removeAllChildViews(){[...this.childViews].forEach(r=>{this.removeChildView(r)})}removeChildView(r,a=!1){const v=this.childViews.findIndex($=>$.view.id===r.view.id);if(v!==-1){const $=this.childViews[v];this.childViews.splice(v,1),$.view.id&&this.componentSpecificFilters.delete($.view.id);const h=$.grid,u=$.page,i=document.querySelector(`[gs-id="${$.view.id}"]`);if(h&&i&&(h.removeWidget(i),u&&!a)){const p=u.items.findIndex(c=>c.id===$.view.id);p!==-1&&(u.items.splice(p,1),u.items.length===0&&Sd.emit("empty-page",u))}}}updateView({view:r,dynamicFilters:a,filtersJSON:v,filters:$}){this.setFiltersJSON(v),this.dynamicFilters=a;const h=this.childViews.find(u=>{var i;return((i=u.view)==null?void 0:i.id)===r.view.id});if(h){h.view.filtersJSON=v,h.view.coreView&&(h.view.coreView.filtersJSON=v);let u=a;if(this.viewId===4){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===8){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===3){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i),this.updateSummary({dynamicFilters:u})}else if(this.viewId===1){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===6){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===7){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}else if(this.viewId===9){const i=this.getComponentDynamicFilters(r.view.id);i&&(u=i)}this.viewId===5?this.updateVolumetricField(h,u):this.viewId===7?this.updateGoalData(h,u):this.viewId===9?this.updateFieldDataByZones(h,a):this.viewId===10?this.updateXg(h,u):this.viewId===3?this.updateMatchSummary(h,u):this.viewId===4?this.updateTimeline(h,u):this.viewId===8?this.updateFieldPosesion(h,u):this.viewId===1?this.updateComparative(h,u):this.viewId===2?this.updateGSCtops(h,u):this.viewId===6?this.updateGSCLineupsReports(h,u):this.viewId===16?this.updateLastTouchSingle(h,$):this.viewId===18&&this.updateSpecificPlaysFiltersSingle(h,$)}}updateComparative(r,a){if(r.view.componentProps){const v=a[0]||[];if(v&&v.length>0){let $;if(Array.isArray(v)){const u=this.childViews.findIndex(i=>i.view.id===r.view.id);u>=0&&u<v.length?$=v[u]:$=v[0]}else $=v;const h=R4.get(this.viewId);r.view.componentProps.type=$,r.view.componentProps.default=!1,r.view.title=`Comparativa ${h[$]}`,r.view.filterMultiple={category:$}}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateVolumetricField(r,a){if(r.view.componentProps){const v=a[0]||1;r.view.isHomeTeam=v===1,r.view.componentProps.preMatchType=v,r.view.filterMultiple={isHomeTeam:v},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateGoalData(r,a){if(r.view.componentProps){const v=a[0]===1?"offensive":"defensive",$=a[1]===1;r.view.componentProps.analysisType=v,r.view.componentProps.isHomeTeamForAnalysis=$,r.view.isHomeTeam=$,r.view.filterMultiple={isHomeTeam:$},Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateFieldDataByZones(r,a){if(r.view.componentProps){const v=a[0],$=a[1]===1;if(r.view.componentProps.isHomeTeamForAnalysis=$,r.view.isHomeTeam=$,r.view.filterMultiple={categoryIds:v,isHomeTeam:$},v&&v.length){const h=v.join("-"),u=R4.get(this.viewId).analysisTypes.get(h);u&&(r.view.componentProps.analysisType=u.analysisType,r.view.title=u.title,r.view.titleShort=u.titleShort)}}}updateXg(r,a){const v=a[0]===1;r.view.componentProps&&(r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.filtersJSON=this.filtresJSON,r.view.filterMultiple={isHomeTeam:v})}updateMatchSummary(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=a&&a.length>0?a[0]:!1;r.view.componentProps.desplegable=v,r.view.componentProps.key=v,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateTimeline(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=this.getComponentDynamicFilters(r.view.id)||a,$=v&&v.length>0?v[0]:[];r.view.componentProps.selectedEvents=$,r.view.componentProps.key=$.length>0;const h=this.hasEventTypeId($,1),u=this.hasCategoryId($,8),i=this.hasCategoryId($,9),p=this.hasEventTypeId($,3);r.view.componentProps.goals=h,r.view.componentProps.yellowCards=u,r.view.componentProps.redCards=i,r.view.componentProps.substitutions=p,r.view.componentProps._updateKey=Date.now(),Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:v}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:v}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}updateFieldPosesion(r,a){if(r.view.componentProps){r.view.componentProps._isReactive||(r.view.componentProps=t.reactive(r.view.componentProps),r.view.componentProps._isReactive=!0);const v=a&&a.length>0?a[0]:!1;r.view.componentProps.areInactiveVisible=v,r.view.componentProps.key=v,Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a})}}updateGSCtops(r,a){if(r.view.componentProps){const v=a[0]||[];if(Array.isArray(v)){if(v.length>0){const $=v[0];let h=null;try{h=A4($)}catch(i){console.warn("Error getting category by ID:",i)}const u=a[1]||1;r.view.filterMultiple={categoryId:$,teamType:u},r.view.componentProps.game&&(u===1?r.view.componentProps.teamView=r.view.componentProps.game.homeTeam.team_id:u===2?r.view.componentProps.teamView=r.view.componentProps.game.awayTeam.team_id:r.view.componentProps.teamView=0),r.view.componentProps.categoryView=h?[{id:$,name:h.name}]:[{id:$,name:`Category ${$}`}]}}else{const $=v;if($){let h=null;try{h=A4($)}catch(i){console.warn("Error getting category by ID:",i)}const u=a[1]||1;r.view.filterMultiple={categoryId:$,teamType:u},r.view.componentProps.game&&(u===1?r.view.componentProps.teamView=r.view.componentProps.game.homeTeam.team_id:u===2?r.view.componentProps.teamView=r.view.componentProps.game.awayTeam.team_id:r.view.componentProps.teamView=0),r.view.componentProps.categoryView=h?[{id:$,name:h.name}]:[{id:$,name:`Category ${$}`}]}}}}updateGSCLineupsReports(r,a){if(r.view.componentProps){const v=a[0]||[];if(Array.isArray(v)){if(v.length>0){const $=v[0];r.view.filterMultiple={gameNumber:$},r.view.componentProps.gameNumber=$}}else{const $=v;$&&(r.view.filterMultiple={gameNumber:$},r.view.componentProps.gameNumber=$)}Sd.emit("component-props-updated",{viewId:r.view.id,componentProps:r.view.componentProps,dynamicFilters:a}),Sd.emit("dynamic-filters-changed",{containerViewId:this.viewId,viewId:r.view.id,dynamicFilters:a}),Sd.emit("force-component-update",{itemId:r.view.id,componentProps:r.view.componentProps})}}getCategoryIdFromAnalysisType(r,a){if(!r||!a)return null;for(const v of a){const $=v.join("-"),h=R4.get(this.viewId);if(h&&h.analysisTypes){const u=h.analysisTypes.get($);if(u&&u.analysisType===r)return v[0]||null}}return null}updateLastTouchFilters(){if(!this.filters){console.warn("No filters available in updateLastTouchFilters");return}this.childViews.forEach($=>{$.view.componentProps.isAssistZoneVisible=this.filters.isAssistZoneVisible,$.view.componentProps.howManyGames=this.filters.howManyGamesSelected.value,$.view.filterMultiple.howManyGamesSelected=this.filters.howManyGamesSelected,$.view.filterMultiple.isAssistZoneVisible=this.filters.isAssistZoneVisible});const r=this.filters.selectedCategories.map($=>$.value),a=r.map($=>$.name),v=this.filters.selectedTeam.value;if(v===3)this.childViews.length>r&&this.childViews.reduce(($,h)=>(a.includes(h.view.componentProps.categories[0].name)||$.push(h.view.componentProps.categories[0].name),$),[]).forEach($=>{const h=this.childViews.findIndex(u=>u.view.componentProps.categories[0].name===$);if(h!==-1){const u=this.childViews[h];this.removeChildView(u)}});else{const $=v===1,h=this.getHomeTeamViews(),u=this.getAwayTeamViews();if($&&h.length===0)u.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$});else if(!$&&u.length===0)h.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$});else if(h.length===u.length)$||h.forEach(i=>{i.view.componentProps.isHomeTeamForAnalysis=$,i.view.isHomeTeam=$,i.view.filterMultiple.isHomeTeam=$}),($?u:h).forEach(i=>{this.removeChildView(i)});else{const i=$?this.getHomeTeamViews():this.getAwayTeamViews();if(i.length>r.length){const p=r.map(c=>c.name);i.forEach(c=>{p.includes(c.view.componentProps.categories[0].name)?c.view.filterMultiple.isHomeTeam=$:this.removeChildView(c)})}else i.forEach(p=>{p.view.filterMultiple.isHomeTeam=$})}}}updateLastTouchSingle(r,a){if(r.view.componentProps){const v=a.selectedTeam.value===1,$=a.selectedCategory.value;r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.componentProps.categories=[$],r.view.componentProps.analysisType=a.selectedGamePhase.name,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.isAssistZoneVisible=a.isAssistZoneVisible,r.view.componentProps.howManyGames=a.howManyGamesSelected.value,r.view.title=$.name,r.view.titleShort=$.name,r.view.isHomeTeam=v,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,selectedCategory:$,selectedGamePhase:a.selectedGamePhase,howManyGamesSelected:a.howManyGamesSelected,isAssistZoneVisible:a.isAssistZoneVisible}}}updateSpecificPlaysFilters(){if(console.log("updateSpecificPlaysFilters called"),!this.filters){console.warn("No filters available in updateCornershFilters");return}this.childViews.forEach(a=>{a.view.componentProps.advancedFilters=this.filters.advancedFilters,a.view.componentProps.howManyCorners=this.filters.howManyCorners,a.view.componentProps.isAgainstMode=this.filters.isAgainstMode,a.view.filterMultiple.advancedFilters=this.filters.advancedFilters,a.view.filterMultiple.isAgainstMode=this.filters.isAgainstMode});const r=this.filters.selectedTeam.value;if(r===3){const a=this.getHomeTeamViews(),v=this.getAwayTeamViews();if(a.length+v.length>this.filters.howManyCorners*2){const $=[];a.forEach((h,u)=>{u>=this.filters.howManyCorners&&$.push(h)}),v.forEach((h,u)=>{u>=this.filters.howManyCorners&&$.push(h)}),$.forEach(h=>{this.removeChildView(h)})}}else{const a=r===1,v=this.getHomeTeamViews(),$=this.getAwayTeamViews();if(a&&v.length===0)$.forEach(h=>{console.log("awayView before update:",h),h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a});else if(!a&&$.length===0)v.forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a});else if(v.length===$.length)a||v.forEach(h=>{h.view.componentProps.isHomeTeamForAnalysis=a,h.view.isHomeTeam=a,h.view.filterMultiple.isHomeTeam=a}),(a?$:v).forEach(h=>{this.removeChildView(h)});else{const h=a?this.getHomeTeamViews():this.getAwayTeamViews();h.length>this.filters.howManyCorners?h.forEach((u,i)=>{i>=this.filters.howManyCorners?this.removeChildView(u):u.view.filterMultiple.isHomeTeam=a}):h.forEach(u=>{u.view.filterMultiple.isHomeTeam=a})}}}updateSpecificPlaysFiltersSingle(r,a){if(console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),console.log("view:",r),console.log("filter:",a),console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"),a.selectedTeam&&r.view.componentProps){const v=a.selectedTeam.value===1;r.view.isHomeTeam=v,r.view.componentProps.isHomeTeamForAnalysis=v,r.view.componentProps.isHomeTeamForAnalysis=!0,r.view.componentProps.advancedFilters=a.advancedFilters,r.view.componentProps.isAgainstMode=a.isAgainstMode,r.view.filterMultiple={isHomeTeam:r.view.isHomeTeam,advancedFilters:a.advancedFilters,isAgainstMode:a.isAgainstMode}}}}const oHe={class:"template-page__header"},sHe={class:"template-page__header__name"},lHe=["value"],cHe={class:"template-page__header__details"},uHe={class:"template-page__header__details__teams"},dHe={class:"template-page__header__details__teams__team"},pHe={key:0,class:"template-page__header__details__teams__team__logo"},hHe=["src"],fHe={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mHe={class:"template-page__header__details__teams__team"},yHe={key:0,class:"template-page__header__details__teams__team__logo"},gHe=["src"],vHe={key:1,width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bHe={class:"template-page__content"},xHe=["id"],_He=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-max-w","gs-max-h","gs-min-w","gs-min-h","gs-no-resize","gs-no-move","gs-auto-position"],wHe=t.defineComponent({__name:"TemplateReportPage",props:{token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},game:{type:Object,default:()=>null},lastGames:{type:Array,default:()=>null},id:{type:[String,Number],default:()=>String(Date.now())},page:{type:Object,default:()=>({title:"Page 1",items:[{name:"Tabla jugadores",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]})},isPostMatch:{type:Boolean,default:!1},isTemplateMode:{type:Boolean,default:!1},isFilterVisible:{type:Boolean,default:!1}},emits:["intersection-changed","delete-page","change-sort","edit-view","view-changed","component-props-updated","delete-view","dynamic-filters-changed"],setup(e,{emit:r}){var a,v,$,h,u,i,p;const c=t.ref(null);let n=null;const k=e,T=t.ref(!1),x=r,d=t.computed(()=>k.page.items.reduce((qe,_e)=>(qe.set(_e.id,_e),qe),new Map)),o=t.computed(()=>{var qe,_e,Ue,je;return k.game&&k.game.homeTeam&&k.game.awayTeam?{homeTeam:{name:((qe=k.game.homeTeam)==null?void 0:qe.acronym)||"LOC",logo:((_e=k.game.homeTeam)==null?void 0:_e.logo)||null},awayTeam:{name:((Ue=k.game.awayTeam)==null?void 0:Ue.acronym)||"VIS",logo:((je=k.game.awayTeam)==null?void 0:je.logo)||null}}:{homeTeam:{name:"LOC"},awayTeam:{name:"VIS"}}});let l=null,s=null,f=!1,g=null,S=!1;const L=()=>{S=!0},M=()=>{S=!1};function A(){S||(f=!0,g&&clearTimeout(g),g=setTimeout(()=>{f=!1},150))}function z(){const qe={root:null,rootMargin:"0px",threshold:.7};l=new IntersectionObserver(je=>{je.forEach(Re=>{if(f){s&&clearTimeout(s),s=setTimeout(()=>{x("intersection-changed",Re.isIntersecting)},100);return}s&&clearTimeout(s),s=setTimeout(()=>{x("intersection-changed",Re.isIntersecting)},50)})},qe);const _e=c.value;_e&&l.observe(_e);const Ue=document.querySelector(".container-main");Ue&&Ue.addEventListener("scroll",A,{passive:!0}),document.addEventListener("programmatic-scroll-start",L),document.addEventListener("programmatic-scroll-end",M)}function I(qe){k.page.title=qe.target.value,x("view-changed")}const j={game_id:0,season_id:0,prematch:!1},F={gameId:90209,id:90209,seasonId:1909,regularSeasonId:1909,matchday_name:"Matchday 1",status:1,score:[1,3],game_status:1,dateTimeUTC:"2024-09-05T22:00:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/2936.png",team_id:2936,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/2936.png",colloquial_name:"Guyana",acronym:"GUY",team_name:"Guyana"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/3279.png",team_id:3279,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/3279.png",colloquial_name:"Surinam",acronym:"SUR",team_name:"Surinam"},is_live:0,minutes:{home_goals_minutes:[],visiting_goals_minutes:[],home_yellow_cards_minutes:[],away_yellow_cards_minutes:[],home_red_cards_minutes:[],away_red_cards_minutes:[]}},W=new Map([[5,{component:jI,componentName:"GSCVolumetricField",props:{isGamePreMatch:!k.isPostMatch,areTeamsVisible:!1,isTitleVisible:!1,isGhostEffect:k.isTemplateMode,isTemplateMode:k.isTemplateMode,preMatchType:1}}],[2,{component:Mj,componentName:"GscTopPlayer",props:{categoryView:[{id:0,name:"Category"}],gamed:k.game?k.game.id:F.gameId,game:k.game,season:k.game?(a=k==null?void 0:k.game)==null?void 0:a.season_id:F.seasonId,teamView:0,useDummyData:k.isTemplateMode}}],[8,{component:PW,componentName:"FieldPosesion",props:{widthSection:600,game:F,teamSelected:{teamId:0},areInactiveVisible:!0,showTitle:!1,isDefault:!0,key:!1}}],[6,{component:FK,componentName:"GSCLineupsReports",props:{selectedOption:k.isPostMatch?"Postmatch":"Prematch",game:j,gamehome:j,gameaway:j}}],[3,{component:UW,componentName:"GSCMatchSummary",props:{game:F,defaultShields:!0,desplegable:!1}}],[4,{component:_D,componentName:"GSCTimelineReports",props:{key:!0,isDefault:!0,gameId:F.gameId,homeTeam:F.homeTeam.team_id,awayTeam:F.awayTeam.team_id,token:k.token,goals:!0,yellowCards:!0,redCards:!0,substitutions:!0}}],[7,{component:LB,componentName:"GSCGoalData",props:{game:k.game,isHomeTeamForAnalysis:!0,canInteract:!1,canPlayVideos:!1,isPreMatch:!k.isPostMatch,analysisType:1}}],[9,{component:IK,componentName:"GSCFieldDataByZones",props:{game:k.game,isHomeTeamForAnalysis:!0,analysisType:"successfulPasses",canPlayVideos:!1,isPreMatch:!k.isPostMatch,negative:!0}}],[10,{component:nP,componentName:"GSCGameXg",props:{game:k.game,isHomeTeamForAnalysis:!0,isPostMatch:k.isPostMatch}}],[13,{component:HF,componentName:"GSCTimelapseTable",props:{isdefault:!0,seasonId:k.game?(v=k==null?void 0:k.game)==null?void 0:v.season_id:0,teamsIds:[8,13],categoryIds:[20,2],analysisType:1,teamsshow:[1],gameId:90401,teams:[{id:8,name:"MAZ",logo:"https://golstatsimages.blob.core.windows.net/teams-80/8.png"},{id:13,name:"SNL",logo:"https://golstatsimages.blob.core.windows.net/teams-80/13.png"}]}}],[14,{component:lF,componentName:"GSCGeneraltable",props:{isReports:!0,isDefault:!0,type:0,typeView:1,tournament:1,currentSeasonId:2010,showVideos:!1,localTeam:2,awayTeam:1}}],[15,{component:LX,componentName:"GSCStrengths",props:{token:k.token,view:1,numitems:3,typegame:1,isdefault:!0,data:{player:35240,season:1772,type:2,team:14}}}],[17,{component:FG,componentName:"GSCCornersGeneralTrend",props:{game:k.game?{id:k.game.id||k.game.game_id||k.game.gameId||null,home_team:k.game.home_team||null,away_team:k.game.visiting_team||null,season:k.game.seasonId||k.game.season_id||null,game_status:k.game.game_status||k.game.status||null,home_acronym:k.game.home_team_acronym||(($=k.game.homeTeam)==null?void 0:$.acronym)||null,away_acronym:k.game.visiting_team_acronym||((h=k.game.awayTeam)==null?void 0:h.acronym)||null,logo_home:((u=k.game.homeTeam)==null?void 0:u.logo)||null,logo_away:((i=k.game.awayTeam)==null?void 0:i.logo)||null}:null,infavoragainstteam:!0,forseason:!1,forteam:!0,showdefault:!0,tournamentselected:{id:1},forgame:!1,lateralidad:"right",teamselected:2,filters:{},showBallGo:!0,showHeatMap:!0,ballOnOff:!1}}],[10,{component:nP,componentName:"GSCGameXg",props:{game:k.game,isHomeTeamForAnalysis:!0,isPostMatch:k.isPostMatch}}],[1,{component:TB,componentName:"GSCComparativeReports",props:{gameId:k.game?k.game.id:"",homeLogo:k.game?k.game.homeTeam.logo:"",awayLogo:k.game?k.game.awayTeam.logo:"",seasonId:k.game?(p=k==null?void 0:k.game)==null?void 0:p.season_id:0,typeGame:k.isPostMatch,type:"stoppedBall",default:k.isTemplateMode}}],[16,{component:zX,componentName:"GSCLastTouch",props:{categories:[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,"35_r","54_r"],invert:[35,54],negative:!1,translationKey:"chalkboard.offensive.team.goals",singleName:"Gol",isDefaultSelected:!0}],gameIdsForAnalysis:[],isAssistZoneVisible:!1,seasonId:2010,analysisType:"offensive",teamIdForAnalysis:17,gameDataUTC:"2025-11-08T03:00:00Z",isHomeTeamForAnalysis:!0,isTemplateMode:k.isTemplateMode,isPreMatch:!k.isPostMatch}}],[18,{component:MZ,componentName:"GSCSpecificPlays",props:{isHomeTeamForAnalysis:!0,isTemplateMode:k.isTemplateMode,isPreMatch:!k.isPostMatch,seasonIdForAnalysis:1325,selectedCategory:31,teamIdForAnalysis:1,iaAgainstMode:!1,game:{id:62323,home_team:1,away_team:14,season:1325,game_status:4,home_acronym:"CHI",away_acronym:"SAN",logo_home:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",logo_away:"https://golstatsimages.blob.core.windows.net/teams-80/14.png"},advancedFilters:{areConnectionsVisible:!1,arePathsVisible:!1,secondsBefore:-1,secondsAfter:1,secondsBeforeAndAfter:0}}}]]);function U(qe){var _e,Ue,je;if(((_e=qe==null?void 0:qe.coreView)==null?void 0:_e.id)===17&&qe.dynamicFilters&&qe.dynamicFilters[2]!==void 0){const Re=qe.dynamicFilters[2];if(Re===1)return!0;if(Re===2)return!1;if(Re===3&&((Ue=qe.filterMultiple)==null?void 0:Ue.isHomeTeam)!==void 0)return typeof qe.filterMultiple.isHomeTeam=="boolean"?qe.filterMultiple.isHomeTeam:qe.filterMultiple.isHomeTeam===1}return(je=qe.componentProps)!=null&&je.preMatchType?qe.componentProps.preMatchType===1:qe.isHomeTeam}function O(qe){if(qe)if(typeof qe=="string"){let _e=null;switch(qe){case"GSCVolumetricField":_e=jI;break;case"GSCGoalData":_e=LB;break;case"GscTopPlayer":_e=Mj;break;case"FieldPosesion":_e=PW;break;case"GSCLineupsReports":_e=FK;break;case"GSCMatchSummary":_e=UW;break;case"GSCTimelineReports":_e=_D;break;case"GSCFieldDataByZones":_e=IK;break;case"GSCGeneraltable":_e=lF;break;case"GSCTimelapseTable":_e=HF;break;case"GSCGameXg":_e=nP;break;case"GSCComparativeReports":_e=TB;break;case"GSCStrengths":_e=LX;break;case"GSCCornersGeneralTrend":_e=FG;break;case"GSCLastTouch":_e=zX;break;case"GSCSpecificPlays":_e=MZ;break;default:_e=null}return _e}else return qe;return null}function X({pageId:qe,view:_e,filterAndWidgetContainer:Ue,applyMinimumSize:je=!1,dynamicFilters:Re=[],filters:We=null}){if(k.page.id===qe&&n){let Qe=!1;_e.id===3&&(Qe=Re[0]);const rt=`min_column${Qe?"_2":""}`,pt=`min_row${Qe?"_2":""}`,ut=`colspan${Qe?"_2":""}`,He=`rowspan${Qe?"_2":""}`,st={w:je?_e[rt]:_e[ut],h:je?_e[pt]:_e[He]};if(n.willItFit(0,0,st.w,st.h,!0)){const ct=n.addWidget(st),Ct=Number(ct.getAttribute("gs-x")||0),Vt=Number(ct.getAttribute("gs-y")||0);n.removeWidget(ct);const Ot=W.get(_e.id),qt=t.reactive({...JSON.parse(JSON.stringify(Ot.props))||{},_isReactive:!0}),Zt=t.reactive({pageId:qe,grid:n,page:k.page,view:{name:_e.name,title:_e.title,key:Date.now()-7*Math.random(),id:`w-${String(Date.now())}`,x:Ct,y:Vt,w:st.w,h:st.h,maxWidth:_e.max_column,maxHeight:_e.max_row,minWidth:_e.min_column,minHeight:_e.min_row,componentName:Ot.componentName,componentProps:qt,pageId:qe,coreView:_e}});Ue.addView(Zt),Sd.emit("add-page-view",Zt)}else Sd.emit("add-page-and-view",{pageId:qe,view:_e,filterAndWidgetContainer:Ue})}}function N(qe){if(n){const _e=document.querySelector(`[gs-id="${qe.id}"]`);_e&&(n.removeWidget(_e),x("delete-view",qe))}}function Y(qe){if(!qe.filterAndViewsContainer&&qe.coreView){const _e=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[qe],qe.coreView.id,qe.dynamicFilters||[],k.isPostMatch,k.isTemplateMode,qe.filtersJSON,null,qe.filters);qe.filterAndViewsContainer=_e}x("edit-view",qe)}function se(){x("delete-page",k.page)}function me(){Sd.emit("change-sort",k.page)}function ge(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.itemId||Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps),_e._updateKey=Date.now())}function be(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps),_e._updateKey=Date.now())}function xe(qe){if(f)return;const _e=k.page.items.find(Ue=>Ue.id===qe.viewId);_e&&(Object.assign(_e.componentProps,qe.componentProps||{}),_e._updateKey=Date.now())}const Ae=function(){Sd.off("add-view",X),Sd.off("force-component-update",ge),Sd.off("component-props-updated",be),Sd.off("dynamic-filters-changed",xe);const qe=document.querySelector(".container-main");qe&&qe.removeEventListener("scroll",A),s&&clearTimeout(s),g&&clearTimeout(g)};return Sd.on("add-view",X),Sd.on("force-component-update",ge),Sd.on("component-props-updated",be),Sd.on("dynamic-filters-changed",xe),t.onMounted(async()=>{await t.nextTick(),n=Rh.init({column:12,row:12,maxRow:12,cellHeight:60,float:!0,resizable:{handles:"e, se, s, sw, w"}},`#grid-stack-${k.id}`),n.on("change",(qe,_e)=>{const Ue=_e[0];if(Ue){const je=d.value.get(Ue.id);je&&(je.x=Ue.x,je.y=Ue.y,je.w=Ue.w,je.h=Ue.h,x("view-changed"))}}),z(),k.page.grid=n,k.page.offListeners=Ae}),t.onUnmounted(()=>{l&&l.disconnect(),Ae(),s&&clearTimeout(s),g&&clearTimeout(g),document.removeEventListener("programmatic-scroll-start",L),document.removeEventListener("programmatic-scroll-end",M)}),(qe,_e)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"templatePage",ref:c,class:"template-page"},[t.createElementVNode("div",oHe,[T.value?(t.openBlock(),t.createBlock(VZ,{key:0,"options-type":"page",onClick:_e[0]||(_e[0]=t.withModifiers(Ue=>T.value=!1,["self"])),onMouseleave:_e[1]||(_e[1]=Ue=>T.value=!1),onCloseTooltip:_e[2]||(_e[2]=Ue=>T.value=!1),onDeletePage:se,onChangeSort:me})):t.createCommentVNode("",!0),t.createElementVNode("div",sHe,[_e[4]||(_e[4]=t.createElementVNode("div",null,[t.createElementVNode("svg",{width:"19",height:"21",viewBox:"0 0 19 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M11.2986 12.9994C7.62909 14.8341 4.11744 16.0178 1.35547 16.4518L9.18763 20.0029C9.34545 20.0818 9.60192 20.0818 9.74002 20.0029L17.8878 16.3137C18.0457 16.2348 18.164 16.0572 18.164 15.8797V8.75781C16.2898 10.2177 13.9422 11.6776 11.2986 12.9994Z",fill:"white"}),t.createElementVNode("path",{d:"M4.7152 8.89735C4.7152 8.89735 10.9494 3.76802 16.8482 1.20335C15.0529 0.946887 11.3637 0.43395 9.3711 0.453678C4.41928 0.493135 1.06546 1.34145 1.06546 1.34145C0.90763 1.3809 0.769531 1.55846 0.769531 1.71629V8.12795C3.01857 6.56942 5.34651 5.56329 5.34651 5.56329C5.34651 5.56329 2.72264 7.06263 0.769531 8.81844V9.41028V14.1648C3.09748 13.9675 6.62886 12.7641 10.3575 10.7321C13.6719 8.91707 16.4733 6.84562 18.17 5.05035V2.40677C14.3032 3.37346 4.7152 8.89735 4.7152 8.89735Z",fill:"white"})])],-1)),_e[5]||(_e[5]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("input",{value:e.page.title,type:"text",class:"page-title-input",onclick:"this.select()",onInput:I},null,40,lHe)]),t.createElementVNode("div",cHe,[t.createElementVNode("div",uHe,[t.createElementVNode("div",dHe,[o.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",pHe,[t.createElementVNode("img",{src:o.value.homeTeam.logo,alt:"Home Team Logo",width:"25",height:"25"},null,8,hHe)])):(t.openBlock(),t.createElementBlock("svg",fHe,[..._e[6]||(_e[6]=[t.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])])),t.createElementVNode("span",null,t.toDisplayString(o.value.homeTeam.name),1)]),_e[8]||(_e[8]=t.createElementVNode("div",{class:"template-page__header__details__teams__vs"}," VS ",-1)),t.createElementVNode("div",mHe,[t.createElementVNode("span",null,t.toDisplayString(o.value.awayTeam.name),1),o.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",yHe,[t.createElementVNode("img",{src:o.value.awayTeam.logo,alt:"Away Team Logo",width:"25",height:"25"},null,8,gHe)])):(t.openBlock(),t.createElementBlock("svg",vHe,[..._e[7]||(_e[7]=[t.createElementVNode("path",{opacity:"0.4",d:"M12.0153 0.261719C12.0153 0.261719 13.6664 1.94994 17.7355 2.06744C21.149 2.16638 22.3796 1.30063 22.3796 1.30063C22.3796 1.30063 25.4902 10.2488 20.3822 17.7005C17.6983 21.615 12.5533 24.1504 12.0091 24.2617C11.4711 24.1504 6.31984 21.615 3.636 17.7005C-1.4596 10.2488 1.65094 1.30063 1.65094 1.30063C1.65094 1.30063 2.88155 2.16638 6.2951 2.06744C10.3642 1.94994 12.0153 0.261719 12.0153 0.261719Z",fill:"#54728B"},null,-1)])]))])]),e.isTemplateMode&&!e.isFilterVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"template-page__header__details__options",onClick:_e[3]||(_e[3]=Ue=>T.value=!0)},[..._e[9]||(_e[9]=[t.createElementVNode("svg",{width:"17",height:"13",viewBox:"0 0 17 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M3.56953 6.28672C3.56953 7.19972 2.83253 7.93672 1.91953 7.93672C1.00653 7.93672 0.269531 7.19972 0.269531 6.28672C0.269531 5.37372 1.00653 4.63672 1.91953 4.63672C2.83253 4.63672 3.56953 5.37372 3.56953 6.28672ZM8.51953 4.63672C7.60653 4.63672 6.86953 5.37372 6.86953 6.28672C6.86953 7.19972 7.60653 7.93672 8.51953 7.93672C9.43253 7.93672 10.1695 7.19972 10.1695 6.28672C10.1695 5.37372 9.43253 4.63672 8.51953 4.63672ZM15.1195 4.63672C14.2065 4.63672 13.4695 5.37372 13.4695 6.28672C13.4695 7.19972 14.2065 7.93672 15.1195 7.93672C16.0325 7.93672 16.7695 7.19972 16.7695 6.28672C16.7695 5.37372 16.0325 4.63672 15.1195 4.63672Z",fill:"white"})],-1)])])):t.createCommentVNode("",!0)])]),t.createElementVNode("div",bHe,[t.createElementVNode("div",{id:`grid-stack-${e.id}`,class:"grid-stack"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.page.items,Ue=>{var je;return t.openBlock(),t.createElementBlock("div",{class:"grid-stack-item",key:Ue.key,"gs-id":Ue.id,"gs-x":Ue.x,"gs-y":Ue.y,"gs-w":Ue.w,"gs-h":Ue.h,"gs-max-w":Ue.maxWidth,"gs-max-h":Ue.maxHeight,"gs-min-w":Ue.minWidth,"gs-min-h":Ue.minHeight,"gs-no-resize":!e.isTemplateMode,"gs-no-move":!k.isTemplateMode,"gs-auto-position":Ue.x===0&&Ue.y===0},[t.createElementVNode("div",{class:t.normalizeClass(["grid-stack-item-content",{"is-selected":Ue.isSelected}])},[t.createVNode(HJe,{view:Ue,"is-template-mode":e.isTemplateMode,"is-post-match":e.isPostMatch,game:e.game,lastGames:e.lastGames,"is-home-team":U(Ue),"is-filter-visible":e.isFilterVisible,"view-id":((je=Ue==null?void 0:Ue.coreView)==null?void 0:je.id)||0,onEdit:Re=>Y(Ue),onDelete:Re=>N(Ue)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(O(Ue.componentName)),t.mergeProps({ref_for:!0},Ue.componentProps,{key:`${Ue.id}-${Ue._updateKey||0}`}),null,16))]),_:2},1032,["view","is-template-mode","is-post-match","game","lastGames","is-home-team","is-filter-visible","view-id","onEdit","onDelete"])],2)],8,_He)}),128))],8,xHe)])],512))}}),THe=t2(wHe,[["__scopeId","data-v-b748331b"]]),SHe={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},kHe={key:0,class:"cover__main-logo cover__main-logo__home"},LHe={key:0,class:"team-logo"},EHe=["src"],CHe={key:1,width:"575",height:"675",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},NHe=["fill"],OHe={key:1,class:"cover__main-logo cover__main-logo__away"},MHe={key:0,class:"team-logo"},VHe=["src"],zHe={key:1,width:"575",height:"575",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PHe=["fill"],AHe={class:"cover__title-subtitle"},RHe={class:"cover__title-subtitle__title"},UHe={class:"cover__title-subtitle__subtitle"},FHe={key:2,class:"cover-type-one"},IHe={class:"team-info-one"},qHe={class:"team-data"},jHe={key:0,class:"team-logo"},WHe=["src"],DHe={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},KHe=["fill","opacity"],BHe={class:"team-name"},XHe={key:0,class:"team-events"},GHe={class:"score-one"},ZHe={key:0},JHe={class:"team-info-one"},HHe={class:"team-data"},YHe={key:0,class:"team-logo"},QHe=["src"],$He={key:1,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eYe=["fill","opacity"],tYe={class:"team-name"},rYe={key:0,class:"team-events"},aYe={key:3,class:"cover-type-two"},nYe={class:"team-data"},iYe={class:"team-info"},oYe={key:0,class:"team-logo"},sYe=["src"],lYe={key:1,width:"160",height:"161",viewBox:"0 0 160 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cYe=["fill","opacity"],uYe={key:2,class:"team-score-two"},dYe={key:0,class:"team-goals"},pYe={class:"team-data"},hYe={class:"team-info"},fYe={key:0,class:"team-score-two"},mYe={key:1,class:"team-logo"},yYe=["src"],gYe={key:2,width:"161",height:"161",viewBox:"0 0 161 161",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vYe=["fill","opacity"],bYe={key:0,class:"team-goals"},xYe={__name:"CoverPage",props:{game:{type:Object,default:()=>null},coverId:{type:Number,default:1},isPostMatch:{type:Boolean,default:!0}},emits:["intersection-changed"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(null),h=t.computed(()=>[1,2].includes(a.coverId)),u=t.computed(()=>[1,3].includes(a.coverId)),i=t.computed(()=>a.coverId===1?{homeTeam:"#1558CC",awayTeam:"#0046BF",opacity:1}:a.coverId===3?{homeTeam:"#000A1A",awayTeam:"#000A1A",opacity:.4}:{homeTeam:"#576883",awayTeam:"#576883",opacity:.4}),p=t.computed(()=>a.game&&a.game.score?a.game.score:["0","0"]),c=t.computed(()=>{var I,j,F,W,U,O,X,N;if(a.game&&a.game.homeTeam&&a.game.awayTeam){const Y={homeTeam:{name:((I=a.game.homeTeam)==null?void 0:I.acronym)||"LOC",logo:((j=a.game.homeTeam)==null?void 0:j.logo)||null},awayTeam:{name:((F=a.game.awayTeam)==null?void 0:F.acronym)||"VIS",logo:((W=a.game.awayTeam)==null?void 0:W.logo)||null}};return h.value?(Y.homeTeam.goalsMinutes=o(a.game.minutes.home_goals_minutes),Y.homeTeam.totalYellowCards=((U=a.game.minutes.home_yellow_cards_minutes)==null?void 0:U.length)||0,Y.homeTeam.totalRedCards=((O=a.game.minutes.home_red_cards_minutes)==null?void 0:O.length)||0,Y.awayTeam.goalsMinutes=o(a.game.minutes.visiting_goals_minutes),Y.awayTeam.totalYellowCards=((X=a.game.minutes.away_yellow_cards_minutes)==null?void 0:X.length)||0,Y.awayTeam.totalRedCards=((N=a.game.minutes.away_red_cards_minutes)==null?void 0:N.length)||0):(Y.homeTeam.goalsEvents=d(a.game.report_minutes.home_goals_minutes),Y.awayTeam.goalsEvents=d(a.game.report_minutes.visiting_goals_minutes)),Y}return{homeTeam:{name:"LOC",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]},awayTeam:{name:"VIS",logo:null,goalsMinutes:"00'",totalYellowCards:0,totalRedCards:0,goalsEvents:[{playerName:"Nombre",goalTime:"00'"}]}}}),n=t.computed(()=>({"--background-image":u.value?"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-01@2x.jpg)":"url(https://golstatsimages.blob.core.windows.net/report-maker/background-postmatch-template-02@2x.jpg)","--grid-template-columns-type-one":a.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-one":a.isPostMatch?"100%":"fit-content","--grid-template-columns-type-two":a.isPostMatch?"1fr min-content 1fr":"320px min-content 320px","--width-type-two":a.isPostMatch?"100%":"fit-content"})),k=t.computed(()=>a.isPostMatch?"Postmatch":"Prematch"),T=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],x=t.computed(()=>{if(a.game){let I=SHe[a.game.matchday_abbreviation];I||(I=a.game.matchday_abbreviation.replace("M","J"));const[j,F,W]=a.game.date.split("-");return`${I} - ${W} ${T[Number(F)-1]}, ${j}`}return"Jornada - Día 00 Mes"});function d(I){return!I||!Array.isArray(I)||I.length===0?"":I.map(j=>{const F=j.split(", ");let W=F[0].replace("'","");W=W.replace("+",""),W=W.replace("’","");const U=W.split(" "),{strings:O,numbers:X}=U.reduce((se,me)=>(isNaN(Number(me))?se.strings.push(me):se.numbers.push(me),se),{strings:[],numbers:[]}),N=O.join(" "),Y=X.length===1?`${X[0]}'`:`${X[0]}' ${X.slice(1).join(" + ")}'`;return{playerName:N,goalTime:F.length===1?Y:`${Y}, ${F.reduce((se,me,ge)=>ge===0?se:`${se}${me}${ge<F.length-1?", ":""}`,"")}`}})}function o(I){return!I||!Array.isArray(I)||I.length===0?"":I.reduce((j,F,W)=>{const U=F.split(" ");let O="";return U.length===3?O=U[2]:U.length===5&&(O=`${U[2]} ${U[3]} ${U[4]}`),O&&(j+=`${O}${W<I.length-1?", ":""}`),j},"")}let l=null,s=null,f=!1,g=null,S=!1;const L=()=>{S=!0},M=()=>{S=!1};function A(){S||(f=!0,g&&clearTimeout(g),g=setTimeout(()=>{f=!1},150))}function z(){const I={root:null,rootMargin:"0px",threshold:.7};l=new IntersectionObserver(W=>{W.forEach(U=>{if(f){s&&clearTimeout(s),s=setTimeout(()=>{v("intersection-changed",U.isIntersecting)},100);return}s&&clearTimeout(s),s=setTimeout(()=>{v("intersection-changed",U.isIntersecting)},50)})},I);const j=$.value;j&&l.observe(j);const F=document.querySelector(".container-main");F&&F.addEventListener("scroll",A,{passive:!0}),document.addEventListener("programmatic-scroll-start",L),document.addEventListener("programmatic-scroll-end",M)}return t.onMounted(()=>{z()}),t.onUnmounted(()=>{l&&l.disconnect();const I=document.querySelector(".container-main");I&&I.removeEventListener("scroll",A),document.removeEventListener("programmatic-scroll-start",L),document.removeEventListener("programmatic-scroll-end",M),s&&clearTimeout(s),g&&clearTimeout(g)}),(I,j)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"coverPage",ref:$,class:"cover",style:t.normalizeStyle(n.value)},[h.value?(t.openBlock(),t.createElementBlock("div",kHe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",LHe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,EHe)])):(t.openBlock(),t.createElementBlock("svg",CHe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam},null,8,NHe)]))])):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createElementBlock("div",OHe,[c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",MHe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,VHe)])):(t.openBlock(),t.createElementBlock("svg",zHe,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam},null,8,PHe)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",AHe,[t.createElementVNode("div",RHe,[j[0]||(j[0]=t.createElementVNode("div",null,"Análisis",-1)),t.createElementVNode("div",null,t.toDisplayString(k.value),1)]),t.createElementVNode("div",UHe,t.toDisplayString(x.value),1)]),h.value?(t.openBlock(),t.createElementBlock("div",FHe,[t.createElementVNode("div",IHe,[t.createElementVNode("div",qHe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",jHe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,WHe)])):(t.openBlock(),t.createElementBlock("svg",DHe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam,opacity:i.value.opacity},null,8,KHe)])),t.createElementVNode("div",BHe,t.toDisplayString(c.value.homeTeam.name),1)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",XHe,[j[1]||(j[1]=t.createStaticVNode('<svg class="ball" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.goalsMinutes),1),j[2]||(j[2]=t.createElementVNode("div",{class:"separator"},null,-1)),j[3]||(j[3]=t.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.totalYellowCards),1),j[4]||(j[4]=t.createElementVNode("svg",{class:"card",width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.homeTeam.totalRedCards),1)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",GHe,[e.isPostMatch?(t.openBlock(),t.createElementBlock("div",ZHe,t.toDisplayString(p.value[0])+" : "+t.toDisplayString(p.value[1]),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",JHe,[t.createElementVNode("div",HHe,[c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",YHe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,QHe)])):(t.openBlock(),t.createElementBlock("svg",$He,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam,opacity:i.value.opacity},null,8,eYe)])),t.createElementVNode("div",tYe,t.toDisplayString(c.value.awayTeam.name),1)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",rYe,[t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.totalYellowCards),1),j[5]||(j[5]=t.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.367188",y:"0.09375",width:"9.14286",height:"13.7143",rx:"2.28571",fill:"#F7C330"})],-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.totalRedCards),1),j[6]||(j[6]=t.createElementVNode("svg",{width:"10",height:"14",viewBox:"0 0 10 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{x:"0.109375",y:"0.09375",width:"9.14286",height:"13.7143",rx:"1.82857",fill:"#FF0000"})],-1)),j[7]||(j[7]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(c.value.awayTeam.goalsMinutes),1),j[8]||(j[8]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1))])):t.createCommentVNode("",!0)])])):(t.openBlock(),t.createElementBlock("div",aYe,[t.createElementVNode("div",nYe,[t.createElementVNode("div",iYe,[c.value.homeTeam.logo?(t.openBlock(),t.createElementBlock("div",oYe,[t.createElementVNode("img",{src:c.value.homeTeam.logo||"/default-logo.png",alt:"Team 1 Logo"},null,8,sYe)])):(t.openBlock(),t.createElementBlock("svg",lYe,[t.createElementVNode("path",{d:"M80.0068 0.953125C80.0068 0.953125 91.0143 12.208 118.141 12.9913C140.898 13.6509 149.102 7.87917 149.102 7.87917C149.102 7.87917 169.839 67.5339 135.786 117.212C117.894 143.308 83.5935 160.211 79.9656 160.953C76.3789 160.211 42.0372 143.308 24.1449 117.212C-9.8257 67.5339 10.9112 7.87917 10.9112 7.87917C10.9112 7.87917 19.1153 13.6509 41.8723 12.9913C68.9993 12.208 80.0068 0.953125 80.0068 0.953125Z",fill:i.value.homeTeam,opacity:i.value.opacity},null,8,cYe)])),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",uYe,t.toDisplayString(p.value[0]),1)):t.createCommentVNode("",!0)]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",dYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value.homeTeam.goalsEvents,(F,W)=>(t.openBlock(),t.createElementBlock("div",{key:`goal-${W}`,class:"goal"},[t.createElementVNode("div",null,t.toDisplayString(F.playerName),1),j[9]||(j[9]=t.createElementVNode("div",{class:"bullet"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(F.goalTime),1),j[10]||(j[10]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1))]))),128))])):t.createCommentVNode("",!0)]),j[13]||(j[13]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",pYe,[t.createElementVNode("div",hYe,[e.isPostMatch?(t.openBlock(),t.createElementBlock("div",fYe,t.toDisplayString(p.value[1]),1)):t.createCommentVNode("",!0),c.value.awayTeam.logo?(t.openBlock(),t.createElementBlock("div",mYe,[t.createElementVNode("img",{src:c.value.awayTeam.logo||"/default-logo.png",alt:"Team 2 Logo"},null,8,yYe)])):(t.openBlock(),t.createElementBlock("svg",gYe,[t.createElementVNode("path",{d:"M80.8504 0.953125C80.8504 0.953125 92.9822 3.39499 119.261 10.1779C144.106 16.5733 152.827 19.1314 152.827 19.1314C152.827 19.1314 156.936 44.2089 145.657 90.5655C136.548 127.969 106.742 152.038 80.8504 160.953C54.9977 152.038 25.1527 128.007 16.0442 90.5655C4.8039 44.2477 8.91243 19.1314 8.91243 19.1314C8.91243 19.1314 17.6334 16.5733 42.4783 10.1779C68.7574 3.39499 80.8504 0.953125 80.8504 0.953125Z",fill:i.value.awayTeam,opacity:i.value.opacity},null,8,vYe)]))]),e.isPostMatch?(t.openBlock(),t.createElementBlock("div",bYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value.awayTeam.goalsEvents,(F,W)=>(t.openBlock(),t.createElementBlock("div",{key:`goal-a-${W}`,class:"goal"},[j[11]||(j[11]=t.createStaticVNode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6680cbcf><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-6680cbcf></path></svg>',1)),t.createElementVNode("div",null,t.toDisplayString(F.goalTime),1),j[12]||(j[12]=t.createElementVNode("div",{class:"bullet"},null,-1)),t.createElementVNode("div",null,t.toDisplayString(F.playerName),1)]))),128))])):t.createCommentVNode("",!0)])]))],4))}},_Ye=t2(xYe,[["__scopeId","data-v-6680cbcf"]]),wYe={class:"table-category-filters"},TYe={key:0,class:"custom-radio-group filter-inline"},SYe={class:"radio-label"},kYe={class:"radio-options"},LYe=["name","value","onUpdate:modelValue","onClick"],EYe=["data-filter-type","onClick","onMousedown","onMouseup"],CYe={class:"select-display"},NYe={class:"select-label"},OYe={key:0,class:"dropdown-menu type-menu simple-select-menu"},MYe={class:"simple-select-scroll-area"},VYe=["onClick"],zYe={class:"option-content"},PYe={class:"option-title"},AYe={key:0,class:"option-checkmark"},RYe={key:2,class:"filter-separator"},UYe={__name:"TableCategoryFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:13}},emits:["filters-changed","filter-updated"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=(S,L)=>{if(!L)return!0;for(let M=0;M<S.length;M++)if(!p(S[M],L[M]))return!0;return!1},p=(S,L)=>{if(Array.isArray(S)&&Array.isArray(L)){if(S.length!==L.length)return!1;for(let M=0;M<S.length;M++)if(S[M]!==L[M])return!1;return!0}return S===L},c=t.ref(null),n=t.ref([]);let k=!1,T=null;const x=()=>{T=null},d=()=>{setTimeout(()=>{k=!1},1e3)},o=(S,L=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]&&v.filters[1].options){const M=v.filters[0].options,A=v.filters[1].options;S!=null?M.findIndex(z=>z.value===S)!==-1&&A[S]?(n.value=A[S],L&&!(()=>{const z=h.value[1];return z==null?!1:Array.isArray(z)?z.length>0:z!==""})()&&!k&&n.value.length>0&&(h.value[1]=n.value[0].value,t.nextTick(()=>{}))):(n.value=[],h.value[1]=null):(n.value=[],h.value[1]=null)}},l=()=>{v.initialValues&&v.initialValues.length>0?h.value=[...v.initialValues]:h.value=v.filters.map(S=>{var L,M,A,z;return S.type==="select"?[]:S.type==="check"?!1:S.type==="radio-button"?((M=(L=S.options)==null?void 0:L[0])==null?void 0:M.value)||null:S.type==="select-simple"&&((z=(A=S.options)==null?void 0:A[0])==null?void 0:z.value)||null}),v.componentId===13&&h.value.some(S=>S!=null&&(Array.isArray(S)?S.length>0:S!==!1&&S!==""))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};l(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!k){const S=!(()=>{const L=h.value[1];return L==null?!1:Array.isArray(L)?L.length>0:L!==""})();o(h.value[0],S)}})},300),t.watch(()=>v.initialValues,S=>{const L=!p(h.value,S),M=S&&S.length>0&&!k&&L,A=v.isEditMode&&k;M&&!A?h.value=[...S]:k?T&&T.length>0&&(h.value=[...T]):A&&T&&T.length>0&&(h.value=[...T])},{deep:!0}),t.watch(()=>v.isEditMode,(S,L)=>{L===!0&&S===!1&&x()},{immediate:!0}),t.watch(h,(S,L)=>{S.some(M=>M!=null&&(Array.isArray(M)?M.length>0:M!==!1&&M!==""))&&i(S,u)&&(u=[...S],$("filters-changed",{componentId:v.componentId,filters:S,timestamp:new Date().toISOString()}))},{deep:!0,flush:"post"}),t.watch(()=>h.value[0],(S,L)=>{S!==L&&L!==void 0?o(S,!0):L===void 0&&S!==null&&S!==void 0&&o(S,!1)},{immediate:!0}),t.watch(()=>h.value,(S,L)=>{v.filters.map((M,A)=>M.type==="radio-button"?A:-1).filter(M=>M!==-1).forEach(M=>{})},{deep:!0}),t.watch(n,()=>{},{deep:!0});const s=S=>{c.value===S?c.value=null:c.value=S},f=(S,L)=>{if(k=!0,d(),h.value[S]=L,(S===0||S===1)&&(T=[...h.value]),c.value=null,S===0){h.value[1]!==void 0&&(h.value[1]=null);const M=k;k=!1,o(L,!0),k=M,h.value[1]!==null&&h.value[1]!==void 0&&(T=[...h.value])}},g=()=>{k=!0,setTimeout(()=>{k=!1},1e3)};return r({getCurrentValues:()=>h.value,initializeValues:l}),(S,L)=>(t.openBlock(),t.createElementBlock("div",wYe,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(M,A)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:A},[M.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",TYe,[t.createElementVNode("div",SYe,t.toDisplayString(M.label),1),t.createElementVNode("div",kYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.options,z=>(t.openBlock(),t.createElementBlock("label",{key:z.value,class:t.normalizeClass(["radio-option-card",{active:h.value[A]===z.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"table-radio-"+A,value:z.value,"onUpdate:modelValue":I=>h.value[A]=I,onChange:L[0]||(L[0]=()=>{g()}),onClick:I=>console.log("Click en radio button",A,z.value,"Valor actual:",h.value[A])},null,40,LYe),[[t.vModelRadio,h.value[A]]]),t.createElementVNode("span",null,t.toDisplayString(z.label),1)],2))),128))])])):M.type==="select-simple"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"custom-select dynamic-select filter-inline","data-filter-type":M.type,onClick:t.withModifiers(z=>s(A),["stop"]),onMousedown:z=>console.log("Mouse down en selector",A),onMouseup:z=>console.log("Mouse up en selector",A)},[t.createElementVNode("div",CYe,[L[2]||(L[2]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",NYe,t.toDisplayString(M.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:c.value===A}])},[...L[1]||(L[1]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),c.value===A?(t.openBlock(),t.createElementBlock("div",OYe,[t.createElementVNode("div",MYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(A===1?n.value:M.options,z=>(t.openBlock(),t.createElementBlock("div",{key:z.value,class:t.normalizeClass(["option-card simple-select-option",{active:p(h.value[A],z.value)}]),onClick:t.withModifiers(I=>f(A,z.value),["stop"])},[t.createElementVNode("div",zYe,[t.createElementVNode("div",PYe,t.toDisplayString(z.label),1)]),p(h.value[A],z.value)?(t.openBlock(),t.createElementBlock("div",AYe,[...L[3]||(L[3]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,VYe))),128))])])):t.createCommentVNode("",!0)],40,EYe)):t.createCommentVNode("",!0),A===1&&e.filters.length>2?(t.openBlock(),t.createElementBlock("div",RYe)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},FYe=t2(UYe,[["__scopeId","data-v-9d00f072"]]),IYe={class:"strengths-filters"},qYe={key:0,class:"custom-radio-group filter-inline"},jYe={class:"radio-label"},WYe={class:"radio-options"},DYe=["name","value","onUpdate:modelValue"],KYe={class:"filter-inline select-with-label"},BYe=["data-filter-type","onClick"],XYe={class:"select-display"},GYe={class:"select-label"},ZYe={key:0,class:"dropdown-menu type-menu simple-select-menu"},JYe={class:"simple-select-scroll-area"},HYe=["onClick"],YYe={class:"option-content"},QYe={class:"option-title"},$Ye={key:0,class:"option-checkmark"},eQe={key:2,class:"filter-separator"},tQe={__name:"StrengthsFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:15}},emits:["filters-changed","filter-updated"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=t.ref(null),p=t.ref([]);let c=!1,n=null;const k=(s,f)=>{if(Array.isArray(s)&&Array.isArray(f)){if(s.length!==f.length)return!1;for(let g=0;g<s.length;g++)if(s[g]!==f[g])return!1;return!0}return s===f},T=(s,f=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]&&v.filters[1].options){const g=v.filters[0].options,S=v.filters[1].options;s!=null?g.findIndex(L=>L.value===s)!==-1&&S[s]?(p.value=S[s],f&&!(()=>{const L=h.value[1];return L==null?!1:Array.isArray(L)?L.length>0:L!==""})()&&!c&&p.value.length>0&&(h.value[1]=p.value[0].value,t.nextTick(()=>{}))):(p.value=[],h.value[1]=null):(p.value=[],h.value[1]=null)}},x=()=>{if(v.initialValues&&v.initialValues.length>0){const f=v.initialValues.length>0&&(typeof v.initialValues[0]=="number"||typeof v.initialValues[0]=="boolean"||v.initialValues[0]===null||Array.isArray(v.initialValues[0]));console.log("StrengthsFilters initializeValues - isSimpleFormat:",f),f?(console.log("StrengthsFilters initializeValues - Usando formato simple, valores:",v.initialValues),h.value=[...v.initialValues]):v.isEditMode?h.value=v.filters.map((g,S)=>{var L,M,A,z,I,j,F,W,U,O;const X=v.initialValues[S];if(console.log(`StrengthsFilters initializeValues - filter[${S}]:`,g==null?void 0:g.type,"filterData:",X),!X)return console.log(`StrengthsFilters initializeValues - No hay filterData para índice ${S}, usando valor por defecto`),g.type==="select"?[]:g.type==="check"?!1:g.type==="radio-button"?((M=(L=g.options)==null?void 0:L[0])==null?void 0:M.value)||null:g.type==="select-simple"&&((z=(A=g.options)==null?void 0:A[0])==null?void 0:z.value)||null;if(g.type==="radio-button"&&X.selectedOption){console.log("StrengthsFilters initializeValues - filterData.selectedOption: ",X.selectedOption,"index:",S);const N=X.selectedOption.value;return console.log("StrengthsFilters initializeValues - selectedValue extraído:",N),N}else{if(g.type==="radio-button"&&!X.selectedOption)return console.log("StrengthsFilters initializeValues - filterData NO tiene selectedOption:",X,"index:",S),X.selectedValue!==void 0?(console.log("StrengthsFilters initializeValues - Usando selectedValue:",X.selectedValue),X.selectedValue):(console.log("StrengthsFilters initializeValues - Usando valor por defecto del filter"),((j=(I=g.options)==null?void 0:I[0])==null?void 0:j.value)||null);if(g.type==="select-simple"&&X.selectedValue!==void 0)return Array.isArray(X.selectedValue)?X.selectedValue[0]:X.selectedValue;if(g.type==="select"&&X.selectedOptions)return X.selectedOptions.map(N=>N.value);if(g.type==="check"&&X.isChecked!==void 0)return X.isChecked}return X.selectedValue!==void 0?X.selectedValue:g.type==="select"?[]:g.type==="check"?!1:g.type==="radio-button"?((W=(F=g.options)==null?void 0:F[0])==null?void 0:W.value)||null:g.type==="select-simple"&&((O=(U=g.options)==null?void 0:U[0])==null?void 0:O.value)||null}):h.value=[...v.initialValues]}else h.value=v.filters.map(f=>{var g,S,L,M;return f.type==="select"?[]:f.type==="check"?!1:f.type==="radio-button"?((S=(g=f.options)==null?void 0:g[0])==null?void 0:S.value)||null:f.type==="select-simple"&&((M=(L=f.options)==null?void 0:L[0])==null?void 0:M.value)||null});console.log("StrengthsFilters initializeValues - selectedValues.value final:",h.value);const s=h.value.some(f=>f!=null&&(Array.isArray(f)?f.length>0:f!==!1&&f!==""));console.log("StrengthsFilters initializeValues - hasValidValues:",s),s&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};x(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!c){const s=!(()=>{const f=h.value[1];return f==null?!1:Array.isArray(f)?f.length>0:f!==""})();T(h.value[0],s)}})},300),t.watch(()=>v.initialValues,(s,f)=>{if(!s||s.length===0)return;console.log("StrengthsFilters watch initialValues - newValues:",s),console.log("StrengthsFilters watch initialValues - oldValues:",f),console.log("StrengthsFilters watch initialValues - props.isEditMode:",v.isEditMode),console.log("StrengthsFilters watch initialValues - isUserInteracting:",c);const g=s.length>0&&(typeof s[0]=="number"||typeof s[0]=="boolean"||s[0]===null||Array.isArray(s[0]));console.log("StrengthsFilters watch initialValues - isSimpleFormat:",g);const S=!k(h.value,s),L=s&&s.length>0&&!c&&S,M=v.isEditMode&&c;console.log("StrengthsFilters watch initialValues - valuesAreDifferent:",S,"shouldUpdate:",L,"isEditModeProtection:",M),L&&!M?g?(console.log("StrengthsFilters watch initialValues - Usando formato simple, valores:",s),h.value=[...s]):v.isEditMode?h.value=v.filters.map((A,z)=>{const I=s[z];if(!I)return console.log("StrengthsFilters watch initialValues - No hay filterData para índice",z),h.value[z];if(A.type==="radio-button"&&I.selectedOption){console.log("StrengthsFilters watch initialValues - filterData.selectedOption: ",I.selectedOption,"index:",z);const j=I.selectedOption.value;return console.log("StrengthsFilters watch initialValues - selectedValue extraído:",j),j}else{if(A.type==="select-simple"&&I.selectedValue!==void 0)return Array.isArray(I.selectedValue)?I.selectedValue[0]:I.selectedValue;if(A.type==="select"&&I.selectedOptions)return I.selectedOptions.map(j=>j.value);if(A.type==="check"&&I.isChecked!==void 0)return I.isChecked}return I.selectedValue!==void 0?I.selectedValue:h.value[z]}):h.value=[...s]:c?n&&n.length>0&&(h.value=[...n]):M&&n&&n.length>0&&(h.value=[...n])},{deep:!0}),t.watch(()=>v.isEditMode,(s,f)=>{f===!0&&s===!1&&(n=null)},{immediate:!0}),t.watch(h,s=>{s.some(f=>f!=null&&(Array.isArray(f)?f.length>0:f!==!1&&f!==""))&&(()=>{if(!u)return!0;for(let f=0;f<s.length;f++)if(!k(s[f],u[f]))return!0;return!1})()&&(u=[...s],$("filters-changed",{componentId:v.componentId,filters:s,timestamp:new Date().toISOString()}))},{deep:!0,flush:"post"}),t.watch(()=>h.value[0],(s,f)=>{s!==f&&f!==void 0?T(s,!0):f===void 0&&s!==null&&s!==void 0&&T(s,!1)},{immediate:!0});const d=s=>{i.value===s?i.value=null:i.value=s},o=(s,f)=>{if(c=!0,setTimeout(()=>{c=!1},1e3),h.value[s]=f,(s===0||s===1)&&(n=[...h.value]),i.value=null,s===0){h.value[1]!==void 0&&(h.value[1]=null);const g=c;c=!1,T(f,!0),c=g,h.value[1]!==null&&h.value[1]!==void 0&&(n=[...h.value])}},l=()=>{c=!0,setTimeout(()=>{c=!1},400)};return r({getCurrentValues:()=>h.value,initializeValues:x}),(s,f)=>(t.openBlock(),t.createElementBlock("div",IYe,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(g,S)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:S},[g.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",qYe,[t.createElementVNode("div",jYe,t.toDisplayString(g.label),1),t.createElementVNode("div",WYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,L=>(t.openBlock(),t.createElementBlock("label",{key:L.value,class:t.normalizeClass(["radio-option-card",{active:h.value[S]===L.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"strengths-radio-"+S,value:L.value,"onUpdate:modelValue":M=>h.value[S]=M,onChange:l},null,40,DYe),[[t.vModelRadio,h.value[S]]]),t.createElementVNode("span",null,t.toDisplayString(L.label),1)],2))),128))])])):g.type==="select-simple"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[f[4]||(f[4]=t.createElementVNode("div",{class:"filter-separator"},null,-1)),t.createElementVNode("div",KYe,[f[3]||(f[3]=t.createElementVNode("div",{class:"radio-label"},"Mostrar: ",-1)),t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline","data-filter-type":g.type,onClick:t.withModifiers(L=>d(S),["stop"])},[t.createElementVNode("div",XYe,[f[1]||(f[1]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",GYe,t.toDisplayString(g.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:i.value===S}])},[...f[0]||(f[0]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),i.value===S?(t.openBlock(),t.createElementBlock("div",ZYe,[t.createElementVNode("div",JYe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,L=>(t.openBlock(),t.createElementBlock("div",{key:L.value,class:t.normalizeClass(["option-card simple-select-option",{active:k(h.value[S],L.value)}]),onClick:t.withModifiers(M=>o(S,L.value),["stop"])},[t.createElementVNode("div",YYe,[t.createElementVNode("div",QYe,t.toDisplayString(L.label),1)]),k(h.value[S],L.value)?(t.openBlock(),t.createElementBlock("div",$Ye,[...f[2]||(f[2]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,HYe))),128))])])):t.createCommentVNode("",!0)],8,BYe)])],64)):t.createCommentVNode("",!0),S===1&&e.filters.length>2?(t.openBlock(),t.createElementBlock("div",eQe)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},rQe=t2(tQe,[["__scopeId","data-v-4c3876bd"]]),aQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},nQe={key:1},iQe={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oQe=["fill"],sQe={key:0,class:"checkbox__teams"},lQe={class:"checkbox__teams__logo"},cQe=["src"],uQe={class:"checkbox__teams__logo"},dQe=["src"],pQe={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",nQe,[(t.openBlock(),t.createElementBlock("svg",iQe,[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,oQe)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",sQe,[t.createElementVNode("div",lQe,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,cQe)]),t.createElementVNode("div",uQe,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,dQe)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},iA=aQe(pQe,[["__scopeId","data-v-b6f124d8"]]),hQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},oA={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))}}},FZ=()=>{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}))},IZ=oA.setup;oA.setup=IZ?(e,r)=>(FZ(),IZ(e,r)):FZ;const fQe=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),mQe=["src"],yQe={key:1,class:"text"},gQe=["src"],vQe={class:"stats"},bQe=fQe(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xQe={class:"numstats"},_Qe={class:"leyend"};function wQe(e,r,a,v,$,h){return t.openBlock(),t.createElementBlock("div",null,[a.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",$.status&&a.typeOnOff&&"button-active"]),style:t.normalizeStyle([h.customStyle,$.status&&a.typeOnOff&&h.customActive]),onClick:r[0]||(r[0]=(...u)=>h.btnClick&&h.btnClick(...u))},[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,mQe)):t.createCommentVNode("",!0),a.textValue?(t.openBlock(),t.createElementBlock("div",yQe,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,gQe)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),a.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...u)=>h.btnClick&&h.btnClick(...u))},[t.createElementVNode("div",vQe,[bQe,t.createElementVNode("div",xQe,t.toDisplayString(a.textStat),1)]),t.createElementVNode("div",_Qe,t.toDisplayString(a.textCategory),1)])):t.createCommentVNode("",!0)])}const TQe=hQe(oA,[["render",wQe],["__scopeId","data-v-f3ee6b2b"]]),SQe={class:"gsc-dropdown__main-container__item-selected"},kQe=["height","width"],LQe=["stroke"],EQe={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},CQe=["fill"],NQe={class:"gsc-dropdown__items-container"},OQe=["onClick"],MQe={key:0,class:"gsc-dropdown__items-footer"},$k={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(r=>r in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(e){return[1,2].includes(e)}}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:r}){const a=e,v=t.ref({}),$=t.ref(null),h=t.ref(a.isMultipleOption?-1:0),u=t.ref(!1);t.watch(()=>a.items,(x,d)=>{if(!a.modelValue&&(!a.onlyFirstTime||!d||!d.length)&&x&&x.length){if(a.defaultItemByProp){const o=a.items.findIndex(l=>l[a.defaultItemByProp.propName]===a.defaultItemByProp.value);o!==-1?(h.value=o,v.value=x[o]):(h.value=0,v.value=x[0])}else v.value=x[a.defaultItemByIndex];r("input",v.value)}},{immediate:!0}),t.watch(()=>a.modelValue,x=>{if(x){const d=a.items.findIndex(o=>typeof x=="object"?JSON.stringify(o)===JSON.stringify(x):o===x);d!==-1&&(h.value=d,v.value=a.items[d],r("update:modelValue",v.value))}},{immediate:!0});const i=t.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),p=t.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(u.value=!u.value)}function n(x){$.value&&!$.value.contains(x.target)&&(u.value=!1)}function k(x,d){a.isMultipleOption?h.value=-1:(h.value=d,u.value=!1),v.value=x,r("input",v.value),r("update:modelValue",v.value)}function T(){u.value=!1,r("click-ready")}return t.onMounted(()=>{document.addEventListener("click",n)}),t.onBeforeMount(()=>{document.removeEventListener("click",n)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"dropDown",ref:$,class:"gsc-dropdown",style:t.normalizeStyle(i.value)},[t.createElementVNode("div",{class:"gsc-dropdown__main-container",style:t.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[t.createElementVNode("div",SQe,[t.renderSlot(x.$slots,"default",{selectedItem:v.value})]),t.createElementVNode("div",{class:t.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":u.value}]),style:t.normalizeStyle(p.value)},[e.iconType===1?(t.openBlock(),t.createElementBlock("svg",{key:0,height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,LQe)],8,kQe)):(t.openBlock(),t.createElementBlock("svg",EQe,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,CQe)]))],6)],4),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",NQe,[t.createElementVNode("div",null,[t.createElementVNode("div",{class:"gsc-dropdown__items",style:t.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["gsc-dropdown__items__item",{selected:l===h.value}]),key:l,onClick:s=>k(o,l)},[t.renderSlot(x.$slots,"availableItem",{item:o})],10,OQe)),[[t.vShow,!o.isHidden]])]))),256))],4),e.isFooterVisible?(t.openBlock(),t.createElementBlock("div",MQe,[t.createVNode(t.unref(TQe),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:T})])):t.createCommentVNode("",!0)])],512),[[t.vShow,u.value]])]),_:3})],4))}},sA={borderType:"solid",listBackgroundColor:"#2E3B46",listBorderColor:"rgba(255, 255, 255, 0.2)",listBorderRadius:"5px",height:"38px",borderWidth:.8,borderColor:"rgba(255, 255, 255, 0.2)",backgroundColor:"#2E3B46",color:"white",listItemColor:"white",listItemSelectedBackgroundColor:"#2E3B46",arrowColor:"#fff",width:"100%",listHeight:"200px",isListSameWidth:!1,isFooterVisible:!1,hoverBackgroundColor:"#2E3B46",iconType:2},VQe=[{label:"Goles recibidos",value:{name:"Goles recibidos",color:"#336DFF",points:[1,2,3],categories:[40],invert:[57,326,56,60,59,55],negative:!1,translationKey:"chalkboard.defensive.team.goals_received",singleName:"Gol recibido"}},{label:"Tiros a gol recibidos",value:{name:"Tiros a gol recibidos",color:"#7ED321",points:[1,2,3],categories:["510_r"],invert:[510],negative:!1,translationKey:"chalkboard.defensive.team.shots_on_goal_received",singleName:"Tiro a gol recibido"}},{label:"Tiros a gol recibidos (portería)",value:{name:"Tiros a gol recibidos (portería)",color:"#990BFF",points:[1,2,3],categories:["537_r","540_r","544_r","547_r"],invert:[537,540,544,547],negative:!1,translationKey:"chalkboard.defensive.team.shots_on_goal_received",singleName:"Tiro a gol recibido"}},{label:"Centros totales recibidos",value:{name:"Centros totales recibidos",color:"#FF9226",points:[1,2,3],categories:["13_r","25_r"],invert:[13,25],negative:!1,translationKey:"chalkboard.defensive.team.total_centers_received",singleName:"Centro recibido"}},{label:"Centros acertados por el rival",value:{name:"Centros acertados por el rival",color:"#28A3B2",points:[1,2,3],categories:["98_r","101_r","104_r","105_r","109_r","112_r","115_r","116_r"],invert:[98,101,104,105,109,112,115,116],negative:!1,translationKey:"chalkboard.defensive.team.successful_centers_by_opponent",singleName:"Centro acertado"}},{label:"Fuera de lugar provocados",value:{name:"Fuera de lugar provocados",color:"#00DD00",points:[1,2,3],categories:["33_r"],invert:[33],negative:!1,translationKey:"chalkboard.defensive.team.offsides_caused",singleName:"Fuera de lugar"}},{label:"Balones recuperados (en disputa)",value:{name:"Balones recuperados (en disputa)",color:"#FF3399",points:[1,2,3],categories:[483],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_recovered_in_challenge",singleName:"Balón recuperado",isDefaultSelected:!0}},{label:"Balones recuperados (sin disputa)",value:{name:"Balones recuperados (sin disputa)",color:"#B4005A",points:[1,2,3],categories:[484],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_recovered_without_challenge",singleName:"Balón recuperado"}},{label:"1 vs 1 exitosos defensivos",value:{name:"1 vs 1 exitosos defensivos",color:"#3A3838",points:[1],categories:[5],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.successful_1_on_1",singleName:"1 vs 1 defensivo"}},{label:"1 vs 1 no exitosos defensivos",value:{name:"1 vs 1 no exitosos defensivos",color:"#008B31",points:[1],categories:[209],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.unsuccessful_1_on_1",singleName:"1 vs 1 defensivo"}},{label:"Balones ganados en área propia",value:{name:"Balones ganados en área propia",color:"#305496",points:[1,2],categories:[23],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.balls_won_own_penalty_box",singleName:"Balón ganado"}},{label:"Juego aéreo resto del campo",value:{name:"Juego aéreo resto del campo",color:"#FF8A4C",points:[1,2,3],categories:[24],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.arial_game_rest_pitch",singleName:"Juego aéreo"}},{label:"Barridas",value:{name:"Barridas",color:"#700000",points:[1],categories:[518],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.slide_tackles",singleName:"Barrida"}},{label:"Rechaces",value:{name:"Rechaces",color:"#CC0000",points:[1,2,3],categories:[34],invert:[],negative:!1,translationKey:"chalkboard.defensive.team.clearances",singleName:"Rechace"}}],zQe=[{label:"Goles",value:{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,"35_r","54_r"],invert:[35,54],negative:!1,translationKey:"chalkboard.offensive.team.goals",singleName:"Gol",isDefaultSelected:!0}},{label:"Tiros a gol",value:{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[510],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.shots_on_goal",singleName:"Tiro a gol",isDefaultSelected:!1}},{label:"Tiros a gol (portería)",value:{name:"Tiros a gol (portería)",color:"#990BFF",points:[1,2,3],categories:[537,540,544,547],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.shots_on_goal_2",singleName:"Tiro a gol (portería)",isDefaultSelected:!1}},{label:"Centros totales",value:{name:"Centros totales",color:"#FF9226",points:[1,2,3],categories:[13,25],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.center_crosses",singleName:"Centro",isDefaultSelected:!1}},{label:"Centros acertados",value:{name:"Centros acertados",color:"#28A3B2",points:[1,2,3],categories:[98,101,104,105,109,112,115,116],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.successful_center_crosses",singleName:"Centro acertado",isDefaultSelected:!1}},{label:"Balones ganados en área rival",value:{name:"Balones ganados en área rival",color:"#FF0092",points:[1,2],categories:[11],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.balls_won_opponent_penalty_box",singleName:"Balón ganado",isDefaultSelected:!1}},{label:"1vs1 exitosos ofensivos",value:{name:"1vs1 exitosos ofensivos",color:"#3A3838",points:[1],categories:[4],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.successful_1_on_1_attacking",singleName:"1 vs 1 ofensivo",isDefaultSelected:!1}},{label:"1vs1 no exitosos ofensivos",value:{name:"1vs1 no exitosos ofensivos",color:"#008B31",points:[1],categories:[208],invert:[],negative:!1,translationKey:"chalkboard.offensive.team.unsuccessful_1_on_1_attacking",singleName:"1 vs 1 ofensivo",isDefaultSelected:!1}},{label:"Remates con cabeza",value:{name:"Remates con cabeza",color:"#B4005A",points:[1,2,3],categories:[330,331,333,334,423,424,343,344],invert:[],negative:!1,translationKey:"",singleName:"Remate con cabeza",isDefaultSelected:!1}},{label:"Balón perdido en disputa",value:{name:"Balón perdido en disputa",color:"#9C08B0",points:[1,2,3],categories:[494],invert:[],negative:!1,translationKey:"",singleName:"Balón perdido en disputa",isDefaultSelected:!1}},{label:"Balón perdido sin disputa",value:{name:"Balón perdido sin disputa",color:"#700000",points:[1,2,3],categories:[495],invert:[],negative:!1,translationKey:"",singleName:"Balón perdido sin disputa",isDefaultSelected:!1}}],PQe={class:"last-touch"},AQe={class:"selected-item"},RQe={class:"available-item"},UQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},FQe={class:"selected-item"},IQe={class:"available-item"},qQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jQe={key:1},WQe={class:"selected-item"},DQe={class:"available-item"},KQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},BQe={class:"last-touch__how-many-games"},XQe={class:"selected-item"},GQe={class:"available-item"},ZQe={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},JQe={__name:"FilterLastTouch",props:{viewConfig:{type:Object,default:()=>({})},isEditMode:{type:Boolean,default:!1},defaultFilters:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!0}},emits:["change","remove-views"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([{label:"Ofensivo",value:2,name:"offensive"},{label:"Defensivo",value:3,name:"defensive"}]),h=t.ref({id:0,name:"Fases de juego",value:null}),u=t.ref(!1),i=t.ref([{id:1,name:"Último partido",value:1},{id:3,name:"Últimos 3 partidos",value:3},{id:0,name:"Todos mis partidos",value:0}]),p=t.ref(a.defaultFilters?null:i.value[0]),c=t.ref(null),n=t.computed(()=>({...sA})),k=t.computed(()=>({...sA,isFooterVisible:!a.isEditMode,isMultipleOption:!a.isEditMode})),T=t.computed(()=>{const ge=[];return x.value.options.forEach(be=>{be.forEach(xe=>{ge.push(xe)})}),ge}),x=t.ref(null),d=t.ref(null),o=t.ref(null),l=t.ref(null);t.watch(()=>a.viewConfig,ge=>{ge.filters&&(x.value||s(),d.value||f(),o.value||g(),l.value||A())},{immediate:!0});function s(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="categories");ge&&ge.options&&(x.value={label:ge.label,options:Object.entries(ge.options).reduce((be,[xe,Ae])=>(be.set(Number(xe),Ae),be),new Map)})}x.value={label:"Tipo de jugada",options:new Map([[2,zQe],[3,VQe]])}}function f(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="gamePhases");if(ge){d.value={label:ge.label,options:ge.options};return}}d.value={label:"Fases de juego",options:$.value}}function g(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="teamRadios");if(ge){o.value={options:ge.options},U(null,ge.options[0]);return}}o.value={label:"Equipo",options:a.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]},U(null,o.value.options[0])}const S=t.ref(a.defaultFilters?null:o.value.options[0]),L=t.ref(a.defaultFilters?null:d.value.options[0]),M=t.ref(a.defaultFilters?null:x.value.options.get(L.value.value)[0]);function A(){if(a.viewConfig&&a.viewConfig.filters){const ge=a.viewConfig.filters.find(be=>be.key==="assistZoneCheckbox");if(ge){l.value={label:ge.label},O(ge.value);return}}l.value={label:"Zona de asistencia"}}const z=t.computed(()=>{const ge={selectedGamePhase:L.value,selectedTeam:S.value,isAssistZoneVisible:u.value,howManyGamesSelected:p.value};return a.isEditMode?(ge.selectedCategory=M.value,ge.totalCategoriesSelected=1):(ge.selectedCategories=c.value,ge.totalCategoriesSelected=0,x.value.options.forEach(be=>{be.forEach(xe=>{xe.isSelected&&(ge.totalCategoriesSelected+=1)})})),ge}),I=t.computed(()=>L.value?x.value.options.get(L.value.value)||[]:[]);t.watch(()=>z.value,ge=>{j()&&(console.log("before emit change:",{areAllFiltersFilled:j(),filters:ge,view:a.viewConfig}),v("change",{areAllFiltersFilled:j(),filters:ge,view:a.viewConfig}))},{deep:!0});function j(){return L.value&&(a.isEditMode&&M.value||!a.isEditMode&&c.value&&c.value.length)&&S.value&&p.value}function F(ge){L.value=ge,N(null)}function W(ge){S.value=ge}function U(ge,be){console.log("onChangeRadio:",be.value)}function O(ge){u.value=ge}function X(ge){p.value=ge}function N(ge){M.value=ge}function Y(ge,be){be.isSelected=ge,c.value=T.value.filter(xe=>xe.isSelected)}function se(){a.defaultFilters&&(u.value=a.defaultFilters.isAssistZoneVisible,p.value=i.value.find(ge=>ge.value===a.defaultFilters.howManyGamesSelected.value)||i.value[0],L.value=d.value.options.find(ge=>ge.value===a.defaultFilters.selectedGamePhase.value)||d.value.options[0],S.value=o.value.options.find(ge=>ge.value===(a.defaultFilters.isHomeTeam?1:2))||o.value.options[0],M.value=x.value.options.get(L.value.value).find(ge=>ge.value.name===a.defaultFilters.selectedCategory.name)||x.value.options.get(L.value.value)[0])}function me(){I.value.forEach(ge=>{ge.isSelected=!1}),u.value=!1,p.value=i.value[0],L.value=null,S.value=null,M.value=null,c.value=null}return t.onBeforeUnmount(()=>{me()}),t.onMounted(()=>{setTimeout(()=>{se()},500)}),(ge,be)=>(t.openBlock(),t.createElementBlock("div",PQe,[t.createVNode(t.unref($k),t.mergeProps(n.value,{items:d.value.options,"model-value":L.value,"onUpdate:modelValue":F}),{default:t.withCtx(()=>[t.createElementVNode("div",AQe,[be[0]||(be[0]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(L.value?L.value.label:d.value.label||h.value.name),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",RQe,[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",UQe,[...be[1]||(be[1]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,L.value&&L.value.label===xe.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($k),t.mergeProps(k.value,{items:I.value,"model-value":M.value,"onUpdate:modelValue":N}),{default:t.withCtx(()=>[t.createElementVNode("div",FQe,[be[2]||(be[2]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(x.value.label),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",IQe,[e.isEditMode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",qQe,[...be[3]||(be[3]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,M.value&&M.value.label===xe.label]])])],64)):(t.openBlock(),t.createElementBlock("div",jQe,[t.createVNode(t.unref(iA),{"model-value":xe.isSelected,label:xe.label,"onUpdate:modelValue":Ae=>Y(Ae,xe)},null,8,["model-value","label","onUpdate:modelValue"])]))])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($k),t.mergeProps(n.value,{items:o.value.options,"model-value":S.value,"onUpdate:modelValue":W}),{default:t.withCtx(()=>[t.createElementVNode("div",WQe,[be[4]||(be[4]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(S.value?S.value.label:o.value.label),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",DQe,[t.createElementVNode("div",null,t.toDisplayString(xe.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",KQe,[...be[5]||(be[5]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,S.value&&S.value.label===xe.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref(iA),{"model-value":u.value,label:l.value.label,"onUpdate:modelValue":O},null,8,["model-value","label"]),t.withDirectives(t.createElementVNode("div",BQe,[t.createVNode(t.unref($k),t.mergeProps(n.value,{items:i.value,"model-value":p.value,"onUpdate:modelValue":X}),{default:t.withCtx(()=>[t.createElementVNode("div",XQe,[be[6]||(be[6]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(p.value?p.value.name:"Seleccione"),1)])]),availableItem:t.withCtx(({item:xe})=>[t.createElementVNode("div",GQe,[t.createElementVNode("div",null,t.toDisplayString(xe.name),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",ZQe,[...be[7]||(be[7]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,p.value&&p.value.name===xe.name]])])])]),_:1},16,["items","model-value"])],512),[[t.vShow,!e.isPostMatch]])]))}},HQe=t2(JQe,[["__scopeId","data-v-b006bd89"]]),YQe=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},QQe={__name:"GSC-Menu",props:{menuMarginTop:{type:Number,default:0,validator(e){return!Number.isNaN(e)}},modelValue:{type:Boolean,default:!1},width:{type:String,default:"fit-content"},menuWidth:{type:String,default:"fit-content"},zIndexOpen:{type:Number,default:3},leftMenu:{type:String,default:"unset"}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e;t.useCssVars(x=>({"398d9242":e.width,f164e302:p.value,"4bb88040":e.menuWidth}));const v=t.ref(null),$=t.ref(!1),h=t.ref(null),u=t.ref({}),i=t.computed(()=>{const x={top:"0px","--left-menu":a.leftMenu};if(v.value){const d=v.value.getBoundingClientRect();x.top=`${d.height+a.menuMarginTop}px`}return x}),p=t.computed(()=>$.value?a.zIndexOpen:1);t.watch(()=>a.modelValue,x=>{x!==$.value&&($.value=x)},{immediate:!0}),t.watch($,x=>{x||setTimeout(()=>{u.value["--translate-x"]="0px"},500)});function c(x){const d=window.innerWidth,o=x.boundingClientRect.x,l=x.boundingClientRect.x+x.boundingClientRect.width,s=o<=0?Math.abs(o)+4:l>=d?d-(l+10):0;u.value["--translate-x"]=`${s}px`}function n(){new IntersectionObserver(x=>{x[0].intersectionRatio>0&&c(x[0])}).observe(h.value)}function k(){$.value=!$.value,r("update:modelValue",$.value)}function T(){$.value=!1,r("update:modelValue",$.value)}return t.onMounted(()=>{t.nextTick(()=>{n()})}),(x,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[$.value?(t.openBlock(),t.createElementBlock("div",{key:0,id:"menu-overlay",onClick:T})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"menu-container",style:t.normalizeStyle(u.value)},[t.createElementVNode("div",{ref_key:"trigger",ref:v,class:"menu-container__trigger",onClick:k},[t.renderSlot(x.$slots,"trigger",{},void 0,!0)],512),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{ref_key:"menu",ref:h,class:"menu-container__menu",style:t.normalizeStyle(i.value)},[t.renderSlot(x.$slots,"menu",{},void 0,!0)],4),[[t.vShow,$.value]])]),_:3})],4)],64))}},$Qe=YQe(QQe,[["__scopeId","data-v-18c0df61"]]),Kb={CORNERS_ADVANCED:"cornersAdvanced"},e$e={key:0,class:"button__icon"},t$e={key:0,width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r$e=["stroke"],a$e=["stroke"],n$e=["stroke"],i$e={key:1,width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o$e=["stroke"],s$e=["stroke"],l$e=["fill"],c$e={key:2,width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u$e=["fill"],d$e={key:3,width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p$e=["stroke"],h$e=["stroke"],f$e=["stroke"],m$e=["stroke"],y$e=["stroke"],g$e={key:4,width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v$e={key:5,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b$e={key:6,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x$e={key:7,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_$e={key:8,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w$e={class:"button__text"},T$e={key:0,class:"info-container"},S$e={key:1,style:{width:"20px"}},k$e={width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L$e=["fill"],E$e={__name:"ButtonFilter",props:{isActive:{type:Boolean,default:!1},showBadge:{type:Boolean,default:!0},showBadgeOnFilterFull:{type:Boolean,default:!0},text:{type:String,default:""},infoValue:{type:[String,Number],default:""},filtersTotal:{type:Number,default:0},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"14px"},fontColor:{type:String,default:"white"},infoBackgroundColor:{type:String,default:"#424D58"},infoFontColor:{type:String,default:"#CBEE6B"},infoFontFamily:{type:String,default:"sans-serif"},infoFontSize:{type:String,default:"10px"},infoBorderColor:{type:String,default:"#0D1D29"},infoBorderRadius:{type:String,default:"4px"},infoHeight:{type:String,default:"20px"},infoWidth:{type:String,default:"20px"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#0D1D29"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"#172531"},borderColorActive:{type:String,default:"white"},borderWidth:{type:String,default:"1px"},padding:{type:String,default:"12px"},arrowColor:{type:String,default:"#92929D"},iconColor:{type:String,default:"#92929D"},iconType:{type:String,default:"productivity"},showIcon:{type:Boolean,default:!0}},setup(e){const r=e,a=t.computed(()=>({"--height":r.height,"--width":r.width,"--text-font-family":r.textFontFamily,"--text-font-size":r.textFontSize,"--background-color":r.backgroundColor,"--border-radius":r.borderRadius,"--border-color":r.isActive?r.borderColorActive:r.borderColor,"--border-width":r.borderWidth,"--padding":r.padding,"--font-color":r.fontColor})),v=t.computed(()=>({"--info-background-color":r.infoValue?r.infoBackgroundColor:"transparent","--info-border-color":r.infoValue?r.infoBorderColor:"transparent","--info-border-radius":r.infoBorderRadius,"--info-font-family":r.infoFontFamily,"--info-font-size":r.infoFontSize,"--info-font-color":r.infoFontColor,"--info-height":r.infoHeight,"--info-width":r.infoWidth})),$=t.computed(()=>[Kb.PLAYS_TYPES,Kb.GOLSTATS,Kb.TOURNAMENTS,Kb.PLAYS,Kb.RESULTS,Kb.RESULTS_BY_TIME].includes(r.iconType)),h=t.computed(()=>[Kb.FIELD,Kb.GAMES].includes(r.iconType)),u=t.computed(()=>[Kb.DETAILS,Kb.UNIVERSE].includes(r.iconType)),i=t.computed(()=>[Kb.PERSONAL_DATA].includes(r.iconType)),p=t.computed(()=>[Kb.PRODUCTIVITY].includes(r.iconType)),c=t.computed(()=>(console.log("props.iconType",r.iconType),[Kb.CORNERS_ADVANCED].includes(r.iconType))),n=t.computed(()=>[Kb.HOW_WAS_CORNER].includes(r.iconType)),k=t.computed(()=>[Kb.TAKEN_CORNERS].includes(r.iconType)),T=t.computed(()=>[Kb.ZONE].includes(r.iconType)),x=t.computed(()=>[Kb.WHAT_HAPPENED].includes(r.iconType));return(d,o)=>(t.openBlock(),t.createElementBlock("div",{class:"button",style:t.normalizeStyle(a.value)},[e.showIcon?(t.openBlock(),t.createElementBlock("div",e$e,[i.value?(t.openBlock(),t.createElementBlock("svg",t$e,[t.createElementVNode("path",{d:"M12.6665 16.0001V14.3334C12.6665 13.4494 12.3153 12.6015 11.6902 11.9764C11.0651 11.3513 10.2173 11.0001 9.33323 11.0001H4.33329C3.44925 11.0001 2.60141 11.3513 1.9763 11.9764C1.35119 12.6015 1 13.4494 1 14.3334V16.0001",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,r$e),t.createElementVNode("path",{d:"M6.83329 7.66658C8.67422 7.66658 10.1666 6.17422 10.1666 4.33329C10.1666 2.49237 8.67422 1 6.83329 1C4.99237 1 3.5 2.49237 3.5 4.33329C3.5 6.17422 4.99237 7.66658 6.83329 7.66658Z",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,a$e),t.createElementVNode("path",{d:"M15.164 5.16663V10.1666M17.664 7.66659H12.6641",stroke:e.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,n$e)])):t.createCommentVNode("",!0),$.value||c.value?(t.openBlock(),t.createElementBlock("svg",i$e,[t.createElementVNode("path",{d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:e.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,o$e),t.createElementVNode("path",{d:"M15.9996 16.8727L14.8359 15.7091",stroke:e.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,s$e),t.createElementVNode("path",{d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:e.iconColor,stroke:"#353F47","stroke-width":"0.3"},null,8,l$e)])):t.createCommentVNode("",!0),u.value?(t.openBlock(),t.createElementBlock("svg",c$e,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 0C13.1944 0 17 3.80558 17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0ZM8.49751 1.54553C4.65662 1.54553 1.54297 4.65919 1.54297 8.50008C1.54297 12.341 4.65662 15.4546 8.49751 15.4546C12.3384 15.4546 15.4521 12.341 15.4521 8.50008C15.4521 4.65919 12.3384 1.54553 8.49751 1.54553ZM8.49929 3.09082C8.92605 3.09082 9.27202 3.43678 9.27202 3.86355V8.12198L12.451 10.5945C12.7878 10.8565 12.8485 11.342 12.5865 11.6789C12.3245 12.0157 11.839 12.0764 11.5022 11.8144L8.02488 9.10986C7.83666 8.96347 7.72656 8.73837 7.72656 8.49991V3.86355C7.72656 3.43678 8.07252 3.09082 8.49929 3.09082Z",fill:e.iconColor},null,8,u$e)])):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createElementBlock("svg",d$e,[t.createElementVNode("rect",{x:"1.16772",y:"1.16699",width:"19",height:"15.6667",stroke:e.iconColor},null,8,p$e),t.createElementVNode("rect",{x:"16.1677",y:"6.16699",width:"4",height:"5.66667",stroke:e.iconColor},null,8,h$e),t.createElementVNode("rect",{x:"1.16772",y:"6.16699",width:"4",height:"5.66667",stroke:e.iconColor},null,8,f$e),t.createElementVNode("path",{d:"M10.6677 0.666992V16.5003",stroke:e.iconColor},null,8,m$e),t.createElementVNode("path",{d:"M13.5033 9.00032C13.5033 10.5651 12.2348 11.8337 10.67 11.8337C9.1052 11.8337 7.83667 10.5651 7.83667 9.00032C7.83667 7.43552 9.1052 6.16699 10.67 6.16699C12.2348 6.16699 13.5033 7.43552 13.5033 9.00032Z",stroke:e.iconColor},null,8,y$e)])):t.createCommentVNode("",!0),p.value?(t.openBlock(),t.createElementBlock("svg",g$e,[...o[0]||(o[0]=[t.createElementVNode("path",{d:"M1.85113 13.0897C1.9303 13.2137 2.01739 13.3404 2.10447 13.4617C2.30239 13.7361 2.51878 14 2.74837 14.2507C3.74589 15.3298 5.01785 16.1504 6.41385 16.5963C6.4719 16.6148 6.52996 16.6332 6.58802 16.6491C6.60385 16.6544 6.61704 16.657 6.63024 16.6623C6.70413 16.6834 6.77538 16.7045 6.84927 16.723C7.54859 16.9077 8.27429 17 9.00264 17C9.73098 17 10.4593 16.9077 11.1586 16.7256C11.3064 16.686 11.4542 16.6438 11.5967 16.5989C11.9187 16.496 12.2353 16.372 12.5414 16.2322C12.7895 16.1187 13.0296 15.9921 13.2645 15.8549C14.2963 15.2533 15.2041 14.438 15.9034 13.467C15.9668 13.3799 16.0301 13.2876 16.0908 13.1926C16.1119 13.1609 16.133 13.1293 16.1541 13.095C16.9432 11.8681 17.405 10.4486 17.4868 8.98945C17.4947 8.84169 17.5 8.69393 17.5 8.54618C17.5 8.53034 17.5 8.51715 17.5 8.50132C17.5 6.90765 17.0646 5.37995 16.2386 4.04222C16.1198 3.85224 15.9932 3.66491 15.8612 3.48021C15.8586 3.47493 15.8559 3.4723 15.8533 3.46702C15.8084 3.40633 15.7636 3.34565 15.7161 3.2876C15.6712 3.22955 15.6237 3.1715 15.5789 3.1161C14.6526 1.98417 13.4466 1.10818 12.0928 0.580475C11.9556 0.525066 11.8105 0.474934 11.668 0.42744C10.8103 0.145118 9.91307 0 9.00264 0C8.09221 0 7.19497 0.14248 6.33732 0.424802C6.19482 0.472295 6.04967 0.525066 5.91245 0.577836C4.55604 1.10554 3.35005 1.98417 2.42378 3.11346C2.37364 3.17678 2.32086 3.24011 2.27072 3.30607C2.2285 3.35884 2.18892 3.41161 2.14933 3.46702C2.14933 3.46702 2.14933 3.46966 2.14669 3.4723C2.14669 3.47493 2.14405 3.47757 2.14142 3.48021C1.43418 4.44591 0.94598 5.53034 0.69792 6.68074C0.660975 6.85224 0.626669 7.02639 0.600279 7.20053C0.571251 7.39578 0.547501 7.59103 0.531667 7.78892C0.521111 7.91293 0.513195 8.03694 0.507917 8.16095C0.502639 8.27441 0.5 8.38786 0.5 8.50132V8.61214C0.502639 8.73615 0.507917 8.8628 0.513195 8.98945C0.595002 10.4486 1.05681 11.8681 1.84586 13.0923L1.85113 13.0897ZM1.82738 7.64908C1.82738 7.63325 1.83002 7.62005 1.83266 7.60422C1.84322 7.52771 1.85377 7.45119 1.86433 7.37731C1.86433 7.36412 1.86697 7.35092 1.86961 7.33773C1.8828 7.25594 1.89863 7.1715 1.91447 7.08971C1.91711 7.07124 1.92238 7.05541 1.92502 7.03694C1.94086 6.95778 1.95933 6.87599 1.9778 6.79683V6.78628C1.99891 6.70449 2.02266 6.62269 2.04378 6.5409C2.04905 6.52243 2.05433 6.5066 2.05961 6.48813C2.08336 6.40897 2.10711 6.32718 2.1335 6.24802L2.14142 6.22164C2.16517 6.14776 2.19156 6.07652 2.21794 6.00264C2.22322 5.98681 2.23114 5.97098 2.23642 5.95515C2.26545 5.87863 2.29711 5.79947 2.32878 5.72559C2.33406 5.70976 2.34197 5.69657 2.34725 5.68338C2.37628 5.61478 2.40795 5.54617 2.43962 5.47757C2.44489 5.46702 2.45017 5.45383 2.45545 5.44063C2.48975 5.36676 2.5267 5.29024 2.56628 5.21636C2.5742 5.20053 2.58212 5.1847 2.59267 5.16887C2.63226 5.09499 2.6692 5.02375 2.71143 4.94987V4.94195H2.7167L3.2656 6.63061L1.82738 7.67546C1.82738 7.67546 1.82738 7.65699 1.83002 7.64908H1.82738ZM4.08367 7.6095L5.62745 8.31926L6.52204 11.0712L5.62481 12.1108H2.74309C2.23642 11.2348 1.92238 10.2612 1.81683 9.25594L4.08367 7.6095ZM7.58026 1.41161C7.65942 1.39578 7.74123 1.37995 7.8204 1.36675C7.84151 1.36412 7.86262 1.35884 7.88109 1.3562C7.96026 1.34301 8.03679 1.33245 8.11596 1.32454C8.13971 1.3219 8.16346 1.31926 8.18721 1.31662C8.24791 1.30871 8.30596 1.30343 8.36666 1.29815C8.39305 1.29815 8.42207 1.29288 8.44846 1.29024C8.52235 1.28496 8.59361 1.27968 8.6675 1.27705C8.69916 1.27705 8.73347 1.27441 8.76514 1.27177C8.82319 1.27177 8.88125 1.26913 8.94194 1.26913C8.98153 1.26913 9.01847 1.26913 9.05806 1.26913C9.11611 1.26913 9.17681 1.26913 9.23487 1.27177C9.26653 1.27177 9.30084 1.27177 9.33251 1.27705C9.4064 1.27968 9.48029 1.28496 9.55154 1.29024C9.58057 1.29024 9.60696 1.29551 9.63334 1.29815C9.69404 1.30343 9.75473 1.30871 9.81279 1.31662C9.83654 1.31926 9.86029 1.3219 9.88668 1.32454C9.96585 1.33509 10.045 1.34565 10.1215 1.3562L10.1849 1.36675C10.264 1.37995 10.3459 1.39314 10.425 1.41161C10.4277 1.41161 10.4303 1.41161 10.4356 1.41161H10.4382L9 2.45646L7.56178 1.41161H7.56442C7.56442 1.41161 7.5697 1.41161 7.57234 1.41161H7.58026ZM9.00528 6.56728L11.1138 8.10026L10.3089 10.5805H7.70165L6.89677 8.10026L9.00528 6.56728ZM15.3018 4.94459V4.94987C15.3466 5.02111 15.3862 5.09499 15.4232 5.16887L15.4469 5.21636C15.4839 5.29024 15.5208 5.36676 15.5577 5.44063C15.563 5.45119 15.5683 5.46438 15.5736 5.47493C15.6052 5.54354 15.6369 5.61214 15.6659 5.68338C15.6712 5.69657 15.6791 5.7124 15.6844 5.72559C15.7161 5.80211 15.7478 5.87863 15.7768 5.95778C15.7821 5.97361 15.79 5.98945 15.7953 6.00528C15.8216 6.07916 15.848 6.1504 15.8718 6.22428C15.8744 6.23219 15.8771 6.24011 15.8797 6.25066C15.9061 6.32982 15.9298 6.40897 15.9536 6.49077C15.9589 6.50923 15.9641 6.52771 15.9694 6.54618C15.9905 6.62797 16.0143 6.70976 16.0328 6.78892C16.0328 6.7942 16.0328 6.79683 16.0328 6.80211C16.0512 6.88127 16.0697 6.96042 16.0855 7.03958L16.0961 7.09235C16.1119 7.17414 16.1278 7.25594 16.141 7.33773C16.141 7.35092 16.1462 7.36412 16.1462 7.37731C16.1568 7.45119 16.1673 7.52771 16.1779 7.60422C16.1779 7.62005 16.1805 7.63325 16.1832 7.64908C16.1832 7.65699 16.1832 7.66755 16.1858 7.67546L14.7476 6.63061L15.2965 4.93931L15.3018 4.94459ZM13.9295 7.61214L16.1937 9.25858C16.0882 10.2639 15.7715 11.2401 15.2675 12.1135H12.3858L11.4912 11.0739L12.3858 8.3219L13.9295 7.61214ZM14.3306 13.3879C14.3306 13.3879 14.3254 13.3931 14.3227 13.3958C14.2673 13.4565 14.2093 13.5172 14.1512 13.5752C14.138 13.5884 14.1248 13.6016 14.1116 13.6148C14.0536 13.6728 13.9929 13.7309 13.9322 13.7889C13.9216 13.7995 13.9111 13.81 13.8979 13.8206C13.8424 13.8707 13.7844 13.9235 13.729 13.971C13.7184 13.9789 13.7079 13.9894 13.6973 14C13.634 14.0554 13.5706 14.1055 13.5047 14.1583C13.4888 14.1715 13.473 14.1821 13.4598 14.1953C13.3938 14.2454 13.3278 14.2955 13.2619 14.3456C13.2619 14.3456 13.2566 14.3483 13.2566 14.3509C13.188 14.4011 13.1194 14.4486 13.0481 14.496C13.0323 14.5066 13.0165 14.5172 12.998 14.5277C12.9294 14.5726 12.8581 14.6174 12.7895 14.6623C12.7763 14.6702 12.7658 14.6781 12.7526 14.6834C12.6892 14.723 12.6233 14.7599 12.5573 14.7968C12.5441 14.8048 12.5283 14.8127 12.5151 14.8206C12.4438 14.8602 12.3699 14.8997 12.296 14.9367C12.2802 14.9446 12.2617 14.9525 12.2459 14.9631C12.1746 15 12.1007 15.0343 12.0295 15.0686C12.0242 15.0686 12.0189 15.0739 12.0137 15.0765H12.0084L12.5573 13.3879H14.3306ZM6.00217 15.0765L5.98898 15.0712C5.91509 15.0369 5.8412 15 5.76731 14.9631C5.75147 14.9551 5.73564 14.9472 5.71981 14.9393C5.64592 14.9024 5.57203 14.8628 5.49814 14.8206C5.48494 14.8127 5.47175 14.8048 5.45855 14.7995C5.39258 14.7625 5.32661 14.723 5.26063 14.6834C5.25008 14.6781 5.23688 14.6702 5.22633 14.6623C5.15508 14.6201 5.08646 14.5726 5.01521 14.5277C4.99938 14.5172 4.98355 14.5066 4.96771 14.496C4.89646 14.4486 4.82785 14.4011 4.75924 14.3509H4.75396C4.68799 14.2982 4.61937 14.248 4.5534 14.1953C4.53757 14.1821 4.52437 14.1715 4.50854 14.1583C4.44256 14.1055 4.37923 14.0554 4.3159 14C4.30534 13.9894 4.29478 13.9815 4.28159 13.971C4.22353 13.9208 4.16812 13.8707 4.1127 13.8206C4.10214 13.81 4.08895 13.7995 4.07839 13.7889C4.0177 13.7335 3.957 13.6755 3.89894 13.6148C3.88575 13.6016 3.87256 13.5884 3.85936 13.5752C3.8013 13.5172 3.74589 13.4591 3.69047 13.3984C3.68783 13.3958 3.68519 13.3931 3.67991 13.3879H5.45328L6.00217 15.0765C6.00217 15.0765 5.99954 15.0765 5.9969 15.0765H6.00217ZM7.50636 15.5726L6.63552 12.8971L7.53012 11.8602H10.4804L11.375 12.8971L10.5042 15.5726C9.52251 15.7784 8.48805 15.781 7.50373 15.5726H7.50636ZM14.3755 3.66755L13.4809 6.41953L11.9371 7.12929L9.6439 5.46174V3.57784L11.9503 1.90237C12.8713 2.31135 13.6999 2.91557 14.3781 3.66755H14.3755ZM6.06287 1.90237L8.3693 3.57784V5.46174L6.07606 7.12929L4.53229 6.41953L3.63769 3.66755C4.3159 2.91557 5.14452 2.31398 6.06551 1.90237H6.06287Z",fill:"#979DA2"},null,-1)])])):t.createCommentVNode("",!0),k.value?(t.openBlock(),t.createElementBlock("svg",v$e,[...o[1]||(o[1]=[t.createElementVNode("path",{d:"M17.182 5.9a.538.538 0 0 0-.13-.416L14.24 2.109a.558.558 0 0 0-.433-.203h-2.25c-.017 0-.034.012-.056.012a.557.557 0 0 0-.563.41 1.68 1.68 0 0 1-1.63 1.266 1.68 1.68 0 0 1-1.632-1.266.55.55 0 0 0-.563-.41c-.017 0-.033-.012-.056-.012h-2.25a.558.558 0 0 0-.433.203L1.561 5.484a.586.586 0 0 0-.129.416c.017.152.09.287.208.382l2.605 2.082v8.167c0 .31.253.563.562.563h9c.31 0 .563-.253.563-.563V8.364l2.604-2.082a.59.59 0 0 0 .208-.382zm-3.937 4.444H5.37V9.78h7.875v.563zM5.37 15.969v-4.5h7.875v4.5H5.37zm9-9.045v-.518a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v2.25H5.37v-2.25a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v.518L2.793 5.765l2.278-2.734h1.66A2.802 2.802 0 0 0 9.307 4.72a2.803 2.803 0 0 0 2.576-1.688h1.66l2.278 2.734-1.451 1.159z",fill:"#98A2B3"},null,-1)])])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createElementBlock("svg",b$e,[...o[2]||(o[2]=[t.createElementVNode("path",{d:"M15.426 3.353a2.384 2.384 0 0 0-2.381 2.381 2.384 2.384 0 0 0 2.381 2.382 2.384 2.384 0 0 0 2.381-2.382 2.384 2.384 0 0 0-2.381-2.38zm0 3.766a1.386 1.386 0 0 1-1.385-1.385c0-.763.622-1.384 1.385-1.384s1.385.621 1.385 1.384c0 .764-.622 1.385-1.385 1.385zM1.424 6.558a.497.497 0 0 0 .704 0l1.295-1.296L4.72 6.558a.497.497 0 0 0 .704 0 .498.498 0 0 0 0-.705L4.128 4.558l1.295-1.295a.498.498 0 0 0-.705-.705L3.423 3.853 2.128 2.558a.499.499 0 0 0-.704.705l1.295 1.295-1.295 1.295a.498.498 0 0 0 0 .705zM13.013 12.443a.498.498 0 0 0-.705 0l-1.295 1.295-1.295-1.295a.499.499 0 0 0-.704.704l1.295 1.295-1.295 1.295a.499.499 0 0 0 .704.705l1.295-1.295 1.295 1.295a.497.497 0 0 0 .705 0 .498.498 0 0 0 0-.705l-1.295-1.295 1.295-1.295a.498.498 0 0 0 0-.704zM12.052 5.455l-2.01-1.747a.498.498 0 0 0-.654.753l1.066.926c-3.145.411-5.008 2.055-6.043 3.444a9.569 9.569 0 0 0-1.501 3.012 2.384 2.384 0 0 0-2.103 2.364 2.384 2.384 0 0 0 2.381 2.381 2.384 2.384 0 0 0 2.381-2.381 2.385 2.385 0 0 0-1.647-2.265 8.674 8.674 0 0 1 1.312-2.547C6.53 7.674 8.33 6.66 10.594 6.372l-.992 1.142a.498.498 0 0 0 .752.654l1.747-2.01a.498.498 0 0 0-.05-.703zm-7.48 8.752c0 .763-.62 1.384-1.384 1.384a1.386 1.386 0 0 1-1.384-1.384c0-.764.62-1.385 1.384-1.385.763 0 1.385.622 1.385 1.385z",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":".3"},null,-1)])])):t.createCommentVNode("",!0),T.value?(t.openBlock(),t.createElementBlock("svg",x$e,[...o[3]||(o[3]=[t.createElementVNode("rect",{x:".707",y:".9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:"8.707",y:".9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:".707",y:"8.9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1),t.createElementVNode("rect",{x:"8.707",y:"8.9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)])])):t.createCommentVNode("",!0),x.value?(t.openBlock(),t.createElementBlock("svg",_$e,[...o[4]||(o[4]=[t.createStaticVNode('<g clip-path="url(#gpdeo9cu3a)" fill="#98A2B3" data-v-2df3c6a9><path d="M9.307.5C4.505.5.598 4.407.598 9.209c0 2 .69 3.938 1.946 5.486l-.754 3.159a.524.524 0 0 0 .727.599l3.038-1.384a8.743 8.743 0 0 0 3.752.848c4.802 0 8.709-3.907 8.709-8.708C18.016 4.407 14.109.5 9.307.5zm0 16.368a7.574 7.574 0 0 1-3.502-.845.525.525 0 0 0-.457-.011l-2.289 1.042.566-2.372a.524.524 0 0 0-.113-.465A7.657 7.657 0 0 1 1.647 9.21c0-4.224 3.436-7.66 7.66-7.66s7.66 3.436 7.66 7.66c0 4.223-3.436 7.66-7.66 7.66z" data-v-2df3c6a9></path><path d="M9.68 5.199c-1.094-.115-2.459.397-3.041 1.797a.524.524 0 0 0 .968.403c.375-.902 1.255-1.231 1.964-1.157.721.075 1.232.542 1.365 1.25.13.693-.136 1.097-1.097 1.662-1.042.613-1.372.874-1.372 2.27a.524.524 0 0 0 1.049 0c0-.479.033-.715.118-.843.094-.14.33-.283.737-.523.666-.392 1.905-1.12 1.596-2.76-.221-1.171-1.098-1.975-2.288-2.1zM9.145 12.673a.608.608 0 0 0-.506.17c-.13.13-.19.31-.17.505a.525.525 0 0 0 .939.263.523.523 0 0 0-.263-.938z" data-v-2df3c6a9></path></g><defs data-v-2df3c6a9><clipPath id="gpdeo9cu3a" data-v-2df3c6a9><path fill="#fff" transform="translate(.307 .5)" d="M0 0h18v18H0z" data-v-2df3c6a9></path></clipPath></defs>',2)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",w$e,t.toDisplayString(e.text),1),e.showBadge?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.showBadgeOnFilterFull?(t.openBlock(),t.createElementBlock("div",T$e,[t.createElementVNode("div",{class:"button__info",style:t.normalizeStyle(v.value)},[t.withDirectives(t.createElementVNode("span",null,t.toDisplayString(e.infoValue),513),[[t.vShow,e.infoValue]])],4)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.filtersTotal>0&&e.filtersTotal!=parseInt(e.infoValue)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"button__info",style:t.normalizeStyle(v.value)},[t.withDirectives(t.createElementVNode("span",null,t.toDisplayString(e.infoValue),513),[[t.vShow,e.infoValue]])],4)):e.filtersTotal>0?(t.openBlock(),t.createElementBlock("div",S$e)):t.createCommentVNode("",!0)],64))],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["button__arrow",{"rotated-180":e.isActive}])},[(t.openBlock(),t.createElementBlock("svg",k$e,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:e.arrowColor},null,8,L$e)]))],2)],4))}},C$e=t2(E$e,[["__scopeId","data-v-2df3c6a9"]]),N$e={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(null);t.watch(()=>a.modelValue,()=>{h()},{immediate:!0});function h(){$.value&&($.value.checked=a.modelValue)}function u(i){v("update:modelValue",i.target.checked)}return t.onMounted(()=>{h()}),(i,p)=>(t.openBlock(),t.createElementBlock("input",{ref_key:"switchCustom",ref:$,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:u},null,544))}},lA=t2(N$e,[["__scopeId","data-v-e3a6ae4e"]]),O$e={class:"corners"},M$e={class:"corners-type"},V$e={class:"selected-item"},z$e={class:"available-item"},P$e={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A$e={class:"advanced-filters-menu"},R$e={class:"toggle-group"},U$e={class:"toggle-group"},F$e={key:0,class:"time-control"},I$e={class:"stepper-container"},q$e={class:"stepper"},j$e={class:"stepper-value"},W$e={class:"time-control"},D$e={class:"stepper-container"},K$e={class:"stepper"},B$e={class:"stepper-value"},X$e={class:"time-control"},G$e={class:"stepper-container"},Z$e={class:"stepper"},J$e={class:"stepper-value"},H$e={class:"corners__how-many-games"},Y$e={class:"selected-item"},Q$e={class:"available-item"},$$e={width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eet={__name:"FilterCorners",props:{viewConfig:{type:Object,default:()=>({})},isEditMode:{type:Boolean,default:!1},defaultFilters:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!0}},emits:["change","remove-views"],setup(e,{emit:r}){var a;const v=Array.from({length:10}).map((A,z)=>({id:z+1,name:`${z+1} ${z===0?"corner":"corners"}`,value:z+1})),$=e,h=r,u=t.ref([...v]),i=t.ref(u.value[0]),p=t.ref(l()),c=t.ref({backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"0 4px",textFontFamily:"'Poppins-Regular'",showIcon:!1}),n=t.ref({label:"Equipo",options:$.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]}),k=t.ref(!1),T=t.ref($.defaultFilters?$.defaultFilters.isAgainstMode:!1),x=t.ref($.defaultFilters?null:(a=n.value)==null?void 0:a.options[0]),d=t.computed(()=>({...sA}));t.watch(()=>$.viewConfig,A=>{A.filters&&(n.value||s())},{immediate:!0});const o=t.computed(()=>({isAgainstMode:T.value,selectedTeam:x.value,howManyCorners:i.value?i.value.value:null,advancedFilters:{...p.value}}));t.watch(()=>o.value,A=>{console.log("before emit change",A),console.log("props.viewConfig",$.viewConfig),h("change",{filters:{...A,advancedFilters:{...A.advancedFilters,areConnectionsVisible:!A.advancedFilters.areConnectionsVisible,arePathsVisible:!A.advancedFilters.arePathsVisible}},view:$.viewConfig})},{deep:!0,immediate:!0});function l(){return{areConnectionsVisible:!0,arePathsVisible:!0,secondsBefore:-1,secondsAfter:0,secondsBeforeAndAfter:0}}function s(){if($.viewConfig&&$.viewConfig.filters){const A=$.viewConfig.filters.find(z=>z.key==="teamRadios");if(A){n.value={options:A.options};return}}n.value={label:"Equipo",options:$.defaultFilters?[{label:"Mi equipo",value:1},{label:"Rival",value:2}]:[{label:"Mi equipo",value:1},{label:"Rival",value:2},{label:"Ambos",value:3}]}}function f(){console.log("setDefaultValues called with props.defaultFilters:",$.defaultFilters),$.defaultFilters&&(x.value=n.value.options.find(A=>A.value===($.defaultFilters.isHomeTeam?1:2))||n.value.options[0],p.value={...$.defaultFilters.advancedFilters,areConnectionsVisible:!$.defaultFilters.advancedFilters.areConnectionsVisible,arePathsVisible:!$.defaultFilters.advancedFilters.arePathsVisible})}function g(A){x.value=A}function S(A){i.value=A}function L(A,z){const I=p.value[z]+A;if(!(I<-5||I>10)){if(["secondsBefore","secondsAfter"].includes(z)){if(z==="secondsBefore"){if(p.value.secondsAfter<I)return}else if(p.value.secondsBefore>I)return}p.value[z]=I}}function M(){k.value=!1}return t.onBeforeUnmount(()=>{}),t.onMounted(()=>{setTimeout(()=>{f()},500)}),(A,z)=>(t.openBlock(),t.createElementBlock("div",O$e,[t.withDirectives(t.createElementVNode("div",M$e,[t.createElementVNode("div",{class:t.normalizeClass(["label",{"switch-selected":!T.value}])}," A favor ",2),t.createVNode(lA,{modelValue:T.value,"onUpdate:modelValue":z[0]||(z[0]=I=>T.value=I)},null,8,["modelValue"]),t.createElementVNode("div",{class:t.normalizeClass(["label",{"switch-selected":T.value}])}," En contra ",2)],512),[[t.vShow,!e.isPostMatch]]),t.createVNode(t.unref($k),t.mergeProps(d.value,{items:n.value.options,"model-value":x.value,"onUpdate:modelValue":g}),{default:t.withCtx(()=>[t.createElementVNode("div",V$e,[z[10]||(z[10]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(x.value?x.value.label:n.value.label),1)])]),availableItem:t.withCtx(({item:I})=>[t.createElementVNode("div",z$e,[t.createElementVNode("div",null,t.toDisplayString(I.label),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",P$e,[...z[11]||(z[11]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,x.value&&x.value.label===I.label]])])])]),_:1},16,["items","model-value"]),t.createVNode(t.unref($Qe),{modelValue:k.value,"onUpdate:modelValue":z[9]||(z[9]=I=>k.value=I),width:"250px","left-menu":"0","menu-margin-top":18},{trigger:t.withCtx(()=>[t.createVNode(C$e,t.mergeProps(c.value,{text:"Filtros avanzados","show-badge-on-filter-full":!1,"filters-total":0,"is-active":k.value,"show-icon":!0,"icon-type":t.unref(Kb).CORNERS_ADVANCED}),null,16,["is-active","icon-type"])]),menu:t.withCtx(()=>[t.createElementVNode("div",A$e,[z[22]||(z[22]=t.createElementVNode("h2",{class:"menu-title"},"Mostrar Conexiones",-1)),t.createElementVNode("div",R$e,[z[12]||(z[12]=t.createElementVNode("label",{class:"toggle-label"},"Sí",-1)),t.createVNode(lA,{modelValue:p.value.areConnectionsVisible,"onUpdate:modelValue":z[1]||(z[1]=I=>p.value.areConnectionsVisible=I)},null,8,["modelValue"]),z[13]||(z[13]=t.createElementVNode("label",{class:"toggle-label"},"No",-1))]),z[23]||(z[23]=t.createElementVNode("hr",{class:"separator"},null,-1)),z[24]||(z[24]=t.createElementVNode("h2",{class:"menu-title"},"Mostrar recorridos",-1)),t.createElementVNode("div",U$e,[z[14]||(z[14]=t.createElementVNode("label",{class:"toggle-label"},"Sí",-1)),t.createVNode(lA,{modelValue:p.value.arePathsVisible,"onUpdate:modelValue":z[2]||(z[2]=I=>p.value.arePathsVisible=I)},null,8,["modelValue"]),z[15]||(z[15]=t.createElementVNode("label",{class:"toggle-label"},"No",-1))]),p.value.arePathsVisible?(t.openBlock(),t.createElementBlock("div",F$e,[z[17]||(z[17]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"antes"),t.createTextVNode(" / "),t.createElementVNode("span",{class:"highlight"},"después"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",I$e,[t.createElementVNode("div",q$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[3]||(z[3]=I=>L(-1,"secondsBeforeAndAfter"))},"−"),t.createElementVNode("span",j$e,t.toDisplayString(p.value.secondsBeforeAndAfter),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[4]||(z[4]=I=>L(1,"secondsBeforeAndAfter"))},"+")]),z[16]||(z[16]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",W$e,[z[19]||(z[19]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"antes"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",D$e,[t.createElementVNode("div",K$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[5]||(z[5]=I=>L(-1,"secondsBefore"))},"−"),t.createElementVNode("span",B$e,t.toDisplayString(p.value.secondsBefore),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[6]||(z[6]=I=>L(1,"secondsBefore"))},"+")]),z[18]||(z[18]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])]),t.createElementVNode("div",X$e,[z[21]||(z[21]=t.createElementVNode("label",{class:"time-label"},[t.createTextVNode(" Segundos "),t.createElementVNode("span",{class:"highlight"},"después"),t.createTextVNode(" del cobro: ")],-1)),t.createElementVNode("div",G$e,[t.createElementVNode("div",Z$e,[t.createElementVNode("button",{class:"stepper-btn",onClick:z[7]||(z[7]=I=>L(-1,"secondsAfter"))},"−"),t.createElementVNode("span",J$e,t.toDisplayString(p.value.secondsAfter),1),t.createElementVNode("button",{class:"stepper-btn",onClick:z[8]||(z[8]=I=>L(1,"secondsAfter"))},"+")]),z[20]||(z[20]=t.createElementVNode("div",{class:"stepper-unit"},"seg",-1))])])],64)),z[25]||(z[25]=t.createElementVNode("hr",{class:"separator"},null,-1)),t.createElementVNode("button",{class:"btn-ready",onClick:M},"Listo")])]),_:1},8,["modelValue"]),t.withDirectives(t.createElementVNode("div",H$e,[t.createVNode(t.unref($k),t.mergeProps(d.value,{items:u.value,"model-value":i.value,"onUpdate:modelValue":S}),{default:t.withCtx(()=>[t.createElementVNode("div",Y$e,[z[26]||(z[26]=t.createElementVNode("svg",{"data-v-1238b29e":"",width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"data-v-1238b29e":"",d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M15.9996 16.8727L14.8359 15.7091",stroke:"#92929D","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"data-v-1238b29e":"",d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:"#92929D",stroke:"#353F47","stroke-width":"0.3"})],-1)),t.createElementVNode("div",null,t.toDisplayString(i.value?i.value.name:"Seleccione"),1)])]),availableItem:t.withCtx(({item:I})=>[t.createElementVNode("div",Q$e,[t.createElementVNode("div",null,t.toDisplayString(I.name),1),t.createElementVNode("div",null,[t.withDirectives((t.openBlock(),t.createElementBlock("svg",$$e,[...z[27]||(z[27]=[t.createElementVNode("path",{d:"M12.7171 1.60412L5.34242 8.72375C5.16033 8.89955 4.91321 9 4.65308 9C4.39295 9 4.14582 8.89955 3.96373 8.72375L0.282891 5.17021C-0.0942971 4.80607 -0.0942971 4.20335 0.282891 3.8392C0.66008 3.47506 1.28439 3.47506 1.66158 3.8392L4.65308 6.72724L11.3384 0.273108C11.7156 -0.0910359 12.3399 -0.0910359 12.7171 0.273108C13.0943 0.637252 13.0943 1.22741 12.7171 1.60412Z",fill:"#CBEE6B"},null,-1)])],512)),[[t.vShow,i.value&&i.value.name===I.name]])])])]),_:1},16,["items","model-value"])],512),[[t.vShow,!e.defaultFilters]])]))}},tet=t2(eet,[["__scopeId","data-v-fea60946"]]),ret={class:"resultados-filter"},aet={class:"filter-checkboxes"},net=["checked","disabled","onChange"],iet={class:"checkbox-label"},oet={class:"filter-actions"},set={__name:"ResultadosFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"iba-ganando",label:"Iba ganando"},{value:"iba-perdiendo",label:"Iba perdiendo"},{value:"iba-empatado",label:"Iba empatado"}],h=t.ref([]);t.watch(()=>a.selectedValues,k=>{var T;if(console.log("[ResultadosFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:k,filterValue:k==null?void 0:k[a.filterIndex],optionValue:(T=k==null?void 0:k[a.filterIndex])==null?void 0:T[a.optionIndex],isArray:Array.isArray(k),filterValueType:typeof(k==null?void 0:k[a.filterIndex])}),!k||!Array.isArray(k)){h.value.length===0&&(console.log("[ResultadosFilter] No hay valores en props, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"]);return}const x=k[a.filterIndex];if(x&&typeof x=="object"&&!Array.isArray(x))if(x[a.optionIndex]!==void 0){const d=Array.isArray(x[a.optionIndex])?x[a.optionIndex]:[];console.log("[ResultadosFilter] Valores encontrados para sincronizar:",d,"localSelectedValues actual:",h.value);const o=JSON.stringify(h.value.sort()),l=JSON.stringify(d.sort());o!==l?(console.log("[ResultadosFilter] Actualizando localSelectedValues con:",d),h.value=d.length>0?[...d]:[]):console.log("[ResultadosFilter] Los valores ya están sincronizados, no se actualiza");return}else console.log("[ResultadosFilter] filterValue existe pero no tiene optionIndex",a.optionIndex,"filterValue keys:",Object.keys(x));else console.log("[ResultadosFilter] filterValue no es un objeto válido:",x);h.value.length===0&&(console.log("[ResultadosFilter] No se encontraron valores guardados, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"])},{immediate:!0,deep:!0}),t.onMounted(()=>{var k,T,x;console.log("[ResultadosFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(k=a.selectedValues)==null?void 0:k[a.filterIndex],optionValue:(x=(T=a.selectedValues)==null?void 0:T[a.filterIndex])==null?void 0:x[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const d=a.selectedValues[a.filterIndex];if(d&&typeof d=="object"&&!Array.isArray(d)&&d[a.optionIndex]!==void 0){const o=Array.isArray(d[a.optionIndex])?d[a.optionIndex]:[];if(console.log("[ResultadosFilter] onMounted - Valores encontrados:",o),o.length>0){console.log("[ResultadosFilter] onMounted - Actualizando localSelectedValues con:",o),h.value=[...o];return}}}h.value.length===0&&(console.log("[ResultadosFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),h.value=["iba-ganando","iba-perdiendo","iba-empatado"])})});const u=k=>h.value.includes(k),i=k=>h.value.length===1&&h.value.includes(k),p=(k,T)=>{let x=[...h.value];if(T)x.includes(k)||x.push(k);else{if(x.length===1)return;x=x.filter(d=>d!==k)}x.length===0&&(x=[$[0].value]),h.value=x,v("update-selection",{optionIndex:a.optionIndex,values:x})},c=()=>{const k=$.map(T=>T.value);h.value=[...k],v("update-selection",{optionIndex:a.optionIndex,values:[...k]})},n=()=>{v("done")};return(k,T)=>(t.openBlock(),t.createElementBlock("div",ret,[t.createElementVNode("div",aet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,x=>t.createElementVNode("label",{key:x.value,class:"checkbox-item"},[t.createElementVNode("input",{type:"checkbox",checked:u(x.value),disabled:i(x.value),onChange:t.withModifiers(d=>p(x.value,d.target.checked),["stop"])},null,40,net),t.createElementVNode("span",iet,t.toDisplayString(x.label),1)])),64))]),t.createElementVNode("div",oet,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(c,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(n,["stop"])}," Listo ")])]))}},SN=t2(set,[["__scopeId","data-v-6b648e3f"]]),cet={class:"detalles-filter"},uet={class:"filter-header"},det={class:"checkbox-todos"},pet=["checked"],het={class:"time-section"},fet={class:"time-buttons"},met=["onClick"],yet={class:"time-section"},get={class:"time-buttons"},vet=["onClick"],bet={class:"filter-actions"},xet={__name:"DetallesFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"0-15",label:"0-15"},{value:"16-30",label:"16-30"},{value:"31-45",label:"31-45"}],h=[{value:"46-60",label:"46-60"},{value:"61-75",label:"61-75"},{value:"76-90",label:"76-90"}],u=[...$,...h].map(d=>d.value),i=t.ref([]);t.watch(()=>a.selectedValues,d=>{var o;if(console.log("[DetallesFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:d,filterValue:d==null?void 0:d[a.filterIndex],optionValue:(o=d==null?void 0:d[a.filterIndex])==null?void 0:o[a.optionIndex]}),!d||!Array.isArray(d))return;const l=d[a.filterIndex];if(l&&typeof l=="object"&&!Array.isArray(l)&&l[a.optionIndex]!==void 0){const s=Array.isArray(l[a.optionIndex])?l[a.optionIndex]:[];if(console.log("[DetallesFilter] Valores encontrados para sincronizar:",s),s.length>0){const f=JSON.stringify(i.value.sort()),g=JSON.stringify(s.sort());f!==g&&(console.log("[DetallesFilter] Actualizando localSelectedValues con:",s),i.value=[...s])}}},{immediate:!0,deep:!0});const p=t.computed(()=>[...$,...h].map(d=>d.value).every(d=>i.value.includes(d)));t.onMounted(()=>{var d,o,l;console.log("[DetallesFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(d=a.selectedValues)==null?void 0:d[a.filterIndex],optionValue:(l=(o=a.selectedValues)==null?void 0:o[a.filterIndex])==null?void 0:l[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const s=a.selectedValues[a.filterIndex];if(s&&typeof s=="object"&&!Array.isArray(s)&&s[a.optionIndex]!==void 0){const f=Array.isArray(s[a.optionIndex])?s[a.optionIndex]:[];if(console.log("[DetallesFilter] onMounted - Valores encontrados:",f),f.length>0){console.log("[DetallesFilter] onMounted - Actualizando localSelectedValues con:",f),i.value=[...f];return}}}i.value.length===0&&(console.log("[DetallesFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),i.value=[...u])})});const c=d=>i.value.includes(d),n=d=>{const o=d.target.checked;let l=[];o?l=[...$,...h].map(s=>s.value):l=[u[0]],i.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},k=d=>{let o=[...i.value];if(o.includes(d))if(o.length>1)o=o.filter(l=>l!==d);else return;else o.includes(d)||o.push(d);o.length===0&&(o=[u[0]]),i.value=o,v("update-selection",{optionIndex:a.optionIndex,values:o})},T=()=>{const d=[u[0]];i.value=d,v("update-selection",{optionIndex:a.optionIndex,values:d})},x=()=>{v("done")};return(d,o)=>(t.openBlock(),t.createElementBlock("div",cet,[t.createElementVNode("div",uet,[o[1]||(o[1]=t.createElementVNode("span",{class:"filter-title"},"En: (Elige el lapso de tiempo)",-1)),t.createElementVNode("label",det,[t.createElementVNode("input",{type:"checkbox",checked:p.value,onChange:t.withModifiers(n,["stop"])},null,40,pet),o[0]||(o[0]=t.createElementVNode("span",{class:"checkbox-label"},"Todos",-1))])]),t.createElementVNode("div",het,[o[2]||(o[2]=t.createElementVNode("div",{class:"time-label"},"1er tiempo",-1)),t.createElementVNode("div",fet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,l=>t.createElementVNode("button",{key:l.value,class:t.normalizeClass(["time-button",{active:c(l.value)}]),onClick:t.withModifiers(s=>k(l.value),["stop"])},t.toDisplayString(l.label),11,met)),64))])]),t.createElementVNode("div",yet,[o[3]||(o[3]=t.createElementVNode("div",{class:"time-label"},"2do tiempo",-1)),t.createElementVNode("div",get,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(h,l=>t.createElementVNode("button",{key:l.value,class:t.normalizeClass(["time-button",{active:c(l.value)}]),onClick:t.withModifiers(s=>k(l.value),["stop"])},t.toDisplayString(l.label),11,vet)),64))])]),t.createElementVNode("div",bet,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(T,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(x,["stop"])}," Listo ")])]))}},cA=t2(xet,[["__scopeId","data-v-9bb98f53"]]),_et={class:"como-fue-cobrado-filter"},wet={class:"cobro-grid"},Tet=["onClick"],ket={class:"cobro-image-container"},Let=["src","alt"],Eet={class:"cobro-footer"},Cet={class:"cobro-label"},Net={class:"filter-actions"},Oet={__name:"ComoFueCobradoFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=[{value:"comba-afuera",label:"Comba hacia afuera",image:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-izquierda.png",count:10},{value:"comba-adentro",label:"Comba hacia adentro",image:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-izquierda.png",count:2},{value:"raz-area",label:"Raz de área",image:"https://golstatsimages.blob.core.windows.net/content/raz-area-izquierda.png",count:0},{value:"en-corto",label:"En corto",image:"https://golstatsimages.blob.core.windows.net/content/en-corto-izquierda.png",count:1}],h=t.ref([]);t.watch(()=>a.selectedValues,n=>{var k;if(console.log("[ComoFueCobradoFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:n,filterValue:n==null?void 0:n[a.filterIndex],optionValue:(k=n==null?void 0:n[a.filterIndex])==null?void 0:k[a.optionIndex]}),!n||!Array.isArray(n)){h.value.length===0&&(h.value=[...$.map(x=>x.value)]);return}const T=n[a.filterIndex];if(T&&typeof T=="object"&&!Array.isArray(T)&&T[a.optionIndex]!==void 0){const x=Array.isArray(T[a.optionIndex])?T[a.optionIndex]:[];console.log("[ComoFueCobradoFilter] Valores encontrados para sincronizar:",x);const d=JSON.stringify(h.value.sort()),o=JSON.stringify(x.sort());d!==o&&(h.value=x.length>0?[...x]:[]);return}h.value.length===0&&(h.value=[...$.map(x=>x.value)])},{immediate:!0,deep:!0});const u=n=>h.value.includes(n),i=n=>{let k=[...h.value];k.includes(n)?k=k.filter(T=>T!==n):k.push(n),k.length===0&&(k=[...$.map(T=>T.value)]),h.value=k,v("update-selection",{optionIndex:a.optionIndex,values:k})};t.onMounted(()=>{var n,k,T;console.log("[ComoFueCobradoFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(n=a.selectedValues)==null?void 0:n[a.filterIndex],optionValue:(T=(k=a.selectedValues)==null?void 0:k[a.filterIndex])==null?void 0:T[a.optionIndex]}),t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const x=a.selectedValues[a.filterIndex];if(x&&typeof x=="object"&&!Array.isArray(x)&&x[a.optionIndex]!==void 0){const d=Array.isArray(x[a.optionIndex])?x[a.optionIndex]:[];if(console.log("[ComoFueCobradoFilter] onMounted - Valores encontrados:",d),d.length>0){console.log("[ComoFueCobradoFilter] onMounted - Actualizando localSelectedValues con:",d),h.value=[...d];return}}}h.value.length===0&&(console.log("[ComoFueCobradoFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),h.value=["izquierda",...$.map(x=>x.value)])})});const p=()=>{const n=[...$.map(k=>k.value)];h.value=n,v("update-selection",{optionIndex:a.optionIndex,values:n})},c=()=>{v("done")};return(n,k)=>(t.openBlock(),t.createElementBlock("div",_et,[t.createElementVNode("div",wet,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList($,T=>t.createElementVNode("div",{key:T.value,class:t.normalizeClass(["cobro-item",{active:u(T.value)}]),onClick:t.withModifiers(x=>i(T.value),["stop"])},[t.createElementVNode("div",ket,[t.createElementVNode("img",{src:T.image,alt:T.label,class:"cobro-image"},null,8,Let)]),t.createElementVNode("div",Eet,[t.createElementVNode("span",Cet,t.toDisplayString(T.label),1)])],10,Tet)),64))]),t.createElementVNode("div",Net,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(p,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(c,["stop"])}," Listo ")])]))}},kN=t2(Oet,[["__scopeId","data-v-0dac4c85"]]),Met={class:"zona-filter"},Vet={class:"template-zone"},zet={class:"controls-zone-container"},Pet={class:"controls-zone-container-title-checkcon"},Aet={class:"controls-zone-container-title-checkcon-check"},Ret={class:"gsc-field-img-container"},Uet=["fill"],Fet=["fill"],Iet=["fill"],qet=["fill"],jet=["fill"],Wet=["fill"],Det=["fill"],Ket=["fill"],Bet=["fill"],Xet=["fill"],Get=["fill"],Zet=["fill"],Jet=["fill"],Het=["fill"],Yet=["fill"],Qet=["fill"],$et=["fill"],ett=["fill"],ttt=["fill"],rtt=["fill"],att=["fill"],ntt=["fill"],itt=["fill"],ott=["fill"],stt=["fill"],ltt=["fill"],ctt=["fill"],utt=["fill"],dtt=["fill"],ptt=["fill"],htt=["fill"],ftt=["fill"],mtt=["fill"],ytt=["fill"],gtt=["fill"],vtt=["id"],btt=["mask"],xtt={class:"filter-actions"},_tt={__name:"ZonaFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=Array.from({length:35},(x,d)=>d+1),h=t.ref(!0),u=t.ref([]),i=t.computed(()=>u.value),p=t.computed(()=>new Date().getTime());t.watch(()=>a.selectedValues,x=>{var d;if(console.log("[ZonaFilter] Watcher - selectedValues recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:x,filterValue:x==null?void 0:x[a.filterIndex],optionValue:(d=x==null?void 0:x[a.filterIndex])==null?void 0:d[a.optionIndex]}),!x||!Array.isArray(x)){u.value.length===0&&(console.log("[ZonaFilter] No hay valores en props, usando valores por defecto"),u.value=[...$],h.value=!0);return}const o=x[a.filterIndex];if(o&&typeof o=="object"&&!Array.isArray(o)){if(o[a.optionIndex]!==void 0){const l=Array.isArray(o[a.optionIndex])?o[a.optionIndex]:[];console.log("[ZonaFilter] Valores encontrados para sincronizar:",l);const s=JSON.stringify(u.value.sort((g,S)=>g-S)),f=JSON.stringify(l.sort((g,S)=>g-S));s!==f&&(console.log("[ZonaFilter] Actualizando zonesLocal con:",l),u.value=l.length>0?[...l]:[],h.value=l.length===35);return}}else if(Array.isArray(o)&&o.length>0){console.log("[ZonaFilter] filterValue es array directo:",o);const l=JSON.stringify(u.value.sort((f,g)=>f-g)),s=JSON.stringify(o.sort((f,g)=>f-g));l!==s&&(console.log("[ZonaFilter] Actualizando zonesLocal con array directo:",o),u.value=[...o],h.value=o.length===35);return}u.value.length===0&&(console.log("[ZonaFilter] No se encontraron valores guardados, usando valores por defecto"),u.value=[...$],h.value=!0)},{immediate:!0,deep:!0}),t.watch(u,x=>{h.value=x.length===35,v("update-selection",{optionIndex:a.optionIndex,values:x})},{deep:!0});function c(x){console.log("value clickAllCheckbox: ",x),x?(u.value=[...$],h.value=!0):(u.value=[1],h.value=!1)}function n(x){u.value.includes(x)?u.value=u.value.filter(d=>d!==x):u.value.push(x),h.value=u.value.length===35}const k=()=>{u.value=[...$],h.value=!0},T=()=>{v("done")};return t.onMounted(()=>{var x,d,o;if(console.log("[ZonaFilter] onMounted - Valores recibidos:",{filterIndex:a.filterIndex,optionIndex:a.optionIndex,selectedValues:a.selectedValues,filterValue:(x=a.selectedValues)==null?void 0:x[a.filterIndex],optionValue:(o=(d=a.selectedValues)==null?void 0:d[a.filterIndex])==null?void 0:o[a.optionIndex]}),a.selectedValues&&Array.isArray(a.selectedValues)){const l=a.selectedValues[a.filterIndex];if(l&&typeof l=="object"&&!Array.isArray(l)&&l[a.optionIndex]!==void 0){const s=Array.isArray(l[a.optionIndex])?l[a.optionIndex]:[];if(console.log("[ZonaFilter] onMounted - Valores encontrados:",s),s.length>0){console.log("[ZonaFilter] onMounted - Actualizando zonesLocal con:",s),u.value=[...s],h.value=s.length===35;return}}}u.value.length===0&&(console.log("[ZonaFilter] onMounted - No se encontraron valores guardados, usando valores por defecto"),u.value=[...$],h.value=!0)}),(x,d)=>(t.openBlock(),t.createElementBlock("div",Met,[t.createElementVNode("div",Vet,[t.createElementVNode("div",zet,[d[36]||(d[36]=t.createElementVNode("div",{class:"controls-zone-container-title"}," ¿A dónde fue el balón?: ",-1)),d[37]||(d[37]=t.createElementVNode("div",{class:"separator-line"},null,-1)),t.createElementVNode("div",Pet,[d[35]||(d[35]=t.createElementVNode("div",{class:"controls-zone-container-title-checkcon-label"}," Todas las zonas ",-1)),t.createElementVNode("div",Aet,[t.createVNode(t.unref(iA),{label:"",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":h.value,"onUpdate:modelValue":c},null,8,["model-value"])])])]),t.createElementVNode("div",Ret,[(t.openBlock(),t.createElementBlock("svg",{key:`field-${u.value.length}`,width:"100%",height:"177",viewBox:"0 0 380 177",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{onClick:d[0]||(d[0]=o=>n(1)),class:"sector-field",x:"0.347042",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:i.value.includes(1)?"#FFFF0030":"#2e3b46"},null,8,Uet),t.createElementVNode("rect",{onClick:d[1]||(d[1]=o=>n(9)),class:"sector-field",x:"288.347",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(9)?"#FFFF0030":"#2e3b46"},null,8,Fet),t.createElementVNode("rect",{onClick:d[2]||(d[2]=o=>n(17)),class:"sector-field",x:"0.347042",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(17)?"#FFFF0030":"#2e3b46"},null,8,Iet),t.createElementVNode("rect",{onClick:d[3]||(d[3]=o=>n(25)),class:"sector-field",x:"288.347",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(25)?"#FFFF0030":"#2e3b46"},null,8,qet),t.createElementVNode("rect",{onClick:d[4]||(d[4]=o=>n(26)),class:"sector-field",x:"0.347042",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(26)?"#FFFF0030":"#2e3b46"},null,8,jet),t.createElementVNode("rect",{onClick:d[5]||(d[5]=o=>n(27)),class:"sector-field",x:"91.347",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(27)?"#FFFF0030":"#2e3b46"},null,8,Wet),t.createElementVNode("rect",{onClick:d[6]||(d[6]=o=>n(28)),class:"sector-field",x:"157.015",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(28)?"#FFFF0030":"#2e3b46"},null,8,Det),t.createElementVNode("rect",{onClick:d[7]||(d[7]=o=>n(29)),class:"sector-field",x:"222.679",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(29)?"#FFFF0030":"#2e3b46"},null,8,Ket),t.createElementVNode("rect",{onClick:d[8]||(d[8]=o=>n(30)),class:"sector-field",x:"288.347",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(30)?"#FFFF0030":"#2e3b46"},null,8,Bet),t.createElementVNode("rect",{onClick:d[9]||(d[9]=o=>n(31)),class:"sector-field",x:"0.347042",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(31)?"#FFFF0030":"#2e3b46"},null,8,Xet),t.createElementVNode("rect",{onClick:d[10]||(d[10]=o=>n(32)),class:"sector-field",x:"91.347",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(32)?"#FFFF0030":"#2e3b46"},null,8,Get),t.createElementVNode("rect",{onClick:d[11]||(d[11]=o=>n(33)),class:"sector-field",x:"157.015",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(33)?"#FFFF0030":"#2e3b46"},null,8,Zet),t.createElementVNode("rect",{onClick:d[12]||(d[12]=o=>n(34)),class:"sector-field",x:"222.679",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(34)?"#FFFF0030":"#2e3b46"},null,8,Jet),t.createElementVNode("rect",{onClick:d[13]||(d[13]=o=>n(35)),class:"sector-field",x:"288.347",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(35)?"#FFFF0030":"#2e3b46"},null,8,Het),t.createElementVNode("rect",{onClick:d[14]||(d[14]=o=>n(2)),class:"sector-field",x:"91.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(2)?"#FFFF0030":"#2e3b46"},null,8,Yet),t.createElementVNode("rect",{onClick:d[15]||(d[15]=o=>n(3)),class:"sector-field",x:"114.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(3)?"#FFFF0030":"#2e3b46"},null,8,Qet),t.createElementVNode("rect",{onClick:d[16]||(d[16]=o=>n(4)),class:"sector-field",x:"137.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(4)?"#FFFF0030":"#2e3b46"},null,8,$et),t.createElementVNode("rect",{onClick:d[17]||(d[17]=o=>n(5)),class:"sector-field",x:"172.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(5)?"#FFFF0030":"#2e3b46"},null,8,ett),t.createElementVNode("rect",{onClick:d[18]||(d[18]=o=>n(6)),class:"sector-field",x:"207.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(6)?"#FFFF0030":"#2e3b46"},null,8,ttt),t.createElementVNode("rect",{onClick:d[19]||(d[19]=o=>n(7)),class:"sector-field",x:"242.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(7)?"#FFFF0030":"#2e3b46"},null,8,rtt),t.createElementVNode("rect",{onClick:d[20]||(d[20]=o=>n(8)),class:"sector-field",x:"265.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(8)?"#FFFF0030":"#2e3b46"},null,8,att),t.createElementVNode("rect",{onClick:d[21]||(d[21]=o=>n(10)),class:"sector-field",x:"91.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(10)?"#FFFF0030":"#2e3b46"},null,8,ntt),t.createElementVNode("rect",{onClick:d[22]||(d[22]=o=>n(11)),class:"sector-field",x:"114.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(11)?"#FFFF0030":"#2e3b46"},null,8,itt),t.createElementVNode("rect",{onClick:d[23]||(d[23]=o=>n(12)),class:"sector-field",x:"137.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(12)?"#FFFF0030":"#2e3b46"},null,8,ott),t.createElementVNode("rect",{onClick:d[24]||(d[24]=o=>n(13)),class:"sector-field",x:"172.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(13)?"#FFFF0030":"#2e3b46"},null,8,stt),t.createElementVNode("rect",{onClick:d[25]||(d[25]=o=>n(14)),class:"sector-field",x:"207.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(14)?"#FFFF0030":"#2e3b46"},null,8,ltt),t.createElementVNode("rect",{onClick:d[26]||(d[26]=o=>n(15)),class:"sector-field",x:"242.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(15)?"#FFFF0030":"#2e3b46"},null,8,ctt),t.createElementVNode("rect",{onClick:d[27]||(d[27]=o=>n(16)),class:"sector-field",x:"265.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(16)?"#FFFF0030":"#2e3b46"},null,8,utt),t.createElementVNode("rect",{onClick:d[28]||(d[28]=o=>n(18)),class:"sector-field",x:"91.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(18)?"#FFFF0030":"#2e3b46"},null,8,dtt),t.createElementVNode("rect",{onClick:d[29]||(d[29]=o=>n(19)),class:"sector-field",x:"114.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(19)?"#FFFF0030":"#2e3b46"},null,8,ptt),t.createElementVNode("rect",{onClick:d[30]||(d[30]=o=>n(20)),class:"sector-field",x:"137.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(20)?"#FFFF0030":"#2e3b46"},null,8,htt),t.createElementVNode("rect",{onClick:d[31]||(d[31]=o=>n(21)),class:"sector-field",x:"172.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(21)?"#FFFF0030":"#2e3b46"},null,8,ftt),t.createElementVNode("rect",{onClick:d[32]||(d[32]=o=>n(22)),class:"sector-field",x:"207.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(22)?"#FFFF0030":"#2e3b46"},null,8,mtt),t.createElementVNode("rect",{onClick:d[33]||(d[33]=o=>n(23)),class:"sector-field",x:"242.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(23)?"#FFFF0030":"#2e3b46"},null,8,ytt),t.createElementVNode("rect",{onClick:d[34]||(d[34]=o=>n(24)),class:"sector-field",x:"265.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:u.value.includes(24)?"#FFFF0030":"#2e3b46"},null,8,gtt),d[40]||(d[40]=t.createElementVNode("rect",{x:"91.6",y:"0.6",width:"196.8",height:"87.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),d[41]||(d[41]=t.createElementVNode("rect",{x:"137.6",y:"0.782404",width:"104.8",height:"28.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),t.createElementVNode("mask",{id:p.value,style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"91",y:"88",width:"198",height:"25"},[...d[38]||(d[38]=[t.createElementVNode("rect",{width:"197.746",height:"24.6043",transform:"matrix(1 0 0 -1 91 113)",fill:"#D9D9D9"},null,-1)])],8,vtt),t.createElementVNode("g",{mask:`url(#${p.value})`},[...d[39]||(d[39]=[t.createElementVNode("circle",{cx:"185.329",cy:"56.5046",r:"52.6152",stroke:"#DFE3E2","stroke-width":"1.38817"},null,-1)])],8,btt),d[42]||(d[42]=t.createElementVNode("circle",{cx:"190.278",cy:"66.2782",r:"2.27817",fill:"white"},null,-1)),d[43]||(d[43]=t.createElementVNode("rect",{x:"0.7",y:"0.7",width:"378.6",height:"175.6",stroke:"#DFE3E2","stroke-width":"1.4"},null,-1))]))])]),t.createElementVNode("div",xtt,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(k,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(T,["stop"])}," Listo ")])]))}},uA=t2(_tt,[["__scopeId","data-v-57474cf5"]]),wtt={class:"que-sucedio-filter"},Ttt={class:"filter-header"},Stt={class:"checkbox-item todos-header"},ktt=["checked"],Ltt={class:"filter-section"},Ett={class:"checkbox-item main-option"},Ctt=["checked"],Ntt={class:"sub-options"},Ott={class:"checkbox-item sub-option"},Mtt=["checked"],Vtt={class:"checkbox-item sub-option"},ztt=["checked"],Ptt={class:"filter-section"},Att={class:"checkbox-item main-option"},Rtt=["checked"],Utt={class:"sub-options"},Ftt={class:"checkbox-item sub-option"},Itt=["checked"],qtt={class:"checkbox-item sub-option"},jtt=["checked"],Wtt={class:"checkbox-item sub-option"},Dtt=["checked"],Ktt={class:"filter-actions"},Btt={__name:"QueSucedioFilter",props:{option:{type:Object,required:!0},filterIndex:{type:Number,required:!0},optionIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","done"],setup(e,{emit:r}){const a=e,v=r,$=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],h={"rematado-destino-porteria":["fue-gol","no-fue-gol"],"rematado-sin-destino-porteria":["ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"]},u=t.ref([]);t.watch(()=>a.selectedValues,d=>{if(!d||!Array.isArray(d))return;const o=d[a.filterIndex];if(o&&typeof o=="object"&&!Array.isArray(o)&&o[a.optionIndex]!==void 0){const l=Array.isArray(o[a.optionIndex])?o[a.optionIndex]:[];if(l.length>0){const s=JSON.stringify(u.value.sort()),f=JSON.stringify(l.sort());s!==f&&(u.value=[...l])}}},{immediate:!0,deep:!0}),t.onMounted(()=>{t.nextTick(()=>{if(a.selectedValues&&Array.isArray(a.selectedValues)){const d=a.selectedValues[a.filterIndex];if(d&&typeof d=="object"&&!Array.isArray(d)&&d[a.optionIndex]!==void 0){const o=Array.isArray(d[a.optionIndex])?d[a.optionIndex]:[];if(o.length>0){u.value=[...o];return}}}u.value.length===0&&(u.value=[...$])})});const i=t.computed(()=>$.every(d=>u.value.includes(d))),p=d=>u.value.includes(d),c=d=>{d.target.checked?u.value=[...$]:u.value=[],v("update-selection",{optionIndex:a.optionIndex,values:[...u.value]})},n=(d,o)=>{let l=[...u.value];const s=h[d]||[];o?(l.includes(d)||l.push(d),s.forEach(f=>{l.includes(f)||l.push(f)})):l=l.filter(f=>f!==d&&!s.includes(f)),u.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},k=(d,o)=>{let l=[...u.value];const s=Object.keys(h).find(f=>h[f].includes(d));o?(l.includes(d)||l.push(d),s&&h[s].every(f=>l.includes(f))&&!l.includes(s)&&l.push(s)):(l=l.filter(f=>f!==d),s&&l.includes(s)&&(l=l.filter(f=>f!==s))),u.value=l,v("update-selection",{optionIndex:a.optionIndex,values:l})},T=()=>{u.value=[...$],v("update-selection",{optionIndex:a.optionIndex,values:[...$]})},x=()=>{v("done")};return(d,o)=>(t.openBlock(),t.createElementBlock("div",wtt,[t.createElementVNode("div",Ttt,[t.createElementVNode("label",Stt,[o[7]||(o[7]=t.createElementVNode("span",{class:"checkbox-label"},"Todos",-1)),t.createElementVNode("input",{type:"checkbox",checked:i.value,onChange:t.withModifiers(c,["stop"])},null,40,ktt)])]),o[15]||(o[15]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",Ltt,[t.createElementVNode("label",Ett,[t.createElementVNode("input",{type:"checkbox",checked:p("rematado-destino-porteria"),onChange:o[0]||(o[0]=t.withModifiers(l=>n("rematado-destino-porteria",l.target.checked),["stop"]))},null,40,Ctt),o[8]||(o[8]=t.createElementVNode("span",{class:"checkbox-label"},"Rematado con destino a portería",-1))]),t.createElementVNode("div",Ntt,[t.createElementVNode("label",Ott,[t.createElementVNode("input",{type:"checkbox",checked:p("fue-gol"),onChange:o[1]||(o[1]=t.withModifiers(l=>k("fue-gol",l.target.checked),["stop"]))},null,40,Mtt),o[9]||(o[9]=t.createElementVNode("span",{class:"checkbox-label"},"Fue gol",-1))]),t.createElementVNode("label",Vtt,[t.createElementVNode("input",{type:"checkbox",checked:p("no-fue-gol"),onChange:o[2]||(o[2]=t.withModifiers(l=>k("no-fue-gol",l.target.checked),["stop"]))},null,40,ztt),o[10]||(o[10]=t.createElementVNode("span",{class:"checkbox-label"},"No fue gol",-1))])])]),o[16]||(o[16]=t.createElementVNode("div",{class:"separator"},null,-1)),t.createElementVNode("div",Ptt,[t.createElementVNode("label",Att,[t.createElementVNode("input",{type:"checkbox",checked:p("rematado-sin-destino-porteria"),onChange:o[3]||(o[3]=t.withModifiers(l=>n("rematado-sin-destino-porteria",l.target.checked),["stop"]))},null,40,Rtt),o[11]||(o[11]=t.createElementVNode("span",{class:"checkbox-label"},"Rematado sin destino a portería",-1))]),t.createElementVNode("div",Utt,[t.createElementVNode("label",Ftt,[t.createElementVNode("input",{type:"checkbox",checked:p("ganados-por-portero-rival"),onChange:o[4]||(o[4]=t.withModifiers(l=>k("ganados-por-portero-rival",l.target.checked),["stop"]))},null,40,Itt),o[12]||(o[12]=t.createElementVNode("span",{class:"checkbox-label"},"Ganados por portero rival",-1))]),t.createElementVNode("label",qtt,[t.createElementVNode("input",{type:"checkbox",checked:p("ganados-por-jugador-rival"),onChange:o[5]||(o[5]=t.withModifiers(l=>k("ganados-por-jugador-rival",l.target.checked),["stop"]))},null,40,jtt),o[13]||(o[13]=t.createElementVNode("span",{class:"checkbox-label"},"Ganados por jugador rival",-1))]),t.createElementVNode("label",Wtt,[t.createElementVNode("input",{type:"checkbox",checked:p("sin-destino"),onChange:o[6]||(o[6]=t.withModifiers(l=>k("sin-destino",l.target.checked),["stop"]))},null,40,Dtt),o[14]||(o[14]=t.createElementVNode("span",{class:"checkbox-label"},"Sin destino",-1))])])]),t.createElementVNode("div",Ktt,[t.createElementVNode("button",{class:"btn-remove-filters",onClick:t.withModifiers(T,["stop"])}," Quitar filtros "),t.createElementVNode("button",{class:"btn-done",onClick:t.withModifiers(x,["stop"])}," Listo ")])]))}},u9=t2(Btt,[["__scopeId","data-v-61143b3c"]]),Xtt={class:"advanced-select-accordion"},Gtt=["onClick"],Ztt={class:"accordion-header-left"},Jtt={class:"accordion-icon"},Htt=["src","alt"],Ytt={class:"accordion-title"},Qtt={class:"accordion-header-right"},$tt={key:0,class:"accordion-badge"},ert={key:0,class:"accordion-content"},trt={class:"accordion-footer"},rrt={__name:"AdvancedSelectAccordion",props:{filter:{type:Object,required:!0},filterIndex:{type:Number,required:!0},selectedValues:{type:Array,default:()=>[]}},emits:["update-selection","close"],setup(e,{emit:r}){const a=e;t.watch(()=>a.selectedValues,x=>{console.log("Acorden inicla 55555555555v [AdvancedSelectAccordion] selectedValues recibidos:",{filterIndex:a.filterIndex,selectedValues:x,filterValue:x==null?void 0:x[a.filterIndex],filterValueType:typeof(x==null?void 0:x[a.filterIndex]),isArray:Array.isArray(x==null?void 0:x[a.filterIndex]),filterValueKeys:x!=null&&x[a.filterIndex]&&typeof(x==null?void 0:x[a.filterIndex])=="object"?Object.keys(x[a.filterIndex]):null})},{immediate:!0,deep:!0});const v=r,$=t.ref({}),h=x=>{$.value[x]?$.value[x]=!1:(Object.keys($.value).forEach(d=>{$.value[d]=!1}),$.value[x]=!0)},u=x=>{const d=a.filter.options[x];if(!d||!d.filters)return 0;const o=a.selectedValues[a.filterIndex];if(!o||!o[x])return 0;const l=o[x];return Array.isArray(l)?l.length:0},i=(x,d)=>x.icon?x.icon:`https://golstatsimages.blob.core.windows.net/todoelfut/f${d+1}.png`,p=x=>x==="Qué sucedió?"||x==="Qué sucedió"?"¿Qué sucedió?":x,c=x=>{const d={resultados:SN,detalles:cA,"como-fue-cobrado":kN,"como fue cobrado":kN,zona:uA,"que-sucedio":u9,"qué sucedió":u9,"que sucedio":u9},o=typeof x.value=="string"?x.value:String(x.value||""),l=typeof x.label=="string"?x.label:String(x.label||""),s=o.toLowerCase().trim(),f=l.toLowerCase().trim();if(s&&d[s])return d[s];if(f&&d[f])return d[f];const g=f.replace(/\s+/g,"-").replace(/[¿?]/g,"").replace(/[áéíóú]/g,S=>({á:"a",é:"e",í:"i",ó:"o",ú:"u"})[S]||S);return g&&d[g]?d[g]:SN},n=x=>{v("update-selection",{filterIndex:a.filterIndex,optionIndex:x.optionIndex,values:x.values})},k=x=>{$.value[x]=!1},T=()=>{v("close")};return(x,d)=>(t.openBlock(),t.createElementBlock("div",Xtt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filter.options,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:o.value||l,class:"accordion-item"},[t.createElementVNode("div",{class:"accordion-header",onClick:t.withModifiers(s=>h(l),["stop"])},[t.createElementVNode("div",Ztt,[t.createElementVNode("span",Jtt,[t.createElementVNode("img",{src:i(o,l),alt:o.label},null,8,Htt)]),t.createElementVNode("span",Ytt,t.toDisplayString(p(o.label)),1)]),t.createElementVNode("div",Qtt,[u(l)>0?(t.openBlock(),t.createElementBlock("span",$tt,t.toDisplayString(u(l)),1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass(["accordion-chevron",{open:$.value[l]}])},[...d[0]||(d[0]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)])],8,Gtt),t.createVNode(t.Transition,{name:"accordion"},{default:t.withCtx(()=>[$.value[l]?(t.openBlock(),t.createElementBlock("div",ert,[c(o)===SN?(t.openBlock(),t.createBlock(SN,{key:0,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===cA?(t.openBlock(),t.createBlock(cA,{key:1,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===kN?(t.openBlock(),t.createBlock(kN,{key:2,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===uA?(t.openBlock(),t.createBlock(uA,{key:3,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):c(o)===u9?(t.openBlock(),t.createBlock(u9,{key:4,option:o,"filter-index":e.filterIndex,"option-index":l,"selected-values":e.selectedValues,onUpdateSelection:n,onDone:()=>k(l)},null,8,["option","filter-index","option-index","selected-values","onDone"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]),_:2},1024)]))),128)),t.createElementVNode("div",trt,[d[1]||(d[1]=t.createElementVNode("div",{class:"footer-separator"},null,-1)),t.createElementVNode("button",{class:"btn-done-footer",onClick:t.withModifiers(T,["stop"])}," Listo ")])]))}},art=t2(rrt,[["__scopeId","data-v-a061728f"]]),nrt={class:"corners-zone-filters"},irt={key:0,class:"custom-radio-group"},ort={class:"radio-label"},srt={class:"radio-options"},lrt=["name","value","onUpdate:modelValue"],crt={key:0,class:"filter-separator"},urt={class:"filter-inline select-with-label"},drt=["data-filter-type","onClick"],prt={class:"select-display"},hrt={class:"select-label"},frt={key:0,class:"dropdown-menu type-menu simple-select-menu"},mrt={class:"simple-select-scroll-area"},yrt=["onClick"],grt={class:"option-content"},vrt={class:"option-title"},brt={key:0,class:"option-checkmark"},xrt={class:"switch-group"},_rt={class:"switch-label"},wrt=["onClick"],Trt={key:0,class:"filter-separator"},Srt={key:3,class:"filter-inline advanced-select-wrapper"},krt=["data-filter-type","onClick"],Lrt={class:"select-display"},Ert={class:"select-label"},Crt={__name:"CornersZoneFilters",props:{filters:{type:Array,default:()=>[]},initialValues:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1},componentId:{type:Number,default:17},viewConfig:{type:Object,default:()=>({})},defaultFilters:{type:Object,default:()=>null}},emits:["filters-changed","filter-updated","change","remove-views"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref([]);let u=null;const i=t.ref(null),p=t.ref(null),c=t.ref([]);let n=!1,k=null;const T=(I,j)=>{if(Array.isArray(I)&&Array.isArray(j)){if(I.length!==j.length)return!1;for(let F=0;F<I.length;F++)if(I[F]!==j[F])return!1;return!0}return I===j},x=(I,j=!0)=>{if(v.filters&&v.filters[0]&&v.filters[1]){const F=v.filters[0],W=v.filters[1],U=F.options,O=W.options;U&&Array.isArray(U)&&O?I!=null?U.findIndex(X=>X.value===I)!==-1&&O[I]?(c.value=O[I],j&&!(()=>{const X=h.value[1];return X==null?!1:Array.isArray(X)?X.length>0:X!==""})()&&!n&&c.value.length>0&&(h.value[1]=c.value[0].value,t.nextTick(()=>{}))):(c.value=[],h.value[1]=null):(c.value=[],h.value[1]=null):c.value=[]}},d=()=>{var I,j,F;v.initialValues&&v.initialValues.length>0?v.initialValues.length>0&&(typeof v.initialValues[0]=="number"||typeof v.initialValues[0]=="boolean"||v.initialValues[0]===null||Array.isArray(v.initialValues[0]))?h.value=v.filters.map((O,X)=>{var N,Y,se,me;const ge=v.initialValues[X];if(ge!=null)return O.type==="switch"&&v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde initialValues en índice ${X} (formato simple):`,ge),ge;if(O.type==="radio-button")return((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null;if(O.type==="advanced-select"){console.log("8888888888888888888888888888 LLEgo auqi mero inicio de davances filters: ",O.type,O.options);const be={};let xe=!1;return O.options&&Array.isArray(O.options)&&(console.log("999999999999999999999999 LLEgo auqi mero inicio de davances filters: options",O.options),O.options.forEach((Ae,qe)=>{var _e,Ue,je,Re,We,Qe,rt;Ae.value==="zona"||(_e=Ae.label)!=null&&_e.toLowerCase().includes("zona")?(be[qe]=Array.from({length:35},(pt,ut)=>ut+1),xe=!0):Ae.value==="resultados"||(Ue=Ae.label)!=null&&Ue.toLowerCase().includes("resultados")?(be[qe]=["iba-ganando","iba-perdiendo","iba-empatado"],xe=!0):Ae.value==="que-sucedio"||Ae.value==="que sucedio"||(je=Ae.label)!=null&&je.toLowerCase().includes("qué sucedió")||(Re=Ae.label)!=null&&Re.toLowerCase().includes("que sucedio")?(be[qe]=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],xe=!0):Ae.value==="detalles"||(We=Ae.label)!=null&&We.toLowerCase().includes("detalles")?(be[qe]=["0-15","16-30","31-45","46-60","61-75","76-90"],xe=!0):(Ae.value==="como-fue-cobrado"||Ae.value==="como fue cobrado"||(Qe=Ae.label)!=null&&Qe.toLowerCase().includes("cómo fue cobrado")||(rt=Ae.label)!=null&&rt.toLowerCase().includes("como fue cobrado"))&&(be[qe]=["izquierda","comba-afuera","comba-adentro","raz-area","en-corto"],xe=!0)})),xe?be:{}}return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (formato simple):`,!1),!1):O.type==="select-simple"&&((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null}):v.isEditMode?(console.log("[CornersZoneFilters] ========== MODO EDICIÓN =========="),console.log("[CornersZoneFilters] initialValues completo:",v.initialValues),console.log("[CornersZoneFilters] initialValues[3] (filtro avanzado):",(I=v.initialValues)==null?void 0:I[3]),console.log("[CornersZoneFilters] Tipo de initialValues[3]:",typeof((j=v.initialValues)==null?void 0:j[3])),console.log("[CornersZoneFilters] Es array initialValues[3]:",Array.isArray((F=v.initialValues)==null?void 0:F[3])),h.value=v.filters.map((O,X)=>{var N,Y,se,me,ge,be,xe,Ae,qe,_e;const Ue=v.initialValues[X];if(X===3&&console.log(`[CornersZoneFilters] Procesando filtro en índice ${X} (FILTRO AVANZADO):`,{filterType:O.type,filterData:Ue,hasFilterData:!!Ue,filterDataKeys:Ue?Object.keys(Ue):null,selectedValue:Ue==null?void 0:Ue.selectedValue,selectedValueType:typeof(Ue==null?void 0:Ue.selectedValue),isDirectObject:Ue&&typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked}),!Ue)return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(je=>je.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (modo edición):`,!1),!1):O.type==="radio-button"?((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null:O.type==="select-simple"?((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null:O.type==="advanced-select"?{}:null;if(O.type==="advanced-select"){if(console.log(`[CornersZoneFilters] Modo edición - Filtro avanzado en índice ${X}:`,{filterIndex:X,filterType:O.type,filterData:Ue,selectedValue:Ue==null?void 0:Ue.selectedValue,selectedValueType:typeof(Ue==null?void 0:Ue.selectedValue),isArray:Array.isArray(Ue==null?void 0:Ue.selectedValue),isDirectObject:typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked}),Ue.selectedValue!==void 0&&Ue.selectedValue!==null){if(typeof Ue.selectedValue=="object"&&!Array.isArray(Ue.selectedValue)){const je=Object.keys(Ue.selectedValue).some(Re=>{const We=Number(Re);return!isNaN(We)&&We>=0});return console.log(`[CornersZoneFilters] Filtro avanzado ${X} - hasCorrectStructure:`,je,"selectedValue:",Ue.selectedValue),je?(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Retornando selectedValue directamente:`,Ue.selectedValue),Ue.selectedValue):(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Retornando selectedValue sin estructura correcta:`,Ue.selectedValue),Ue.selectedValue)}else if(Array.isArray(Ue.selectedValue)){console.log(`[CornersZoneFilters] Filtro avanzado ${X} - selectedValue es array, convirtiendo:`,Ue.selectedValue);const je={};return Ue.selectedValue.forEach((Re,We)=>{je[We]=Re}),console.log(`[CornersZoneFilters] Filtro avanzado ${X} - Valor convertido:`,je),je}}return typeof Ue=="object"&&!Array.isArray(Ue)&&!Ue.selectedValue&&!Ue.selectedOption&&!Ue.isChecked&&Ue!==null&&Object.keys(Ue).some(je=>{const Re=Number(je);return!isNaN(Re)&&Re>=0})?(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - filterData es objeto directo guardado, retornando:`,Ue),Ue):(console.log(`[CornersZoneFilters] Filtro avanzado ${X} - No hay valores guardados, retornando objeto vacío`),{})}if(O.type==="radio-button"&&Ue.selectedOption)return Ue.selectedOption.value;if(O.type==="radio-button"&&!Ue.selectedOption)return Ue.selectedValue!==void 0?Ue.selectedValue:((be=(ge=O.options)==null?void 0:ge[0])==null?void 0:be.value)||null;if(O.type==="select-simple"&&Ue.selectedValue!==void 0)return Array.isArray(Ue.selectedValue)?Ue.selectedValue[0]:Ue.selectedValue;if(O.type==="select"&&Ue.selectedOptions)return Ue.selectedOptions.map(je=>je.value);if(O.type==="check"&&Ue.isChecked!==void 0)return Ue.isChecked;if(O.type==="switch"&&(Ue.isChecked!==void 0||Ue.selectedValue!==void 0)){const je=Ue.isChecked!==void 0?Ue.isChecked:Ue.selectedValue;return v.filters.findIndex(Re=>Re.type==="switch")===X&&console.log(`[Primer Switch] Valor en modo edición (índice ${X}):`,je),je}return Ue.selectedValue!==void 0?Ue.selectedValue:O.type==="select"?[]:O.type==="check"||O.type==="switch"?!1:O.type==="radio-button"?((Ae=(xe=O.options)==null?void 0:xe[0])==null?void 0:Ae.value)||null:O.type==="select-simple"?((_e=(qe=O.options)==null?void 0:qe[0])==null?void 0:_e.value)||null:O.type==="advanced-select"?{}:null}),console.log("[CornersZoneFilters] ========== FIN MODO EDICIÓN =========="),console.log("[CornersZoneFilters] selectedValues después de mapear:",h.value),console.log("[CornersZoneFilters] selectedValues[3] (filtro avanzado):",h.value[3]),console.log("[CornersZoneFilters] Tipo de selectedValues[3]:",typeof h.value[3]),console.log("[CornersZoneFilters] Es array selectedValues[3]:",Array.isArray(h.value[3])),h.value[3]&&typeof h.value[3]=="object"&&(console.log("[CornersZoneFilters] Keys de selectedValues[3]:",Object.keys(h.value[3])),console.log("[CornersZoneFilters] selectedValues[3][0]:",h.value[3][0]),console.log("[CornersZoneFilters] selectedValues[3][1]:",h.value[3][1])),console.log("[CornersZoneFilters] ==========================================")):h.value=v.filters.map((O,X)=>{var N,Y,se,me;const ge=v.initialValues[X];if(ge!=null)return O.type==="switch"&&v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde initialValues en índice ${X} (modo agregar):`,ge),ge;if(O.type==="radio-button")return((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null;if(O.type==="advanced-select"){const be={};let xe=!1;return O.options&&Array.isArray(O.options)&&O.options.forEach((Ae,qe)=>{var _e,Ue,je,Re,We,Qe,rt;Ae.value==="zona"||(_e=Ae.label)!=null&&_e.toLowerCase().includes("zona")?(be[qe]=Array.from({length:35},(pt,ut)=>ut+1),xe=!0):Ae.value==="resultados"||(Ue=Ae.label)!=null&&Ue.toLowerCase().includes("resultados")?(be[qe]=["iba-ganando","iba-perdiendo","iba-empatado"],xe=!0):Ae.value==="que-sucedio"||Ae.value==="que sucedio"||(je=Ae.label)!=null&&je.toLowerCase().includes("qué sucedió")||(Re=Ae.label)!=null&&Re.toLowerCase().includes("que sucedio")?(be[qe]=["rematado-destino-porteria","fue-gol","no-fue-gol","rematado-sin-destino-porteria","ganados-por-portero-rival","ganados-por-jugador-rival","sin-destino"],xe=!0):Ae.value==="detalles"||(We=Ae.label)!=null&&We.toLowerCase().includes("detalles")?(be[qe]=["0-15","16-30","31-45","46-60","61-75","76-90"],xe=!0):(Ae.value==="como-fue-cobrado"||Ae.value==="como fue cobrado"||(Qe=Ae.label)!=null&&Qe.toLowerCase().includes("cómo fue cobrado")||(rt=Ae.label)!=null&&rt.toLowerCase().includes("como fue cobrado"))&&(be[qe]=["izquierda","comba-afuera","comba-adentro","raz-area","en-corto"],xe=!0)}),xe?be:{}}return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(be=>be.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (modo agregar):`,!1),!1):O.type==="select-simple"&&((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null}):h.value=v.filters.map((O,X)=>{var N,Y,se,me;return O.type==="select"?[]:O.type==="check"?!1:O.type==="switch"?(v.filters.findIndex(ge=>ge.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor por defecto en índice ${X} (sin initialValues):`,!1),!1):O.type==="radio-button"?((Y=(N=O.options)==null?void 0:N[0])==null?void 0:Y.value)||null:O.type==="select-simple"?((me=(se=O.options)==null?void 0:se[0])==null?void 0:me.value)||null:O.type==="advanced-select"?{}:null});const W=h.value.some(O=>O!=null&&(Array.isArray(O)?O.length>0:typeof O=="object"&&!Array.isArray(O)?Object.keys(O).length>0:O!==!1&&O!=="")),U=v.filters.map((O,X)=>({index:X,type:O.type,label:O.label||O.label_1||O.label_2||`Filtro ${X}`,value:h.value[X]}));console.log("??????????????????????????????????? ---- ???????????????????????????????????"),console.log("Valores de filtros seteados:",U),console.log("selectedValues:",h.value),console.log("props.filters:",v.filters),console.log("??????????????????????????????????? ---- ???????????????????????????????????"),W&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))};d(),setTimeout(()=>{t.nextTick(()=>{if(h.value[0]!==null&&h.value[0]!==void 0&&!n){const I=!(()=>{const j=h.value[1];return j==null?!1:Array.isArray(j)?j.length>0:j!==""})();x(h.value[0],I),t.nextTick(()=>{h.value.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))&&(!u||h.value.length!==u.length||h.value.some((j,F)=>!T(j,u[F])))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))})}else setTimeout(()=>{h.value.some(I=>I!=null&&(Array.isArray(I)?I.length>0:typeof I=="object"&&!Array.isArray(I)?Object.keys(I).length>0:I!==!1&&I!==""))&&(!u||h.value.length!==u.length||h.value.some((I,j)=>!T(I,u[j])))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))},100)})},300),t.watch(()=>v.initialValues,I=>{if(!I||I.length===0)return;const j=I.length>0&&(typeof I[0]=="number"||typeof I[0]=="boolean"||I[0]===null||Array.isArray(I[0])),F=!T(h.value,I),W=I&&I.length>0&&!n&&F,U=v.isEditMode&&n;if(W&&!U)if(j){const O=v.filters.findIndex(X=>X.type==="switch");O!==-1&&I[O]!==void 0&&console.log(`[Primer Switch] Se setea valor desde watcher initialValues (formato simple) en índice ${O}:`,I[O]),h.value=[...I]}else v.isEditMode?h.value=v.filters.map((O,X)=>{const N=I[X];return N?O.type==="radio-button"&&N.selectedOption?N.selectedOption.value:O.type==="select-simple"&&N.selectedValue!==void 0?Array.isArray(N.selectedValue)?N.selectedValue[0]:N.selectedValue:O.type==="select"&&N.selectedOptions?N.selectedOptions.map(Y=>Y.value):O.type==="check"&&N.isChecked!==void 0?N.isChecked:O.type==="switch"&&N.isChecked!==void 0?(v.filters.findIndex(Y=>Y.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde isChecked en índice ${X} (modo edición):`,N.isChecked),N.isChecked):O.type==="switch"&&N.selectedValue!==void 0?(v.filters.findIndex(Y=>Y.type==="switch")===X&&console.log(`[Primer Switch] Se setea valor desde selectedValue en índice ${X} (modo edición):`,N.selectedValue),N.selectedValue):O.type==="advanced-select"&&N.selectedValue!==void 0||N.selectedValue!==void 0?N.selectedValue:h.value[X]:h.value[X]}):h.value=[...I];else n?k&&k.length>0&&(h.value=[...k]):U&&k&&k.length>0&&(h.value=[...k])},{deep:!0}),t.watch(()=>v.isEditMode,(I,j)=>{j===!0&&I===!1&&(k=null)},{immediate:!0}),t.watch(h,I=>{if(I.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))){const j=[...I];if(u){for(;j.length<u.length;)j.push(void 0);for(let F=0;F<u.length;F++)u[F]!==void 0&&u[F]!==null&&(j[F]===void 0||j[F]===null)&&(j[F]=u[F])}if((()=>{if(!u||j.length!==u.length)return!0;for(let F=0;F<j.length;F++)if(!T(j[F],u[F]))return!0;return!1})()){u=[...j];const F=v.filters.map((W,U)=>({index:U,type:W.type,label:W.label||W.label_1||W.label_2||`Filtro ${U}`,value:j[U]}));console.log("Valores de filtros actualizados:",F),$("filters-changed",{componentId:v.componentId,filters:j,timestamp:new Date().toISOString()})}}},{deep:!0}),t.watch(()=>h.value[0],(I,j)=>{var F;if(I==null){const U=v.filters[0];if(U&&U.type==="radio-button"&&U.options&&U.options.length>0){const O=U.options[0].value;h.value[0]=O;return}}const W=(F=v.filters)==null?void 0:F[0];W&&W.type==="select-simple"&&(I!==j&&j!==void 0?x(I,!0):j===void 0&&I!==null&&I!==void 0&&x(I,!1))},{immediate:!0});const o=I=>{i.value===I?i.value=null:(i.value=I,p.value=null)},l=I=>{p.value===I?p.value=null:(p.value=I,i.value=null)},s=(I,j)=>{if(n=!0,setTimeout(()=>{n=!1},1e3),h.value[I]=j,(I===0||I===1)&&(k=[...h.value]),i.value=null,I===0){h.value[1]!==void 0&&(h.value[1]=null);const F=n;n=!1,x(j,!0),n=F,h.value[1]!==null&&h.value[1]!==void 0&&(k=[...h.value])}},f=()=>{n=!0,setTimeout(()=>{n=!1},400)},g=I=>{n=!0,setTimeout(()=>{n=!1},400);const j=h.value[I],F=!j;h.value[I]=F,v.filters.findIndex(W=>W.type==="switch")===I&&console.log(`[Primer Switch] Se setea valor en índice ${I} desde toggleSwitch:`,F,"(valor anterior:",j,")")},S=I=>{n=!0,setTimeout(()=>{n=!1},400),h.value[I.filterIndex]||(h.value[I.filterIndex]={}),h.value[I.filterIndex]={...h.value[I.filterIndex],[I.optionIndex]:I.values},t.nextTick(()=>{h.value.some(j=>j!=null&&(Array.isArray(j)?j.length>0:typeof j=="object"&&!Array.isArray(j)?Object.keys(j).length>0:j!==!1&&j!==""))&&(u=[...h.value],$("filters-changed",{componentId:v.componentId,filters:h.value,timestamp:new Date().toISOString()}))})},L=()=>h.value,M=(I,j)=>{const F=h.value[j];if(F==null)return null;if(j===1&&c.value.length>0){const W=c.value.find(U=>U.value===F);return W?W.label:null}if(I.options&&Array.isArray(I.options)){const W=I.options.find(U=>U.value===F);return W?W.label:null}return null},A=(I,j)=>{const F=h.value[j];if(!F||typeof F!="object"||Array.isArray(F))return null;const W=Object.values(F).reduce((U,O)=>Array.isArray(O)&&O.length>0?U+O.length:U,0);return W>0?`${W} seleccionado${W>1?"s":""}`:null},z=I=>{const j=I.target,F=j.closest(".advanced-select-dropdown"),W=j.closest(".advanced-select-menu"),U=j.closest(".advanced-select-accordion"),O=j.closest(".advanced-select-content"),X=j.closest(".custom-select.dynamic-select"),N=j.closest(".simple-select-menu");!(F||W||U||O)&&!(X||N)&&(p.value=null,i.value=null)};return t.onMounted(()=>{document.addEventListener("click",z)}),t.onUnmounted(()=>{document.removeEventListener("click",z)}),r({getCurrentValues:L,initializeValues:d}),(I,j)=>(t.openBlock(),t.createElementBlock("div",nrt,[e.filters&&e.filters.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":e.filters.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(F,W)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:W},[F.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",irt,[t.createElementVNode("div",ort,t.toDisplayString(F.label),1),t.createElementVNode("div",srt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.options,U=>(t.openBlock(),t.createElementBlock("label",{key:U.value,class:t.normalizeClass(["radio-option-card",{active:h.value[W]===U.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"corners-zone-radio-"+W,value:U.value,"onUpdate:modelValue":O=>h.value[W]=O,onChange:f},null,40,lrt),[[t.vModelRadio,h.value[W]]]),t.createElementVNode("span",null,t.toDisplayString(U.label),1)],2))),128))])])):F.type==="select-simple"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[W==2?(t.openBlock(),t.createElementBlock("div",crt)):t.createCommentVNode("",!0),t.createElementVNode("div",urt,[t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline","data-filter-type":F.type,onClick:t.withModifiers(U=>o(W),["stop"])},[t.createElementVNode("div",prt,[j[3]||(j[3]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",hrt,t.toDisplayString(M(F,W)||F.label_2||F.label||"Tipo de análisis"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:i.value===W}])},[...j[2]||(j[2]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),i.value===W?(t.openBlock(),t.createElementBlock("div",frt,[t.createElementVNode("div",mrt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W===1?c.value:F.options,U=>(t.openBlock(),t.createElementBlock("div",{key:U.value,class:t.normalizeClass(["option-card simple-select-option",{active:T(h.value[W],U.value)}]),onClick:t.withModifiers(O=>s(W,U.value),["stop"])},[t.createElementVNode("div",grt,[t.createElementVNode("div",vrt,t.toDisplayString(U.label),1)]),T(h.value[W],U.value)?(t.openBlock(),t.createElementBlock("div",brt,[...j[4]||(j[4]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])):t.createCommentVNode("",!0)],10,yrt))),128))])])):t.createCommentVNode("",!0)],8,drt)])],64)):F.type==="switch"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",xrt,[t.createElementVNode("label",_rt,[F.label_1?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["switch-text switch-text-left",{"switch-text-selected":!h.value[W]}])},t.toDisplayString(F.label_1),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"switch",onClick:U=>g(W)},[t.createElementVNode("div",{class:t.normalizeClass(["switch-track",{"switch-on":h.value[W]}])},[t.createElementVNode("div",{class:t.normalizeClass(["switch-thumb",{on:h.value[W]}])},null,2)],2)],8,wrt),F.label_2?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["switch-text switch-text-right",{"switch-text-selected":h.value[W]}])},t.toDisplayString(F.label_2),3)):t.createCommentVNode("",!0)])]),W>=0?(t.openBlock(),t.createElementBlock("div",Trt)):t.createCommentVNode("",!0)],64)):F.type==="advanced-select"?(t.openBlock(),t.createElementBlock("div",Srt,[t.createElementVNode("div",{class:"custom-select dynamic-select filter-inline advanced-select-dropdown","data-filter-type":F.type,onClick:t.withModifiers(U=>l(W),["stop"])},[t.createElementVNode("div",Lrt,[j[6]||(j[6]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",alt:"icono categorías",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),t.createElementVNode("span",Ert,t.toDisplayString(A(F,W)||F.label||"Seleccionar"),1),t.createElementVNode("span",{class:t.normalizeClass(["arrow",{open:p.value===W}])},[...j[5]||(j[5]=[t.createElementVNode("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)]),p.value===W?(t.openBlock(),t.createElementBlock("div",{key:0,class:"dropdown-menu type-menu advanced-select-menu",onClick:j[1]||(j[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",{class:"advanced-select-content",onClick:j[0]||(j[0]=t.withModifiers(()=>{},["stop"]))},[t.createVNode(art,{filter:F,"filter-index":W,"selected-values":h.value,onUpdateSelection:S,onClose:U=>l(W)},null,8,["filter","filter-index","selected-values","onClose"])])])):t.createCommentVNode("",!0)],8,krt)])):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0)]))}},Nrt=t2(Crt,[["__scopeId","data-v-59637ab0"]]),Ort={class:"floating-bar"},Mrt={class:"tab active"},Vrt={class:"select-display"},zrt={class:"select-icon"},Prt=["src"],Art={key:1,alt:"icono",class:"option-img-default",src:"https://golstatsimages.blob.core.windows.net/images-library/vector2.png"},Rrt={key:0,class:"select-placeholder select-label"},Urt={key:1,class:"select-label"},Frt={key:0,class:"dropdown-menu field-menu"},Irt=["onClick"],qrt={class:"option-icon"},jrt=["data-hover-src","src"],Wrt={class:"option-content"},Drt={class:"option-title"},Krt={key:0,class:"option-description"},Brt={class:"select-display"},Xrt={class:"select-icon"},Grt=["src"],Zrt=["src"],Jrt={class:"select-label"},Hrt={key:0,class:"dropdown-menu type-menu type-menu-grid"},Yrt={class:"option-grid"},Qrt=["onClick"],$rt={key:0,class:"option-grid-title"},eat={key:1,class:"option-grid-title"},tat={key:2,class:"option-grid-title"},rat={class:"option-grid-icon"},aat=["src"],nat={key:1,class:"filter-separator"},iat=["onClick"],oat={class:"select-display"},sat={key:0,class:"badge-categorias"},lat={key:0,class:"dropdown-menu type-menu multi-select-menu"},cat={class:"multi-select-scroll-area"},uat={class:"select-all-checkbox"},dat=["checked","indeterminate","onChange"],pat={class:"option-checkbox"},hat=["checked","onChange"],fat=["onClick"],mat={class:"option-title"},yat={class:"multi-select-footer"},gat={key:1,class:"custom-radio-group filter-inline"},vat={class:"radio-label"},bat={class:"radio-options"},xat=["onUpdate:modelValue","disabled","name","value","onChange"],_at={key:2,class:"check-group filter-inline"},wat=["onUpdate:modelValue","checked"],Tat=["data-filter-type","onClick"],Sat={class:"select-display"},kat={key:0,class:"dropdown-menu type-menu simple-select-menu"},Lat={class:"simple-select-scroll-area"},Eat=["onMouseenter","onClick"],Cat={class:"option-content"},Nat={class:"option-title"},Oat={key:0,class:"option-checkmark"},Mat={key:4,class:"filter-separator"},Vat=Object.assign({name:"FloatingFiltersBar"},{__name:"filters",props:{token:{type:String,required:!0},view:{type:Object,default:()=>null},isPostMatch:{type:Boolean,default:!1},filters_edition_mode:{type:Array,default:()=>null}},emits:["filters-changed","close"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.ref(new Map),u=t.ref([]);let i=null,p=null,c=null;const n=t.ref(!1),k=t.ref(!1),T=t.ref(!1),x=t.ref(!1),d=t.ref(!1),o=t.ref(!1),l=t.computed(()=>u.value),s=t.ref(null),f=t.computed(()=>l.value[s.value]||null),g=t.computed(()=>{var Tt;const Yt=((Tt=f.value)==null?void 0:Tt.views)||[];return U(Yt)}),S=t.ref(null),L=t.computed(()=>g.value.find(Tt=>Tt.id===S.value)||null),M=t.ref([]),A=t.computed(()=>{var Tt,Yt;return n.value?((Tt=L.value)==null?void 0:Tt.filters_edition_mode)||[]:((Yt=L.value)==null?void 0:Yt.filters)||[]});t.watch(n,Tt=>{Tt||(k.value=!1)}),t.watch(L,Tt=>{var Yt,er;if(!Tt){M.value=[];return}const sr=Tt.id===6&&v.isPostMatch,Cr=Tt.id===14;if(!Array.isArray(A.value)&&!sr&&!Cr){M.value=[];return}x.value||(sr||Cr?M.value=[]:M.value=A.value.map((Rr,sa)=>{var Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr;if(Rr.type==="select"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na){if(Na.selectedOptions&&Array.isArray(Na.selectedOptions))return Na.selectedOptions.map(rn=>rn.value);if(Na.selectedValue&&Array.isArray(Na.selectedValue))return Na.selectedValue.length>0&&Na.selectedValue[0]&&typeof Na.selectedValue[0]=="object"?or(Na.selectedValue):Na.selectedValue}}return Tt.id===4&&Rr.options&&Array.isArray(Rr.options)?Rr.options.map(Na=>Na.value):[]}else if(Rr.type==="radio-button"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.selectedOption){let rn=Na.selectedOption.value;if(Tt.id===15&&sa===0&&rn===3&&((qa=(Ia=p==null?void 0:p.view)==null?void 0:Ia.filterMultiple)==null?void 0:qa.isHomeTeam)!==void 0){const mn=p.view.filterMultiple.isHomeTeam;typeof mn=="boolean"?rn=mn?1:2:typeof mn=="number"&&(rn=mn===1?1:2)}return rn}}if(Tt.id===7&&n.value&&p!=null&&p.view){if(sa===0&&(bn=p.view.componentProps)!=null&&bn.analysisType)return p.view.componentProps.analysisType==="offensive"?1:2;if(sa===1&&((fn=p.view.filterMultiple)==null?void 0:fn.isHomeTeam)!==void 0)return p.view.filterMultiple.isHomeTeam?1:2}return((ea=(In=Rr.options)==null?void 0:In[0])==null?void 0:ea.value)??null}else if(Rr.type==="select-simple"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.selectedValue!==void 0){let rn;return Tt.id===2&&(fa=(Ur=p==null?void 0:p.view)==null?void 0:Ur.filterMultiple)!=null&&fa.categoryId?rn=p.view.filterMultiple.categoryId:Tt.id===1&&(Za=(Va=p==null?void 0:p.view)==null?void 0:Va.filterMultiple)!=null&&Za.category?rn=p.view.filterMultiple.category:Tt.id===6&&(Xr=(Oa=p==null?void 0:p.view)==null?void 0:Oa.filterMultiple)!=null&&Xr.gameNumber?rn=p.view.filterMultiple.gameNumber:rn=Array.isArray(Na.selectedValue)?Na.selectedValue[0]:Na.selectedValue,rn}}if(Tt.id===2&&n.value&&p!=null&&p.view){if(i&&p.view.id){const Na=i.getComponentDynamicFilters(p.view.id);if(Na&&Na[sa]!==void 0)return Na[sa]}if(p.view.filterMultiple){if(Rr.type==="select-simple"&&p.view.filterMultiple.categoryId){const Na=p.view.filterMultiple.categoryId;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Rr.type==="radio-button"&&p.view.filterMultiple.teamType!==void 0){const Na=p.view.filterMultiple.teamType;return(Rr.options||[]).find(rn=>rn.value==Na),Na}}}if(Tt.id===1&&n.value&&(ca=p==null?void 0:p.view)!=null&&ca.filterMultiple&&p.view.filterMultiple.category){const Na=p.view.filterMultiple.category;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Tt.id===9&&n.value&&(kr=p==null?void 0:p.view)!=null&&kr.filterMultiple&&Rr.type==="select-simple"&&p.view.filterMultiple.categoryIds){const Na=Array.isArray(p.view.filterMultiple.categoryIds)?p.view.filterMultiple.categoryIds:[p.view.filterMultiple.categoryIds],rn=(Rr.options||[]).filter(mn=>Array.isArray(mn.value)?hr(mn.value,Na):Na.includes(mn.value));return rn.length>0?rn[0].value:Na}if(Tt.id===6&&n.value&&(ua=p==null?void 0:p.view)!=null&&ua.filterMultiple&&p.view.filterMultiple.gameNumber){const Na=p.view.filterMultiple.gameNumber;return(Rr.options||[]).find(rn=>rn.value==Na),Na}if(Tt.id===5&&n.value&&(Xa=p==null?void 0:p.view)!=null&&Xa.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Na=p.view.filterMultiple.isHomeTeam;let rn;if(typeof Na=="boolean"?rn=Na?1:2:typeof Na=="number"?rn=Na===1?1:2:rn=1,(Rr.options||[]).find(mn=>mn.value==rn),Rr.type==="radio-button"&&(Rr.label==="Equipo"||Rr.label==="Team"||Rr.label==="Equipo seleccionado"))return rn}if(Tt.id===15&&n.value&&(ja=p==null?void 0:p.view)!=null&&ja.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0&&Rr.type==="radio-button"&&sa===0){const Na=p.view.filterMultiple.isHomeTeam;let rn;if(typeof Na=="boolean"?rn=Na?1:2:typeof Na=="number"?rn=Na===1?1:2:rn=1,(Rr.options||[]).find(mn=>mn.value==rn))return rn}if(Tt.id===9&&n.value&&(on=p==null?void 0:p.view)!=null&&on.filterMultiple&&Rr.type==="radio-button"&&p.view.filterMultiple.isHomeTeam!==void 0){const Na=p.view.filterMultiple.isHomeTeam?1:2,rn=((Ha=Rr.options)==null?void 0:Ha.map(mn=>mn.value))||[];return rn.includes(Na)?Na:rn[0]||1}return((wr=(qr=Rr.options)==null?void 0:qr[0])==null?void 0:wr.value)??null}else if(Rr.type==="check"){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.isChecked!==void 0)return Na.isChecked}if(Tt.id===8)return!0;if(Tt.id===3){if(n.value&&c&&c.dynamicFilters){const Na=c.dynamicFilters[sa];if(Na&&Na.isChecked!==void 0)return Na.isChecked}return!1}return!1}return null}),!((Yt=Tt.name)!=null&&Yt.toLowerCase().includes("tops players")||(er=Tt.title)!=null&&er.toLowerCase().includes("tops players"))&&(!n.value||sr)&&t.nextTick(()=>{var Rr,sa;Tt.id===4&&n.value&&(Rr=p==null?void 0:p.view)!=null&&Rr.id&&i&&i.setDynamicFilters(M.value,p.view.id),Tt.id===3&&n.value&&(sa=p==null?void 0:p.view)!=null&&sa.id&&i&&i.setDynamicFilters(M.value,p.view.id),He()}))},{immediate:!0}),t.watch(()=>i,Tt=>{Tt&&Tt.dynamicFilters&&Array.isArray(Tt.dynamicFilters)&&(x.value=!0,M.value=[...Tt.dynamicFilters],t.nextTick(()=>{x.value=!1}))},{deep:!0}),t.watch(()=>i==null?void 0:i.dynamicFilters,Tt=>{if(Tt&&Array.isArray(Tt)){if(d.value)return;x.value=!0,M.value=[...Tt],t.nextTick(()=>{x.value=!1})}},{deep:!0}),t.watch(()=>L.value,Tt=>{if(n.value&&c&&Tt&&Tt.filters){if(x.value||o.value)return;if(Tt.id===3){if(d.value||o.value)return;const Yt=c.dynamicFilters.find(er=>er.filterType==="check");Yt&&Yt.isChecked!==void 0&&M.value&&M.value.length>0&&(d.value=!0,M.value[0]=Yt.isChecked,t.nextTick(()=>{M.value=[...M.value],d.value=!1}))}setTimeout(()=>{(!M.value||M.value.length===0)&&($t(),Gt(),Lt()),Tt.id===4&&At()},100)}},{deep:!0}),t.watch(()=>{var Tt;return(Tt=L.value)==null?void 0:Tt.id},Tt=>{if(n.value&&c&&Tt===4){if(x.value||o.value)return;setTimeout(()=>{At()},200)}}),t.watch(()=>M.value,Tt=>{if(n.value&&c&&Tt&&Tt.length>0){if(x.value||d.value||o.value)return;setTimeout(()=>{var Yt;Pt()&&($t(),Gt(),Lt(),((Yt=L.value)==null?void 0:Yt.id)===4&&At())},50)}},{deep:!0});function z(Tt,Yt){var er,sr,Cr,Rr,sa;const Ia=M.value[Tt];if((er=L.value)==null||er.id,(sr=L.value)==null||sr.id,Array.isArray(Ia)){if(((Cr=L.value)==null?void 0:Cr.id)===4&&Tt===0){const qa=Ia.some(bn=>{if(Yt.category_id&&Yt.event_type_id){if(bn.category_id&&bn.event_type_id)return bn.category_id===Yt.category_id&&bn.event_type_id===Yt.event_type_id;if(bn.event_type_id&&!bn.category_id)return bn.event_type_id===Yt.event_type_id;if(bn.category_id&&!bn.event_type_id)return bn.category_id===Yt.category_id}else{if(Yt.event_type_id)return bn.event_type_id===Yt.event_type_id;if(Yt.category_id)return bn.category_id===Yt.category_id}return JSON.stringify(bn)===JSON.stringify(Yt)});return(Rr=L.value)==null||Rr.id,qa}return Ia.includes(Yt)}else if(Ia!=null)return(sa=L.value)==null||sa.id,Ia===Yt;return!1}function I(Tt,Yt){var er,sr,Cr;const Rr=(sr=(er=L.value)==null?void 0:er.filters)==null?void 0:sr[Tt];if((Rr==null?void 0:Rr.type)==="select-simple"){rt(Tt,Yt);return}Array.isArray(M.value[Tt])||(M.value[Tt]=[]);const sa=M.value[Tt];let Ia=-1;((Cr=L.value)==null?void 0:Cr.id)===4&&Tt===0?Ia=sa.findIndex(qa=>Yt.category_id&&Yt.event_type_id?qa.category_id===Yt.category_id&&qa.event_type_id===Yt.event_type_id:Yt.event_type_id?qa.event_type_id===Yt.event_type_id:Yt.category_id?qa.category_id===Yt.category_id:!1):Ia=sa.indexOf(Yt),Ia>-1?sa.splice(Ia,1):sa.push(Yt),n.value&&It(),He()}function j(Tt){var Yt,er;const sr=M.value[Tt],Cr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];return(Cr==null?void 0:Cr.type)==="select-simple"||!Cr||!Cr.options||!Array.isArray(sr)?!1:sr.length===Cr.options.length}function F(Tt){var Yt,er;const sr=M.value[Tt],Cr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];return(Cr==null?void 0:Cr.type)==="select-simple"||!Cr||!Cr.options||!Array.isArray(sr)?!1:sr.length>0&&sr.length<Cr.options.length}function W(){var Tt;return!(((Tt=L.value)==null?void 0:Tt.id)===6&&v.isPostMatch)}function U(Tt){return!Tt||!Array.isArray(Tt)?Tt:Tt.filter(Yt=>{const er=(Yt.name||Yt.title||"").toLowerCase();return v.isPostMatch?!0:!["resumen general","timeline","datos relevantes"].some(sr=>er.includes(sr))})}function O(){var Tt,Yt;const er=((Yt=(Tt=f.value)==null?void 0:Tt.name)==null?void 0:Yt.toLowerCase())||"";return er.includes("cancha")||er.includes("volumétrica")||er.includes("volumetric")}function X(Tt,Yt){if(!n.value||!O())return!1;const er=String(Tt||"").toLowerCase(),sr=String(Yt||"").toLowerCase();return er.includes("ambos")||sr.includes("ambos")}function N(Tt){var Yt,er;const sr=(er=(Yt=L.value)==null?void 0:Yt.filters)==null?void 0:er[Tt];if(!sr||!sr.options)return;const Cr=sr.options.map(Rr=>Rr.value);Array.isArray(M.value[Tt])||(M.value[Tt]=[]),j(Tt)?M.value[Tt]=[]:M.value[Tt]=[...Cr],ge.value=Tt,He()}const Y=t.ref("ambos"),se=t.ref(!1),me=t.ref(!1),ge=t.ref(null),be=t.ref(null);function xe(Tt,Yt=!1){const er="https://golstatsimages.blob.core.windows.net/images-library/",sr="https://golstatsimages.blob.core.windows.net/reports-images/",Cr={cancha:"icn_cancha",grafico:"icn_grafico",gráfico:"icn_grafico",chart:"icn_grafico",volumetrica:"icn_cancha",volumétrica:"icn_cancha",volumetric:"icn_cancha",tabla:"icn_tabla",tablas:"icn_tabla",Tablas:"icn_tabla"},Rr=Object.keys(Cr).find(sa=>Tt==null?void 0:Tt.toLowerCase().includes(sa.toLowerCase()));if(Rr){const sa=Cr[Rr],Ia=Yt?"":"-def";return Rr.toLowerCase().includes("tabla")?`${sr}${sa}${Ia}@2x.png`:`${er}${sa}${Ia}@2x.png`}return`${er}icn_default${Yt?"":"-def"}.png`}function Ae(){return f.value?f.value.name:"Tipo de vista"}function qe(){return L.value?L.value.name||L.value.title:"Visualización"}function _e(){n.value||(se.value=!se.value,se.value&&(me.value=!1,t.nextTick(()=>{Jt()})))}function Ue(){n.value||f.value&&(me.value=!me.value,me.value&&(se.value=!1))}function je(Tt){n.value||(s.value=Tt,se.value=!1,S.value=null,He())}function Re(Tt){var Yt,er;n.value||(S.value=Tt.id,me.value=!1,(Yt=Tt.name)!=null&&Yt.toLowerCase().includes("tops players")||(er=Tt.title)==null||er.toLowerCase().includes("tops players"))}function We(Tt){var Yt;ge.value=ge.value===Tt?null:Tt,((Yt=L.value)==null?void 0:Yt.id)===4&&n.value&&Tt===0&&setTimeout(()=>{M.value=[...M.value]},50)}function Qe(Tt){be.value=be.value===Tt?null:Tt}function rt(Tt,Yt){var er,sr,Cr,Rr,sa;if(((er=L.value)==null?void 0:er.id)===2){const Ia=A.value.findIndex(qa=>qa.type==="select-simple"&&qa.label==="Tipo de análisis");Tt===Ia?M.value[0]=Yt:M.value[Tt]=Yt}else if(((sr=L.value)==null?void 0:sr.id)===1)M.value[0]=Yt;else if(((Cr=L.value)==null?void 0:Cr.id)===6)M.value[0]=Yt;else if(((Rr=L.value)==null?void 0:Rr.id)===9)if(Tt===0){Array.isArray(Yt)?M.value[Tt]=Yt:M.value[Tt]=[Yt];const Ia=((sa=A.value[Tt])==null?void 0:sa.options)||[],qa=Array.isArray(Yt)?Yt:[Yt],bn=Ia.find(fn=>Array.isArray(fn.value)?hr(fn.value,qa):qa.includes(fn.value));bn?M.value[Tt]=bn.value:M.value[Tt]=qa}else M.value[Tt]=Yt;else M.value[Tt]=Yt;be.value=null,n.value&&It(),He()}function pt(Tt){Tt.target.closest(".custom-select")||(se.value=!1,me.value=!1,be.value=null)}const ut=[16,18];function He(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua;if(ut.includes((Tt=L.value)==null?void 0:Tt.id)||x.value)return;let Xa=[],ja=[];L.value&&Array.isArray(A.value)&&A.value.forEach((wr,Na)=>{if(wr.type==="select"&&wr.label==="Tipo de análisis"&&wr.id===2){const rn=M.value[Na]||[];Array.isArray(rn)&&rn.length>0&&(Xa=rn.map(mn=>{var $a;const Hn=($a=wr.options)==null?void 0:$a.find(Pn=>Pn.value===mn);return{value:mn,label:(Hn==null?void 0:Hn.label)||mn}}))}});const on=((Yt=L.value)==null?void 0:Yt.id)===4;if(L.value&&Array.isArray(L.value.filters)&&L.value.filters.some(wr=>wr.type==="select"&&wr.label==="Tipo de análisis"&&wr.id===2)&&Xa.length===0&&!on)return;if(on&&M.value&&M.value.length>0){const wr=M.value[0];Array.isArray(wr)&&wr.length>0}ja=((er=A.value)==null?void 0:er.map((wr,Na)=>{var rn,mn,$a,Hn;const Pn=M.value[Na];let Yn=wr.id||`filter_${Na}`;return((rn=L.value)==null?void 0:rn.id)===3&&n.value&&(mn=p==null?void 0:p.view)!=null&&mn.id&&(Yn=`filter_${Na}_component_${p.view.id}`),{filterId:Yn,filterType:wr.type,filterLabel:wr.label,filterIcon:wr.icon||null,selectedValue:Pn,selectedOptions:wr.type==="select"&&Array.isArray(Pn)&&Pn.length>0?Pn.map(An=>{var Wn;const Ei=(Wn=wr.options)==null?void 0:Wn.find(Pi=>Pi.value===An);return{value:An,label:(Ei==null?void 0:Ei.label)||An,icon:(Ei==null?void 0:Ei.icon)||null}}):null,selectedOption:wr.type==="radio-button"&&Pn!=null?{value:Pn,label:((Hn=($a=wr.options)==null?void 0:$a.find(An=>An.value===Pn))==null?void 0:Hn.label)||Pn}:null,isChecked:wr.type==="check"?Pn:null}}))||[];const Ha={mainSelector:{id:((sr=f.value)==null?void 0:sr.id)||null,name:((Cr=f.value)==null?void 0:Cr.name)||null,url:((Rr=f.value)==null?void 0:Rr.url)||null},viewSelector:{id:((sa=L.value)==null?void 0:sa.id)||null,name:((Ia=L.value)==null?void 0:Ia.name)||((qa=L.value)==null?void 0:qa.title)||null,url:((bn=L.value)==null?void 0:bn.url)||null},team:Y.value,dynamicFilters:ja,categoriasSeleccionadas:Xa,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((fn=A.value)==null?void 0:fn.length)||0,activeFilters:((In=A.value)==null?void 0:In.filter((wr,Na)=>{const rn=M.value[Na];return Array.isArray(rn)?rn.length>0:rn!=null&&rn!==!1}).length)||0}},qr={main:f.value,view:L.value,team:Y.value,dynamicFilters:M.value,filtersJSON:Ha,filterAndViewsContainer:i,viewToEdit:p};if($("filters-changed",qr),n.value&&p){if(c=Ha,((ea=L.value)==null?void 0:ea.id)===2){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Tipo de análisis");wr!==-1&&(fa=(Ur=p.view)==null?void 0:Ur.filterMultiple)!=null&&fa.categoryId&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.categoryId)}if(((Va=L.value)==null?void 0:Va.id)===1){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Tipo de análisis");wr!==-1&&(Oa=(Za=p.view)==null?void 0:Za.filterMultiple)!=null&&Oa.category&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.category)}}if(((Xr=L.value)==null?void 0:Xr.id)===6&&n.value&&(ca=p==null?void 0:p.view)!=null&&ca.filterMultiple&&p.view.filterMultiple.gameNumber&&c){const wr=c.dynamicFilters.findIndex(Na=>Na.filterType==="select-simple"&&Na.filterLabel==="Número de juego");wr!==-1&&(ua=(kr=p.view)==null?void 0:kr.filterMultiple)!=null&&ua.gameNumber&&(c.dynamicFilters[wr].selectedValue=p.view.filterMultiple.gameNumber)}i&&!n.value?i.setDynamicFilters(M.value):i&&n.value}function st(){p=null,c=null,i=null,s.value=null,S.value=null,Y.value="ambos",M.value=[],se.value=!1,me.value=!1,ge.value=null,be.value=null,n.value=!1,k.value=!1,T.value=!1}function ct(Tt){if(Tt&&Tt.dynamicFilters){if(d.value)return;Array.isArray(Tt.dynamicFilters)&&Tt.dynamicFilters.length>0&&(x.value=!0,M.value=[...Tt.dynamicFilters],t.nextTick(()=>{x.value=!1}))}}function Ct(Tt){if(n.value=!0,Tt.mainSelector&&Tt.mainSelector.id){const Yt=u.value.findIndex(er=>er.id===Tt.mainSelector.id);Yt!==-1&&(s.value=Yt)}Tt.viewSelector&&Tt.viewSelector.id&&f.value&&f.value.views.findIndex(Yt=>Yt.id===Tt.viewSelector.id)!==-1&&(S.value=Tt.viewSelector.id),Tt.dynamicFilters&&Array.isArray(Tt.dynamicFilters)&&t.nextTick(()=>{setTimeout(()=>{var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja;if(L.value&&A.value){if(x.value)return;if(d.value=!0,Tt.dynamicFilters.forEach((on,Ha)=>{var qr,wr,Na,rn,mn,$a,Hn,Pn,Yn,An,Wn,Ei,Pi;if(Ha<A.value.length){const Po=A.value[Ha];if(((qr=L.value)==null?void 0:qr.id)===3&&n.value,Po.type==="check"){const So=on.isChecked;typeof So=="boolean"&&(M.value[Ha]=So)}else if(Po.type==="select"&&on.selectedOptions){const So=on.selectedOptions.map(Vo=>Vo.value);M.value[Ha]=So}else if(Po.type==="select"&&on.selectedValue&&Array.isArray(on.selectedValue))if(on.selectedValue.length>0&&on.selectedValue[0]&&typeof on.selectedValue[0]=="object"){const So=or(on.selectedValue);M.value[Ha]=So}else M.value[Ha]=on.selectedValue;else if(Po.type==="radio-button"&&on.selectedOption)M.value[Ha]=on.selectedOption.value;else if(Po.type==="select-simple"&&on.selectedValue!==void 0){let So;((wr=L.value)==null?void 0:wr.id)===2&&(rn=(Na=p==null?void 0:p.view)==null?void 0:Na.filterMultiple)!=null&&rn.categoryId?So=p.view.filterMultiple.categoryId:((mn=L.value)==null?void 0:mn.id)===1&&(Hn=($a=p==null?void 0:p.view)==null?void 0:$a.filterMultiple)!=null&&Hn.category?So=p.view.filterMultiple.category:((Pn=L.value)==null?void 0:Pn.id)===6&&(An=(Yn=p==null?void 0:p.view)==null?void 0:Yn.filterMultiple)!=null&&An.gameNumber?So=p.view.filterMultiple.gameNumber:((Wn=L.value)==null?void 0:Wn.id)===9&&(Pi=(Ei=p==null?void 0:p.view)==null?void 0:Ei.filterMultiple)!=null&&Pi.categoryIds?So=p.view.filterMultiple.categoryIds:So=Array.isArray(on.selectedValue)?on.selectedValue[0]:on.selectedValue,M.value[Ha]=So}}}),((Yt=L.value)==null?void 0:Yt.id)===3&&n.value,((er=L.value)==null?void 0:er.id)===2&&n.value&&(sr=p==null?void 0:p.view)!=null&&sr.filterMultiple){if(p.view.filterMultiple.categoryId){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Tipo de análisis");if(on!==-1){const Ha=p.view.filterMultiple.categoryId;if(M.value[0]=Ha,p.view.componentProps&&Ha){let qr=`Category ${Ha}`,wr=null;try{wr=A4(Ha),wr&&(qr=wr.name)}catch{const Na=A.value.findIndex(rn=>rn.type==="select-simple"&&rn.label==="Tipo de análisis");if(Na!==-1){const rn=(((Cr=A.value[Na])==null?void 0:Cr.options)||[]).find(mn=>mn.value==Ha);rn&&(qr=rn.label)}}p.view.componentProps.categoryView=[{id:Ha,name:qr}]}(((Rr=A.value[on])==null?void 0:Rr.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.teamType!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button");if(on!==-1){const Ha=p.view.filterMultiple.teamType;M.value[on]=Ha,(((sa=A.value[on])==null?void 0:sa.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}}if(((Ia=L.value)==null?void 0:Ia.id)===9&&n.value&&(qa=p==null?void 0:p.view)!=null&&qa.filterMultiple){if(p.view.filterMultiple.categoryIds){const on=A.value.findIndex(Ha=>Ha.type==="select-simple");if(on!==-1){const Ha=Array.isArray(p.view.filterMultiple.categoryIds)?p.view.filterMultiple.categoryIds:[p.view.filterMultiple.categoryIds];M.value[0]=Ha;const qr=(((bn=A.value[on])==null?void 0:bn.options)||[]).filter(Na=>Array.isArray(Na.value)?hr(Na.value,Ha):Ha.includes(Na.value));if(qr.length>0){const Na=qr[0].value;M.value[on]=Na}else M.value[on]=Ha;const wr=M.value[on];hr(wr,Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.isHomeTeam!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button");if(on!==-1){const Ha=p.view.filterMultiple.isHomeTeam;let qr;typeof Ha=="boolean"?qr=Ha?1:2:typeof Ha=="number"?qr=Ha===1?1:2:qr=1,M.value[on]=qr,(((fn=A.value[on])==null?void 0:fn.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}}}if(((In=L.value)==null?void 0:In.id)===1&&n.value&&(ea=p==null?void 0:p.view)!=null&&ea.filterMultiple&&p.view.filterMultiple.category){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Tipo de análisis");if(on!==-1){const Ha=p.view.filterMultiple.category;M.value[0]=Ha,p.view.componentProps&&Ha&&(p.view.componentProps.type=Ha),(((Ur=A.value[on])==null?void 0:Ur.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(((fa=L.value)==null?void 0:fa.id)===6&&n.value&&(Va=p==null?void 0:p.view)!=null&&Va.filterMultiple&&p.view.filterMultiple.gameNumber){const on=A.value.findIndex(Ha=>Ha.type==="select-simple"&&Ha.label==="Número de juego");if(on!==-1){const Ha=p.view.filterMultiple.gameNumber;M.value[0]=Ha,p.view.componentProps&&Ha&&(p.view.componentProps.gameNumber=Ha),(((Za=A.value[on])==null?void 0:Za.options)||[]).find(qr=>qr.value==Ha),t.nextTick(()=>{M.value=[...M.value]})}}if(((Oa=L.value)==null?void 0:Oa.id)===7&&n.value&&p!=null&&p.view){if((Xr=p.view.componentProps)!=null&&Xr.analysisType&&A.value.length>0&&((ca=A.value[0])==null?void 0:ca.type)==="radio-button"){const on=p.view.componentProps.analysisType==="offensive"?1:2;M.value[0]=on}if(((kr=p.view.filterMultiple)==null?void 0:kr.isHomeTeam)!==void 0){const on=A.value.findIndex(Ha=>Ha.type==="radio-button"&&Ha.label==="Equipo");if(on!==-1){const Ha=p.view.filterMultiple.isHomeTeam?1:2;M.value[1]=Ha}else if(A.value.length>1&&((ua=A.value[1])==null?void 0:ua.type)==="radio-button"){const Ha=p.view.filterMultiple.isHomeTeam,qr=Ha?1:2;M.value[1]=qr,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Ha),(((Xa=A.value[1])==null?void 0:Xa.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}if(on!==-1&&p.view.componentProps){const Ha=p.view.filterMultiple.isHomeTeam,qr=Ha?1:2;p.view.componentProps.isHomeTeamForAnalysis=Ha,(((ja=A.value[on])==null?void 0:ja.options)||[]).find(wr=>wr.value==qr),t.nextTick(()=>{M.value=[...M.value]})}}}t.nextTick(()=>{d.value=!1})}},100)})}function Vt(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn;return{mainSelector:{id:((Tt=f.value)==null?void 0:Tt.id)||null,name:((Yt=f.value)==null?void 0:Yt.name)||null,url:((er=f.value)==null?void 0:er.url)||null},viewSelector:{id:((sr=L.value)==null?void 0:sr.id)||null,name:((Cr=L.value)==null?void 0:Cr.name)||((Rr=L.value)==null?void 0:Rr.title)||null,url:((sa=L.value)==null?void 0:sa.url)||null},team:Y.value,dynamicFilters:((Ia=A.value)==null?void 0:Ia.map((fn,In)=>{var ea,Ur;const fa=M.value[In];return{filterId:fn.id||`filter_${In}`,filterType:fn.type,filterLabel:fn.label,filterIcon:fn.icon||null,selectedValue:fa,selectedOptions:fn.type==="select"&&Array.isArray(fa)&&fa.length>0?fa.map(Va=>{var Za;const Oa=(Za=fn.options)==null?void 0:Za.find(Xr=>Xr.value===Va);return{value:Va,label:(Oa==null?void 0:Oa.label)||Va,icon:(Oa==null?void 0:Oa.icon)||null}}):null,selectedOption:fn.type==="radio-button"&&fa?{value:fa,label:((Ur=(ea=fn.options)==null?void 0:ea.find(Va=>Va.value===fa))==null?void 0:Ur.label)||fa}:null,isChecked:fn.type==="check"?fa:null}}))||[],timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((qa=A.value)==null?void 0:qa.length)||0,activeFilters:((bn=A.value)==null?void 0:bn.filter((fn,In)=>{const ea=M.value[In];return Array.isArray(ea)?ea.length>0:ea!=null&&ea!==!1}).length)||0}}}r({getCurrentFiltersJSON:Vt});function Ot(){st(),$("close",i)}function qt(){k.value=!1,Ot()}function Zt(){T.value&&(Sd.emit("filters-cancelled",i),T.value=!1),k.value=!1,Ot()}t.onMounted(async()=>{document.addEventListener("click",pt),t.nextTick(()=>{Jt()});const Tt="https://fb78a14uud.execute-api.us-east-2.amazonaws.com/qa/views";try{const Yt=await(await fetch(Tt,{headers:{Authorization:`${v.token}`}})).json();u.value=Yt.data||[],h.value.clear(),u.value&&(h.value=u.value.reduce((er,sr)=>(sr.views&&Array.isArray(sr.views)&&sr.views.forEach(Cr=>{Cr.filters&&Array.isArray(Cr.filters)&&er.set(Cr.id,Cr)}),er),new Map))}catch(Yt){console.error("Error al obtener datos:",Yt)}});function Jt(){document.querySelectorAll(".field-menu .option-card").forEach(Tt=>{const Yt=Tt.querySelector(".option-img");if(!Yt||!Yt.dataset.hoverSrc)return;const er=Yt.src,sr=Yt.dataset.hoverSrc;Tt.addEventListener("mouseenter",()=>{Yt.src=sr}),Tt.addEventListener("mouseleave",()=>{Yt.src=er})})}t.onUnmounted(()=>{document.removeEventListener("click",pt)}),Sd.on("set-filter-and-views-container",Tt=>{i=Tt,Tt&&ct(Tt)}),Sd.on("view-added",()=>{k.value=!0,T.value=!0}),Sd.on("component-added-to-container",Tt=>{(!n.value||i&&Tt.id===i.id)&&ct(Tt)}),Sd.on("edit-view",Tt=>{var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja;console.log("on edit-view event received for view:",Tt),p=Tt,i=((Yt=Tt.view)==null?void 0:Yt.filterAndViewsContainer)||null,c=null;const on=[(sr=(er=Tt.view)==null?void 0:er.coreView)==null?void 0:sr.filtersJSON,(Cr=Tt.view)==null?void 0:Cr.filtersJSON,(Rr=Tt.coreView)==null?void 0:Rr.filtersJSON,Tt.filtersJSON,(Ia=(sa=Tt.view)==null?void 0:sa.componentProps)==null?void 0:Ia.filtersJSON];for(const Ha of on)if(Ha){c=Ha;break}if(i&&(i.viewId===4||i.viewId===8||i.viewId===3||i.viewId===1||i.viewId===2||i.viewId===13)&&(qa=Tt.view)!=null&&qa.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha){let qr="Unknown";i.viewId===4?qr="Timeline":i.viewId===8?qr="FieldPosesion":i.viewId===3?qr="GSCMatchSummary":i.viewId===1?qr="GSCComparativeReports":i.viewId===2?qr="GscTopPlayer":i.viewId===13&&(qr="GSCTimelapseTable"),c&&(i.viewId===13?c={...c,dynamicFilters:Ha}:c={...c,dynamicFilters:Ha.map((wr,Na)=>Array.isArray(wr)?{selectedValue:wr,selectedOptions:wr.map(rn=>({value:rn,label:rn}))}:typeof wr=="boolean"?{isChecked:wr}:qr==="GSCComparativeReports"&&Na===0?{selectedValue:wr,selectedOptions:[{value:wr,label:wr}]}:qr==="GscTopPlayer"&&Na===0?{selectedValue:wr,selectedOptions:[{value:wr,label:wr}]}:qr==="GscTopPlayer"&&Na===1?{selectedOption:{value:wr,label:wr}}:{selectedOption:{value:wr,label:wr}})})}}if(i&&i.viewId===2&&(bn=Tt.view)!=null&&bn.filterMultiple){if(Tt.view.filterMultiple.categoryId&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Tipo de análisis");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.categoryId,selectedOptions:[{value:Tt.view.filterMultiple.categoryId,label:`Category ${Tt.view.filterMultiple.categoryId}`}]})}if(Tt.view.filterMultiple.teamType!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button");if(Ha!==-1){const qr=Tt.view.filterMultiple.teamType,wr=qr===1?"Mi equipo":qr===2?"Rival":qr===3?"Ambos":"Equipo";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:qr,label:wr}}}}}if(i&&i.viewId===1&&(fn=Tt.view)!=null&&fn.filterMultiple&&Tt.view.filterMultiple.category&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Tipo de análisis");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.category,selectedOptions:[{value:Tt.view.filterMultiple.category,label:Tt.view.filterMultiple.category}]})}if(i&&i.viewId===9&&(In=Tt.view)!=null&&In.filterMultiple){if(Tt.view.filterMultiple.categoryIds&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select"&&qr.filterLabel==="Tipo de análisis");if(Ha!==-1){const qr=Array.isArray(Tt.view.filterMultiple.categoryIds)?Tt.view.filterMultiple.categoryIds:[Tt.view.filterMultiple.categoryIds];c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:qr,selectedOptions:qr.map(rn=>({value:rn,label:`Category ${rn}`}))};const wr=Tt.view.filterMultiple.categoryIds;hr(wr,qr);const Na=(((ea=A.value[Ha])==null?void 0:ea.options)||[]).filter(rn=>Array.isArray(rn.value)?hr(rn.value,qr):qr.includes(rn.value));if(Na.length>0){const rn=Na[0];c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:rn.value,selectedOptions:[rn]}}}}if(Tt.view.filterMultiple.isHomeTeam!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam;let wr,Na;typeof qr=="boolean"?(wr=qr?1:2,Na=qr?"Mi equipo":"Rival"):typeof qr=="number"?(wr=qr===1?1:2,Na=qr===1?"Mi equipo":"Rival"):(wr=1,Na="Mi equipo"),c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}}if(i&&i.viewId===6&&(Ur=Tt.view)!=null&&Ur.filterMultiple&&Tt.view.filterMultiple.gameNumber&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="select-simple"&&qr.filterLabel==="Número de juego");Ha!==-1&&(c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedValue:Tt.view.filterMultiple.gameNumber,selectedOptions:[{value:Tt.view.filterMultiple.gameNumber,label:`Juego ${Tt.view.filterMultiple.gameNumber}`}]})}if(i&&i.viewId===7&&Tt.view&&c){if((fa=Tt.view.componentProps)!=null&&fa.analysisType){const Ha=c.dynamicFilters.findIndex((qr,wr)=>qr.filterType==="radio-button"&&wr===0);if(Ha!==-1){const qr=Tt.view.componentProps.analysisType,wr=qr==="offensive"?1:2,Na=qr==="offensive"?"A favor":"En contra";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}if(((Va=Tt.view.filterMultiple)==null?void 0:Va.isHomeTeam)!==void 0){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button"&&qr.filterLabel==="Equipo");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam,wr=qr?1:2,Na=qr?"Equipo propio":"Equipo rival";c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}}}if(i&&i.viewId===10&&(Za=Tt.view)!=null&&Za.filterMultiple&&((Xr=(Oa=p==null?void 0:p.view)==null?void 0:Oa.coreView)==null?void 0:Xr.id)===10){const Ha=Tt.view.componentProps.isHomeTeamForAnalysis?{label:"Equipo propio",value:1}:{label:"Rival",value:2};c&&(c.dynamicFilters[0]={...c.dynamicFilters[0],selectedOption:Ha})}if(i&&i.viewId===15&&(ca=Tt.view)!=null&&ca.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha&&c)c={...c,dynamicFilters:Ha.map((qr,wr)=>{var Na,rn;if(wr===0){let mn=qr;if(qr===3&&((rn=(Na=Tt.view)==null?void 0:Na.filterMultiple)==null?void 0:rn.isHomeTeam)!==void 0){const $a=Tt.view.filterMultiple.isHomeTeam;typeof $a=="boolean"?mn=$a?1:2:typeof $a=="number"&&(mn=$a===1?1:2)}return{selectedOption:{value:mn,label:mn===1?"Mi equipo":"Rival"}}}else if(wr===1)return{selectedValue:qr,selectedOptions:[{value:qr,label:`${qr} fortalezas`}]};return typeof qr=="number"?{selectedValue:qr}:{selectedOption:{value:qr,label:String(qr)}}})};else if((kr=Tt.view)!=null&&kr.filterMultiple&&c&&Tt.view.filterMultiple.isHomeTeam!==void 0){const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button"&&wr.filterLabel==="Mi equipo");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Local":"Visitante"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Local":"Visitante"):(Na=1,rn="Local"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}if(i&&i.viewId===17&&(ua=Tt.view)!=null&&ua.id){const Ha=i.getComponentDynamicFilters(Tt.view.id);if(Ha&&c)console.log("Edit filters opt 1",c),c={...c,dynamicFilters:Ha.map((qr,wr)=>{var Na,rn,mn,$a,Hn,Pn;const Yn=(Na=A.value)==null?void 0:Na[wr];if(Yn&&Yn.type==="radio-button"){let An=qr;if(qr===3&&((mn=(rn=Tt.view)==null?void 0:rn.filterMultiple)==null?void 0:mn.isHomeTeam)!==void 0){const Wn=Tt.view.filterMultiple.isHomeTeam;typeof Wn=="boolean"?An=Wn?1:2:typeof Wn=="number"&&(An=Wn===1?1:2)}return{selectedOption:{value:An,label:An===1?"Mi equipo":An===2?"Rival":"Ambos"}}}else if(wr===2){let An=qr;if((qr===3||qr!==1&&qr!==2&&($a=Tt.view)!=null&&$a.filterMultiple)&&((Pn=(Hn=Tt.view)==null?void 0:Hn.filterMultiple)==null?void 0:Pn.isHomeTeam)!==void 0){const Wn=Tt.view.filterMultiple.isHomeTeam;typeof Wn=="boolean"?An=Wn?1:2:typeof Wn=="number"&&(An=Wn===1?1:2)}return Yn&&Yn.type==="select-simple"?{selectedValue:An,selectedOptions:[{value:An,label:String(An)}]}:Yn&&Yn.type==="radio-button"?{selectedOption:{value:An,label:An===1?"Mi equipo":An===2?"Rival":"Ambos"}}:typeof An=="number"?{selectedValue:An}:{selectedOption:{value:An,label:String(An)}}}else{if(Yn&&Yn.type==="switch")return typeof qr=="boolean"?{selectedValue:qr}:{selectedValue:qr};if(Yn&&Yn.type==="check")return typeof qr=="boolean"?{selectedValue:qr}:{selectedValue:qr}}return Array.isArray(qr)?{selectedValue:qr,selectedOptions:qr.map(An=>({value:An,label:String(An)}))}:typeof qr=="boolean"?{selectedValue:qr}:typeof qr=="object"&&qr!==null?qr:typeof qr=="number"?{selectedValue:qr}:{selectedOption:{value:qr,label:String(qr)}}})},console.log("Edit filters opt 1 finla --->",c);else if((Xa=Tt.view)!=null&&Xa.filterMultiple&&c&&(console.log("Edit filters opt 1 multiple"),Tt.view.filterMultiple.isHomeTeam!==void 0)){const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Mi equipo":"Rival"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Mi equipo":"Rival"):(Na=1,rn="Mi equipo"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}if(i&&i.viewId===5&&(ja=Tt.view)!=null&&ja.filterMultiple&&Tt.view.filterMultiple.isHomeTeam!==void 0&&c){const Ha=c.dynamicFilters.findIndex(qr=>qr.filterType==="radio-button"&&qr.filterLabel==="Equipo");if(Ha!==-1){const qr=Tt.view.filterMultiple.isHomeTeam;let wr,Na;typeof qr=="boolean"?(wr=qr?1:2,Na=qr?"Equipo propio":"Equipo rival"):typeof qr=="number"?(wr=qr===1?1:2,Na=qr===1?"Equipo propio":"Equipo rival"):(wr=1,Na="Equipo propio"),c.dynamicFilters[Ha]={...c.dynamicFilters[Ha],selectedOption:{value:wr,label:Na}}}else{const qr=c.dynamicFilters.findIndex(wr=>wr.filterType==="radio-button");if(qr!==-1){const wr=Tt.view.filterMultiple.isHomeTeam;let Na,rn;typeof wr=="boolean"?(Na=wr?1:2,rn=wr?"Equipo propio":"Equipo rival"):typeof wr=="number"?(Na=wr===1?1:2,rn=wr===1?"Equipo propio":"Equipo rival"):(Na=1,rn="Equipo propio"),c.dynamicFilters[qr]={...c.dynamicFilters[qr],selectedOption:{value:Na,label:rn}}}}}c&&Ct(c),k.value=!0});function Qt(){ge.value=null}function cr(Tt,Yt){var er;(er=L.value)==null||er.id}function hr(Tt,Yt){if(!Array.isArray(Tt)||!Array.isArray(Yt)||Tt.length!==Yt.length)return!1;const er=[...Tt].sort((Cr,Rr)=>Cr-Rr),sr=[...Yt].sort((Cr,Rr)=>Cr-Rr);return JSON.stringify(er)===JSON.stringify(sr)}function $t(){if(n.value&&c&&c.dynamicFilters){if(o.value||x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Tt,Yt)=>{var er;if(Tt&&(er=A.value)!=null&&er[Yt]){const sr=A.value[Yt];if(sr.type==="check"&&Tt.isChecked!==void 0)M.value[Yt]=Tt.isChecked;else if(sr.type==="select"&&Tt.selectedOptions){const Cr=Tt.selectedOptions.map(Rr=>Rr.value);M.value[Yt]=Cr}else sr.type==="select"&&Tt.selectedValue&&Array.isArray(Tt.selectedValue)&&(M.value[Yt]=Tt.selectedValue)}}),t.nextTick(()=>{d.value=!1,o.value=!1})}}function At(){var Tt;if(n.value&&c&&c.dynamicFilters&&((Tt=L.value)==null?void 0:Tt.id)===4){if(o.value||x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Yt,er)=>{var sr,Cr;if(Yt&&((Cr=(sr=A.value)==null?void 0:sr[er])==null?void 0:Cr.type)==="select"){if(Yt.selectedOptions){const Rr=Yt.selectedOptions.map(sa=>sa.value);M.value[er]=Rr}else if(Yt.selectedValue&&Array.isArray(Yt.selectedValue))if(Yt.selectedValue.length>0&&Yt.selectedValue[0]&&typeof Yt.selectedValue[0]=="object"){const Rr=or(Yt.selectedValue);M.value[er]=Rr}else M.value[er]=Yt.selectedValue}}),setTimeout(()=>{var Yt;if(M.value=[...M.value],(Yt=p==null?void 0:p.view)!=null&&Yt.componentProps&&M.value&&M.value.length>0){const er=M.value[0];if(Array.isArray(er)&&er.length>0){const sr=er.some(Ia=>Ia.event_type_id===1||typeof Ia=="string"&&Ia.includes("1")),Cr=er.some(Ia=>Ia.category_id===8||typeof Ia=="string"&&Ia.includes("8")),Rr=er.some(Ia=>Ia.category_id===9||typeof Ia=="string"&&Ia.includes("9")),sa=er.some(Ia=>Ia.event_type_id===3||typeof Ia=="string"&&Ia.includes("3"));p.view.componentProps.selectedEvents=er,p.view.componentProps.goals=sr,p.view.componentProps.yellowCards=Cr,p.view.componentProps.redCards=Rr,p.view.componentProps.substitutions=sa,p.view.componentProps.key=er.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}},200),t.nextTick(()=>{d.value=!1,o.value=!1})}}function or(Tt){return!Array.isArray(Tt)||Tt.length===0?[]:Tt.map(Yt=>{if(Yt&&typeof Yt=="object"){if(Yt.event_type_id!==void 0||Yt.category_id!==void 0)return{event_type_id:Yt.event_type_id,category_id:Yt.category_id,...Yt.name&&{name:Yt.name},...Yt.label&&{label:Yt.label}};if(Yt.value&&typeof Yt.value=="object")return{event_type_id:Yt.value.event_type_id,category_id:Yt.value.category_id,...Yt.value.name&&{name:Yt.value.name},...Yt.value.label&&{label:Yt.value.label}};if(typeof Yt=="string"&&Yt.includes("-")){const[er,sr]=Yt.split("-");return{category_id:parseInt(er),event_type_id:parseInt(sr)}}}if(typeof Yt=="string")if(Yt.includes("-")){const[er,sr]=Yt.split("-");return{category_id:parseInt(er),event_type_id:parseInt(sr)}}else{const er=parseInt(Yt);if(!isNaN(er))return{event_type_id:er}}return Yt})}function Gt(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va;if(n.value&&c&&c.dynamicFilters&&A.value){if(o.value||x.value)return;if(o.value=!0,d.value=!0,c.dynamicFilters.forEach((Za,Oa)=>{var Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr,Na;if(Za&&((Xr=A.value[Oa])==null?void 0:Xr.type)==="select"){if(Za.selectedOptions){const rn=Za.selectedOptions.map(mn=>mn.value);M.value[Oa]=rn}else if(Za.selectedValue&&Array.isArray(Za.selectedValue))if(Za.selectedValue.length>0&&Za.selectedValue[0]&&typeof Za.selectedValue[0]=="object"){const rn=or(Za.selectedValue);M.value[Oa]=rn}else M.value[Oa]=Za.selectedValue}else if(Za&&((ca=A.value[Oa])==null?void 0:ca.type)==="select-simple"&&Za.selectedValue!==void 0){let rn;((kr=L.value)==null?void 0:kr.id)===2&&(Xa=(ua=p==null?void 0:p.view)==null?void 0:ua.filterMultiple)!=null&&Xa.categoryId?rn=p.view.filterMultiple.categoryId:((ja=L.value)==null?void 0:ja.id)===1&&(Ha=(on=p==null?void 0:p.view)==null?void 0:on.filterMultiple)!=null&&Ha.category?rn=p.view.filterMultiple.category:((qr=L.value)==null?void 0:qr.id)===6&&(Na=(wr=p==null?void 0:p.view)==null?void 0:wr.filterMultiple)!=null&&Na.gameNumber?rn=p.view.filterMultiple.gameNumber:rn=Array.isArray(Za.selectedValue)?Za.selectedValue[0]:Za.selectedValue,M.value[Oa]=rn}}),((Tt=L.value)==null?void 0:Tt.id)===4&&setTimeout(()=>{var Za;if(M.value=[...M.value],(Za=p==null?void 0:p.view)!=null&&Za.componentProps&&M.value&&M.value.length>0){const Oa=M.value[0];if(Array.isArray(Oa)&&Oa.length>0){const Xr=Oa.some(Xa=>Xa.event_type_id===1||typeof Xa=="string"&&Xa.includes("1")),ca=Oa.some(Xa=>Xa.category_id===8||typeof Xa=="string"&&Xa.includes("8")),kr=Oa.some(Xa=>Xa.category_id===9||typeof Xa=="string"&&Xa.includes("9")),ua=Oa.some(Xa=>Xa.event_type_id===3||typeof Xa=="string"&&Xa.includes("3"));p.view.componentProps.selectedEvents=Oa,p.view.componentProps.goals=Xr,p.view.componentProps.yellowCards=ca,p.view.componentProps.redCards=kr,p.view.componentProps.substitutions=ua,p.view.componentProps.key=Oa.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}},100),((Yt=L.value)==null?void 0:Yt.id)===2&&(er=p==null?void 0:p.view)!=null&&er.filterMultiple){if(p.view.filterMultiple.categoryId){const Za=A.value.findIndex(Oa=>Oa.type==="select-simple"&&Oa.label==="Tipo de análisis");if(Za!==-1){const Oa=p.view.filterMultiple.categoryId;if(M.value[0]=Oa,p.view.componentProps&&Oa){let Xr=`Category ${Oa}`,ca=null;try{ca=A4(Oa),ca&&(Xr=ca.name)}catch{const kr=A.value.findIndex(ua=>ua.type==="select-simple"&&ua.label==="Tipo de análisis");if(kr!==-1){const ua=(((sr=A.value[kr])==null?void 0:sr.options)||[]).find(Xa=>Xa.value==Oa);ua&&(Xr=ua.label)}}p.view.componentProps.categoryView=[{id:Oa,name:Xr}]}(((Cr=A.value[Za])==null?void 0:Cr.options)||[]).find(Xr=>Xr.value==Oa),t.nextTick(()=>{M.value=[...M.value]})}}if(p.view.filterMultiple.teamType!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.teamType;M.value[Za]=Oa,(((Rr=A.value[Za])==null?void 0:Rr.options)||[]).find(Xr=>Xr.value==Oa),t.nextTick(()=>{M.value=[...M.value]})}}}if(((sa=L.value)==null?void 0:sa.id)===1&&(Ia=p==null?void 0:p.view)!=null&&Ia.filterMultiple&&p.view.filterMultiple.category&&A.value.findIndex(Za=>Za.type==="select-simple"&&Za.label==="Tipo de análisis")!==-1){const Za=p.view.filterMultiple.category;M.value[0]=Za,p.view.componentProps&&Za&&(p.view.componentProps.type=Za),t.nextTick(()=>{M.value=[...M.value]})}if(((qa=L.value)==null?void 0:qa.id)===6&&(bn=p==null?void 0:p.view)!=null&&bn.filterMultiple&&p.view.filterMultiple.gameNumber&&A.value.findIndex(Za=>Za.type==="select-simple"&&Za.label==="Número de juego")!==-1){const Za=p.view.filterMultiple.gameNumber;M.value[0]=Za,p.view.componentProps&&Za&&(p.view.componentProps.gameNumber=Za),t.nextTick(()=>{M.value=[...M.value]})}if(((fn=L.value)==null?void 0:fn.id)===5&&(In=p==null?void 0:p.view)!=null&&In.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0)if(A.value.findIndex(Za=>Za.type==="radio-button"&&Za.label==="Equipo")!==-1){const Za=p.view.filterMultiple.isHomeTeam;let Oa;typeof Za=="boolean"?Oa=Za?1:2:typeof Za=="number"?Oa=Za===1?1:2:Oa=1,M.value[0]=Oa,p.view.componentProps&&Za!==void 0&&(p.view.componentProps.isHomeTeamForAnalysis=Za===1),t.nextTick(()=>{M.value=[...M.value]})}else{const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.preMatchType=Oa),t.nextTick(()=>{M.value=[...M.value]})}}if(((ea=L.value)==null?void 0:ea.id)===15&&(Ur=p==null?void 0:p.view)!=null&&Ur.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;console.log("Strengths forceRadioFilterUpdate - isHomeTeam:",Oa,"type:",typeof Oa);let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,console.log("Strengths forceRadioFilterUpdate - teamValue calculado:",Xr,"teamFilterIndex:",Za),M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.preMatchType=Xr),t.nextTick(()=>{M.value=[...M.value],console.log("Strengths forceRadioFilterUpdate - dynamicFilters.value después:",M.value)})}else{const Oa=A.value.findIndex(Xr=>Xr.type==="radio-button");if(Oa!==-1){const Xr=p.view.filterMultiple.isHomeTeam;let ca;typeof Xr=="boolean"?ca=Xr?1:2:typeof Xr=="number"?ca=Xr===1?1:2:ca=1,M.value[Oa]=ca,p.view.componentProps&&Xr!==void 0&&(p.view.componentProps.preMatchType=ca),t.nextTick(()=>{M.value=[...M.value]})}}}if(((fa=L.value)==null?void 0:fa.id)===17&&(Va=p==null?void 0:p.view)!=null&&Va.filterMultiple&&p.view.filterMultiple.isHomeTeam!==void 0){const Za=A.value.findIndex(Oa=>Oa.type==="radio-button");if(Za!==-1){const Oa=p.view.filterMultiple.isHomeTeam;let Xr;typeof Oa=="boolean"?Xr=Oa?1:2:typeof Oa=="number"?Xr=Oa===1?1:2:Xr=1,M.value[Za]=Xr,p.view.componentProps&&Oa!==void 0&&(p.view.componentProps.teamselected=Xr),t.nextTick(()=>{M.value=[...M.value]})}else{const Oa=A.value.findIndex(Xr=>Xr.type==="radio-button");if(Oa!==-1){const Xr=p.view.filterMultiple.isHomeTeam;let ca;typeof Xr=="boolean"?ca=Xr?1:2:typeof Xr=="number"?ca=Xr===1?1:2:ca=1,M.value[Oa]=ca,p.view.componentProps&&Xr!==void 0&&(p.view.componentProps.teamselected=ca),t.nextTick(()=>{M.value=[...M.value]})}}}t.nextTick(()=>{d.value=!1,o.value=!1})}}function Lt(){if(!o.value&&n.value&&c&&c.dynamicFilters&&A.value){if(x.value)return;o.value=!0,d.value=!0,c.dynamicFilters.forEach((Tt,Yt)=>{var er;if(Tt&&((er=A.value[Yt])==null?void 0:er.type)==="radio-button"&&Tt.selectedOption&&Tt.selectedOption.value!==void 0){const sr=Tt.selectedOption.value;M.value[Yt]=sr}}),t.nextTick(()=>{d.value=!1,o.value=!1})}}function It(){var Tt,Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa,Xr,ca,kr,ua,Xa,ja,on,Ha,qr,wr,Na,rn,mn,$a,Hn,Pn,Yn;if(i&&n.value&&p){if(x.value)return;if(d.value=!0,((Tt=L.value)==null?void 0:Tt.id)===4){if(i.setDynamicFilters(M.value,(Yt=p.view)==null?void 0:Yt.id),i.updateDynamicFilters(M.value,(er=p.view)==null?void 0:er.id),p.view.componentProps&&M.value&&M.value.length>0){const An=M.value[0];if(Array.isArray(An)&&An.length>0){const Wn=An.some(So=>So.event_type_id===1||typeof So=="string"&&So.includes("1")),Ei=An.some(So=>So.category_id===8||typeof So=="string"&&So.includes("8")),Pi=An.some(So=>So.category_id===9||typeof So=="string"&&So.includes("9")),Po=An.some(So=>So.event_type_id===3||typeof So=="string"&&So.includes("3"));p.view.componentProps.selectedEvents=An,p.view.componentProps.goals=Wn,p.view.componentProps.yellowCards=Ei,p.view.componentProps.redCards=Pi,p.view.componentProps.substitutions=Po,p.view.componentProps.key=An.length>0,p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}}else if(((sr=L.value)==null?void 0:sr.id)===8)i.setDynamicFilters(M.value,(Cr=p.view)==null?void 0:Cr.id),i.updateDynamicFilters(M.value,(Rr=p.view)==null?void 0:Rr.id);else if(((sa=L.value)==null?void 0:sa.id)===3)i.setDynamicFilters(M.value,(Ia=p.view)==null?void 0:Ia.id),i.updateDynamicFilters(M.value,(qa=p.view)==null?void 0:qa.id);else if(((bn=L.value)==null?void 0:bn.id)===13){const An=(fn=p.view)==null?void 0:fn.id;i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An),p.view.componentProps&&(p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps}))}else if(((In=L.value)==null?void 0:In.id)===15){const An=(ea=p.view)==null?void 0:ea.id;if(i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An),p.view.componentProps){const Wn=Array.isArray(M.value)&&M.value[3]!==void 0?M.value[3]:null;Wn!==null&&(p.view.componentProps.numitems=Wn),p.view.componentProps._updateKey=Date.now(),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}else if(((Ur=L.value)==null?void 0:Ur.id)===17){const An=(fa=p==null?void 0:p.view)==null?void 0:fa.id;i.setDynamicFilters(M.value,An),i.updateDynamicFilters(M.value,An);const Wn=(Ei,Pi)=>{if(!Ei)return;const Po=M.value[0];Po!==void 0&&(Ei.infavoragainstteam=!Po);const So=M.value[1];So!==void 0&&(Ei.lateralidad=So===32?"right":"left");const Vo=M.value[2];Vo!==void 0&&Pi&&(Vo===3||(Ei.teamselected=Vo===2?Pi.away_team:Pi.home_team)),Ei._updateKey=Date.now()};if(p&&p.view&&p.view.componentProps){const Ei=p.view.componentProps.game;Wn(p.view.componentProps,Ei),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps})}}else if(((Va=L.value)==null?void 0:Va.id)===2){i.setDynamicFilters(M.value,(Za=p.view)==null?void 0:Za.id),i.updateDynamicFilters(M.value,(Oa=p.view)==null?void 0:Oa.id);const An=M.value[0];if(An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.categoryId,p.view.filterMultiple.categoryId=An,p.view.componentProps)){let Ei=`Category ${An}`,Pi=null;try{Pi=A4(An),Pi&&(Ei=Pi.name)}catch{const Po=A.value.findIndex(So=>So.type==="select-simple"&&So.label==="Tipo de análisis");if(Po!==-1){const So=(((Xr=A.value[Po])==null?void 0:Xr.options)||[]).find(Vo=>Vo.value==An);So&&(Ei=So.label)}}p.view.componentProps.categoryView=[{id:An,name:Ei}],Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple})}const Wn=M.value[1];Wn!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.teamType,p.view.filterMultiple.teamType=Wn,p.view.componentProps&&p.view.componentProps.game&&(Wn===1?p.view.componentProps.teamView=p.view.componentProps.game.homeTeam.team_id:Wn===2?p.view.componentProps.teamView=p.view.componentProps.game.awayTeam.team_id:p.view.componentProps.teamView=0),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}))}else if(((ca=L.value)==null?void 0:ca.id)===1){i.setDynamicFilters(M.value,(kr=p.view)==null?void 0:kr.id),i.updateDynamicFilters(M.value,(ua=p.view)==null?void 0:ua.id);const An=M.value[0];An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.category,p.view.filterMultiple.category=An,p.view.componentProps&&(p.view.componentProps.type=An),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}))}else if(((Xa=L.value)==null?void 0:Xa.id)===6){i.setDynamicFilters(M.value,(ja=p.view)==null?void 0:ja.id),i.updateDynamicFilters(M.value,(on=p.view)==null?void 0:on.id);const An=M.value[0];An!==void 0&&(p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.gameNumber,p.view.filterMultiple.gameNumber=An,p.view.componentProps&&(p.view.componentProps.gameNumber=An,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(Ha=L.value)==null?void 0:Ha.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})}))}else if(((qr=L.value)==null?void 0:qr.id)===7){i.setDynamicFilters(M.value,(wr=p.view)==null?void 0:wr.id),i.updateDynamicFilters(M.value,(Na=p.view)==null?void 0:Na.id);const An=M.value[0],Wn=M.value[1];if(An!==void 0&&p.view.componentProps){const Ei=An===1?"offensive":"defensive";p.view.componentProps.analysisType=Ei}if(Wn!==void 0){p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.isHomeTeam;const Ei=Wn===1;p.view.filterMultiple.isHomeTeam=Ei,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Ei,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(rn=L.value)==null?void 0:rn.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})}}else if(((mn=L.value)==null?void 0:mn.id)===5){i.setDynamicFilters(M.value,($a=p.view)==null?void 0:$a.id),i.updateDynamicFilters(M.value,(Hn=p.view)==null?void 0:Hn.id);const An=M.value[0];if(An!==void 0){p.view.filterMultiple||(p.view.filterMultiple={}),p.view.filterMultiple.isHomeTeam;const Wn=An===1?1:2;p.view.filterMultiple.isHomeTeam=Wn,p.view.componentProps&&(p.view.componentProps.isHomeTeamForAnalysis=Wn===1,p.view._updateKey,p.view._updateKey=Date.now()),Sd.emit("force-component-update",{itemId:p.view.id,componentProps:p.view.componentProps,filterMultiple:p.view.filterMultiple}),Sd.emit("dynamic-filters-changed",{containerViewId:(Pn=L.value)==null?void 0:Pn.id,viewId:p.view.id,dynamicFilters:M.value}),Sd.emit("component-props-updated",{viewId:p.view.id,componentProps:p.view.componentProps,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})}}else((Yn=L.value)==null?void 0:Yn.id)===9||(i.setDynamicFilters(M.value),i.updateDynamicFilters(M.value));t.nextTick(()=>{d.value=!1})}}function Pt(){var Tt,Yt;if(!c||!c.dynamicFilters||!A.value)return!1;for(let er=0;er<c.dynamicFilters.length;er++){const sr=c.dynamicFilters[er],Cr=A.value[er],Rr=M.value[er];if(!(!sr||!Cr)){if(Cr.type==="check"){if(sr.isChecked!==Rr)return!0}else if(Cr.type==="radio-button"){if(((Tt=sr.selectedOption)==null?void 0:Tt.value)!==Rr)return!0}else if(Cr.type==="select"){const sa=((Yt=sr.selectedOptions)==null?void 0:Yt.map(qa=>qa.value))||sr.selectedValue||[],Ia=Array.isArray(Rr)?Rr:[];if(JSON.stringify(sa)!==JSON.stringify(Ia))return!0}}}return!1}function gr(Tt){var Yt,er,sr,Cr,Rr,sa,Ia,qa,bn,fn,In,ea,Ur,fa,Va,Za,Oa;if(M.value=Tt.filters,i){const Xr=((Yt=p==null?void 0:p.view)==null?void 0:Yt.id)||null;i.setDynamicFilters(M.value,Xr),i.updateDynamicFilters(M.value,Xr)}if(n.value&&p&&(Sd.emit("activate-save-button"),Sd.emit("force-component-update",{itemId:((er=p==null?void 0:p.view)==null?void 0:er.id)||null,componentProps:p.view.componentProps}),Sd.emit("dynamic-filters-changed",{containerViewId:((sr=p==null?void 0:p.view)==null?void 0:sr.id)||null,viewId:((Cr=p==null?void 0:p.view)==null?void 0:Cr.id)||null,dynamicFilters:M.value}),Sd.emit("dynamic-filters-changed",{containerViewId:((Rr=p==null?void 0:p.view)==null?void 0:Rr.id)||null,viewId:((sa=p==null?void 0:p.view)==null?void 0:sa.id)||null,dynamicFilters:M.value}),t.nextTick(()=>{p.view.componentProps&&(p.view.componentProps={...p.view.componentProps})})),!n.value&&i&&(((Ia=L.value)==null?void 0:Ia.id)===15||((qa=L.value)==null?void 0:qa.id)===17)&&i.getRequiresAddView(M.value,A.value)){i.setDynamicFilters(M.value),$("filters-changed",{main:f.value,view:L.value,team:Y.value,dynamicFilters:M.value,filtersJSON:{mainSelector:{id:((bn=f.value)==null?void 0:bn.id)||null,name:((fn=f.value)==null?void 0:fn.name)||null,url:((In=f.value)==null?void 0:In.url)||null},viewSelector:{id:((ea=L.value)==null?void 0:ea.id)||null,name:((Ur=L.value)==null?void 0:Ur.name)||((fa=L.value)==null?void 0:fa.title)||null,url:((Va=L.value)==null?void 0:Va.url)||null},team:Y.value,dynamicFilters:M.value,timestamp:new Date().toISOString(),summary:{mainSelected:!!f.value,viewSelected:!!L.value,totalDynamicFilters:((Za=A.value)==null?void 0:Za.length)||0,activeFilters:((Oa=A.value)==null?void 0:Oa.filter((Xr,ca)=>{const kr=M.value[ca];return Array.isArray(kr)?kr.length>0:kr!=null&&kr!==!1}).length)||0}},filterAndViewsContainer:i,viewToEdit:p}),He();return}It()}function ur(Tt){Tt.filterIndex!==void 0&&Tt.value!==void 0&&(M.value[Tt.filterIndex]=Tt.value,n.value&&It(),He())}function vr(){Zt()}function Tr(Tt){var Yt,er,sr,Cr,Rr,sa,Ia;console.log("newFilters in onChangeFiltersAltMode:",Tt);const qa={mainSelector:{id:((Yt=f.value)==null?void 0:Yt.id)||null,name:((er=f.value)==null?void 0:er.name)||null,url:((sr=f.value)==null?void 0:sr.url)||null},viewSelector:{id:((Cr=L.value)==null?void 0:Cr.id)||null,name:((Rr=L.value)==null?void 0:Rr.name)||((sa=L.value)==null?void 0:sa.title)||null,url:((Ia=L.value)==null?void 0:Ia.url)||null}};$("filters-changed",{filters:Tt.filters,view:Tt.view,viewToEdit:p,filterAndViewsContainer:i,filtersJSON:qa,isAltMode:!0})}function Pr(Tt){return JSON.parse(JSON.stringify(Tt))}return(Tt,Yt)=>(t.openBlock(),t.createElementBlock("div",Ort,[t.createElementVNode("button",Mrt,t.toDisplayString(n.value?"Editando visualización":"Nueva visualización"),1),t.createElementVNode("div",{class:t.normalizeClass([{disabled:n.value},"custom-select main-select"]),onClick:_e},[t.createElementVNode("div",Vrt,[t.createElementVNode("span",zrt,[f.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:xe(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Prt)):(t.openBlock(),t.createElementBlock("img",Art))]),f.value?(t.openBlock(),t.createElementBlock("span",Urt,t.toDisplayString(Ae()),1)):(t.openBlock(),t.createElementBlock("span",Rrt,"Tipo de vista")),t.createElementVNode("span",{class:t.normalizeClass([{open:se.value},"arrow"])},[...Yt[5]||(Yt[5]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),se.value?(t.openBlock(),t.createElementBlock("div",Frt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(er,sr)=>(t.openBlock(),t.createElementBlock("div",{key:er.id,class:t.normalizeClass([{active:s.value===sr},"option-card"]),onClick:t.withModifiers(Cr=>je(sr),["stop"])},[t.createElementVNode("div",qrt,[t.createElementVNode("img",{"data-hover-src":xe(er.name,!0),src:xe(er.name,!1),alt:"icono",class:"option-img-34"},null,8,jrt)]),t.createElementVNode("div",Wrt,[t.createElementVNode("div",Drt,t.toDisplayString(er.name),1),er.description?(t.openBlock(),t.createElementBlock("div",Krt,t.toDisplayString(er.description),1)):t.createCommentVNode("",!0)])],10,Irt))),128))])):t.createCommentVNode("",!0)],2),f.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([{disabled:n.value},"custom-select second-select"]),onClick:Ue},[t.createElementVNode("div",Brt,[t.createElementVNode("span",Xrt,[L.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:L.value.url,alt:"icono",class:"option-img-graph2"},null,8,Grt)):f.value?(t.openBlock(),t.createElementBlock("img",{key:1,src:xe(f.value.name,!1),alt:"icono",class:"option-img"},null,8,Zrt)):t.createCommentVNode("",!0)]),t.createElementVNode("span",Jrt,t.toDisplayString(qe()),1),t.createElementVNode("span",{class:t.normalizeClass([{open:me.value},"arrow"])},[...Yt[6]||(Yt[6]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),me.value&&f.value?(t.openBlock(),t.createElementBlock("div",Hrt,[t.createElementVNode("div",Yrt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,er=>(t.openBlock(),t.createElementBlock("div",{key:er.id,class:t.normalizeClass([{active:S.value===er.id},"option-card-grid"]),onClick:t.withModifiers(sr=>Re(er),["stop"])},[er.id===17?(t.openBlock(),t.createElementBlock("div",$rt,[...Yt[7]||(Yt[7]=[t.createElementVNode("div",null,"Tiros de esquina",-1),t.createElementVNode("div",null,"tendencia general",-1)])])):er.id===18?(t.openBlock(),t.createElementBlock("div",eat,[...Yt[8]||(Yt[8]=[t.createElementVNode("div",null,"Tactica fija",-1),t.createElementVNode("div",null,"jugadas especificas",-1)])])):(t.openBlock(),t.createElementBlock("div",tat,t.toDisplayString(er.name||er.title),1)),t.createElementVNode("div",rat,[t.createElementVNode("img",{src:er.url,alt:"icono",class:"option-img-grid"},null,8,aat)])],10,Qrt))),128))])])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),L.value?(t.openBlock(),t.createElementBlock("div",nat)):t.createCommentVNode("",!0),L.value&&L.value.id===13?(t.openBlock(),t.createBlock(FYe,{key:2,"component-id":13,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,onFiltersChanged:gr,onFilterUpdated:ur},null,8,["filters","initial-values","is-edit-mode"])):L.value&&L.value.id===16?(t.openBlock(),t.createBlock(HQe,{key:3,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,"is-edit-mode":!!t.unref(p),"is-post-match":e.isPostMatch,"view-config":Pr(h.value.get(16)),onChange:Tr,onRemoveViews:vr},null,8,["default-filters","is-edit-mode","is-post-match","view-config"])):L.value&&L.value.id===18?(t.openBlock(),t.createBlock(tet,{key:4,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,"view-config":Pr(h.value.get(18)),"is-post-match":e.isPostMatch,onChange:Tr,onRemoveViews:vr},null,8,["default-filters","view-config","is-post-match"])):L.value&&L.value.id===15?(t.openBlock(),t.createBlock(rQe,{key:5,"component-id":15,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,onFiltersChanged:gr,onFilterUpdated:ur},null,8,["filters","initial-values","is-edit-mode"])):L.value&&L.value.id===17?(t.openBlock(),t.createBlock(Nrt,{key:6,"component-id":17,"default-filters":t.unref(p)?t.unref(p).view.filterMultiple:null,filters:A.value,"initial-values":n.value?t.unref(c).dynamicFilters:M.value,"is-edit-mode":n.value,"view-config":Pr(h.value.get(17)),onChange:Tr,onFiltersChanged:gr,onFilterUpdated:ur,onRemoveViews:vr},null,8,["default-filters","filters","initial-values","is-edit-mode","view-config"])):L.value&&A.value&&W()?(t.openBlock(),t.createElementBlock("div",{key:7,class:t.normalizeClass(["dynamic-filters",{"dynamic-filters-wide":A.value.length>=2}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(A.value,(er,sr)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:sr},[er.type==="select"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"custom-select dynamic-select filter-inline",onClick:t.withModifiers(Cr=>We(sr),["stop"])},[t.createElementVNode("div",oat,[Yt[10]||(Yt[10]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{alt:"icono categorías",src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),Yt[11]||(Yt[11]=t.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),Array.isArray(M.value[sr])&&M.value[sr].length>0?(t.openBlock(),t.createElementBlock("span",sat,t.toDisplayString(M.value[sr].length),1)):t.createCommentVNode("",!0),t.createElementVNode("span",{class:t.normalizeClass([{open:ge.value===sr},"arrow"])},[...Yt[9]||(Yt[9]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),ge.value===sr?(t.openBlock(),t.createElementBlock("div",lat,[t.createElementVNode("div",cat,[t.createElementVNode("div",{class:"multi-select-header",onClick:Yt[1]||(Yt[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("label",uat,[t.createElementVNode("input",{checked:j(sr),indeterminate:F(sr),type:"checkbox",onChange:t.withModifiers(Cr=>N(sr),["stop"]),onClick:Yt[0]||(Yt[0]=t.withModifiers(()=>{},["stop"]))},null,40,dat),Yt[12]||(Yt[12]=t.createElementVNode("span",{class:"select-all-label"},"Agregar todas",-1))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("div",{key:Cr.value,class:t.normalizeClass([{active:z(sr,Cr.value)},"option-card multi-select-option"]),onClick:Yt[2]||(Yt[2]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",pat,[t.createElementVNode("input",{checked:z(sr,Cr.value),type:"checkbox",onChange:t.withModifiers(Rr=>I(sr,Cr.value),["stop"])},null,40,hat)]),t.createElementVNode("div",{class:"option-content",onClick:Rr=>I(sr,Cr.value)},[t.createElementVNode("div",mat,t.toDisplayString(Cr.label),1)],8,fat)],2))),128))]),t.createElementVNode("div",yat,[t.createElementVNode("button",{class:"btn-listo",onClick:Yt[3]||(Yt[3]=t.withModifiers(Cr=>Qt(),["stop"]))},"Listo")])])):t.createCommentVNode("",!0)],8,iat)):er.type==="radio-button"?(t.openBlock(),t.createElementBlock("div",gat,[t.createElementVNode("div",vat,t.toDisplayString(er.label),1),t.createElementVNode("div",bat,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("label",{key:Cr.value,class:t.normalizeClass([{active:M.value[sr]===Cr.value},"radio-option-card"])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":Rr=>M.value[sr]=Rr,disabled:X(Cr.value,Cr.label),name:"dynamic-radio-"+sr,value:Cr.value,type:"radio",onChange:()=>{var Rr,sa,Ia;if(((Rr=L.value.value)==null?void 0:Rr.id)===9&&n.value.value&&(Ia=(sa=t.unref(p))==null?void 0:sa.view)!=null&&Ia.filterMultiple){const qa=M.value[sr]===1;t.unref(p).view.filterMultiple.isHomeTeam=qa}n.value.value&&It(),He()}},null,40,xat),[[t.vModelRadio,M.value[sr]]]),t.createElementVNode("span",null,t.toDisplayString(Cr.label),1)],2))),128))])])):er.type==="check"?(t.openBlock(),t.createElementBlock("div",_at,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":Cr=>M.value[sr]=Cr,checked:M.value[sr],type:"checkbox",onChange:Yt[4]||(Yt[4]=()=>{n.value.value&&It(),He()})},null,40,wat),[[t.vModelCheckbox,M.value[sr]]]),t.createTextVNode(" "+t.toDisplayString(er.label),1)])])):er.type==="select-simple"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-filter-type":er.type,class:"custom-select dynamic-select filter-inline",onClick:t.withModifiers(Cr=>Qe(sr),["stop"])},[t.createElementVNode("div",Sat,[Yt[14]||(Yt[14]=t.createElementVNode("span",{class:"select-icon select-analisis-icon"},[t.createElementVNode("img",{alt:"icono categorías",src:"https://golstatsimages.blob.core.windows.net/report-maker/iconocategorias.png",style:{width:"18px",height:"18px","object-fit":"contain"}})],-1)),Yt[15]||(Yt[15]=t.createElementVNode("span",{class:"select-label"}," Tipo de análisis ",-1)),t.createElementVNode("span",{class:t.normalizeClass([{open:be.value===sr},"arrow"])},[...Yt[13]||(Yt[13]=[t.createElementVNode("svg",{fill:"none",height:"14",viewBox:"0 0 16 14",width:"16"},[t.createElementVNode("path",{d:"M3 5L8 10L13 5",stroke:"#AAB4BE","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],2)]),be.value===sr?(t.openBlock(),t.createElementBlock("div",kat,[t.createElementVNode("div",Lat,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(er.options,Cr=>(t.openBlock(),t.createElementBlock("div",{key:Cr.value,class:t.normalizeClass([{active:M.value[sr]===Cr.value},"option-card simple-select-option"]),onMouseenter:Rr=>cr(sr,Cr.value),onClick:t.withModifiers(Rr=>rt(sr,Cr.value),["stop"])},[t.createElementVNode("div",Cat,[t.createElementVNode("div",Nat,t.toDisplayString(Cr.label),1)]),M.value[sr]===Cr.value?(t.openBlock(),t.createElementBlock("div",Oat,[...Yt[16]||(Yt[16]=[t.createElementVNode("svg",{fill:"none",height:"16",viewBox:"0 0 16 16",width:"16"},[t.createElementVNode("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"#cbee6b","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])])):t.createCommentVNode("",!0)],42,Eat))),128))])])):t.createCommentVNode("",!0)],8,Tat)):t.createCommentVNode("",!0),sr===1&&A.value.length>2?(t.openBlock(),t.createElementBlock("div",Mat)):t.createCommentVNode("",!0)],64))),128))],2)):t.createCommentVNode("",!0),n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:8,class:"cancel-btn",onClick:Zt},"Cancelar")),k.value?(t.openBlock(),t.createElementBlock("button",{key:9,class:"ok-btn",onClick:qt},"OK")):t.createCommentVNode("",!0)]))}}),zat=t2(Vat,[["__scopeId","data-v-9fa60fa7"]]),Pat={key:0,class:"modal-simple"},Aat={class:"modal-simple__content"},Rat={class:"modal-simple__content__header"},Uat={class:"modal-simple__content__body"},Fat={class:"modal-simple__content__footer"},Iat={__name:"ModalSimple",props:{modelValue:{type:Boolean,default:!1}},setup(e){return(r,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.modelValue?(t.openBlock(),t.createElementBlock("div",Pat,[t.createElementVNode("div",Aat,[t.createElementVNode("div",Rat,[t.renderSlot(r.$slots,"header",{},void 0,!0)]),t.createElementVNode("div",Uat,[t.renderSlot(r.$slots,"body",{},void 0,!0)]),t.createElementVNode("div",Fat,[t.renderSlot(r.$slots,"footer",{},void 0,!0)])])])):t.createCommentVNode("",!0)]))}},qat=t2(Iat,[["__scopeId","data-v-1cc4f590"]]),jat={class:"footer"},Wat={__name:"ModalCautionClose",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(e,{emit:r}){const a=r;function v(h){a("update:modelValue",h)}function $(h){a("action",h),a("update:modelValue",!1)}return(h,u)=>(t.openBlock(),t.createBlock(qat,{"modle-value":e.value,"onUpdate:modelValue":v},{header:t.withCtx(()=>[...u[2]||(u[2]=[t.createElementVNode("div",{class:"header"},"Descartar template",-1)])]),body:t.withCtx(()=>[...u[3]||(u[3]=[t.createElementVNode("div",{class:"body"},"¿Estás seguro que deseas abandonar el proceso?",-1)])]),footer:t.withCtx(()=>[t.createElementVNode("div",jat,[t.createElementVNode("div",{role:"button",class:"btn btn-cancel",onClick:u[0]||(u[0]=i=>$(!1))}," Seguir editando "),t.createElementVNode("div",{role:"button",class:"btn btn-confirm",onClick:u[1]||(u[1]=i=>$(!0))}," Descartar ")])]),_:1},8,["modle-value"]))}},Dat=t2(Wat,[["__scopeId","data-v-ed9b5088"]]),Kat={key:0,class:"modal-simple"},Bat={__name:"ModalChangesSaved",props:{modelValue:{type:Boolean,default:!1}},setup(e){return(r,a)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.modelValue?(t.openBlock(),t.createElementBlock("div",Kat,[...a[0]||(a[0]=[t.createElementVNode("div",{class:"modal-simple__content"},[t.createElementVNode("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M29.3346 14.7823V16.0089C29.333 18.8842 28.402 21.6818 26.6804 23.9847C24.9589 26.2876 22.539 27.9722 19.7818 28.7875C17.0245 29.6027 14.0776 29.5048 11.3806 28.5084C8.68354 27.512 6.38084 25.6704 4.81592 23.2584C3.25099 20.8463 2.50769 17.993 2.69687 15.124C2.88605 12.255 3.99758 9.52404 5.86568 7.33836C7.73377 5.15269 10.2583 3.62944 13.0629 2.9958C15.8674 2.36215 18.8017 2.65205 21.428 3.82227",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M29.3333 5.33203L16 18.6787L12 14.6787",stroke:"#CDEF71","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})]),t.createElementVNode("div",{class:"modal-simple__content__text"}," Los cambios se han guardado correctamente ")],-1)])])):t.createCommentVNode("",!0)]),_:1})]))}},Xat=t2(Bat,[["__scopeId","data-v-2bc30783"]]),Gat={class:"template-maker__header"},Zat={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jat={class:"template-maker__content"},Hat={class:"template-maker__content__main"},Yat={id:"containerMain",class:"container-main"},Qat={class:"template-maker__content__main__cover-selector"},$at=["id"],ent={class:"page-indicator"},tnt={class:"page-indicator__index"},rnt=["onClick"],ant=["onClick"],nnt={key:0,class:"template-maker__content__main__footer"},int={class:"template-maker__content__main__footer__paginator"},ont={class:"template-maker__content__main__footer__paginator__nav"},snt={class:"template-maker__content__main__footer__paginator__numbers"},lnt=["onClick"],cnt={__name:"GSC-TemplateReportMaker",props:{token:{type:String,default:""},userTeamId:{type:Number,default:0}},emits:["close"],setup(e,{expose:r,emit:a}){const v=new Map,$=t.ref([{title:"Page 1",id:String(Date.now()),items:[{name:"Volumetrica",id:`w-${String(Date.now())}`,x:0,y:0,w:4,h:6,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}},{name:"Volumetrica",id:String(Date.now()),x:4,y:0,w:4,h:4,maxWidth:4,maxHeight:4,noResize:!1,noMove:!1,componentProps:{}}]}]),h=t.ref(null),u=t.ref(0),i=t.ref(!1),p=t.ref(null),c=t.ref(null),n=t.ref(!0),k=t.ref(!1),T=t.ref(!1),x=t.ref(0),d=t.ref(!1),o=t.ref(null),l=t.ref(new Map),s=t.ref(null),f=t.ref(null),g=t.ref(!1),S=t.ref(!1),L=t.ref(!1),M=new Map,A=new Map,z=t.computed(()=>({"--overflow-y-template-maker":k.value?"scroll":"hidden","--height-container-main":k.value?"fit-content":"calc(100vh - 64px)","--margin-bottom-container-main":(k.value,"0")})),I=t.computed(()=>u.value+1);t.watch(()=>i.value,$t=>{const At=document.getElementById("app");$t?(u.value=0,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",At&&(At.style.overflow="hidden")):(document.body.style.overflow="",document.documentElement.style.overflow="",At&&(At.style.overflow=""))});function j($t){return $t<10?`0${$t}`:$t}async function F({templateId:$t,userId:At}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${At}/templates/${$t}`,{method:"GET",headers:{Authorization:pt.token}})).json()).data}catch(or){console.error("Error fetching template by ID:",or)}}async function W({reportId:$t,userId:At}){try{return(await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${At}/reports/${$t}`,{method:"GET",headers:{Authorization:pt.token}})).json()).data}catch(or){console.error("Error fetching report by ID:",or)}}let U=0;function O($t){h.value=$t,U>0&&(g.value=!0),U++}function X($t){$t&&st(null,!0)}let N=null;function Y($t,At){let or=$t.getBoundingClientRect(),Gt={height:$t.clientHeight,width:$t.clientWidth},Lt=At.getBoundingClientRect();if(!(Lt.top>=or.top&&Lt.bottom<=or.top+Gt.height)){const It=Lt.top-or.top,Pt=Lt.bottom-or.bottom;Math.abs(It)<Math.abs(Pt)?$t.scrollTop+=It:$t.scrollTop+=Pt}}function se($t,At){let or=$t.getBoundingClientRect();const Gt=At.getBoundingClientRect().top-or.top;$t.scrollTop+=Gt}function me($t,At=!1){const or={title:`Page ${$.value.length+1}`,id:`p-${Date.now()}`,items:[]};if(Zt(),$t!==void 0&&$t>=-1?$.value.splice($t+1,0,or):$.value.push(or),t.nextTick(()=>{const Gt=$.value.findIndex(It=>It.id===or.id),Lt=document.getElementById(`page-${Gt+1}`);N||(N=document.getElementById("containerMain")),Lt&&N?Y(N,Lt):console.error("Page element or container main element not found")}),At)return or;g.value=!0}function ge($t){if($t<0||$t>$.value.length)return;u.value=$t;const At=document.getElementById(`page-${$t}`);if(N||(N=document.getElementById("containerMain")),At&&N){const or=new CustomEvent("programmatic-scroll-start");document.dispatchEvent(or),se(N,At),setTimeout(()=>{const Gt=new CustomEvent("programmatic-scroll-end");document.dispatchEvent(Gt)},300)}else console.error("Page element or container main element not found")}function be($t){s.value=$t,d.value=!0}function xe($t,At){const or=At+1;$t&&u.value!==or&&(u.value=or)}function Ae($t){d.value=!0,Sd.emit("edit-view",{view:$t})}async function qe({templateReportId:$t,userId:At,isTemplateMode:or}){try{return or?F({templateId:$t,userId:At}):W({reportId:$t,userId:At})}catch(Gt){throw new Error("Error fetching template or report by ID: "+Gt.message)}}function _e(){U=0,d.value=!1,u.value=0,s.value=null,f.value=null,l.value.clear(),N=null,p.value=null,c.value=null,h.value=null,x.value=0,$.value=[],T.value=!1,g.value=!1,S.value=!1,L.value=!1,M.forEach($t=>clearTimeout($t)),M.clear(),A.forEach($t=>clearTimeout($t)),A.clear(),Ue=[],v.clear()}let Ue=[];async function je($t){if(_e(),n.value=$t.isTemplateMode,k.value=!!$t.isPDFMode,$t.isPDFMode?p.value=await W({reportId:$t.reportId,userId:$t.userId}):(p.value=$t.template,p.value=await qe({templateReportId:$t.template.id,userId:$t.template.user_id,isTemplateMode:$t.isTemplateMode})),!p.value)return;p.value&&p.value.game&&(p.value.game=He(p.value.game)),c.value=JSON.parse(JSON.stringify(p.value)),T.value=p.value.template_type===2;const At=p.value.pages.find(or=>or.is_front_page);x.value=At?At.type:1,i.value=!0,console.log("isTemplateMode:",n.value),$t.isTemplateMode||(Ue=await rt(p.value),console.log("specificPlaysCorners fetched:",Ue)),$.value=p.value.pages.reduce((or,Gt,Lt)=>{if(!Gt.is_front_page){Gt.name||(Gt.name="");const It=Lt,Pt={originalPage:JSON.parse(JSON.stringify(Gt)),title:Gt.name,id:`p-${Date.now()-Lt*9}`,items:[],components:Gt.components};Gt.components&&Gt.components.length>0&&(Pt.items=Gt.components.map((gr,ur)=>{const vr=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],gr.coreView.id,gr.dynamicFilters,T.value,n.value,gr.filtersJSON||null,pt.token,gr.filters),Tr={originalComponent:JSON.parse(JSON.stringify(gr)),title:gr.title,shortTitle:gr.shortTitle||gr.title,game:p.value.game,idAux:gr.id,id:`w-${Date.now()-ur*7}`,x:gr.column,y:gr.row,w:gr.colspan,h:gr.rowspan,maxWidth:gr.max_column,maxHeight:gr.max_row,minWidth:gr.min_column,minHeight:gr.min_row,noResize:!n.value,noMove:!n.value,coreView:gr.coreView||null,isTemplateMode:n.value,componentName:gr.componentName,componentProps:Qe({currentProps:gr.componentProps,coreView:gr.coreView,isTemplateMode:n.value,templateToEdit:p.value,filterMultiple:gr.filterMultiple||null,game:p.value.game||null,dynamicFilters:gr.dynamicFilters,page:It,componentId:ur})||{},filterMultiple:gr.filterMultiple,isHomeTeam:We({game:p.value.game,isTemplateMode:n.value,currentIsHomeTeam:gr.isHomeTeam||gr.componentProps.isHomeTeamForAnalysis}),filtersJSON:gr.filtersJSON||null,dynamicFilters:gr.dynamicFilters||[],filterAndViewsContainer:vr},Pr=t.reactive({view:Tr});return vr.addView(Pr,!0),l.value.set(vr.getId(),vr),Tr})),or.push(Pt)}return or},[]),console.log("Pages loaded into template maker:",$.value)}function Re({game:$t,isTemplateMode:At}){const or=$t&&$t.homeTeam&&$t.awayTeam&&($t.homeTeam.team_id===pt.userTeamId||$t.awayTeam.team_id===pt.userTeamId);return{isUserTeamHome:or&&$t.homeTeam.team_id===pt.userTeamId,requiresUserTeamAdjustment:or&&!At}}function We({game:$t,isTemplateMode:At,currentIsHomeTeam:or}){const{isUserTeamHome:Gt,requiresUserTeamAdjustment:Lt}=Re({game:$t,isTemplateMode:At});return Lt?or?Gt:!Gt:or}function Qe({currentProps:$t,coreView:At,templateToEdit:or,isTemplateMode:Gt,filterMultiple:Lt,game:It,dynamicFilters:Pt,page:gr,componentId:ur}){var vr,Tr,Pr,Tt;if(!$t||!At)return $t||{};const{isUserTeamHome:Yt,requiresUserTeamAdjustment:er}=Re({game:It,isTemplateMode:Gt});console.log("currentProps:",$t);let sr={...$t};if(At.id===5&&(sr.isGhostEffect=Gt,er)){const Cr=sr.preMatchType===1;sr.preMatchType=Cr?Yt?1:2:Yt?2:1}if(At.id===7&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===9&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===18){if(!Gt&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(!Gt){const Cr=Ue.shift();Cr?(sr.specificPlaysCornersData=Cr,sr.teamIdForAnalysis=sr.isHomeTeamForAnalysis?It.home_team:It.visiting_team,sr.playIdForAnalysis=Cr.play_id,sr.gameIdForAnalysis=Cr.game_id,sr.seasonIdForAnalysis=It.season_id,sr.isTemplateMode=Gt,sr.isGameOnly=!0,sr.isCornerInfoVisible=!0):console.warn("No specific plays corner data available for this component")}}if(At.id===16){if(!Gt&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(!Gt){sr.isPreMatch=!T.value,sr.isTemplateMode=Gt,sr.seasonId=or.season_id,sr.teamIdForAnalysis=sr.isHomeTeamForAnalysis?or.game.home_team:or.game.visiting_team;const Cr=sr.isHomeTeamForAnalysis?or.last_games.last_home_games:or.last_games.last_visiting_games;T.value?sr.gamesIdsForAnalysis=[or.game.game_id]:sr.howManyGames?sr.gamesIdsForAnalysis=Cr.slice(0,sr.howManyGames).map(Rr=>Rr.game_id):(sr.gamesIdsForAnalysis=[],sr.gameDataUTC=or.game.date_time_utc)}}if(At.id===10&&er){const Cr=sr.isHomeTeamForAnalysis;sr.isHomeTeamForAnalysis=Cr?Yt:!Yt}if(At.id===1&&(sr.gameId=It?It.id:"",sr.homeLogo=It?It.homeTeam.logo:"",sr.awayLogo=It?It.awayTeam.logo:"",sr.seasonId=It?It.season_id:0,sr.default=Gt),At.id===6&&(sr.game=It||"",sr.lastGames=or.last_games,sr.selectedOption=or.template_type===2?"Postmatch":"Prematch"),At.id===13&&(sr.isdefault=Gt,sr.seasonid=It?It.seasonId:2010,sr.datetimeutc=It?or.template_type===1?It?It.date_time_utc:"":null:"",sr.teamids=It?[It.home_team,It.visiting_team]:[1,2],sr.categoryids=Pt?Pt[1]:[20,2],sr.teamsshow=It?Pt?Pt[2]==1?[It.home_team]:Pt[2]==2?[It.visiting_team]:[It.home_team,It.visiting_team]:[1,2]:[1,2],sr.analysistype=Pt?Pt[0]:[],sr.gameid=or.template_type===1?null:It?It.id:"",sr.teams=It?[{id:It.home_team,name:It.home_team_acronym,logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+It.home_team+".png"},{id:It.visiting_team,name:It.visiting_team_acronym,logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+It.visiting_team+".png"}]:[]),At.id===15&&(sr.view=1,sr.token=pt.token,sr.numitems=Pt?Pt[1]:3,sr.isdefault=Gt,sr.reportid=or!=null&&or.id?or.id:0,sr.userid=or!=null&&or.user_id?or.user_id:0,sr.page=gr+1,sr.typegame=T.value?2:1,sr.componentid=ur+1,sr.data={season:It?It.seasonId:2010,type:2,game:It?It.id:0,team:Gt?2:Lt?Lt.isHomeTeam?It.home_team||2:It.visiting_team||2:2}),At.id===17){console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("LLEGO AQUI MERO ESTE COMPOENNETE ES: ---->>>> ",It),console.log("dynamicFiltersS: ---->>>> ",Pt),console.log("filters: =================================================================================="),console.log("lateralidad: ",Pt?Pt[1]==32?"right":"left":"right"),console.log("infavoragainstteam: ",Pt?Pt[0]:!0),console.log("teamselected: ",Lt?Lt.isHomeTeam?(It==null?void 0:It.home_team)||2:(It==null?void 0:It.visiting_team)||2:2),console.log("tournamentselected: ",or!=null&&or.tournament_id?{id:or.tournament_id}:{id:1}),sr.game=It?{id:It.id||It.game_id||It.gameId||null,home_team:It.home_team||null,away_team:It.visiting_team||null,season:It.seasonId||It.season_id||null,game_status:It.game_status||It.status||null,home_acronym:It.home_team_acronym||((vr=It.homeTeam)==null?void 0:vr.acronym)||null,away_acronym:It.visiting_team_acronym||((Tr=It.awayTeam)==null?void 0:Tr.acronym)||null,logo_home:((Pr=It.homeTeam)==null?void 0:Pr.logo)||null,logo_away:((Tt=It.awayTeam)==null?void 0:Tt.logo)||null}:null,sr.infavoragainstteam=Pt?!Pt[0]:!0,sr.forseason=!T.value,sr.forteam=!1,sr.tournamentselected=or!=null&&or.tournament_id?{id:or.tournament_id}:{id:1},sr.forgame=!!T.value,sr.lateralidad=Pt&&Pt[1]==32?"right":"left",sr.teamselected=Pt[2]==3?Lt?Lt.isHomeTeam?It==null?void 0:It.home_team:It==null?void 0:It.visiting_team:0:Pt[2]==2?It==null?void 0:It.visiting_team:It==null?void 0:It.home_team;const Cr=Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][4]!==void 0?Array.isArray(Pt[3][4])?Pt[3][4].filter(Rr=>Rr!=="rematado-destino-porteria").reduce((Rr,sa)=>(sa==="fue-gol"?Rr.push(583,585,587,589):sa==="no-fue-gol"?Rr.push(584,586,588,590):sa==="rematado-sin-destino-porteria"?Rr.push(125,131,139,145):sa==="sin-destino"?Rr.push(122,128,136,142):sa==="ganados-por-portero-rival"?Rr.push(123,129,137,143):sa==="ganados-por-jugador-rival"&&Rr.push(124,130,138,144),Rr),[]):[]:[];sr.filters={isMoment:!0,final:[1,2,3],moment:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][0]!==void 0?Array.isArray(Pt[3][0])?Pt[3][0].map(Rr=>Rr==="iba-ganando"?1:Rr==="iba-empatado"?3:Rr==="iba-perdiendo"?2:Rr):[]:[],playingAs:[1,2],sections:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][1]!==void 0?Array.isArray(Pt[3][1])?Pt[3][1].map(Rr=>Rr==="0-15"?1:Rr==="16-30"?2:Rr==="31-45"?3:Rr==="46-60"?4:Rr==="61-75"?5:Rr==="76-90"?6:Rr):[]:[],games:T.value?[It==null?void 0:It.game_id]:[],players:[],cornertype:Pt&&Pt[1]!==void 0?Pt[1]:null,howWas:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][2]!==void 0?Array.isArray(Pt[3][2])?Pt[3][2].filter(Rr=>Rr!=="izquierda"&&Rr!=="derecha").map(Rr=>{const sa=Pt[1];return Rr==="comba-afuera"?sa==32?134:120:Rr==="comba-adentro"?sa==32?140:126:Rr==="raz-area"?sa==32?146:327:Rr==="en-corto"?sa==32?147:133:Rr}):[]:[],zona:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][3]!==void 0?Array.isArray(Pt[3][3])?Pt[3][3]:[]:[],whathappened:Cr,isWhatHappenedFull:Array.isArray(Cr)&&Cr.length===24,isZoneFull:Pt&&Pt[3]&&typeof Pt[3]=="object"&&!Array.isArray(Pt[3])&&Pt[3][3]!==void 0&&Array.isArray(Pt[3][3])?Pt[3][3].length===35:!1},console.log("propsAux.filters: ",sr.filters),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),console.log("---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> ---->>>> "),sr.showBallGo=!0,sr.showHeatMap=!0,sr.ballOnOff="OFF",sr.showdefault=Gt}if(At.id===14&&(sr.isReports=!0,sr.isDefault=Gt,sr.type=or.tournament_type==1?1:0,sr.typeView=1,sr.tournament=or.tournament_id,sr.currentSeason=It?It.season_id:0,sr.currentSeasonId=It?It.season_id:0,sr.showVideos=!1,sr.localTeam=It?It.home_team:0,sr.awayTeam=It?It.visiting_team:0),At.id===3&&(sr.defaultShields=Gt),At.id===2){let Cr=!0,Rr=0,sa=0;It&&(Cr=or.main_team==It.home_team||or.main_team==It.visiting_team,Rr=Cr?or.main_team==(It==null?void 0:It.home_team)?It==null?void 0:It.home_team:It==null?void 0:It.visiting_team:It==null?void 0:It.home_team,sa=Cr?or.main_team==(It==null?void 0:It.home_team)?It==null?void 0:It.visiting_team:It==null?void 0:It.home_team:It==null?void 0:It.visiting_team),sr.gamed=It?It.id:"",sr.game=It||"",sr.season=It?It.season_id:0,sr.teamView=Lt.teamType==3?0:Lt.teamType==1?Rr:sa,sr.useDummyData=Gt}return At.id===8&&(sr.teamSelected=It?{teamId:It.home_team}:1,sr.isDefault=Gt),At.id===4&&(sr.gameId=It?It.id:"",sr.isDefault=Gt,sr.homeTeam=It?It==null?void 0:It.home_team:"",sr.awayTeam=It?It==null?void 0:It.visiting_team:""),sr}async function rt($t){try{const At=await(await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$t.user_id}/reports/${$t.id}/specific-plays-corners`,{method:"GET",headers:{Authorization:pt.token}})).json();return console.log("66666666666666666666666666666666666666"),console.log("data",At),At.data}catch(At){return console.error("Error fetching specific plays:",At),[]}}const pt=e,ut=a;t.watch(()=>pt.token,($t,At)=>{},{immediate:!0}),r({show:je}),Sd.on("add-page-view",$t=>{v.set($t.view.id,$t.view);const At=$.value.find(or=>or.id===$t.pageId);At&&(At.items||(At.items=[]),At.items.push($t.view),t.nextTick(()=>{const or=document.querySelector(`[gs-id="${$t.view.id}"]`);$t.grid.makeWidget(or)}))}),Sd.on("add-page-and-view",$t=>{const At=$.value.findIndex(or=>or.id===$t.pageId);if(At>-1){const or=me(At,!0);setTimeout(()=>{Sd.emit("add-view",{pageId:or.id,view:$t.view,filterAndWidgetContainer:$t.filterAndWidgetContainer}),f.value&&(or.stepBackPage=f.value),f.value=or},500)}else console.error("Page not found for adding view:",$t.pageId)}),Sd.on("empty-page",$t=>{d.value&&s.value&&s.value.id===$t.id||(Jt($t),f.value&&f.value.id===$t.id&&(f.value.stepBackPage?f.value=f.value.stepBackPage:f.value=null))}),Sd.on("filters-cancelled",$t=>{$t&&$t.removeAllChildViews()}),Sd.on("activate-save-button",()=>{g.value=!0});function He($t){return{...$t,gameId:$t.game_id,id:$t.game_id,seasonId:$t.season_id,status:$t.game_status,homeTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${$t.home_team}.png`,team_id:$t.home_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${$t.home_team}.png`,colloquial_name:$t.home_team_name,acronym:$t.home_team_acronym,team_name:$t.home_team_name},awayTeam:{logo:`https://golstatsimages.blob.core.windows.net/teams-150/${$t.visiting_team}.png`,team_id:$t.visiting_team,provisional_logo:`https://golstatsimages.blob.core.windows.net/teams-provisional/${$t.visiting_team}.png`,colloquial_name:$t.visiting_team_name,acronym:$t.visiting_team_acronym,team_name:$t.visiting_team_name}}}function st($t,At=!1){At||!n.value?(i.value=!1,_e(),ut("close")):g.value?S.value=!0:(i.value=!1,_e(),ut("close"))}function ct(){o.value=null,d.value=!1}function Ct({page:$t,view:At,applyMinimumSize:or=!1}){const Gt=$t.grid;if(!$t||!At||!Gt)return null;const Lt=or?{w:At.min_column,h:At.min_row}:{w:At.colspan,h:At.rowspan},It=Gt.willItFit(0,0,Lt.w,Lt.h,!0);return It?{willFit:It,applyMinimumSize:or}:or?null:Ct({page:$t,view:At,applyMinimumSize:!0})}const Vt=new Set([9]);function Ot($t){var At,or,Gt,Lt,It,Pt,gr,ur,vr,Tr,Pr,Tt,Yt,er,sr,Cr,Rr,sa,Ia;if(console.log("onFiltersChanged called with filters:",$t),$t.dynamicFilters&&$t.dynamicFilters.length>0&&$t.viewToEdit&&$t.viewToEdit.view){const qa=$t.viewToEdit.view.id;$.value.forEach(bn=>{bn.items.forEach(fn=>{fn.id===qa&&fn.coreView&&fn.coreView.id===3&&(fn.componentProps.desplegable=$t.dynamicFilters[0]||!1,fn.componentProps.key=$t.dynamicFilters[0]||!1,t.nextTick(()=>{Sd.emit("force-component-update",{itemId:fn.id,componentProps:fn.componentProps})}))})})}if($t.viewToEdit){if(!$t.viewToEdit.view.filterAndViewsContainer){const qa=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[$t.viewToEdit],((At=$t.viewToEdit.view.coreView)==null?void 0:At.id)||$t.viewToEdit.view.id,$t.dynamicFilters||[],T.value,n.value,$t.filtersJSON,pt.token,$t.filters);$t.viewToEdit.view.filterAndViewsContainer=qa}$t.viewToEdit.view.filterAndViewsContainer.updateView({view:$t.viewToEdit,dynamicFilters:$t.dynamicFilters||[],filtersJSON:$t.filtersJSON||null,filters:$t.filters}),g.value=!0}else if($t.view){$t.view.id&&$t.filterAndViewsContainer&&$t.view.id!==$t.filterAndViewsContainer.viewId&&($t.filterAndViewsContainer.removeAllChildViews(),$t.filterAndViewsContainer.setViewId($t.view.id),$t.filterAndViewsContainer.setFiltersJSON($t.filtersJSON||null)),$t.view.id&&Vt.has($t.view.id)&&$t.dynamicFilters[0]&&$t.dynamicFilters[0].length===0&&$t.filterAndViewsContainer&&($t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(Gt=(or=$t.viewToEdit)==null?void 0:or.view)==null?void 0:Gt.id),g.value=!0);const qa=f.value||s.value,bn=Ct({page:qa,view:$t.view,applyMinimumSize:!1});$t.view.filtersJSON=$t.filtersJSON||null;const fn=$t.filterAndViewsContainer,In=$.value.findIndex(ea=>ea.id===qa.id);if(fn){console.log("1111");const ea=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters);if(((Lt=$t.view)==null?void 0:Lt.id)===15){const Ur=(It=$t.filterAndViewsContainer)==null?void 0:It.getId();if(Ur&&M.has(Ur)){const fa=M.get(Ur);clearTimeout(fa),M.delete(Ur)}}if(((Pt=$t.view)==null?void 0:Pt.id)===17){const Ur=(gr=$t.filterAndViewsContainer)==null?void 0:gr.getId();if(Ur&&A.has(Ur)){const fa=A.get(Ur);clearTimeout(fa),A.delete(Ur)}}if(ea){if(fn.setFilters($t.filters),fn.setDynamicFilters($t.dynamicFilters),bn||In===$.value.length-1){Sd.emit("add-view",{pageId:qa.id,view:$t.view,filterAndWidgetContainer:fn,avoidWillFit:!1,applyMinimumSize:bn?bn.applyMinimumSize:!1,dynamicFilters:$t.dynamicFilters,filters:$t.filters}),$t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(vr=(ur=$t.viewToEdit)==null?void 0:ur.view)==null?void 0:vr.id),g.value=!0;let Ur=null;if(((Tr=$t.view)==null?void 0:Tr.id)===15?(t.nextTick(()=>{var fa;const Va=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters);((fa=$t.dynamicFilters)==null?void 0:fa[0])===3&&Va&&Ot($t)}),Ur=setTimeout(()=>{var fa,Va;const Za=(fa=$t.filterAndViewsContainer)==null?void 0:fa.getId();Za&&M.delete(Za),console.log("222222222222222222");const Oa=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters);((Va=$t.dynamicFilters)==null?void 0:Va[0])===3&&Oa&&Ot($t)},200)):((Pr=$t.view)==null?void 0:Pr.id)===17?(t.nextTick(()=>{var fa,Va;const Za=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters),Oa=(fa=$t.dynamicFilters)==null?void 0:fa[0],Xr=(Va=$t.dynamicFilters)==null?void 0:Va[2];(Oa===3||Xr===3)&&Za&&Ot($t)}),Ur=setTimeout(()=>{var fa,Va,Za;const Oa=(fa=$t.filterAndViewsContainer)==null?void 0:fa.getId();Oa&&A.delete(Oa);const Xr=$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters),ca=(Va=$t.dynamicFilters)==null?void 0:Va[0],kr=(Za=$t.dynamicFilters)==null?void 0:Za[2];(ca===3||kr===3)&&Xr&&Ot($t)},200)):(console.log("33333333333333"),Ur=setTimeout(()=>{$t.filterAndViewsContainer.getRequiresAddView($t.dynamicFilters,$t.filters)&&Ot($t)},1e3)),((Tt=$t.view)==null?void 0:Tt.id)===15&&Ur){const fa=(Yt=$t.filterAndViewsContainer)==null?void 0:Yt.getId();fa&&M.set(fa,Ur)}if(((er=$t.view)==null?void 0:er.id)===17&&Ur){const fa=(sr=$t.filterAndViewsContainer)==null?void 0:sr.getId();fa&&A.set(fa,Ur)}}}else $t.isAltMode?$t.viewToEdit||$t.filterAndViewsContainer.updateFilters($t.filters,(Rr=(Cr=$t.viewToEdit)==null?void 0:Cr.view)==null?void 0:Rr.id):$t.filterAndViewsContainer.updateDynamicFilters($t.dynamicFilters,(Ia=(sa=$t.viewToEdit)==null?void 0:sa.view)==null?void 0:Ia.id),g.value=!0}else if(bn||In===$.value.length-1){const ea=new Qk(`FAWC-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,[],$t.view.id,$t.dynamicFilters,T.value,n.value,$t.filtersJSON,pt.token,$t.filters);Sd.emit("set-filter-and-views-container",ea),l.value.set(ea.getId(),ea);const Ur=$t.dynamicFilters&&($t.dynamicFilters[0]===3||$t.dynamicFilters[2]===3)&&($t.view.id===15||$t.view.id===17);$t.dynamicFilters&&(Array.isArray($t.dynamicFilters[0])||Ur)?($t.filterAndViewsContainer=ea,Ot($t)):Sd.emit("add-view",{pageId:qa.id,view:$t.view,filterAndWidgetContainer:ea,avoidWillFit:!1,applyMinimumSize:bn?bn.applyMinimumSize:!1,dynamicFilters:$t.dynamicFilters,filters:$t.filters}),g.value=!0}}}async function qt(){if(g.value)try{const $t=[{is_front_page:!0,template_type:h.value.isPostMatch?2:1,type:h.value.id},...$.value.map(or=>({columns:or.originalPage?or.originalPage.columns:12,rows:or.originalPage?or.originalPage.rows:12,gap:or.originalPage?or.originalPage.gap:10,name:or.title,width:or.originalPage?or.originalPage.width:968,height:or.originalPage?or.originalPage.height:702,components:or.items.reduce((Gt,Lt)=>(Lt.isDeleted||Gt.push({min_column:Lt.minWidth,min_row:Lt.minHeight,max_column:Lt.maxWidth,max_row:Lt.maxHeight,column:Lt.x,row:Lt.y,colspan:Lt.w,rowspan:Lt.h,name:Lt.name,title:Lt.title,titleShort:Lt.titleShort||Lt.title,dynamicFilters:Lt.filterAndViewsContainer.getComponentDynamicFilters(Lt.id)||Lt.filterAndViewsContainer.getDynamicFilters()||[],coreView:Lt.coreView||null,componentName:Lt.componentName,componentProps:Lt.componentProps||{},isHomeTeam:Lt.isHomeTeam||Lt.componentProps.isHomeTeamForAnalysis,filterMultiple:Lt.filterMultiple}),Gt),[])}))],At=await fetch(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${p.value.user_id}/templates/${p.value.id}/pages`,{method:"PATCH",headers:{Authorization:pt.token},body:JSON.stringify({pages:$t})});L.value=!0,await At.json(),g.value=!1,setTimeout(()=>{L.value=!1},2e3)}catch($t){console.error("Error saving template:",$t)}}function Zt(){$.value.forEach($t=>{$t.offListeners&&$t.offListeners()})}function Jt($t){const At=$.value.findIndex(or=>or.id===$t.id);At>-1&&(Zt(),$.value=$.value.filter(or=>or.id!==$t.id),u.value>=At&&(u.value=Math.max(0,u.value-1)),g.value=!0)}function Qt(){g.value=!0}function cr($t){const At=$.value.find(or=>or.items.some(Gt=>Gt.id===$t.id));if(At){const or=At.items.find(Gt=>Gt.id===$t.id);or&&(or.isDeleted=!0,g.value=!0)}}function hr($t){}return($t,At)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Dat,{modelValue:S.value,"onUpdate:modelValue":At[0]||(At[0]=or=>S.value=or),onAction:X},null,8,["modelValue"]),t.createVNode(Xat,{"model-value":L.value},null,8,["model-value"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[i.value&&p.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"template-maker",style:t.normalizeStyle(z.value)},[t.withDirectives(t.createVNode(zat,{token:e.token,view:o.value,"is-post-match":T.value,onClose:ct,onFiltersChanged:Ot},null,8,["token","view","is-post-match"]),[[t.vShow,n.value&&d.value]]),t.createElementVNode("div",Gat,[t.createTextVNode(t.toDisplayString(p.value?p.value.name:"Nuevo template")+" ",1),t.createElementVNode("div",{class:"template-maker__header__close",onClick:st},[k.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("svg",Zat,[...At[6]||(At[6]=[t.createElementVNode("path",{d:"M1.33398 1.33398L14.6673 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t.createElementVNode("path",{d:"M14.666 1.33398L1.33268 14.6673",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))])]),t.createElementVNode("div",Jat,[At[13]||(At[13]=t.createElementVNode("div",{class:"template-maker__content__sidebar"},null,-1)),t.createElementVNode("div",Hat,[t.createElementVNode("div",Yat,[t.createElementVNode("div",Qat,[t.withDirectives(t.createVNode(yQ,{"is-post-match":T.value,"initial-cover-id":x.value,onSelectCover:O},null,8,["is-post-match","initial-cover-id"]),[[t.vShow,n.value]])]),(t.openBlock(),t.createElementBlock("div",{class:"template-maker__content__main__pages",key:$.value.length},[h.value?(t.openBlock(),t.createBlock(_Ye,{key:0,id:"page-0",game:p.value.game||null,"cover-id":h.value.id,"is-post-match":h.value.isPostMatch,onIntersectionChanged:At[1]||(At[1]=or=>xe(or,-1))},null,8,["game","cover-id","is-post-match"])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"new-items-buttons",style:t.normalizeStyle({"margin-bottom":$.value.length===0?"30px":"0"})},[d.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"new-items-buttons__add-page new-item-button",onClick:At[2]||(At[2]=or=>me(-1))},[...At[7]||(At[7]=[t.createElementVNode("div",null,"+ Nueva página",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]))],4)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(or,Gt)=>(t.openBlock(),t.createElementBlock("div",{key:Gt,id:`page-${Gt+1}`,class:"template-maker__content__main__pages__page"},[t.createElementVNode("div",ent,[t.createElementVNode("div",tnt,"Pag "+t.toDisplayString(j(Gt+2)),1)]),h.value?(t.openBlock(),t.createBlock(THe,{key:0,page:or,"is-template-mode":n.value,"is-post-match":h.value.isPostMatch,game:p.value.game||null,lastGames:p.value.lastGames||[],"is-filter-visible":d.value,onEditView:Ae,onIntersectionChanged:Lt=>xe(Lt,Gt),onChangeSort:hr,onDeletePage:Jt,onViewChanged:Qt,onDeleteView:cr},null,8,["page","is-template-mode","is-post-match","game","lastGames","is-filter-visible","onIntersectionChanged"])):t.createCommentVNode("",!0),n.value&&!d.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"new-items-buttons",style:t.normalizeStyle({"margin-bottom":Gt+1===$.value.length?"30px":"0","margin-top":"10px"})},[t.createElementVNode("div",{class:"new-items-buttons__add-page new-item-button",onClick:Lt=>me(Gt)},[...At[8]||(At[8]=[t.createElementVNode("div",null,"+ Nueva página",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M8.66797 1.33203H4.0013C3.64768 1.33203 3.30854 1.47251 3.05849 1.72256C2.80844 1.9726 2.66797 2.31174 2.66797 2.66536V13.332C2.66797 13.6857 2.80844 14.0248 3.05849 14.2748C3.30854 14.5249 3.64768 14.6654 4.0013 14.6654H12.0013C12.3549 14.6654 12.6941 14.5249 12.9441 14.2748C13.1942 14.0248 13.3346 13.6857 13.3346 13.332V5.9987L8.66797 1.33203Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8.66797 1.33203V5.9987H13.3346",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,rnt),t.createElementVNode("div",{class:"new-items-buttons__add-item new-item-button",onClick:Lt=>be(or)},[...At[9]||(At[9]=[t.createElementVNode("div",null,"+ Agregar gráfico",-1),t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12 13.3346V6.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M8 13.3346V2.66797",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M4 13.332V9.33203",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,ant)],4)):t.createCommentVNode("",!0)],8,$at))),128))]))]),k.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nnt,[t.createElementVNode("div",int,[t.createElementVNode("div",ont,[t.createElementVNode("div",null,"Páginas "+t.toDisplayString(I.value),1),t.createElementVNode("div",{class:t.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:u.value<=0}]),onClick:At[3]||(At[3]=or=>u.value>0&&ge(u.value-1))},[...At[10]||(At[10]=[t.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.22444 5L5.29079 8.57741C5.56974 8.90285 5.56974 9.43049 5.29079 9.75592C5.01184 10.0814 4.55958 10.0814 4.28064 9.75592L0.709209 5.58926C0.430263 5.26382 0.430263 4.73618 0.709209 4.41074L4.28064 0.244078C4.55958 -0.0813593 5.01184 -0.0813592 5.29079 0.244078C5.56974 0.569515 5.56974 1.09715 5.29079 1.42259L2.22444 5Z",fill:"#92929D"})],-1)])],2),t.createElementVNode("div",{class:t.normalizeClass(["template-maker__content__main__footer__paginator__nav__arrow",{disabled:u.value>=$.value.length}]),onClick:At[4]||(At[4]=or=>u.value<$.value.length&&ge(u.value+1))},[...At[11]||(At[11]=[t.createElementVNode("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.77556 5L0.70921 8.57741C0.430264 8.90285 0.430264 9.43049 0.70921 9.75592C0.988156 10.0814 1.44042 10.0814 1.71936 9.75592L5.29079 5.58926C5.56974 5.26382 5.56974 4.73618 5.29079 4.41074L1.71936 0.244078C1.44042 -0.0813593 0.988155 -0.0813592 0.709209 0.244078C0.430264 0.569515 0.430264 1.09715 0.70921 1.42259L3.77556 5Z",fill:"#92929D"})],-1)])],2)]),t.createElementVNode("div",snt,[t.createElementVNode("div",{role:"button",class:t.normalizeClass({active:u.value===0}),onClick:At[5]||(At[5]=or=>ge(0))},t.toDisplayString(j(1)),3),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(or,Gt)=>(t.openBlock(),t.createElementBlock("div",{role:"button",key:Gt,class:t.normalizeClass({active:Gt+1===u.value}),onClick:Lt=>ge(Gt+1)},t.toDisplayString(j(Gt+2)),11,lnt))),128))])]),n.value?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:t.normalizeClass(["template-maker__content__main__footer__save save-button",{disabled:!g.value}]),onClick:qt},[...At[12]||(At[12]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V3.33333C2 2.97971 2.14048 2.64057 2.39052 2.39052C2.64057 2.14048 2.97971 2 3.33333 2H10.6667L14 5.33333V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14Z",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M11.3346 14.0013V8.66797H4.66797V14.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{d:"M4.66797 2V5.33333H10.0013",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1),t.createElementVNode("div",null,"Guardar",-1)])],2)):t.createCommentVNode("",!0)]))])])],4)):t.createCommentVNode("",!0)]))],64))}},unt=t2(cnt,[["__scopeId","data-v-e4d9c855"]]);function qZ(e,r){return function(){return e.apply(r,arguments)}}const{toString:dnt}=Object.prototype,{getPrototypeOf:dA}=Object,{iterator:LN,toStringTag:jZ}=Symbol,EN=(e=>r=>{const a=dnt.call(r);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Gw=e=>(e=e.toLowerCase(),r=>EN(r)===e),CN=e=>r=>typeof r===e,{isArray:e7}=Array,t7=CN("undefined");function d9(e){return e!==null&&!t7(e)&&e.constructor!==null&&!t7(e.constructor)&&Y_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const WZ=Gw("ArrayBuffer");function pnt(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&WZ(e.buffer),r}const hnt=CN("string"),Y_=CN("function"),DZ=CN("number"),p9=e=>e!==null&&typeof e=="object",fnt=e=>e===!0||e===!1,NN=e=>{if(EN(e)!=="object")return!1;const r=dA(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(jZ in e)&&!(LN in e)},mnt=e=>{if(!p9(e)||d9(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ynt=Gw("Date"),gnt=Gw("File"),vnt=Gw("Blob"),bnt=Gw("FileList"),xnt=e=>p9(e)&&Y_(e.pipe),_nt=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||Y_(e.append)&&((r=EN(e))==="formdata"||r==="object"&&Y_(e.toString)&&e.toString()==="[object FormData]"))},wnt=Gw("URLSearchParams"),[Tnt,Snt,knt,Lnt]=["ReadableStream","Request","Response","Headers"].map(Gw),Ent=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function h9(e,r,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let v,$;if(typeof e!="object"&&(e=[e]),e7(e))for(v=0,$=e.length;v<$;v++)r.call(null,e[v],v,e);else{if(d9(e))return;const h=a?Object.getOwnPropertyNames(e):Object.keys(e),u=h.length;let i;for(v=0;v<u;v++)i=h[v],r.call(null,e[i],i,e)}}function KZ(e,r){if(d9(e))return null;r=r.toLowerCase();const a=Object.keys(e);let v=a.length,$;for(;v-- >0;)if($=a[v],r===$.toLowerCase())return $;return null}const CS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BZ=e=>!t7(e)&&e!==CS;function pA(){const{caseless:e,skipUndefined:r}=BZ(this)&&this||{},a={},v=($,h)=>{const u=e&&KZ(a,h)||h;NN(a[u])&&NN($)?a[u]=pA(a[u],$):NN($)?a[u]=pA({},$):e7($)?a[u]=$.slice():(!r||!t7($))&&(a[u]=$)};for(let $=0,h=arguments.length;$<h;$++)arguments[$]&&h9(arguments[$],v);return a}const Cnt=(e,r,a,{allOwnKeys:v}={})=>(h9(r,($,h)=>{a&&Y_($)?e[h]=qZ($,a):e[h]=$},{allOwnKeys:v}),e),Nnt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ont=(e,r,a,v)=>{e.prototype=Object.create(r.prototype,v),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),a&&Object.assign(e.prototype,a)},Mnt=(e,r,a,v)=>{let $,h,u;const i={};if(r=r||{},e==null)return r;do{for($=Object.getOwnPropertyNames(e),h=$.length;h-- >0;)u=$[h],(!v||v(u,e,r))&&!i[u]&&(r[u]=e[u],i[u]=!0);e=a!==!1&&dA(e)}while(e&&(!a||a(e,r))&&e!==Object.prototype);return r},Vnt=(e,r,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=r.length;const v=e.indexOf(r,a);return v!==-1&&v===a},znt=e=>{if(!e)return null;if(e7(e))return e;let r=e.length;if(!DZ(r))return null;const a=new Array(r);for(;r-- >0;)a[r]=e[r];return a},Pnt=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&dA(Uint8Array)),Ant=(e,r)=>{const v=(e&&e[LN]).call(e);let $;for(;($=v.next())&&!$.done;){const h=$.value;r.call(e,h[0],h[1])}},Rnt=(e,r)=>{let a;const v=[];for(;(a=e.exec(r))!==null;)v.push(a);return v},Unt=Gw("HTMLFormElement"),Fnt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,v,$){return v.toUpperCase()+$}),XZ=(({hasOwnProperty:e})=>(r,a)=>e.call(r,a))(Object.prototype),Int=Gw("RegExp"),GZ=(e,r)=>{const a=Object.getOwnPropertyDescriptors(e),v={};h9(a,($,h)=>{let u;(u=r($,h,e))!==!1&&(v[h]=u||$)}),Object.defineProperties(e,v)},qnt=e=>{GZ(e,(r,a)=>{if(Y_(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const v=e[a];if(Y_(v)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},jnt=(e,r)=>{const a={},v=$=>{$.forEach(h=>{a[h]=!0})};return e7(e)?v(e):v(String(e).split(r)),a},Wnt=()=>{},Dnt=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function Knt(e){return!!(e&&Y_(e.append)&&e[jZ]==="FormData"&&e[LN])}const Bnt=e=>{const r=new Array(10),a=(v,$)=>{if(p9(v)){if(r.indexOf(v)>=0)return;if(d9(v))return v;if(!("toJSON"in v)){r[$]=v;const h=e7(v)?[]:{};return h9(v,(u,i)=>{const p=a(u,$+1);!t7(p)&&(h[i]=p)}),r[$]=void 0,h}}return v};return a(e,0)},Xnt=Gw("AsyncFunction"),Gnt=e=>e&&(p9(e)||Y_(e))&&Y_(e.then)&&Y_(e.catch),ZZ=((e,r)=>e?setImmediate:r?((a,v)=>(CS.addEventListener("message",({source:$,data:h})=>{$===CS&&h===a&&v.length&&v.shift()()},!1),$=>{v.push($),CS.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",Y_(CS.postMessage)),Znt=typeof queueMicrotask<"u"?queueMicrotask.bind(CS):typeof process<"u"&&process.nextTick||ZZ,au={isArray:e7,isArrayBuffer:WZ,isBuffer:d9,isFormData:_nt,isArrayBufferView:pnt,isString:hnt,isNumber:DZ,isBoolean:fnt,isObject:p9,isPlainObject:NN,isEmptyObject:mnt,isReadableStream:Tnt,isRequest:Snt,isResponse:knt,isHeaders:Lnt,isUndefined:t7,isDate:ynt,isFile:gnt,isBlob:vnt,isRegExp:Int,isFunction:Y_,isStream:xnt,isURLSearchParams:wnt,isTypedArray:Pnt,isFileList:bnt,forEach:h9,merge:pA,extend:Cnt,trim:Ent,stripBOM:Nnt,inherits:Ont,toFlatObject:Mnt,kindOf:EN,kindOfTest:Gw,endsWith:Vnt,toArray:znt,forEachEntry:Ant,matchAll:Rnt,isHTMLForm:Unt,hasOwnProperty:XZ,hasOwnProp:XZ,reduceDescriptors:GZ,freezeMethods:qnt,toObjectSet:jnt,toCamelCase:Fnt,noop:Wnt,toFiniteNumber:Dnt,findKey:KZ,global:CS,isContextDefined:BZ,isSpecCompliantForm:Knt,toJSONObject:Bnt,isAsyncFn:Xnt,isThenable:Gnt,setImmediate:ZZ,asap:Znt,isIterable:e=>e!=null&&Y_(e[LN])};function Rm(e,r,a,v,$){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),a&&(this.config=a),v&&(this.request=v),$&&(this.response=$,this.status=$.status?$.status:null)}au.inherits(Rm,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:au.toJSONObject(this.config),code:this.code,status:this.status}}});const JZ=Rm.prototype,HZ={};["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=>{HZ[e]={value:e}}),Object.defineProperties(Rm,HZ),Object.defineProperty(JZ,"isAxiosError",{value:!0}),Rm.from=(e,r,a,v,$,h)=>{const u=Object.create(JZ);au.toFlatObject(e,u,function(n){return n!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",p=r==null&&e?e.code:r;return Rm.call(u,i,p,a,v,$),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",h&&Object.assign(u,h),u};const Jnt=null;function hA(e){return au.isPlainObject(e)||au.isArray(e)}function YZ(e){return au.endsWith(e,"[]")?e.slice(0,-2):e}function QZ(e,r,a){return e?e.concat(r).map(function($,h){return $=YZ($),!a&&h?"["+$+"]":$}).join(a?".":""):r}function Hnt(e){return au.isArray(e)&&!e.some(hA)}const Ynt=au.toFlatObject(au,{},null,function(r){return/^is[A-Z]/.test(r)});function ON(e,r,a){if(!au.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,a=au.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(o,l){return!au.isUndefined(l[o])});const v=a.metaTokens,$=a.visitor||n,h=a.dots,u=a.indexes,p=(a.Blob||typeof Blob<"u"&&Blob)&&au.isSpecCompliantForm(r);if(!au.isFunction($))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(au.isDate(d))return d.toISOString();if(au.isBoolean(d))return d.toString();if(!p&&au.isBlob(d))throw new Rm("Blob is not supported. Use a Buffer instead.");return au.isArrayBuffer(d)||au.isTypedArray(d)?p&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function n(d,o,l){let s=d;if(d&&!l&&typeof d=="object"){if(au.endsWith(o,"{}"))o=v?o:o.slice(0,-2),d=JSON.stringify(d);else if(au.isArray(d)&&Hnt(d)||(au.isFileList(d)||au.endsWith(o,"[]"))&&(s=au.toArray(d)))return o=YZ(o),s.forEach(function(g,S){!(au.isUndefined(g)||g===null)&&r.append(u===!0?QZ([o],S,h):u===null?o:o+"[]",c(g))}),!1}return hA(d)?!0:(r.append(QZ(l,o,h),c(d)),!1)}const k=[],T=Object.assign(Ynt,{defaultVisitor:n,convertValue:c,isVisitable:hA});function x(d,o){if(!au.isUndefined(d)){if(k.indexOf(d)!==-1)throw Error("Circular reference detected in "+o.join("."));k.push(d),au.forEach(d,function(s,f){(!(au.isUndefined(s)||s===null)&&$.call(r,s,au.isString(f)?f.trim():f,o,T))===!0&&x(s,o?o.concat(f):[f])}),k.pop()}}if(!au.isObject(e))throw new TypeError("data must be an object");return x(e),r}function $Z(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(v){return r[v]})}function fA(e,r){this._pairs=[],e&&ON(e,this,r)}const eJ=fA.prototype;eJ.append=function(r,a){this._pairs.push([r,a])},eJ.toString=function(r){const a=r?function(v){return r.call(this,v,$Z)}:$Z;return this._pairs.map(function($){return a($[0])+"="+a($[1])},"").join("&")};function Qnt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tJ(e,r,a){if(!r)return e;const v=a&&a.encode||Qnt;au.isFunction(a)&&(a={serialize:a});const $=a&&a.serialize;let h;if($?h=$(r,a):h=au.isURLSearchParams(r)?r.toString():new fA(r,a).toString(v),h){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+h}return e}class rJ{constructor(){this.handlers=[]}use(r,a,v){return this.handlers.push({fulfilled:r,rejected:a,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){au.forEach(this.handlers,function(v){v!==null&&r(v)})}}const aJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$nt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fA,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mA=typeof window<"u"&&typeof document<"u",yA=typeof navigator=="object"&&navigator||void 0,eit=mA&&(!yA||["ReactNative","NativeScript","NS"].indexOf(yA.product)<0),tit=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rit=mA&&window.location.href||"http://localhost",Dx={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mA,hasStandardBrowserEnv:eit,hasStandardBrowserWebWorkerEnv:tit,navigator:yA,origin:rit},Symbol.toStringTag,{value:"Module"})),...$nt};function ait(e,r){return ON(e,new Dx.classes.URLSearchParams,{visitor:function(a,v,$,h){return Dx.isNode&&au.isBuffer(a)?(this.append(v,a.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...r})}function nit(e){return au.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function iit(e){const r={},a=Object.keys(e);let v;const $=a.length;let h;for(v=0;v<$;v++)h=a[v],r[h]=e[h];return r}function nJ(e){function r(a,v,$,h){let u=a[h++];if(u==="__proto__")return!0;const i=Number.isFinite(+u),p=h>=a.length;return u=!u&&au.isArray($)?$.length:u,p?(au.hasOwnProp($,u)?$[u]=[$[u],v]:$[u]=v,!i):((!$[u]||!au.isObject($[u]))&&($[u]=[]),r(a,v,$[u],h)&&au.isArray($[u])&&($[u]=iit($[u])),!i)}if(au.isFormData(e)&&au.isFunction(e.entries)){const a={};return au.forEachEntry(e,(v,$)=>{r(nit(v),$,a,0)}),a}return null}function oit(e,r,a){if(au.isString(e))try{return(r||JSON.parse)(e),au.trim(e)}catch(v){if(v.name!=="SyntaxError")throw v}return(a||JSON.stringify)(e)}const f9={transitional:aJ,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const v=a.getContentType()||"",$=v.indexOf("application/json")>-1,h=au.isObject(r);if(h&&au.isHTMLForm(r)&&(r=new FormData(r)),au.isFormData(r))return $?JSON.stringify(nJ(r)):r;if(au.isArrayBuffer(r)||au.isBuffer(r)||au.isStream(r)||au.isFile(r)||au.isBlob(r)||au.isReadableStream(r))return r;if(au.isArrayBufferView(r))return r.buffer;if(au.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let i;if(h){if(v.indexOf("application/x-www-form-urlencoded")>-1)return ait(r,this.formSerializer).toString();if((i=au.isFileList(r))||v.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return ON(i?{"files[]":r}:r,p&&new p,this.formSerializer)}}return h||$?(a.setContentType("application/json",!1),oit(r)):r}],transformResponse:[function(r){const a=this.transitional||f9.transitional,v=a&&a.forcedJSONParsing,$=this.responseType==="json";if(au.isResponse(r)||au.isReadableStream(r))return r;if(r&&au.isString(r)&&(v&&!this.responseType||$)){const u=!(a&&a.silentJSONParsing)&&$;try{return JSON.parse(r,this.parseReviver)}catch(i){if(u)throw i.name==="SyntaxError"?Rm.from(i,Rm.ERR_BAD_RESPONSE,this,null,this.response):i}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dx.classes.FormData,Blob:Dx.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};au.forEach(["delete","get","head","post","put","patch"],e=>{f9.headers[e]={}});const sit=au.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"]),lit=e=>{const r={};let a,v,$;return e&&e.split(`
|
|
7994
7994
|
`).forEach(function(u){$=u.indexOf(":"),a=u.substring(0,$).trim().toLowerCase(),v=u.substring($+1).trim(),!(!a||r[a]&&sit[a])&&(a==="set-cookie"?r[a]?r[a].push(v):r[a]=[v]:r[a]=r[a]?r[a]+", "+v:v)}),r},iJ=Symbol("internals");function m9(e){return e&&String(e).trim().toLowerCase()}function MN(e){return e===!1||e==null?e:au.isArray(e)?e.map(MN):String(e)}function cit(e){const r=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let v;for(;v=a.exec(e);)r[v[1]]=v[2];return r}const uit=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gA(e,r,a,v,$){if(au.isFunction(v))return v.call(this,r,a);if($&&(r=a),!!au.isString(r)){if(au.isString(v))return r.indexOf(v)!==-1;if(au.isRegExp(v))return v.test(r)}}function dit(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,a,v)=>a.toUpperCase()+v)}function pit(e,r){const a=au.toCamelCase(" "+r);["get","set","has"].forEach(v=>{Object.defineProperty(e,v+a,{value:function($,h,u){return this[v].call(this,r,$,h,u)},configurable:!0})})}let Q_=class{constructor(r){r&&this.set(r)}set(r,a,v){const $=this;function h(i,p,c){const n=m9(p);if(!n)throw new Error("header name must be a non-empty string");const k=au.findKey($,n);(!k||$[k]===void 0||c===!0||c===void 0&&$[k]!==!1)&&($[k||p]=MN(i))}const u=(i,p)=>au.forEach(i,(c,n)=>h(c,n,p));if(au.isPlainObject(r)||r instanceof this.constructor)u(r,a);else if(au.isString(r)&&(r=r.trim())&&!uit(r))u(lit(r),a);else if(au.isObject(r)&&au.isIterable(r)){let i={},p,c;for(const n of r){if(!au.isArray(n))throw TypeError("Object iterator must return a key-value pair");i[c=n[0]]=(p=i[c])?au.isArray(p)?[...p,n[1]]:[p,n[1]]:n[1]}u(i,a)}else r!=null&&h(a,r,v);return this}get(r,a){if(r=m9(r),r){const v=au.findKey(this,r);if(v){const $=this[v];if(!a)return $;if(a===!0)return cit($);if(au.isFunction(a))return a.call(this,$,v);if(au.isRegExp(a))return a.exec($);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,a){if(r=m9(r),r){const v=au.findKey(this,r);return!!(v&&this[v]!==void 0&&(!a||gA(this,this[v],v,a)))}return!1}delete(r,a){const v=this;let $=!1;function h(u){if(u=m9(u),u){const i=au.findKey(v,u);i&&(!a||gA(v,v[i],i,a))&&(delete v[i],$=!0)}}return au.isArray(r)?r.forEach(h):h(r),$}clear(r){const a=Object.keys(this);let v=a.length,$=!1;for(;v--;){const h=a[v];(!r||gA(this,this[h],h,r,!0))&&(delete this[h],$=!0)}return $}normalize(r){const a=this,v={};return au.forEach(this,($,h)=>{const u=au.findKey(v,h);if(u){a[u]=MN($),delete a[h];return}const i=r?dit(h):String(h).trim();i!==h&&delete a[h],a[i]=MN($),v[i]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const a=Object.create(null);return au.forEach(this,(v,$)=>{v!=null&&v!==!1&&(a[$]=r&&au.isArray(v)?v.join(", "):v)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,a])=>r+": "+a).join(`
|
|
7995
7995
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...a){const v=new this(r);return a.forEach($=>v.set($)),v}static accessor(r){const v=(this[iJ]=this[iJ]={accessors:{}}).accessors,$=this.prototype;function h(u){const i=m9(u);v[i]||(pit($,u),v[i]=!0)}return au.isArray(r)?r.forEach(h):h(r),this}};Q_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),au.reduceDescriptors(Q_.prototype,({value:e},r)=>{let a=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(v){this[a]=v}}}),au.freezeMethods(Q_);function vA(e,r){const a=this||f9,v=r||a,$=Q_.from(v.headers);let h=v.data;return au.forEach(e,function(i){h=i.call(a,h,$.normalize(),r?r.status:void 0)}),$.normalize(),h}function oJ(e){return!!(e&&e.__CANCEL__)}function r7(e,r,a){Rm.call(this,e??"canceled",Rm.ERR_CANCELED,r,a),this.name="CanceledError"}au.inherits(r7,Rm,{__CANCEL__:!0});function sJ(e,r,a){const v=a.config.validateStatus;!a.status||!v||v(a.status)?e(a):r(new Rm("Request failed with status code "+a.status,[Rm.ERR_BAD_REQUEST,Rm.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function hit(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function fit(e,r){e=e||10;const a=new Array(e),v=new Array(e);let $=0,h=0,u;return r=r!==void 0?r:1e3,function(p){const c=Date.now(),n=v[h];u||(u=c),a[$]=p,v[$]=c;let k=h,T=0;for(;k!==$;)T+=a[k++],k=k%e;if($=($+1)%e,$===h&&(h=(h+1)%e),c-u<r)return;const x=n&&c-n;return x?Math.round(T*1e3/x):void 0}}function mit(e,r){let a=0,v=1e3/r,$,h;const u=(c,n=Date.now())=>{a=n,$=null,h&&(clearTimeout(h),h=null),e(...c)};return[(...c)=>{const n=Date.now(),k=n-a;k>=v?u(c,n):($=c,h||(h=setTimeout(()=>{h=null,u($)},v-k)))},()=>$&&u($)]}const VN=(e,r,a=3)=>{let v=0;const $=fit(50,250);return mit(h=>{const u=h.loaded,i=h.lengthComputable?h.total:void 0,p=u-v,c=$(p),n=u<=i;v=u;const k={loaded:u,total:i,progress:i?u/i:void 0,bytes:p,rate:c||void 0,estimated:c&&i&&n?(i-u)/c:void 0,event:h,lengthComputable:i!=null,[r?"download":"upload"]:!0};e(k)},a)},lJ=(e,r)=>{const a=e!=null;return[v=>r[0]({lengthComputable:a,total:e,loaded:v}),r[1]]},cJ=e=>(...r)=>au.asap(()=>e(...r)),yit=Dx.hasStandardBrowserEnv?((e,r)=>a=>(a=new URL(a,Dx.origin),e.protocol===a.protocol&&e.host===a.host&&(r||e.port===a.port)))(new URL(Dx.origin),Dx.navigator&&/(msie|trident)/i.test(Dx.navigator.userAgent)):()=>!0,git=Dx.hasStandardBrowserEnv?{write(e,r,a,v,$,h,u){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(r)}`];au.isNumber(a)&&i.push(`expires=${new Date(a).toUTCString()}`),au.isString(v)&&i.push(`path=${v}`),au.isString($)&&i.push(`domain=${$}`),h===!0&&i.push("secure"),au.isString(u)&&i.push(`SameSite=${u}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function vit(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bit(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function uJ(e,r,a){let v=!vit(r);return e&&(v||a==!1)?bit(e,r):r}const dJ=e=>e instanceof Q_?{...e}:e;function NS(e,r){r=r||{};const a={};function v(c,n,k,T){return au.isPlainObject(c)&&au.isPlainObject(n)?au.merge.call({caseless:T},c,n):au.isPlainObject(n)?au.merge({},n):au.isArray(n)?n.slice():n}function $(c,n,k,T){if(au.isUndefined(n)){if(!au.isUndefined(c))return v(void 0,c,k,T)}else return v(c,n,k,T)}function h(c,n){if(!au.isUndefined(n))return v(void 0,n)}function u(c,n){if(au.isUndefined(n)){if(!au.isUndefined(c))return v(void 0,c)}else return v(void 0,n)}function i(c,n,k){if(k in r)return v(c,n);if(k in e)return v(void 0,c)}const p={url:h,method:h,data:h,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:i,headers:(c,n,k)=>$(dJ(c),dJ(n),k,!0)};return au.forEach(Object.keys({...e,...r}),function(n){const k=p[n]||$,T=k(e[n],r[n],n);au.isUndefined(T)&&k!==i||(a[n]=T)}),a}const pJ=e=>{const r=NS({},e);let{data:a,withXSRFToken:v,xsrfHeaderName:$,xsrfCookieName:h,headers:u,auth:i}=r;if(r.headers=u=Q_.from(u),r.url=tJ(uJ(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&u.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),au.isFormData(a)){if(Dx.hasStandardBrowserEnv||Dx.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(au.isFunction(a.getHeaders)){const p=a.getHeaders(),c=["content-type","content-length"];Object.entries(p).forEach(([n,k])=>{c.includes(n.toLowerCase())&&u.set(n,k)})}}if(Dx.hasStandardBrowserEnv&&(v&&au.isFunction(v)&&(v=v(r)),v||v!==!1&&yit(r.url))){const p=$&&h&&git.read(h);p&&u.set($,p)}return r},xit=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(a,v){const $=pJ(e);let h=$.data;const u=Q_.from($.headers).normalize();let{responseType:i,onUploadProgress:p,onDownloadProgress:c}=$,n,k,T,x,d;function o(){x&&x(),d&&d(),$.cancelToken&&$.cancelToken.unsubscribe(n),$.signal&&$.signal.removeEventListener("abort",n)}let l=new XMLHttpRequest;l.open($.method.toUpperCase(),$.url,!0),l.timeout=$.timeout;function s(){if(!l)return;const g=Q_.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),L={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:g,config:e,request:l};sJ(function(A){a(A),o()},function(A){v(A),o()},L),l=null}"onloadend"in l?l.onloadend=s:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(s)},l.onabort=function(){l&&(v(new Rm("Request aborted",Rm.ECONNABORTED,e,l)),l=null)},l.onerror=function(S){const L=S&&S.message?S.message:"Network Error",M=new Rm(L,Rm.ERR_NETWORK,e,l);M.event=S||null,v(M),l=null},l.ontimeout=function(){let S=$.timeout?"timeout of "+$.timeout+"ms exceeded":"timeout exceeded";const L=$.transitional||aJ;$.timeoutErrorMessage&&(S=$.timeoutErrorMessage),v(new Rm(S,L.clarifyTimeoutError?Rm.ETIMEDOUT:Rm.ECONNABORTED,e,l)),l=null},h===void 0&&u.setContentType(null),"setRequestHeader"in l&&au.forEach(u.toJSON(),function(S,L){l.setRequestHeader(L,S)}),au.isUndefined($.withCredentials)||(l.withCredentials=!!$.withCredentials),i&&i!=="json"&&(l.responseType=$.responseType),c&&([T,d]=VN(c,!0),l.addEventListener("progress",T)),p&&l.upload&&([k,x]=VN(p),l.upload.addEventListener("progress",k),l.upload.addEventListener("loadend",x)),($.cancelToken||$.signal)&&(n=g=>{l&&(v(!g||g.type?new r7(null,e,l):g),l.abort(),l=null)},$.cancelToken&&$.cancelToken.subscribe(n),$.signal&&($.signal.aborted?n():$.signal.addEventListener("abort",n)));const f=hit($.url);if(f&&Dx.protocols.indexOf(f)===-1){v(new Rm("Unsupported protocol "+f+":",Rm.ERR_BAD_REQUEST,e));return}l.send(h||null)})},_it=(e,r)=>{const{length:a}=e=e?e.filter(Boolean):[];if(r||a){let v=new AbortController,$;const h=function(c){if(!$){$=!0,i();const n=c instanceof Error?c:this.reason;v.abort(n instanceof Rm?n:new r7(n instanceof Error?n.message:n))}};let u=r&&setTimeout(()=>{u=null,h(new Rm(`timeout ${r} of ms exceeded`,Rm.ETIMEDOUT))},r);const i=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(h):c.removeEventListener("abort",h)}),e=null)};e.forEach(c=>c.addEventListener("abort",h));const{signal:p}=v;return p.unsubscribe=()=>au.asap(i),p}},wit=function*(e,r){let a=e.byteLength;if(a<r){yield e;return}let v=0,$;for(;v<a;)$=v+r,yield e.slice(v,$),v=$},Tit=async function*(e,r){for await(const a of Sit(e))yield*wit(a,r)},Sit=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const r=e.getReader();try{for(;;){const{done:a,value:v}=await r.read();if(a)break;yield v}}finally{await r.cancel()}},hJ=(e,r,a,v)=>{const $=Tit(e,r);let h=0,u,i=p=>{u||(u=!0,v&&v(p))};return new ReadableStream({async pull(p){try{const{done:c,value:n}=await $.next();if(c){i(),p.close();return}let k=n.byteLength;if(a){let T=h+=k;a(T)}p.enqueue(new Uint8Array(n))}catch(c){throw i(c),c}},cancel(p){return i(p),$.return()}},{highWaterMark:2})},fJ=64*1024,{isFunction:zN}=au,kit=(({Request:e,Response:r})=>({Request:e,Response:r}))(au.global),{ReadableStream:mJ,TextEncoder:yJ}=au.global,gJ=(e,...r)=>{try{return!!e(...r)}catch{return!1}},Lit=e=>{e=au.merge.call({skipUndefined:!0},kit,e);const{fetch:r,Request:a,Response:v}=e,$=r?zN(r):typeof fetch=="function",h=zN(a),u=zN(v);if(!$)return!1;const i=$&&zN(mJ),p=$&&(typeof yJ=="function"?(d=>o=>d.encode(o))(new yJ):async d=>new Uint8Array(await new a(d).arrayBuffer())),c=h&&i&&gJ(()=>{let d=!1;const o=new a(Dx.origin,{body:new mJ,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!o}),n=u&&i&&gJ(()=>au.isReadableStream(new v("").body)),k={stream:n&&(d=>d.body)};$&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!k[d]&&(k[d]=(o,l)=>{let s=o&&o[d];if(s)return s.call(o);throw new Rm(`Response type '${d}' is not supported`,Rm.ERR_NOT_SUPPORT,l)})});const T=async d=>{if(d==null)return 0;if(au.isBlob(d))return d.size;if(au.isSpecCompliantForm(d))return(await new a(Dx.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(au.isArrayBufferView(d)||au.isArrayBuffer(d))return d.byteLength;if(au.isURLSearchParams(d)&&(d=d+""),au.isString(d))return(await p(d)).byteLength},x=async(d,o)=>{const l=au.toFiniteNumber(d.getContentLength());return l??T(o)};return async d=>{let{url:o,method:l,data:s,signal:f,cancelToken:g,timeout:S,onDownloadProgress:L,onUploadProgress:M,responseType:A,headers:z,withCredentials:I="same-origin",fetchOptions:j}=pJ(d),F=r||fetch;A=A?(A+"").toLowerCase():"text";let W=_it([f,g&&g.toAbortSignal()],S),U=null;const O=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let X;try{if(M&&c&&l!=="get"&&l!=="head"&&(X=await x(z,s))!==0){let be=new a(o,{method:"POST",body:s,duplex:"half"}),xe;if(au.isFormData(s)&&(xe=be.headers.get("content-type"))&&z.setContentType(xe),be.body){const[Ae,qe]=lJ(X,VN(cJ(M)));s=hJ(be.body,fJ,Ae,qe)}}au.isString(I)||(I=I?"include":"omit");const N=h&&"credentials"in a.prototype,Y={...j,signal:W,method:l.toUpperCase(),headers:z.normalize().toJSON(),body:s,duplex:"half",credentials:N?I:void 0};U=h&&new a(o,Y);let se=await(h?F(U,j):F(o,Y));const me=n&&(A==="stream"||A==="response");if(n&&(L||me&&O)){const be={};["status","statusText","headers"].forEach(_e=>{be[_e]=se[_e]});const xe=au.toFiniteNumber(se.headers.get("content-length")),[Ae,qe]=L&&lJ(xe,VN(cJ(L),!0))||[];se=new v(hJ(se.body,fJ,Ae,()=>{qe&&qe(),O&&O()}),be)}A=A||"text";let ge=await k[au.findKey(k,A)||"text"](se,d);return!me&&O&&O(),await new Promise((be,xe)=>{sJ(be,xe,{data:ge,headers:Q_.from(se.headers),status:se.status,statusText:se.statusText,config:d,request:U})})}catch(N){throw O&&O(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Rm("Network Error",Rm.ERR_NETWORK,d,U),{cause:N.cause||N}):Rm.from(N,N&&N.code,d,U)}}},Eit=new Map,vJ=e=>{let r=e&&e.env||{};const{fetch:a,Request:v,Response:$}=r,h=[v,$,a];let u=h.length,i=u,p,c,n=Eit;for(;i--;)p=h[i],c=n.get(p),c===void 0&&n.set(p,c=i?new Map:Lit(r)),n=c;return c};vJ();const bA={http:Jnt,xhr:xit,fetch:{get:vJ}};au.forEach(bA,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const bJ=e=>`- ${e}`,Cit=e=>au.isFunction(e)||e===null||e===!1;function Nit(e,r){e=au.isArray(e)?e:[e];const{length:a}=e;let v,$;const h={};for(let u=0;u<a;u++){v=e[u];let i;if($=v,!Cit(v)&&($=bA[(i=String(v)).toLowerCase()],$===void 0))throw new Rm(`Unknown adapter '${i}'`);if($&&(au.isFunction($)||($=$.get(r))))break;h[i||"#"+u]=$}if(!$){const u=Object.entries(h).map(([p,c])=>`adapter ${p} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=a?u.length>1?`since :
|
|
7996
7996
|
`+u.map(bJ).join(`
|
|
7997
7997
|
`):" "+bJ(u[0]):"as no adapter specified";throw new Rm("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return $}const xJ={getAdapter:Nit,adapters:bA};function xA(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new r7(null,e)}function _J(e){return xA(e),e.headers=Q_.from(e.headers),e.data=vA.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xJ.getAdapter(e.adapter||f9.adapter,e)(e).then(function(v){return xA(e),v.data=vA.call(e,e.transformResponse,v),v.headers=Q_.from(v.headers),v},function(v){return oJ(v)||(xA(e),v&&v.response&&(v.response.data=vA.call(e,e.transformResponse,v.response),v.response.headers=Q_.from(v.response.headers))),Promise.reject(v)})}const wJ="1.13.2",PN={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{PN[e]=function(v){return typeof v===e||"a"+(r<1?"n ":" ")+e}});const TJ={};PN.transitional=function(r,a,v){function $(h,u){return"[Axios v"+wJ+"] Transitional option '"+h+"'"+u+(v?". "+v:"")}return(h,u,i)=>{if(r===!1)throw new Rm($(u," has been removed"+(a?" in "+a:"")),Rm.ERR_DEPRECATED);return a&&!TJ[u]&&(TJ[u]=!0,console.warn($(u," has been deprecated since v"+a+" and will be removed in the near future"))),r?r(h,u,i):!0}},PN.spelling=function(r){return(a,v)=>(console.warn(`${v} is likely a misspelling of ${r}`),!0)};function Oit(e,r,a){if(typeof e!="object")throw new Rm("options must be an object",Rm.ERR_BAD_OPTION_VALUE);const v=Object.keys(e);let $=v.length;for(;$-- >0;){const h=v[$],u=r[h];if(u){const i=e[h],p=i===void 0||u(i,h,e);if(p!==!0)throw new Rm("option "+h+" must be "+p,Rm.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new Rm("Unknown option "+h,Rm.ERR_BAD_OPTION)}}const AN={assertOptions:Oit,validators:PN},U5=AN.validators;let OS=class{constructor(r){this.defaults=r||{},this.interceptors={request:new rJ,response:new rJ}}async request(r,a){try{return await this._request(r,a)}catch(v){if(v instanceof Error){let $={};Error.captureStackTrace?Error.captureStackTrace($):$=new Error;const h=$.stack?$.stack.replace(/^.+\n/,""):"";try{v.stack?h&&!String(v.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(v.stack+=`
|
|
7998
|
-
`+h):v.stack=h}catch{}}throw v}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=NS(this.defaults,a);const{transitional:v,paramsSerializer:$,headers:h}=a;v!==void 0&&AN.assertOptions(v,{silentJSONParsing:U5.transitional(U5.boolean),forcedJSONParsing:U5.transitional(U5.boolean),clarifyTimeoutError:U5.transitional(U5.boolean)},!1),$!=null&&(au.isFunction($)?a.paramsSerializer={serialize:$}:AN.assertOptions($,{encode:U5.function,serialize:U5.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),AN.assertOptions(a,{baseUrl:U5.spelling("baseURL"),withXsrfToken:U5.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=h&&au.merge(h.common,h[a.method]);h&&au.forEach(["delete","get","head","post","put","patch","common"],d=>{delete h[d]}),a.headers=Q_.concat(u,h);const i=[];let p=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(a)===!1||(p=p&&o.synchronous,i.unshift(o.fulfilled,o.rejected))});const c=[];this.interceptors.response.forEach(function(o){c.push(o.fulfilled,o.rejected)});let n,k=0,T;if(!p){const d=[_J.bind(this),void 0];for(d.unshift(...i),d.push(...c),T=d.length,n=Promise.resolve(a);k<T;)n=n.then(d[k++],d[k++]);return n}T=i.length;let x=a;for(;k<T;){const d=i[k++],o=i[k++];try{x=d(x)}catch(l){o.call(this,l);break}}try{n=_J.call(this,x)}catch(d){return Promise.reject(d)}for(k=0,T=c.length;k<T;)n=n.then(c[k++],c[k++]);return n}getUri(r){r=NS(this.defaults,r);const a=uJ(r.baseURL,r.url,r.allowAbsoluteUrls);return tJ(a,r.params,r.paramsSerializer)}};au.forEach(["delete","get","head","options"],function(r){OS.prototype[r]=function(a,v){return this.request(NS(v||{},{method:r,url:a,data:(v||{}).data}))}}),au.forEach(["post","put","patch"],function(r){function a(v){return function(h,u,i){return this.request(NS(i||{},{method:r,headers:v?{"Content-Type":"multipart/form-data"}:{},url:h,data:u}))}}OS.prototype[r]=a(),OS.prototype[r+"Form"]=a(!0)});let Mit=class lQ{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(h){a=h});const v=this;this.promise.then($=>{if(!v._listeners)return;let h=v._listeners.length;for(;h-- >0;)v._listeners[h]($);v._listeners=null}),this.promise.then=$=>{let h;const u=new Promise(i=>{v.subscribe(i),h=i}).then($);return u.cancel=function(){v.unsubscribe(h)},u},r(function(h,u,i){v.reason||(v.reason=new r7(h,u,i),a(v.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const a=this._listeners.indexOf(r);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const r=new AbortController,a=v=>{r.abort(v)};return this.subscribe(a),r.signal.unsubscribe=()=>this.unsubscribe(a),r.signal}static source(){let r;return{token:new lQ(function($){r=$}),cancel:r}}};function Vit(e){return function(a){return e.apply(null,a)}}function zit(e){return au.isObject(e)&&e.isAxiosError===!0}const _A={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_A).forEach(([e,r])=>{_A[r]=e});function SJ(e){const r=new OS(e),a=qZ(OS.prototype.request,r);return au.extend(a,OS.prototype,r,{allOwnKeys:!0}),au.extend(a,r,null,{allOwnKeys:!0}),a.create=function($){return SJ(NS(e,$))},a}const V0=SJ(f9);V0.Axios=OS,V0.CanceledError=r7,V0.CancelToken=Mit,V0.isCancel=oJ,V0.VERSION=wJ,V0.toFormData=ON,V0.AxiosError=Rm,V0.Cancel=V0.CanceledError,V0.all=function(r){return Promise.all(r)},V0.spread=Vit,V0.isAxiosError=zit,V0.mergeConfig=NS,V0.AxiosHeaders=Q_,V0.formToJSON=e=>nJ(au.isHTMLForm(e)?new FormData(e):e),V0.getAdapter=xJ.getAdapter,V0.HttpStatusCode=_A,V0.default=V0;const{Axios:m5t,AxiosError:y5t,CanceledError:g5t,isCancel:v5t,CancelToken:b5t,VERSION:x5t,all:_5t,Cancel:w5t,isAxiosError:T5t,spread:S5t,toFormData:k5t,AxiosHeaders:L5t,HttpStatusCode:E5t,formToJSON:C5t,getAdapter:N5t,mergeConfig:O5t}=V0,ov=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},y9=e=>(t.pushScopeId("data-v-127740d3"),e=e(),t.popScopeId(),e),Pit={class:"tooltip-template-options"},Ait=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1)),Rit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1)),Uit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1)),Fit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1)),Iit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1)),qit=ov({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(e,{emit:r}){return(a,v)=>(t.openBlock(),t.createElementBlock("div",Pit,[t.createElementVNode("ul",null,[t.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=$=>a.$emit("generar-reporte"))},[Ait,t.createTextVNode(" Generar reporte ")]),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:0,class:"option",onClick:v[1]||(v[1]=$=>a.$emit("renombrar"))},[Rit,t.createTextVNode(" Renombrar template ")])):t.createCommentVNode("",!0),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:1,class:"option",onClick:v[2]||(v[2]=$=>a.$emit("editar"))},[Uit,t.createTextVNode(" Editar template ")])):t.createCommentVNode("",!0),t.createElementVNode("li",{class:"option",onClick:v[3]||(v[3]=$=>a.$emit("duplicar"))},[Fit,t.createTextVNode(" Duplicar template ")]),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:2,class:"option",onClick:v[4]||(v[4]=$=>a.$emit("eliminar"))},[Iit,t.createTextVNode(" Eliminar template ")])):t.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-127740d3"]]),RN=e=>(t.pushScopeId("data-v-8520e810"),e=e(),t.popScopeId(),e),jit={class:"template-card postpartido",style:{position:"relative"}},Wit=[RN(()=>t.createElementVNode("span",null,null,-1)),RN(()=>t.createElementVNode("span",null,null,-1)),RN(()=>t.createElementVNode("span",null,null,-1))],Dit={key:0,class:"template-img-placeholder",style:{position:"relative"}},Kit={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},Bit={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},Xit={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},Git={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},Zit={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},Jit={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},Hit={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},Yit={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},Qit={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},$it={class:"inner-card-postpartido"},eot={class:"postpartido-footer"},tot={class:"postpartido-version"},rot={class:"postpartido-status"},aot=RN(()=>t.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),not={class:"tipo-value"},iot=ov({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1),h=t.computed(()=>a.userId===a.template.user_id);function u(){$.value=!1,v("generar-reporte")}function i(){$.value=!1;const T=a.template.name||"";v("renombrar",T)}function p(){$.value=!1,v("edit-template",a.template)}function c(){$.value=!1;const T=a.template.name||"";v("duplicar",T)}function n(){$.value=!1,v("eliminar",a.template)}function k(T){}return(T,x)=>(t.openBlock(),t.createElementBlock("div",jit,[t.createElementVNode("div",{class:"three-dots",onClick:x[0]||(x[0]=t.withModifiers(d=>$.value=!$.value,["stop"]))},Wit),e.template.pages&&e.template.pages[0]?(t.openBlock(),t.createElementBlock("div",Dit,[e.template.template_type===1&&e.template.pages[0].type==1?(t.openBlock(),t.createElementBlock("img",Kit)):e.template.template_type===2&&e.template.pages[0].type==1?(t.openBlock(),t.createElementBlock("img",Bit)):e.template.template_type===1&&e.template.pages[0].type==2?(t.openBlock(),t.createElementBlock("img",Xit)):e.template.template_type===2&&e.template.pages[0].type==2?(t.openBlock(),t.createElementBlock("img",Git)):e.template.template_type===1&&e.template.pages[0].type==3?(t.openBlock(),t.createElementBlock("img",Zit)):e.template.template_type===2&&e.template.pages[0].type==3?(t.openBlock(),t.createElementBlock("img",Jit)):e.template.template_type===1&&e.template.pages[0].type==4?(t.openBlock(),t.createElementBlock("img",Hit)):e.template.template_type===2&&e.template.pages[0].type==4?(t.openBlock(),t.createElementBlock("img",Yit)):(t.openBlock(),t.createElementBlock("img",Qit))])):t.createCommentVNode("",!0),t.createElementVNode("div",$it,[t.createElementVNode("div",eot,[t.createElementVNode("div",tot,t.toDisplayString(e.template.name),1),t.createElementVNode("div",rot,[aot,t.createElementVNode("span",not," "+t.toDisplayString(e.template.template_type==1?"Prepartido":"Postpartido"),1)]),t.createElementVNode("button",{class:"postpartido-btn",onClick:x[1]||(x[1]=d=>v("generar-reporte"))},"Generar reporte")])]),$.value?(t.openBlock(),t.createBlock(qit,{key:1,"can-edit":h.value,onClick:x[2]||(x[2]=t.withModifiers(d=>$.value=!1,["self"])),onMouseleave:x[3]||(x[3]=d=>$.value=!1),onGenerarReporte:u,onRenombrar:i,onEditar:p,onDuplicar:c,onEliminar:n,onToggleAutogen:k},null,8,["can-edit"])):t.createCommentVNode("",!0),$.value?(t.openBlock(),t.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:x[4]||(x[4]=d=>$.value=!1)})):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-8520e810"]]),a7=e=>(t.pushScopeId("data-v-a34cf1b5"),e=e(),t.popScopeId(),e),oot={class:"modal-overlay"},sot={class:"modal-content"},lot=[a7(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],cot=a7(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),uot=a7(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),dot={class:"modal-body"},pot=a7(()=>t.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),hot={class:"radio-group"},fot=a7(()=>t.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),mot=["disabled"],yot={key:0,class:"error-message"},got=a7(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),vot={class:"modal-footer"},bot=["disabled"],xot=["disabled"],_ot=["disabled"],wot={key:0,class:"loading-spinner"},Tot={key:1},kJ=ov({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(1),h=t.ref("pre"),u=t.ref(""),i=t.ref(!1),p=t.ref(""),c=async()=>{var n;if(!(u.value.trim().length<3)){i.value=!0,p.value="";try{const k={name:u.value.trim(),team_id:a.team,template_type:h.value==="pre"?1:2},x=await V0.create({headers:{Authorization:`${a.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",k);v("template-created",x.data),v("open-modal-new-template",(n=x.data)==null?void 0:n.data),v("close")}catch(k){console.error("Error al guardar template:",k),k.response&&k.response.status===409&&(p.value="Ya existe un template con el mismo nombre")}finally{i.value=!1}}};return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(n,k)=>(t.openBlock(),t.createElementBlock("div",oot,[t.createElementVNode("div",sot,[t.createElementVNode("button",{class:"close-btn",onClick:k[0]||(k[0]=T=>n.$emit("close"))},lot),cot,uot,t.createElementVNode("div",dot,[$.value===1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[pot,t.createElementVNode("div",hot,[t.createElementVNode("label",{class:t.normalizeClass(["radio-label",{selected:h.value==="pre"}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":k[1]||(k[1]=T=>h.value=T)},null,512),[[t.vModelRadio,h.value]]),t.createTextVNode(" Prepartido ")],2),t.createElementVNode("label",{class:t.normalizeClass(["radio-label",{selected:h.value==="post"}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":k[2]||(k[2]=T=>h.value=T)},null,512),[[t.vModelRadio,h.value]]),t.createTextVNode(" Postpartido ")],2)])],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[fot,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":k[3]||(k[3]=T=>u.value=T),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:i.value},null,8,mot),[[t.vModelText,u.value]]),p.value?(t.openBlock(),t.createElementBlock("div",yot,t.toDisplayString(p.value),1)):t.createCommentVNode("",!0)],64))]),got,t.createElementVNode("div",vot,[t.createElementVNode("button",{class:"cancel-btn",onClick:k[4]||(k[4]=T=>n.$emit("close")),disabled:i.value},"Cancelar",8,bot),$.value===1?(t.openBlock(),t.createElementBlock("button",{key:0,class:"next-btn",disabled:!h.value,onClick:k[5]||(k[5]=T=>$.value=2)}," Siguiente ",8,xot)):(t.openBlock(),t.createElementBlock("button",{key:1,class:"next-btn",disabled:u.value.trim().length<3||i.value,onClick:c},[i.value?(t.openBlock(),t.createElementBlock("div",wot)):(t.openBlock(),t.createElementBlock("span",Tot,"Guardar"))],8,_ot))])])]))}},[["__scopeId","data-v-a34cf1b5"]]),ux=e=>(t.pushScopeId("data-v-f271c483"),e=e(),t.popScopeId(),e),Sot={class:"modal-overlay"},kot={class:"modal-content"},Lot=[ux(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Eot=ux(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),t.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),Cot=ux(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Not={class:"modal-body"},Oot={key:0,class:"error-message-container"},Mot=ux(()=>t.createElementVNode("p",{class:"error-text"},[t.createTextVNode(" Este reporte ya fue generado previamente"),t.createElementVNode("br"),t.createTextVNode(" con este template para el partido seleccionado. ")],-1)),Vot={key:1,style:{position:"relative"}},zot={key:0,class:"loading-autoseteo-overlay"},Pot=[ux(()=>t.createElementVNode("div",{class:"loading-autoseteo-content"},[t.createElementVNode("div",{class:"loading-spinner"})],-1))],Aot={class:"modal-group"},Rot=ux(()=>t.createElementVNode("label",null,"1. Elige el torneo",-1)),Uot={key:0,class:"placeholder"},Fot=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),Iot={key:0,class:"placeholder"},qot={key:1},jot=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Wot={key:0,class:"custom-select-dropdown"},Dot=["onMousedown"],Kot={class:"modal-row"},Bot={class:"modal-group"},Xot=ux(()=>t.createElementVNode("label",null,"2. Elige la temporada",-1)),Got={key:0,class:"placeholder"},Zot=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),Jot={key:0,class:"placeholder"},Hot={key:1},Yot=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Qot={key:0,class:"custom-select-dropdown"},$ot=["onMousedown"],est={class:"modal-group"},tst=ux(()=>t.createElementVNode("label",null,"3. Elige la jornada",-1)),rst={key:0,class:"placeholder"},ast=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),nst={key:0,class:"placeholder"},ist={key:1},ost=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],sst={key:0,class:"custom-select-dropdown"},lst=["onMousedown"],cst={class:"modal-group"},ust=ux(()=>t.createElementVNode("label",null,"4. Elige el partido",-1)),dst={key:0,class:"placeholder"},pst=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),hst={key:0,class:"placeholder"},fst=["src"],mst=["src"],yst=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],gst={key:0,class:"custom-select-dropdown"},vst=["onMousedown"],bst=["src"],xst=["src"],_st={key:0,class:"header-separator"},wst={key:1,class:"modal-footer"},Tst=["disabled"],Sst={key:0,class:"loading-spinner select-spinner"},kst=ov({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},team:{type:Number,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1},template:{type:Object,required:!1},showError409OnMount:{type:Boolean,default:!1}},emits:["close","generar","switch-to-reports","open-configurar-contenido"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([]),h=t.ref([]),u=t.ref([]),i=t.ref([]),p=t.ref(""),c=t.ref(""),n=t.ref(""),k=t.ref(null),T=V0.create({headers:{Authorization:a.token}}),x=t.ref(!1),d=t.ref(!1),o=t.ref(!1),l=t.ref(!1),s=t.ref(!1),f=t.ref(!1),g=t.ref(!1),S=t.ref(!1),L=t.ref([]),M=t.ref([]),A=t.ref(!1),z=t.ref(!1),I=t.ref(!1);function j(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,p.value=ut,A.value=!1,N()}function F(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,c.value=ut,z.value=!1,Y()}function W(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,n.value=ut,I.value=!1,me()}const U=t.ref(null);async function O(){try{d.value=!0;const ut=await V0.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");if(ut.data&&Array.isArray(ut.data)){if(L.value=ut.data,$.value=ut.data.map(He=>He.tournament).sort((He,st)=>He.order&&st.order?He.order-st.order:He.order&&!st.order?-1:!He.order&&st.order?1:0),p.value="",h.value=[],c.value="",u.value=[],n.value="",i.value=[],k.value=null,U.value)setTimeout(()=>{Qe(U.value)},100);else if($.value.length>0){const He=$.value[0];p.value=He,X(He)}}}catch(ut){console.error("Error al cargar torneos:",ut),$.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],h.value=[],u.value=[],p.value="",c.value="",n.value="",k.value=null}finally{d.value=!1}}function X(ut){const He=L.value.find(st=>st.tournament&&st.tournament.name===ut.name);He&&Array.isArray(He.seasons)?(h.value=He.seasons,c.value="",u.value=[],n.value="",i.value=[],k.value=null):(h.value=[],c.value="",u.value=[],n.value="",i.value=[],k.value=null)}function N(){c.value="",n.value="",k.value=null,p.value?X(p.value):(h.value=[],u.value=[],i.value=[])}function Y(){if(l.value=!0,n.value="",k.value=null,u.value=[],i.value=[],c.value&&c.value.id){const ut=[c.value.id];if(c.value.related_seasons&&Array.isArray(c.value.related_seasons)){const He=c.value.related_seasons.map(st=>st.id).filter(Boolean);ut.push(...He)}se(ut)}else l.value=!1}async function se(ut){o.value=!0;try{const He=Array.isArray(ut)?ut.join("&seasons="):ut,st=await T.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${He}`);if(st.data.data&&Array.isArray(st.data.data)){const ct=st.data.data.reduce((qt,Zt)=>Zt.games&&Array.isArray(Zt.games)?qt.concat(Zt.games):qt,[]);M.value=ct.map(qt=>({label:qt.label||`${qt.home_team_acronym||"Local"} vs ${qt.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+qt.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+qt.visiting_team+".png"||"",...qt}));let Ct=M.value;a.templateType==="2"||a.templateType===2?Ct=Ct.filter(qt=>qt.game_status===1):(a.templateType==="1"||a.templateType===1)&&(Ct=Ct.filter(qt=>qt.game_status===4));const Vt=Ct.map(qt=>qt.matchday_id).filter(Boolean),Ot=[...new Set(Vt)];u.value=Ot.map(qt=>{const Zt=M.value.find(Jt=>Jt.matchday_id&&Jt.matchday_id===qt);return Zt?{id:qt,name:Zt.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}:null}).filter(Boolean).sort((qt,Zt)=>{const Jt=qt.name.startsWith("Jornada"),Qt=Zt.name.startsWith("Jornada");return Jt&&Qt?qt.id-Zt.id:Jt&&!Qt?-1:!Jt&&Qt?1:0}),n.value="",i.value=[],k.value=null,l.value=!1,U.value&&f.value&&setTimeout(()=>{rt(U.value)},200)}else M.value=[],u.value=[],n.value="",i.value=[],k.value=null}catch(He){console.error("Error al cargar partidos:",He),M.value=[],u.value=[],n.value="",i.value=[],k.value=null,l.value=!1}finally{o.value=!1}}function me(){k.value=null,i.value=[],n.value&&n.value.id&&ge(n.value)}function ge(ut){if(!ut||!ut.id){i.value=[];return}let He=M.value.filter(st=>st.matchday_id===ut.id);a.templateType==="2"||a.templateType===2?He=He.filter(st=>st.game_status===1):(a.templateType==="1"||a.templateType===1)&&(He=He.filter(st=>st.game_status===4)),i.value=He}function be(){let ut=!1;if(a.template&&a.template.pages)for(const He of a.template.pages){if(He.components&&Array.isArray(He.components)){for(const st of He.components)if(st.coreView&&st.coreView.id===18){ut=!0;break}}if(ut)break}return ut}function xe(){if(!a.template||!a.template.pages)return!1;for(const ut of a.template.pages)if(ut.components&&Array.isArray(ut.components)&&ut.components.some(st=>st.name==="Fortalezas"||st.componentName==="GSCStrengths"))return!0;return!1}async function Ae(){try{if(xe()||be()){v("open-configurar-contenido",{liga:p.value,torneo:c.value,jornada:n.value,partido:k.value,template:a.template}),v("close");return}d.value=!0;let ut="";c.value&&c.value.name&&(ut=c.value.name);const He={template_id:a.templateId,user_id:a.template&&a.template.user_id?parseInt(a.template.user_id):parseInt(a.userId),tournament_id:p.value.id||1,tournament_name:p.value.name,season_id:k.value.season_id,season_name:ut,game_id:k.value.id||k.value.game_id},st=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports`,He,{headers:{Authorization:a.token,"Content-Type":"application/json"}});v("generar",{liga:p.value,torneo:c.value,jornada:n.value,partido:k.value,reportData:st.data}),v("switch-to-reports"),v("close")}catch(ut){console.error("Error al generar el reporte:",ut),ut.response&&ut.response.status===409?S.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{d.value=!1}}function qe(){I.value=!I.value}function _e(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,k.value=ut,x.value=!1}function Ue(){document.body.style.overflow="hidden"}function je(){document.body.style.overflow=""}t.watch(()=>a.showError409OnMount,ut=>{S.value=ut},{immediate:!0}),t.onMounted(()=>{a.showError409OnMount&&(S.value=!0),O(),Ue(),Re(),U.value&&(s.value=!0,f.value=!0)}),t.watch(p,(ut,He)=>{if(ut&&U.value&&f.value&&!He&&!g.value){const st=We(U.value.season_id);st&&(g.value=!0,c.value=st,g.value=!1)}}),t.watch(c,(ut,He)=>{ut&&U.value&&f.value&&!He&&!g.value?setTimeout(()=>{const st=u.value.find(ct=>ct.id===U.value.matchday_id);st&&(g.value=!0,n.value=st,ge(st),g.value=!1)},500):ut&&He&&f.value&&(f.value=!1,s.value=!1)}),t.watch(n,(ut,He)=>{ut&&U.value&&f.value&&!He&&!g.value?setTimeout(()=>{const st=i.value.find(Ct=>Ct.game_id===U.value.game_id||Ct.id===U.value.game_id);if(ge(ut),st){k.value=st,s.value=!1,f.value=!1;return}const ct=i.value.find(Ct=>Ct.home_team===U.value.home_team&&Ct.visiting_team===U.value.visiting_team);if(ct){k.value=ct,s.value=!1,f.value=!1;return}if(M.value.length>0){const Ct=M.value.find(Vt=>Vt.game_id===U.value.game_id||Vt.id===U.value.game_id);if(Ct){k.value=Ct,s.value=!1,f.value=!1;return}}s.value=!1,f.value=!1},1e3):ut&&He&&f.value&&(f.value=!1,s.value=!1)}),t.onUnmounted(()=>{je()});async function Re(){try{const ut=await T.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/teams/${a.team}/last-games`);a.templateType==="1"||a.templateType===1?(U.value=ut.data.data.prematch,ut.data.data.prematch&&(s.value=!0,f.value=!0,ut.data.data.prematch.season_id&&await se([ut.data.data.prematch.season_id]))):(a.templateType==="2"||a.templateType===2)&&(U.value=ut.data.data.postmatch,ut.data.data.postmatch&&(s.value=!0,f.value=!0,ut.data.data.postmatch.season_id&&await se([ut.data.data.postmatch.season_id])))}catch(ut){console.error("Error al cargar últimos juegos:",ut)}}function We(ut){if(!ut||!h.value.length)return null;const He=h.value.find(ct=>ct.id===ut);return He||h.value.find(ct=>ct.related_seasons&&Array.isArray(ct.related_seasons)?ct.related_seasons.some(Ct=>Ct.id===ut):!1)||null}function Qe(ut){if(!(!ut||!ut.game_id)&&ut.tournament_id&&$.value.length>0){const He=$.value.find(st=>st.id===ut.tournament_id);He&&(p.value=He,X(He))}}function rt(ut){if(!(!ut||!ut.game_id)&&ut.tournament_id&&$.value.length>0){const He=$.value.find(st=>st.id===ut.tournament_id);if(He&&(p.value=He,ut.season_id&&h.value.length>0)){const st=We(ut.season_id);if(st&&(c.value=st,ut.matchday_id&&u.value.length>0)){const ct=u.value.find(Ct=>Ct.id===ut.matchday_id);if(ct&&(n.value=ct,ut.game_id&&i.value.length>0)){const Ct=i.value.find(Vt=>Vt.game_id===ut.game_id||Vt.id===ut.game_id);if(Ct)k.value=Ct;else{const Vt=i.value.find(Ot=>Ot.home_team===ut.home_team&&Ot.visiting_team===ut.visiting_team);Vt&&(k.value=Vt)}}}}}}function pt(){S.value=!1,p.value="",c.value="",n.value="",k.value=null,h.value=[],u.value=[],i.value=[],A.value=!1,z.value=!1,I.value=!1,x.value=!1,je(),v("close")}return(ut,He)=>(t.openBlock(),t.createElementBlock("div",Sot,[t.createElementVNode("div",kot,[t.createElementVNode("button",{class:"close-btn",onClick:pt},Lot),Eot,Cot,t.createElementVNode("div",Not,[S.value?(t.openBlock(),t.createElementBlock("div",Oot,[Mot,t.createElementVNode("button",{class:"accept-btn",onClick:pt},"Aceptar")])):(t.openBlock(),t.createElementBlock("div",Vot,[s.value?(t.openBlock(),t.createElementBlock("div",zot,Pot)):t.createCommentVNode("",!0),t.createElementVNode("div",Aot,[Rot,t.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:He[0]||(He[0]=st=>A.value=!A.value),onBlur:He[1]||(He[1]=st=>A.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:d.value||$.value.length===0}])},[d.value?(t.openBlock(),t.createElementBlock("span",Uot,[Fot,t.createTextVNode("Cargando torneos...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[p.value?(t.openBlock(),t.createElementBlock("span",qot,t.toDisplayString(p.value.name),1)):(t.openBlock(),t.createElementBlock("span",Iot,"Selecciona el torneo"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:A.value}])},jot,2)],2),A.value&&$.value.length>0?(t.openBlock(),t.createElementBlock("div",Wot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.name,class:"custom-select-option",onMousedown:t.withModifiers(ct=>j(st),["prevent"])},t.toDisplayString(st.name),41,Dot))),128))])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("div",Kot,[t.createElementVNode("div",Bot,[Xot,t.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:He[2]||(He[2]=st=>z.value=!z.value),onBlur:He[3]||(He[3]=st=>z.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!p.value||h.value.length===0||d.value}])},[d.value?(t.openBlock(),t.createElementBlock("span",Got,[Zot,t.createTextVNode("Cargando temporada...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.value?(t.openBlock(),t.createElementBlock("span",Hot,t.toDisplayString(c.value.name),1)):(t.openBlock(),t.createElementBlock("span",Jot,"Elige la temporada"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:z.value}])},Yot,2)],2),z.value&&h.value.length>0&&p.value?(t.openBlock(),t.createElementBlock("div",Qot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.id,class:"custom-select-option",onMousedown:t.withModifiers(ct=>F(st),["prevent"])},t.toDisplayString(st.name),41,$ot))),128))])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("div",est,[tst,t.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:qe,onBlur:He[4]||(He[4]=st=>I.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!c.value||u.value.length===0||l.value}])},[l.value?(t.openBlock(),t.createElementBlock("span",rst,[ast,t.createTextVNode("Cargando jornadas...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[n.value?(t.openBlock(),t.createElementBlock("span",ist,t.toDisplayString(n.value.name),1)):(t.openBlock(),t.createElementBlock("span",nst,"Elige la jornada"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:I.value}])},ost,2)],2),I.value&&u.value.length>0?(t.openBlock(),t.createElementBlock("div",sst,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.id,class:"custom-select-option",onMousedown:t.withModifiers(ct=>W(st),["prevent"])},t.toDisplayString(st.name),41,lst))),128))])):t.createCommentVNode("",!0)],32)])]),t.createElementVNode("div",cst,[ust,t.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:He[5]||(He[5]=st=>x.value=!x.value),onBlur:He[6]||(He[6]=st=>x.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!n.value||o.value}])},[o.value?(t.openBlock(),t.createElementBlock("span",dst,[pst,t.createTextVNode("Cargando partidos...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.value.localLogo?(t.openBlock(),t.createElementBlock("img",{key:0,src:k.value.localLogo,class:"logo-equipo",alt:"local"},null,8,fst)):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(k.value.label),1),k.value.visitanteLogo?(t.openBlock(),t.createElementBlock("img",{key:1,src:k.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,mst)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock("span",hst,"Selecciona el partido"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:x.value}])},yst,2)],2),x.value&&!o.value&&n.value?(t.openBlock(),t.createElementBlock("div",gst,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.label,class:"custom-select-option",onMousedown:t.withModifiers(ct=>_e(st),["prevent"])},[t.createElementVNode("img",{src:st.localLogo,class:"logo-equipo",alt:"local"},null,8,bst),t.createElementVNode("span",null,t.toDisplayString(st.label),1),t.createElementVNode("img",{src:st.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,xst)],40,vst))),128))])):t.createCommentVNode("",!0)],32)])]))]),S.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",_st)),S.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wst,[t.createElementVNode("button",{class:"cancel-btn",onClick:pt},"Cancelar"),t.createElementVNode("button",{class:"next-btn",disabled:!p.value||!c.value||!n.value||!k.value||d.value,onClick:Ae},[d.value?(t.openBlock(),t.createElementBlock("span",Sst)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(d.value?"Generando...":"Generar"),1)],8,Tst)]))])]))}},[["__scopeId","data-v-f271c483"]]),g9=e=>(t.pushScopeId("data-v-3f4f9ca5"),e=e(),t.popScopeId(),e),Lst={class:"modal-overlay"},Est={class:"modal-content"},Cst=[g9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Nst=g9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),Ost=g9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Mst={class:"modal-body"},Vst=g9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),zst=["placeholder","disabled"],Pst={key:0,class:"error-message"},Ast=g9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Rst={class:"modal-footer"},Ust=["disabled"],Fst=["disabled"],Ist={key:0},qst={key:1},jst=ov({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName),h=t.ref(!1),u=t.ref("");t.watch(()=>a.initialName,p=>{$.value=p,u.value=""}),t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});async function i(){var p;if(!($.value.trim().length<3)){h.value=!0,u.value="";try{await V0.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/templates/${a.templateId}/general`,{name:$.value.trim()},{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}}),v("rename",$.value.trim()),v("refresh"),v("close")}catch(c){console.error("Error al renombrar el template:",c),((p=c.response)==null?void 0:p.status)===409?u.value="Ya existe un template con el mismo nombre":u.value="Error al renombrar el template. Inténtalo de nuevo."}finally{h.value=!1}}}return(p,c)=>(t.openBlock(),t.createElementBlock("div",Lst,[t.createElementVNode("div",Est,[t.createElementVNode("button",{class:"close-btn",onClick:c[0]||(c[0]=n=>p.$emit("close"))},Cst),Nst,Ost,t.createElementVNode("div",Mst,[Vst,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":c[1]||(c[1]=n=>$.value=n),placeholder:e.initialName,maxlength:"40",autocomplete:"off",disabled:h.value},null,8,zst),[[t.vModelText,$.value]]),u.value?(t.openBlock(),t.createElementBlock("div",Pst,t.toDisplayString(u.value),1)):t.createCommentVNode("",!0)]),Ast,t.createElementVNode("div",Rst,[t.createElementVNode("button",{class:"cancel-btn",onClick:c[2]||(c[2]=n=>p.$emit("close")),disabled:h.value},"Cancelar",8,Ust),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:i},[h.value?(t.openBlock(),t.createElementBlock("span",Ist,"Guardando...")):(t.openBlock(),t.createElementBlock("span",qst,"Guardar"))],8,Fst)])])]))}},[["__scopeId","data-v-3f4f9ca5"]]),v9=e=>(t.pushScopeId("data-v-abfffcd1"),e=e(),t.popScopeId(),e),Wst={class:"modal-overlay"},Dst={class:"modal-content"},Kst=[v9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Bst=v9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),Xst=v9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Gst={class:"modal-body"},Zst=v9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),Jst=["placeholder"],Hst=v9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Yst={class:"modal-footer"},Qst=["disabled"],$st=ov({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName+" copy"),h=t.ref(!1);t.watch(()=>a.initialName,i=>{$.value=i+" copy"}),t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});async function u(){if($.value.trim().length>=3&&!h.value){h.value=!0;try{const i=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${a.templateId}/duplicate`,{name:$.value.trim()},{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});v("template-duplicated",{originalTemplateId:a.templateId,newTemplateName:$.value.trim(),responseData:i.data}),v("close")}catch(i){console.error("Error al duplicar template:",i),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{h.value=!1}}}return(i,p)=>(t.openBlock(),t.createElementBlock("div",Wst,[t.createElementVNode("div",Dst,[t.createElementVNode("button",{class:"close-btn",onClick:p[0]||(p[0]=c=>i.$emit("close"))},Kst),Bst,Xst,t.createElementVNode("div",Gst,[Zst,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":p[1]||(p[1]=c=>$.value=c),placeholder:e.initialName,maxlength:"40",autocomplete:"off"},null,8,Jst),[[t.vModelText,$.value]])]),Hst,t.createElementVNode("div",Yst,[t.createElementVNode("button",{class:"cancel-btn",onClick:p[2]||(p[2]=c=>i.$emit("close"))},"Cancelar"),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:u},t.toDisplayString(h.value?"Duplicando...":"Aceptar"),9,Qst)])])]))}},[["__scopeId","data-v-abfffcd1"]]),elt=e=>(t.pushScopeId("data-v-93a27145"),e=e(),t.popScopeId(),e),tlt={class:"modal-overlay"},rlt={class:"modal-content"},alt=[elt(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],nlt=t.createStaticVNode('<div class="modal-header" data-v-93a27145><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-93a27145><span class="modal-title" data-v-93a27145>Eliminar template</span></div><div class="header-separator" data-v-93a27145></div><div class="modal-body confirm-text" data-v-93a27145> ¿Estás seguro que deseas eliminar<br data-v-93a27145> este template? Si lo haces no habrá manera<br data-v-93a27145> de recuperarlo. </div><div class="header-separator" data-v-93a27145></div>',4),ilt={class:"modal-footer"},olt=["disabled"],slt=ov({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1);t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});const h=async()=>{try{$.value=!0;const i=await V0.create({headers:{Authorization:`${a.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/templates/${a.templateId}`);(i.status===200||i.status===204)&&(v("templateDeleted",a.templateId),v("close"))}catch(u){console.error("Error al eliminar template:",u),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{$.value=!1}};return(u,i)=>(t.openBlock(),t.createElementBlock("div",tlt,[t.createElementVNode("div",rlt,[t.createElementVNode("button",{class:"close-btn",onClick:i[0]||(i[0]=p=>u.$emit("close"))},alt),nlt,t.createElementVNode("div",ilt,[t.createElementVNode("button",{class:"cancel-btn",onClick:i[1]||(i[1]=p=>u.$emit("close"))},"Cancelar"),t.createElementVNode("button",{class:"delete-btn",onClick:h,disabled:$.value},t.toDisplayString($.value?"Eliminando...":"Eliminar"),9,olt)])])]))}},[["__scopeId","data-v-93a27145"]]),UN=e=>(t.pushScopeId("data-v-6a25622a"),e=e(),t.popScopeId(),e),llt={class:"fortalezas-view"},clt={class:"fortalezas-header"},ult={class:"team-logo-container"},dlt=["src","alt"],plt={class:"header-content"},hlt={class:"fortalezas-title"},flt={class:"fortalezas-description"},mlt={class:"fortalezas-container"},ylt={class:"categorias-tabs segmented"},glt=["onClick"],vlt={class:"fortalezas-list"},blt={key:0,class:"loading-state"},xlt=[UN(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),UN(()=>t.createElementVNode("p",{class:"loading-text"},"Cargando fortalezas...",-1))],_lt={key:1,class:"error-state"},wlt={class:"error-text"},Tlt=["onClick"],Slt=["onClick"],klt=["checked","disabled","onClick"],Llt={key:0,class:"selection-number"},Elt={class:"fortaleza-badge"},Clt={class:"fortaleza-content"},Nlt={class:"fortaleza-name"},Olt={class:"fortaleza-ranking"},Mlt=UN(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Vlt={class:"category-indicator"},zlt={class:"fortalezas-footer"},Plt={key:0,class:"counter-section"},Alt={class:"counter-text"},Rlt={key:1,class:"carousel-section"},Ult={class:"footer-badge"},Flt={class:"footer-content"},Ilt={class:"footer-name"},qlt={class:"footer-ranking"},jlt=UN(()=>t.createElementVNode("div",{class:"footer-separator"},null,-1)),Wlt={class:"footer-category-indicator"},Dlt=["onClick"],Klt={key:2,class:"empty-message-full"},Blt={class:"empty-text"},LJ=ov({__name:"FortalezasView",props:{teamInitials:{type:String,default:"CA"},title:{type:String,default:"Fortalezas a favor de mi equipo"},modelValue:{type:Array,default:()=>[]},teamLogoUrl:{type:String,required:!1,default:null},seasonId:{type:[String,Number],required:!0},teamId:{type:[String,Number],required:!0},token:{type:String,required:!0},totalFortalezas:{type:Number,default:15},rivalTeamId:{type:[String,Number],required:!1,default:null},gameId:{type:[String,Number],required:!1,default:null},templateType:{type:[String,Number],required:!1,default:1}},emits:["update:modelValue"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.computed(()=>v.teamLogoUrl?v.teamLogoUrl:v.teamId?`https://golstatsimages.blob.core.windows.net/teams-80/${v.teamId}.png`:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"),u=t.ref([...v.modelValue]),i=t.reactive({}),p=t.ref(!1),c=t.ref(null);t.watch(()=>v.modelValue,xe=>{if(Array.isArray(xe)){const Ae=JSON.stringify([...u.value].sort()),qe=JSON.stringify([...xe].sort());Ae!==qe&&(u.value=[...xe],Object.keys(i).forEach(_e=>delete i[_e]),u.value.forEach((_e,Ue)=>{i[_e]=Ue+1}))}},{immediate:!0,deep:!0});const n=t.ref(0),k=t.ref(null),T=t.ref(null),x=t.ref(0),d=t.ref(0);function o(){const xe=k.value,Ae=T.value;x.value=xe?xe.clientWidth:0,d.value=Ae?Ae.scrollWidth:0}const l=t.computed(()=>Math.max(0,d.value-x.value)),s=t.computed(()=>n.value>0),f=t.computed(()=>n.value<l.value);function g(){const xe=Math.min(l.value,n.value+200);n.value=xe}function S(){const xe=Math.max(0,n.value-200);n.value=xe}let L=null;t.onMounted(()=>{o();const xe=()=>o();window.addEventListener("resize",xe),L=xe,j()}),t.onBeforeUnmount(()=>{L&&(window.removeEventListener("resize",L),L=null)}),t.watch(()=>u.value.slice(),async()=>{await t.nextTick(),o()},{deep:!0}),t.watch(()=>[v.seasonId,v.teamId,v.gameId,v.token,v.templateType],()=>{j()},{immediate:!1});const M=t.computed(()=>u.value.map(xe=>z.value.find(Ae=>Ae.id===xe)).filter(Boolean).sort((xe,Ae)=>i[xe.id]-i[Ae.id])),A=t.computed(()=>({transform:`translateX(-${n.value}px)`})),z=t.ref([]),I=t.ref([]);async function j(){if(!v.seasonId||!v.teamId){console.warn("seasonId y teamId son requeridos para obtener las fortalezas");return}p.value=!0,c.value=null;try{let xe;v.templateType===2?xe=`https://5c9xc3gwh2.execute-api.us-east-2.amazonaws.com/prod/strengths/seasons/${v.seasonId}/postgames/${v.gameId}/teams/${v.teamId}`:xe=`https://5c9xc3gwh2.execute-api.us-east-2.amazonaws.com/prod/strengths/seasons/${v.seasonId}/pregames/${v.gameId}/teams/${v.teamId}`;const Ae=await fetch(xe,{method:"GET",headers:{Authorization:`${v.token}`,"Content-Type":"application/json"}});if(!Ae.ok)throw new Error(`Error al obtener fortalezas: ${Ae.status} ${Ae.statusText}`);const qe=await Ae.json();I.value=qe.strengths||[],z.value=qe.strengths.map(_e=>({id:_e.categories,name:_e.name,value:_e.total,category:_e.category_type==1?"Ofensiva":_e.category_type==2?"Defensiva":"Posesion",ranking:`#${_e.league_ranking} en la liga`,color:F(_e.category_type||"General")})),O()}catch(xe){console.error("Error al cargar fortalezas:",xe),c.value=xe.message,z.value=[]}finally{p.value=!1}}function F(xe){return{1:"#4CAF50",3:"#2196F3",2:"#00BCD4",General:"#9C27B0"}[xe]||"#9C27B0"}const W=t.ref(["Todos"]),U=t.ref("Todos");function O(){const xe=[...new Set(z.value.map(Ae=>Ae.category))];W.value=["Todos",...xe]}const X=t.computed(()=>U.value==="Todos"?z.value:z.value.filter(xe=>xe.category===U.value));function N(xe){const Ae=u.value.indexOf(xe);if(Ae>-1)u.value.splice(Ae,1),delete i[xe];else{if(u.value.length>=v.totalFortalezas)return;const qe=z.value.length,_e=new Set(Object.values(i));let Ue=1;for(;_e.has(Ue)&&Ue<=qe;)Ue++;i[xe]=Ue,u.value.push(xe)}$("update:modelValue",u.value)}function Y(xe){U.value=xe}function se(xe){const Ae=u.value.indexOf(xe);Ae>-1&&(u.value.splice(Ae,1),delete i[xe],$("update:modelValue",u.value))}function me(){const xe=z.value.length,Ae=new Set(u.value),qe=new Set(Object.values(i)),_e=[];for(let Re=1;Re<=xe;Re++)qe.has(Re)||_e.push(Re);_e.sort((Re,We)=>Re-We);const Ue=X.value.map(Re=>Re.id).filter(Re=>!Ae.has(Re)),je=v.totalFortalezas;for(const Re of Ue){if(u.value.length>=je)break;const We=_e.shift();if(We===void 0)break;i[Re]=We,u.value.push(Re)}$("update:modelValue",u.value)}function ge(){console.warn("Error loading team logo, falling back to initials")}function be(){console.warn("Error loading league logo")}return r({fortalezasData:z,fortalezasRawData:I,selectedFortalezas:u,selectionOrderMap:i,autocompletar:me}),(xe,Ae)=>(t.openBlock(),t.createElementBlock("div",llt,[t.createElementVNode("div",clt,[t.createElementVNode("div",ult,[t.createElementVNode("img",{src:h.value,alt:`Logo ${e.teamInitials}`,class:"team-logo",onError:ge},null,40,dlt)]),t.createElementVNode("div",plt,[t.createElementVNode("h3",hlt,t.toDisplayString(e.title),1),t.createElementVNode("p",flt," Este template contiene "+t.toDisplayString(e.totalFortalezas)+" visualizaciones de Fortalezas. Selecciona las deseadas. ",1)])]),t.createElementVNode("div",mlt,[t.createElementVNode("div",ylt,[t.createElementVNode("div",{class:"segmented-highlight",style:t.normalizeStyle({width:`calc(100% / ${W.value.length})`,left:`calc(${W.value.indexOf(U.value)} * (100% / ${W.value.length}))`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value,qe=>(t.openBlock(),t.createElementBlock("button",{key:qe,class:t.normalizeClass(["categoria-tab",{active:U.value===qe}]),onClick:_e=>Y(qe)},t.toDisplayString(qe),11,glt))),128))]),t.createElementVNode("div",vlt,[p.value?(t.openBlock(),t.createElementBlock("div",blt,xlt)):c.value?(t.openBlock(),t.createElementBlock("div",_lt,[t.createElementVNode("p",wlt,"Error al cargar las fortalezas: "+t.toDisplayString(c.value),1),t.createElementVNode("button",{onClick:j,class:"retry-button"},"Reintentar")])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(X.value,qe=>(t.openBlock(),t.createElementBlock("div",{key:qe.id,class:t.normalizeClass(["fortaleza-item",{selected:u.value.includes(qe.id),disabled:!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas}]),onClick:_e=>N(qe.id)},[t.createElementVNode("div",{class:"fortaleza-checkbox",onClick:t.withModifiers(_e=>!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas?null:N(qe.id),["stop"])},[t.createElementVNode("input",{type:"checkbox",checked:u.value.includes(qe.id),disabled:!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas,class:"checkbox-input",onClick:t.withModifiers(_e=>!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas?null:N(qe.id),["stop"])},null,8,klt),u.value.includes(qe.id)?(t.openBlock(),t.createElementBlock("span",Llt,t.toDisplayString(i[qe.id]),1)):t.createCommentVNode("",!0)],8,Slt),t.createElementVNode("div",Elt,t.toDisplayString(qe.value),1),t.createElementVNode("div",Clt,[t.createElementVNode("div",Nlt,t.toDisplayString(qe.name),1),t.createElementVNode("div",Olt,[t.createElementVNode("span",null,t.toDisplayString(qe.ranking),1),t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/golstats2-tournaments/1.png",alt:"Liga",class:"league-logo",onError:be},null,32),Mlt,t.createElementVNode("div",Vlt,[t.createElementVNode("div",{class:"category-dot",style:t.normalizeStyle({backgroundColor:qe.color})},null,4),t.createElementVNode("span",null,t.toDisplayString(qe.category),1)])])])],10,Tlt))),128))])]),t.createElementVNode("div",zlt,[u.value.length>0?(t.openBlock(),t.createElementBlock("div",Plt,[t.createElementVNode("div",Alt,t.toDisplayString(u.value.length)+"/"+t.toDisplayString(e.totalFortalezas),1)])):t.createCommentVNode("",!0),u.value.length>0?(t.openBlock(),t.createElementBlock("div",Rlt,[t.createElementVNode("div",{class:"carousel-container",ref_key:"carouselContainerRef",ref:k},[s.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:S},"‹")):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"carousel-track",ref_key:"carouselTrackRef",ref:T,style:t.normalizeStyle(A.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,qe=>(t.openBlock(),t.createElementBlock("div",{key:qe.id,class:"footer-pill"},[t.createElementVNode("div",Ult,t.toDisplayString(qe.value),1),t.createElementVNode("div",Flt,[t.createElementVNode("div",Ilt,t.toDisplayString(qe.name),1),t.createElementVNode("div",qlt,[t.createElementVNode("span",null,t.toDisplayString(qe.ranking),1),t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/golstats2-tournaments/1.png",alt:"Liga",class:"footer-league-logo",onError:be},null,32),jlt,t.createElementVNode("div",Wlt,[t.createElementVNode("div",{class:"footer-category-dot",style:t.normalizeStyle({backgroundColor:qe.color})},null,4),t.createElementVNode("span",null,t.toDisplayString(qe.category),1)])])]),t.createElementVNode("button",{class:"pill-remove-btn",onClick:_e=>se(qe.id)},"×",8,Dlt)]))),128))],4),f.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:g},"›")):t.createCommentVNode("",!0)],512)])):(t.openBlock(),t.createElementBlock("div",Klt,[t.createElementVNode("span",Blt,t.toDisplayString(u.value.length)+" de "+t.toDisplayString(e.totalFortalezas)+" Fortalezas agregadas",1)]))])]))}},[["__scopeId","data-v-6a25622a"]]),Xlt=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},Glt={key:1},Zlt={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jlt=["fill"],Hlt={key:0,class:"checkbox__teams"},Ylt={class:"checkbox__teams__logo"},Qlt=["src"],$lt={class:"checkbox__teams__logo"},ect=["src"],tct={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",Glt,[(t.openBlock(),t.createElementBlock("svg",Zlt,[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,Jlt)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",Hlt,[t.createElementVNode("div",Ylt,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,Qlt)]),t.createElementVNode("div",$lt,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,ect)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},rct=Xlt(tct,[["__scopeId","data-v-b6f124d8"]]),EJ=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["M7",{matchDayId:7,matchDayName:"Jornada 7",matchDayAbbreviation:"J7"}],["M8",{matchDayId:8,matchDayName:"Jornada 8",matchDayAbbreviation:"J8"}],["M9",{matchDayId:9,matchDayName:"Jornada 9",matchDayAbbreviation:"J9"}],["M10",{matchDayId:10,matchDayName:"Jornada 10",matchDayAbbreviation:"J10"}],["M11",{matchDayId:11,matchDayName:"Jornada 11",matchDayAbbreviation:"J11"}],["M12",{matchDayId:12,matchDayName:"Jornada 12",matchDayAbbreviation:"J12"}],["M13",{matchDayId:13,matchDayName:"Jornada 13",matchDayAbbreviation:"J13"}],["M14",{matchDayId:14,matchDayName:"Jornada 14",matchDayAbbreviation:"J14"}],["M15",{matchDayId:15,matchDayName:"Jornada 15",matchDayAbbreviation:"J15"}],["M16",{matchDayId:16,matchDayName:"Jornada 16",matchDayAbbreviation:"J16"}],["M17",{matchDayId:17,matchDayName:"Jornada 17",matchDayAbbreviation:"J17"}],["PI1",{matchDayId:181,matchDayName:"Play In 1",matchDayAbbreviation:"PI1"}],["PI2",{matchDayId:182,matchDayName:"Play In 2",matchDayAbbreviation:"PI2"}],["PO",{matchDayId:183,matchDayName:"Repechaje",matchDayAbbreviation:"R"}],["PO1",{matchDayId:18,matchDayName:"Cuartos de final ida",matchDayAbbreviation:"CFI"}],["PO2",{matchDayId:19,matchDayName:"Cuartos de final vuelta",matchDayAbbreviation:"CFV"}],["PO3",{matchDayId:20,matchDayName:"Semifinal ida",matchDayAbbreviation:"SFI"}],["PO4",{matchDayId:21,matchDayName:"Semifinal vuelta",matchDayAbbreviation:"SFV"}],["PO5",{matchDayId:22,matchDayName:"Final ida",matchDayAbbreviation:"FI"}],["PO6",{matchDayId:86,matchDayName:"Final vuelta",matchDayAbbreviation:"FV"}]]),FN={TO_RIGHT:"toRight",TO_LEFT:"toLeft"},act=["gameId","playerId","teamId","x","y","momentOfPlay","section","playId","timeSection"];let wA=null;function nct(){return wA||(wA=act.reduce((e,r,a)=>(e[a]=r,e),{})),wA}const ict=["playId","playerId","teamId","gameId","categoryId","relatedCategoriesIds","x1","y1","x2","y2","x3","y3","fieldSection","momentOfPlay","playingAs","matchLapse","matchResult","matchResultAtMomentOfPlay","relatedPlayId","touchOrder","timeSection"];let TA=null;function oct(){return TA||(TA=ict.reduce((e,r,a)=>(e[a]=r,e),{})),TA}const IN=e=>(t.pushScopeId("data-v-e248d060"),e=e(),t.popScopeId(),e),sct={class:"corners-view"},lct={class:"corners-header"},cct={class:"team-logo-container"},uct=["src","alt"],dct={class:"header-content"},pct={class:"corners-title"},hct={class:"corners-description"},fct={class:"corners-container"},mct={class:"matches-header"},yct={key:0,class:"post-match-game"},gct={class:"post-match-game__match-day"},vct={class:"post-match-game__game-info"},bct={class:"team-info"},xct={class:"team-logo-post"},_ct=["src"],wct={class:"team-name"},Tct={class:"score"},Sct={class:"team-info"},kct={class:"team-name"},Lct={class:"team-logo-post"},Ect=["src"],Cct=["onClick"],Nct={class:"team-logo-match"},Oct=["src"],Mct={class:"match-score"},Vct={class:"team-logo-match"},zct=["src"],Pct={class:"team-acronym"},Act={class:"team-match-day"},Rct={class:"team-acronym"},Uct={class:"categorias-tabs segmented"},Fct=["onClick"],Ict={class:"corners-list"},qct=["onClick"],jct={class:"check-col"},Wct={class:"badge-col"},Dct={class:"count-badge"},Kct={class:"content-col"},Bct={class:"title-row"},Xct={class:"time"},Gct=IN(()=>t.createElementVNode("span",{class:"title"},"Tiro de esquina",-1)),Zct={class:"player"},Jct={class:"meta-row"},Hct=IN(()=>t.createElementVNode("span",null,"/",-1)),Yct={class:"corners-footer"},Qct={key:0,class:"counter-section"},$ct={class:"counter-text"},eut={key:1,class:"carousel-section"},tut={class:"footer-total"},rut={class:"footer-badge"},aut={class:"team-info"},nut={class:"team-logo-corner"},iut=["src"],out={class:"team-score"},sut={class:"team-info"},lut={class:"team-logo-corner"},cut=["src"],uut={class:"team-score"},dut={class:"footer-content"},put={class:"footer-ranking"},hut={class:"corner-time"},fut=IN(()=>t.createElementVNode("div",{class:"footer-separator"},null,-1)),mut={class:"corner-player"},yut={class:"corner-details"},gut=IN(()=>t.createElementVNode("span",null," / ",-1)),vut=["onClick"],but={key:2,class:"empty-message-full"},xut={class:"empty-text"},SA=148,_ut=5,wut=10,Tut=600,Sut=600,kut=5,qN=ov({__name:"TirosEsquinaView",props:{modelValue:{type:Array,default:()=>[]},userTeamId:{type:Number,default:0},rival:{type:Boolean,default:!1},teamInitials:{type:String,default:"AME"},title:{type:String,default:"Tiros de esquina en contra de mi equipo"},teamLogoUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"},teamViews:{type:Array,default:()=>[]},configData:{type:Object,default:()=>({})},isAgainstMode:{type:Boolean,default:!1},isSynchronization:{type:Boolean,default:!1},isRival:{type:Boolean,default:!1},filters:{type:Object,default:()=>({isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0})}},emits:["update:modelValue"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=["Todos","Goles","Rematados","A rival"],u={goals:{categoryIds:[583,585,587,589]},shots:{categoryIds:[584,586,588,590,122,128,136,142]},toRival:{categoryIds:[123,129,137,143,124,130,138,144]}},i=t.ref("Todos"),p=t.ref([...v.modelValue]),c=t.reactive({}),n=t.ref([]);p.value.forEach((er,sr)=>{c[er]=sr+1});const k=t.ref(0),T=t.ref(null),x=t.ref(null),d=t.ref(0),o=t.ref(0);function l(){const er=T.value,sr=x.value;d.value=er?er.clientWidth:0,o.value=sr?sr.scrollWidth:0}const s=t.computed(()=>Math.max(0,o.value-d.value)),f=t.computed(()=>k.value>0),g=t.computed(()=>k.value<s.value),S=t.computed(()=>n.value.filter(er=>er.isSelected)),L=t.computed(()=>S.value.length===v.teamViews.length),M=t.ref(0);t.watch(()=>S.value,er=>{setTimeout(()=>{x.value?l():M.value=0},500),$("update:modelValue",er)},{deep:!0});function A(){x.value&&(x.value.scrollLeft=x.value.scrollLeft+400,k.value=k.value+400)}function z(){x.value&&(x.value.scrollLeft=x.value.scrollLeft-400,k.value=k.value-400)}const I=t.computed(()=>v.configData&&v.configData.template&&v.configData.template.template_type===2?{...v.configData.partido,matchDay:EJ.get(v.configData.partido.matchday_abbreviation)}:null);t.computed(()=>v.configData&&v.configData.template&&v.configData.template.template_type===1?v.configData.partido:null);function j(){const er=pt.value,sr=er?er.clientWidth:0,Cr=Math.max(1,Math.floor(sr/(SA+10)));ut.value=Cr}const F=t.computed(()=>{const er=-rt.value*(SA+10),sr=Ct.value?Ot.value:0;return{transform:`translateX(${er+sr}px)`}});function W(){rt.value=Math.min(He.value,rt.value+1)}function U(){rt.value=Math.max(0,rt.value-1)}function O(er){Ct.value=!0,Vt.value=er.clientX,Ot.value=0}function X(er){Ct.value&&(Ot.value=er.clientX-Vt.value)}function N(){if(!Ct.value)return;const er=SA/3;Ot.value<=-er?W():Ot.value>=er&&U(),Ct.value=!1,Ot.value=0}const Y=t.computed(()=>cr.value&&cr.value.cornersByType?cr.value.cornersByType.get(i.value)||[]:[]);function se(er){(!L.value||er.isSelected)&&(er.isSelected=!er.isSelected)}function me(er){je.value.forEach(sr=>{sr.isSelected=sr.game_id===er.game_id})}function ge(){if(!L.value){let er=S.value.length;for(const sr of n.value)if(!sr.isSelected&&(sr.isSelected=!0,er++,er>=v.teamViews.length))break}}function be(er){er.isSelected=!1}function xe(){console.warn("Error loading team logo, falling back to initials")}let Ae=null;t.onMounted(()=>{l();const er=()=>l();window.addEventListener("resize",er),Ae=er}),t.onBeforeUnmount(()=>{Ae&&(window.removeEventListener("resize",Ae),Ae=null)}),t.watch(()=>p.value.slice(),async()=>{await t.nextTick(),l()},{deep:!0});const qe=nct(),_e=oct(),Ue=t.ref(new Map),je=t.ref([]);let Re=0;const We=t.ref(new Map),Qe=t.ref(null),rt=t.ref(0),pt=t.ref(null),ut=t.ref(1),He=t.computed(()=>Math.max(0,je.value.length-ut.value)),st=t.computed(()=>rt.value>0),ct=t.computed(()=>rt.value<He.value),Ct=t.ref(!1),Vt=t.ref(0),Ot=t.ref(0),qt=[{text:"Rematado fue gol",categoriesIds:[583,585,587,589]},{text:"Rematado no fue gol",categoriesIds:[584,586,588,590]},{text:"Rematado sin destino",categoriesIds:[122,128,136,142]},{text:v.configData.liga.is_female===1?"Ganado por portera rival":"Ganado por portero rival",categoriesIds:[123,129,137,143]},{text:v.configData.liga.is_female===1?"Ganado por jugadora rival":"Ganado por jugador rival",categoriesIds:[124,130,138,144]},{text:"Sin destino",categoriesIds:[125,131,139,145]}],Zt=t.computed(()=>({id:v.configData.partido.game_id,home_team:v.configData.partido.home_team,away_team:v.configData.partido.visiting_team,season:v.configData.partido.season_id,game_status:v.configData.partido.game_status,home_acronym:v.configData.partido.home_team_acronym,away_acronym:v.configData.partido.visiting_team_acronym,logo_home:v.configData.partido.localLogo,logo_away:v.configData.partido.visitanteLogo})),Jt=t.computed(()=>{let er=v.isAgainstMode?"en contra":"a favor";return v.userTeamId===v.configData.partido.home_team||v.userTeamId===v.configData.partido.visiting_team?er+=v.userTeamId===Qt.value?" de mi equipo":" del rival":er+=v.isRival?" del equipo visitante":" del equipo local",er}),Qt=t.computed(()=>v.isRival?v.configData.partido.visiting_team:v.configData.partido.home_team),cr=t.computed(()=>je.value.find(er=>er.isSelected)),hr={headers:{Authorization:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}};function $t(){if(n.value=[],je.value)if(v.isSynchronization)je.value.forEach((er,sr)=>{er.isVisible=!0,sr===0&&(er.isSelected=!0,er.isExpanded=!0,er.corners.forEach(Cr=>{Cr.isVisible=!0}),er.cornersAgainstTeam.forEach(Cr=>{Cr.isVisible=!0}))});else{let er=!1;je.value.forEach(sr=>{let Cr=1;if(sr.matchDay||(sr.matchDay=EJ.get(sr.matchday_abbreviation)),sr.isSelected=!1,sr.cornersByType=new Map,h.forEach(Rr=>{sr.cornersByType.set(Rr,[])}),v.isAgainstMode&&sr.isSoccerFieldDataRivalLoaded||!v.isAgainstMode&&sr.isSoccerFieldDataLoaded){const Rr=v.isAgainstMode?sr.cornersAgainstTeam:sr.corners;if((!v.filters.games.length||v.filters.games.includes(sr.game_id))&&v.filters.playingAs.includes(sr.playingAs)&&(v.filters.isMoment||v.filters.final.includes(sr.finalResult))){for(const sa of Rr){if(sa.isSelected=!1,sa.isVisible=!0,!v.filters.isWhatHappenedFull&&sa.relatedCategoriesIds&&!v.filters.whathappened.some(fa=>sa.relatedCategoriesIds.has(fa))){sa.isVisible=!1,sa.isSelected=!1;continue}sa.isVisible=!0,sa.game=sr;const Ia=sr.cornersByType.get("Todos"),qa=sr.cornersByType.get("Goles"),bn=sr.cornersByType.get("Rematados"),fn=sr.cornersByType.get("A rival");n.value.push(sa),sa.mainIndex=Cr,Cr++,Ia.push(sa);const In=u.goals.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa)),ea=u.shots.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa)),Ur=u.toRival.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa));In&&qa.push(sa),ea&&bn.push(sa),Ur&&fn.push(sa)}sr.isVisible&&!er?(sr.isSelected=!0,sr.isExpanded=!0,er=!0):sr.isSelected=!1}else sr.isVisible=!1,Rr.forEach(sa=>{sa.isSelected=!1})}})}}function At(){Ue.value.get(Qt.value)||Ue.value.set(Qt.value,je.value)}function or(er,sr,Cr,Rr){er&&er.forEach(sa=>{sa.isHomeTeam=sa.teamId===Zt.value.home_team,sa.attackDirection=Rr.get(sa.playId).mainPlay.attackDirection,sa.player=sr.get(sa.playerId)||Cr.get(sa.playerId)})}function Gt(er){const[sr,Cr]=er.split(", ");let Rr="";const sa=sr.split(" ");for(const Ia of sa)if(Rr+=` ${Ia}`,Ia.length>3)break;return Cr&&sr?`${Cr.trim().charAt(0)}.${Rr}`:""}function Lt(er){let[sr,Cr]=er.split(", ");Cr=Cr.trim();let Rr="";const sa=sr.split(" "),Ia=Cr.includes(" ")?Cr.split(" ")[0]:Cr;for(const qa of sa)if(Rr+=` ${qa}`,qa.length>3)break;return Ia&&sr?`${Ia} ${Rr}`:""}function It(er){if(!er.teams||er.teams.length===0)return;const sr=er.teams[0].team_id,Cr=er.teams[1].team_id;if(Qt.value===sr&&er.home_atk_direction===1||Qt.value===Cr&&er.visiting_atk_direction===1)for(let Rr=1;Rr<5;Rr++)We.value.set(Rr,Rr%2===0?FN.TO_LEFT:FN.TO_RIGHT);else for(let Rr=1;Rr<5;Rr++)We.value.set(Rr,Rr%2===0?FN.TO_RIGHT:FN.TO_LEFT)}const Pt=new Map([[120,"Comba hacia afuera"],[134,"Comba hacia afuera"],[126,"Comba hacia adentro"],[140,"Comba hacia adentro"],[327,"Raz de área"],[146,"Raz de área"],[133,"En corto"],[147,"En corto"]]),gr=qt.reduce((er,sr)=>(sr.categoriesIds.forEach(Cr=>{er.set(Cr,sr.text)}),er),new Map);function ur([er,sr]){const Cr=Math.round(Number(sr));if(Cr===60){const Rr=Number(er)+1;return`${Rr<100?Rr<10?"00":"0":""}${Rr}:00.000`}return`${er}:${Cr<10?"0":""}${Cr}.000`}async function vr(er,sr){try{if(er&&sr&&(!er.isSoccerFieldDataLoaded||!er.isSoccerFieldDataRivalLoaded)){const Cr=new Map,Rr=new Map,sa=new Map;It(sr.data),sr.data.players&&sr.data.players.forEach(fn=>{fn.shortName=Gt(fn.name),fn.firstNameAndFirstLastName=Lt(fn.name),Rr.set(fn.player_id,fn)}),sr.data.rival_players&&sr.data.rival_players.forEach(fn=>{fn.shortName=Gt(fn.name),fn.firstNameAndFirstLastName=Lt(fn.name),sa.set(fn.player_id,fn)}),Qe.value=sr.data.teams.find(fn=>fn.team_id===Qt.value),Qe.value&&(Qe.value.rival=sr.data.teams.find(fn=>fn.team_id!==Qt.value));const Ia=sr.data.data.reduce((fn,In)=>{const ea=In.reduce((Oa,Xr,ca)=>(Oa[_e[ca]]=Xr,Oa.isHomeTeam=Oa.teamId===er.home_team,Oa),{}),Ur=ea.playId===ea.relatedPlayId,fa=fn.get(ea.relatedPlayId),Va=ea.momentOfPlay.split(":"),Za=ur(Va);return ea.player=Rr.get(ea.playerId)||sa.get(ea.playerId),ea.isTeamForAnalysis=ea.teamId===Qt.value,Ur&&(ea.attackDirection=We.value.get(ea.matchLapse),Cr.set(ea.playId,Za)),fa?Ur?fa.mainPlay=ea:fa.relatedPlays.length<kut&&(fa.relatedPlays.push(ea),fa.relatedPlays.length>1&&fa.relatedPlays.sort((Oa,Xr)=>Oa.touchOrder-Xr.touchOrder)):fn.set(ea.playId,{mainPlay:Ur?ea:null,relatedPlays:Ur?[]:[ea]}),fn},new Map),qa=sr.data.field_positions.reduce((fn,In)=>{const ea=In.reduce((fa,Va,Za)=>(fa[qe[Za]]=Va,fa),{});ea.isTeamForAnalysis=ea.teamId===Qt.value;const Ur=fn.get(ea.playId);if(Ur){const fa=Ur.get(ea.momentOfPlay);fa?fa.push(ea):Ur.set(ea.momentOfPlay,[ea])}else fn.set(ea.playId,new Map([[ea.momentOfPlay,[ea]]]));return fn},new Map),bn=Array.from(Cr.entries()).reduce((fn,[In,ea])=>{const Ur=[],fa=[];let Va=null;const Za=qa.get(In);if(Za){const Oa=v.isSynchronization?Tut:_ut,Xr=v.isSynchronization?Sut:wut;Array.from(Za.keys()).sort().forEach(ua=>{(!Va||fa.length<Xr)&&(ua===ea?Va=Za.get(ua):Va?fa.length<Xr&&fa.push(Za.get(ua)):(Ur.length===Oa&&Ur.shift(),Ur.push(Za.get(ua))))});const kr=new Map;Ur.forEach((ua,Xa)=>{or(ua,Rr,sa,Ia),kr.set(`${Xa-Ur.length}`,ua)}),or(Va,Rr,sa,Ia),kr.set("0",Va),fa.forEach((ua,Xa)=>{or(ua,Rr,sa,Ia),kr.set(`${Xa+1}`,ua)}),fn.set(In,kr)}return fn},new Map);er[`${v.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(fn=>{const In=fn.related_categories.split(",").reduce((Ur,fa,Va)=>{const Za=Number(fa);return Va===1&&(fn.howWasCorner=Za),Ur.array.push(Za),Ur.sett.add(Za),Ur},{array:[],sett:new Set});for(const Ur of In.array){const fa=Pt.get(Ur),Va=gr.get(Ur);if(Va&&(fn.whatHappenedName=Va),fa&&(fn.howWasCornerName=fa),fn.howWasCornerName&&fn.whatHappenedName)break}fn.relatedCategoriesIds=In.sett,fn.playConnections=Ia.get(fn.play_id),fn.fieldPositions=bn.get(fn.play_id),fn.player=Rr.get(fn.player_id)||sa.get(fn.player_id);let ea=fn.moment_of_play.split(".")[0];ea.startsWith("0")&&(ea=ea.slice(1)),fn.formattedMomentOfPlay=ea,fn.momentOfPlayNumber=Number(ea.replace(":","."))}),!v.isAgainstMode&&!er.isSoccerFieldDataLoaded&&(er.isSoccerFieldDataLoaded=!0),v.isAgainstMode&&!er.isSoccerFieldDataRivalLoaded&&(er.isSoccerFieldDataRivalLoaded=!0)}}catch(Cr){throw new Error(Cr)}}function Tr(er){return v.isSynchronization?V0.get(`https://golstats-microservices.s3.us-west-2.amazonaws.com/tendency/corners-${v.isAgainstMode?"received":"commited"}-${Re}-${Qt.value}-${er.game_id}-large.json`):V0.get(`https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/${Re}/corners/trends/teams/${Qt.value}/${er.game_id}${v.isAgainstMode?"?isR=1":""}`,hr)}async function Pr(){try{const er=[];je.value.forEach(sr=>{(v.isAgainstMode&&!sr.isSoccerFieldDataRivalLoaded||!v.isAgainstMode&&!sr.isSoccerFieldDataLoaded)&&er.push(Tr(sr))}),er.length>0&&((await Promise.all(er)).forEach((Cr,Rr)=>{vr(je.value[Rr],Cr)}),$t()),At()}catch(er){throw new Error(er)}}async function Tt(er){try{const sr=Ue.value.get(Qt.value);if(sr){je.value=sr,$t();return}Re=er;const Cr=await V0.get(`https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/${Re}/games/teams/${Qt.value}/corners`,hr);if(!Cr.data&&!er)return Tt(v.configData.torneo.id);const Rr=Cr.data,sa={corners:0,cornersAgainst:0};je.value=Rr.games?Rr.games.reduce((Ia,qa)=>{if(I.value&&qa.game_id!==Zt.value.id||qa.game_status!==1)return Ia;const bn={againstTeam:[],team:[]},fn=qa.score[1]-qa.score[0];qa.dateMillis=new Date(qa.date_time_utc),qa.isVisible=!0,qa.playingAs=qa.home_team===Qt.value?1:2,qa.finalResult=fn===0?3:qa.playingAs===1?fn>0?2:1:fn<0?2:1,qa.corners.forEach(ea=>{const Ur=ea.team_id===Qt.value;ea.isAgainst=!Ur,Ur?bn.team.push(ea):bn.againstTeam.push(ea)}),qa.corners=bn.team,qa.cornersAgainstTeam=bn.againstTeam,sa.corners+=qa.corners.length,sa.cornersAgainst+=qa.cornersAgainstTeam.length;const In={...qa,isSelected:Ia.length===0,isExpanded:!1,isTeamForAnalysisHomeTeam:qa.home_team===Qt.value,canPlayVideos:!1};return Ia.push(In),Ia},[]):[],je.value=je.value.sort((Ia,qa)=>qa.dateMillis-Ia.dateMillis),At(),await Pr(),je.value.forEach(Ia=>{Ia.corners.concat(Ia.cornersAgainstTeam).forEach(qa=>{if(qa.playConnections){const[bn,fn]=qa.moment_of_play.split(":"),[In,ea]=fn.split("."),Ur=Number(bn)+45*qa.playConnections.mainPlay.matchLapse;qa.isSelected=!1,qa.orderValue=+`${Ur}${In}${ea}`}}),Ia.corners=Ia.corners.sort((qa,bn)=>qa.orderValue-bn.orderValue),Ia.cornersAgainstTeam=Ia.cornersAgainstTeam.sort((qa,bn)=>qa.orderValue-bn.orderValue)}),$t()}catch(sr){throw new Error(sr)}}t.watch(()=>v.configData,async er=>{er&&er.partido&&er.torneo&&await Tt(er.partido.season_id)},{deep:!0,immediate:!0});let Yt=null;return t.onMounted(()=>{j();const er=()=>j();window.addEventListener("resize",er),Yt=er}),t.onBeforeUnmount(()=>{Yt&&(window.removeEventListener("resize",Yt),Yt=null)}),r({autocompletar:ge}),(er,sr)=>(t.openBlock(),t.createElementBlock("div",sct,[t.createElementVNode("div",lct,[t.createElementVNode("div",cct,[t.createElementVNode("img",{src:e.teamLogoUrl,alt:`Logo ${e.teamInitials}`,class:"team-logo",onError:xe},null,40,uct)]),t.createElementVNode("div",dct,[t.createElementVNode("h3",pct," Tiros de esquina "+t.toDisplayString(Jt.value),1),t.createElementVNode("p",hct," Este template contiene "+t.toDisplayString(e.teamViews.length)+" visualizaciones de tiros de esquina. Selecciona los deseados. ",1)])]),t.createElementVNode("div",fct,[t.createElementVNode("div",mct,[I.value?(t.openBlock(),t.createElementBlock("div",yct,[t.createElementVNode("div",gct,t.toDisplayString(I.value.matchDay.matchDayName),1),t.createElementVNode("div",vct,[t.createElementVNode("div",bct,[t.createElementVNode("div",xct,[t.createElementVNode("img",{src:I.value.localLogo,alt:""},null,8,_ct)]),t.createElementVNode("div",wct,t.toDisplayString(I.value.home_team_acronym),1)]),t.createElementVNode("div",Tct,t.toDisplayString(I.value.score[0])+" - "+t.toDisplayString(I.value.score[1]),1),t.createElementVNode("div",Sct,[t.createElementVNode("div",kct,t.toDisplayString(I.value.visiting_team_acronym),1),t.createElementVNode("div",Lct,[t.createElementVNode("img",{src:I.value.visitanteLogo,alt:""},null,8,Ect)])])])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:"window",ref_key:"matchesWindowRef",ref:pt,onPointerdown:O,onPointerup:N,onPointercancel:N,onPointerleave:N,onPointermove:X},[st.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:U}," ‹ ")):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["track",{animating:!Ct.value}]),style:t.normalizeStyle(F.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(je.value,Cr=>{var Rr;return t.openBlock(),t.createElementBlock("div",{key:Cr.game_id,class:t.normalizeClass(["match-pill",{active:Cr.isSelected}]),onClick:sa=>me(Cr)},[t.createElementVNode("div",Nct,[t.createElementVNode("img",{src:Cr.home_team_logo,alt:""},null,8,Oct)]),t.createElementVNode("div",Mct,t.toDisplayString(Cr.score[0])+" - "+t.toDisplayString(Cr.score[1]),1),t.createElementVNode("div",Vct,[t.createElementVNode("img",{src:Cr.visiting_team_logo,alt:""},null,8,zct)]),t.createElementVNode("div",Pct,t.toDisplayString(Cr.home_team_acronym),1),t.createElementVNode("div",Act,t.toDisplayString(Cr.matchDay?(Rr=Cr.matchDay)==null?void 0:Rr.matchDayAbbreviation:""),1),t.createElementVNode("div",Rct,t.toDisplayString(Cr.visiting_team_acronym),1)],10,Cct)}),128))],6),ct.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:W}," › ")):t.createCommentVNode("",!0)],544))]),t.createElementVNode("div",Uct,[t.createElementVNode("div",{class:"segmented-highlight",style:t.normalizeStyle({width:`calc(100% / ${h.length})`,left:`calc(${h.indexOf(i.value)} * (100% / ${h.length}))`})},null,4),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(h,Cr=>t.createElementVNode("button",{key:Cr,class:t.normalizeClass(["categoria-tab",{active:i.value===Cr}]),onClick:Rr=>i.value=Cr},t.toDisplayString(Cr),11,Fct)),64))]),t.createElementVNode("div",Ict,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value,Cr=>{var Rr,sa;return t.openBlock(),t.createElementBlock("div",{key:Cr.play_id,class:t.normalizeClass(["corner-item",{selected:Cr.isSelected,disabled:Cr.disabled}]),onClick:Ia=>se(Cr)},[t.createElementVNode("div",jct,[t.createVNode(t.unref(rct),{modelValue:Cr.isSelected,"onUpdate:modelValue":Ia=>Cr.isSelected=Ia,"avoid-interaction":!0},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",Wct,[t.createElementVNode("div",Dct,t.toDisplayString(Cr.mainIndex)+"/"+t.toDisplayString((sa=(Rr=cr.value)==null?void 0:Rr.corners)==null?void 0:sa.length),1)]),t.createElementVNode("div",Kct,[t.createElementVNode("div",Bct,[t.createElementVNode("span",Xct,t.toDisplayString(Cr.formattedMomentOfPlay),1),Gct,t.createElementVNode("span",Zct,"| "+t.toDisplayString(Cr.player.firstNameAndFirstLastName),1)]),t.createElementVNode("div",Jct,[t.createElementVNode("span",null,t.toDisplayString(Cr.howWasCornerName),1),Hct,t.createElementVNode("span",null,t.toDisplayString(Cr.whatHappenedName),1)])])],10,qct)}),128))])]),t.createElementVNode("div",Yct,[p.value.length>0?(t.openBlock(),t.createElementBlock("div",Qct,[t.createElementVNode("div",$ct,t.toDisplayString(p.value.length)+"/10",1)])):t.createCommentVNode("",!0),S.value.length>0?(t.openBlock(),t.createElementBlock("div",eut,[t.createElementVNode("div",{class:"carousel-container",ref_key:"carouselContainerRef",ref:T},[t.createElementVNode("div",tut,t.toDisplayString(S.value.length)+" / "+t.toDisplayString(e.teamViews.length),1),t.createElementVNode("div",{ref_key:"carouselTrackRef",ref:x,class:"carousel-track"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value,Cr=>{var Rr;return t.openBlock(),t.createElementBlock("div",{key:Cr.play_id,class:"footer-pill"},[t.createElementVNode("div",rut,[t.createElementVNode("div",aut,[t.createElementVNode("div",nut,[t.createElementVNode("img",{src:Cr.game.home_team_logo,alt:""},null,8,iut)]),t.createElementVNode("div",out,t.toDisplayString(Cr.game.score[0]),1)]),t.createElementVNode("div",sut,[t.createElementVNode("div",lut,[t.createElementVNode("img",{src:Cr.game.visiting_team_logo,alt:""},null,8,cut)]),t.createElementVNode("div",uut,t.toDisplayString(Cr.game.score[1]),1)])]),t.createElementVNode("div",dut,[t.createElementVNode("div",put,[t.createElementVNode("span",hut,t.toDisplayString(Cr.game.matchDay?(Rr=Cr.game.matchDay)==null?void 0:Rr.matchDayAbbreviation:"")+" - "+t.toDisplayString(Cr.formattedMomentOfPlay),1),fut,t.createElementVNode("span",mut,t.toDisplayString(Cr.player.firstNameAndFirstLastName),1)]),t.createElementVNode("div",yut,[t.createElementVNode("span",null,t.toDisplayString(Cr.howWasCornerName),1),gut,t.createElementVNode("span",null,t.toDisplayString(Cr.whatHappenedName),1)])]),t.createElementVNode("button",{class:"pill-remove-btn",onClick:sa=>be(Cr)},"×",8,vut)])}),128))],512),f.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:z},"‹")):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:A},"›")):t.createCommentVNode("",!0)],512)])):(t.openBlock(),t.createElementBlock("div",but,[t.createElementVNode("span",xut,t.toDisplayString(p.value.length)+" de "+t.toDisplayString(e.teamViews.length)+" Tiros de esquina agregados",1)]))])]))}},[["__scopeId","data-v-e248d060"]]),Bb=e=>(t.pushScopeId("data-v-403972c1"),e=e(),t.popScopeId(),e),Lut={class:"modal-overlay"},Eut={class:"modal-content"},Cut={class:"modal-header"},Nut={class:"header-left"},Out=Bb(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"},null,-1)),Mut={class:"modal-title"},Vut={class:"prepartido-text"},zut={class:"step-counter"},Put=Bb(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Aut={key:0,class:"step-content"},Rut={key:0,class:"content-section"},Uut=Bb(()=>t.createElementVNode("h3",{class:"section-title"},"Fortalezas",-1)),Fut=Bb(()=>t.createElementVNode("div",{class:"title-separator"},null,-1)),Iut={class:"section-description"},qut=Bb(()=>t.createElementVNode("div",{class:"content-separator"},null,-1)),jut={class:"radio-group"},Wut={class:"radio-option"},Dut=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),Kut=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Automáticamente",-1)),But={class:"radio-option"},Xut=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),Gut=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Manualmente",-1)),Zut={key:1,class:"content-section"},Jut=Bb(()=>t.createElementVNode("h3",{class:"section-title"},"Tiros de esquina",-1)),Hut=Bb(()=>t.createElementVNode("div",{class:"title-separator"},null,-1)),Yut={class:"section-description"},Qut=Bb(()=>t.createElementVNode("div",{class:"content-separator"},null,-1)),$ut={class:"radio-group"},edt={class:"radio-option"},tdt=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),rdt=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Automáticamente",-1)),adt={class:"radio-option"},ndt=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),idt=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Manualmente",-1)),odt={key:1,class:"step-content"},sdt={key:2,class:"step-content"},ldt={key:3,class:"step-content"},cdt={key:4,class:"step-content"},udt={key:5,class:"step-content"},ddt={key:6,class:"step-content"},pdt=Bb(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),hdt={class:"modal-footer"},fdt=Bb(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10 12L6 8L10 4",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),mdt={class:"footer-actions"},ydt=["disabled"],gdt=t.createStaticVNode('<div class="modal-header" data-v-403972c1><div class="header-left" data-v-403972c1><span class="modal-title" data-v-403972c1>Confirmación</span></div></div><div class="header-separator" data-v-403972c1></div><div class="modal-body" data-v-403972c1><div class="step-content" data-v-403972c1><h3 class="confirm-dialog-title" data-v-403972c1>¿Estás seguro de regresar?</h3><p class="confirm-dialog-message" data-v-403972c1>Se perderá la información seleccionada</p></div></div>',3),vdt=ov({__name:"ModalConfigurarContenido",props:{hasRival:{type:Boolean,default:!0},token:{type:String,required:!0},template:{type:Object,required:!1,default:null},team:{type:Number,required:!1,default:null},partido:{type:Object,required:!1,default:null},configData:{type:Object,default:null}},emits:["close","back","next"],setup(e,{emit:r}){const a=r,v=e;function $(){if(!v.template||!v.template.pages)return!1;for(const qe of v.template.pages)if(qe.components&&Array.isArray(qe.components)&&qe.components.some(Ue=>Ue.title==="Fortalezas"||Ue.id===15||Ue.componentName==="GSCStrengths"))return!0;return!1}function h(){if(!v.template||!v.template.pages)return{equipo:0,rival:0,total:0};let qe=0,_e=0;for(const Ue of v.template.pages)if(Ue.components&&Array.isArray(Ue.components)){const je=Ue.components.filter(Re=>Re.componentName==="GSCStrengths"||Re.id===15||Re.name==="Fortalezas");for(const Re of je)Re.dynamicFilters&&Array.isArray(Re.dynamicFilters)&&Re.dynamicFilters[1]&&(Re.dynamicFilters[0]===1?qe+=Re.dynamicFilters[1]:Re.dynamicFilters[0]===2?_e+=Re.dynamicFilters[1]:Re.dynamicFilters[0]===3&&(Re.filterMultiple.isHomeTeam?qe+=Re.dynamicFilters[1]:_e+=Re.dynamicFilters[1]))}return{equipo:qe,rival:_e,total:qe+_e}}const u=t.computed(()=>$()),i=t.computed(()=>h()),p=t.computed(()=>!v.template||!v.template.template_type||v.template.template_type===1?"Prepartido":"Postpartido"),c=t.computed(()=>{if(v.template){const qe={homeTeamViews:[],homeTeamAgainstViews:[],awayTeamViews:[],awayTeamAgainstViews:[]};for(const _e of v.template.pages)if(_e.components&&Array.isArray(_e.components))for(const Ue of _e.components)Ue.coreView&&Ue.coreView.id===18&&(Ue.isHomeTeam?Ue.componentProps&&Ue.componentProps.isAgainstMode?qe.homeTeamAgainstViews.push(Ue):qe.homeTeamViews.push(Ue):Ue.componentProps&&Ue.componentProps.isAgainstMode?qe.awayTeamAgainstViews.push(Ue):qe.awayTeamViews.push(Ue));if(console.log("specificPlaysViews:",qe),qe.homeTeamViews.length>0||qe.homeTeamAgainstViews.length>0||qe.awayTeamViews.length>0||qe.awayTeamAgainstViews.length>0)return qe}return null}),n=t.ref(0),k=t.ref([1,2,3,4,5]),T=t.ref(!1),x=t.ref(!1),d=t.ref("manual"),o=t.ref("manual"),l=t.ref([]),s=t.ref([]),f=t.ref([]),g=t.ref([]),S=t.ref([]),L=t.ref([]),M=t.computed(()=>{let qe=0;return u.value&&d.value==="manual"&&(i.value.equipo>0&&(qe+=1),i.value.rival>0&&(qe+=1)),c.value&&o.value==="manual"&&(c.value.homeTeamViews.length>0&&(qe+=1),c.value.homeTeamAgainstViews.length>0&&(qe+=1),c.value.awayTeamViews.length>0&&(qe+=1),c.value.awayTeamAgainstViews.length>0&&(qe+=1)),Math.max(qe,1)}),A=t.computed(()=>{var Ue,je;if(n.value===0)return u.value||!!c.value;const _e=z()[n.value];if(u.value&&_e==="fortalezasEquipo"){const Re=I.value;if(!Re)return!1;const We=l.value.length,Qe=i.value.equipo,rt=((Ue=Re.fortalezasData)==null?void 0:Ue.length)||0;return We===Qe||rt>0&&rt<Qe&&We===rt}if(u.value&&_e==="fortalezasRival"){const Re=j.value;if(!Re)return!1;const We=s.value.length,Qe=i.value.rival,rt=((je=Re.fortalezasData)==null?void 0:je.length)||0;return We===Qe||rt>0&&rt<Qe&&We===rt}if(c.value){if(_e==="cornersEquipo"){if(!F.value)return!1;const We=f.value.length,Qe=c.value.homeTeamViews.length;return We===Qe}if(_e==="cornersEquipoAgainst"){if(!W.value)return!1;const We=g.value.length,Qe=c.value.homeTeamViews.length;return We===Qe}if(_e==="cornersRival"){if(!U.value)return!1;const We=S.value.length,Qe=c.value.awayTeamViews.length;return We===Qe}if(_e==="cornersRivalAgainst"){if(!O.value)return!1;const We=L.value.length,Qe=c.value.awayTeamViews.length;return We===Qe}}return!1});function z(){const qe=[];u.value&&d.value==="manual"&&(i.value.equipo>0&&qe.push("fortalezasEquipo"),i.value.rival>0&&qe.push("fortalezasRival")),c.value&&o.value==="manual"&&(c.value.homeTeamViews.length>0&&qe.push("cornersEquipo"),c.value.homeTeamAgainstViews.length>0&&qe.push("cornersEquipoAgainst"),c.value.awayTeamViews.length>0&&qe.push("cornersRival"),c.value.awayTeamAgainstViews.length>0&&qe.push("cornersRivalAgainst"));const _e={};return qe.forEach((Ue,je)=>{_e[je+1]=Ue}),_e}const I=t.ref(null),j=t.ref(null),F=t.ref(null),W=t.ref(null),U=t.ref(null),O=t.ref(null);function X(){a("close")}function N(){n.value>1?n.value--:n.value===1?l.value.length>0||s.value.length>0?x.value=!0:n.value--:a("back")}function Y(){l.value=[],s.value=[],f.value=[],S.value=[],x.value=!1,n.value--}function se(){x.value=!1}async function me(){if(console.log("continueToNext, currentStep:",n.value),console.log("canContinue:",A.value),console.log("specificPlaysDetails:",c.value),console.log("tirosEsquinaOption:",o.value),n.value===0){if(!A.value)return;if(u.value&&d.value==="automatico"&&c.value&&o.value==="automatico"||!u.value&&c.value&&o.value==="automatico"||u.value&&d.value==="automatico"&&!c.value){a("next",{fortalezas:d.value,tirosEsquina:o.value,selectedFortalezasEquipo:[],selectedFortalezasRival:[],strengthsPayload:{}});return}T.value=!0,setTimeout(()=>{n.value++,T.value=!1},300)}else if(n.value<M.value)T.value=!0,setTimeout(()=>{n.value++,T.value=!1},300);else{await t.nextTick();let qe={},_e=[];u.value&&d.value==="manual"&&(qe=ge()),c.value&&o.value==="manual"&&(_e=be()),a("next",{fortalezas:d.value,tirosEsquina:o.value,selectedFortalezasEquipo:l.value,selectedFortalezasRival:s.value,strengthsPayload:qe,specificPlaysPayload:_e})}}function ge(){if(!v.template||!v.template.pages)return{};const qe={};let _e=I.value,Ue=j.value;if(_e){let rt=_e.fortalezasRawData;rt&&typeof rt=="object"&&"value"in rt&&(rt=rt.value)}else console.error("❌ equipoRef NO está disponible");if(Ue){let rt=Ue.fortalezasRawData;rt&&typeof rt=="object"&&"value"in rt&&(rt=rt.value)}else console.error("❌ rivalRef NO está disponible");!_e&&l.value.length>0&&console.warn("⚠️ Ref de equipo no disponible, pero hay selecciones"),!Ue&&s.value.length>0&&console.warn("⚠️ Ref de rival no disponible, pero hay selecciones");const je=xe(l.value,_e),Re=xe(s.value,Ue);let We=0,Qe=0;return v.template.pages.forEach((rt,pt)=>{const ut=pt+1;console.log(`
|
|
7998
|
+
`+h):v.stack=h}catch{}}throw v}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=NS(this.defaults,a);const{transitional:v,paramsSerializer:$,headers:h}=a;v!==void 0&&AN.assertOptions(v,{silentJSONParsing:U5.transitional(U5.boolean),forcedJSONParsing:U5.transitional(U5.boolean),clarifyTimeoutError:U5.transitional(U5.boolean)},!1),$!=null&&(au.isFunction($)?a.paramsSerializer={serialize:$}:AN.assertOptions($,{encode:U5.function,serialize:U5.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),AN.assertOptions(a,{baseUrl:U5.spelling("baseURL"),withXsrfToken:U5.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=h&&au.merge(h.common,h[a.method]);h&&au.forEach(["delete","get","head","post","put","patch","common"],d=>{delete h[d]}),a.headers=Q_.concat(u,h);const i=[];let p=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(a)===!1||(p=p&&o.synchronous,i.unshift(o.fulfilled,o.rejected))});const c=[];this.interceptors.response.forEach(function(o){c.push(o.fulfilled,o.rejected)});let n,k=0,T;if(!p){const d=[_J.bind(this),void 0];for(d.unshift(...i),d.push(...c),T=d.length,n=Promise.resolve(a);k<T;)n=n.then(d[k++],d[k++]);return n}T=i.length;let x=a;for(;k<T;){const d=i[k++],o=i[k++];try{x=d(x)}catch(l){o.call(this,l);break}}try{n=_J.call(this,x)}catch(d){return Promise.reject(d)}for(k=0,T=c.length;k<T;)n=n.then(c[k++],c[k++]);return n}getUri(r){r=NS(this.defaults,r);const a=uJ(r.baseURL,r.url,r.allowAbsoluteUrls);return tJ(a,r.params,r.paramsSerializer)}};au.forEach(["delete","get","head","options"],function(r){OS.prototype[r]=function(a,v){return this.request(NS(v||{},{method:r,url:a,data:(v||{}).data}))}}),au.forEach(["post","put","patch"],function(r){function a(v){return function(h,u,i){return this.request(NS(i||{},{method:r,headers:v?{"Content-Type":"multipart/form-data"}:{},url:h,data:u}))}}OS.prototype[r]=a(),OS.prototype[r+"Form"]=a(!0)});let Mit=class lQ{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(h){a=h});const v=this;this.promise.then($=>{if(!v._listeners)return;let h=v._listeners.length;for(;h-- >0;)v._listeners[h]($);v._listeners=null}),this.promise.then=$=>{let h;const u=new Promise(i=>{v.subscribe(i),h=i}).then($);return u.cancel=function(){v.unsubscribe(h)},u},r(function(h,u,i){v.reason||(v.reason=new r7(h,u,i),a(v.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const a=this._listeners.indexOf(r);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const r=new AbortController,a=v=>{r.abort(v)};return this.subscribe(a),r.signal.unsubscribe=()=>this.unsubscribe(a),r.signal}static source(){let r;return{token:new lQ(function($){r=$}),cancel:r}}};function Vit(e){return function(a){return e.apply(null,a)}}function zit(e){return au.isObject(e)&&e.isAxiosError===!0}const _A={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_A).forEach(([e,r])=>{_A[r]=e});function SJ(e){const r=new OS(e),a=qZ(OS.prototype.request,r);return au.extend(a,OS.prototype,r,{allOwnKeys:!0}),au.extend(a,r,null,{allOwnKeys:!0}),a.create=function($){return SJ(NS(e,$))},a}const V0=SJ(f9);V0.Axios=OS,V0.CanceledError=r7,V0.CancelToken=Mit,V0.isCancel=oJ,V0.VERSION=wJ,V0.toFormData=ON,V0.AxiosError=Rm,V0.Cancel=V0.CanceledError,V0.all=function(r){return Promise.all(r)},V0.spread=Vit,V0.isAxiosError=zit,V0.mergeConfig=NS,V0.AxiosHeaders=Q_,V0.formToJSON=e=>nJ(au.isHTMLForm(e)?new FormData(e):e),V0.getAdapter=xJ.getAdapter,V0.HttpStatusCode=_A,V0.default=V0;const{Axios:m5t,AxiosError:y5t,CanceledError:g5t,isCancel:v5t,CancelToken:b5t,VERSION:x5t,all:_5t,Cancel:w5t,isAxiosError:T5t,spread:S5t,toFormData:k5t,AxiosHeaders:L5t,HttpStatusCode:E5t,formToJSON:C5t,getAdapter:N5t,mergeConfig:O5t}=V0,ov=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},y9=e=>(t.pushScopeId("data-v-137412ab"),e=e(),t.popScopeId(),e),Pit={class:"tooltip-template-options"},Ait=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1)),Rit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1)),Uit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1)),Fit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1)),Iit=y9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1)),qit=ov({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(e,{emit:r}){return(a,v)=>(t.openBlock(),t.createElementBlock("div",Pit,[t.createElementVNode("ul",null,[t.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=$=>a.$emit("generar-reporte"))},[Ait,t.createTextVNode(" Generar reporte ")]),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:0,class:"option",onClick:v[1]||(v[1]=$=>a.$emit("renombrar"))},[Rit,t.createTextVNode(" Renombrar template ")])):t.createCommentVNode("",!0),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:1,class:"option",onClick:v[2]||(v[2]=$=>a.$emit("editar"))},[Uit,t.createTextVNode(" Editar template ")])):t.createCommentVNode("",!0),t.createElementVNode("li",{class:"option",onClick:v[3]||(v[3]=$=>a.$emit("duplicar"))},[Fit,t.createTextVNode(" Duplicar template ")]),e.canEdit?(t.openBlock(),t.createElementBlock("li",{key:2,class:"option",onClick:v[4]||(v[4]=$=>a.$emit("eliminar"))},[Iit,t.createTextVNode(" Eliminar template ")])):t.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-137412ab"]]),RN=e=>(t.pushScopeId("data-v-8520e810"),e=e(),t.popScopeId(),e),jit={class:"template-card postpartido",style:{position:"relative"}},Wit=[RN(()=>t.createElementVNode("span",null,null,-1)),RN(()=>t.createElementVNode("span",null,null,-1)),RN(()=>t.createElementVNode("span",null,null,-1))],Dit={key:0,class:"template-img-placeholder",style:{position:"relative"}},Kit={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},Bit={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},Xit={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},Git={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},Zit={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},Jit={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},Hit={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},Yit={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},Qit={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},$it={class:"inner-card-postpartido"},eot={class:"postpartido-footer"},tot={class:"postpartido-version"},rot={class:"postpartido-status"},aot=RN(()=>t.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),not={class:"tipo-value"},iot=ov({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1),h=t.computed(()=>a.userId===a.template.user_id);function u(){$.value=!1,v("generar-reporte")}function i(){$.value=!1;const T=a.template.name||"";v("renombrar",T)}function p(){$.value=!1,v("edit-template",a.template)}function c(){$.value=!1;const T=a.template.name||"";v("duplicar",T)}function n(){$.value=!1,v("eliminar",a.template)}function k(T){}return(T,x)=>(t.openBlock(),t.createElementBlock("div",jit,[t.createElementVNode("div",{class:"three-dots",onClick:x[0]||(x[0]=t.withModifiers(d=>$.value=!$.value,["stop"]))},Wit),e.template.pages&&e.template.pages[0]?(t.openBlock(),t.createElementBlock("div",Dit,[e.template.template_type===1&&e.template.pages[0].type==1?(t.openBlock(),t.createElementBlock("img",Kit)):e.template.template_type===2&&e.template.pages[0].type==1?(t.openBlock(),t.createElementBlock("img",Bit)):e.template.template_type===1&&e.template.pages[0].type==2?(t.openBlock(),t.createElementBlock("img",Xit)):e.template.template_type===2&&e.template.pages[0].type==2?(t.openBlock(),t.createElementBlock("img",Git)):e.template.template_type===1&&e.template.pages[0].type==3?(t.openBlock(),t.createElementBlock("img",Zit)):e.template.template_type===2&&e.template.pages[0].type==3?(t.openBlock(),t.createElementBlock("img",Jit)):e.template.template_type===1&&e.template.pages[0].type==4?(t.openBlock(),t.createElementBlock("img",Hit)):e.template.template_type===2&&e.template.pages[0].type==4?(t.openBlock(),t.createElementBlock("img",Yit)):(t.openBlock(),t.createElementBlock("img",Qit))])):t.createCommentVNode("",!0),t.createElementVNode("div",$it,[t.createElementVNode("div",eot,[t.createElementVNode("div",tot,t.toDisplayString(e.template.name),1),t.createElementVNode("div",rot,[aot,t.createElementVNode("span",not," "+t.toDisplayString(e.template.template_type==1?"Prepartido":"Postpartido"),1)]),t.createElementVNode("button",{class:"postpartido-btn",onClick:x[1]||(x[1]=d=>v("generar-reporte"))},"Generar reporte")])]),$.value?(t.openBlock(),t.createBlock(qit,{key:1,"can-edit":h.value,onClick:x[2]||(x[2]=t.withModifiers(d=>$.value=!1,["self"])),onMouseleave:x[3]||(x[3]=d=>$.value=!1),onGenerarReporte:u,onRenombrar:i,onEditar:p,onDuplicar:c,onEliminar:n,onToggleAutogen:k},null,8,["can-edit"])):t.createCommentVNode("",!0),$.value?(t.openBlock(),t.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:x[4]||(x[4]=d=>$.value=!1)})):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-8520e810"]]),a7=e=>(t.pushScopeId("data-v-a34cf1b5"),e=e(),t.popScopeId(),e),oot={class:"modal-overlay"},sot={class:"modal-content"},lot=[a7(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],cot=a7(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),uot=a7(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),dot={class:"modal-body"},pot=a7(()=>t.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),hot={class:"radio-group"},fot=a7(()=>t.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),mot=["disabled"],yot={key:0,class:"error-message"},got=a7(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),vot={class:"modal-footer"},bot=["disabled"],xot=["disabled"],_ot=["disabled"],wot={key:0,class:"loading-spinner"},Tot={key:1},kJ=ov({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(1),h=t.ref("pre"),u=t.ref(""),i=t.ref(!1),p=t.ref(""),c=async()=>{var n;if(!(u.value.trim().length<3)){i.value=!0,p.value="";try{const k={name:u.value.trim(),team_id:a.team,template_type:h.value==="pre"?1:2},x=await V0.create({headers:{Authorization:`${a.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",k);v("template-created",x.data),v("open-modal-new-template",(n=x.data)==null?void 0:n.data),v("close")}catch(k){console.error("Error al guardar template:",k),k.response&&k.response.status===409&&(p.value="Ya existe un template con el mismo nombre")}finally{i.value=!1}}};return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(n,k)=>(t.openBlock(),t.createElementBlock("div",oot,[t.createElementVNode("div",sot,[t.createElementVNode("button",{class:"close-btn",onClick:k[0]||(k[0]=T=>n.$emit("close"))},lot),cot,uot,t.createElementVNode("div",dot,[$.value===1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[pot,t.createElementVNode("div",hot,[t.createElementVNode("label",{class:t.normalizeClass(["radio-label",{selected:h.value==="pre"}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":k[1]||(k[1]=T=>h.value=T)},null,512),[[t.vModelRadio,h.value]]),t.createTextVNode(" Prepartido ")],2),t.createElementVNode("label",{class:t.normalizeClass(["radio-label",{selected:h.value==="post"}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":k[2]||(k[2]=T=>h.value=T)},null,512),[[t.vModelRadio,h.value]]),t.createTextVNode(" Postpartido ")],2)])],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[fot,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":k[3]||(k[3]=T=>u.value=T),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:i.value},null,8,mot),[[t.vModelText,u.value]]),p.value?(t.openBlock(),t.createElementBlock("div",yot,t.toDisplayString(p.value),1)):t.createCommentVNode("",!0)],64))]),got,t.createElementVNode("div",vot,[t.createElementVNode("button",{class:"cancel-btn",onClick:k[4]||(k[4]=T=>n.$emit("close")),disabled:i.value},"Cancelar",8,bot),$.value===1?(t.openBlock(),t.createElementBlock("button",{key:0,class:"next-btn",disabled:!h.value,onClick:k[5]||(k[5]=T=>$.value=2)}," Siguiente ",8,xot)):(t.openBlock(),t.createElementBlock("button",{key:1,class:"next-btn",disabled:u.value.trim().length<3||i.value,onClick:c},[i.value?(t.openBlock(),t.createElementBlock("div",wot)):(t.openBlock(),t.createElementBlock("span",Tot,"Guardar"))],8,_ot))])])]))}},[["__scopeId","data-v-a34cf1b5"]]),ux=e=>(t.pushScopeId("data-v-f271c483"),e=e(),t.popScopeId(),e),Sot={class:"modal-overlay"},kot={class:"modal-content"},Lot=[ux(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Eot=ux(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),t.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),Cot=ux(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Not={class:"modal-body"},Oot={key:0,class:"error-message-container"},Mot=ux(()=>t.createElementVNode("p",{class:"error-text"},[t.createTextVNode(" Este reporte ya fue generado previamente"),t.createElementVNode("br"),t.createTextVNode(" con este template para el partido seleccionado. ")],-1)),Vot={key:1,style:{position:"relative"}},zot={key:0,class:"loading-autoseteo-overlay"},Pot=[ux(()=>t.createElementVNode("div",{class:"loading-autoseteo-content"},[t.createElementVNode("div",{class:"loading-spinner"})],-1))],Aot={class:"modal-group"},Rot=ux(()=>t.createElementVNode("label",null,"1. Elige el torneo",-1)),Uot={key:0,class:"placeholder"},Fot=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),Iot={key:0,class:"placeholder"},qot={key:1},jot=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Wot={key:0,class:"custom-select-dropdown"},Dot=["onMousedown"],Kot={class:"modal-row"},Bot={class:"modal-group"},Xot=ux(()=>t.createElementVNode("label",null,"2. Elige la temporada",-1)),Got={key:0,class:"placeholder"},Zot=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),Jot={key:0,class:"placeholder"},Hot={key:1},Yot=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Qot={key:0,class:"custom-select-dropdown"},$ot=["onMousedown"],est={class:"modal-group"},tst=ux(()=>t.createElementVNode("label",null,"3. Elige la jornada",-1)),rst={key:0,class:"placeholder"},ast=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),nst={key:0,class:"placeholder"},ist={key:1},ost=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],sst={key:0,class:"custom-select-dropdown"},lst=["onMousedown"],cst={class:"modal-group"},ust=ux(()=>t.createElementVNode("label",null,"4. Elige el partido",-1)),dst={key:0,class:"placeholder"},pst=ux(()=>t.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1)),hst={key:0,class:"placeholder"},fst=["src"],mst=["src"],yst=[ux(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],gst={key:0,class:"custom-select-dropdown"},vst=["onMousedown"],bst=["src"],xst=["src"],_st={key:0,class:"header-separator"},wst={key:1,class:"modal-footer"},Tst=["disabled"],Sst={key:0,class:"loading-spinner select-spinner"},kst=ov({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},team:{type:Number,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1},template:{type:Object,required:!1},showError409OnMount:{type:Boolean,default:!1}},emits:["close","generar","switch-to-reports","open-configurar-contenido"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([]),h=t.ref([]),u=t.ref([]),i=t.ref([]),p=t.ref(""),c=t.ref(""),n=t.ref(""),k=t.ref(null),T=V0.create({headers:{Authorization:a.token}}),x=t.ref(!1),d=t.ref(!1),o=t.ref(!1),l=t.ref(!1),s=t.ref(!1),f=t.ref(!1),g=t.ref(!1),S=t.ref(!1),L=t.ref([]),M=t.ref([]),A=t.ref(!1),z=t.ref(!1),I=t.ref(!1);function j(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,p.value=ut,A.value=!1,N()}function F(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,c.value=ut,z.value=!1,Y()}function W(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,n.value=ut,I.value=!1,me()}const U=t.ref(null);async function O(){try{d.value=!0;const ut=await V0.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");if(ut.data&&Array.isArray(ut.data)){if(L.value=ut.data,$.value=ut.data.map(He=>He.tournament).sort((He,st)=>He.order&&st.order?He.order-st.order:He.order&&!st.order?-1:!He.order&&st.order?1:0),p.value="",h.value=[],c.value="",u.value=[],n.value="",i.value=[],k.value=null,U.value)setTimeout(()=>{Qe(U.value)},100);else if($.value.length>0){const He=$.value[0];p.value=He,X(He)}}}catch(ut){console.error("Error al cargar torneos:",ut),$.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],h.value=[],u.value=[],p.value="",c.value="",n.value="",k.value=null}finally{d.value=!1}}function X(ut){const He=L.value.find(st=>st.tournament&&st.tournament.name===ut.name);He&&Array.isArray(He.seasons)?(h.value=He.seasons,c.value="",u.value=[],n.value="",i.value=[],k.value=null):(h.value=[],c.value="",u.value=[],n.value="",i.value=[],k.value=null)}function N(){c.value="",n.value="",k.value=null,p.value?X(p.value):(h.value=[],u.value=[],i.value=[])}function Y(){if(l.value=!0,n.value="",k.value=null,u.value=[],i.value=[],c.value&&c.value.id){const ut=[c.value.id];if(c.value.related_seasons&&Array.isArray(c.value.related_seasons)){const He=c.value.related_seasons.map(st=>st.id).filter(Boolean);ut.push(...He)}se(ut)}else l.value=!1}async function se(ut){o.value=!0;try{const He=Array.isArray(ut)?ut.join("&seasons="):ut,st=await T.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${He}`);if(st.data.data&&Array.isArray(st.data.data)){const ct=st.data.data.reduce((qt,Zt)=>Zt.games&&Array.isArray(Zt.games)?qt.concat(Zt.games):qt,[]);M.value=ct.map(qt=>({label:qt.label||`${qt.home_team_acronym||"Local"} vs ${qt.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+qt.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+qt.visiting_team+".png"||"",...qt}));let Ct=M.value;a.templateType==="2"||a.templateType===2?Ct=Ct.filter(qt=>qt.game_status===1):(a.templateType==="1"||a.templateType===1)&&(Ct=Ct.filter(qt=>qt.game_status===4));const Vt=Ct.map(qt=>qt.matchday_id).filter(Boolean),Ot=[...new Set(Vt)];u.value=Ot.map(qt=>{const Zt=M.value.find(Jt=>Jt.matchday_id&&Jt.matchday_id===qt);return Zt?{id:qt,name:Zt.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}:null}).filter(Boolean).sort((qt,Zt)=>{const Jt=qt.name.startsWith("Jornada"),Qt=Zt.name.startsWith("Jornada");return Jt&&Qt?qt.id-Zt.id:Jt&&!Qt?-1:!Jt&&Qt?1:0}),n.value="",i.value=[],k.value=null,l.value=!1,U.value&&f.value&&setTimeout(()=>{rt(U.value)},200)}else M.value=[],u.value=[],n.value="",i.value=[],k.value=null}catch(He){console.error("Error al cargar partidos:",He),M.value=[],u.value=[],n.value="",i.value=[],k.value=null,l.value=!1}finally{o.value=!1}}function me(){k.value=null,i.value=[],n.value&&n.value.id&&ge(n.value)}function ge(ut){if(!ut||!ut.id){i.value=[];return}let He=M.value.filter(st=>st.matchday_id===ut.id);a.templateType==="2"||a.templateType===2?He=He.filter(st=>st.game_status===1):(a.templateType==="1"||a.templateType===1)&&(He=He.filter(st=>st.game_status===4)),i.value=He}function be(){let ut=!1;if(a.template&&a.template.pages)for(const He of a.template.pages){if(He.components&&Array.isArray(He.components)){for(const st of He.components)if(st.coreView&&st.coreView.id===18){ut=!0;break}}if(ut)break}return ut}function xe(){if(!a.template||!a.template.pages)return!1;for(const ut of a.template.pages)if(ut.components&&Array.isArray(ut.components)&&ut.components.some(st=>st.name==="Fortalezas"||st.componentName==="GSCStrengths"))return!0;return!1}async function Ae(){try{if(xe()||be()){v("open-configurar-contenido",{liga:p.value,torneo:c.value,jornada:n.value,partido:k.value,template:a.template}),v("close");return}d.value=!0;let ut="";c.value&&c.value.name&&(ut=c.value.name);const He={template_id:a.templateId,user_id:a.template&&a.template.user_id?parseInt(a.template.user_id):parseInt(a.userId),tournament_id:p.value.id||1,tournament_name:p.value.name,season_id:k.value.season_id,season_name:ut,game_id:k.value.id||k.value.game_id},st=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports`,He,{headers:{Authorization:a.token,"Content-Type":"application/json"}});v("generar",{liga:p.value,torneo:c.value,jornada:n.value,partido:k.value,reportData:st.data}),v("switch-to-reports"),v("close")}catch(ut){console.error("Error al generar el reporte:",ut),ut.response&&ut.response.status===409?S.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{d.value=!1}}function qe(){I.value=!I.value}function _e(ut){f.value&&(f.value=!1,s.value=!1),g.value=!1,k.value=ut,x.value=!1}function Ue(){document.body.style.overflow="hidden"}function je(){document.body.style.overflow=""}t.watch(()=>a.showError409OnMount,ut=>{S.value=ut},{immediate:!0}),t.onMounted(()=>{a.showError409OnMount&&(S.value=!0),O(),Ue(),Re(),U.value&&(s.value=!0,f.value=!0)}),t.watch(p,(ut,He)=>{if(ut&&U.value&&f.value&&!He&&!g.value){const st=We(U.value.season_id);st&&(g.value=!0,c.value=st,g.value=!1)}}),t.watch(c,(ut,He)=>{ut&&U.value&&f.value&&!He&&!g.value?setTimeout(()=>{const st=u.value.find(ct=>ct.id===U.value.matchday_id);st&&(g.value=!0,n.value=st,ge(st),g.value=!1)},500):ut&&He&&f.value&&(f.value=!1,s.value=!1)}),t.watch(n,(ut,He)=>{ut&&U.value&&f.value&&!He&&!g.value?setTimeout(()=>{const st=i.value.find(Ct=>Ct.game_id===U.value.game_id||Ct.id===U.value.game_id);if(ge(ut),st){k.value=st,s.value=!1,f.value=!1;return}const ct=i.value.find(Ct=>Ct.home_team===U.value.home_team&&Ct.visiting_team===U.value.visiting_team);if(ct){k.value=ct,s.value=!1,f.value=!1;return}if(M.value.length>0){const Ct=M.value.find(Vt=>Vt.game_id===U.value.game_id||Vt.id===U.value.game_id);if(Ct){k.value=Ct,s.value=!1,f.value=!1;return}}s.value=!1,f.value=!1},1e3):ut&&He&&f.value&&(f.value=!1,s.value=!1)}),t.onUnmounted(()=>{je()});async function Re(){try{const ut=await T.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/teams/${a.team}/last-games`);a.templateType==="1"||a.templateType===1?(U.value=ut.data.data.prematch,ut.data.data.prematch&&(s.value=!0,f.value=!0,ut.data.data.prematch.season_id&&await se([ut.data.data.prematch.season_id]))):(a.templateType==="2"||a.templateType===2)&&(U.value=ut.data.data.postmatch,ut.data.data.postmatch&&(s.value=!0,f.value=!0,ut.data.data.postmatch.season_id&&await se([ut.data.data.postmatch.season_id])))}catch(ut){console.error("Error al cargar últimos juegos:",ut)}}function We(ut){if(!ut||!h.value.length)return null;const He=h.value.find(ct=>ct.id===ut);return He||h.value.find(ct=>ct.related_seasons&&Array.isArray(ct.related_seasons)?ct.related_seasons.some(Ct=>Ct.id===ut):!1)||null}function Qe(ut){if(!(!ut||!ut.game_id)&&ut.tournament_id&&$.value.length>0){const He=$.value.find(st=>st.id===ut.tournament_id);He&&(p.value=He,X(He))}}function rt(ut){if(!(!ut||!ut.game_id)&&ut.tournament_id&&$.value.length>0){const He=$.value.find(st=>st.id===ut.tournament_id);if(He&&(p.value=He,ut.season_id&&h.value.length>0)){const st=We(ut.season_id);if(st&&(c.value=st,ut.matchday_id&&u.value.length>0)){const ct=u.value.find(Ct=>Ct.id===ut.matchday_id);if(ct&&(n.value=ct,ut.game_id&&i.value.length>0)){const Ct=i.value.find(Vt=>Vt.game_id===ut.game_id||Vt.id===ut.game_id);if(Ct)k.value=Ct;else{const Vt=i.value.find(Ot=>Ot.home_team===ut.home_team&&Ot.visiting_team===ut.visiting_team);Vt&&(k.value=Vt)}}}}}}function pt(){S.value=!1,p.value="",c.value="",n.value="",k.value=null,h.value=[],u.value=[],i.value=[],A.value=!1,z.value=!1,I.value=!1,x.value=!1,je(),v("close")}return(ut,He)=>(t.openBlock(),t.createElementBlock("div",Sot,[t.createElementVNode("div",kot,[t.createElementVNode("button",{class:"close-btn",onClick:pt},Lot),Eot,Cot,t.createElementVNode("div",Not,[S.value?(t.openBlock(),t.createElementBlock("div",Oot,[Mot,t.createElementVNode("button",{class:"accept-btn",onClick:pt},"Aceptar")])):(t.openBlock(),t.createElementBlock("div",Vot,[s.value?(t.openBlock(),t.createElementBlock("div",zot,Pot)):t.createCommentVNode("",!0),t.createElementVNode("div",Aot,[Rot,t.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:He[0]||(He[0]=st=>A.value=!A.value),onBlur:He[1]||(He[1]=st=>A.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:d.value||$.value.length===0}])},[d.value?(t.openBlock(),t.createElementBlock("span",Uot,[Fot,t.createTextVNode("Cargando torneos...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[p.value?(t.openBlock(),t.createElementBlock("span",qot,t.toDisplayString(p.value.name),1)):(t.openBlock(),t.createElementBlock("span",Iot,"Selecciona el torneo"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:A.value}])},jot,2)],2),A.value&&$.value.length>0?(t.openBlock(),t.createElementBlock("div",Wot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.name,class:"custom-select-option",onMousedown:t.withModifiers(ct=>j(st),["prevent"])},t.toDisplayString(st.name),41,Dot))),128))])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("div",Kot,[t.createElementVNode("div",Bot,[Xot,t.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:He[2]||(He[2]=st=>z.value=!z.value),onBlur:He[3]||(He[3]=st=>z.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!p.value||h.value.length===0||d.value}])},[d.value?(t.openBlock(),t.createElementBlock("span",Got,[Zot,t.createTextVNode("Cargando temporada...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.value?(t.openBlock(),t.createElementBlock("span",Hot,t.toDisplayString(c.value.name),1)):(t.openBlock(),t.createElementBlock("span",Jot,"Elige la temporada"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:z.value}])},Yot,2)],2),z.value&&h.value.length>0&&p.value?(t.openBlock(),t.createElementBlock("div",Qot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.id,class:"custom-select-option",onMousedown:t.withModifiers(ct=>F(st),["prevent"])},t.toDisplayString(st.name),41,$ot))),128))])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("div",est,[tst,t.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:qe,onBlur:He[4]||(He[4]=st=>I.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!c.value||u.value.length===0||l.value}])},[l.value?(t.openBlock(),t.createElementBlock("span",rst,[ast,t.createTextVNode("Cargando jornadas...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[n.value?(t.openBlock(),t.createElementBlock("span",ist,t.toDisplayString(n.value.name),1)):(t.openBlock(),t.createElementBlock("span",nst,"Elige la jornada"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:I.value}])},ost,2)],2),I.value&&u.value.length>0?(t.openBlock(),t.createElementBlock("div",sst,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.id,class:"custom-select-option",onMousedown:t.withModifiers(ct=>W(st),["prevent"])},t.toDisplayString(st.name),41,lst))),128))])):t.createCommentVNode("",!0)],32)])]),t.createElementVNode("div",cst,[ust,t.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:He[5]||(He[5]=st=>x.value=!x.value),onBlur:He[6]||(He[6]=st=>x.value=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["custom-select-display",{disabled:!n.value||o.value}])},[o.value?(t.openBlock(),t.createElementBlock("span",dst,[pst,t.createTextVNode("Cargando partidos...")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.value.localLogo?(t.openBlock(),t.createElementBlock("img",{key:0,src:k.value.localLogo,class:"logo-equipo",alt:"local"},null,8,fst)):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(k.value.label),1),k.value.visitanteLogo?(t.openBlock(),t.createElementBlock("img",{key:1,src:k.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,mst)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock("span",hst,"Selecciona el partido"))],64)),t.createElementVNode("span",{class:t.normalizeClass(["select-chevron",{open:x.value}])},yst,2)],2),x.value&&!o.value&&n.value?(t.openBlock(),t.createElementBlock("div",gst,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,st=>(t.openBlock(),t.createElementBlock("div",{key:st.label,class:"custom-select-option",onMousedown:t.withModifiers(ct=>_e(st),["prevent"])},[t.createElementVNode("img",{src:st.localLogo,class:"logo-equipo",alt:"local"},null,8,bst),t.createElementVNode("span",null,t.toDisplayString(st.label),1),t.createElementVNode("img",{src:st.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,xst)],40,vst))),128))])):t.createCommentVNode("",!0)],32)])]))]),S.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",_st)),S.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wst,[t.createElementVNode("button",{class:"cancel-btn",onClick:pt},"Cancelar"),t.createElementVNode("button",{class:"next-btn",disabled:!p.value||!c.value||!n.value||!k.value||d.value,onClick:Ae},[d.value?(t.openBlock(),t.createElementBlock("span",Sst)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(d.value?"Generando...":"Generar"),1)],8,Tst)]))])]))}},[["__scopeId","data-v-f271c483"]]),g9=e=>(t.pushScopeId("data-v-3f4f9ca5"),e=e(),t.popScopeId(),e),Lst={class:"modal-overlay"},Est={class:"modal-content"},Cst=[g9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Nst=g9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),Ost=g9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Mst={class:"modal-body"},Vst=g9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),zst=["placeholder","disabled"],Pst={key:0,class:"error-message"},Ast=g9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Rst={class:"modal-footer"},Ust=["disabled"],Fst=["disabled"],Ist={key:0},qst={key:1},jst=ov({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName),h=t.ref(!1),u=t.ref("");t.watch(()=>a.initialName,p=>{$.value=p,u.value=""}),t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});async function i(){var p;if(!($.value.trim().length<3)){h.value=!0,u.value="";try{await V0.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/templates/${a.templateId}/general`,{name:$.value.trim()},{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}}),v("rename",$.value.trim()),v("refresh"),v("close")}catch(c){console.error("Error al renombrar el template:",c),((p=c.response)==null?void 0:p.status)===409?u.value="Ya existe un template con el mismo nombre":u.value="Error al renombrar el template. Inténtalo de nuevo."}finally{h.value=!1}}}return(p,c)=>(t.openBlock(),t.createElementBlock("div",Lst,[t.createElementVNode("div",Est,[t.createElementVNode("button",{class:"close-btn",onClick:c[0]||(c[0]=n=>p.$emit("close"))},Cst),Nst,Ost,t.createElementVNode("div",Mst,[Vst,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":c[1]||(c[1]=n=>$.value=n),placeholder:e.initialName,maxlength:"40",autocomplete:"off",disabled:h.value},null,8,zst),[[t.vModelText,$.value]]),u.value?(t.openBlock(),t.createElementBlock("div",Pst,t.toDisplayString(u.value),1)):t.createCommentVNode("",!0)]),Ast,t.createElementVNode("div",Rst,[t.createElementVNode("button",{class:"cancel-btn",onClick:c[2]||(c[2]=n=>p.$emit("close")),disabled:h.value},"Cancelar",8,Ust),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:i},[h.value?(t.openBlock(),t.createElementBlock("span",Ist,"Guardando...")):(t.openBlock(),t.createElementBlock("span",qst,"Guardar"))],8,Fst)])])]))}},[["__scopeId","data-v-3f4f9ca5"]]),v9=e=>(t.pushScopeId("data-v-98cd9dcd"),e=e(),t.popScopeId(),e),Wst={class:"modal-overlay"},Dst={class:"modal-content"},Kst=[v9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Bst=v9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),Xst=v9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Gst={class:"modal-body"},Zst=v9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),Jst=["placeholder"],Hst=v9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Yst={class:"modal-footer"},Qst=["disabled"],$st=ov({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName+" copy"),h=t.ref(!1);t.watch(()=>a.initialName,i=>{$.value=i+" copy"}),t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});async function u(){if($.value.trim().length>=3&&!h.value){h.value=!0;try{const i=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${a.templateId}/duplicate`,{name:$.value.trim()},{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});v("template-duplicated",{originalTemplateId:a.templateId,newTemplateName:$.value.trim(),responseData:i.data}),v("close")}catch(i){console.error("Error al duplicar template:",i),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{h.value=!1}}}return(i,p)=>(t.openBlock(),t.createElementBlock("div",Wst,[t.createElementVNode("div",Dst,[t.createElementVNode("button",{class:"close-btn",onClick:p[0]||(p[0]=c=>i.$emit("close"))},Kst),Bst,Xst,t.createElementVNode("div",Gst,[Zst,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":p[1]||(p[1]=c=>$.value=c),placeholder:e.initialName,maxlength:"40",autocomplete:"off"},null,8,Jst),[[t.vModelText,$.value]])]),Hst,t.createElementVNode("div",Yst,[t.createElementVNode("button",{class:"cancel-btn",onClick:p[2]||(p[2]=c=>i.$emit("close"))},"Cancelar"),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:u},t.toDisplayString(h.value?"Duplicando...":"Aceptar"),9,Qst)])])]))}},[["__scopeId","data-v-98cd9dcd"]]),elt=e=>(t.pushScopeId("data-v-65422842"),e=e(),t.popScopeId(),e),tlt={class:"modal-overlay"},rlt={class:"modal-content"},alt=[elt(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],nlt=t.createStaticVNode('<div class="modal-header" data-v-65422842><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-65422842><span class="modal-title" data-v-65422842>Eliminar template</span></div><div class="header-separator" data-v-65422842></div><div class="modal-body confirm-text" data-v-65422842> ¿Estás seguro que deseas eliminar<br data-v-65422842> este template? Si lo haces no habrá manera<br data-v-65422842> de recuperarlo. </div><div class="header-separator" data-v-65422842></div>',4),ilt={class:"modal-footer"},olt=["disabled"],slt=ov({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1);t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""});const h=async()=>{try{$.value=!0;const i=await V0.create({headers:{Authorization:`${a.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/templates/${a.templateId}`);(i.status===200||i.status===204)&&(v("templateDeleted",a.templateId),v("close"))}catch(u){console.error("Error al eliminar template:",u),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{$.value=!1}};return(u,i)=>(t.openBlock(),t.createElementBlock("div",tlt,[t.createElementVNode("div",rlt,[t.createElementVNode("button",{class:"close-btn",onClick:i[0]||(i[0]=p=>u.$emit("close"))},alt),nlt,t.createElementVNode("div",ilt,[t.createElementVNode("button",{class:"cancel-btn",onClick:i[1]||(i[1]=p=>u.$emit("close"))},"Cancelar"),t.createElementVNode("button",{class:"delete-btn",onClick:h,disabled:$.value},t.toDisplayString($.value?"Eliminando...":"Eliminar"),9,olt)])])]))}},[["__scopeId","data-v-65422842"]]),UN=e=>(t.pushScopeId("data-v-6a25622a"),e=e(),t.popScopeId(),e),llt={class:"fortalezas-view"},clt={class:"fortalezas-header"},ult={class:"team-logo-container"},dlt=["src","alt"],plt={class:"header-content"},hlt={class:"fortalezas-title"},flt={class:"fortalezas-description"},mlt={class:"fortalezas-container"},ylt={class:"categorias-tabs segmented"},glt=["onClick"],vlt={class:"fortalezas-list"},blt={key:0,class:"loading-state"},xlt=[UN(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),UN(()=>t.createElementVNode("p",{class:"loading-text"},"Cargando fortalezas...",-1))],_lt={key:1,class:"error-state"},wlt={class:"error-text"},Tlt=["onClick"],Slt=["onClick"],klt=["checked","disabled","onClick"],Llt={key:0,class:"selection-number"},Elt={class:"fortaleza-badge"},Clt={class:"fortaleza-content"},Nlt={class:"fortaleza-name"},Olt={class:"fortaleza-ranking"},Mlt=UN(()=>t.createElementVNode("div",{class:"separator"},null,-1)),Vlt={class:"category-indicator"},zlt={class:"fortalezas-footer"},Plt={key:0,class:"counter-section"},Alt={class:"counter-text"},Rlt={key:1,class:"carousel-section"},Ult={class:"footer-badge"},Flt={class:"footer-content"},Ilt={class:"footer-name"},qlt={class:"footer-ranking"},jlt=UN(()=>t.createElementVNode("div",{class:"footer-separator"},null,-1)),Wlt={class:"footer-category-indicator"},Dlt=["onClick"],Klt={key:2,class:"empty-message-full"},Blt={class:"empty-text"},LJ=ov({__name:"FortalezasView",props:{teamInitials:{type:String,default:"CA"},title:{type:String,default:"Fortalezas a favor de mi equipo"},modelValue:{type:Array,default:()=>[]},teamLogoUrl:{type:String,required:!1,default:null},seasonId:{type:[String,Number],required:!0},teamId:{type:[String,Number],required:!0},token:{type:String,required:!0},totalFortalezas:{type:Number,default:15},rivalTeamId:{type:[String,Number],required:!1,default:null},gameId:{type:[String,Number],required:!1,default:null},templateType:{type:[String,Number],required:!1,default:1}},emits:["update:modelValue"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=t.computed(()=>v.teamLogoUrl?v.teamLogoUrl:v.teamId?`https://golstatsimages.blob.core.windows.net/teams-80/${v.teamId}.png`:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"),u=t.ref([...v.modelValue]),i=t.reactive({}),p=t.ref(!1),c=t.ref(null);t.watch(()=>v.modelValue,xe=>{if(Array.isArray(xe)){const Ae=JSON.stringify([...u.value].sort()),qe=JSON.stringify([...xe].sort());Ae!==qe&&(u.value=[...xe],Object.keys(i).forEach(_e=>delete i[_e]),u.value.forEach((_e,Ue)=>{i[_e]=Ue+1}))}},{immediate:!0,deep:!0});const n=t.ref(0),k=t.ref(null),T=t.ref(null),x=t.ref(0),d=t.ref(0);function o(){const xe=k.value,Ae=T.value;x.value=xe?xe.clientWidth:0,d.value=Ae?Ae.scrollWidth:0}const l=t.computed(()=>Math.max(0,d.value-x.value)),s=t.computed(()=>n.value>0),f=t.computed(()=>n.value<l.value);function g(){const xe=Math.min(l.value,n.value+200);n.value=xe}function S(){const xe=Math.max(0,n.value-200);n.value=xe}let L=null;t.onMounted(()=>{o();const xe=()=>o();window.addEventListener("resize",xe),L=xe,j()}),t.onBeforeUnmount(()=>{L&&(window.removeEventListener("resize",L),L=null)}),t.watch(()=>u.value.slice(),async()=>{await t.nextTick(),o()},{deep:!0}),t.watch(()=>[v.seasonId,v.teamId,v.gameId,v.token,v.templateType],()=>{j()},{immediate:!1});const M=t.computed(()=>u.value.map(xe=>z.value.find(Ae=>Ae.id===xe)).filter(Boolean).sort((xe,Ae)=>i[xe.id]-i[Ae.id])),A=t.computed(()=>({transform:`translateX(-${n.value}px)`})),z=t.ref([]),I=t.ref([]);async function j(){if(!v.seasonId||!v.teamId){console.warn("seasonId y teamId son requeridos para obtener las fortalezas");return}p.value=!0,c.value=null;try{let xe;v.templateType===2?xe=`https://5c9xc3gwh2.execute-api.us-east-2.amazonaws.com/prod/strengths/seasons/${v.seasonId}/postgames/${v.gameId}/teams/${v.teamId}`:xe=`https://5c9xc3gwh2.execute-api.us-east-2.amazonaws.com/prod/strengths/seasons/${v.seasonId}/pregames/${v.gameId}/teams/${v.teamId}`;const Ae=await fetch(xe,{method:"GET",headers:{Authorization:`${v.token}`,"Content-Type":"application/json"}});if(!Ae.ok)throw new Error(`Error al obtener fortalezas: ${Ae.status} ${Ae.statusText}`);const qe=await Ae.json();I.value=qe.strengths||[],z.value=qe.strengths.map(_e=>({id:_e.categories,name:_e.name,value:_e.total,category:_e.category_type==1?"Ofensiva":_e.category_type==2?"Defensiva":"Posesion",ranking:`#${_e.league_ranking} en la liga`,color:F(_e.category_type||"General")})),O()}catch(xe){console.error("Error al cargar fortalezas:",xe),c.value=xe.message,z.value=[]}finally{p.value=!1}}function F(xe){return{1:"#4CAF50",3:"#2196F3",2:"#00BCD4",General:"#9C27B0"}[xe]||"#9C27B0"}const W=t.ref(["Todos"]),U=t.ref("Todos");function O(){const xe=[...new Set(z.value.map(Ae=>Ae.category))];W.value=["Todos",...xe]}const X=t.computed(()=>U.value==="Todos"?z.value:z.value.filter(xe=>xe.category===U.value));function N(xe){const Ae=u.value.indexOf(xe);if(Ae>-1)u.value.splice(Ae,1),delete i[xe];else{if(u.value.length>=v.totalFortalezas)return;const qe=z.value.length,_e=new Set(Object.values(i));let Ue=1;for(;_e.has(Ue)&&Ue<=qe;)Ue++;i[xe]=Ue,u.value.push(xe)}$("update:modelValue",u.value)}function Y(xe){U.value=xe}function se(xe){const Ae=u.value.indexOf(xe);Ae>-1&&(u.value.splice(Ae,1),delete i[xe],$("update:modelValue",u.value))}function me(){const xe=z.value.length,Ae=new Set(u.value),qe=new Set(Object.values(i)),_e=[];for(let Re=1;Re<=xe;Re++)qe.has(Re)||_e.push(Re);_e.sort((Re,We)=>Re-We);const Ue=X.value.map(Re=>Re.id).filter(Re=>!Ae.has(Re)),je=v.totalFortalezas;for(const Re of Ue){if(u.value.length>=je)break;const We=_e.shift();if(We===void 0)break;i[Re]=We,u.value.push(Re)}$("update:modelValue",u.value)}function ge(){console.warn("Error loading team logo, falling back to initials")}function be(){console.warn("Error loading league logo")}return r({fortalezasData:z,fortalezasRawData:I,selectedFortalezas:u,selectionOrderMap:i,autocompletar:me}),(xe,Ae)=>(t.openBlock(),t.createElementBlock("div",llt,[t.createElementVNode("div",clt,[t.createElementVNode("div",ult,[t.createElementVNode("img",{src:h.value,alt:`Logo ${e.teamInitials}`,class:"team-logo",onError:ge},null,40,dlt)]),t.createElementVNode("div",plt,[t.createElementVNode("h3",hlt,t.toDisplayString(e.title),1),t.createElementVNode("p",flt," Este template contiene "+t.toDisplayString(e.totalFortalezas)+" visualizaciones de Fortalezas. Selecciona las deseadas. ",1)])]),t.createElementVNode("div",mlt,[t.createElementVNode("div",ylt,[t.createElementVNode("div",{class:"segmented-highlight",style:t.normalizeStyle({width:`calc(100% / ${W.value.length})`,left:`calc(${W.value.indexOf(U.value)} * (100% / ${W.value.length}))`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value,qe=>(t.openBlock(),t.createElementBlock("button",{key:qe,class:t.normalizeClass(["categoria-tab",{active:U.value===qe}]),onClick:_e=>Y(qe)},t.toDisplayString(qe),11,glt))),128))]),t.createElementVNode("div",vlt,[p.value?(t.openBlock(),t.createElementBlock("div",blt,xlt)):c.value?(t.openBlock(),t.createElementBlock("div",_lt,[t.createElementVNode("p",wlt,"Error al cargar las fortalezas: "+t.toDisplayString(c.value),1),t.createElementVNode("button",{onClick:j,class:"retry-button"},"Reintentar")])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(X.value,qe=>(t.openBlock(),t.createElementBlock("div",{key:qe.id,class:t.normalizeClass(["fortaleza-item",{selected:u.value.includes(qe.id),disabled:!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas}]),onClick:_e=>N(qe.id)},[t.createElementVNode("div",{class:"fortaleza-checkbox",onClick:t.withModifiers(_e=>!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas?null:N(qe.id),["stop"])},[t.createElementVNode("input",{type:"checkbox",checked:u.value.includes(qe.id),disabled:!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas,class:"checkbox-input",onClick:t.withModifiers(_e=>!u.value.includes(qe.id)&&u.value.length>=e.totalFortalezas?null:N(qe.id),["stop"])},null,8,klt),u.value.includes(qe.id)?(t.openBlock(),t.createElementBlock("span",Llt,t.toDisplayString(i[qe.id]),1)):t.createCommentVNode("",!0)],8,Slt),t.createElementVNode("div",Elt,t.toDisplayString(qe.value),1),t.createElementVNode("div",Clt,[t.createElementVNode("div",Nlt,t.toDisplayString(qe.name),1),t.createElementVNode("div",Olt,[t.createElementVNode("span",null,t.toDisplayString(qe.ranking),1),t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/golstats2-tournaments/1.png",alt:"Liga",class:"league-logo",onError:be},null,32),Mlt,t.createElementVNode("div",Vlt,[t.createElementVNode("div",{class:"category-dot",style:t.normalizeStyle({backgroundColor:qe.color})},null,4),t.createElementVNode("span",null,t.toDisplayString(qe.category),1)])])])],10,Tlt))),128))])]),t.createElementVNode("div",zlt,[u.value.length>0?(t.openBlock(),t.createElementBlock("div",Plt,[t.createElementVNode("div",Alt,t.toDisplayString(u.value.length)+"/"+t.toDisplayString(e.totalFortalezas),1)])):t.createCommentVNode("",!0),u.value.length>0?(t.openBlock(),t.createElementBlock("div",Rlt,[t.createElementVNode("div",{class:"carousel-container",ref_key:"carouselContainerRef",ref:k},[s.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:S},"‹")):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"carousel-track",ref_key:"carouselTrackRef",ref:T,style:t.normalizeStyle(A.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,qe=>(t.openBlock(),t.createElementBlock("div",{key:qe.id,class:"footer-pill"},[t.createElementVNode("div",Ult,t.toDisplayString(qe.value),1),t.createElementVNode("div",Flt,[t.createElementVNode("div",Ilt,t.toDisplayString(qe.name),1),t.createElementVNode("div",qlt,[t.createElementVNode("span",null,t.toDisplayString(qe.ranking),1),t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/golstats2-tournaments/1.png",alt:"Liga",class:"footer-league-logo",onError:be},null,32),jlt,t.createElementVNode("div",Wlt,[t.createElementVNode("div",{class:"footer-category-dot",style:t.normalizeStyle({backgroundColor:qe.color})},null,4),t.createElementVNode("span",null,t.toDisplayString(qe.category),1)])])]),t.createElementVNode("button",{class:"pill-remove-btn",onClick:_e=>se(qe.id)},"×",8,Dlt)]))),128))],4),f.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:g},"›")):t.createCommentVNode("",!0)],512)])):(t.openBlock(),t.createElementBlock("div",Klt,[t.createElementVNode("span",Blt,t.toDisplayString(u.value.length)+" de "+t.toDisplayString(e.totalFortalezas)+" Fortalezas agregadas",1)]))])]))}},[["__scopeId","data-v-6a25622a"]]),Xlt=(e,r)=>{const a=e.__vccOpts||e;for(const[v,$]of r)a[v]=$;return a},Glt={key:1},Zlt={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jlt=["fill"],Hlt={key:0,class:"checkbox__teams"},Ylt={class:"checkbox__teams__logo"},Qlt=["src"],$lt={class:"checkbox__teams__logo"},ect=["src"],tct={__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:r}){const a=e;t.useCssVars(c=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const v=t.ref(!1),$=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 v.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),h=t.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),u=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!==v.value&&(v.value=c)},{immediate:!0});function i(){a.avoidInteraction||!v.value&&a.avoidToCheck||(v.value=!v.value,r("update:modelValue",v.value))}function p(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:i},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle($.value)},[v.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(h.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",Glt,[(t.openBlock(),t.createElementBlock("svg",Zlt,[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,Jlt)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",Hlt,[t.createElementVNode("div",Ylt,[t.createElementVNode("img",{src:p(e.teamsIds[0]),alt:""},null,8,Qlt)]),t.createElementVNode("div",$lt,[t.createElementVNode("img",{src:p(e.teamsIds[1]),alt:""},null,8,ect)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(u.value)},t.toDisplayString(e.label),5)],2))}},rct=Xlt(tct,[["__scopeId","data-v-b6f124d8"]]),EJ=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["M7",{matchDayId:7,matchDayName:"Jornada 7",matchDayAbbreviation:"J7"}],["M8",{matchDayId:8,matchDayName:"Jornada 8",matchDayAbbreviation:"J8"}],["M9",{matchDayId:9,matchDayName:"Jornada 9",matchDayAbbreviation:"J9"}],["M10",{matchDayId:10,matchDayName:"Jornada 10",matchDayAbbreviation:"J10"}],["M11",{matchDayId:11,matchDayName:"Jornada 11",matchDayAbbreviation:"J11"}],["M12",{matchDayId:12,matchDayName:"Jornada 12",matchDayAbbreviation:"J12"}],["M13",{matchDayId:13,matchDayName:"Jornada 13",matchDayAbbreviation:"J13"}],["M14",{matchDayId:14,matchDayName:"Jornada 14",matchDayAbbreviation:"J14"}],["M15",{matchDayId:15,matchDayName:"Jornada 15",matchDayAbbreviation:"J15"}],["M16",{matchDayId:16,matchDayName:"Jornada 16",matchDayAbbreviation:"J16"}],["M17",{matchDayId:17,matchDayName:"Jornada 17",matchDayAbbreviation:"J17"}],["PI1",{matchDayId:181,matchDayName:"Play In 1",matchDayAbbreviation:"PI1"}],["PI2",{matchDayId:182,matchDayName:"Play In 2",matchDayAbbreviation:"PI2"}],["PO",{matchDayId:183,matchDayName:"Repechaje",matchDayAbbreviation:"R"}],["PO1",{matchDayId:18,matchDayName:"Cuartos de final ida",matchDayAbbreviation:"CFI"}],["PO2",{matchDayId:19,matchDayName:"Cuartos de final vuelta",matchDayAbbreviation:"CFV"}],["PO3",{matchDayId:20,matchDayName:"Semifinal ida",matchDayAbbreviation:"SFI"}],["PO4",{matchDayId:21,matchDayName:"Semifinal vuelta",matchDayAbbreviation:"SFV"}],["PO5",{matchDayId:22,matchDayName:"Final ida",matchDayAbbreviation:"FI"}],["PO6",{matchDayId:86,matchDayName:"Final vuelta",matchDayAbbreviation:"FV"}]]),FN={TO_RIGHT:"toRight",TO_LEFT:"toLeft"},act=["gameId","playerId","teamId","x","y","momentOfPlay","section","playId","timeSection"];let wA=null;function nct(){return wA||(wA=act.reduce((e,r,a)=>(e[a]=r,e),{})),wA}const ict=["playId","playerId","teamId","gameId","categoryId","relatedCategoriesIds","x1","y1","x2","y2","x3","y3","fieldSection","momentOfPlay","playingAs","matchLapse","matchResult","matchResultAtMomentOfPlay","relatedPlayId","touchOrder","timeSection"];let TA=null;function oct(){return TA||(TA=ict.reduce((e,r,a)=>(e[a]=r,e),{})),TA}const IN=e=>(t.pushScopeId("data-v-e248d060"),e=e(),t.popScopeId(),e),sct={class:"corners-view"},lct={class:"corners-header"},cct={class:"team-logo-container"},uct=["src","alt"],dct={class:"header-content"},pct={class:"corners-title"},hct={class:"corners-description"},fct={class:"corners-container"},mct={class:"matches-header"},yct={key:0,class:"post-match-game"},gct={class:"post-match-game__match-day"},vct={class:"post-match-game__game-info"},bct={class:"team-info"},xct={class:"team-logo-post"},_ct=["src"],wct={class:"team-name"},Tct={class:"score"},Sct={class:"team-info"},kct={class:"team-name"},Lct={class:"team-logo-post"},Ect=["src"],Cct=["onClick"],Nct={class:"team-logo-match"},Oct=["src"],Mct={class:"match-score"},Vct={class:"team-logo-match"},zct=["src"],Pct={class:"team-acronym"},Act={class:"team-match-day"},Rct={class:"team-acronym"},Uct={class:"categorias-tabs segmented"},Fct=["onClick"],Ict={class:"corners-list"},qct=["onClick"],jct={class:"check-col"},Wct={class:"badge-col"},Dct={class:"count-badge"},Kct={class:"content-col"},Bct={class:"title-row"},Xct={class:"time"},Gct=IN(()=>t.createElementVNode("span",{class:"title"},"Tiro de esquina",-1)),Zct={class:"player"},Jct={class:"meta-row"},Hct=IN(()=>t.createElementVNode("span",null,"/",-1)),Yct={class:"corners-footer"},Qct={key:0,class:"counter-section"},$ct={class:"counter-text"},eut={key:1,class:"carousel-section"},tut={class:"footer-total"},rut={class:"footer-badge"},aut={class:"team-info"},nut={class:"team-logo-corner"},iut=["src"],out={class:"team-score"},sut={class:"team-info"},lut={class:"team-logo-corner"},cut=["src"],uut={class:"team-score"},dut={class:"footer-content"},put={class:"footer-ranking"},hut={class:"corner-time"},fut=IN(()=>t.createElementVNode("div",{class:"footer-separator"},null,-1)),mut={class:"corner-player"},yut={class:"corner-details"},gut=IN(()=>t.createElementVNode("span",null," / ",-1)),vut=["onClick"],but={key:2,class:"empty-message-full"},xut={class:"empty-text"},SA=148,_ut=5,wut=10,Tut=600,Sut=600,kut=5,qN=ov({__name:"TirosEsquinaView",props:{modelValue:{type:Array,default:()=>[]},userTeamId:{type:Number,default:0},rival:{type:Boolean,default:!1},teamInitials:{type:String,default:"AME"},title:{type:String,default:"Tiros de esquina en contra de mi equipo"},teamLogoUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/teams-80/2.png"},teamViews:{type:Array,default:()=>[]},configData:{type:Object,default:()=>({})},isAgainstMode:{type:Boolean,default:!1},isSynchronization:{type:Boolean,default:!1},isRival:{type:Boolean,default:!1},filters:{type:Object,default:()=>({isMoment:!1,final:[1,2,3],moment:[1,2,3],playingAs:[1,2],sections:[1,2,3,4,5,6],games:[],players:[],cornertype:31,howWas:[120,126,327,133],zona:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],whathappened:[583,585,587,589,584,586,588,590,122,128,136,142,123,129,137,143,124,130,138,144,125,131,139,14,146,147,327,133],isWhatHappenedFull:!0,isZoneFull:!0})}},emits:["update:modelValue"],setup(e,{expose:r,emit:a}){const v=e,$=a,h=["Todos","Goles","Rematados","A rival"],u={goals:{categoryIds:[583,585,587,589]},shots:{categoryIds:[584,586,588,590,122,128,136,142]},toRival:{categoryIds:[123,129,137,143,124,130,138,144]}},i=t.ref("Todos"),p=t.ref([...v.modelValue]),c=t.reactive({}),n=t.ref([]);p.value.forEach((er,sr)=>{c[er]=sr+1});const k=t.ref(0),T=t.ref(null),x=t.ref(null),d=t.ref(0),o=t.ref(0);function l(){const er=T.value,sr=x.value;d.value=er?er.clientWidth:0,o.value=sr?sr.scrollWidth:0}const s=t.computed(()=>Math.max(0,o.value-d.value)),f=t.computed(()=>k.value>0),g=t.computed(()=>k.value<s.value),S=t.computed(()=>n.value.filter(er=>er.isSelected)),L=t.computed(()=>S.value.length===v.teamViews.length),M=t.ref(0);t.watch(()=>S.value,er=>{setTimeout(()=>{x.value?l():M.value=0},500),$("update:modelValue",er)},{deep:!0});function A(){x.value&&(x.value.scrollLeft=x.value.scrollLeft+400,k.value=k.value+400)}function z(){x.value&&(x.value.scrollLeft=x.value.scrollLeft-400,k.value=k.value-400)}const I=t.computed(()=>v.configData&&v.configData.template&&v.configData.template.template_type===2?{...v.configData.partido,matchDay:EJ.get(v.configData.partido.matchday_abbreviation)}:null);t.computed(()=>v.configData&&v.configData.template&&v.configData.template.template_type===1?v.configData.partido:null);function j(){const er=pt.value,sr=er?er.clientWidth:0,Cr=Math.max(1,Math.floor(sr/(SA+10)));ut.value=Cr}const F=t.computed(()=>{const er=-rt.value*(SA+10),sr=Ct.value?Ot.value:0;return{transform:`translateX(${er+sr}px)`}});function W(){rt.value=Math.min(He.value,rt.value+1)}function U(){rt.value=Math.max(0,rt.value-1)}function O(er){Ct.value=!0,Vt.value=er.clientX,Ot.value=0}function X(er){Ct.value&&(Ot.value=er.clientX-Vt.value)}function N(){if(!Ct.value)return;const er=SA/3;Ot.value<=-er?W():Ot.value>=er&&U(),Ct.value=!1,Ot.value=0}const Y=t.computed(()=>cr.value&&cr.value.cornersByType?cr.value.cornersByType.get(i.value)||[]:[]);function se(er){(!L.value||er.isSelected)&&(er.isSelected=!er.isSelected)}function me(er){je.value.forEach(sr=>{sr.isSelected=sr.game_id===er.game_id})}function ge(){if(!L.value){let er=S.value.length;for(const sr of n.value)if(!sr.isSelected&&(sr.isSelected=!0,er++,er>=v.teamViews.length))break}}function be(er){er.isSelected=!1}function xe(){console.warn("Error loading team logo, falling back to initials")}let Ae=null;t.onMounted(()=>{l();const er=()=>l();window.addEventListener("resize",er),Ae=er}),t.onBeforeUnmount(()=>{Ae&&(window.removeEventListener("resize",Ae),Ae=null)}),t.watch(()=>p.value.slice(),async()=>{await t.nextTick(),l()},{deep:!0});const qe=nct(),_e=oct(),Ue=t.ref(new Map),je=t.ref([]);let Re=0;const We=t.ref(new Map),Qe=t.ref(null),rt=t.ref(0),pt=t.ref(null),ut=t.ref(1),He=t.computed(()=>Math.max(0,je.value.length-ut.value)),st=t.computed(()=>rt.value>0),ct=t.computed(()=>rt.value<He.value),Ct=t.ref(!1),Vt=t.ref(0),Ot=t.ref(0),qt=[{text:"Rematado fue gol",categoriesIds:[583,585,587,589]},{text:"Rematado no fue gol",categoriesIds:[584,586,588,590]},{text:"Rematado sin destino",categoriesIds:[122,128,136,142]},{text:v.configData.liga.is_female===1?"Ganado por portera rival":"Ganado por portero rival",categoriesIds:[123,129,137,143]},{text:v.configData.liga.is_female===1?"Ganado por jugadora rival":"Ganado por jugador rival",categoriesIds:[124,130,138,144]},{text:"Sin destino",categoriesIds:[125,131,139,145]}],Zt=t.computed(()=>({id:v.configData.partido.game_id,home_team:v.configData.partido.home_team,away_team:v.configData.partido.visiting_team,season:v.configData.partido.season_id,game_status:v.configData.partido.game_status,home_acronym:v.configData.partido.home_team_acronym,away_acronym:v.configData.partido.visiting_team_acronym,logo_home:v.configData.partido.localLogo,logo_away:v.configData.partido.visitanteLogo})),Jt=t.computed(()=>{let er=v.isAgainstMode?"en contra":"a favor";return v.userTeamId===v.configData.partido.home_team||v.userTeamId===v.configData.partido.visiting_team?er+=v.userTeamId===Qt.value?" de mi equipo":" del rival":er+=v.isRival?" del equipo visitante":" del equipo local",er}),Qt=t.computed(()=>v.isRival?v.configData.partido.visiting_team:v.configData.partido.home_team),cr=t.computed(()=>je.value.find(er=>er.isSelected)),hr={headers:{Authorization:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}};function $t(){if(n.value=[],je.value)if(v.isSynchronization)je.value.forEach((er,sr)=>{er.isVisible=!0,sr===0&&(er.isSelected=!0,er.isExpanded=!0,er.corners.forEach(Cr=>{Cr.isVisible=!0}),er.cornersAgainstTeam.forEach(Cr=>{Cr.isVisible=!0}))});else{let er=!1;je.value.forEach(sr=>{let Cr=1;if(sr.matchDay||(sr.matchDay=EJ.get(sr.matchday_abbreviation)),sr.isSelected=!1,sr.cornersByType=new Map,h.forEach(Rr=>{sr.cornersByType.set(Rr,[])}),v.isAgainstMode&&sr.isSoccerFieldDataRivalLoaded||!v.isAgainstMode&&sr.isSoccerFieldDataLoaded){const Rr=v.isAgainstMode?sr.cornersAgainstTeam:sr.corners;if((!v.filters.games.length||v.filters.games.includes(sr.game_id))&&v.filters.playingAs.includes(sr.playingAs)&&(v.filters.isMoment||v.filters.final.includes(sr.finalResult))){for(const sa of Rr){if(sa.isSelected=!1,sa.isVisible=!0,!v.filters.isWhatHappenedFull&&sa.relatedCategoriesIds&&!v.filters.whathappened.some(fa=>sa.relatedCategoriesIds.has(fa))){sa.isVisible=!1,sa.isSelected=!1;continue}sa.isVisible=!0,sa.game=sr;const Ia=sr.cornersByType.get("Todos"),qa=sr.cornersByType.get("Goles"),bn=sr.cornersByType.get("Rematados"),fn=sr.cornersByType.get("A rival");n.value.push(sa),sa.mainIndex=Cr,Cr++,Ia.push(sa);const In=u.goals.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa)),ea=u.shots.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa)),Ur=u.toRival.categoryIds.some(fa=>sa.relatedCategoriesIds.has(fa));In&&qa.push(sa),ea&&bn.push(sa),Ur&&fn.push(sa)}sr.isVisible&&!er?(sr.isSelected=!0,sr.isExpanded=!0,er=!0):sr.isSelected=!1}else sr.isVisible=!1,Rr.forEach(sa=>{sa.isSelected=!1})}})}}function At(){Ue.value.get(Qt.value)||Ue.value.set(Qt.value,je.value)}function or(er,sr,Cr,Rr){er&&er.forEach(sa=>{sa.isHomeTeam=sa.teamId===Zt.value.home_team,sa.attackDirection=Rr.get(sa.playId).mainPlay.attackDirection,sa.player=sr.get(sa.playerId)||Cr.get(sa.playerId)})}function Gt(er){const[sr,Cr]=er.split(", ");let Rr="";const sa=sr.split(" ");for(const Ia of sa)if(Rr+=` ${Ia}`,Ia.length>3)break;return Cr&&sr?`${Cr.trim().charAt(0)}.${Rr}`:""}function Lt(er){let[sr,Cr]=er.split(", ");Cr=Cr.trim();let Rr="";const sa=sr.split(" "),Ia=Cr.includes(" ")?Cr.split(" ")[0]:Cr;for(const qa of sa)if(Rr+=` ${qa}`,qa.length>3)break;return Ia&&sr?`${Ia} ${Rr}`:""}function It(er){if(!er.teams||er.teams.length===0)return;const sr=er.teams[0].team_id,Cr=er.teams[1].team_id;if(Qt.value===sr&&er.home_atk_direction===1||Qt.value===Cr&&er.visiting_atk_direction===1)for(let Rr=1;Rr<5;Rr++)We.value.set(Rr,Rr%2===0?FN.TO_LEFT:FN.TO_RIGHT);else for(let Rr=1;Rr<5;Rr++)We.value.set(Rr,Rr%2===0?FN.TO_RIGHT:FN.TO_LEFT)}const Pt=new Map([[120,"Comba hacia afuera"],[134,"Comba hacia afuera"],[126,"Comba hacia adentro"],[140,"Comba hacia adentro"],[327,"Raz de área"],[146,"Raz de área"],[133,"En corto"],[147,"En corto"]]),gr=qt.reduce((er,sr)=>(sr.categoriesIds.forEach(Cr=>{er.set(Cr,sr.text)}),er),new Map);function ur([er,sr]){const Cr=Math.round(Number(sr));if(Cr===60){const Rr=Number(er)+1;return`${Rr<100?Rr<10?"00":"0":""}${Rr}:00.000`}return`${er}:${Cr<10?"0":""}${Cr}.000`}async function vr(er,sr){try{if(er&&sr&&(!er.isSoccerFieldDataLoaded||!er.isSoccerFieldDataRivalLoaded)){const Cr=new Map,Rr=new Map,sa=new Map;It(sr.data),sr.data.players&&sr.data.players.forEach(fn=>{fn.shortName=Gt(fn.name),fn.firstNameAndFirstLastName=Lt(fn.name),Rr.set(fn.player_id,fn)}),sr.data.rival_players&&sr.data.rival_players.forEach(fn=>{fn.shortName=Gt(fn.name),fn.firstNameAndFirstLastName=Lt(fn.name),sa.set(fn.player_id,fn)}),Qe.value=sr.data.teams.find(fn=>fn.team_id===Qt.value),Qe.value&&(Qe.value.rival=sr.data.teams.find(fn=>fn.team_id!==Qt.value));const Ia=sr.data.data.reduce((fn,In)=>{const ea=In.reduce((Oa,Xr,ca)=>(Oa[_e[ca]]=Xr,Oa.isHomeTeam=Oa.teamId===er.home_team,Oa),{}),Ur=ea.playId===ea.relatedPlayId,fa=fn.get(ea.relatedPlayId),Va=ea.momentOfPlay.split(":"),Za=ur(Va);return ea.player=Rr.get(ea.playerId)||sa.get(ea.playerId),ea.isTeamForAnalysis=ea.teamId===Qt.value,Ur&&(ea.attackDirection=We.value.get(ea.matchLapse),Cr.set(ea.playId,Za)),fa?Ur?fa.mainPlay=ea:fa.relatedPlays.length<kut&&(fa.relatedPlays.push(ea),fa.relatedPlays.length>1&&fa.relatedPlays.sort((Oa,Xr)=>Oa.touchOrder-Xr.touchOrder)):fn.set(ea.playId,{mainPlay:Ur?ea:null,relatedPlays:Ur?[]:[ea]}),fn},new Map),qa=sr.data.field_positions.reduce((fn,In)=>{const ea=In.reduce((fa,Va,Za)=>(fa[qe[Za]]=Va,fa),{});ea.isTeamForAnalysis=ea.teamId===Qt.value;const Ur=fn.get(ea.playId);if(Ur){const fa=Ur.get(ea.momentOfPlay);fa?fa.push(ea):Ur.set(ea.momentOfPlay,[ea])}else fn.set(ea.playId,new Map([[ea.momentOfPlay,[ea]]]));return fn},new Map),bn=Array.from(Cr.entries()).reduce((fn,[In,ea])=>{const Ur=[],fa=[];let Va=null;const Za=qa.get(In);if(Za){const Oa=v.isSynchronization?Tut:_ut,Xr=v.isSynchronization?Sut:wut;Array.from(Za.keys()).sort().forEach(ua=>{(!Va||fa.length<Xr)&&(ua===ea?Va=Za.get(ua):Va?fa.length<Xr&&fa.push(Za.get(ua)):(Ur.length===Oa&&Ur.shift(),Ur.push(Za.get(ua))))});const kr=new Map;Ur.forEach((ua,Xa)=>{or(ua,Rr,sa,Ia),kr.set(`${Xa-Ur.length}`,ua)}),or(Va,Rr,sa,Ia),kr.set("0",Va),fa.forEach((ua,Xa)=>{or(ua,Rr,sa,Ia),kr.set(`${Xa+1}`,ua)}),fn.set(In,kr)}return fn},new Map);er[`${v.isAgainstMode?"cornersAgainstTeam":"corners"}`].forEach(fn=>{const In=fn.related_categories.split(",").reduce((Ur,fa,Va)=>{const Za=Number(fa);return Va===1&&(fn.howWasCorner=Za),Ur.array.push(Za),Ur.sett.add(Za),Ur},{array:[],sett:new Set});for(const Ur of In.array){const fa=Pt.get(Ur),Va=gr.get(Ur);if(Va&&(fn.whatHappenedName=Va),fa&&(fn.howWasCornerName=fa),fn.howWasCornerName&&fn.whatHappenedName)break}fn.relatedCategoriesIds=In.sett,fn.playConnections=Ia.get(fn.play_id),fn.fieldPositions=bn.get(fn.play_id),fn.player=Rr.get(fn.player_id)||sa.get(fn.player_id);let ea=fn.moment_of_play.split(".")[0];ea.startsWith("0")&&(ea=ea.slice(1)),fn.formattedMomentOfPlay=ea,fn.momentOfPlayNumber=Number(ea.replace(":","."))}),!v.isAgainstMode&&!er.isSoccerFieldDataLoaded&&(er.isSoccerFieldDataLoaded=!0),v.isAgainstMode&&!er.isSoccerFieldDataRivalLoaded&&(er.isSoccerFieldDataRivalLoaded=!0)}}catch(Cr){throw new Error(Cr)}}function Tr(er){return v.isSynchronization?V0.get(`https://golstats-microservices.s3.us-west-2.amazonaws.com/tendency/corners-${v.isAgainstMode?"received":"commited"}-${Re}-${Qt.value}-${er.game_id}-large.json`):V0.get(`https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/${Re}/corners/trends/teams/${Qt.value}/${er.game_id}${v.isAgainstMode?"?isR=1":""}`,hr)}async function Pr(){try{const er=[];je.value.forEach(sr=>{(v.isAgainstMode&&!sr.isSoccerFieldDataRivalLoaded||!v.isAgainstMode&&!sr.isSoccerFieldDataLoaded)&&er.push(Tr(sr))}),er.length>0&&((await Promise.all(er)).forEach((Cr,Rr)=>{vr(je.value[Rr],Cr)}),$t()),At()}catch(er){throw new Error(er)}}async function Tt(er){try{const sr=Ue.value.get(Qt.value);if(sr){je.value=sr,$t();return}Re=er;const Cr=await V0.get(`https://1qvtl1japi.execute-api.us-east-2.amazonaws.com/prod/seasons/${Re}/games/teams/${Qt.value}/corners`,hr);if(!Cr.data&&!er)return Tt(v.configData.torneo.id);const Rr=Cr.data,sa={corners:0,cornersAgainst:0};je.value=Rr.games?Rr.games.reduce((Ia,qa)=>{if(I.value&&qa.game_id!==Zt.value.id||qa.game_status!==1)return Ia;const bn={againstTeam:[],team:[]},fn=qa.score[1]-qa.score[0];qa.dateMillis=new Date(qa.date_time_utc),qa.isVisible=!0,qa.playingAs=qa.home_team===Qt.value?1:2,qa.finalResult=fn===0?3:qa.playingAs===1?fn>0?2:1:fn<0?2:1,qa.corners.forEach(ea=>{const Ur=ea.team_id===Qt.value;ea.isAgainst=!Ur,Ur?bn.team.push(ea):bn.againstTeam.push(ea)}),qa.corners=bn.team,qa.cornersAgainstTeam=bn.againstTeam,sa.corners+=qa.corners.length,sa.cornersAgainst+=qa.cornersAgainstTeam.length;const In={...qa,isSelected:Ia.length===0,isExpanded:!1,isTeamForAnalysisHomeTeam:qa.home_team===Qt.value,canPlayVideos:!1};return Ia.push(In),Ia},[]):[],je.value=je.value.sort((Ia,qa)=>qa.dateMillis-Ia.dateMillis),At(),await Pr(),je.value.forEach(Ia=>{Ia.corners.concat(Ia.cornersAgainstTeam).forEach(qa=>{if(qa.playConnections){const[bn,fn]=qa.moment_of_play.split(":"),[In,ea]=fn.split("."),Ur=Number(bn)+45*qa.playConnections.mainPlay.matchLapse;qa.isSelected=!1,qa.orderValue=+`${Ur}${In}${ea}`}}),Ia.corners=Ia.corners.sort((qa,bn)=>qa.orderValue-bn.orderValue),Ia.cornersAgainstTeam=Ia.cornersAgainstTeam.sort((qa,bn)=>qa.orderValue-bn.orderValue)}),$t()}catch(sr){throw new Error(sr)}}t.watch(()=>v.configData,async er=>{er&&er.partido&&er.torneo&&await Tt(er.partido.season_id)},{deep:!0,immediate:!0});let Yt=null;return t.onMounted(()=>{j();const er=()=>j();window.addEventListener("resize",er),Yt=er}),t.onBeforeUnmount(()=>{Yt&&(window.removeEventListener("resize",Yt),Yt=null)}),r({autocompletar:ge}),(er,sr)=>(t.openBlock(),t.createElementBlock("div",sct,[t.createElementVNode("div",lct,[t.createElementVNode("div",cct,[t.createElementVNode("img",{src:e.teamLogoUrl,alt:`Logo ${e.teamInitials}`,class:"team-logo",onError:xe},null,40,uct)]),t.createElementVNode("div",dct,[t.createElementVNode("h3",pct," Tiros de esquina "+t.toDisplayString(Jt.value),1),t.createElementVNode("p",hct," Este template contiene "+t.toDisplayString(e.teamViews.length)+" visualizaciones de tiros de esquina. Selecciona los deseados. ",1)])]),t.createElementVNode("div",fct,[t.createElementVNode("div",mct,[I.value?(t.openBlock(),t.createElementBlock("div",yct,[t.createElementVNode("div",gct,t.toDisplayString(I.value.matchDay.matchDayName),1),t.createElementVNode("div",vct,[t.createElementVNode("div",bct,[t.createElementVNode("div",xct,[t.createElementVNode("img",{src:I.value.localLogo,alt:""},null,8,_ct)]),t.createElementVNode("div",wct,t.toDisplayString(I.value.home_team_acronym),1)]),t.createElementVNode("div",Tct,t.toDisplayString(I.value.score[0])+" - "+t.toDisplayString(I.value.score[1]),1),t.createElementVNode("div",Sct,[t.createElementVNode("div",kct,t.toDisplayString(I.value.visiting_team_acronym),1),t.createElementVNode("div",Lct,[t.createElementVNode("img",{src:I.value.visitanteLogo,alt:""},null,8,Ect)])])])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:"window",ref_key:"matchesWindowRef",ref:pt,onPointerdown:O,onPointerup:N,onPointercancel:N,onPointerleave:N,onPointermove:X},[st.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:U}," ‹ ")):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["track",{animating:!Ct.value}]),style:t.normalizeStyle(F.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(je.value,Cr=>{var Rr;return t.openBlock(),t.createElementBlock("div",{key:Cr.game_id,class:t.normalizeClass(["match-pill",{active:Cr.isSelected}]),onClick:sa=>me(Cr)},[t.createElementVNode("div",Nct,[t.createElementVNode("img",{src:Cr.home_team_logo,alt:""},null,8,Oct)]),t.createElementVNode("div",Mct,t.toDisplayString(Cr.score[0])+" - "+t.toDisplayString(Cr.score[1]),1),t.createElementVNode("div",Vct,[t.createElementVNode("img",{src:Cr.visiting_team_logo,alt:""},null,8,zct)]),t.createElementVNode("div",Pct,t.toDisplayString(Cr.home_team_acronym),1),t.createElementVNode("div",Act,t.toDisplayString(Cr.matchDay?(Rr=Cr.matchDay)==null?void 0:Rr.matchDayAbbreviation:""),1),t.createElementVNode("div",Rct,t.toDisplayString(Cr.visiting_team_acronym),1)],10,Cct)}),128))],6),ct.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:W}," › ")):t.createCommentVNode("",!0)],544))]),t.createElementVNode("div",Uct,[t.createElementVNode("div",{class:"segmented-highlight",style:t.normalizeStyle({width:`calc(100% / ${h.length})`,left:`calc(${h.indexOf(i.value)} * (100% / ${h.length}))`})},null,4),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(h,Cr=>t.createElementVNode("button",{key:Cr,class:t.normalizeClass(["categoria-tab",{active:i.value===Cr}]),onClick:Rr=>i.value=Cr},t.toDisplayString(Cr),11,Fct)),64))]),t.createElementVNode("div",Ict,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value,Cr=>{var Rr,sa;return t.openBlock(),t.createElementBlock("div",{key:Cr.play_id,class:t.normalizeClass(["corner-item",{selected:Cr.isSelected,disabled:Cr.disabled}]),onClick:Ia=>se(Cr)},[t.createElementVNode("div",jct,[t.createVNode(t.unref(rct),{modelValue:Cr.isSelected,"onUpdate:modelValue":Ia=>Cr.isSelected=Ia,"avoid-interaction":!0},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",Wct,[t.createElementVNode("div",Dct,t.toDisplayString(Cr.mainIndex)+"/"+t.toDisplayString((sa=(Rr=cr.value)==null?void 0:Rr.corners)==null?void 0:sa.length),1)]),t.createElementVNode("div",Kct,[t.createElementVNode("div",Bct,[t.createElementVNode("span",Xct,t.toDisplayString(Cr.formattedMomentOfPlay),1),Gct,t.createElementVNode("span",Zct,"| "+t.toDisplayString(Cr.player.firstNameAndFirstLastName),1)]),t.createElementVNode("div",Jct,[t.createElementVNode("span",null,t.toDisplayString(Cr.howWasCornerName),1),Hct,t.createElementVNode("span",null,t.toDisplayString(Cr.whatHappenedName),1)])])],10,qct)}),128))])]),t.createElementVNode("div",Yct,[p.value.length>0?(t.openBlock(),t.createElementBlock("div",Qct,[t.createElementVNode("div",$ct,t.toDisplayString(p.value.length)+"/10",1)])):t.createCommentVNode("",!0),S.value.length>0?(t.openBlock(),t.createElementBlock("div",eut,[t.createElementVNode("div",{class:"carousel-container",ref_key:"carouselContainerRef",ref:T},[t.createElementVNode("div",tut,t.toDisplayString(S.value.length)+" / "+t.toDisplayString(e.teamViews.length),1),t.createElementVNode("div",{ref_key:"carouselTrackRef",ref:x,class:"carousel-track"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value,Cr=>{var Rr;return t.openBlock(),t.createElementBlock("div",{key:Cr.play_id,class:"footer-pill"},[t.createElementVNode("div",rut,[t.createElementVNode("div",aut,[t.createElementVNode("div",nut,[t.createElementVNode("img",{src:Cr.game.home_team_logo,alt:""},null,8,iut)]),t.createElementVNode("div",out,t.toDisplayString(Cr.game.score[0]),1)]),t.createElementVNode("div",sut,[t.createElementVNode("div",lut,[t.createElementVNode("img",{src:Cr.game.visiting_team_logo,alt:""},null,8,cut)]),t.createElementVNode("div",uut,t.toDisplayString(Cr.game.score[1]),1)])]),t.createElementVNode("div",dut,[t.createElementVNode("div",put,[t.createElementVNode("span",hut,t.toDisplayString(Cr.game.matchDay?(Rr=Cr.game.matchDay)==null?void 0:Rr.matchDayAbbreviation:"")+" - "+t.toDisplayString(Cr.formattedMomentOfPlay),1),fut,t.createElementVNode("span",mut,t.toDisplayString(Cr.player.firstNameAndFirstLastName),1)]),t.createElementVNode("div",yut,[t.createElementVNode("span",null,t.toDisplayString(Cr.howWasCornerName),1),gut,t.createElementVNode("span",null,t.toDisplayString(Cr.whatHappenedName),1)])]),t.createElementVNode("button",{class:"pill-remove-btn",onClick:sa=>be(Cr)},"×",8,vut)])}),128))],512),f.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"carousel-arrow left",onClick:z},"‹")):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createElementBlock("button",{key:1,class:"carousel-arrow right",onClick:A},"›")):t.createCommentVNode("",!0)],512)])):(t.openBlock(),t.createElementBlock("div",but,[t.createElementVNode("span",xut,t.toDisplayString(p.value.length)+" de "+t.toDisplayString(e.teamViews.length)+" Tiros de esquina agregados",1)]))])]))}},[["__scopeId","data-v-e248d060"]]),Bb=e=>(t.pushScopeId("data-v-403972c1"),e=e(),t.popScopeId(),e),Lut={class:"modal-overlay"},Eut={class:"modal-content"},Cut={class:"modal-header"},Nut={class:"header-left"},Out=Bb(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"},null,-1)),Mut={class:"modal-title"},Vut={class:"prepartido-text"},zut={class:"step-counter"},Put=Bb(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Aut={key:0,class:"step-content"},Rut={key:0,class:"content-section"},Uut=Bb(()=>t.createElementVNode("h3",{class:"section-title"},"Fortalezas",-1)),Fut=Bb(()=>t.createElementVNode("div",{class:"title-separator"},null,-1)),Iut={class:"section-description"},qut=Bb(()=>t.createElementVNode("div",{class:"content-separator"},null,-1)),jut={class:"radio-group"},Wut={class:"radio-option"},Dut=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),Kut=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Automáticamente",-1)),But={class:"radio-option"},Xut=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),Gut=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Manualmente",-1)),Zut={key:1,class:"content-section"},Jut=Bb(()=>t.createElementVNode("h3",{class:"section-title"},"Tiros de esquina",-1)),Hut=Bb(()=>t.createElementVNode("div",{class:"title-separator"},null,-1)),Yut={class:"section-description"},Qut=Bb(()=>t.createElementVNode("div",{class:"content-separator"},null,-1)),$ut={class:"radio-group"},edt={class:"radio-option"},tdt=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),rdt=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Automáticamente",-1)),adt={class:"radio-option"},ndt=Bb(()=>t.createElementVNode("span",{class:"radio-custom"},null,-1)),idt=Bb(()=>t.createElementVNode("span",{class:"radio-label"},"Manualmente",-1)),odt={key:1,class:"step-content"},sdt={key:2,class:"step-content"},ldt={key:3,class:"step-content"},cdt={key:4,class:"step-content"},udt={key:5,class:"step-content"},ddt={key:6,class:"step-content"},pdt=Bb(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),hdt={class:"modal-footer"},fdt=Bb(()=>t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10 12L6 8L10 4",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),mdt={class:"footer-actions"},ydt=["disabled"],gdt=t.createStaticVNode('<div class="modal-header" data-v-403972c1><div class="header-left" data-v-403972c1><span class="modal-title" data-v-403972c1>Confirmación</span></div></div><div class="header-separator" data-v-403972c1></div><div class="modal-body" data-v-403972c1><div class="step-content" data-v-403972c1><h3 class="confirm-dialog-title" data-v-403972c1>¿Estás seguro de regresar?</h3><p class="confirm-dialog-message" data-v-403972c1>Se perderá la información seleccionada</p></div></div>',3),vdt=ov({__name:"ModalConfigurarContenido",props:{hasRival:{type:Boolean,default:!0},token:{type:String,required:!0},template:{type:Object,required:!1,default:null},team:{type:Number,required:!1,default:null},partido:{type:Object,required:!1,default:null},configData:{type:Object,default:null}},emits:["close","back","next"],setup(e,{emit:r}){const a=r,v=e;function $(){if(!v.template||!v.template.pages)return!1;for(const qe of v.template.pages)if(qe.components&&Array.isArray(qe.components)&&qe.components.some(Ue=>Ue.title==="Fortalezas"||Ue.id===15||Ue.componentName==="GSCStrengths"))return!0;return!1}function h(){if(!v.template||!v.template.pages)return{equipo:0,rival:0,total:0};let qe=0,_e=0;for(const Ue of v.template.pages)if(Ue.components&&Array.isArray(Ue.components)){const je=Ue.components.filter(Re=>Re.componentName==="GSCStrengths"||Re.id===15||Re.name==="Fortalezas");for(const Re of je)Re.dynamicFilters&&Array.isArray(Re.dynamicFilters)&&Re.dynamicFilters[1]&&(Re.dynamicFilters[0]===1?qe+=Re.dynamicFilters[1]:Re.dynamicFilters[0]===2?_e+=Re.dynamicFilters[1]:Re.dynamicFilters[0]===3&&(Re.filterMultiple.isHomeTeam?qe+=Re.dynamicFilters[1]:_e+=Re.dynamicFilters[1]))}return{equipo:qe,rival:_e,total:qe+_e}}const u=t.computed(()=>$()),i=t.computed(()=>h()),p=t.computed(()=>!v.template||!v.template.template_type||v.template.template_type===1?"Prepartido":"Postpartido"),c=t.computed(()=>{if(v.template){const qe={homeTeamViews:[],homeTeamAgainstViews:[],awayTeamViews:[],awayTeamAgainstViews:[]};for(const _e of v.template.pages)if(_e.components&&Array.isArray(_e.components))for(const Ue of _e.components)Ue.coreView&&Ue.coreView.id===18&&(Ue.isHomeTeam?Ue.componentProps&&Ue.componentProps.isAgainstMode?qe.homeTeamAgainstViews.push(Ue):qe.homeTeamViews.push(Ue):Ue.componentProps&&Ue.componentProps.isAgainstMode?qe.awayTeamAgainstViews.push(Ue):qe.awayTeamViews.push(Ue));if(console.log("specificPlaysViews:",qe),qe.homeTeamViews.length>0||qe.homeTeamAgainstViews.length>0||qe.awayTeamViews.length>0||qe.awayTeamAgainstViews.length>0)return qe}return null}),n=t.ref(0),k=t.ref([1,2,3,4,5]),T=t.ref(!1),x=t.ref(!1),d=t.ref("manual"),o=t.ref("manual"),l=t.ref([]),s=t.ref([]),f=t.ref([]),g=t.ref([]),S=t.ref([]),L=t.ref([]),M=t.computed(()=>{let qe=0;return u.value&&d.value==="manual"&&(i.value.equipo>0&&(qe+=1),i.value.rival>0&&(qe+=1)),c.value&&o.value==="manual"&&(c.value.homeTeamViews.length>0&&(qe+=1),c.value.homeTeamAgainstViews.length>0&&(qe+=1),c.value.awayTeamViews.length>0&&(qe+=1),c.value.awayTeamAgainstViews.length>0&&(qe+=1)),Math.max(qe,1)}),A=t.computed(()=>{var Ue,je;if(n.value===0)return u.value||!!c.value;const _e=z()[n.value];if(u.value&&_e==="fortalezasEquipo"){const Re=I.value;if(!Re)return!1;const We=l.value.length,Qe=i.value.equipo,rt=((Ue=Re.fortalezasData)==null?void 0:Ue.length)||0;return We===Qe||rt>0&&rt<Qe&&We===rt}if(u.value&&_e==="fortalezasRival"){const Re=j.value;if(!Re)return!1;const We=s.value.length,Qe=i.value.rival,rt=((je=Re.fortalezasData)==null?void 0:je.length)||0;return We===Qe||rt>0&&rt<Qe&&We===rt}if(c.value){if(_e==="cornersEquipo"){if(!F.value)return!1;const We=f.value.length,Qe=c.value.homeTeamViews.length;return We===Qe}if(_e==="cornersEquipoAgainst"){if(!W.value)return!1;const We=g.value.length,Qe=c.value.homeTeamViews.length;return We===Qe}if(_e==="cornersRival"){if(!U.value)return!1;const We=S.value.length,Qe=c.value.awayTeamViews.length;return We===Qe}if(_e==="cornersRivalAgainst"){if(!O.value)return!1;const We=L.value.length,Qe=c.value.awayTeamViews.length;return We===Qe}}return!1});function z(){const qe=[];u.value&&d.value==="manual"&&(i.value.equipo>0&&qe.push("fortalezasEquipo"),i.value.rival>0&&qe.push("fortalezasRival")),c.value&&o.value==="manual"&&(c.value.homeTeamViews.length>0&&qe.push("cornersEquipo"),c.value.homeTeamAgainstViews.length>0&&qe.push("cornersEquipoAgainst"),c.value.awayTeamViews.length>0&&qe.push("cornersRival"),c.value.awayTeamAgainstViews.length>0&&qe.push("cornersRivalAgainst"));const _e={};return qe.forEach((Ue,je)=>{_e[je+1]=Ue}),_e}const I=t.ref(null),j=t.ref(null),F=t.ref(null),W=t.ref(null),U=t.ref(null),O=t.ref(null);function X(){a("close")}function N(){n.value>1?n.value--:n.value===1?l.value.length>0||s.value.length>0?x.value=!0:n.value--:a("back")}function Y(){l.value=[],s.value=[],f.value=[],S.value=[],x.value=!1,n.value--}function se(){x.value=!1}async function me(){if(console.log("continueToNext, currentStep:",n.value),console.log("canContinue:",A.value),console.log("specificPlaysDetails:",c.value),console.log("tirosEsquinaOption:",o.value),n.value===0){if(!A.value)return;if(u.value&&d.value==="automatico"&&c.value&&o.value==="automatico"||!u.value&&c.value&&o.value==="automatico"||u.value&&d.value==="automatico"&&!c.value){a("next",{fortalezas:d.value,tirosEsquina:o.value,selectedFortalezasEquipo:[],selectedFortalezasRival:[],strengthsPayload:{}});return}T.value=!0,setTimeout(()=>{n.value++,T.value=!1},300)}else if(n.value<M.value)T.value=!0,setTimeout(()=>{n.value++,T.value=!1},300);else{await t.nextTick();let qe={},_e=[];u.value&&d.value==="manual"&&(qe=ge()),c.value&&o.value==="manual"&&(_e=be()),a("next",{fortalezas:d.value,tirosEsquina:o.value,selectedFortalezasEquipo:l.value,selectedFortalezasRival:s.value,strengthsPayload:qe,specificPlaysPayload:_e})}}function ge(){if(!v.template||!v.template.pages)return{};const qe={};let _e=I.value,Ue=j.value;if(_e){let rt=_e.fortalezasRawData;rt&&typeof rt=="object"&&"value"in rt&&(rt=rt.value)}else console.error("❌ equipoRef NO está disponible");if(Ue){let rt=Ue.fortalezasRawData;rt&&typeof rt=="object"&&"value"in rt&&(rt=rt.value)}else console.error("❌ rivalRef NO está disponible");!_e&&l.value.length>0&&console.warn("⚠️ Ref de equipo no disponible, pero hay selecciones"),!Ue&&s.value.length>0&&console.warn("⚠️ Ref de rival no disponible, pero hay selecciones");const je=xe(l.value,_e),Re=xe(s.value,Ue);let We=0,Qe=0;return v.template.pages.forEach((rt,pt)=>{const ut=pt+1;console.log(`
|
|
7999
7999
|
=== Página ${ut} ===`),console.log("Page components:",rt.components),rt.components&&Array.isArray(rt.components)&&(rt.components.forEach((He,st)=>{var Ct,Vt,Ot,qt,Zt,Jt,Qt,cr;if(He.componentName==="GSCStrengths"||He.id===15||He.name==="Fortalezas"||He.title==="Fortalezas"){const hr=st+1;if(console.log(`
|
|
8000
8000
|
--- Componente ${hr} (Fortalezas) en página ${ut} ---`),console.log("Component:",He),console.log("Component properties:",{name:He.name,title:He.title,componentName:He.componentName,id:He.id}),console.log("dynamicFilters:",He.dynamicFilters),He.dynamicFilters&&Array.isArray(He.dynamicFilters)){const $t=He.dynamicFilters[0],At=He.dynamicFilters[1]||0;console.log(`Tipo: ${$t===1?"Equipo":$t===2?"Rival":"Dinámico (3)"}, Cantidad requerida: ${At}`);let or=[],Gt=[],Lt=v.team;$t===1?(Gt=je,console.log(`Equipo: Total ordenadas=${Gt.length}, index=${We}, cantidad requerida=${At}`),Gt.length>We?(or=Gt.slice(We,We+At),console.log(`Index equipo: ${We}, tomando ${or.length} fortalezas de ${Gt.length} disponibles`)):console.warn(`No hay suficientes fortalezas de equipo. Disponibles: ${Gt.length}, Necesarias desde índice: ${We}`),We+=At,Lt=((Ct=v.partido)==null?void 0:Ct.local)||((Vt=v.partido)==null?void 0:Vt.home_team)||v.team):$t===2?(Gt=Re,console.log(`Rival: Total ordenadas=${Gt.length}, index=${Qe}, cantidad requerida=${At}`),Gt.length>Qe?(or=Gt.slice(Qe,Qe+At),console.log(`Index rival: ${Qe}, tomando ${or.length} fortalezas de ${Gt.length} disponibles`)):console.warn(`No hay suficientes fortalezas de rival. Disponibles: ${Gt.length}, Necesarias desde índice: ${Qe}`),Qe+=At,Lt=((Ot=v.partido)==null?void 0:Ot.visita)||((qt=v.partido)==null?void 0:qt.visiting_team)):$t===3&&(He.filterMultiple&&He.filterMultiple.isHomeTeam?(Gt=je,console.log(`Dinámico (Equipo): Total ordenadas=${Gt.length}, index=${We}, cantidad requerida=${At}`),Gt.length>We?(or=Gt.slice(We,We+At),console.log(`Index equipo: ${We}, tomando ${or.length} fortalezas de ${Gt.length} disponibles`)):console.warn(`No hay suficientes fortalezas de equipo. Disponibles: ${Gt.length}, Necesarias desde índice: ${We}`),We+=At,Lt=((Zt=v.partido)==null?void 0:Zt.local)||((Jt=v.partido)==null?void 0:Jt.home_team)||v.team):(Gt=Re,console.log(`Dinámico (Rival): Total ordenadas=${Gt.length}, index=${Qe}, cantidad requerida=${At}`),Gt.length>Qe?(or=Gt.slice(Qe,Qe+At),console.log(`Index rival: ${Qe}, tomando ${or.length} fortalezas de ${Gt.length} disponibles`)):console.warn(`No hay suficientes fortalezas de rival. Disponibles: ${Gt.length}, Necesarias desde índice: ${Qe}`),Qe+=At,Lt=((Qt=v.partido)==null?void 0:Qt.visita)||((cr=v.partido)==null?void 0:cr.visiting_team))),console.log("fortalezasAsignar:",or),or.length>0?(qe[ut]||(qe[ut]={}),qe[ut][hr]||(qe[ut][hr]=[]),or.forEach((It,Pt)=>{qe[ut][hr].push({team_id:Lt,ranking_type:It.ranking_type||1,precondition_id:It.precondition_id||null,order:Pt+1,name:It.name,category_type:It.category_type||1,total:It.total||0,is_relevant:It.is_relevant||0,league_ranking:It.league_ranking||0,categories:Array.isArray(It.categories)?It.categories:[It.categories],team_contribution:It.team_contribution||0})}),console.log(`✓ Agregadas ${or.length} fortalezas al payload para componente ${hr} en página ${ut}`),console.log(`Payload actual para página ${ut}:`,JSON.stringify(qe[ut],null,2))):console.warn(`⚠️ No hay fortalezas para asignar al componente ${hr} en página ${ut}. IndexEquipo: ${We}, IndexRival: ${Qe}`)}else console.warn(`⚠️ Componente ${st+1} en página ${ut} no tiene dynamicFilters válido`),console.warn("Component:",He)}}),console.log(`
|
|
8001
8001
|
✓ Página ${ut} procesada. Componentes de Fortalezas encontrados y procesados.`))}),console.log(`
|
|
8002
|
-
=== PAYLOAD FINAL ===`),console.log(JSON.stringify(qe,null,2)),qe}function be(){let qe=[];const _e=[...f.value,...g.value,...S.value,...L.value];return console.log("allSelectedCorners:",_e),console.log("selectedCornersEquipo:",f.value),console.log("selectedCornersEquipoAgainst:",g.value),console.log("selectedCornersRival:",S.value),console.log("selectedCornersRivalAgainst:",L.value),qe=_e.map(Ue=>({play_id:Ue.play_id,game_id:Ue.game.game_id})),console.log("payload specificPlays:",qe),qe}function xe(qe,_e){if(console.log("=== getOrderedStrengths INICIO ==="),console.log("selectedIds (orden de selección):",qe),console.log("fortalezasViewRef existe?:",!!_e),!qe||qe.length===0)return console.warn("No hay IDs seleccionados"),[];if(!_e)return console.warn("Ref no disponible"),[];let Ue=_e.fortalezasRawData;if(!Ue)return console.warn("fortalezasRawData no está disponible en el ref"),[];if(Ue&&typeof Ue=="object"&&"value"in Ue&&(console.log("⚠️ fortalezasRawData es un ref, accediendo a .value"),Ue=Ue.value),!Array.isArray(Ue))return console.warn("fortalezasRawData no es un array:",typeof Ue,Ue),[];if(Ue.length===0)return console.warn("fortalezasRawData está vacío"),[];console.log("fortalezasRawData length:",Ue.length),console.log("Primeras 2 fortalezas raw:",Ue.slice(0,2));const je=qe.map(Re=>{console.log(`Buscando ID: ${Re} (tipo: ${typeof Re})`);const We=Ue.find(rt=>{const pt=rt.categories===Re||rt.categories===Number(Re)||String(rt.categories)===String(Re);return!pt&&Ue.indexOf(rt)<3&&console.log(` Comparando: item.categories=${rt.categories} (${typeof rt.categories}) vs id=${Re} (${typeof Re})`),pt});if(We)return console.log(`✓ Encontrada: ${We.name} (categories: ${We.categories})`),We;console.warn(`✗ No encontrada con categories = ${Re}, intentando por id`);const Qe=Ue.find(rt=>rt.id===Re||rt.id===Number(Re)||String(rt.id)===String(Re));return Qe?(console.log(`✓ Encontrada por id: ${Qe.name}`),Qe):(console.error(`✗✗ No se encontró fortaleza con id/categories = ${Re}`),null)}).filter(Boolean);return console.log(`selectedStrengths (${je.length} de ${qe.length} encontradas):`,je),console.log("=== getOrderedStrengths FIN ==="),je}function Ae(){const _e=z()[n.value];if(_e==="fortalezasEquipo"&&I.value)return I.value.autocompletar();if(_e==="fortalezasRival"&&j.value)return j.value.autocompletar();if(_e==="cornersEquipo"&&F.value)return F.value.autocompletar();if(_e==="cornersEquipoAgainst"&&W.value)return W.value.autocompletar();if(_e==="cornersRival"&&U.value)return U.value.autocompletar();if(_e==="cornersRivalAgainst"&&O.value)return O.value.autocompletar()}return(qe,_e)=>{var Ue,je,Re,We,Qe,rt,pt,ut,He,st,ct,Ct,Vt,Ot,qt,Zt;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Lut,[t.createElementVNode("div",Eut,[t.createElementVNode("div",Cut,[t.createElementVNode("div",Nut,[Out,t.createElementVNode("span",Mut,[t.createTextVNode("Generar reporte - "),t.createElementVNode("span",Vut,t.toDisplayString(p.value),1)])]),t.createElementVNode("div",zut," Paso "+t.toDisplayString(n.value===0?1:n.value)+" de "+t.toDisplayString(M.value),1)]),Put,t.createElementVNode("div",{class:t.normalizeClass(["modal-body",{transitioning:T.value}])},[n.value===0?(t.openBlock(),t.createElementBlock("div",Aut,[u.value?(t.openBlock(),t.createElementBlock("div",Rut,[Uut,Fut,t.createElementVNode("p",Iut," Este template contiene "+t.toDisplayString(i.value.equipo)+" visualizaciones de Fortalezas de tu equipo y "+t.toDisplayString(i.value.rival)+" de tu rival. ¿Cómo prefieres que se agregue este contenido? ",1),qut,t.createElementVNode("div",jut,[t.createElementVNode("label",Wut,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"fortalezas",value:"automatico","onUpdate:modelValue":_e[0]||(_e[0]=Jt=>d.value=Jt)},null,512),[[t.vModelRadio,d.value]]),Dut,Kut]),t.createElementVNode("label",But,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"fortalezas",value:"manual","onUpdate:modelValue":_e[1]||(_e[1]=Jt=>d.value=Jt)},null,512),[[t.vModelRadio,d.value]]),Xut,Gut])])])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createElementBlock("div",Zut,[Jut,Hut,t.createElementVNode("p",Yut," Este template contiene "+t.toDisplayString(c.value.homeTeamViews.length)+" visualizaciones de Tiros de esquina de tu equipo y "+t.toDisplayString(c.value.awayTeamViews.length)+" visualizaciones de tu rival. ¿Cómo prefieres que se agregue este contenido? ",1),Qut,t.createElementVNode("div",$ut,[t.createElementVNode("label",edt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"tiros-esquina",value:"automatico","onUpdate:modelValue":_e[2]||(_e[2]=Jt=>o.value=Jt)},null,512),[[t.vModelRadio,o.value]]),tdt,rdt]),t.createElementVNode("label",adt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"tiros-esquina",value:"manual","onUpdate:modelValue":_e[3]||(_e[3]=Jt=>o.value=Jt)},null,512),[[t.vModelRadio,o.value]]),ndt,idt])])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),i.value.equipo>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",odt,[t.createVNode(LJ,{key:"fortalezas-equipo",modelValue:l.value,"onUpdate:modelValue":_e[4]||(_e[4]=Jt=>l.value=Jt),"team-initials":"AME","season-id":(Ue=v.partido)==null?void 0:Ue.season_id,"team-id":((je=v.partido)==null?void 0:je.local)||((Re=v.partido)==null?void 0:Re.home_team),"rival-team-id":((We=v.partido)==null?void 0:We.visita)||((Qe=v.partido)==null?void 0:Qe.visiting_team),"game-id":((rt=v.partido)==null?void 0:rt.game_id)||((pt=v.partido)==null?void 0:pt.id),token:v.token,"template-type":((ut=v.template)==null?void 0:ut.template_type)||1,title:"Fortalezas a favor de mi equipo","total-fortalezas":i.value.equipo,ref_key:"fortalezasEquipoRef",ref:I},null,8,["modelValue","season-id","team-id","rival-team-id","game-id","token","template-type","total-fortalezas"])],512)),[[t.vShow,z()[n.value]==="fortalezasEquipo"]]):t.createCommentVNode("",!0),i.value.rival>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",sdt,[t.createVNode(LJ,{key:"fortalezas-rival",modelValue:s.value,"onUpdate:modelValue":_e[5]||(_e[5]=Jt=>s.value=Jt),"team-initials":"RIV","season-id":(He=v.partido)==null?void 0:He.season_id,"team-id":((st=v.partido)==null?void 0:st.visita)||((ct=v.partido)==null?void 0:ct.visiting_team),"rival-team-id":((Ct=v.partido)==null?void 0:Ct.local)||((Vt=v.partido)==null?void 0:Vt.home_team),"game-id":((Ot=v.partido)==null?void 0:Ot.game_id)||((qt=v.partido)==null?void 0:qt.id),token:v.token,"template-type":((Zt=v.template)==null?void 0:Zt.template_type)||1,title:"Fortalezas a favor del rival","total-fortalezas":i.value.rival,ref_key:"fortalezasRivalRef",ref:j},null,8,["modelValue","season-id","team-id","rival-team-id","game-id","token","template-type","total-fortalezas"])],512)),[[t.vShow,z()[n.value]==="fortalezasRival"]]):t.createCommentVNode("",!0),c.value.homeTeamViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",ldt,[t.createVNode(qN,{modelValue:f.value,"onUpdate:modelValue":_e[6]||(_e[6]=Jt=>f.value=Jt),"team-views":c.value.homeTeamViews,"is-rival":!1,"is-against-mode":!1,title:"Tiros de esquina de mi equipo","team-logo-url":e.configData.partido.localLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersEquipoRef",ref:F},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersEquipo"]]):t.createCommentVNode("",!0),c.value.homeTeamAgainstViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",cdt,[t.createVNode(qN,{modelValue:g.value,"onUpdate:modelValue":_e[7]||(_e[7]=Jt=>g.value=Jt),"team-views":c.value.homeTeamViews,"is-rival":!1,"is-against-mode":!0,title:"Tiros de esquina en contra de mi equipo","team-logo-url":e.configData.partido.localLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersEquipoAgainstRef",ref:W},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersEquipoAgainst"]]):t.createCommentVNode("",!0),c.value.awayTeamViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",udt,[t.createVNode(qN,{modelValue:S.value,"onUpdate:modelValue":_e[8]||(_e[8]=Jt=>S.value=Jt),"is-rival":!0,"is-against-mode":!1,"team-views":c.value.awayTeamViews,title:"Tiros de esquina en contra del rival","team-logo-url":e.configData.partido.visitanteLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersRivalRef",ref:U},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersRival"]]):t.createCommentVNode("",!0),c.value.awayTeamAgainstViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",ddt,[t.createVNode(qN,{modelValue:L.value,"onUpdate:modelValue":_e[9]||(_e[9]=Jt=>L.value=Jt),"is-rival":!0,"is-against-mode":!0,"team-views":c.value.awayTeamViews,title:"Tiros de esquina en contra del rival","team-logo-url":e.configData.partido.visitanteLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersRivalAgainstRef",ref:O},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersRivalAgainst"]]):t.createCommentVNode("",!0)],2),pdt,t.createElementVNode("div",hdt,[t.createElementVNode("button",{class:"back-btn",onClick:N},[fdt,t.createTextVNode(" Regresar ")]),t.createElementVNode("div",mdt,[n.value===0?(t.openBlock(),t.createElementBlock("button",{key:0,class:"cancel-btn",onClick:X},"Cancelar")):t.createCommentVNode("",!0),k.value.includes(n.value)?(t.openBlock(),t.createElementBlock("button",{key:1,class:"cancel-btn",onClick:Ae}," Autocompletar ")):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["next-btn",{disabled:!A.value}]),disabled:!A.value,onClick:me},t.toDisplayString(n.value===0?u.value&&c.value?d.value==="automatico"&&o.value==="automatico"?"Finalizar":"Siguiente":u.value?d.value==="automatico"?"Finalizar":"Siguiente":c.value?o.value==="automatico"?"Finalizar":"Siguiente":"Finalizar":n.value===M.value?"Finalizar":"Siguiente"),11,ydt)])])])]),x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:t.withModifiers(se,["self"])},[t.createElementVNode("div",{class:"modal-content confirm-dialog"},[gdt,t.createElementVNode("div",{class:"modal-footer"},[t.createElementVNode("div",{class:"footer-actions"},[t.createElementVNode("button",{class:"cancel-btn",onClick:se},"Cancelar"),t.createElementVNode("button",{class:"next-btn",onClick:Y},"Confirmar")])])])])):t.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-403972c1"]]),jN=e=>(t.pushScopeId("data-v-55dfb8d7"),e=e(),t.popScopeId(),e),bdt={class:"templates-header"},xdt={class:"count"},_dt={key:0,class:"sort-options"},wdt=["onClick"],Tdt={key:0,class:"checkmark"},Sdt=[jN(()=>t.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],kdt={key:0,class:"loading-state"},Ldt=[jN(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),jN(()=>t.createElementVNode("p",null,"Cargando templates...",-1))],Edt=[jN(()=>t.createElementVNode("div",{class:"inner-card"},[t.createElementVNode("div",{class:"plus"},[t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),t.createElementVNode("div",{class:"create-text"},"Crear Template")],-1))],Cdt=ov({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(e,{expose:r,emit:a}){const v=a,$=e,h=t.ref(!1),u=t.ref(null),i=t.ref(!1),p=t.ref(!1),c=t.ref(!1),n=t.ref(!1),k=t.ref(!1),T=t.ref(!1),x=t.ref(null),d=t.ref(!1),o=t.ref(""),l=t.ref(""),s=t.ref(""),f=t.ref(""),g=t.ref(""),S=t.ref(""),L=t.ref(""),M=t.ref(""),A=t.ref(""),z=t.ref(null),I=t.ref(null),j=t.ref(null),F=t.ref(null),W=t.ref(0),U=t.ref([]),O=t.ref(!1),X=t.ref(null);t.watch([()=>$.team,()=>$.token],()=>{$.team&&$.token&&Y()},{immediate:!1});const N=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],Y=async()=>{try{O.value=!0,X.value=null;const pt=await V0.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${$.team}`,{headers:{Authorization:`${$.token}`,"Content-Type":"application/json"}});pt.data&&Array.isArray(pt.data)?U.value=pt.data:pt.data&&pt.data.templates?U.value=pt.data.templates:pt.data&&pt.data.data?U.value=pt.data.data:U.value=[]}catch(pt){console.error("Error al obtener templates:",pt),console.error("Error response:",pt.response),X.value=pt.message||"Error al cargar los templates",U.value=[]}finally{O.value=!1}},se=t.computed(()=>{if(!U.value.length)return[];let pt=[...U.value];if($.searchQuery.trim()){const ut=$.searchQuery.toLowerCase().trim();pt=pt.filter(He=>He.name.toLowerCase().includes(ut))}switch(u.value){case"name-asc":return pt.sort((ut,He)=>ut.name.localeCompare(He.name));case"date-desc":return pt.sort((ut,He)=>new Date(He.created_at)-new Date(ut.created_at));default:return pt}}),me=t.computed(()=>{if(!W.value)return"grid-1-column";const pt=340,ut=20,st=W.value-40,ct=Math.floor((st+ut)/(pt+ut)),Ct=Math.max(1,ct);return Ct>=4?"grid-4-columns":Ct>=3?"grid-3-columns":Ct>=2?"grid-2-columns":"grid-1-column"}),ge=()=>{h.value=!h.value},be=pt=>{u.value=pt,h.value=!1},xe=pt=>{const ut=N.find(He=>He.value===pt);return ut?ut.label:null},Ae=pt=>{h.value&&I.value&&!I.value.contains(pt.target)&&(h.value=!1)},qe=()=>{j.value&&(W.value=j.value.offsetWidth)};function _e(pt){v("edit-template",pt)}function Ue(){p.value=!1,d.value=!1}function je(pt){x.value=pt,p.value=!1,d.value=!1,T.value=!0}function Re(){T.value=!1,p.value=!0}async function We(pt){var ut,He,st,ct,Ct,Vt,Ot,qt,Zt;try{if(T.value=!1,!x.value)return;const Jt={template_id:x.value.template.id,user_id:$.userId,tournament_id:x.value.liga.id||1,tournament_name:x.value.liga.name,season_id:x.value.partido.season_id,season_name:((ut=x.value.torneo)==null?void 0:ut.name)||"",game_id:x.value.partido.id||x.value.partido.game_id};pt.tirosEsquina==="automatico"&&(Jt.auto_specific_plays_corners=!0);const Qt=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports`,Jt,{headers:{Authorization:$.token,"Content-Type":"application/json"}}),cr=((He=Qt.data)==null?void 0:He.id)||((st=Qt.data)==null?void 0:st.report_id)||((Ct=(ct=Qt.data)==null?void 0:ct.data)==null?void 0:Ct.id)||((Ot=(Vt=Qt.data)==null?void 0:Vt.data)==null?void 0:Ot.report_id);if(console.log("Report ID obtenido:",cr),console.log("Strengths Payload recibido:",pt==null?void 0:pt.strengthsPayload),pt.tirosEsquina==="manual"&&pt.specificPlaysPayload){console.log("specificPlaysPayload recibido:",pt.specificPlaysPayload);try{console.log("Enviando specific plays al endpoint...");const hr=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports/${cr}/specific-plays-corners`,{data:pt.specificPlaysPayload},{headers:{Authorization:$.token,"Content-Type":"application/json"}});console.log("Specific plays guardados exitosamente:",hr.data)}catch(hr){console.error("Error al guardar los specific plays:",hr),console.error("Error response:",(qt=hr.response)==null?void 0:qt.data)}}if(pt!=null&&pt.strengthsPayload&&Object.keys(pt.strengthsPayload).length>0&&cr)try{console.log("Enviando strengths al endpoint...");const hr=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports/${cr}/strengths`,pt.strengthsPayload,{headers:{Authorization:$.token,"Content-Type":"application/json"}});console.log("Strengths guardados exitosamente:",hr.data)}catch(hr){console.error("Error al guardar las fortalezas:",hr),console.error("Error response:",(Zt=hr.response)==null?void 0:Zt.data)}else console.warn("No se enviaron strengths porque:",{hasPayload:!!(pt!=null&&pt.strengthsPayload),payloadKeys:pt!=null&&pt.strengthsPayload?Object.keys(pt.strengthsPayload).length:0,hasReportId:!!cr});v("switch-to-reports"),x.value=null}catch(Jt){console.error("Error al generar el reporte:",Jt),Jt.response&&Jt.response.status===409?x.value&&(L.value=x.value.template.id,A.value=x.value.template.template_type,z.value=x.value.template,d.value=!0,await t.nextTick(),p.value=!0):alert("Error al generar el reporte. Por favor, intenta de nuevo.")}}let Qe=null;t.onMounted(async()=>{document.addEventListener("mousedown",Ae),await t.nextTick(),qe(),window.ResizeObserver?(Qe=new ResizeObserver(()=>{qe()}),j.value&&Qe.observe(j.value)):window.addEventListener("resize",qe),Y()});function rt(pt){v("open-modal-new-template",pt)}return t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Ae),Qe?Qe.disconnect():window.removeEventListener("resize",qe)}),r({obtenerTemplates:Y}),(pt,ut)=>{var He,st;return t.openBlock(),t.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:j},[t.createElementVNode("div",bdt,[t.createElementVNode("span",null,[t.createTextVNode("Templates "),t.createElementVNode("span",xdt,"("+t.toDisplayString(se.value.length)+")",1)]),t.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:I},[t.createElementVNode("button",{class:"sort-button",onClick:ge},[t.createTextVNode(t.toDisplayString(xe(u.value)||"Ordenar")+" ",1),t.createElementVNode("span",{class:t.normalizeClass(["dropdown-arrow",{rotated:h.value}])},null,2)]),h.value?(t.openBlock(),t.createElementBlock("div",_dt,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(N,ct=>t.createElementVNode("div",{key:ct.value,class:t.normalizeClass(["sort-option",{selected:u.value===ct.value}]),onClick:Ct=>be(ct.value)},[t.createElementVNode("span",null,t.toDisplayString(ct.label),1),u.value===ct.value?(t.openBlock(),t.createElementBlock("span",Tdt,Sdt)):t.createCommentVNode("",!0)],10,wdt)),64))])):t.createCommentVNode("",!0)],512)]),O.value?(t.openBlock(),t.createElementBlock("div",kdt,Ldt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["templates-list",me.value]),ref_key:"templatesListRef",ref:F},[t.createElementVNode("div",{class:"template-card create",onClick:ut[0]||(ut[0]=ct=>i.value=!0)},Edt),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(se.value,ct=>(t.openBlock(),t.createBlock(iot,{key:ct.id,template:ct,"user-id":e.userId,onGenerarReporte:Ct=>{L.value=ct.id,A.value=ct.template_type,z.value=ct,p.value=!0},onRenombrar:Ct=>{M.value=ct.id,o.value=Ct,l.value=ct.template_type,c.value=!0},onDuplicar:Ct=>{S.value=ct.id,s.value=Ct,n.value=!0},onEliminar:Ct=>{f.value=Ct.name,g.value=Ct.id,k.value=!0},onEditTemplate:_e},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),i.value?(t.openBlock(),t.createBlock(kJ,{key:2,token:e.token,team:e.team,onClose:ut[1]||(ut[1]=ct=>i.value=!1),onOpenModalNewTemplate:rt},null,8,["token","team"])):t.createCommentVNode("",!0),p.value?(t.openBlock(),t.createBlock(kst,{key:3,"user-id":e.userId,token:e.token,team:e.team,"template-id":L.value,"template-type":A.value,template:z.value,"show-error409-on-mount":d.value,onClose:Ue,onSwitchToReports:ut[2]||(ut[2]=ct=>pt.$emit("switch-to-reports")),onOpenConfigurarContenido:je},null,8,["user-id","token","team","template-id","template-type","template","show-error409-on-mount"])):t.createCommentVNode("",!0),T.value?(t.openBlock(),t.createBlock(vdt,{key:4,"has-rival":!0,token:e.token,template:((He=x.value)==null?void 0:He.template)||null,team:e.team,partido:((st=x.value)==null?void 0:st.partido)||null,"config-data":x.value,onClose:ut[3]||(ut[3]=ct=>T.value=!1),onBack:Re,onNext:We},null,8,["token","template","team","partido","config-data"])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createBlock(jst,{key:5,initialName:o.value,token:e.token,"template-id":M.value,"template-type":l.value,"user-id":e.userId,onRefresh:ut[4]||(ut[4]=ct=>Y()),onClose:ut[5]||(ut[5]=ct=>c.value=!1),onRename:ut[6]||(ut[6]=ct=>{c.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock($st,{key:6,initialName:s.value,token:e.token,"template-id":S.value,onClose:ut[7]||(ut[7]=ct=>n.value=!1),onTemplateDuplicated:ut[8]||(ut[8]=ct=>{n.value=!1,Y()})},null,8,["initialName","token","template-id"])):t.createCommentVNode("",!0),k.value?(t.openBlock(),t.createBlock(slt,{key:7,"template-id":g.value,"user-id":e.userId,token:e.token,onClose:ut[9]||(ut[9]=ct=>k.value=!1),onTemplateDeleted:ut[10]||(ut[10]=ct=>{k.value=!1,Y()})},null,8,["template-id","user-id","token"])):t.createCommentVNode("",!0)],512)}}},[["__scopeId","data-v-55dfb8d7"]]),kA=e=>(t.pushScopeId("data-v-246ad2d7"),e=e(),t.popScopeId(),e),Ndt={class:"tooltip-report-options"},Odt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1)),Mdt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1)),Vdt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1)),zdt=ov({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(e,{emit:r}){return(a,v)=>(t.openBlock(),t.createElementBlock("div",Ndt,[t.createElementVNode("ul",null,[t.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=$=>a.$emit("renombrar"))},[Odt,t.createTextVNode(" Renombrar reporte ")]),t.createElementVNode("li",{class:"option",onClick:v[1]||(v[1]=$=>a.$emit("descargar"))},[Mdt,t.createTextVNode(" Descargar reporte ")]),t.createElementVNode("li",{class:"option",onClick:v[2]||(v[2]=$=>a.$emit("eliminar"))},[Vdt,t.createTextVNode(" Eliminar reporte ")])])]))}},[["__scopeId","data-v-246ad2d7"]]);function U4(e){if(!e)return"";const r=new Date(e);if(isNaN(r.getTime()))return"";const a=r.getDate(),v=r.toLocaleDateString("es-ES",{month:"short"}),$=r.getFullYear();return`${a} ${v}, ${$}`}const Pdt=e=>(t.pushScopeId("data-v-bb7e7ba7"),e=e(),t.popScopeId(),e),Adt={class:"prematch-bg"},Rdt={class:"background-shields"},Udt={class:"shield-left"},Fdt=["src"],Idt={class:"shield-right"},qdt=["src"],jdt=Pdt(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Wdt={class:"subtitle"},Ddt={class:"jornada"},Kdt={class:"fecha"},Bdt={class:"teams-row"},Xdt={class:"team team-local"},Gdt={class:"escudo-svg"},Zdt=["src"],Jdt={class:"team-name"},Hdt={class:"team team-visitor"},Ydt={class:"escudo-svg"},Qdt=["src"],$dt={class:"team-name"},ept=ov({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Adt,[t.createElementVNode("div",Rdt,[t.createElementVNode("div",Udt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Fdt)]),t.createElementVNode("div",Idt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,qdt)])]),jdt,t.createElementVNode("div",Wdt,[t.createElementVNode("span",Ddt,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Kdt," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",Bdt,[t.createElementVNode("div",Xdt,[t.createElementVNode("span",Gdt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Zdt)]),t.createElementVNode("span",Jdt,t.toDisplayString(a.report.game.home_team_acronym),1)]),t.createElementVNode("div",Hdt,[t.createElementVNode("span",Ydt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Qdt)]),t.createElementVNode("span",$dt,t.toDisplayString(a.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-bb7e7ba7"]]),n7=e=>(t.pushScopeId("data-v-78d552f2"),e=e(),t.popScopeId(),e),tpt={class:"prematch-bg"},rpt={class:"background-shields"},apt={class:"shield-left"},npt=["src"],ipt={class:"shield-right"},opt=["src"],spt=n7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),lpt={class:"subtitle"},cpt={class:"jornada"},upt={class:"fecha"},dpt={class:"teams-grid"},ppt={class:"row row-top"},hpt={class:"team team-local"},fpt={class:"escudo-svg"},mpt=["src"],ypt={class:"team-name"},gpt={class:"score"},vpt={class:"score-text"},bpt={class:"team team-visitor"},xpt={class:"team-name"},_pt={class:"escudo-svg"},wpt=["src"],Tpt={class:"row row-bottom"},Spt={class:"team-stats"},kpt=t.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1),Lpt={class:"stat red"},Ept=n7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),Cpt={class:"stat-number"},Npt={class:"stat yellow"},Opt=n7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),Mpt={class:"stat-number"},Vpt=n7(()=>t.createElementVNode("div",{class:"empty"},null,-1)),zpt={class:"team-stats"},Ppt={class:"stat-number"},Apt=n7(()=>t.createElementVNode("span",{class:"stat yellow"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),Rpt={class:"stat-number"},Upt=n7(()=>t.createElementVNode("span",{class:"stat red"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),Fpt=t.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1),Ipt=ov({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(e){function r(c){return c?c.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var k,T,x;const c=(x=(T=(k=a.report)==null?void 0:k.game)==null?void 0:T.minutes)==null?void 0:x.home_goals_minutes;if(!Array.isArray(c)||c.length===0)return null;const n=c.map(d=>{const o=d.match(/(\d+)'$/);return o?o[1]+"'":""}).filter(d=>d!=="");if(n.length>5){const d=n.slice(0,5).join(", "),o=n.slice(5).join(", ");return`${d}
|
|
8002
|
+
=== PAYLOAD FINAL ===`),console.log(JSON.stringify(qe,null,2)),qe}function be(){let qe=[];const _e=[...f.value,...g.value,...S.value,...L.value];return console.log("allSelectedCorners:",_e),console.log("selectedCornersEquipo:",f.value),console.log("selectedCornersEquipoAgainst:",g.value),console.log("selectedCornersRival:",S.value),console.log("selectedCornersRivalAgainst:",L.value),qe=_e.map(Ue=>({play_id:Ue.play_id,game_id:Ue.game.game_id})),console.log("payload specificPlays:",qe),qe}function xe(qe,_e){if(console.log("=== getOrderedStrengths INICIO ==="),console.log("selectedIds (orden de selección):",qe),console.log("fortalezasViewRef existe?:",!!_e),!qe||qe.length===0)return console.warn("No hay IDs seleccionados"),[];if(!_e)return console.warn("Ref no disponible"),[];let Ue=_e.fortalezasRawData;if(!Ue)return console.warn("fortalezasRawData no está disponible en el ref"),[];if(Ue&&typeof Ue=="object"&&"value"in Ue&&(console.log("⚠️ fortalezasRawData es un ref, accediendo a .value"),Ue=Ue.value),!Array.isArray(Ue))return console.warn("fortalezasRawData no es un array:",typeof Ue,Ue),[];if(Ue.length===0)return console.warn("fortalezasRawData está vacío"),[];console.log("fortalezasRawData length:",Ue.length),console.log("Primeras 2 fortalezas raw:",Ue.slice(0,2));const je=qe.map(Re=>{console.log(`Buscando ID: ${Re} (tipo: ${typeof Re})`);const We=Ue.find(rt=>{const pt=rt.categories===Re||rt.categories===Number(Re)||String(rt.categories)===String(Re);return!pt&&Ue.indexOf(rt)<3&&console.log(` Comparando: item.categories=${rt.categories} (${typeof rt.categories}) vs id=${Re} (${typeof Re})`),pt});if(We)return console.log(`✓ Encontrada: ${We.name} (categories: ${We.categories})`),We;console.warn(`✗ No encontrada con categories = ${Re}, intentando por id`);const Qe=Ue.find(rt=>rt.id===Re||rt.id===Number(Re)||String(rt.id)===String(Re));return Qe?(console.log(`✓ Encontrada por id: ${Qe.name}`),Qe):(console.error(`✗✗ No se encontró fortaleza con id/categories = ${Re}`),null)}).filter(Boolean);return console.log(`selectedStrengths (${je.length} de ${qe.length} encontradas):`,je),console.log("=== getOrderedStrengths FIN ==="),je}function Ae(){const _e=z()[n.value];if(_e==="fortalezasEquipo"&&I.value)return I.value.autocompletar();if(_e==="fortalezasRival"&&j.value)return j.value.autocompletar();if(_e==="cornersEquipo"&&F.value)return F.value.autocompletar();if(_e==="cornersEquipoAgainst"&&W.value)return W.value.autocompletar();if(_e==="cornersRival"&&U.value)return U.value.autocompletar();if(_e==="cornersRivalAgainst"&&O.value)return O.value.autocompletar()}return(qe,_e)=>{var Ue,je,Re,We,Qe,rt,pt,ut,He,st,ct,Ct,Vt,Ot,qt,Zt;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Lut,[t.createElementVNode("div",Eut,[t.createElementVNode("div",Cut,[t.createElementVNode("div",Nut,[Out,t.createElementVNode("span",Mut,[t.createTextVNode("Generar reporte - "),t.createElementVNode("span",Vut,t.toDisplayString(p.value),1)])]),t.createElementVNode("div",zut," Paso "+t.toDisplayString(n.value===0?1:n.value)+" de "+t.toDisplayString(M.value),1)]),Put,t.createElementVNode("div",{class:t.normalizeClass(["modal-body",{transitioning:T.value}])},[n.value===0?(t.openBlock(),t.createElementBlock("div",Aut,[u.value?(t.openBlock(),t.createElementBlock("div",Rut,[Uut,Fut,t.createElementVNode("p",Iut," Este template contiene "+t.toDisplayString(i.value.equipo)+" visualizaciones de Fortalezas de tu equipo y "+t.toDisplayString(i.value.rival)+" de tu rival. ¿Cómo prefieres que se agregue este contenido? ",1),qut,t.createElementVNode("div",jut,[t.createElementVNode("label",Wut,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"fortalezas",value:"automatico","onUpdate:modelValue":_e[0]||(_e[0]=Jt=>d.value=Jt)},null,512),[[t.vModelRadio,d.value]]),Dut,Kut]),t.createElementVNode("label",But,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"fortalezas",value:"manual","onUpdate:modelValue":_e[1]||(_e[1]=Jt=>d.value=Jt)},null,512),[[t.vModelRadio,d.value]]),Xut,Gut])])])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createElementBlock("div",Zut,[Jut,Hut,t.createElementVNode("p",Yut," Este template contiene "+t.toDisplayString(c.value.homeTeamViews.length)+" visualizaciones de Tiros de esquina de tu equipo y "+t.toDisplayString(c.value.awayTeamViews.length)+" visualizaciones de tu rival. ¿Cómo prefieres que se agregue este contenido? ",1),Qut,t.createElementVNode("div",$ut,[t.createElementVNode("label",edt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"tiros-esquina",value:"automatico","onUpdate:modelValue":_e[2]||(_e[2]=Jt=>o.value=Jt)},null,512),[[t.vModelRadio,o.value]]),tdt,rdt]),t.createElementVNode("label",adt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"tiros-esquina",value:"manual","onUpdate:modelValue":_e[3]||(_e[3]=Jt=>o.value=Jt)},null,512),[[t.vModelRadio,o.value]]),ndt,idt])])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),i.value.equipo>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",odt,[t.createVNode(LJ,{key:"fortalezas-equipo",modelValue:l.value,"onUpdate:modelValue":_e[4]||(_e[4]=Jt=>l.value=Jt),"team-initials":"AME","season-id":(Ue=v.partido)==null?void 0:Ue.season_id,"team-id":((je=v.partido)==null?void 0:je.local)||((Re=v.partido)==null?void 0:Re.home_team),"rival-team-id":((We=v.partido)==null?void 0:We.visita)||((Qe=v.partido)==null?void 0:Qe.visiting_team),"game-id":((rt=v.partido)==null?void 0:rt.game_id)||((pt=v.partido)==null?void 0:pt.id),token:v.token,"template-type":((ut=v.template)==null?void 0:ut.template_type)||1,title:"Fortalezas a favor de mi equipo","total-fortalezas":i.value.equipo,ref_key:"fortalezasEquipoRef",ref:I},null,8,["modelValue","season-id","team-id","rival-team-id","game-id","token","template-type","total-fortalezas"])],512)),[[t.vShow,z()[n.value]==="fortalezasEquipo"]]):t.createCommentVNode("",!0),i.value.rival>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",sdt,[t.createVNode(LJ,{key:"fortalezas-rival",modelValue:s.value,"onUpdate:modelValue":_e[5]||(_e[5]=Jt=>s.value=Jt),"team-initials":"RIV","season-id":(He=v.partido)==null?void 0:He.season_id,"team-id":((st=v.partido)==null?void 0:st.visita)||((ct=v.partido)==null?void 0:ct.visiting_team),"rival-team-id":((Ct=v.partido)==null?void 0:Ct.local)||((Vt=v.partido)==null?void 0:Vt.home_team),"game-id":((Ot=v.partido)==null?void 0:Ot.game_id)||((qt=v.partido)==null?void 0:qt.id),token:v.token,"template-type":((Zt=v.template)==null?void 0:Zt.template_type)||1,title:"Fortalezas a favor del rival","total-fortalezas":i.value.rival,ref_key:"fortalezasRivalRef",ref:j},null,8,["modelValue","season-id","team-id","rival-team-id","game-id","token","template-type","total-fortalezas"])],512)),[[t.vShow,z()[n.value]==="fortalezasRival"]]):t.createCommentVNode("",!0),c.value.homeTeamViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",ldt,[t.createVNode(qN,{modelValue:f.value,"onUpdate:modelValue":_e[6]||(_e[6]=Jt=>f.value=Jt),"team-views":c.value.homeTeamViews,"is-rival":!1,"is-against-mode":!1,title:"Tiros de esquina de mi equipo","team-logo-url":e.configData.partido.localLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersEquipoRef",ref:F},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersEquipo"]]):t.createCommentVNode("",!0),c.value.homeTeamAgainstViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",cdt,[t.createVNode(qN,{modelValue:g.value,"onUpdate:modelValue":_e[7]||(_e[7]=Jt=>g.value=Jt),"team-views":c.value.homeTeamViews,"is-rival":!1,"is-against-mode":!0,title:"Tiros de esquina en contra de mi equipo","team-logo-url":e.configData.partido.localLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersEquipoAgainstRef",ref:W},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersEquipoAgainst"]]):t.createCommentVNode("",!0),c.value.awayTeamViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",udt,[t.createVNode(qN,{modelValue:S.value,"onUpdate:modelValue":_e[8]||(_e[8]=Jt=>S.value=Jt),"is-rival":!0,"is-against-mode":!1,"team-views":c.value.awayTeamViews,title:"Tiros de esquina en contra del rival","team-logo-url":e.configData.partido.visitanteLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersRivalRef",ref:U},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersRival"]]):t.createCommentVNode("",!0),c.value.awayTeamAgainstViews.length>0?t.withDirectives((t.openBlock(),t.createElementBlock("div",ddt,[t.createVNode(qN,{modelValue:L.value,"onUpdate:modelValue":_e[9]||(_e[9]=Jt=>L.value=Jt),"is-rival":!0,"is-against-mode":!0,"team-views":c.value.awayTeamViews,title:"Tiros de esquina en contra del rival","team-logo-url":e.configData.partido.visitanteLogo,"config-data":e.configData,"user-team-id":e.team,ref_key:"cornersRivalAgainstRef",ref:O},null,8,["modelValue","team-views","team-logo-url","config-data","user-team-id"])],512)),[[t.vShow,z()[n.value]==="cornersRivalAgainst"]]):t.createCommentVNode("",!0)],2),pdt,t.createElementVNode("div",hdt,[t.createElementVNode("button",{class:"back-btn",onClick:N},[fdt,t.createTextVNode(" Regresar ")]),t.createElementVNode("div",mdt,[n.value===0?(t.openBlock(),t.createElementBlock("button",{key:0,class:"cancel-btn",onClick:X},"Cancelar")):t.createCommentVNode("",!0),k.value.includes(n.value)?(t.openBlock(),t.createElementBlock("button",{key:1,class:"cancel-btn",onClick:Ae}," Autocompletar ")):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["next-btn",{disabled:!A.value}]),disabled:!A.value,onClick:me},t.toDisplayString(n.value===0?u.value&&c.value?d.value==="automatico"&&o.value==="automatico"?"Finalizar":"Siguiente":u.value?d.value==="automatico"?"Finalizar":"Siguiente":c.value?o.value==="automatico"?"Finalizar":"Siguiente":"Finalizar":n.value===M.value?"Finalizar":"Siguiente"),11,ydt)])])])]),x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:t.withModifiers(se,["self"])},[t.createElementVNode("div",{class:"modal-content confirm-dialog"},[gdt,t.createElementVNode("div",{class:"modal-footer"},[t.createElementVNode("div",{class:"footer-actions"},[t.createElementVNode("button",{class:"cancel-btn",onClick:se},"Cancelar"),t.createElementVNode("button",{class:"next-btn",onClick:Y},"Confirmar")])])])])):t.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-403972c1"]]),jN=e=>(t.pushScopeId("data-v-55dfb8d7"),e=e(),t.popScopeId(),e),bdt={class:"templates-header"},xdt={class:"count"},_dt={key:0,class:"sort-options"},wdt=["onClick"],Tdt={key:0,class:"checkmark"},Sdt=[jN(()=>t.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],kdt={key:0,class:"loading-state"},Ldt=[jN(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),jN(()=>t.createElementVNode("p",null,"Cargando templates...",-1))],Edt=[jN(()=>t.createElementVNode("div",{class:"inner-card"},[t.createElementVNode("div",{class:"plus"},[t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),t.createElementVNode("div",{class:"create-text"},"Crear Template")],-1))],Cdt=ov({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(e,{expose:r,emit:a}){const v=a,$=e,h=t.ref(!1),u=t.ref(null),i=t.ref(!1),p=t.ref(!1),c=t.ref(!1),n=t.ref(!1),k=t.ref(!1),T=t.ref(!1),x=t.ref(null),d=t.ref(!1),o=t.ref(""),l=t.ref(""),s=t.ref(""),f=t.ref(""),g=t.ref(""),S=t.ref(""),L=t.ref(""),M=t.ref(""),A=t.ref(""),z=t.ref(null),I=t.ref(null),j=t.ref(null),F=t.ref(null),W=t.ref(0),U=t.ref([]),O=t.ref(!1),X=t.ref(null);t.watch([()=>$.team,()=>$.token],()=>{$.team&&$.token&&Y()},{immediate:!1});const N=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],Y=async()=>{try{O.value=!0,X.value=null;const pt=await V0.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${$.team}`,{headers:{Authorization:`${$.token}`,"Content-Type":"application/json"}});pt.data&&Array.isArray(pt.data)?U.value=pt.data:pt.data&&pt.data.templates?U.value=pt.data.templates:pt.data&&pt.data.data?U.value=pt.data.data:U.value=[]}catch(pt){console.error("Error al obtener templates:",pt),console.error("Error response:",pt.response),X.value=pt.message||"Error al cargar los templates",U.value=[]}finally{O.value=!1}},se=t.computed(()=>{if(!U.value.length)return[];let pt=[...U.value];if($.searchQuery.trim()){const ut=$.searchQuery.toLowerCase().trim();pt=pt.filter(He=>He.name.toLowerCase().includes(ut))}switch(u.value){case"name-asc":return pt.sort((ut,He)=>ut.name.localeCompare(He.name));case"date-desc":return pt.sort((ut,He)=>new Date(He.created_at)-new Date(ut.created_at));default:return pt}}),me=t.computed(()=>{if(!W.value)return"grid-1-column";const pt=340,ut=20,st=W.value-40,ct=Math.floor((st+ut)/(pt+ut)),Ct=Math.max(1,ct);return Ct>=4?"grid-4-columns":Ct>=3?"grid-3-columns":Ct>=2?"grid-2-columns":"grid-1-column"}),ge=()=>{h.value=!h.value},be=pt=>{u.value=pt,h.value=!1},xe=pt=>{const ut=N.find(He=>He.value===pt);return ut?ut.label:null},Ae=pt=>{h.value&&I.value&&!I.value.contains(pt.target)&&(h.value=!1)},qe=()=>{j.value&&(W.value=j.value.offsetWidth)};function _e(pt){v("edit-template",pt)}function Ue(){p.value=!1,d.value=!1}function je(pt){x.value=pt,p.value=!1,d.value=!1,T.value=!0}function Re(){T.value=!1,p.value=!0}async function We(pt){var ut,He,st,ct,Ct,Vt,Ot,qt,Zt;try{if(T.value=!1,!x.value)return;const Jt={template_id:x.value.template.id,user_id:$.userId,tournament_id:x.value.liga.id||1,tournament_name:x.value.liga.name,season_id:x.value.partido.season_id,season_name:((ut=x.value.torneo)==null?void 0:ut.name)||"",game_id:x.value.partido.id||x.value.partido.game_id};pt.tirosEsquina==="automatico"&&(Jt.auto_specific_plays_corners=!0);const Qt=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports`,Jt,{headers:{Authorization:$.token,"Content-Type":"application/json"}}),cr=((He=Qt.data)==null?void 0:He.id)||((st=Qt.data)==null?void 0:st.report_id)||((Ct=(ct=Qt.data)==null?void 0:ct.data)==null?void 0:Ct.id)||((Ot=(Vt=Qt.data)==null?void 0:Vt.data)==null?void 0:Ot.report_id);if(console.log("Report ID obtenido:",cr),console.log("Strengths Payload recibido:",pt==null?void 0:pt.strengthsPayload),pt.tirosEsquina==="manual"&&pt.specificPlaysPayload){console.log("specificPlaysPayload recibido:",pt.specificPlaysPayload);try{console.log("Enviando specific plays al endpoint...");const hr=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports/${cr}/specific-plays-corners`,{data:pt.specificPlaysPayload},{headers:{Authorization:$.token,"Content-Type":"application/json"}});console.log("Specific plays guardados exitosamente:",hr.data)}catch(hr){console.error("Error al guardar los specific plays:",hr),console.error("Error response:",(qt=hr.response)==null?void 0:qt.data)}}if(pt!=null&&pt.strengthsPayload&&Object.keys(pt.strengthsPayload).length>0&&cr)try{console.log("Enviando strengths al endpoint...");const hr=await V0.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${$.userId}/reports/${cr}/strengths`,pt.strengthsPayload,{headers:{Authorization:$.token,"Content-Type":"application/json"}});console.log("Strengths guardados exitosamente:",hr.data)}catch(hr){console.error("Error al guardar las fortalezas:",hr),console.error("Error response:",(Zt=hr.response)==null?void 0:Zt.data)}else console.warn("No se enviaron strengths porque:",{hasPayload:!!(pt!=null&&pt.strengthsPayload),payloadKeys:pt!=null&&pt.strengthsPayload?Object.keys(pt.strengthsPayload).length:0,hasReportId:!!cr});v("switch-to-reports"),x.value=null}catch(Jt){console.error("Error al generar el reporte:",Jt),Jt.response&&Jt.response.status===409?x.value&&(L.value=x.value.template.id,A.value=x.value.template.template_type,z.value=x.value.template,d.value=!0,await t.nextTick(),p.value=!0):alert("Error al generar el reporte. Por favor, intenta de nuevo.")}}let Qe=null;t.onMounted(async()=>{document.addEventListener("mousedown",Ae),await t.nextTick(),qe(),window.ResizeObserver?(Qe=new ResizeObserver(()=>{qe()}),j.value&&Qe.observe(j.value)):window.addEventListener("resize",qe),Y()});function rt(pt){v("open-modal-new-template",pt)}return t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Ae),Qe?Qe.disconnect():window.removeEventListener("resize",qe)}),r({obtenerTemplates:Y}),(pt,ut)=>{var He,st;return t.openBlock(),t.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:j},[t.createElementVNode("div",bdt,[t.createElementVNode("span",null,[t.createTextVNode("Templates "),t.createElementVNode("span",xdt,"("+t.toDisplayString(se.value.length)+")",1)]),t.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:I},[t.createElementVNode("button",{class:"sort-button",onClick:ge},[t.createTextVNode(t.toDisplayString(xe(u.value)||"Ordenar")+" ",1),t.createElementVNode("span",{class:t.normalizeClass(["dropdown-arrow",{rotated:h.value}])},null,2)]),h.value?(t.openBlock(),t.createElementBlock("div",_dt,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(N,ct=>t.createElementVNode("div",{key:ct.value,class:t.normalizeClass(["sort-option",{selected:u.value===ct.value}]),onClick:Ct=>be(ct.value)},[t.createElementVNode("span",null,t.toDisplayString(ct.label),1),u.value===ct.value?(t.openBlock(),t.createElementBlock("span",Tdt,Sdt)):t.createCommentVNode("",!0)],10,wdt)),64))])):t.createCommentVNode("",!0)],512)]),O.value?(t.openBlock(),t.createElementBlock("div",kdt,Ldt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["templates-list",me.value]),ref_key:"templatesListRef",ref:F},[t.createElementVNode("div",{class:"template-card create",onClick:ut[0]||(ut[0]=ct=>i.value=!0)},Edt),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(se.value,ct=>(t.openBlock(),t.createBlock(iot,{key:ct.id,template:ct,"user-id":e.userId,onGenerarReporte:Ct=>{L.value=ct.id,A.value=ct.template_type,z.value=ct,p.value=!0},onRenombrar:Ct=>{M.value=ct.id,o.value=Ct,l.value=ct.template_type,c.value=!0},onDuplicar:Ct=>{S.value=ct.id,s.value=Ct,n.value=!0},onEliminar:Ct=>{f.value=Ct.name,g.value=Ct.id,k.value=!0},onEditTemplate:_e},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),i.value?(t.openBlock(),t.createBlock(kJ,{key:2,token:e.token,team:e.team,onClose:ut[1]||(ut[1]=ct=>i.value=!1),onOpenModalNewTemplate:rt},null,8,["token","team"])):t.createCommentVNode("",!0),p.value?(t.openBlock(),t.createBlock(kst,{key:3,"user-id":e.userId,token:e.token,team:e.team,"template-id":L.value,"template-type":A.value,template:z.value,"show-error409-on-mount":d.value,onClose:Ue,onSwitchToReports:ut[2]||(ut[2]=ct=>pt.$emit("switch-to-reports")),onOpenConfigurarContenido:je},null,8,["user-id","token","team","template-id","template-type","template","show-error409-on-mount"])):t.createCommentVNode("",!0),T.value?(t.openBlock(),t.createBlock(vdt,{key:4,"has-rival":!0,token:e.token,template:((He=x.value)==null?void 0:He.template)||null,team:e.team,partido:((st=x.value)==null?void 0:st.partido)||null,"config-data":x.value,onClose:ut[3]||(ut[3]=ct=>T.value=!1),onBack:Re,onNext:We},null,8,["token","template","team","partido","config-data"])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createBlock(jst,{key:5,initialName:o.value,token:e.token,"template-id":M.value,"template-type":l.value,"user-id":e.userId,onRefresh:ut[4]||(ut[4]=ct=>Y()),onClose:ut[5]||(ut[5]=ct=>c.value=!1),onRename:ut[6]||(ut[6]=ct=>{c.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock($st,{key:6,initialName:s.value,token:e.token,"template-id":S.value,onClose:ut[7]||(ut[7]=ct=>n.value=!1),onTemplateDuplicated:ut[8]||(ut[8]=ct=>{n.value=!1,Y()})},null,8,["initialName","token","template-id"])):t.createCommentVNode("",!0),k.value?(t.openBlock(),t.createBlock(slt,{key:7,"template-id":g.value,"user-id":e.userId,token:e.token,onClose:ut[9]||(ut[9]=ct=>k.value=!1),onTemplateDeleted:ut[10]||(ut[10]=ct=>{k.value=!1,Y()})},null,8,["template-id","user-id","token"])):t.createCommentVNode("",!0)],512)}}},[["__scopeId","data-v-55dfb8d7"]]),kA=e=>(t.pushScopeId("data-v-d17eb1eb"),e=e(),t.popScopeId(),e),Ndt={class:"tooltip-report-options"},Odt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1)),Mdt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1)),Vdt=kA(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1)),zdt=ov({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(e,{emit:r}){return(a,v)=>(t.openBlock(),t.createElementBlock("div",Ndt,[t.createElementVNode("ul",null,[t.createElementVNode("li",{class:"option",onClick:v[0]||(v[0]=$=>a.$emit("renombrar"))},[Odt,t.createTextVNode(" Renombrar reporte ")]),t.createElementVNode("li",{class:"option",onClick:v[1]||(v[1]=$=>a.$emit("descargar"))},[Mdt,t.createTextVNode(" Descargar reporte ")]),t.createElementVNode("li",{class:"option",onClick:v[2]||(v[2]=$=>a.$emit("eliminar"))},[Vdt,t.createTextVNode(" Eliminar reporte ")])])]))}},[["__scopeId","data-v-d17eb1eb"]]);function U4(e){if(!e)return"";const r=new Date(e);if(isNaN(r.getTime()))return"";const a=r.getDate(),v=r.toLocaleDateString("es-ES",{month:"short"}),$=r.getFullYear();return`${a} ${v}, ${$}`}const Pdt=e=>(t.pushScopeId("data-v-bb7e7ba7"),e=e(),t.popScopeId(),e),Adt={class:"prematch-bg"},Rdt={class:"background-shields"},Udt={class:"shield-left"},Fdt=["src"],Idt={class:"shield-right"},qdt=["src"],jdt=Pdt(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Wdt={class:"subtitle"},Ddt={class:"jornada"},Kdt={class:"fecha"},Bdt={class:"teams-row"},Xdt={class:"team team-local"},Gdt={class:"escudo-svg"},Zdt=["src"],Jdt={class:"team-name"},Hdt={class:"team team-visitor"},Ydt={class:"escudo-svg"},Qdt=["src"],$dt={class:"team-name"},ept=ov({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Adt,[t.createElementVNode("div",Rdt,[t.createElementVNode("div",Udt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Fdt)]),t.createElementVNode("div",Idt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,qdt)])]),jdt,t.createElementVNode("div",Wdt,[t.createElementVNode("span",Ddt,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Kdt," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",Bdt,[t.createElementVNode("div",Xdt,[t.createElementVNode("span",Gdt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Zdt)]),t.createElementVNode("span",Jdt,t.toDisplayString(a.report.game.home_team_acronym),1)]),t.createElementVNode("div",Hdt,[t.createElementVNode("span",Ydt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Qdt)]),t.createElementVNode("span",$dt,t.toDisplayString(a.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-bb7e7ba7"]]),n7=e=>(t.pushScopeId("data-v-7dd14646"),e=e(),t.popScopeId(),e),tpt={class:"prematch-bg"},rpt={class:"background-shields"},apt={class:"shield-left"},npt=["src"],ipt={class:"shield-right"},opt=["src"],spt=n7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),lpt={class:"subtitle"},cpt={class:"jornada"},upt={class:"fecha"},dpt={class:"teams-grid"},ppt={class:"row row-top"},hpt={class:"team team-local"},fpt={class:"escudo-svg"},mpt=["src"],ypt={class:"team-name"},gpt={class:"score"},vpt={class:"score-text"},bpt={class:"team team-visitor"},xpt={class:"team-name"},_pt={class:"escudo-svg"},wpt=["src"],Tpt={class:"row row-bottom"},Spt={class:"team-stats"},kpt=t.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1),Lpt={class:"stat red"},Ept=n7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),Cpt={class:"stat-number"},Npt={class:"stat yellow"},Opt=n7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),Mpt={class:"stat-number"},Vpt=n7(()=>t.createElementVNode("div",{class:"empty"},null,-1)),zpt={class:"team-stats"},Ppt={class:"stat-number"},Apt=n7(()=>t.createElementVNode("span",{class:"stat yellow"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),Rpt={class:"stat-number"},Upt=n7(()=>t.createElementVNode("span",{class:"stat red"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),Fpt=t.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1),Ipt=ov({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(e){function r(c){return c?c.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var k,T,x;const c=(x=(T=(k=a.report)==null?void 0:k.game)==null?void 0:T.minutes)==null?void 0:x.home_goals_minutes;if(!Array.isArray(c)||c.length===0)return null;const n=c.map(d=>{const o=d.match(/(\d+)'$/);return o?o[1]+"'":""}).filter(d=>d!=="");if(n.length>5){const d=n.slice(0,5).join(", "),o=n.slice(5).join(", ");return`${d}
|
|
8003
8003
|
${o}`}return n.join(", ")}),$=t.computed(()=>{var k,T,x;const c=(x=(T=(k=a.report)==null?void 0:k.game)==null?void 0:T.minutes)==null?void 0:x.visiting_goals_minutes;if(!Array.isArray(c)||c.length===0)return null;const n=c.map(d=>{const o=d.match(/(\d+)'$/);return o?o[1]+"'":""}).filter(d=>d!=="");if(n.length>5){const d=n.slice(0,5).join(", "),o=n.slice(5).join(", ");return`${d}
|
|
8004
8004
|
${o}`}return n.join(", ")}),h=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.home_red_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),u=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.home_yellow_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),i=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.away_yellow_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),p=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.away_red_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null});return(c,n)=>(t.openBlock(),t.createElementBlock("div",tpt,[t.createElementVNode("div",rpt,[t.createElementVNode("div",apt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+e.report.game.home_team+".png",alt:"Escudo local"},null,8,npt)]),t.createElementVNode("div",ipt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+e.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,opt)])]),spt,t.createElementVNode("div",lpt,[t.createElementVNode("span",cpt,t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",upt," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",dpt,[t.createElementVNode("div",ppt,[t.createElementVNode("div",hpt,[t.createElementVNode("span",fpt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,mpt)]),t.createElementVNode("span",ypt,t.toDisplayString(e.report.game.home_team_acronym),1)]),t.createElementVNode("div",gpt,[t.createElementVNode("span",vpt,t.toDisplayString(e.report.game.score[0])+":"+t.toDisplayString(e.report.game.score[1]),1)]),t.createElementVNode("div",bpt,[t.createElementVNode("span",xpt,t.toDisplayString(e.report.game.visiting_team_acronym),1),t.createElementVNode("span",_pt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,wpt)])])]),t.createElementVNode("div",Tpt,[t.createElementVNode("div",Spt,[kpt,v.value!==null?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["stat time",{"two-lines":v.value&&v.value.includes(`
|
|
8005
8005
|
`)}])},t.toDisplayString(v.value),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["separator",{"two-lines":v.value&&v.value.includes(`
|
|
8006
8006
|
`)}])},null,2),t.createElementVNode("span",Lpt,[Ept,t.createElementVNode("span",Cpt,t.toDisplayString(h.value||0),1)]),t.createElementVNode("span",Npt,[Opt,t.createElementVNode("span",Mpt,t.toDisplayString(u.value||0),1)])]),Vpt,t.createElementVNode("div",zpt,[t.createElementVNode("span",Ppt,t.toDisplayString(i.value||0),1),Apt,t.createElementVNode("span",Rpt,t.toDisplayString(p.value||0),1),Upt,t.createElementVNode("div",{class:t.normalizeClass(["separator",{"two-lines":$.value&&$.value.includes(`
|
|
8007
8007
|
`)}])},null,2),$.value!==null?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["stat time",{"two-lines":$.value&&$.value.includes(`
|
|
8008
|
-
`)}])},t.toDisplayString($.value),3)):t.createCommentVNode("",!0),Fpt])])])]))}},[["__scopeId","data-v-
|
|
8008
|
+
`)}])},t.toDisplayString($.value),3)):t.createCommentVNode("",!0),Fpt])])])]))}},[["__scopeId","data-v-7dd14646"]]),qpt=e=>(t.pushScopeId("data-v-ef17e1af"),e=e(),t.popScopeId(),e),jpt={class:"prematch-bg"},Wpt={class:"background-shields"},Dpt={class:"shield-left"},Kpt=["src"],Bpt={class:"shield-right"},Xpt=["src"],Gpt=qpt(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Zpt={class:"subtitle"},Jpt={class:"jornada"},Hpt={class:"fecha"},Ypt={class:"teams-row"},Qpt={class:"team team-local"},$pt={class:"escudo-svg"},eht=["src"],tht={class:"team-name"},rht={class:"team team-visitor"},aht={class:"escudo-svg"},nht=["src"],iht={class:"team-name"},oht=ov({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",jpt,[t.createElementVNode("div",Wpt,[t.createElementVNode("div",Dpt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.home_team+".png",alt:"Escudo local"},null,8,Kpt)]),t.createElementVNode("div",Bpt,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+a.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Xpt)])]),Gpt,t.createElementVNode("div",Zpt,[t.createElementVNode("span",Jpt,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Hpt," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",Ypt,[t.createElementVNode("div",Qpt,[t.createElementVNode("span",$pt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,eht)]),t.createElementVNode("span",tht,t.toDisplayString(a.report.game.home_team_acronym),1)]),t.createElementVNode("div",rht,[t.createElementVNode("span",aht,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,nht)]),t.createElementVNode("span",iht,t.toDisplayString(a.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-ef17e1af"]]),i7=e=>(t.pushScopeId("data-v-63a8a7f8"),e=e(),t.popScopeId(),e),sht={class:"prematch-bg"},lht={class:"background-shields"},cht={class:"shield-left"},uht=["src"],dht={class:"shield-right"},pht=["src"],hht=i7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),fht={class:"subtitle"},mht={class:"jornada"},yht={class:"fecha"},ght={class:"teams-grid"},vht={class:"row row-top"},bht={class:"team team-local"},xht={class:"escudo-svg"},_ht=["src"],wht={class:"team-name"},Tht={class:"score"},Sht={class:"score-text"},kht={class:"team team-visitor"},Lht={class:"team-name"},Eht={class:"escudo-svg"},Cht=["src"],Nht={class:"row row-bottom"},Oht={class:"team-stats"},Mht=t.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1),Vht={class:"stat red"},zht=i7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),Pht={class:"stat-number"},Aht={class:"stat yellow"},Rht=i7(()=>t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),Uht={class:"stat-number"},Fht=i7(()=>t.createElementVNode("div",{class:"empty"},null,-1)),Iht={class:"team-stats"},qht={class:"stat-number"},jht=i7(()=>t.createElementVNode("span",{class:"stat yellow"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),Wht={class:"stat-number"},Dht=i7(()=>t.createElementVNode("span",{class:"stat red"},[t.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),Kht=t.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1),Bht=ov({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(e){function r(c){return c?c.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var k,T,x;const c=(x=(T=(k=a.report)==null?void 0:k.game)==null?void 0:T.minutes)==null?void 0:x.home_goals_minutes;if(!Array.isArray(c)||c.length===0)return null;const n=c.map(d=>{const o=d.match(/(\d+)'$/);return o?o[1]+"'":""}).filter(d=>d!=="");if(n.length>5){const d=n.slice(0,5).join(", "),o=n.slice(5).join(", ");return`${d}
|
|
8009
8009
|
${o}`}return n.join(", ")}),$=t.computed(()=>{var k,T,x;const c=(x=(T=(k=a.report)==null?void 0:k.game)==null?void 0:T.minutes)==null?void 0:x.visiting_goals_minutes;if(!Array.isArray(c)||c.length===0)return null;const n=c.map(d=>{const o=d.match(/(\d+)'$/);return o?o[1]+"'":""}).filter(d=>d!=="");if(n.length>5){const d=n.slice(0,5).join(", "),o=n.slice(5).join(", ");return`${d}
|
|
8010
8010
|
${o}`}return n.join(", ")}),h=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.home_red_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),u=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.home_yellow_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),i=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.away_yellow_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null}),p=t.computed(()=>{var n,k,T;const c=(T=(k=(n=a.report)==null?void 0:n.game)==null?void 0:k.minutes)==null?void 0:T.away_red_cards_minutes;return Array.isArray(c)&&c.length>0?c.length:null});return(c,n)=>(t.openBlock(),t.createElementBlock("div",sht,[t.createElementVNode("div",lht,[t.createElementVNode("div",cht,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+e.report.game.home_team+".png",alt:"Escudo local"},null,8,uht)]),t.createElementVNode("div",dht,[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+e.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,pht)])]),hht,t.createElementVNode("div",fht,[t.createElementVNode("span",mht,"Jornada "+t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",yht," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",ght,[t.createElementVNode("div",vht,[t.createElementVNode("div",bht,[t.createElementVNode("span",xht,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,_ht)]),t.createElementVNode("span",wht,t.toDisplayString(e.report.game.home_team_acronym),1)]),t.createElementVNode("div",Tht,[t.createElementVNode("span",Sht,t.toDisplayString(e.report.game.score[0])+":"+t.toDisplayString(e.report.game.score[1]),1)]),t.createElementVNode("div",kht,[t.createElementVNode("span",Lht,t.toDisplayString(e.report.game.visiting_team_acronym),1),t.createElementVNode("span",Eht,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,Cht)])])]),t.createElementVNode("div",Nht,[t.createElementVNode("div",Oht,[Mht,v.value!==null?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["stat time",{"two-lines":v.value&&v.value.includes(`
|
|
8011
8011
|
`)}])},t.toDisplayString(v.value),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["separator",{"two-lines":v.value&&v.value.includes(`
|
|
8012
8012
|
`)}])},null,2),t.createElementVNode("span",Vht,[zht,t.createElementVNode("span",Pht,t.toDisplayString(h.value||0),1)]),t.createElementVNode("span",Aht,[Rht,t.createElementVNode("span",Uht,t.toDisplayString(u.value||0),1)])]),Fht,t.createElementVNode("div",Iht,[t.createElementVNode("span",qht,t.toDisplayString(i.value||0),1),jht,t.createElementVNode("span",Wht,t.toDisplayString(p.value||0),1),Dht,t.createElementVNode("div",{class:t.normalizeClass(["separator",{"two-lines":$.value&&$.value.includes(`
|
|
8013
8013
|
`)}])},null,2),$.value!==null?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["stat time",{"two-lines":$.value&&$.value.includes(`
|
|
8014
|
-
`)}])},t.toDisplayString($.value),3)):t.createCommentVNode("",!0),Kht])])])]))}},[["__scopeId","data-v-2a752817"]]),CJ=e=>(t.pushScopeId("data-v-23601285"),e=e(),t.popScopeId(),e),Xht={class:"prematch-bg"},Ght=CJ(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Zht={class:"subtitle"},Jht={class:"jornada"},Hht={class:"fecha"},Yht={class:"teams-row"},Qht={class:"team team-local"},$ht={class:"escudo-svg"},eft=["src"],tft=CJ(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),rft={class:"team team-visitor"},aft={class:"escudo-svg"},nft=["src"],ift=ov({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Xht,[Ght,t.createElementVNode("div",Zht,[t.createElementVNode("span",Jht,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Hht," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",Yht,[t.createElementVNode("div",Qht,[t.createElementVNode("span",$ht,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,eft)])]),tft,t.createElementVNode("div",rft,[t.createElementVNode("span",aft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,nft)])])])]))}},[["__scopeId","data-v-23601285"]]),o7=e=>(t.pushScopeId("data-v-893ebf20"),e=e(),t.popScopeId(),e),oft={class:"prematch-bg"},sft=o7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),lft={class:"subtitle"},cft={class:"jornada"},uft={class:"fecha"},dft={class:"teams-row"},pft={class:"team team-local"},hft={class:"team-header"},fft={class:"escudo-svg"},mft=["src"],yft={class:"score"},gft={class:"players-list"},vft={class:"player-name"},bft=o7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),xft={key:0,class:"more-events-indicator"},_ft=[o7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],wft=o7(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),Tft={class:"team team-visitor"},Sft={class:"team-header"},kft={class:"score"},Lft={class:"escudo-svg"},Eft=["src"],Cft={class:"players-list"},Nft=o7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Oft={class:"player-name"},Mft={key:0},Vft={key:0,class:"more-events-indicator"},zft=[o7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],Pft=ov({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(e){function r(p){return p?p.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.home_goals_minutes)||[]).slice(0,5)}),$=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.visiting_goals_minutes)||[]).slice(0,5)});function h(p){const c=Array.from(p.matchAll(/\d+\s*\+*\s*\d*'/g)).map(T=>T[0]).join(", "),n=p.match(/^(.*?)\s*\d+'/),k=n?" "+n[1].trim():"";return{minutos:c,nombre:k}}const u=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.home_goals_minutes)==null?void 0:T.length)||0)>5}),i=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.visiting_goals_minutes)==null?void 0:T.length)||0)>5});return(p,c)=>(t.openBlock(),t.createElementBlock("div",oft,[sft,t.createElementVNode("div",lft,[t.createElementVNode("span",cft,"Jornada "+t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",uft," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",dft,[t.createElementVNode("div",pft,[t.createElementVNode("div",hft,[t.createElementVNode("span",fft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,mft)]),t.createElementVNode("div",yft,t.toDisplayString(e.report.game.score[0]),1)]),t.createElementVNode("div",gft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`home-event-${k}`,class:"player-item"},[t.createElementVNode("span",vft,t.toDisplayString(n)+" ",1),bft]))),128)),u.value?(t.openBlock(),t.createElementBlock("div",xft,_ft)):t.createCommentVNode("",!0)])]),wft,t.createElementVNode("div",Tft,[t.createElementVNode("div",Sft,[t.createElementVNode("div",kft,t.toDisplayString(e.report.game.score[1]),1),t.createElementVNode("span",Lft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,Eft)])]),t.createElementVNode("div",Cft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`visiting-event-${k}`,class:"player-item"},[Nft,t.createElementVNode("span",Oft,[t.createTextVNode(t.toDisplayString(h(n).minutos)+" ",1),h(n).nombre?(t.openBlock(),t.createElementBlock("span",Mft,t.toDisplayString(h(n).nombre),1)):t.createCommentVNode("",!0)])]))),128)),i.value?(t.openBlock(),t.createElementBlock("div",Vft,zft)):t.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-893ebf20"]]),NJ=e=>(t.pushScopeId("data-v-347d4c02"),e=e(),t.popScopeId(),e),Aft={class:"prematch-bg"},Rft=NJ(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Uft={class:"subtitle"},Fft={class:"jornada"},Ift={class:"fecha"},qft={class:"teams-row"},jft={class:"team team-local"},Wft={class:"escudo-svg"},Dft=["src"],Kft=NJ(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),Bft={class:"team team-visitor"},Xft={class:"escudo-svg"},Gft=["src"],Zft=ov({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Aft,[Rft,t.createElementVNode("div",Uft,[t.createElementVNode("span",Fft,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Ift," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",qft,[t.createElementVNode("div",jft,[t.createElementVNode("span",Wft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Dft)])]),Kft,t.createElementVNode("div",Bft,[t.createElementVNode("span",Xft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Gft)])])])]))}},[["__scopeId","data-v-347d4c02"]]),s7=e=>(t.pushScopeId("data-v-9c7a5ed5"),e=e(),t.popScopeId(),e),Jft={class:"prematch-bg"},Hft=s7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),Yft={class:"subtitle"},Qft={class:"jornada"},$ft={class:"fecha"},emt={class:"teams-row"},tmt={class:"team team-local"},rmt={class:"team-header"},amt={class:"escudo-svg"},nmt=["src"],imt={class:"score"},omt={class:"players-list"},smt={class:"player-name"},lmt=s7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),cmt={key:0,class:"more-events-indicator"},umt=[s7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],dmt=s7(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),pmt={class:"team team-visitor"},hmt={class:"team-header"},fmt={class:"score"},mmt={class:"escudo-svg"},ymt=["src"],gmt={class:"players-list"},vmt=s7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),bmt={class:"player-name"},xmt={key:0},_mt={key:0,class:"more-events-indicator"},wmt=[s7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],Tmt=ov({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(e){function r(p){return p?p.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.home_goals_minutes)||[]).slice(0,5)}),$=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.visiting_goals_minutes)||[]).slice(0,5)});function h(p){const c=Array.from(p.matchAll(/\d+\s*\+*\s*\d*'/g)).map(T=>T[0]).join(", "),n=p.match(/^(.*?)\s*\d+'/),k=n?n[1].trim():"";return{minutos:c,nombre:k}}const u=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.home_goals_minutes)==null?void 0:T.length)||0)>5}),i=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.visiting_goals_minutes)==null?void 0:T.length)||0)>5});return(p,c)=>(t.openBlock(),t.createElementBlock("div",Jft,[Hft,t.createElementVNode("div",Yft,[t.createElementVNode("span",Qft,"Jornada "+t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",$ft," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",emt,[t.createElementVNode("div",tmt,[t.createElementVNode("div",rmt,[t.createElementVNode("span",amt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,nmt)]),t.createElementVNode("div",imt,t.toDisplayString(e.report.game.score[0]),1)]),t.createElementVNode("div",omt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`home-event-${k}`,class:"player-item"},[t.createElementVNode("span",smt,t.toDisplayString(n)+" ",1),lmt]))),128)),u.value?(t.openBlock(),t.createElementBlock("div",cmt,umt)):t.createCommentVNode("",!0)])]),dmt,t.createElementVNode("div",pmt,[t.createElementVNode("div",hmt,[t.createElementVNode("div",fmt,t.toDisplayString(e.report.game.score[1]),1),t.createElementVNode("span",mmt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,ymt)])]),t.createElementVNode("div",gmt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`visiting-event-${k}`,class:"player-item"},[vmt,t.createElementVNode("span",bmt,[t.createTextVNode(t.toDisplayString(h(n).minutos)+" ",1),h(n).nombre?(t.openBlock(),t.createElementBlock("span",xmt," "+t.toDisplayString(h(n).nombre),1)):t.createCommentVNode("",!0)])]))),128)),i.value?(t.openBlock(),t.createElementBlock("div",_mt,wmt)):t.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-9c7a5ed5"]]),LA=e=>(t.pushScopeId("data-v-34e6ad47"),e=e(),t.popScopeId(),e),Smt={class:"report-card",style:{position:"relative"}},kmt=[LA(()=>t.createElementVNode("span",null,null,-1)),LA(()=>t.createElementVNode("span",null,null,-1)),LA(()=>t.createElementVNode("span",null,null,-1))],Lmt={class:"report-img-placeholder",style:{position:"relative"}},Emt={class:"inner-card-report"},Cmt={class:"report-footer"},Nmt={class:"report-title"},Omt={class:"report-template"},Mmt={class:"template-name"},Vmt={class:"report-league"},zmt={class:"report-tournament"},Pmt=ov({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(e,{emit:r}){const a=r,v=e,$=t.ref(!1);function h(){$.value=!1,a("open-report",v.report)}function u(){$.value=!1,a("renombrar",v.report.report_name||"Reporte",v.report.id)}function i(){$.value=!1,a("edit-template",v.report)}function p(){$.value=!1}function c(){$.value=!1,a("eliminar",v.report)}function n(){a("download-report",v.report),$.value=!1}function k(x){return x?x.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function T(){a("open-report",v.report)}return(x,d)=>(t.openBlock(),t.createElementBlock("div",Smt,[t.createElementVNode("div",{class:"three-dots",onClick:d[0]||(d[0]=t.withModifiers(o=>$.value=!$.value,["stop"]))},kmt),t.createElementVNode("div",Lmt,[e.report.template_type===1&&e.report.pages[0].type==1?(t.openBlock(),t.createBlock(ept,{key:0,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==1?(t.openBlock(),t.createBlock(Ipt,{key:1,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),e.report.template_type===1&&e.report.pages[0].type==2?(t.openBlock(),t.createBlock(oht,{key:2,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==2?(t.openBlock(),t.createBlock(Bht,{key:3,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),e.report.template_type===1&&e.report.pages[0].type==3?(t.openBlock(),t.createBlock(ift,{key:4,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==3?(t.openBlock(),t.createBlock(Pft,{key:5,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):e.report.template_type===1&&e.report.pages[0].type==4?(t.openBlock(),t.createBlock(Zft,{key:6,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==4?(t.openBlock(),t.createBlock(Tmt,{key:7,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"report-img-overlay"},[t.createElementVNode("button",{class:"report-img-button",onClick:T},"Ver reporte")])]),t.createElementVNode("div",Emt,[t.createElementVNode("div",Cmt,[t.createElementVNode("div",Nmt,t.toDisplayString(e.report.report_name),1),t.createElementVNode("div",Omt,[t.createTextVNode(" Template: "),t.createElementVNode("span",Mmt,t.toDisplayString(e.report.name),1)]),t.createElementVNode("div",Vmt,t.toDisplayString(e.report.season_name)+" - "+t.toDisplayString(k(e.report.game.matchday_name))+" | "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1),t.createElementVNode("div",zmt,t.toDisplayString(e.report.tournament_name),1)])]),$.value?(t.openBlock(),t.createBlock(zdt,{key:0,onClick:d[1]||(d[1]=t.withModifiers(o=>$.value=!1,["self"])),onMouseleave:d[2]||(d[2]=o=>$.value=!1),onVerReporte:h,onRenombrar:u,onEditar:i,onDuplicar:p,onEliminar:c,onDescargar:n})):t.createCommentVNode("",!0),$.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:d[3]||(d[3]=o=>$.value=!1)})):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-34e6ad47"]]),b9=e=>(t.pushScopeId("data-v-a6ea9581"),e=e(),t.popScopeId(),e),Amt={class:"modal-overlay"},Rmt={class:"modal-content"},Umt=[b9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Fmt=b9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),Imt=b9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),qmt={class:"modal-body"},jmt=b9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),Wmt=["placeholder","disabled"],Dmt={key:0,class:"error-message"},Kmt=b9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Bmt={class:"modal-footer"},Xmt=["disabled"],Gmt=["disabled"],Zmt={key:0},Jmt={key:1},Hmt=ov({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName),h=t.ref(!1),u=t.ref("");t.watch(()=>a.initialName,p=>{$.value=p,u.value=""});async function i(){var p;if(!($.value.trim().length<3)){h.value=!0,u.value="";try{await V0.create({headers:{Authorization:`${a.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports/${a.reportId}/rename`,{name:$.value.trim()}),v("rename",$.value.trim()),v("refresh"),v("close")}catch(c){console.error("Error al renombrar el reporte:",c),((p=c.response)==null?void 0:p.status)===409?u.value="Ya existe un reporte con el mismo nombre":u.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{h.value=!1}}}return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(p,c)=>(t.openBlock(),t.createElementBlock("div",Amt,[t.createElementVNode("div",Rmt,[t.createElementVNode("button",{class:"close-btn",onClick:c[0]||(c[0]=n=>p.$emit("close"))},Umt),Fmt,Imt,t.createElementVNode("div",qmt,[jmt,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":c[1]||(c[1]=n=>$.value=n),placeholder:e.initialName,maxlength:"40",autocomplete:"off",disabled:h.value},null,8,Wmt),[[t.vModelText,$.value]]),u.value?(t.openBlock(),t.createElementBlock("div",Dmt,t.toDisplayString(u.value),1)):t.createCommentVNode("",!0)]),Kmt,t.createElementVNode("div",Bmt,[t.createElementVNode("button",{class:"cancel-btn",onClick:c[2]||(c[2]=n=>p.$emit("close")),disabled:h.value},"Cancelar",8,Xmt),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:i},[h.value?(t.openBlock(),t.createElementBlock("span",Zmt,"Guardando...")):(t.openBlock(),t.createElementBlock("span",Jmt,"Guardar"))],8,Gmt)])])]))}},[["__scopeId","data-v-a6ea9581"]]),Ymt=e=>(t.pushScopeId("data-v-2bd7ac3a"),e=e(),t.popScopeId(),e),Qmt={class:"modal-overlay"},$mt={class:"modal-content"},e0t=[Ymt(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],t0t=t.createStaticVNode('<div class="modal-header" data-v-2bd7ac3a><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-2bd7ac3a><span class="modal-title" data-v-2bd7ac3a>Eliminar reporte</span></div><div class="header-separator" data-v-2bd7ac3a></div><div class="modal-body confirm-text" data-v-2bd7ac3a> ¿Estás seguro que deseas eliminar<br data-v-2bd7ac3a> este reporte? Si lo haces no habrá manera<br data-v-2bd7ac3a> de recuperarlo. </div><div class="header-separator" data-v-2bd7ac3a></div>',4),r0t={class:"modal-footer"},a0t=["disabled"],n0t=["disabled"],i0t=ov({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1),h=async()=>{try{$.value=!0;const i=await V0.create({headers:{Authorization:`${a.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports/${a.reportId}`);v("reportDeleted",a.reportId),v("close")}catch(u){console.error("Error al eliminar el reporte:",u),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{$.value=!1}};return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(u,i)=>(t.openBlock(),t.createElementBlock("div",Qmt,[t.createElementVNode("div",$mt,[t.createElementVNode("button",{class:"close-btn",onClick:i[0]||(i[0]=p=>u.$emit("close"))},e0t),t0t,t.createElementVNode("div",r0t,[t.createElementVNode("button",{class:"cancel-btn",onClick:i[1]||(i[1]=p=>u.$emit("close")),disabled:$.value},"Cancelar",8,a0t),t.createElementVNode("button",{class:"delete-btn",onClick:h,disabled:$.value},t.toDisplayString($.value?"Eliminando...":"Eliminar"),9,n0t)])])]))}},[["__scopeId","data-v-2bd7ac3a"]]),EA=e=>(t.pushScopeId("data-v-ef279597"),e=e(),t.popScopeId(),e),o0t={class:"reports-header"},s0t={class:"count"},l0t={key:0,class:"sort-options"},c0t=["onClick"],u0t={key:0,class:"checkmark"},d0t=[EA(()=>t.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],p0t={key:0,class:"loading-state"},h0t=[EA(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),EA(()=>t.createElementVNode("p",null,"Cargando reportes...",-1))],f0t={key:1,class:"error-state"},m0t={key:3,class:"empty-reports"},y0t={key:4,class:"empty-reports"},g0t=ov({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([]),h=t.ref(!1),u=t.ref(null),i=t.computed(()=>{let me=$.value;if(a.searchQuery.trim()){const ge=a.searchQuery.toLowerCase().trim();me=$.value.filter(be=>{var Ue,je,Re,We,Qe,rt,pt;return!!((((Ue=be.report_name)==null?void 0:Ue.toLowerCase())||"").includes(ge)||(((je=be.name)==null?void 0:je.toLowerCase())||"").includes(ge)||be.created_at&&new Date(be.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(ge)||(Re=be.game)!=null&&Re.date_time_utc&&new Date(be.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(ge)||(((Qe=(We=be.game)==null?void 0:We.season_name)==null?void 0:Qe.toLowerCase())||"").includes(ge)||(((rt=be.tournament_name)==null?void 0:rt.toLowerCase())||"").includes(ge)||(pt=be.game)!=null&&pt.matchday&&be.game.matchday.toString().includes(ge))})}return c.value&&(me=[...me].sort((ge,be)=>{var xe,Ae;if(c.value==="A - Z"){const qe=(ge.report_name||"").toLowerCase(),_e=(be.report_name||"").toLowerCase();return qe.localeCompare(_e,"es",{sensitivity:"base"})}else if(c.value==="Más recientes"){const qe=new Date(ge.created_at||0);return new Date(be.created_at||0)-qe}else if(c.value==="Torneo"){const qe=(ge.tournament_name||"").toLowerCase(),_e=(be.tournament_name||"").toLowerCase();if(qe!==_e)return qe.localeCompare(_e,"es",{sensitivity:"base"});const Ue=ge.season_id||0;return(be.season_id||0)-Ue}else if(c.value==="Jornada"){const qe=((xe=ge.game)==null?void 0:xe.matchday_id)||0,_e=((Ae=be.game)==null?void 0:Ae.matchday_id)||0;return qe-_e}return 0})),me}),p=t.ref(!1),c=t.ref("Más recientes"),n=t.ref(!1),k=t.ref(""),T=t.ref(""),x=t.ref(""),d=t.ref(!1),o=t.ref(""),l=t.ref(""),s=t.ref(null),f=t.ref(null),g=t.ref(null),S=t.ref(0),L=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],M=async()=>{h.value=!0,u.value=null;try{const me=await V0.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports`,{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});me.data&&Array.isArray(me.data)?$.value=me.data:me.data&&me.data.reports?$.value=me.data.reports:me.data&&me.data.data?$.value=me.data.data:$.value=[]}catch(me){console.error("Error cargando reportes:",me),console.error("Error response:",me.response),u.value=me.message||"Error al cargar los reportes",$.value=[]}finally{h.value=!1}},A=t.computed(()=>{if(!S.value)return"grid-1-column";const me=340,ge=20,xe=S.value-40,Ae=Math.floor((xe+ge)/(me+ge)),qe=Math.max(1,Ae);return qe>=4?"grid-4-columns":qe>=3?"grid-3-columns":qe>=2?"grid-2-columns":"grid-1-column"}),z=()=>{p.value=!p.value},I=me=>{c.value=me,p.value=!1};function j(me){v("open-report",me)}const F=(me,ge)=>{k.value=me,T.value=ge;const be=$.value.find(xe=>xe.id===ge);x.value=be?be.template_type:"",n.value=!0},W=me=>{n.value=!1;const ge=$.value.findIndex(be=>be.id===T.value);ge!==-1&&($.value[ge].report_name=me)},U=me=>{o.value=me.report_name||"Reporte",l.value=me.id,d.value=!0},O=me=>{d.value=!1,$.value=$.value.filter(ge=>ge.id!==me)};function X(me){v("download-report",me)}const N=me=>{p.value&&s.value&&!s.value.contains(me.target)&&(p.value=!1)},Y=()=>{f.value&&(S.value=f.value.offsetWidth)};let se=null;return t.onMounted(async()=>{document.addEventListener("mousedown",N),await M(),await t.nextTick(),Y(),window.ResizeObserver?(se=new ResizeObserver(()=>{Y()}),f.value&&se.observe(f.value)):window.addEventListener("resize",Y)}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",N),se?se.disconnect():window.removeEventListener("resize",Y)}),(me,ge)=>(t.openBlock(),t.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:f},[t.createElementVNode("div",o0t,[t.createElementVNode("span",null,[t.createTextVNode("Reportes "),t.createElementVNode("span",s0t,"("+t.toDisplayString(i.value.length)+")",1)]),t.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:s},[t.createElementVNode("button",{class:"sort-button",onClick:z},[t.createTextVNode(t.toDisplayString(c.value||"Ordenar")+" ",1),t.createElementVNode("span",{class:t.normalizeClass(["dropdown-arrow",{rotated:p.value}])},null,2)]),p.value?(t.openBlock(),t.createElementBlock("div",l0t,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(L,be=>t.createElementVNode("div",{key:be.value,class:t.normalizeClass(["sort-option",{selected:c.value===be.value}]),onClick:xe=>c.value!==be.value&&I(be.value)},[t.createElementVNode("span",null,t.toDisplayString(be.label),1),c.value===be.value?(t.openBlock(),t.createElementBlock("span",u0t,d0t)):t.createCommentVNode("",!0)],10,c0t)),64))])):t.createCommentVNode("",!0)],512)]),h.value?(t.openBlock(),t.createElementBlock("div",p0t,h0t)):u.value?(t.openBlock(),t.createElementBlock("div",f0t,[t.createElementVNode("p",null,"Error al cargar reportes: "+t.toDisplayString(u.value),1),t.createElementVNode("button",{onClick:M,class:"retry-button"},"Reintentar")])):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["reports-grid",A.value]),ref_key:"reportsGridRef",ref:g},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,be=>(t.openBlock(),t.createBlock(Pmt,{key:be.id,report:be,onOpenReport:j,onRenombrar:F,onEliminar:U,onDownloadReport:X},null,8,["report"]))),128))],2)),!h.value&&!u.value&&$.value.length===0?(t.openBlock(),t.createElementBlock("div",m0t," No tienes reportes aún. ")):t.createCommentVNode("",!0),!h.value&&!u.value&&$.value.length>0&&i.value.length===0?(t.openBlock(),t.createElementBlock("div",y0t," No se encontraron reportes que coincidan con tu búsqueda. ")):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock(Hmt,{key:5,initialName:k.value,templateType:x.value,token:e.token,userId:e.userId,reportId:T.value,onClose:ge[0]||(ge[0]=be=>n.value=!1),onRename:W,onRefresh:M},null,8,["initialName","templateType","token","userId","reportId"])):t.createCommentVNode("",!0),d.value?(t.openBlock(),t.createBlock(i0t,{key:6,"report-id":l.value,"user-id":e.userId,token:e.token,onClose:ge[1]||(ge[1]=be=>d.value=!1),onReportDeleted:O},null,8,["report-id","user-id","token"])):t.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-ef279597"]]),v0t={class:"modal-overlay"},b0t={class:"modal-content"},x0t=t.createStaticVNode('<div class="modal-icon" data-v-76d7f6ed><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-76d7f6ed><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-76d7f6ed></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-76d7f6ed></rect></svg></div><div class="modal-text" data-v-76d7f6ed> Esta sección solo está disponible para<br data-v-76d7f6ed> escritorio. Utiliza tu computadora <br data-v-76d7f6ed>para ingresar. </div>',2),_0t=ov({__name:"ModalSoloEscritorio",setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",v0t,[t.createElementVNode("div",b0t,[x0t,t.createElementVNode("button",{class:"modal-btn",onClick:a[0]||(a[0]=v=>r.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-76d7f6ed"]]),l7=e=>(t.pushScopeId("data-v-9ffb4e12"),e=e(),t.popScopeId(),e),w0t=l7(()=>t.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),T0t={class:"top-bar"},S0t={class:"tabs-container"},k0t={class:"tabs"},L0t={key:0,class:"actions"},E0t={class:"search-container"},C0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),N0t=[l7(()=>t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],O0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1)),M0t={key:1,class:"actions"},V0t={class:"search-container"},z0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),P0t=[l7(()=>t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],A0t=ov({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(e,{emit:r}){const a=e,{userId:v,team:$,token:h}=a,u=t.ref("templates"),i=t.ref(!1),p=t.ref(null),c=t.ref(!1),n=t.ref(""),k=t.ref(""),T=t.ref(null),x=t.ref(null),d=t.ref(0),o=r;function l(){if(p.value){const I=p.value.offsetWidth;i.value=I<1028}}t.watch(i,I=>{I?document.body.style.overflow="hidden":document.body.style.overflow=""}),t.onBeforeUnmount(()=>{document.body.style.overflow=""}),t.onMounted(()=>{l(),window.addEventListener("resize",l)}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",l)});function s(I){f(I)}function f(I){T.value.show({template:I,isTemplateMode:!0})}const g=()=>{n.value=""},S=()=>{k.value=""};function L(I){T.value&&T.value.show({template:I,isTemplateMode:!1})}function M(I){o("download-report",I)}function A(){o("toHome")}function z(){x.value&&x.value.obtenerTemplates(),d.value+=1}return(I,j)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(unt),{ref_key:"reportTemplateMaker",ref:T,token:t.unref(h),"user-team-id":t.unref($),onClose:z},null,8,["token","user-team-id"]),t.createElementVNode("div",{ref_key:"containerRef",ref:p,class:"reports-container"},[i.value?(t.openBlock(),t.createBlock(_0t,{key:0,onToHome:A})):t.createCommentVNode("",!0),w0t,t.createElementVNode("div",T0t,[t.createElementVNode("div",S0t,[t.createElementVNode("div",k0t,[t.createElementVNode("div",{class:t.normalizeClass(["tab tab-templates",{active:u.value==="templates"}]),onClick:j[0]||(j[0]=F=>u.value="templates")}," Templates ",2),t.createElementVNode("div",{class:t.normalizeClass(["tab tab-reports",{active:u.value==="reports"}]),onClick:j[1]||(j[1]=F=>u.value="reports")}," Tus reportes ",2)])]),u.value==="templates"?(t.openBlock(),t.createElementBlock("div",L0t,[t.createElementVNode("div",E0t,[C0t,t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":j[2]||(j[2]=F=>n.value=F),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[t.vModelText,n.value]]),n.value?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:g,class:"clear-search-btn",type:"button"},N0t)):t.createCommentVNode("",!0)]),t.createElementVNode("button",{class:"create-template-btn",onClick:j[3]||(j[3]=F=>c.value=!0)},[O0t,t.createTextVNode(" Crear template ")])])):t.createCommentVNode("",!0),u.value==="reports"?(t.openBlock(),t.createElementBlock("div",M0t,[t.createElementVNode("div",V0t,[z0t,t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":j[4]||(j[4]=F=>k.value=F),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[t.vModelText,k.value]]),k.value?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:S,class:"clear-search-btn",type:"button"},P0t)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),u.value==="templates"?(t.openBlock(),t.createBlock(Cdt,{ref_key:"templatesSectionRef",ref:x,userId:t.unref(v),token:t.unref(h),team:t.unref($),searchQuery:n.value,key:d.value,onSwitchToReports:j[5]||(j[5]=F=>u.value="reports"),onOpenModalNewTemplate:s,onEditTemplate:f},null,8,["userId","token","team","searchQuery"])):(t.openBlock(),t.createBlock(g0t,{key:2,userId:t.unref(v),token:t.unref(h),team:t.unref($),searchQuery:k.value,onOpenReport:L,onDownloadReport:M},null,8,["userId","token","team","searchQuery"])),c.value?(t.openBlock(),t.createBlock(kJ,{key:3,token:t.unref(h),team:t.unref($),onOpenModalNewTemplate:s,onClose:j[6]||(j[6]=F=>c.value=!1)},null,8,["token","team"])):t.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-9ffb4e12"]]),R0t={class:"subcategory-group"},U0t={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",R0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,v=>(t.openBlock(),t.createBlock(t.unref(dV),{key:v.id,modelValue:v.isSelected,"onUpdate:modelValue":$=>v.isSelected=$,label:v.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},F0t=A_(U0t,[["__scopeId","data-v-ae6f3d72"]]),I0t={class:"filter-subcategories"},q0t=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",I0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,v=>(t.openBlock(),t.createElementBlock("div",{key:v.id,class:"filter-subcategories__group"},[t.createVNode(F0t,{subcategoryGroup:v},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),WN=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),j0t={class:"details__header"},W0t=WN(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),D0t={class:"details__header__checkbox"},K0t={class:"details__body"},B0t={class:"details__body__playing-as"},X0t=["onClick"],G0t={class:"details__header"},Z0t=WN(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),J0t={class:"details__header__checkbox"},H0t={class:"details__body"},Y0t=WN(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Q0t={class:"details__body__game-section"},$0t=["onClick"],eyt={class:"details__body"},tyt=WN(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ryt={class:"details__body__game-section"},ayt=["onClick"],nyt=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const r=e;t.useCssVars(n=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const a=t.computed(()=>r.playingAs.every(n=>n.isSelected)),v=t.computed(()=>r.gameSections.every(n=>n.isSelected)),$=t.computed(()=>r.gameSections.reduce((n,k)=>(k.value<=3?n.firstHalf.push(k):n.secondHalf.push(k),n),{firstHalf:[],secondHalf:[]})),h=t.computed(()=>({"--border-radius-first-button":`${r.buttonsBorderRadius} 0 0 ${r.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${r.buttonsBorderRadius} ${r.buttonsBorderRadius} 0`}));function u(n){n?r.playingAs.forEach(k=>{k.isSelected=!0}):r.playingAs.forEach((k,T)=>{k.isSelected=T===0})}function i(n){r.playingAs.filter(k=>k.isSelected).length===1&&n.isSelected||(n.isSelected=!n.isSelected)}function p(n){r.gameSections.filter(k=>k.isSelected).length===1&&n.isSelected||(n.isSelected=!n.isSelected)}function c(n){n?r.gameSections.forEach(k=>{k.isSelected=!0}):r.gameSections.forEach((k,T)=>{k.isSelected=T===0})}return(n,k)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(h.value)},[t.createElementVNode("div",j0t,[W0t,t.createElementVNode("div",D0t,[t.createVNode(t.unref(dV),{label:"Todos","model-value":a.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),t.createElementVNode("div",K0t,[t.createElementVNode("div",B0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.playingAs,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>i(T)},t.toDisplayString(T.name),11,X0t))),128))])]),t.createElementVNode("div",G0t,[Z0t,t.createElementVNode("div",J0t,[t.createVNode(t.unref(dV),{label:"Todos","model-value":v.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),t.createElementVNode("div",H0t,[Y0t,t.createElementVNode("div",Q0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value.firstHalf,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>p(T)},t.toDisplayString(T.text),11,$0t))),128))])]),t.createElementVNode("div",eyt,[tyt,t.createElementVNode("div",ryt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value.secondHalf,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>p(T)},t.toDisplayString(T.text),11,ayt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),iyt={class:"filter-field"},oyt=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterField",setup(e){const r=t.ref(Array.from({length:16},(v,$)=>$+1));function a(){}return(v,$)=>(t.openBlock(),t.createElementBlock("div",iyt,[t.createVNode(t.unref(Mge),{width:"100%","background-color":"#2E3B46",value:r.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));KT.GSCReports=A0t,Object.defineProperty(KT,Symbol.toStringTag,{value:"Module"})}));
|
|
8014
|
+
`)}])},t.toDisplayString($.value),3)):t.createCommentVNode("",!0),Kht])])])]))}},[["__scopeId","data-v-63a8a7f8"]]),CJ=e=>(t.pushScopeId("data-v-b31afbdf"),e=e(),t.popScopeId(),e),Xht={class:"prematch-bg"},Ght=CJ(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Zht={class:"subtitle"},Jht={class:"jornada"},Hht={class:"fecha"},Yht={class:"teams-row"},Qht={class:"team team-local"},$ht={class:"escudo-svg"},eft=["src"],tft=CJ(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),rft={class:"team team-visitor"},aft={class:"escudo-svg"},nft=["src"],ift=ov({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Xht,[Ght,t.createElementVNode("div",Zht,[t.createElementVNode("span",Jht,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Hht," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",Yht,[t.createElementVNode("div",Qht,[t.createElementVNode("span",$ht,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,eft)])]),tft,t.createElementVNode("div",rft,[t.createElementVNode("span",aft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,nft)])])])]))}},[["__scopeId","data-v-b31afbdf"]]),o7=e=>(t.pushScopeId("data-v-893ebf20"),e=e(),t.popScopeId(),e),oft={class:"prematch-bg"},sft=o7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),lft={class:"subtitle"},cft={class:"jornada"},uft={class:"fecha"},dft={class:"teams-row"},pft={class:"team team-local"},hft={class:"team-header"},fft={class:"escudo-svg"},mft=["src"],yft={class:"score"},gft={class:"players-list"},vft={class:"player-name"},bft=o7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),xft={key:0,class:"more-events-indicator"},_ft=[o7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],wft=o7(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),Tft={class:"team team-visitor"},Sft={class:"team-header"},kft={class:"score"},Lft={class:"escudo-svg"},Eft=["src"],Cft={class:"players-list"},Nft=o7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Oft={class:"player-name"},Mft={key:0},Vft={key:0,class:"more-events-indicator"},zft=[o7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],Pft=ov({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(e){function r(p){return p?p.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.home_goals_minutes)||[]).slice(0,5)}),$=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.visiting_goals_minutes)||[]).slice(0,5)});function h(p){const c=Array.from(p.matchAll(/\d+\s*\+*\s*\d*'/g)).map(T=>T[0]).join(", "),n=p.match(/^(.*?)\s*\d+'/),k=n?" "+n[1].trim():"";return{minutos:c,nombre:k}}const u=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.home_goals_minutes)==null?void 0:T.length)||0)>5}),i=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.visiting_goals_minutes)==null?void 0:T.length)||0)>5});return(p,c)=>(t.openBlock(),t.createElementBlock("div",oft,[sft,t.createElementVNode("div",lft,[t.createElementVNode("span",cft,"Jornada "+t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",uft," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",dft,[t.createElementVNode("div",pft,[t.createElementVNode("div",hft,[t.createElementVNode("span",fft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,mft)]),t.createElementVNode("div",yft,t.toDisplayString(e.report.game.score[0]),1)]),t.createElementVNode("div",gft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`home-event-${k}`,class:"player-item"},[t.createElementVNode("span",vft,t.toDisplayString(n)+" ",1),bft]))),128)),u.value?(t.openBlock(),t.createElementBlock("div",xft,_ft)):t.createCommentVNode("",!0)])]),wft,t.createElementVNode("div",Tft,[t.createElementVNode("div",Sft,[t.createElementVNode("div",kft,t.toDisplayString(e.report.game.score[1]),1),t.createElementVNode("span",Lft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,Eft)])]),t.createElementVNode("div",Cft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`visiting-event-${k}`,class:"player-item"},[Nft,t.createElementVNode("span",Oft,[t.createTextVNode(t.toDisplayString(h(n).minutos)+" ",1),h(n).nombre?(t.openBlock(),t.createElementBlock("span",Mft,t.toDisplayString(h(n).nombre),1)):t.createCommentVNode("",!0)])]))),128)),i.value?(t.openBlock(),t.createElementBlock("div",Vft,zft)):t.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-893ebf20"]]),NJ=e=>(t.pushScopeId("data-v-ef3bf0e5"),e=e(),t.popScopeId(),e),Aft={class:"prematch-bg"},Rft=NJ(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),Uft={class:"subtitle"},Fft={class:"jornada"},Ift={class:"fecha"},qft={class:"teams-row"},jft={class:"team team-local"},Wft={class:"escudo-svg"},Dft=["src"],Kft=NJ(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),Bft={class:"team team-visitor"},Xft={class:"escudo-svg"},Gft=["src"],Zft=ov({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(e){function r(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e;return(v,$)=>(t.openBlock(),t.createElementBlock("div",Aft,[Rft,t.createElementVNode("div",Uft,[t.createElementVNode("span",Fft,t.toDisplayString(r(a.report.game.matchday_name)),1),t.createElementVNode("span",Ift," - "+t.toDisplayString(t.unref(U4)(a.report.game.date_time_utc)),1)]),t.createElementVNode("div",qft,[t.createElementVNode("div",jft,[t.createElementVNode("span",Wft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.home_team+".png"},null,8,Dft)])]),Kft,t.createElementVNode("div",Bft,[t.createElementVNode("span",Xft,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+a.report.game.visiting_team+".png"},null,8,Gft)])])])]))}},[["__scopeId","data-v-ef3bf0e5"]]),s7=e=>(t.pushScopeId("data-v-9c7a5ed5"),e=e(),t.popScopeId(),e),Jft={class:"prematch-bg"},Hft=s7(()=>t.createElementVNode("div",{class:"title"},[t.createTextVNode("Análisis "),t.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),Yft={class:"subtitle"},Qft={class:"jornada"},$ft={class:"fecha"},emt={class:"teams-row"},tmt={class:"team team-local"},rmt={class:"team-header"},amt={class:"escudo-svg"},nmt=["src"],imt={class:"score"},omt={class:"players-list"},smt={class:"player-name"},lmt=s7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),cmt={key:0,class:"more-events-indicator"},umt=[s7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],dmt=s7(()=>t.createElementVNode("div",{class:"divider-line"},[t.createElementVNode("div",{class:"dotted-line"})],-1)),pmt={class:"team team-visitor"},hmt={class:"team-header"},fmt={class:"score"},mmt={class:"escudo-svg"},ymt=["src"],gmt={class:"players-list"},vmt=s7(()=>t.createElementVNode("span",{class:"player-icon"},[t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),bmt={class:"player-name"},xmt={key:0},_mt={key:0,class:"more-events-indicator"},wmt=[s7(()=>t.createElementVNode("span",{class:"more-events-text"},"...",-1))],Tmt=ov({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(e){function r(p){return p?p.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const a=e,v=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.home_goals_minutes)||[]).slice(0,5)}),$=t.computed(()=>{var p,c,n;return(((n=(c=(p=a.report)==null?void 0:p.game)==null?void 0:c.report_minutes)==null?void 0:n.visiting_goals_minutes)||[]).slice(0,5)});function h(p){const c=Array.from(p.matchAll(/\d+\s*\+*\s*\d*'/g)).map(T=>T[0]).join(", "),n=p.match(/^(.*?)\s*\d+'/),k=n?n[1].trim():"";return{minutos:c,nombre:k}}const u=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.home_goals_minutes)==null?void 0:T.length)||0)>5}),i=t.computed(()=>{var c,n,k,T;return(((T=(k=(n=(c=a.report)==null?void 0:c.game)==null?void 0:n.report_minutes)==null?void 0:k.visiting_goals_minutes)==null?void 0:T.length)||0)>5});return(p,c)=>(t.openBlock(),t.createElementBlock("div",Jft,[Hft,t.createElementVNode("div",Yft,[t.createElementVNode("span",Qft,"Jornada "+t.toDisplayString(r(e.report.game.matchday_name)),1),t.createElementVNode("span",$ft," - "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1)]),t.createElementVNode("div",emt,[t.createElementVNode("div",tmt,[t.createElementVNode("div",rmt,[t.createElementVNode("span",amt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.home_team+".png"},null,8,nmt)]),t.createElementVNode("div",imt,t.toDisplayString(e.report.game.score[0]),1)]),t.createElementVNode("div",omt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`home-event-${k}`,class:"player-item"},[t.createElementVNode("span",smt,t.toDisplayString(n)+" ",1),lmt]))),128)),u.value?(t.openBlock(),t.createElementBlock("div",cmt,umt)):t.createCommentVNode("",!0)])]),dmt,t.createElementVNode("div",pmt,[t.createElementVNode("div",hmt,[t.createElementVNode("div",fmt,t.toDisplayString(e.report.game.score[1]),1),t.createElementVNode("span",mmt,[t.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+e.report.game.visiting_team+".png"},null,8,ymt)])]),t.createElementVNode("div",gmt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(n,k)=>(t.openBlock(),t.createElementBlock("div",{key:`visiting-event-${k}`,class:"player-item"},[vmt,t.createElementVNode("span",bmt,[t.createTextVNode(t.toDisplayString(h(n).minutos)+" ",1),h(n).nombre?(t.openBlock(),t.createElementBlock("span",xmt," "+t.toDisplayString(h(n).nombre),1)):t.createCommentVNode("",!0)])]))),128)),i.value?(t.openBlock(),t.createElementBlock("div",_mt,wmt)):t.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-9c7a5ed5"]]),LA=e=>(t.pushScopeId("data-v-34e6ad47"),e=e(),t.popScopeId(),e),Smt={class:"report-card",style:{position:"relative"}},kmt=[LA(()=>t.createElementVNode("span",null,null,-1)),LA(()=>t.createElementVNode("span",null,null,-1)),LA(()=>t.createElementVNode("span",null,null,-1))],Lmt={class:"report-img-placeholder",style:{position:"relative"}},Emt={class:"inner-card-report"},Cmt={class:"report-footer"},Nmt={class:"report-title"},Omt={class:"report-template"},Mmt={class:"template-name"},Vmt={class:"report-league"},zmt={class:"report-tournament"},Pmt=ov({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(e,{emit:r}){const a=r,v=e,$=t.ref(!1);function h(){$.value=!1,a("open-report",v.report)}function u(){$.value=!1,a("renombrar",v.report.report_name||"Reporte",v.report.id)}function i(){$.value=!1,a("edit-template",v.report)}function p(){$.value=!1}function c(){$.value=!1,a("eliminar",v.report)}function n(){a("download-report",v.report),$.value=!1}function k(x){return x?x.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function T(){a("open-report",v.report)}return(x,d)=>(t.openBlock(),t.createElementBlock("div",Smt,[t.createElementVNode("div",{class:"three-dots",onClick:d[0]||(d[0]=t.withModifiers(o=>$.value=!$.value,["stop"]))},kmt),t.createElementVNode("div",Lmt,[e.report.template_type===1&&e.report.pages[0].type==1?(t.openBlock(),t.createBlock(ept,{key:0,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==1?(t.openBlock(),t.createBlock(Ipt,{key:1,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),e.report.template_type===1&&e.report.pages[0].type==2?(t.openBlock(),t.createBlock(oht,{key:2,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==2?(t.openBlock(),t.createBlock(Bht,{key:3,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),e.report.template_type===1&&e.report.pages[0].type==3?(t.openBlock(),t.createBlock(ift,{key:4,"local-team":e.localTeam,"visitor-team":e.visitorTeam,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==3?(t.openBlock(),t.createBlock(Pft,{key:5,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):e.report.template_type===1&&e.report.pages[0].type==4?(t.openBlock(),t.createBlock(Zft,{key:6,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):e.report.template_type===2&&e.report.pages[0].type==4?(t.openBlock(),t.createBlock(Tmt,{key:7,"local-team":e.localTeam,"visitor-team":e.visitorTeam,"local-score":e.localScore,"visitor-score":e.visitorScore,league:e.league,date:e.date,report:e.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"report-img-overlay"},[t.createElementVNode("button",{class:"report-img-button",onClick:T},"Ver reporte")])]),t.createElementVNode("div",Emt,[t.createElementVNode("div",Cmt,[t.createElementVNode("div",Nmt,t.toDisplayString(e.report.report_name),1),t.createElementVNode("div",Omt,[t.createTextVNode(" Template: "),t.createElementVNode("span",Mmt,t.toDisplayString(e.report.name),1)]),t.createElementVNode("div",Vmt,t.toDisplayString(e.report.season_name)+" - "+t.toDisplayString(k(e.report.game.matchday_name))+" | "+t.toDisplayString(t.unref(U4)(e.report.game.date_time_utc)),1),t.createElementVNode("div",zmt,t.toDisplayString(e.report.tournament_name),1)])]),$.value?(t.openBlock(),t.createBlock(zdt,{key:0,onClick:d[1]||(d[1]=t.withModifiers(o=>$.value=!1,["self"])),onMouseleave:d[2]||(d[2]=o=>$.value=!1),onVerReporte:h,onRenombrar:u,onEditar:i,onDuplicar:p,onEliminar:c,onDescargar:n})):t.createCommentVNode("",!0),$.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:d[3]||(d[3]=o=>$.value=!1)})):t.createCommentVNode("",!0)]))}},[["__scopeId","data-v-34e6ad47"]]),b9=e=>(t.pushScopeId("data-v-a6ea9581"),e=e(),t.popScopeId(),e),Amt={class:"modal-overlay"},Rmt={class:"modal-content"},Umt=[b9(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],Fmt=b9(()=>t.createElementVNode("div",{class:"modal-header"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),t.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),Imt=b9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),qmt={class:"modal-body"},jmt=b9(()=>t.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),Wmt=["placeholder","disabled"],Dmt={key:0,class:"error-message"},Kmt=b9(()=>t.createElementVNode("div",{class:"header-separator"},null,-1)),Bmt={class:"modal-footer"},Xmt=["disabled"],Gmt=["disabled"],Zmt={key:0},Jmt={key:1},Hmt=ov({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(a.initialName),h=t.ref(!1),u=t.ref("");t.watch(()=>a.initialName,p=>{$.value=p,u.value=""});async function i(){var p;if(!($.value.trim().length<3)){h.value=!0,u.value="";try{await V0.create({headers:{Authorization:`${a.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports/${a.reportId}/rename`,{name:$.value.trim()}),v("rename",$.value.trim()),v("refresh"),v("close")}catch(c){console.error("Error al renombrar el reporte:",c),((p=c.response)==null?void 0:p.status)===409?u.value="Ya existe un reporte con el mismo nombre":u.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{h.value=!1}}}return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(p,c)=>(t.openBlock(),t.createElementBlock("div",Amt,[t.createElementVNode("div",Rmt,[t.createElementVNode("button",{class:"close-btn",onClick:c[0]||(c[0]=n=>p.$emit("close"))},Umt),Fmt,Imt,t.createElementVNode("div",qmt,[jmt,t.withDirectives(t.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":c[1]||(c[1]=n=>$.value=n),placeholder:e.initialName,maxlength:"40",autocomplete:"off",disabled:h.value},null,8,Wmt),[[t.vModelText,$.value]]),u.value?(t.openBlock(),t.createElementBlock("div",Dmt,t.toDisplayString(u.value),1)):t.createCommentVNode("",!0)]),Kmt,t.createElementVNode("div",Bmt,[t.createElementVNode("button",{class:"cancel-btn",onClick:c[2]||(c[2]=n=>p.$emit("close")),disabled:h.value},"Cancelar",8,Xmt),t.createElementVNode("button",{class:"next-btn",disabled:$.value.trim().length<3||h.value,onClick:i},[h.value?(t.openBlock(),t.createElementBlock("span",Zmt,"Guardando...")):(t.openBlock(),t.createElementBlock("span",Jmt,"Guardar"))],8,Gmt)])])]))}},[["__scopeId","data-v-a6ea9581"]]),Ymt=e=>(t.pushScopeId("data-v-2bd7ac3a"),e=e(),t.popScopeId(),e),Qmt={class:"modal-overlay"},$mt={class:"modal-content"},e0t=[Ymt(()=>t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1))],t0t=t.createStaticVNode('<div class="modal-header" data-v-2bd7ac3a><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-2bd7ac3a><span class="modal-title" data-v-2bd7ac3a>Eliminar reporte</span></div><div class="header-separator" data-v-2bd7ac3a></div><div class="modal-body confirm-text" data-v-2bd7ac3a> ¿Estás seguro que deseas eliminar<br data-v-2bd7ac3a> este reporte? Si lo haces no habrá manera<br data-v-2bd7ac3a> de recuperarlo. </div><div class="header-separator" data-v-2bd7ac3a></div>',4),r0t={class:"modal-footer"},a0t=["disabled"],n0t=["disabled"],i0t=ov({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(e,{emit:r}){const a=e,v=r,$=t.ref(!1),h=async()=>{try{$.value=!0;const i=await V0.create({headers:{Authorization:`${a.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports/${a.reportId}`);v("reportDeleted",a.reportId),v("close")}catch(u){console.error("Error al eliminar el reporte:",u),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{$.value=!1}};return t.onMounted(()=>{document.body.style.overflow="hidden"}),t.onUnmounted(()=>{document.body.style.overflow=""}),(u,i)=>(t.openBlock(),t.createElementBlock("div",Qmt,[t.createElementVNode("div",$mt,[t.createElementVNode("button",{class:"close-btn",onClick:i[0]||(i[0]=p=>u.$emit("close"))},e0t),t0t,t.createElementVNode("div",r0t,[t.createElementVNode("button",{class:"cancel-btn",onClick:i[1]||(i[1]=p=>u.$emit("close")),disabled:$.value},"Cancelar",8,a0t),t.createElementVNode("button",{class:"delete-btn",onClick:h,disabled:$.value},t.toDisplayString($.value?"Eliminando...":"Eliminar"),9,n0t)])])]))}},[["__scopeId","data-v-2bd7ac3a"]]),EA=e=>(t.pushScopeId("data-v-ef279597"),e=e(),t.popScopeId(),e),o0t={class:"reports-header"},s0t={class:"count"},l0t={key:0,class:"sort-options"},c0t=["onClick"],u0t={key:0,class:"checkmark"},d0t=[EA(()=>t.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],p0t={key:0,class:"loading-state"},h0t=[EA(()=>t.createElementVNode("div",{class:"loading-spinner"},null,-1)),EA(()=>t.createElementVNode("p",null,"Cargando reportes...",-1))],f0t={key:1,class:"error-state"},m0t={key:3,class:"empty-reports"},y0t={key:4,class:"empty-reports"},g0t=ov({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(e,{emit:r}){const a=e,v=r,$=t.ref([]),h=t.ref(!1),u=t.ref(null),i=t.computed(()=>{let me=$.value;if(a.searchQuery.trim()){const ge=a.searchQuery.toLowerCase().trim();me=$.value.filter(be=>{var Ue,je,Re,We,Qe,rt,pt;return!!((((Ue=be.report_name)==null?void 0:Ue.toLowerCase())||"").includes(ge)||(((je=be.name)==null?void 0:je.toLowerCase())||"").includes(ge)||be.created_at&&new Date(be.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(ge)||(Re=be.game)!=null&&Re.date_time_utc&&new Date(be.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(ge)||(((Qe=(We=be.game)==null?void 0:We.season_name)==null?void 0:Qe.toLowerCase())||"").includes(ge)||(((rt=be.tournament_name)==null?void 0:rt.toLowerCase())||"").includes(ge)||(pt=be.game)!=null&&pt.matchday&&be.game.matchday.toString().includes(ge))})}return c.value&&(me=[...me].sort((ge,be)=>{var xe,Ae;if(c.value==="A - Z"){const qe=(ge.report_name||"").toLowerCase(),_e=(be.report_name||"").toLowerCase();return qe.localeCompare(_e,"es",{sensitivity:"base"})}else if(c.value==="Más recientes"){const qe=new Date(ge.created_at||0);return new Date(be.created_at||0)-qe}else if(c.value==="Torneo"){const qe=(ge.tournament_name||"").toLowerCase(),_e=(be.tournament_name||"").toLowerCase();if(qe!==_e)return qe.localeCompare(_e,"es",{sensitivity:"base"});const Ue=ge.season_id||0;return(be.season_id||0)-Ue}else if(c.value==="Jornada"){const qe=((xe=ge.game)==null?void 0:xe.matchday_id)||0,_e=((Ae=be.game)==null?void 0:Ae.matchday_id)||0;return qe-_e}return 0})),me}),p=t.ref(!1),c=t.ref("Más recientes"),n=t.ref(!1),k=t.ref(""),T=t.ref(""),x=t.ref(""),d=t.ref(!1),o=t.ref(""),l=t.ref(""),s=t.ref(null),f=t.ref(null),g=t.ref(null),S=t.ref(0),L=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],M=async()=>{h.value=!0,u.value=null;try{const me=await V0.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/reports`,{headers:{Authorization:`${a.token}`,"Content-Type":"application/json"}});me.data&&Array.isArray(me.data)?$.value=me.data:me.data&&me.data.reports?$.value=me.data.reports:me.data&&me.data.data?$.value=me.data.data:$.value=[]}catch(me){console.error("Error cargando reportes:",me),console.error("Error response:",me.response),u.value=me.message||"Error al cargar los reportes",$.value=[]}finally{h.value=!1}},A=t.computed(()=>{if(!S.value)return"grid-1-column";const me=340,ge=20,xe=S.value-40,Ae=Math.floor((xe+ge)/(me+ge)),qe=Math.max(1,Ae);return qe>=4?"grid-4-columns":qe>=3?"grid-3-columns":qe>=2?"grid-2-columns":"grid-1-column"}),z=()=>{p.value=!p.value},I=me=>{c.value=me,p.value=!1};function j(me){v("open-report",me)}const F=(me,ge)=>{k.value=me,T.value=ge;const be=$.value.find(xe=>xe.id===ge);x.value=be?be.template_type:"",n.value=!0},W=me=>{n.value=!1;const ge=$.value.findIndex(be=>be.id===T.value);ge!==-1&&($.value[ge].report_name=me)},U=me=>{o.value=me.report_name||"Reporte",l.value=me.id,d.value=!0},O=me=>{d.value=!1,$.value=$.value.filter(ge=>ge.id!==me)};function X(me){v("download-report",me)}const N=me=>{p.value&&s.value&&!s.value.contains(me.target)&&(p.value=!1)},Y=()=>{f.value&&(S.value=f.value.offsetWidth)};let se=null;return t.onMounted(async()=>{document.addEventListener("mousedown",N),await M(),await t.nextTick(),Y(),window.ResizeObserver?(se=new ResizeObserver(()=>{Y()}),f.value&&se.observe(f.value)):window.addEventListener("resize",Y)}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",N),se?se.disconnect():window.removeEventListener("resize",Y)}),(me,ge)=>(t.openBlock(),t.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:f},[t.createElementVNode("div",o0t,[t.createElementVNode("span",null,[t.createTextVNode("Reportes "),t.createElementVNode("span",s0t,"("+t.toDisplayString(i.value.length)+")",1)]),t.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:s},[t.createElementVNode("button",{class:"sort-button",onClick:z},[t.createTextVNode(t.toDisplayString(c.value||"Ordenar")+" ",1),t.createElementVNode("span",{class:t.normalizeClass(["dropdown-arrow",{rotated:p.value}])},null,2)]),p.value?(t.openBlock(),t.createElementBlock("div",l0t,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(L,be=>t.createElementVNode("div",{key:be.value,class:t.normalizeClass(["sort-option",{selected:c.value===be.value}]),onClick:xe=>c.value!==be.value&&I(be.value)},[t.createElementVNode("span",null,t.toDisplayString(be.label),1),c.value===be.value?(t.openBlock(),t.createElementBlock("span",u0t,d0t)):t.createCommentVNode("",!0)],10,c0t)),64))])):t.createCommentVNode("",!0)],512)]),h.value?(t.openBlock(),t.createElementBlock("div",p0t,h0t)):u.value?(t.openBlock(),t.createElementBlock("div",f0t,[t.createElementVNode("p",null,"Error al cargar reportes: "+t.toDisplayString(u.value),1),t.createElementVNode("button",{onClick:M,class:"retry-button"},"Reintentar")])):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["reports-grid",A.value]),ref_key:"reportsGridRef",ref:g},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,be=>(t.openBlock(),t.createBlock(Pmt,{key:be.id,report:be,onOpenReport:j,onRenombrar:F,onEliminar:U,onDownloadReport:X},null,8,["report"]))),128))],2)),!h.value&&!u.value&&$.value.length===0?(t.openBlock(),t.createElementBlock("div",m0t," No tienes reportes aún. ")):t.createCommentVNode("",!0),!h.value&&!u.value&&$.value.length>0&&i.value.length===0?(t.openBlock(),t.createElementBlock("div",y0t," No se encontraron reportes que coincidan con tu búsqueda. ")):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock(Hmt,{key:5,initialName:k.value,templateType:x.value,token:e.token,userId:e.userId,reportId:T.value,onClose:ge[0]||(ge[0]=be=>n.value=!1),onRename:W,onRefresh:M},null,8,["initialName","templateType","token","userId","reportId"])):t.createCommentVNode("",!0),d.value?(t.openBlock(),t.createBlock(i0t,{key:6,"report-id":l.value,"user-id":e.userId,token:e.token,onClose:ge[1]||(ge[1]=be=>d.value=!1),onReportDeleted:O},null,8,["report-id","user-id","token"])):t.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-ef279597"]]),v0t={class:"modal-overlay"},b0t={class:"modal-content"},x0t=t.createStaticVNode('<div class="modal-icon" data-v-30303ebd><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-30303ebd><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-30303ebd></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-30303ebd></rect></svg></div><div class="modal-text" data-v-30303ebd> Esta sección solo está disponible para<br data-v-30303ebd> escritorio. Utiliza tu computadora <br data-v-30303ebd>para ingresar. </div>',2),_0t=ov({__name:"ModalSoloEscritorio",setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",v0t,[t.createElementVNode("div",b0t,[x0t,t.createElementVNode("button",{class:"modal-btn",onClick:a[0]||(a[0]=v=>r.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-30303ebd"]]),l7=e=>(t.pushScopeId("data-v-9ffb4e12"),e=e(),t.popScopeId(),e),w0t=l7(()=>t.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),T0t={class:"top-bar"},S0t={class:"tabs-container"},k0t={class:"tabs"},L0t={key:0,class:"actions"},E0t={class:"search-container"},C0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),N0t=[l7(()=>t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],O0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1)),M0t={key:1,class:"actions"},V0t={class:"search-container"},z0t=l7(()=>t.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),P0t=[l7(()=>t.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],A0t=ov({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(e,{emit:r}){const a=e,{userId:v,team:$,token:h}=a,u=t.ref("templates"),i=t.ref(!1),p=t.ref(null),c=t.ref(!1),n=t.ref(""),k=t.ref(""),T=t.ref(null),x=t.ref(null),d=t.ref(0),o=r;function l(){if(p.value){const I=p.value.offsetWidth;i.value=I<1028}}t.watch(i,I=>{I?document.body.style.overflow="hidden":document.body.style.overflow=""}),t.onBeforeUnmount(()=>{document.body.style.overflow=""}),t.onMounted(()=>{l(),window.addEventListener("resize",l)}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",l)});function s(I){f(I)}function f(I){T.value.show({template:I,isTemplateMode:!0})}const g=()=>{n.value=""},S=()=>{k.value=""};function L(I){T.value&&T.value.show({template:I,isTemplateMode:!1})}function M(I){o("download-report",I)}function A(){o("toHome")}function z(){x.value&&x.value.obtenerTemplates(),d.value+=1}return(I,j)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(unt),{ref_key:"reportTemplateMaker",ref:T,token:t.unref(h),"user-team-id":t.unref($),onClose:z},null,8,["token","user-team-id"]),t.createElementVNode("div",{ref_key:"containerRef",ref:p,class:"reports-container"},[i.value?(t.openBlock(),t.createBlock(_0t,{key:0,onToHome:A})):t.createCommentVNode("",!0),w0t,t.createElementVNode("div",T0t,[t.createElementVNode("div",S0t,[t.createElementVNode("div",k0t,[t.createElementVNode("div",{class:t.normalizeClass(["tab tab-templates",{active:u.value==="templates"}]),onClick:j[0]||(j[0]=F=>u.value="templates")}," Templates ",2),t.createElementVNode("div",{class:t.normalizeClass(["tab tab-reports",{active:u.value==="reports"}]),onClick:j[1]||(j[1]=F=>u.value="reports")}," Tus reportes ",2)])]),u.value==="templates"?(t.openBlock(),t.createElementBlock("div",L0t,[t.createElementVNode("div",E0t,[C0t,t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":j[2]||(j[2]=F=>n.value=F),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[t.vModelText,n.value]]),n.value?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:g,class:"clear-search-btn",type:"button"},N0t)):t.createCommentVNode("",!0)]),t.createElementVNode("button",{class:"create-template-btn",onClick:j[3]||(j[3]=F=>c.value=!0)},[O0t,t.createTextVNode(" Crear template ")])])):t.createCommentVNode("",!0),u.value==="reports"?(t.openBlock(),t.createElementBlock("div",M0t,[t.createElementVNode("div",V0t,[z0t,t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":j[4]||(j[4]=F=>k.value=F),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[t.vModelText,k.value]]),k.value?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:S,class:"clear-search-btn",type:"button"},P0t)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),u.value==="templates"?(t.openBlock(),t.createBlock(Cdt,{ref_key:"templatesSectionRef",ref:x,userId:t.unref(v),token:t.unref(h),team:t.unref($),searchQuery:n.value,key:d.value,onSwitchToReports:j[5]||(j[5]=F=>u.value="reports"),onOpenModalNewTemplate:s,onEditTemplate:f},null,8,["userId","token","team","searchQuery"])):(t.openBlock(),t.createBlock(g0t,{key:2,userId:t.unref(v),token:t.unref(h),team:t.unref($),searchQuery:k.value,onOpenReport:L,onDownloadReport:M},null,8,["userId","token","team","searchQuery"])),c.value?(t.openBlock(),t.createBlock(kJ,{key:3,token:t.unref(h),team:t.unref($),onOpenModalNewTemplate:s,onClose:j[6]||(j[6]=F=>c.value=!1)},null,8,["token","team"])):t.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-9ffb4e12"]]),R0t={class:"subcategory-group"},U0t={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",R0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,v=>(t.openBlock(),t.createBlock(t.unref(dV),{key:v.id,modelValue:v.isSelected,"onUpdate:modelValue":$=>v.isSelected=$,label:v.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},F0t=A_(U0t,[["__scopeId","data-v-ae6f3d72"]]),I0t={class:"filter-subcategories"},q0t=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(r,a)=>(t.openBlock(),t.createElementBlock("div",I0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,v=>(t.openBlock(),t.createElementBlock("div",{key:v.id,class:"filter-subcategories__group"},[t.createVNode(F0t,{subcategoryGroup:v},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),WN=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),j0t={class:"details__header"},W0t=WN(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),D0t={class:"details__header__checkbox"},K0t={class:"details__body"},B0t={class:"details__body__playing-as"},X0t=["onClick"],G0t={class:"details__header"},Z0t=WN(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),J0t={class:"details__header__checkbox"},H0t={class:"details__body"},Y0t=WN(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Q0t={class:"details__body__game-section"},$0t=["onClick"],eyt={class:"details__body"},tyt=WN(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ryt={class:"details__body__game-section"},ayt=["onClick"],nyt=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const r=e;t.useCssVars(n=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const a=t.computed(()=>r.playingAs.every(n=>n.isSelected)),v=t.computed(()=>r.gameSections.every(n=>n.isSelected)),$=t.computed(()=>r.gameSections.reduce((n,k)=>(k.value<=3?n.firstHalf.push(k):n.secondHalf.push(k),n),{firstHalf:[],secondHalf:[]})),h=t.computed(()=>({"--border-radius-first-button":`${r.buttonsBorderRadius} 0 0 ${r.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${r.buttonsBorderRadius} ${r.buttonsBorderRadius} 0`}));function u(n){n?r.playingAs.forEach(k=>{k.isSelected=!0}):r.playingAs.forEach((k,T)=>{k.isSelected=T===0})}function i(n){r.playingAs.filter(k=>k.isSelected).length===1&&n.isSelected||(n.isSelected=!n.isSelected)}function p(n){r.gameSections.filter(k=>k.isSelected).length===1&&n.isSelected||(n.isSelected=!n.isSelected)}function c(n){n?r.gameSections.forEach(k=>{k.isSelected=!0}):r.gameSections.forEach((k,T)=>{k.isSelected=T===0})}return(n,k)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(h.value)},[t.createElementVNode("div",j0t,[W0t,t.createElementVNode("div",D0t,[t.createVNode(t.unref(dV),{label:"Todos","model-value":a.value,"onUpdate:modelValue":u},null,8,["model-value"])])]),t.createElementVNode("div",K0t,[t.createElementVNode("div",B0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.playingAs,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>i(T)},t.toDisplayString(T.name),11,X0t))),128))])]),t.createElementVNode("div",G0t,[Z0t,t.createElementVNode("div",J0t,[t.createVNode(t.unref(dV),{label:"Todos","model-value":v.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),t.createElementVNode("div",H0t,[Y0t,t.createElementVNode("div",Q0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value.firstHalf,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>p(T)},t.toDisplayString(T.text),11,$0t))),128))])]),t.createElementVNode("div",eyt,[tyt,t.createElementVNode("div",ryt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value.secondHalf,(T,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:T.isSelected}]),onClick:d=>p(T)},t.toDisplayString(T.text),11,ayt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),iyt={class:"filter-field"},oyt=Object.freeze(Object.defineProperty({__proto__:null,default:A_({__name:"FilterField",setup(e){const r=t.ref(Array.from({length:16},(v,$)=>$+1));function a(){}return(v,$)=>(t.openBlock(),t.createElementBlock("div",iyt,[t.createVNode(t.unref(Mge),{width:"100%","background-color":"#2E3B46",value:r.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));KT.GSCReports=A0t,Object.defineProperty(KT,Symbol.toStringTag,{value:"Module"})}));
|