@golstats/gsc-game-data 1.0.240 → 1.0.242
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FilterConditions-d48a19d8-BaOW8wbz-c38ab0c7.js → FilterConditions-d48a19d8-BaOW8wbz-a72c97b5.js} +1 -1
- package/dist/{FilterConditions-d48a19d8-d8d74f55.js → FilterConditions-d48a19d8-eb23e334.js} +1 -1
- package/dist/{FilterField-f0b75cf7-0d151d8e.js → FilterField-f0b75cf7-63277d80.js} +1 -1
- package/dist/{FilterField-f0b75cf7-Dt2ZN6_r-c32f199e.js → FilterField-f0b75cf7-Dt2ZN6_r-7c6a5452.js} +1 -1
- package/dist/{FilterSubcategories-0a921721-8fb4d1c9.js → FilterSubcategories-0a921721-93f350c4.js} +1 -1
- package/dist/{FilterSubcategories-0a921721-Da8PVP1K-41d890f3.js → FilterSubcategories-0a921721-Da8PVP1K-6ef70c93.js} +1 -1
- package/dist/gsc-game-data.js +1 -1
- package/dist/gsc-game-data.umd.cjs +1 -1
- package/dist/{index-cb5a71af.js → index-5b60dfe0.js} +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -7623,4 +7623,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7623
7623
|
* vuex v4.0.2
|
|
7624
7624
|
* (c) 2021 Evan You
|
|
7625
7625
|
* @license MIT
|
|
7626
|
-
*/var oha="store";function U1(e,n){Object.keys(e).forEach(function(i){return n(e[i],i)})}function XJ(e){return e!==null&&typeof e=="object"}function sha(e){return e&&typeof e.then=="function"}function xf(e,n){if(!e)throw new Error("[vuex] "+n)}function lha(e,n){return function(){return e(n)}}function ZJ(e,n,i){return n.indexOf(e)<0&&(i&&i.prepend?n.unshift(e):n.push(e)),function(){var B=n.indexOf(e);B>-1&&n.splice(B,1)}}function JJ(e,n){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;N6(e,i,[],e._modules.root,!0),KM(e,i,n)}function KM(e,n,i){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var z=e._wrappedGetters,c={};U1(z,function(m,a){c[a]=lha(m,e),Object.defineProperty(e.getters,a,{get:function(){return c[a]()},enumerable:!0})}),e._state=t.reactive({data:n}),e.strict&&pha(e),B&&i&&e._withCommit(function(){B.data=null})}function N6(e,n,i,B,z){var c=!i.length,m=e._modules.getNamespace(i);if(B.namespaced&&(e._modulesNamespaceMap[m]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+m+" for the namespaced module "+i.join("/")),e._modulesNamespaceMap[m]=B),!c&&!z){var a=QM(n,i.slice(0,-1)),y=i[i.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+i.join(".")+'"'),a[y]=B.state})}var f=B.context=cha(e,m,i);B.forEachMutation(function(r,v){var _=m+v;uha(e,_,r,f)}),B.forEachAction(function(r,v){var _=r.root?v:m+v,p=r.handler||r;dha(e,_,p,f)}),B.forEachGetter(function(r,v){var _=m+v;hha(e,_,r,f)}),B.forEachChild(function(r,v){N6(e,n,i.concat(v),r,z)})}function cha(e,n,i){var B=n==="",z={dispatch:B?e.dispatch:function(c,m,a){var y=O6(c,m,a),f=y.payload,r=y.options,v=y.type;if((!r||!r.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+v);return}return e.dispatch(v,f)},commit:B?e.commit:function(c,m,a){var y=O6(c,m,a),f=y.payload,r=y.options,v=y.type;if((!r||!r.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+v);return}e.commit(v,f,r)}};return Object.defineProperties(z,{getters:{get:B?function(){return e.getters}:function(){return KJ(e,n)}},state:{get:function(){return QM(e.state,i)}}}),z}function KJ(e,n){if(!e._makeLocalGettersCache[n]){var i={},B=n.length;Object.keys(e.getters).forEach(function(z){if(z.slice(0,B)===n){var c=z.slice(B);Object.defineProperty(i,c,{get:function(){return e.getters[z]},enumerable:!0})}}),e._makeLocalGettersCache[n]=i}return e._makeLocalGettersCache[n]}function uha(e,n,i,B){var z=e._mutations[n]||(e._mutations[n]=[]);z.push(function(c){i.call(e,B.state,c)})}function dha(e,n,i,B){var z=e._actions[n]||(e._actions[n]=[]);z.push(function(c){var m=i.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},c);return sha(m)||(m=Promise.resolve(m)),e._devtoolHook?m.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):m})}function hha(e,n,i,B){if(e._wrappedGetters[n]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+n);return}e._wrappedGetters[n]=function(z){return i(B.state,B.getters,z.state,z.getters)}}function pha(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&xf(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function QM(e,n){return n.reduce(function(i,B){return i[B]},e)}function O6(e,n,i){return XJ(e)&&e.type&&(i=n,n=e,e=e.type),process.env.NODE_ENV!=="production"&&xf(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:n,options:i}}var fha="vuex bindings",QJ="vuex:mutations",eI="vuex:actions",mv="vuex",mha=0;function gha(e,n){iha({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:[fha]},function(i){i.addTimelineLayer({id:QJ,label:"Vuex Mutations",color:eK}),i.addTimelineLayer({id:eI,label:"Vuex Actions",color:eK}),i.addInspector({id:mv,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===mv)if(B.filter){var z=[];rK(z,n._modules.root,B.filter,""),B.rootNodes=z}else B.rootNodes=[nK(n._modules.root,"")]}),i.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===mv){var z=B.nodeId;KJ(n,z),B.state=_ha(xha(n._modules,z),z==="root"?n.getters:n._makeLocalGettersCache,z)}}),i.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===mv){var z=B.nodeId,c=B.path;z!=="root"&&(c=z.split("/").filter(Boolean).concat(c)),n._withCommit(function(){B.set(n._state.data,c,B.state.value)})}}),n.subscribe(function(B,z){var c={};B.payload&&(c.payload=B.payload),c.state=z,i.notifyComponentUpdate(),i.sendInspectorTree(mv),i.sendInspectorState(mv),i.addTimelineEvent({layerId:QJ,event:{time:Date.now(),title:B.type,data:c}})}),n.subscribeAction({before:function(B,z){var c={};B.payload&&(c.payload=B.payload),B._id=mha++,B._time=Date.now(),c.state=z,i.addTimelineEvent({layerId:eI,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:c}})},after:function(B,z){var c={},m=Date.now()-B._time;c.duration={_custom:{type:"duration",display:m+"ms",tooltip:"Action duration",value:m}},B.payload&&(c.payload=B.payload),c.state=z,i.addTimelineEvent({layerId:eI,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:c}})}})})}var eK=8702998,yha=6710886,vha=16777215,tK={label:"namespaced",textColor:vha,backgroundColor:yha};function aK(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function nK(e,n){return{id:n||"root",label:aK(n),tags:e.namespaced?[tK]:[],children:Object.keys(e._children).map(function(i){return nK(e._children[i],n+i+"/")})}}function rK(e,n,i,B){B.includes(i)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:n.namespaced?[tK]:[]}),Object.keys(n._children).forEach(function(z){rK(e,n._children[z],i,B+z+"/")})}function _ha(e,n,i){n=i==="root"?n:n[i];var B=Object.keys(n),z={state:Object.keys(e.state).map(function(m){return{key:m,editable:!0,value:e.state[m]}})};if(B.length){var c=bha(n);z.getters=Object.keys(c).map(function(m){return{key:m.endsWith("/")?aK(m):m,editable:!1,value:tI(function(){return c[m]})}})}return z}function bha(e){var n={};return Object.keys(e).forEach(function(i){var B=i.split("/");if(B.length>1){var z=n,c=B.pop();B.forEach(function(m){z[m]||(z[m]={_custom:{value:{},display:m,tooltip:"Module",abstract:!0}}),z=z[m]._custom.value}),z[c]=tI(function(){return e[i]})}else n[i]=tI(function(){return e[i]})}),n}function xha(e,n){var i=n.split("/").filter(function(B){return B});return i.reduce(function(B,z,c){var m=B[z];if(!m)throw new Error('Missing module "'+z+'" for path "'+n+'".');return c===i.length-1?m:m._children},n==="root"?e:e.root._children)}function tI(e){try{return e()}catch(n){return n}}var wf=function(e,n){this.runtime=n,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=(typeof i=="function"?i():i)||{}},iK={namespaced:{configurable:!0}};iK.namespaced.get=function(){return!!this._rawModule.namespaced},wf.prototype.addChild=function(e,n){this._children[e]=n},wf.prototype.removeChild=function(e){delete this._children[e]},wf.prototype.getChild=function(e){return this._children[e]},wf.prototype.hasChild=function(e){return e in this._children},wf.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)},wf.prototype.forEachChild=function(e){U1(this._children,e)},wf.prototype.forEachGetter=function(e){this._rawModule.getters&&U1(this._rawModule.getters,e)},wf.prototype.forEachAction=function(e){this._rawModule.actions&&U1(this._rawModule.actions,e)},wf.prototype.forEachMutation=function(e){this._rawModule.mutations&&U1(this._rawModule.mutations,e)},Object.defineProperties(wf.prototype,iK);var G1=function(e){this.register([],e,!1)};G1.prototype.get=function(e){return e.reduce(function(n,i){return n.getChild(i)},this.root)},G1.prototype.getNamespace=function(e){var n=this.root;return e.reduce(function(i,B){return n=n.getChild(B),i+(n.namespaced?B+"/":"")},"")},G1.prototype.update=function(e){oK([],this.root,e)},G1.prototype.register=function(e,n,i){var B=this;i===void 0&&(i=!0),process.env.NODE_ENV!=="production"&&cK(e,n);var z=new wf(n,i);if(e.length===0)this.root=z;else{var c=this.get(e.slice(0,-1));c.addChild(e[e.length-1],z)}n.modules&&U1(n.modules,function(m,a){B.register(e.concat(a),m,i)})},G1.prototype.unregister=function(e){var n=this.get(e.slice(0,-1)),i=e[e.length-1],B=n.getChild(i);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+i+"', which is not registered");return}B.runtime&&n.removeChild(i)},G1.prototype.isRegistered=function(e){var n=this.get(e.slice(0,-1)),i=e[e.length-1];return n?n.hasChild(i):!1};function oK(e,n,i){if(process.env.NODE_ENV!=="production"&&cK(e,i),n.update(i),i.modules)for(var B in i.modules){if(!n.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}oK(e.concat(B),n.getChild(B),i.modules[B])}}var sK={assert:function(e){return typeof e=="function"},expected:"function"},wha={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},lK={getters:sK,mutations:sK,actions:wha};function cK(e,n){Object.keys(lK).forEach(function(i){if(n[i]){var B=lK[i];U1(n[i],function(z,c){xf(B.assert(z),kha(e,i,c,z,B.expected))})}})}function kha(e,n,i,B,z){var c=n+" should be "+z+' but "'+n+"."+i+'"';return e.length>0&&(c+=' in module "'+e.join(".")+'"'),c+=" is "+JSON.stringify(B)+".",c}var Lh=function e(n){var i=this;n===void 0&&(n={}),process.env.NODE_ENV!=="production"&&(xf(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),xf(this instanceof e,"store must be called with the new operator."));var B=n.plugins;B===void 0&&(B=[]);var z=n.strict;z===void 0&&(z=!1);var c=n.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new G1(n),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=c;var m=this,a=this,y=a.dispatch,f=a.commit;this.dispatch=function(v,_){return y.call(m,v,_)},this.commit=function(v,_,p){return f.call(m,v,_,p)},this.strict=z;var r=this._modules.root.state;N6(this,r,[],this._modules.root),KM(this,r),B.forEach(function(v){return v(i)})},aI={state:{configurable:!0}};Lh.prototype.install=function(e,n){e.provide(n||oha,this),e.config.globalProperties.$store=this;var i=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;i&&gha(e,this)},aI.state.get=function(){return this._state.data},aI.state.set=function(e){process.env.NODE_ENV!=="production"&&xf(!1,"use store.replaceState() to explicit replace store state.")},Lh.prototype.commit=function(e,n,i){var B=this,z=O6(e,n,i),c=z.type,m=z.payload,a=z.options,y={type:c,payload:m},f=this._mutations[c];if(!f){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+c);return}this._withCommit(function(){f.forEach(function(r){r(m)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+c+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Lh.prototype.dispatch=function(e,n){var i=this,B=O6(e,n),z=B.type,c=B.payload,m={type:z,payload:c},a=this._actions[z];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+z);return}try{this._actionSubscribers.slice().filter(function(f){return f.before}).forEach(function(f){return f.before(m,i.state)})}catch(f){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(f))}var y=a.length>1?Promise.all(a.map(function(f){return f(c)})):a[0](c);return new Promise(function(f,r){y.then(function(v){try{i._actionSubscribers.filter(function(_){return _.after}).forEach(function(_){return _.after(m,i.state)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(_))}f(v)},function(v){try{i._actionSubscribers.filter(function(_){return _.error}).forEach(function(_){return _.error(m,i.state,v)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(_))}r(v)})})},Lh.prototype.subscribe=function(e,n){return ZJ(e,this._subscribers,n)},Lh.prototype.subscribeAction=function(e,n){var i=typeof e=="function"?{before:e}:e;return ZJ(i,this._actionSubscribers,n)},Lh.prototype.watch=function(e,n,i){var B=this;return process.env.NODE_ENV!=="production"&&xf(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},n,Object.assign({},i))},Lh.prototype.replaceState=function(e){var n=this;this._withCommit(function(){n._state.data=e})},Lh.prototype.registerModule=function(e,n,i){i===void 0&&(i={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(xf(Array.isArray(e),"module path must be a string or an Array."),xf(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,n),N6(this,this.state,e,this._modules.get(e),i.preserveState),KM(this,this.state)},Lh.prototype.unregisterModule=function(e){var n=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xf(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var i=QM(n.state,e.slice(0,-1));delete i[e[e.length-1]]}),JJ(this)},Lh.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xf(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),JJ(this,!0)},Lh.prototype._withCommit=function(e){var n=this._committing;this._committing=!0,e(),this._committing=n},Object.defineProperties(Lh.prototype,aI);var Cha=Tha(function(e,n){var i={};return process.env.NODE_ENV!=="production"&&!uK(n)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),Sha(n).forEach(function(B){var z=B.key,c=B.val;i[z]=function(){for(var m=[],a=arguments.length;a--;)m[a]=arguments[a];var y=this.$store.commit;if(e){var f=Eha(this.$store,"mapMutations",e);if(!f)return;y=f.context.commit}return typeof c=="function"?c.apply(this,[y].concat(m)):y.apply(this.$store,[c].concat(m))}}),i});function Sha(e){return uK(e)?Array.isArray(e)?e.map(function(n){return{key:n,val:n}}):Object.keys(e).map(function(n){return{key:n,val:e[n]}}):[]}function uK(e){return Array.isArray(e)||XJ(e)}function Tha(e){return function(n,i){return typeof n!="string"?(i=n,n=""):n.charAt(n.length-1)!=="/"&&(n+="/"),e(n,i)}}function Eha(e,n,i){var B=e._modulesNamespaceMap[i];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+n+"(): "+i),B}const Aha="/icn-play.svg",Mha="/icn-tiros-de-esquina.svg",Iha="/icn-tiro-a-porteria.svg",Pha="/icn-cambio.svg",Bha="/icn-falta.svg",Nha="/atajada.svg",Oha="/fuera-de-lugar.svg",nI="/gol.svg",Dha="/var.png",Lha="/tiempo-agregado.svg",Fha="/jugada-peligrosa.svg",zha="/penal-marcado.svg",Rha="/penal-fallado.svg",Vha="/inicia-el-partido.svg",$ha="/fin-del-partido.svg",jha="/icn-tarjeta-amarilla.svg",Uha="/icn-tarjeta-roja.svg",Gha=[1,2,3,4,6],Hha={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=[],n=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return ZM.GOAL_IDS.includes(n)?(e.push("is-main-event"),e.push("goal")):ZM.YELLOW_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("yellow-card")):ZM.RED_CARD_IDS.includes(n)?(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(n=>Jda(n))),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||Gha.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Cha("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,n]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(n),teamId:this.gameEvent.team_id})}}},Wha=e=>(t.pushScopeId("data-v-9943063a"),e=e(),t.popScopeId(),e),qha={class:"time-line-event__details"},Yha={width:"127",preload:"metadata",style:{"border-radius":"8px"}},Xha=["src"],Zha=Wha(()=>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)),Jha={class:"time-line-event__details__info"},Kha={key:0,class:"time-line-event__details__info__header__players"},Qha={class:"time-line-event__details__info__header__players__div-img"},epa=["src"],tpa={class:"time-line-event__details__info__body"},apa={class:"time-line-event__details__info__body__comment"},npa={class:"time-line-event__minute__container"},rpa={class:"time-line-event__minute__container__text"},ipa={class:"time-line-event__minute__container__icon-container"},opa={class:"time-line-event__minute__container__icon-container__icon"},spa={key:0,src:Mha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lpa={key:1,src:Iha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},cpa={key:2,src:Pha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},upa={key:3,src:Bha,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},dpa={key:4,src:Nha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},hpa={key:5,src:Oha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ppa={key:6,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fpa={key:7,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},mpa={key:8,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},gpa={key:9,src:Dha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ypa={key:10,src:Lha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vpa={key:11,src:Fha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_pa={key:12,src:zha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bpa={key:13,src:Rha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xpa={key:14,src:Vha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},wpa={key:15,src:$ha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kpa={key:16,src:jha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Cpa={key:17,src:Uha,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Spa={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 Tpa(e,n,i,B,z,c){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",c.teamTypeClasses]),style:t.normalizeStyle({width:`${i.width}px`}),key:z.gameEventKey},[t.createElementVNode("div",qha,[i.canPlayVideos&&i.gameEvent.video_link!=="-"&&i.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:n[0]||(n[0]=m=>c.thumbnailClick(i.gameEvent.video_link,i.gameEvent.event_type_name))},[t.createElementVNode("video",Yha,[t.createElementVNode("source",{src:i.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,Xha)]),Zha])):t.createCommentVNode("",!0),t.createElementVNode("div",Jha,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",c.teamTypeClasses2])},[i.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",Kha,[c.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(c.srcImgPlayers,(m,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",Qha,[t.createElementVNode("img",{src:m,alt:""},null,8,epa)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",c.nameClasses]),onClick:n[1]||(n[1]=m=>c.thumbnailClick(i.gameEvent.video_link,i.gameEvent.event_type_name))},[i.canPlayVideos&&i.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:Aha,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(i.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${i.gameEvent.event_type_name}`:i.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(i.gameEvent.category_id?i.gameEvent.event_type_id===5?i.gameEvent.category_name:i.gameEvent.event_type_name==="Gol"?i.gameEvent.event_type_name+" de "+i.gameEvent.team_name:i.gameEvent.event_type_name:i.gameEvent.comments),1)],2)],2),t.createElementVNode("div",tpa,[t.createElementVNode("div",apa,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",c.minuteClasses])},[t.createElementVNode("div",npa,[t.createElementVNode("div",rpa,t.toDisplayString(i.gameEvent.minute)+"'",1),t.createElementVNode("div",ipa,[t.createElementVNode("div",opa,[i.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",spa)):i.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",lpa)):i.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",cpa)):i.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",upa)):i.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",dpa)):i.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",hpa)):i.gameEvent.category_id==6&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==5&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==1&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==2&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==3&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==7&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==12&&i.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",ppa)):i.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",fpa)):i.gameEvent.category_id==13||i.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",mpa)):i.gameEvent.category_id==30||i.gameEvent.category_id==31||i.gameEvent.category_id==32||i.gameEvent.category_id==33||i.gameEvent.category_id==34||i.gameEvent.category_id==35||i.gameEvent.category_id==36||i.gameEvent.category_id==37||i.gameEvent.category_id==38||i.gameEvent.category_id==39||i.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",gpa)):i.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",ypa)):i.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",vpa)):i.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",_pa)):i.gameEvent.category_id==15||i.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",bpa)):i.gameEvent.category_id==0&&i.gameEvent.game_status_id==16||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==18||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==20||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",xpa)):i.gameEvent.category_id==0&&i.gameEvent.game_status_id==13||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==17||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==19||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==21||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",wpa)):i.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",kpa)):i.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",Cpa)):(t.openBlock(),t.createElementBlock("img",Spa))])])])],2)],6)}const Epa=Z_(Hha,[["render",Tpa],["__scopeId","data-v-9943063a"]]),Apa={"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"},Mpa={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 D6=null;const Ipa={name:"TimeLine",components:{Tooltip:qda,TimeLineEvent:Epa},mixins:[Xda],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 n=await this.fetchGameEvents(e);n?(this.gameEvents=[...n],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(n){throw new Error(n)}},getGameEventClassAndSetIcon(e,n){return e.icon=n===0?"inicio_del_partido":Apa[`${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:n}}=await HJ.get(`${this.gameEventsUrl}${e}`);return n}catch(n){throw new Error(n)}},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)D6=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),D6.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,n){const i=this.$refs[`gameEventDiv${n}`][0],B=this.$refs[`gameEventLine${n}`]?this.$refs[`gameEventLine${n}`][0]:null,z=e+12;i&&(i.style.height=`${z}px`),B&&(B.style.height=`${z}px`)},sortGameEvents(){this.gameEvents.sort((e,n)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(n.match_lapse)+Number(n.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let n=0;switch(e){case 1:n=0;break;case 2:n=45;break;case 3:n=90;break;case 4:n=105;break;case 5:n=120;break}return n},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const n=this.gameEvents.findIndex(i=>i.play_id===e.play_id);n&&this.gameEvents.splice(n,1)},checkTimeLineStatus(){this.gameEvents.forEach(n=>{const i=Mpa[n.game_status];i&&this.timeLineStatuses.push({...i,gameEvent:n})}),this.timeLineStatuses.sort((n,i)=>i.weight-n.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const n=this.gameData[e].team_id;return Zda(n)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){D6&&D6.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,n]){this.channelName===e&&this.addGameEventFromChannel(n)},update_mxm([e,n]){this.channelName===e&&(this.deleteGameEventFromChannel(n),this.addGameEventFromChannel(n))},delete_mxm([e,n]){this.channelName===e&&this.deleteGameEventFromChannel(n)}}},dK=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),Ppa={ref:"timeLine",class:"time-line"},Bpa={class:"time-line__header"},Npa={class:"time-line__header__dot"},Opa={class:"time-line__header__dot__home-team team-logo"},Dpa=["src"],Lpa={class:"time-line__header__dot__away-team team-logo"},Fpa=["src"],zpa={key:1,class:"start-line"},Rpa=dK(()=>t.createElementVNode("div",null,null,-1)),Vpa=dK(()=>t.createElementVNode("div",null,null,-1)),$pa=[Rpa,Vpa],jpa={key:1,class:"noEventText"},Upa={class:"tooltip-data"},Gpa=["src"];function Hpa(e,n,i,B,z,c){const m=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Ppa,[t.createElementVNode("div",Bpa,[t.createElementVNode("div",Npa,[t.createElementVNode("div",Opa,[t.createElementVNode("img",{src:c.getTeamLogoSrc("homeTeam"),alt:""},null,8,Dpa)]),t.createElementVNode("div",Lpa,[t.createElementVNode("img",{src:c.getTeamLogoSrc("awayTeam"),alt:""},null,8,Fpa)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${z.gameEvents.length}`},[i.gameData.status!==4||i.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:z.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.gameEventsToShow,(y,f)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${f}`,class:t.normalizeClass(c.getGameEventClassAndSetIcon(y,f))},[t.createElementVNode("div",{class:t.normalizeClass(c.getEventContainerClass(y))},[t.createVNode(m,{"game-event":y,"is-mobile":c.isMobile,"time-line-width":z.timeLineWidth,width:c.gameEventWidth,"can-play-videos":i.canPlayVideos,onEventHeight:r=>c.updateContainerHeight(r,f),onPlayerChanged:n[0]||(n[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:c.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),f>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${f}`,class:"line"},null,512)):t.createCommentVNode("",!0),i.gameData.status===1&&f===c.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",zpa,$pa)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",jpa,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:z.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",Upa,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:z.dataVideo.link,format:"video/mp4"},null,8,Gpa)])])]),_:1},8,["data"])],64)}const Wpa=Z_(Ipa,[["render",Hpa],["__scopeId","data-v-2574e576"]]),qpa={class:"game-time-line__options"},Ypa={class:"game-time-line__timeline"},Xpa={__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){HJ.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const n=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"}),i=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 B=null;const z=t.ref(["Todo","1er tiempo","2do tiempo"]),c=t.ref("Todo"),m=t.ref({}),a=t.ref(null),y=t.ref(0),f=t.computed(()=>{let l="all";return c.value==="1er tiempo"||c.value==="1er"?l="firstHalf":(c.value==="2do tiempo"||c.value==="2do")&&(l="secondHalf"),l}),r=t.computed(()=>y.value<500);function v(l){c.value=l}function _(l){m.value=l}function p(){if(window.ResizeObserver)B=new ResizeObserver(()=>{y.value=a.value.clientWidth}),B.observe(a.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{p()}),t.onBeforeUnmount(()=>{B&&B.unobserve(a.value)}),(l,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:a,class:"game-time-line"},[t.createElementVNode("div",qpa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,s=>(t.openBlock(),t.createElementBlock("div",{key:s,class:"game-time-line__options__option"},[t.createVNode(Eua,t.mergeProps(y.value<390?i.value:n.value,{text:s=="Todo"?s:y.value<390?s.substring(0,3):s,"is-active":c.value===s,onClick:d=>v(s)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",Ypa,[t.createVNode(Wpa,{"game-data":e.game,"time-line-period":f.value,"is-mobile":r.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:_},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},Zpa=Z_(Xpa,[["__scopeId","data-v-f42d0c90"]]),Swa="",Jpa={class:"game-data__header"},Kpa={class:"game-data__header__tournament-season-dropdown"},Qpa={class:"game-data__header__teams-carousel"},efa={class:"game-data__body"},tfa={class:"game-data__body__menu"},afa={class:"game-data__body__menu__contmenuswitch"};$c.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const nfa=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:wfe,GSCGameTimeLine:Zpa,GscSwitchComponent:SA,GSCLineupsMain:rke,GSCDatosGSMain:CPe,GSCVideoGame:BGe,ModalEvents:iV,GSCSummaryMain:I_t,GSCTacticaFijaMain:Sua,GSCProminentMain:KNt,GSCComparative:BFt}}),rfa=$i(Object.assign(nfa,{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:n}){const i=e,B=ix();Jh.on("socket-connected",()=>{B.commit("nextGeneral/updateIsSocketConnected",i.socket.connected)});const z=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTg2LCJuYW1lIjoiSkFTIEdvbFN0YXRzIiwidXNlcm5hbWUiOiJ5YXRlYW1lcmljYSIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE2OTYzNjU1ODcsImV4cCI6MTcyNzkwMTU4N30.jynRtgtFM8sf8gtqZJ-1gHLc2Ws13TIykXcfrlOvv1g"),c=t.ref({season:[]}),m=t.ref({}),a=t.ref(!1),y=t.ref({}),f=t.ref(1),r=12e4,v=12e4,_=12e4,p=12e4,l=12e4,o=12e4,s=12e4,d=12e4,u=12e4,h=t.ref(null),g=t.ref(null),b=t.ref(null),w=t.ref([]),x=t.ref(null),T=t.ref(!0),k=t.ref(new Set([1,2])),S=t.ref({}),C=t.ref({minute:"",recent_lapse:0,score:{}}),A=t.ref(0),E=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),M=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:i.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}]),I=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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}]),N=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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 O=t.ref(0);let L=null;const R=t.ref(null),V=t.ref(0),j=t.ref(I.value[0]),U=t.ref([]);let Z=t.ref("");const q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},W=t.computed(()=>{const ze=[];return m.value&&m.value.id&&(ze.push({id:m.value.id,name:m.value.name,type:m.value.type}),m.value.related_seasons&&m.value.related_seasons.forEach(Be=>{ze.push({id:Be.id,type:Be.type})})),ze}),Q=t.computed(()=>{if(i.clientPrivilegesBySeasons){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)return ze.teamId}return 0});function X(){a.value=!1}function J(ze){const Be=ze.split(",");return!(Be.length<2||Be[1].split(" ").length<2)}function ee(ze){h.value=ze}function le(ze){w.value.push(ze)}function oe(ze){x.value=ze}function se(ze){b.value=ze}function ce(ze){g.value=ze}function ae(ze){if(!J(ze))return"";const Be=ie(ze);return`${ne(ze)}. ${Be}`}function ne(ze){return ze.split(",")[1].split(" ")[1][0]}function ie(ze){const Be=ze.split(",")[0].split(" ");return Be[0].length<=3&&Be.length>1?`${Be[0]} ${Be[1]}`:Be[0]}async function de(ze){try{const Be=$c.create({headers:{Authorization:`${z.value}`}});S.value={};const we=await Be.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+ze.game_id);S.value[ze.home_team.team_id]=[],S.value[ze.home_team.team_id].team={name:ze.home_team.acronym,logo:ze.home_team.logo},S.value[ze.home_team.team_id].goals=[],S.value[ze.home_team.team_id].red=[],S.value[ze.home_team.team_id].yellow=[],S.value[ze.visiting_team.team_id]=[],S.value[ze.visiting_team.team_id].team={name:ze.visiting_team.acronym,logo:ze.visiting_team.logo},S.value[ze.visiting_team.team_id].goals=[],S.value[ze.visiting_team.team_id].red=[],S.value[ze.visiting_team.team_id].yellow=[],we.data.minute!=null&&(C.value={minute:we.data.minute,recent_lapse:we.data.recent_lapse,score:we.data.score});for(let Oe=0;Oe<we.data.plays.length;Oe++)we.data.plays[Oe].category_name=="Roja"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].red||(S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].red||(S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute))),we.data.plays[Oe].category_name=="Amarilla"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].yellow||(S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].yellow||(S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute))),we.data.plays[Oe].event_type_name=="Gol"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?we.data.plays[Oe].category_name=="Autogol"?(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].goals||(S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].goals||(S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):we.data.plays[Oe].category_name=="Autogol"?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].goals||(S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].goals||(S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)))}catch(Be){return Promise.reject(Be)}}function he(ze){a.value=!0,ze.is_live!=1&&ze.game_status!=0&&(ze.game_status==4||Object.keys(ze.minutes).length>0)?(A.value=1,S.value={plays:ze.minutes,home_team:ze.home_team,visiting_team:ze.visiting_team}):(A.value=0,de(ze))}function pe(){L=new ResizeObserver(ze=>{for(const Be of ze)V.value=Be.contentRect.width}),L.observe(R.value)}const me=t.computed(()=>{let ze={};return y.value&&y.value.game_id&&(ze={gameId:y.value.game_id,id:y.value.game_id,seasonId:y.value.season_id,status:y.value.game_status,game_status:y.value.game_status,dateTimeUTC:y.value.date_time_utc,homeTeam:y.value.home_team,awayTeam:y.value.visiting_team,is_live:y.value.is_live,minutes:y.value.minutes}),ze});t.watch(()=>me,(ze,Be)=>{Object.keys(ze.value).length>0&&(ze.value.gameId===Be.value.gameId&&ze.value.is_live!==Be.value.is_live&&(B.commit("nextGeneral/updateGameForAnalysisByProps",{is_live:ze.value.is_live,game_status:ze.value.game_status}),O.value+=1),I.value=[],ze.value.is_live==1||ze.value.game_status==4?I.value=[...M.value]:I.value=[...N.value],!i.isWidget&&(m.value.is_tactic_available==0||ze.value.is_live==1||ze.value.game_status==0)&&I.value.pop(),i.isWidget&&ze.value.is_live==1&&ze.value.awayTeam.team_id==i.teamWidget&&I.value.shift(),j.value=I.value[0],i.isWidget&&ze.value.is_live==1&&ze.value.awayTeam.team_id==i.teamWidget,j.value=I.value[0],O.value+=1,de({game_id:ze.value.gameId,home_team:ze.value.homeTeam,visiting_team:ze.value.awayTeam}),ze.value.is_live==1&&setInterval(()=>{A.value=0,de({game_id:ze.value.gameId,home_team:ze.value.homeTeam,visiting_team:ze.value.awayTeam})},6e4))},{deep:!0,immediate:!0}),t.watch(()=>B.state.nextGeneral.gameForAnalysis,()=>{B.commit("nextGeneral/updateIsSocketConnected",i.socket.connected)},{deep:!0,immediate:!0});function be(ze){f.value=ze.is_captured,T.value=ze.is_captured!==0,c.value.id!==ze.id&&(c.value=ze,B.commit("gameGlobal/setTournamentType",ze.tournament_type))}function xe(ze){!ze.auxwidget&&ge.value&&!ge.value.canPrivilegesTeamPlayVideos||((y.value.is_live||y.value.game_status===0)&&(ze.liveGameConfig={gameId:y.value.game_id}),n("openmedia",ze))}function ke(ze){n("onOpenProfile",ze)}function Ee(ze){n("openProfileTeam",ze)}function Ne(ze){n("openProfilePlayer",ze)}function je(ze){De(ze),ze=="Estadísticas"&&(Z.value="Comparativa")}function Te(){Z.value=""}function Ce(ze){m.value.id!==ze.id&&(m.value=ze,n("change-season-id",ze.id))}const ye=t.computed(()=>I.value.reduce((ze,Be)=>(i.disabledSectionsIds.includes(Be.id)||ge.value&&!ge.value.canPrivilegesTeamPlayVideos&&Be.id===2||i.clientPrivilegesBySeasons&&Be.id===7||(T.value||Be.id!==5&&Be.id!==6)&&ze.push(Be.name),ze),[])),ge=t.computed(()=>{if(i.clientPrivilegesBySeasons){if(m.value&&y.value&&y.value.game_id){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)if(Se(ze.playingAs),y.value.is_live||y.value.game_status===1||y.value.game_status===0){const Be=ze.playingAs.has(y.value.playingAs);return{seasonAndPrivileges:ze,canPrivilegesTeamPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&Be,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:y.value.home_team.team_id===ze.teamId,homeTeamDetails:{canPlayVideos:Be,team:y.value.home_team},awayTeamDetails:{canPlayVideos:Be,team:y.value.visiting_team}}}else{const Be=y.value.home_team.team_id===ze.teamId,we=Me.value.filter(Re=>ze.playingAs.has(Re.playingAs));return{seasonAndPrivileges:ze,canPrivilegesTeamPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&we.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:Be,homeTeamDetails:{canPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&Be&&we.length>0,team:y.value.home_team},awayTeamDetails:{canPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&!Be&&we.length>0,team:y.value.visiting_team}}}Se(new Set)}return q}return null}),Me=t.computed(()=>{if(i.clientPrivilegesBySeasons){if(m.value){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)return U.value.filter(Be=>Be.game_status===1&&ze.playingAs.has(Be.playingAs))}return[]}return[]});t.watch(ye,()=>{ge.value&&!ge.value.canPrivilegesTeamPlayVideos&&j.value.id===2&&De("Resumen")},{deep:!0,immediate:!0});function Se(ze){k.value=ze}function De(ze){if(h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let Be of w.value)clearInterval(Be);w.value=[]}i.isWidget?j.value=I.value.find(Be=>Be.name===ze)||I.value[1]:j.value=I.value.find(Be=>Be.name===ze)||I.value[0]}t.onMounted(()=>{pe(),t.nextTick(()=>{i.isSynchronization&&De("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(L&&L.disconnect(),h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let ze of w.value)clearInterval(ze);w.value=[]}K8()});function Le(ze){if(ze.playingAs||(ze.playingAs=Q.value?ze.home_team.team_id===Q.value?1:2:0),h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let Be of w.value)clearInterval(Be);w.value=[]}y.value=ze,ze.is_live&&ze.game_status===4?xB():wB()}function Ve(ze){U.value=ze.map(Be=>{const we={...Be};return Q.value&&(we.playingAs=we.home_team.team_id===Q.value?1:2),we})}return(ze,Be)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:R},[t.createElementVNode("div",Jpa,[t.withDirectives(t.createElementVNode("div",Kpa,[t.createVNode(t.unref(xI),{"current-season-id":e.currentSeasonId,onInput:be,onChangeTournaments:be,"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(CI),{"current-season-id":e.currentSeasonId,seasons:c.value.seasons,onInput:Ce},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",Qpa,[t.createVNode(t.unref(Tre),{"plays-live":S.value,"info-live":C.value,token:E.value,is_captured:f.value,"await-for-seasons":"",seasons:W.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":Q.value,"only-games-team-id":Q.value,"tournament-type":t.unref(B).state.gameGlobal.tournamentType,onChangeGameCarousel:Le,onOpenModalEvent:he,onChangeGamesByClientPrivileges:Ve},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"])])]),a.value?(t.openBlock(),t.createBlock(iV,{key:0,width:V.value,onCloseModalEventsLive:X,plays:S.value,game:y.value,type:A.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",efa,[t.createElementVNode("div",tfa,[t.createElementVNode("div",afa,[t.createVNode(t.unref(SA),{type:2,buttons:ye.value,"font-family":"Poppins-Regular","font-size":"16px",width:V.value<400||V.value<700?"max-content":V.value<840||V.value<1050?"155px":"165px","selected-option":j.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:De},null,8,["buttons","width","selected-option"])])]),me.value&&me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(j.value.componentName),{key:O.value,game:me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ce,onIntervalidhighlive:se,onIntervalidtops:le,onIntervalidgs:oe,subsection:t.unref(Z),seasonSelected:m.value,tournamentSelected:c.value,showLineups:T.value,socket:e.socket,"time-live-prominent-data":r,"time-live-highlights-prominent-and-video":v,"time-live-possesion":_,"time-live-video-goals":p,"time-live-video-best-plays":l,"time-live-video-this-game":o,"time-live-video-specific-plays":s,"time-live-comparative-best-players":d,"time-live-comparative-avanced":u,is_captured:f.value,"is-tactic-visible":!!m.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ge.value?ge.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":k.value,"client-privileges-team-id":Q.value,"play-videos-privileges":ge.value,token:E.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,onResetSubsection:Te,onOpenmedia:xe,onOnOpenProfile:ke,onOpenProfileTeam:Ee,onOpenProfilePlayer:Ne,onChangeToTab:je,onOpenMediaPlayer:xe,onIntervalid:ee},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)])],512))}}),[["__scopeId","data-v-847ab9cb"]]);async function Ud({url:e,options:n={},retries:i=3}){return await $c.get(e,n).then(B=>B).catch(B=>i>0?Ud({url:e,options:n,retries:i-1}):B)}async function hK({seasonId:e},n=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(i){if(n)return hK({seasonId:e},!1);throw new Error(i)}}async function ifa({seasonId:e}){try{return(await Ud({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}async function ofa({seasonId:e}){try{return(await Ud({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}function sfa(e,n,i,B,z,c,m=!1){const a=i.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const f=c&&y[z.teamId]?y[z.teamId]!==c:!1,r=n===1?2:1;return(m||B.includes(y[z.gameId]))&&(!n||(f?r:n)===y[z.playingAs])&&(i.includes(y[z.matchResult])&&y[z.teamId]===c||a.includes(y[z.matchResult])&&y[z.teamId]!==c)})}function pK(e,n,i,B,z){return n.length===2&&i.length===3&&B.length===6?e:e.filter(c=>n.includes(c[z.playingAs])&&i.includes(c[z.matchResult])&&B.includes(c[z.section]))}async function fK({seasonId:e}){try{const n=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ud({url:n})).data}catch(n){return Promise.reject(n)}}async function lfa({seasonId:e,gameId:n}){try{const i=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${n}`,{data:B}=await Ud({url:i});return B}catch(i){return Promise.reject(i)}}async function cfa({gameId:e}){try{const n=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ud({url:n})).data.data}catch(n){return Promise.reject(n)}}async function ufa({gameId:e}){try{const n=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ud({url:n})).data.data||[]}catch(n){return Promise.reject(n)}}const dfa=["categoryId","matchLapse","section","matchResult","playingAs","total"];let rI=null;function mK(){return rI||(rI=Qg(dfa)),rI}async function hfa(e){try{const n=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ud({url:n})).data}catch(n){return Promise.reject(n)}}async function gK({seasonId:e,teamId:n}){try{return await Ud({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${n}`})}catch(i){return Promise.reject(i)}}async function pfa(e){try{const n=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ud({url:n})}catch(n){return Promise.reject(n)}}async function ffa(e){try{return await Ud({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(n){return Promise.reject(n)}}const mfa={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,n,i,B){return sfa(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],mK(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const n=e.currentSeasonGames.reduce((i,B)=>{const z={...B};return z.home_team=e.currentSeasonTeams.find(c=>c.team_id===B.home_team),z.visiting_team=e.currentSeasonTeams.find(c=>c.team_id===B.visiting_team),i[B.matchday_abbreviation]?i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(z):i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[z]:i[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[z]},i},{});for(let[i,B]of Object.entries(n))n[i]=Object.entries(B).map(([z,c])=>({date:z,games:c})),n[i].sort((z,c)=>z.date<c.date?-1:z.date>c.date?1:0);return n},matchdaysDates(e,n){let i=[];if(n.nextGamesSchedule){let B=Object.keys(n.nextGamesSchedule);for(let z of B){let c=Number(z.replace("M","")),m=n.nextGamesSchedule[z].map(a=>({matchday:c,date:new Date(a.date)}));i=i.concat(m)}}return i},closestMatchDay(e,n){let i=new Date,B=0,z=-new Date(0,0,0).valueOf(),c=n.matchdaysDates,m=c.length;for(let a=0;a<c.length;a++)B=Math.abs(c[a].date-i),B<z&&(m=a,z=B);return c[m]?c[m].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,n){e.booleanIsLiveGamesModalOpen=n},setBooleanAreLiveGames(e,n){e.booleanAreLiveGames=n},updateSeasonPlays(e,n){e.seasonPlays=n},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateSelectedRound(e,n){e.selectedRound=n}},actions:{async getSeasonPlays({commit:e,rootGetters:n},i=!1){try{const B=await hK({seasonId:n["filterGeneral/getSeasonId"]});if(i)return B;e("updateSeasonPlays",B)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:n}){try{const i=await fK({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",i)}catch(i){return Promise.reject(i)}},async getCurrentSeasonTeams({commit:e,rootGetters:n}){try{const i=await hfa({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",i.teams)}catch(i){return Promise.reject(i)}},async isDataFilled({state:e,dispatch:n,commit:i}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return i("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=n("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=n("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function gfa({filter:e}){try{const n=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:i}=await Ud({url:n});return i}catch(n){return Promise.reject(n)}}const yfa=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let iI=null;function vfa(){return iI||(iI=Qg(yfa)),iI}class L6{constructor(){Vc(this,"maximumLiveSection",1);Vc(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:[]});Vc(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(n){n>this.maximumLiveSection&&(this.maximumLiveSection=n)}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(n,i,B){B&&(this.setMaximumLiveSection(n),this.accomplished.totalLive+=i,this.accomplished.totalsLiveTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,i)),this.accomplished.totalPostGame+=i,this.accomplished.avgPostGameTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,n,i)}increaseReceivedByOne(n,i,B){B&&(this.setMaximumLiveSection(n),this.received.totalLive+=i,this.received.totalsLiveTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,i)),this.received.totalPostGame+=i,this.received.avgPostGameTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,n,i)}increaseTrendLiveAccumulatedByOne(n,i,B){for(let z=i-1;z<n.accumulated.length;z++)n.accumulated[z]+=B}decreaseAccomplishedLiveByOne(n,i){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=i),this.accomplished.totalsLiveTrendLive.sections[n-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[n-1]-=i,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,i))}decreaseReceivedLiveByOne(n,i){this.received.totalLive>0&&(this.received.totalLive-=i),this.received.totalsLiveTrendLive.sections[n-1]>0&&(this.received.totalsLiveTrendLive.sections[n-1]-=i,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,i))}decreaseTotalsLiveTrendLiveAccumulatedByOne(n,i,B){for(let z=n.accumulated.length-1;z>=i-1;z--)n.accumulated[z]-=B}calculateAvg(n){n&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/n,this.received.avgPostGame=this.received.totalPostGame/n,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,n),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,n),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,n),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,n))}getAvgPostGameTrendLiveAvg(n,i){return n.map(B=>B/i)}calculateRanking(n,i,B,z,c,m,a,y){let f=[];z===3&&n&&n.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?f=Array.from(n.reduce((v,_)=>{const p=_[i.playingAs]===1,l=p?"1":"2",o=v.get(_[i.gameId]);if(o)o[l]?o[l].arrayPlays.push(_):o[l]={numberTeamId:_[i.teamId],arrayPlays:[_]};else{const s={numberMatchResult:_[i.matchResult]};p&&(s[1]={numberTeamId:_[i.teamId],arrayPlays:[_]}),v.set(_[i.gameId],s)}return v},new Map).values()).reduce((v,_)=>{const p=B.playingAs.length===2?"both":B.playingAs[0].toString();return(p==="both"&&(_[1].numberTeamId===B.teamId||_[2].numberTeamId===B.teamId)||p!=="both"&&_[p].numberTeamId===B.teamId)&&B.matchResult.includes(_.numberMatchResult)&&v.push(..._[1].arrayPlays,..._[2].arrayPlays),v},[]).filter(v=>B.sections.includes(v[i.section])):(f=n?[...n]:[],a&&n&&(f=n.filter(r=>B.playingAs.includes(r[i.playingAs])&&B.matchResult.includes(r[i.matchResult])&&B.sections.includes(r[i.section])))),this.setTeamRanking(f,z,i,B.teamId,m,"accomplished",y)}setTeamRanking(n,i,B,z,c,m,a){let y=null,f=null;i===3&&(y=new Map,f={},n.forEach(_=>{const p=y.get(_[B.gameId]);p?p[_[B.teamId.toString()]]?p[_[B.teamId.toString()]]+=_[B.total]:p[_[B.teamId.toString()]]=_[B.total]:y.set(_[B.gameId],{[_[B.teamId.toString()]]:_[B.total]})}),Array.from(y.values()).forEach(_=>{const[p,l]=Object.keys(_).map(s=>s),o=_[p]+_[l];this.addPassesAvgByTeam(f,p,o?_[p]/o:0),this.addPassesAvgByTeam(f,l,o?_[l]/o:0)}));const r=c.sort((_,p)=>_.team_id-p.team_id).map(_=>{if(i===3){const p=f[_.team_id.toString()];return{teamId:_.team_id,points:p?p.numberTotalPassesAvg/p.numberGamesCount:0,total:p?p.numberTotalPassesAvg:0}}else{const p=n.reduce((l,o)=>o[B.teamId]===_.team_id&&i===o[B.categoryId]?l+o[B.total]:l,0);return{teamId:_.team_id,points:_[`${a}FilterGames`]?p/_[`${a}FilterGames`]:0,total:p}}}).sort((_,p)=>p.points-_.points);this.accomplished.arrayRankings=r;const v=r.findIndex(_=>_.teamId===z);i===3&&(this.accomplished.avgPreGame=r[v].points),this[m].ranking=v+1,this[m].leader=r[0]}addPassesAvgByTeam(n,i,B){n[i]?(n[i].numberGamesCount+=1,n[i].numberTotalPassesAvg+=B):n[i]={numberGamesCount:1,numberTotalPassesAvg:B}}}class Ds{constructor(n,i,B,z,c,m,a,y,f,r){Vc(this,"id","");Vc(this,"generalId",0);Vc(this,"name","");Vc(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Vc(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Vc(this,"accomplishedCategoryIds",[]);Vc(this,"receivedCategoryIds",[]);Vc(this,"generalCategoriesIds",{accomplished:0,received:0});Vc(this,"specialMention","");Vc(this,"homeTeam",new L6);Vc(this,"visitingTeam",new L6);Vc(this,"isLeagueDataCalculated",!1);Vc(this,"leagueAccomplishedMax",0);Vc(this,"leagueReceivedMax",0);Vc(this,"leagueAccomplishedAvg",0);Vc(this,"leagueReceivedAvg",0);Vc(this,"leagueAccomplishedAccumulator",0);Vc(this,"leagueReceivedAccumulator",0);Vc(this,"homeTeamType","homeTeam");Vc(this,"visitingTeamType","visitingTeam");Vc(this,"betOnly",!1);Vc(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=n||[],this.receivedCategoryIds=i||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=z,this.names["0-0"]=z||"",this.names["1-1"]=c||"",this.names["0-1"]=m||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=f||!1,this.isPercent=r||!1}addLeaguePlays(n,i,B){n.length===0||!B||this.isLeagueDataCalculated||(n.forEach(z=>{this.isAccomplishedLeaguePlay(z[i.categoryId])&&(this.leagueAccomplishedAccumulator+=z[i.total]),this.isReceivedLeaguePlay(z[i.categoryId])&&(this.leagueReceivedAccumulator+=z[i.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(n,i,B){let z="-";for(const[c,m]of Object.entries(this.generalCategoriesIds))n===m&&(z=`${c==="accomplished"?"0":"1"}${z}`),i===m&&(z=`${z}${c==="accomplished"?"0":"1"}`);z.length===3&&(this.mentions[z]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(n,i,B,z,c){!B||!c||n!==this.homeTeamType&&n!==this.visitingTeamType||(B.forEach(m=>{this.isAccomplishedPlay(m[z.categoryId])?this[n].increaseAccomplishedByOne(m[z.section],m[z.total]):this.isReceivedPlay(m[z.categoryId])&&this[n].increaseReceivedByOne(m[z.section],m[z.total])}),this[n].calculateAvg(c))}addLivePlay(n,i,B,z,c=!1,m=!1){(n===this.homeTeamType||n===this.visitingTeamType)&&B[z.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[n].increaseAccomplishedByOne(B[z.section],B[z.total],!0)}subtractLivePlay(n,i,B,z,c){(n===this.homeTeamType||n===this.visitingTeamType)&&(this.isAccomplishedPlay(B[z.categoryId])&&!c?this[n].decreaseAccomplishedLiveByOne(B[z.section],B[z.total]):this.isReceivedPlay(B[z.categoryId])&&c&&this[n].decreaseReceivedLiveByOne(B[z.section],B[z.total]))}isAccomplishedLeaguePlay(n){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>n===B||`${n}_r`===B)}isReceivedLeaguePlay(n){return!!this.receivedCategoryIds.find(i=>n===i)}isAccomplishedPlay(n){return this.generalCategoriesIds.accomplished===n}isReceivedPlay(n){return this.generalCategoriesIds.received===n}calcRankingLeague(n,i,B,z,c,m=!1){this[this.homeTeamType].calculateRanking(n,i,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,c,m,this.homeTeamType),this[this.visitingTeamType].calculateRanking(n,i,z,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,c,m,this.visitingTeamType)}resetData(){this.homeTeam=new L6,this.visitingTeam=new L6,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(n){return this.generalCategoriesIds.accomplished===n||this.generalCategoriesIds.received===n}}const _fa={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new Ds([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new Ds([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new Ds([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new Ds([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new Ds([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new Ds([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new Ds([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new Ds([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new Ds([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new Ds([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new Ds([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new Ds([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new Ds([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new Ds([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new Ds([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new Ds([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new Ds([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new Ds([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new Ds([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new Ds([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new Ds([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new Ds([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new Ds([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new Ds([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new Ds([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new Ds([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new Ds([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 Ds([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new Ds([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new Ds([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new Ds([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new Ds([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new Ds([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new Ds([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new Ds([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new Ds([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new Ds([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new Ds([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},bfa=[{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}],xfa=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let oI=null;function wfa(){return oI||(oI=Qg(xfa)),oI}const kfa=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let sI=null;function Cfa(){return sI||(sI=Qg(kfa)),sI}function F6(e,n,i){return[i.get(e[n.categoryId])||[],e[n.teamId],e[n.matchResult],e[n.playingAs],e[n.matchLapse],e[n.section],e[n.total]]}function yK(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 lI(e,n,i){let B=[...n];return e[i.categoryId]===2&&(B[0]=14),e[i.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}const Sfa=bB(),Tfa=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],Efa={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:mK(),indexesTSP:vfa(),indexesLS:wfa(),indexesTLP:Cfa(),nextGamesDataStructure:_fa,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:!1,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(n=>n.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 bfa.filter(n=>n.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return pK(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return pK(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(n=>n.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(n=>e.homeTeamFilter.playingAs.includes(n[0])).filter(n=>e.homeTeamFilter.matchResult.includes(n[1])).reduce((n,i)=>n+i[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(n=>e.visitingTeamFilter.playingAs.includes(n[0])).filter(n=>e.visitingTeamFilter.matchResult.includes(n[1])).reduce((n,i)=>n+i[2],0)},filledDataStructure(e,n){if(e.currentSeasonPlays)for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,n.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,n.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,n){return Object.values(n.filledDataStructure).sort((i,B)=>i.priority-B.priority)},statisticData(e,n){for(const i of Object.values(n.filledDataStructure))if(i.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&i.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return i.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,n){for(const[i,B]of Object.entries(n))e.gameForAnalysis[i]=B},setCurrentTournamentName(e,n){e.currentTournamentName=n},setBetSubcategoriesObjects(e,n){e.betSubcategoriesObjects=n},setRegularSeasonName(e,n){e.regularSeasonName=n},setBetSubcategories(e,n){e.betSubcategories=n},setBetDescription(e,n){e.betDescription=n},setSeasonId(e,n){e.seasonId=Number(n)},setHome(e,n){e.homeTeamInfo=n},setAway(e,n){e.awayTeamInfo=n},setMenuOptionActive(e,n){e.menuOptionActive=n},setPastSeasonId(e,n){e.pastSeasonId=n},setUsePastSeasonId(e,n){e.usePastSeasonId=n,n&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,n){e.showPostMatch=n},setHomeResultGame(e,n){e.homeResultGame=n},setAwayResultGame(e,n){e.awayResultGame=n},updateIsSocketConnected(e,n){e.isSocketConnected=n,n&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&Yoe(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n,e.currentSeasonTeams.forEach(i=>{i.playedGames=e.currentSeasonGames.reduce((B,z)=>{if(z.game_status===1&&(z.home_team===i.team_id||z.visiting_team===i.team_id)){const c=z.score[0]-z.score[1],m=z.home_team===i.team_id;B.push({playingAs:m?1:2,matchResult:c===0?3:m?c>0?1:2:c<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateGameId(e,n){e.gameId=n},updateGameForAnalysis(e,n){e.gameForAnalysis=n,e.isLive=!!n.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,n){e.selectedAnalysis=n},updateShowLiveData(e,n){e.showLiveData=n},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,n){e.idAssetSelected=n},updateStats(e,n){e.currentSeasonPlays=n},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:n,needsFormat:i=!1}){if(i){if(!n||!n.local||!n.local.statistics||!n.visit||!n.visit.statistics)return;e.homeTeamFilter=EB(e.homeTeamFilter,n.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=EB(e.visitingTeamFilter,n.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==n.local.statistics.block&&(e.selectedStatisticTypeBlock=n.local.statistics.block)}else e.homeTeamFilter={...n.homeTeamFilter,statistics:0},e.visitingTeamFilter={...n.visitingTeamFilter,statistics:0}},updateFinishedGames(e,n){e.totalSeasonFinishedGames=n},updateHomeTeamPlays(e,n){e.homeTeamPlays=n},updateVisitingTeamPlays(e,n){e.visitingTeamPlays=n},addSpecialMentions(e,n){const i=Object.values(e.nextGamesDataStructure);i.forEach(B=>{for(const z of Object.values(B.subcategories))z.resetMentions()}),i.forEach(B=>{for(const z of n)for(const c of Object.values(B.subcategories))c.addSpecialMention(z[0],z[1],z[2])})},setDefaultFilter(e,n){e.defaultFilter={homeTeamFilter:{...n.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...n.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,n){if(!e.livePlays.has(n[e.indexesTLP.playId])){e.livePlays.set(n[e.indexesTLP.playId],n);const B=F6(n,e.indexesTLP,e.categoriesMap);for(const z of Object.values(e.nextGamesDataStructure))for(const c of Object.values(z.subcategories))c.addLivePlay(e.gameForAnalysis.home_team===B[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",B[e.indexesTSP.teamId],B,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,n){const i=!!n[e.indexesTLP.length],B=e.livePlays.get(n[e.indexesTLP.playId]);if(Use(B,n))return;let z="";const c=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(z=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const m=F6(B,e.indexesTLP,e.categoriesMap),a=lI(B,m,e.indexesTLP),y=F6(n,e.indexesTLP,e.categoriesMap),f=lI(n,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const v of Object.values(r.subcategories))B&&(v.subtractLivePlay(z,m[e.indexesTSP.teamId],m,e.indexesTSP,i),a&&v.subtractLivePlay(z,a[e.indexesTSP.teamId],a,e.indexesTSP,i)),v.addLivePlay(c,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,i),f&&v.addLivePlay(c,f[e.indexesTSP.teamId],f,e.indexesTSP,e.isLive,i);e.livePlays.set(n[e.indexesTLP.playId],n)},deleteLiveGamePlay(e,n){const i=!!n[e.indexesTLP.length],B=e.livePlays.get(n[e.indexesTLP.playId]);let z="";if(B){z=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(B[e.indexesTLP.playId]);const c=F6(B,e.indexesTLP,e.categoriesMap),m=lI(n,c,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(z,c[e.indexesTSP.teamId],c,e.indexesTSP,i),m&&y.subtractLivePlay(z,m[e.indexesTSP.teamId],m,e.indexesTSP,i)}},clearLiveTotals(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.homeTeam.resetTotalsLive(),i.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,n){e.statistics=n},updateOldSeasonId(e,n){e.oldSeasonId=n},addRankingInSubcategories(e,{getters:n,isPremiumAccount:i}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(c=>{c.homeTeamFilterGames=c.playedGames.filter(m=>e.homeTeamFilter.playingAs.includes(m.playingAs)&&e.homeTeamFilter.matchResult.includes(m.matchResult)).length,c.visitingTeamFilterGames=c.playedGames.filter(m=>e.visitingTeamFilter.playingAs.includes(m.playingAs)&&e.visitingTeamFilter.matchResult.includes(m.matchResult)).length});const B=[],z=new Map;for(const c of Object.values(e.nextGamesDataStructure))for(const m of Object.values(c.subcategories))B.push(m);n.rankingData.forEach(c=>{for(const m of B)if(m.isInGeneralCategory(c[e.indexesLS.categoryId])){z.has(m.id)?z.get(m.id).push(c):z.set(m.id,[c]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,n){e.homeGames=yK(n)},setVisitingGames(e,n){e.visitingGames=yK(n)},generateCategoriesMap(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.accomplishedCategoryIds.forEach(B=>{const z=e.categoriesMap.get(B);z?z.push(i.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[i.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:n},{command:i}){i==="on"?n("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):n("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},n){try{const m=await ffa({gameId:n.gameId});if(m){var i=[],B=[],z={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},c={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(m.data).length!==0&&(i=m.data.data.filter(a=>a[1]==n.homeTeam),B=m.data.data.filter(a=>a[1]==n.awayTeam),z=m.data.games,c=m.data.games),e("updateHomeTeamPlays",i),e("updateVisitingTeamPlays",B),e("setHomeGames",z),e("setVisitingGames",c)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(m){return Promise.reject(m)}},async fillStatisticDataPostMatch({commit:e,dispatch:n},i){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",i.gameInfo),B.push(n("setAndGetStatsPostMatch",{gameId:i.game,homeTeam:i.homeTeam,awayTeam:i.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:n,commit:i},{gameId:B,isTeamsAnalysis:z,currentSeasonId:c,isLoginChanged:m=!1,defaultFilter:a=null,gameInfo:y=null,isCupGame:f=!1}){try{let r={},v=e.seasonId!==Number(c);const _=[];i("setIsSectionLoading",!0,{root:!0}),i("setUsePastSeasonId",!1),v&&i("setSeasonId",c),i("updateGameId",Number(B)),e.oldSeasonId!==e.seasonId&&i("resetNextGamesDataStructure");const p=await n("getCurrentSeasonGames",Number(B));if(i("leagueGeneral/updateCurrentSeasonGames",p,{root:!0}),r=p.find(l=>l.game_id===Number(B)),!r&&y&&(r=y),r&&i("updateGameForAnalysis",r),r.game_status!==1&&((m||e.categoriesMap.size===0)&&i("generateCategoriesMap"),f||await n("checkTeamsData",{gameId:B,isFromBet:!!a}),(m||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&_.push(n("getSeasonStatistics"))),e.usePastSeasonId){const l=await n("getCurrentSeasonGamesLast");i("leagueGeneral/updateCurrentSeasonGames",l,{root:!0})}(m||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(l=>r.home_team===l.team_id))&&_.push(n("getCurrentSeasonTeams")),i("setHomeResultGame",r.score[0]),i("setAwayResultGame",r.score[1]),z?r.game_status!==1?(await n("fillStatisticData",{gameId:B,gameinfo:r,promises:_,defaultFilter:a}),i("updateShowPostMatchData",!1)):(i("updateStats",[]),i("updateShowPostMatchData",!0),_.push(n("fillStatisticDataPostMatch",{game:B,homeTeam:r.home_team,awayTeam:r.visiting_team,gameInfo:r})),await Promise.all(_)):i("setIsSectionLoading",!1,{root:!0})}catch(r){return Promise.reject(r)}},async fillStatisticData({commit:e,dispatch:n,getters:i,rootGetters:B,state:z},{gameId:c,gameinfo:m,promises:a=[],defaultFilter:y=null}){let f=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",m),(m.is_live||m.game_status===0)&&a.push(n("getCurrentLiveGamePlays",c)),a.push(n("getSpecialMentionsByGame",c)),a.push(n("getHomeTeamPlays")),a.push(n("getVisitingTeamPlays")),a.push(n("getCurrentSeasonPlays")),y&&a.push(gfa(y)),f=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:i,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=f.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:z.defaultFilter,needsFormat:!1}),n("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:n,rootState:i,commit:B},{gameId:z,isFromBet:c}){try{B("setUsePastSeasonId",!1)}catch(m){throw new Error(m)}},async getSpecialMentionsByGame({commit:e},n){try{const i=await ufa({gameId:n});e("addSpecialMentions",i)}catch(i){return Promise.reject(i)}},async getCurrentSeasonGames({commit:e,state:n},i){try{const{teams:B,games:z,past_season_id:c,tournament_id:m}=await lfa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,gameId:i}),a=Tfa.find(y=>y.id===m);return a&&e("setCurrentTournamentName",a.name),e("setHome",B[0]),e("setAway",B[1]),n.usePastSeasonId||e("setPastSeasonId",c),await e("updateCurrentSeasonGames",z),z&&Array.isArray(z)&&e("updateFinishedGames",z.reduce((y,f)=>(f.game_status===1&&(y+=1),y),0)),z}catch(B){return Promise.reject(B)}},async getCurrentSeasonGamesLast({commit:e,state:n}){try{const{games:i,past_season_id:B}=await fK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});return n.usePastSeasonId||e("setPastSeasonId",B),await e("updateCurrentSeasonGames",i),i&&Array.isArray(i)&&e("updateFinishedGames",i.reduce((z,c)=>(c.game_status===1&&(z+=1),z),0)),i}catch(i){return Promise.reject(i)}},async getCurrentSeasonTeams({commit:e,state:n}){try{const i=await pfa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateCurrentSeasonTeams",i.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:n}){try{const i=n.usePastSeasonId?n.pastSeasonId:n.seasonId,B=await ofa({seasonId:i});e("updateSeasonStatistics",B),e("updateOldSeasonId",i)}catch(i){return Promise.reject(i)}},updateRankingInSubcategories({state:e,commit:n,getters:i,rootGetters:B}){e.currentSeasonGames.length>0&&n("addRankingInSubcategories",{getters:i,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:n}){try{const i=await gK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.home_team});i.data&&(e("updateHomeTeamPlays",i.data.data),e("setHomeGames",i.data.games))}catch(i){return Promise.reject(i)}},async getVisitingTeamPlays({commit:e,state:n}){try{const i=await gK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.visiting_team});i.data&&(e("updateVisitingTeamPlays",i.data.data),e("setVisitingGames",i.data.games))}catch(i){return Promise.reject(i)}},async getCurrentSeasonPlays({commit:e,state:n}){try{const i=await ifa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateStats",i)}catch(i){return Promise.reject(new Error(i))}},async getCurrentLiveGamePlays({state:e,commit:n},i){try{const B=await cfa({gameId:i});e.livePlays=new Map,B.forEach(z=>{e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&n("addLiveGamePlay",z)})}catch(B){throw new Error(B)}},socket_new({state:e,commit:n},i){const B=i[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&n("addLiveGamePlay",B)},socket_update({state:e,commit:n},i){const B=i[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&n("updateLiveGamePlay",B)},socket_delete({state:e,commit:n},i){const B=i[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&n("deleteLiveGamePlay",B)},exitChannel({state:e,getters:n,rootState:i,rootGetters:B,commit:z}){const c=B["loginGeneral/getPremiumAccount"];n.isLive&&c&&(z("updateShowLiveData",!1),z("clearLiveTotals"),e.livePlays.clear(),Sfa.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(i=>{for(const B of Object.values(i.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(i=>{for(const B of Object.values(i.subcategories))B.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 Afa(){try{const{data:e}=await Ud({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const Mfa={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,n){e.booleanIsStatisticModalOpen=n},setTournamentType(e,n){e.tournamentType=n},setSectionRef(e,n){e.sectionRef=n},setSectionAnalytics(e,n){e.sectionAnalytics=n},setSeccionBetsGolTipster(e,n){e.seccionBetsGolTipster=n},setPreviewSectionAnalytics(e,n){e.previewSectionAnalytics=n},setVideoSrc(e,n){e.videoSrc=n},setVideoModalVisibility(e,n){e.isVideoModalVisible=n},setSelectedTournament(e,n){e.selectedTournament=n},setTournaments(e,n){e.tournaments=n.map(i=>({...i.tournament,seasons:i.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,n){e.tournamentSelected=n}},actions:{async fetchTournaments({state:e,commit:n}){try{if(e.tournaments.length===0){const i=await Afa();n("setTournaments",i)}}catch(i){throw new Error(i)}}}}};async function Ifa({seasonId:e,localTeamId:n,visitingTeamId:i}){try{const B=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${n}/${i}`;return(await Ud({url:B})).data}catch(B){return Promise.reject(B)}}async function Pfa({seasonId:e,localTeamId:n,visitingTeamId:i}){try{const B=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${n}/${i}`;return(await Ud({url:B})).data}catch(B){return Promise.reject(B)}}const vK=(e,n)=>{let i={};return e.forEach((B,z)=>{z==3&&(n[0]==35||n[0]==54)&&(n[z]==2?n[z]=1:n[z]=2),z==2&&(n[0]==35||n[0]==54)&&(n[z]==1?n[z]=2:n[z]==2&&(n[z]=1)),i[B]=n[z]}),i},_K=(e,n)=>e.filter(B=>{const z=n.playingAs.includes(B.playing_as),c=n.matchResult.includes(B.match_result),m=n.sections.includes(B.section);return z&&c&&m}),bK=[{name:"Goles",color:"#4A90E2",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#FF8000",points:[1,2,3],categories:[12,55,35,54,510]}];(function(){function e(n,i,B){return typeof B>"u"||+B==0?Math[n](i):(i=+i,B=+B,isNaN(i)||!(typeof B=="number"&&B%1===0)?NaN:(i=i.toString().split("e"),i=Math[n](+(i[0]+"e"+(i[1]?+i[1]-B:-B))),i=i.toString().split("e"),+(i[0]+"e"+(i[1]?+i[1]+B:B))))}Math.ceil10||(Math.ceil10=function(n,i){return e("ceil",n,i)})})();function xK(e,n){let i=n*-1;return Math.ceil10(e,i)}const Bfa={...Mfa,...mfa,...Efa,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,n,i)=>{const B=e.xGLocalPlays,z="homeTeamFilter",c=i.nextGeneral[z];return _K(B,c)||[]},playsAway:(e,n,i)=>{const B=e.xGVisitingPlays,z="visitingTeamFilter",c=i.nextGeneral[z];return _K(B,c)},goalsQtyLocal:(e,n)=>{const i=bK.find(B=>B.name==="Goles");return n.playsLocal.filter(B=>i.categories.includes(B.category_id)).length},goalsQtyAway:(e,n)=>{const i=bK.find(B=>B.name==="Goles");return n.playsAway.filter(B=>i.categories.includes(B.category_id)).length},shotsOnGoalQtyLocal:(e,n)=>n.playsLocal.filter(i=>i.category_id===510).length,shotsOnGoalQtyAway:(e,n)=>n.playsAway.filter(i=>i.category_id===510).length,xGLocal:(e,n)=>{const i=new Set;let B=n.playsLocal.reduce((z,c)=>(i.has(c.moment_of_play)||(i.add(c.moment_of_play),z+=c.xG2),z),0);return xK(B,2)},xGAway:(e,n)=>{const i=new Set;let B=n.playsAway.reduce((z,c)=>(i.has(c.moment_of_play)||(i.add(c.moment_of_play),z+=c.xG2),z),0);return xK(B,2)}},mutations:{setTeamSelected(e,n){e.teamSelected=n},setPlays(e,n){e.xGLocalPlays=n.local_team.map(i=>vK(n.data_headers,i)),e.xGVisitingPlays=n.visiting_team.map(i=>vK(n.data_headers,i))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:n,localTeamId:i,visitingTeamId:B,postMatch:z=!1}){try{let c={};z?c=await Pfa({seasonId:n,localTeamId:i,visitingTeamId:B}):c=await Ifa({seasonId:n,localTeamId:i,visitingTeamId:B}),e("setPlays",c)}catch(c){return Promise.reject(c)}}}}}};function Nfa(e){for(const[n,i]of Object.entries(Bfa))e.hasModule(n)||e.registerModule(n,i)}const Ofa={class:"subcategory-group"},Dfa={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",Ofa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Ns),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":z=>B.isSelected=z,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Lfa=_l(Dfa,[["__scopeId","data-v-85bc2114"]]),Ffa={class:"filter-subcategories"},zfa=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",Ffa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(Lfa,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),z6=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),Rfa={class:"details__header"},Vfa=z6(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),$fa={class:"details__header__checkbox"},jfa={class:"details__body"},Ufa={class:"details__body__playing-as"},Gfa=["onClick"],Hfa={class:"details__header"},Wfa=z6(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),qfa={class:"details__header__checkbox"},Yfa={class:"details__body"},Xfa=z6(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Zfa={class:"details__body__game-section"},Jfa=["onClick"],Kfa={class:"details__body"},Qfa=z6(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ema={class:"details__body__game-section"},tma=["onClick"],ama=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__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 n=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const i=t.computed(()=>n.playingAs.every(r=>r.isSelected)),B=t.computed(()=>n.gameSections.every(r=>r.isSelected)),z=t.computed(()=>n.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),c=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function m(r){r?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(r){n.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){n.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function f(r){r?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(c.value)},[t.createElementVNode("div",Rfa,[Vfa,t.createElementVNode("div",$fa,[t.createVNode(t.unref(Ns),{label:"Todos","model-value":i.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",jfa,[t.createElementVNode("div",Ufa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>a(_)},t.toDisplayString(_.name),11,Gfa))),128))])]),t.createElementVNode("div",Hfa,[Wfa,t.createElementVNode("div",qfa,[t.createVNode(t.unref(Ns),{label:"Todos","model-value":B.value,"onUpdate:modelValue":f},null,8,["model-value"])])]),t.createElementVNode("div",Yfa,[Xfa,t.createElementVNode("div",Zfa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.firstHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,Jfa))),128))])]),t.createElementVNode("div",Kfa,[Qfa,t.createElementVNode("div",ema,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.secondHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,tma))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),nma={class:"filter-field"},rma=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(B,z)=>z+1));function i(){}return(B,z)=>(t.openBlock(),t.createElementBlock("div",nma,[t.createVNode(t.unref(NW),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":i},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"})),ima={class:"subcategory-group"},oma={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",ima,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Os),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":z=>B.isSelected=z,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},sma=bl(oma,[["__scopeId","data-v-85bc2114"]]),lma={class:"filter-subcategories"},cma=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",lma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(sma,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),R6=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),uma={class:"details__header"},dma=R6(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),hma={class:"details__header__checkbox"},pma={class:"details__body"},fma={class:"details__body__playing-as"},mma=["onClick"],gma={class:"details__header"},yma=R6(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),vma={class:"details__header__checkbox"},_ma={class:"details__body"},bma=R6(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),xma={class:"details__body__game-section"},wma=["onClick"],kma={class:"details__body"},Cma=R6(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Sma={class:"details__body__game-section"},Tma=["onClick"],Ema=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__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 n=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const i=t.computed(()=>n.playingAs.every(r=>r.isSelected)),B=t.computed(()=>n.gameSections.every(r=>r.isSelected)),z=t.computed(()=>n.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),c=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function m(r){r?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(r){n.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){n.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function f(r){r?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(c.value)},[t.createElementVNode("div",uma,[dma,t.createElementVNode("div",hma,[t.createVNode(t.unref(Os),{label:"Todos","model-value":i.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",pma,[t.createElementVNode("div",fma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>a(_)},t.toDisplayString(_.name),11,mma))),128))])]),t.createElementVNode("div",gma,[yma,t.createElementVNode("div",vma,[t.createVNode(t.unref(Os),{label:"Todos","model-value":B.value,"onUpdate:modelValue":f},null,8,["model-value"])])]),t.createElementVNode("div",_ma,[bma,t.createElementVNode("div",xma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.firstHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,wma))),128))])]),t.createElementVNode("div",kma,[Cma,t.createElementVNode("div",Sma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.secondHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,Tma))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),Ama={class:"filter-field"},Mma=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(B,z)=>z+1));function i(){}return(B,z)=>(t.openBlock(),t.createElementBlock("div",Ama,[t.createVNode(t.unref(PX),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":i},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));yd.GSCGameData=rfa,yd.connectSocket=xB,yd.disconnectSocket=wB,yd.getSocket=bB,yd.registerStoreModules=Nfa,Object.defineProperty(yd,Symbol.toStringTag,{value:"Module"})});
|
|
7626
|
+
*/var oha="store";function U1(e,n){Object.keys(e).forEach(function(i){return n(e[i],i)})}function XJ(e){return e!==null&&typeof e=="object"}function sha(e){return e&&typeof e.then=="function"}function xf(e,n){if(!e)throw new Error("[vuex] "+n)}function lha(e,n){return function(){return e(n)}}function ZJ(e,n,i){return n.indexOf(e)<0&&(i&&i.prepend?n.unshift(e):n.push(e)),function(){var B=n.indexOf(e);B>-1&&n.splice(B,1)}}function JJ(e,n){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;N6(e,i,[],e._modules.root,!0),KM(e,i,n)}function KM(e,n,i){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var z=e._wrappedGetters,c={};U1(z,function(m,a){c[a]=lha(m,e),Object.defineProperty(e.getters,a,{get:function(){return c[a]()},enumerable:!0})}),e._state=t.reactive({data:n}),e.strict&&pha(e),B&&i&&e._withCommit(function(){B.data=null})}function N6(e,n,i,B,z){var c=!i.length,m=e._modules.getNamespace(i);if(B.namespaced&&(e._modulesNamespaceMap[m]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+m+" for the namespaced module "+i.join("/")),e._modulesNamespaceMap[m]=B),!c&&!z){var a=QM(n,i.slice(0,-1)),y=i[i.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+i.join(".")+'"'),a[y]=B.state})}var f=B.context=cha(e,m,i);B.forEachMutation(function(r,v){var _=m+v;uha(e,_,r,f)}),B.forEachAction(function(r,v){var _=r.root?v:m+v,p=r.handler||r;dha(e,_,p,f)}),B.forEachGetter(function(r,v){var _=m+v;hha(e,_,r,f)}),B.forEachChild(function(r,v){N6(e,n,i.concat(v),r,z)})}function cha(e,n,i){var B=n==="",z={dispatch:B?e.dispatch:function(c,m,a){var y=O6(c,m,a),f=y.payload,r=y.options,v=y.type;if((!r||!r.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+v);return}return e.dispatch(v,f)},commit:B?e.commit:function(c,m,a){var y=O6(c,m,a),f=y.payload,r=y.options,v=y.type;if((!r||!r.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+v);return}e.commit(v,f,r)}};return Object.defineProperties(z,{getters:{get:B?function(){return e.getters}:function(){return KJ(e,n)}},state:{get:function(){return QM(e.state,i)}}}),z}function KJ(e,n){if(!e._makeLocalGettersCache[n]){var i={},B=n.length;Object.keys(e.getters).forEach(function(z){if(z.slice(0,B)===n){var c=z.slice(B);Object.defineProperty(i,c,{get:function(){return e.getters[z]},enumerable:!0})}}),e._makeLocalGettersCache[n]=i}return e._makeLocalGettersCache[n]}function uha(e,n,i,B){var z=e._mutations[n]||(e._mutations[n]=[]);z.push(function(c){i.call(e,B.state,c)})}function dha(e,n,i,B){var z=e._actions[n]||(e._actions[n]=[]);z.push(function(c){var m=i.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},c);return sha(m)||(m=Promise.resolve(m)),e._devtoolHook?m.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):m})}function hha(e,n,i,B){if(e._wrappedGetters[n]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+n);return}e._wrappedGetters[n]=function(z){return i(B.state,B.getters,z.state,z.getters)}}function pha(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&xf(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function QM(e,n){return n.reduce(function(i,B){return i[B]},e)}function O6(e,n,i){return XJ(e)&&e.type&&(i=n,n=e,e=e.type),process.env.NODE_ENV!=="production"&&xf(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:n,options:i}}var fha="vuex bindings",QJ="vuex:mutations",eI="vuex:actions",mv="vuex",mha=0;function gha(e,n){iha({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:[fha]},function(i){i.addTimelineLayer({id:QJ,label:"Vuex Mutations",color:eK}),i.addTimelineLayer({id:eI,label:"Vuex Actions",color:eK}),i.addInspector({id:mv,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===mv)if(B.filter){var z=[];rK(z,n._modules.root,B.filter,""),B.rootNodes=z}else B.rootNodes=[nK(n._modules.root,"")]}),i.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===mv){var z=B.nodeId;KJ(n,z),B.state=_ha(xha(n._modules,z),z==="root"?n.getters:n._makeLocalGettersCache,z)}}),i.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===mv){var z=B.nodeId,c=B.path;z!=="root"&&(c=z.split("/").filter(Boolean).concat(c)),n._withCommit(function(){B.set(n._state.data,c,B.state.value)})}}),n.subscribe(function(B,z){var c={};B.payload&&(c.payload=B.payload),c.state=z,i.notifyComponentUpdate(),i.sendInspectorTree(mv),i.sendInspectorState(mv),i.addTimelineEvent({layerId:QJ,event:{time:Date.now(),title:B.type,data:c}})}),n.subscribeAction({before:function(B,z){var c={};B.payload&&(c.payload=B.payload),B._id=mha++,B._time=Date.now(),c.state=z,i.addTimelineEvent({layerId:eI,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:c}})},after:function(B,z){var c={},m=Date.now()-B._time;c.duration={_custom:{type:"duration",display:m+"ms",tooltip:"Action duration",value:m}},B.payload&&(c.payload=B.payload),c.state=z,i.addTimelineEvent({layerId:eI,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:c}})}})})}var eK=8702998,yha=6710886,vha=16777215,tK={label:"namespaced",textColor:vha,backgroundColor:yha};function aK(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function nK(e,n){return{id:n||"root",label:aK(n),tags:e.namespaced?[tK]:[],children:Object.keys(e._children).map(function(i){return nK(e._children[i],n+i+"/")})}}function rK(e,n,i,B){B.includes(i)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:n.namespaced?[tK]:[]}),Object.keys(n._children).forEach(function(z){rK(e,n._children[z],i,B+z+"/")})}function _ha(e,n,i){n=i==="root"?n:n[i];var B=Object.keys(n),z={state:Object.keys(e.state).map(function(m){return{key:m,editable:!0,value:e.state[m]}})};if(B.length){var c=bha(n);z.getters=Object.keys(c).map(function(m){return{key:m.endsWith("/")?aK(m):m,editable:!1,value:tI(function(){return c[m]})}})}return z}function bha(e){var n={};return Object.keys(e).forEach(function(i){var B=i.split("/");if(B.length>1){var z=n,c=B.pop();B.forEach(function(m){z[m]||(z[m]={_custom:{value:{},display:m,tooltip:"Module",abstract:!0}}),z=z[m]._custom.value}),z[c]=tI(function(){return e[i]})}else n[i]=tI(function(){return e[i]})}),n}function xha(e,n){var i=n.split("/").filter(function(B){return B});return i.reduce(function(B,z,c){var m=B[z];if(!m)throw new Error('Missing module "'+z+'" for path "'+n+'".');return c===i.length-1?m:m._children},n==="root"?e:e.root._children)}function tI(e){try{return e()}catch(n){return n}}var wf=function(e,n){this.runtime=n,this._children=Object.create(null),this._rawModule=e;var i=e.state;this.state=(typeof i=="function"?i():i)||{}},iK={namespaced:{configurable:!0}};iK.namespaced.get=function(){return!!this._rawModule.namespaced},wf.prototype.addChild=function(e,n){this._children[e]=n},wf.prototype.removeChild=function(e){delete this._children[e]},wf.prototype.getChild=function(e){return this._children[e]},wf.prototype.hasChild=function(e){return e in this._children},wf.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)},wf.prototype.forEachChild=function(e){U1(this._children,e)},wf.prototype.forEachGetter=function(e){this._rawModule.getters&&U1(this._rawModule.getters,e)},wf.prototype.forEachAction=function(e){this._rawModule.actions&&U1(this._rawModule.actions,e)},wf.prototype.forEachMutation=function(e){this._rawModule.mutations&&U1(this._rawModule.mutations,e)},Object.defineProperties(wf.prototype,iK);var G1=function(e){this.register([],e,!1)};G1.prototype.get=function(e){return e.reduce(function(n,i){return n.getChild(i)},this.root)},G1.prototype.getNamespace=function(e){var n=this.root;return e.reduce(function(i,B){return n=n.getChild(B),i+(n.namespaced?B+"/":"")},"")},G1.prototype.update=function(e){oK([],this.root,e)},G1.prototype.register=function(e,n,i){var B=this;i===void 0&&(i=!0),process.env.NODE_ENV!=="production"&&cK(e,n);var z=new wf(n,i);if(e.length===0)this.root=z;else{var c=this.get(e.slice(0,-1));c.addChild(e[e.length-1],z)}n.modules&&U1(n.modules,function(m,a){B.register(e.concat(a),m,i)})},G1.prototype.unregister=function(e){var n=this.get(e.slice(0,-1)),i=e[e.length-1],B=n.getChild(i);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+i+"', which is not registered");return}B.runtime&&n.removeChild(i)},G1.prototype.isRegistered=function(e){var n=this.get(e.slice(0,-1)),i=e[e.length-1];return n?n.hasChild(i):!1};function oK(e,n,i){if(process.env.NODE_ENV!=="production"&&cK(e,i),n.update(i),i.modules)for(var B in i.modules){if(!n.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}oK(e.concat(B),n.getChild(B),i.modules[B])}}var sK={assert:function(e){return typeof e=="function"},expected:"function"},wha={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},lK={getters:sK,mutations:sK,actions:wha};function cK(e,n){Object.keys(lK).forEach(function(i){if(n[i]){var B=lK[i];U1(n[i],function(z,c){xf(B.assert(z),kha(e,i,c,z,B.expected))})}})}function kha(e,n,i,B,z){var c=n+" should be "+z+' but "'+n+"."+i+'"';return e.length>0&&(c+=' in module "'+e.join(".")+'"'),c+=" is "+JSON.stringify(B)+".",c}var Lh=function e(n){var i=this;n===void 0&&(n={}),process.env.NODE_ENV!=="production"&&(xf(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),xf(this instanceof e,"store must be called with the new operator."));var B=n.plugins;B===void 0&&(B=[]);var z=n.strict;z===void 0&&(z=!1);var c=n.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new G1(n),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=c;var m=this,a=this,y=a.dispatch,f=a.commit;this.dispatch=function(v,_){return y.call(m,v,_)},this.commit=function(v,_,p){return f.call(m,v,_,p)},this.strict=z;var r=this._modules.root.state;N6(this,r,[],this._modules.root),KM(this,r),B.forEach(function(v){return v(i)})},aI={state:{configurable:!0}};Lh.prototype.install=function(e,n){e.provide(n||oha,this),e.config.globalProperties.$store=this;var i=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;i&&gha(e,this)},aI.state.get=function(){return this._state.data},aI.state.set=function(e){process.env.NODE_ENV!=="production"&&xf(!1,"use store.replaceState() to explicit replace store state.")},Lh.prototype.commit=function(e,n,i){var B=this,z=O6(e,n,i),c=z.type,m=z.payload,a=z.options,y={type:c,payload:m},f=this._mutations[c];if(!f){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+c);return}this._withCommit(function(){f.forEach(function(r){r(m)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+c+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Lh.prototype.dispatch=function(e,n){var i=this,B=O6(e,n),z=B.type,c=B.payload,m={type:z,payload:c},a=this._actions[z];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+z);return}try{this._actionSubscribers.slice().filter(function(f){return f.before}).forEach(function(f){return f.before(m,i.state)})}catch(f){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(f))}var y=a.length>1?Promise.all(a.map(function(f){return f(c)})):a[0](c);return new Promise(function(f,r){y.then(function(v){try{i._actionSubscribers.filter(function(_){return _.after}).forEach(function(_){return _.after(m,i.state)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(_))}f(v)},function(v){try{i._actionSubscribers.filter(function(_){return _.error}).forEach(function(_){return _.error(m,i.state,v)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(_))}r(v)})})},Lh.prototype.subscribe=function(e,n){return ZJ(e,this._subscribers,n)},Lh.prototype.subscribeAction=function(e,n){var i=typeof e=="function"?{before:e}:e;return ZJ(i,this._actionSubscribers,n)},Lh.prototype.watch=function(e,n,i){var B=this;return process.env.NODE_ENV!=="production"&&xf(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},n,Object.assign({},i))},Lh.prototype.replaceState=function(e){var n=this;this._withCommit(function(){n._state.data=e})},Lh.prototype.registerModule=function(e,n,i){i===void 0&&(i={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(xf(Array.isArray(e),"module path must be a string or an Array."),xf(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,n),N6(this,this.state,e,this._modules.get(e),i.preserveState),KM(this,this.state)},Lh.prototype.unregisterModule=function(e){var n=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xf(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var i=QM(n.state,e.slice(0,-1));delete i[e[e.length-1]]}),JJ(this)},Lh.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xf(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),JJ(this,!0)},Lh.prototype._withCommit=function(e){var n=this._committing;this._committing=!0,e(),this._committing=n},Object.defineProperties(Lh.prototype,aI);var Cha=Tha(function(e,n){var i={};return process.env.NODE_ENV!=="production"&&!uK(n)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),Sha(n).forEach(function(B){var z=B.key,c=B.val;i[z]=function(){for(var m=[],a=arguments.length;a--;)m[a]=arguments[a];var y=this.$store.commit;if(e){var f=Eha(this.$store,"mapMutations",e);if(!f)return;y=f.context.commit}return typeof c=="function"?c.apply(this,[y].concat(m)):y.apply(this.$store,[c].concat(m))}}),i});function Sha(e){return uK(e)?Array.isArray(e)?e.map(function(n){return{key:n,val:n}}):Object.keys(e).map(function(n){return{key:n,val:e[n]}}):[]}function uK(e){return Array.isArray(e)||XJ(e)}function Tha(e){return function(n,i){return typeof n!="string"?(i=n,n=""):n.charAt(n.length-1)!=="/"&&(n+="/"),e(n,i)}}function Eha(e,n,i){var B=e._modulesNamespaceMap[i];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+n+"(): "+i),B}const Aha="/icn-play.svg",Mha="/icn-tiros-de-esquina.svg",Iha="/icn-tiro-a-porteria.svg",Pha="/icn-cambio.svg",Bha="/icn-falta.svg",Nha="/atajada.svg",Oha="/fuera-de-lugar.svg",nI="/gol.svg",Dha="/var.png",Lha="/tiempo-agregado.svg",Fha="/jugada-peligrosa.svg",zha="/penal-marcado.svg",Rha="/penal-fallado.svg",Vha="/inicia-el-partido.svg",$ha="/fin-del-partido.svg",jha="/icn-tarjeta-amarilla.svg",Uha="/icn-tarjeta-roja.svg",Gha=[1,2,3,4,6],Hha={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=[],n=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return ZM.GOAL_IDS.includes(n)?(e.push("is-main-event"),e.push("goal")):ZM.YELLOW_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("yellow-card")):ZM.RED_CARD_IDS.includes(n)?(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(n=>Jda(n))),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||Gha.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...Cha("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,n]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(n),teamId:this.gameEvent.team_id})}}},Wha=e=>(t.pushScopeId("data-v-9943063a"),e=e(),t.popScopeId(),e),qha={class:"time-line-event__details"},Yha={width:"127",preload:"metadata",style:{"border-radius":"8px"}},Xha=["src"],Zha=Wha(()=>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)),Jha={class:"time-line-event__details__info"},Kha={key:0,class:"time-line-event__details__info__header__players"},Qha={class:"time-line-event__details__info__header__players__div-img"},epa=["src"],tpa={class:"time-line-event__details__info__body"},apa={class:"time-line-event__details__info__body__comment"},npa={class:"time-line-event__minute__container"},rpa={class:"time-line-event__minute__container__text"},ipa={class:"time-line-event__minute__container__icon-container"},opa={class:"time-line-event__minute__container__icon-container__icon"},spa={key:0,src:Mha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lpa={key:1,src:Iha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},cpa={key:2,src:Pha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},upa={key:3,src:Bha,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},dpa={key:4,src:Nha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},hpa={key:5,src:Oha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ppa={key:6,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fpa={key:7,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},mpa={key:8,src:nI,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},gpa={key:9,src:Dha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ypa={key:10,src:Lha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vpa={key:11,src:Fha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_pa={key:12,src:zha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bpa={key:13,src:Rha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xpa={key:14,src:Vha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},wpa={key:15,src:$ha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kpa={key:16,src:jha,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Cpa={key:17,src:Uha,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Spa={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 Tpa(e,n,i,B,z,c){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",c.teamTypeClasses]),style:t.normalizeStyle({width:`${i.width}px`}),key:z.gameEventKey},[t.createElementVNode("div",qha,[i.canPlayVideos&&i.gameEvent.video_link!=="-"&&i.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:n[0]||(n[0]=m=>c.thumbnailClick(i.gameEvent.video_link,i.gameEvent.event_type_name))},[t.createElementVNode("video",Yha,[t.createElementVNode("source",{src:i.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,Xha)]),Zha])):t.createCommentVNode("",!0),t.createElementVNode("div",Jha,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",c.teamTypeClasses2])},[i.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",Kha,[c.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(c.srcImgPlayers,(m,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",Qha,[t.createElementVNode("img",{src:m,alt:""},null,8,epa)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",c.nameClasses]),onClick:n[1]||(n[1]=m=>c.thumbnailClick(i.gameEvent.video_link,i.gameEvent.event_type_name))},[i.canPlayVideos&&i.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:Aha,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(i.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${i.gameEvent.event_type_name}`:i.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(i.gameEvent.category_id?i.gameEvent.event_type_id===5?i.gameEvent.category_name:i.gameEvent.event_type_name==="Gol"?i.gameEvent.event_type_name+" de "+i.gameEvent.team_name:i.gameEvent.event_type_name:i.gameEvent.comments),1)],2)],2),t.createElementVNode("div",tpa,[t.createElementVNode("div",apa,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",c.minuteClasses])},[t.createElementVNode("div",npa,[t.createElementVNode("div",rpa,t.toDisplayString(i.gameEvent.minute)+"'",1),t.createElementVNode("div",ipa,[t.createElementVNode("div",opa,[i.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",spa)):i.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",lpa)):i.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",cpa)):i.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",upa)):i.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",dpa)):i.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",hpa)):i.gameEvent.category_id==6&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==5&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==1&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==2&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==3&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==7&&i.gameEvent.event_type_id==1||i.gameEvent.category_id==12&&i.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",ppa)):i.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",fpa)):i.gameEvent.category_id==13||i.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",mpa)):i.gameEvent.category_id==30||i.gameEvent.category_id==31||i.gameEvent.category_id==32||i.gameEvent.category_id==33||i.gameEvent.category_id==34||i.gameEvent.category_id==35||i.gameEvent.category_id==36||i.gameEvent.category_id==37||i.gameEvent.category_id==38||i.gameEvent.category_id==39||i.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",gpa)):i.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",ypa)):i.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",vpa)):i.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",_pa)):i.gameEvent.category_id==15||i.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",bpa)):i.gameEvent.category_id==0&&i.gameEvent.game_status_id==16||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==18||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==20||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",xpa)):i.gameEvent.category_id==0&&i.gameEvent.game_status_id==13||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==17||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==19||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==21||i.gameEvent.category_id==0&&i.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",wpa)):i.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",kpa)):i.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",Cpa)):(t.openBlock(),t.createElementBlock("img",Spa))])])])],2)],6)}const Epa=Z_(Hha,[["render",Tpa],["__scopeId","data-v-9943063a"]]),Apa={"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"},Mpa={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 D6=null;const Ipa={name:"TimeLine",components:{Tooltip:qda,TimeLineEvent:Epa},mixins:[Xda],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 n=await this.fetchGameEvents(e);n?(this.gameEvents=[...n],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(n){throw new Error(n)}},getGameEventClassAndSetIcon(e,n){return e.icon=n===0?"inicio_del_partido":Apa[`${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:n}}=await HJ.get(`${this.gameEventsUrl}${e}`);return n}catch(n){throw new Error(n)}},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)D6=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),D6.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,n){const i=this.$refs[`gameEventDiv${n}`][0],B=this.$refs[`gameEventLine${n}`]?this.$refs[`gameEventLine${n}`][0]:null,z=e+12;i&&(i.style.height=`${z}px`),B&&(B.style.height=`${z}px`)},sortGameEvents(){this.gameEvents.sort((e,n)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(n.match_lapse)+Number(n.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let n=0;switch(e){case 1:n=0;break;case 2:n=45;break;case 3:n=90;break;case 4:n=105;break;case 5:n=120;break}return n},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const n=this.gameEvents.findIndex(i=>i.play_id===e.play_id);n&&this.gameEvents.splice(n,1)},checkTimeLineStatus(){this.gameEvents.forEach(n=>{const i=Mpa[n.game_status];i&&this.timeLineStatuses.push({...i,gameEvent:n})}),this.timeLineStatuses.sort((n,i)=>i.weight-n.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const n=this.gameData[e].team_id;return Zda(n)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){D6&&D6.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,n]){this.channelName===e&&this.addGameEventFromChannel(n)},update_mxm([e,n]){this.channelName===e&&(this.deleteGameEventFromChannel(n),this.addGameEventFromChannel(n))},delete_mxm([e,n]){this.channelName===e&&this.deleteGameEventFromChannel(n)}}},dK=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),Ppa={ref:"timeLine",class:"time-line"},Bpa={class:"time-line__header"},Npa={class:"time-line__header__dot"},Opa={class:"time-line__header__dot__home-team team-logo"},Dpa=["src"],Lpa={class:"time-line__header__dot__away-team team-logo"},Fpa=["src"],zpa={key:1,class:"start-line"},Rpa=dK(()=>t.createElementVNode("div",null,null,-1)),Vpa=dK(()=>t.createElementVNode("div",null,null,-1)),$pa=[Rpa,Vpa],jpa={key:1,class:"noEventText"},Upa={class:"tooltip-data"},Gpa=["src"];function Hpa(e,n,i,B,z,c){const m=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Ppa,[t.createElementVNode("div",Bpa,[t.createElementVNode("div",Npa,[t.createElementVNode("div",Opa,[t.createElementVNode("img",{src:c.getTeamLogoSrc("homeTeam"),alt:""},null,8,Dpa)]),t.createElementVNode("div",Lpa,[t.createElementVNode("img",{src:c.getTeamLogoSrc("awayTeam"),alt:""},null,8,Fpa)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${z.gameEvents.length}`},[i.gameData.status!==4||i.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:z.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.gameEventsToShow,(y,f)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${f}`,class:t.normalizeClass(c.getGameEventClassAndSetIcon(y,f))},[t.createElementVNode("div",{class:t.normalizeClass(c.getEventContainerClass(y))},[t.createVNode(m,{"game-event":y,"is-mobile":c.isMobile,"time-line-width":z.timeLineWidth,width:c.gameEventWidth,"can-play-videos":i.canPlayVideos,onEventHeight:r=>c.updateContainerHeight(r,f),onPlayerChanged:n[0]||(n[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:c.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),f>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${f}`,class:"line"},null,512)):t.createCommentVNode("",!0),i.gameData.status===1&&f===c.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",zpa,$pa)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",jpa,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:z.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",Upa,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:z.dataVideo.link,format:"video/mp4"},null,8,Gpa)])])]),_:1},8,["data"])],64)}const Wpa=Z_(Ipa,[["render",Hpa],["__scopeId","data-v-2574e576"]]),qpa={class:"game-time-line__options"},Ypa={class:"game-time-line__timeline"},Xpa={__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){HJ.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const n=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"}),i=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 B=null;const z=t.ref(["Todo","1er tiempo","2do tiempo"]),c=t.ref("Todo"),m=t.ref({}),a=t.ref(null),y=t.ref(0),f=t.computed(()=>{let l="all";return c.value==="1er tiempo"||c.value==="1er"?l="firstHalf":(c.value==="2do tiempo"||c.value==="2do")&&(l="secondHalf"),l}),r=t.computed(()=>y.value<500);function v(l){c.value=l}function _(l){m.value=l}function p(){if(window.ResizeObserver)B=new ResizeObserver(()=>{y.value=a.value.clientWidth}),B.observe(a.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{p()}),t.onBeforeUnmount(()=>{B&&B.unobserve(a.value)}),(l,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:a,class:"game-time-line"},[t.createElementVNode("div",qpa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,s=>(t.openBlock(),t.createElementBlock("div",{key:s,class:"game-time-line__options__option"},[t.createVNode(Eua,t.mergeProps(y.value<390?i.value:n.value,{text:s=="Todo"?s:y.value<390?s.substring(0,3):s,"is-active":c.value===s,onClick:d=>v(s)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",Ypa,[t.createVNode(Wpa,{"game-data":e.game,"time-line-period":f.value,"is-mobile":r.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:_},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},Zpa=Z_(Xpa,[["__scopeId","data-v-f42d0c90"]]),Swa="",Jpa={class:"game-data__header"},Kpa={class:"game-data__header__tournament-season-dropdown"},Qpa={class:"game-data__header__teams-carousel"},efa={class:"game-data__body"},tfa={class:"game-data__body__menu"},afa={class:"game-data__body__menu__contmenuswitch"};$c.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const nfa=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:wfe,GSCGameTimeLine:Zpa,GscSwitchComponent:SA,GSCLineupsMain:rke,GSCDatosGSMain:CPe,GSCVideoGame:BGe,ModalEvents:iV,GSCSummaryMain:I_t,GSCTacticaFijaMain:Sua,GSCProminentMain:KNt,GSCComparative:BFt}}),rfa=$i(Object.assign(nfa,{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:n}){const i=e,B=ix();Jh.on("socket-connected",()=>{B.commit("nextGeneral/updateIsSocketConnected",i.socket.connected)});const z=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTg2LCJuYW1lIjoiSkFTIEdvbFN0YXRzIiwidXNlcm5hbWUiOiJ5YXRlYW1lcmljYSIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE2OTYzNjU1ODcsImV4cCI6MTcyNzkwMTU4N30.jynRtgtFM8sf8gtqZJ-1gHLc2Ws13TIykXcfrlOvv1g"),c=t.ref({season:[]}),m=t.ref({}),a=t.ref(!1),y=t.ref({}),f=t.ref(1),r=12e4,v=12e4,_=12e4,p=12e4,l=12e4,o=12e4,s=12e4,d=12e4,u=12e4,h=t.ref(null),g=t.ref(null),b=t.ref(null),w=t.ref([]),x=t.ref(null),T=t.ref(!0),k=t.ref(new Set([1,2])),S=t.ref({}),C=t.ref({minute:"",recent_lapse:0,score:{}}),A=t.ref(0),E=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),M=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:i.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}]),I=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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}]),N=t.ref(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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(i.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:i.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 O=t.ref(0);let L=null;const R=t.ref(null),V=t.ref(0),j=t.ref(I.value[0]),U=t.ref([]);let Z=t.ref("");const q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},W=t.computed(()=>{const ze=[];return m.value&&m.value.id&&(ze.push({id:m.value.id,name:m.value.name,type:m.value.type}),m.value.related_seasons&&m.value.related_seasons.forEach(Be=>{ze.push({id:Be.id,type:Be.type})})),ze}),Q=t.computed(()=>{if(i.clientPrivilegesBySeasons){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)return ze.teamId}return 0});function X(){a.value=!1}function J(ze){const Be=ze.split(",");return!(Be.length<2||Be[1].split(" ").length<2)}function ee(ze){h.value=ze}function le(ze){w.value.push(ze)}function oe(ze){x.value=ze}function se(ze){b.value=ze}function ce(ze){g.value=ze}function ae(ze){if(!J(ze))return"";const Be=ie(ze);return`${ne(ze)}. ${Be}`}function ne(ze){return ze.split(",")[1].split(" ")[1][0]}function ie(ze){const Be=ze.split(",")[0].split(" ");return Be[0].length<=3&&Be.length>1?`${Be[0]} ${Be[1]}`:Be[0]}async function de(ze){try{const Be=$c.create({headers:{Authorization:`${z.value}`}});S.value={};const we=await Be.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+ze.game_id);S.value[ze.home_team.team_id]=[],S.value[ze.home_team.team_id].team={name:ze.home_team.acronym,logo:ze.home_team.logo},S.value[ze.home_team.team_id].goals=[],S.value[ze.home_team.team_id].red=[],S.value[ze.home_team.team_id].yellow=[],S.value[ze.visiting_team.team_id]=[],S.value[ze.visiting_team.team_id].team={name:ze.visiting_team.acronym,logo:ze.visiting_team.logo},S.value[ze.visiting_team.team_id].goals=[],S.value[ze.visiting_team.team_id].red=[],S.value[ze.visiting_team.team_id].yellow=[],we.data.minute!=null&&(C.value={minute:we.data.minute,recent_lapse:we.data.recent_lapse,score:we.data.score});for(let Oe=0;Oe<we.data.plays.length;Oe++)we.data.plays[Oe].category_name=="Roja"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].red||(S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].red[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].red||(S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].red[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute))),we.data.plays[Oe].category_name=="Amarilla"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].yellow||(S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].yellow||(S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].yellow[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute))),we.data.plays[Oe].event_type_name=="Gol"&&we.data.plays[Oe].status==1&&(ze.home_team.team_id==we.data.plays[Oe].team_id?we.data.plays[Oe].category_name=="Autogol"?(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].goals||(S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].goals||(S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):we.data.plays[Oe].category_name=="Autogol"?(ae(we.data.plays[Oe].player_name)in S.value[ze.home_team.team_id].goals||(S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.home_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)):(ae(we.data.plays[Oe].player_name)in S.value[ze.visiting_team.team_id].goals||(S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)]={},S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event=[],S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].name=ae(we.data.plays[Oe].player_name)),S.value[ze.visiting_team.team_id].goals[ae(we.data.plays[Oe].player_name)].event.push(we.data.plays[Oe].minute)))}catch(Be){return Promise.reject(Be)}}function he(ze){a.value=!0,ze.is_live!=1&&ze.game_status!=0&&(ze.game_status==4||Object.keys(ze.minutes).length>0)?(A.value=1,S.value={plays:ze.minutes,home_team:ze.home_team,visiting_team:ze.visiting_team}):(A.value=0,de(ze))}function pe(){L=new ResizeObserver(ze=>{for(const Be of ze)V.value=Be.contentRect.width}),L.observe(R.value)}const me=t.computed(()=>{let ze={};return y.value&&y.value.game_id&&(ze={gameId:y.value.game_id,id:y.value.game_id,seasonId:y.value.season_id,status:y.value.game_status,game_status:y.value.game_status,dateTimeUTC:y.value.date_time_utc,homeTeam:y.value.home_team,awayTeam:y.value.visiting_team,is_live:y.value.is_live,minutes:y.value.minutes}),ze});t.watch(()=>me,(ze,Be)=>{B.commit("nextGeneral/updateShowLiveData",!0),Object.keys(ze.value).length>0&&(ze.value.gameId===Be.value.gameId&&ze.value.is_live!==Be.value.is_live&&(B.commit("nextGeneral/updateGameForAnalysisByProps",{is_live:ze.value.is_live,game_status:ze.value.game_status}),O.value+=1),I.value=[],ze.value.is_live==1||ze.value.game_status==4?I.value=[...M.value]:I.value=[...N.value],!i.isWidget&&(m.value.is_tactic_available==0||ze.value.is_live==1||ze.value.game_status==0)&&I.value.pop(),i.isWidget&&ze.value.is_live==1&&ze.value.awayTeam.team_id==i.teamWidget,j.value=I.value[0],O.value+=1,de({game_id:ze.value.gameId,home_team:ze.value.homeTeam,visiting_team:ze.value.awayTeam}),ze.value.is_live==1&&setInterval(()=>{A.value=0,de({game_id:ze.value.gameId,home_team:ze.value.homeTeam,visiting_team:ze.value.awayTeam})},6e4))},{deep:!0,immediate:!0}),t.watch(()=>B.state.nextGeneral.gameForAnalysis,()=>{B.commit("nextGeneral/updateIsSocketConnected",i.socket.connected)},{deep:!0,immediate:!0});function be(ze){f.value=ze.is_captured,T.value=ze.is_captured!==0,c.value.id!==ze.id&&(c.value=ze,B.commit("gameGlobal/setTournamentType",ze.tournament_type))}function xe(ze){!ze.auxwidget&&ge.value&&!ge.value.canPrivilegesTeamPlayVideos||((y.value.is_live||y.value.game_status===0)&&(ze.liveGameConfig={gameId:y.value.game_id}),n("openmedia",ze))}function ke(ze){n("onOpenProfile",ze)}function Ee(ze){n("openProfileTeam",ze)}function Ne(ze){n("openProfilePlayer",ze)}function je(ze){De(ze),ze=="Estadísticas"&&(Z.value="Comparativa")}function Te(){Z.value=""}function Ce(ze){m.value.id!==ze.id&&(m.value=ze,n("change-season-id",ze.id))}const ye=t.computed(()=>I.value.reduce((ze,Be)=>(i.disabledSectionsIds.includes(Be.id)||ge.value&&!ge.value.canPrivilegesTeamPlayVideos&&Be.id===2||i.clientPrivilegesBySeasons&&Be.id===7||(T.value||Be.id!==5&&Be.id!==6)&&ze.push(Be.name),ze),[])),ge=t.computed(()=>{if(i.clientPrivilegesBySeasons){if(m.value&&y.value&&y.value.game_id){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)if(Se(ze.playingAs),(y.value.is_live||y.value.game_status===1||y.value.game_status===0)&&B.state.nextGeneral.showLiveData){const Be=ze.playingAs.has(y.value.playingAs);return{seasonAndPrivileges:ze,canPrivilegesTeamPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&Be,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:y.value.home_team.team_id===ze.teamId,homeTeamDetails:{canPlayVideos:Be,team:y.value.home_team},awayTeamDetails:{canPlayVideos:Be,team:y.value.visiting_team}}}else{const Be=y.value.home_team.team_id===ze.teamId,we=Me.value.filter(Re=>ze.playingAs.has(Re.playingAs));return{seasonAndPrivileges:ze,canPrivilegesTeamPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&we.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:Be,homeTeamDetails:{canPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&Be&&we.length>0,team:y.value.home_team},awayTeamDetails:{canPlayVideos:i.clientPrivilegesBySeasons.canPlayVideos&&!Be&&we.length>0,team:y.value.visiting_team}}}Se(new Set)}return q}return null}),Me=t.computed(()=>{if(i.clientPrivilegesBySeasons){if(m.value){const ze=i.clientPrivilegesBySeasons.seasonsAndPrivileges.get(m.value.id);if(ze)return U.value.filter(Be=>Be.game_status===1&&ze.playingAs.has(Be.playingAs))}return[]}return[]});t.watch(ye,()=>{ge.value&&!ge.value.canPrivilegesTeamPlayVideos&&j.value.id===2&&De("Resumen")},{deep:!0,immediate:!0});function Se(ze){k.value=ze}function De(ze){if(B.commit("nextGeneral/updateShowLiveData",!0),h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let Be of w.value)clearInterval(Be);w.value=[]}i.isWidget?j.value=I.value.find(Be=>Be.name===ze)||I.value[1]:j.value=I.value.find(Be=>Be.name===ze)||I.value[0]}t.onMounted(()=>{pe(),t.nextTick(()=>{i.isSynchronization&&De("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(L&&L.disconnect(),h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let ze of w.value)clearInterval(ze);w.value=[]}K8()});function Le(ze){if(ze.playingAs||(ze.playingAs=Q.value?ze.home_team.team_id===Q.value?1:2:0),h.value!=null&&(clearInterval(h.value),h.value=null),g.value!=null&&(clearInterval(g.value),g.value=null),b.value!=null&&(clearInterval(b.value),b.value=null),x.value!=null&&(clearInterval(x.value),x.value=null),w.value.length>0){for(let Be of w.value)clearInterval(Be);w.value=[]}y.value=ze,ze.is_live&&ze.game_status===4?xB():wB()}function Ve(ze){U.value=ze.map(Be=>{const we={...Be};return Q.value&&(we.playingAs=we.home_team.team_id===Q.value?1:2),we})}return(ze,Be)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:R},[t.createElementVNode("div",Jpa,[t.withDirectives(t.createElementVNode("div",Kpa,[t.createVNode(t.unref(xI),{"current-season-id":e.currentSeasonId,onInput:be,onChangeTournaments:be,"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(CI),{"current-season-id":e.currentSeasonId,seasons:c.value.seasons,onInput:Ce},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",Qpa,[t.createVNode(t.unref(Tre),{"plays-live":S.value,"info-live":C.value,token:E.value,is_captured:f.value,"await-for-seasons":"",seasons:W.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":Q.value,"only-games-team-id":Q.value,"tournament-type":t.unref(B).state.gameGlobal.tournamentType,onChangeGameCarousel:Le,onOpenModalEvent:he,onChangeGamesByClientPrivileges:Ve},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"])])]),a.value?(t.openBlock(),t.createBlock(iV,{key:0,width:V.value,onCloseModalEventsLive:X,plays:S.value,game:y.value,type:A.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",efa,[t.createElementVNode("div",tfa,[t.createElementVNode("div",afa,[t.createVNode(t.unref(SA),{type:2,buttons:ye.value,"font-family":"Poppins-Regular","font-size":"16px",width:V.value<400||V.value<700?"max-content":V.value<840||V.value<1050?"155px":"165px","selected-option":j.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:De},null,8,["buttons","width","selected-option"])])]),me.value&&me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(j.value.componentName),{key:O.value,game:me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ce,onIntervalidhighlive:se,onIntervalidtops:le,onIntervalidgs:oe,subsection:t.unref(Z),seasonSelected:m.value,tournamentSelected:c.value,showLineups:T.value,socket:e.socket,"time-live-prominent-data":r,"time-live-highlights-prominent-and-video":v,"time-live-possesion":_,"time-live-video-goals":p,"time-live-video-best-plays":l,"time-live-video-this-game":o,"time-live-video-specific-plays":s,"time-live-comparative-best-players":d,"time-live-comparative-avanced":u,is_captured:f.value,"is-tactic-visible":!!m.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ge.value?ge.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":k.value,"client-privileges-team-id":Q.value,"play-videos-privileges":ge.value,token:E.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,onResetSubsection:Te,onOpenmedia:xe,onOnOpenProfile:ke,onOpenProfileTeam:Ee,onOpenProfilePlayer:Ne,onChangeToTab:je,onOpenMediaPlayer:xe,onIntervalid:ee},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)])],512))}}),[["__scopeId","data-v-5c3d1b45"]]);async function Ud({url:e,options:n={},retries:i=3}){return await $c.get(e,n).then(B=>B).catch(B=>i>0?Ud({url:e,options:n,retries:i-1}):B)}async function hK({seasonId:e},n=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(i){if(n)return hK({seasonId:e},!1);throw new Error(i)}}async function ifa({seasonId:e}){try{return(await Ud({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}async function ofa({seasonId:e}){try{return(await Ud({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}function sfa(e,n,i,B,z,c,m=!1){const a=i.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const f=c&&y[z.teamId]?y[z.teamId]!==c:!1,r=n===1?2:1;return(m||B.includes(y[z.gameId]))&&(!n||(f?r:n)===y[z.playingAs])&&(i.includes(y[z.matchResult])&&y[z.teamId]===c||a.includes(y[z.matchResult])&&y[z.teamId]!==c)})}function pK(e,n,i,B,z){return n.length===2&&i.length===3&&B.length===6?e:e.filter(c=>n.includes(c[z.playingAs])&&i.includes(c[z.matchResult])&&B.includes(c[z.section]))}async function fK({seasonId:e}){try{const n=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ud({url:n})).data}catch(n){return Promise.reject(n)}}async function lfa({seasonId:e,gameId:n}){try{const i=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${n}`,{data:B}=await Ud({url:i});return B}catch(i){return Promise.reject(i)}}async function cfa({gameId:e}){try{const n=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ud({url:n})).data.data}catch(n){return Promise.reject(n)}}async function ufa({gameId:e}){try{const n=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ud({url:n})).data.data||[]}catch(n){return Promise.reject(n)}}const dfa=["categoryId","matchLapse","section","matchResult","playingAs","total"];let rI=null;function mK(){return rI||(rI=Qg(dfa)),rI}async function hfa(e){try{const n=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ud({url:n})).data}catch(n){return Promise.reject(n)}}async function gK({seasonId:e,teamId:n}){try{return await Ud({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${n}`})}catch(i){return Promise.reject(i)}}async function pfa(e){try{const n=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ud({url:n})}catch(n){return Promise.reject(n)}}async function ffa(e){try{return await Ud({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(n){return Promise.reject(n)}}const mfa={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,n,i,B){return sfa(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],mK(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const n=e.currentSeasonGames.reduce((i,B)=>{const z={...B};return z.home_team=e.currentSeasonTeams.find(c=>c.team_id===B.home_team),z.visiting_team=e.currentSeasonTeams.find(c=>c.team_id===B.visiting_team),i[B.matchday_abbreviation]?i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(z):i[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[z]:i[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[z]},i},{});for(let[i,B]of Object.entries(n))n[i]=Object.entries(B).map(([z,c])=>({date:z,games:c})),n[i].sort((z,c)=>z.date<c.date?-1:z.date>c.date?1:0);return n},matchdaysDates(e,n){let i=[];if(n.nextGamesSchedule){let B=Object.keys(n.nextGamesSchedule);for(let z of B){let c=Number(z.replace("M","")),m=n.nextGamesSchedule[z].map(a=>({matchday:c,date:new Date(a.date)}));i=i.concat(m)}}return i},closestMatchDay(e,n){let i=new Date,B=0,z=-new Date(0,0,0).valueOf(),c=n.matchdaysDates,m=c.length;for(let a=0;a<c.length;a++)B=Math.abs(c[a].date-i),B<z&&(m=a,z=B);return c[m]?c[m].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,n){e.booleanIsLiveGamesModalOpen=n},setBooleanAreLiveGames(e,n){e.booleanAreLiveGames=n},updateSeasonPlays(e,n){e.seasonPlays=n},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateSelectedRound(e,n){e.selectedRound=n}},actions:{async getSeasonPlays({commit:e,rootGetters:n},i=!1){try{const B=await hK({seasonId:n["filterGeneral/getSeasonId"]});if(i)return B;e("updateSeasonPlays",B)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:n}){try{const i=await fK({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",i)}catch(i){return Promise.reject(i)}},async getCurrentSeasonTeams({commit:e,rootGetters:n}){try{const i=await hfa({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",i.teams)}catch(i){return Promise.reject(i)}},async isDataFilled({state:e,dispatch:n,commit:i}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return i("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=n("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=n("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function gfa({filter:e}){try{const n=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:i}=await Ud({url:n});return i}catch(n){return Promise.reject(n)}}const yfa=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let iI=null;function vfa(){return iI||(iI=Qg(yfa)),iI}class L6{constructor(){Vc(this,"maximumLiveSection",1);Vc(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:[]});Vc(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(n){n>this.maximumLiveSection&&(this.maximumLiveSection=n)}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(n,i,B){B&&(this.setMaximumLiveSection(n),this.accomplished.totalLive+=i,this.accomplished.totalsLiveTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,i)),this.accomplished.totalPostGame+=i,this.accomplished.avgPostGameTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,n,i)}increaseReceivedByOne(n,i,B){B&&(this.setMaximumLiveSection(n),this.received.totalLive+=i,this.received.totalsLiveTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,i)),this.received.totalPostGame+=i,this.received.avgPostGameTrendLive.sections[n-1]+=i,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,n,i)}increaseTrendLiveAccumulatedByOne(n,i,B){for(let z=i-1;z<n.accumulated.length;z++)n.accumulated[z]+=B}decreaseAccomplishedLiveByOne(n,i){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=i),this.accomplished.totalsLiveTrendLive.sections[n-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[n-1]-=i,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,i))}decreaseReceivedLiveByOne(n,i){this.received.totalLive>0&&(this.received.totalLive-=i),this.received.totalsLiveTrendLive.sections[n-1]>0&&(this.received.totalsLiveTrendLive.sections[n-1]-=i,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,i))}decreaseTotalsLiveTrendLiveAccumulatedByOne(n,i,B){for(let z=n.accumulated.length-1;z>=i-1;z--)n.accumulated[z]-=B}calculateAvg(n){n&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/n,this.received.avgPostGame=this.received.totalPostGame/n,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,n),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,n),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,n),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,n))}getAvgPostGameTrendLiveAvg(n,i){return n.map(B=>B/i)}calculateRanking(n,i,B,z,c,m,a,y){let f=[];z===3&&n&&n.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?f=Array.from(n.reduce((v,_)=>{const p=_[i.playingAs]===1,l=p?"1":"2",o=v.get(_[i.gameId]);if(o)o[l]?o[l].arrayPlays.push(_):o[l]={numberTeamId:_[i.teamId],arrayPlays:[_]};else{const s={numberMatchResult:_[i.matchResult]};p&&(s[1]={numberTeamId:_[i.teamId],arrayPlays:[_]}),v.set(_[i.gameId],s)}return v},new Map).values()).reduce((v,_)=>{const p=B.playingAs.length===2?"both":B.playingAs[0].toString();return(p==="both"&&(_[1].numberTeamId===B.teamId||_[2].numberTeamId===B.teamId)||p!=="both"&&_[p].numberTeamId===B.teamId)&&B.matchResult.includes(_.numberMatchResult)&&v.push(..._[1].arrayPlays,..._[2].arrayPlays),v},[]).filter(v=>B.sections.includes(v[i.section])):(f=n?[...n]:[],a&&n&&(f=n.filter(r=>B.playingAs.includes(r[i.playingAs])&&B.matchResult.includes(r[i.matchResult])&&B.sections.includes(r[i.section])))),this.setTeamRanking(f,z,i,B.teamId,m,"accomplished",y)}setTeamRanking(n,i,B,z,c,m,a){let y=null,f=null;i===3&&(y=new Map,f={},n.forEach(_=>{const p=y.get(_[B.gameId]);p?p[_[B.teamId.toString()]]?p[_[B.teamId.toString()]]+=_[B.total]:p[_[B.teamId.toString()]]=_[B.total]:y.set(_[B.gameId],{[_[B.teamId.toString()]]:_[B.total]})}),Array.from(y.values()).forEach(_=>{const[p,l]=Object.keys(_).map(s=>s),o=_[p]+_[l];this.addPassesAvgByTeam(f,p,o?_[p]/o:0),this.addPassesAvgByTeam(f,l,o?_[l]/o:0)}));const r=c.sort((_,p)=>_.team_id-p.team_id).map(_=>{if(i===3){const p=f[_.team_id.toString()];return{teamId:_.team_id,points:p?p.numberTotalPassesAvg/p.numberGamesCount:0,total:p?p.numberTotalPassesAvg:0}}else{const p=n.reduce((l,o)=>o[B.teamId]===_.team_id&&i===o[B.categoryId]?l+o[B.total]:l,0);return{teamId:_.team_id,points:_[`${a}FilterGames`]?p/_[`${a}FilterGames`]:0,total:p}}}).sort((_,p)=>p.points-_.points);this.accomplished.arrayRankings=r;const v=r.findIndex(_=>_.teamId===z);i===3&&(this.accomplished.avgPreGame=r[v].points),this[m].ranking=v+1,this[m].leader=r[0]}addPassesAvgByTeam(n,i,B){n[i]?(n[i].numberGamesCount+=1,n[i].numberTotalPassesAvg+=B):n[i]={numberGamesCount:1,numberTotalPassesAvg:B}}}class Ds{constructor(n,i,B,z,c,m,a,y,f,r){Vc(this,"id","");Vc(this,"generalId",0);Vc(this,"name","");Vc(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Vc(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Vc(this,"accomplishedCategoryIds",[]);Vc(this,"receivedCategoryIds",[]);Vc(this,"generalCategoriesIds",{accomplished:0,received:0});Vc(this,"specialMention","");Vc(this,"homeTeam",new L6);Vc(this,"visitingTeam",new L6);Vc(this,"isLeagueDataCalculated",!1);Vc(this,"leagueAccomplishedMax",0);Vc(this,"leagueReceivedMax",0);Vc(this,"leagueAccomplishedAvg",0);Vc(this,"leagueReceivedAvg",0);Vc(this,"leagueAccomplishedAccumulator",0);Vc(this,"leagueReceivedAccumulator",0);Vc(this,"homeTeamType","homeTeam");Vc(this,"visitingTeamType","visitingTeam");Vc(this,"betOnly",!1);Vc(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=n||[],this.receivedCategoryIds=i||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=z,this.names["0-0"]=z||"",this.names["1-1"]=c||"",this.names["0-1"]=m||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=f||!1,this.isPercent=r||!1}addLeaguePlays(n,i,B){n.length===0||!B||this.isLeagueDataCalculated||(n.forEach(z=>{this.isAccomplishedLeaguePlay(z[i.categoryId])&&(this.leagueAccomplishedAccumulator+=z[i.total]),this.isReceivedLeaguePlay(z[i.categoryId])&&(this.leagueReceivedAccumulator+=z[i.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(n,i,B){let z="-";for(const[c,m]of Object.entries(this.generalCategoriesIds))n===m&&(z=`${c==="accomplished"?"0":"1"}${z}`),i===m&&(z=`${z}${c==="accomplished"?"0":"1"}`);z.length===3&&(this.mentions[z]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(n,i,B,z,c){!B||!c||n!==this.homeTeamType&&n!==this.visitingTeamType||(B.forEach(m=>{this.isAccomplishedPlay(m[z.categoryId])?this[n].increaseAccomplishedByOne(m[z.section],m[z.total]):this.isReceivedPlay(m[z.categoryId])&&this[n].increaseReceivedByOne(m[z.section],m[z.total])}),this[n].calculateAvg(c))}addLivePlay(n,i,B,z,c=!1,m=!1){(n===this.homeTeamType||n===this.visitingTeamType)&&B[z.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[n].increaseAccomplishedByOne(B[z.section],B[z.total],!0)}subtractLivePlay(n,i,B,z,c){(n===this.homeTeamType||n===this.visitingTeamType)&&(this.isAccomplishedPlay(B[z.categoryId])&&!c?this[n].decreaseAccomplishedLiveByOne(B[z.section],B[z.total]):this.isReceivedPlay(B[z.categoryId])&&c&&this[n].decreaseReceivedLiveByOne(B[z.section],B[z.total]))}isAccomplishedLeaguePlay(n){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>n===B||`${n}_r`===B)}isReceivedLeaguePlay(n){return!!this.receivedCategoryIds.find(i=>n===i)}isAccomplishedPlay(n){return this.generalCategoriesIds.accomplished===n}isReceivedPlay(n){return this.generalCategoriesIds.received===n}calcRankingLeague(n,i,B,z,c,m=!1){this[this.homeTeamType].calculateRanking(n,i,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,c,m,this.homeTeamType),this[this.visitingTeamType].calculateRanking(n,i,z,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,c,m,this.visitingTeamType)}resetData(){this.homeTeam=new L6,this.visitingTeam=new L6,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(n){return this.generalCategoriesIds.accomplished===n||this.generalCategoriesIds.received===n}}const _fa={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new Ds([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new Ds([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new Ds([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new Ds([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new Ds([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new Ds([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new Ds([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new Ds([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new Ds([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new Ds([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new Ds([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new Ds([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new Ds([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new Ds([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new Ds([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new Ds([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new Ds([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new Ds([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new Ds([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new Ds([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new Ds([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new Ds([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new Ds([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new Ds([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new Ds([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new Ds([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new Ds([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 Ds([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new Ds([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new Ds([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new Ds([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new Ds([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new Ds([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new Ds([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new Ds([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new Ds([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new Ds([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new Ds([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},bfa=[{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}],xfa=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let oI=null;function wfa(){return oI||(oI=Qg(xfa)),oI}const kfa=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let sI=null;function Cfa(){return sI||(sI=Qg(kfa)),sI}function F6(e,n,i){return[i.get(e[n.categoryId])||[],e[n.teamId],e[n.matchResult],e[n.playingAs],e[n.matchLapse],e[n.section],e[n.total]]}function yK(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 lI(e,n,i){let B=[...n];return e[i.categoryId]===2&&(B[0]=14),e[i.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}const Sfa=bB(),Tfa=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],Efa={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:mK(),indexesTSP:vfa(),indexesLS:wfa(),indexesTLP:Cfa(),nextGamesDataStructure:_fa,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(n=>n.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 bfa.filter(n=>n.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return pK(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return pK(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(n=>n.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(n=>e.homeTeamFilter.playingAs.includes(n[0])).filter(n=>e.homeTeamFilter.matchResult.includes(n[1])).reduce((n,i)=>n+i[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(n=>e.visitingTeamFilter.playingAs.includes(n[0])).filter(n=>e.visitingTeamFilter.matchResult.includes(n[1])).reduce((n,i)=>n+i[2],0)},filledDataStructure(e,n){if(e.currentSeasonPlays)for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,n.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,n.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,n){return Object.values(n.filledDataStructure).sort((i,B)=>i.priority-B.priority)},statisticData(e,n){for(const i of Object.values(n.filledDataStructure))if(i.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&i.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return i.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,n){for(const[i,B]of Object.entries(n))e.gameForAnalysis[i]=B},setCurrentTournamentName(e,n){e.currentTournamentName=n},setBetSubcategoriesObjects(e,n){e.betSubcategoriesObjects=n},setRegularSeasonName(e,n){e.regularSeasonName=n},setBetSubcategories(e,n){e.betSubcategories=n},setBetDescription(e,n){e.betDescription=n},setSeasonId(e,n){e.seasonId=Number(n)},setHome(e,n){e.homeTeamInfo=n},setAway(e,n){e.awayTeamInfo=n},setMenuOptionActive(e,n){e.menuOptionActive=n},setPastSeasonId(e,n){e.pastSeasonId=n},setUsePastSeasonId(e,n){e.usePastSeasonId=n,n&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,n){e.showPostMatch=n},setHomeResultGame(e,n){e.homeResultGame=n},setAwayResultGame(e,n){e.awayResultGame=n},updateIsSocketConnected(e,n){e.isSocketConnected=n,n&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&Yoe(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n,e.currentSeasonTeams.forEach(i=>{i.playedGames=e.currentSeasonGames.reduce((B,z)=>{if(z.game_status===1&&(z.home_team===i.team_id||z.visiting_team===i.team_id)){const c=z.score[0]-z.score[1],m=z.home_team===i.team_id;B.push({playingAs:m?1:2,matchResult:c===0?3:m?c>0?1:2:c<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateGameId(e,n){e.gameId=n},updateGameForAnalysis(e,n){e.gameForAnalysis=n,e.isLive=!!n.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,n){e.selectedAnalysis=n},updateShowLiveData(e,n){e.showLiveData=n},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,n){e.idAssetSelected=n},updateStats(e,n){e.currentSeasonPlays=n},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:n,needsFormat:i=!1}){if(i){if(!n||!n.local||!n.local.statistics||!n.visit||!n.visit.statistics)return;e.homeTeamFilter=EB(e.homeTeamFilter,n.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=EB(e.visitingTeamFilter,n.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==n.local.statistics.block&&(e.selectedStatisticTypeBlock=n.local.statistics.block)}else e.homeTeamFilter={...n.homeTeamFilter,statistics:0},e.visitingTeamFilter={...n.visitingTeamFilter,statistics:0}},updateFinishedGames(e,n){e.totalSeasonFinishedGames=n},updateHomeTeamPlays(e,n){e.homeTeamPlays=n},updateVisitingTeamPlays(e,n){e.visitingTeamPlays=n},addSpecialMentions(e,n){const i=Object.values(e.nextGamesDataStructure);i.forEach(B=>{for(const z of Object.values(B.subcategories))z.resetMentions()}),i.forEach(B=>{for(const z of n)for(const c of Object.values(B.subcategories))c.addSpecialMention(z[0],z[1],z[2])})},setDefaultFilter(e,n){e.defaultFilter={homeTeamFilter:{...n.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...n.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,n){if(!e.livePlays.has(n[e.indexesTLP.playId])){e.livePlays.set(n[e.indexesTLP.playId],n);const B=F6(n,e.indexesTLP,e.categoriesMap);for(const z of Object.values(e.nextGamesDataStructure))for(const c of Object.values(z.subcategories))c.addLivePlay(e.gameForAnalysis.home_team===B[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",B[e.indexesTSP.teamId],B,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,n){const i=!!n[e.indexesTLP.length],B=e.livePlays.get(n[e.indexesTLP.playId]);if(Use(B,n))return;let z="";const c=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(z=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const m=F6(B,e.indexesTLP,e.categoriesMap),a=lI(B,m,e.indexesTLP),y=F6(n,e.indexesTLP,e.categoriesMap),f=lI(n,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const v of Object.values(r.subcategories))B&&(v.subtractLivePlay(z,m[e.indexesTSP.teamId],m,e.indexesTSP,i),a&&v.subtractLivePlay(z,a[e.indexesTSP.teamId],a,e.indexesTSP,i)),v.addLivePlay(c,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,i),f&&v.addLivePlay(c,f[e.indexesTSP.teamId],f,e.indexesTSP,e.isLive,i);e.livePlays.set(n[e.indexesTLP.playId],n)},deleteLiveGamePlay(e,n){const i=!!n[e.indexesTLP.length],B=e.livePlays.get(n[e.indexesTLP.playId]);let z="";if(B){z=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(B[e.indexesTLP.playId]);const c=F6(B,e.indexesTLP,e.categoriesMap),m=lI(n,c,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(z,c[e.indexesTSP.teamId],c,e.indexesTSP,i),m&&y.subtractLivePlay(z,m[e.indexesTSP.teamId],m,e.indexesTSP,i)}},clearLiveTotals(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.homeTeam.resetTotalsLive(),i.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,n){e.statistics=n},updateOldSeasonId(e,n){e.oldSeasonId=n},addRankingInSubcategories(e,{getters:n,isPremiumAccount:i}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(c=>{c.homeTeamFilterGames=c.playedGames.filter(m=>e.homeTeamFilter.playingAs.includes(m.playingAs)&&e.homeTeamFilter.matchResult.includes(m.matchResult)).length,c.visitingTeamFilterGames=c.playedGames.filter(m=>e.visitingTeamFilter.playingAs.includes(m.playingAs)&&e.visitingTeamFilter.matchResult.includes(m.matchResult)).length});const B=[],z=new Map;for(const c of Object.values(e.nextGamesDataStructure))for(const m of Object.values(c.subcategories))B.push(m);n.rankingData.forEach(c=>{for(const m of B)if(m.isInGeneralCategory(c[e.indexesLS.categoryId])){z.has(m.id)?z.get(m.id).push(c):z.set(m.id,[c]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,n){e.homeGames=yK(n)},setVisitingGames(e,n){e.visitingGames=yK(n)},generateCategoriesMap(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.accomplishedCategoryIds.forEach(B=>{const z=e.categoriesMap.get(B);z?z.push(i.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[i.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:n},{command:i}){i==="on"?n("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):n("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},n){try{const m=await ffa({gameId:n.gameId});if(m){var i=[],B=[],z={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},c={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(m.data).length!==0&&(i=m.data.data.filter(a=>a[1]==n.homeTeam),B=m.data.data.filter(a=>a[1]==n.awayTeam),z=m.data.games,c=m.data.games),e("updateHomeTeamPlays",i),e("updateVisitingTeamPlays",B),e("setHomeGames",z),e("setVisitingGames",c)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(m){return Promise.reject(m)}},async fillStatisticDataPostMatch({commit:e,dispatch:n},i){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",i.gameInfo),B.push(n("setAndGetStatsPostMatch",{gameId:i.game,homeTeam:i.homeTeam,awayTeam:i.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:n,commit:i},{gameId:B,isTeamsAnalysis:z,currentSeasonId:c,isLoginChanged:m=!1,defaultFilter:a=null,gameInfo:y=null,isCupGame:f=!1}){try{let r={},v=e.seasonId!==Number(c);const _=[];i("setIsSectionLoading",!0,{root:!0}),i("setUsePastSeasonId",!1),v&&i("setSeasonId",c),i("updateGameId",Number(B)),e.oldSeasonId!==e.seasonId&&i("resetNextGamesDataStructure");const p=await n("getCurrentSeasonGames",Number(B));if(i("leagueGeneral/updateCurrentSeasonGames",p,{root:!0}),r=p.find(l=>l.game_id===Number(B)),!r&&y&&(r=y),r&&i("updateGameForAnalysis",r),r.game_status!==1&&((m||e.categoriesMap.size===0)&&i("generateCategoriesMap"),f||await n("checkTeamsData",{gameId:B,isFromBet:!!a}),(m||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&_.push(n("getSeasonStatistics"))),e.usePastSeasonId){const l=await n("getCurrentSeasonGamesLast");i("leagueGeneral/updateCurrentSeasonGames",l,{root:!0})}(m||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(l=>r.home_team===l.team_id))&&_.push(n("getCurrentSeasonTeams")),i("setHomeResultGame",r.score[0]),i("setAwayResultGame",r.score[1]),z?r.game_status!==1?(await n("fillStatisticData",{gameId:B,gameinfo:r,promises:_,defaultFilter:a}),i("updateShowPostMatchData",!1)):(i("updateStats",[]),i("updateShowPostMatchData",!0),_.push(n("fillStatisticDataPostMatch",{game:B,homeTeam:r.home_team,awayTeam:r.visiting_team,gameInfo:r})),await Promise.all(_)):i("setIsSectionLoading",!1,{root:!0})}catch(r){return Promise.reject(r)}},async fillStatisticData({commit:e,dispatch:n,getters:i,rootGetters:B,state:z},{gameId:c,gameinfo:m,promises:a=[],defaultFilter:y=null}){let f=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",m),(m.is_live||m.game_status===0)&&a.push(n("getCurrentLiveGamePlays",c)),a.push(n("getSpecialMentionsByGame",c)),a.push(n("getHomeTeamPlays")),a.push(n("getVisitingTeamPlays")),a.push(n("getCurrentSeasonPlays")),y&&a.push(gfa(y)),f=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:i,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=f.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:z.defaultFilter,needsFormat:!1}),n("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:n,rootState:i,commit:B},{gameId:z,isFromBet:c}){try{B("setUsePastSeasonId",!1)}catch(m){throw new Error(m)}},async getSpecialMentionsByGame({commit:e},n){try{const i=await ufa({gameId:n});e("addSpecialMentions",i)}catch(i){return Promise.reject(i)}},async getCurrentSeasonGames({commit:e,state:n},i){try{const{teams:B,games:z,past_season_id:c,tournament_id:m}=await lfa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,gameId:i}),a=Tfa.find(y=>y.id===m);return a&&e("setCurrentTournamentName",a.name),e("setHome",B[0]),e("setAway",B[1]),n.usePastSeasonId||e("setPastSeasonId",c),await e("updateCurrentSeasonGames",z),z&&Array.isArray(z)&&e("updateFinishedGames",z.reduce((y,f)=>(f.game_status===1&&(y+=1),y),0)),z}catch(B){return Promise.reject(B)}},async getCurrentSeasonGamesLast({commit:e,state:n}){try{const{games:i,past_season_id:B}=await fK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});return n.usePastSeasonId||e("setPastSeasonId",B),await e("updateCurrentSeasonGames",i),i&&Array.isArray(i)&&e("updateFinishedGames",i.reduce((z,c)=>(c.game_status===1&&(z+=1),z),0)),i}catch(i){return Promise.reject(i)}},async getCurrentSeasonTeams({commit:e,state:n}){try{const i=await pfa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateCurrentSeasonTeams",i.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:n}){try{const i=n.usePastSeasonId?n.pastSeasonId:n.seasonId,B=await ofa({seasonId:i});e("updateSeasonStatistics",B),e("updateOldSeasonId",i)}catch(i){return Promise.reject(i)}},updateRankingInSubcategories({state:e,commit:n,getters:i,rootGetters:B}){e.currentSeasonGames.length>0&&n("addRankingInSubcategories",{getters:i,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:n}){try{const i=await gK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.home_team});i.data&&(e("updateHomeTeamPlays",i.data.data),e("setHomeGames",i.data.games))}catch(i){return Promise.reject(i)}},async getVisitingTeamPlays({commit:e,state:n}){try{const i=await gK({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.visiting_team});i.data&&(e("updateVisitingTeamPlays",i.data.data),e("setVisitingGames",i.data.games))}catch(i){return Promise.reject(i)}},async getCurrentSeasonPlays({commit:e,state:n}){try{const i=await ifa({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateStats",i)}catch(i){return Promise.reject(new Error(i))}},async getCurrentLiveGamePlays({state:e,commit:n},i){try{const B=await cfa({gameId:i});e.livePlays=new Map,B.forEach(z=>{e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&n("addLiveGamePlay",z)})}catch(B){throw new Error(B)}},socket_new({state:e,commit:n},i){const B=i[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&n("addLiveGamePlay",B)},socket_update({state:e,commit:n},i){const B=i[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&n("updateLiveGamePlay",B)},socket_delete({state:e,commit:n},i){const B=i[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&n("deleteLiveGamePlay",B)},exitChannel({state:e,getters:n,rootState:i,rootGetters:B,commit:z}){const c=B["loginGeneral/getPremiumAccount"];n.isLive&&c&&(z("updateShowLiveData",!1),z("clearLiveTotals"),e.livePlays.clear(),Sfa.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(i=>{for(const B of Object.values(i.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const i of Object.values(e.nextGamesDataStructure))for(const B of Object.values(i.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(i=>{for(const B of Object.values(i.subcategories))B.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 Afa(){try{const{data:e}=await Ud({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const Mfa={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,n){e.booleanIsStatisticModalOpen=n},setTournamentType(e,n){e.tournamentType=n},setSectionRef(e,n){e.sectionRef=n},setSectionAnalytics(e,n){e.sectionAnalytics=n},setSeccionBetsGolTipster(e,n){e.seccionBetsGolTipster=n},setPreviewSectionAnalytics(e,n){e.previewSectionAnalytics=n},setVideoSrc(e,n){e.videoSrc=n},setVideoModalVisibility(e,n){e.isVideoModalVisible=n},setSelectedTournament(e,n){e.selectedTournament=n},setTournaments(e,n){e.tournaments=n.map(i=>({...i.tournament,seasons:i.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,n){e.tournamentSelected=n}},actions:{async fetchTournaments({state:e,commit:n}){try{if(e.tournaments.length===0){const i=await Afa();n("setTournaments",i)}}catch(i){throw new Error(i)}}}}};async function Ifa({seasonId:e,localTeamId:n,visitingTeamId:i}){try{const B=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${n}/${i}`;return(await Ud({url:B})).data}catch(B){return Promise.reject(B)}}async function Pfa({seasonId:e,localTeamId:n,visitingTeamId:i}){try{const B=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${n}/${i}`;return(await Ud({url:B})).data}catch(B){return Promise.reject(B)}}const vK=(e,n)=>{let i={};return e.forEach((B,z)=>{z==3&&(n[0]==35||n[0]==54)&&(n[z]==2?n[z]=1:n[z]=2),z==2&&(n[0]==35||n[0]==54)&&(n[z]==1?n[z]=2:n[z]==2&&(n[z]=1)),i[B]=n[z]}),i},_K=(e,n)=>e.filter(B=>{const z=n.playingAs.includes(B.playing_as),c=n.matchResult.includes(B.match_result),m=n.sections.includes(B.section);return z&&c&&m}),bK=[{name:"Goles",color:"#4A90E2",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#FF8000",points:[1,2,3],categories:[12,55,35,54,510]}];(function(){function e(n,i,B){return typeof B>"u"||+B==0?Math[n](i):(i=+i,B=+B,isNaN(i)||!(typeof B=="number"&&B%1===0)?NaN:(i=i.toString().split("e"),i=Math[n](+(i[0]+"e"+(i[1]?+i[1]-B:-B))),i=i.toString().split("e"),+(i[0]+"e"+(i[1]?+i[1]+B:B))))}Math.ceil10||(Math.ceil10=function(n,i){return e("ceil",n,i)})})();function xK(e,n){let i=n*-1;return Math.ceil10(e,i)}const Bfa={...Mfa,...mfa,...Efa,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,n,i)=>{const B=e.xGLocalPlays,z="homeTeamFilter",c=i.nextGeneral[z];return _K(B,c)||[]},playsAway:(e,n,i)=>{const B=e.xGVisitingPlays,z="visitingTeamFilter",c=i.nextGeneral[z];return _K(B,c)},goalsQtyLocal:(e,n)=>{const i=bK.find(B=>B.name==="Goles");return n.playsLocal.filter(B=>i.categories.includes(B.category_id)).length},goalsQtyAway:(e,n)=>{const i=bK.find(B=>B.name==="Goles");return n.playsAway.filter(B=>i.categories.includes(B.category_id)).length},shotsOnGoalQtyLocal:(e,n)=>n.playsLocal.filter(i=>i.category_id===510).length,shotsOnGoalQtyAway:(e,n)=>n.playsAway.filter(i=>i.category_id===510).length,xGLocal:(e,n)=>{const i=new Set;let B=n.playsLocal.reduce((z,c)=>(i.has(c.moment_of_play)||(i.add(c.moment_of_play),z+=c.xG2),z),0);return xK(B,2)},xGAway:(e,n)=>{const i=new Set;let B=n.playsAway.reduce((z,c)=>(i.has(c.moment_of_play)||(i.add(c.moment_of_play),z+=c.xG2),z),0);return xK(B,2)}},mutations:{setTeamSelected(e,n){e.teamSelected=n},setPlays(e,n){e.xGLocalPlays=n.local_team.map(i=>vK(n.data_headers,i)),e.xGVisitingPlays=n.visiting_team.map(i=>vK(n.data_headers,i))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:n,localTeamId:i,visitingTeamId:B,postMatch:z=!1}){try{let c={};z?c=await Pfa({seasonId:n,localTeamId:i,visitingTeamId:B}):c=await Ifa({seasonId:n,localTeamId:i,visitingTeamId:B}),e("setPlays",c)}catch(c){return Promise.reject(c)}}}}}};function Nfa(e){for(const[n,i]of Object.entries(Bfa))e.hasModule(n)||e.registerModule(n,i)}const Ofa={class:"subcategory-group"},Dfa={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",Ofa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Ns),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":z=>B.isSelected=z,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Lfa=_l(Dfa,[["__scopeId","data-v-85bc2114"]]),Ffa={class:"filter-subcategories"},zfa=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",Ffa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(Lfa,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),z6=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),Rfa={class:"details__header"},Vfa=z6(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),$fa={class:"details__header__checkbox"},jfa={class:"details__body"},Ufa={class:"details__body__playing-as"},Gfa=["onClick"],Hfa={class:"details__header"},Wfa=z6(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),qfa={class:"details__header__checkbox"},Yfa={class:"details__body"},Xfa=z6(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Zfa={class:"details__body__game-section"},Jfa=["onClick"],Kfa={class:"details__body"},Qfa=z6(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),ema={class:"details__body__game-section"},tma=["onClick"],ama=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__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 n=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const i=t.computed(()=>n.playingAs.every(r=>r.isSelected)),B=t.computed(()=>n.gameSections.every(r=>r.isSelected)),z=t.computed(()=>n.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),c=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function m(r){r?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(r){n.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){n.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function f(r){r?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(c.value)},[t.createElementVNode("div",Rfa,[Vfa,t.createElementVNode("div",$fa,[t.createVNode(t.unref(Ns),{label:"Todos","model-value":i.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",jfa,[t.createElementVNode("div",Ufa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>a(_)},t.toDisplayString(_.name),11,Gfa))),128))])]),t.createElementVNode("div",Hfa,[Wfa,t.createElementVNode("div",qfa,[t.createVNode(t.unref(Ns),{label:"Todos","model-value":B.value,"onUpdate:modelValue":f},null,8,["model-value"])])]),t.createElementVNode("div",Yfa,[Xfa,t.createElementVNode("div",Zfa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.firstHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,Jfa))),128))])]),t.createElementVNode("div",Kfa,[Qfa,t.createElementVNode("div",ema,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.secondHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,tma))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),nma={class:"filter-field"},rma=Object.freeze(Object.defineProperty({__proto__:null,default:_l({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(B,z)=>z+1));function i(){}return(B,z)=>(t.openBlock(),t.createElementBlock("div",nma,[t.createVNode(t.unref(NW),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":i},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"})),ima={class:"subcategory-group"},oma={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",ima,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Os),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":z=>B.isSelected=z,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},sma=bl(oma,[["__scopeId","data-v-85bc2114"]]),lma={class:"filter-subcategories"},cma=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,i)=>(t.openBlock(),t.createElementBlock("div",lma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(sma,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),R6=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),uma={class:"details__header"},dma=R6(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),hma={class:"details__header__checkbox"},pma={class:"details__body"},fma={class:"details__body__playing-as"},mma=["onClick"],gma={class:"details__header"},yma=R6(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),vma={class:"details__header__checkbox"},_ma={class:"details__body"},bma=R6(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),xma={class:"details__body__game-section"},wma=["onClick"],kma={class:"details__body"},Cma=R6(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Sma={class:"details__body__game-section"},Tma=["onClick"],Ema=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__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 n=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const i=t.computed(()=>n.playingAs.every(r=>r.isSelected)),B=t.computed(()=>n.gameSections.every(r=>r.isSelected)),z=t.computed(()=>n.gameSections.reduce((r,v)=>(v.value<=3?r.firstHalf.push(v):r.secondHalf.push(v),r),{firstHalf:[],secondHalf:[]})),c=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function m(r){r?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(r){n.playingAs.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){n.gameSections.filter(v=>v.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function f(r){r?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(r,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(c.value)},[t.createElementVNode("div",uma,[dma,t.createElementVNode("div",hma,[t.createVNode(t.unref(Os),{label:"Todos","model-value":i.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",pma,[t.createElementVNode("div",fma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>a(_)},t.toDisplayString(_.name),11,mma))),128))])]),t.createElementVNode("div",gma,[yma,t.createElementVNode("div",vma,[t.createVNode(t.unref(Os),{label:"Todos","model-value":B.value,"onUpdate:modelValue":f},null,8,["model-value"])])]),t.createElementVNode("div",_ma,[bma,t.createElementVNode("div",xma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.firstHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,wma))),128))])]),t.createElementVNode("div",kma,[Cma,t.createElementVNode("div",Sma,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value.secondHalf,(_,p)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${p}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:l=>y(_)},t.toDisplayString(_.text),11,Tma))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),Ama={class:"filter-field"},Mma=Object.freeze(Object.defineProperty({__proto__:null,default:bl({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(B,z)=>z+1));function i(){}return(B,z)=>(t.openBlock(),t.createElementBlock("div",Ama,[t.createVNode(t.unref(PX),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":i},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));yd.GSCGameData=rfa,yd.connectSocket=xB,yd.disconnectSocket=wB,yd.getSocket=bB,yd.registerStoreModules=Nfa,Object.defineProperty(yd,Symbol.toStringTag,{value:"Module"})});
|