@golstats/gsc-game-data 1.0.96 → 1.0.97
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-d26afb7d-KpC1Z7yD-fc321c51.js → FilterConditions-d26afb7d-KpC1Z7yD-f1d4847a.js} +1 -1
- package/dist/{FilterField-d8c662e7-Fhk1ixKS-d7fa58a1.js → FilterField-d8c662e7-Fhk1ixKS-e2b07cbe.js} +1 -1
- package/dist/{FilterSubcategories-33303037-BuTD3Tee-4a561d3b.js → FilterSubcategories-33303037-BuTD3Tee-7e4ddd8b.js} +1 -1
- package/dist/gsc-game-data.js +1 -1
- package/dist/gsc-game-data.umd.cjs +1 -1
- package/dist/{index-ae721d4d.js → index-e0f7fcab.js} +4 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -3570,5 +3570,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3570
3570
|
* vuex v4.0.2
|
|
3571
3571
|
* (c) 2021 Evan You
|
|
3572
3572
|
* @license MIT
|
|
3573
|
-
*/var C7t="store";function zp(e,a){Object.keys(e).forEach(function(r){return a(e[r],r)})}function GV(e){return e!==null&&typeof e=="object"}function E7t(e){return e&&typeof e.then=="function"}function jc(e,a){if(!e)throw new Error("[vuex] "+a)}function S7t(e,a){return function(){return e(a)}}function WV(e,a,r){return a.indexOf(e)<0&&(r&&r.prepend?a.unshift(e):a.push(e)),function(){var u=a.indexOf(e);u>-1&&a.splice(u,1)}}function qV(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;D_(e,r,[],e._modules.root,!0),h8(e,r,a)}function h8(e,a,r){var u=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var y=e._wrappedGetters,i={};zp(y,function(l,n){i[n]=S7t(l,e),Object.defineProperty(e.getters,n,{get:function(){return i[n]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&M7t(e),u&&r&&e._withCommit(function(){u.data=null})}function D_(e,a,r,u,y){var i=!r.length,l=e._modules.getNamespace(r);if(u.namespaced&&(e._modulesNamespaceMap[l]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+l+" for the namespaced module "+r.join("/")),e._modulesNamespaceMap[l]=u),!i&&!y){var n=f8(a,r.slice(0,-1)),_=r[r.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&_ in n&&console.warn('[vuex] state field "'+_+'" was overridden by a module with the same name at "'+r.join(".")+'"'),n[_]=u.state})}var f=u.context=T7t(e,l,r);u.forEachMutation(function(o,m){var x=l+m;A7t(e,x,o,f)}),u.forEachAction(function(o,m){var x=o.root?m:l+m,c=o.handler||o;N7t(e,x,c,f)}),u.forEachGetter(function(o,m){var x=l+m;B7t(e,x,o,f)}),u.forEachChild(function(o,m){D_(e,a,r.concat(m),o,y)})}function T7t(e,a,r){var u=a==="",y={dispatch:u?e.dispatch:function(i,l,n){var _=$_(i,l,n),f=_.payload,o=_.options,m=_.type;if((!o||!o.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+_.type+", global type: "+m);return}return e.dispatch(m,f)},commit:u?e.commit:function(i,l,n){var _=$_(i,l,n),f=_.payload,o=_.options,m=_.type;if((!o||!o.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+_.type+", global type: "+m);return}e.commit(m,f,o)}};return Object.defineProperties(y,{getters:{get:u?function(){return e.getters}:function(){return YV(e,a)}},state:{get:function(){return f8(e.state,r)}}}),y}function YV(e,a){if(!e._makeLocalGettersCache[a]){var r={},u=a.length;Object.keys(e.getters).forEach(function(y){if(y.slice(0,u)===a){var i=y.slice(u);Object.defineProperty(r,i,{get:function(){return e.getters[y]},enumerable:!0})}}),e._makeLocalGettersCache[a]=r}return e._makeLocalGettersCache[a]}function A7t(e,a,r,u){var y=e._mutations[a]||(e._mutations[a]=[]);y.push(function(i){r.call(e,u.state,i)})}function N7t(e,a,r,u){var y=e._actions[a]||(e._actions[a]=[]);y.push(function(i){var l=r.call(e,{dispatch:u.dispatch,commit:u.commit,getters:u.getters,state:u.state,rootGetters:e.getters,rootState:e.state},i);return E7t(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(n){throw e._devtoolHook.emit("vuex:error",n),n}):l})}function B7t(e,a,r,u){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(y){return r(u.state,u.getters,y.state,y.getters)}}function M7t(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&jc(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function f8(e,a){return a.reduce(function(r,u){return r[u]},e)}function $_(e,a,r){return GV(e)&&e.type&&(r=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&jc(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:r}}var I7t="vuex bindings",ZV="vuex:mutations",m8="vuex:actions",uf="vuex",O7t=0;function F7t(e,a){k7t({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:[I7t]},function(r){r.addTimelineLayer({id:ZV,label:"Vuex Mutations",color:XV}),r.addTimelineLayer({id:m8,label:"Vuex Actions",color:XV}),r.addInspector({id:uf,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree(function(u){if(u.app===e&&u.inspectorId===uf)if(u.filter){var y=[];eL(y,a._modules.root,u.filter,""),u.rootNodes=y}else u.rootNodes=[QV(a._modules.root,"")]}),r.on.getInspectorState(function(u){if(u.app===e&&u.inspectorId===uf){var y=u.nodeId;YV(a,y),u.state=V7t(R7t(a._modules,y),y==="root"?a.getters:a._makeLocalGettersCache,y)}}),r.on.editInspectorState(function(u){if(u.app===e&&u.inspectorId===uf){var y=u.nodeId,i=u.path;y!=="root"&&(i=y.split("/").filter(Boolean).concat(i)),a._withCommit(function(){u.set(a._state.data,i,u.state.value)})}}),a.subscribe(function(u,y){var i={};u.payload&&(i.payload=u.payload),i.state=y,r.notifyComponentUpdate(),r.sendInspectorTree(uf),r.sendInspectorState(uf),r.addTimelineEvent({layerId:ZV,event:{time:Date.now(),title:u.type,data:i}})}),a.subscribeAction({before:function(u,y){var i={};u.payload&&(i.payload=u.payload),u._id=O7t++,u._time=Date.now(),i.state=y,r.addTimelineEvent({layerId:m8,event:{time:u._time,title:u.type,groupId:u._id,subtitle:"start",data:i}})},after:function(u,y){var i={},l=Date.now()-u._time;i.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},u.payload&&(i.payload=u.payload),i.state=y,r.addTimelineEvent({layerId:m8,event:{time:Date.now(),title:u.type,groupId:u._id,subtitle:"end",data:i}})}})})}var XV=8702998,z7t=6710886,P7t=16777215,KV={label:"namespaced",textColor:P7t,backgroundColor:z7t};function JV(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function QV(e,a){return{id:a||"root",label:JV(a),tags:e.namespaced?[KV]:[],children:Object.keys(e._children).map(function(r){return QV(e._children[r],a+r+"/")})}}function eL(e,a,r,u){u.includes(r)&&e.push({id:u||"root",label:u.endsWith("/")?u.slice(0,u.length-1):u||"Root",tags:a.namespaced?[KV]:[]}),Object.keys(a._children).forEach(function(y){eL(e,a._children[y],r,u+y+"/")})}function V7t(e,a,r){a=r==="root"?a:a[r];var u=Object.keys(a),y={state:Object.keys(e.state).map(function(l){return{key:l,editable:!0,value:e.state[l]}})};if(u.length){var i=L7t(a);y.getters=Object.keys(i).map(function(l){return{key:l.endsWith("/")?JV(l):l,editable:!1,value:g8(function(){return i[l]})}})}return y}function L7t(e){var a={};return Object.keys(e).forEach(function(r){var u=r.split("/");if(u.length>1){var y=a,i=u.pop();u.forEach(function(l){y[l]||(y[l]={_custom:{value:{},display:l,tooltip:"Module",abstract:!0}}),y=y[l]._custom.value}),y[i]=g8(function(){return e[r]})}else a[r]=g8(function(){return e[r]})}),a}function R7t(e,a){var r=a.split("/").filter(function(u){return u});return r.reduce(function(u,y,i){var l=u[y];if(!l)throw new Error('Missing module "'+y+'" for path "'+a+'".');return i===r.length-1?l:l._children},a==="root"?e:e.root._children)}function g8(e){try{return e()}catch(a){return a}}var Uc=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=(typeof r=="function"?r():r)||{}},tL={namespaced:{configurable:!0}};tL.namespaced.get=function(){return!!this._rawModule.namespaced},Uc.prototype.addChild=function(e,a){this._children[e]=a},Uc.prototype.removeChild=function(e){delete this._children[e]},Uc.prototype.getChild=function(e){return this._children[e]},Uc.prototype.hasChild=function(e){return e in this._children},Uc.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)},Uc.prototype.forEachChild=function(e){zp(this._children,e)},Uc.prototype.forEachGetter=function(e){this._rawModule.getters&&zp(this._rawModule.getters,e)},Uc.prototype.forEachAction=function(e){this._rawModule.actions&&zp(this._rawModule.actions,e)},Uc.prototype.forEachMutation=function(e){this._rawModule.mutations&&zp(this._rawModule.mutations,e)},Object.defineProperties(Uc.prototype,tL);var Pp=function(e){this.register([],e,!1)};Pp.prototype.get=function(e){return e.reduce(function(a,r){return a.getChild(r)},this.root)},Pp.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(r,u){return a=a.getChild(u),r+(a.namespaced?u+"/":"")},"")},Pp.prototype.update=function(e){aL([],this.root,e)},Pp.prototype.register=function(e,a,r){var u=this;r===void 0&&(r=!0),process.env.NODE_ENV!=="production"&&iL(e,a);var y=new Uc(a,r);if(e.length===0)this.root=y;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],y)}a.modules&&zp(a.modules,function(l,n){u.register(e.concat(n),l,r)})},Pp.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),r=e[e.length-1],u=a.getChild(r);if(!u){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}u.runtime&&a.removeChild(r)},Pp.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),r=e[e.length-1];return a?a.hasChild(r):!1};function aL(e,a,r){if(process.env.NODE_ENV!=="production"&&iL(e,r),a.update(r),r.modules)for(var u in r.modules){if(!a.getChild(u)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+u+"' on hot reloading, manual reload is needed");return}aL(e.concat(u),a.getChild(u),r.modules[u])}}var rL={assert:function(e){return typeof e=="function"},expected:"function"},D7t={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},nL={getters:rL,mutations:rL,actions:D7t};function iL(e,a){Object.keys(nL).forEach(function(r){if(a[r]){var u=nL[r];zp(a[r],function(y,i){jc(u.assert(y),$7t(e,r,i,y,u.expected))})}})}function $7t(e,a,r,u,y){var i=a+" should be "+y+' but "'+a+"."+r+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(u)+".",i}var Fl=function e(a){var r=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(jc(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),jc(this instanceof e,"store must be called with the new operator."));var u=a.plugins;u===void 0&&(u=[]);var y=a.strict;y===void 0&&(y=!1);var i=a.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pp(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var l=this,n=this,_=n.dispatch,f=n.commit;this.dispatch=function(m,x){return _.call(l,m,x)},this.commit=function(m,x,c){return f.call(l,m,x,c)},this.strict=y;var o=this._modules.root.state;D_(this,o,[],this._modules.root),h8(this,o),u.forEach(function(m){return m(r)})},y8={state:{configurable:!0}};Fl.prototype.install=function(e,a){e.provide(a||C7t,this),e.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;r&&F7t(e,this)},y8.state.get=function(){return this._state.data},y8.state.set=function(e){process.env.NODE_ENV!=="production"&&jc(!1,"use store.replaceState() to explicit replace store state.")},Fl.prototype.commit=function(e,a,r){var u=this,y=$_(e,a,r),i=y.type,l=y.payload,n=y.options,_={type:i,payload:l},f=this._mutations[i];if(!f){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){f.forEach(function(o){o(l)})}),this._subscribers.slice().forEach(function(o){return o(_,u.state)}),process.env.NODE_ENV!=="production"&&n&&n.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Fl.prototype.dispatch=function(e,a){var r=this,u=$_(e,a),y=u.type,i=u.payload,l={type:y,payload:i},n=this._actions[y];if(!n){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+y);return}try{this._actionSubscribers.slice().filter(function(f){return f.before}).forEach(function(f){return f.before(l,r.state)})}catch(f){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(f))}var _=n.length>1?Promise.all(n.map(function(f){return f(i)})):n[0](i);return new Promise(function(f,o){_.then(function(m){try{r._actionSubscribers.filter(function(x){return x.after}).forEach(function(x){return x.after(l,r.state)})}catch(x){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(x))}f(m)},function(m){try{r._actionSubscribers.filter(function(x){return x.error}).forEach(function(x){return x.error(l,r.state,m)})}catch(x){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(x))}o(m)})})},Fl.prototype.subscribe=function(e,a){return WV(e,this._subscribers,a)},Fl.prototype.subscribeAction=function(e,a){var r=typeof e=="function"?{before:e}:e;return WV(r,this._actionSubscribers,a)},Fl.prototype.watch=function(e,a,r){var u=this;return process.env.NODE_ENV!=="production"&&jc(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(u.state,u.getters)},a,Object.assign({},r))},Fl.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},Fl.prototype.registerModule=function(e,a,r){r===void 0&&(r={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(jc(Array.isArray(e),"module path must be a string or an Array."),jc(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),D_(this,this.state,e,this._modules.get(e),r.preserveState),h8(this,this.state)},Fl.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&jc(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var r=f8(a.state,e.slice(0,-1));delete r[e[e.length-1]]}),qV(this)},Fl.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&jc(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Fl.prototype.hotUpdate=function(e){this._modules.update(e),qV(this,!0)},Fl.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(Fl.prototype,y8);var j7t=H7t(function(e,a){var r={};return process.env.NODE_ENV!=="production"&&!oL(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),U7t(a).forEach(function(u){var y=u.key,i=u.val;r[y]=function(){for(var l=[],n=arguments.length;n--;)l[n]=arguments[n];var _=this.$store.commit;if(e){var f=G7t(this.$store,"mapMutations",e);if(!f)return;_=f.context.commit}return typeof i=="function"?i.apply(this,[_].concat(l)):_.apply(this.$store,[i].concat(l))}}),r});function U7t(e){return oL(e)?Array.isArray(e)?e.map(function(a){return{key:a,val:a}}):Object.keys(e).map(function(a){return{key:a,val:e[a]}}):[]}function oL(e){return Array.isArray(e)||GV(e)}function H7t(e){return function(a,r){return typeof a!="string"?(r=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,r)}}function G7t(e,a,r){var u=e._modulesNamespaceMap[r];return process.env.NODE_ENV!=="production"&&!u&&console.error("[vuex] module namespace not found in "+a+"(): "+r),u}const W7t="/icn-play.svg",q7t="/icn-tiros-de-esquina.svg",Y7t="/icn-tiro-a-porteria.svg",Z7t="/icn-cambio.svg",X7t="/icn-falta.svg",K7t="/atajada.svg",J7t="/fuera-de-lugar.svg",_8="/gol.svg",Q7t="/var.png",ekt="/tiempo-agregado.svg",tkt="/jugada-peligrosa.svg",akt="/penal-marcado.svg",rkt="/penal-fallado.svg",nkt="/inicia-el-partido.svg",ikt="/fin-del-partido.svg",okt="/icn-tarjeta-amarilla.svg",skt="/icn-tarjeta-roja.svg",lkt=[1,2,3,4,6],ckt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],a=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return u8.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):u8.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):u8.RED_CARD_IDS.includes(a)?(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(a=>m7t(a))),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||lkt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...j7t("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,a]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(a),teamId:this.gameEvent.team_id})}}},dkt=e=>(t.pushScopeId("data-v-c284b7dc"),e=e(),t.popScopeId(),e),ukt={class:"time-line-event__details"},pkt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},hkt=["src"],fkt=dkt(()=>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)),mkt={class:"time-line-event__details__info"},gkt={key:0,class:"time-line-event__details__info__header__players"},ykt={class:"time-line-event__details__info__header__players__div-img"},_kt=["src"],vkt={class:"time-line-event__details__info__body"},bkt={class:"time-line-event__details__info__body__comment"},xkt={class:"time-line-event__minute__container"},wkt={class:"time-line-event__minute__container__text"},kkt={class:"time-line-event__minute__container__icon-container"},Ckt={class:"time-line-event__minute__container__icon-container__icon"},Ekt={key:0,src:q7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Skt={key:1,src:Y7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Tkt={key:2,src:Z7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Akt={key:3,src:X7t,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Nkt={key:4,src:K7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Bkt={key:5,src:J7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Mkt={key:6,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ikt={key:7,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Okt={key:8,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Fkt={key:9,src:Q7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zkt={key:10,src:ekt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Pkt={key:11,src:tkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vkt={key:12,src:akt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Lkt={key:13,src:rkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Rkt={key:14,src:nkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Dkt={key:15,src:ikt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$kt={key:16,src:okt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jkt={key:17,src:skt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Ukt={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 Hkt(e,a,r,u,y,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${r.width}px`}),key:y.gameEventKey},[t.createElementVNode("div",ukt,[r.gameEvent.video_link!=="-"&&r.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=l=>i.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[t.createElementVNode("video",pkt,[t.createElementVNode("source",{src:r.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,hkt)]),fkt])):t.createCommentVNode("",!0),t.createElementVNode("div",mkt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[r.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",gkt,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":n===1}]),key:n},[t.createElementVNode("div",ykt,[t.createElementVNode("img",{src:l,alt:""},null,8,_kt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:a[1]||(a[1]=l=>i.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[r.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:W7t,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(r.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${r.gameEvent.event_type_name}`:r.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.gameEvent.category_id?r.gameEvent.event_type_id===5?r.gameEvent.category_name:r.gameEvent.event_type_name==="Gol"?r.gameEvent.event_type_name+" de "+r.gameEvent.team_name:r.gameEvent.event_type_name:r.gameEvent.comments),1)],2)],2),t.createElementVNode("div",vkt,[t.createElementVNode("div",bkt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",i.minuteClasses])},[t.createElementVNode("div",xkt,[t.createElementVNode("div",wkt,t.toDisplayString(r.gameEvent.minute)+"'",1),t.createElementVNode("div",kkt,[t.createElementVNode("div",Ckt,[r.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",Ekt)):r.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",Skt)):r.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",Tkt)):r.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",Akt)):r.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",Nkt)):r.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Bkt)):r.gameEvent.category_id==6&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==5&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==1&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==2&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==3&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==7&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==12&&r.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",Mkt)):r.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Ikt)):r.gameEvent.category_id==13||r.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Okt)):r.gameEvent.category_id==30||r.gameEvent.category_id==31||r.gameEvent.category_id==32||r.gameEvent.category_id==33||r.gameEvent.category_id==34||r.gameEvent.category_id==35||r.gameEvent.category_id==36||r.gameEvent.category_id==37||r.gameEvent.category_id==38||r.gameEvent.category_id==39||r.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",Fkt)):r.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",zkt)):r.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",Pkt)):r.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",Vkt)):r.gameEvent.category_id==15||r.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Lkt)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==16||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==18||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==20||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Rkt)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==13||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==17||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==19||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==21||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Dkt)):r.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",$kt)):r.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",jkt)):(t.openBlock(),t.createElementBlock("img",Ukt))])])])],2)],6)}const Gkt=$0(ckt,[["render",Hkt],["__scopeId","data-v-c284b7dc"]]),Wkt={"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"},qkt={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 j_=null;const Ykt={name:"TimeLine",components:{Tooltip:u7t,TimeLineEvent:Gkt},mixins:[h7t],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})}},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 a=await this.fetchGameEvents(e);a?(this.gameEvents=[...a],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(a){throw new Error(a)}},getGameEventClassAndSetIcon(e,a){return e.icon=a===0?"inicio_del_partido":Wkt[`${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:a}}=await $V.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},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)j_=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),j_.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const r=this.$refs[`gameEventDiv${a}`][0],u=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,y=e+12;r&&(r.style.height=`${y}px`),u&&(u.style.height=`${y}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let a=0;switch(e){case 1:a=0;break;case 2:a=45;break;case 3:a=90;break;case 4:a=105;break;case 5:a=120;break}return a},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const a=this.gameEvents.findIndex(r=>r.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const r=qkt[a.game_status];r&&this.timeLineStatuses.push({...r,gameEvent:a})}),this.timeLineStatuses.sort((a,r)=>r.weight-a.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const a=this.gameData[e].team_id;return f7t(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){j_&&j_.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,a]){this.channelName===e&&this.addGameEventFromChannel(a)},update_mxm([e,a]){this.channelName===e&&(this.deleteGameEventFromChannel(a),this.addGameEventFromChannel(a))},delete_mxm([e,a]){this.channelName===e&&this.deleteGameEventFromChannel(a)}}},sL=e=>(t.pushScopeId("data-v-f6284340"),e=e(),t.popScopeId(),e),Zkt={ref:"timeLine",class:"time-line"},Xkt={class:"time-line__header"},Kkt={class:"time-line__header__dot"},Jkt={class:"time-line__header__dot__home-team team-logo"},Qkt=["src"],e9t={class:"time-line__header__dot__away-team team-logo"},t9t=["src"],a9t={class:"time-line__game-events"},r9t={key:1,class:"start-line"},n9t=sL(()=>t.createElementVNode("div",null,null,-1)),i9t=sL(()=>t.createElementVNode("div",null,null,-1)),o9t=[n9t,i9t],s9t={key:1,class:"noEventText"},l9t={class:"tooltip-data"},c9t=["src"];function d9t(e,a,r,u,y,i){const l=t.resolveComponent("TimeLineEvent"),n=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Zkt,[t.createElementVNode("div",Xkt,[t.createElementVNode("div",Kkt,[t.createElementVNode("div",Jkt,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,Qkt)]),t.createElementVNode("div",e9t,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,t9t)])])]),t.createElementVNode("div",a9t,[r.gameData.status!==4||r.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:y.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(_,f)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:_.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${f}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(_,f))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(_))},[t.createVNode(l,{"game-event":_,"is-mobile":i.isMobile,"time-line-width":y.timeLineWidth,width:i.gameEventWidth,onEventHeight:o=>i.updateContainerHeight(o,f),onPlayerChanged:a[0]||(a[0]=o=>e.$emit("player-changed",o)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","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),r.gameData.status===1&&f===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",r9t,o9t)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",s9t,"Aún no comienza el partido"))])],512),t.createVNode(n,{data:y.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",l9t,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:y.dataVideo.link,format:"video/mp4"},null,8,c9t)])])]),_:1},8,["data"])],64)}const u9t=$0(Ykt,[["render",d9t],["__scopeId","data-v-f6284340"]]),p9t={class:"game-time-line__options"},h9t={class:"game-time-line__timeline"},f9t={__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:()=>({})}},setup(e){$V.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const a=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"}),r=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 u=null;const y=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),l=t.ref({}),n=t.ref(null),_=t.ref(0),f=t.computed(()=>{let s="all";return i.value==="1er tiempo"||i.value==="1er"?s="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(s="secondHalf"),s}),o=t.computed(()=>_.value<500);function m(s){i.value=s}function x(s){l.value=s}function c(){if(window.ResizeObserver)u=new ResizeObserver(()=>{_.value=n.value.clientWidth}),u.observe(n.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{c()}),t.onBeforeUnmount(()=>{u&&u.unobserve(n.value)}),(s,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:n,class:"game-time-line"},[t.createElementVNode("div",p9t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,p=>(t.openBlock(),t.createElementBlock("div",{key:p,class:"game-time-line__options__option"},[t.createVNode(G6t,t.mergeProps(_.value<390?r.value:a.value,{text:p=="Todo"?p:_.value<390?p.substring(0,3):p,"is-active":i.value===p,onClick:h=>m(p)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",h9t,[t.createVNode(u9t,{"game-data":e.game,"time-line-period":f.value,"is-mobile":o.value,socket:e.socket,onGameEventsByPeriodFilled:x},null,8,["game-data","time-line-period","is-mobile","socket"])])],512))}},m9t=$0(f9t,[["__scopeId","data-v-787294df"]]);function g9t(e){const a=t.ref({width:0,height:0});function r(){const u=e.value.getBoundingClientRect();a.value.width=u.width,a.value.height=u.height}return t.onMounted(()=>{r(),window.addEventListener("resize",r)}),t.onUnmounted(()=>{window.removeEventListener("resize",r)}),{elementSize:a}}const y9t=(e,a)=>{const r=e.__vccOpts||e;for(const[u,y]of a)r[u]=y;return r},v8={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,a=this.$refs.content.scrollWidth;a>0&&e>0&&(a>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},lL=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},cL=v8.setup;v8.setup=cL?(e,a)=>(lL(),cL(e,a)):lL;const _9t={ref:"gscScrollableContainer",class:"scrollable-container"},v9t={class:"scrollable-arrows"},b9t=["width","height","viewBox"],x9t=["stroke"],w9t={class:"scrollable-wrapper"},k9t={class:"scrollable-arrows"},C9t=["width","height","viewBox"],E9t=["stroke"];function S9t(e,a,r,u,y,i){return t.openBlock(),t.createElementBlock("div",_9t,[r.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...l)=>i.scrollLeft&&i.scrollLeft(...l))},[t.createElementVNode("div",v9t,[(t.openBlock(),t.createElementBlock("svg",{width:r.arrowsWidth,height:r.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:r.arrowsColor},null,8,x9t)],8,b9t))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...l)=>i.getScroll&&i.getScroll(...l))},[t.createElementVNode("div",w9t,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),r.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...l)=>i.scrollRight&&i.scrollRight(...l))},[t.createElementVNode("div",k9t,[(t.openBlock(),t.createElementBlock("svg",{width:r.arrowsWidth,height:r.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:r.arrowsColor},null,8,E9t)],8,C9t))])],2)):t.createCommentVNode("",!0)],512)}const T9t=y9t(v8,[["render",S9t],["__scopeId","data-v-b548a08d"]]),A9t=(e,a)=>{const r=e.__vccOpts||e;for(const[u,y]of a)r[u]=y;return r},b8={components:{GSCSlider:T9t},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:a}=g9t(e);return{myDivRef:e,elementSize:a}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var a={};return e.width>768?a={fontSize:"16px"}:e.width>480?a={fontSize:"14px"}:a={fontSize:"12px"},a}}},dL=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},uL=b8.setup;b8.setup=uL?(e,a)=>(dL(),uL(e,a)):dL;const N9t={ref:"myDivRef"},B9t={key:0,class:"gs-switch-container"},M9t=["onClick"],I9t={key:1,class:"gs-switch-container-type"},O9t=["onClick"],F9t={key:2,class:"gs-switch-container-carousel"},z9t=["onClick"];function P9t(e,a,r,u,y,i){const l=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",N9t,[r.type==0?(t.openBlock(),t.createElementBlock("div",B9t,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(u.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,color:"grey !important"}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,M9t))),128))],4),t.renderSlot(e.$slots,r.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),r.type==1?(t.openBlock(),t.createElementBlock("div",I9t,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(u.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:r.backgroundOptionDisable}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,O9t))),128))],4)])):t.createCommentVNode("",!0),r.type==2?(t.openBlock(),t.createElementBlock("div",F9t,[t.createVNode(l,{arrows:r.arrow,"background-color":r.background,"px-scroll":r.pxScroll,"scroll-color":r.scrollColor,"arrows-position":r.arrowsPosition,arrowsScrollHide:r.arrowsScrollHide,"arrows-background":r.arrowsBackground,"arrows-container-bg-l":r.arrowsContainerBgL,"arrows-container-bg-r":r.arrowsContainerBgR,"arrows-margin":r.arrowsMargin,"arrows-radius":r.arrowsRadius,"arrows-border":r.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,color:"grey !important"}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,z9t))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const pL=A9t(b8,[["render",P9t],["__scopeId","data-v-8a86dfaf"]]);function hL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function V9t(e){if(e.__esModule)return e;var a=e.default;if(typeof a=="function"){var r=function u(){return this instanceof u?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};r.prototype=a.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(u){var y=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(r,u,y.get?y:{enumerable:!0,get:function(){return e[u]}})}),r}var x8={exports:{}};function w8(){}w8.prototype={on:function(e,a,r){var u=this.e||(this.e={});return(u[e]||(u[e]=[])).push({fn:a,ctx:r}),this},once:function(e,a,r){var u=this;function y(){u.off(e,y),a.apply(r,arguments)}return y._=a,this.on(e,y,r)},emit:function(e){var a=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),u=0,y=r.length;for(u;u<y;u++)r[u].fn.apply(r[u].ctx,a);return this},off:function(e,a){var r=this.e||(this.e={}),u=r[e],y=[];if(u&&a)for(var i=0,l=u.length;i<l;i++)u[i].fn!==a&&u[i].fn._!==a&&y.push(u[i]);return y.length?r[e]=y:delete r[e],this}},x8.exports=w8,x8.exports.TinyEmitter=w8;var L9t=x8.exports,R9t=L9t,D9t=new R9t;const U_=hL(D9t),dBt="",$9t={class:"game-data__header"},j9t={class:"game-data__header__tournament-season-dropdown"},U9t={class:"game-data__header__teams-carousel"},H9t={class:"game-data__body"},G9t={class:"game-data__body__menu"},W9t={class:"game-data__body__menu__contmenuswitch"};ig.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const q9t=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:IQ,GSCGameTimeLine:m9t,GscSwitchComponent:pL,GSCLineupsMain:e0e,GSCDatosGSMain:G4e,GSCVideoGame:yTe,GSCSummaryMain:Jrt,GSCTacticaFijaMain:U6t}}),Y9t=Si(Object.assign(q9t,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>({})},isSynchronization:{type:Boolean,default:!1}},emits:["openmedia","change-season-id","onOpenProfile"],setup(e,{emit:a}){const r=e,u=bb();U_.on("socket-connected",()=>{u.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)});const y=t.ref({season:[]}),i=t.ref({}),l=t.ref({}),n=t.ref(!0),_=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),f=t.ref([{componentName:"GSCSummaryMain",name:"Resumen",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"GSCDatosGSMain",name:"Datos Golstats",id:3},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Tactica Fija",id:7}]);let o=null;const m=t.ref(null),x=t.ref(0),c=t.ref(f.value[0]);let s=t.ref("");const d=t.computed(()=>{const A=[];return i.value&&i.value.id&&(A.push({id:i.value.id,name:i.value.name,type:i.value.type}),i.value.related_seasons&&i.value.related_seasons.forEach(M=>{A.push({id:M.id,type:M.type})})),A});function p(){o=new ResizeObserver(A=>{for(const M of A)x.value=M.contentRect.width}),o.observe(m.value)}const h=t.computed(()=>{let A={};return l.value&&l.value.game_id&&(A={gameId:l.value.game_id,id:l.value.game_id,seasonId:l.value.season_id,status:l.value.game_status,game_status:l.value.game_status==0?4:l.value.game_status,dateTimeUTC:l.value.date_time_utc,homeTeam:l.value.home_team,awayTeam:l.value.visiting_team,is_live:l.value.is_live}),A});t.watch(()=>u.state.nextGeneral.gameForAnalysis,()=>{u.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)},{deep:!0,immediate:!0});function g(A){y.value=A,n.value=A.is_captured!==0,y.value.id!==A.id&&(y.value=A)}function b(A){a("openmedia",A)}function v(A){a("onOpenProfile",A)}function w(A){E(A),A=="Estadísticas"&&(s.value="Comparativa")}function C(){s.value=""}function k(A){i.value.id!==A.id&&(i.value=A,a("change-season-id",A.id))}const B=t.computed(()=>f.value.map(A=>{if(n.value)return A.name;if(A.id!==5&&A.id!==6)return A.name}).filter(A=>A!=null));function E(A){c.value=f.value.find(M=>M.name===A)||f.value[0]}t.onMounted(()=>{p(),t.nextTick(()=>{r.isSynchronization&&E("Tactica Fija")})}),t.onBeforeUnmount(()=>{o&&o.disconnect()});function T(A){l.value=A}return(A,M)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:m},[t.createElementVNode("div",$9t,[t.createElementVNode("div",j9t,[t.createVNode(t.unref(v$),{"current-season-id":e.currentSeasonId,onInput:g},null,8,["current-season-id"]),t.createVNode(t.unref(j$),{"current-season-id":e.currentSeasonId,seasons:y.value.seasons,onInput:k},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",U9t,[t.createVNode(t.unref(KG),{token:_.value,"await-for-seasons":"",seasons:d.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":r.defaultGameId,"sort-calendar":r.sortCalendar,onChangeGameCarousel:T},null,8,["token","seasons","default-game-id","sort-calendar"])])]),t.createElementVNode("div",H9t,[t.createElementVNode("div",G9t,[t.createElementVNode("div",W9t,[t.createVNode(t.unref(pL),{type:2,buttons:B.value,"font-family":"Poppins-Regular","font-size":"16px",width:x.value<400||x.value<700?"max-content":x.value<840||x.value<1050?"155px":"165px","selected-option":c.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:E},null,8,["buttons","width","selected-option"])])]),t.createElementVNode("h1",null,"isTacticVisible "+t.toDisplayString(!!i.value.show_tactic),1),h.value&&h.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value.componentName),{key:0,game:h.value,subsection:t.unref(s),seasonSelected:i.value,showLineups:n.value,socket:e.socket,"is-tactic-visible":!!i.value.show_tactic,"is-synchronization":e.isSynchronization,onResetSubsection:C,onOpenmedia:b,onOnOpenProfile:v,onChangeToTab:w,onOpenMediaPlayer:b},null,40,["game","subsection","seasonSelected","showLineups","socket","is-tactic-visible","is-synchronization"])):t.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-36c536e7"]]);async function Hs({url:e,options:a={},retries:r=3}){return await ig.get(e,a).then(u=>u).catch(u=>r>0?Hs({url:e,options:a,retries:r-1}):u)}async function fL({seasonId:e},a=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(r){if(a)return fL({seasonId:e},!1);throw new Error(r)}}async function Z9t({seasonId:e}){try{return(await Hs({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function X9t({seasonId:e}){try{return(await Hs({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function K9t(e,a,r,u,y,i,l=!1){const n=r.map(_=>_===1?2:_===2?1:3);return e.filter(_=>{const f=i&&_[y.teamId]?_[y.teamId]!==i:!1,o=a===1?2:1;return(l||u.includes(_[y.gameId]))&&(!a||(f?o:a)===_[y.playingAs])&&(r.includes(_[y.matchResult])&&_[y.teamId]===i||n.includes(_[y.matchResult])&&_[y.teamId]!==i)})}function mL(e,a,r,u,y){return a.length===2&&r.length===3&&u.length===6?e:e.filter(i=>a.includes(i[y.playingAs])&&r.includes(i[y.matchResult])&&u.includes(i[y.section]))}async function gL({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Hs({url:a})).data}catch(a){return Promise.reject(a)}}async function J9t({seasonId:e,gameId:a}){try{const r=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:u}=await Hs({url:r});return u}catch(r){return Promise.reject(r)}}async function Q9t({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Hs({url:a})).data.data}catch(a){return Promise.reject(a)}}async function eCt({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Hs({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const tCt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let k8=null;function yL(){return k8||(k8=Z1(tCt)),k8}async function aCt(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Hs({url:a})).data}catch(a){return Promise.reject(a)}}async function _L({seasonId:e,teamId:a}){try{return await Hs({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(r){return Promise.reject(r)}}async function rCt(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Hs({url:a})}catch(a){return Promise.reject(a)}}async function nCt(e){try{return await Hs({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const iCt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,r,u){return K9t(e.seasonPlays,u["filterGeneral/getPlayingAs"],u["filterGeneral/getResults"],u["filterGeneral/getSelectedGamesIds"],yL(),u["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((r,u)=>{const y={...u};return y.home_team=e.currentSeasonTeams.find(i=>i.team_id===u.home_team),y.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===u.visiting_team),r[u.matchday_abbreviation]?r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date]?r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date].push(y):r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date]=[y]:r[u.matchday_abbreviation]={[u.game_status===3?"canceled":u.date]:[y]},r},{});for(let[r,u]of Object.entries(a))a[r]=Object.entries(u).map(([y,i])=>({date:y,games:i})),a[r].sort((y,i)=>y.date<i.date?-1:y.date>i.date?1:0);return a},matchdaysDates(e,a){let r=[];if(a.nextGamesSchedule){let u=Object.keys(a.nextGamesSchedule);for(let y of u){let i=Number(y.replace("M","")),l=a.nextGamesSchedule[y].map(n=>({matchday:i,date:new Date(n.date)}));r=r.concat(l)}}return r},closestMatchDay(e,a){let r=new Date,u=0,y=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,l=i.length;for(let n=0;n<i.length;n++)u=Math.abs(i[n].date-r),u<y&&(l=n,y=u);return i[l]?i[l].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,a){e.booleanIsLiveGamesModalOpen=a},setBooleanAreLiveGames(e,a){e.booleanAreLiveGames=a},updateSeasonPlays(e,a){e.seasonPlays=a},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateSelectedRound(e,a){e.selectedRound=a}},actions:{async getSeasonPlays({commit:e,rootGetters:a},r=!1){try{const u=await fL({seasonId:a["filterGeneral/getSeasonId"]});if(r)return u;e("updateSeasonPlays",u)}catch(u){return Promise.reject(u)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const r=await gL({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const r=await aCt({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",r.teams)}catch(r){return Promise.reject(r)}},async isDataFilled({state:e,dispatch:a,commit:r}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return r("setIsSectionLoading",!1,{root:!0}),!0;const u=[void 0,void 0];return e.currentSeasonGames.length===0&&(u[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(u[1]=a("getCurrentSeasonTeams")),await Promise.all(u),!1}catch(u){throw new Error(u)}}}}};async function oCt({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:r}=await Hs({url:a});return r}catch(a){return Promise.reject(a)}}const sCt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let C8=null;function lCt(){return C8||(C8=Z1(sCt)),C8}class H_{constructor(){Vi(this,"maximumLiveSection",1);Vi(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:[]});Vi(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(a){a>this.maximumLiveSection&&(this.maximumLiveSection=a)}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(a,r,u){u&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=r,this.accomplished.totalsLiveTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,r)),this.accomplished.totalPostGame+=r,this.accomplished.avgPostGameTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,r)}increaseReceivedByOne(a,r,u){u&&(this.setMaximumLiveSection(a),this.received.totalLive+=r,this.received.totalsLiveTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,r)),this.received.totalPostGame+=r,this.received.avgPostGameTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,r)}increaseTrendLiveAccumulatedByOne(a,r,u){for(let y=r-1;y<a.accumulated.length;y++)a.accumulated[y]+=u}decreaseAccomplishedLiveByOne(a,r){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=r),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,r))}decreaseReceivedLiveByOne(a,r){this.received.totalLive>0&&(this.received.totalLive-=r),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,r))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,r,u){for(let y=a.accumulated.length-1;y>=r-1;y--)a.accumulated[y]-=u}calculateAvg(a){a&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/a,this.received.avgPostGame=this.received.totalPostGame/a,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,a),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,a),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,a),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,a))}getAvgPostGameTrendLiveAvg(a,r){return a.map(u=>u/r)}calculateRanking(a,r,u,y,i,l,n,_){let f=[];y===3&&a&&a.length&&(u.playingAs.length!==2||u.matchResult.length!==3)?f=Array.from(a.reduce((m,x)=>{const c=x[r.playingAs]===1,s=c?"1":"2",d=m.get(x[r.gameId]);if(d)d[s]?d[s].arrayPlays.push(x):d[s]={numberTeamId:x[r.teamId],arrayPlays:[x]};else{const p={numberMatchResult:x[r.matchResult]};c&&(p[1]={numberTeamId:x[r.teamId],arrayPlays:[x]}),m.set(x[r.gameId],p)}return m},new Map).values()).reduce((m,x)=>{const c=u.playingAs.length===2?"both":u.playingAs[0].toString();return(c==="both"&&(x[1].numberTeamId===u.teamId||x[2].numberTeamId===u.teamId)||c!=="both"&&x[c].numberTeamId===u.teamId)&&u.matchResult.includes(x.numberMatchResult)&&m.push(...x[1].arrayPlays,...x[2].arrayPlays),m},[]).filter(m=>u.sections.includes(m[r.section])):(f=a?[...a]:[],n&&a&&(f=a.filter(o=>u.playingAs.includes(o[r.playingAs])&&u.matchResult.includes(o[r.matchResult])&&u.sections.includes(o[r.section])))),this.setTeamRanking(f,y,r,u.teamId,l,"accomplished",_)}setTeamRanking(a,r,u,y,i,l,n){let _=null,f=null;r===3&&(_=new Map,f={},a.forEach(x=>{const c=_.get(x[u.gameId]);c?c[x[u.teamId.toString()]]?c[x[u.teamId.toString()]]+=x[u.total]:c[x[u.teamId.toString()]]=x[u.total]:_.set(x[u.gameId],{[x[u.teamId.toString()]]:x[u.total]})}),Array.from(_.values()).forEach(x=>{const[c,s]=Object.keys(x).map(p=>p),d=x[c]+x[s];this.addPassesAvgByTeam(f,c,d?x[c]/d:0),this.addPassesAvgByTeam(f,s,d?x[s]/d:0)}));const o=i.sort((x,c)=>x.team_id-c.team_id).map(x=>{if(r===3){const c=f[x.team_id.toString()];return{teamId:x.team_id,points:c?c.numberTotalPassesAvg/c.numberGamesCount:0,total:c?c.numberTotalPassesAvg:0}}else{const c=a.reduce((s,d)=>d[u.teamId]===x.team_id&&r===d[u.categoryId]?s+d[u.total]:s,0);return{teamId:x.team_id,points:x[`${n}FilterGames`]?c/x[`${n}FilterGames`]:0,total:c}}}).sort((x,c)=>c.points-x.points);this.accomplished.arrayRankings=o;const m=o.findIndex(x=>x.teamId===y);r===3&&(this.accomplished.avgPreGame=o[m].points),this[l].ranking=m+1,this[l].leader=o[0]}addPassesAvgByTeam(a,r,u){a[r]?(a[r].numberGamesCount+=1,a[r].numberTotalPassesAvg+=u):a[r]={numberGamesCount:1,numberTotalPassesAvg:u}}}class bn{constructor(a,r,u,y,i,l,n,_,f,o){Vi(this,"id","");Vi(this,"generalId",0);Vi(this,"name","");Vi(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Vi(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Vi(this,"accomplishedCategoryIds",[]);Vi(this,"receivedCategoryIds",[]);Vi(this,"generalCategoriesIds",{accomplished:0,received:0});Vi(this,"specialMention","");Vi(this,"homeTeam",new H_);Vi(this,"visitingTeam",new H_);Vi(this,"isLeagueDataCalculated",!1);Vi(this,"leagueAccomplishedMax",0);Vi(this,"leagueReceivedMax",0);Vi(this,"leagueAccomplishedAvg",0);Vi(this,"leagueReceivedAvg",0);Vi(this,"leagueAccomplishedAccumulator",0);Vi(this,"leagueReceivedAccumulator",0);Vi(this,"homeTeamType","homeTeam");Vi(this,"visitingTeamType","visitingTeam");Vi(this,"betOnly",!1);Vi(this,"isPercent",!1);this.id=`${u.accomplished}-${u.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=r||[],this.generalCategoriesIds=u||{accomplished:0,received:0},this.name=y,this.names["0-0"]=y||"",this.names["1-1"]=i||"",this.names["0-1"]=l||"",this.names["1-0"]=n||"",this.generalId=_||0,this.betOnly=f||!1,this.isPercent=o||!1}addLeaguePlays(a,r,u){a.length===0||!u||this.isLeagueDataCalculated||(a.forEach(y=>{this.isAccomplishedLeaguePlay(y[r.categoryId])&&(this.leagueAccomplishedAccumulator+=y[r.total]),this.isReceivedLeaguePlay(y[r.categoryId])&&(this.leagueReceivedAccumulator+=y[r.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*u)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*u)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,r,u){let y="-";for(const[i,l]of Object.entries(this.generalCategoriesIds))a===l&&(y=`${i==="accomplished"?"0":"1"}${y}`),r===l&&(y=`${y}${i==="accomplished"?"0":"1"}`);y.length===3&&(this.mentions[y]=u)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,r,u,y,i){!u||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(u.forEach(l=>{this.isAccomplishedPlay(l[y.categoryId])?this[a].increaseAccomplishedByOne(l[y.section],l[y.total]):this.isReceivedPlay(l[y.categoryId])&&this[a].increaseReceivedByOne(l[y.section],l[y.total])}),this[a].calculateAvg(i))}addLivePlay(a,r,u,y,i=!1,l=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&u[y.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(u[y.section],u[y.total],!0)}subtractLivePlay(a,r,u,y,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(u[y.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(u[y.section],u[y.total]):this.isReceivedPlay(u[y.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(u[y.section],u[y.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(u=>a===u||`${a}_r`===u)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(r=>a===r)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,r,u,y,i,l=!1){this[this.homeTeamType].calculateRanking(a,r,u,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,l,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,r,y,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,l,this.visitingTeamType)}resetData(){this.homeTeam=new H_,this.visitingTeam=new H_,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(a){return this.generalCategoriesIds.accomplished===a||this.generalCategoriesIds.received===a}}const cCt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new bn([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new bn([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new bn([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new bn([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new bn([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new bn([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new bn([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new bn([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new bn([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new bn([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new bn([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new bn([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new bn([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new bn([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new bn([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new bn([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new bn([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new bn([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new bn([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new bn([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new bn([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new bn([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new bn([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new bn([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new bn([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new bn([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new bn([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 bn([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new bn([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new bn([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new bn([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new bn([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new bn([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new bn([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new bn([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new bn([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new bn([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new bn([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},dCt=[{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}],uCt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let E8=null;function pCt(){return E8||(E8=Z1(uCt)),E8}const hCt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let S8=null;function fCt(){return S8||(S8=Z1(hCt)),S8}function G_(e,a,r){return[r.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function vL(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 T8(e,a,r){let u=[...a];return e[r.categoryId]===2&&(u[0]=14),e[r.categoryId]===20&&(u[0]=15),[14,15].includes(u[0])?u:null}var A8={exports:{}},mCt=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gCt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],bL=function(a){var r=a,u=a.indexOf("["),y=a.indexOf("]");u!=-1&&y!=-1&&(a=a.substring(0,u)+a.substring(u,y).replace(/:/g,";")+a.substring(y,a.length));for(var i=mCt.exec(a||""),l={},n=14;n--;)l[gCt[n]]=i[n]||"";return u!=-1&&y!=-1&&(l.source=r,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=yCt(l,l.path),l.queryKey=_Ct(l,l.query),l};function yCt(e,a){var r=/\/{2,9}/g,u=a.replace(r,"/").split("/");return(a.substr(0,1)=="/"||a.length===0)&&u.splice(0,1),a.substr(a.length-1,1)=="/"&&u.splice(u.length-1,1),u}function _Ct(e,a){var r={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,y,i){y&&(r[y]=i)}),r}var N8={exports:{}},B8={exports:{}},q0=1e3,Y0=q0*60,Z0=Y0*60,X0=Z0*24,vCt=X0*365.25,bCt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return xCt(e);if(r==="number"&&isNaN(e)===!1)return a.long?kCt(e):wCt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xCt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*vCt;case"days":case"day":case"d":return r*X0;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Z0;case"minutes":case"minute":case"mins":case"min":case"m":return r*Y0;case"seconds":case"second":case"secs":case"sec":case"s":return r*q0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function wCt(e){return e>=X0?Math.round(e/X0)+"d":e>=Z0?Math.round(e/Z0)+"h":e>=Y0?Math.round(e/Y0)+"m":e>=q0?Math.round(e/q0)+"s":e+"ms"}function kCt(e){return W_(e,X0,"day")||W_(e,Z0,"hour")||W_(e,Y0,"minute")||W_(e,q0,"second")||e+" ms"}function W_(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=bCt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(B8,B8.exports);var CCt=B8.exports;(function(e,a){a=e.exports=CCt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(N8,N8.exports);var q_=N8.exports,ECt=bL,xL=q_("socket.io-client:url"),SCt=TCt;function TCt(e,a){var r=e;a=a||typeof location<"u"&&location,e==null&&(e=a.protocol+"//"+a.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=a.protocol+e:e=a.host+e),/^(https?|wss?):\/\//.test(e)||(xL("protocol-less url %s",e),typeof a<"u"?e=a.protocol+"//"+e:e="https://"+e),xL("parse %s",e),r=ECt(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var u=r.host.indexOf(":")!==-1,y=u?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+y+":"+r.port,r.href=r.protocol+"://"+y+(a&&a.port===r.port?"":":"+r.port),r}var Y_={},M8={exports:{}},I8={exports:{}},K0=1e3,J0=K0*60,Q0=J0*60,e1=Q0*24,ACt=e1*365.25,NCt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return BCt(e);if(r==="number"&&isNaN(e)===!1)return a.long?ICt(e):MCt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function BCt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*ACt;case"days":case"day":case"d":return r*e1;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Q0;case"minutes":case"minute":case"mins":case"min":case"m":return r*J0;case"seconds":case"second":case"secs":case"sec":case"s":return r*K0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function MCt(e){return e>=e1?Math.round(e/e1)+"d":e>=Q0?Math.round(e/Q0)+"h":e>=J0?Math.round(e/J0)+"m":e>=K0?Math.round(e/K0)+"s":e+"ms"}function ICt(e){return Z_(e,e1,"day")||Z_(e,Q0,"hour")||Z_(e,J0,"minute")||Z_(e,K0,"second")||e+" ms"}function Z_(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=NCt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(I8,I8.exports);var OCt=I8.exports;(function(e,a){a=e.exports=OCt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(M8,M8.exports);var FCt=M8.exports,wL={exports:{}};(function(e){e.exports=a;function a(u){if(u)return r(u)}function r(u){for(var y in a.prototype)u[y]=a.prototype[y];return u}a.prototype.on=a.prototype.addEventListener=function(u,y){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(y),this},a.prototype.once=function(u,y){function i(){this.off(u,i),y.apply(this,arguments)}return i.fn=y,this.on(u,i),this},a.prototype.off=a.prototype.removeListener=a.prototype.removeAllListeners=a.prototype.removeEventListener=function(u,y){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+u];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var l,n=0;n<i.length;n++)if(l=i[n],l===y||l.fn===y){i.splice(n,1);break}return i.length===0&&delete this._callbacks["$"+u],this},a.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var y=new Array(arguments.length-1),i=this._callbacks["$"+u],l=1;l<arguments.length;l++)y[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,n=i.length;l<n;++l)i[l].apply(this,y)}return this},a.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]},a.prototype.hasListeners=function(u){return!!this.listeners(u).length}})(wL);var pf=wL.exports,X_={},zCt={}.toString,O8=Array.isArray||function(e){return zCt.call(e)=="[object Array]"},kL=RCt,PCt=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",VCt=typeof ArrayBuffer=="function",LCt=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function RCt(e){return PCt&&Buffer.isBuffer(e)||VCt&&(e instanceof ArrayBuffer||LCt(e))}var F8=O8,CL=kL,EL=Object.prototype.toString,DCt=typeof Blob=="function"||typeof Blob<"u"&&EL.call(Blob)==="[object BlobConstructor]",$Ct=typeof File=="function"||typeof File<"u"&&EL.call(File)==="[object FileConstructor]";X_.deconstructPacket=function(e){var a=[],r=e.data,u=e;return u.data=z8(r,a),u.attachments=a.length,{packet:u,buffers:a}};function z8(e,a){if(!e)return e;if(CL(e)){var r={_placeholder:!0,num:a.length};return a.push(e),r}else if(F8(e)){for(var u=new Array(e.length),y=0;y<e.length;y++)u[y]=z8(e[y],a);return u}else if(typeof e=="object"&&!(e instanceof Date)){var u={};for(var i in e)u[i]=z8(e[i],a);return u}return e}X_.reconstructPacket=function(e,a){return e.data=P8(e.data,a),e.attachments=void 0,e};function P8(e,a){if(!e)return e;if(e&&e._placeholder===!0){var r=typeof e.num=="number"&&e.num>=0&&e.num<a.length;if(r)return a[e.num];throw new Error("illegal attachments")}else if(F8(e))for(var u=0;u<e.length;u++)e[u]=P8(e[u],a);else if(typeof e=="object")for(var y in e)e[y]=P8(e[y],a);return e}X_.removeBlobs=function(e,a){function r(i,l,n){if(!i)return i;if(DCt&&i instanceof Blob||$Ct&&i instanceof File){u++;var _=new FileReader;_.onload=function(){n?n[l]=this.result:y=this.result,--u||a(y)},_.readAsArrayBuffer(i)}else if(F8(i))for(var f=0;f<i.length;f++)r(i[f],f,i);else if(typeof i=="object"&&!CL(i))for(var o in i)r(i[o],o,i)}var u=0,y=e;r(y),u||a(y)},function(e){var a=FCt("socket.io-parser"),r=pf,u=X_,y=O8,i=kL;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=l,e.Decoder=m;function l(){}var n=e.ERROR+'"encode error"';l.prototype.encode=function(p,h){if(a("encoding packet %j",p),e.BINARY_EVENT===p.type||e.BINARY_ACK===p.type)o(p,h);else{var g=_(p);h([g])}};function _(p){var h=""+p.type;if((e.BINARY_EVENT===p.type||e.BINARY_ACK===p.type)&&(h+=p.attachments+"-"),p.nsp&&p.nsp!=="/"&&(h+=p.nsp+","),p.id!=null&&(h+=p.id),p.data!=null){var g=f(p.data);if(g!==!1)h+=g;else return n}return a("encoded %j as %s",p,h),h}function f(p){try{return JSON.stringify(p)}catch{return!1}}function o(p,h){function g(b){var v=u.deconstructPacket(b),w=_(v.packet),C=v.buffers;C.unshift(w),h(C)}u.removeBlobs(p,g)}function m(){this.reconstructor=null}r(m.prototype),m.prototype.add=function(p){var h;if(typeof p=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=x(p),e.BINARY_EVENT===h.type||e.BINARY_ACK===h.type?(this.reconstructor=new s(h),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",h)):this.emit("decoded",h)}else if(i(p)||p.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(p),h&&(this.reconstructor=null,this.emit("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+p)};function x(p){var h=0,g={type:Number(p.charAt(0))};if(e.types[g.type]==null)return d("unknown packet type "+g.type);if(e.BINARY_EVENT===g.type||e.BINARY_ACK===g.type){for(var b=h+1;p.charAt(++h)!=="-"&&h!=p.length;);var v=p.substring(b,h);if(v!=Number(v)||p.charAt(h)!=="-")throw new Error("Illegal attachments");g.attachments=Number(v)}if(p.charAt(h+1)==="/"){for(var b=h+1;++h;){var w=p.charAt(h);if(w===","||h===p.length)break}g.nsp=p.substring(b,h)}else g.nsp="/";var C=p.charAt(h+1);if(C!==""&&Number(C)==C){for(var b=h+1;++h;){var w=p.charAt(h);if(w==null||Number(w)!=w){--h;break}if(h===p.length)break}g.id=Number(p.substring(b,h+1))}if(p.charAt(++h)){var k=c(p.substr(h)),B=k!==!1&&(g.type===e.ERROR||y(k));if(B)g.data=k;else return d("invalid payload")}return a("decoded %s as %j",p,g),g}function c(p){try{return JSON.parse(p)}catch{return!1}}m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function s(p){this.reconPack=p,this.buffers=[]}s.prototype.takeBinaryData=function(p){if(this.buffers.push(p),this.buffers.length===this.reconPack.attachments){var h=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null},s.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function d(p){return{type:e.ERROR,data:"parser error: "+p}}}(Y_);var V8={exports:{}},K_={},L8={exports:{}};try{L8.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{L8.exports=!1}var jCt=L8.exports,R8=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),UCt=jCt,HCt=R8,D8=function(e){var a=e.xdomain,r=e.xscheme,u=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!a||UCt))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!r&&u)return new XDomainRequest}catch{}if(!a)try{return new HCt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},$8={exports:{}},Vp={},GCt=Object.keys||function(a){var r=[],u=Object.prototype.hasOwnProperty;for(var y in a)u.call(a,y)&&r.push(y);return r},WCt=O8,SL=Object.prototype.toString,qCt=typeof Blob=="function"||typeof Blob<"u"&&SL.call(Blob)==="[object BlobConstructor]",YCt=typeof File=="function"||typeof File<"u"&&SL.call(File)==="[object FileConstructor]",TL=J_;function J_(e){if(!e||typeof e!="object")return!1;if(WCt(e)){for(var a=0,r=e.length;a<r;a++)if(J_(e[a]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||qCt&&e instanceof Blob||YCt&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return J_(e.toJSON(),!0);for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)&&J_(e[u]))return!0;return!1}var ZCt=function(e,a,r){var u=e.byteLength;if(a=a||0,r=r||u,e.slice)return e.slice(a,r);if(a<0&&(a+=u),r<0&&(r+=u),r>u&&(r=u),a>=u||a>=r||u===0)return new ArrayBuffer(0);for(var y=new Uint8Array(e),i=new Uint8Array(r-a),l=a,n=0;l<r;l++,n++)i[n]=y[l];return i.buffer},XCt=KCt;function KCt(e,a,r){var u=!1;return r=r||JCt,y.count=e,e===0?a():y;function y(i,l){if(y.count<=0)throw new Error("after called too many times");--y.count,i?(u=!0,a(i),a=r):y.count===0&&!u&&a(null,l)}}function JCt(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var ap=String.fromCharCode;function AL(e){for(var a=[],r=0,u=e.length,y,i;r<u;)y=e.charCodeAt(r++),y>=55296&&y<=56319&&r<u?(i=e.charCodeAt(r++),(i&64512)==56320?a.push(((y&1023)<<10)+(i&1023)+65536):(a.push(y),r--)):a.push(y);return a}function QCt(e){for(var a=e.length,r=-1,u,y="";++r<a;)u=e[r],u>65535&&(u-=65536,y+=ap(u>>>10&1023|55296),u=56320|u&1023),y+=ap(u);return y}function NL(e,a){if(e>=55296&&e<=57343){if(a)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function j8(e,a){return ap(e>>a&63|128)}function eEt(e,a){if(!(e&4294967168))return ap(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=ap(e>>18&7|240),r+=j8(e,12),r+=j8(e,6)):(NL(e,a)||(e=65533),r=ap(e>>12&15|224),r+=j8(e,6)):r=ap(e>>6&31|192),r+=ap(e&63|128),r}function tEt(e,a){a=a||{};for(var r=a.strict!==!1,u=AL(e),y=u.length,i=-1,l,n="";++i<y;)l=u[i],n+=eEt(l,r);return n}function hf(){if(rp>=ev)throw Error("Invalid byte index");var e=Q_[rp]&255;if(rp++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function aEt(e){var a,r,u,y,i;if(rp>ev)throw Error("Invalid byte index");if(rp==ev)return!1;if(a=Q_[rp]&255,rp++,!(a&128))return a;if((a&224)==192){if(r=hf(),i=(a&31)<<6|r,i>=128)return i;throw Error("Invalid continuation byte")}if((a&240)==224){if(r=hf(),u=hf(),i=(a&15)<<12|r<<6|u,i>=2048)return NL(i,e)?i:65533;throw Error("Invalid continuation byte")}if((a&248)==240&&(r=hf(),u=hf(),y=hf(),i=(a&7)<<18|r<<12|u<<6|y,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}var Q_,ev,rp;function rEt(e,a){a=a||{};var r=a.strict!==!1;Q_=AL(e),ev=Q_.length,rp=0;for(var u=[],y;(y=aEt(r))!==!1;)u.push(y);return QCt(u)}var nEt={version:"2.1.2",encode:tEt,decode:rEt},tv={},BL;function iEt(){return BL||(BL=1,function(e){tv.encode=function(a){var r=new Uint8Array(a),u,y=r.length,i="";for(u=0;u<y;u+=3)i+=e[r[u]>>2],i+=e[(r[u]&3)<<4|r[u+1]>>4],i+=e[(r[u+1]&15)<<2|r[u+2]>>6],i+=e[r[u+2]&63];return y%3===2?i=i.substring(0,i.length-1)+"=":y%3===1&&(i=i.substring(0,i.length-2)+"=="),i},tv.decode=function(a){var r=a.length*.75,u=a.length,y,i=0,l,n,_,f;a[a.length-1]==="="&&(r--,a[a.length-2]==="="&&r--);var o=new ArrayBuffer(r),m=new Uint8Array(o);for(y=0;y<u;y+=4)l=e.indexOf(a[y]),n=e.indexOf(a[y+1]),_=e.indexOf(a[y+2]),f=e.indexOf(a[y+3]),m[i++]=l<<2|n>>4,m[i++]=(n&15)<<4|_>>2,m[i++]=(_&3)<<6|f&63;return o}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),tv}var U8,ML;function oEt(){if(ML)return U8;ML=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,a=function(){try{var n=new Blob(["hi"]);return n.size===2}catch{return!1}}(),r=a&&function(){try{var n=new Blob([new Uint8Array([1,2])]);return n.size===2}catch{return!1}}(),u=e&&e.prototype.append&&e.prototype.getBlob;function y(n){return n.map(function(_){if(_.buffer instanceof ArrayBuffer){var f=_.buffer;if(_.byteLength!==f.byteLength){var o=new Uint8Array(_.byteLength);o.set(new Uint8Array(f,_.byteOffset,_.byteLength)),f=o.buffer}return f}return _})}function i(n,_){_=_||{};var f=new e;return y(n).forEach(function(o){f.append(o)}),_.type?f.getBlob(_.type):f.getBlob()}function l(n,_){return new Blob(y(n),_||{})}return typeof Blob<"u"&&(i.prototype=Blob.prototype,l.prototype=Blob.prototype),U8=function(){return a?r?Blob:l:u?i:void 0}(),U8}(function(e){var a=GCt,r=TL,u=ZCt,y=XCt,i=nEt,l;typeof ArrayBuffer<"u"&&(l=iEt());var n=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),_=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),f=n||_;e.protocol=3;var o=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},m=a(o),x={type:"error",data:"parser error"},c=oEt();e.encodePacket=function(v,w,C,k){typeof w=="function"&&(k=w,w=!1),typeof C=="function"&&(k=C,C=null);var B=v.data===void 0?void 0:v.data.buffer||v.data;if(typeof ArrayBuffer<"u"&&B instanceof ArrayBuffer)return d(v,w,k);if(typeof c<"u"&&B instanceof c)return h(v,w,k);if(B&&B.base64)return s(v,k);var E=o[v.type];return v.data!==void 0&&(E+=C?i.encode(String(v.data),{strict:!1}):String(v.data)),k(""+E)};function s(v,w){var C="b"+e.packets[v.type]+v.data.data;return w(C)}function d(v,w,C){if(!w)return e.encodeBase64Packet(v,C);var k=v.data,B=new Uint8Array(k),E=new Uint8Array(1+k.byteLength);E[0]=o[v.type];for(var T=0;T<B.length;T++)E[T+1]=B[T];return C(E.buffer)}function p(v,w,C){if(!w)return e.encodeBase64Packet(v,C);var k=new FileReader;return k.onload=function(){e.encodePacket({type:v.type,data:k.result},w,!0,C)},k.readAsArrayBuffer(v.data)}function h(v,w,C){if(!w)return e.encodeBase64Packet(v,C);if(f)return p(v,w,C);var k=new Uint8Array(1);k[0]=o[v.type];var B=new c([k.buffer,v.data]);return C(B)}e.encodeBase64Packet=function(v,w){var C="b"+e.packets[v.type];if(typeof c<"u"&&v.data instanceof c){var k=new FileReader;return k.onload=function(){var M=k.result.split(",")[1];w(C+M)},k.readAsDataURL(v.data)}var B;try{B=String.fromCharCode.apply(null,new Uint8Array(v.data))}catch{for(var E=new Uint8Array(v.data),T=new Array(E.length),A=0;A<E.length;A++)T[A]=E[A];B=String.fromCharCode.apply(null,T)}return C+=btoa(B),w(C)},e.decodePacket=function(v,w,C){if(v===void 0)return x;if(typeof v=="string"){if(v.charAt(0)==="b")return e.decodeBase64Packet(v.substr(1),w);if(C&&(v=g(v),v===!1))return x;var B=v.charAt(0);return Number(B)!=B||!m[B]?x:v.length>1?{type:m[B],data:v.substring(1)}:{type:m[B]}}var k=new Uint8Array(v),B=k[0],E=u(v,1);return c&&w==="blob"&&(E=new c([E])),{type:m[B],data:E}};function g(v){try{v=i.decode(v,{strict:!1})}catch{return!1}return v}e.decodeBase64Packet=function(v,w){var C=m[v.charAt(0)];if(!l)return{type:C,data:{base64:!0,data:v.substr(1)}};var k=l.decode(v.substr(1));return w==="blob"&&c&&(k=new c([k])),{type:C,data:k}},e.encodePayload=function(v,w,C){typeof w=="function"&&(C=w,w=null);var k=r(v);if(w&&k)return c&&!f?e.encodePayloadAsBlob(v,C):e.encodePayloadAsArrayBuffer(v,C);if(!v.length)return C("0:");function B(T){return T.length+":"+T}function E(T,A){e.encodePacket(T,k?w:!1,!1,function(M){A(null,B(M))})}b(v,E,function(T,A){return C(A.join(""))})};function b(v,w,C){for(var k=new Array(v.length),B=y(v.length,C),E=function(A,M,N){w(M,function(O,S){k[A]=S,N(O,k)})},T=0;T<v.length;T++)E(T,v[T],B)}e.decodePayload=function(v,w,C){if(typeof v!="string")return e.decodePayloadAsBinary(v,w,C);typeof w=="function"&&(C=w,w=null);var k;if(v==="")return C(x,0,1);for(var B="",E,T,A=0,M=v.length;A<M;A++){var N=v.charAt(A);if(N!==":"){B+=N;continue}if(B===""||B!=(E=Number(B))||(T=v.substr(A+1,E),B!=T.length))return C(x,0,1);if(T.length){if(k=e.decodePacket(T,w,!1),x.type===k.type&&x.data===k.data)return C(x,0,1);var O=C(k,A+E,M);if(O===!1)return}A+=E,B=""}if(B!=="")return C(x,0,1)},e.encodePayloadAsArrayBuffer=function(v,w){if(!v.length)return w(new ArrayBuffer(0));function C(k,B){e.encodePacket(k,!0,!0,function(E){return B(null,E)})}b(v,C,function(k,B){var E=B.reduce(function(M,N){var O;return typeof N=="string"?O=N.length:O=N.byteLength,M+O.toString().length+O+2},0),T=new Uint8Array(E),A=0;return B.forEach(function(M){var N=typeof M=="string",O=M;if(N){for(var I=new Uint8Array(M.length),S=0;S<M.length;S++)I[S]=M.charCodeAt(S);O=I.buffer}N?T[A++]=0:T[A++]=1;for(var z=O.byteLength.toString(),S=0;S<z.length;S++)T[A++]=parseInt(z[S]);T[A++]=255;for(var I=new Uint8Array(O),S=0;S<I.length;S++)T[A++]=I[S]}),w(T.buffer)})},e.encodePayloadAsBlob=function(v,w){function C(k,B){e.encodePacket(k,!0,!0,function(E){var T=new Uint8Array(1);if(T[0]=1,typeof E=="string"){for(var A=new Uint8Array(E.length),M=0;M<E.length;M++)A[M]=E.charCodeAt(M);E=A.buffer,T[0]=0}for(var N=E instanceof ArrayBuffer?E.byteLength:E.size,O=N.toString(),S=new Uint8Array(O.length+1),M=0;M<O.length;M++)S[M]=parseInt(O[M]);if(S[O.length]=255,c){var z=new c([T.buffer,S.buffer,E]);B(null,z)}})}b(v,C,function(k,B){return w(new c(B))})},e.decodePayloadAsBinary=function(v,w,C){typeof w=="function"&&(C=w,w=null);for(var k=v,B=[];k.byteLength>0;){for(var E=new Uint8Array(k),T=E[0]===0,A="",M=1;E[M]!==255;M++){if(A.length>310)return C(x,0,1);A+=E[M]}k=u(k,2+A.length),A=parseInt(A);var N=u(k,0,A);if(T)try{N=String.fromCharCode.apply(null,new Uint8Array(N))}catch{var O=new Uint8Array(N);N="";for(var M=0;M<O.length;M++)N+=String.fromCharCode(O[M])}B.push(N),k=u(k,A)}var S=B.length;B.forEach(function(z,I){C(e.decodePacket(z,w,!0),I,S)})}})(Vp);var H8,IL;function G8(){if(IL)return H8;IL=1;var e=Vp,a=pf;H8=r;function r(u){this.path=u.path,this.hostname=u.hostname,this.port=u.port,this.secure=u.secure,this.query=u.query,this.timestampParam=u.timestampParam,this.timestampRequests=u.timestampRequests,this.readyState="",this.agent=u.agent||!1,this.socket=u.socket,this.enablesXDR=u.enablesXDR,this.withCredentials=u.withCredentials,this.pfx=u.pfx,this.key=u.key,this.passphrase=u.passphrase,this.cert=u.cert,this.ca=u.ca,this.ciphers=u.ciphers,this.rejectUnauthorized=u.rejectUnauthorized,this.forceNode=u.forceNode,this.isReactNative=u.isReactNative,this.extraHeaders=u.extraHeaders,this.localAddress=u.localAddress}return a(r.prototype),r.prototype.onError=function(u,y){var i=new Error(u);return i.type="TransportError",i.description=y,this.emit("error",i),this},r.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(u){if(this.readyState==="open")this.write(u);else throw new Error("Transport not open")},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(u){var y=e.decodePacket(u,this.socket.binaryType);this.onPacket(y)},r.prototype.onPacket=function(u){this.emit("packet",u)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")},H8}var ff={};ff.encode=function(e){var a="";for(var r in e)e.hasOwnProperty(r)&&(a.length&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return a},ff.decode=function(e){for(var a={},r=e.split("&"),u=0,y=r.length;u<y;u++){var i=r[u].split("=");a[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return a};var av=function(e,a){var r=function(){};r.prototype=a.prototype,e.prototype=new r,e.prototype.constructor=e},OL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),rv=64,FL={},zL=0,np=0,PL;function W8(e){var a="";do a=OL[e%rv]+a,e=Math.floor(e/rv);while(e>0);return a}function sEt(e){var a=0;for(np=0;np<e.length;np++)a=a*rv+FL[e.charAt(np)];return a}function q8(){var e=W8(+new Date);return e!==PL?(zL=0,PL=e):e+"."+W8(zL++)}for(;np<rv;np++)FL[OL[np]]=np;q8.encode=W8,q8.decode=sEt;var VL=q8,Y8={exports:{}},Z8={exports:{}},t1=1e3,a1=t1*60,r1=a1*60,n1=r1*24,lEt=n1*365.25,cEt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return dEt(e);if(r==="number"&&isNaN(e)===!1)return a.long?pEt(e):uEt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dEt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*lEt;case"days":case"day":case"d":return r*n1;case"hours":case"hour":case"hrs":case"hr":case"h":return r*r1;case"minutes":case"minute":case"mins":case"min":case"m":return r*a1;case"seconds":case"second":case"secs":case"sec":case"s":return r*t1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function uEt(e){return e>=n1?Math.round(e/n1)+"d":e>=r1?Math.round(e/r1)+"h":e>=a1?Math.round(e/a1)+"m":e>=t1?Math.round(e/t1)+"s":e+"ms"}function pEt(e){return nv(e,n1,"day")||nv(e,r1,"hour")||nv(e,a1,"minute")||nv(e,t1,"second")||e+" ms"}function nv(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=cEt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(Z8,Z8.exports);var hEt=Z8.exports;(function(e,a){a=e.exports=hEt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(Y8,Y8.exports);var iv=Y8.exports,LL=G8(),fEt=ff,RL=Vp,mEt=av,gEt=VL,Hc=iv("engine.io-client:polling"),DL=Hd,yEt=function(){var e=D8,a=new e({xdomain:!1});return a.responseType!=null}();function Hd(e){var a=e&&e.forceBase64;(!yEt||a)&&(this.supportsBinary=!1),LL.call(this,e)}mEt(Hd,LL),Hd.prototype.name="polling",Hd.prototype.doOpen=function(){this.poll()},Hd.prototype.pause=function(e){var a=this;this.readyState="pausing";function r(){Hc("paused"),a.readyState="paused",e()}if(this.polling||!this.writable){var u=0;this.polling&&(Hc("we are currently polling - waiting to pause"),u++,this.once("pollComplete",function(){Hc("pre-pause polling complete"),--u||r()})),this.writable||(Hc("we are currently writing - waiting to pause"),u++,this.once("drain",function(){Hc("pre-pause writing complete"),--u||r()}))}else r()},Hd.prototype.poll=function(){Hc("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Hd.prototype.onData=function(e){var a=this;Hc("polling got data %s",e);var r=function(u,y,i){if(a.readyState==="opening"&&u.type==="open"&&a.onOpen(),u.type==="close")return a.onClose(),!1;a.onPacket(u)};RL.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Hc('ignoring poll - transport state "%s"',this.readyState))},Hd.prototype.doClose=function(){var e=this;function a(){Hc("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(Hc("transport open - closing"),a()):(Hc("transport not open - deferring close"),this.once("open",a))},Hd.prototype.write=function(e){var a=this;this.writable=!1;var r=function(){a.writable=!0,a.emit("drain")};RL.encodePayload(e,this.supportsBinary,function(u){a.doWrite(u,r)})},Hd.prototype.uri=function(){var e=this.query||{},a=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=gEt()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=fEt.encode(e),this.port&&(a==="https"&&Number(this.port)!==443||a==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var u=this.hostname.indexOf(":")!==-1;return a+"://"+(u?"["+this.hostname+"]":this.hostname)+r+this.path+e};var _Et=D8,$L=DL,vEt=pf,bEt=av,X8=iv("engine.io-client:polling-xhr"),xEt=R8;$8.exports=mf,$8.exports.Request=Ho;function jL(){}function mf(e){if($L.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var a=location.protocol==="https:",r=location.port;r||(r=a?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==a}}bEt(mf,$L),mf.prototype.supportsBinary=!0,mf.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Ho(e)},mf.prototype.doWrite=function(e,a){var r=typeof e!="string"&&e!==void 0,u=this.request({method:"POST",data:e,isBinary:r}),y=this;u.on("success",a),u.on("error",function(i){y.onError("xhr post error",i)}),this.sendXhr=u},mf.prototype.doPoll=function(){X8("xhr poll");var e=this.request(),a=this;e.on("data",function(r){a.onData(r)}),e.on("error",function(r){a.onError("xhr poll error",r)}),this.pollXhr=e};function Ho(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(vEt(Ho.prototype),Ho.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var a=this.xhr=new _Et(e),r=this;try{X8("xhr open %s: %s",this.method,this.uri),a.open(this.method,this.uri,this.async);try{if(this.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(var u in this.extraHeaders)this.extraHeaders.hasOwnProperty(u)&&a.setRequestHeader(u,this.extraHeaders[u])}}catch{}if(this.method==="POST")try{this.isBinary?a.setRequestHeader("Content-type","application/octet-stream"):a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in a&&(a.withCredentials=this.withCredentials),this.requestTimeout&&(a.timeout=this.requestTimeout),this.hasXDR()?(a.onload=function(){r.onLoad()},a.onerror=function(){r.onError(a.responseText)}):a.onreadystatechange=function(){if(a.readyState===2)try{var y=a.getResponseHeader("Content-Type");(r.supportsBinary&&y==="application/octet-stream"||y==="application/octet-stream; charset=UTF-8")&&(a.responseType="arraybuffer")}catch{}a.readyState===4&&(a.status===200||a.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof a.status=="number"?a.status:0)},0))},X8("xhr data %s",this.data),a.send(this.data)}catch(y){setTimeout(function(){r.onError(y)},0);return}typeof document<"u"&&(this.index=Ho.requestsCount++,Ho.requests[this.index]=this)},Ho.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Ho.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},Ho.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},Ho.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=jL:this.xhr.onreadystatechange=jL,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ho.requests[this.index],this.xhr=null}},Ho.prototype.onLoad=function(){var e;try{var a;try{a=this.xhr.getResponseHeader("Content-Type")}catch{}a==="application/octet-stream"||a==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)},Ho.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},Ho.prototype.abort=function(){this.cleanup()},Ho.requestsCount=0,Ho.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",UL);else if(typeof addEventListener=="function"){var wEt="onpagehide"in xEt?"pagehide":"unload";addEventListener(wEt,UL,!1)}}function UL(){for(var e in Ho.requests)Ho.requests.hasOwnProperty(e)&&Ho.requests[e].abort()}var kEt=$8.exports,K8=DL,CEt=av,HL=R8,EEt=gf,SEt=/\n/g,TEt=/\\n/g,ov;function AEt(){}function gf(e){K8.call(this,e),this.query=this.query||{},ov||(ov=HL.___eio=HL.___eio||[]),this.index=ov.length;var a=this;ov.push(function(r){a.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){a.script&&(a.script.onerror=AEt)},!1)}CEt(gf,K8),gf.prototype.supportsBinary=!1,gf.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),K8.prototype.doClose.call(this)},gf.prototype.doPoll=function(){var e=this,a=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),a.async=!0,a.src=this.uri(),a.onerror=function(y){e.onError("jsonp poll error",y)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(a,r):(document.head||document.body).appendChild(a),this.script=a;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var y=document.createElement("iframe");document.body.appendChild(y),document.body.removeChild(y)},100)},gf.prototype.doWrite=function(e,a){var r=this;if(!this.form){var u=document.createElement("form"),y=document.createElement("textarea"),i=this.iframeId="eio_iframe_"+this.index,l;u.className="socketio",u.style.position="absolute",u.style.top="-1000px",u.style.left="-1000px",u.target=i,u.method="POST",u.setAttribute("accept-charset","utf-8"),y.name="d",u.appendChild(y),document.body.appendChild(u),this.form=u,this.area=y}this.form.action=this.uri();function n(){_(),a()}function _(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(o){r.onError("jsonp polling iframe removal error",o)}try{var f='<iframe src="javascript:0" name="'+r.iframeId+'">';l=document.createElement(f)}catch{l=document.createElement("iframe"),l.name=r.iframeId,l.src="javascript:0"}l.id=r.iframeId,r.form.appendChild(l),r.iframe=l}_(),e=e.replace(TEt,`\\
|
|
3573
|
+
*/var C7t="store";function zp(e,a){Object.keys(e).forEach(function(r){return a(e[r],r)})}function GV(e){return e!==null&&typeof e=="object"}function E7t(e){return e&&typeof e.then=="function"}function jc(e,a){if(!e)throw new Error("[vuex] "+a)}function S7t(e,a){return function(){return e(a)}}function WV(e,a,r){return a.indexOf(e)<0&&(r&&r.prepend?a.unshift(e):a.push(e)),function(){var u=a.indexOf(e);u>-1&&a.splice(u,1)}}function qV(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;D_(e,r,[],e._modules.root,!0),h8(e,r,a)}function h8(e,a,r){var u=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var y=e._wrappedGetters,i={};zp(y,function(l,n){i[n]=S7t(l,e),Object.defineProperty(e.getters,n,{get:function(){return i[n]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&M7t(e),u&&r&&e._withCommit(function(){u.data=null})}function D_(e,a,r,u,y){var i=!r.length,l=e._modules.getNamespace(r);if(u.namespaced&&(e._modulesNamespaceMap[l]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+l+" for the namespaced module "+r.join("/")),e._modulesNamespaceMap[l]=u),!i&&!y){var n=f8(a,r.slice(0,-1)),_=r[r.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&_ in n&&console.warn('[vuex] state field "'+_+'" was overridden by a module with the same name at "'+r.join(".")+'"'),n[_]=u.state})}var f=u.context=T7t(e,l,r);u.forEachMutation(function(o,m){var x=l+m;A7t(e,x,o,f)}),u.forEachAction(function(o,m){var x=o.root?m:l+m,c=o.handler||o;N7t(e,x,c,f)}),u.forEachGetter(function(o,m){var x=l+m;B7t(e,x,o,f)}),u.forEachChild(function(o,m){D_(e,a,r.concat(m),o,y)})}function T7t(e,a,r){var u=a==="",y={dispatch:u?e.dispatch:function(i,l,n){var _=$_(i,l,n),f=_.payload,o=_.options,m=_.type;if((!o||!o.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+_.type+", global type: "+m);return}return e.dispatch(m,f)},commit:u?e.commit:function(i,l,n){var _=$_(i,l,n),f=_.payload,o=_.options,m=_.type;if((!o||!o.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+_.type+", global type: "+m);return}e.commit(m,f,o)}};return Object.defineProperties(y,{getters:{get:u?function(){return e.getters}:function(){return YV(e,a)}},state:{get:function(){return f8(e.state,r)}}}),y}function YV(e,a){if(!e._makeLocalGettersCache[a]){var r={},u=a.length;Object.keys(e.getters).forEach(function(y){if(y.slice(0,u)===a){var i=y.slice(u);Object.defineProperty(r,i,{get:function(){return e.getters[y]},enumerable:!0})}}),e._makeLocalGettersCache[a]=r}return e._makeLocalGettersCache[a]}function A7t(e,a,r,u){var y=e._mutations[a]||(e._mutations[a]=[]);y.push(function(i){r.call(e,u.state,i)})}function N7t(e,a,r,u){var y=e._actions[a]||(e._actions[a]=[]);y.push(function(i){var l=r.call(e,{dispatch:u.dispatch,commit:u.commit,getters:u.getters,state:u.state,rootGetters:e.getters,rootState:e.state},i);return E7t(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(n){throw e._devtoolHook.emit("vuex:error",n),n}):l})}function B7t(e,a,r,u){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(y){return r(u.state,u.getters,y.state,y.getters)}}function M7t(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&jc(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function f8(e,a){return a.reduce(function(r,u){return r[u]},e)}function $_(e,a,r){return GV(e)&&e.type&&(r=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&jc(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:r}}var I7t="vuex bindings",ZV="vuex:mutations",m8="vuex:actions",uf="vuex",O7t=0;function F7t(e,a){k7t({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:[I7t]},function(r){r.addTimelineLayer({id:ZV,label:"Vuex Mutations",color:XV}),r.addTimelineLayer({id:m8,label:"Vuex Actions",color:XV}),r.addInspector({id:uf,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree(function(u){if(u.app===e&&u.inspectorId===uf)if(u.filter){var y=[];eL(y,a._modules.root,u.filter,""),u.rootNodes=y}else u.rootNodes=[QV(a._modules.root,"")]}),r.on.getInspectorState(function(u){if(u.app===e&&u.inspectorId===uf){var y=u.nodeId;YV(a,y),u.state=V7t(R7t(a._modules,y),y==="root"?a.getters:a._makeLocalGettersCache,y)}}),r.on.editInspectorState(function(u){if(u.app===e&&u.inspectorId===uf){var y=u.nodeId,i=u.path;y!=="root"&&(i=y.split("/").filter(Boolean).concat(i)),a._withCommit(function(){u.set(a._state.data,i,u.state.value)})}}),a.subscribe(function(u,y){var i={};u.payload&&(i.payload=u.payload),i.state=y,r.notifyComponentUpdate(),r.sendInspectorTree(uf),r.sendInspectorState(uf),r.addTimelineEvent({layerId:ZV,event:{time:Date.now(),title:u.type,data:i}})}),a.subscribeAction({before:function(u,y){var i={};u.payload&&(i.payload=u.payload),u._id=O7t++,u._time=Date.now(),i.state=y,r.addTimelineEvent({layerId:m8,event:{time:u._time,title:u.type,groupId:u._id,subtitle:"start",data:i}})},after:function(u,y){var i={},l=Date.now()-u._time;i.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},u.payload&&(i.payload=u.payload),i.state=y,r.addTimelineEvent({layerId:m8,event:{time:Date.now(),title:u.type,groupId:u._id,subtitle:"end",data:i}})}})})}var XV=8702998,z7t=6710886,P7t=16777215,KV={label:"namespaced",textColor:P7t,backgroundColor:z7t};function JV(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function QV(e,a){return{id:a||"root",label:JV(a),tags:e.namespaced?[KV]:[],children:Object.keys(e._children).map(function(r){return QV(e._children[r],a+r+"/")})}}function eL(e,a,r,u){u.includes(r)&&e.push({id:u||"root",label:u.endsWith("/")?u.slice(0,u.length-1):u||"Root",tags:a.namespaced?[KV]:[]}),Object.keys(a._children).forEach(function(y){eL(e,a._children[y],r,u+y+"/")})}function V7t(e,a,r){a=r==="root"?a:a[r];var u=Object.keys(a),y={state:Object.keys(e.state).map(function(l){return{key:l,editable:!0,value:e.state[l]}})};if(u.length){var i=L7t(a);y.getters=Object.keys(i).map(function(l){return{key:l.endsWith("/")?JV(l):l,editable:!1,value:g8(function(){return i[l]})}})}return y}function L7t(e){var a={};return Object.keys(e).forEach(function(r){var u=r.split("/");if(u.length>1){var y=a,i=u.pop();u.forEach(function(l){y[l]||(y[l]={_custom:{value:{},display:l,tooltip:"Module",abstract:!0}}),y=y[l]._custom.value}),y[i]=g8(function(){return e[r]})}else a[r]=g8(function(){return e[r]})}),a}function R7t(e,a){var r=a.split("/").filter(function(u){return u});return r.reduce(function(u,y,i){var l=u[y];if(!l)throw new Error('Missing module "'+y+'" for path "'+a+'".');return i===r.length-1?l:l._children},a==="root"?e:e.root._children)}function g8(e){try{return e()}catch(a){return a}}var Uc=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=(typeof r=="function"?r():r)||{}},tL={namespaced:{configurable:!0}};tL.namespaced.get=function(){return!!this._rawModule.namespaced},Uc.prototype.addChild=function(e,a){this._children[e]=a},Uc.prototype.removeChild=function(e){delete this._children[e]},Uc.prototype.getChild=function(e){return this._children[e]},Uc.prototype.hasChild=function(e){return e in this._children},Uc.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)},Uc.prototype.forEachChild=function(e){zp(this._children,e)},Uc.prototype.forEachGetter=function(e){this._rawModule.getters&&zp(this._rawModule.getters,e)},Uc.prototype.forEachAction=function(e){this._rawModule.actions&&zp(this._rawModule.actions,e)},Uc.prototype.forEachMutation=function(e){this._rawModule.mutations&&zp(this._rawModule.mutations,e)},Object.defineProperties(Uc.prototype,tL);var Pp=function(e){this.register([],e,!1)};Pp.prototype.get=function(e){return e.reduce(function(a,r){return a.getChild(r)},this.root)},Pp.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(r,u){return a=a.getChild(u),r+(a.namespaced?u+"/":"")},"")},Pp.prototype.update=function(e){aL([],this.root,e)},Pp.prototype.register=function(e,a,r){var u=this;r===void 0&&(r=!0),process.env.NODE_ENV!=="production"&&iL(e,a);var y=new Uc(a,r);if(e.length===0)this.root=y;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],y)}a.modules&&zp(a.modules,function(l,n){u.register(e.concat(n),l,r)})},Pp.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),r=e[e.length-1],u=a.getChild(r);if(!u){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}u.runtime&&a.removeChild(r)},Pp.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),r=e[e.length-1];return a?a.hasChild(r):!1};function aL(e,a,r){if(process.env.NODE_ENV!=="production"&&iL(e,r),a.update(r),r.modules)for(var u in r.modules){if(!a.getChild(u)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+u+"' on hot reloading, manual reload is needed");return}aL(e.concat(u),a.getChild(u),r.modules[u])}}var rL={assert:function(e){return typeof e=="function"},expected:"function"},D7t={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},nL={getters:rL,mutations:rL,actions:D7t};function iL(e,a){Object.keys(nL).forEach(function(r){if(a[r]){var u=nL[r];zp(a[r],function(y,i){jc(u.assert(y),$7t(e,r,i,y,u.expected))})}})}function $7t(e,a,r,u,y){var i=a+" should be "+y+' but "'+a+"."+r+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(u)+".",i}var Fl=function e(a){var r=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(jc(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),jc(this instanceof e,"store must be called with the new operator."));var u=a.plugins;u===void 0&&(u=[]);var y=a.strict;y===void 0&&(y=!1);var i=a.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pp(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var l=this,n=this,_=n.dispatch,f=n.commit;this.dispatch=function(m,x){return _.call(l,m,x)},this.commit=function(m,x,c){return f.call(l,m,x,c)},this.strict=y;var o=this._modules.root.state;D_(this,o,[],this._modules.root),h8(this,o),u.forEach(function(m){return m(r)})},y8={state:{configurable:!0}};Fl.prototype.install=function(e,a){e.provide(a||C7t,this),e.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;r&&F7t(e,this)},y8.state.get=function(){return this._state.data},y8.state.set=function(e){process.env.NODE_ENV!=="production"&&jc(!1,"use store.replaceState() to explicit replace store state.")},Fl.prototype.commit=function(e,a,r){var u=this,y=$_(e,a,r),i=y.type,l=y.payload,n=y.options,_={type:i,payload:l},f=this._mutations[i];if(!f){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){f.forEach(function(o){o(l)})}),this._subscribers.slice().forEach(function(o){return o(_,u.state)}),process.env.NODE_ENV!=="production"&&n&&n.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Fl.prototype.dispatch=function(e,a){var r=this,u=$_(e,a),y=u.type,i=u.payload,l={type:y,payload:i},n=this._actions[y];if(!n){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+y);return}try{this._actionSubscribers.slice().filter(function(f){return f.before}).forEach(function(f){return f.before(l,r.state)})}catch(f){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(f))}var _=n.length>1?Promise.all(n.map(function(f){return f(i)})):n[0](i);return new Promise(function(f,o){_.then(function(m){try{r._actionSubscribers.filter(function(x){return x.after}).forEach(function(x){return x.after(l,r.state)})}catch(x){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(x))}f(m)},function(m){try{r._actionSubscribers.filter(function(x){return x.error}).forEach(function(x){return x.error(l,r.state,m)})}catch(x){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(x))}o(m)})})},Fl.prototype.subscribe=function(e,a){return WV(e,this._subscribers,a)},Fl.prototype.subscribeAction=function(e,a){var r=typeof e=="function"?{before:e}:e;return WV(r,this._actionSubscribers,a)},Fl.prototype.watch=function(e,a,r){var u=this;return process.env.NODE_ENV!=="production"&&jc(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(u.state,u.getters)},a,Object.assign({},r))},Fl.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},Fl.prototype.registerModule=function(e,a,r){r===void 0&&(r={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(jc(Array.isArray(e),"module path must be a string or an Array."),jc(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),D_(this,this.state,e,this._modules.get(e),r.preserveState),h8(this,this.state)},Fl.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&jc(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var r=f8(a.state,e.slice(0,-1));delete r[e[e.length-1]]}),qV(this)},Fl.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&jc(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Fl.prototype.hotUpdate=function(e){this._modules.update(e),qV(this,!0)},Fl.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(Fl.prototype,y8);var j7t=H7t(function(e,a){var r={};return process.env.NODE_ENV!=="production"&&!oL(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),U7t(a).forEach(function(u){var y=u.key,i=u.val;r[y]=function(){for(var l=[],n=arguments.length;n--;)l[n]=arguments[n];var _=this.$store.commit;if(e){var f=G7t(this.$store,"mapMutations",e);if(!f)return;_=f.context.commit}return typeof i=="function"?i.apply(this,[_].concat(l)):_.apply(this.$store,[i].concat(l))}}),r});function U7t(e){return oL(e)?Array.isArray(e)?e.map(function(a){return{key:a,val:a}}):Object.keys(e).map(function(a){return{key:a,val:e[a]}}):[]}function oL(e){return Array.isArray(e)||GV(e)}function H7t(e){return function(a,r){return typeof a!="string"?(r=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,r)}}function G7t(e,a,r){var u=e._modulesNamespaceMap[r];return process.env.NODE_ENV!=="production"&&!u&&console.error("[vuex] module namespace not found in "+a+"(): "+r),u}const W7t="/icn-play.svg",q7t="/icn-tiros-de-esquina.svg",Y7t="/icn-tiro-a-porteria.svg",Z7t="/icn-cambio.svg",X7t="/icn-falta.svg",K7t="/atajada.svg",J7t="/fuera-de-lugar.svg",_8="/gol.svg",Q7t="/var.png",ekt="/tiempo-agregado.svg",tkt="/jugada-peligrosa.svg",akt="/penal-marcado.svg",rkt="/penal-fallado.svg",nkt="/inicia-el-partido.svg",ikt="/fin-del-partido.svg",okt="/icn-tarjeta-amarilla.svg",skt="/icn-tarjeta-roja.svg",lkt=[1,2,3,4,6],ckt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],a=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return u8.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):u8.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):u8.RED_CARD_IDS.includes(a)?(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(a=>m7t(a))),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||lkt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...j7t("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,a]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(a),teamId:this.gameEvent.team_id})}}},dkt=e=>(t.pushScopeId("data-v-c284b7dc"),e=e(),t.popScopeId(),e),ukt={class:"time-line-event__details"},pkt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},hkt=["src"],fkt=dkt(()=>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)),mkt={class:"time-line-event__details__info"},gkt={key:0,class:"time-line-event__details__info__header__players"},ykt={class:"time-line-event__details__info__header__players__div-img"},_kt=["src"],vkt={class:"time-line-event__details__info__body"},bkt={class:"time-line-event__details__info__body__comment"},xkt={class:"time-line-event__minute__container"},wkt={class:"time-line-event__minute__container__text"},kkt={class:"time-line-event__minute__container__icon-container"},Ckt={class:"time-line-event__minute__container__icon-container__icon"},Ekt={key:0,src:q7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Skt={key:1,src:Y7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Tkt={key:2,src:Z7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Akt={key:3,src:X7t,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Nkt={key:4,src:K7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Bkt={key:5,src:J7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Mkt={key:6,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ikt={key:7,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Okt={key:8,src:_8,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Fkt={key:9,src:Q7t,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zkt={key:10,src:ekt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Pkt={key:11,src:tkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vkt={key:12,src:akt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Lkt={key:13,src:rkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Rkt={key:14,src:nkt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Dkt={key:15,src:ikt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$kt={key:16,src:okt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jkt={key:17,src:skt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},Ukt={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 Hkt(e,a,r,u,y,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${r.width}px`}),key:y.gameEventKey},[t.createElementVNode("div",ukt,[r.gameEvent.video_link!=="-"&&r.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=l=>i.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[t.createElementVNode("video",pkt,[t.createElementVNode("source",{src:r.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,hkt)]),fkt])):t.createCommentVNode("",!0),t.createElementVNode("div",mkt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[r.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",gkt,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":n===1}]),key:n},[t.createElementVNode("div",ykt,[t.createElementVNode("img",{src:l,alt:""},null,8,_kt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:a[1]||(a[1]=l=>i.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[r.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:W7t,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(r.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${r.gameEvent.event_type_name}`:r.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.gameEvent.category_id?r.gameEvent.event_type_id===5?r.gameEvent.category_name:r.gameEvent.event_type_name==="Gol"?r.gameEvent.event_type_name+" de "+r.gameEvent.team_name:r.gameEvent.event_type_name:r.gameEvent.comments),1)],2)],2),t.createElementVNode("div",vkt,[t.createElementVNode("div",bkt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",i.minuteClasses])},[t.createElementVNode("div",xkt,[t.createElementVNode("div",wkt,t.toDisplayString(r.gameEvent.minute)+"'",1),t.createElementVNode("div",kkt,[t.createElementVNode("div",Ckt,[r.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",Ekt)):r.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",Skt)):r.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",Tkt)):r.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",Akt)):r.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",Nkt)):r.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Bkt)):r.gameEvent.category_id==6&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==5&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==1&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==2&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==3&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==7&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==12&&r.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",Mkt)):r.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Ikt)):r.gameEvent.category_id==13||r.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Okt)):r.gameEvent.category_id==30||r.gameEvent.category_id==31||r.gameEvent.category_id==32||r.gameEvent.category_id==33||r.gameEvent.category_id==34||r.gameEvent.category_id==35||r.gameEvent.category_id==36||r.gameEvent.category_id==37||r.gameEvent.category_id==38||r.gameEvent.category_id==39||r.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",Fkt)):r.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",zkt)):r.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",Pkt)):r.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",Vkt)):r.gameEvent.category_id==15||r.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Lkt)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==16||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==18||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==20||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Rkt)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==13||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==17||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==19||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==21||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Dkt)):r.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",$kt)):r.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",jkt)):(t.openBlock(),t.createElementBlock("img",Ukt))])])])],2)],6)}const Gkt=$0(ckt,[["render",Hkt],["__scopeId","data-v-c284b7dc"]]),Wkt={"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"},qkt={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 j_=null;const Ykt={name:"TimeLine",components:{Tooltip:u7t,TimeLineEvent:Gkt},mixins:[h7t],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})}},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 a=await this.fetchGameEvents(e);a?(this.gameEvents=[...a],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(a){throw new Error(a)}},getGameEventClassAndSetIcon(e,a){return e.icon=a===0?"inicio_del_partido":Wkt[`${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:a}}=await $V.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},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)j_=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),j_.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const r=this.$refs[`gameEventDiv${a}`][0],u=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,y=e+12;r&&(r.style.height=`${y}px`),u&&(u.style.height=`${y}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let a=0;switch(e){case 1:a=0;break;case 2:a=45;break;case 3:a=90;break;case 4:a=105;break;case 5:a=120;break}return a},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const a=this.gameEvents.findIndex(r=>r.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const r=qkt[a.game_status];r&&this.timeLineStatuses.push({...r,gameEvent:a})}),this.timeLineStatuses.sort((a,r)=>r.weight-a.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const a=this.gameData[e].team_id;return f7t(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){j_&&j_.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,a]){this.channelName===e&&this.addGameEventFromChannel(a)},update_mxm([e,a]){this.channelName===e&&(this.deleteGameEventFromChannel(a),this.addGameEventFromChannel(a))},delete_mxm([e,a]){this.channelName===e&&this.deleteGameEventFromChannel(a)}}},sL=e=>(t.pushScopeId("data-v-f6284340"),e=e(),t.popScopeId(),e),Zkt={ref:"timeLine",class:"time-line"},Xkt={class:"time-line__header"},Kkt={class:"time-line__header__dot"},Jkt={class:"time-line__header__dot__home-team team-logo"},Qkt=["src"],e9t={class:"time-line__header__dot__away-team team-logo"},t9t=["src"],a9t={class:"time-line__game-events"},r9t={key:1,class:"start-line"},n9t=sL(()=>t.createElementVNode("div",null,null,-1)),i9t=sL(()=>t.createElementVNode("div",null,null,-1)),o9t=[n9t,i9t],s9t={key:1,class:"noEventText"},l9t={class:"tooltip-data"},c9t=["src"];function d9t(e,a,r,u,y,i){const l=t.resolveComponent("TimeLineEvent"),n=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Zkt,[t.createElementVNode("div",Xkt,[t.createElementVNode("div",Kkt,[t.createElementVNode("div",Jkt,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,Qkt)]),t.createElementVNode("div",e9t,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,t9t)])])]),t.createElementVNode("div",a9t,[r.gameData.status!==4||r.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:y.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(_,f)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:_.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${f}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(_,f))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(_))},[t.createVNode(l,{"game-event":_,"is-mobile":i.isMobile,"time-line-width":y.timeLineWidth,width:i.gameEventWidth,onEventHeight:o=>i.updateContainerHeight(o,f),onPlayerChanged:a[0]||(a[0]=o=>e.$emit("player-changed",o)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","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),r.gameData.status===1&&f===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",r9t,o9t)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",s9t,"Aún no comienza el partido"))])],512),t.createVNode(n,{data:y.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",l9t,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:y.dataVideo.link,format:"video/mp4"},null,8,c9t)])])]),_:1},8,["data"])],64)}const u9t=$0(Ykt,[["render",d9t],["__scopeId","data-v-f6284340"]]),p9t={class:"game-time-line__options"},h9t={class:"game-time-line__timeline"},f9t={__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:()=>({})}},setup(e){$V.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const a=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"}),r=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 u=null;const y=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),l=t.ref({}),n=t.ref(null),_=t.ref(0),f=t.computed(()=>{let s="all";return i.value==="1er tiempo"||i.value==="1er"?s="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(s="secondHalf"),s}),o=t.computed(()=>_.value<500);function m(s){i.value=s}function x(s){l.value=s}function c(){if(window.ResizeObserver)u=new ResizeObserver(()=>{_.value=n.value.clientWidth}),u.observe(n.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{c()}),t.onBeforeUnmount(()=>{u&&u.unobserve(n.value)}),(s,d)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:n,class:"game-time-line"},[t.createElementVNode("div",p9t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,p=>(t.openBlock(),t.createElementBlock("div",{key:p,class:"game-time-line__options__option"},[t.createVNode(G6t,t.mergeProps(_.value<390?r.value:a.value,{text:p=="Todo"?p:_.value<390?p.substring(0,3):p,"is-active":i.value===p,onClick:h=>m(p)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",h9t,[t.createVNode(u9t,{"game-data":e.game,"time-line-period":f.value,"is-mobile":o.value,socket:e.socket,onGameEventsByPeriodFilled:x},null,8,["game-data","time-line-period","is-mobile","socket"])])],512))}},m9t=$0(f9t,[["__scopeId","data-v-787294df"]]);function g9t(e){const a=t.ref({width:0,height:0});function r(){const u=e.value.getBoundingClientRect();a.value.width=u.width,a.value.height=u.height}return t.onMounted(()=>{r(),window.addEventListener("resize",r)}),t.onUnmounted(()=>{window.removeEventListener("resize",r)}),{elementSize:a}}const y9t=(e,a)=>{const r=e.__vccOpts||e;for(const[u,y]of a)r[u]=y;return r},v8={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,a=this.$refs.content.scrollWidth;a>0&&e>0&&(a>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},lL=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},cL=v8.setup;v8.setup=cL?(e,a)=>(lL(),cL(e,a)):lL;const _9t={ref:"gscScrollableContainer",class:"scrollable-container"},v9t={class:"scrollable-arrows"},b9t=["width","height","viewBox"],x9t=["stroke"],w9t={class:"scrollable-wrapper"},k9t={class:"scrollable-arrows"},C9t=["width","height","viewBox"],E9t=["stroke"];function S9t(e,a,r,u,y,i){return t.openBlock(),t.createElementBlock("div",_9t,[r.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...l)=>i.scrollLeft&&i.scrollLeft(...l))},[t.createElementVNode("div",v9t,[(t.openBlock(),t.createElementBlock("svg",{width:r.arrowsWidth,height:r.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:r.arrowsColor},null,8,x9t)],8,b9t))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...l)=>i.getScroll&&i.getScroll(...l))},[t.createElementVNode("div",w9t,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),r.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...l)=>i.scrollRight&&i.scrollRight(...l))},[t.createElementVNode("div",k9t,[(t.openBlock(),t.createElementBlock("svg",{width:r.arrowsWidth,height:r.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:r.arrowsColor},null,8,E9t)],8,C9t))])],2)):t.createCommentVNode("",!0)],512)}const T9t=y9t(v8,[["render",S9t],["__scopeId","data-v-b548a08d"]]),A9t=(e,a)=>{const r=e.__vccOpts||e;for(const[u,y]of a)r[u]=y;return r},b8={components:{GSCSlider:T9t},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:a}=g9t(e);return{myDivRef:e,elementSize:a}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var a={};return e.width>768?a={fontSize:"16px"}:e.width>480?a={fontSize:"14px"}:a={fontSize:"12px"},a}}},dL=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},uL=b8.setup;b8.setup=uL?(e,a)=>(dL(),uL(e,a)):dL;const N9t={ref:"myDivRef"},B9t={key:0,class:"gs-switch-container"},M9t=["onClick"],I9t={key:1,class:"gs-switch-container-type"},O9t=["onClick"],F9t={key:2,class:"gs-switch-container-carousel"},z9t=["onClick"];function P9t(e,a,r,u,y,i){const l=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",N9t,[r.type==0?(t.openBlock(),t.createElementBlock("div",B9t,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(u.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,color:"grey !important"}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,M9t))),128))],4),t.renderSlot(e.$slots,r.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),r.type==1?(t.openBlock(),t.createElementBlock("div",I9t,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(u.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:r.backgroundOptionDisable}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,O9t))),128))],4)])):t.createCommentVNode("",!0),r.type==2?(t.openBlock(),t.createElementBlock("div",F9t,[t.createVNode(l,{arrows:r.arrow,"background-color":r.background,"px-scroll":r.pxScroll,"scroll-color":r.scrollColor,"arrows-position":r.arrowsPosition,arrowsScrollHide:r.arrowsScrollHide,"arrows-background":r.arrowsBackground,"arrows-container-bg-l":r.arrowsContainerBgL,"arrows-container-bg-r":r.arrowsContainerBgR,"arrows-margin":r.arrowsMargin,"arrows-radius":r.arrowsRadius,"arrows-border":r.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.buttons,(n,_)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:r.height},r.selectedOption==n?{borderColor:r.colorOptionActive,color:r.colorFont+"!important",background:r.backgroundOptionActive}:{borderColor:r.colorOptionDisable,color:"grey !important"}]),key:_,onClick:f=>(r.selectedOption=n,i.clickEmitEvent(n))},t.toDisplayString(n),13,z9t))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const pL=A9t(b8,[["render",P9t],["__scopeId","data-v-8a86dfaf"]]);function hL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function V9t(e){if(e.__esModule)return e;var a=e.default;if(typeof a=="function"){var r=function u(){return this instanceof u?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};r.prototype=a.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(u){var y=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(r,u,y.get?y:{enumerable:!0,get:function(){return e[u]}})}),r}var x8={exports:{}};function w8(){}w8.prototype={on:function(e,a,r){var u=this.e||(this.e={});return(u[e]||(u[e]=[])).push({fn:a,ctx:r}),this},once:function(e,a,r){var u=this;function y(){u.off(e,y),a.apply(r,arguments)}return y._=a,this.on(e,y,r)},emit:function(e){var a=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),u=0,y=r.length;for(u;u<y;u++)r[u].fn.apply(r[u].ctx,a);return this},off:function(e,a){var r=this.e||(this.e={}),u=r[e],y=[];if(u&&a)for(var i=0,l=u.length;i<l;i++)u[i].fn!==a&&u[i].fn._!==a&&y.push(u[i]);return y.length?r[e]=y:delete r[e],this}},x8.exports=w8,x8.exports.TinyEmitter=w8;var L9t=x8.exports,R9t=L9t,D9t=new R9t;const U_=hL(D9t),dBt="",$9t={class:"game-data__header"},j9t={class:"game-data__header__tournament-season-dropdown"},U9t={class:"game-data__header__teams-carousel"},H9t={class:"game-data__body"},G9t={class:"game-data__body__menu"},W9t={class:"game-data__body__menu__contmenuswitch"};ig.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const q9t=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:IQ,GSCGameTimeLine:m9t,GscSwitchComponent:pL,GSCLineupsMain:e0e,GSCDatosGSMain:G4e,GSCVideoGame:yTe,GSCSummaryMain:Jrt,GSCTacticaFijaMain:U6t}}),Y9t=Si(Object.assign(q9t,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>({})},isSynchronization:{type:Boolean,default:!1}},emits:["openmedia","change-season-id","onOpenProfile"],setup(e,{emit:a}){const r=e,u=bb();U_.on("socket-connected",()=>{u.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)});const y=t.ref({season:[]}),i=t.ref({}),l=t.ref({}),n=t.ref(!0),_=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),f=t.ref([{componentName:"GSCSummaryMain",name:"Resumen",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"GSCDatosGSMain",name:"Datos Golstats",id:3},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Tactica Fija",id:7}]);let o=null;const m=t.ref(null),x=t.ref(0),c=t.ref(f.value[0]);let s=t.ref("");const d=t.computed(()=>{const A=[];return i.value&&i.value.id&&(A.push({id:i.value.id,name:i.value.name,type:i.value.type}),i.value.related_seasons&&i.value.related_seasons.forEach(M=>{A.push({id:M.id,type:M.type})})),A});function p(){o=new ResizeObserver(A=>{for(const M of A)x.value=M.contentRect.width}),o.observe(m.value)}const h=t.computed(()=>{let A={};return l.value&&l.value.game_id&&(A={gameId:l.value.game_id,id:l.value.game_id,seasonId:l.value.season_id,status:l.value.game_status,game_status:l.value.game_status==0?4:l.value.game_status,dateTimeUTC:l.value.date_time_utc,homeTeam:l.value.home_team,awayTeam:l.value.visiting_team,is_live:l.value.is_live}),A});t.watch(()=>u.state.nextGeneral.gameForAnalysis,()=>{u.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)},{deep:!0,immediate:!0});function g(A){y.value=A,n.value=A.is_captured!==0,y.value.id!==A.id&&(y.value=A)}function b(A){a("openmedia",A)}function v(A){a("onOpenProfile",A)}function w(A){E(A),A=="Estadísticas"&&(s.value="Comparativa")}function C(){s.value=""}function k(A){i.value.id!==A.id&&(i.value=A,a("change-season-id",A.id))}const B=t.computed(()=>f.value.map(A=>{if(n.value)return A.name;if(A.id!==5&&A.id!==6)return A.name}).filter(A=>A!=null));function E(A){c.value=f.value.find(M=>M.name===A)||f.value[0]}t.onMounted(()=>{p(),t.nextTick(()=>{r.isSynchronization&&E("Tactica Fija")})}),t.onBeforeUnmount(()=>{o&&o.disconnect()});function T(A){l.value=A}return(A,M)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:m},[t.createElementVNode("div",$9t,[t.createElementVNode("div",j9t,[t.createVNode(t.unref(v$),{"current-season-id":e.currentSeasonId,onInput:g},null,8,["current-season-id"]),t.createVNode(t.unref(j$),{"current-season-id":e.currentSeasonId,seasons:y.value.seasons,onInput:k},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",U9t,[t.createVNode(t.unref(KG),{token:_.value,"await-for-seasons":"",seasons:d.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":r.defaultGameId,"sort-calendar":r.sortCalendar,onChangeGameCarousel:T},null,8,["token","seasons","default-game-id","sort-calendar"])])]),t.createElementVNode("div",H9t,[t.createElementVNode("div",G9t,[t.createElementVNode("div",W9t,[t.createVNode(t.unref(pL),{type:2,buttons:B.value,"font-family":"Poppins-Regular","font-size":"16px",width:x.value<400||x.value<700?"max-content":x.value<840||x.value<1050?"155px":"165px","selected-option":c.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:E},null,8,["buttons","width","selected-option"])])]),h.value&&h.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value.componentName),{key:0,game:h.value,subsection:t.unref(s),seasonSelected:i.value,showLineups:n.value,socket:e.socket,"is-tactic-visible":!!i.value.show_tactic,"is-synchronization":e.isSynchronization,onResetSubsection:C,onOpenmedia:b,onOnOpenProfile:v,onChangeToTab:w,onOpenMediaPlayer:b},null,40,["game","subsection","seasonSelected","showLineups","socket","is-tactic-visible","is-synchronization"])):t.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-16ed7ea9"]]);async function Hs({url:e,options:a={},retries:r=3}){return await ig.get(e,a).then(u=>u).catch(u=>r>0?Hs({url:e,options:a,retries:r-1}):u)}async function fL({seasonId:e},a=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(r){if(a)return fL({seasonId:e},!1);throw new Error(r)}}async function Z9t({seasonId:e}){try{return(await Hs({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function X9t({seasonId:e}){try{return(await Hs({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function K9t(e,a,r,u,y,i,l=!1){const n=r.map(_=>_===1?2:_===2?1:3);return e.filter(_=>{const f=i&&_[y.teamId]?_[y.teamId]!==i:!1,o=a===1?2:1;return(l||u.includes(_[y.gameId]))&&(!a||(f?o:a)===_[y.playingAs])&&(r.includes(_[y.matchResult])&&_[y.teamId]===i||n.includes(_[y.matchResult])&&_[y.teamId]!==i)})}function mL(e,a,r,u,y){return a.length===2&&r.length===3&&u.length===6?e:e.filter(i=>a.includes(i[y.playingAs])&&r.includes(i[y.matchResult])&&u.includes(i[y.section]))}async function gL({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Hs({url:a})).data}catch(a){return Promise.reject(a)}}async function J9t({seasonId:e,gameId:a}){try{const r=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:u}=await Hs({url:r});return u}catch(r){return Promise.reject(r)}}async function Q9t({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Hs({url:a})).data.data}catch(a){return Promise.reject(a)}}async function eCt({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Hs({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const tCt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let k8=null;function yL(){return k8||(k8=Z1(tCt)),k8}async function aCt(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Hs({url:a})).data}catch(a){return Promise.reject(a)}}async function _L({seasonId:e,teamId:a}){try{return await Hs({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(r){return Promise.reject(r)}}async function rCt(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Hs({url:a})}catch(a){return Promise.reject(a)}}async function nCt(e){try{return await Hs({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const iCt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,r,u){return K9t(e.seasonPlays,u["filterGeneral/getPlayingAs"],u["filterGeneral/getResults"],u["filterGeneral/getSelectedGamesIds"],yL(),u["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((r,u)=>{const y={...u};return y.home_team=e.currentSeasonTeams.find(i=>i.team_id===u.home_team),y.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===u.visiting_team),r[u.matchday_abbreviation]?r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date]?r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date].push(y):r[u.matchday_abbreviation][u.game_status===3?"canceled":u.date]=[y]:r[u.matchday_abbreviation]={[u.game_status===3?"canceled":u.date]:[y]},r},{});for(let[r,u]of Object.entries(a))a[r]=Object.entries(u).map(([y,i])=>({date:y,games:i})),a[r].sort((y,i)=>y.date<i.date?-1:y.date>i.date?1:0);return a},matchdaysDates(e,a){let r=[];if(a.nextGamesSchedule){let u=Object.keys(a.nextGamesSchedule);for(let y of u){let i=Number(y.replace("M","")),l=a.nextGamesSchedule[y].map(n=>({matchday:i,date:new Date(n.date)}));r=r.concat(l)}}return r},closestMatchDay(e,a){let r=new Date,u=0,y=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,l=i.length;for(let n=0;n<i.length;n++)u=Math.abs(i[n].date-r),u<y&&(l=n,y=u);return i[l]?i[l].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,a){e.booleanIsLiveGamesModalOpen=a},setBooleanAreLiveGames(e,a){e.booleanAreLiveGames=a},updateSeasonPlays(e,a){e.seasonPlays=a},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateSelectedRound(e,a){e.selectedRound=a}},actions:{async getSeasonPlays({commit:e,rootGetters:a},r=!1){try{const u=await fL({seasonId:a["filterGeneral/getSeasonId"]});if(r)return u;e("updateSeasonPlays",u)}catch(u){return Promise.reject(u)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const r=await gL({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const r=await aCt({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",r.teams)}catch(r){return Promise.reject(r)}},async isDataFilled({state:e,dispatch:a,commit:r}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return r("setIsSectionLoading",!1,{root:!0}),!0;const u=[void 0,void 0];return e.currentSeasonGames.length===0&&(u[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(u[1]=a("getCurrentSeasonTeams")),await Promise.all(u),!1}catch(u){throw new Error(u)}}}}};async function oCt({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:r}=await Hs({url:a});return r}catch(a){return Promise.reject(a)}}const sCt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let C8=null;function lCt(){return C8||(C8=Z1(sCt)),C8}class H_{constructor(){Vi(this,"maximumLiveSection",1);Vi(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:[]});Vi(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(a){a>this.maximumLiveSection&&(this.maximumLiveSection=a)}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(a,r,u){u&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=r,this.accomplished.totalsLiveTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,r)),this.accomplished.totalPostGame+=r,this.accomplished.avgPostGameTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,r)}increaseReceivedByOne(a,r,u){u&&(this.setMaximumLiveSection(a),this.received.totalLive+=r,this.received.totalsLiveTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,r)),this.received.totalPostGame+=r,this.received.avgPostGameTrendLive.sections[a-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,r)}increaseTrendLiveAccumulatedByOne(a,r,u){for(let y=r-1;y<a.accumulated.length;y++)a.accumulated[y]+=u}decreaseAccomplishedLiveByOne(a,r){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=r),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,r))}decreaseReceivedLiveByOne(a,r){this.received.totalLive>0&&(this.received.totalLive-=r),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,r))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,r,u){for(let y=a.accumulated.length-1;y>=r-1;y--)a.accumulated[y]-=u}calculateAvg(a){a&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/a,this.received.avgPostGame=this.received.totalPostGame/a,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,a),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,a),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,a),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,a))}getAvgPostGameTrendLiveAvg(a,r){return a.map(u=>u/r)}calculateRanking(a,r,u,y,i,l,n,_){let f=[];y===3&&a&&a.length&&(u.playingAs.length!==2||u.matchResult.length!==3)?f=Array.from(a.reduce((m,x)=>{const c=x[r.playingAs]===1,s=c?"1":"2",d=m.get(x[r.gameId]);if(d)d[s]?d[s].arrayPlays.push(x):d[s]={numberTeamId:x[r.teamId],arrayPlays:[x]};else{const p={numberMatchResult:x[r.matchResult]};c&&(p[1]={numberTeamId:x[r.teamId],arrayPlays:[x]}),m.set(x[r.gameId],p)}return m},new Map).values()).reduce((m,x)=>{const c=u.playingAs.length===2?"both":u.playingAs[0].toString();return(c==="both"&&(x[1].numberTeamId===u.teamId||x[2].numberTeamId===u.teamId)||c!=="both"&&x[c].numberTeamId===u.teamId)&&u.matchResult.includes(x.numberMatchResult)&&m.push(...x[1].arrayPlays,...x[2].arrayPlays),m},[]).filter(m=>u.sections.includes(m[r.section])):(f=a?[...a]:[],n&&a&&(f=a.filter(o=>u.playingAs.includes(o[r.playingAs])&&u.matchResult.includes(o[r.matchResult])&&u.sections.includes(o[r.section])))),this.setTeamRanking(f,y,r,u.teamId,l,"accomplished",_)}setTeamRanking(a,r,u,y,i,l,n){let _=null,f=null;r===3&&(_=new Map,f={},a.forEach(x=>{const c=_.get(x[u.gameId]);c?c[x[u.teamId.toString()]]?c[x[u.teamId.toString()]]+=x[u.total]:c[x[u.teamId.toString()]]=x[u.total]:_.set(x[u.gameId],{[x[u.teamId.toString()]]:x[u.total]})}),Array.from(_.values()).forEach(x=>{const[c,s]=Object.keys(x).map(p=>p),d=x[c]+x[s];this.addPassesAvgByTeam(f,c,d?x[c]/d:0),this.addPassesAvgByTeam(f,s,d?x[s]/d:0)}));const o=i.sort((x,c)=>x.team_id-c.team_id).map(x=>{if(r===3){const c=f[x.team_id.toString()];return{teamId:x.team_id,points:c?c.numberTotalPassesAvg/c.numberGamesCount:0,total:c?c.numberTotalPassesAvg:0}}else{const c=a.reduce((s,d)=>d[u.teamId]===x.team_id&&r===d[u.categoryId]?s+d[u.total]:s,0);return{teamId:x.team_id,points:x[`${n}FilterGames`]?c/x[`${n}FilterGames`]:0,total:c}}}).sort((x,c)=>c.points-x.points);this.accomplished.arrayRankings=o;const m=o.findIndex(x=>x.teamId===y);r===3&&(this.accomplished.avgPreGame=o[m].points),this[l].ranking=m+1,this[l].leader=o[0]}addPassesAvgByTeam(a,r,u){a[r]?(a[r].numberGamesCount+=1,a[r].numberTotalPassesAvg+=u):a[r]={numberGamesCount:1,numberTotalPassesAvg:u}}}class bn{constructor(a,r,u,y,i,l,n,_,f,o){Vi(this,"id","");Vi(this,"generalId",0);Vi(this,"name","");Vi(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Vi(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Vi(this,"accomplishedCategoryIds",[]);Vi(this,"receivedCategoryIds",[]);Vi(this,"generalCategoriesIds",{accomplished:0,received:0});Vi(this,"specialMention","");Vi(this,"homeTeam",new H_);Vi(this,"visitingTeam",new H_);Vi(this,"isLeagueDataCalculated",!1);Vi(this,"leagueAccomplishedMax",0);Vi(this,"leagueReceivedMax",0);Vi(this,"leagueAccomplishedAvg",0);Vi(this,"leagueReceivedAvg",0);Vi(this,"leagueAccomplishedAccumulator",0);Vi(this,"leagueReceivedAccumulator",0);Vi(this,"homeTeamType","homeTeam");Vi(this,"visitingTeamType","visitingTeam");Vi(this,"betOnly",!1);Vi(this,"isPercent",!1);this.id=`${u.accomplished}-${u.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=r||[],this.generalCategoriesIds=u||{accomplished:0,received:0},this.name=y,this.names["0-0"]=y||"",this.names["1-1"]=i||"",this.names["0-1"]=l||"",this.names["1-0"]=n||"",this.generalId=_||0,this.betOnly=f||!1,this.isPercent=o||!1}addLeaguePlays(a,r,u){a.length===0||!u||this.isLeagueDataCalculated||(a.forEach(y=>{this.isAccomplishedLeaguePlay(y[r.categoryId])&&(this.leagueAccomplishedAccumulator+=y[r.total]),this.isReceivedLeaguePlay(y[r.categoryId])&&(this.leagueReceivedAccumulator+=y[r.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*u)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*u)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,r,u){let y="-";for(const[i,l]of Object.entries(this.generalCategoriesIds))a===l&&(y=`${i==="accomplished"?"0":"1"}${y}`),r===l&&(y=`${y}${i==="accomplished"?"0":"1"}`);y.length===3&&(this.mentions[y]=u)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,r,u,y,i){!u||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(u.forEach(l=>{this.isAccomplishedPlay(l[y.categoryId])?this[a].increaseAccomplishedByOne(l[y.section],l[y.total]):this.isReceivedPlay(l[y.categoryId])&&this[a].increaseReceivedByOne(l[y.section],l[y.total])}),this[a].calculateAvg(i))}addLivePlay(a,r,u,y,i=!1,l=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&u[y.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(u[y.section],u[y.total],!0)}subtractLivePlay(a,r,u,y,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(u[y.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(u[y.section],u[y.total]):this.isReceivedPlay(u[y.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(u[y.section],u[y.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(u=>a===u||`${a}_r`===u)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(r=>a===r)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,r,u,y,i,l=!1){this[this.homeTeamType].calculateRanking(a,r,u,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,l,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,r,y,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,l,this.visitingTeamType)}resetData(){this.homeTeam=new H_,this.visitingTeam=new H_,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(a){return this.generalCategoriesIds.accomplished===a||this.generalCategoriesIds.received===a}}const cCt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new bn([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new bn([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new bn([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new bn([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new bn([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new bn([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new bn([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new bn([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new bn([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new bn([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new bn([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new bn([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new bn([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new bn([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new bn([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new bn([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new bn([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new bn([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new bn([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new bn([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new bn([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new bn([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new bn([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new bn([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new bn([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new bn([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new bn([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 bn([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new bn([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new bn([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new bn([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new bn([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new bn([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new bn([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new bn([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new bn([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new bn([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new bn([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},dCt=[{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}],uCt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let E8=null;function pCt(){return E8||(E8=Z1(uCt)),E8}const hCt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let S8=null;function fCt(){return S8||(S8=Z1(hCt)),S8}function G_(e,a,r){return[r.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function vL(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 T8(e,a,r){let u=[...a];return e[r.categoryId]===2&&(u[0]=14),e[r.categoryId]===20&&(u[0]=15),[14,15].includes(u[0])?u:null}var A8={exports:{}},mCt=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gCt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],bL=function(a){var r=a,u=a.indexOf("["),y=a.indexOf("]");u!=-1&&y!=-1&&(a=a.substring(0,u)+a.substring(u,y).replace(/:/g,";")+a.substring(y,a.length));for(var i=mCt.exec(a||""),l={},n=14;n--;)l[gCt[n]]=i[n]||"";return u!=-1&&y!=-1&&(l.source=r,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=yCt(l,l.path),l.queryKey=_Ct(l,l.query),l};function yCt(e,a){var r=/\/{2,9}/g,u=a.replace(r,"/").split("/");return(a.substr(0,1)=="/"||a.length===0)&&u.splice(0,1),a.substr(a.length-1,1)=="/"&&u.splice(u.length-1,1),u}function _Ct(e,a){var r={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,y,i){y&&(r[y]=i)}),r}var N8={exports:{}},B8={exports:{}},q0=1e3,Y0=q0*60,Z0=Y0*60,X0=Z0*24,vCt=X0*365.25,bCt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return xCt(e);if(r==="number"&&isNaN(e)===!1)return a.long?kCt(e):wCt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xCt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*vCt;case"days":case"day":case"d":return r*X0;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Z0;case"minutes":case"minute":case"mins":case"min":case"m":return r*Y0;case"seconds":case"second":case"secs":case"sec":case"s":return r*q0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function wCt(e){return e>=X0?Math.round(e/X0)+"d":e>=Z0?Math.round(e/Z0)+"h":e>=Y0?Math.round(e/Y0)+"m":e>=q0?Math.round(e/q0)+"s":e+"ms"}function kCt(e){return W_(e,X0,"day")||W_(e,Z0,"hour")||W_(e,Y0,"minute")||W_(e,q0,"second")||e+" ms"}function W_(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=bCt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(B8,B8.exports);var CCt=B8.exports;(function(e,a){a=e.exports=CCt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(N8,N8.exports);var q_=N8.exports,ECt=bL,xL=q_("socket.io-client:url"),SCt=TCt;function TCt(e,a){var r=e;a=a||typeof location<"u"&&location,e==null&&(e=a.protocol+"//"+a.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=a.protocol+e:e=a.host+e),/^(https?|wss?):\/\//.test(e)||(xL("protocol-less url %s",e),typeof a<"u"?e=a.protocol+"//"+e:e="https://"+e),xL("parse %s",e),r=ECt(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var u=r.host.indexOf(":")!==-1,y=u?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+y+":"+r.port,r.href=r.protocol+"://"+y+(a&&a.port===r.port?"":":"+r.port),r}var Y_={},M8={exports:{}},I8={exports:{}},K0=1e3,J0=K0*60,Q0=J0*60,e1=Q0*24,ACt=e1*365.25,NCt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return BCt(e);if(r==="number"&&isNaN(e)===!1)return a.long?ICt(e):MCt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function BCt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*ACt;case"days":case"day":case"d":return r*e1;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Q0;case"minutes":case"minute":case"mins":case"min":case"m":return r*J0;case"seconds":case"second":case"secs":case"sec":case"s":return r*K0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function MCt(e){return e>=e1?Math.round(e/e1)+"d":e>=Q0?Math.round(e/Q0)+"h":e>=J0?Math.round(e/J0)+"m":e>=K0?Math.round(e/K0)+"s":e+"ms"}function ICt(e){return Z_(e,e1,"day")||Z_(e,Q0,"hour")||Z_(e,J0,"minute")||Z_(e,K0,"second")||e+" ms"}function Z_(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=NCt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(I8,I8.exports);var OCt=I8.exports;(function(e,a){a=e.exports=OCt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(M8,M8.exports);var FCt=M8.exports,wL={exports:{}};(function(e){e.exports=a;function a(u){if(u)return r(u)}function r(u){for(var y in a.prototype)u[y]=a.prototype[y];return u}a.prototype.on=a.prototype.addEventListener=function(u,y){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(y),this},a.prototype.once=function(u,y){function i(){this.off(u,i),y.apply(this,arguments)}return i.fn=y,this.on(u,i),this},a.prototype.off=a.prototype.removeListener=a.prototype.removeAllListeners=a.prototype.removeEventListener=function(u,y){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+u];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var l,n=0;n<i.length;n++)if(l=i[n],l===y||l.fn===y){i.splice(n,1);break}return i.length===0&&delete this._callbacks["$"+u],this},a.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var y=new Array(arguments.length-1),i=this._callbacks["$"+u],l=1;l<arguments.length;l++)y[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,n=i.length;l<n;++l)i[l].apply(this,y)}return this},a.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]},a.prototype.hasListeners=function(u){return!!this.listeners(u).length}})(wL);var pf=wL.exports,X_={},zCt={}.toString,O8=Array.isArray||function(e){return zCt.call(e)=="[object Array]"},kL=RCt,PCt=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",VCt=typeof ArrayBuffer=="function",LCt=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function RCt(e){return PCt&&Buffer.isBuffer(e)||VCt&&(e instanceof ArrayBuffer||LCt(e))}var F8=O8,CL=kL,EL=Object.prototype.toString,DCt=typeof Blob=="function"||typeof Blob<"u"&&EL.call(Blob)==="[object BlobConstructor]",$Ct=typeof File=="function"||typeof File<"u"&&EL.call(File)==="[object FileConstructor]";X_.deconstructPacket=function(e){var a=[],r=e.data,u=e;return u.data=z8(r,a),u.attachments=a.length,{packet:u,buffers:a}};function z8(e,a){if(!e)return e;if(CL(e)){var r={_placeholder:!0,num:a.length};return a.push(e),r}else if(F8(e)){for(var u=new Array(e.length),y=0;y<e.length;y++)u[y]=z8(e[y],a);return u}else if(typeof e=="object"&&!(e instanceof Date)){var u={};for(var i in e)u[i]=z8(e[i],a);return u}return e}X_.reconstructPacket=function(e,a){return e.data=P8(e.data,a),e.attachments=void 0,e};function P8(e,a){if(!e)return e;if(e&&e._placeholder===!0){var r=typeof e.num=="number"&&e.num>=0&&e.num<a.length;if(r)return a[e.num];throw new Error("illegal attachments")}else if(F8(e))for(var u=0;u<e.length;u++)e[u]=P8(e[u],a);else if(typeof e=="object")for(var y in e)e[y]=P8(e[y],a);return e}X_.removeBlobs=function(e,a){function r(i,l,n){if(!i)return i;if(DCt&&i instanceof Blob||$Ct&&i instanceof File){u++;var _=new FileReader;_.onload=function(){n?n[l]=this.result:y=this.result,--u||a(y)},_.readAsArrayBuffer(i)}else if(F8(i))for(var f=0;f<i.length;f++)r(i[f],f,i);else if(typeof i=="object"&&!CL(i))for(var o in i)r(i[o],o,i)}var u=0,y=e;r(y),u||a(y)},function(e){var a=FCt("socket.io-parser"),r=pf,u=X_,y=O8,i=kL;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=l,e.Decoder=m;function l(){}var n=e.ERROR+'"encode error"';l.prototype.encode=function(p,h){if(a("encoding packet %j",p),e.BINARY_EVENT===p.type||e.BINARY_ACK===p.type)o(p,h);else{var g=_(p);h([g])}};function _(p){var h=""+p.type;if((e.BINARY_EVENT===p.type||e.BINARY_ACK===p.type)&&(h+=p.attachments+"-"),p.nsp&&p.nsp!=="/"&&(h+=p.nsp+","),p.id!=null&&(h+=p.id),p.data!=null){var g=f(p.data);if(g!==!1)h+=g;else return n}return a("encoded %j as %s",p,h),h}function f(p){try{return JSON.stringify(p)}catch{return!1}}function o(p,h){function g(b){var v=u.deconstructPacket(b),w=_(v.packet),C=v.buffers;C.unshift(w),h(C)}u.removeBlobs(p,g)}function m(){this.reconstructor=null}r(m.prototype),m.prototype.add=function(p){var h;if(typeof p=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=x(p),e.BINARY_EVENT===h.type||e.BINARY_ACK===h.type?(this.reconstructor=new s(h),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",h)):this.emit("decoded",h)}else if(i(p)||p.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(p),h&&(this.reconstructor=null,this.emit("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+p)};function x(p){var h=0,g={type:Number(p.charAt(0))};if(e.types[g.type]==null)return d("unknown packet type "+g.type);if(e.BINARY_EVENT===g.type||e.BINARY_ACK===g.type){for(var b=h+1;p.charAt(++h)!=="-"&&h!=p.length;);var v=p.substring(b,h);if(v!=Number(v)||p.charAt(h)!=="-")throw new Error("Illegal attachments");g.attachments=Number(v)}if(p.charAt(h+1)==="/"){for(var b=h+1;++h;){var w=p.charAt(h);if(w===","||h===p.length)break}g.nsp=p.substring(b,h)}else g.nsp="/";var C=p.charAt(h+1);if(C!==""&&Number(C)==C){for(var b=h+1;++h;){var w=p.charAt(h);if(w==null||Number(w)!=w){--h;break}if(h===p.length)break}g.id=Number(p.substring(b,h+1))}if(p.charAt(++h)){var k=c(p.substr(h)),B=k!==!1&&(g.type===e.ERROR||y(k));if(B)g.data=k;else return d("invalid payload")}return a("decoded %s as %j",p,g),g}function c(p){try{return JSON.parse(p)}catch{return!1}}m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function s(p){this.reconPack=p,this.buffers=[]}s.prototype.takeBinaryData=function(p){if(this.buffers.push(p),this.buffers.length===this.reconPack.attachments){var h=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null},s.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function d(p){return{type:e.ERROR,data:"parser error: "+p}}}(Y_);var V8={exports:{}},K_={},L8={exports:{}};try{L8.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{L8.exports=!1}var jCt=L8.exports,R8=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),UCt=jCt,HCt=R8,D8=function(e){var a=e.xdomain,r=e.xscheme,u=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!a||UCt))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!r&&u)return new XDomainRequest}catch{}if(!a)try{return new HCt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},$8={exports:{}},Vp={},GCt=Object.keys||function(a){var r=[],u=Object.prototype.hasOwnProperty;for(var y in a)u.call(a,y)&&r.push(y);return r},WCt=O8,SL=Object.prototype.toString,qCt=typeof Blob=="function"||typeof Blob<"u"&&SL.call(Blob)==="[object BlobConstructor]",YCt=typeof File=="function"||typeof File<"u"&&SL.call(File)==="[object FileConstructor]",TL=J_;function J_(e){if(!e||typeof e!="object")return!1;if(WCt(e)){for(var a=0,r=e.length;a<r;a++)if(J_(e[a]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||qCt&&e instanceof Blob||YCt&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return J_(e.toJSON(),!0);for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)&&J_(e[u]))return!0;return!1}var ZCt=function(e,a,r){var u=e.byteLength;if(a=a||0,r=r||u,e.slice)return e.slice(a,r);if(a<0&&(a+=u),r<0&&(r+=u),r>u&&(r=u),a>=u||a>=r||u===0)return new ArrayBuffer(0);for(var y=new Uint8Array(e),i=new Uint8Array(r-a),l=a,n=0;l<r;l++,n++)i[n]=y[l];return i.buffer},XCt=KCt;function KCt(e,a,r){var u=!1;return r=r||JCt,y.count=e,e===0?a():y;function y(i,l){if(y.count<=0)throw new Error("after called too many times");--y.count,i?(u=!0,a(i),a=r):y.count===0&&!u&&a(null,l)}}function JCt(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var ap=String.fromCharCode;function AL(e){for(var a=[],r=0,u=e.length,y,i;r<u;)y=e.charCodeAt(r++),y>=55296&&y<=56319&&r<u?(i=e.charCodeAt(r++),(i&64512)==56320?a.push(((y&1023)<<10)+(i&1023)+65536):(a.push(y),r--)):a.push(y);return a}function QCt(e){for(var a=e.length,r=-1,u,y="";++r<a;)u=e[r],u>65535&&(u-=65536,y+=ap(u>>>10&1023|55296),u=56320|u&1023),y+=ap(u);return y}function NL(e,a){if(e>=55296&&e<=57343){if(a)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function j8(e,a){return ap(e>>a&63|128)}function eEt(e,a){if(!(e&4294967168))return ap(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=ap(e>>18&7|240),r+=j8(e,12),r+=j8(e,6)):(NL(e,a)||(e=65533),r=ap(e>>12&15|224),r+=j8(e,6)):r=ap(e>>6&31|192),r+=ap(e&63|128),r}function tEt(e,a){a=a||{};for(var r=a.strict!==!1,u=AL(e),y=u.length,i=-1,l,n="";++i<y;)l=u[i],n+=eEt(l,r);return n}function hf(){if(rp>=ev)throw Error("Invalid byte index");var e=Q_[rp]&255;if(rp++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function aEt(e){var a,r,u,y,i;if(rp>ev)throw Error("Invalid byte index");if(rp==ev)return!1;if(a=Q_[rp]&255,rp++,!(a&128))return a;if((a&224)==192){if(r=hf(),i=(a&31)<<6|r,i>=128)return i;throw Error("Invalid continuation byte")}if((a&240)==224){if(r=hf(),u=hf(),i=(a&15)<<12|r<<6|u,i>=2048)return NL(i,e)?i:65533;throw Error("Invalid continuation byte")}if((a&248)==240&&(r=hf(),u=hf(),y=hf(),i=(a&7)<<18|r<<12|u<<6|y,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}var Q_,ev,rp;function rEt(e,a){a=a||{};var r=a.strict!==!1;Q_=AL(e),ev=Q_.length,rp=0;for(var u=[],y;(y=aEt(r))!==!1;)u.push(y);return QCt(u)}var nEt={version:"2.1.2",encode:tEt,decode:rEt},tv={},BL;function iEt(){return BL||(BL=1,function(e){tv.encode=function(a){var r=new Uint8Array(a),u,y=r.length,i="";for(u=0;u<y;u+=3)i+=e[r[u]>>2],i+=e[(r[u]&3)<<4|r[u+1]>>4],i+=e[(r[u+1]&15)<<2|r[u+2]>>6],i+=e[r[u+2]&63];return y%3===2?i=i.substring(0,i.length-1)+"=":y%3===1&&(i=i.substring(0,i.length-2)+"=="),i},tv.decode=function(a){var r=a.length*.75,u=a.length,y,i=0,l,n,_,f;a[a.length-1]==="="&&(r--,a[a.length-2]==="="&&r--);var o=new ArrayBuffer(r),m=new Uint8Array(o);for(y=0;y<u;y+=4)l=e.indexOf(a[y]),n=e.indexOf(a[y+1]),_=e.indexOf(a[y+2]),f=e.indexOf(a[y+3]),m[i++]=l<<2|n>>4,m[i++]=(n&15)<<4|_>>2,m[i++]=(_&3)<<6|f&63;return o}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),tv}var U8,ML;function oEt(){if(ML)return U8;ML=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,a=function(){try{var n=new Blob(["hi"]);return n.size===2}catch{return!1}}(),r=a&&function(){try{var n=new Blob([new Uint8Array([1,2])]);return n.size===2}catch{return!1}}(),u=e&&e.prototype.append&&e.prototype.getBlob;function y(n){return n.map(function(_){if(_.buffer instanceof ArrayBuffer){var f=_.buffer;if(_.byteLength!==f.byteLength){var o=new Uint8Array(_.byteLength);o.set(new Uint8Array(f,_.byteOffset,_.byteLength)),f=o.buffer}return f}return _})}function i(n,_){_=_||{};var f=new e;return y(n).forEach(function(o){f.append(o)}),_.type?f.getBlob(_.type):f.getBlob()}function l(n,_){return new Blob(y(n),_||{})}return typeof Blob<"u"&&(i.prototype=Blob.prototype,l.prototype=Blob.prototype),U8=function(){return a?r?Blob:l:u?i:void 0}(),U8}(function(e){var a=GCt,r=TL,u=ZCt,y=XCt,i=nEt,l;typeof ArrayBuffer<"u"&&(l=iEt());var n=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),_=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),f=n||_;e.protocol=3;var o=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},m=a(o),x={type:"error",data:"parser error"},c=oEt();e.encodePacket=function(v,w,C,k){typeof w=="function"&&(k=w,w=!1),typeof C=="function"&&(k=C,C=null);var B=v.data===void 0?void 0:v.data.buffer||v.data;if(typeof ArrayBuffer<"u"&&B instanceof ArrayBuffer)return d(v,w,k);if(typeof c<"u"&&B instanceof c)return h(v,w,k);if(B&&B.base64)return s(v,k);var E=o[v.type];return v.data!==void 0&&(E+=C?i.encode(String(v.data),{strict:!1}):String(v.data)),k(""+E)};function s(v,w){var C="b"+e.packets[v.type]+v.data.data;return w(C)}function d(v,w,C){if(!w)return e.encodeBase64Packet(v,C);var k=v.data,B=new Uint8Array(k),E=new Uint8Array(1+k.byteLength);E[0]=o[v.type];for(var T=0;T<B.length;T++)E[T+1]=B[T];return C(E.buffer)}function p(v,w,C){if(!w)return e.encodeBase64Packet(v,C);var k=new FileReader;return k.onload=function(){e.encodePacket({type:v.type,data:k.result},w,!0,C)},k.readAsArrayBuffer(v.data)}function h(v,w,C){if(!w)return e.encodeBase64Packet(v,C);if(f)return p(v,w,C);var k=new Uint8Array(1);k[0]=o[v.type];var B=new c([k.buffer,v.data]);return C(B)}e.encodeBase64Packet=function(v,w){var C="b"+e.packets[v.type];if(typeof c<"u"&&v.data instanceof c){var k=new FileReader;return k.onload=function(){var M=k.result.split(",")[1];w(C+M)},k.readAsDataURL(v.data)}var B;try{B=String.fromCharCode.apply(null,new Uint8Array(v.data))}catch{for(var E=new Uint8Array(v.data),T=new Array(E.length),A=0;A<E.length;A++)T[A]=E[A];B=String.fromCharCode.apply(null,T)}return C+=btoa(B),w(C)},e.decodePacket=function(v,w,C){if(v===void 0)return x;if(typeof v=="string"){if(v.charAt(0)==="b")return e.decodeBase64Packet(v.substr(1),w);if(C&&(v=g(v),v===!1))return x;var B=v.charAt(0);return Number(B)!=B||!m[B]?x:v.length>1?{type:m[B],data:v.substring(1)}:{type:m[B]}}var k=new Uint8Array(v),B=k[0],E=u(v,1);return c&&w==="blob"&&(E=new c([E])),{type:m[B],data:E}};function g(v){try{v=i.decode(v,{strict:!1})}catch{return!1}return v}e.decodeBase64Packet=function(v,w){var C=m[v.charAt(0)];if(!l)return{type:C,data:{base64:!0,data:v.substr(1)}};var k=l.decode(v.substr(1));return w==="blob"&&c&&(k=new c([k])),{type:C,data:k}},e.encodePayload=function(v,w,C){typeof w=="function"&&(C=w,w=null);var k=r(v);if(w&&k)return c&&!f?e.encodePayloadAsBlob(v,C):e.encodePayloadAsArrayBuffer(v,C);if(!v.length)return C("0:");function B(T){return T.length+":"+T}function E(T,A){e.encodePacket(T,k?w:!1,!1,function(M){A(null,B(M))})}b(v,E,function(T,A){return C(A.join(""))})};function b(v,w,C){for(var k=new Array(v.length),B=y(v.length,C),E=function(A,M,N){w(M,function(O,S){k[A]=S,N(O,k)})},T=0;T<v.length;T++)E(T,v[T],B)}e.decodePayload=function(v,w,C){if(typeof v!="string")return e.decodePayloadAsBinary(v,w,C);typeof w=="function"&&(C=w,w=null);var k;if(v==="")return C(x,0,1);for(var B="",E,T,A=0,M=v.length;A<M;A++){var N=v.charAt(A);if(N!==":"){B+=N;continue}if(B===""||B!=(E=Number(B))||(T=v.substr(A+1,E),B!=T.length))return C(x,0,1);if(T.length){if(k=e.decodePacket(T,w,!1),x.type===k.type&&x.data===k.data)return C(x,0,1);var O=C(k,A+E,M);if(O===!1)return}A+=E,B=""}if(B!=="")return C(x,0,1)},e.encodePayloadAsArrayBuffer=function(v,w){if(!v.length)return w(new ArrayBuffer(0));function C(k,B){e.encodePacket(k,!0,!0,function(E){return B(null,E)})}b(v,C,function(k,B){var E=B.reduce(function(M,N){var O;return typeof N=="string"?O=N.length:O=N.byteLength,M+O.toString().length+O+2},0),T=new Uint8Array(E),A=0;return B.forEach(function(M){var N=typeof M=="string",O=M;if(N){for(var I=new Uint8Array(M.length),S=0;S<M.length;S++)I[S]=M.charCodeAt(S);O=I.buffer}N?T[A++]=0:T[A++]=1;for(var z=O.byteLength.toString(),S=0;S<z.length;S++)T[A++]=parseInt(z[S]);T[A++]=255;for(var I=new Uint8Array(O),S=0;S<I.length;S++)T[A++]=I[S]}),w(T.buffer)})},e.encodePayloadAsBlob=function(v,w){function C(k,B){e.encodePacket(k,!0,!0,function(E){var T=new Uint8Array(1);if(T[0]=1,typeof E=="string"){for(var A=new Uint8Array(E.length),M=0;M<E.length;M++)A[M]=E.charCodeAt(M);E=A.buffer,T[0]=0}for(var N=E instanceof ArrayBuffer?E.byteLength:E.size,O=N.toString(),S=new Uint8Array(O.length+1),M=0;M<O.length;M++)S[M]=parseInt(O[M]);if(S[O.length]=255,c){var z=new c([T.buffer,S.buffer,E]);B(null,z)}})}b(v,C,function(k,B){return w(new c(B))})},e.decodePayloadAsBinary=function(v,w,C){typeof w=="function"&&(C=w,w=null);for(var k=v,B=[];k.byteLength>0;){for(var E=new Uint8Array(k),T=E[0]===0,A="",M=1;E[M]!==255;M++){if(A.length>310)return C(x,0,1);A+=E[M]}k=u(k,2+A.length),A=parseInt(A);var N=u(k,0,A);if(T)try{N=String.fromCharCode.apply(null,new Uint8Array(N))}catch{var O=new Uint8Array(N);N="";for(var M=0;M<O.length;M++)N+=String.fromCharCode(O[M])}B.push(N),k=u(k,A)}var S=B.length;B.forEach(function(z,I){C(e.decodePacket(z,w,!0),I,S)})}})(Vp);var H8,IL;function G8(){if(IL)return H8;IL=1;var e=Vp,a=pf;H8=r;function r(u){this.path=u.path,this.hostname=u.hostname,this.port=u.port,this.secure=u.secure,this.query=u.query,this.timestampParam=u.timestampParam,this.timestampRequests=u.timestampRequests,this.readyState="",this.agent=u.agent||!1,this.socket=u.socket,this.enablesXDR=u.enablesXDR,this.withCredentials=u.withCredentials,this.pfx=u.pfx,this.key=u.key,this.passphrase=u.passphrase,this.cert=u.cert,this.ca=u.ca,this.ciphers=u.ciphers,this.rejectUnauthorized=u.rejectUnauthorized,this.forceNode=u.forceNode,this.isReactNative=u.isReactNative,this.extraHeaders=u.extraHeaders,this.localAddress=u.localAddress}return a(r.prototype),r.prototype.onError=function(u,y){var i=new Error(u);return i.type="TransportError",i.description=y,this.emit("error",i),this},r.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(u){if(this.readyState==="open")this.write(u);else throw new Error("Transport not open")},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(u){var y=e.decodePacket(u,this.socket.binaryType);this.onPacket(y)},r.prototype.onPacket=function(u){this.emit("packet",u)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")},H8}var ff={};ff.encode=function(e){var a="";for(var r in e)e.hasOwnProperty(r)&&(a.length&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return a},ff.decode=function(e){for(var a={},r=e.split("&"),u=0,y=r.length;u<y;u++){var i=r[u].split("=");a[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return a};var av=function(e,a){var r=function(){};r.prototype=a.prototype,e.prototype=new r,e.prototype.constructor=e},OL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),rv=64,FL={},zL=0,np=0,PL;function W8(e){var a="";do a=OL[e%rv]+a,e=Math.floor(e/rv);while(e>0);return a}function sEt(e){var a=0;for(np=0;np<e.length;np++)a=a*rv+FL[e.charAt(np)];return a}function q8(){var e=W8(+new Date);return e!==PL?(zL=0,PL=e):e+"."+W8(zL++)}for(;np<rv;np++)FL[OL[np]]=np;q8.encode=W8,q8.decode=sEt;var VL=q8,Y8={exports:{}},Z8={exports:{}},t1=1e3,a1=t1*60,r1=a1*60,n1=r1*24,lEt=n1*365.25,cEt=function(e,a){a=a||{};var r=typeof e;if(r==="string"&&e.length>0)return dEt(e);if(r==="number"&&isNaN(e)===!1)return a.long?pEt(e):uEt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dEt(e){if(e=String(e),!(e.length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return r*lEt;case"days":case"day":case"d":return r*n1;case"hours":case"hour":case"hrs":case"hr":case"h":return r*r1;case"minutes":case"minute":case"mins":case"min":case"m":return r*a1;case"seconds":case"second":case"secs":case"sec":case"s":return r*t1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function uEt(e){return e>=n1?Math.round(e/n1)+"d":e>=r1?Math.round(e/r1)+"h":e>=a1?Math.round(e/a1)+"m":e>=t1?Math.round(e/t1)+"s":e+"ms"}function pEt(e){return nv(e,n1,"day")||nv(e,r1,"hour")||nv(e,a1,"minute")||nv(e,t1,"second")||e+" ms"}function nv(e,a,r){if(!(e<a))return e<a*1.5?Math.floor(e/a)+" "+r:Math.ceil(e/a)+" "+r+"s"}(function(e,a){a=e.exports=u.debug=u.default=u,a.coerce=_,a.disable=l,a.enable=i,a.enabled=n,a.humanize=cEt,a.instances=[],a.names=[],a.skips=[],a.formatters={};function r(f){var o=0,m;for(m in f)o=(o<<5)-o+f.charCodeAt(m),o|=0;return a.colors[Math.abs(o)%a.colors.length]}function u(f){var o;function m(){if(m.enabled){var x=m,c=+new Date,s=c-(o||c);x.diff=s,x.prev=o,x.curr=c,o=c;for(var d=new Array(arguments.length),p=0;p<d.length;p++)d[p]=arguments[p];d[0]=a.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var h=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(b,v){if(b==="%%")return b;h++;var w=a.formatters[v];if(typeof w=="function"){var C=d[h];b=w.call(x,C),d.splice(h,1),h--}return b}),a.formatArgs.call(x,d);var g=m.log||a.log||console.log.bind(console);g.apply(x,d)}}return m.namespace=f,m.enabled=a.enabled(f),m.useColors=a.useColors(),m.color=r(f),m.destroy=y,typeof a.init=="function"&&a.init(m),a.instances.push(m),m}function y(){var f=a.instances.indexOf(this);return f!==-1?(a.instances.splice(f,1),!0):!1}function i(f){a.save(f),a.names=[],a.skips=[];var o,m=(typeof f=="string"?f:"").split(/[\s,]+/),x=m.length;for(o=0;o<x;o++)m[o]&&(f=m[o].replace(/\*/g,".*?"),f[0]==="-"?a.skips.push(new RegExp("^"+f.substr(1)+"$")):a.names.push(new RegExp("^"+f+"$")));for(o=0;o<a.instances.length;o++){var c=a.instances[o];c.enabled=a.enabled(c.namespace)}}function l(){a.enable("")}function n(f){if(f[f.length-1]==="*")return!0;var o,m;for(o=0,m=a.skips.length;o<m;o++)if(a.skips[o].test(f))return!1;for(o=0,m=a.names.length;o<m;o++)if(a.names[o].test(f))return!0;return!1}function _(f){return f instanceof Error?f.stack||f.message:f}})(Z8,Z8.exports);var hEt=Z8.exports;(function(e,a){a=e.exports=hEt,a.log=y,a.formatArgs=u,a.save=i,a.load=l,a.useColors=r,a.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:n(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a.formatters.j=function(_){try{return JSON.stringify(_)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function u(_){var f=this.useColors;if(_[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+_[0]+(f?"%c ":" ")+"+"+a.humanize(this.diff),!!f){var o="color: "+this.color;_.splice(1,0,o,"color: inherit");var m=0,x=0;_[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(m++,c==="%c"&&(x=m))}),_.splice(x,0,o)}}function y(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(_){try{_==null?a.storage.removeItem("debug"):a.storage.debug=_}catch{}}function l(){var _;try{_=a.storage.debug}catch{}return!_&&typeof process<"u"&&"env"in process&&(_=process.env.DEBUG),_}a.enable(l());function n(){try{return window.localStorage}catch{}}})(Y8,Y8.exports);var iv=Y8.exports,LL=G8(),fEt=ff,RL=Vp,mEt=av,gEt=VL,Hc=iv("engine.io-client:polling"),DL=Hd,yEt=function(){var e=D8,a=new e({xdomain:!1});return a.responseType!=null}();function Hd(e){var a=e&&e.forceBase64;(!yEt||a)&&(this.supportsBinary=!1),LL.call(this,e)}mEt(Hd,LL),Hd.prototype.name="polling",Hd.prototype.doOpen=function(){this.poll()},Hd.prototype.pause=function(e){var a=this;this.readyState="pausing";function r(){Hc("paused"),a.readyState="paused",e()}if(this.polling||!this.writable){var u=0;this.polling&&(Hc("we are currently polling - waiting to pause"),u++,this.once("pollComplete",function(){Hc("pre-pause polling complete"),--u||r()})),this.writable||(Hc("we are currently writing - waiting to pause"),u++,this.once("drain",function(){Hc("pre-pause writing complete"),--u||r()}))}else r()},Hd.prototype.poll=function(){Hc("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Hd.prototype.onData=function(e){var a=this;Hc("polling got data %s",e);var r=function(u,y,i){if(a.readyState==="opening"&&u.type==="open"&&a.onOpen(),u.type==="close")return a.onClose(),!1;a.onPacket(u)};RL.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Hc('ignoring poll - transport state "%s"',this.readyState))},Hd.prototype.doClose=function(){var e=this;function a(){Hc("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(Hc("transport open - closing"),a()):(Hc("transport not open - deferring close"),this.once("open",a))},Hd.prototype.write=function(e){var a=this;this.writable=!1;var r=function(){a.writable=!0,a.emit("drain")};RL.encodePayload(e,this.supportsBinary,function(u){a.doWrite(u,r)})},Hd.prototype.uri=function(){var e=this.query||{},a=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=gEt()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=fEt.encode(e),this.port&&(a==="https"&&Number(this.port)!==443||a==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var u=this.hostname.indexOf(":")!==-1;return a+"://"+(u?"["+this.hostname+"]":this.hostname)+r+this.path+e};var _Et=D8,$L=DL,vEt=pf,bEt=av,X8=iv("engine.io-client:polling-xhr"),xEt=R8;$8.exports=mf,$8.exports.Request=Ho;function jL(){}function mf(e){if($L.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var a=location.protocol==="https:",r=location.port;r||(r=a?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==a}}bEt(mf,$L),mf.prototype.supportsBinary=!0,mf.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Ho(e)},mf.prototype.doWrite=function(e,a){var r=typeof e!="string"&&e!==void 0,u=this.request({method:"POST",data:e,isBinary:r}),y=this;u.on("success",a),u.on("error",function(i){y.onError("xhr post error",i)}),this.sendXhr=u},mf.prototype.doPoll=function(){X8("xhr poll");var e=this.request(),a=this;e.on("data",function(r){a.onData(r)}),e.on("error",function(r){a.onError("xhr poll error",r)}),this.pollXhr=e};function Ho(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(vEt(Ho.prototype),Ho.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var a=this.xhr=new _Et(e),r=this;try{X8("xhr open %s: %s",this.method,this.uri),a.open(this.method,this.uri,this.async);try{if(this.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(var u in this.extraHeaders)this.extraHeaders.hasOwnProperty(u)&&a.setRequestHeader(u,this.extraHeaders[u])}}catch{}if(this.method==="POST")try{this.isBinary?a.setRequestHeader("Content-type","application/octet-stream"):a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in a&&(a.withCredentials=this.withCredentials),this.requestTimeout&&(a.timeout=this.requestTimeout),this.hasXDR()?(a.onload=function(){r.onLoad()},a.onerror=function(){r.onError(a.responseText)}):a.onreadystatechange=function(){if(a.readyState===2)try{var y=a.getResponseHeader("Content-Type");(r.supportsBinary&&y==="application/octet-stream"||y==="application/octet-stream; charset=UTF-8")&&(a.responseType="arraybuffer")}catch{}a.readyState===4&&(a.status===200||a.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof a.status=="number"?a.status:0)},0))},X8("xhr data %s",this.data),a.send(this.data)}catch(y){setTimeout(function(){r.onError(y)},0);return}typeof document<"u"&&(this.index=Ho.requestsCount++,Ho.requests[this.index]=this)},Ho.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Ho.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},Ho.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},Ho.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=jL:this.xhr.onreadystatechange=jL,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ho.requests[this.index],this.xhr=null}},Ho.prototype.onLoad=function(){var e;try{var a;try{a=this.xhr.getResponseHeader("Content-Type")}catch{}a==="application/octet-stream"||a==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)},Ho.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},Ho.prototype.abort=function(){this.cleanup()},Ho.requestsCount=0,Ho.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",UL);else if(typeof addEventListener=="function"){var wEt="onpagehide"in xEt?"pagehide":"unload";addEventListener(wEt,UL,!1)}}function UL(){for(var e in Ho.requests)Ho.requests.hasOwnProperty(e)&&Ho.requests[e].abort()}var kEt=$8.exports,K8=DL,CEt=av,HL=R8,EEt=gf,SEt=/\n/g,TEt=/\\n/g,ov;function AEt(){}function gf(e){K8.call(this,e),this.query=this.query||{},ov||(ov=HL.___eio=HL.___eio||[]),this.index=ov.length;var a=this;ov.push(function(r){a.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){a.script&&(a.script.onerror=AEt)},!1)}CEt(gf,K8),gf.prototype.supportsBinary=!1,gf.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),K8.prototype.doClose.call(this)},gf.prototype.doPoll=function(){var e=this,a=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),a.async=!0,a.src=this.uri(),a.onerror=function(y){e.onError("jsonp poll error",y)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(a,r):(document.head||document.body).appendChild(a),this.script=a;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var y=document.createElement("iframe");document.body.appendChild(y),document.body.removeChild(y)},100)},gf.prototype.doWrite=function(e,a){var r=this;if(!this.form){var u=document.createElement("form"),y=document.createElement("textarea"),i=this.iframeId="eio_iframe_"+this.index,l;u.className="socketio",u.style.position="absolute",u.style.top="-1000px",u.style.left="-1000px",u.target=i,u.method="POST",u.setAttribute("accept-charset","utf-8"),y.name="d",u.appendChild(y),document.body.appendChild(u),this.form=u,this.area=y}this.form.action=this.uri();function n(){_(),a()}function _(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(o){r.onError("jsonp polling iframe removal error",o)}try{var f='<iframe src="javascript:0" name="'+r.iframeId+'">';l=document.createElement(f)}catch{l=document.createElement("iframe"),l.name=r.iframeId,l.src="javascript:0"}l.id=r.iframeId,r.form.appendChild(l),r.iframe=l}_(),e=e.replace(TEt,`\\
|
|
3574
3574
|
`),this.area.value=e.replace(SEt,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){r.iframe.readyState==="complete"&&n()}:this.iframe.onload=n};const NEt=V9t(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var J8=G8(),BEt=Vp,MEt=ff,IEt=av,OEt=VL,FEt=iv("engine.io-client:websocket"),sv,Q8;if(typeof WebSocket<"u"?sv=WebSocket:typeof self<"u"&&(sv=self.WebSocket||self.MozWebSocket),typeof window>"u")try{Q8=NEt}catch{}var yf=sv||Q8,zEt=vc;function vc(e){var a=e&&e.forceBase64;a&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=sv&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(yf=Q8),J8.call(this,e)}IEt(vc,J8),vc.prototype.name="websocket",vc.prototype.supportsBinary=!0,vc.prototype.doOpen=function(){if(this.check()){var e=this.uri(),a=this.protocols,r={};this.isReactNative||(r.agent=this.agent,r.perMessageDeflate=this.perMessageDeflate,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?a?new yf(e,a):new yf(e):new yf(e,a,r)}catch(u){return this.emit("error",u)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},vc.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(a){e.onData(a.data)},this.ws.onerror=function(a){e.onError("websocket error",a)}},vc.prototype.write=function(e){var a=this;this.writable=!1;for(var r=e.length,u=0,y=r;u<y;u++)(function(l){BEt.encodePacket(l,a.supportsBinary,function(n){if(!a.usingBrowserWebSocket){var _={};if(l.options&&(_.compress=l.options.compress),a.perMessageDeflate){var f=typeof n=="string"?Buffer.byteLength(n):n.length;f<a.perMessageDeflate.threshold&&(_.compress=!1)}}try{a.usingBrowserWebSocket?a.ws.send(n):a.ws.send(n,_)}catch{FEt("websocket closed before onclose event")}--r||i()})})(e[u]);function i(){a.emit("flush"),setTimeout(function(){a.writable=!0,a.emit("drain")},0)}},vc.prototype.onClose=function(){J8.prototype.onClose.call(this)},vc.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},vc.prototype.uri=function(){var e=this.query||{},a=this.secure?"wss":"ws",r="";this.port&&(a==="wss"&&Number(this.port)!==443||a==="ws"&&Number(this.port)!==80)&&(r=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=OEt()),this.supportsBinary||(e.b64=1),e=MEt.encode(e),e.length&&(e="?"+e);var u=this.hostname.indexOf(":")!==-1;return a+"://"+(u?"["+this.hostname+"]":this.hostname)+r+this.path+e},vc.prototype.check=function(){return!!yf&&!("__initialize"in yf&&this.name===vc.prototype.name)};var PEt=D8,VEt=kEt,LEt=EEt,REt=zEt;K_.polling=DEt,K_.websocket=REt;function DEt(e){var a,r=!1,u=!1,y=e.jsonp!==!1;if(typeof location<"u"){var i=location.protocol==="https:",l=location.port;l||(l=i?443:80),r=e.hostname!==location.hostname||l!==e.port,u=e.secure!==i}if(e.xdomain=r,e.xscheme=u,a=new PEt(e),"open"in a&&!e.forceJSONP)return new VEt(e);if(!y)throw new Error("JSONP disabled");return new LEt(e)}var $Et=[].indexOf,GL=function(e,a){if($Et)return e.indexOf(a);for(var r=0;r<e.length;++r)if(e[r]===a)return r;return-1},jEt=K_,UEt=pf,zo=iv("engine.io-client:socket"),HEt=GL,WL=Vp,qL=bL,GEt=ff,WEt=Mn;function Mn(e,a){if(!(this instanceof Mn))return new Mn(e,a);a=a||{},e&&typeof e=="object"&&(a=e,e=null),e?(e=qL(e),a.hostname=e.host,a.secure=e.protocol==="https"||e.protocol==="wss",a.port=e.port,e.query&&(a.query=e.query)):a.host&&(a.hostname=qL(a.host).host),this.secure=a.secure!=null?a.secure:typeof location<"u"&&location.protocol==="https:",a.hostname&&!a.port&&(a.port=this.secure?"443":"80"),this.agent=a.agent||!1,this.hostname=a.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=a.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=a.query||{},typeof this.query=="string"&&(this.query=GEt.decode(this.query)),this.upgrade=a.upgrade!==!1,this.path=(a.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!a.forceJSONP,this.jsonp=a.jsonp!==!1,this.forceBase64=!!a.forceBase64,this.enablesXDR=!!a.enablesXDR,this.withCredentials=a.withCredentials!==!1,this.timestampParam=a.timestampParam||"t",this.timestampRequests=a.timestampRequests,this.transports=a.transports||["polling","websocket"],this.transportOptions=a.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=a.policyPort||843,this.rememberUpgrade=a.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=a.onlyBinaryUpgrades,this.perMessageDeflate=a.perMessageDeflate!==!1?a.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=a.pfx||void 0,this.key=a.key||void 0,this.passphrase=a.passphrase||void 0,this.cert=a.cert||void 0,this.ca=a.ca||void 0,this.ciphers=a.ciphers||void 0,this.rejectUnauthorized=a.rejectUnauthorized===void 0?!0:a.rejectUnauthorized,this.forceNode=!!a.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(a.extraHeaders&&Object.keys(a.extraHeaders).length>0&&(this.extraHeaders=a.extraHeaders),a.localAddress&&(this.localAddress=a.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}Mn.priorWebsocketSuccess=!1,UEt(Mn.prototype),Mn.protocol=WL.protocol,Mn.Socket=Mn,Mn.Transport=G8(),Mn.transports=K_,Mn.parser=Vp,Mn.prototype.createTransport=function(e){zo('creating transport "%s"',e);var a=qEt(this.query);a.EIO=WL.protocol,a.transport=e;var r=this.transportOptions[e]||{};this.id&&(a.sid=this.id);var u=new jEt[e]({query:a,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative});return u};function qEt(e){var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);return a}Mn.prototype.open=function(){var e;if(this.rememberUpgrade&&Mn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){var a=this;setTimeout(function(){a.emit("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)},Mn.prototype.setTransport=function(e){zo("setting transport %s",e.name);var a=this;this.transport&&(zo("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){a.onDrain()}).on("packet",function(r){a.onPacket(r)}).on("error",function(r){a.onError(r)}).on("close",function(){a.onClose("transport close")})},Mn.prototype.probe=function(e){zo('probing transport "%s"',e);var a=this.createTransport(e,{probe:1}),r=!1,u=this;Mn.priorWebsocketSuccess=!1;function y(){if(u.onlyBinaryUpgrades){var m=!this.supportsBinary&&u.transport.supportsBinary;r=r||m}r||(zo('probe transport "%s" opened',e),a.send([{type:"ping",data:"probe"}]),a.once("packet",function(x){if(!r)if(x.type==="pong"&&x.data==="probe"){if(zo('probe transport "%s" pong',e),u.upgrading=!0,u.emit("upgrading",a),!a)return;Mn.priorWebsocketSuccess=a.name==="websocket",zo('pausing current transport "%s"',u.transport.name),u.transport.pause(function(){r||u.readyState!=="closed"&&(zo("changing transport and sending upgrade packet"),o(),u.setTransport(a),a.send([{type:"upgrade"}]),u.emit("upgrade",a),a=null,u.upgrading=!1,u.flush())})}else{zo('probe transport "%s" failed',e);var c=new Error("probe error");c.transport=a.name,u.emit("upgradeError",c)}}))}function i(){r||(r=!0,o(),a.close(),a=null)}function l(m){var x=new Error("probe error: "+m);x.transport=a.name,i(),zo('probe transport "%s" failed because of error: %s',e,m),u.emit("upgradeError",x)}function n(){l("transport closed")}function _(){l("socket closed")}function f(m){a&&m.name!==a.name&&(zo('"%s" works - aborting "%s"',m.name,a.name),i())}function o(){a.removeListener("open",y),a.removeListener("error",l),a.removeListener("close",n),u.removeListener("close",_),u.removeListener("upgrading",f)}a.once("open",y),a.once("error",l),a.once("close",n),this.once("close",_),this.once("upgrading",f),a.open()},Mn.prototype.onOpen=function(){if(zo("socket open"),this.readyState="open",Mn.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){zo("starting upgrade probes");for(var e=0,a=this.upgrades.length;e<a;e++)this.probe(this.upgrades[e])}},Mn.prototype.onPacket=function(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(zo('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var a=new Error("server error");a.code=e.data,this.onError(a);break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}else zo('packet received with socket readyState "%s"',this.readyState)},Mn.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},Mn.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var a=this;a.pingTimeoutTimer=setTimeout(function(){a.readyState!=="closed"&&a.onClose("ping timeout")},e||a.pingInterval+a.pingTimeout)},Mn.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){zo("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},Mn.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},Mn.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()},Mn.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(zo("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},Mn.prototype.write=Mn.prototype.send=function(e,a,r){return this.sendPacket("message",e,a,r),this},Mn.prototype.sendPacket=function(e,a,r,u){if(typeof a=="function"&&(u=a,a=void 0),typeof r=="function"&&(u=r,r=null),!(this.readyState==="closing"||this.readyState==="closed")){r=r||{},r.compress=r.compress!==!1;var y={type:e,data:a,options:r};this.emit("packetCreate",y),this.writeBuffer.push(y),u&&this.once("flush",u),this.flush()}},Mn.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?u():a()}):this.upgrading?u():a()}function a(){e.onClose("forced close"),zo("socket closing - telling transport to close"),e.transport.close()}function r(){e.removeListener("upgrade",r),e.removeListener("upgradeError",r),a()}function u(){e.once("upgrade",r),e.once("upgradeError",r)}return this},Mn.prototype.onError=function(e){zo("socket error %j",e),Mn.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},Mn.prototype.onClose=function(e,a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){zo('socket close with reason: "%s"',e);var r=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,a),r.writeBuffer=[],r.prevBufferLen=0}},Mn.prototype.filterUpgrades=function(e){for(var a=[],r=0,u=e.length;r<u;r++)~HEt(this.transports,e[r])&&a.push(e[r]);return a},V8.exports=WEt,V8.exports.parser=Vp;var YEt=V8.exports,YL={exports:{}},ZEt=XEt;function XEt(e,a){var r=[];a=a||0;for(var u=a||0;u<e.length;u++)r[u-a]=e[u];return r}var ZL=KEt;function KEt(e,a,r){return e.on(a,r),{destroy:function(){e.removeListener(a,r)}}}var XL=[].slice,KL=function(e,a){if(typeof a=="string"&&(a=e[a]),typeof a!="function")throw new Error("bind() requires a function");var r=XL.call(arguments,2);return function(){return a.apply(e,r.concat(XL.call(arguments)))}};(function(e,a){var r=Y_,u=pf,y=ZEt,i=ZL,l=KL,n=q_("socket.io-client:socket"),_=ff,f=TL;e.exports=x;var o={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},m=u.prototype.emit;function x(c,s,d){this.io=c,this.nsp=s,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},d&&d.query&&(this.query=d.query),this.io.autoConnect&&this.open()}u(x.prototype),x.prototype.subEvents=function(){if(!this.subs){var c=this.io;this.subs=[i(c,"open",l(this,"onopen")),i(c,"packet",l(this,"onpacket")),i(c,"close",l(this,"onclose"))]}},x.prototype.open=x.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},x.prototype.send=function(){var c=y(arguments);return c.unshift("message"),this.emit.apply(this,c),this},x.prototype.emit=function(c){if(o.hasOwnProperty(c))return m.apply(this,arguments),this;var s=y(arguments),d={type:(this.flags.binary!==void 0?this.flags.binary:f(s))?r.BINARY_EVENT:r.EVENT,data:s};return d.options={},d.options.compress=!this.flags||this.flags.compress!==!1,typeof s[s.length-1]=="function"&&(n("emitting packet with ack id %d",this.ids),this.acks[this.ids]=s.pop(),d.id=this.ids++),this.connected?this.packet(d):this.sendBuffer.push(d),this.flags={},this},x.prototype.packet=function(c){c.nsp=this.nsp,this.io.packet(c)},x.prototype.onopen=function(){if(n("transport is open - connecting"),this.nsp!=="/")if(this.query){var c=typeof this.query=="object"?_.encode(this.query):this.query;n("sending connect packet with query %s",c),this.packet({type:r.CONNECT,query:c})}else this.packet({type:r.CONNECT})},x.prototype.onclose=function(c){n("close (%s)",c),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",c)},x.prototype.onpacket=function(c){var s=c.nsp===this.nsp,d=c.type===r.ERROR&&c.nsp==="/";if(!(!s&&!d))switch(c.type){case r.CONNECT:this.onconnect();break;case r.EVENT:this.onevent(c);break;case r.BINARY_EVENT:this.onevent(c);break;case r.ACK:this.onack(c);break;case r.BINARY_ACK:this.onack(c);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",c.data);break}},x.prototype.onevent=function(c){var s=c.data||[];n("emitting event %j",s),c.id!=null&&(n("attaching ack callback to event"),s.push(this.ack(c.id))),this.connected?m.apply(this,s):this.receiveBuffer.push(s)},x.prototype.ack=function(c){var s=this,d=!1;return function(){if(!d){d=!0;var p=y(arguments);n("sending ack %j",p),s.packet({type:f(p)?r.BINARY_ACK:r.ACK,id:c,data:p})}}},x.prototype.onack=function(c){var s=this.acks[c.id];typeof s=="function"?(n("calling ack %s with %j",c.id,c.data),s.apply(this,c.data),delete this.acks[c.id]):n("bad ack %s",c.id)},x.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},x.prototype.emitBuffered=function(){var c;for(c=0;c<this.receiveBuffer.length;c++)m.apply(this,this.receiveBuffer[c]);for(this.receiveBuffer=[],c=0;c<this.sendBuffer.length;c++)this.packet(this.sendBuffer[c]);this.sendBuffer=[]},x.prototype.ondisconnect=function(){n("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},x.prototype.destroy=function(){if(this.subs){for(var c=0;c<this.subs.length;c++)this.subs[c].destroy();this.subs=null}this.io.destroy(this)},x.prototype.close=x.prototype.disconnect=function(){return this.connected&&(n("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},x.prototype.compress=function(c){return this.flags.compress=c,this},x.prototype.binary=function(c){return this.flags.binary=c,this}})(YL);var JL=YL.exports,JEt=_f;function _f(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}_f.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),r=Math.floor(a*this.jitter*e);e=Math.floor(a*10)&1?e+r:e-r}return Math.min(e,this.max)|0},_f.prototype.reset=function(){this.attempts=0},_f.prototype.setMin=function(e){this.ms=e},_f.prototype.setMax=function(e){this.max=e},_f.prototype.setJitter=function(e){this.jitter=e};var QEt=YEt,eSt=JL,tSt=pf,aSt=Y_,ip=ZL,vf=KL,Ns=q_("socket.io-client:manager"),QL=GL,rSt=JEt,eR=Object.prototype.hasOwnProperty,tR=di;function di(e,a){if(!(this instanceof di))return new di(e,a);e&&typeof e=="object"&&(a=e,e=void 0),a=a||{},a.path=a.path||"/socket.io",this.nsps={},this.subs=[],this.opts=a,this.reconnection(a.reconnection!==!1),this.reconnectionAttempts(a.reconnectionAttempts||1/0),this.reconnectionDelay(a.reconnectionDelay||1e3),this.reconnectionDelayMax(a.reconnectionDelayMax||5e3),this.randomizationFactor(a.randomizationFactor||.5),this.backoff=new rSt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(a.timeout==null?2e4:a.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=a.parser||aSt;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=a.autoConnect!==!1,this.autoConnect&&this.open()}di.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)eR.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},di.prototype.updateSocketIds=function(){for(var e in this.nsps)eR.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},di.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id},tSt(di.prototype),di.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},di.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},di.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},di.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},di.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},di.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},di.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},di.prototype.open=di.prototype.connect=function(e,a){if(Ns("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Ns("opening %s",this.uri),this.engine=QEt(this.uri,this.opts);var r=this.engine,u=this;this.readyState="opening",this.skipReconnect=!1;var y=ip(r,"open",function(){u.onopen(),e&&e()}),i=ip(r,"error",function(_){if(Ns("connect_error"),u.cleanup(),u.readyState="closed",u.emitAll("connect_error",_),e){var f=new Error("Connection error");f.data=_,e(f)}else u.maybeReconnectOnOpen()});if(this._timeout!==!1){var l=this._timeout;Ns("connect attempt will timeout after %d",l),l===0&&y.destroy();var n=setTimeout(function(){Ns("connect attempt timed out after %d",l),y.destroy(),r.close(),r.emit("error","timeout"),u.emitAll("connect_timeout",l)},l);this.subs.push({destroy:function(){clearTimeout(n)}})}return this.subs.push(y),this.subs.push(i),this},di.prototype.onopen=function(){Ns("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(ip(e,"data",vf(this,"ondata"))),this.subs.push(ip(e,"ping",vf(this,"onping"))),this.subs.push(ip(e,"pong",vf(this,"onpong"))),this.subs.push(ip(e,"error",vf(this,"onerror"))),this.subs.push(ip(e,"close",vf(this,"onclose"))),this.subs.push(ip(this.decoder,"decoded",vf(this,"ondecoded")))},di.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},di.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},di.prototype.ondata=function(e){this.decoder.add(e)},di.prototype.ondecoded=function(e){this.emit("packet",e)},di.prototype.onerror=function(e){Ns("error",e),this.emitAll("error",e)},di.prototype.socket=function(e,a){var r=this.nsps[e];if(!r){r=new eSt(this,e,a),this.nsps[e]=r;var u=this;r.on("connecting",y),r.on("connect",function(){r.id=u.generateId(e)}),this.autoConnect&&y()}function y(){~QL(u.connecting,r)||u.connecting.push(r)}return r},di.prototype.destroy=function(e){var a=QL(this.connecting,e);~a&&this.connecting.splice(a,1),!this.connecting.length&&this.close()},di.prototype.packet=function(e){Ns("writing packet %j",e);var a=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),a.encoding?a.packetBuffer.push(e):(a.encoding=!0,this.encoder.encode(e,function(r){for(var u=0;u<r.length;u++)a.engine.write(r[u],e.options);a.encoding=!1,a.processPacketQueue()}))},di.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},di.prototype.cleanup=function(){Ns("cleanup");for(var e=this.subs.length,a=0;a<e;a++){var r=this.subs.shift();r.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},di.prototype.close=di.prototype.disconnect=function(){Ns("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},di.prototype.onclose=function(e){Ns("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},di.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)Ns("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var a=this.backoff.duration();Ns("will wait %dms before reconnect attempt",a),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(Ns("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(u){u?(Ns("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",u.data)):(Ns("reconnect success"),e.onreconnect())}))},a);this.subs.push({destroy:function(){clearTimeout(r)}})}},di.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)},function(e,a){var r=SCt,u=Y_,y=tR,i=q_("socket.io-client");e.exports=a=n;var l=a.managers={};function n(_,f){typeof _=="object"&&(f=_,_=void 0),f=f||{};var o=r(_),m=o.source,x=o.id,c=o.path,s=l[x]&&c in l[x].nsps,d=f.forceNew||f["force new connection"]||f.multiplex===!1||s,p;return d?(i("ignoring socket cache for %s",m),p=y(m,f)):(l[x]||(i("new io instance for %s",m),l[x]=y(m,f)),p=l[x]),o.query&&!f.query&&(f.query=o.query),p.socket(o.path,f)}a.protocol=u.protocol,a.connect=n,a.Manager=tR,a.Socket=JL}(A8,A8.exports);var nSt=A8.exports;const lv=hL(nSt)("https://golstats-live-server-sockets.azurewebsites.net",{autoConnect:!1,transports:["websocket"]});function iSt(){return lv}lv.on("connect",()=>{U_.emit("socket-connected")}),lv.on("disconnect",()=>{U_.emit("socket-disconnected")}),lv.on("reconnect",()=>{U_.emit("socket-reconnected")});const e7=iSt(),oSt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],sSt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:yL(),indexesTSP:lCt(),indexesLS:pCt(),indexesTLP:fCt(),nextGamesDataStructure:cCt,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(a=>a.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=!!e.gameForAnalysis.is_live,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 dCt.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return mL(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return mL(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(a=>a.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(a=>e.homeTeamFilter.playingAs.includes(a[0])).filter(a=>e.homeTeamFilter.matchResult.includes(a[1])).reduce((a,r)=>a+r[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(a=>e.visitingTeamFilter.playingAs.includes(a[0])).filter(a=>e.visitingTeamFilter.matchResult.includes(a[1])).reduce((a,r)=>a+r[2],0)},filledDataStructure(e,a){if(e.currentSeasonPlays)for(const r of Object.values(e.nextGamesDataStructure))for(const u of Object.values(r.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&u.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&u.visitingTeam.resetTotals(),u.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),u.addTeamPlays(u.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),u.addTeamPlays(u.visitingTeamType,e.gameForAnalysis.visiting_team,a.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,a){return Object.values(a.filledDataStructure).sort((r,u)=>r.priority-u.priority)},statisticData(e,a){for(const r of Object.values(a.filledDataStructure))if(r.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&r.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return r.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{setCurrentTournamentName(e,a){e.currentTournamentName=a},setBetSubcategoriesObjects(e,a){e.betSubcategoriesObjects=a},setRegularSeasonName(e,a){e.regularSeasonName=a},setBetSubcategories(e,a){e.betSubcategories=a},setBetDescription(e,a){e.betDescription=a},setSeasonId(e,a){e.seasonId=Number(a)},setHome(e,a){e.homeTeamInfo=a},setAway(e,a){e.awayTeamInfo=a},setMenuOptionActive(e,a){e.menuOptionActive=a},setPastSeasonId(e,a){e.pastSeasonId=a},setUsePastSeasonId(e,a){e.usePastSeasonId=a,a&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,a){e.showPostMatch=a},setHomeResultGame(e,a){e.homeResultGame=a},setAwayResultGame(e,a){e.awayResultGame=a},updateIsSocketConnected(e,a){e.isSocketConnected=a,a&&e7.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a,e.currentSeasonTeams.forEach(r=>{r.playedGames=e.currentSeasonGames.reduce((u,y)=>{if(y.game_status===1&&(y.home_team===r.team_id||y.visiting_team===r.team_id)){const i=y.score[0]-y.score[1],l=y.home_team===r.team_id;u.push({playingAs:l?1:2,matchResult:i===0?3:l?i>0?1:2:i<0?1:2})}return u},[])})},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateGameId(e,a){e.gameId=a},updateGameForAnalysis(e,a){e.gameForAnalysis=a,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.gameForAnalysis.is_live===1&&e.isSocketConnected&&e7.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateSelectedAnalysis(e,a){e.selectedAnalysis=a},updateShowLiveData(e,a){e.showLiveData=a},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,a){e.idAssetSelected=a},updateStats(e,a){e.currentSeasonPlays=a},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:a,needsFormat:r=!1}){if(r){if(!a||!a.local||!a.local.statistics||!a.visit||!a.visit.statistics)return;e.homeTeamFilter=t9(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=t9(e.visitingTeamFilter,a.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==a.local.statistics.block&&(e.selectedStatisticTypeBlock=a.local.statistics.block)}else e.homeTeamFilter={...a.homeTeamFilter,statistics:0},e.visitingTeamFilter={...a.visitingTeamFilter,statistics:0}},updateFinishedGames(e,a){e.totalSeasonFinishedGames=a},updateHomeTeamPlays(e,a){e.homeTeamPlays=a},updateVisitingTeamPlays(e,a){e.visitingTeamPlays=a},addSpecialMentions(e,a){const r=Object.values(e.nextGamesDataStructure);r.forEach(u=>{for(const y of Object.values(u.subcategories))y.resetMentions()}),r.forEach(u=>{for(const y of a)for(const i of Object.values(u.subcategories))i.addSpecialMention(y[0],y[1],y[2])})},setDefaultFilter(e,a){e.defaultFilter={homeTeamFilter:{...a.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...a.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,a){if(!e.livePlays.has(a[e.indexesTLP.playId])){e.livePlays.set(a[e.indexesTLP.playId],a);const u=G_(a,e.indexesTLP,e.categoriesMap);for(const y of Object.values(e.nextGamesDataStructure))for(const i of Object.values(y.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===u[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",u[e.indexesTSP.teamId],u,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const r=!!a[e.indexesTLP.length],u=e.livePlays.get(a[e.indexesTLP.playId]);if(vq(u,a))return;let y="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";u&&(y=e.gameForAnalysis.home_team===u[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const l=G_(u,e.indexesTLP,e.categoriesMap),n=T8(u,l,e.indexesTLP),_=G_(a,e.indexesTLP,e.categoriesMap),f=T8(a,_,e.indexesTLP);for(const o of Object.values(e.nextGamesDataStructure))for(const m of Object.values(o.subcategories))u&&(m.subtractLivePlay(y,l[e.indexesTSP.teamId],l,e.indexesTSP,r),n&&m.subtractLivePlay(y,n[e.indexesTSP.teamId],n,e.indexesTSP,r)),m.addLivePlay(i,_[e.indexesTSP.teamId],_,e.indexesTSP,e.isLive,r),f&&m.addLivePlay(i,f[e.indexesTSP.teamId],f,e.indexesTSP,e.isLive,r);e.livePlays.set(a[e.indexesTLP.playId],a)},deleteLiveGamePlay(e,a){const r=!!a[e.indexesTLP.length],u=e.livePlays.get(a[e.indexesTLP.playId]);let y="";if(u){y=e.gameForAnalysis.home_team===u[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(u[e.indexesTLP.playId]);const i=G_(u,e.indexesTLP,e.categoriesMap),l=T8(a,i,e.indexesTLP);for(const n of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(n.subcategories))_.subtractLivePlay(y,i[e.indexesTSP.teamId],i,e.indexesTSP,r),l&&_.subtractLivePlay(y,l[e.indexesTSP.teamId],l,e.indexesTSP,r)}},clearLiveTotals(e){for(const a of Object.values(e.nextGamesDataStructure))for(const r of Object.values(a.subcategories))r.homeTeam.resetTotalsLive(),r.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,a){e.statistics=a},updateOldSeasonId(e,a){e.oldSeasonId=a},addRankingInSubcategories(e,{getters:a,isPremiumAccount:r}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(l=>e.homeTeamFilter.playingAs.includes(l.playingAs)&&e.homeTeamFilter.matchResult.includes(l.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(l=>e.visitingTeamFilter.playingAs.includes(l.playingAs)&&e.visitingTeamFilter.matchResult.includes(l.matchResult)).length});const u=[],y=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const l of Object.values(i.subcategories))u.push(l);a.rankingData.forEach(i=>{for(const l of u)if(l.isInGeneralCategory(i[e.indexesLS.categoryId])){y.has(l.id)?y.get(l.id).push(i):y.set(l.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=vL(a)},setVisitingGames(e,a){e.visitingGames=vL(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const r of Object.values(a.subcategories))r.accomplishedCategoryIds.forEach(u=>{const y=e.categoriesMap.get(u);y?y.push(r.generalCategoriesIds.accomplished):e.categoriesMap.set(u,[r.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const a of Object.values(e.nextGamesDataStructure))for(const r of Object.values(a.subcategories))r.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:a},{command:r}){r==="on"?a("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):a("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},a){try{const l=await nCt({gameId:a.gameId});if(l){var r=[],u=[],y={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},i={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(l.data).length!==0&&(r=l.data.data.filter(n=>n[1]==a.homeTeam),u=l.data.data.filter(n=>n[1]==a.awayTeam),y=l.data.games,i=l.data.games),e("updateHomeTeamPlays",r),e("updateVisitingTeamPlays",u),e("setHomeGames",y),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(l){return Promise.reject(l)}},async fillStatisticDataPostMatch({commit:e,dispatch:a},r){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let u=[];e("updateGameForAnalysis",r.gameInfo),u.push(a("setAndGetStatsPostMatch",{gameId:r.game,homeTeam:r.homeTeam,awayTeam:r.awayTeam})),await Promise.all(u)}catch(u){throw new Error(u)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:r},{gameId:u,isTeamsAnalysis:y,currentSeasonId:i,isLoginChanged:l=!1,defaultFilter:n=null,gameInfo:_=null,isCupGame:f=!1}){try{let o={},m=e.seasonId!==Number(i);const x=[];r("setIsSectionLoading",!0,{root:!0}),r("setUsePastSeasonId",!1),m&&r("setSeasonId",i),r("updateGameId",Number(u)),e.oldSeasonId!==e.seasonId&&r("resetNextGamesDataStructure");const c=await a("getCurrentSeasonGames",Number(u));if(r("leagueGeneral/updateCurrentSeasonGames",c,{root:!0}),o=c.find(s=>s.game_id===Number(u)),!o&&_&&(o=_),o&&r("updateGameForAnalysis",o),o.game_status!==1&&(f||await a("checkTeamsData",{gameId:u,isFromBet:!!n}),(l||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&x.push(a("getSeasonStatistics")),(l||e.categoriesMap.size===0)&&r("generateCategoriesMap")),e.usePastSeasonId){const s=await a("getCurrentSeasonGamesLast");r("leagueGeneral/updateCurrentSeasonGames",s,{root:!0})}(l||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(s=>o.home_team===s.team_id))&&x.push(a("getCurrentSeasonTeams")),r("setHomeResultGame",o.score[0]),r("setAwayResultGame",o.score[1]),y?o.game_status!==1?(await a("fillStatisticData",{gameId:u,gameinfo:o,promises:x,defaultFilter:n}),r("updateShowPostMatchData",!1)):(r("updateStats",[]),r("updateShowPostMatchData",!0),x.push(a("fillStatisticDataPostMatch",{game:u,homeTeam:o.home_team,awayTeam:o.visiting_team,gameInfo:o})),await Promise.all(x)):r("setIsSectionLoading",!1,{root:!0})}catch(o){return Promise.reject(o)}},async fillStatisticData({commit:e,dispatch:a,getters:r,rootGetters:u,state:y},{gameId:i,gameinfo:l,promises:n=[],defaultFilter:_=null}){let f=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",l),l.is_live&&n.push(a("getCurrentLiveGamePlays",i)),n.push(a("getSpecialMentionsByGame",i)),n.push(a("getHomeTeamPlays")),n.push(a("getVisitingTeamPlays")),n.push(a("getCurrentSeasonPlays")),_&&n.push(oCt(_)),f=await Promise.all(n)}catch(o){throw new Error(o)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:r,isPremiumAccount:u["loginGeneral/getPremiumAccount"]}),_){const[o]=f.pop();o&&(e("setBetSubcategories",o.categories),e("setBetDescription",o.sectionDescription),e("setDefaultFilter",o.params),e("updateFilterAux"),e("updateFilters",{filters:y.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:r,commit:u},{gameId:y,isFromBet:i}){try{const l=Number(y);if(r.general.tournaments&&r.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const n=r.general.tournaments.find(_=>{for(const f of _.seasons)if(f.id===e.seasonId)return!0;return!1});u("general/setTournamentSelected",n||{},{root:!0})}if(e.pastSeasonId){u("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const n=r.leagueGeneral.currentSeasonGames.find(_=>_.game_id===l);n&&u("updateGameForAnalysis",n),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),u("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else u("setUsePastSeasonId",!1)}catch(l){throw new Error(l)}},async getSpecialMentionsByGame({commit:e},a){try{const r=await eCt({gameId:a});e("addSpecialMentions",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonGames({commit:e,state:a},r){try{const{teams:u,games:y,past_season_id:i,tournament_id:l}=await J9t({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:r}),n=oSt.find(_=>_.id===l);return n&&e("setCurrentTournamentName",n.name),e("setHome",u[0]),e("setAway",u[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",y),y&&Array.isArray(y)&&e("updateFinishedGames",y.reduce((_,f)=>(f.game_status===1&&(_+=1),_),0)),y}catch(u){return Promise.reject(u)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:r,past_season_id:u}=await gL({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",u),await e("updateCurrentSeasonGames",r),r&&Array.isArray(r)&&e("updateFinishedGames",r.reduce((y,i)=>(i.game_status===1&&(y+=1),y),0)),r}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const r=await rCt({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateCurrentSeasonTeams",r.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:a}){try{const r=a.usePastSeasonId?a.pastSeasonId:a.seasonId,u=await X9t({seasonId:r});e("updateSeasonStatistics",u),e("updateOldSeasonId",r)}catch(r){return Promise.reject(r)}},updateRankingInSubcategories({state:e,commit:a,getters:r,rootGetters:u}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:r,isPremiumAccount:u["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const r=await _L({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.home_team});r.data&&(e("updateHomeTeamPlays",r.data.data),e("setHomeGames",r.data.games))}catch(r){return Promise.reject(r)}},async getVisitingTeamPlays({commit:e,state:a}){try{const r=await _L({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.visiting_team});r.data&&(e("updateVisitingTeamPlays",r.data.data),e("setVisitingGames",r.data.games))}catch(r){return Promise.reject(r)}},async getCurrentSeasonPlays({commit:e,state:a}){try{const r=await Z9t({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateStats",r)}catch(r){return Promise.reject(new Error(r))}},async getCurrentLiveGamePlays({state:e,commit:a},r){try{const u=await Q9t({gameId:r});e.livePlays=new Map,u.forEach(y=>{e.gameForAnalysis.game_id===y[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===y[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===y[e.indexesTLP.teamId])&&a("addLiveGamePlay",y)})}catch(u){throw new Error(u)}},socket_new({state:e,commit:a},r){const u=r[1];(e.gameForAnalysis.home_team===u[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===u[e.indexesTLP.teamId])&&a("addLiveGamePlay",u)},socket_update({state:e,commit:a},r){const u=r[1];e.gameForAnalysis.game_id===u[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===u[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===u[e.indexesTLP.teamId])&&a("updateLiveGamePlay",u)},socket_delete({state:e,commit:a},r){const u=r[1];e.gameForAnalysis.game_id===u[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===u[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===u[e.indexesTLP.teamId])&&a("deleteLiveGamePlay",u)},exitChannel({state:e,getters:a,rootState:r,rootGetters:u,commit:y}){const i=u["loginGeneral/getPremiumAccount"];a.isLive&&i&&(y("updateShowLiveData",!1),y("clearLiveTotals"),e.livePlays.clear(),e7.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const u of Object.values(r.subcategories))u.homeTeam.resetTotals(),u.visitingTeam.resetTotals(),u.homeTeam.resetTotalsLive(),u.visitingTeam.resetTotalsLive(),u.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const u of Object.values(r.subcategories))u.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const u of Object.values(r.subcategories))u.homeTeam.resetTotals(),u.visitingTeam.resetTotals(),u.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const u of Object.values(r.subcategories))u.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 lSt(){try{const{data:e}=await Hs({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const cSt={namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,a){e.booleanIsStatisticModalOpen=a},setSectionRef(e,a){e.sectionRef=a},setSectionAnalytics(e,a){e.sectionAnalytics=a},setSeccionBetsGolTipster(e,a){e.seccionBetsGolTipster=a},setPreviewSectionAnalytics(e,a){e.previewSectionAnalytics=a},setVideoSrc(e,a){e.videoSrc=a},setVideoModalVisibility(e,a){e.isVideoModalVisible=a},setSelectedTournament(e,a){e.selectedTournament=a},setTournaments(e,a){e.tournaments=a.map(r=>({...r.tournament,seasons:r.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,a){e.tournamentSelected=a}},actions:{async fetchTournaments({state:e,commit:a}){try{if(e.tournaments.length===0){const r=await lSt();a("setTournaments",r)}}catch(r){throw new Error(r)}}}};async function dSt({seasonId:e,localTeamId:a,visitingTeamId:r}){try{const u=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${r}`;return(await Hs({url:u})).data}catch(u){return Promise.reject(u)}}async function uSt({seasonId:e,localTeamId:a,visitingTeamId:r}){try{const u=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${r}`;return(await Hs({url:u})).data}catch(u){return Promise.reject(u)}}const aR=(e,a)=>{let r={};return e.forEach((u,y)=>{y==3&&(a[0]==35||a[0]==54)&&(a[y]==2?a[y]=1:a[y]=2),y==2&&(a[0]==35||a[0]==54)&&(a[y]==1?a[y]=2:a[y]==2&&(a[y]=1)),r[u]=a[y]}),r},rR=(e,a)=>e.filter(u=>{const y=a.playingAs.includes(u.playing_as),i=a.matchResult.includes(u.match_result),l=a.sections.includes(u.section);return y&&i&&l}),nR=[{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(a,r,u){return typeof u>"u"||+u==0?Math[a](r):(r=+r,u=+u,isNaN(r)||!(typeof u=="number"&&u%1===0)?NaN:(r=r.toString().split("e"),r=Math[a](+(r[0]+"e"+(r[1]?+r[1]-u:-u))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+u:u))))}Math.ceil10||(Math.ceil10=function(a,r){return e("ceil",a,r)})})();function iR(e,a){let r=a*-1;return Math.ceil10(e,r)}const pSt={general:cSt,...iCt,...sSt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,r)=>{const u=e.xGLocalPlays,y="homeTeamFilter",i=r.nextGeneral[y];return rR(u,i)},playsAway:(e,a,r)=>{const u=e.xGVisitingPlays,y="visitingTeamFilter",i=r.nextGeneral[y];return rR(u,i)},goalsQtyLocal:(e,a)=>{const r=nR.find(u=>u.name==="Goles");return a.playsLocal.filter(u=>r.categories.includes(u.category_id)).length},goalsQtyAway:(e,a)=>{const r=nR.find(u=>u.name==="Goles");return a.playsAway.filter(u=>r.categories.includes(u.category_id)).length},shotsOnGoalQtyLocal:(e,a)=>a.playsLocal.filter(r=>r.category_id===510).length,shotsOnGoalQtyAway:(e,a)=>a.playsAway.filter(r=>r.category_id===510).length,xGLocal:(e,a)=>{const r=new Set;let u=a.playsLocal.reduce((y,i)=>(r.has(i.moment_of_play)||(r.add(i.moment_of_play),y+=i.xG2),y),0);return iR(u,2)},xGAway:(e,a)=>{const r=new Set;let u=a.playsAway.reduce((y,i)=>(r.has(i.moment_of_play)||(r.add(i.moment_of_play),y+=i.xG2),y),0);return iR(u,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(r=>aR(a.data_headers,r)),e.xGVisitingPlays=a.visiting_team.map(r=>aR(a.data_headers,r))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:r,visitingTeamId:u,postMatch:y=!1}){try{var i={};y?i=await uSt({seasonId:a,localTeamId:r,visitingTeamId:u}):i=await dSt({seasonId:a,localTeamId:r,visitingTeamId:u}),e("setPlays",i)}catch(l){return Promise.reject(l)}}}}}};function hSt(e){for(const[a,r]of Object.entries(pSt))e.hasModule(a)||e.registerModule(a,r)}const fSt={class:"subcategory-group"},mSt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(a,r)=>(t.openBlock(),t.createElementBlock("div",fSt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,u=>(t.openBlock(),t.createBlock(t.unref(wn),{key:u.id,modelValue:u.isSelected,"onUpdate:modelValue":y=>u.isSelected=y,label:u.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},gSt=Yn(mSt,[["__scopeId","data-v-ae6f3d72"]]),ySt={class:"filter-subcategories"},_St=Object.freeze(Object.defineProperty({__proto__:null,default:Yn({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(a,r)=>(t.openBlock(),t.createElementBlock("div",ySt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,u=>(t.openBlock(),t.createElementBlock("div",{key:u.id,class:"filter-subcategories__group"},[t.createVNode(gSt,{subcategoryGroup:u},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),cv=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),vSt={class:"details__header"},bSt=cv(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),xSt={class:"details__header__checkbox"},wSt={class:"details__body"},kSt={class:"details__body__playing-as"},CSt=["onClick"],ESt={class:"details__header"},SSt=cv(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),TSt={class:"details__header__checkbox"},ASt={class:"details__body"},NSt=cv(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),BSt={class:"details__body__game-section"},MSt=["onClick"],ISt={class:"details__body"},OSt=cv(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),FSt={class:"details__body__game-section"},zSt=["onClick"],PSt=Object.freeze(Object.defineProperty({__proto__:null,default:Yn({__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 a=e;t.useCssVars(o=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const r=t.computed(()=>a.playingAs.every(o=>o.isSelected)),u=t.computed(()=>a.gameSections.every(o=>o.isSelected)),y=t.computed(()=>a.gameSections.reduce((o,m)=>(m.value<=3?o.firstHalf.push(m):o.secondHalf.push(m),o),{firstHalf:[],secondHalf:[]})),i=t.computed(()=>({"--border-radius-first-button":`${a.buttonsBorderRadius} 0 0 ${a.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${a.buttonsBorderRadius} ${a.buttonsBorderRadius} 0`}));function l(o){o?a.playingAs.forEach(m=>{m.isSelected=!0}):a.playingAs.forEach((m,x)=>{m.isSelected=x===0})}function n(o){a.playingAs.filter(m=>m.isSelected).length===1&&o.isSelected||(o.isSelected=!o.isSelected)}function _(o){a.gameSections.filter(m=>m.isSelected).length===1&&o.isSelected||(o.isSelected=!o.isSelected)}function f(o){o?a.gameSections.forEach(m=>{m.isSelected=!0}):a.gameSections.forEach((m,x)=>{m.isSelected=x===0})}return(o,m)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(i.value)},[t.createElementVNode("div",vSt,[bSt,t.createElementVNode("div",xSt,[t.createVNode(t.unref(wn),{label:"Todos","model-value":r.value,"onUpdate:modelValue":l},null,8,["model-value"])])]),t.createElementVNode("div",wSt,[t.createElementVNode("div",kSt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.playingAs,(x,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:x.isSelected}]),onClick:s=>n(x)},t.toDisplayString(x.name),11,CSt))),128))])]),t.createElementVNode("div",ESt,[SSt,t.createElementVNode("div",TSt,[t.createVNode(t.unref(wn),{label:"Todos","model-value":u.value,"onUpdate:modelValue":f},null,8,["model-value"])])]),t.createElementVNode("div",ASt,[NSt,t.createElementVNode("div",BSt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.firstHalf,(x,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:x.isSelected}]),onClick:s=>_(x)},t.toDisplayString(x.text),11,MSt))),128))])]),t.createElementVNode("div",ISt,[OSt,t.createElementVNode("div",FSt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.secondHalf,(x,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:x.isSelected}]),onClick:s=>_(x)},t.toDisplayString(x.text),11,zSt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),VSt={class:"filter-field"},LSt=Object.freeze(Object.defineProperty({__proto__:null,default:Yn({__name:"FilterField",setup(e){const a=t.ref(Array.from({length:16},(u,y)=>y+1));function r(){}return(u,y)=>(t.openBlock(),t.createElementBlock("div",VSt,[t.createVNode(t.unref(Dz),{width:"100%","background-color":"#2E3B46",value:a.value,"onUpdate:modelValue":r},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));ol.GSCGameData=Y9t,ol.registerStoreModules=hSt,Object.defineProperty(ol,Symbol.toStringTag,{value:"Module"})});
|