@golstats/gsc-game-data 1.0.16 → 1.0.18
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/gsc-game-data.js +5 -6
- package/dist/gsc-game-data.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
`).forEach(function(r){s=r.indexOf(":"),o=r.substring(0,s).trim().toLowerCase(),n=r.substring(s+1).trim(),!(!o||a[o]&&Xx[o])&&(o==="set-cookie"?a[o]?a[o].push(n):a[o]=[n]:a[o]=a[o]?a[o]+", "+n:n)}),a},o1=Symbol("internals");function In(e){return e&&String(e).trim().toLowerCase()}function Fi(e){return e===!1||e==null?e:L.isArray(e)?e.map(Fi):String(e)}function Yx(e){const a=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)a[n[1]]=n[2];return a}const Kx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Td(e,a,o,n,s){if(L.isFunction(n))return n.call(this,a,o);if(s&&(a=o),!!L.isString(a)){if(L.isString(n))return a.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(a)}}function Qx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,o,n)=>o.toUpperCase()+n)}function eV(e,a){const o=L.toCamelCase(" "+a);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+o,{value:function(s,i,r){return this[n].call(this,a,s,i,r)},configurable:!0})})}class Ri{constructor(a){a&&this.set(a)}set(a,o,n){const s=this;function i(c,p,d){const l=In(p);if(!l)throw new Error("header name must be a non-empty string");const m=L.findKey(s,l);(!m||s[m]===void 0||d===!0||d===void 0&&s[m]!==!1)&&(s[m||p]=Fi(c))}const r=(c,p)=>L.forEach(c,(d,l)=>i(d,l,p));return L.isPlainObject(a)||a instanceof this.constructor?r(a,o):L.isString(a)&&(a=a.trim())&&!Kx(a)?r(Zx(a),o):a!=null&&i(o,a,n),this}get(a,o){if(a=In(a),a){const n=L.findKey(this,a);if(n){const s=this[n];if(!o)return s;if(o===!0)return Yx(s);if(L.isFunction(o))return o.call(this,s,n);if(L.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,o){if(a=In(a),a){const n=L.findKey(this,a);return!!(n&&this[n]!==void 0&&(!o||Td(this,this[n],n,o)))}return!1}delete(a,o){const n=this;let s=!1;function i(r){if(r=In(r),r){const c=L.findKey(n,r);c&&(!o||Td(n,n[c],c,o))&&(delete n[c],s=!0)}}return L.isArray(a)?a.forEach(i):i(a),s}clear(a){const o=Object.keys(this);let n=o.length,s=!1;for(;n--;){const i=o[n];(!a||Td(this,this[i],i,a,!0))&&(delete this[i],s=!0)}return s}normalize(a){const o=this,n={};return L.forEach(this,(s,i)=>{const r=L.findKey(n,i);if(r){o[r]=Fi(s),delete o[i];return}const c=a?Qx(i):String(i).trim();c!==i&&delete o[i],o[c]=Fi(s),n[c]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const o=Object.create(null);return L.forEach(this,(n,s)=>{n!=null&&n!==!1&&(o[s]=a&&L.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,o])=>a+": "+o).join(`
|
|
19
19
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...o){const n=new this(a);return o.forEach(s=>n.set(s)),n}static accessor(a){const n=(this[o1]=this[o1]={accessors:{}}).accessors,s=this.prototype;function i(r){const c=In(r);n[c]||(eV(s,r),n[c]=!0)}return L.isArray(a)?a.forEach(i):i(a),this}}Ri.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Ri.prototype,({value:e},a)=>{let o=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(n){this[o]=n}}}),L.freezeMethods(Ri);const Va=Ri;function zd(e,a){const o=this||Od,n=a||o,s=Va.from(n.headers);let i=n.data;return L.forEach(e,function(c){i=c.call(o,i,s.normalize(),a?a.status:void 0)}),s.normalize(),i}function n1(e){return!!(e&&e.__CANCEL__)}function On(e,a,o){me.call(this,e??"canceled",me.ERR_CANCELED,a,o),this.name="CanceledError"}L.inherits(On,me,{__CANCEL__:!0});function tV(e,a,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):a(new me("Request failed with status code "+o.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const aV=Kt.hasStandardBrowserEnv?{write(e,a,o,n,s,i){const r=[e+"="+encodeURIComponent(a)];L.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),L.isString(n)&&r.push("path="+n),L.isString(s)&&r.push("domain="+s),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function nV(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function s1(e,a){return e&&!oV(a)?nV(e,a):a}const sV=Kt.hasStandardBrowserEnv?function(){const a=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let n;function s(i){let r=i;return a&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return n=s(window.location.href),function(r){const c=L.isString(r)?s(r):r;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}();function iV(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function rV(e,a){e=e||10;const o=new Array(e),n=new Array(e);let s=0,i=0,r;return a=a!==void 0?a:1e3,function(p){const d=Date.now(),l=n[i];r||(r=d),o[s]=p,n[s]=d;let m=i,h=0;for(;m!==s;)h+=o[m++],m=m%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-r<a)return;const g=l&&d-l;return g?Math.round(h*1e3/g):void 0}}function i1(e,a){let o=0;const n=rV(50,250);return s=>{const i=s.loaded,r=s.lengthComputable?s.total:void 0,c=i-o,p=n(c),d=i<=r;o=i;const l={loaded:i,total:r,progress:r?i/r:void 0,bytes:c,rate:p||void 0,estimated:p&&r&&d?(r-i)/p:void 0,event:s};l[a?"download":"upload"]=!0,e(l)}}const Fd={http:Px,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){let s=e.data;const i=Va.from(e.headers).normalize();let{responseType:r,withXSRFToken:c}=e,p;function d(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}let l;if(L.isFormData(s)){if(Kt.hasStandardBrowserEnv||Kt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[u,...f]=l?l.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}let m=new XMLHttpRequest;if(e.auth){const u=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+f))}const h=s1(e.baseURL,e.url);m.open(e.method.toUpperCase(),Ku(h,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function g(){if(!m)return;const u=Va.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),b={data:!r||r==="text"||r==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:u,config:e,request:m};tV(function(V){o(V),d()},function(V){n(V),d()},b),m=null}if("onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(n(new me("Request aborted",me.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new me("Network Error",me.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||e1;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),n(new me(f,b.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,m)),m=null},Kt.hasStandardBrowserEnv&&(c&&L.isFunction(c)&&(c=c(e)),c||c!==!1&&sV(h))){const u=e.xsrfHeaderName&&e.xsrfCookieName&&aV.read(e.xsrfCookieName);u&&i.set(e.xsrfHeaderName,u)}s===void 0&&i.setContentType(null),"setRequestHeader"in m&&L.forEach(i.toJSON(),function(f,b){m.setRequestHeader(b,f)}),L.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),r&&r!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",i1(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",i1(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=u=>{m&&(n(!u||u.type?new On(null,e,m):u),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const y=iV(h);if(y&&Kt.protocols.indexOf(y)===-1){n(new me("Unsupported protocol "+y+":",me.ERR_BAD_REQUEST,e));return}m.send(s||null)})}};L.forEach(Fd,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const r1=e=>`- ${e}`,lV=e=>L.isFunction(e)||e===null||e===!1,l1={getAdapter:e=>{e=L.isArray(e)?e:[e];const{length:a}=e;let o,n;const s={};for(let i=0;i<a;i++){o=e[i];let r;if(n=o,!lV(o)&&(n=Fd[(r=String(o)).toLowerCase()],n===void 0))throw new me(`Unknown adapter '${r}'`);if(n)break;s[r||"#"+i]=n}if(!n){const i=Object.entries(s).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let r=a?i.length>1?`since :
|
|
20
20
|
`+i.map(r1).join(`
|
|
21
|
-
`):" "+r1(i[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:Fd};function Rd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new On(null,e)}function c1(e){return Rd(e),e.headers=Va.from(e.headers),e.data=zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),l1.getAdapter(e.adapter||Od.adapter)(e).then(function(n){return Rd(e),n.data=zd.call(e,e.transformResponse,n),n.headers=Va.from(n.headers),n},function(n){return n1(n)||(Rd(e),n&&n.response&&(n.response.data=zd.call(e,e.transformResponse,n.response),n.response.headers=Va.from(n.response.headers))),Promise.reject(n)})}const d1=e=>e instanceof Va?e.toJSON():e;function Bo(e,a){a=a||{};const o={};function n(d,l,m){return L.isPlainObject(d)&&L.isPlainObject(l)?L.merge.call({caseless:m},d,l):L.isPlainObject(l)?L.merge({},l):L.isArray(l)?l.slice():l}function s(d,l,m){if(L.isUndefined(l)){if(!L.isUndefined(d))return n(void 0,d,m)}else return n(d,l,m)}function i(d,l){if(!L.isUndefined(l))return n(void 0,l)}function r(d,l){if(L.isUndefined(l)){if(!L.isUndefined(d))return n(void 0,d)}else return n(void 0,l)}function c(d,l,m){if(m in a)return n(d,l);if(m in e)return n(void 0,d)}const p={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:c,headers:(d,l)=>s(d1(d),d1(l),!0)};return L.forEach(Object.keys(Object.assign({},e,a)),function(l){const m=p[l]||s,h=m(e[l],a[l],l);L.isUndefined(h)&&m!==c||(o[l]=h)}),o}const m1="1.6.5",Pd={};["object","boolean","number","function","string","symbol"].forEach((e,a)=>{Pd[e]=function(n){return typeof n===e||"a"+(a<1?"n ":" ")+e}});const p1={};Pd.transitional=function(a,o,n){function s(i,r){return"[Axios v"+m1+"] Transitional option '"+i+"'"+r+(n?". "+n:"")}return(i,r,c)=>{if(a===!1)throw new me(s(r," has been removed"+(o?" in "+o:"")),me.ERR_DEPRECATED);return o&&!p1[r]&&(p1[r]=!0,console.warn(s(r," has been deprecated since v"+o+" and will be removed in the near future"))),a?a(i,r,c):!0}};function cV(e,a,o){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],r=a[i];if(r){const c=e[i],p=c===void 0||r(c,i,e);if(p!==!0)throw new me("option "+i+" must be "+p,me.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}}const Dd={assertOptions:cV,validators:Pd},Ga=Dd.validators;class Pi{constructor(a){this.defaults=a,this.interceptors={request:new Qu,response:new Qu}}request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=Bo(this.defaults,o);const{transitional:n,paramsSerializer:s,headers:i}=o;n!==void 0&&Dd.assertOptions(n,{silentJSONParsing:Ga.transitional(Ga.boolean),forcedJSONParsing:Ga.transitional(Ga.boolean),clarifyTimeoutError:Ga.transitional(Ga.boolean)},!1),s!=null&&(L.isFunction(s)?o.paramsSerializer={serialize:s}:Dd.assertOptions(s,{encode:Ga.function,serialize:Ga.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&L.merge(i.common,i[o.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),o.headers=Va.concat(r,i);const c=[];let p=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(p=p&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,m=0,h;if(!p){const y=[c1.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,d),h=y.length,l=Promise.resolve(o);m<h;)l=l.then(y[m++],y[m++]);return l}h=c.length;let g=o;for(m=0;m<h;){const y=c[m++],u=c[m++];try{g=y(g)}catch(f){u.call(this,f);break}}try{l=c1.call(this,g)}catch(y){return Promise.reject(y)}for(m=0,h=d.length;m<h;)l=l.then(d[m++],d[m++]);return l}getUri(a){a=Bo(this.defaults,a);const o=s1(a.baseURL,a.url);return Ku(o,a.params,a.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(a){Pi.prototype[a]=function(o,n){return this.request(Bo(n||{},{method:a,url:o,data:(n||{}).data}))}}),L.forEach(["post","put","patch"],function(a){function o(n){return function(i,r,c){return this.request(Bo(c||{},{method:a,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Pi.prototype[a]=o(),Pi.prototype[a+"Form"]=o(!0)});const Di=Pi;class Ld{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const r=new Promise(c=>{n.subscribe(c),i=c}).then(s);return r.cancel=function(){n.unsubscribe(i)},r},a(function(i,r,c){n.reason||(n.reason=new On(i,r,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}static source(){let a;return{token:new Ld(function(s){a=s}),cancel:a}}}const dV=Ld;function mV(e){return function(o){return e.apply(null,o)}}function pV(e){return L.isObject(e)&&e.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jd).forEach(([e,a])=>{jd[a]=e});const hV=jd;function h1(e){const a=new Di(e),o=Ru(Di.prototype.request,a);return L.extend(o,Di.prototype,a,{allOwnKeys:!0}),L.extend(o,a,null,{allOwnKeys:!0}),o.create=function(s){return h1(Bo(e,s))},o}const Me=h1(Od);Me.Axios=Di,Me.CanceledError=On,Me.CancelToken=dV,Me.isCancel=n1,Me.VERSION=m1,Me.toFormData=zi,Me.AxiosError=me,Me.Cancel=Me.CanceledError,Me.all=function(a){return Promise.all(a)},Me.spread=mV,Me.isAxiosError=pV,Me.mergeConfig=Bo,Me.AxiosHeaders=Va,Me.formToJSON=e=>a1(L.isHTMLForm(e)?new FormData(e):e),Me.getAdapter=l1.getAdapter,Me.HttpStatusCode=hV,Me.default=Me;const Li=Me,y1="/icn-play.svg",kve="",yV={components:{BarraLeft:XB,BarraRight:ox},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},methods:{onclickPlayVideos(e){var a=[];e.type==2?e.position_id==1?e.category==0?a=[55,324,323,608,39,774,802,52,53,40,54]:a=e.category:e.category==0?a=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:a=e.category:e.type==3?e.category==0?a=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:a=e.category:e.category!=0?a=e.category:a=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let n={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:a,gameIds:e.game_id?[e.game_id]:null,playerIds:e.position_id!=1?e.player_id?[e.player_id]:[]:[],goalkeeperIds:e.position_id==1?e.player_id?[e.player_id]:[]:[],teamId:e.team_id?e.team_id:0,matchResult:e.matchResult?[e.matchResult]:o,playData:{},advancedFilter:{playListTitle:""}};e.category!==0&&(n.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",n)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},getTeamValue(e,a,o){if(!a.game_id)return this.objectZeroValues;const n=e.generalCategoriesIds.accomplished===3;if(a.is_live&&this.showLiveData){const s=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return s?{numberValue:n?e[o].accomplished.totalLive/s*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/s}:this.objectZeroValues}else if(a.is_live||a.game_status===1){const s=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return s?{numberValue:n?e[o].accomplished.totalPostGame/s*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/s}:this.objectZeroValues}if(n){const s=e[o].accomplished.avgPreGame;return e[o].accomplished.avgPostGame?{numberValue:s<1?s*100:s,numberBarPercent:e[o].accomplished.avgPreGame}:this.objectZeroValues}else return e[o].accomplished.leader.points?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/e[o].accomplished.leader.points}:this.objectZeroValues},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await Li.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["homeTeam","visitingTeam"])},async mounted(){}},g1=e=>(t.pushScopeId("data-v-4e0c1385"),e=e(),t.popScopeId(),e),gV={class:"card"},uV={class:"card__header"},fV={class:"card__stats"},_V=["onClick"],bV=[g1(()=>t.createElementVNode("img",{src:y1},null,-1))],wV={key:1,class:"card__stats__stat__button_empty"},CV={class:"card__stats__title"},kV={class:"card__stats__scores"},SV={key:0},EV={key:1},NV={key:2},$V={key:3},BV={class:"card__stats__bars"},xV=["onClick"],VV=[g1(()=>t.createElementVNode("img",{src:y1},null,-1))],AV={key:1,class:"card__stats__stat__button_empty"};function IV(e,a,o,n,s,i){const r=t.resolveComponent("BarraLeft"),c=t.resolveComponent("BarraRight");return t.openBlock(),t.createElementBlock("div",gV,[t.createElementVNode("span",uV,t.toDisplayString(o.data.name),1),t.createElementVNode("div",fV,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.data.subcategories,(p,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"card__stats__stat"},[t.createElementVNode("div",null,[i.hVal(p)&&i.hVal(p).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:p.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},bV,8,_V)):(t.openBlock(),t.createElementBlock("div",wV))]),t.createElementVNode("div",null,[t.createElementVNode("div",CV,t.toDisplayString(p.name)+t.toDisplayString(),1),t.createElementVNode("div",kV,[i.hVal(p)?(t.openBlock(),t.createElementBlock("span",SV,[t.createTextVNode(t.toDisplayString(i.hVal(p).numberValue|e.toFixed2),1),p.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",EV,"0")),i.aVal(p)?(t.openBlock(),t.createElementBlock("span",NV,[t.createTextVNode(t.toDisplayString(i.aVal(p).numberValue|e.toFixed2),1),p.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",$V,"0"))]),t.createElementVNode("div",BV,[t.createElementVNode("div",null,[i.hVal(p)?(t.openBlock(),t.createBlock(r,{key:0,postmatch:i.hVal(p).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(r,{key:1,postmatch:0}))]),t.createElementVNode("div",null,[i.aVal(p)?(t.openBlock(),t.createBlock(c,{key:0,postmatch:i.aVal(p).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(c,{key:1,postmatch:0}))])])]),t.createElementVNode("div",null,[i.aVal(p)&&i.aVal(p).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:p.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},VV,8,xV)):(t.openBlock(),t.createElementBlock("div",AV))])]))),128))])])}const OV=Ie(yV,[["render",IV],["__scopeId","data-v-4e0c1385"]]),Nve="",TV={name:"GscComparative",props:{local:{type:Object,default:()=>{}},away:{type:Object,default:()=>{}},fontFamily:{type:String,default:"inherit"}},data(){return{}},computed:{customStyle(){const e={};return this.fontFamily&&(e["font-family"]=`${this.fontFamily}`),e}},methods:{}},Aa=e=>(t.pushScopeId("data-v-58147cac"),e=e(),t.popScopeId(),e),zV={class:"comparative-card"},FV=Aa(()=>t.createElementVNode("div",{class:"header-title"},[t.createElementVNode("span",null,"Comparativa h")],-1)),RV={class:"versus"},PV={class:"team-badge"},DV=["src","alt"],LV=Aa(()=>t.createElementVNode("div",null,[t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")]),t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")])],-1)),jV=Aa(()=>t.createElementVNode("span",{class:"vs-text"},"VS",-1)),vV={class:"team-badge"},MV=["src","alt"],HV={class:"details"},UV=Aa(()=>t.createElementVNode("td",null,"Posición en la tabla",-1)),GV=Aa(()=>t.createElementVNode("td",null,"Puntos",-1)),WV=Aa(()=>t.createElementVNode("td",null,"Partidos jugados",-1)),qV=Aa(()=>t.createElementVNode("td",null,"Partidos ganados",-1)),JV=Aa(()=>t.createElementVNode("td",null,"Partidos perdidos",-1)),XV=Aa(()=>t.createElementVNode("td",null,"Partidos empatados",-1));function ZV(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:"comparative-main",style:t.normalizeStyle(i.customStyle)},[t.createElementVNode("div",zV,[FV,t.createElementVNode("div",RV,[t.createElementVNode("div",PV,[t.createElementVNode("img",{class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,DV),LV]),jV,t.createElementVNode("div",vV,[t.createElementVNode("img",{class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,MV)])]),t.createElementVNode("div",HV,[t.createElementVNode("table",null,[t.createElementVNode("tbody",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.table_position),1),UV,t.createElementVNode("td",null,t.toDisplayString(o.away.table_position),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.points),1),GV,t.createElementVNode("td",null,t.toDisplayString(o.away.points),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_played),1),WV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_played),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_won),1),qV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_won),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_lost),1),JV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_lost),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_tied),1),XV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_tied),1)])])])])])],4)}const YV=Ie(TV,[["render",ZV],["__scopeId","data-v-58147cac"]]),$ve="",KV=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},vd={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)}}},u1=()=>{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}))},f1=vd.setup;vd.setup=f1?(e,a)=>(u1(),f1(e,a)):u1;const QV={ref:"gscScrollableContainer",class:"scrollable-container"},eA={class:"scrollable-arrows"},tA=["width","height","viewBox"],aA=["stroke"],oA={class:"scrollable-wrapper"},nA={class:"scrollable-arrows"},sA=["width","height","viewBox"],iA=["stroke"];function rA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",QV,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",eA,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,aA)],8,tA))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",oA,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",nA,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,iA)],8,sA))])],2)):t.createCommentVNode("",!0)],512)}const Md=KV(vd,[["render",rA],["__scopeId","data-v-b548a08d"]]),Bve="";let _1=null;const lA={name:"App",components:{GscLinearTeamStats:OV,TableComparative:YV,GSCSlider:Md},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["arrayFilledDataSortedByPriority"])},watch:{gameForAnalysis:{handler:function(){this.getTableList()},immediate:!0}},data(){return{gamesContainerWidth:0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",seasonId:1772,gameId:79623,movil:!1,home:{},away:{}}},methods:{openmedia(e){this.$emit("openmedia",e)},setUpResizeObserver(){if(window.ResizeObserver)_1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),_1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const a=await Li.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonId),o=a.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.home_team),n=a.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.visiting_team);this.home=a.data.data[o],this.away=a.data.data[n]}catch{}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},cA={class:"container",ref:"gamesContainer"},dA={key:0,class:"grid-container"},mA={class:"item"},pA={class:"item"},hA={class:"item"},yA={class:"item"},gA={class:"item"},uA={class:"item"},fA={class:"item"},_A={class:"grid-container"},bA={class:"item-comparative"},wA={class:"table-movil-container"};function CA(e,a,o,n,s,i){const r=t.resolveComponent("TableComparative"),c=t.resolveComponent("GscLinearTeamStats"),p=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",cA,[s.movil?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",_A,[t.createElementVNode("div",bA,[t.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Regular"},null,8,["local","away"])])]),t.createVNode(p,{backgroundColor:"none",pxScroll:300,scrollColor:"none",arrowsPosition:"relative",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[t.createElementVNode("div",wA,[t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510&&s.gamesContainerWidth>450?"width: 400px":s.gamesContainerWidth<=450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(t.openBlock(),t.createElementBlock("div",dA,[t.createElementVNode("div",mA,[t.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Regular"},null,8,["local","away"])]),t.createElementVNode("div",pA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",hA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",yA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",gA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",uA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",fA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const kA=Ie(lA,[["render",CA]]),xve="",b1=["#cbee6b","#0033C5"],SA={name:"distributionchart",components:{},props:{seasonSelected:{type:Object,default:()=>({})}},data(){return{arrayChartTypes:["General","Ofensivo","Defensivo","Posesión","Balón parado","Infracciones"],height:409,updateCategory:0,homeTeamSelectedPlaysType:0,visitingTeamSelectedPlaysType:0,chartKeyCounter:0,homeTeamPlaysTypes:{history:0,live:1},visitingTeamPlaysTypes:{history:0,live:1},tooltip:{show:!1,data:{},names:{},keyName:"",leagueAvg:"",showLiveData:!1,local:!1,x:0,y:0},globals:{x:0,y:0},arrayDataForCharts:[],arrayChartOptions:[],arrayFilledSeries:[]}},watch:{menuOptionActive(){this.idAssetSelected==3},idAssetSelected(){this.idAssetSelected===3&&this.chartKeyCounter++},isMobile(e){this.chartOptions.legend.horizontalAlign=e?"center":"left",this.chartKeyCounter++},arrayFilledDataSortedByPriority:{immediate:!0,deep:!0,handler(){this.fillData()}},showLiveData(){this.fillData()}},computed:{...kt("nextGeneral",["showLiveData","gameForAnalysis"]),...Te("nextGeneral",["idAssetSelected","menuOptionActive","homeTeamStatisticsType","showPostMatchData","visitingTeamStatisticsType","homeTeam","visitingTeam","subcategoryName","accomplished","arrayFilledDataSortedByPriority","filledDataStructure","showPostMatchData"]),isMobile(){return this.$mq==="mobile"},timeLeft(){const e=new Date().getTime(),o=new Date(this.gameForAnalysis.date_time_utc).getTime()-e,n=Math.floor(o/(1e3*60*60*24)),s=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),i=Math.floor(o%(1e3*60*60)/(1e3*60)),r=Math.floor(o%(1e3*60)/1e3);let c="";return r>0&&(c=r==1?r+" segundo":r+" segundos"),i>0&&(c=i==1?i+" minuto":i+" minutos"),s>0&&(c=s==1?s+" hora":s+" horas"),n>0&&(c=n==1?n+" día":n+" días"),c}},methods:{avg(e,a){return a?e.leagueAccomplishedAvg:e.leagueReceivedAvg},fillData(){this.arrayChartOptions=[],this.arrayFilledDataSortedByPriority&&this.arrayFilledDataSortedByPriority.length&&typeof this.arrayFilledDataSortedByPriority[0].subcategories=="object"?(this.arrayChartOptions=[],this.arrayFilledSeries=[],this.arrayDataForCharts=this.arrayFilledDataSortedByPriority.map(e=>{const a=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,a)),this.arrayChartOptions.push(a),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:b1,fill:{colors:b1,opacity:.4},legend:{show:!0,position:"bottom",horizontalAlign:"left",fontSize:"11px",fontFamily:"Poppins-Regular",labels:{colors:"#d9d9d9",useSeriesColors:!1}},xaxis:{categories:[],labels:{show:!0,style:{fontSize:"11px",fontFamily:"Poppins-Regular"}}},yaxis:{show:!1},responsive:[{breakpoint:770,options:{chart:{height:300},plotOptions:{radar:{size:100,offsetY:10,polygons:{strokeColors:"#606971"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"11px"}}}}},{breakpoint:450,options:{plotOptions:{radar:{size:70,offsetY:-20,polygons:{strokeColors:"#dcdcdc"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"10px"}}}}}],tooltip:{intersect:!0,shared:!1,custom:({w:e,dataPointIndex:a,seriesIndex:o})=>(this.showModal(e,a,o),null)}}},getChartSeries(e,a){let o,n;return this.showPostMatchData?(o={name:`${this.homeTeam.acronym}`,data:[]},n={name:`${this.visitingTeam.acronym}`,data:[]},a.arraySubcategories=[],Object.values(e).forEach((s,i)=>{a.xaxis.categories.push(this.prepareLabels(s,i)),a.arraySubcategories.push(s);const r=s.homeTeam[this.homeTeamStatisticsType].totalPostGame+s.visitingTeam[this.visitingTeamStatisticsType].totalPostGame;o.data.push(Math.round(120*(r?s.homeTeam[this.homeTeamStatisticsType].totalPostGame/r:0))),n.data.push(Math.round(120*(r?s.visitingTeam[this.visitingTeamStatisticsType].totalPostGame/r:0)))})):(o={name:`${this.showLiveData?"Live":"Histórico"} ${this.homeTeam.acronym}`,data:[]},n={name:`${this.showLiveData?"Live":"Histórico"} ${this.visitingTeam.acronym}`,data:[]},a.arraySubcategories=[],Object.values(e).forEach((s,i)=>{a.xaxis.categories.push(this.prepareLabels(s,i)),a.arraySubcategories.push(s);let r,c;const p=s.homeTeam[this.homeTeamStatisticsType].leader.points,d=s.visitingTeam[this.visitingTeamStatisticsType].leader.points;if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&s.generalCategoriesIds.accomplished===3?r=s.homeTeam.accomplished.avgPreGame:r=p?s.homeTeam[this.homeTeamStatisticsType].avgPostGame/p:0;else{const l=s.homeTeam[this.homeTeamStatisticsType].totalLive+s.visitingTeam[this.visitingTeamStatisticsType].totalLive;r=l?s.homeTeam[this.homeTeamStatisticsType].totalLive/l:0}if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&s.generalCategoriesIds.accomplished===3?c=s.visitingTeam.accomplished.avgPreGame:c=d?s.visitingTeam[this.visitingTeamStatisticsType].avgPostGame/d:0;else{const l=s.homeTeam[this.homeTeamStatisticsType].totalLive+s.visitingTeam[this.visitingTeamStatisticsType].totalLive;c=l?s.visitingTeam[this.visitingTeamStatisticsType].totalLive/l:0}o.data.push(Math.round(120*r)),n.data.push(Math.round(120*c))})),[o,n]},onHomeTeamPlaysTypeChanged(e){this.homeTeamSelectedPlaysType=e},onVisitingTeamPlaysTypeChanged(e){this.visitingTeamSelectedPlaysType=e},getSubcategoryData(e,a="homeTeam"){return e.id==="3-0"&&(e[a].accomplished.totalLiveBothTeams=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive),e[a].accomplished||0},showModal(e,a,o){const n=o===0?"homeTeam":"visitingTeam",s=e.config.arraySubcategories[a]||{};this.tooltip.isLeagueAvgVisible=s.id!=="3-0",this.tooltip.data=this.getSubcategoryData(s,n),this.tooltip.local=o===0,this.tooltip.names=s.names,this.tooltip.keyName=this.subcategoryName,this.tooltip.leagueAvg=this.leagueAvg(s);const i=e.globals.clientX||0,r=e.globals.clientY||0;this.globals.x=i,this.globals.y=r,this.tooltip.x=i,this.tooltip.y=r>700?r-250:r;const c=s.generalCategoriesIds.accomplished===3;if(c){const p=s.homeTeam.accomplished.avgPostGame+s.visitingTeam.accomplished.avgPostGame;this.tooltip.numberValue=p?s[n].accomplished.avgPostGame/p*100:0}else this.tooltip.numberValue=null;this.tooltip.booleanIsPercent=c,this.tooltip.show=!0},updateTooltip(e){const o=Math.abs(e.clientX-this.globals.x),n=Math.abs(e.clientY-this.globals.y);(o>5||n>5)&&(this.tooltip.show=!1)},prepareLabels(e,a){let o=e.name||e.names[this.subcategoryName]||e.names["0-0"];if(a===0)return o;const n=13;if(o.length>n){let s=o.split(" ");o=[];let i="",r="",c=s.slice(-1)[0];s.forEach(p=>{i+=` ${p} `,i.length>n&&(o.push(r.trim()),i=p),r=i,c===p&&o.push(r.trim())})}return o},leagueAvg(e){return e.generalCategoriesIds.accomplished===3?(e.homeTeam.accomplished.arrayRankings.reduce((a,o)=>a+o.points,0)/e.homeTeam.accomplished.arrayRankings.length*100).toFixed(2):this.avg(e,this.accomplished)}}},w1=e=>(t.pushScopeId("data-v-4aab14bc"),e=e(),t.popScopeId(),e),EA={key:0,class:"distribution-leyend"},NA=w1(()=>t.createElementVNode("br",null,null,-1)),$A={class:"distribution"},BA={class:"distribution__container"},xA={class:"distribution__container__chart-type__title"},VA=w1(()=>t.createElementVNode("div",{class:"distribution__container__chart-type__controls"},null,-1)),AA={class:"distribution__container__chart-type__chart"};function IA(e,a,o,n,s,i){const r=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.gameForAnalysis.game_status==4?(t.openBlock(),t.createElementBlock("div",EA,[t.createTextVNode("Faltan "),t.createElementVNode("span",null,t.toDisplayString(i.timeLeft),1),t.createTextVNode(" para el inicio."),NA,t.createTextVNode("Las estadísticas corresponden a sus promedios por partido del torneo "),t.createElementVNode("span",null,t.toDisplayString(o.seasonSelected.name),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",$A,[t.createElementVNode("div",BA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.arrayDataForCharts,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"distribution__container__chart-type",key:p},[t.createElementVNode("div",xA,t.toDisplayString(c.name),1),VA,t.createElementVNode("div",AA,[(t.openBlock(),t.createBlock(r,{type:"radar",height:s.height,options:s.arrayChartOptions[p],series:s.arrayFilledSeries[p],key:s.chartKeyCounter+s.updateCategory+p},null,8,["height","options","series"]))])]))),128))])])],64)}const OA=Ie(SA,[["render",IA],["__scopeId","data-v-4aab14bc"]]),TA=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},Hd={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Regular"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(e){try{e==this.textOptionLeft&&(this.OptionDefault=!1),e==this.textOptionRight&&(this.OptionDefault=!0)}catch(a){throw new Error(a)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(e){e.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},C1=()=>{t.useCssVars(e=>({"1b04779e":e.widthCircle,c974bf22:e.heightCircle}))},k1=Hd.setup;Hd.setup=k1?(e,a)=>(C1(),k1(e,a)):C1;const zA={key:0,class:"text-left"},FA=["width","src"],RA=["checked"],PA=["width","src"],DA={key:3,class:"text-right"};function LA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:"gsc-switch-radio",style:t.normalizeStyle(i.customText)},[o.textOptionLeft!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",zA,t.toDisplayString(o.textOptionLeft),1)):t.createCommentVNode("",!0),o.iconA!=""?(t.openBlock(),t.createElementBlock("img",{key:1,width:o.widthIcons,src:o.iconA},null,8,FA)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:a[0]||(a[0]=(...r)=>i.handleSwitchChange&&i.handleSwitchChange(...r)),checked:s.OptionDefault},null,40,RA),t.createElementVNode("label",{for:"toggle-btn",style:t.normalizeStyle([i.customStyle,{"--circle-color":o.circleColorSwitch}])},null,4),o.iconB!=""?(t.openBlock(),t.createElementBlock("img",{key:2,width:o.widthIcons,src:o.iconB},null,8,PA)):t.createCommentVNode("",!0),o.textOptionRight!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",DA,t.toDisplayString(o.textOptionRight),1)):t.createCommentVNode("",!0)],4)}const jA=TA(Hd,[["render",LA],["__scopeId","data-v-e2a20444"]]),Vve="",Ave="",vA={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){this.visible=!1}}};function MA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["box-tooltip",i.showTooltip]),style:t.normalizeStyle(i.positionTooltip),onClick:a[0]||(a[0]=(...r)=>i.tooltipClick&&i.tooltipClick(...r))},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)}const S1=Ie(vA,[["render",MA],["__scopeId","data-v-04db4a6b"]]),Ive="",HA={name:"SoccerChalkboard",components:{Tooltip:S1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((n,s)=>[...n,s.categories],[]);return this.preparedPlays.filter(n=>this.findCategoryInPlay(e,n)).reduce((n,s)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,s));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:s.jersey_number,matchlapse:s.matchLapse,playerName:s.player_name,photo:s.photo,rivalLogo:s.rival_id,x1:i.invert.includes(s.categoryId)?100-s[`x${i.points[0]}`]:s[`x${i.points[0]}`],y1:i.invert.includes(s.categoryId)?100-s[`y${i.points[0]}`]:s[`y${i.points[0]}`],x2:i.invert.includes(s.categoryId)?100-s[`x${i.points[1]}`]:s[`x${i.points[1]}`],y2:i.invert.includes(s.categoryId)?100-s[`y${i.points[1]}`]:s[`y${i.points[1]}`],x3:i.invert.includes(s.categoryId)?100-s[`x${i.points[2]}`]:s[`x${i.points[2]}`],y3:i.invert.includes(s.categoryId)?100-s[`y${i.points[2]}`]:s[`y${i.points[2]}`],momentOfPlay:s.moment_of_play,isOwnGoal:i.invert.includes(s.categoryId),xGi:s.xGi,xGf:s.xGf};n.push(r)}return n},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.colloquial_name:this.visitingTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Tn=e=>(t.pushScopeId("data-v-48c18048"),e=e(),t.popScopeId(),e),UA={class:"soccer-chalkboard-xg"},GA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},WA={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},qA=Tn(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),JA=["id"],XA=["fill"],ZA=Tn(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),YA=["id"],KA=["x1","y1","x2","y2","stroke"],QA=["x1","y1","x2","y2","stroke","marker-end"],eI=["onMouseover"],tI=["x","y","fill"],aI=["x","y"],oI={class:"tooltip-data has-text-left"},nI={class:"bold"},sI={class:"tooltip-image"},iI={class:"tooltip-image"},rI=["src"],lI={class:"tooltip-xg"},cI={key:0},dI=Tn(()=>t.createElementVNode("span",null,"xGi:",-1)),mI=Tn(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),pI={key:1},hI=Tn(()=>t.createElementVNode("span",null,"xGf:",-1));function yI(e,a,o,n,s,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",UA,[(t.openBlock(),t.createElementBlock("svg",GA,[(t.openBlock(),t.createElementBlock("svg",WA,[t.createElementVNode("defs",null,[qA,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,XA)],8,JA))),128)),ZA]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,KA),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,QA),t.createElementVNode("g",{onMouseover:p=>i.onMouseOver(p,c),onMouseleave:a[0]||(a[0]=(...p)=>i.onMouseLeave&&i.onMouseLeave(...p)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,tI),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},t.toDisplayString(c.jersey),9,aI)],40,eI)],8,YA))),128))]))])),t.createVNode(r,{data:s.data},{default:t.withCtx(()=>[t.createElementVNode("div",oI,[t.createElementVNode("div",null,[t.createElementVNode("span",nI,t.toDisplayString(s.dataPlay.isOwnGoal?"Autogol":s.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(s.dataPlay.playerName)+" ",1),t.createElementVNode("div",sI,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+s.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(s.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "+t.toDisplayString(s.dataPlay.rivalName)+" ",1),t.createElementVNode("div",iI,[t.createElementVNode("img",{src:s.dataPlay.rivalLogo},null,8,rI)])]),t.createElementVNode("div",lI,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGi)&&s.dataPlay.xGi<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",cI,[dI,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),mI,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGf)&&s.dataPlay.xGf<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",pI,[hI,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const E1=Ie(HA,[["render",yI],["__scopeId","data-v-48c18048"]]),ji=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[12,55,35,54,510]}],Ove="",gI={name:"Xg",components:{SoccerChalkboard:E1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},N1=e=>(t.pushScopeId("data-v-1a1bc29b"),e=e(),t.popScopeId(),e),uI={class:"xg-container"},fI={class:"xg-container__info"},_I=N1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),bI={class:"table"},wI={class:"table__row"},CI={class:"table__row__title"},kI={class:"table__row__value"},SI=["src"],EI={class:"table__row"},NI={class:"table__row__title"},$I={class:"table__row__value"},BI={class:"table__row"},xI={class:"table__row__title"},VI={class:"table__row__value"},AI=N1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),II={class:"xg-container__field"};function OI(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",uI,[t.createElementVNode("div",fI,[_I,t.createElementVNode("div",bI,[t.createElementVNode("div",wI,[t.createElementVNode("div",CI,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",kI,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,SI)])]),t.createElementVNode("div",EI,[t.createElementVNode("div",NI,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",$I,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",BI,[t.createElementVNode("div",xI,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",VI,t.toDisplayString(i.gxInfoItems[2].value),1)])]),AI]),t.createElementVNode("div",II,[t.createVNode(r,{plays:e.playsLocal,categories:s.categories,team:e.team},null,8,["plays","categories","team"])])])}const TI=Ie(gI,[["render",OI],["__scopeId","data-v-1a1bc29b"]]),Tve="",zI={name:"Xg",components:{SoccerChalkboard:E1},props:{team:{type:String,default:"Visiting"}},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.visitingTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.setTeamSelected("Visiting"),this.fillXgPlays()}},$1=e=>(t.pushScopeId("data-v-84e1d3ec"),e=e(),t.popScopeId(),e),FI={class:"xg-container"},RI={class:"xg-container__info"},PI=$1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),DI={class:"table"},LI={class:"table__row"},jI={class:"table__row__title"},vI={class:"table__row__value"},MI=["src"],HI={class:"table__row"},UI={class:"table__row__title"},GI={class:"table__row__value"},WI={class:"table__row"},qI={class:"table__row__title"},JI={class:"table__row__value"},XI=$1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),ZI={class:"xg-container__field"};function YI(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",FI,[t.createElementVNode("div",RI,[PI,t.createElementVNode("div",DI,[t.createElementVNode("div",LI,[t.createElementVNode("div",jI,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",vI,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,MI)])]),t.createElementVNode("div",HI,[t.createElementVNode("div",UI,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",GI,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",WI,[t.createElementVNode("div",qI,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",JI,t.toDisplayString(i.gxInfoItems[2].value),1)])]),XI]),t.createElementVNode("div",ZI,[t.createVNode(r,{plays:e.playsAway,categories:s.categories,team:o.team},null,8,["plays","categories","team"])])])])}const KI=Ie(zI,[["render",YI],["__scopeId","data-v-84e1d3ec"]]),zve="",QI={name:"SoccerChalkboard",components:{Tooltip:S1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((n,s)=>[...n,s.categories],[]);return this.preparedPlays.filter(n=>this.findCategoryInPlay(e,n)).reduce((n,s)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,s));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:s.jersey_number,matchlapse:s.matchLapse,playerName:s.player_name,photo:s.photo,rivalLogo:s.rival_id,x1:i.invert.includes(s.categoryId)?100-s[`x${i.points[0]}`]:s[`x${i.points[0]}`],y1:i.invert.includes(s.categoryId)?100-s[`y${i.points[0]}`]:s[`y${i.points[0]}`],x2:i.invert.includes(s.categoryId)?100-s[`x${i.points[1]}`]:s[`x${i.points[1]}`],y2:i.invert.includes(s.categoryId)?100-s[`y${i.points[1]}`]:s[`y${i.points[1]}`],x3:i.invert.includes(s.categoryId)?100-s[`x${i.points[2]}`]:s[`x${i.points[2]}`],y3:i.invert.includes(s.categoryId)?100-s[`y${i.points[2]}`]:s[`y${i.points[2]}`],momentOfPlay:s.moment_of_play,isOwnGoal:i.invert.includes(s.categoryId),xGi:s.xGi,xGf:s.xGf};n.push(r)}return n},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){console.log(e.view.outerWidth),this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.team_name:this.visitingTeam.team_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.x=e.pageX<135?e.pageX-50:e.layerX-50,this.data.y=e.layerY+130,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},zn=e=>(t.pushScopeId("data-v-cf0f70fe"),e=e(),t.popScopeId(),e),eO={class:"soccer-chalkboard-xg"},tO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},aO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},oO=zn(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),nO=["id"],sO=["fill"],iO=zn(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),rO=["id"],lO=["x1","y1","x2","y2","stroke"],cO=["x1","y1","x2","y2","stroke","marker-end"],dO=["onMouseover"],mO=["x","y","fill"],pO=["x","y"],hO={class:"tooltip-data has-text-left"},yO={class:"bold"},gO={class:"tooltip-image"},uO={class:"tooltip-image"},fO=["src"],_O={class:"tooltip-xg"},bO={key:0},wO=zn(()=>t.createElementVNode("span",null,"xGi:",-1)),CO=zn(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),kO={key:1},SO=zn(()=>t.createElementVNode("span",null,"xGf:",-1));function EO(e,a,o,n,s,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",eO,[(t.openBlock(),t.createElementBlock("svg",tO,[(t.openBlock(),t.createElementBlock("svg",aO,[t.createElementVNode("defs",null,[oO,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,sO)],8,nO))),128)),iO]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,lO),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,cO),t.createElementVNode("g",{onMouseover:p=>i.onMouseOver(p,c),onMouseleave:a[0]||(a[0]=(...p)=>i.onMouseLeave&&i.onMouseLeave(...p)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#aaa",rx:"14",ry:"14"},null,8,mO),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",stroke:"white","font-family":"Poppins, sans-serif"},t.toDisplayString(c.jersey),9,pO)],40,dO)],8,rO))),128))]))])),t.createVNode(r,{data:s.data},{default:t.withCtx(()=>[t.createElementVNode("div",hO,[t.createElementVNode("div",null,[t.createElementVNode("span",yO,t.toDisplayString(s.dataPlay.isOwnGoal?"Autogol":s.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(s.dataPlay.playerName)+" ",1),t.createElementVNode("div",gO,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+s.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(s.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "+t.toDisplayString(s.dataPlay.rivalName)+" ",1),t.createElementVNode("div",uO,[t.createElementVNode("img",{src:s.dataPlay.rivalLogo},null,8,fO)])]),t.createElementVNode("div",_O,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGi)&&s.dataPlay.xGi<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",bO,[wO,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),CO,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGf)&&s.dataPlay.xGf<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",kO,[SO,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const B1=Ie(QI,[["render",EO],["__scopeId","data-v-cf0f70fe"]]),Fve="",NO={name:"Xg",components:{SoccerChalkboard:B1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},x1=e=>(t.pushScopeId("data-v-dcdd933a"),e=e(),t.popScopeId(),e),$O={class:"xg-container"},BO=x1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),xO={class:"xg-container__field"},VO={class:"xg-container__info"},AO={class:"table"},IO={class:"table__row"},OO={class:"table__row__title"},TO={class:"table__row__value"},zO=["src"],FO={class:"table__row"},RO={class:"table__row__title"},PO={class:"table__row__value"},DO={class:"table__row"},LO={class:"table__row__title"},jO={class:"table__row__value"},vO=x1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function MO(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",$O,[BO,t.createElementVNode("div",xO,[t.createVNode(r,{plays:e.playsLocal,categories:s.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",VO,[t.createElementVNode("div",AO,[t.createElementVNode("div",IO,[t.createElementVNode("div",OO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",TO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,zO)])]),t.createElementVNode("div",FO,[t.createElementVNode("div",RO,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",PO,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",DO,[t.createElementVNode("div",LO,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",jO,t.toDisplayString(i.gxInfoItems[2].value),1)])]),vO])])}const HO=Ie(NO,[["render",MO],["__scopeId","data-v-dcdd933a"]]),Rve="",UO={name:"Xg",components:{SoccerChalkboard:B1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},V1=e=>(t.pushScopeId("data-v-13c75a53"),e=e(),t.popScopeId(),e),GO={class:"xg-container"},WO=V1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),qO={class:"xg-container__field"},JO={class:"xg-container__info"},XO={class:"table"},ZO={class:"table__row"},YO={class:"table__row__title"},KO={class:"table__row__value"},QO=["src"],eT={class:"table__row"},tT={class:"table__row__title"},aT={class:"table__row__value"},oT={class:"table__row"},nT={class:"table__row__title"},sT={class:"table__row__value"},iT=V1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function rT(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",GO,[WO,t.createElementVNode("div",qO,[t.createVNode(r,{plays:e.playsAway,categories:s.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",JO,[t.createElementVNode("div",XO,[t.createElementVNode("div",ZO,[t.createElementVNode("div",YO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",KO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,QO)])]),t.createElementVNode("div",eT,[t.createElementVNode("div",tT,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",aT,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",oT,[t.createElementVNode("div",nT,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",sT,t.toDisplayString(i.gxInfoItems[2].value),1)])]),iT])])}const lT=Ie(UO,[["render",rT],["__scopeId","data-v-13c75a53"]]),Pve="";let A1=null;const cT={name:"XgMain",components:{GSCSwitchRadio:jA,SoccerChalkboardLocal:TI,SoccerChalkboardAway:KI,SoccerChalkboardLocalMobile:HO,SoccerChalkboardAwayMobile:lT},props:{},data(){return{gamesContainerWidth:0,teamSelect:"local",teamDefault:""}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"])},watch:{},methods:{onChangeTeam(e){e instanceof Object||(this.teamSelect=e),this.teamDefault=e},setUpResizeObserver(){if(window.ResizeObserver)A1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),A1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){this.teamSelect=this.homeTeam.colloquial_name,this.teamLocal=this.homeTeam.colloquial_name,setTimeout(()=>{this.setUpResizeObserver()},100)},updated(){this.teamSelect!=this.homeTeam.colloquial_name&&this.teamSelect!=this.visitingTeam.colloquial_name&&(this.teamSelect=this.homeTeam.colloquial_name,this.onChangeTeam(this.teamSelect))}},dT={class:"xg",ref:"gamesContainer"},mT={key:0,class:"selector-team"};function pT(e,a,o,n,s,i){const r=t.resolveComponent("GSCSwitchRadio"),c=t.resolveComponent("SoccerChalkboardLocal"),p=t.resolveComponent("SoccerChalkboardAway"),d=t.resolveComponent("SoccerChalkboardLocalMobile"),l=t.resolveComponent("SoccerChalkboardAwayMobile");return t.openBlock(),t.createElementBlock("div",dT,[s.gamesContainerWidth<655?(t.openBlock(),t.createElementBlock("div",mT,[t.createVNode(r,{width:"42px",height:"20px",heightCircle:"16px",widthCircle:"16px","circle-color-switch":"#cbee6b",valueDefault:s.teamDefault,"text-option-left":e.homeTeam.colloquial_name,"text-option-right":e.visitingTeam.colloquial_name,"font-color":"white","hidden-labels":!1,"icon-a":e.homeTeam.logo,"icon-b":e.visitingTeam.logo,onChange:i.onChangeTeam},null,8,["valueDefault","text-option-left","text-option-right","icon-a","icon-b","onChange"])])):t.createCommentVNode("",!0),s.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(c,{key:1,class:"local"})):t.createCommentVNode("",!0),s.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(p,{key:2,class:"away"})):t.createCommentVNode("",!0),s.gamesContainerWidth<655&&s.teamSelect==e.homeTeam.colloquial_name?(t.openBlock(),t.createBlock(d,{key:3})):t.createCommentVNode("",!0),s.gamesContainerWidth<655&&s.teamSelect==e.visitingTeam.colloquial_name?(t.openBlock(),t.createBlock(l,{key:4})):t.createCommentVNode("",!0)],512)}const hT=Ie(cT,[["render",pT],["__scopeId","data-v-691846da"]]),Dve="",yT={class:"statistics-main"},gT={class:"statistics-main__header"},uT={class:"statistics-main__header__filter"},fT={class:"statistics-main__body"},_T=t.defineComponent({name:"TemplateVideos",components:{TrendLive:DB,Comparative:kA,Distribution:OA,GSCSlider:Md,XG:hT}}),bT=Ie(Object.assign(_T,{props:{game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,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"}})},subsection:{type:String,default:""},seasonSelected:{type:Object,default:()=>({})}},emits:["openmedia"],setup(e,{emit:a}){const o=e,n=gu(),s=t.ref({width:"fit-content",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",padding:"0 16px"}),i=t.ref({}),r=t.ref(null),c=t.ref([{id:"st1",name:"Comparativa",componentName:"Comparative"},{id:"st2",name:"Distribución",componentName:"Distribution"},{id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"},{id:"st4",name:"Goles esperados (xG)",componentName:"XG"}]);let p=t.ref({id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"});t.watch(()=>o.game,g=>{const y={...g};d(y)},{deep:!0,immediate:!0});async function d(g){try{i.value.gameId!==g.gameId&&(i.value=g,await n.dispatch("nextGeneral/cleanStats"),await n.dispatch("nextGeneral/checkState",{gameId:g.gameId,currentSeasonId:g.seasonId,isTeamsAnalysis:!0,defaultFilter:r.value,gameInfo:g}))}catch(y){throw new Error(y)}}function l(g){p.value=g}function m(){n.commit("nextGeneral/updateFilters",{filters:{local:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]},visit:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]}},needsFormat:!0})}function h(g){a("openmedia",g)}return t.onUnmounted(()=>{a("resetSubsection")}),t.onMounted(()=>{o.subsection==="Comparativa"&&(p.value.id="st1",p.value.name="Comparativa",p.value.componentName="Comparative")}),m(),(g,y)=>(t.openBlock(),t.createElementBlock("div",yT,[t.createElementVNode("div",gT,[t.createVNode(t.unref(Md),{backgroundColor:"none",arrows:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,u=>(t.openBlock(),t.createElementBlock("div",{key:u.id,class:"game-time-line__options__option"},[t.createVNode(mu,t.mergeProps(s.value,{text:u.name,"is-active":t.unref(p).id===u.id,onClick:f=>l(u)}),null,16,["text","is-active","onClick"])]))),128))]),_:1}),t.withDirectives(t.createElementVNode("div",uT,[t.createVNode(w$)],512),[[t.vShow,!1]])]),t.createElementVNode("div",fT,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(p).componentName),{seasonSelected:e.seasonSelected,game:e.game,onOpenmedia:h},null,40,["seasonSelected","game"]))])]))}}),[["__scopeId","data-v-40695659"]]);function I1(e,a){return function(){return e.apply(a,arguments)}}const{toString:wT}=Object.prototype,{getPrototypeOf:Ud}=Object,vi=(e=>a=>{const o=wT.call(a);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=e=>(e=e.toLowerCase(),a=>vi(a)===e),Mi=e=>a=>typeof a===e,{isArray:xo}=Array,Fn=Mi("undefined");function CT(e){return e!==null&&!Fn(e)&&e.constructor!==null&&!Fn(e.constructor)&&$t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const O1=Qt("ArrayBuffer");function kT(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&O1(e.buffer),a}const ST=Mi("string"),$t=Mi("function"),T1=Mi("number"),Hi=e=>e!==null&&typeof e=="object",ET=e=>e===!0||e===!1,Ui=e=>{if(vi(e)!=="object")return!1;const a=Ud(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},NT=Qt("Date"),$T=Qt("File"),BT=Qt("Blob"),xT=Qt("FileList"),VT=e=>Hi(e)&&$t(e.pipe),AT=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||$t(e.append)&&((a=vi(e))==="formdata"||a==="object"&&$t(e.toString)&&e.toString()==="[object FormData]"))},IT=Qt("URLSearchParams"),OT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rn(e,a,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),xo(e))for(n=0,s=e.length;n<s;n++)a.call(null,e[n],n,e);else{const i=o?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let c;for(n=0;n<r;n++)c=i[n],a.call(null,e[c],c,e)}}function z1(e,a){a=a.toLowerCase();const o=Object.keys(e);let n=o.length,s;for(;n-- >0;)if(s=o[n],a===s.toLowerCase())return s;return null}const F1=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),R1=e=>!Fn(e)&&e!==F1;function Gd(){const{caseless:e}=R1(this)&&this||{},a={},o=(n,s)=>{const i=e&&z1(a,s)||s;Ui(a[i])&&Ui(n)?a[i]=Gd(a[i],n):Ui(n)?a[i]=Gd({},n):xo(n)?a[i]=n.slice():a[i]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&Rn(arguments[n],o);return a}const TT=(e,a,o,{allOwnKeys:n}={})=>(Rn(a,(s,i)=>{o&&$t(s)?e[i]=I1(s,o):e[i]=s},{allOwnKeys:n}),e),zT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FT=(e,a,o,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),o&&Object.assign(e.prototype,o)},RT=(e,a,o,n)=>{let s,i,r;const c={};if(a=a||{},e==null)return a;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)r=s[i],(!n||n(r,e,a))&&!c[r]&&(a[r]=e[r],c[r]=!0);e=o!==!1&&Ud(e)}while(e&&(!o||o(e,a))&&e!==Object.prototype);return a},PT=(e,a,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=a.length;const n=e.indexOf(a,o);return n!==-1&&n===o},DT=e=>{if(!e)return null;if(xo(e))return e;let a=e.length;if(!T1(a))return null;const o=new Array(a);for(;a-- >0;)o[a]=e[a];return o},LT=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Ud(Uint8Array)),jT=(e,a)=>{const o=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=o.next())&&!n.done;){const s=n.value;a.call(e,s[0],s[1])}},vT=(e,a)=>{let o;const n=[];for(;(o=e.exec(a))!==null;)n.push(o);return n},MT=Qt("HTMLFormElement"),HT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,o,n){return o.toUpperCase()+n}),P1=(({hasOwnProperty:e})=>(a,o)=>e.call(a,o))(Object.prototype),UT=Qt("RegExp"),D1=(e,a)=>{const o=Object.getOwnPropertyDescriptors(e),n={};Rn(o,(s,i)=>{let r;(r=a(s,i,e))!==!1&&(n[i]=r||s)}),Object.defineProperties(e,n)},GT=e=>{D1(e,(a,o)=>{if($t(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if($t(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},WT=(e,a)=>{const o={},n=s=>{s.forEach(i=>{o[i]=!0})};return xo(e)?n(e):n(String(e).split(a)),o},qT=()=>{},JT=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Wd="abcdefghijklmnopqrstuvwxyz",L1="0123456789",j1={DIGIT:L1,ALPHA:Wd,ALPHA_DIGIT:Wd+Wd.toUpperCase()+L1},XT=(e=16,a=j1.ALPHA_DIGIT)=>{let o="";const{length:n}=a;for(;e--;)o+=a[Math.random()*n|0];return o};function ZT(e){return!!(e&&$t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const YT=e=>{const a=new Array(10),o=(n,s)=>{if(Hi(n)){if(a.indexOf(n)>=0)return;if(!("toJSON"in n)){a[s]=n;const i=xo(n)?[]:{};return Rn(n,(r,c)=>{const p=o(r,s+1);!Fn(p)&&(i[c]=p)}),a[s]=void 0,i}}return n};return o(e,0)},KT=Qt("AsyncFunction"),QT=e=>e&&(Hi(e)||$t(e))&&$t(e.then)&&$t(e.catch),j={isArray:xo,isArrayBuffer:O1,isBuffer:CT,isFormData:AT,isArrayBufferView:kT,isString:ST,isNumber:T1,isBoolean:ET,isObject:Hi,isPlainObject:Ui,isUndefined:Fn,isDate:NT,isFile:$T,isBlob:BT,isRegExp:UT,isFunction:$t,isStream:VT,isURLSearchParams:IT,isTypedArray:LT,isFileList:xT,forEach:Rn,merge:Gd,extend:TT,trim:OT,stripBOM:zT,inherits:FT,toFlatObject:RT,kindOf:vi,kindOfTest:Qt,endsWith:PT,toArray:DT,forEachEntry:jT,matchAll:vT,isHTMLForm:MT,hasOwnProperty:P1,hasOwnProp:P1,reduceDescriptors:D1,freezeMethods:GT,toObjectSet:WT,toCamelCase:HT,noop:qT,toFiniteNumber:JT,findKey:z1,global:F1,isContextDefined:R1,ALPHABET:j1,generateString:XT,isSpecCompliantForm:ZT,toJSONObject:YT,isAsyncFn:KT,isThenable:QT};function pe(e,a,o,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),o&&(this.config=o),n&&(this.request=n),s&&(this.response=s)}j.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const v1=pe.prototype,M1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{M1[e]={value:e}}),Object.defineProperties(pe,M1),Object.defineProperty(v1,"isAxiosError",{value:!0}),pe.from=(e,a,o,n,s,i)=>{const r=Object.create(v1);return j.toFlatObject(e,r,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),pe.call(r,e.message,a,o,n,s),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const ez=null;function qd(e){return j.isPlainObject(e)||j.isArray(e)}function H1(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function U1(e,a,o){return e?e.concat(a).map(function(n,s){return n=H1(n),!o&&s?"["+n+"]":n}).join(o?".":""):a}function tz(e){return j.isArray(e)&&!e.some(qd)}const az=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function Gi(e,a,o){if(!j.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,o=j.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!j.isUndefined(y[g])});const n=o.metaTokens,s=o.visitor||d,i=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(a);if(!j.isFunction(s))throw new TypeError("visitor must be a function");function p(g){if(g===null)return"";if(j.isDate(g))return g.toISOString();if(!c&&j.isBlob(g))throw new pe("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(g)||j.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,u){let f=g;if(g&&!u&&typeof g=="object"){if(j.endsWith(y,"{}"))y=n?y:y.slice(0,-2),g=JSON.stringify(g);else if(j.isArray(g)&&tz(g)||(j.isFileList(g)||j.endsWith(y,"[]"))&&(f=j.toArray(g)))return y=H1(y),f.forEach(function(b,E){!(j.isUndefined(b)||b===null)&&a.append(r===!0?U1([y],E,i):r===null?y:y+"[]",p(b))}),!1}return qd(g)?!0:(a.append(U1(u,y,i),p(g)),!1)}const l=[],m=Object.assign(az,{defaultVisitor:d,convertValue:p,isVisitable:qd});function h(g,y){if(!j.isUndefined(g)){if(l.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));l.push(g),j.forEach(g,function(u,f){(!(j.isUndefined(u)||u===null)&&s.call(a,u,j.isString(f)?f.trim():f,y,m))===!0&&h(u,y?y.concat(f):[f])}),l.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return h(e),a}function G1(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return a[o]})}function Jd(e,a){this._pairs=[],e&&Gi(e,this,a)}const W1=Jd.prototype;W1.append=function(e,a){this._pairs.push([e,a])},W1.toString=function(e){const a=e?function(o){return e.call(this,o,G1)}:G1;return this._pairs.map(function(o){return a(o[0])+"="+a(o[1])},"").join("&")};function oz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function q1(e,a,o){if(!a)return e;const n=o&&o.encode||oz,s=o&&o.serialize;let i;if(s?i=s(a,o):i=j.isURLSearchParams(a)?a.toString():new Jd(a,o).toString(n),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const J1=class{constructor(){this.handlers=[]}use(a,o,n){return this.handlers.push({fulfilled:a,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){j.forEach(this.handlers,function(o){o!==null&&a(o)})}},X1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nz=typeof URLSearchParams<"u"?URLSearchParams:Jd,sz=typeof FormData<"u"?FormData:null,iz=typeof Blob<"u"?Blob:null,rz={isBrowser:!0,classes:{URLSearchParams:nz,FormData:sz,Blob:iz},protocols:["http","https","file","blob","url","data"]},Z1=typeof window<"u"&&typeof document<"u",lz=(e=>Z1&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),cz=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),dz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Z1,hasStandardBrowserEnv:lz,hasStandardBrowserWebWorkerEnv:cz},Symbol.toStringTag,{value:"Module"})),ea={...dz,...rz};function mz(e,a){return Gi(e,new ea.classes.URLSearchParams,Object.assign({visitor:function(o,n,s,i){return ea.isNode&&j.isBuffer(o)?(this.append(n,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function pz(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function hz(e){const a={},o=Object.keys(e);let n;const s=o.length;let i;for(n=0;n<s;n++)i=o[n],a[i]=e[i];return a}function Y1(e){function a(o,n,s,i){let r=o[i++];if(r==="__proto__")return!0;const c=Number.isFinite(+r),p=i>=o.length;return r=!r&&j.isArray(s)?s.length:r,p?(j.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!c):((!s[r]||!j.isObject(s[r]))&&(s[r]=[]),a(o,n,s[r],i)&&j.isArray(s[r])&&(s[r]=hz(s[r])),!c)}if(j.isFormData(e)&&j.isFunction(e.entries)){const o={};return j.forEachEntry(e,(n,s)=>{a(pz(n),s,o,0)}),o}return null}function yz(e,a,o){if(j.isString(e))try{return(a||JSON.parse)(e),j.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const Xd={transitional:X1,adapter:["xhr","http"],transformRequest:[function(e,a){const o=a.getContentType()||"",n=o.indexOf("application/json")>-1,s=j.isObject(e);if(s&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return n&&n?JSON.stringify(Y1(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return mz(e,this.formSerializer).toString();if((i=j.isFileList(e))||o.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gi(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return s||n?(a.setContentType("application/json",!1),yz(e)):e}],transformResponse:[function(e){const a=this.transitional||Xd.transitional,o=a&&a.forcedJSONParsing,n=this.responseType==="json";if(e&&j.isString(e)&&(o&&!this.responseType||n)){const s=!(a&&a.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(i){if(s)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ea.classes.FormData,Blob:ea.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{Xd.headers[e]={}});const Zd=Xd,gz=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uz=e=>{const a={};let o,n,s;return e&&e.split(`
|
|
21
|
+
`):" "+r1(i[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:Fd};function Rd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new On(null,e)}function c1(e){return Rd(e),e.headers=Va.from(e.headers),e.data=zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),l1.getAdapter(e.adapter||Od.adapter)(e).then(function(n){return Rd(e),n.data=zd.call(e,e.transformResponse,n),n.headers=Va.from(n.headers),n},function(n){return n1(n)||(Rd(e),n&&n.response&&(n.response.data=zd.call(e,e.transformResponse,n.response),n.response.headers=Va.from(n.response.headers))),Promise.reject(n)})}const d1=e=>e instanceof Va?e.toJSON():e;function Bo(e,a){a=a||{};const o={};function n(d,l,m){return L.isPlainObject(d)&&L.isPlainObject(l)?L.merge.call({caseless:m},d,l):L.isPlainObject(l)?L.merge({},l):L.isArray(l)?l.slice():l}function s(d,l,m){if(L.isUndefined(l)){if(!L.isUndefined(d))return n(void 0,d,m)}else return n(d,l,m)}function i(d,l){if(!L.isUndefined(l))return n(void 0,l)}function r(d,l){if(L.isUndefined(l)){if(!L.isUndefined(d))return n(void 0,d)}else return n(void 0,l)}function c(d,l,m){if(m in a)return n(d,l);if(m in e)return n(void 0,d)}const p={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:c,headers:(d,l)=>s(d1(d),d1(l),!0)};return L.forEach(Object.keys(Object.assign({},e,a)),function(l){const m=p[l]||s,h=m(e[l],a[l],l);L.isUndefined(h)&&m!==c||(o[l]=h)}),o}const m1="1.6.5",Pd={};["object","boolean","number","function","string","symbol"].forEach((e,a)=>{Pd[e]=function(n){return typeof n===e||"a"+(a<1?"n ":" ")+e}});const p1={};Pd.transitional=function(a,o,n){function s(i,r){return"[Axios v"+m1+"] Transitional option '"+i+"'"+r+(n?". "+n:"")}return(i,r,c)=>{if(a===!1)throw new me(s(r," has been removed"+(o?" in "+o:"")),me.ERR_DEPRECATED);return o&&!p1[r]&&(p1[r]=!0,console.warn(s(r," has been deprecated since v"+o+" and will be removed in the near future"))),a?a(i,r,c):!0}};function cV(e,a,o){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],r=a[i];if(r){const c=e[i],p=c===void 0||r(c,i,e);if(p!==!0)throw new me("option "+i+" must be "+p,me.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}}const Dd={assertOptions:cV,validators:Pd},Ga=Dd.validators;class Pi{constructor(a){this.defaults=a,this.interceptors={request:new Qu,response:new Qu}}request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=Bo(this.defaults,o);const{transitional:n,paramsSerializer:s,headers:i}=o;n!==void 0&&Dd.assertOptions(n,{silentJSONParsing:Ga.transitional(Ga.boolean),forcedJSONParsing:Ga.transitional(Ga.boolean),clarifyTimeoutError:Ga.transitional(Ga.boolean)},!1),s!=null&&(L.isFunction(s)?o.paramsSerializer={serialize:s}:Dd.assertOptions(s,{encode:Ga.function,serialize:Ga.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&L.merge(i.common,i[o.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),o.headers=Va.concat(r,i);const c=[];let p=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(p=p&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,m=0,h;if(!p){const y=[c1.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,d),h=y.length,l=Promise.resolve(o);m<h;)l=l.then(y[m++],y[m++]);return l}h=c.length;let g=o;for(m=0;m<h;){const y=c[m++],u=c[m++];try{g=y(g)}catch(f){u.call(this,f);break}}try{l=c1.call(this,g)}catch(y){return Promise.reject(y)}for(m=0,h=d.length;m<h;)l=l.then(d[m++],d[m++]);return l}getUri(a){a=Bo(this.defaults,a);const o=s1(a.baseURL,a.url);return Ku(o,a.params,a.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(a){Pi.prototype[a]=function(o,n){return this.request(Bo(n||{},{method:a,url:o,data:(n||{}).data}))}}),L.forEach(["post","put","patch"],function(a){function o(n){return function(i,r,c){return this.request(Bo(c||{},{method:a,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Pi.prototype[a]=o(),Pi.prototype[a+"Form"]=o(!0)});const Di=Pi;class Ld{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const r=new Promise(c=>{n.subscribe(c),i=c}).then(s);return r.cancel=function(){n.unsubscribe(i)},r},a(function(i,r,c){n.reason||(n.reason=new On(i,r,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}static source(){let a;return{token:new Ld(function(s){a=s}),cancel:a}}}const dV=Ld;function mV(e){return function(o){return e.apply(null,o)}}function pV(e){return L.isObject(e)&&e.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jd).forEach(([e,a])=>{jd[a]=e});const hV=jd;function h1(e){const a=new Di(e),o=Ru(Di.prototype.request,a);return L.extend(o,Di.prototype,a,{allOwnKeys:!0}),L.extend(o,a,null,{allOwnKeys:!0}),o.create=function(s){return h1(Bo(e,s))},o}const Me=h1(Od);Me.Axios=Di,Me.CanceledError=On,Me.CancelToken=dV,Me.isCancel=n1,Me.VERSION=m1,Me.toFormData=zi,Me.AxiosError=me,Me.Cancel=Me.CanceledError,Me.all=function(a){return Promise.all(a)},Me.spread=mV,Me.isAxiosError=pV,Me.mergeConfig=Bo,Me.AxiosHeaders=Va,Me.formToJSON=e=>a1(L.isHTMLForm(e)?new FormData(e):e),Me.getAdapter=l1.getAdapter,Me.HttpStatusCode=hV,Me.default=Me;const Li=Me,y1="/icn-play.svg",kve="",yV={components:{BarraLeft:XB,BarraRight:ox},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},methods:{onclickPlayVideos(e){var a=[];e.type==2?e.position_id==1?e.category==0?a=[55,324,323,608,39,774,802,52,53,40,54]:a=e.category:e.category==0?a=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:a=e.category:e.type==3?e.category==0?a=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:a=e.category:e.category!=0?a=e.category:a=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let n={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:a,gameIds:e.game_id?[e.game_id]:null,playerIds:e.position_id!=1?e.player_id?[e.player_id]:[]:[],goalkeeperIds:e.position_id==1?e.player_id?[e.player_id]:[]:[],teamId:e.team_id?e.team_id:0,matchResult:e.matchResult?[e.matchResult]:o,playData:{},advancedFilter:{playListTitle:""}};e.category!==0&&(n.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",n)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},getTeamValue(e,a,o){if(!a.game_id)return this.objectZeroValues;const n=e.generalCategoriesIds.accomplished===3;if(a.is_live&&this.showLiveData){const s=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return s?{numberValue:n?e[o].accomplished.totalLive/s*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/s}:this.objectZeroValues}else if(a.is_live||a.game_status===1){const s=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return s?{numberValue:n?e[o].accomplished.totalPostGame/s*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/s}:this.objectZeroValues}if(n){const s=e[o].accomplished.avgPreGame;return e[o].accomplished.avgPostGame?{numberValue:s<1?s*100:s,numberBarPercent:e[o].accomplished.avgPreGame}:this.objectZeroValues}else return e[o].accomplished.leader.points?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/e[o].accomplished.leader.points}:this.objectZeroValues},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await Li.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["homeTeam","visitingTeam"])},async mounted(){}},g1=e=>(t.pushScopeId("data-v-4e0c1385"),e=e(),t.popScopeId(),e),gV={class:"card"},uV={class:"card__header"},fV={class:"card__stats"},_V=["onClick"],bV=[g1(()=>t.createElementVNode("img",{src:y1},null,-1))],wV={key:1,class:"card__stats__stat__button_empty"},CV={class:"card__stats__title"},kV={class:"card__stats__scores"},SV={key:0},EV={key:1},NV={key:2},$V={key:3},BV={class:"card__stats__bars"},xV=["onClick"],VV=[g1(()=>t.createElementVNode("img",{src:y1},null,-1))],AV={key:1,class:"card__stats__stat__button_empty"};function IV(e,a,o,n,s,i){const r=t.resolveComponent("BarraLeft"),c=t.resolveComponent("BarraRight");return t.openBlock(),t.createElementBlock("div",gV,[t.createElementVNode("span",uV,t.toDisplayString(o.data.name),1),t.createElementVNode("div",fV,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.data.subcategories,(p,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"card__stats__stat"},[t.createElementVNode("div",null,[i.hVal(p)&&i.hVal(p).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:p.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},bV,8,_V)):(t.openBlock(),t.createElementBlock("div",wV))]),t.createElementVNode("div",null,[t.createElementVNode("div",CV,t.toDisplayString(p.name)+t.toDisplayString(),1),t.createElementVNode("div",kV,[i.hVal(p)?(t.openBlock(),t.createElementBlock("span",SV,[t.createTextVNode(t.toDisplayString(i.hVal(p).numberValue|e.toFixed2),1),p.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",EV,"0")),i.aVal(p)?(t.openBlock(),t.createElementBlock("span",NV,[t.createTextVNode(t.toDisplayString(i.aVal(p).numberValue|e.toFixed2),1),p.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",$V,"0"))]),t.createElementVNode("div",BV,[t.createElementVNode("div",null,[i.hVal(p)?(t.openBlock(),t.createBlock(r,{key:0,postmatch:i.hVal(p).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(r,{key:1,postmatch:0}))]),t.createElementVNode("div",null,[i.aVal(p)?(t.openBlock(),t.createBlock(c,{key:0,postmatch:i.aVal(p).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(c,{key:1,postmatch:0}))])])]),t.createElementVNode("div",null,[i.aVal(p)&&i.aVal(p).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:p.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},VV,8,xV)):(t.openBlock(),t.createElementBlock("div",AV))])]))),128))])])}const OV=Ie(yV,[["render",IV],["__scopeId","data-v-4e0c1385"]]),Nve="",TV={name:"GscComparative",props:{local:{type:Object,default:()=>{}},away:{type:Object,default:()=>{}},fontFamily:{type:String,default:"inherit"}},data(){return{}},computed:{customStyle(){const e={};return this.fontFamily&&(e["font-family"]=`${this.fontFamily}`),e}},methods:{}},Aa=e=>(t.pushScopeId("data-v-58147cac"),e=e(),t.popScopeId(),e),zV={class:"comparative-card"},FV=Aa(()=>t.createElementVNode("div",{class:"header-title"},[t.createElementVNode("span",null,"Comparativa h")],-1)),RV={class:"versus"},PV={class:"team-badge"},DV=["src","alt"],LV=Aa(()=>t.createElementVNode("div",null,[t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")]),t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")])],-1)),jV=Aa(()=>t.createElementVNode("span",{class:"vs-text"},"VS",-1)),vV={class:"team-badge"},MV=["src","alt"],HV={class:"details"},UV=Aa(()=>t.createElementVNode("td",null,"Posición en la tabla",-1)),GV=Aa(()=>t.createElementVNode("td",null,"Puntos",-1)),WV=Aa(()=>t.createElementVNode("td",null,"Partidos jugados",-1)),qV=Aa(()=>t.createElementVNode("td",null,"Partidos ganados",-1)),JV=Aa(()=>t.createElementVNode("td",null,"Partidos perdidos",-1)),XV=Aa(()=>t.createElementVNode("td",null,"Partidos empatados",-1));function ZV(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:"comparative-main",style:t.normalizeStyle(i.customStyle)},[t.createElementVNode("div",zV,[FV,t.createElementVNode("div",RV,[t.createElementVNode("div",PV,[t.createElementVNode("img",{class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,DV),LV]),jV,t.createElementVNode("div",vV,[t.createElementVNode("img",{class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,MV)])]),t.createElementVNode("div",HV,[t.createElementVNode("table",null,[t.createElementVNode("tbody",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.table_position),1),UV,t.createElementVNode("td",null,t.toDisplayString(o.away.table_position),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.points),1),GV,t.createElementVNode("td",null,t.toDisplayString(o.away.points),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_played),1),WV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_played),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_won),1),qV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_won),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_lost),1),JV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_lost),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_tied),1),XV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_tied),1)])])])])])],4)}const YV=Ie(TV,[["render",ZV],["__scopeId","data-v-58147cac"]]),$ve="",KV=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},vd={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)}}},u1=()=>{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}))},f1=vd.setup;vd.setup=f1?(e,a)=>(u1(),f1(e,a)):u1;const QV={ref:"gscScrollableContainer",class:"scrollable-container"},eA={class:"scrollable-arrows"},tA=["width","height","viewBox"],aA=["stroke"],oA={class:"scrollable-wrapper"},nA={class:"scrollable-arrows"},sA=["width","height","viewBox"],iA=["stroke"];function rA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",QV,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",eA,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,aA)],8,tA))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",oA,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",nA,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,iA)],8,sA))])],2)):t.createCommentVNode("",!0)],512)}const Md=KV(vd,[["render",rA],["__scopeId","data-v-b548a08d"]]),Bve="";let _1=null;const lA={name:"App",components:{GscLinearTeamStats:OV,TableComparative:YV,GSCSlider:Md},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["arrayFilledDataSortedByPriority"])},watch:{gameForAnalysis:{handler:function(){this.getTableList()},immediate:!0}},data(){return{gamesContainerWidth:0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",gameId:79623,movil:!1,home:{},away:{}}},methods:{openmedia(e){this.$emit("openmedia",e)},setUpResizeObserver(){if(window.ResizeObserver)_1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),_1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const a=await Li.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonId),o=a.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.home_team),n=a.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.visiting_team);this.home=a.data.data[o],this.away=a.data.data[n]}catch{}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},cA={class:"container",ref:"gamesContainer"},dA={key:0,class:"grid-container"},mA={class:"item"},pA={class:"item"},hA={class:"item"},yA={class:"item"},gA={class:"item"},uA={class:"item"},fA={class:"item"},_A={class:"grid-container"},bA={class:"item-comparative"},wA={class:"table-movil-container"};function CA(e,a,o,n,s,i){const r=t.resolveComponent("TableComparative"),c=t.resolveComponent("GscLinearTeamStats"),p=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",cA,[s.movil?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",_A,[t.createElementVNode("div",bA,[t.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Regular"},null,8,["local","away"])])]),t.createVNode(p,{backgroundColor:"none",pxScroll:300,scrollColor:"none",arrowsPosition:"relative",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[t.createElementVNode("div",wA,[t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510&&s.gamesContainerWidth>450?"width: 400px":s.gamesContainerWidth<=450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(t.openBlock(),t.createElementBlock("div",dA,[t.createElementVNode("div",mA,[t.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Regular"},null,8,["local","away"])]),t.createElementVNode("div",pA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",hA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",yA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",gA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",uA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",fA,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const kA=Ie(lA,[["render",CA]]),xve="",b1=["#cbee6b","#0033C5"],SA={name:"distributionchart",components:{},props:{seasonSelected:{type:Object,default:()=>({})}},data(){return{arrayChartTypes:["General","Ofensivo","Defensivo","Posesión","Balón parado","Infracciones"],height:409,updateCategory:0,homeTeamSelectedPlaysType:0,visitingTeamSelectedPlaysType:0,chartKeyCounter:0,homeTeamPlaysTypes:{history:0,live:1},visitingTeamPlaysTypes:{history:0,live:1},tooltip:{show:!1,data:{},names:{},keyName:"",leagueAvg:"",showLiveData:!1,local:!1,x:0,y:0},globals:{x:0,y:0},arrayDataForCharts:[],arrayChartOptions:[],arrayFilledSeries:[]}},watch:{menuOptionActive(){this.idAssetSelected==3},idAssetSelected(){this.idAssetSelected===3&&this.chartKeyCounter++},isMobile(e){this.chartOptions.legend.horizontalAlign=e?"center":"left",this.chartKeyCounter++},arrayFilledDataSortedByPriority:{immediate:!0,deep:!0,handler(){this.fillData()}},showLiveData(){this.fillData()}},computed:{...kt("nextGeneral",["showLiveData","gameForAnalysis"]),...Te("nextGeneral",["idAssetSelected","menuOptionActive","homeTeamStatisticsType","showPostMatchData","visitingTeamStatisticsType","homeTeam","visitingTeam","subcategoryName","accomplished","arrayFilledDataSortedByPriority","filledDataStructure","showPostMatchData"]),isMobile(){return this.$mq==="mobile"},timeLeft(){const e=new Date().getTime(),o=new Date(this.gameForAnalysis.date_time_utc).getTime()-e,n=Math.floor(o/(1e3*60*60*24)),s=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),i=Math.floor(o%(1e3*60*60)/(1e3*60)),r=Math.floor(o%(1e3*60)/1e3);let c="";return r>0&&(c=r==1?r+" segundo":r+" segundos"),i>0&&(c=i==1?i+" minuto":i+" minutos"),s>0&&(c=s==1?s+" hora":s+" horas"),n>0&&(c=n==1?n+" día":n+" días"),c}},methods:{avg(e,a){return a?e.leagueAccomplishedAvg:e.leagueReceivedAvg},fillData(){this.arrayChartOptions=[],this.arrayFilledDataSortedByPriority&&this.arrayFilledDataSortedByPriority.length&&typeof this.arrayFilledDataSortedByPriority[0].subcategories=="object"?(this.arrayChartOptions=[],this.arrayFilledSeries=[],this.arrayDataForCharts=this.arrayFilledDataSortedByPriority.map(e=>{const a=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,a)),this.arrayChartOptions.push(a),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:b1,fill:{colors:b1,opacity:.4},legend:{show:!0,position:"bottom",horizontalAlign:"left",fontSize:"11px",fontFamily:"Poppins-Regular",labels:{colors:"#d9d9d9",useSeriesColors:!1}},xaxis:{categories:[],labels:{show:!0,style:{fontSize:"11px",fontFamily:"Poppins-Regular"}}},yaxis:{show:!1},responsive:[{breakpoint:770,options:{chart:{height:300},plotOptions:{radar:{size:100,offsetY:10,polygons:{strokeColors:"#606971"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"11px"}}}}},{breakpoint:450,options:{plotOptions:{radar:{size:70,offsetY:-20,polygons:{strokeColors:"#dcdcdc"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"10px"}}}}}],tooltip:{intersect:!0,shared:!1,custom:({w:e,dataPointIndex:a,seriesIndex:o})=>(this.showModal(e,a,o),null)}}},getChartSeries(e,a){let o,n;return this.showPostMatchData?(o={name:`${this.homeTeam.acronym}`,data:[]},n={name:`${this.visitingTeam.acronym}`,data:[]},a.arraySubcategories=[],Object.values(e).forEach((s,i)=>{a.xaxis.categories.push(this.prepareLabels(s,i)),a.arraySubcategories.push(s);const r=s.homeTeam[this.homeTeamStatisticsType].totalPostGame+s.visitingTeam[this.visitingTeamStatisticsType].totalPostGame;o.data.push(Math.round(120*(r?s.homeTeam[this.homeTeamStatisticsType].totalPostGame/r:0))),n.data.push(Math.round(120*(r?s.visitingTeam[this.visitingTeamStatisticsType].totalPostGame/r:0)))})):(o={name:`${this.showLiveData?"Live":"Histórico"} ${this.homeTeam.acronym}`,data:[]},n={name:`${this.showLiveData?"Live":"Histórico"} ${this.visitingTeam.acronym}`,data:[]},a.arraySubcategories=[],Object.values(e).forEach((s,i)=>{a.xaxis.categories.push(this.prepareLabels(s,i)),a.arraySubcategories.push(s);let r,c;const p=s.homeTeam[this.homeTeamStatisticsType].leader.points,d=s.visitingTeam[this.visitingTeamStatisticsType].leader.points;if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&s.generalCategoriesIds.accomplished===3?r=s.homeTeam.accomplished.avgPreGame:r=p?s.homeTeam[this.homeTeamStatisticsType].avgPostGame/p:0;else{const l=s.homeTeam[this.homeTeamStatisticsType].totalLive+s.visitingTeam[this.visitingTeamStatisticsType].totalLive;r=l?s.homeTeam[this.homeTeamStatisticsType].totalLive/l:0}if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&s.generalCategoriesIds.accomplished===3?c=s.visitingTeam.accomplished.avgPreGame:c=d?s.visitingTeam[this.visitingTeamStatisticsType].avgPostGame/d:0;else{const l=s.homeTeam[this.homeTeamStatisticsType].totalLive+s.visitingTeam[this.visitingTeamStatisticsType].totalLive;c=l?s.visitingTeam[this.visitingTeamStatisticsType].totalLive/l:0}o.data.push(Math.round(120*r)),n.data.push(Math.round(120*c))})),[o,n]},onHomeTeamPlaysTypeChanged(e){this.homeTeamSelectedPlaysType=e},onVisitingTeamPlaysTypeChanged(e){this.visitingTeamSelectedPlaysType=e},getSubcategoryData(e,a="homeTeam"){return e.id==="3-0"&&(e[a].accomplished.totalLiveBothTeams=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive),e[a].accomplished||0},showModal(e,a,o){const n=o===0?"homeTeam":"visitingTeam",s=e.config.arraySubcategories[a]||{};this.tooltip.isLeagueAvgVisible=s.id!=="3-0",this.tooltip.data=this.getSubcategoryData(s,n),this.tooltip.local=o===0,this.tooltip.names=s.names,this.tooltip.keyName=this.subcategoryName,this.tooltip.leagueAvg=this.leagueAvg(s);const i=e.globals.clientX||0,r=e.globals.clientY||0;this.globals.x=i,this.globals.y=r,this.tooltip.x=i,this.tooltip.y=r>700?r-250:r;const c=s.generalCategoriesIds.accomplished===3;if(c){const p=s.homeTeam.accomplished.avgPostGame+s.visitingTeam.accomplished.avgPostGame;this.tooltip.numberValue=p?s[n].accomplished.avgPostGame/p*100:0}else this.tooltip.numberValue=null;this.tooltip.booleanIsPercent=c,this.tooltip.show=!0},updateTooltip(e){const o=Math.abs(e.clientX-this.globals.x),n=Math.abs(e.clientY-this.globals.y);(o>5||n>5)&&(this.tooltip.show=!1)},prepareLabels(e,a){let o=e.name||e.names[this.subcategoryName]||e.names["0-0"];if(a===0)return o;const n=13;if(o.length>n){let s=o.split(" ");o=[];let i="",r="",c=s.slice(-1)[0];s.forEach(p=>{i+=` ${p} `,i.length>n&&(o.push(r.trim()),i=p),r=i,c===p&&o.push(r.trim())})}return o},leagueAvg(e){return e.generalCategoriesIds.accomplished===3?(e.homeTeam.accomplished.arrayRankings.reduce((a,o)=>a+o.points,0)/e.homeTeam.accomplished.arrayRankings.length*100).toFixed(2):this.avg(e,this.accomplished)}}},w1=e=>(t.pushScopeId("data-v-4aab14bc"),e=e(),t.popScopeId(),e),EA={key:0,class:"distribution-leyend"},NA=w1(()=>t.createElementVNode("br",null,null,-1)),$A={class:"distribution"},BA={class:"distribution__container"},xA={class:"distribution__container__chart-type__title"},VA=w1(()=>t.createElementVNode("div",{class:"distribution__container__chart-type__controls"},null,-1)),AA={class:"distribution__container__chart-type__chart"};function IA(e,a,o,n,s,i){const r=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.gameForAnalysis.game_status==4?(t.openBlock(),t.createElementBlock("div",EA,[t.createTextVNode("Faltan "),t.createElementVNode("span",null,t.toDisplayString(i.timeLeft),1),t.createTextVNode(" para el inicio."),NA,t.createTextVNode("Las estadísticas corresponden a sus promedios por partido del torneo "),t.createElementVNode("span",null,t.toDisplayString(o.seasonSelected.name),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",$A,[t.createElementVNode("div",BA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.arrayDataForCharts,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"distribution__container__chart-type",key:p},[t.createElementVNode("div",xA,t.toDisplayString(c.name),1),VA,t.createElementVNode("div",AA,[(t.openBlock(),t.createBlock(r,{type:"radar",height:s.height,options:s.arrayChartOptions[p],series:s.arrayFilledSeries[p],key:s.chartKeyCounter+s.updateCategory+p},null,8,["height","options","series"]))])]))),128))])])],64)}const OA=Ie(SA,[["render",IA],["__scopeId","data-v-4aab14bc"]]),TA=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},Hd={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Regular"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(e){try{e==this.textOptionLeft&&(this.OptionDefault=!1),e==this.textOptionRight&&(this.OptionDefault=!0)}catch(a){throw new Error(a)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(e){e.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},C1=()=>{t.useCssVars(e=>({"1b04779e":e.widthCircle,c974bf22:e.heightCircle}))},k1=Hd.setup;Hd.setup=k1?(e,a)=>(C1(),k1(e,a)):C1;const zA={key:0,class:"text-left"},FA=["width","src"],RA=["checked"],PA=["width","src"],DA={key:3,class:"text-right"};function LA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:"gsc-switch-radio",style:t.normalizeStyle(i.customText)},[o.textOptionLeft!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",zA,t.toDisplayString(o.textOptionLeft),1)):t.createCommentVNode("",!0),o.iconA!=""?(t.openBlock(),t.createElementBlock("img",{key:1,width:o.widthIcons,src:o.iconA},null,8,FA)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:a[0]||(a[0]=(...r)=>i.handleSwitchChange&&i.handleSwitchChange(...r)),checked:s.OptionDefault},null,40,RA),t.createElementVNode("label",{for:"toggle-btn",style:t.normalizeStyle([i.customStyle,{"--circle-color":o.circleColorSwitch}])},null,4),o.iconB!=""?(t.openBlock(),t.createElementBlock("img",{key:2,width:o.widthIcons,src:o.iconB},null,8,PA)):t.createCommentVNode("",!0),o.textOptionRight!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",DA,t.toDisplayString(o.textOptionRight),1)):t.createCommentVNode("",!0)],4)}const jA=TA(Hd,[["render",LA],["__scopeId","data-v-e2a20444"]]),Vve="",Ave="",vA={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){this.visible=!1}}};function MA(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["box-tooltip",i.showTooltip]),style:t.normalizeStyle(i.positionTooltip),onClick:a[0]||(a[0]=(...r)=>i.tooltipClick&&i.tooltipClick(...r))},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)}const S1=Ie(vA,[["render",MA],["__scopeId","data-v-04db4a6b"]]),Ive="",HA={name:"SoccerChalkboard",components:{Tooltip:S1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((n,s)=>[...n,s.categories],[]);return this.preparedPlays.filter(n=>this.findCategoryInPlay(e,n)).reduce((n,s)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,s));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:s.jersey_number,matchlapse:s.matchLapse,playerName:s.player_name,photo:s.photo,rivalLogo:s.rival_id,x1:i.invert.includes(s.categoryId)?100-s[`x${i.points[0]}`]:s[`x${i.points[0]}`],y1:i.invert.includes(s.categoryId)?100-s[`y${i.points[0]}`]:s[`y${i.points[0]}`],x2:i.invert.includes(s.categoryId)?100-s[`x${i.points[1]}`]:s[`x${i.points[1]}`],y2:i.invert.includes(s.categoryId)?100-s[`y${i.points[1]}`]:s[`y${i.points[1]}`],x3:i.invert.includes(s.categoryId)?100-s[`x${i.points[2]}`]:s[`x${i.points[2]}`],y3:i.invert.includes(s.categoryId)?100-s[`y${i.points[2]}`]:s[`y${i.points[2]}`],momentOfPlay:s.moment_of_play,isOwnGoal:i.invert.includes(s.categoryId),xGi:s.xGi,xGf:s.xGf};n.push(r)}return n},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.colloquial_name:this.visitingTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Tn=e=>(t.pushScopeId("data-v-48c18048"),e=e(),t.popScopeId(),e),UA={class:"soccer-chalkboard-xg"},GA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},WA={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},qA=Tn(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),JA=["id"],XA=["fill"],ZA=Tn(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),YA=["id"],KA=["x1","y1","x2","y2","stroke"],QA=["x1","y1","x2","y2","stroke","marker-end"],eI=["onMouseover"],tI=["x","y","fill"],aI=["x","y"],oI={class:"tooltip-data has-text-left"},nI={class:"bold"},sI={class:"tooltip-image"},iI={class:"tooltip-image"},rI=["src"],lI={class:"tooltip-xg"},cI={key:0},dI=Tn(()=>t.createElementVNode("span",null,"xGi:",-1)),mI=Tn(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),pI={key:1},hI=Tn(()=>t.createElementVNode("span",null,"xGf:",-1));function yI(e,a,o,n,s,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",UA,[(t.openBlock(),t.createElementBlock("svg",GA,[(t.openBlock(),t.createElementBlock("svg",WA,[t.createElementVNode("defs",null,[qA,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,XA)],8,JA))),128)),ZA]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,KA),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,QA),t.createElementVNode("g",{onMouseover:p=>i.onMouseOver(p,c),onMouseleave:a[0]||(a[0]=(...p)=>i.onMouseLeave&&i.onMouseLeave(...p)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,tI),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},t.toDisplayString(c.jersey),9,aI)],40,eI)],8,YA))),128))]))])),t.createVNode(r,{data:s.data},{default:t.withCtx(()=>[t.createElementVNode("div",oI,[t.createElementVNode("div",null,[t.createElementVNode("span",nI,t.toDisplayString(s.dataPlay.isOwnGoal?"Autogol":s.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(s.dataPlay.playerName)+" ",1),t.createElementVNode("div",sI,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+s.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(s.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "+t.toDisplayString(s.dataPlay.rivalName)+" ",1),t.createElementVNode("div",iI,[t.createElementVNode("img",{src:s.dataPlay.rivalLogo},null,8,rI)])]),t.createElementVNode("div",lI,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGi)&&s.dataPlay.xGi<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",cI,[dI,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),mI,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGf)&&s.dataPlay.xGf<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",pI,[hI,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const E1=Ie(HA,[["render",yI],["__scopeId","data-v-48c18048"]]),ji=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[12,55,35,54,510]}],Ove="",gI={name:"Xg",components:{SoccerChalkboard:E1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},N1=e=>(t.pushScopeId("data-v-1a1bc29b"),e=e(),t.popScopeId(),e),uI={class:"xg-container"},fI={class:"xg-container__info"},_I=N1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),bI={class:"table"},wI={class:"table__row"},CI={class:"table__row__title"},kI={class:"table__row__value"},SI=["src"],EI={class:"table__row"},NI={class:"table__row__title"},$I={class:"table__row__value"},BI={class:"table__row"},xI={class:"table__row__title"},VI={class:"table__row__value"},AI=N1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),II={class:"xg-container__field"};function OI(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",uI,[t.createElementVNode("div",fI,[_I,t.createElementVNode("div",bI,[t.createElementVNode("div",wI,[t.createElementVNode("div",CI,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",kI,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,SI)])]),t.createElementVNode("div",EI,[t.createElementVNode("div",NI,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",$I,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",BI,[t.createElementVNode("div",xI,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",VI,t.toDisplayString(i.gxInfoItems[2].value),1)])]),AI]),t.createElementVNode("div",II,[t.createVNode(r,{plays:e.playsLocal,categories:s.categories,team:e.team},null,8,["plays","categories","team"])])])}const TI=Ie(gI,[["render",OI],["__scopeId","data-v-1a1bc29b"]]),Tve="",zI={name:"Xg",components:{SoccerChalkboard:E1},props:{team:{type:String,default:"Visiting"}},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.visitingTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.setTeamSelected("Visiting"),this.fillXgPlays()}},$1=e=>(t.pushScopeId("data-v-84e1d3ec"),e=e(),t.popScopeId(),e),FI={class:"xg-container"},RI={class:"xg-container__info"},PI=$1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),DI={class:"table"},LI={class:"table__row"},jI={class:"table__row__title"},vI={class:"table__row__value"},MI=["src"],HI={class:"table__row"},UI={class:"table__row__title"},GI={class:"table__row__value"},WI={class:"table__row"},qI={class:"table__row__title"},JI={class:"table__row__value"},XI=$1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),ZI={class:"xg-container__field"};function YI(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",FI,[t.createElementVNode("div",RI,[PI,t.createElementVNode("div",DI,[t.createElementVNode("div",LI,[t.createElementVNode("div",jI,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",vI,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,MI)])]),t.createElementVNode("div",HI,[t.createElementVNode("div",UI,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",GI,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",WI,[t.createElementVNode("div",qI,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",JI,t.toDisplayString(i.gxInfoItems[2].value),1)])]),XI]),t.createElementVNode("div",ZI,[t.createVNode(r,{plays:e.playsAway,categories:s.categories,team:o.team},null,8,["plays","categories","team"])])])])}const KI=Ie(zI,[["render",YI],["__scopeId","data-v-84e1d3ec"]]),zve="",QI={name:"SoccerChalkboard",components:{Tooltip:S1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((n,s)=>[...n,s.categories],[]);return this.preparedPlays.filter(n=>this.findCategoryInPlay(e,n)).reduce((n,s)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,s));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:s.jersey_number,matchlapse:s.matchLapse,playerName:s.player_name,photo:s.photo,rivalLogo:s.rival_id,x1:i.invert.includes(s.categoryId)?100-s[`x${i.points[0]}`]:s[`x${i.points[0]}`],y1:i.invert.includes(s.categoryId)?100-s[`y${i.points[0]}`]:s[`y${i.points[0]}`],x2:i.invert.includes(s.categoryId)?100-s[`x${i.points[1]}`]:s[`x${i.points[1]}`],y2:i.invert.includes(s.categoryId)?100-s[`y${i.points[1]}`]:s[`y${i.points[1]}`],x3:i.invert.includes(s.categoryId)?100-s[`x${i.points[2]}`]:s[`x${i.points[2]}`],y3:i.invert.includes(s.categoryId)?100-s[`y${i.points[2]}`]:s[`y${i.points[2]}`],momentOfPlay:s.moment_of_play,isOwnGoal:i.invert.includes(s.categoryId),xGi:s.xGi,xGf:s.xGf};n.push(r)}return n},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.team_name:this.visitingTeam.team_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.x=e.pageX<135?e.pageX-50:e.layerX-50,this.data.y=e.layerY+130,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},zn=e=>(t.pushScopeId("data-v-cd81820a"),e=e(),t.popScopeId(),e),eO={class:"soccer-chalkboard-xg"},tO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},aO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},oO=zn(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),nO=["id"],sO=["fill"],iO=zn(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),rO=["id"],lO=["x1","y1","x2","y2","stroke"],cO=["x1","y1","x2","y2","stroke","marker-end"],dO=["onMouseover"],mO=["x","y","fill"],pO=["x","y"],hO={class:"tooltip-data has-text-left"},yO={class:"bold"},gO={class:"tooltip-image"},uO={class:"tooltip-image"},fO=["src"],_O={class:"tooltip-xg"},bO={key:0},wO=zn(()=>t.createElementVNode("span",null,"xGi:",-1)),CO=zn(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),kO={key:1},SO=zn(()=>t.createElementVNode("span",null,"xGf:",-1));function EO(e,a,o,n,s,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",eO,[(t.openBlock(),t.createElementBlock("svg",tO,[(t.openBlock(),t.createElementBlock("svg",aO,[t.createElementVNode("defs",null,[oO,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,sO)],8,nO))),128)),iO]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,lO),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,cO),t.createElementVNode("g",{onMouseover:p=>i.onMouseOver(p,c),onMouseleave:a[0]||(a[0]=(...p)=>i.onMouseLeave&&i.onMouseLeave(...p)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#aaa",rx:"14",ry:"14"},null,8,mO),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",stroke:"white","font-family":"Poppins, sans-serif"},t.toDisplayString(c.jersey),9,pO)],40,dO)],8,rO))),128))]))])),t.createVNode(r,{data:s.data},{default:t.withCtx(()=>[t.createElementVNode("div",hO,[t.createElementVNode("div",null,[t.createElementVNode("span",yO,t.toDisplayString(s.dataPlay.isOwnGoal?"Autogol":s.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(s.dataPlay.playerName)+" ",1),t.createElementVNode("div",gO,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+s.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(s.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "+t.toDisplayString(s.dataPlay.rivalName)+" ",1),t.createElementVNode("div",uO,[t.createElementVNode("img",{src:s.dataPlay.rivalLogo},null,8,fO)])]),t.createElementVNode("div",_O,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGi)&&s.dataPlay.xGi<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",bO,[wO,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),CO,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(s.dataPlay.xGf)&&s.dataPlay.xGf<=1&&!s.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",kO,[SO,t.createTextVNode(" "+t.toDisplayString(Number(s.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const B1=Ie(QI,[["render",EO],["__scopeId","data-v-cd81820a"]]),Fve="",NO={name:"Xg",components:{SoccerChalkboard:B1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},x1=e=>(t.pushScopeId("data-v-dcdd933a"),e=e(),t.popScopeId(),e),$O={class:"xg-container"},BO=x1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),xO={class:"xg-container__field"},VO={class:"xg-container__info"},AO={class:"table"},IO={class:"table__row"},OO={class:"table__row__title"},TO={class:"table__row__value"},zO=["src"],FO={class:"table__row"},RO={class:"table__row__title"},PO={class:"table__row__value"},DO={class:"table__row"},LO={class:"table__row__title"},jO={class:"table__row__value"},vO=x1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function MO(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",$O,[BO,t.createElementVNode("div",xO,[t.createVNode(r,{plays:e.playsLocal,categories:s.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",VO,[t.createElementVNode("div",AO,[t.createElementVNode("div",IO,[t.createElementVNode("div",OO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",TO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,zO)])]),t.createElementVNode("div",FO,[t.createElementVNode("div",RO,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",PO,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",DO,[t.createElementVNode("div",LO,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",jO,t.toDisplayString(i.gxInfoItems[2].value),1)])]),vO])])}const HO=Ie(NO,[["render",MO],["__scopeId","data-v-dcdd933a"]]),Rve="",UO={name:"Xg",components:{SoccerChalkboard:B1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},V1=e=>(t.pushScopeId("data-v-13c75a53"),e=e(),t.popScopeId(),e),GO={class:"xg-container"},WO=V1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),qO={class:"xg-container__field"},JO={class:"xg-container__info"},XO={class:"table"},ZO={class:"table__row"},YO={class:"table__row__title"},KO={class:"table__row__value"},QO=["src"],eT={class:"table__row"},tT={class:"table__row__title"},aT={class:"table__row__value"},oT={class:"table__row"},nT={class:"table__row__title"},sT={class:"table__row__value"},iT=V1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function rT(e,a,o,n,s,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",GO,[WO,t.createElementVNode("div",qO,[t.createVNode(r,{plays:e.playsAway,categories:s.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",JO,[t.createElementVNode("div",XO,[t.createElementVNode("div",ZO,[t.createElementVNode("div",YO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",KO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,QO)])]),t.createElementVNode("div",eT,[t.createElementVNode("div",tT,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",aT,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",oT,[t.createElementVNode("div",nT,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",sT,t.toDisplayString(i.gxInfoItems[2].value),1)])]),iT])])}const lT=Ie(UO,[["render",rT],["__scopeId","data-v-13c75a53"]]),Pve="";let A1=null;const cT={name:"XgMain",components:{GSCSwitchRadio:jA,SoccerChalkboardLocal:TI,SoccerChalkboardAway:KI,SoccerChalkboardLocalMobile:HO,SoccerChalkboardAwayMobile:lT},props:{},data(){return{gamesContainerWidth:0,teamSelect:"local",teamDefault:""}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"])},watch:{},methods:{onChangeTeam(e){e instanceof Object||(this.teamSelect=e),this.teamDefault=e},setUpResizeObserver(){if(window.ResizeObserver)A1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),A1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){this.teamSelect=this.homeTeam.colloquial_name,this.teamLocal=this.homeTeam.colloquial_name,setTimeout(()=>{this.setUpResizeObserver()},100)},updated(){this.teamSelect!=this.homeTeam.colloquial_name&&this.teamSelect!=this.visitingTeam.colloquial_name&&(this.teamSelect=this.homeTeam.colloquial_name,this.onChangeTeam(this.teamSelect))}},dT={class:"xg",ref:"gamesContainer"},mT={key:0,class:"selector-team"};function pT(e,a,o,n,s,i){const r=t.resolveComponent("GSCSwitchRadio"),c=t.resolveComponent("SoccerChalkboardLocal"),p=t.resolveComponent("SoccerChalkboardAway"),d=t.resolveComponent("SoccerChalkboardLocalMobile"),l=t.resolveComponent("SoccerChalkboardAwayMobile");return t.openBlock(),t.createElementBlock("div",dT,[s.gamesContainerWidth<655?(t.openBlock(),t.createElementBlock("div",mT,[t.createVNode(r,{width:"42px",height:"20px",heightCircle:"16px",widthCircle:"16px","circle-color-switch":"#cbee6b",valueDefault:s.teamDefault,"text-option-left":e.homeTeam.colloquial_name,"text-option-right":e.visitingTeam.colloquial_name,"font-color":"white","hidden-labels":!1,"icon-a":e.homeTeam.logo,"icon-b":e.visitingTeam.logo,onChange:i.onChangeTeam},null,8,["valueDefault","text-option-left","text-option-right","icon-a","icon-b","onChange"])])):t.createCommentVNode("",!0),s.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(c,{key:1,class:"local"})):t.createCommentVNode("",!0),s.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(p,{key:2,class:"away"})):t.createCommentVNode("",!0),s.gamesContainerWidth<655&&s.teamSelect==e.homeTeam.colloquial_name?(t.openBlock(),t.createBlock(d,{key:3})):t.createCommentVNode("",!0),s.gamesContainerWidth<655&&s.teamSelect==e.visitingTeam.colloquial_name?(t.openBlock(),t.createBlock(l,{key:4})):t.createCommentVNode("",!0)],512)}const hT=Ie(cT,[["render",pT],["__scopeId","data-v-cb8797f6"]]),Dve="",yT={class:"statistics-main"},gT={class:"statistics-main__header"},uT={class:"statistics-main__header__filter"},fT={class:"statistics-main__body"},_T=t.defineComponent({name:"TemplateVideos",components:{TrendLive:DB,Comparative:kA,Distribution:OA,GSCSlider:Md,XG:hT}}),bT=Ie(Object.assign(_T,{props:{game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,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"}})},subsection:{type:String,default:""},seasonSelected:{type:Object,default:()=>({})}},emits:["openmedia"],setup(e,{emit:a}){const o=e,n=gu(),s=t.ref({width:"fit-content",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",padding:"0 16px"}),i=t.ref({}),r=t.ref(null),c=t.ref([{id:"st1",name:"Comparativa",componentName:"Comparative"},{id:"st2",name:"Distribución",componentName:"Distribution"},{id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"},{id:"st4",name:"Goles esperados (xG)",componentName:"XG"}]);let p=t.ref({id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"});t.watch(()=>o.game,g=>{const y={...g};d(y)},{deep:!0,immediate:!0});async function d(g){try{i.value.gameId!==g.gameId&&(i.value=g,await n.dispatch("nextGeneral/cleanStats"),await n.dispatch("nextGeneral/checkState",{gameId:g.gameId,currentSeasonId:g.seasonId,isTeamsAnalysis:!0,defaultFilter:r.value,gameInfo:g}))}catch(y){throw new Error(y)}}function l(g){p.value=g}function m(){n.commit("nextGeneral/updateFilters",{filters:{local:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]},visit:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]}},needsFormat:!0})}function h(g){a("openmedia",g)}return t.onUnmounted(()=>{a("resetSubsection")}),t.onMounted(()=>{o.subsection==="Comparativa"&&(p.value.id="st1",p.value.name="Comparativa",p.value.componentName="Comparative")}),m(),(g,y)=>(t.openBlock(),t.createElementBlock("div",yT,[t.createElementVNode("div",gT,[t.createVNode(t.unref(Md),{backgroundColor:"none",arrows:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,u=>(t.openBlock(),t.createElementBlock("div",{key:u.id,class:"game-time-line__options__option"},[t.createVNode(mu,t.mergeProps(s.value,{text:u.name,"is-active":t.unref(p).id===u.id,onClick:f=>l(u)}),null,16,["text","is-active","onClick"])]))),128))]),_:1}),t.withDirectives(t.createElementVNode("div",uT,[t.createVNode(w$)],512),[[t.vShow,!1]])]),t.createElementVNode("div",fT,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(p).componentName),{seasonSelected:e.seasonSelected,game:e.game,onOpenmedia:h},null,40,["seasonSelected","game"]))])]))}}),[["__scopeId","data-v-40695659"]]);function I1(e,a){return function(){return e.apply(a,arguments)}}const{toString:wT}=Object.prototype,{getPrototypeOf:Ud}=Object,vi=(e=>a=>{const o=wT.call(a);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=e=>(e=e.toLowerCase(),a=>vi(a)===e),Mi=e=>a=>typeof a===e,{isArray:xo}=Array,Fn=Mi("undefined");function CT(e){return e!==null&&!Fn(e)&&e.constructor!==null&&!Fn(e.constructor)&&$t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const O1=Qt("ArrayBuffer");function kT(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&O1(e.buffer),a}const ST=Mi("string"),$t=Mi("function"),T1=Mi("number"),Hi=e=>e!==null&&typeof e=="object",ET=e=>e===!0||e===!1,Ui=e=>{if(vi(e)!=="object")return!1;const a=Ud(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},NT=Qt("Date"),$T=Qt("File"),BT=Qt("Blob"),xT=Qt("FileList"),VT=e=>Hi(e)&&$t(e.pipe),AT=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||$t(e.append)&&((a=vi(e))==="formdata"||a==="object"&&$t(e.toString)&&e.toString()==="[object FormData]"))},IT=Qt("URLSearchParams"),OT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rn(e,a,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),xo(e))for(n=0,s=e.length;n<s;n++)a.call(null,e[n],n,e);else{const i=o?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let c;for(n=0;n<r;n++)c=i[n],a.call(null,e[c],c,e)}}function z1(e,a){a=a.toLowerCase();const o=Object.keys(e);let n=o.length,s;for(;n-- >0;)if(s=o[n],a===s.toLowerCase())return s;return null}const F1=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),R1=e=>!Fn(e)&&e!==F1;function Gd(){const{caseless:e}=R1(this)&&this||{},a={},o=(n,s)=>{const i=e&&z1(a,s)||s;Ui(a[i])&&Ui(n)?a[i]=Gd(a[i],n):Ui(n)?a[i]=Gd({},n):xo(n)?a[i]=n.slice():a[i]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&Rn(arguments[n],o);return a}const TT=(e,a,o,{allOwnKeys:n}={})=>(Rn(a,(s,i)=>{o&&$t(s)?e[i]=I1(s,o):e[i]=s},{allOwnKeys:n}),e),zT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FT=(e,a,o,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),o&&Object.assign(e.prototype,o)},RT=(e,a,o,n)=>{let s,i,r;const c={};if(a=a||{},e==null)return a;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)r=s[i],(!n||n(r,e,a))&&!c[r]&&(a[r]=e[r],c[r]=!0);e=o!==!1&&Ud(e)}while(e&&(!o||o(e,a))&&e!==Object.prototype);return a},PT=(e,a,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=a.length;const n=e.indexOf(a,o);return n!==-1&&n===o},DT=e=>{if(!e)return null;if(xo(e))return e;let a=e.length;if(!T1(a))return null;const o=new Array(a);for(;a-- >0;)o[a]=e[a];return o},LT=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Ud(Uint8Array)),jT=(e,a)=>{const o=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=o.next())&&!n.done;){const s=n.value;a.call(e,s[0],s[1])}},vT=(e,a)=>{let o;const n=[];for(;(o=e.exec(a))!==null;)n.push(o);return n},MT=Qt("HTMLFormElement"),HT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,o,n){return o.toUpperCase()+n}),P1=(({hasOwnProperty:e})=>(a,o)=>e.call(a,o))(Object.prototype),UT=Qt("RegExp"),D1=(e,a)=>{const o=Object.getOwnPropertyDescriptors(e),n={};Rn(o,(s,i)=>{let r;(r=a(s,i,e))!==!1&&(n[i]=r||s)}),Object.defineProperties(e,n)},GT=e=>{D1(e,(a,o)=>{if($t(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if($t(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},WT=(e,a)=>{const o={},n=s=>{s.forEach(i=>{o[i]=!0})};return xo(e)?n(e):n(String(e).split(a)),o},qT=()=>{},JT=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Wd="abcdefghijklmnopqrstuvwxyz",L1="0123456789",j1={DIGIT:L1,ALPHA:Wd,ALPHA_DIGIT:Wd+Wd.toUpperCase()+L1},XT=(e=16,a=j1.ALPHA_DIGIT)=>{let o="";const{length:n}=a;for(;e--;)o+=a[Math.random()*n|0];return o};function ZT(e){return!!(e&&$t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const YT=e=>{const a=new Array(10),o=(n,s)=>{if(Hi(n)){if(a.indexOf(n)>=0)return;if(!("toJSON"in n)){a[s]=n;const i=xo(n)?[]:{};return Rn(n,(r,c)=>{const p=o(r,s+1);!Fn(p)&&(i[c]=p)}),a[s]=void 0,i}}return n};return o(e,0)},KT=Qt("AsyncFunction"),QT=e=>e&&(Hi(e)||$t(e))&&$t(e.then)&&$t(e.catch),j={isArray:xo,isArrayBuffer:O1,isBuffer:CT,isFormData:AT,isArrayBufferView:kT,isString:ST,isNumber:T1,isBoolean:ET,isObject:Hi,isPlainObject:Ui,isUndefined:Fn,isDate:NT,isFile:$T,isBlob:BT,isRegExp:UT,isFunction:$t,isStream:VT,isURLSearchParams:IT,isTypedArray:LT,isFileList:xT,forEach:Rn,merge:Gd,extend:TT,trim:OT,stripBOM:zT,inherits:FT,toFlatObject:RT,kindOf:vi,kindOfTest:Qt,endsWith:PT,toArray:DT,forEachEntry:jT,matchAll:vT,isHTMLForm:MT,hasOwnProperty:P1,hasOwnProp:P1,reduceDescriptors:D1,freezeMethods:GT,toObjectSet:WT,toCamelCase:HT,noop:qT,toFiniteNumber:JT,findKey:z1,global:F1,isContextDefined:R1,ALPHABET:j1,generateString:XT,isSpecCompliantForm:ZT,toJSONObject:YT,isAsyncFn:KT,isThenable:QT};function pe(e,a,o,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),o&&(this.config=o),n&&(this.request=n),s&&(this.response=s)}j.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const v1=pe.prototype,M1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{M1[e]={value:e}}),Object.defineProperties(pe,M1),Object.defineProperty(v1,"isAxiosError",{value:!0}),pe.from=(e,a,o,n,s,i)=>{const r=Object.create(v1);return j.toFlatObject(e,r,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),pe.call(r,e.message,a,o,n,s),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const ez=null;function qd(e){return j.isPlainObject(e)||j.isArray(e)}function H1(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function U1(e,a,o){return e?e.concat(a).map(function(n,s){return n=H1(n),!o&&s?"["+n+"]":n}).join(o?".":""):a}function tz(e){return j.isArray(e)&&!e.some(qd)}const az=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function Gi(e,a,o){if(!j.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,o=j.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!j.isUndefined(y[g])});const n=o.metaTokens,s=o.visitor||d,i=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(a);if(!j.isFunction(s))throw new TypeError("visitor must be a function");function p(g){if(g===null)return"";if(j.isDate(g))return g.toISOString();if(!c&&j.isBlob(g))throw new pe("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(g)||j.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,u){let f=g;if(g&&!u&&typeof g=="object"){if(j.endsWith(y,"{}"))y=n?y:y.slice(0,-2),g=JSON.stringify(g);else if(j.isArray(g)&&tz(g)||(j.isFileList(g)||j.endsWith(y,"[]"))&&(f=j.toArray(g)))return y=H1(y),f.forEach(function(b,E){!(j.isUndefined(b)||b===null)&&a.append(r===!0?U1([y],E,i):r===null?y:y+"[]",p(b))}),!1}return qd(g)?!0:(a.append(U1(u,y,i),p(g)),!1)}const l=[],m=Object.assign(az,{defaultVisitor:d,convertValue:p,isVisitable:qd});function h(g,y){if(!j.isUndefined(g)){if(l.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));l.push(g),j.forEach(g,function(u,f){(!(j.isUndefined(u)||u===null)&&s.call(a,u,j.isString(f)?f.trim():f,y,m))===!0&&h(u,y?y.concat(f):[f])}),l.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return h(e),a}function G1(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return a[o]})}function Jd(e,a){this._pairs=[],e&&Gi(e,this,a)}const W1=Jd.prototype;W1.append=function(e,a){this._pairs.push([e,a])},W1.toString=function(e){const a=e?function(o){return e.call(this,o,G1)}:G1;return this._pairs.map(function(o){return a(o[0])+"="+a(o[1])},"").join("&")};function oz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function q1(e,a,o){if(!a)return e;const n=o&&o.encode||oz,s=o&&o.serialize;let i;if(s?i=s(a,o):i=j.isURLSearchParams(a)?a.toString():new Jd(a,o).toString(n),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const J1=class{constructor(){this.handlers=[]}use(a,o,n){return this.handlers.push({fulfilled:a,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){j.forEach(this.handlers,function(o){o!==null&&a(o)})}},X1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nz=typeof URLSearchParams<"u"?URLSearchParams:Jd,sz=typeof FormData<"u"?FormData:null,iz=typeof Blob<"u"?Blob:null,rz={isBrowser:!0,classes:{URLSearchParams:nz,FormData:sz,Blob:iz},protocols:["http","https","file","blob","url","data"]},Z1=typeof window<"u"&&typeof document<"u",lz=(e=>Z1&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),cz=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),dz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Z1,hasStandardBrowserEnv:lz,hasStandardBrowserWebWorkerEnv:cz},Symbol.toStringTag,{value:"Module"})),ea={...dz,...rz};function mz(e,a){return Gi(e,new ea.classes.URLSearchParams,Object.assign({visitor:function(o,n,s,i){return ea.isNode&&j.isBuffer(o)?(this.append(n,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function pz(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function hz(e){const a={},o=Object.keys(e);let n;const s=o.length;let i;for(n=0;n<s;n++)i=o[n],a[i]=e[i];return a}function Y1(e){function a(o,n,s,i){let r=o[i++];if(r==="__proto__")return!0;const c=Number.isFinite(+r),p=i>=o.length;return r=!r&&j.isArray(s)?s.length:r,p?(j.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!c):((!s[r]||!j.isObject(s[r]))&&(s[r]=[]),a(o,n,s[r],i)&&j.isArray(s[r])&&(s[r]=hz(s[r])),!c)}if(j.isFormData(e)&&j.isFunction(e.entries)){const o={};return j.forEachEntry(e,(n,s)=>{a(pz(n),s,o,0)}),o}return null}function yz(e,a,o){if(j.isString(e))try{return(a||JSON.parse)(e),j.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const Xd={transitional:X1,adapter:["xhr","http"],transformRequest:[function(e,a){const o=a.getContentType()||"",n=o.indexOf("application/json")>-1,s=j.isObject(e);if(s&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return n&&n?JSON.stringify(Y1(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return mz(e,this.formSerializer).toString();if((i=j.isFileList(e))||o.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gi(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return s||n?(a.setContentType("application/json",!1),yz(e)):e}],transformResponse:[function(e){const a=this.transitional||Xd.transitional,o=a&&a.forcedJSONParsing,n=this.responseType==="json";if(e&&j.isString(e)&&(o&&!this.responseType||n)){const s=!(a&&a.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(i){if(s)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ea.classes.FormData,Blob:ea.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{Xd.headers[e]={}});const Zd=Xd,gz=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uz=e=>{const a={};let o,n,s;return e&&e.split(`
|
|
22
22
|
`).forEach(function(i){s=i.indexOf(":"),o=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!o||a[o]&&gz[o])&&(o==="set-cookie"?a[o]?a[o].push(n):a[o]=[n]:a[o]=a[o]?a[o]+", "+n:n)}),a},K1=Symbol("internals");function Pn(e){return e&&String(e).trim().toLowerCase()}function Wi(e){return e===!1||e==null?e:j.isArray(e)?e.map(Wi):String(e)}function fz(e){const a=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)a[n[1]]=n[2];return a}const _z=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yd(e,a,o,n,s){if(j.isFunction(n))return n.call(this,a,o);if(s&&(a=o),!!j.isString(a)){if(j.isString(n))return a.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(a)}}function bz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,o,n)=>o.toUpperCase()+n)}function wz(e,a){const o=j.toCamelCase(" "+a);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+o,{value:function(s,i,r){return this[n].call(this,a,s,i,r)},configurable:!0})})}let qi=class{constructor(a){a&&this.set(a)}set(a,o,n){const s=this;function i(c,p,d){const l=Pn(p);if(!l)throw new Error("header name must be a non-empty string");const m=j.findKey(s,l);(!m||s[m]===void 0||d===!0||d===void 0&&s[m]!==!1)&&(s[m||p]=Wi(c))}const r=(c,p)=>j.forEach(c,(d,l)=>i(d,l,p));return j.isPlainObject(a)||a instanceof this.constructor?r(a,o):j.isString(a)&&(a=a.trim())&&!_z(a)?r(uz(a),o):a!=null&&i(o,a,n),this}get(a,o){if(a=Pn(a),a){const n=j.findKey(this,a);if(n){const s=this[n];if(!o)return s;if(o===!0)return fz(s);if(j.isFunction(o))return o.call(this,s,n);if(j.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,o){if(a=Pn(a),a){const n=j.findKey(this,a);return!!(n&&this[n]!==void 0&&(!o||Yd(this,this[n],n,o)))}return!1}delete(a,o){const n=this;let s=!1;function i(r){if(r=Pn(r),r){const c=j.findKey(n,r);c&&(!o||Yd(n,n[c],c,o))&&(delete n[c],s=!0)}}return j.isArray(a)?a.forEach(i):i(a),s}clear(a){const o=Object.keys(this);let n=o.length,s=!1;for(;n--;){const i=o[n];(!a||Yd(this,this[i],i,a,!0))&&(delete this[i],s=!0)}return s}normalize(a){const o=this,n={};return j.forEach(this,(s,i)=>{const r=j.findKey(n,i);if(r){o[r]=Wi(s),delete o[i];return}const c=a?bz(i):String(i).trim();c!==i&&delete o[i],o[c]=Wi(s),n[c]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const o=Object.create(null);return j.forEach(this,(n,s)=>{n!=null&&n!==!1&&(o[s]=a&&j.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,o])=>a+": "+o).join(`
|
|
23
23
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...o){const n=new this(a);return o.forEach(s=>n.set(s)),n}static accessor(a){const o=(this[K1]=this[K1]={accessors:{}}).accessors,n=this.prototype;function s(i){const r=Pn(i);o[r]||(wz(n,i),o[r]=!0)}return j.isArray(a)?a.forEach(s):s(a),this}};qi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(qi.prototype,({value:e},a)=>{let o=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(n){this[o]=n}}}),j.freezeMethods(qi);const Ia=qi;function Kd(e,a){const o=this||Zd,n=a||o,s=Ia.from(n.headers);let i=n.data;return j.forEach(e,function(r){i=r.call(o,i,s.normalize(),a?a.status:void 0)}),s.normalize(),i}function Q1(e){return!!(e&&e.__CANCEL__)}function Dn(e,a,o){pe.call(this,e??"canceled",pe.ERR_CANCELED,a,o),this.name="CanceledError"}j.inherits(Dn,pe,{__CANCEL__:!0});function Cz(e,a,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):a(new pe("Request failed with status code "+o.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const kz=ea.hasStandardBrowserEnv?{write(e,a,o,n,s,i){const r=[e+"="+encodeURIComponent(a)];j.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),j.isString(n)&&r.push("path="+n),j.isString(s)&&r.push("domain="+s),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Sz(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ez(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function ef(e,a){return e&&!Sz(a)?Ez(e,a):a}const Nz=ea.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let o;function n(s){let i=s;return e&&(a.setAttribute("href",i),i=a.href),a.setAttribute("href",i),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return o=n(window.location.href),function(s){const i=j.isString(s)?n(s):s;return i.protocol===o.protocol&&i.host===o.host}}():function(){return function(){return!0}}();function $z(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function Bz(e,a){e=e||10;const o=new Array(e),n=new Array(e);let s=0,i=0,r;return a=a!==void 0?a:1e3,function(c){const p=Date.now(),d=n[i];r||(r=p),o[s]=c,n[s]=p;let l=i,m=0;for(;l!==s;)m+=o[l++],l=l%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),p-r<a)return;const h=d&&p-d;return h?Math.round(m*1e3/h):void 0}}function tf(e,a){let o=0;const n=Bz(50,250);return s=>{const i=s.loaded,r=s.lengthComputable?s.total:void 0,c=i-o,p=n(c),d=i<=r;o=i;const l={loaded:i,total:r,progress:r?i/r:void 0,bytes:c,rate:p||void 0,estimated:p&&r&&d?(r-i)/p:void 0,event:s};l[a?"download":"upload"]=!0,e(l)}}const xz=typeof XMLHttpRequest<"u",Vz=xz&&function(e){return new Promise(function(a,o){let n=e.data;const s=Ia.from(e.headers).normalize();let{responseType:i,withXSRFToken:r}=e,c;function p(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let d;if(j.isFormData(n)){if(ea.hasStandardBrowserEnv||ea.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((d=s.getContentType())!==!1){const[y,...u]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([y||"multipart/form-data",...u].join("; "))}}let l=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(y+":"+u))}const m=ef(e.baseURL,e.url);l.open(e.method.toUpperCase(),q1(m,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function h(){if(!l)return;const y=Ia.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),u={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:e,request:l};Cz(function(f){a(f),p()},function(f){o(f),p()},u),l=null}if("onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(h)},l.onabort=function(){l&&(o(new pe("Request aborted",pe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){o(new pe("Network Error",pe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const u=e.transitional||X1;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),o(new pe(y,u.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,l)),l=null},ea.hasStandardBrowserEnv&&(r&&j.isFunction(r)&&(r=r(e)),r||r!==!1&&Nz(m))){const y=e.xsrfHeaderName&&e.xsrfCookieName&&kz.read(e.xsrfCookieName);y&&s.set(e.xsrfHeaderName,y)}n===void 0&&s.setContentType(null),"setRequestHeader"in l&&j.forEach(s.toJSON(),function(y,u){l.setRequestHeader(u,y)}),j.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&i!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",tf(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",tf(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=y=>{l&&(o(!y||y.type?new Dn(null,e,l):y),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const g=$z(m);if(g&&ea.protocols.indexOf(g)===-1){o(new pe("Unsupported protocol "+g+":",pe.ERR_BAD_REQUEST,e));return}l.send(n||null)})},Qd={http:ez,xhr:Vz};j.forEach(Qd,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const af=e=>`- ${e}`,Az=e=>j.isFunction(e)||e===null||e===!1,of={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:a}=e;let o,n;const s={};for(let i=0;i<a;i++){o=e[i];let r;if(n=o,!Az(o)&&(n=Qd[(r=String(o)).toLowerCase()],n===void 0))throw new pe(`Unknown adapter '${r}'`);if(n)break;s[r||"#"+i]=n}if(!n){const i=Object.entries(s).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let r=a?i.length>1?`since :
|
|
24
24
|
`+i.map(af).join(`
|
|
@@ -96,4 +96,4 @@
|
|
|
96
96
|
* vuex v4.0.2
|
|
97
97
|
* (c) 2021 Evan You
|
|
98
98
|
* @license MIT
|
|
99
|
-
*/var WPe="store";function fo(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function U6(e){return e!==null&&typeof e=="object"}function qPe(e){return e&&typeof e.then=="function"}function qt(e,a){if(!e)throw new Error("[vuex] "+a)}function JPe(e,a){return function(){return e(a)}}function G6(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var n=a.indexOf(e);n>-1&&a.splice(n,1)}}function W6(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;Gc(e,o,[],e._modules.root,!0),n0(e,o,a)}function n0(e,a,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};fo(s,function(r,c){i[c]=JPe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&QPe(e),n&&o&&e._withCommit(function(){n.data=null})}function Gc(e,a,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=s0(a,o.slice(0,-1)),p=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&p in c&&console.warn('[vuex] state field "'+p+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[p]=n.state})}var d=n.context=XPe(e,r,o);n.forEachMutation(function(l,m){var h=r+m;ZPe(e,h,l,d)}),n.forEachAction(function(l,m){var h=l.root?m:r+m,g=l.handler||l;YPe(e,h,g,d)}),n.forEachGetter(function(l,m){var h=r+m;KPe(e,h,l,d)}),n.forEachChild(function(l,m){Gc(e,a,o.concat(m),l,s)})}function XPe(e,a,o){var n=a==="",s={dispatch:n?e.dispatch:function(i,r,c){var p=Wc(i,r,c),d=p.payload,l=p.options,m=p.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+p.type+", global type: "+m);return}return e.dispatch(m,d)},commit:n?e.commit:function(i,r,c){var p=Wc(i,r,c),d=p.payload,l=p.options,m=p.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+p.type+", global type: "+m);return}e.commit(m,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return q6(e,a)}},state:{get:function(){return s0(e.state,o)}}}),s}function q6(e,a){if(!e._makeLocalGettersCache[a]){var o={},n=a.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===a){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function ZPe(e,a,o,n){var s=e._mutations[a]||(e._mutations[a]=[]);s.push(function(i){o.call(e,n.state,i)})}function YPe(e,a,o,n){var s=e._actions[a]||(e._actions[a]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return qPe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function KPe(e,a,o,n){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function QPe(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&qt(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function s0(e,a){return a.reduce(function(o,n){return o[n]},e)}function Wc(e,a,o){return U6(e)&&e.type&&(o=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&qt(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:o}}var eDe="vuex bindings",J6="vuex:mutations",i0="vuex:actions",Sn="vuex",tDe=0;function aDe(e,a){GPe({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:[eDe]},function(o){o.addTimelineLayer({id:J6,label:"Vuex Mutations",color:X6}),o.addTimelineLayer({id:i0,label:"Vuex Actions",color:X6}),o.addInspector({id:Sn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Sn)if(n.filter){var s=[];Q6(s,a._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[K6(a._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId;q6(a,s),n.state=sDe(rDe(a._modules,s),s==="root"?a.getters:a._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),a._withCommit(function(){n.set(a._state.data,i,n.state.value)})}}),a.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Sn),o.sendInspectorState(Sn),o.addTimelineEvent({layerId:J6,event:{time:Date.now(),title:n.type,data:i}})}),a.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=tDe++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:i0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:i0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var X6=8702998,oDe=6710886,nDe=16777215,Z6={label:"namespaced",textColor:nDe,backgroundColor:oDe};function Y6(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function K6(e,a){return{id:a||"root",label:Y6(a),tags:e.namespaced?[Z6]:[],children:Object.keys(e._children).map(function(o){return K6(e._children[o],a+o+"/")})}}function Q6(e,a,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:a.namespaced?[Z6]:[]}),Object.keys(a._children).forEach(function(s){Q6(e,a._children[s],o,n+s+"/")})}function sDe(e,a,o){a=o==="root"?a:a[o];var n=Object.keys(a),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=iDe(a);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?Y6(r):r,editable:!1,value:r0(function(){return i[r]})}})}return s}function iDe(e){var a={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=a,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=r0(function(){return e[o]})}else a[o]=r0(function(){return e[o]})}),a}function rDe(e,a){var o=a.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function r0(e){try{return e()}catch(a){return a}}var Jt=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},ek={namespaced:{configurable:!0}};ek.namespaced.get=function(){return!!this._rawModule.namespaced},Jt.prototype.addChild=function(e,a){this._children[e]=a},Jt.prototype.removeChild=function(e){delete this._children[e]},Jt.prototype.getChild=function(e){return this._children[e]},Jt.prototype.hasChild=function(e){return e in this._children},Jt.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)},Jt.prototype.forEachChild=function(e){fo(this._children,e)},Jt.prototype.forEachGetter=function(e){this._rawModule.getters&&fo(this._rawModule.getters,e)},Jt.prototype.forEachAction=function(e){this._rawModule.actions&&fo(this._rawModule.actions,e)},Jt.prototype.forEachMutation=function(e){this._rawModule.mutations&&fo(this._rawModule.mutations,e)},Object.defineProperties(Jt.prototype,ek);var _o=function(e){this.register([],e,!1)};_o.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},_o.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,n){return a=a.getChild(n),o+(a.namespaced?n+"/":"")},"")},_o.prototype.update=function(e){tk([],this.root,e)},_o.prototype.register=function(e,a,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&nk(e,a);var s=new Jt(a,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}a.modules&&fo(a.modules,function(r,c){n.register(e.concat(c),r,o)})},_o.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],n=a.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&a.removeChild(o)},_o.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function tk(e,a,o){if(process.env.NODE_ENV!=="production"&&nk(e,o),a.update(o),o.modules)for(var n in o.modules){if(!a.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}tk(e.concat(n),a.getChild(n),o.modules[n])}}var ak={assert:function(e){return typeof e=="function"},expected:"function"},lDe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},ok={getters:ak,mutations:ak,actions:lDe};function nk(e,a){Object.keys(ok).forEach(function(o){if(a[o]){var n=ok[o];fo(a[o],function(s,i){qt(n.assert(s),cDe(e,o,i,s,n.expected))})}})}function cDe(e,a,o,n,s){var i=a+" should be "+s+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var St=function e(a){var o=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(qt(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),qt(this instanceof e,"store must be called with the new operator."));var n=a.plugins;n===void 0&&(n=[]);var s=a.strict;s===void 0&&(s=!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 _o(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,p=c.dispatch,d=c.commit;this.dispatch=function(m,h){return p.call(r,m,h)},this.commit=function(m,h,g){return d.call(r,m,h,g)},this.strict=s;var l=this._modules.root.state;Gc(this,l,[],this._modules.root),n0(this,l),n.forEach(function(m){return m(o)})},l0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||WPe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&aDe(e,this)},l0.state.get=function(){return this._state.data},l0.state.set=function(e){process.env.NODE_ENV!=="production"&&qt(!1,"use store.replaceState() to explicit replace store state.")},St.prototype.commit=function(e,a,o){var n=this,s=Wc(e,a,o),i=s.type,r=s.payload,c=s.options,p={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(p,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},St.prototype.dispatch=function(e,a){var o=this,n=Wc(e,a),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var p=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){p.then(function(m){try{o._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(r,o.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(h))}d(m)},function(m){try{o._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(r,o.state,m)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(h))}l(m)})})},St.prototype.subscribe=function(e,a){return G6(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return G6(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var n=this;return process.env.NODE_ENV!=="production"&&qt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(n.state,n.getters)},a,Object.assign({},o))},St.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},St.prototype.registerModule=function(e,a,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(qt(Array.isArray(e),"module path must be a string or an Array."),qt(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),Gc(this,this.state,e,this._modules.get(e),o.preserveState),n0(this,this.state)},St.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&qt(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=s0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),W6(this)},St.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&qt(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},St.prototype.hotUpdate=function(e){this._modules.update(e),W6(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,l0);var dDe=pDe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!sk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),mDe(a).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var p=this.$store.commit;if(e){var d=hDe(this.$store,"mapMutations",e);if(!d)return;p=d.context.commit}return typeof i=="function"?i.apply(this,[p].concat(r)):p.apply(this.$store,[i].concat(r))}}),o});function mDe(e){return sk(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 sk(e){return Array.isArray(e)||U6(e)}function pDe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function hDe(e,a,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+a+"(): "+o),n}const yDe="/icn-play.svg",gDe="/icn-tiros-de-esquina.svg",uDe="/icn-tiro-a-porteria.svg",fDe="/icn-cambio.svg",_De="/icn-falta.svg",bDe="/atajada.svg",wDe="/fuera-de-lugar.svg",c0="/gol.svg",CDe="/var.png",kDe="/tiempo-agregado.svg",SDe="/jugada-peligrosa.svg",EDe="/penal-marcado.svg",NDe="/penal-fallado.svg",$De="/inicia-el-partido.svg",BDe="/fin-del-partido.svg",xDe="/icn-tarjeta-amarilla.svg",VDe="/icn-tarjeta-roja.svg",ADe=[1,2,3,4,6],IDe={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 a0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):a0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):a0.RED_CARD_IDS.includes(a)&&(e.push("is-main-event"),e.push("red-card")),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=>PPe(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||ADe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...dDe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e,a){console.log(a),(a==="Gol"||a==="Tarjeta")&&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})}}},ODe=e=>(t.pushScopeId("data-v-5f764c11"),e=e(),t.popScopeId(),e),TDe={class:"time-line-event__details"},zDe={width:"127",preload:"metadata",style:{"border-radius":"8px"}},FDe=["src"],RDe=ODe(()=>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)),PDe={class:"time-line-event__details__info"},DDe={key:0,class:"time-line-event__details__info__header__players"},LDe={class:"time-line-event__details__info__header__players__div-img"},jDe=["src"],vDe={class:"time-line-event__details__info__body"},MDe={class:"time-line-event__details__info__body__comment"},HDe={class:"time-line-event__minute__container"},UDe={class:"time-line-event__minute__container__text"},GDe={class:"time-line-event__minute__container__icon-container"},WDe={class:"time-line-event__minute__container__icon-container__icon"},qDe={key:0,src:gDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JDe={key:1,src:uDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XDe={key:2,src:fDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ZDe={key:3,src:_De,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},YDe={key:4,src:bDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KDe={key:5,src:wDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QDe={key:6,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eLe={key:7,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tLe={key:8,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aLe={key:9,src:CDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oLe={key:10,src:kDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nLe={key:11,src:SDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},sLe={key:12,src:EDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},iLe={key:13,src:NDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},rLe={key:14,src:$De,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lLe={key:15,src:BDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},cLe={key:16,src:xDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},dLe={key:17,src:VDe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},mLe={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 pLe(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[t.createElementVNode("div",TDe,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("video",zDe,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,FDe)]),RDe])):t.createCommentVNode("",!0),t.createElementVNode("div",PDe,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",DDe,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(r,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[t.createElementVNode("div",LDe,[t.createElementVNode("img",{src:r,alt:""},null,8,jDe)])],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]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("img",{src:yDe,class:t.normalizeClass("time-line-event__details__info__header__event-play time-line-event__details__info__header__event-play__"+o.gameEvent.event_type_name)},null,2),t.createTextVNode(" "+t.toDisplayString(o.gameEvent.category_id?o.gameEvent.event_type_id===5?o.gameEvent.category_name:o.gameEvent.event_type_name==="Gol"?o.gameEvent.event_type_name+" de "+o.gameEvent.team_name:o.gameEvent.event_type_name:o.gameEvent.comments),1)],2)],2),t.createElementVNode("div",vDe,[t.createElementVNode("div",MDe,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",HDe,[t.createElementVNode("div",UDe,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",GDe,[t.createElementVNode("div",WDe,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",qDe)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",JDe)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",XDe)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",ZDe)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",YDe)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",KDe)):o.gameEvent.category_id==6&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==5&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==1&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==2&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==3&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==7&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==12&&o.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",QDe)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",eLe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",tLe)):o.gameEvent.category_id==30||o.gameEvent.category_id==31||o.gameEvent.category_id==32||o.gameEvent.category_id==33||o.gameEvent.category_id==34||o.gameEvent.category_id==35||o.gameEvent.category_id==36||o.gameEvent.category_id==37||o.gameEvent.category_id==38||o.gameEvent.category_id==39||o.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",aLe)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",oLe)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",nLe)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",sLe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",iLe)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==16||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==18||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==20||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",rLe)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==13||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==17||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==19||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==21||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",lLe)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",cLe)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",dLe)):(t.openBlock(),t.createElementBlock("img",mLe))])])])],2)],6)}const hLe=ii(IDe,[["render",pLe],["__scopeId","data-v-5f764c11"]]),yLe={"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"},gLe={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 qc=null;const uLe={name:"TimeLine",components:{Tooltip:TPe,TimeLineEvent:hLe},mixins:[FPe],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"}},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.timeLineStatus="finished"),this.fillGameEvents(e.id))}},"$socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&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":yLe[`${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 j6.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.$socket.client.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)qc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],n=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),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(o=>o.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const o=gLe[a.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:a})}),this.timeLineStatuses.sort((a,o)=>o.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 RPe(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qc&&qc.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)}}},ik=e=>(t.pushScopeId("data-v-fa28e7c0"),e=e(),t.popScopeId(),e),fLe={ref:"timeLine",class:"time-line"},_Le={class:"time-line__header"},bLe={class:"time-line__header__dot"},wLe={class:"time-line__header__dot__home-team team-logo"},CLe=["src"],kLe={class:"time-line__header__dot__away-team team-logo"},SLe=["src"],ELe={class:"time-line__game-events"},NLe={key:1,class:"start-line"},$Le=ik(()=>t.createElementVNode("div",null,null,-1)),BLe=ik(()=>t.createElementVNode("div",null,null,-1)),xLe=[$Le,BLe],VLe={key:1,class:"noEventText"},ALe={class:"tooltip-data"},ILe=["src"];function OLe(e,a,o,n,s,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",fLe,[t.createElementVNode("div",_Le,[t.createElementVNode("div",bLe,[t.createElementVNode("div",wLe,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,CLe)]),t.createElementVNode("div",kLe,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,SLe)])])]),t.createElementVNode("div",ELe,[o.gameData.status!==4?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(p,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:p.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(p,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(p))},[t.createVNode(r,{"game-event":p,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:a[0]||(a[0]=l=>e.$emit("player-changed",l)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",NLe,xLe)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",VLe," Aún no comienza el partido "))])],512),t.createVNode(c,{data:s.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",ALe,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,ILe)])])]),_:1},8,["data"])],64)}const TLe=ii(uLe,[["render",OLe],["__scopeId","data-v-fa28e7c0"]]),zLe={class:"game-time-line__options"},FLe={class:"game-time-line__timeline"},RLe={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",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"}})}},setup(e){j6.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"}),o=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 n=null;const s=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),p=t.ref(0),d=t.computed(()=>{let y="all";return i.value==="1er tiempo"||i.value==="1er"?y="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(y="secondHalf"),y}),l=t.computed(()=>p.value<500);function m(y){i.value=y}function h(y){r.value=y}function g(){if(window.ResizeObserver)n=new ResizeObserver(()=>{p.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{g()}),t.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(y,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",zLe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(hRe,t.mergeProps(p.value<390?o.value:a.value,{text:f=="Todo"?f:p.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:b=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",FLe,[t.createVNode(TLe,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile"])])],512))}},PLe=ii(RLe,[["__scopeId","data-v-52261d5c"]]);function DLe(e){const a=t.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();a.value.width=n.width,a.value.height=n.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const LLe=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},d0={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)}}},rk=()=>{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}))},lk=d0.setup;d0.setup=lk?(e,a)=>(rk(),lk(e,a)):rk;const jLe={ref:"gscScrollableContainer",class:"scrollable-container"},vLe={class:"scrollable-arrows"},MLe=["width","height","viewBox"],HLe=["stroke"],ULe={class:"scrollable-wrapper"},GLe={class:"scrollable-arrows"},WLe=["width","height","viewBox"],qLe=["stroke"];function JLe(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",jLe,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",vLe,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,HLe)],8,MLe))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",ULe,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",GLe,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,qLe)],8,WLe))])],2)):t.createCommentVNode("",!0)],512)}const XLe=LLe(d0,[["render",JLe],["__scopeId","data-v-b548a08d"]]),ZLe=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},m0={components:{GSCSlider:XLe},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}=DLe(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}}},ck=()=>{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}))},dk=m0.setup;m0.setup=dk?(e,a)=>(ck(),dk(e,a)):ck;const YLe={ref:"myDivRef"},KLe={key:0,class:"gs-switch-container"},QLe=["onClick"],eje={key:1,class:"gs-switch-container-type"},tje=["onClick"],aje={key:2,class:"gs-switch-container-carousel"},oje=["onClick"];function nje(e,a,o,n,s,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",YLe,[o.type==0?(t.openBlock(),t.createElementBlock("div",KLe,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,QLe))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",eje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,tje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",aje,[t.createVNode(r,{arrows:o.arrow,"background-color":o.background,"px-scroll":o.pxScroll,"scroll-color":o.scrollColor,"arrows-position":o.arrowsPosition,arrowsScrollHide:o.arrowsScrollHide,"arrows-background":o.arrowsBackground,"arrows-container-bg-l":o.arrowsContainerBgL,"arrows-container-bg-r":o.arrowsContainerBgR,"arrows-margin":o.arrowsMargin,"arrows-radius":o.arrowsRadius,"arrows-border":o.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,oje))),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 mk=ZLe(m0,[["render",nje],["__scopeId","data-v-8a86dfaf"]]),fMe="",sje={class:"game-data__header"},ije={class:"game-data__header__tournament-season-dropdown"},rje={class:"game-data__header__teams-carousel"},lje={class:"game-data__body"},cje={class:"game-data__body__menu"},dje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const mje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:bT,GSCGameTimeLine:PLe,GscSwitchComponent:mk,GSCLineupsMain:bX,GSCDatosGSMain:gse,GSCVideoGame:V0e,GSCSummaryMain:mRe}}),pje=Ie(Object.assign(mje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,n=t.ref({season:[]}),s=t.ref({}),i=t.ref({}),r=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),c=t.ref([{componentName:"GSCSummaryMain",name:"Resumen"},{componentName:"GSCVideoGame",name:"Video"},{componentName:"GSCDatosGSMain",name:"Datos Golstats"},{componentName:"StatisticsMain",name:"Estadísticas"},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto"},{componentName:"GSCLineupsMain",name:"Alineaciones"}]);let p=null;const d=t.ref(null),l=t.ref(0),m=t.ref(c.value[0]);let h=t.ref("");const g=t.computed(()=>{const N=[];return s.value&&s.value.id&&(N.push({id:s.value.id,name:s.value.name,type:s.value.type}),s.value.related_seasons&&s.value.related_seasons.forEach(B=>{N.push({id:B.id,type:B.type})})),N});function y(){p=new ResizeObserver(N=>{for(const B of N)l.value=B.contentRect.width}),p.observe(d.value)}const u=t.computed(()=>{let N={};return i.value&&i.value.game_id&&(N={gameId:i.value.game_id,id:i.value.game_id,seasonId:i.value.season_id,status:i.value.game_status,dateTimeUTC:i.value.date_time_utc,homeTeam:i.value.home_team,awayTeam:i.value.visiting_team}),N});function f(N){n.value=N,n.value.id!==N.id&&(n.value=N)}function b(N){a("openmedia",N)}function E(N){$(N),N=="Estadísticas"&&(h.value="Comparativa")}function V(){h.value=""}function w(N){s.value.id!==N.id&&(s.value=N,a("change-season-id",N.id))}const S=t.computed(()=>c.value.map(N=>N.name));function $(N){m.value=c.value.find(B=>B.name===N)||c.value[0]}t.onMounted(()=>{y()});function x(N){i.value=N}return(N,B)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:d},[t.createElementVNode("div",sje,[t.createElementVNode("div",ije,[t.createVNode(t.unref(o7),{"current-season-id":e.currentSeasonId,onInput:f},null,8,["current-season-id"]),t.createVNode(t.unref(N7),{"current-season-id":e.currentSeasonId,seasons:n.value.seasons,onInput:w},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",rje,[t.createVNode(t.unref(zN),{token:r.value,"await-for-seasons":"",seasons:g.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:x,"default-game-id":o.defaultGameId},null,8,["token","seasons","default-game-id"])])]),t.createElementVNode("div",lje,[t.createElementVNode("div",cje,[t.createElementVNode("div",dje,[t.createVNode(t.unref(mk),{type:2,buttons:S.value,"font-family":"Poppins-Regular","font-size":"16px",width:l.value<400||l.value<700?"max-content":l.value<840||l.value<1050?"155px":"165px","selected-option":m.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:$},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.value.componentName),{game:u.value,subsection:t.unref(h),seasonSelected:s.value,onResetSubsection:V,onOpenmedia:b,onChangeToTab:E},null,40,["game","subsection","seasonSelected"]))])],512))}}),[["__scopeId","data-v-3bc658d8"]]);async function ut({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(n=>n).catch(n=>o>0?ut({url:e,options:a,retries:o-1}):n)}async function pk({seasonId:e},a=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};a&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await ut(o);return n}catch(o){if(a)return pk({seasonId:e},!1);throw new Error(o)}}async function hje({seasonId:e}){try{return(await ut({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function yje({seasonId:e}){try{return(await ut({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function gje(e,a,o,n,s,i,r=!1){const c=o.map(p=>p===1?2:p===2?1:3);return e.filter(p=>{const d=i&&p[s.teamId]?p[s.teamId]!==i:!1,l=a===1?2:1;return(r||n.includes(p[s.gameId]))&&(!a||(d?l:a)===p[s.playingAs])&&(o.includes(p[s.matchResult])&&p[s.teamId]===i||c.includes(p[s.matchResult])&&p[s.teamId]!==i)})}function hk(e,a,o,n,s){return a.length===2&&o.length===3&&n.length===6?e:e.filter(i=>a.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function yk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function uje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:n}=await ut({url:o});return n}catch(o){return Promise.reject(o)}}async function fje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ut({url:a})).data.data}catch(a){return Promise.reject(a)}}async function _je({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ut({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const bje=["categoryId","matchLapse","section","matchResult","playingAs","total"];let p0=null;function gk(){return p0||(p0=Vi(bje)),p0}async function wje(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function uk({seasonId:e,teamId:a}){try{return await ut({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function Cje(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ut({url:a})}catch(a){return Promise.reject(a)}}async function kje(e){try{return await ut({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const Sje={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,n){return gje(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],gk(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(a))a[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),a[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let n=Object.keys(a.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=a.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].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},o=!1){try{const n=await pk({seasonId:a["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await yk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await wje({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:a,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=a("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function Eje({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ut({url:a});return o}catch(a){return Promise.reject(a)}}const Nje=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let h0=null;function $je(){return h0||(h0=Vi(Nje)),h0}class Jc{constructor(){Oe(this,"maximumLiveSection",1);Oe(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:[]});Oe(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,o,n){n&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,o)}increaseReceivedByOne(a,o,n){n&&(this.setMaximumLiveSection(a),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,o)}increaseTrendLiveAccumulatedByOne(a,o,n){for(let s=o-1;s<a.accumulated.length;s++)a.accumulated[s]+=n}decreaseAccomplishedLiveByOne(a,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o))}decreaseReceivedLiveByOne(a,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,o,n){for(let s=a.accumulated.length-1;s>=o-1;s--)a.accumulated[s]-=n}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,o){return a.map(n=>n/o)}calculateRanking(a,o,n,s,i,r,c,p){let d=[];s===3&&a&&a.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(a.reduce((m,h)=>{const g=h[o.playingAs]===1,y=g?"1":"2",u=m.get(h[o.gameId]);if(u)u[y]?u[y].arrayPlays.push(h):u[y]={numberTeamId:h[o.teamId],arrayPlays:[h]};else{const f={numberMatchResult:h[o.matchResult]};g&&(f[1]={numberTeamId:h[o.teamId],arrayPlays:[h]}),m.set(h[o.gameId],f)}return m},new Map).values()).reduce((m,h)=>{const g=n.playingAs.length===2?"both":n.playingAs[0].toString();return(g==="both"&&(h[1].numberTeamId===n.teamId||h[2].numberTeamId===n.teamId)||g!=="both"&&h[g].numberTeamId===n.teamId)&&n.matchResult.includes(h.numberMatchResult)&&m.push(...h[1].arrayPlays,...h[2].arrayPlays),m},[]).filter(m=>n.sections.includes(m[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",p)}setTeamRanking(a,o,n,s,i,r,c){let p=null,d=null;o===3&&(p=new Map,d={},a.forEach(h=>{const g=p.get(h[n.gameId]);g?g[h[n.teamId.toString()]]?g[h[n.teamId.toString()]]+=h[n.total]:g[h[n.teamId.toString()]]=h[n.total]:p.set(h[n.gameId],{[h[n.teamId.toString()]]:h[n.total]})}),Array.from(p.values()).forEach(h=>{const[g,y]=Object.keys(h).map(f=>f),u=h[g]+h[y];this.addPassesAvgByTeam(d,g,u?h[g]/u:0),this.addPassesAvgByTeam(d,y,u?h[y]/u:0)}));const l=i.sort((h,g)=>h.team_id-g.team_id).map(h=>{if(o===3){const g=d[h.team_id.toString()];return{teamId:h.team_id,points:g?g.numberTotalPassesAvg/g.numberGamesCount:0,total:g?g.numberTotalPassesAvg:0}}else{const g=a.reduce((y,u)=>u[n.teamId]===h.team_id&&o===u[n.categoryId]?y+u[n.total]:y,0);return{teamId:h.team_id,points:h[`${c}FilterGames`]?g/h[`${c}FilterGames`]:0,total:g}}}).sort((h,g)=>g.points-h.points);this.accomplished.arrayRankings=l;const m=l.findIndex(h=>h.teamId===s);o===3&&(this.accomplished.avgPreGame=l[m].points),this[r].ranking=m+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,n){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=n):a[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class re{constructor(a,o,n,s,i,r,c,p,d,l){Oe(this,"id","");Oe(this,"generalId",0);Oe(this,"name","");Oe(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"accomplishedCategoryIds",[]);Oe(this,"receivedCategoryIds",[]);Oe(this,"generalCategoriesIds",{accomplished:0,received:0});Oe(this,"specialMention","");Oe(this,"homeTeam",new Jc);Oe(this,"visitingTeam",new Jc);Oe(this,"isLeagueDataCalculated",!1);Oe(this,"leagueAccomplishedMax",0);Oe(this,"leagueReceivedMax",0);Oe(this,"leagueAccomplishedAvg",0);Oe(this,"leagueReceivedAvg",0);Oe(this,"leagueAccomplishedAccumulator",0);Oe(this,"leagueReceivedAccumulator",0);Oe(this,"homeTeamType","homeTeam");Oe(this,"visitingTeamType","visitingTeam");Oe(this,"betOnly",!1);Oe(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=p||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,n){a.length===0||!n||this.isLeagueDataCalculated||(a.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,n,s,i){!n||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[a].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[a].increaseReceivedByOne(r[s.section],r[s.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,n,s,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(a,o,n,s,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>a===n||`${a}_r`===n)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(o=>a===o)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Jc,this.visitingTeam=new Jc,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 Bje={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new re([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new re([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new re([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new re([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new re([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new re([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new re([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new re([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new re([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new re([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new re([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new re([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new re([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new re([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new re([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new re([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new re([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new re([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new re([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new re([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new re([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new re([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new re([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 re([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new re([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new re([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new re([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new re([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new re([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new re([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new re([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new re([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new re([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new re([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},xje=[{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}],Vje=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let y0=null;function Aje(){return y0||(y0=Vi(Vje)),y0}const Ije=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let g0=null;function Oje(){return g0||(g0=Vi(Ije)),g0}function Xc(e,a,o){return[o.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function fk(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 u0(e,a,o){let n=[...a];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}const Tje=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],zje={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:gk(),indexesTSP:$je(),indexesLS:Aje(),indexesTLP:Oje(),nextGamesDataStructure:Bje,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,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 xje.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return hk(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return hk(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,o)=>a+o[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,o)=>a+o[2],0)},filledDataStructure(e,a){if(e.currentSeasonPlays)for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&n.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&n.visitingTeam.resetTotals(),n.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),n.addTeamPlays(n.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),n.addTeamPlays(n.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((o,n)=>o.priority-n.priority)},statisticData(e,a){for(const o of Object.values(a.filledDataStructure))if(o.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&o.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return o.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&&e.gameForAnalysis.is_live&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a,e.currentSeasonTeams.forEach(o=>{o.playedGames=e.currentSeasonGames.reduce((n,s)=>{if(s.game_status===1&&(s.home_team===o.team_id||s.visiting_team===o.team_id)){const i=s.score[0]-s.score[1],r=s.home_team===o.team_id;n.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return n},[])})},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&&this._vm.$socket.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:o=!1}){if(console.count("updateFilters"),o){if(!a||!a.local||!a.local.statistics||!a.visit||!a.visit.statistics)return;e.homeTeamFilter=Iu(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Iu(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 o=Object.values(e.nextGamesDataStructure);o.forEach(n=>{for(const s of Object.values(n.subcategories))s.resetMentions()}),o.forEach(n=>{for(const s of a)for(const i of Object.values(n.subcategories))i.addSpecialMention(s[0],s[1],s[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 n=Xc(a,e.indexesTLP,e.categoriesMap);for(const s of Object.values(e.nextGamesDataStructure))for(const i of Object.values(s.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===n[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",n[e.indexesTSP.teamId],n,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);if(oB(n,a))return;let s="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";n&&(s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Xc(n,e.indexesTLP,e.categoriesMap),c=u0(n,r,e.indexesTLP),p=Xc(a,e.indexesTLP,e.categoriesMap),d=u0(a,p,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const m of Object.values(l.subcategories))n&&(m.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&m.subtractLivePlay(s,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),m.addLivePlay(i,p[e.indexesTSP.teamId],p,e.indexesTSP,e.isLive,o),d&&m.addLivePlay(i,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,o);e.livePlays.set(a[e.indexesTLP.playId],a)},deleteLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);let s="";if(n){s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(n[e.indexesTLP.playId]);const i=Xc(n,e.indexesTLP,e.categoriesMap),r=u0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const p of Object.values(c.subcategories))p.subtractLivePlay(s,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&p.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o)}},clearLiveTotals(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.homeTeam.resetTotalsLive(),o.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,a){e.statistics=a},updateOldSeasonId(e,a){e.oldSeasonId=a},addRankingInSubcategories(e,{getters:a,isPremiumAccount:o}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(r=>e.homeTeamFilter.playingAs.includes(r.playingAs)&&e.homeTeamFilter.matchResult.includes(r.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(r=>e.visitingTeamFilter.playingAs.includes(r.playingAs)&&e.visitingTeamFilter.matchResult.includes(r.matchResult)).length});const n=[],s=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))n.push(r);a.rankingData.forEach(i=>{for(const r of n)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){s.has(r.id)?s.get(r.id).push(i):s.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=fk(a)},setVisitingGames(e,a){e.visitingGames=fk(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(n=>{const s=e.categoriesMap.get(n);s?s.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(n,[o.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:a},{command:o}){o==="on"?a("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):a("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},a){try{const r=await kje({gameId:a.gameId});if(r){var o=[],n=[],s={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(r.data).length!==0&&(o=r.data.data.filter(c=>c[1]==a.homeTeam),n=r.data.data.filter(c=>c[1]==a.awayTeam),s=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",n),e("setHomeGames",s),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(r){return Promise.reject(r)}},async fillStatisticDataPostMatch({commit:e,dispatch:a},o){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let n=[];e("updateGameForAnalysis",o.gameInfo),n.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(n)}catch(n){throw new Error(n)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:n,isTeamsAnalysis:s,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:p=null,isCupGame:d=!1}){try{let l={},m=e.seasonId!==Number(i);const h=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),m&&o("setSeasonId",i),o("updateGameId",Number(n)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const g=await a("getCurrentSeasonGames",Number(n));if(o("leagueGeneral/updateCurrentSeasonGames",g,{root:!0}),l=g.find(y=>y.game_id===Number(n)),!l&&p&&(l=p),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:n,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const y=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",y,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(y=>l.home_team===y.team_id))&&h.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),s?l.game_status!==1?(await a("fillStatisticData",{gameId:n,gameinfo:l,promises:h,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),h.push(a("fillStatisticDataPostMatch",{game:n,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(h)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:n,state:s},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:p=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",r),r.is_live&&c.push(a("getCurrentLiveGamePlays",i)),c.push(a("getSpecialMentionsByGame",i)),c.push(a("getHomeTeamPlays")),c.push(a("getVisitingTeamPlays")),c.push(a("getCurrentSeasonPlays")),p&&c.push(Eje(p)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]}),p){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:s.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:n},{gameId:s,isFromBet:i}){try{const r=Number(s);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(p=>{for(const d of p.seasons)if(d.id===e.seasonId)return!0;return!1});n("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){n("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(p=>p.game_id===r);c&&n("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),n("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else n("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await _je({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:n,games:s,past_season_id:i,tournament_id:r}=await uje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=Tje.find(p=>p.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",n[0]),e("setAway",n[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((p,d)=>(d.game_status===1&&(p+=1),p),0)),s}catch(n){return Promise.reject(n)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:n}=await yk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",n),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((s,i)=>(i.game_status===1&&(s+=1),s),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await Cje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateCurrentSeasonTeams",o.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:a}){try{const o=a.usePastSeasonId?a.pastSeasonId:a.seasonId,n=await yje({seasonId:o});e("updateSeasonStatistics",n),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:n}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await uk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.home_team});o.data&&(e("updateHomeTeamPlays",o.data.data),e("setHomeGames",o.data.games))}catch(o){return Promise.reject(o)}},async getVisitingTeamPlays({commit:e,state:a}){try{const o=await uk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.visiting_team});o.data&&(e("updateVisitingTeamPlays",o.data.data),e("setVisitingGames",o.data.games))}catch(o){return Promise.reject(o)}},async getCurrentSeasonPlays({commit:e,state:a}){try{const o=await hje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateStats",o)}catch(o){return Promise.reject(new Error(o))}},async getCurrentLiveGamePlays({state:e,commit:a},o){try{const n=await fje({gameId:o});e.livePlays=new Map,n.forEach(s=>{e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)})}catch(n){throw new Error(n)}},socket_new({state:e,commit:a},o){const n=o[1];(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("addLiveGamePlay",n)},socket_update({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===n[e.indexesTLP.teamId])&&a("updateLiveGamePlay",n)},socket_delete({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("deleteLiveGamePlay",n)},exitChannel({state:e,getters:a,rootState:o,rootGetters:n,commit:s}){const i=n["loginGeneral/getPremiumAccount"];a.isLive&&i&&(s("updateShowLiveData",!1),s("clearLiveTotals"),e.livePlays.clear(),this._vm.$socket.client.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.homeTeam.resetTotalsLive(),n.visitingTeam.resetTotalsLive(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.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 Fje(){try{const{data:e}=await ut({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const Rje={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(o=>({...o.tournament,seasons:o.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 o=await Fje();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function Pje({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ut({url:n})).data}catch(n){return Promise.reject(n)}}async function Dje({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ut({url:n})).data}catch(n){return Promise.reject(n)}}const _k=(e,a)=>{let o={};return e.forEach((n,s)=>{s==3&&(a[0]==35||a[0]==54)&&(a[s]==2?a[s]=1:a[s]=2),s==2&&(a[0]==35||a[0]==54)&&(a[s]==1?a[s]=2:a[s]==2&&(a[s]=1)),o[n]=a[s]}),o},bk=(e,a)=>e.filter(n=>{const s=a.playingAs.includes(n.playing_as),i=a.matchResult.includes(n.match_result),r=a.sections.includes(n.section);return s&&i&&r}),wk=[{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,o,n){return typeof n>"u"||+n==0?Math[a](o):(o=+o,n=+n,isNaN(o)||!(typeof n=="number"&&n%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-n:-n))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function Ck(e,a){let o=a*-1;return Math.ceil10(e,o)}const Lje={general:Rje,...Sje,...zje,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const n=e.xGLocalPlays,s="homeTeamFilter",i=o.nextGeneral[s];return bk(n,i)},playsAway:(e,a,o)=>{const n=e.xGVisitingPlays,s="visitingTeamFilter",i=o.nextGeneral[s];return bk(n,i)},goalsQtyLocal:(e,a)=>{const o=wk.find(n=>n.name==="Goles");return a.playsLocal.filter(n=>o.categories.includes(n.category_id)).length},goalsQtyAway:(e,a)=>{const o=wk.find(n=>n.name==="Goles");return a.playsAway.filter(n=>o.categories.includes(n.category_id)).length},shotsOnGoalQtyLocal:(e,a)=>a.playsLocal.filter(o=>o.category_id===510).length,shotsOnGoalQtyAway:(e,a)=>a.playsAway.filter(o=>o.category_id===510).length,xGLocal:(e,a)=>{const o=new Set;let n=a.playsLocal.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Ck(n,2)},xGAway:(e,a)=>{const o=new Set;let n=a.playsAway.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Ck(n,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>_k(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>_k(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:n,postMatch:s=!1}){try{var i={};s?i=await Dje({seasonId:a,localTeamId:o,visitingTeamId:n}):i=await Pje({seasonId:a,localTeamId:o,visitingTeamId:n}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function jje(e){for(const[a,o]of Object.entries(Lje))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=pje,_t.registerStoreModules=jje,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|
|
99
|
+
*/var WPe="store";function fo(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function U6(e){return e!==null&&typeof e=="object"}function qPe(e){return e&&typeof e.then=="function"}function qt(e,a){if(!e)throw new Error("[vuex] "+a)}function JPe(e,a){return function(){return e(a)}}function G6(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var n=a.indexOf(e);n>-1&&a.splice(n,1)}}function W6(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;Gc(e,o,[],e._modules.root,!0),n0(e,o,a)}function n0(e,a,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};fo(s,function(r,c){i[c]=JPe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&QPe(e),n&&o&&e._withCommit(function(){n.data=null})}function Gc(e,a,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=s0(a,o.slice(0,-1)),p=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&p in c&&console.warn('[vuex] state field "'+p+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[p]=n.state})}var d=n.context=XPe(e,r,o);n.forEachMutation(function(l,m){var h=r+m;ZPe(e,h,l,d)}),n.forEachAction(function(l,m){var h=l.root?m:r+m,g=l.handler||l;YPe(e,h,g,d)}),n.forEachGetter(function(l,m){var h=r+m;KPe(e,h,l,d)}),n.forEachChild(function(l,m){Gc(e,a,o.concat(m),l,s)})}function XPe(e,a,o){var n=a==="",s={dispatch:n?e.dispatch:function(i,r,c){var p=Wc(i,r,c),d=p.payload,l=p.options,m=p.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+p.type+", global type: "+m);return}return e.dispatch(m,d)},commit:n?e.commit:function(i,r,c){var p=Wc(i,r,c),d=p.payload,l=p.options,m=p.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+p.type+", global type: "+m);return}e.commit(m,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return q6(e,a)}},state:{get:function(){return s0(e.state,o)}}}),s}function q6(e,a){if(!e._makeLocalGettersCache[a]){var o={},n=a.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===a){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function ZPe(e,a,o,n){var s=e._mutations[a]||(e._mutations[a]=[]);s.push(function(i){o.call(e,n.state,i)})}function YPe(e,a,o,n){var s=e._actions[a]||(e._actions[a]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return qPe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function KPe(e,a,o,n){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function QPe(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&qt(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function s0(e,a){return a.reduce(function(o,n){return o[n]},e)}function Wc(e,a,o){return U6(e)&&e.type&&(o=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&qt(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:o}}var eDe="vuex bindings",J6="vuex:mutations",i0="vuex:actions",Sn="vuex",tDe=0;function aDe(e,a){GPe({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:[eDe]},function(o){o.addTimelineLayer({id:J6,label:"Vuex Mutations",color:X6}),o.addTimelineLayer({id:i0,label:"Vuex Actions",color:X6}),o.addInspector({id:Sn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Sn)if(n.filter){var s=[];Q6(s,a._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[K6(a._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId;q6(a,s),n.state=sDe(rDe(a._modules,s),s==="root"?a.getters:a._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),a._withCommit(function(){n.set(a._state.data,i,n.state.value)})}}),a.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Sn),o.sendInspectorState(Sn),o.addTimelineEvent({layerId:J6,event:{time:Date.now(),title:n.type,data:i}})}),a.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=tDe++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:i0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:i0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var X6=8702998,oDe=6710886,nDe=16777215,Z6={label:"namespaced",textColor:nDe,backgroundColor:oDe};function Y6(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function K6(e,a){return{id:a||"root",label:Y6(a),tags:e.namespaced?[Z6]:[],children:Object.keys(e._children).map(function(o){return K6(e._children[o],a+o+"/")})}}function Q6(e,a,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:a.namespaced?[Z6]:[]}),Object.keys(a._children).forEach(function(s){Q6(e,a._children[s],o,n+s+"/")})}function sDe(e,a,o){a=o==="root"?a:a[o];var n=Object.keys(a),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=iDe(a);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?Y6(r):r,editable:!1,value:r0(function(){return i[r]})}})}return s}function iDe(e){var a={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=a,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=r0(function(){return e[o]})}else a[o]=r0(function(){return e[o]})}),a}function rDe(e,a){var o=a.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function r0(e){try{return e()}catch(a){return a}}var Jt=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},ek={namespaced:{configurable:!0}};ek.namespaced.get=function(){return!!this._rawModule.namespaced},Jt.prototype.addChild=function(e,a){this._children[e]=a},Jt.prototype.removeChild=function(e){delete this._children[e]},Jt.prototype.getChild=function(e){return this._children[e]},Jt.prototype.hasChild=function(e){return e in this._children},Jt.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)},Jt.prototype.forEachChild=function(e){fo(this._children,e)},Jt.prototype.forEachGetter=function(e){this._rawModule.getters&&fo(this._rawModule.getters,e)},Jt.prototype.forEachAction=function(e){this._rawModule.actions&&fo(this._rawModule.actions,e)},Jt.prototype.forEachMutation=function(e){this._rawModule.mutations&&fo(this._rawModule.mutations,e)},Object.defineProperties(Jt.prototype,ek);var _o=function(e){this.register([],e,!1)};_o.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},_o.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,n){return a=a.getChild(n),o+(a.namespaced?n+"/":"")},"")},_o.prototype.update=function(e){tk([],this.root,e)},_o.prototype.register=function(e,a,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&nk(e,a);var s=new Jt(a,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}a.modules&&fo(a.modules,function(r,c){n.register(e.concat(c),r,o)})},_o.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],n=a.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&a.removeChild(o)},_o.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function tk(e,a,o){if(process.env.NODE_ENV!=="production"&&nk(e,o),a.update(o),o.modules)for(var n in o.modules){if(!a.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}tk(e.concat(n),a.getChild(n),o.modules[n])}}var ak={assert:function(e){return typeof e=="function"},expected:"function"},lDe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},ok={getters:ak,mutations:ak,actions:lDe};function nk(e,a){Object.keys(ok).forEach(function(o){if(a[o]){var n=ok[o];fo(a[o],function(s,i){qt(n.assert(s),cDe(e,o,i,s,n.expected))})}})}function cDe(e,a,o,n,s){var i=a+" should be "+s+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var St=function e(a){var o=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(qt(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),qt(this instanceof e,"store must be called with the new operator."));var n=a.plugins;n===void 0&&(n=[]);var s=a.strict;s===void 0&&(s=!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 _o(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,p=c.dispatch,d=c.commit;this.dispatch=function(m,h){return p.call(r,m,h)},this.commit=function(m,h,g){return d.call(r,m,h,g)},this.strict=s;var l=this._modules.root.state;Gc(this,l,[],this._modules.root),n0(this,l),n.forEach(function(m){return m(o)})},l0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||WPe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&aDe(e,this)},l0.state.get=function(){return this._state.data},l0.state.set=function(e){process.env.NODE_ENV!=="production"&&qt(!1,"use store.replaceState() to explicit replace store state.")},St.prototype.commit=function(e,a,o){var n=this,s=Wc(e,a,o),i=s.type,r=s.payload,c=s.options,p={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(p,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},St.prototype.dispatch=function(e,a){var o=this,n=Wc(e,a),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var p=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){p.then(function(m){try{o._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(r,o.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(h))}d(m)},function(m){try{o._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(r,o.state,m)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(h))}l(m)})})},St.prototype.subscribe=function(e,a){return G6(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return G6(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var n=this;return process.env.NODE_ENV!=="production"&&qt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(n.state,n.getters)},a,Object.assign({},o))},St.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},St.prototype.registerModule=function(e,a,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(qt(Array.isArray(e),"module path must be a string or an Array."),qt(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),Gc(this,this.state,e,this._modules.get(e),o.preserveState),n0(this,this.state)},St.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&qt(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=s0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),W6(this)},St.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&qt(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},St.prototype.hotUpdate=function(e){this._modules.update(e),W6(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,l0);var dDe=pDe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!sk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),mDe(a).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var p=this.$store.commit;if(e){var d=hDe(this.$store,"mapMutations",e);if(!d)return;p=d.context.commit}return typeof i=="function"?i.apply(this,[p].concat(r)):p.apply(this.$store,[i].concat(r))}}),o});function mDe(e){return sk(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 sk(e){return Array.isArray(e)||U6(e)}function pDe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function hDe(e,a,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+a+"(): "+o),n}const yDe="/icn-play.svg",gDe="/icn-tiros-de-esquina.svg",uDe="/icn-tiro-a-porteria.svg",fDe="/icn-cambio.svg",_De="/icn-falta.svg",bDe="/atajada.svg",wDe="/fuera-de-lugar.svg",c0="/gol.svg",CDe="/var.png",kDe="/tiempo-agregado.svg",SDe="/jugada-peligrosa.svg",EDe="/penal-marcado.svg",NDe="/penal-fallado.svg",$De="/inicia-el-partido.svg",BDe="/fin-del-partido.svg",xDe="/icn-tarjeta-amarilla.svg",VDe="/icn-tarjeta-roja.svg",ADe=[1,2,3,4,6],IDe={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 a0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):a0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):a0.RED_CARD_IDS.includes(a)&&(e.push("is-main-event"),e.push("red-card")),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=>PPe(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||ADe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...dDe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e,a){console.log(a),(a==="Gol"||a==="Tarjeta")&&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})}}},ODe=e=>(t.pushScopeId("data-v-5f764c11"),e=e(),t.popScopeId(),e),TDe={class:"time-line-event__details"},zDe={width:"127",preload:"metadata",style:{"border-radius":"8px"}},FDe=["src"],RDe=ODe(()=>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)),PDe={class:"time-line-event__details__info"},DDe={key:0,class:"time-line-event__details__info__header__players"},LDe={class:"time-line-event__details__info__header__players__div-img"},jDe=["src"],vDe={class:"time-line-event__details__info__body"},MDe={class:"time-line-event__details__info__body__comment"},HDe={class:"time-line-event__minute__container"},UDe={class:"time-line-event__minute__container__text"},GDe={class:"time-line-event__minute__container__icon-container"},WDe={class:"time-line-event__minute__container__icon-container__icon"},qDe={key:0,src:gDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JDe={key:1,src:uDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XDe={key:2,src:fDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ZDe={key:3,src:_De,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},YDe={key:4,src:bDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KDe={key:5,src:wDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QDe={key:6,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eLe={key:7,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tLe={key:8,src:c0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aLe={key:9,src:CDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oLe={key:10,src:kDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nLe={key:11,src:SDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},sLe={key:12,src:EDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},iLe={key:13,src:NDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},rLe={key:14,src:$De,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},lLe={key:15,src:BDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},cLe={key:16,src:xDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},dLe={key:17,src:VDe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},mLe={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 pLe(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[t.createElementVNode("div",TDe,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("video",zDe,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,FDe)]),RDe])):t.createCommentVNode("",!0),t.createElementVNode("div",PDe,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",DDe,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(r,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[t.createElementVNode("div",LDe,[t.createElementVNode("img",{src:r,alt:""},null,8,jDe)])],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]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("img",{src:yDe,class:t.normalizeClass("time-line-event__details__info__header__event-play time-line-event__details__info__header__event-play__"+o.gameEvent.event_type_name)},null,2),t.createTextVNode(" "+t.toDisplayString(o.gameEvent.category_id?o.gameEvent.event_type_id===5?o.gameEvent.category_name:o.gameEvent.event_type_name==="Gol"?o.gameEvent.event_type_name+" de "+o.gameEvent.team_name:o.gameEvent.event_type_name:o.gameEvent.comments),1)],2)],2),t.createElementVNode("div",vDe,[t.createElementVNode("div",MDe,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",HDe,[t.createElementVNode("div",UDe,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",GDe,[t.createElementVNode("div",WDe,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",qDe)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",JDe)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",XDe)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",ZDe)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",YDe)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",KDe)):o.gameEvent.category_id==6&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==5&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==1&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==2&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==3&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==7&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==12&&o.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",QDe)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",eLe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",tLe)):o.gameEvent.category_id==30||o.gameEvent.category_id==31||o.gameEvent.category_id==32||o.gameEvent.category_id==33||o.gameEvent.category_id==34||o.gameEvent.category_id==35||o.gameEvent.category_id==36||o.gameEvent.category_id==37||o.gameEvent.category_id==38||o.gameEvent.category_id==39||o.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",aLe)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",oLe)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",nLe)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",sLe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",iLe)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==16||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==18||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==20||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",rLe)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==13||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==17||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==19||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==21||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",lLe)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",cLe)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",dLe)):(t.openBlock(),t.createElementBlock("img",mLe))])])])],2)],6)}const hLe=ii(IDe,[["render",pLe],["__scopeId","data-v-5f764c11"]]),yLe={"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"},gLe={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 qc=null;const uLe={name:"TimeLine",components:{Tooltip:TPe,TimeLineEvent:hLe},mixins:[FPe],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"}},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.timeLineStatus="finished"),this.fillGameEvents(e.id))}},"$socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&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":yLe[`${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 j6.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.$socket.client.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)qc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],n=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),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(o=>o.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const o=gLe[a.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:a})}),this.timeLineStatuses.sort((a,o)=>o.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 RPe(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qc&&qc.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)}}},ik=e=>(t.pushScopeId("data-v-fa28e7c0"),e=e(),t.popScopeId(),e),fLe={ref:"timeLine",class:"time-line"},_Le={class:"time-line__header"},bLe={class:"time-line__header__dot"},wLe={class:"time-line__header__dot__home-team team-logo"},CLe=["src"],kLe={class:"time-line__header__dot__away-team team-logo"},SLe=["src"],ELe={class:"time-line__game-events"},NLe={key:1,class:"start-line"},$Le=ik(()=>t.createElementVNode("div",null,null,-1)),BLe=ik(()=>t.createElementVNode("div",null,null,-1)),xLe=[$Le,BLe],VLe={key:1,class:"noEventText"},ALe={class:"tooltip-data"},ILe=["src"];function OLe(e,a,o,n,s,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",fLe,[t.createElementVNode("div",_Le,[t.createElementVNode("div",bLe,[t.createElementVNode("div",wLe,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,CLe)]),t.createElementVNode("div",kLe,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,SLe)])])]),t.createElementVNode("div",ELe,[o.gameData.status!==4?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(p,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:p.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(p,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(p))},[t.createVNode(r,{"game-event":p,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:a[0]||(a[0]=l=>e.$emit("player-changed",l)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",NLe,xLe)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",VLe," Aún no comienza el partido "))])],512),t.createVNode(c,{data:s.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",ALe,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,ILe)])])]),_:1},8,["data"])],64)}const TLe=ii(uLe,[["render",OLe],["__scopeId","data-v-fa28e7c0"]]),zLe={class:"game-time-line__options"},FLe={class:"game-time-line__timeline"},RLe={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",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"}})}},setup(e){j6.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"}),o=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 n=null;const s=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),p=t.ref(0),d=t.computed(()=>{let y="all";return i.value==="1er tiempo"||i.value==="1er"?y="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(y="secondHalf"),y}),l=t.computed(()=>p.value<500);function m(y){i.value=y}function h(y){r.value=y}function g(){if(window.ResizeObserver)n=new ResizeObserver(()=>{p.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{g()}),t.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(y,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",zLe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(hRe,t.mergeProps(p.value<390?o.value:a.value,{text:f=="Todo"?f:p.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:b=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",FLe,[t.createVNode(TLe,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile"])])],512))}},PLe=ii(RLe,[["__scopeId","data-v-52261d5c"]]);function DLe(e){const a=t.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();a.value.width=n.width,a.value.height=n.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const LLe=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},d0={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)}}},rk=()=>{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}))},lk=d0.setup;d0.setup=lk?(e,a)=>(rk(),lk(e,a)):rk;const jLe={ref:"gscScrollableContainer",class:"scrollable-container"},vLe={class:"scrollable-arrows"},MLe=["width","height","viewBox"],HLe=["stroke"],ULe={class:"scrollable-wrapper"},GLe={class:"scrollable-arrows"},WLe=["width","height","viewBox"],qLe=["stroke"];function JLe(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",jLe,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",vLe,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,HLe)],8,MLe))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",ULe,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",GLe,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.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:o.arrowsColor},null,8,qLe)],8,WLe))])],2)):t.createCommentVNode("",!0)],512)}const XLe=LLe(d0,[["render",JLe],["__scopeId","data-v-b548a08d"]]),ZLe=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},m0={components:{GSCSlider:XLe},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}=DLe(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}}},ck=()=>{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}))},dk=m0.setup;m0.setup=dk?(e,a)=>(ck(),dk(e,a)):ck;const YLe={ref:"myDivRef"},KLe={key:0,class:"gs-switch-container"},QLe=["onClick"],eje={key:1,class:"gs-switch-container-type"},tje=["onClick"],aje={key:2,class:"gs-switch-container-carousel"},oje=["onClick"];function nje(e,a,o,n,s,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",YLe,[o.type==0?(t.openBlock(),t.createElementBlock("div",KLe,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,QLe))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",eje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,tje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",aje,[t.createVNode(r,{arrows:o.arrow,"background-color":o.background,"px-scroll":o.pxScroll,"scroll-color":o.scrollColor,"arrows-position":o.arrowsPosition,arrowsScrollHide:o.arrowsScrollHide,"arrows-background":o.arrowsBackground,"arrows-container-bg-l":o.arrowsContainerBgL,"arrows-container-bg-r":o.arrowsContainerBgR,"arrows-margin":o.arrowsMargin,"arrows-radius":o.arrowsRadius,"arrows-border":o.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,p)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:p,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,oje))),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 mk=ZLe(m0,[["render",nje],["__scopeId","data-v-8a86dfaf"]]),fMe="",sje={class:"game-data__header"},ije={class:"game-data__header__tournament-season-dropdown"},rje={class:"game-data__header__teams-carousel"},lje={class:"game-data__body"},cje={class:"game-data__body__menu"},dje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const mje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:bT,GSCGameTimeLine:PLe,GscSwitchComponent:mk,GSCLineupsMain:bX,GSCDatosGSMain:gse,GSCVideoGame:V0e,GSCSummaryMain:mRe}}),pje=Ie(Object.assign(mje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,n=t.ref({season:[]}),s=t.ref({}),i=t.ref({}),r=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),c=t.ref([{componentName:"GSCSummaryMain",name:"Resumen"},{componentName:"GSCVideoGame",name:"Video"},{componentName:"GSCDatosGSMain",name:"Datos Golstats"},{componentName:"StatisticsMain",name:"Estadísticas"},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto"},{componentName:"GSCLineupsMain",name:"Alineaciones"}]);let p=null;const d=t.ref(null),l=t.ref(0),m=t.ref(c.value[0]);let h=t.ref("");const g=t.computed(()=>{const N=[];return s.value&&s.value.id&&(N.push({id:s.value.id,name:s.value.name,type:s.value.type}),s.value.related_seasons&&s.value.related_seasons.forEach(B=>{N.push({id:B.id,type:B.type})})),N});function y(){p=new ResizeObserver(N=>{for(const B of N)l.value=B.contentRect.width}),p.observe(d.value)}const u=t.computed(()=>{let N={};return i.value&&i.value.game_id&&(N={gameId:i.value.game_id,id:i.value.game_id,seasonId:i.value.season_id,status:i.value.game_status,dateTimeUTC:i.value.date_time_utc,homeTeam:i.value.home_team,awayTeam:i.value.visiting_team}),N});function f(N){n.value=N,n.value.id!==N.id&&(n.value=N)}function b(N){a("openmedia",N)}function E(N){$(N),N=="Estadísticas"&&(h.value="Comparativa")}function V(){h.value=""}function w(N){s.value.id!==N.id&&(s.value=N,a("change-season-id",N.id))}const S=t.computed(()=>c.value.map(N=>N.name));function $(N){m.value=c.value.find(B=>B.name===N)||c.value[0]}t.onMounted(()=>{y()});function x(N){i.value=N}return(N,B)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:d},[t.createElementVNode("div",sje,[t.createElementVNode("div",ije,[t.createVNode(t.unref(o7),{"current-season-id":e.currentSeasonId,onInput:f},null,8,["current-season-id"]),t.createVNode(t.unref(N7),{"current-season-id":e.currentSeasonId,seasons:n.value.seasons,onInput:w},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",rje,[t.createVNode(t.unref(zN),{token:r.value,"await-for-seasons":"",seasons:g.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:x,"default-game-id":o.defaultGameId},null,8,["token","seasons","default-game-id"])])]),t.createElementVNode("div",lje,[t.createElementVNode("div",cje,[t.createElementVNode("div",dje,[t.createVNode(t.unref(mk),{type:2,buttons:S.value,"font-family":"Poppins-Regular","font-size":"16px",width:l.value<400||l.value<700?"max-content":l.value<840||l.value<1050?"155px":"165px","selected-option":m.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:$},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.value.componentName),{game:u.value,subsection:t.unref(h),seasonSelected:s.value,onResetSubsection:V,onOpenmedia:b,onChangeToTab:E},null,40,["game","subsection","seasonSelected"]))])],512))}}),[["__scopeId","data-v-7c6ad7e9"]]);async function ut({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(n=>n).catch(n=>o>0?ut({url:e,options:a,retries:o-1}):n)}async function pk({seasonId:e},a=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};a&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await ut(o);return n}catch(o){if(a)return pk({seasonId:e},!1);throw new Error(o)}}async function hje({seasonId:e}){try{return(await ut({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function yje({seasonId:e}){try{return(await ut({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function gje(e,a,o,n,s,i,r=!1){const c=o.map(p=>p===1?2:p===2?1:3);return e.filter(p=>{const d=i&&p[s.teamId]?p[s.teamId]!==i:!1,l=a===1?2:1;return(r||n.includes(p[s.gameId]))&&(!a||(d?l:a)===p[s.playingAs])&&(o.includes(p[s.matchResult])&&p[s.teamId]===i||c.includes(p[s.matchResult])&&p[s.teamId]!==i)})}function hk(e,a,o,n,s){return a.length===2&&o.length===3&&n.length===6?e:e.filter(i=>a.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function yk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function uje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:n}=await ut({url:o});return n}catch(o){return Promise.reject(o)}}async function fje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ut({url:a})).data.data}catch(a){return Promise.reject(a)}}async function _je({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ut({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const bje=["categoryId","matchLapse","section","matchResult","playingAs","total"];let p0=null;function gk(){return p0||(p0=Vi(bje)),p0}async function wje(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function uk({seasonId:e,teamId:a}){try{return await ut({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function Cje(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ut({url:a})}catch(a){return Promise.reject(a)}}async function kje(e){try{return await ut({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const Sje={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,n){return gje(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],gk(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(a))a[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),a[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let n=Object.keys(a.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=a.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].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},o=!1){try{const n=await pk({seasonId:a["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await yk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await wje({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:a,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=a("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function Eje({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ut({url:a});return o}catch(a){return Promise.reject(a)}}const Nje=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let h0=null;function $je(){return h0||(h0=Vi(Nje)),h0}class Jc{constructor(){Oe(this,"maximumLiveSection",1);Oe(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:[]});Oe(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,o,n){n&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,o)}increaseReceivedByOne(a,o,n){n&&(this.setMaximumLiveSection(a),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,o)}increaseTrendLiveAccumulatedByOne(a,o,n){for(let s=o-1;s<a.accumulated.length;s++)a.accumulated[s]+=n}decreaseAccomplishedLiveByOne(a,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o))}decreaseReceivedLiveByOne(a,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,o,n){for(let s=a.accumulated.length-1;s>=o-1;s--)a.accumulated[s]-=n}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,o){return a.map(n=>n/o)}calculateRanking(a,o,n,s,i,r,c,p){let d=[];s===3&&a&&a.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(a.reduce((m,h)=>{const g=h[o.playingAs]===1,y=g?"1":"2",u=m.get(h[o.gameId]);if(u)u[y]?u[y].arrayPlays.push(h):u[y]={numberTeamId:h[o.teamId],arrayPlays:[h]};else{const f={numberMatchResult:h[o.matchResult]};g&&(f[1]={numberTeamId:h[o.teamId],arrayPlays:[h]}),m.set(h[o.gameId],f)}return m},new Map).values()).reduce((m,h)=>{const g=n.playingAs.length===2?"both":n.playingAs[0].toString();return(g==="both"&&(h[1].numberTeamId===n.teamId||h[2].numberTeamId===n.teamId)||g!=="both"&&h[g].numberTeamId===n.teamId)&&n.matchResult.includes(h.numberMatchResult)&&m.push(...h[1].arrayPlays,...h[2].arrayPlays),m},[]).filter(m=>n.sections.includes(m[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",p)}setTeamRanking(a,o,n,s,i,r,c){let p=null,d=null;o===3&&(p=new Map,d={},a.forEach(h=>{const g=p.get(h[n.gameId]);g?g[h[n.teamId.toString()]]?g[h[n.teamId.toString()]]+=h[n.total]:g[h[n.teamId.toString()]]=h[n.total]:p.set(h[n.gameId],{[h[n.teamId.toString()]]:h[n.total]})}),Array.from(p.values()).forEach(h=>{const[g,y]=Object.keys(h).map(f=>f),u=h[g]+h[y];this.addPassesAvgByTeam(d,g,u?h[g]/u:0),this.addPassesAvgByTeam(d,y,u?h[y]/u:0)}));const l=i.sort((h,g)=>h.team_id-g.team_id).map(h=>{if(o===3){const g=d[h.team_id.toString()];return{teamId:h.team_id,points:g?g.numberTotalPassesAvg/g.numberGamesCount:0,total:g?g.numberTotalPassesAvg:0}}else{const g=a.reduce((y,u)=>u[n.teamId]===h.team_id&&o===u[n.categoryId]?y+u[n.total]:y,0);return{teamId:h.team_id,points:h[`${c}FilterGames`]?g/h[`${c}FilterGames`]:0,total:g}}}).sort((h,g)=>g.points-h.points);this.accomplished.arrayRankings=l;const m=l.findIndex(h=>h.teamId===s);o===3&&(this.accomplished.avgPreGame=l[m].points),this[r].ranking=m+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,n){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=n):a[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class re{constructor(a,o,n,s,i,r,c,p,d,l){Oe(this,"id","");Oe(this,"generalId",0);Oe(this,"name","");Oe(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"accomplishedCategoryIds",[]);Oe(this,"receivedCategoryIds",[]);Oe(this,"generalCategoriesIds",{accomplished:0,received:0});Oe(this,"specialMention","");Oe(this,"homeTeam",new Jc);Oe(this,"visitingTeam",new Jc);Oe(this,"isLeagueDataCalculated",!1);Oe(this,"leagueAccomplishedMax",0);Oe(this,"leagueReceivedMax",0);Oe(this,"leagueAccomplishedAvg",0);Oe(this,"leagueReceivedAvg",0);Oe(this,"leagueAccomplishedAccumulator",0);Oe(this,"leagueReceivedAccumulator",0);Oe(this,"homeTeamType","homeTeam");Oe(this,"visitingTeamType","visitingTeam");Oe(this,"betOnly",!1);Oe(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=p||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,n){a.length===0||!n||this.isLeagueDataCalculated||(a.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,n,s,i){!n||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[a].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[a].increaseReceivedByOne(r[s.section],r[s.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,n,s,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(a,o,n,s,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>a===n||`${a}_r`===n)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(o=>a===o)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Jc,this.visitingTeam=new Jc,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 Bje={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new re([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new re([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new re([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new re([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new re([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new re([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new re([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new re([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new re([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new re([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new re([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new re([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new re([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new re([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new re([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new re([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new re([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new re([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new re([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new re([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new re([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new re([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new re([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 re([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new re([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new re([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new re([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new re([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new re([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new re([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new re([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new re([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new re([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new re([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},xje=[{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}],Vje=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let y0=null;function Aje(){return y0||(y0=Vi(Vje)),y0}const Ije=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let g0=null;function Oje(){return g0||(g0=Vi(Ije)),g0}function Xc(e,a,o){return[o.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function fk(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 u0(e,a,o){let n=[...a];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}const Tje=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],zje={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:gk(),indexesTSP:$je(),indexesLS:Aje(),indexesTLP:Oje(),nextGamesDataStructure:Bje,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,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 xje.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return hk(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return hk(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,o)=>a+o[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,o)=>a+o[2],0)},filledDataStructure(e,a){if(e.currentSeasonPlays)for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&n.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&n.visitingTeam.resetTotals(),n.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),n.addTeamPlays(n.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),n.addTeamPlays(n.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((o,n)=>o.priority-n.priority)},statisticData(e,a){for(const o of Object.values(a.filledDataStructure))if(o.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&o.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return o.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&&e.gameForAnalysis.is_live&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a,e.currentSeasonTeams.forEach(o=>{o.playedGames=e.currentSeasonGames.reduce((n,s)=>{if(s.game_status===1&&(s.home_team===o.team_id||s.visiting_team===o.team_id)){const i=s.score[0]-s.score[1],r=s.home_team===o.team_id;n.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return n},[])})},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&&this._vm.$socket.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:o=!1}){if(console.count("updateFilters"),o){if(!a||!a.local||!a.local.statistics||!a.visit||!a.visit.statistics)return;e.homeTeamFilter=Iu(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Iu(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 o=Object.values(e.nextGamesDataStructure);o.forEach(n=>{for(const s of Object.values(n.subcategories))s.resetMentions()}),o.forEach(n=>{for(const s of a)for(const i of Object.values(n.subcategories))i.addSpecialMention(s[0],s[1],s[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 n=Xc(a,e.indexesTLP,e.categoriesMap);for(const s of Object.values(e.nextGamesDataStructure))for(const i of Object.values(s.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===n[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",n[e.indexesTSP.teamId],n,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);if(oB(n,a))return;let s="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";n&&(s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Xc(n,e.indexesTLP,e.categoriesMap),c=u0(n,r,e.indexesTLP),p=Xc(a,e.indexesTLP,e.categoriesMap),d=u0(a,p,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const m of Object.values(l.subcategories))n&&(m.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&m.subtractLivePlay(s,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),m.addLivePlay(i,p[e.indexesTSP.teamId],p,e.indexesTSP,e.isLive,o),d&&m.addLivePlay(i,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,o);e.livePlays.set(a[e.indexesTLP.playId],a)},deleteLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);let s="";if(n){s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(n[e.indexesTLP.playId]);const i=Xc(n,e.indexesTLP,e.categoriesMap),r=u0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const p of Object.values(c.subcategories))p.subtractLivePlay(s,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&p.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o)}},clearLiveTotals(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.homeTeam.resetTotalsLive(),o.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,a){e.statistics=a},updateOldSeasonId(e,a){e.oldSeasonId=a},addRankingInSubcategories(e,{getters:a,isPremiumAccount:o}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(r=>e.homeTeamFilter.playingAs.includes(r.playingAs)&&e.homeTeamFilter.matchResult.includes(r.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(r=>e.visitingTeamFilter.playingAs.includes(r.playingAs)&&e.visitingTeamFilter.matchResult.includes(r.matchResult)).length});const n=[],s=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))n.push(r);a.rankingData.forEach(i=>{for(const r of n)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){s.has(r.id)?s.get(r.id).push(i):s.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=fk(a)},setVisitingGames(e,a){e.visitingGames=fk(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(n=>{const s=e.categoriesMap.get(n);s?s.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(n,[o.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:a},{command:o}){o==="on"?a("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):a("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},a){try{const r=await kje({gameId:a.gameId});if(r){var o=[],n=[],s={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(r.data).length!==0&&(o=r.data.data.filter(c=>c[1]==a.homeTeam),n=r.data.data.filter(c=>c[1]==a.awayTeam),s=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",n),e("setHomeGames",s),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(r){return Promise.reject(r)}},async fillStatisticDataPostMatch({commit:e,dispatch:a},o){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let n=[];e("updateGameForAnalysis",o.gameInfo),n.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(n)}catch(n){throw new Error(n)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:n,isTeamsAnalysis:s,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:p=null,isCupGame:d=!1}){try{let l={},m=e.seasonId!==Number(i);const h=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),m&&o("setSeasonId",i),o("updateGameId",Number(n)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const g=await a("getCurrentSeasonGames",Number(n));if(o("leagueGeneral/updateCurrentSeasonGames",g,{root:!0}),l=g.find(y=>y.game_id===Number(n)),!l&&p&&(l=p),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:n,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const y=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",y,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(y=>l.home_team===y.team_id))&&h.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),s?l.game_status!==1?(await a("fillStatisticData",{gameId:n,gameinfo:l,promises:h,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),h.push(a("fillStatisticDataPostMatch",{game:n,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(h)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:n,state:s},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:p=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",r),r.is_live&&c.push(a("getCurrentLiveGamePlays",i)),c.push(a("getSpecialMentionsByGame",i)),c.push(a("getHomeTeamPlays")),c.push(a("getVisitingTeamPlays")),c.push(a("getCurrentSeasonPlays")),p&&c.push(Eje(p)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]}),p){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:s.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:n},{gameId:s,isFromBet:i}){try{const r=Number(s);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(p=>{for(const d of p.seasons)if(d.id===e.seasonId)return!0;return!1});n("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){n("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(p=>p.game_id===r);c&&n("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),n("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else n("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await _je({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:n,games:s,past_season_id:i,tournament_id:r}=await uje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=Tje.find(p=>p.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",n[0]),e("setAway",n[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((p,d)=>(d.game_status===1&&(p+=1),p),0)),s}catch(n){return Promise.reject(n)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:n}=await yk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",n),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((s,i)=>(i.game_status===1&&(s+=1),s),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await Cje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateCurrentSeasonTeams",o.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:a}){try{const o=a.usePastSeasonId?a.pastSeasonId:a.seasonId,n=await yje({seasonId:o});e("updateSeasonStatistics",n),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:n}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await uk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.home_team});o.data&&(e("updateHomeTeamPlays",o.data.data),e("setHomeGames",o.data.games))}catch(o){return Promise.reject(o)}},async getVisitingTeamPlays({commit:e,state:a}){try{const o=await uk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.visiting_team});o.data&&(e("updateVisitingTeamPlays",o.data.data),e("setVisitingGames",o.data.games))}catch(o){return Promise.reject(o)}},async getCurrentSeasonPlays({commit:e,state:a}){try{const o=await hje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateStats",o)}catch(o){return Promise.reject(new Error(o))}},async getCurrentLiveGamePlays({state:e,commit:a},o){try{const n=await fje({gameId:o});e.livePlays=new Map,n.forEach(s=>{e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)})}catch(n){throw new Error(n)}},socket_new({state:e,commit:a},o){const n=o[1];(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("addLiveGamePlay",n)},socket_update({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===n[e.indexesTLP.teamId])&&a("updateLiveGamePlay",n)},socket_delete({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("deleteLiveGamePlay",n)},exitChannel({state:e,getters:a,rootState:o,rootGetters:n,commit:s}){const i=n["loginGeneral/getPremiumAccount"];a.isLive&&i&&(s("updateShowLiveData",!1),s("clearLiveTotals"),e.livePlays.clear(),this._vm.$socket.client.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.homeTeam.resetTotalsLive(),n.visitingTeam.resetTotalsLive(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.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 Fje(){try{const{data:e}=await ut({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const Rje={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(o=>({...o.tournament,seasons:o.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 o=await Fje();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function Pje({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ut({url:n})).data}catch(n){return Promise.reject(n)}}async function Dje({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ut({url:n})).data}catch(n){return Promise.reject(n)}}const _k=(e,a)=>{let o={};return e.forEach((n,s)=>{s==3&&(a[0]==35||a[0]==54)&&(a[s]==2?a[s]=1:a[s]=2),s==2&&(a[0]==35||a[0]==54)&&(a[s]==1?a[s]=2:a[s]==2&&(a[s]=1)),o[n]=a[s]}),o},bk=(e,a)=>e.filter(n=>{const s=a.playingAs.includes(n.playing_as),i=a.matchResult.includes(n.match_result),r=a.sections.includes(n.section);return s&&i&&r}),wk=[{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,o,n){return typeof n>"u"||+n==0?Math[a](o):(o=+o,n=+n,isNaN(o)||!(typeof n=="number"&&n%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-n:-n))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function Ck(e,a){let o=a*-1;return Math.ceil10(e,o)}const Lje={general:Rje,...Sje,...zje,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const n=e.xGLocalPlays,s="homeTeamFilter",i=o.nextGeneral[s];return bk(n,i)},playsAway:(e,a,o)=>{const n=e.xGVisitingPlays,s="visitingTeamFilter",i=o.nextGeneral[s];return bk(n,i)},goalsQtyLocal:(e,a)=>{const o=wk.find(n=>n.name==="Goles");return a.playsLocal.filter(n=>o.categories.includes(n.category_id)).length},goalsQtyAway:(e,a)=>{const o=wk.find(n=>n.name==="Goles");return a.playsAway.filter(n=>o.categories.includes(n.category_id)).length},shotsOnGoalQtyLocal:(e,a)=>a.playsLocal.filter(o=>o.category_id===510).length,shotsOnGoalQtyAway:(e,a)=>a.playsAway.filter(o=>o.category_id===510).length,xGLocal:(e,a)=>{const o=new Set;let n=a.playsLocal.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Ck(n,2)},xGAway:(e,a)=>{const o=new Set;let n=a.playsAway.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Ck(n,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>_k(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>_k(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:n,postMatch:s=!1}){try{var i={};s?i=await Dje({seasonId:a,localTeamId:o,visitingTeamId:n}):i=await Pje({seasonId:a,localTeamId:o,visitingTeamId:n}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function jje(e){for(const[a,o]of Object.entries(Lje))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=pje,_t.registerStoreModules=jje,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|