@golstats/gsc-game-data 1.0.302 → 1.0.303

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.
@@ -7586,4 +7586,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7586
7586
  * vuex v4.0.2
7587
7587
  * (c) 2021 Evan You
7588
7588
  * @license MIT
7589
- */var I9t="store";function E0(e,p){Object.keys(e).forEach(function(f){return p(e[f],f)})}function uV(e){return e!==null&&typeof e=="object"}function P9t(e){return e&&typeof e.then=="function"}function Sp(e,p){if(!e)throw new Error("[vuex] "+p)}function B9t(e,p){return function(){return e(p)}}function dV(e,p,f){return p.indexOf(e)<0&&(f&&f.prepend?p.unshift(e):p.push(e)),function(){var F=p.indexOf(e);F>-1&&p.splice(F,1)}}function hV(e,p){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var f=e.state;D3(e,f,[],e._modules.root,!0),E9(e,f,p)}function E9(e,p,f){var F=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var Y=e._wrappedGetters,w={};E0(Y,function(_,n){w[n]=B9t(_,e),Object.defineProperty(e.getters,n,{get:function(){return w[n]()},enumerable:!0})}),e._state=t.reactive({data:p}),e.strict&&F9t(e),F&&f&&e._withCommit(function(){F.data=null})}function D3(e,p,f,F,Y){var w=!f.length,_=e._modules.getNamespace(f);if(F.namespaced&&(e._modulesNamespaceMap[_]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+_+" for the namespaced module "+f.join("/")),e._modulesNamespaceMap[_]=F),!w&&!Y){var n=A9(p,f.slice(0,-1)),g=f[f.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&g in n&&console.warn('[vuex] state field "'+g+'" was overridden by a module with the same name at "'+f.join(".")+'"'),n[g]=F.state})}var h=F.context=z9t(e,_,f);F.forEachMutation(function(r,v){var y=_+v;N9t(e,y,r,h)}),F.forEachAction(function(r,v){var y=r.root?v:_+v,u=r.handler||r;L9t(e,y,u,h)}),F.forEachGetter(function(r,v){var y=_+v;O9t(e,y,r,h)}),F.forEachChild(function(r,v){D3(e,p,f.concat(v),r,Y)})}function z9t(e,p,f){var F=p==="",Y={dispatch:F?e.dispatch:function(w,_,n){var g=R3(w,_,n),h=g.payload,r=g.options,v=g.type;if((!r||!r.root)&&(v=p+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+g.type+", global type: "+v);return}return e.dispatch(v,h)},commit:F?e.commit:function(w,_,n){var g=R3(w,_,n),h=g.payload,r=g.options,v=g.type;if((!r||!r.root)&&(v=p+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+g.type+", global type: "+v);return}e.commit(v,h,r)}};return Object.defineProperties(Y,{getters:{get:F?function(){return e.getters}:function(){return pV(e,p)}},state:{get:function(){return A9(e.state,f)}}}),Y}function pV(e,p){if(!e._makeLocalGettersCache[p]){var f={},F=p.length;Object.keys(e.getters).forEach(function(Y){if(Y.slice(0,F)===p){var w=Y.slice(F);Object.defineProperty(f,w,{get:function(){return e.getters[Y]},enumerable:!0})}}),e._makeLocalGettersCache[p]=f}return e._makeLocalGettersCache[p]}function N9t(e,p,f,F){var Y=e._mutations[p]||(e._mutations[p]=[]);Y.push(function(w){f.call(e,F.state,w)})}function L9t(e,p,f,F){var Y=e._actions[p]||(e._actions[p]=[]);Y.push(function(w){var _=f.call(e,{dispatch:F.dispatch,commit:F.commit,getters:F.getters,state:F.state,rootGetters:e.getters,rootState:e.state},w);return P9t(_)||(_=Promise.resolve(_)),e._devtoolHook?_.catch(function(n){throw e._devtoolHook.emit("vuex:error",n),n}):_})}function O9t(e,p,f,F){if(e._wrappedGetters[p]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+p);return}e._wrappedGetters[p]=function(Y){return f(F.state,F.getters,Y.state,Y.getters)}}function F9t(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Sp(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function A9(e,p){return p.reduce(function(f,F){return f[F]},e)}function R3(e,p,f){return uV(e)&&e.type&&(f=p,p=e,e=e.type),process.env.NODE_ENV!=="production"&&Sp(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:p,options:f}}var D9t="vuex bindings",fV="vuex:mutations",M9="vuex:actions",zg="vuex",R9t=0;function V9t(e,p){M9t({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[D9t]},function(f){f.addTimelineLayer({id:fV,label:"Vuex Mutations",color:mV}),f.addTimelineLayer({id:M9,label:"Vuex Actions",color:mV}),f.addInspector({id:zg,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),f.on.getInspectorTree(function(F){if(F.app===e&&F.inspectorId===zg)if(F.filter){var Y=[];_V(Y,p._modules.root,F.filter,""),F.rootNodes=Y}else F.rootNodes=[vV(p._modules.root,"")]}),f.on.getInspectorState(function(F){if(F.app===e&&F.inspectorId===zg){var Y=F.nodeId;pV(p,Y),F.state=U9t(H9t(p._modules,Y),Y==="root"?p.getters:p._makeLocalGettersCache,Y)}}),f.on.editInspectorState(function(F){if(F.app===e&&F.inspectorId===zg){var Y=F.nodeId,w=F.path;Y!=="root"&&(w=Y.split("/").filter(Boolean).concat(w)),p._withCommit(function(){F.set(p._state.data,w,F.state.value)})}}),p.subscribe(function(F,Y){var w={};F.payload&&(w.payload=F.payload),w.state=Y,f.notifyComponentUpdate(),f.sendInspectorTree(zg),f.sendInspectorState(zg),f.addTimelineEvent({layerId:fV,event:{time:Date.now(),title:F.type,data:w}})}),p.subscribeAction({before:function(F,Y){var w={};F.payload&&(w.payload=F.payload),F._id=R9t++,F._time=Date.now(),w.state=Y,f.addTimelineEvent({layerId:M9,event:{time:F._time,title:F.type,groupId:F._id,subtitle:"start",data:w}})},after:function(F,Y){var w={},_=Date.now()-F._time;w.duration={_custom:{type:"duration",display:_+"ms",tooltip:"Action duration",value:_}},F.payload&&(w.payload=F.payload),w.state=Y,f.addTimelineEvent({layerId:M9,event:{time:Date.now(),title:F.type,groupId:F._id,subtitle:"end",data:w}})}})})}var mV=8702998,j9t=6710886,$9t=16777215,gV={label:"namespaced",textColor:$9t,backgroundColor:j9t};function yV(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function vV(e,p){return{id:p||"root",label:yV(p),tags:e.namespaced?[gV]:[],children:Object.keys(e._children).map(function(f){return vV(e._children[f],p+f+"/")})}}function _V(e,p,f,F){F.includes(f)&&e.push({id:F||"root",label:F.endsWith("/")?F.slice(0,F.length-1):F||"Root",tags:p.namespaced?[gV]:[]}),Object.keys(p._children).forEach(function(Y){_V(e,p._children[Y],f,F+Y+"/")})}function U9t(e,p,f){p=f==="root"?p:p[f];var F=Object.keys(p),Y={state:Object.keys(e.state).map(function(_){return{key:_,editable:!0,value:e.state[_]}})};if(F.length){var w=G9t(p);Y.getters=Object.keys(w).map(function(_){return{key:_.endsWith("/")?yV(_):_,editable:!1,value:I9(function(){return w[_]})}})}return Y}function G9t(e){var p={};return Object.keys(e).forEach(function(f){var F=f.split("/");if(F.length>1){var Y=p,w=F.pop();F.forEach(function(_){Y[_]||(Y[_]={_custom:{value:{},display:_,tooltip:"Module",abstract:!0}}),Y=Y[_]._custom.value}),Y[w]=I9(function(){return e[f]})}else p[f]=I9(function(){return e[f]})}),p}function H9t(e,p){var f=p.split("/").filter(function(F){return F});return f.reduce(function(F,Y,w){var _=F[Y];if(!_)throw new Error('Missing module "'+Y+'" for path "'+p+'".');return w===f.length-1?_:_._children},p==="root"?e:e.root._children)}function I9(e){try{return e()}catch(p){return p}}var Cp=function(e,p){this.runtime=p,this._children=Object.create(null),this._rawModule=e;var f=e.state;this.state=(typeof f=="function"?f():f)||{}},bV={namespaced:{configurable:!0}};bV.namespaced.get=function(){return!!this._rawModule.namespaced},Cp.prototype.addChild=function(e,p){this._children[e]=p},Cp.prototype.removeChild=function(e){delete this._children[e]},Cp.prototype.getChild=function(e){return this._children[e]},Cp.prototype.hasChild=function(e){return e in this._children},Cp.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Cp.prototype.forEachChild=function(e){E0(this._children,e)},Cp.prototype.forEachGetter=function(e){this._rawModule.getters&&E0(this._rawModule.getters,e)},Cp.prototype.forEachAction=function(e){this._rawModule.actions&&E0(this._rawModule.actions,e)},Cp.prototype.forEachMutation=function(e){this._rawModule.mutations&&E0(this._rawModule.mutations,e)},Object.defineProperties(Cp.prototype,bV);var A0=function(e){this.register([],e,!1)};A0.prototype.get=function(e){return e.reduce(function(p,f){return p.getChild(f)},this.root)},A0.prototype.getNamespace=function(e){var p=this.root;return e.reduce(function(f,F){return p=p.getChild(F),f+(p.namespaced?F+"/":"")},"")},A0.prototype.update=function(e){xV([],this.root,e)},A0.prototype.register=function(e,p,f){var F=this;f===void 0&&(f=!0),process.env.NODE_ENV!=="production"&&SV(e,p);var Y=new Cp(p,f);if(e.length===0)this.root=Y;else{var w=this.get(e.slice(0,-1));w.addChild(e[e.length-1],Y)}p.modules&&E0(p.modules,function(_,n){F.register(e.concat(n),_,f)})},A0.prototype.unregister=function(e){var p=this.get(e.slice(0,-1)),f=e[e.length-1],F=p.getChild(f);if(!F){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+f+"', which is not registered");return}F.runtime&&p.removeChild(f)},A0.prototype.isRegistered=function(e){var p=this.get(e.slice(0,-1)),f=e[e.length-1];return p?p.hasChild(f):!1};function xV(e,p,f){if(process.env.NODE_ENV!=="production"&&SV(e,f),p.update(f),f.modules)for(var F in f.modules){if(!p.getChild(F)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+F+"' on hot reloading, manual reload is needed");return}xV(e.concat(F),p.getChild(F),f.modules[F])}}var wV={assert:function(e){return typeof e=="function"},expected:"function"},W9t={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},kV={getters:wV,mutations:wV,actions:W9t};function SV(e,p){Object.keys(kV).forEach(function(f){if(p[f]){var F=kV[f];E0(p[f],function(Y,w){Sp(F.assert(Y),q9t(e,f,w,Y,F.expected))})}})}function q9t(e,p,f,F,Y){var w=p+" should be "+Y+' but "'+p+"."+f+'"';return e.length>0&&(w+=' in module "'+e.join(".")+'"'),w+=" is "+JSON.stringify(F)+".",w}var lh=function e(p){var f=this;p===void 0&&(p={}),process.env.NODE_ENV!=="production"&&(Sp(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Sp(this instanceof e,"store must be called with the new operator."));var F=p.plugins;F===void 0&&(F=[]);var Y=p.strict;Y===void 0&&(Y=!1);var w=p.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new A0(p),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=w;var _=this,n=this,g=n.dispatch,h=n.commit;this.dispatch=function(v,y){return g.call(_,v,y)},this.commit=function(v,y,u){return h.call(_,v,y,u)},this.strict=Y;var r=this._modules.root.state;D3(this,r,[],this._modules.root),E9(this,r),F.forEach(function(v){return v(f)})},P9={state:{configurable:!0}};lh.prototype.install=function(e,p){e.provide(p||I9t,this),e.config.globalProperties.$store=this;var f=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;f&&V9t(e,this)},P9.state.get=function(){return this._state.data},P9.state.set=function(e){process.env.NODE_ENV!=="production"&&Sp(!1,"use store.replaceState() to explicit replace store state.")},lh.prototype.commit=function(e,p,f){var F=this,Y=R3(e,p,f),w=Y.type,_=Y.payload,n=Y.options,g={type:w,payload:_},h=this._mutations[w];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+w);return}this._withCommit(function(){h.forEach(function(r){r(_)})}),this._subscribers.slice().forEach(function(r){return r(g,F.state)}),process.env.NODE_ENV!=="production"&&n&&n.silent&&console.warn("[vuex] mutation type: "+w+". Silent option has been removed. Use the filter functionality in the vue-devtools")},lh.prototype.dispatch=function(e,p){var f=this,F=R3(e,p),Y=F.type,w=F.payload,_={type:Y,payload:w},n=this._actions[Y];if(!n){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+Y);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(_,f.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var g=n.length>1?Promise.all(n.map(function(h){return h(w)})):n[0](w);return new Promise(function(h,r){g.then(function(v){try{f._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(_,f.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}h(v)},function(v){try{f._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(_,f.state,v)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}r(v)})})},lh.prototype.subscribe=function(e,p){return dV(e,this._subscribers,p)},lh.prototype.subscribeAction=function(e,p){var f=typeof e=="function"?{before:e}:e;return dV(f,this._actionSubscribers,p)},lh.prototype.watch=function(e,p,f){var F=this;return process.env.NODE_ENV!=="production"&&Sp(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(F.state,F.getters)},p,Object.assign({},f))},lh.prototype.replaceState=function(e){var p=this;this._withCommit(function(){p._state.data=e})},lh.prototype.registerModule=function(e,p,f){f===void 0&&(f={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Sp(Array.isArray(e),"module path must be a string or an Array."),Sp(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,p),D3(this,this.state,e,this._modules.get(e),f.preserveState),E9(this,this.state)},lh.prototype.unregisterModule=function(e){var p=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Sp(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var f=A9(p.state,e.slice(0,-1));delete f[e[e.length-1]]}),hV(this)},lh.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Sp(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},lh.prototype.hotUpdate=function(e){this._modules.update(e),hV(this,!0)},lh.prototype._withCommit=function(e){var p=this._committing;this._committing=!0,e(),this._committing=p},Object.defineProperties(lh.prototype,P9);var Y9t=Z9t(function(e,p){var f={};return process.env.NODE_ENV!=="production"&&!CV(p)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),X9t(p).forEach(function(F){var Y=F.key,w=F.val;f[Y]=function(){for(var _=[],n=arguments.length;n--;)_[n]=arguments[n];var g=this.$store.commit;if(e){var h=J9t(this.$store,"mapMutations",e);if(!h)return;g=h.context.commit}return typeof w=="function"?w.apply(this,[g].concat(_)):g.apply(this.$store,[w].concat(_))}}),f});function X9t(e){return CV(e)?Array.isArray(e)?e.map(function(p){return{key:p,val:p}}):Object.keys(e).map(function(p){return{key:p,val:e[p]}}):[]}function CV(e){return Array.isArray(e)||uV(e)}function Z9t(e){return function(p,f){return typeof p!="string"?(f=p,p=""):p.charAt(p.length-1)!=="/"&&(p+="/"),e(p,f)}}function J9t(e,p,f){var F=e._modulesNamespaceMap[f];return process.env.NODE_ENV!=="production"&&!F&&console.error("[vuex] module namespace not found in "+p+"(): "+f),F}const K9t="/icn-play.svg",Q9t="/icn-tiros-de-esquina.svg",eSt="/icn-tiro-a-porteria.svg",tSt="/icn-cambio.svg",nSt="/icn-falta.svg",rSt="/atajada.svg",aSt="/fuera-de-lugar.svg",B9="/gol.svg",iSt="/var.png",oSt="/tiempo-agregado.svg",sSt="/jugada-peligrosa.svg",lSt="/penal-marcado.svg",cSt="/penal-fallado.svg",uSt="/inicia-el-partido.svg",dSt="/fin-del-partido.svg",hSt="/icn-tarjeta-amarilla.svg",pSt="/icn-tarjeta-roja.svg",fSt=[1,2,3,4,6],mSt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],p=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return C9.GOAL_IDS.includes(p)?(e.push("is-main-event"),e.push("goal")):C9.YELLOW_CARD_IDS.includes(p)?(e.push("is-main-event"),e.push("yellow-card")):C9.RED_CARD_IDS.includes(p)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(p=>x9t(p))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||fSt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Y9t("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,p]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(p),teamId:this.gameEvent.team_id})}}},gSt=e=>(t.pushScopeId("data-v-84fd3fef"),e=e(),t.popScopeId(),e),ySt={class:"time-line-event__details"},vSt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},_St=["src"],bSt=gSt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),xSt={class:"time-line-event__details__info"},wSt={key:0,class:"time-line-event__details__info__header__players"},kSt={class:"time-line-event__details__info__header__players__div-img"},SSt=["src"],CSt={class:"time-line-event__details__info__body"},TSt={class:"time-line-event__details__info__body__comment"},ESt={class:"time-line-event__minute__container"},ASt={class:"time-line-event__minute__container__text"},MSt={class:"time-line-event__minute__container__icon-container"},ISt={class:"time-line-event__minute__container__icon-container__icon"},PSt={key:0,src:Q9t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BSt={key:1,src:eSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zSt={key:2,src:tSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NSt={key:3,src:nSt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},LSt={key:4,src:rSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OSt={key:5,src:aSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FSt={key:6,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DSt={key:7,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RSt={key:8,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VSt={key:9,src:iSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jSt={key:10,src:oSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$St={key:11,src:sSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},USt={key:12,src:lSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GSt={key:13,src:cSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HSt={key:14,src:uSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WSt={key:15,src:dSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qSt={key:16,src:hSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},YSt={key:17,src:pSt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},XSt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function ZSt(e,p,f,F,Y,w){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",w.teamTypeClasses]),style:t.normalizeStyle({width:`${f.width}px`}),key:Y.gameEventKey},[t.createElementVNode("div",ySt,[f.canPlayVideos&&f.gameEvent.video_link!=="-"&&f.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:p[0]||(p[0]=_=>w.thumbnailClick(f.gameEvent.video_link,f.gameEvent.event_type_name))},[t.createElementVNode("video",vSt,[t.createElementVNode("source",{src:f.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,_St)]),bSt])):t.createCommentVNode("",!0),t.createElementVNode("div",xSt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",w.teamTypeClasses2])},[f.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",wSt,[w.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(w.srcImgPlayers,(_,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":n===1}]),key:n},[t.createElementVNode("div",kSt,[t.createElementVNode("img",{src:_,alt:""},null,8,SSt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",w.nameClasses]),onClick:p[1]||(p[1]=_=>w.thumbnailClick(f.gameEvent.video_link,f.gameEvent.event_type_name))},[f.canPlayVideos&&f.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:K9t,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(f.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${f.gameEvent.event_type_name}`:f.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.gameEvent.category_id?f.gameEvent.event_type_id===5?f.gameEvent.category_name:f.gameEvent.event_type_name==="Gol"?`${[13,16].includes(f.gameEvent.category_id)?"Autogol":"Gol"} de `+f.gameEvent.team_name:f.gameEvent.event_type_name:f.gameEvent.comments),1)],2)],2),t.createElementVNode("div",CSt,[t.createElementVNode("div",TSt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",w.minuteClasses])},[t.createElementVNode("div",ESt,[t.createElementVNode("div",ASt,t.toDisplayString(f.gameEvent.minute)+"'",1),t.createElementVNode("div",MSt,[t.createElementVNode("div",ISt,[f.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",PSt)):f.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",BSt)):f.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",zSt)):f.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",NSt)):f.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",LSt)):f.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",OSt)):f.gameEvent.category_id==6&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==5&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==1&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==2&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==3&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==7&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==12&&f.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",FSt)):f.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",DSt)):f.gameEvent.category_id==13||f.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",RSt)):f.gameEvent.category_id==30||f.gameEvent.category_id==31||f.gameEvent.category_id==32||f.gameEvent.category_id==33||f.gameEvent.category_id==34||f.gameEvent.category_id==35||f.gameEvent.category_id==36||f.gameEvent.category_id==37||f.gameEvent.category_id==38||f.gameEvent.category_id==39||f.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",VSt)):f.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",jSt)):f.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",$St)):f.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",USt)):f.gameEvent.category_id==15||f.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",GSt)):f.gameEvent.category_id==0&&f.gameEvent.game_status_id==16||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==18||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==20||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",HSt)):f.gameEvent.category_id==0&&f.gameEvent.game_status_id==13||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==17||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==19||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==21||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",WSt)):f.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",qSt)):f.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",YSt)):(t.openBlock(),t.createElementBlock("img",XSt))])])])],2)],6)}const JSt=Lv(mSt,[["render",ZSt],["__scopeId","data-v-84fd3fef"]]),KSt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},QSt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let V3=null;const eCt={name:"TimeLine",components:{Tooltip:y9t,TimeLineEvent:JSt},mixins:[_9t],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const p=await this.fetchGameEvents(e);p?(this.gameEvents=[...p],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(p){throw new Error(p)}},getGameEventClassAndSetIcon(e,p){return e.icon=p===0?"inicio_del_partido":KSt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const{data:{plays:p}}=await oV.get(`${this.gameEventsUrl}${e}`);return p}catch(p){throw new Error(p)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)V3=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),V3.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,p){const f=this.$refs[`gameEventDiv${p}`][0],F=this.$refs[`gameEventLine${p}`]?this.$refs[`gameEventLine${p}`][0]:null,Y=e+12;f&&(f.style.height=`${Y}px`),F&&(F.style.height=`${Y}px`)},sortGameEvents(){this.gameEvents.sort((e,p)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(p.match_lapse)+Number(p.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let p=0;switch(e){case 1:p=0;break;case 2:p=45;break;case 3:p=90;break;case 4:p=105;break;case 5:p=120;break}return p},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const p=this.gameEvents.findIndex(f=>f.play_id===e.play_id);p&&this.gameEvents.splice(p,1)},checkTimeLineStatus(){this.gameEvents.forEach(p=>{const f=QSt[p.game_status];f&&this.timeLineStatuses.push({...f,gameEvent:p})}),this.timeLineStatuses.sort((p,f)=>f.weight-p.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const p=this.gameData[e].team_id;return b9t(p)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){V3&&V3.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,p]){this.channelName===e&&this.addGameEventFromChannel(p)},update_mxm([e,p]){this.channelName===e&&(this.deleteGameEventFromChannel(p),this.addGameEventFromChannel(p))},delete_mxm([e,p]){this.channelName===e&&this.deleteGameEventFromChannel(p)}}},TV=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),tCt={ref:"timeLine",class:"time-line"},nCt={class:"time-line__header"},rCt={class:"time-line__header__dot"},aCt={class:"time-line__header__dot__home-team team-logo"},iCt=["src"],oCt={class:"time-line__header__dot__away-team team-logo"},sCt=["src"],lCt={key:1,class:"start-line"},cCt=TV(()=>t.createElementVNode("div",null,null,-1)),uCt=TV(()=>t.createElementVNode("div",null,null,-1)),dCt=[cCt,uCt],hCt={key:1,class:"noEventText"},pCt={class:"tooltip-data"},fCt=["src"];function mCt(e,p,f,F,Y,w){const _=t.resolveComponent("TimeLineEvent"),n=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",tCt,[t.createElementVNode("div",nCt,[t.createElementVNode("div",rCt,[t.createElementVNode("div",aCt,[t.createElementVNode("img",{src:w.getTeamLogoSrc("homeTeam"),alt:""},null,8,iCt)]),t.createElementVNode("div",oCt,[t.createElementVNode("img",{src:w.getTeamLogoSrc("awayTeam"),alt:""},null,8,sCt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${Y.gameEvents.length}`},[f.gameData.status!==4||f.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:Y.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.gameEventsToShow,(g,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:g.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(w.getGameEventClassAndSetIcon(g,h))},[t.createElementVNode("div",{class:t.normalizeClass(w.getEventContainerClass(g))},[t.createVNode(_,{"game-event":g,"is-mobile":w.isMobile,"time-line-width":Y.timeLineWidth,width:w.gameEventWidth,"can-play-videos":f.canPlayVideos,onEventHeight:r=>w.updateContainerHeight(r,h),onPlayerChanged:p[0]||(p[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:w.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),f.gameData.status===1&&h===w.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",lCt,dCt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",hCt,"Aún no comienza el partido"))]))],512),t.createVNode(n,{data:Y.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",pCt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:Y.dataVideo.link,format:"video/mp4"},null,8,fCt)])])]),_:1},8,["data"])],64)}const gCt=Lv(eCt,[["render",mCt],["__scopeId","data-v-2574e576"]]),yCt={class:"game-time-line__options"},vCt={class:"game-time-line__timeline"},_Ct={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},setup(e){oV.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const p=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),f=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let F=null;const Y=t.ref(["Todo","1er tiempo","2do tiempo"]),w=t.ref("Todo"),_=t.ref({}),n=t.ref(null),g=t.ref(0),h=t.computed(()=>{let o="all";return w.value==="1er tiempo"||w.value==="1er"?o="firstHalf":(w.value==="2do tiempo"||w.value==="2do")&&(o="secondHalf"),o}),r=t.computed(()=>g.value<500);function v(o){w.value=o}function y(o){_.value=o}function u(){if(window.ResizeObserver)F=new ResizeObserver(()=>{g.value=n.value.clientWidth}),F.observe(n.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{u()}),t.onBeforeUnmount(()=>{F&&F.unobserve(n.value)}),(o,a)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:n,class:"game-time-line"},[t.createElementVNode("div",yCt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value,i=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"game-time-line__options__option"},[t.createVNode(Jkt,t.mergeProps(g.value<390?f.value:p.value,{text:i=="Todo"?i:g.value<390?i.substring(0,3):i,"is-active":w.value===i,onClick:l=>v(i)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",vCt,[t.createVNode(gCt,{"game-data":e.game,"time-line-period":h.value,"is-mobile":r.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:y},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},bCt=Lv(_Ct,[["__scopeId","data-v-f42d0c90"]]),RFt="",EV=e=>(t.pushScopeId("data-v-7acc2bda"),e=e(),t.popScopeId(),e),xCt={class:"game-data__header"},wCt={class:"game-data__header__tournament-season-dropdown"},kCt={class:"game-data__header__teams-carousel"},SCt={class:"game-data__body"},CCt={key:0,class:"no-stats-container"},TCt=[EV(()=>t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1))],ECt={key:1,class:"no-stats-container-mobile"},ACt=[EV(()=>t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1))],MCt={class:"game-data__body__menu"},ICt={class:"game-data__body__menu__contmenuswitch"};Mc.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const PCt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fre,GSCGameTimeLine:bCt,GscSwitchComponent:r7,GSCLineupsMain:_ve,GSCDatosGSMain:R8e,GSCVideoGame:mNe,ModalEvents:Dz,GSCTacticaFijaMain:Xkt,GSCProminentMain:Ftt,GSCComparative:yit}}),BCt=Oi(Object.assign(PCt,{props:{tournamentsApiUrl:{type:String,default:""},currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:p}){const f=e,F=ww();let Y=null;Sh.on("socket-connected",()=>{F.commit("nextGeneral/updateIsSocketConnected",f.socket.connected)});const w=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),_=t.ref({season:[]}),n=t.ref({}),g=t.ref(!1),h=t.ref({}),r=t.ref(1),v=t.ref(0),y=3e4,u=3e4,o=3e4,a=3e4,i=3e4,l=3e4,s=3e4,c=3e4,d=6e4,m=t.ref(null),x=t.ref(null),b=t.ref(null),T=t.ref([]),k=t.ref(null),C=t.ref(!0),S=t.ref(new Set([1,2])),E=t.ref({}),A=t.ref({minute:"",recent_lapse:0,score:{}}),M=t.ref(0),P=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),B=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),z=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),O=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const D=t.ref(0);let R=null;const j=t.ref(null),$=t.ref(0),Z=t.ref(z.value[0]),W=t.ref([]);let H=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const Ye=[];return n.value&&n.value.id&&(Ye.push({id:n.value.id,name:n.value.name,type:n.value.type}),n.value.related_seasons&&n.value.related_seasons.forEach(it=>{Ye.push({id:it.id,type:it.type})})),Ye}),J=t.computed(()=>{if(f.clientPrivilegesBySeasons){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)return Ye.teamId}return 0});function ee(){g.value=!1}function le(Ye){const it=Ye.split(",");return!(it.length<2||it[1].split(" ").length<2)}function oe(Ye){m.value=Ye}function se(Ye){T.value.push(Ye)}function ce(Ye){k.value=Ye}function ne(Ye){b.value=Ye}function re(Ye){x.value=Ye}function ie(Ye){if(!le(Ye))return"";const it=fe(Ye);return`${de(Ye)}. ${it}`}function de(Ye){return Ye.split(",")[1].split(" ")[1][0]}function fe(Ye){const it=Ye.split(",")[0].split(" ");return it[0].length<=3&&it.length>1?`${it[0]} ${it[1]}`:it[0]}async function pe(Ye){try{const it=Mc.create({headers:{Authorization:`${w.value}`}});E.value={};const ut=await it.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+Ye.game_id);if(E.value[Ye.home_team.team_id]=[],E.value[Ye.home_team.team_id].team={name:Ye.home_team.acronym,logo:Ye.home_team.logo},E.value[Ye.home_team.team_id].goals=[],E.value[Ye.home_team.team_id].red=[],E.value[Ye.home_team.team_id].yellow=[],E.value[Ye.visiting_team.team_id]=[],E.value[Ye.visiting_team.team_id].team={name:Ye.visiting_team.acronym,logo:Ye.visiting_team.logo},E.value[Ye.visiting_team.team_id].goals=[],E.value[Ye.visiting_team.team_id].red=[],E.value[Ye.visiting_team.team_id].yellow=[],ut.data.minute!=null&&(A.value={minute:ut.data.minute,recent_lapse:ut.data.recent_lapse,score:ut.data.score}),ut.data.plays)for(let dt=0;dt<ut.data.plays.length;dt++)ut.data.plays[dt].category_name=="Roja"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].red||(E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].red||(E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute))),ut.data.plays[dt].category_name=="Amarilla"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].yellow||(E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].yellow||(E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute))),ut.data.plays[dt].event_type_name=="Gol"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?ut.data.plays[dt].category_name=="Autogol"?(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].goals||(E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].goals||(E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):ut.data.plays[dt].category_name=="Autogol"?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].goals||(E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].goals||(E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)))}catch(it){return Promise.reject(it)}}function ge(Ye){g.value=!0,Ye.is_live!=1&&Ye.game_status!=0&&(Ye.game_status==4||Object.keys(Ye.minutes).length>0)?(M.value=1,E.value={plays:Ye.minutes,home_team:Ye.home_team,visiting_team:Ye.visiting_team}):(M.value=0,pe(Ye))}function be(){R=new ResizeObserver(Ye=>{for(const it of Ye)$.value=it.contentRect.width}),R.observe(j.value)}const we=t.computed(()=>{let Ye={};return h.value&&h.value.game_id&&(Ye={gameId:h.value.game_id,id:h.value.game_id,seasonId:h.value.season_id,regularSeasonId:h.value.regularSeasonId,matchday_name:h.value.matchday_name,status:h.value.game_status,score:h.value.score,game_status:h.value.game_status,dateTimeUTC:h.value.date_time_utc,homeTeam:h.value.home_team,awayTeam:h.value.visiting_team,is_live:h.value.is_live,minutes:h.value.minutes}),Ye});t.watch(()=>h.value.game_id,Ee,{immediate:!0}),t.watch(()=>h.value.is_live,Ie,{immediate:!0}),t.watch(()=>F.state.nextGeneral.gameForAnalysis,()=>{F.commit("nextGeneral/updateIsSocketConnected",f.socket.connected)},{deep:!0,immediate:!0});function xe(Ye){r.value=Ye.is_captured,v.value=Ye.is_female,C.value=Ye.is_captured!==0,_.value.id!==Ye.id&&(_.value=Ye,F.commit("gameGlobal/setTournamentType",Ye.tournament_type))}function Ee(Ye,it){F.commit("nextGeneral/updateShowLiveData",!0);const ut=v.value?"Destacados":"Destacadas";z.value.forEach(dt=>{dt.name===ut&&(dt.name=v.value?"Destacadas":"Destacados")}),pe({game_id:h.value.game_id,home_team:h.value.home_team,visiting_team:h.value.visiting_team}),Se(),D.value+=1}function Ie(Ye,it){if(Se(),F.state.nextGeneral.gameForAnalysis.is_live!==Ye&&F.commit("nextGeneral/updateGameForAnalysis",{...F.state.nextGeneral.gameForAnalysis,is_live:h.value.is_live,game_status:h.value.game_status}),Ye){const ut=r4();ut.disconnected?a4():ut.connected&&YC(`game.${h.value.game_id}.v2`),Ve(),Y=setInterval(()=>{M.value=0,pe({game_id:h.value.game_id,home_team:h.value.home_team,visiting_team:h.value.visiting_team})},6e4)}else Ve(),i4();Ye!==it&&(D.value+=1)}function Ve(){Y&&clearInterval(Y)}function Se(){z.value=[],h.value.is_live||h.value.game_status===4?z.value=[...B.value]:z.value=[...O.value],!f.isWidget&&(n.value.is_tactic_available===0||h.value.is_live||h.value.game_status===0)&&z.value.pop(),Z.value=z.value[0]}function ke(Ye){Ye.gameSeasonId=h.value.season_id,Ye.gameRegularSeasonId=h.value.regularSeasonId,!(!Ye.auxwidget&&ze.value&&!ze.value.canPrivilegesTeamPlayVideos)&&((h.value.is_live||h.value.game_status===0||h.value.game_status===1)&&(Ye.gameIdsToFilter=[h.value.game_id]),Ye.isLiveAccumulated&&(Ye.gameIdsToFilter=null),(h.value.is_live||h.value.game_status===0)&&!Ye.isLiveAccumulated&&(Ye.liveGameConfig={gameId:h.value.game_id}),p("openmedia",Ye))}function ye(Ye){p("onOpenProfile",Ye)}function me(Ye){p("openProfileTeam",Ye)}function Me(Ye){p("openProfilePlayer",Ye)}function Ce(Ye){Re(Ye),Ye=="Estadísticas"&&(H.value="Comparativa")}function Ne(){H.value=""}function Oe(Ye){n.value.id!==Ye.id&&(n.value=Ye,p("change-season-id",Ye.id))}const De=t.computed(()=>z.value.reduce((Ye,it)=>(f.disabledSectionsIds.includes(it.id)||ze.value&&!ze.value.isVideoTabVisible&&it.id===2||f.clientPrivilegesBySeasons&&it.id===7||(C.value||it.id!==5&&it.id!==6)&&Ye.push(it.name),Ye),[]));function Ue(Ye){if(h.value.is_live||h.value.game_status===1||h.value.game_status===0){const it=Ye.playingAs.has(h.value.playingAs);return f.clientPrivilegesBySeasons.canPlayVideos&&it}else{const it=Te.value.filter(ut=>Ye.playingAs.has(ut.playingAs));return f.clientPrivilegesBySeasons.canPlayVideos&&it.length>0}}const ze=t.computed(()=>{if(f.clientPrivilegesBySeasons){if(n.value&&h.value&&h.value.game_id){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)if(Le(Ye.playingAs),(h.value.is_live||h.value.game_status===1||h.value.game_status===0)&&F.state.nextGeneral.showLiveData){const it=Ye.playingAs.has(h.value.playingAs);return{seasonAndPrivileges:Ye,canPrivilegesTeamPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&it,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:h.value.home_team.team_id===Ye.teamId,homeTeamDetails:{canPlayVideos:it,team:h.value.home_team},awayTeamDetails:{canPlayVideos:it,team:h.value.visiting_team},isVideoTabVisible:Ue(Ye)}}else{const it=h.value.home_team.team_id===Ye.teamId,ut=Te.value.filter(It=>Ye.playingAs.has(It.playingAs));return{seasonAndPrivileges:Ye,canPrivilegesTeamPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&ut.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:it,homeTeamDetails:{canPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&it&&ut.length>0,team:h.value.home_team},awayTeamDetails:{canPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&!it&&ut.length>0,team:h.value.visiting_team},isVideoTabVisible:Ue(Ye)}}Le(new Set)}return Q}return null}),Te=t.computed(()=>{if(f.clientPrivilegesBySeasons){if(n.value){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)return W.value.filter(it=>it.game_status===1&&Ye.playingAs.has(it.playingAs))}return[]}return[]});t.watch(De,()=>{ze.value&&!ze.value.canPrivilegesTeamPlayVideos&&Z.value.id===2&&Re("Resumen")},{deep:!0,immediate:!0});function Le(Ye){S.value=Ye}function Re(Ye){if(F.commit("nextGeneral/updateShowLiveData",!0),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let it of T.value)clearInterval(it);T.value=[]}f.isWidget?Z.value=z.value.find(it=>it.name===Ye)||z.value[1]:Z.value=z.value.find(it=>it.name===Ye)||z.value[0]}t.onMounted(()=>{be(),t.nextTick(()=>{f.isSynchronization&&Re("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(R&&R.disconnect(),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let Ye of T.value)clearInterval(Ye);T.value=[]}o4()});function $e(Ye){if(Ye.playingAs||(Ye.playingAs=J.value?Ye.home_team.team_id===J.value?1:2:0),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let it of T.value)clearInterval(it);T.value=[]}h.value=Ye,Ye.is_live&&Ye.game_status===4?a4():i4()}function Ze(Ye){W.value=Ye.map(it=>{const ut={...it};return J.value&&(ut.playingAs=ut.home_team.team_id===J.value?1:2),ut})}return(Ye,it)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:j},[t.createElementVNode("div",xCt,[t.withDirectives(t.createElementVNode("div",wCt,[t.createVNode(t.unref(Z9),{"current-season-id":e.currentSeasonId,onInput:xe,onChangeTournaments:xe,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl},null,8,["current-season-id","tournaments-ids-to-include","api-url"]),t.createVNode(t.unref(Q9),{"current-season-id":e.currentSeasonId,seasons:_.value.seasons,onInput:Oe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",kCt,[t.createVNode(t.unref(Nq),{"plays-live":E.value,"info-live":A.value,token:P.value,is_captured:r.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":J.value,"only-games-team-id":J.value,"tournament-type":t.unref(F).state.gameGlobal.tournamentType,onChangeGameCarousel:$e,onOpenModalEvent:ge,onChangeGamesByClientPrivileges:Ze},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),g.value?(t.openBlock(),t.createBlock(Dz,{key:0,width:$.value,onCloseModalEventsLive:ee,plays:E.value,game:h.value,type:M.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",SCt,[h.value&&"live_stats"in h.value&&h.value.live_stats==0&&h.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",CCt,TCt)):(t.openBlock(),t.createElementBlock("div",ECt,ACt))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",MCt,[t.createElementVNode("div",ICt,[t.createVNode(t.unref(r7),{type:2,buttons:De.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":Z.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:Re},null,8,["buttons","width","selected-option"])])]),we.value&&we.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Z.value.componentName),{key:D.value,game:we.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:re,onIntervalidhighlive:ne,onIntervalidtops:se,onIntervalidgs:ce,subsection:t.unref(H),seasonSelected:n.value,tournamentSelected:_.value,showLineups:C.value,socket:e.socket,"time-live-prominent-data":y,"time-live-highlights-prominent-and-video":u,"time-live-possesion":o,"time-live-video-goals":a,"time-live-video-best-plays":i,"time-live-video-this-game":l,"time-live-video-specific-plays":s,"time-live-comparative-best-players":c,"time-live-comparative-avanced":d,is_captured:r.value,"is-tactic-visible":!!n.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ze.value?ze.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":S.value,"client-privileges-team-id":J.value,"play-videos-privileges":ze.value,token:P.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,onResetSubsection:Ne,onOpenmedia:ke,onOnOpenProfile:ye,onOpenProfileTeam:me,onOpenProfilePlayer:Me,onChangeToTab:Ce,onOpenMediaPlayer:ke,onIntervalid:oe},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-7acc2bda"]]);async function _d({url:e,options:p={},retries:f=3}){return await Mc.get(e,p).then(F=>F).catch(F=>f>0?_d({url:e,options:p,retries:f-1}):F)}async function AV({seasonId:e},p=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(f){if(p)return AV({seasonId:e},!1);throw new Error(f)}}async function zCt({seasonId:e}){try{return(await _d({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(p){return Promise.reject(p)}}async function NCt({seasonId:e}){try{return(await _d({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(p){return Promise.reject(p)}}function LCt(e,p,f,F,Y,w,_=!1){const n=f.map(g=>g===1?2:g===2?1:3);return e.filter(g=>{const h=w&&g[Y.teamId]?g[Y.teamId]!==w:!1,r=p===1?2:1;return(_||F.includes(g[Y.gameId]))&&(!p||(h?r:p)===g[Y.playingAs])&&(f.includes(g[Y.matchResult])&&g[Y.teamId]===w||n.includes(g[Y.matchResult])&&g[Y.teamId]!==w)})}function MV(e,p,f,F,Y){return p.length===2&&f.length===3&&F.length===6?e:e.filter(w=>p.includes(w[Y.playingAs])&&f.includes(w[Y.matchResult])&&F.includes(w[Y.section]))}async function IV({seasonId:e}){try{const p=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await _d({url:p})).data}catch(p){return Promise.reject(p)}}async function OCt({seasonId:e,gameId:p}){try{const f=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${p}`,{data:F}=await _d({url:f});return F}catch(f){return Promise.reject(f)}}async function FCt({gameId:e}){try{const p=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await _d({url:p})).data.data}catch(p){return Promise.reject(p)}}async function DCt({gameId:e}){try{const p=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await _d({url:p})).data.data||[]}catch(p){return Promise.reject(p)}}const RCt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let z9=null;function PV(){return z9||(z9=O1(RCt)),z9}async function VCt(e){try{const p=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await _d({url:p})).data}catch(p){return Promise.reject(p)}}async function BV({seasonId:e,teamId:p}){try{return await _d({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${p}`})}catch(f){return Promise.reject(f)}}async function jCt(e){try{const p=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await _d({url:p})}catch(p){return Promise.reject(p)}}async function $Ct(e){try{return await _d({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(p){return Promise.reject(p)}}const UCt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,p,f,F){return LCt(e.seasonPlays,F["filterGeneral/getPlayingAs"],F["filterGeneral/getResults"],F["filterGeneral/getSelectedGamesIds"],PV(),F["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const p=e.currentSeasonGames.reduce((f,F)=>{const Y={...F};return Y.home_team=e.currentSeasonTeams.find(w=>w.team_id===F.home_team),Y.visiting_team=e.currentSeasonTeams.find(w=>w.team_id===F.visiting_team),f[F.matchday_abbreviation]?f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date]?f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date].push(Y):f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date]=[Y]:f[F.matchday_abbreviation]={[F.game_status===3?"canceled":F.date]:[Y]},f},{});for(let[f,F]of Object.entries(p))p[f]=Object.entries(F).map(([Y,w])=>({date:Y,games:w})),p[f].sort((Y,w)=>Y.date<w.date?-1:Y.date>w.date?1:0);return p},matchdaysDates(e,p){let f=[];if(p.nextGamesSchedule){let F=Object.keys(p.nextGamesSchedule);for(let Y of F){let w=Number(Y.replace("M","")),_=p.nextGamesSchedule[Y].map(n=>({matchday:w,date:new Date(n.date)}));f=f.concat(_)}}return f},closestMatchDay(e,p){let f=new Date,F=0,Y=-new Date(0,0,0).valueOf(),w=p.matchdaysDates,_=w.length;for(let n=0;n<w.length;n++)F=Math.abs(w[n].date-f),F<Y&&(_=n,Y=F);return w[_]?w[_].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,p){e.booleanIsLiveGamesModalOpen=p},setBooleanAreLiveGames(e,p){e.booleanAreLiveGames=p},updateSeasonPlays(e,p){e.seasonPlays=p},updateCurrentSeasonTeams(e,p){e.currentSeasonTeams=p},updateCurrentSeasonGames(e,p){e.currentSeasonGames=p},updateSelectedRound(e,p){e.selectedRound=p}},actions:{async getSeasonPlays({commit:e,rootGetters:p},f=!1){try{const F=await AV({seasonId:p["filterGeneral/getSeasonId"]});if(f)return F;e("updateSeasonPlays",F)}catch(F){return Promise.reject(F)}},async getCurrentSeasonGames({commit:e,rootGetters:p}){try{const f=await IV({seasonId:p["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",f)}catch(f){return Promise.reject(f)}},async getCurrentSeasonTeams({commit:e,rootGetters:p}){try{const f=await VCt({seasonId:p["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",f.teams)}catch(f){return Promise.reject(f)}},async isDataFilled({state:e,dispatch:p,commit:f}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return f("setIsSectionLoading",!1,{root:!0}),!0;const F=[void 0,void 0];return e.currentSeasonGames.length===0&&(F[0]=p("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(F[1]=p("getCurrentSeasonTeams")),await Promise.all(F),!1}catch(F){throw new Error(F)}}}}};async function GCt({filter:e}){try{const p=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:f}=await _d({url:p});return f}catch(p){return Promise.reject(p)}}const HCt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let N9=null;function WCt(){return N9||(N9=O1(HCt)),N9}class j3{constructor(){Ac(this,"maximumLiveSection",1);Ac(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});Ac(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(p){p>this.maximumLiveSection&&(this.maximumLiveSection=p)}getZeroTotalsTrendSections(){return[0,0,0,0,0,0]}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(p,f,F){F&&(this.setMaximumLiveSection(p),this.accomplished.totalLive+=f,this.accomplished.totalsLiveTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,p,f)),this.accomplished.totalPostGame+=f,this.accomplished.avgPostGameTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,p,f)}increaseReceivedByOne(p,f,F){F&&(this.setMaximumLiveSection(p),this.received.totalLive+=f,this.received.totalsLiveTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,p,f)),this.received.totalPostGame+=f,this.received.avgPostGameTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,p,f)}increaseTrendLiveAccumulatedByOne(p,f,F){for(let Y=f-1;Y<p.accumulated.length;Y++)p.accumulated[Y]+=F}decreaseAccomplishedLiveByOne(p,f){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=f),this.accomplished.totalsLiveTrendLive.sections[p-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[p-1]-=f,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,p,f))}decreaseReceivedLiveByOne(p,f){this.received.totalLive>0&&(this.received.totalLive-=f),this.received.totalsLiveTrendLive.sections[p-1]>0&&(this.received.totalsLiveTrendLive.sections[p-1]-=f,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,p,f))}decreaseTotalsLiveTrendLiveAccumulatedByOne(p,f,F){for(let Y=p.accumulated.length-1;Y>=f-1;Y--)p.accumulated[Y]-=F}calculateAvg(p){p&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/p,this.received.avgPostGame=this.received.totalPostGame/p,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,p),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,p),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,p),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,p))}getAvgPostGameTrendLiveAvg(p,f){return p.map(F=>F/f)}calculateRanking(p,f,F,Y,w,_,n,g){let h=[];Y===3&&p&&p.length&&(F.playingAs.length!==2||F.matchResult.length!==3)?h=Array.from(p.reduce((v,y)=>{const u=y[f.playingAs]===1,o=u?"1":"2",a=v.get(y[f.gameId]);if(a)a[o]?a[o].arrayPlays.push(y):a[o]={numberTeamId:y[f.teamId],arrayPlays:[y]};else{const i={numberMatchResult:y[f.matchResult]};u&&(i[1]={numberTeamId:y[f.teamId],arrayPlays:[y]}),v.set(y[f.gameId],i)}return v},new Map).values()).reduce((v,y)=>{const u=F.playingAs.length===2?"both":F.playingAs[0].toString();return(u==="both"&&(y[1].numberTeamId===F.teamId||y[2].numberTeamId===F.teamId)||u!=="both"&&y[u].numberTeamId===F.teamId)&&F.matchResult.includes(y.numberMatchResult)&&v.push(...y[1].arrayPlays,...y[2].arrayPlays),v},[]).filter(v=>F.sections.includes(v[f.section])):(h=p?[...p]:[],n&&p&&(h=p.filter(r=>F.playingAs.includes(r[f.playingAs])&&F.matchResult.includes(r[f.matchResult])&&F.sections.includes(r[f.section])))),this.setTeamRanking(h,Y,f,F.teamId,_,"accomplished",g)}setTeamRanking(p,f,F,Y,w,_,n){let g=null,h=null;f===3&&(g=new Map,h={},p.forEach(y=>{const u=g.get(y[F.gameId]);u?u[y[F.teamId.toString()]]?u[y[F.teamId.toString()]]+=y[F.total]:u[y[F.teamId.toString()]]=y[F.total]:g.set(y[F.gameId],{[y[F.teamId.toString()]]:y[F.total]})}),Array.from(g.values()).forEach(y=>{const[u,o]=Object.keys(y).map(i=>i),a=y[u]+y[o];this.addPassesAvgByTeam(h,u,a?y[u]/a:0),this.addPassesAvgByTeam(h,o,a?y[o]/a:0)}));const r=w.sort((y,u)=>y.team_id-u.team_id).map(y=>{if(f===3){const u=h[y.team_id.toString()];return{teamId:y.team_id,points:u?u.numberTotalPassesAvg/u.numberGamesCount:0,total:u?u.numberTotalPassesAvg:0}}else{const u=p.reduce((o,a)=>a[F.teamId]===y.team_id&&f===a[F.categoryId]?o+a[F.total]:o,0);return{teamId:y.team_id,points:y[`${n}FilterGames`]?u/y[`${n}FilterGames`]:0,total:u}}}).sort((y,u)=>u.points-y.points);this.accomplished.arrayRankings=r;const v=r.findIndex(y=>y.teamId===Y);f===3&&(this.accomplished.avgPreGame=r[v].points),this[_].ranking=v+1,this[_].leader=r[0]}addPassesAvgByTeam(p,f,F){p[f]?(p[f].numberGamesCount+=1,p[f].numberTotalPassesAvg+=F):p[f]={numberGamesCount:1,numberTotalPassesAvg:F}}}class Cs{constructor(p,f,F,Y,w,_,n,g,h,r,v=!0){Ac(this,"id","");Ac(this,"generalId",0);Ac(this,"name","");Ac(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Ac(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Ac(this,"accomplishedCategoryIds",[]);Ac(this,"receivedCategoryIds",[]);Ac(this,"generalCategoriesIds",{accomplished:0,received:0});Ac(this,"specialMention","");Ac(this,"homeTeam",new j3);Ac(this,"visitingTeam",new j3);Ac(this,"isLeagueDataCalculated",!1);Ac(this,"leagueAccomplishedMax",0);Ac(this,"leagueReceivedMax",0);Ac(this,"leagueAccomplishedAvg",0);Ac(this,"leagueReceivedAvg",0);Ac(this,"leagueAccomplishedAccumulator",0);Ac(this,"leagueReceivedAccumulator",0);Ac(this,"homeTeamType","homeTeam");Ac(this,"visitingTeamType","visitingTeam");Ac(this,"betOnly",!1);Ac(this,"isPercent",!1);this.id=`${F.accomplished}-${F.received}`,this.accomplishedCategoryIds=p||[],this.receivedCategoryIds=f||[],this.generalCategoriesIds=F||{accomplished:0,received:0},this.name=Y,this.names["0-0"]=Y||"",this.names["1-1"]=w||"",this.names["0-1"]=_||"",this.names["1-0"]=n||"",this.generalId=g||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=v}addLeaguePlays(p,f,F){p.length===0||!F||this.isLeagueDataCalculated||(p.forEach(Y=>{this.isAccomplishedLeaguePlay(Y[f.categoryId])&&(this.leagueAccomplishedAccumulator+=Y[f.total]),this.isReceivedLeaguePlay(Y[f.categoryId])&&(this.leagueReceivedAccumulator+=Y[f.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*F)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*F)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(p,f,F){let Y="-";for(const[w,_]of Object.entries(this.generalCategoriesIds))p===_&&(Y=`${w==="accomplished"?"0":"1"}${Y}`),f===_&&(Y=`${Y}${w==="accomplished"?"0":"1"}`);Y.length===3&&(this.mentions[Y]=F)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(p,f,F,Y,w){!F||!w||p!==this.homeTeamType&&p!==this.visitingTeamType||(F.forEach(_=>{this.isAccomplishedPlay(_[Y.categoryId])?this[p].increaseAccomplishedByOne(_[Y.section],_[Y.total]):this.isReceivedPlay(_[Y.categoryId])&&this[p].increaseReceivedByOne(_[Y.section],_[Y.total])}),this[p].calculateAvg(w))}addLivePlay(p,f,F,Y,w=!1,_=!1){(p===this.homeTeamType||p===this.visitingTeamType)&&F[Y.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[p].increaseAccomplishedByOne(F[Y.section],F[Y.total],!0)}subtractLivePlay(p,f,F,Y,w){(p===this.homeTeamType||p===this.visitingTeamType)&&(this.isAccomplishedPlay(F[Y.categoryId])&&!w?this[p].decreaseAccomplishedLiveByOne(F[Y.section],F[Y.total]):this.isReceivedPlay(F[Y.categoryId])&&w&&this[p].decreaseReceivedLiveByOne(F[Y.section],F[Y.total]))}isAccomplishedLeaguePlay(p){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(F=>p===F||`${p}_r`===F)}isReceivedLeaguePlay(p){return!!this.receivedCategoryIds.find(f=>p===f)}isAccomplishedPlay(p){return this.generalCategoriesIds.accomplished===p}isReceivedPlay(p){return this.generalCategoriesIds.received===p}calcRankingLeague(p,f,F,Y,w,_=!1){this[this.homeTeamType].calculateRanking(p,f,F,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,w,_,this.homeTeamType),this[this.visitingTeamType].calculateRanking(p,f,Y,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,w,_,this.visitingTeamType)}resetData(){this.homeTeam=new j3,this.visitingTeam=new j3,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(p){return this.generalCategoriesIds.accomplished===p||this.generalCategoriesIds.received===p}}const qCt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new Cs([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new Cs([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new Cs([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0,!1),yellowCards:new Cs([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new Cs([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new Cs([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new Cs([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new Cs([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new Cs([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new Cs([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new Cs([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new Cs([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new Cs([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new Cs([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new Cs([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new Cs([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new Cs([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new Cs([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new Cs([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new Cs([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new Cs([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new Cs([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new Cs([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new Cs([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new Cs([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new Cs([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new Cs([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new Cs([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new Cs([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new Cs([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new Cs([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new Cs([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new Cs([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new Cs([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new Cs([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new Cs([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new Cs([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new Cs([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},YCt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],XCt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let L9=null;function ZCt(){return L9||(L9=O1(XCt)),L9}const JCt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let O9=null;function KCt(){return O9||(O9=O1(JCt)),O9}function $3(e,p,f){return[f.get(e[p.categoryId])||[],e[p.teamId],e[p.matchResult],e[p.playingAs],e[p.matchLapse],e[p.section],e[p.total]]}function zV(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function F9(e,p,f){let F=[...p];return e[f.categoryId]===2&&(F[0]=14),e[f.categoryId]===20&&(F[0]=15),[14,15].includes(F[0])?F:null}const QCt=r4(),eTt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],tTt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:PV(),indexesTSP:WCt(),indexesLS:ZCt(),indexesTLP:KCt(),nextGamesDataStructure:qCt,currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(p=>p.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return YCt.filter(p=>p.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return MV(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return MV(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(p=>p.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(p=>e.homeTeamFilter.playingAs.includes(p[0])).filter(p=>e.homeTeamFilter.matchResult.includes(p[1])).reduce((p,f)=>p+f[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(p=>e.visitingTeamFilter.playingAs.includes(p[0])).filter(p=>e.visitingTeamFilter.matchResult.includes(p[1])).reduce((p,f)=>p+f[2],0)},filledDataStructure(e,p){if(e.currentSeasonPlays)for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&F.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&F.visitingTeam.resetTotals(),F.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),F.addTeamPlays(F.homeTeamType,e.gameForAnalysis.home_team,p.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:p.totalFilteredHomeGames),F.addTeamPlays(F.visitingTeamType,e.gameForAnalysis.visiting_team,p.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:p.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,p){return Object.values(p.filledDataStructure).sort((f,F)=>f.priority-F.priority)},statisticData(e,p){for(const f of Object.values(p.filledDataStructure))if(f.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&f.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return f.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,p){for(const[f,F]of Object.entries(p))e.gameForAnalysis[f]=F},setCurrentTournamentName(e,p){e.currentTournamentName=p},setBetSubcategoriesObjects(e,p){e.betSubcategoriesObjects=p},setRegularSeasonName(e,p){e.regularSeasonName=p},setBetSubcategories(e,p){e.betSubcategories=p},setBetDescription(e,p){e.betDescription=p},setSeasonId(e,p){e.seasonId=Number(p)},setHome(e,p){e.homeTeamInfo=p},setAway(e,p){e.awayTeamInfo=p},setMenuOptionActive(e,p){e.menuOptionActive=p},setPastSeasonId(e,p){e.pastSeasonId=p},setUsePastSeasonId(e,p){e.usePastSeasonId=p,p&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,p){e.showPostMatch=p},setHomeResultGame(e,p){e.homeResultGame=p},setAwayResultGame(e,p){e.awayResultGame=p},updateIsSocketConnected(e,p){e.isSocketConnected=p,p&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&YC(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,p){e.currentSeasonTeams=p,e.currentSeasonTeams.forEach(f=>{f.playedGames=e.currentSeasonGames.reduce((F,Y)=>{if(Y.game_status===1&&(Y.home_team===f.team_id||Y.visiting_team===f.team_id)){const w=Y.score[0]-Y.score[1],_=Y.home_team===f.team_id;F.push({playingAs:_?1:2,matchResult:w===0?3:_?w>0?1:2:w<0?1:2})}return F},[])})},updateCurrentSeasonGames(e,p){e.currentSeasonGames=p},updateGameId(e,p){e.gameId=p},updateGameForAnalysis(e,p){e.gameForAnalysis=p,e.isLive=!!p.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,p){e.selectedAnalysis=p},updateShowLiveData(e,p){e.showLiveData=p},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,p){e.idAssetSelected=p},updateStats(e,p){e.currentSeasonPlays=p},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:p,needsFormat:f=!1}){if(f){if(!p||!p.local||!p.local.statistics||!p.visit||!p.visit.statistics)return;e.homeTeamFilter=QC(e.homeTeamFilter,p.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=QC(e.visitingTeamFilter,p.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==p.local.statistics.block&&(e.selectedStatisticTypeBlock=p.local.statistics.block)}else e.homeTeamFilter={...p.homeTeamFilter,statistics:0},e.visitingTeamFilter={...p.visitingTeamFilter,statistics:0}},updateFinishedGames(e,p){e.totalSeasonFinishedGames=p},updateHomeTeamPlays(e,p){e.homeTeamPlays=p},updateVisitingTeamPlays(e,p){e.visitingTeamPlays=p},addSpecialMentions(e,p){const f=Object.values(e.nextGamesDataStructure);f.forEach(F=>{for(const Y of Object.values(F.subcategories))Y.resetMentions()}),f.forEach(F=>{for(const Y of p)for(const w of Object.values(F.subcategories))w.addSpecialMention(Y[0],Y[1],Y[2])})},setDefaultFilter(e,p){e.defaultFilter={homeTeamFilter:{...p.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...p.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,p){if(!e.livePlays.has(p[e.indexesTLP.playId])){e.livePlays.set(p[e.indexesTLP.playId],p);const F=$3(p,e.indexesTLP,e.categoriesMap);for(const Y of Object.values(e.nextGamesDataStructure))for(const w of Object.values(Y.subcategories))w.addLivePlay(e.gameForAnalysis.home_team===F[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",F[e.indexesTSP.teamId],F,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,p){const f=!!p[e.indexesTLP.length],F=e.livePlays.get(p[e.indexesTLP.playId]);if(ZZ(F,p))return;let Y="";const w=e.gameForAnalysis.home_team===p[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";F&&(Y=e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const _=$3(F,e.indexesTLP,e.categoriesMap),n=F9(F,_,e.indexesTLP),g=$3(p,e.indexesTLP,e.categoriesMap),h=F9(p,g,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const v of Object.values(r.subcategories))F&&(v.subtractLivePlay(Y,_[e.indexesTSP.teamId],_,e.indexesTSP,f),n&&v.subtractLivePlay(Y,n[e.indexesTSP.teamId],n,e.indexesTSP,f)),v.addLivePlay(w,g[e.indexesTSP.teamId],g,e.indexesTSP,e.isLive,f),h&&v.addLivePlay(w,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,f);e.livePlays.set(p[e.indexesTLP.playId],p)},deleteLiveGamePlay(e,p){const f=!!p[e.indexesTLP.length],F=e.livePlays.get(p[e.indexesTLP.playId]);let Y="";if(F){Y=e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(F[e.indexesTLP.playId]);const w=$3(F,e.indexesTLP,e.categoriesMap),_=F9(p,w,e.indexesTLP);for(const n of Object.values(e.nextGamesDataStructure))for(const g of Object.values(n.subcategories))g.subtractLivePlay(Y,w[e.indexesTSP.teamId],w,e.indexesTSP,f),_&&g.subtractLivePlay(Y,_[e.indexesTSP.teamId],_,e.indexesTSP,f)}},clearLiveTotals(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.homeTeam.resetTotalsLive(),f.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,p){e.statistics=p},updateOldSeasonId(e,p){e.oldSeasonId=p},addRankingInSubcategories(e,{getters:p,isPremiumAccount:f}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(w=>{w.homeTeamFilterGames=w.playedGames.filter(_=>e.homeTeamFilter.playingAs.includes(_.playingAs)&&e.homeTeamFilter.matchResult.includes(_.matchResult)).length,w.visitingTeamFilterGames=w.playedGames.filter(_=>e.visitingTeamFilter.playingAs.includes(_.playingAs)&&e.visitingTeamFilter.matchResult.includes(_.matchResult)).length});const F=[],Y=new Map;for(const w of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(w.subcategories))F.push(_);p.rankingData.forEach(w=>{for(const _ of F)if(_.isInGeneralCategory(w[e.indexesLS.categoryId])){Y.has(_.id)?Y.get(_.id).push(w):Y.set(_.id,[w]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,p){e.homeGames=zV(p)},setVisitingGames(e,p){e.visitingGames=zV(p)},generateCategoriesMap(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.accomplishedCategoryIds.forEach(F=>{const Y=e.categoriesMap.get(F);Y?Y.push(f.generalCategoriesIds.accomplished):e.categoriesMap.set(F,[f.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:p},{command:f}){f==="on"?p("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):p("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},p){try{const _=await $Ct({gameId:p.gameId});if(_){var f=[],F=[],Y={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},w={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(_.data).length!==0&&(f=_.data.data.filter(n=>n[1]==p.homeTeam),F=_.data.data.filter(n=>n[1]==p.awayTeam),Y=_.data.games,w=_.data.games),e("updateHomeTeamPlays",f),e("updateVisitingTeamPlays",F),e("setHomeGames",Y),e("setVisitingGames",w)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(_){return Promise.reject(_)}},async fillStatisticDataPostMatch({commit:e,dispatch:p},f){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let F=[];e("updateGameForAnalysis",f.gameInfo),F.push(p("setAndGetStatsPostMatch",{gameId:f.game,homeTeam:f.homeTeam,awayTeam:f.awayTeam})),await Promise.all(F)}catch(F){throw new Error(F)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:p,commit:f},{gameId:F,isTeamsAnalysis:Y,currentSeasonId:w,isLoginChanged:_=!1,defaultFilter:n=null,gameInfo:g=null,isCupGame:h=!1}){try{let r={},v=e.seasonId!==Number(w);const y=[];f("setIsSectionLoading",!0,{root:!0}),f("setUsePastSeasonId",!1),v&&f("setSeasonId",w),f("updateGameId",Number(F)),e.oldSeasonId!==e.seasonId&&f("resetNextGamesDataStructure");const u=await p("getCurrentSeasonGames",Number(F));if(f("leagueGeneral/updateCurrentSeasonGames",u,{root:!0}),r=u.find(o=>o.game_id===Number(F)),!r&&g&&(r=g),r&&f("updateGameForAnalysis",r),r.game_status!==1&&((_||e.categoriesMap.size===0)&&f("generateCategoriesMap"),h||await p("checkTeamsData",{gameId:F,isFromBet:!!n}),(_||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(p("getSeasonStatistics"))),e.usePastSeasonId){const o=await p("getCurrentSeasonGamesLast");f("leagueGeneral/updateCurrentSeasonGames",o,{root:!0})}(_||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(o=>r.home_team===o.team_id))&&y.push(p("getCurrentSeasonTeams")),f("setHomeResultGame",r.score[0]),f("setAwayResultGame",r.score[1]),Y?r.game_status!==1?(await p("fillStatisticData",{gameId:F,gameinfo:r,promises:y,defaultFilter:n}),f("updateShowPostMatchData",!1)):(f("updateStats",[]),f("updateShowPostMatchData",!0),y.push(p("fillStatisticDataPostMatch",{game:F,homeTeam:r.home_team,awayTeam:r.visiting_team,gameInfo:r})),await Promise.all(y)):f("setIsSectionLoading",!1,{root:!0})}catch(r){return Promise.reject(r)}},async fillStatisticData({commit:e,dispatch:p,getters:f,rootGetters:F,state:Y},{gameId:w,gameinfo:_,promises:n=[],defaultFilter:g=null}){let h=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",_),(_.is_live||_.game_status===0)&&n.push(p("getCurrentLiveGamePlays",w)),n.push(p("getSpecialMentionsByGame",w)),n.push(p("getHomeTeamPlays")),n.push(p("getVisitingTeamPlays")),n.push(p("getCurrentSeasonPlays")),g&&n.push(GCt(g)),h=await Promise.all(n)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:f,isPremiumAccount:F["loginGeneral/getPremiumAccount"]}),g){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:Y.defaultFilter,needsFormat:!1}),p("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:p,rootState:f,commit:F},{gameId:Y,isFromBet:w}){try{const _=Number(Y);if(e.pastSeasonId){F("setPastSeasonId",e.pastSeasonId,{root:!0});const n=f.leagueGeneral.currentSeasonGames.find(g=>g.game_id===_);n&&F("updateGameForAnalysis",n),await Promise.all([p("getHomeTeamPlays"),p("getVisitingTeamPlays")]),F("setUsePastSeasonId",w||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else F("setUsePastSeasonId",!1)}catch(_){throw new Error(_)}},async getSpecialMentionsByGame({commit:e},p){try{const f=await DCt({gameId:p});e("addSpecialMentions",f)}catch(f){return Promise.reject(f)}},async getCurrentSeasonGames({commit:e,state:p},f){try{const{teams:F,games:Y,past_season_id:w,tournament_id:_}=await OCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,gameId:f}),n=eTt.find(g=>g.id===_);return n&&e("setCurrentTournamentName",n.name),e("setHome",F[0]),e("setAway",F[1]),p.usePastSeasonId||e("setPastSeasonId",w),await e("updateCurrentSeasonGames",Y),Y&&Array.isArray(Y)&&e("updateFinishedGames",Y.reduce((g,h)=>(h.game_status===1&&(g+=1),g),0)),Y}catch(F){return Promise.reject(F)}},async getCurrentSeasonGamesLast({commit:e,state:p}){try{const{games:f,past_season_id:F}=await IV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});return p.usePastSeasonId||e("setPastSeasonId",F),await e("updateCurrentSeasonGames",f),f&&Array.isArray(f)&&e("updateFinishedGames",f.reduce((Y,w)=>(w.game_status===1&&(Y+=1),Y),0)),f}catch(f){return Promise.reject(f)}},async getCurrentSeasonTeams({commit:e,state:p}){try{const f=await jCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});e("updateCurrentSeasonTeams",f.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:p}){try{const f=p.usePastSeasonId?p.pastSeasonId:p.seasonId,F=await NCt({seasonId:f});e("updateSeasonStatistics",F),e("updateOldSeasonId",f)}catch(f){return Promise.reject(f)}},updateRankingInSubcategories({state:e,commit:p,getters:f,rootGetters:F}){e.currentSeasonGames.length>0&&p("addRankingInSubcategories",{getters:f,isPremiumAccount:F["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:p}){try{const f=await BV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,teamId:p.gameForAnalysis.home_team});f.data&&(e("updateHomeTeamPlays",f.data.data),e("setHomeGames",f.data.games))}catch(f){return Promise.reject(f)}},async getVisitingTeamPlays({commit:e,state:p}){try{const f=await BV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,teamId:p.gameForAnalysis.visiting_team});f.data&&(e("updateVisitingTeamPlays",f.data.data),e("setVisitingGames",f.data.games))}catch(f){return Promise.reject(f)}},async getCurrentSeasonPlays({commit:e,state:p}){try{const f=await zCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});e("updateStats",f)}catch(f){return Promise.reject(new Error(f))}},async getCurrentLiveGamePlays({state:e,commit:p},f){try{const F=await FCt({gameId:f});e.livePlays=new Map,F.forEach(Y=>{e.gameForAnalysis.game_id===Y[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===Y[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===Y[e.indexesTLP.teamId])&&p("addLiveGamePlay",Y)})}catch(F){throw new Error(F)}},socket_new({state:e,commit:p},f){const F=f[1];(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===F[e.indexesTLP.teamId])&&p("addLiveGamePlay",F)},socket_update({state:e,commit:p},f){const F=f[1];e.gameForAnalysis.game_id===F[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===F[e.indexesTLP.teamId])&&p("updateLiveGamePlay",F)},socket_delete({state:e,commit:p},f){const F=f[1];e.gameForAnalysis.game_id===F[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===F[e.indexesTLP.teamId])&&p("deleteLiveGamePlay",F)},exitChannel({state:e,getters:p,rootState:f,rootGetters:F,commit:Y}){const w=F["loginGeneral/getPremiumAccount"];p.isLive&&w&&(Y("updateShowLiveData",!0),Y("clearLiveTotals"),e.livePlays.clear(),QCt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))F.homeTeam.resetTotals(),F.visitingTeam.resetTotals(),F.homeTeam.resetTotalsLive(),F.visitingTeam.resetTotalsLive(),F.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(f=>{for(const F of Object.values(f.subcategories))F.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))F.homeTeam.resetTotals(),F.visitingTeam.resetTotals(),F.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(f=>{for(const F of Object.values(f.subcategories))F.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function nTt(){try{const{data:e}=await _d({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const rTt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,p){e.booleanIsStatisticModalOpen=p},setTournamentType(e,p){e.tournamentType=p},setSectionRef(e,p){e.sectionRef=p},setSectionAnalytics(e,p){e.sectionAnalytics=p},setSeccionBetsGolTipster(e,p){e.seccionBetsGolTipster=p},setPreviewSectionAnalytics(e,p){e.previewSectionAnalytics=p},setVideoSrc(e,p){e.videoSrc=p},setVideoModalVisibility(e,p){e.isVideoModalVisible=p},setSelectedTournament(e,p){e.selectedTournament=p},setTournaments(e,p){e.tournaments=p.map(f=>({...f.tournament,seasons:f.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,p){e.tournamentSelected=p}},actions:{async fetchTournaments({state:e,commit:p}){try{if(e.tournaments.length===0){const f=await nTt();p("setTournaments",f)}}catch(f){throw new Error(f)}}}}};async function aTt({seasonId:e,localTeamId:p,visitingTeamId:f}){try{const F=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${p}/${f}`;return(await _d({url:F})).data}catch(F){return Promise.reject(F)}}async function iTt({seasonId:e,localTeamId:p,visitingTeamId:f}){try{const F=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${p}/${f}`;return(await _d({url:F})).data}catch(F){return Promise.reject(F)}}const NV=(e,p)=>{let f={};return e.forEach((F,Y)=>{Y==3&&(p[0]==35||p[0]==54)&&(p[Y]==2?p[Y]=1:p[Y]=2),Y==2&&(p[0]==35||p[0]==54)&&(p[Y]==1?p[Y]=2:p[Y]==2&&(p[Y]=1)),f[F]=p[Y]}),f},LV=(e,p)=>e.filter(F=>{const Y=p.playingAs.includes(F.playing_as),w=p.matchResult.includes(F.match_result),_=p.sections.includes(F.section);return Y&&w&&_});(function(){function e(p,f,F){return typeof F>"u"||+F==0?Math[p](f):(f=+f,F=+F,isNaN(f)||!(typeof F=="number"&&F%1===0)?NaN:(f=f.toString().split("e"),f=Math[p](+(f[0]+"e"+(f[1]?+f[1]-F:-F))),f=f.toString().split("e"),+(f[0]+"e"+(f[1]?+f[1]+F:F))))}Math.ceil10||(Math.ceil10=function(p,f){return e("ceil",p,f)})})();function OV(e,p){let f=p*-1;return Math.ceil10(e,f)}const oTt={...rTt,...UCt,...tTt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,p,f)=>{const F=e.xGLocalPlays,Y="homeTeamFilter",w=f.nextGeneral[Y];return LV(F,w)||[]},playsAway:(e,p,f)=>{const F=e.xGVisitingPlays,Y="visitingTeamFilter",w=f.nextGeneral[Y];return LV(F,w)},goalsQtyLocal:(e,p)=>{const f=R1.find(F=>F.name==="Goles");return p.playsLocal.filter(F=>f.categories.includes(F.category_id)).length},goalsQtyAway:(e,p)=>{const f=R1.find(F=>F.name==="Goles");return p.playsAway.filter(F=>f.categories.includes(F.category_id)).length},shotsOnGoalQtyLocal:(e,p)=>p.playsLocal.filter(f=>f.category_id===510).length,shotsOnGoalQtyAway:(e,p)=>p.playsAway.filter(f=>f.category_id===510).length,xGLocal:(e,p)=>{const f=new Set;let F=p.playsLocal.reduce((Y,w)=>(f.has(w.moment_of_play)||(f.add(w.moment_of_play),Y+=w.xG2),Y),0);return OV(F,2)},xGAway:(e,p)=>{const f=new Set;let F=p.playsAway.reduce((Y,w)=>(f.has(w.moment_of_play)||(f.add(w.moment_of_play),Y+=w.xG2),Y),0);return OV(F,2)}},mutations:{setTeamSelected(e,p){e.teamSelected=p},setPlays(e,p){const f=p.local_team.map(r=>NV(p.data_headers,r)),F=[],Y=[],w=new Set;f.forEach(r=>{eE.has(r.category_id)?w.has(r.moment_of_play)||(w.add(r.moment_of_play),F.push(r)):tE.has(r.category_id)&&Y.push(r)}),e.xGLocalPlays=[...Y,...F];const _=p.visiting_team.map(r=>NV(p.data_headers,r)),n=new Set,g=[],h=[];_.forEach(r=>{eE.has(r.category_id)?n.has(r.moment_of_play)||(n.add(r.moment_of_play),g.push(r)):tE.has(r.category_id)&&h.push(r)}),e.xGVisitingPlays=[...h,...g]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:p,localTeamId:f,visitingTeamId:F,postMatch:Y=!1}){try{let w={};Y?w=await iTt({seasonId:p,localTeamId:f,visitingTeamId:F}):w=await aTt({seasonId:p,localTeamId:f,visitingTeamId:F}),e("setPlays",w)}catch(w){return Promise.reject(w)}}}}}};function sTt(e){for(const[p,f]of Object.entries(oTt))e.hasModule(p)||e.registerModule(p,f)}const lTt={class:"subcategory-group"},cTt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",lTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,F=>(t.openBlock(),t.createBlock(t.unref(ks),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},uTt=sl(cTt,[["__scopeId","data-v-ae6f3d72"]]),dTt={class:"filter-subcategories"},hTt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",dTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,F=>(t.openBlock(),t.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[t.createVNode(uTt,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),U3=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),pTt={class:"details__header"},fTt=U3(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),mTt={class:"details__header__checkbox"},gTt={class:"details__body"},yTt={class:"details__body__playing-as"},vTt=["onClick"],_Tt={class:"details__header"},bTt=U3(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),xTt={class:"details__header__checkbox"},wTt={class:"details__body"},kTt=U3(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),STt={class:"details__body__game-section"},CTt=["onClick"],TTt={class:"details__body"},ETt=U3(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ATt={class:"details__body__game-section"},MTt=["onClick"],ITt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__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 p=e;t.useCssVars(r=>({"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 f=t.computed(()=>p.playingAs.every(r=>r.isSelected)),F=t.computed(()=>p.gameSections.every(r=>r.isSelected)),Y=t.computed(()=>p.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),w=t.computed(()=>({"--border-radius-first-button":`${p.buttonsBorderRadius} 0 0 ${p.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${p.buttonsBorderRadius} ${p.buttonsBorderRadius} 0`}));function _(r){r?p.playingAs.forEach(v=>{v.isSelected=!0}):p.playingAs.forEach((v,y)=>{v.isSelected=y===0})}function n(r){p.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function g(r){p.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?p.gameSections.forEach(v=>{v.isSelected=!0}):p.gameSections.forEach((v,y)=>{v.isSelected=y===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(w.value)},[t.createElementVNode("div",pTt,[fTt,t.createElementVNode("div",mTt,[t.createVNode(t.unref(ks),{label:"Todos","model-value":f.value,"onUpdate:modelValue":_},null,8,["model-value"])])]),t.createElementVNode("div",gTt,[t.createElementVNode("div",yTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.playingAs,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>n(y)},t.toDisplayString(y.name),11,vTt))),128))])]),t.createElementVNode("div",_Tt,[bTt,t.createElementVNode("div",xTt,[t.createVNode(t.unref(ks),{label:"Todos","model-value":F.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",wTt,[kTt,t.createElementVNode("div",STt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.firstHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,CTt))),128))])]),t.createElementVNode("div",TTt,[ETt,t.createElementVNode("div",ATt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.secondHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,MTt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),PTt={class:"filter-field"},BTt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__name:"FilterField",setup(e){const p=t.ref(Array.from({length:16},(F,Y)=>Y+1));function f(){}return(F,Y)=>(t.openBlock(),t.createElementBlock("div",PTt,[t.createVNode(t.unref(lL),{width:"100%","background-color":"#2E3B46",value:p.value,"onUpdate:modelValue":f},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),zTt={class:"subcategory-group"},NTt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",zTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,F=>(t.openBlock(),t.createBlock(t.unref(Ss),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},LTt=ll(NTt,[["__scopeId","data-v-ae6f3d72"]]),OTt={class:"filter-subcategories"},FTt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",OTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,F=>(t.openBlock(),t.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[t.createVNode(LTt,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),G3=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),DTt={class:"details__header"},RTt=G3(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),VTt={class:"details__header__checkbox"},jTt={class:"details__body"},$Tt={class:"details__body__playing-as"},UTt=["onClick"],GTt={class:"details__header"},HTt=G3(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),WTt={class:"details__header__checkbox"},qTt={class:"details__body"},YTt=G3(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),XTt={class:"details__body__game-section"},ZTt=["onClick"],JTt={class:"details__body"},KTt=G3(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),QTt={class:"details__body__game-section"},eEt=["onClick"],tEt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__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 p=e;t.useCssVars(r=>({"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 f=t.computed(()=>p.playingAs.every(r=>r.isSelected)),F=t.computed(()=>p.gameSections.every(r=>r.isSelected)),Y=t.computed(()=>p.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),w=t.computed(()=>({"--border-radius-first-button":`${p.buttonsBorderRadius} 0 0 ${p.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${p.buttonsBorderRadius} ${p.buttonsBorderRadius} 0`}));function _(r){r?p.playingAs.forEach(v=>{v.isSelected=!0}):p.playingAs.forEach((v,y)=>{v.isSelected=y===0})}function n(r){p.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function g(r){p.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?p.gameSections.forEach(v=>{v.isSelected=!0}):p.gameSections.forEach((v,y)=>{v.isSelected=y===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(w.value)},[t.createElementVNode("div",DTt,[RTt,t.createElementVNode("div",VTt,[t.createVNode(t.unref(Ss),{label:"Todos","model-value":f.value,"onUpdate:modelValue":_},null,8,["model-value"])])]),t.createElementVNode("div",jTt,[t.createElementVNode("div",$Tt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.playingAs,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>n(y)},t.toDisplayString(y.name),11,UTt))),128))])]),t.createElementVNode("div",GTt,[HTt,t.createElementVNode("div",WTt,[t.createVNode(t.unref(Ss),{label:"Todos","model-value":F.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",qTt,[YTt,t.createElementVNode("div",XTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.firstHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,ZTt))),128))])]),t.createElementVNode("div",JTt,[KTt,t.createElementVNode("div",QTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.secondHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,eEt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),nEt={class:"filter-field"},rEt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__name:"FilterField",setup(e){const p=t.ref(Array.from({length:16},(F,Y)=>Y+1));function f(){}return(F,Y)=>(t.openBlock(),t.createElementBlock("div",nEt,[t.createVNode(t.unref(KF),{width:"100%","background-color":"#2E3B46",value:p.value,"onUpdate:modelValue":f},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Ju.GSCGameData=BCt,Ju.connectSocket=a4,Ju.disconnectSocket=i4,Ju.getSocket=r4,Ju.registerStoreModules=sTt,Object.defineProperty(Ju,Symbol.toStringTag,{value:"Module"})});
7589
+ */var I9t="store";function E0(e,p){Object.keys(e).forEach(function(f){return p(e[f],f)})}function uV(e){return e!==null&&typeof e=="object"}function P9t(e){return e&&typeof e.then=="function"}function Sp(e,p){if(!e)throw new Error("[vuex] "+p)}function B9t(e,p){return function(){return e(p)}}function dV(e,p,f){return p.indexOf(e)<0&&(f&&f.prepend?p.unshift(e):p.push(e)),function(){var F=p.indexOf(e);F>-1&&p.splice(F,1)}}function hV(e,p){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var f=e.state;D3(e,f,[],e._modules.root,!0),E9(e,f,p)}function E9(e,p,f){var F=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var Y=e._wrappedGetters,w={};E0(Y,function(_,n){w[n]=B9t(_,e),Object.defineProperty(e.getters,n,{get:function(){return w[n]()},enumerable:!0})}),e._state=t.reactive({data:p}),e.strict&&F9t(e),F&&f&&e._withCommit(function(){F.data=null})}function D3(e,p,f,F,Y){var w=!f.length,_=e._modules.getNamespace(f);if(F.namespaced&&(e._modulesNamespaceMap[_]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+_+" for the namespaced module "+f.join("/")),e._modulesNamespaceMap[_]=F),!w&&!Y){var n=A9(p,f.slice(0,-1)),g=f[f.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&g in n&&console.warn('[vuex] state field "'+g+'" was overridden by a module with the same name at "'+f.join(".")+'"'),n[g]=F.state})}var h=F.context=z9t(e,_,f);F.forEachMutation(function(r,v){var y=_+v;N9t(e,y,r,h)}),F.forEachAction(function(r,v){var y=r.root?v:_+v,u=r.handler||r;L9t(e,y,u,h)}),F.forEachGetter(function(r,v){var y=_+v;O9t(e,y,r,h)}),F.forEachChild(function(r,v){D3(e,p,f.concat(v),r,Y)})}function z9t(e,p,f){var F=p==="",Y={dispatch:F?e.dispatch:function(w,_,n){var g=R3(w,_,n),h=g.payload,r=g.options,v=g.type;if((!r||!r.root)&&(v=p+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+g.type+", global type: "+v);return}return e.dispatch(v,h)},commit:F?e.commit:function(w,_,n){var g=R3(w,_,n),h=g.payload,r=g.options,v=g.type;if((!r||!r.root)&&(v=p+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+g.type+", global type: "+v);return}e.commit(v,h,r)}};return Object.defineProperties(Y,{getters:{get:F?function(){return e.getters}:function(){return pV(e,p)}},state:{get:function(){return A9(e.state,f)}}}),Y}function pV(e,p){if(!e._makeLocalGettersCache[p]){var f={},F=p.length;Object.keys(e.getters).forEach(function(Y){if(Y.slice(0,F)===p){var w=Y.slice(F);Object.defineProperty(f,w,{get:function(){return e.getters[Y]},enumerable:!0})}}),e._makeLocalGettersCache[p]=f}return e._makeLocalGettersCache[p]}function N9t(e,p,f,F){var Y=e._mutations[p]||(e._mutations[p]=[]);Y.push(function(w){f.call(e,F.state,w)})}function L9t(e,p,f,F){var Y=e._actions[p]||(e._actions[p]=[]);Y.push(function(w){var _=f.call(e,{dispatch:F.dispatch,commit:F.commit,getters:F.getters,state:F.state,rootGetters:e.getters,rootState:e.state},w);return P9t(_)||(_=Promise.resolve(_)),e._devtoolHook?_.catch(function(n){throw e._devtoolHook.emit("vuex:error",n),n}):_})}function O9t(e,p,f,F){if(e._wrappedGetters[p]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+p);return}e._wrappedGetters[p]=function(Y){return f(F.state,F.getters,Y.state,Y.getters)}}function F9t(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Sp(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function A9(e,p){return p.reduce(function(f,F){return f[F]},e)}function R3(e,p,f){return uV(e)&&e.type&&(f=p,p=e,e=e.type),process.env.NODE_ENV!=="production"&&Sp(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:p,options:f}}var D9t="vuex bindings",fV="vuex:mutations",M9="vuex:actions",zg="vuex",R9t=0;function V9t(e,p){M9t({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[D9t]},function(f){f.addTimelineLayer({id:fV,label:"Vuex Mutations",color:mV}),f.addTimelineLayer({id:M9,label:"Vuex Actions",color:mV}),f.addInspector({id:zg,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),f.on.getInspectorTree(function(F){if(F.app===e&&F.inspectorId===zg)if(F.filter){var Y=[];_V(Y,p._modules.root,F.filter,""),F.rootNodes=Y}else F.rootNodes=[vV(p._modules.root,"")]}),f.on.getInspectorState(function(F){if(F.app===e&&F.inspectorId===zg){var Y=F.nodeId;pV(p,Y),F.state=U9t(H9t(p._modules,Y),Y==="root"?p.getters:p._makeLocalGettersCache,Y)}}),f.on.editInspectorState(function(F){if(F.app===e&&F.inspectorId===zg){var Y=F.nodeId,w=F.path;Y!=="root"&&(w=Y.split("/").filter(Boolean).concat(w)),p._withCommit(function(){F.set(p._state.data,w,F.state.value)})}}),p.subscribe(function(F,Y){var w={};F.payload&&(w.payload=F.payload),w.state=Y,f.notifyComponentUpdate(),f.sendInspectorTree(zg),f.sendInspectorState(zg),f.addTimelineEvent({layerId:fV,event:{time:Date.now(),title:F.type,data:w}})}),p.subscribeAction({before:function(F,Y){var w={};F.payload&&(w.payload=F.payload),F._id=R9t++,F._time=Date.now(),w.state=Y,f.addTimelineEvent({layerId:M9,event:{time:F._time,title:F.type,groupId:F._id,subtitle:"start",data:w}})},after:function(F,Y){var w={},_=Date.now()-F._time;w.duration={_custom:{type:"duration",display:_+"ms",tooltip:"Action duration",value:_}},F.payload&&(w.payload=F.payload),w.state=Y,f.addTimelineEvent({layerId:M9,event:{time:Date.now(),title:F.type,groupId:F._id,subtitle:"end",data:w}})}})})}var mV=8702998,j9t=6710886,$9t=16777215,gV={label:"namespaced",textColor:$9t,backgroundColor:j9t};function yV(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function vV(e,p){return{id:p||"root",label:yV(p),tags:e.namespaced?[gV]:[],children:Object.keys(e._children).map(function(f){return vV(e._children[f],p+f+"/")})}}function _V(e,p,f,F){F.includes(f)&&e.push({id:F||"root",label:F.endsWith("/")?F.slice(0,F.length-1):F||"Root",tags:p.namespaced?[gV]:[]}),Object.keys(p._children).forEach(function(Y){_V(e,p._children[Y],f,F+Y+"/")})}function U9t(e,p,f){p=f==="root"?p:p[f];var F=Object.keys(p),Y={state:Object.keys(e.state).map(function(_){return{key:_,editable:!0,value:e.state[_]}})};if(F.length){var w=G9t(p);Y.getters=Object.keys(w).map(function(_){return{key:_.endsWith("/")?yV(_):_,editable:!1,value:I9(function(){return w[_]})}})}return Y}function G9t(e){var p={};return Object.keys(e).forEach(function(f){var F=f.split("/");if(F.length>1){var Y=p,w=F.pop();F.forEach(function(_){Y[_]||(Y[_]={_custom:{value:{},display:_,tooltip:"Module",abstract:!0}}),Y=Y[_]._custom.value}),Y[w]=I9(function(){return e[f]})}else p[f]=I9(function(){return e[f]})}),p}function H9t(e,p){var f=p.split("/").filter(function(F){return F});return f.reduce(function(F,Y,w){var _=F[Y];if(!_)throw new Error('Missing module "'+Y+'" for path "'+p+'".');return w===f.length-1?_:_._children},p==="root"?e:e.root._children)}function I9(e){try{return e()}catch(p){return p}}var Cp=function(e,p){this.runtime=p,this._children=Object.create(null),this._rawModule=e;var f=e.state;this.state=(typeof f=="function"?f():f)||{}},bV={namespaced:{configurable:!0}};bV.namespaced.get=function(){return!!this._rawModule.namespaced},Cp.prototype.addChild=function(e,p){this._children[e]=p},Cp.prototype.removeChild=function(e){delete this._children[e]},Cp.prototype.getChild=function(e){return this._children[e]},Cp.prototype.hasChild=function(e){return e in this._children},Cp.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Cp.prototype.forEachChild=function(e){E0(this._children,e)},Cp.prototype.forEachGetter=function(e){this._rawModule.getters&&E0(this._rawModule.getters,e)},Cp.prototype.forEachAction=function(e){this._rawModule.actions&&E0(this._rawModule.actions,e)},Cp.prototype.forEachMutation=function(e){this._rawModule.mutations&&E0(this._rawModule.mutations,e)},Object.defineProperties(Cp.prototype,bV);var A0=function(e){this.register([],e,!1)};A0.prototype.get=function(e){return e.reduce(function(p,f){return p.getChild(f)},this.root)},A0.prototype.getNamespace=function(e){var p=this.root;return e.reduce(function(f,F){return p=p.getChild(F),f+(p.namespaced?F+"/":"")},"")},A0.prototype.update=function(e){xV([],this.root,e)},A0.prototype.register=function(e,p,f){var F=this;f===void 0&&(f=!0),process.env.NODE_ENV!=="production"&&SV(e,p);var Y=new Cp(p,f);if(e.length===0)this.root=Y;else{var w=this.get(e.slice(0,-1));w.addChild(e[e.length-1],Y)}p.modules&&E0(p.modules,function(_,n){F.register(e.concat(n),_,f)})},A0.prototype.unregister=function(e){var p=this.get(e.slice(0,-1)),f=e[e.length-1],F=p.getChild(f);if(!F){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+f+"', which is not registered");return}F.runtime&&p.removeChild(f)},A0.prototype.isRegistered=function(e){var p=this.get(e.slice(0,-1)),f=e[e.length-1];return p?p.hasChild(f):!1};function xV(e,p,f){if(process.env.NODE_ENV!=="production"&&SV(e,f),p.update(f),f.modules)for(var F in f.modules){if(!p.getChild(F)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+F+"' on hot reloading, manual reload is needed");return}xV(e.concat(F),p.getChild(F),f.modules[F])}}var wV={assert:function(e){return typeof e=="function"},expected:"function"},W9t={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},kV={getters:wV,mutations:wV,actions:W9t};function SV(e,p){Object.keys(kV).forEach(function(f){if(p[f]){var F=kV[f];E0(p[f],function(Y,w){Sp(F.assert(Y),q9t(e,f,w,Y,F.expected))})}})}function q9t(e,p,f,F,Y){var w=p+" should be "+Y+' but "'+p+"."+f+'"';return e.length>0&&(w+=' in module "'+e.join(".")+'"'),w+=" is "+JSON.stringify(F)+".",w}var lh=function e(p){var f=this;p===void 0&&(p={}),process.env.NODE_ENV!=="production"&&(Sp(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Sp(this instanceof e,"store must be called with the new operator."));var F=p.plugins;F===void 0&&(F=[]);var Y=p.strict;Y===void 0&&(Y=!1);var w=p.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new A0(p),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=w;var _=this,n=this,g=n.dispatch,h=n.commit;this.dispatch=function(v,y){return g.call(_,v,y)},this.commit=function(v,y,u){return h.call(_,v,y,u)},this.strict=Y;var r=this._modules.root.state;D3(this,r,[],this._modules.root),E9(this,r),F.forEach(function(v){return v(f)})},P9={state:{configurable:!0}};lh.prototype.install=function(e,p){e.provide(p||I9t,this),e.config.globalProperties.$store=this;var f=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;f&&V9t(e,this)},P9.state.get=function(){return this._state.data},P9.state.set=function(e){process.env.NODE_ENV!=="production"&&Sp(!1,"use store.replaceState() to explicit replace store state.")},lh.prototype.commit=function(e,p,f){var F=this,Y=R3(e,p,f),w=Y.type,_=Y.payload,n=Y.options,g={type:w,payload:_},h=this._mutations[w];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+w);return}this._withCommit(function(){h.forEach(function(r){r(_)})}),this._subscribers.slice().forEach(function(r){return r(g,F.state)}),process.env.NODE_ENV!=="production"&&n&&n.silent&&console.warn("[vuex] mutation type: "+w+". Silent option has been removed. Use the filter functionality in the vue-devtools")},lh.prototype.dispatch=function(e,p){var f=this,F=R3(e,p),Y=F.type,w=F.payload,_={type:Y,payload:w},n=this._actions[Y];if(!n){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+Y);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(_,f.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var g=n.length>1?Promise.all(n.map(function(h){return h(w)})):n[0](w);return new Promise(function(h,r){g.then(function(v){try{f._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(_,f.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}h(v)},function(v){try{f._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(_,f.state,v)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}r(v)})})},lh.prototype.subscribe=function(e,p){return dV(e,this._subscribers,p)},lh.prototype.subscribeAction=function(e,p){var f=typeof e=="function"?{before:e}:e;return dV(f,this._actionSubscribers,p)},lh.prototype.watch=function(e,p,f){var F=this;return process.env.NODE_ENV!=="production"&&Sp(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(F.state,F.getters)},p,Object.assign({},f))},lh.prototype.replaceState=function(e){var p=this;this._withCommit(function(){p._state.data=e})},lh.prototype.registerModule=function(e,p,f){f===void 0&&(f={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Sp(Array.isArray(e),"module path must be a string or an Array."),Sp(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,p),D3(this,this.state,e,this._modules.get(e),f.preserveState),E9(this,this.state)},lh.prototype.unregisterModule=function(e){var p=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Sp(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var f=A9(p.state,e.slice(0,-1));delete f[e[e.length-1]]}),hV(this)},lh.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Sp(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},lh.prototype.hotUpdate=function(e){this._modules.update(e),hV(this,!0)},lh.prototype._withCommit=function(e){var p=this._committing;this._committing=!0,e(),this._committing=p},Object.defineProperties(lh.prototype,P9);var Y9t=Z9t(function(e,p){var f={};return process.env.NODE_ENV!=="production"&&!CV(p)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),X9t(p).forEach(function(F){var Y=F.key,w=F.val;f[Y]=function(){for(var _=[],n=arguments.length;n--;)_[n]=arguments[n];var g=this.$store.commit;if(e){var h=J9t(this.$store,"mapMutations",e);if(!h)return;g=h.context.commit}return typeof w=="function"?w.apply(this,[g].concat(_)):g.apply(this.$store,[w].concat(_))}}),f});function X9t(e){return CV(e)?Array.isArray(e)?e.map(function(p){return{key:p,val:p}}):Object.keys(e).map(function(p){return{key:p,val:e[p]}}):[]}function CV(e){return Array.isArray(e)||uV(e)}function Z9t(e){return function(p,f){return typeof p!="string"?(f=p,p=""):p.charAt(p.length-1)!=="/"&&(p+="/"),e(p,f)}}function J9t(e,p,f){var F=e._modulesNamespaceMap[f];return process.env.NODE_ENV!=="production"&&!F&&console.error("[vuex] module namespace not found in "+p+"(): "+f),F}const K9t="/icn-play.svg",Q9t="/icn-tiros-de-esquina.svg",eSt="/icn-tiro-a-porteria.svg",tSt="/icn-cambio.svg",nSt="/icn-falta.svg",rSt="/atajada.svg",aSt="/fuera-de-lugar.svg",B9="/gol.svg",iSt="/var.png",oSt="/tiempo-agregado.svg",sSt="/jugada-peligrosa.svg",lSt="/penal-marcado.svg",cSt="/penal-fallado.svg",uSt="/inicia-el-partido.svg",dSt="/fin-del-partido.svg",hSt="/icn-tarjeta-amarilla.svg",pSt="/icn-tarjeta-roja.svg",fSt=[1,2,3,4,6],mSt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],p=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return C9.GOAL_IDS.includes(p)?(e.push("is-main-event"),e.push("goal")):C9.YELLOW_CARD_IDS.includes(p)?(e.push("is-main-event"),e.push("yellow-card")):C9.RED_CARD_IDS.includes(p)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(p=>x9t(p))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||fSt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Y9t("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,p]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(p),teamId:this.gameEvent.team_id})}}},gSt=e=>(t.pushScopeId("data-v-84fd3fef"),e=e(),t.popScopeId(),e),ySt={class:"time-line-event__details"},vSt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},_St=["src"],bSt=gSt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),xSt={class:"time-line-event__details__info"},wSt={key:0,class:"time-line-event__details__info__header__players"},kSt={class:"time-line-event__details__info__header__players__div-img"},SSt=["src"],CSt={class:"time-line-event__details__info__body"},TSt={class:"time-line-event__details__info__body__comment"},ESt={class:"time-line-event__minute__container"},ASt={class:"time-line-event__minute__container__text"},MSt={class:"time-line-event__minute__container__icon-container"},ISt={class:"time-line-event__minute__container__icon-container__icon"},PSt={key:0,src:Q9t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BSt={key:1,src:eSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zSt={key:2,src:tSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NSt={key:3,src:nSt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},LSt={key:4,src:rSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OSt={key:5,src:aSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FSt={key:6,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DSt={key:7,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RSt={key:8,src:B9,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VSt={key:9,src:iSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jSt={key:10,src:oSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$St={key:11,src:sSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},USt={key:12,src:lSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GSt={key:13,src:cSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HSt={key:14,src:uSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WSt={key:15,src:dSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qSt={key:16,src:hSt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},YSt={key:17,src:pSt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},XSt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function ZSt(e,p,f,F,Y,w){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",w.teamTypeClasses]),style:t.normalizeStyle({width:`${f.width}px`}),key:Y.gameEventKey},[t.createElementVNode("div",ySt,[f.canPlayVideos&&f.gameEvent.video_link!=="-"&&f.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:p[0]||(p[0]=_=>w.thumbnailClick(f.gameEvent.video_link,f.gameEvent.event_type_name))},[t.createElementVNode("video",vSt,[t.createElementVNode("source",{src:f.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,_St)]),bSt])):t.createCommentVNode("",!0),t.createElementVNode("div",xSt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",w.teamTypeClasses2])},[f.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",wSt,[w.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(w.srcImgPlayers,(_,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":n===1}]),key:n},[t.createElementVNode("div",kSt,[t.createElementVNode("img",{src:_,alt:""},null,8,SSt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",w.nameClasses]),onClick:p[1]||(p[1]=_=>w.thumbnailClick(f.gameEvent.video_link,f.gameEvent.event_type_name))},[f.canPlayVideos&&f.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:K9t,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(f.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${f.gameEvent.event_type_name}`:f.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.gameEvent.category_id?f.gameEvent.event_type_id===5?f.gameEvent.category_name:f.gameEvent.event_type_name==="Gol"?`${[13,16].includes(f.gameEvent.category_id)?"Autogol":"Gol"} de `+f.gameEvent.team_name:f.gameEvent.event_type_name:f.gameEvent.comments),1)],2)],2),t.createElementVNode("div",CSt,[t.createElementVNode("div",TSt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",w.minuteClasses])},[t.createElementVNode("div",ESt,[t.createElementVNode("div",ASt,t.toDisplayString(f.gameEvent.minute)+"'",1),t.createElementVNode("div",MSt,[t.createElementVNode("div",ISt,[f.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",PSt)):f.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",BSt)):f.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",zSt)):f.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",NSt)):f.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",LSt)):f.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",OSt)):f.gameEvent.category_id==6&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==5&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==1&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==2&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==3&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==7&&f.gameEvent.event_type_id==1||f.gameEvent.category_id==12&&f.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",FSt)):f.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",DSt)):f.gameEvent.category_id==13||f.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",RSt)):f.gameEvent.category_id==30||f.gameEvent.category_id==31||f.gameEvent.category_id==32||f.gameEvent.category_id==33||f.gameEvent.category_id==34||f.gameEvent.category_id==35||f.gameEvent.category_id==36||f.gameEvent.category_id==37||f.gameEvent.category_id==38||f.gameEvent.category_id==39||f.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",VSt)):f.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",jSt)):f.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",$St)):f.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",USt)):f.gameEvent.category_id==15||f.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",GSt)):f.gameEvent.category_id==0&&f.gameEvent.game_status_id==16||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==18||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==20||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",HSt)):f.gameEvent.category_id==0&&f.gameEvent.game_status_id==13||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==17||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==19||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==21||f.gameEvent.category_id==0&&f.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",WSt)):f.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",qSt)):f.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",YSt)):(t.openBlock(),t.createElementBlock("img",XSt))])])])],2)],6)}const JSt=Lv(mSt,[["render",ZSt],["__scopeId","data-v-84fd3fef"]]),KSt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},QSt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let V3=null;const eCt={name:"TimeLine",components:{Tooltip:y9t,TimeLineEvent:JSt},mixins:[_9t],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const p=await this.fetchGameEvents(e);p?(this.gameEvents=[...p],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(p){throw new Error(p)}},getGameEventClassAndSetIcon(e,p){return e.icon=p===0?"inicio_del_partido":KSt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const{data:{plays:p}}=await oV.get(`${this.gameEventsUrl}${e}`);return p}catch(p){throw new Error(p)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)V3=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),V3.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,p){const f=this.$refs[`gameEventDiv${p}`][0],F=this.$refs[`gameEventLine${p}`]?this.$refs[`gameEventLine${p}`][0]:null,Y=e+12;f&&(f.style.height=`${Y}px`),F&&(F.style.height=`${Y}px`)},sortGameEvents(){this.gameEvents.sort((e,p)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(p.match_lapse)+Number(p.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let p=0;switch(e){case 1:p=0;break;case 2:p=45;break;case 3:p=90;break;case 4:p=105;break;case 5:p=120;break}return p},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const p=this.gameEvents.findIndex(f=>f.play_id===e.play_id);p&&this.gameEvents.splice(p,1)},checkTimeLineStatus(){this.gameEvents.forEach(p=>{const f=QSt[p.game_status];f&&this.timeLineStatuses.push({...f,gameEvent:p})}),this.timeLineStatuses.sort((p,f)=>f.weight-p.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const p=this.gameData[e].team_id;return b9t(p)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){V3&&V3.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,p]){this.channelName===e&&this.addGameEventFromChannel(p)},update_mxm([e,p]){this.channelName===e&&(this.deleteGameEventFromChannel(p),this.addGameEventFromChannel(p))},delete_mxm([e,p]){this.channelName===e&&this.deleteGameEventFromChannel(p)}}},TV=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),tCt={ref:"timeLine",class:"time-line"},nCt={class:"time-line__header"},rCt={class:"time-line__header__dot"},aCt={class:"time-line__header__dot__home-team team-logo"},iCt=["src"],oCt={class:"time-line__header__dot__away-team team-logo"},sCt=["src"],lCt={key:1,class:"start-line"},cCt=TV(()=>t.createElementVNode("div",null,null,-1)),uCt=TV(()=>t.createElementVNode("div",null,null,-1)),dCt=[cCt,uCt],hCt={key:1,class:"noEventText"},pCt={class:"tooltip-data"},fCt=["src"];function mCt(e,p,f,F,Y,w){const _=t.resolveComponent("TimeLineEvent"),n=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",tCt,[t.createElementVNode("div",nCt,[t.createElementVNode("div",rCt,[t.createElementVNode("div",aCt,[t.createElementVNode("img",{src:w.getTeamLogoSrc("homeTeam"),alt:""},null,8,iCt)]),t.createElementVNode("div",oCt,[t.createElementVNode("img",{src:w.getTeamLogoSrc("awayTeam"),alt:""},null,8,sCt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${Y.gameEvents.length}`},[f.gameData.status!==4||f.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:Y.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.gameEventsToShow,(g,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:g.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(w.getGameEventClassAndSetIcon(g,h))},[t.createElementVNode("div",{class:t.normalizeClass(w.getEventContainerClass(g))},[t.createVNode(_,{"game-event":g,"is-mobile":w.isMobile,"time-line-width":Y.timeLineWidth,width:w.gameEventWidth,"can-play-videos":f.canPlayVideos,onEventHeight:r=>w.updateContainerHeight(r,h),onPlayerChanged:p[0]||(p[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:w.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),f.gameData.status===1&&h===w.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",lCt,dCt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",hCt,"Aún no comienza el partido"))]))],512),t.createVNode(n,{data:Y.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",pCt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:Y.dataVideo.link,format:"video/mp4"},null,8,fCt)])])]),_:1},8,["data"])],64)}const gCt=Lv(eCt,[["render",mCt],["__scopeId","data-v-2574e576"]]),yCt={class:"game-time-line__options"},vCt={class:"game-time-line__timeline"},_Ct={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},setup(e){oV.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const p=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),f=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let F=null;const Y=t.ref(["Todo","1er tiempo","2do tiempo"]),w=t.ref("Todo"),_=t.ref({}),n=t.ref(null),g=t.ref(0),h=t.computed(()=>{let o="all";return w.value==="1er tiempo"||w.value==="1er"?o="firstHalf":(w.value==="2do tiempo"||w.value==="2do")&&(o="secondHalf"),o}),r=t.computed(()=>g.value<500);function v(o){w.value=o}function y(o){_.value=o}function u(){if(window.ResizeObserver)F=new ResizeObserver(()=>{g.value=n.value.clientWidth}),F.observe(n.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{u()}),t.onBeforeUnmount(()=>{F&&F.unobserve(n.value)}),(o,a)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:n,class:"game-time-line"},[t.createElementVNode("div",yCt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value,i=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"game-time-line__options__option"},[t.createVNode(Jkt,t.mergeProps(g.value<390?f.value:p.value,{text:i=="Todo"?i:g.value<390?i.substring(0,3):i,"is-active":w.value===i,onClick:l=>v(i)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",vCt,[t.createVNode(gCt,{"game-data":e.game,"time-line-period":h.value,"is-mobile":r.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:y},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},bCt=Lv(_Ct,[["__scopeId","data-v-f42d0c90"]]),RFt="",EV=e=>(t.pushScopeId("data-v-c3434871"),e=e(),t.popScopeId(),e),xCt={class:"game-data__header"},wCt={class:"game-data__header__tournament-season-dropdown"},kCt={class:"game-data__header__teams-carousel"},SCt={class:"game-data__body"},CCt={key:0,class:"no-stats-container"},TCt=[EV(()=>t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1))],ECt={key:1,class:"no-stats-container-mobile"},ACt=[EV(()=>t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1))],MCt={class:"game-data__body__menu"},ICt={class:"game-data__body__menu__contmenuswitch"};Mc.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const PCt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fre,GSCGameTimeLine:bCt,GscSwitchComponent:r7,GSCLineupsMain:_ve,GSCDatosGSMain:R8e,GSCVideoGame:mNe,ModalEvents:Dz,GSCTacticaFijaMain:Xkt,GSCProminentMain:Ftt,GSCComparative:yit}}),BCt=Oi(Object.assign(PCt,{props:{tournamentsApiUrl:{type:String,default:""},currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:p}){const f=e,F=ww();let Y=null;Sh.on("socket-connected",()=>{F.commit("nextGeneral/updateIsSocketConnected",f.socket.connected)});const w=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),_=t.ref({season:[]}),n=t.ref({}),g=t.ref(!1),h=t.ref({}),r=t.ref(1),v=t.ref(0),y=3e4,u=3e4,o=3e4,a=3e4,i=3e4,l=3e4,s=3e4,c=3e4,d=6e4,m=t.ref(null),x=t.ref(null),b=t.ref(null),T=t.ref([]),k=t.ref(null),C=t.ref(!0),S=t.ref(new Set([1,2])),E=t.ref({}),A=t.ref({minute:"",recent_lapse:0,score:{}}),M=t.ref(0),P=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),B=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),z=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),O=t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(f.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:f.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const D=t.ref(0);let R=null;const j=t.ref(null),$=t.ref(0),Z=t.ref(z.value[0]),W=t.ref([]);let H=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const Ye=[];return n.value&&n.value.id&&(Ye.push({id:n.value.id,name:n.value.name,type:n.value.type}),n.value.related_seasons&&n.value.related_seasons.forEach(it=>{Ye.push({id:it.id,type:it.type})})),Ye}),J=t.computed(()=>{if(f.clientPrivilegesBySeasons){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)return Ye.teamId}return 0});function ee(){g.value=!1}function le(Ye){const it=Ye.split(",");return!(it.length<2||it[1].split(" ").length<2)}function oe(Ye){m.value=Ye}function se(Ye){T.value.push(Ye)}function ce(Ye){k.value=Ye}function ne(Ye){b.value=Ye}function re(Ye){x.value=Ye}function ie(Ye){if(!le(Ye))return"";const it=fe(Ye);return`${de(Ye)}. ${it}`}function de(Ye){return Ye.split(",")[1].split(" ")[1][0]}function fe(Ye){const it=Ye.split(",")[0].split(" ");return it[0].length<=3&&it.length>1?`${it[0]} ${it[1]}`:it[0]}async function pe(Ye){try{const it=Mc.create({headers:{Authorization:`${w.value}`}});E.value={};const ut=await it.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+Ye.game_id);if(E.value[Ye.home_team.team_id]=[],E.value[Ye.home_team.team_id].team={name:Ye.home_team.acronym,logo:Ye.home_team.logo},E.value[Ye.home_team.team_id].goals=[],E.value[Ye.home_team.team_id].red=[],E.value[Ye.home_team.team_id].yellow=[],E.value[Ye.visiting_team.team_id]=[],E.value[Ye.visiting_team.team_id].team={name:Ye.visiting_team.acronym,logo:Ye.visiting_team.logo},E.value[Ye.visiting_team.team_id].goals=[],E.value[Ye.visiting_team.team_id].red=[],E.value[Ye.visiting_team.team_id].yellow=[],ut.data.minute!=null&&(A.value={minute:ut.data.minute,recent_lapse:ut.data.recent_lapse,score:ut.data.score}),ut.data.plays)for(let dt=0;dt<ut.data.plays.length;dt++)ut.data.plays[dt].category_name=="Roja"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].red||(E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].red[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].red||(E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].red[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute))),ut.data.plays[dt].category_name=="Amarilla"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].yellow||(E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].yellow||(E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].yellow[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute))),ut.data.plays[dt].event_type_name=="Gol"&&ut.data.plays[dt].status==1&&(Ye.home_team.team_id==ut.data.plays[dt].team_id?ut.data.plays[dt].category_name=="Autogol"?(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].goals||(E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].goals||(E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):ut.data.plays[dt].category_name=="Autogol"?(ie(ut.data.plays[dt].player_name)in E.value[Ye.home_team.team_id].goals||(E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.home_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)):(ie(ut.data.plays[dt].player_name)in E.value[Ye.visiting_team.team_id].goals||(E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)]={},E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event=[],E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].name=ie(ut.data.plays[dt].player_name)),E.value[Ye.visiting_team.team_id].goals[ie(ut.data.plays[dt].player_name)].event.push(ut.data.plays[dt].minute)))}catch(it){return Promise.reject(it)}}function ge(Ye){g.value=!0,Ye.is_live!=1&&Ye.game_status!=0&&(Ye.game_status==4||Object.keys(Ye.minutes).length>0)?(M.value=1,E.value={plays:Ye.minutes,home_team:Ye.home_team,visiting_team:Ye.visiting_team}):(M.value=0,pe(Ye))}function be(){R=new ResizeObserver(Ye=>{for(const it of Ye)$.value=it.contentRect.width}),R.observe(j.value)}const we=t.computed(()=>{let Ye={};return h.value&&h.value.game_id&&(Ye={gameId:h.value.game_id,id:h.value.game_id,seasonId:h.value.season_id,regularSeasonId:h.value.regularSeasonId,matchday_name:h.value.matchday_name,status:h.value.game_status,score:h.value.score,game_status:h.value.game_status,dateTimeUTC:h.value.date_time_utc,homeTeam:h.value.home_team,awayTeam:h.value.visiting_team,is_live:h.value.is_live,minutes:h.value.minutes}),Ye});t.watch(()=>h.value.game_id,Ee,{immediate:!0}),t.watch(()=>h.value.is_live,Ie,{immediate:!0}),t.watch(()=>F.state.nextGeneral.gameForAnalysis,()=>{F.commit("nextGeneral/updateIsSocketConnected",f.socket.connected)},{deep:!0,immediate:!0});function xe(Ye){r.value=Ye.is_captured,v.value=Ye.is_female,C.value=Ye.is_captured!==0,_.value.id!==Ye.id&&(_.value=Ye,F.commit("gameGlobal/setTournamentType",Ye.tournament_type))}function Ee(Ye,it){F.commit("nextGeneral/updateShowLiveData",!0);const ut=v.value?"Destacados":"Destacadas";z.value.forEach(dt=>{dt.name===ut&&(dt.name=v.value?"Destacadas":"Destacados")}),pe({game_id:h.value.game_id,home_team:h.value.home_team,visiting_team:h.value.visiting_team}),Se(),D.value+=1}function Ie(Ye,it){if(Se(),F.state.nextGeneral.gameForAnalysis.is_live!==Ye&&F.commit("nextGeneral/updateGameForAnalysis",{...F.state.nextGeneral.gameForAnalysis,is_live:h.value.is_live,game_status:h.value.game_status}),Ye){const ut=r4();ut.disconnected?a4():ut.connected&&YC(`game.${h.value.game_id}.v2`),Ve(),Y=setInterval(()=>{M.value=0,pe({game_id:h.value.game_id,home_team:h.value.home_team,visiting_team:h.value.visiting_team})},6e4)}else Ve(),i4();Ye!==it&&(D.value+=1)}function Ve(){Y&&clearInterval(Y)}function Se(){z.value=[],h.value.is_live||h.value.game_status===4?z.value=[...B.value]:z.value=[...O.value],!f.isWidget&&(n.value.is_tactic_available===0||h.value.is_live||h.value.game_status===0)&&z.value.pop(),Z.value=z.value[0]}function ke(Ye){Ye.gameSeasonId=h.value.season_id,Ye.gameRegularSeasonId=h.value.regularSeasonId,!(!Ye.auxwidget&&ze.value&&!ze.value.canPrivilegesTeamPlayVideos)&&((h.value.is_live||h.value.game_status===0||h.value.game_status===1)&&(Ye.gameIdsToFilter=[h.value.game_id]),Ye.isLiveAccumulated&&(Ye.gameIdsToFilter=null),(h.value.is_live||h.value.game_status===0)&&!Ye.isLiveAccumulated&&(Ye.liveGameConfig={gameId:h.value.game_id}),p("openmedia",Ye))}function ye(Ye){p("onOpenProfile",Ye)}function me(Ye){p("openProfileTeam",Ye)}function Me(Ye){p("openProfilePlayer",Ye)}function Ce(Ye){Re(Ye),Ye=="Estadísticas"&&(H.value="Comparativa")}function Ne(){H.value=""}function Oe(Ye){n.value.id!==Ye.id&&(n.value=Ye,p("change-season-id",Ye.id))}const De=t.computed(()=>z.value.reduce((Ye,it)=>(f.disabledSectionsIds.includes(it.id)||ze.value&&!ze.value.isVideoTabVisible&&it.id===2||f.clientPrivilegesBySeasons&&it.id===7||(C.value||it.id!==5&&it.id!==6)&&Ye.push(it.name),Ye),[]));function Ue(Ye){if(h.value.is_live||h.value.game_status===1||h.value.game_status===0){const it=Ye.playingAs.has(h.value.playingAs);return f.clientPrivilegesBySeasons.canPlayVideos&&it}else{const it=Te.value.filter(ut=>Ye.playingAs.has(ut.playingAs));return f.clientPrivilegesBySeasons.canPlayVideos&&it.length>0}}const ze=t.computed(()=>{if(f.clientPrivilegesBySeasons){if(n.value&&h.value&&h.value.game_id){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)if(Le(Ye.playingAs),(h.value.is_live||h.value.game_status===1||h.value.game_status===0)&&F.state.nextGeneral.showLiveData){const it=Ye.playingAs.has(h.value.playingAs);return{seasonAndPrivileges:Ye,canPrivilegesTeamPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&it,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:h.value.home_team.team_id===Ye.teamId,homeTeamDetails:{canPlayVideos:it,team:h.value.home_team},awayTeamDetails:{canPlayVideos:it,team:h.value.visiting_team},isVideoTabVisible:Ue(Ye)}}else{const it=h.value.home_team.team_id===Ye.teamId,ut=Te.value.filter(It=>Ye.playingAs.has(It.playingAs));return{seasonAndPrivileges:Ye,canPrivilegesTeamPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&ut.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:it,homeTeamDetails:{canPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&it&&ut.length>0,team:h.value.home_team},awayTeamDetails:{canPlayVideos:f.clientPrivilegesBySeasons.canPlayVideos&&!it&&ut.length>0,team:h.value.visiting_team},isVideoTabVisible:Ue(Ye)}}Le(new Set)}return Q}return null}),Te=t.computed(()=>{if(f.clientPrivilegesBySeasons){if(n.value){const Ye=f.clientPrivilegesBySeasons.seasonsAndPrivileges.get(n.value.id);if(Ye)return W.value.filter(it=>it.game_status===1&&Ye.playingAs.has(it.playingAs))}return[]}return[]});t.watch(De,()=>{ze.value&&!ze.value.canPrivilegesTeamPlayVideos&&Z.value.id===2&&Re("Resumen")},{deep:!0,immediate:!0});function Le(Ye){S.value=Ye}function Re(Ye){if(F.commit("nextGeneral/updateShowLiveData",!0),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let it of T.value)clearInterval(it);T.value=[]}f.isWidget?Z.value=z.value.find(it=>it.name===Ye)||z.value[1]:Z.value=z.value.find(it=>it.name===Ye)||z.value[0]}t.onMounted(()=>{be(),t.nextTick(()=>{f.isSynchronization&&Re("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(R&&R.disconnect(),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let Ye of T.value)clearInterval(Ye);T.value=[]}o4()});function $e(Ye){if(Ye.playingAs||(Ye.playingAs=J.value?Ye.home_team.team_id===J.value?1:2:0),m.value!=null&&(clearInterval(m.value),m.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),k.value!=null&&(clearInterval(k.value),k.value=null),T.value.length>0){for(let it of T.value)clearInterval(it);T.value=[]}h.value=Ye,Ye.is_live&&Ye.game_status===4?a4():i4()}function Ze(Ye){W.value=Ye.map(it=>{const ut={...it};return J.value&&(ut.playingAs=ut.home_team.team_id===J.value?1:2),ut})}return(Ye,it)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:j},[t.createElementVNode("div",xCt,[t.withDirectives(t.createElementVNode("div",wCt,[t.createVNode(t.unref(Z9),{"current-season-id":e.currentSeasonId,onInput:xe,onChangeTournaments:xe,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl},null,8,["current-season-id","tournaments-ids-to-include","api-url"]),t.createVNode(t.unref(Q9),{"current-season-id":e.currentSeasonId,seasons:_.value.seasons,onInput:Oe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",kCt,[t.createVNode(t.unref(Nq),{"plays-live":E.value,"info-live":A.value,token:P.value,is_captured:r.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":J.value,"only-games-team-id":J.value,"tournament-type":t.unref(F).state.gameGlobal.tournamentType,onChangeGameCarousel:$e,onOpenModalEvent:ge,onChangeGamesByClientPrivileges:Ze},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),g.value?(t.openBlock(),t.createBlock(Dz,{key:0,width:$.value,onCloseModalEventsLive:ee,plays:E.value,game:h.value,type:M.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",SCt,[h.value&&"live_stats"in h.value&&h.value.live_stats==0&&h.value.game_status==0&&!C.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",CCt,TCt)):(t.openBlock(),t.createElementBlock("div",ECt,ACt))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",MCt,[t.createElementVNode("div",ICt,[t.createVNode(t.unref(r7),{type:2,buttons:De.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":Z.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:Re},null,8,["buttons","width","selected-option"])])]),we.value&&we.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Z.value.componentName),{key:D.value,game:we.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:re,onIntervalidhighlive:ne,onIntervalidtops:se,onIntervalidgs:ce,subsection:t.unref(H),seasonSelected:n.value,tournamentSelected:_.value,showLineups:C.value,socket:e.socket,"time-live-prominent-data":y,"time-live-highlights-prominent-and-video":u,"time-live-possesion":o,"time-live-video-goals":a,"time-live-video-best-plays":i,"time-live-video-this-game":l,"time-live-video-specific-plays":s,"time-live-comparative-best-players":c,"time-live-comparative-avanced":d,is_captured:r.value,"is-tactic-visible":!!n.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ze.value?ze.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":S.value,"client-privileges-team-id":J.value,"play-videos-privileges":ze.value,token:P.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,onResetSubsection:Ne,onOpenmedia:ke,onOnOpenProfile:ye,onOpenProfileTeam:me,onOpenProfilePlayer:Me,onChangeToTab:Ce,onOpenMediaPlayer:ke,onIntervalid:oe},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-c3434871"]]);async function _d({url:e,options:p={},retries:f=3}){return await Mc.get(e,p).then(F=>F).catch(F=>f>0?_d({url:e,options:p,retries:f-1}):F)}async function AV({seasonId:e},p=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(f){if(p)return AV({seasonId:e},!1);throw new Error(f)}}async function zCt({seasonId:e}){try{return(await _d({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(p){return Promise.reject(p)}}async function NCt({seasonId:e}){try{return(await _d({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(p){return Promise.reject(p)}}function LCt(e,p,f,F,Y,w,_=!1){const n=f.map(g=>g===1?2:g===2?1:3);return e.filter(g=>{const h=w&&g[Y.teamId]?g[Y.teamId]!==w:!1,r=p===1?2:1;return(_||F.includes(g[Y.gameId]))&&(!p||(h?r:p)===g[Y.playingAs])&&(f.includes(g[Y.matchResult])&&g[Y.teamId]===w||n.includes(g[Y.matchResult])&&g[Y.teamId]!==w)})}function MV(e,p,f,F,Y){return p.length===2&&f.length===3&&F.length===6?e:e.filter(w=>p.includes(w[Y.playingAs])&&f.includes(w[Y.matchResult])&&F.includes(w[Y.section]))}async function IV({seasonId:e}){try{const p=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await _d({url:p})).data}catch(p){return Promise.reject(p)}}async function OCt({seasonId:e,gameId:p}){try{const f=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${p}`,{data:F}=await _d({url:f});return F}catch(f){return Promise.reject(f)}}async function FCt({gameId:e}){try{const p=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await _d({url:p})).data.data}catch(p){return Promise.reject(p)}}async function DCt({gameId:e}){try{const p=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await _d({url:p})).data.data||[]}catch(p){return Promise.reject(p)}}const RCt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let z9=null;function PV(){return z9||(z9=O1(RCt)),z9}async function VCt(e){try{const p=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await _d({url:p})).data}catch(p){return Promise.reject(p)}}async function BV({seasonId:e,teamId:p}){try{return await _d({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${p}`})}catch(f){return Promise.reject(f)}}async function jCt(e){try{const p=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await _d({url:p})}catch(p){return Promise.reject(p)}}async function $Ct(e){try{return await _d({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(p){return Promise.reject(p)}}const UCt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,p,f,F){return LCt(e.seasonPlays,F["filterGeneral/getPlayingAs"],F["filterGeneral/getResults"],F["filterGeneral/getSelectedGamesIds"],PV(),F["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const p=e.currentSeasonGames.reduce((f,F)=>{const Y={...F};return Y.home_team=e.currentSeasonTeams.find(w=>w.team_id===F.home_team),Y.visiting_team=e.currentSeasonTeams.find(w=>w.team_id===F.visiting_team),f[F.matchday_abbreviation]?f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date]?f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date].push(Y):f[F.matchday_abbreviation][F.game_status===3?"canceled":F.date]=[Y]:f[F.matchday_abbreviation]={[F.game_status===3?"canceled":F.date]:[Y]},f},{});for(let[f,F]of Object.entries(p))p[f]=Object.entries(F).map(([Y,w])=>({date:Y,games:w})),p[f].sort((Y,w)=>Y.date<w.date?-1:Y.date>w.date?1:0);return p},matchdaysDates(e,p){let f=[];if(p.nextGamesSchedule){let F=Object.keys(p.nextGamesSchedule);for(let Y of F){let w=Number(Y.replace("M","")),_=p.nextGamesSchedule[Y].map(n=>({matchday:w,date:new Date(n.date)}));f=f.concat(_)}}return f},closestMatchDay(e,p){let f=new Date,F=0,Y=-new Date(0,0,0).valueOf(),w=p.matchdaysDates,_=w.length;for(let n=0;n<w.length;n++)F=Math.abs(w[n].date-f),F<Y&&(_=n,Y=F);return w[_]?w[_].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,p){e.booleanIsLiveGamesModalOpen=p},setBooleanAreLiveGames(e,p){e.booleanAreLiveGames=p},updateSeasonPlays(e,p){e.seasonPlays=p},updateCurrentSeasonTeams(e,p){e.currentSeasonTeams=p},updateCurrentSeasonGames(e,p){e.currentSeasonGames=p},updateSelectedRound(e,p){e.selectedRound=p}},actions:{async getSeasonPlays({commit:e,rootGetters:p},f=!1){try{const F=await AV({seasonId:p["filterGeneral/getSeasonId"]});if(f)return F;e("updateSeasonPlays",F)}catch(F){return Promise.reject(F)}},async getCurrentSeasonGames({commit:e,rootGetters:p}){try{const f=await IV({seasonId:p["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",f)}catch(f){return Promise.reject(f)}},async getCurrentSeasonTeams({commit:e,rootGetters:p}){try{const f=await VCt({seasonId:p["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",f.teams)}catch(f){return Promise.reject(f)}},async isDataFilled({state:e,dispatch:p,commit:f}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return f("setIsSectionLoading",!1,{root:!0}),!0;const F=[void 0,void 0];return e.currentSeasonGames.length===0&&(F[0]=p("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(F[1]=p("getCurrentSeasonTeams")),await Promise.all(F),!1}catch(F){throw new Error(F)}}}}};async function GCt({filter:e}){try{const p=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:f}=await _d({url:p});return f}catch(p){return Promise.reject(p)}}const HCt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let N9=null;function WCt(){return N9||(N9=O1(HCt)),N9}class j3{constructor(){Ac(this,"maximumLiveSection",1);Ac(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});Ac(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(p){p>this.maximumLiveSection&&(this.maximumLiveSection=p)}getZeroTotalsTrendSections(){return[0,0,0,0,0,0]}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(p,f,F){F&&(this.setMaximumLiveSection(p),this.accomplished.totalLive+=f,this.accomplished.totalsLiveTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,p,f)),this.accomplished.totalPostGame+=f,this.accomplished.avgPostGameTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,p,f)}increaseReceivedByOne(p,f,F){F&&(this.setMaximumLiveSection(p),this.received.totalLive+=f,this.received.totalsLiveTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,p,f)),this.received.totalPostGame+=f,this.received.avgPostGameTrendLive.sections[p-1]+=f,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,p,f)}increaseTrendLiveAccumulatedByOne(p,f,F){for(let Y=f-1;Y<p.accumulated.length;Y++)p.accumulated[Y]+=F}decreaseAccomplishedLiveByOne(p,f){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=f),this.accomplished.totalsLiveTrendLive.sections[p-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[p-1]-=f,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,p,f))}decreaseReceivedLiveByOne(p,f){this.received.totalLive>0&&(this.received.totalLive-=f),this.received.totalsLiveTrendLive.sections[p-1]>0&&(this.received.totalsLiveTrendLive.sections[p-1]-=f,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,p,f))}decreaseTotalsLiveTrendLiveAccumulatedByOne(p,f,F){for(let Y=p.accumulated.length-1;Y>=f-1;Y--)p.accumulated[Y]-=F}calculateAvg(p){p&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/p,this.received.avgPostGame=this.received.totalPostGame/p,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,p),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,p),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,p),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,p))}getAvgPostGameTrendLiveAvg(p,f){return p.map(F=>F/f)}calculateRanking(p,f,F,Y,w,_,n,g){let h=[];Y===3&&p&&p.length&&(F.playingAs.length!==2||F.matchResult.length!==3)?h=Array.from(p.reduce((v,y)=>{const u=y[f.playingAs]===1,o=u?"1":"2",a=v.get(y[f.gameId]);if(a)a[o]?a[o].arrayPlays.push(y):a[o]={numberTeamId:y[f.teamId],arrayPlays:[y]};else{const i={numberMatchResult:y[f.matchResult]};u&&(i[1]={numberTeamId:y[f.teamId],arrayPlays:[y]}),v.set(y[f.gameId],i)}return v},new Map).values()).reduce((v,y)=>{const u=F.playingAs.length===2?"both":F.playingAs[0].toString();return(u==="both"&&(y[1].numberTeamId===F.teamId||y[2].numberTeamId===F.teamId)||u!=="both"&&y[u].numberTeamId===F.teamId)&&F.matchResult.includes(y.numberMatchResult)&&v.push(...y[1].arrayPlays,...y[2].arrayPlays),v},[]).filter(v=>F.sections.includes(v[f.section])):(h=p?[...p]:[],n&&p&&(h=p.filter(r=>F.playingAs.includes(r[f.playingAs])&&F.matchResult.includes(r[f.matchResult])&&F.sections.includes(r[f.section])))),this.setTeamRanking(h,Y,f,F.teamId,_,"accomplished",g)}setTeamRanking(p,f,F,Y,w,_,n){let g=null,h=null;f===3&&(g=new Map,h={},p.forEach(y=>{const u=g.get(y[F.gameId]);u?u[y[F.teamId.toString()]]?u[y[F.teamId.toString()]]+=y[F.total]:u[y[F.teamId.toString()]]=y[F.total]:g.set(y[F.gameId],{[y[F.teamId.toString()]]:y[F.total]})}),Array.from(g.values()).forEach(y=>{const[u,o]=Object.keys(y).map(i=>i),a=y[u]+y[o];this.addPassesAvgByTeam(h,u,a?y[u]/a:0),this.addPassesAvgByTeam(h,o,a?y[o]/a:0)}));const r=w.sort((y,u)=>y.team_id-u.team_id).map(y=>{if(f===3){const u=h[y.team_id.toString()];return{teamId:y.team_id,points:u?u.numberTotalPassesAvg/u.numberGamesCount:0,total:u?u.numberTotalPassesAvg:0}}else{const u=p.reduce((o,a)=>a[F.teamId]===y.team_id&&f===a[F.categoryId]?o+a[F.total]:o,0);return{teamId:y.team_id,points:y[`${n}FilterGames`]?u/y[`${n}FilterGames`]:0,total:u}}}).sort((y,u)=>u.points-y.points);this.accomplished.arrayRankings=r;const v=r.findIndex(y=>y.teamId===Y);f===3&&(this.accomplished.avgPreGame=r[v].points),this[_].ranking=v+1,this[_].leader=r[0]}addPassesAvgByTeam(p,f,F){p[f]?(p[f].numberGamesCount+=1,p[f].numberTotalPassesAvg+=F):p[f]={numberGamesCount:1,numberTotalPassesAvg:F}}}class Cs{constructor(p,f,F,Y,w,_,n,g,h,r,v=!0){Ac(this,"id","");Ac(this,"generalId",0);Ac(this,"name","");Ac(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Ac(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Ac(this,"accomplishedCategoryIds",[]);Ac(this,"receivedCategoryIds",[]);Ac(this,"generalCategoriesIds",{accomplished:0,received:0});Ac(this,"specialMention","");Ac(this,"homeTeam",new j3);Ac(this,"visitingTeam",new j3);Ac(this,"isLeagueDataCalculated",!1);Ac(this,"leagueAccomplishedMax",0);Ac(this,"leagueReceivedMax",0);Ac(this,"leagueAccomplishedAvg",0);Ac(this,"leagueReceivedAvg",0);Ac(this,"leagueAccomplishedAccumulator",0);Ac(this,"leagueReceivedAccumulator",0);Ac(this,"homeTeamType","homeTeam");Ac(this,"visitingTeamType","visitingTeam");Ac(this,"betOnly",!1);Ac(this,"isPercent",!1);this.id=`${F.accomplished}-${F.received}`,this.accomplishedCategoryIds=p||[],this.receivedCategoryIds=f||[],this.generalCategoriesIds=F||{accomplished:0,received:0},this.name=Y,this.names["0-0"]=Y||"",this.names["1-1"]=w||"",this.names["0-1"]=_||"",this.names["1-0"]=n||"",this.generalId=g||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=v}addLeaguePlays(p,f,F){p.length===0||!F||this.isLeagueDataCalculated||(p.forEach(Y=>{this.isAccomplishedLeaguePlay(Y[f.categoryId])&&(this.leagueAccomplishedAccumulator+=Y[f.total]),this.isReceivedLeaguePlay(Y[f.categoryId])&&(this.leagueReceivedAccumulator+=Y[f.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*F)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*F)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(p,f,F){let Y="-";for(const[w,_]of Object.entries(this.generalCategoriesIds))p===_&&(Y=`${w==="accomplished"?"0":"1"}${Y}`),f===_&&(Y=`${Y}${w==="accomplished"?"0":"1"}`);Y.length===3&&(this.mentions[Y]=F)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(p,f,F,Y,w){!F||!w||p!==this.homeTeamType&&p!==this.visitingTeamType||(F.forEach(_=>{this.isAccomplishedPlay(_[Y.categoryId])?this[p].increaseAccomplishedByOne(_[Y.section],_[Y.total]):this.isReceivedPlay(_[Y.categoryId])&&this[p].increaseReceivedByOne(_[Y.section],_[Y.total])}),this[p].calculateAvg(w))}addLivePlay(p,f,F,Y,w=!1,_=!1){(p===this.homeTeamType||p===this.visitingTeamType)&&F[Y.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[p].increaseAccomplishedByOne(F[Y.section],F[Y.total],!0)}subtractLivePlay(p,f,F,Y,w){(p===this.homeTeamType||p===this.visitingTeamType)&&(this.isAccomplishedPlay(F[Y.categoryId])&&!w?this[p].decreaseAccomplishedLiveByOne(F[Y.section],F[Y.total]):this.isReceivedPlay(F[Y.categoryId])&&w&&this[p].decreaseReceivedLiveByOne(F[Y.section],F[Y.total]))}isAccomplishedLeaguePlay(p){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(F=>p===F||`${p}_r`===F)}isReceivedLeaguePlay(p){return!!this.receivedCategoryIds.find(f=>p===f)}isAccomplishedPlay(p){return this.generalCategoriesIds.accomplished===p}isReceivedPlay(p){return this.generalCategoriesIds.received===p}calcRankingLeague(p,f,F,Y,w,_=!1){this[this.homeTeamType].calculateRanking(p,f,F,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,w,_,this.homeTeamType),this[this.visitingTeamType].calculateRanking(p,f,Y,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,w,_,this.visitingTeamType)}resetData(){this.homeTeam=new j3,this.visitingTeam=new j3,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(p){return this.generalCategoriesIds.accomplished===p||this.generalCategoriesIds.received===p}}const qCt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new Cs([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new Cs([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new Cs([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0,!1),yellowCards:new Cs([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new Cs([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new Cs([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new Cs([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new Cs([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new Cs([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new Cs([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new Cs([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new Cs([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new Cs([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new Cs([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new Cs([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new Cs([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new Cs([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new Cs([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new Cs([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new Cs([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new Cs([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new Cs([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new Cs([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new Cs([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new Cs([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new Cs([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new Cs([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new Cs([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new Cs([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new Cs([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new Cs([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new Cs([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new Cs([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new Cs([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new Cs([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new Cs([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new Cs([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new Cs([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},YCt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],XCt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let L9=null;function ZCt(){return L9||(L9=O1(XCt)),L9}const JCt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let O9=null;function KCt(){return O9||(O9=O1(JCt)),O9}function $3(e,p,f){return[f.get(e[p.categoryId])||[],e[p.teamId],e[p.matchResult],e[p.playingAs],e[p.matchLapse],e[p.section],e[p.total]]}function zV(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function F9(e,p,f){let F=[...p];return e[f.categoryId]===2&&(F[0]=14),e[f.categoryId]===20&&(F[0]=15),[14,15].includes(F[0])?F:null}const QCt=r4(),eTt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],tTt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:PV(),indexesTSP:WCt(),indexesLS:ZCt(),indexesTLP:KCt(),nextGamesDataStructure:qCt,currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(p=>p.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return YCt.filter(p=>p.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return MV(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return MV(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(p=>p.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(p=>e.homeTeamFilter.playingAs.includes(p[0])).filter(p=>e.homeTeamFilter.matchResult.includes(p[1])).reduce((p,f)=>p+f[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(p=>e.visitingTeamFilter.playingAs.includes(p[0])).filter(p=>e.visitingTeamFilter.matchResult.includes(p[1])).reduce((p,f)=>p+f[2],0)},filledDataStructure(e,p){if(e.currentSeasonPlays)for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&F.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&F.visitingTeam.resetTotals(),F.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),F.addTeamPlays(F.homeTeamType,e.gameForAnalysis.home_team,p.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:p.totalFilteredHomeGames),F.addTeamPlays(F.visitingTeamType,e.gameForAnalysis.visiting_team,p.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:p.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,p){return Object.values(p.filledDataStructure).sort((f,F)=>f.priority-F.priority)},statisticData(e,p){for(const f of Object.values(p.filledDataStructure))if(f.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&f.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return f.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,p){for(const[f,F]of Object.entries(p))e.gameForAnalysis[f]=F},setCurrentTournamentName(e,p){e.currentTournamentName=p},setBetSubcategoriesObjects(e,p){e.betSubcategoriesObjects=p},setRegularSeasonName(e,p){e.regularSeasonName=p},setBetSubcategories(e,p){e.betSubcategories=p},setBetDescription(e,p){e.betDescription=p},setSeasonId(e,p){e.seasonId=Number(p)},setHome(e,p){e.homeTeamInfo=p},setAway(e,p){e.awayTeamInfo=p},setMenuOptionActive(e,p){e.menuOptionActive=p},setPastSeasonId(e,p){e.pastSeasonId=p},setUsePastSeasonId(e,p){e.usePastSeasonId=p,p&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,p){e.showPostMatch=p},setHomeResultGame(e,p){e.homeResultGame=p},setAwayResultGame(e,p){e.awayResultGame=p},updateIsSocketConnected(e,p){e.isSocketConnected=p,p&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&YC(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,p){e.currentSeasonTeams=p,e.currentSeasonTeams.forEach(f=>{f.playedGames=e.currentSeasonGames.reduce((F,Y)=>{if(Y.game_status===1&&(Y.home_team===f.team_id||Y.visiting_team===f.team_id)){const w=Y.score[0]-Y.score[1],_=Y.home_team===f.team_id;F.push({playingAs:_?1:2,matchResult:w===0?3:_?w>0?1:2:w<0?1:2})}return F},[])})},updateCurrentSeasonGames(e,p){e.currentSeasonGames=p},updateGameId(e,p){e.gameId=p},updateGameForAnalysis(e,p){e.gameForAnalysis=p,e.isLive=!!p.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,p){e.selectedAnalysis=p},updateShowLiveData(e,p){e.showLiveData=p},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,p){e.idAssetSelected=p},updateStats(e,p){e.currentSeasonPlays=p},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:p,needsFormat:f=!1}){if(f){if(!p||!p.local||!p.local.statistics||!p.visit||!p.visit.statistics)return;e.homeTeamFilter=QC(e.homeTeamFilter,p.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=QC(e.visitingTeamFilter,p.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==p.local.statistics.block&&(e.selectedStatisticTypeBlock=p.local.statistics.block)}else e.homeTeamFilter={...p.homeTeamFilter,statistics:0},e.visitingTeamFilter={...p.visitingTeamFilter,statistics:0}},updateFinishedGames(e,p){e.totalSeasonFinishedGames=p},updateHomeTeamPlays(e,p){e.homeTeamPlays=p},updateVisitingTeamPlays(e,p){e.visitingTeamPlays=p},addSpecialMentions(e,p){const f=Object.values(e.nextGamesDataStructure);f.forEach(F=>{for(const Y of Object.values(F.subcategories))Y.resetMentions()}),f.forEach(F=>{for(const Y of p)for(const w of Object.values(F.subcategories))w.addSpecialMention(Y[0],Y[1],Y[2])})},setDefaultFilter(e,p){e.defaultFilter={homeTeamFilter:{...p.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...p.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,p){if(!e.livePlays.has(p[e.indexesTLP.playId])){e.livePlays.set(p[e.indexesTLP.playId],p);const F=$3(p,e.indexesTLP,e.categoriesMap);for(const Y of Object.values(e.nextGamesDataStructure))for(const w of Object.values(Y.subcategories))w.addLivePlay(e.gameForAnalysis.home_team===F[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",F[e.indexesTSP.teamId],F,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,p){const f=!!p[e.indexesTLP.length],F=e.livePlays.get(p[e.indexesTLP.playId]);if(ZZ(F,p))return;let Y="";const w=e.gameForAnalysis.home_team===p[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";F&&(Y=e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const _=$3(F,e.indexesTLP,e.categoriesMap),n=F9(F,_,e.indexesTLP),g=$3(p,e.indexesTLP,e.categoriesMap),h=F9(p,g,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const v of Object.values(r.subcategories))F&&(v.subtractLivePlay(Y,_[e.indexesTSP.teamId],_,e.indexesTSP,f),n&&v.subtractLivePlay(Y,n[e.indexesTSP.teamId],n,e.indexesTSP,f)),v.addLivePlay(w,g[e.indexesTSP.teamId],g,e.indexesTSP,e.isLive,f),h&&v.addLivePlay(w,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,f);e.livePlays.set(p[e.indexesTLP.playId],p)},deleteLiveGamePlay(e,p){const f=!!p[e.indexesTLP.length],F=e.livePlays.get(p[e.indexesTLP.playId]);let Y="";if(F){Y=e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(F[e.indexesTLP.playId]);const w=$3(F,e.indexesTLP,e.categoriesMap),_=F9(p,w,e.indexesTLP);for(const n of Object.values(e.nextGamesDataStructure))for(const g of Object.values(n.subcategories))g.subtractLivePlay(Y,w[e.indexesTSP.teamId],w,e.indexesTSP,f),_&&g.subtractLivePlay(Y,_[e.indexesTSP.teamId],_,e.indexesTSP,f)}},clearLiveTotals(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.homeTeam.resetTotalsLive(),f.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,p){e.statistics=p},updateOldSeasonId(e,p){e.oldSeasonId=p},addRankingInSubcategories(e,{getters:p,isPremiumAccount:f}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(w=>{w.homeTeamFilterGames=w.playedGames.filter(_=>e.homeTeamFilter.playingAs.includes(_.playingAs)&&e.homeTeamFilter.matchResult.includes(_.matchResult)).length,w.visitingTeamFilterGames=w.playedGames.filter(_=>e.visitingTeamFilter.playingAs.includes(_.playingAs)&&e.visitingTeamFilter.matchResult.includes(_.matchResult)).length});const F=[],Y=new Map;for(const w of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(w.subcategories))F.push(_);p.rankingData.forEach(w=>{for(const _ of F)if(_.isInGeneralCategory(w[e.indexesLS.categoryId])){Y.has(_.id)?Y.get(_.id).push(w):Y.set(_.id,[w]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,p){e.homeGames=zV(p)},setVisitingGames(e,p){e.visitingGames=zV(p)},generateCategoriesMap(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.accomplishedCategoryIds.forEach(F=>{const Y=e.categoriesMap.get(F);Y?Y.push(f.generalCategoriesIds.accomplished):e.categoriesMap.set(F,[f.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const p of Object.values(e.nextGamesDataStructure))for(const f of Object.values(p.subcategories))f.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:p},{command:f}){f==="on"?p("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):p("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},p){try{const _=await $Ct({gameId:p.gameId});if(_){var f=[],F=[],Y={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},w={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(_.data).length!==0&&(f=_.data.data.filter(n=>n[1]==p.homeTeam),F=_.data.data.filter(n=>n[1]==p.awayTeam),Y=_.data.games,w=_.data.games),e("updateHomeTeamPlays",f),e("updateVisitingTeamPlays",F),e("setHomeGames",Y),e("setVisitingGames",w)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(_){return Promise.reject(_)}},async fillStatisticDataPostMatch({commit:e,dispatch:p},f){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let F=[];e("updateGameForAnalysis",f.gameInfo),F.push(p("setAndGetStatsPostMatch",{gameId:f.game,homeTeam:f.homeTeam,awayTeam:f.awayTeam})),await Promise.all(F)}catch(F){throw new Error(F)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:p,commit:f},{gameId:F,isTeamsAnalysis:Y,currentSeasonId:w,isLoginChanged:_=!1,defaultFilter:n=null,gameInfo:g=null,isCupGame:h=!1}){try{let r={},v=e.seasonId!==Number(w);const y=[];f("setIsSectionLoading",!0,{root:!0}),f("setUsePastSeasonId",!1),v&&f("setSeasonId",w),f("updateGameId",Number(F)),e.oldSeasonId!==e.seasonId&&f("resetNextGamesDataStructure");const u=await p("getCurrentSeasonGames",Number(F));if(f("leagueGeneral/updateCurrentSeasonGames",u,{root:!0}),r=u.find(o=>o.game_id===Number(F)),!r&&g&&(r=g),r&&f("updateGameForAnalysis",r),r.game_status!==1&&((_||e.categoriesMap.size===0)&&f("generateCategoriesMap"),h||await p("checkTeamsData",{gameId:F,isFromBet:!!n}),(_||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(p("getSeasonStatistics"))),e.usePastSeasonId){const o=await p("getCurrentSeasonGamesLast");f("leagueGeneral/updateCurrentSeasonGames",o,{root:!0})}(_||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(o=>r.home_team===o.team_id))&&y.push(p("getCurrentSeasonTeams")),f("setHomeResultGame",r.score[0]),f("setAwayResultGame",r.score[1]),Y?r.game_status!==1?(await p("fillStatisticData",{gameId:F,gameinfo:r,promises:y,defaultFilter:n}),f("updateShowPostMatchData",!1)):(f("updateStats",[]),f("updateShowPostMatchData",!0),y.push(p("fillStatisticDataPostMatch",{game:F,homeTeam:r.home_team,awayTeam:r.visiting_team,gameInfo:r})),await Promise.all(y)):f("setIsSectionLoading",!1,{root:!0})}catch(r){return Promise.reject(r)}},async fillStatisticData({commit:e,dispatch:p,getters:f,rootGetters:F,state:Y},{gameId:w,gameinfo:_,promises:n=[],defaultFilter:g=null}){let h=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",_),(_.is_live||_.game_status===0)&&n.push(p("getCurrentLiveGamePlays",w)),n.push(p("getSpecialMentionsByGame",w)),n.push(p("getHomeTeamPlays")),n.push(p("getVisitingTeamPlays")),n.push(p("getCurrentSeasonPlays")),g&&n.push(GCt(g)),h=await Promise.all(n)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:f,isPremiumAccount:F["loginGeneral/getPremiumAccount"]}),g){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:Y.defaultFilter,needsFormat:!1}),p("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:p,rootState:f,commit:F},{gameId:Y,isFromBet:w}){try{const _=Number(Y);if(e.pastSeasonId){F("setPastSeasonId",e.pastSeasonId,{root:!0});const n=f.leagueGeneral.currentSeasonGames.find(g=>g.game_id===_);n&&F("updateGameForAnalysis",n),await Promise.all([p("getHomeTeamPlays"),p("getVisitingTeamPlays")]),F("setUsePastSeasonId",w||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else F("setUsePastSeasonId",!1)}catch(_){throw new Error(_)}},async getSpecialMentionsByGame({commit:e},p){try{const f=await DCt({gameId:p});e("addSpecialMentions",f)}catch(f){return Promise.reject(f)}},async getCurrentSeasonGames({commit:e,state:p},f){try{const{teams:F,games:Y,past_season_id:w,tournament_id:_}=await OCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,gameId:f}),n=eTt.find(g=>g.id===_);return n&&e("setCurrentTournamentName",n.name),e("setHome",F[0]),e("setAway",F[1]),p.usePastSeasonId||e("setPastSeasonId",w),await e("updateCurrentSeasonGames",Y),Y&&Array.isArray(Y)&&e("updateFinishedGames",Y.reduce((g,h)=>(h.game_status===1&&(g+=1),g),0)),Y}catch(F){return Promise.reject(F)}},async getCurrentSeasonGamesLast({commit:e,state:p}){try{const{games:f,past_season_id:F}=await IV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});return p.usePastSeasonId||e("setPastSeasonId",F),await e("updateCurrentSeasonGames",f),f&&Array.isArray(f)&&e("updateFinishedGames",f.reduce((Y,w)=>(w.game_status===1&&(Y+=1),Y),0)),f}catch(f){return Promise.reject(f)}},async getCurrentSeasonTeams({commit:e,state:p}){try{const f=await jCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});e("updateCurrentSeasonTeams",f.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:p}){try{const f=p.usePastSeasonId?p.pastSeasonId:p.seasonId,F=await NCt({seasonId:f});e("updateSeasonStatistics",F),e("updateOldSeasonId",f)}catch(f){return Promise.reject(f)}},updateRankingInSubcategories({state:e,commit:p,getters:f,rootGetters:F}){e.currentSeasonGames.length>0&&p("addRankingInSubcategories",{getters:f,isPremiumAccount:F["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:p}){try{const f=await BV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,teamId:p.gameForAnalysis.home_team});f.data&&(e("updateHomeTeamPlays",f.data.data),e("setHomeGames",f.data.games))}catch(f){return Promise.reject(f)}},async getVisitingTeamPlays({commit:e,state:p}){try{const f=await BV({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId,teamId:p.gameForAnalysis.visiting_team});f.data&&(e("updateVisitingTeamPlays",f.data.data),e("setVisitingGames",f.data.games))}catch(f){return Promise.reject(f)}},async getCurrentSeasonPlays({commit:e,state:p}){try{const f=await zCt({seasonId:p.usePastSeasonId?p.pastSeasonId:p.seasonId});e("updateStats",f)}catch(f){return Promise.reject(new Error(f))}},async getCurrentLiveGamePlays({state:e,commit:p},f){try{const F=await FCt({gameId:f});e.livePlays=new Map,F.forEach(Y=>{e.gameForAnalysis.game_id===Y[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===Y[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===Y[e.indexesTLP.teamId])&&p("addLiveGamePlay",Y)})}catch(F){throw new Error(F)}},socket_new({state:e,commit:p},f){const F=f[1];(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===F[e.indexesTLP.teamId])&&p("addLiveGamePlay",F)},socket_update({state:e,commit:p},f){const F=f[1];e.gameForAnalysis.game_id===F[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===F[e.indexesTLP.teamId])&&p("updateLiveGamePlay",F)},socket_delete({state:e,commit:p},f){const F=f[1];e.gameForAnalysis.game_id===F[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===F[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===F[e.indexesTLP.teamId])&&p("deleteLiveGamePlay",F)},exitChannel({state:e,getters:p,rootState:f,rootGetters:F,commit:Y}){const w=F["loginGeneral/getPremiumAccount"];p.isLive&&w&&(Y("updateShowLiveData",!0),Y("clearLiveTotals"),e.livePlays.clear(),QCt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))F.homeTeam.resetTotals(),F.visitingTeam.resetTotals(),F.homeTeam.resetTotalsLive(),F.visitingTeam.resetTotalsLive(),F.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(f=>{for(const F of Object.values(f.subcategories))F.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const f of Object.values(e.nextGamesDataStructure))for(const F of Object.values(f.subcategories))F.homeTeam.resetTotals(),F.visitingTeam.resetTotals(),F.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(f=>{for(const F of Object.values(f.subcategories))F.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function nTt(){try{const{data:e}=await _d({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const rTt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,p){e.booleanIsStatisticModalOpen=p},setTournamentType(e,p){e.tournamentType=p},setSectionRef(e,p){e.sectionRef=p},setSectionAnalytics(e,p){e.sectionAnalytics=p},setSeccionBetsGolTipster(e,p){e.seccionBetsGolTipster=p},setPreviewSectionAnalytics(e,p){e.previewSectionAnalytics=p},setVideoSrc(e,p){e.videoSrc=p},setVideoModalVisibility(e,p){e.isVideoModalVisible=p},setSelectedTournament(e,p){e.selectedTournament=p},setTournaments(e,p){e.tournaments=p.map(f=>({...f.tournament,seasons:f.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,p){e.tournamentSelected=p}},actions:{async fetchTournaments({state:e,commit:p}){try{if(e.tournaments.length===0){const f=await nTt();p("setTournaments",f)}}catch(f){throw new Error(f)}}}}};async function aTt({seasonId:e,localTeamId:p,visitingTeamId:f}){try{const F=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${p}/${f}`;return(await _d({url:F})).data}catch(F){return Promise.reject(F)}}async function iTt({seasonId:e,localTeamId:p,visitingTeamId:f}){try{const F=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${p}/${f}`;return(await _d({url:F})).data}catch(F){return Promise.reject(F)}}const NV=(e,p)=>{let f={};return e.forEach((F,Y)=>{Y==3&&(p[0]==35||p[0]==54)&&(p[Y]==2?p[Y]=1:p[Y]=2),Y==2&&(p[0]==35||p[0]==54)&&(p[Y]==1?p[Y]=2:p[Y]==2&&(p[Y]=1)),f[F]=p[Y]}),f},LV=(e,p)=>e.filter(F=>{const Y=p.playingAs.includes(F.playing_as),w=p.matchResult.includes(F.match_result),_=p.sections.includes(F.section);return Y&&w&&_});(function(){function e(p,f,F){return typeof F>"u"||+F==0?Math[p](f):(f=+f,F=+F,isNaN(f)||!(typeof F=="number"&&F%1===0)?NaN:(f=f.toString().split("e"),f=Math[p](+(f[0]+"e"+(f[1]?+f[1]-F:-F))),f=f.toString().split("e"),+(f[0]+"e"+(f[1]?+f[1]+F:F))))}Math.ceil10||(Math.ceil10=function(p,f){return e("ceil",p,f)})})();function OV(e,p){let f=p*-1;return Math.ceil10(e,f)}const oTt={...rTt,...UCt,...tTt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,p,f)=>{const F=e.xGLocalPlays,Y="homeTeamFilter",w=f.nextGeneral[Y];return LV(F,w)||[]},playsAway:(e,p,f)=>{const F=e.xGVisitingPlays,Y="visitingTeamFilter",w=f.nextGeneral[Y];return LV(F,w)},goalsQtyLocal:(e,p)=>{const f=R1.find(F=>F.name==="Goles");return p.playsLocal.filter(F=>f.categories.includes(F.category_id)).length},goalsQtyAway:(e,p)=>{const f=R1.find(F=>F.name==="Goles");return p.playsAway.filter(F=>f.categories.includes(F.category_id)).length},shotsOnGoalQtyLocal:(e,p)=>p.playsLocal.filter(f=>f.category_id===510).length,shotsOnGoalQtyAway:(e,p)=>p.playsAway.filter(f=>f.category_id===510).length,xGLocal:(e,p)=>{const f=new Set;let F=p.playsLocal.reduce((Y,w)=>(f.has(w.moment_of_play)||(f.add(w.moment_of_play),Y+=w.xG2),Y),0);return OV(F,2)},xGAway:(e,p)=>{const f=new Set;let F=p.playsAway.reduce((Y,w)=>(f.has(w.moment_of_play)||(f.add(w.moment_of_play),Y+=w.xG2),Y),0);return OV(F,2)}},mutations:{setTeamSelected(e,p){e.teamSelected=p},setPlays(e,p){const f=p.local_team.map(r=>NV(p.data_headers,r)),F=[],Y=[],w=new Set;f.forEach(r=>{eE.has(r.category_id)?w.has(r.moment_of_play)||(w.add(r.moment_of_play),F.push(r)):tE.has(r.category_id)&&Y.push(r)}),e.xGLocalPlays=[...Y,...F];const _=p.visiting_team.map(r=>NV(p.data_headers,r)),n=new Set,g=[],h=[];_.forEach(r=>{eE.has(r.category_id)?n.has(r.moment_of_play)||(n.add(r.moment_of_play),g.push(r)):tE.has(r.category_id)&&h.push(r)}),e.xGVisitingPlays=[...h,...g]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:p,localTeamId:f,visitingTeamId:F,postMatch:Y=!1}){try{let w={};Y?w=await iTt({seasonId:p,localTeamId:f,visitingTeamId:F}):w=await aTt({seasonId:p,localTeamId:f,visitingTeamId:F}),e("setPlays",w)}catch(w){return Promise.reject(w)}}}}}};function sTt(e){for(const[p,f]of Object.entries(oTt))e.hasModule(p)||e.registerModule(p,f)}const lTt={class:"subcategory-group"},cTt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",lTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,F=>(t.openBlock(),t.createBlock(t.unref(ks),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},uTt=sl(cTt,[["__scopeId","data-v-ae6f3d72"]]),dTt={class:"filter-subcategories"},hTt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",dTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,F=>(t.openBlock(),t.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[t.createVNode(uTt,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),U3=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),pTt={class:"details__header"},fTt=U3(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),mTt={class:"details__header__checkbox"},gTt={class:"details__body"},yTt={class:"details__body__playing-as"},vTt=["onClick"],_Tt={class:"details__header"},bTt=U3(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),xTt={class:"details__header__checkbox"},wTt={class:"details__body"},kTt=U3(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),STt={class:"details__body__game-section"},CTt=["onClick"],TTt={class:"details__body"},ETt=U3(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ATt={class:"details__body__game-section"},MTt=["onClick"],ITt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__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 p=e;t.useCssVars(r=>({"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 f=t.computed(()=>p.playingAs.every(r=>r.isSelected)),F=t.computed(()=>p.gameSections.every(r=>r.isSelected)),Y=t.computed(()=>p.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),w=t.computed(()=>({"--border-radius-first-button":`${p.buttonsBorderRadius} 0 0 ${p.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${p.buttonsBorderRadius} ${p.buttonsBorderRadius} 0`}));function _(r){r?p.playingAs.forEach(v=>{v.isSelected=!0}):p.playingAs.forEach((v,y)=>{v.isSelected=y===0})}function n(r){p.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function g(r){p.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?p.gameSections.forEach(v=>{v.isSelected=!0}):p.gameSections.forEach((v,y)=>{v.isSelected=y===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(w.value)},[t.createElementVNode("div",pTt,[fTt,t.createElementVNode("div",mTt,[t.createVNode(t.unref(ks),{label:"Todos","model-value":f.value,"onUpdate:modelValue":_},null,8,["model-value"])])]),t.createElementVNode("div",gTt,[t.createElementVNode("div",yTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.playingAs,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>n(y)},t.toDisplayString(y.name),11,vTt))),128))])]),t.createElementVNode("div",_Tt,[bTt,t.createElementVNode("div",xTt,[t.createVNode(t.unref(ks),{label:"Todos","model-value":F.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",wTt,[kTt,t.createElementVNode("div",STt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.firstHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,CTt))),128))])]),t.createElementVNode("div",TTt,[ETt,t.createElementVNode("div",ATt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.secondHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,MTt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),PTt={class:"filter-field"},BTt=Object.freeze(Object.defineProperty({__proto__:null,default:sl({__name:"FilterField",setup(e){const p=t.ref(Array.from({length:16},(F,Y)=>Y+1));function f(){}return(F,Y)=>(t.openBlock(),t.createElementBlock("div",PTt,[t.createVNode(t.unref(lL),{width:"100%","background-color":"#2E3B46",value:p.value,"onUpdate:modelValue":f},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),zTt={class:"subcategory-group"},NTt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",zTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,F=>(t.openBlock(),t.createBlock(t.unref(Ss),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},LTt=ll(NTt,[["__scopeId","data-v-ae6f3d72"]]),OTt={class:"filter-subcategories"},FTt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(p,f)=>(t.openBlock(),t.createElementBlock("div",OTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,F=>(t.openBlock(),t.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[t.createVNode(LTt,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),G3=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),DTt={class:"details__header"},RTt=G3(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),VTt={class:"details__header__checkbox"},jTt={class:"details__body"},$Tt={class:"details__body__playing-as"},UTt=["onClick"],GTt={class:"details__header"},HTt=G3(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),WTt={class:"details__header__checkbox"},qTt={class:"details__body"},YTt=G3(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),XTt={class:"details__body__game-section"},ZTt=["onClick"],JTt={class:"details__body"},KTt=G3(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),QTt={class:"details__body__game-section"},eEt=["onClick"],tEt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__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 p=e;t.useCssVars(r=>({"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 f=t.computed(()=>p.playingAs.every(r=>r.isSelected)),F=t.computed(()=>p.gameSections.every(r=>r.isSelected)),Y=t.computed(()=>p.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),w=t.computed(()=>({"--border-radius-first-button":`${p.buttonsBorderRadius} 0 0 ${p.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${p.buttonsBorderRadius} ${p.buttonsBorderRadius} 0`}));function _(r){r?p.playingAs.forEach(v=>{v.isSelected=!0}):p.playingAs.forEach((v,y)=>{v.isSelected=y===0})}function n(r){p.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function g(r){p.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?p.gameSections.forEach(v=>{v.isSelected=!0}):p.gameSections.forEach((v,y)=>{v.isSelected=y===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(w.value)},[t.createElementVNode("div",DTt,[RTt,t.createElementVNode("div",VTt,[t.createVNode(t.unref(Ss),{label:"Todos","model-value":f.value,"onUpdate:modelValue":_},null,8,["model-value"])])]),t.createElementVNode("div",jTt,[t.createElementVNode("div",$Tt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.playingAs,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>n(y)},t.toDisplayString(y.name),11,UTt))),128))])]),t.createElementVNode("div",GTt,[HTt,t.createElementVNode("div",WTt,[t.createVNode(t.unref(Ss),{label:"Todos","model-value":F.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",qTt,[YTt,t.createElementVNode("div",XTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.firstHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,ZTt))),128))])]),t.createElementVNode("div",JTt,[KTt,t.createElementVNode("div",QTt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Y.value.secondHalf,(y,u)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${u}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:o=>g(y)},t.toDisplayString(y.text),11,eEt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),nEt={class:"filter-field"},rEt=Object.freeze(Object.defineProperty({__proto__:null,default:ll({__name:"FilterField",setup(e){const p=t.ref(Array.from({length:16},(F,Y)=>Y+1));function f(){}return(F,Y)=>(t.openBlock(),t.createElementBlock("div",nEt,[t.createVNode(t.unref(KF),{width:"100%","background-color":"#2E3B46",value:p.value,"onUpdate:modelValue":f},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Ju.GSCGameData=BCt,Ju.connectSocket=a4,Ju.disconnectSocket=i4,Ju.getSocket=r4,Ju.registerStoreModules=sTt,Object.defineProperty(Ju,Symbol.toStringTag,{value:"Module"})});