@golstats/gsc-game-data 1.0.357 → 1.0.359

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.
@@ -4141,7 +4141,7 @@ uniform ${De} ${He} u_${rt};
4141
4141
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...s){const z=new this(o);return s.forEach(W=>z.set(W)),z}static accessor(o){const s=(this[JR]=this[JR]={accessors:{}}).accessors,z=this.prototype;function W(v){const g=rb(v);s[g]||(mft(z,v),s[g]=!0)}return An.isArray(o)?o.forEach(W):W(o),this}};mp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),An.reduceDescriptors(mp.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(z){this[s]=z}}}),An.freezeMethods(mp);function Yk(e,o){const s=this||ab,z=o||s,W=mp.from(z.headers);let v=z.data;return An.forEach(e,function(g){v=g.call(s,v,W.normalize(),o?o.status:void 0)}),W.normalize(),v}function $R(e){return!!(e&&e.__CANCEL__)}function c2(e,o,s){vl.call(this,e??"canceled",vl.ERR_CANCELED,o,s),this.name="CanceledError"}An.inherits(c2,vl,{__CANCEL__:!0});function KR(e,o,s){const z=s.config.validateStatus;!s.status||!z||z(s.status)?e(s):o(new vl("Request failed with status code "+s.status,[vl.ERR_BAD_REQUEST,vl.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function gft(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function yft(e,o){e=e||10;const s=new Array(e),z=new Array(e);let W=0,v=0,g;return o=o!==void 0?o:1e3,function(r){const b=Date.now(),d=z[v];g||(g=b),s[W]=r,z[W]=b;let a=v,_=0;for(;a!==W;)_+=s[a++],a=a%e;if(W=(W+1)%e,W===v&&(v=(v+1)%e),b-g<o)return;const y=d&&b-d;return y?Math.round(_*1e3/y):void 0}}function vft(e,o){let s=0,z=1e3/o,W,v;const g=(r,b=Date.now())=>{s=b,W=null,v&&(clearTimeout(v),v=null),e(...r)};return[(...r)=>{const b=Date.now(),d=b-s;d>=z?g(r,b):(W=r,v||(v=setTimeout(()=>{v=null,g(W)},z-d)))},()=>W&&g(W)]}const L5=(e,o,s=3)=>{let z=0;const W=yft(50,250);return vft(v=>{const g=v.loaded,r=v.lengthComputable?v.total:void 0,b=g-z,d=W(b),a=g<=r;z=g;const _={loaded:g,total:r,progress:r?g/r:void 0,bytes:b,rate:d||void 0,estimated:d&&r&&a?(r-g)/d:void 0,event:v,lengthComputable:r!=null,[o?"download":"upload"]:!0};e(_)},s)},QR=(e,o)=>{const s=e!=null;return[z=>o[0]({lengthComputable:s,total:e,loaded:z}),o[1]]},eV=e=>(...o)=>An.asap(()=>e(...o)),bft=wh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,wh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(wh.origin),wh.navigator&&/(msie|trident)/i.test(wh.navigator.userAgent)):()=>!0,xft=wh.hasStandardBrowserEnv?{write(e,o,s,z,W,v,g){if(typeof document>"u")return;const r=[`${e}=${encodeURIComponent(o)}`];An.isNumber(s)&&r.push(`expires=${new Date(s).toUTCString()}`),An.isString(z)&&r.push(`path=${z}`),An.isString(W)&&r.push(`domain=${W}`),v===!0&&r.push("secure"),An.isString(g)&&r.push(`SameSite=${g}`),document.cookie=r.join("; ")},read(e){if(typeof document>"u")return null;const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _ft(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wft(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function tV(e,o,s){let z=!_ft(o);return e&&(z||s==!1)?wft(e,o):o}const aV=e=>e instanceof mp?{...e}:e;function tg(e,o){o=o||{};const s={};function z(d,a,_,y){return An.isPlainObject(d)&&An.isPlainObject(a)?An.merge.call({caseless:y},d,a):An.isPlainObject(a)?An.merge({},a):An.isArray(a)?a.slice():a}function W(d,a,_,y){if(An.isUndefined(a)){if(!An.isUndefined(d))return z(void 0,d,_,y)}else return z(d,a,_,y)}function v(d,a){if(!An.isUndefined(a))return z(void 0,a)}function g(d,a){if(An.isUndefined(a)){if(!An.isUndefined(d))return z(void 0,d)}else return z(void 0,a)}function r(d,a,_){if(_ in o)return z(d,a);if(_ in e)return z(void 0,d)}const b={url:v,method:v,data:v,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:r,headers:(d,a,_)=>W(aV(d),aV(a),_,!0)};return An.forEach(Object.keys({...e,...o}),function(d){const a=b[d]||W,_=a(e[d],o[d],d);An.isUndefined(_)&&a!==r||(s[d]=_)}),s}const rV=e=>{const o=tg({},e);let{data:s,withXSRFToken:z,xsrfHeaderName:W,xsrfCookieName:v,headers:g,auth:r}=o;if(o.headers=g=mp.from(g),o.url=WR(tV(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),r&&g.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),An.isFormData(s)){if(wh.hasStandardBrowserEnv||wh.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(An.isFunction(s.getHeaders)){const b=s.getHeaders(),d=["content-type","content-length"];Object.entries(b).forEach(([a,_])=>{d.includes(a.toLowerCase())&&g.set(a,_)})}}if(wh.hasStandardBrowserEnv&&(z&&An.isFunction(z)&&(z=z(o)),z||z!==!1&&bft(o.url))){const b=W&&v&&xft.read(v);b&&g.set(W,b)}return o},kft=typeof XMLHttpRequest<"u",Sft=kft&&function(e){return new Promise(function(o,s){const z=rV(e);let W=z.data;const v=mp.from(z.headers).normalize();let{responseType:g,onUploadProgress:r,onDownloadProgress:b}=z,d,a,_,y,x;function u(){y&&y(),x&&x(),z.cancelToken&&z.cancelToken.unsubscribe(d),z.signal&&z.signal.removeEventListener("abort",d)}let n=new XMLHttpRequest;n.open(z.method.toUpperCase(),z.url,!0),n.timeout=z.timeout;function i(){if(!n)return;const l=mp.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),h={data:!g||g==="text"||g==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};KR(function(m){o(m),u()},function(m){s(m),u()},h),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(s(new vl("Request aborted",vl.ECONNABORTED,e,n)),n=null)},n.onerror=function(l){const h=l&&l.message?l.message:"Network Error",m=new vl(h,vl.ERR_NETWORK,e,n);m.event=l||null,s(m),n=null},n.ontimeout=function(){let l=z.timeout?"timeout of "+z.timeout+"ms exceeded":"timeout exceeded";const h=z.transitional||qR;z.timeoutErrorMessage&&(l=z.timeoutErrorMessage),s(new vl(l,h.clarifyTimeoutError?vl.ETIMEDOUT:vl.ECONNABORTED,e,n)),n=null},W===void 0&&v.setContentType(null),"setRequestHeader"in n&&An.forEach(v.toJSON(),function(l,h){n.setRequestHeader(h,l)}),An.isUndefined(z.withCredentials)||(n.withCredentials=!!z.withCredentials),g&&g!=="json"&&(n.responseType=z.responseType),b&&([_,x]=L5(b,!0),n.addEventListener("progress",_)),r&&n.upload&&([a,y]=L5(r),n.upload.addEventListener("progress",a),n.upload.addEventListener("loadend",y)),(z.cancelToken||z.signal)&&(d=l=>{n&&(s(!l||l.type?new c2(null,e,n):l),n.abort(),n=null)},z.cancelToken&&z.cancelToken.subscribe(d),z.signal&&(z.signal.aborted?d():z.signal.addEventListener("abort",d)));const f=gft(z.url);if(f&&wh.protocols.indexOf(f)===-1){s(new vl("Unsupported protocol "+f+":",vl.ERR_BAD_REQUEST,e));return}n.send(W||null)})},Tft=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let z=new AbortController,W;const v=function(d){if(!W){W=!0,r();const a=d instanceof Error?d:this.reason;z.abort(a instanceof vl?a:new c2(a instanceof Error?a.message:a))}};let g=o&&setTimeout(()=>{g=null,v(new vl(`timeout ${o} of ms exceeded`,vl.ETIMEDOUT))},o);const r=()=>{e&&(g&&clearTimeout(g),g=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(v):d.removeEventListener("abort",v)}),e=null)};e.forEach(d=>d.addEventListener("abort",v));const{signal:b}=z;return b.unsubscribe=()=>An.asap(r),b}},Cft=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let z=0,W;for(;z<s;)W=z+o,yield e.slice(z,W),z=W},Eft=async function*(e,o){for await(const s of Aft(e))yield*Cft(s,o)},Aft=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:z}=await o.read();if(s)break;yield z}}finally{await o.cancel()}},nV=(e,o,s,z)=>{const W=Eft(e,o);let v=0,g,r=b=>{g||(g=!0,z&&z(b))};return new ReadableStream({async pull(b){try{const{done:d,value:a}=await W.next();if(d){r(),b.close();return}let _=a.byteLength;if(s){let y=v+=_;s(y)}b.enqueue(new Uint8Array(a))}catch(d){throw r(d),d}},cancel(b){return r(b),W.return()}},{highWaterMark:2})},iV=64*1024,{isFunction:B5}=An,Mft=(({Request:e,Response:o})=>({Request:e,Response:o}))(An.global),{ReadableStream:oV,TextEncoder:sV}=An.global,lV=(e,...o)=>{try{return!!e(...o)}catch{return!1}},Pft=e=>{e=An.merge.call({skipUndefined:!0},Mft,e);const{fetch:o,Request:s,Response:z}=e,W=o?B5(o):typeof fetch=="function",v=B5(s),g=B5(z);if(!W)return!1;const r=W&&B5(oV),b=W&&(typeof sV=="function"?(u=>n=>u.encode(n))(new sV):async u=>new Uint8Array(await new s(u).arrayBuffer())),d=v&&r&&lV(()=>{let u=!1;const n=new s(wh.origin,{body:new oV,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!n}),a=g&&r&&lV(()=>An.isReadableStream(new z("").body)),_={stream:a&&(u=>u.body)};W&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!_[u]&&(_[u]=(n,i)=>{let f=n&&n[u];if(f)return f.call(n);throw new vl(`Response type '${u}' is not supported`,vl.ERR_NOT_SUPPORT,i)})});const y=async u=>{if(u==null)return 0;if(An.isBlob(u))return u.size;if(An.isSpecCompliantForm(u))return(await new s(wh.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(An.isArrayBufferView(u)||An.isArrayBuffer(u))return u.byteLength;if(An.isURLSearchParams(u)&&(u=u+""),An.isString(u))return(await b(u)).byteLength},x=async(u,n)=>An.toFiniteNumber(u.getContentLength())??y(n);return async u=>{let{url:n,method:i,data:f,signal:l,cancelToken:h,timeout:m,onDownloadProgress:w,onUploadProgress:T,responseType:A,headers:C,withCredentials:I="same-origin",fetchOptions:L}=rV(u),E=o||fetch;A=A?(A+"").toLowerCase():"text";let P=Tft([l,h&&h.toAbortSignal()],m),M=null;const S=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let B;try{if(T&&d&&i!=="get"&&i!=="head"&&(B=await x(C,f))!==0){let H=new s(n,{method:"POST",body:f,duplex:"half"}),U;if(An.isFormData(f)&&(U=H.headers.get("content-type"))&&C.setContentType(U),H.body){const[J,re]=QR(B,L5(eV(T)));f=nV(H.body,iV,J,re)}}An.isString(I)||(I=I?"include":"omit");const k=v&&"credentials"in s.prototype,O={...L,signal:P,method:i.toUpperCase(),headers:C.normalize().toJSON(),body:f,duplex:"half",credentials:k?I:void 0};M=v&&new s(n,O);let D=await(v?E(M,L):E(n,O));const V=a&&(A==="stream"||A==="response");if(a&&(w||V&&S)){const H={};["status","statusText","headers"].forEach(q=>{H[q]=D[q]});const U=An.toFiniteNumber(D.headers.get("content-length")),[J,re]=w&&QR(U,L5(eV(w),!0))||[];D=new z(nV(D.body,iV,J,()=>{re&&re(),S&&S()}),H)}A=A||"text";let G=await _[An.findKey(_,A)||"text"](D,u);return!V&&S&&S(),await new Promise((H,U)=>{KR(H,U,{data:G,headers:mp.from(D.headers),status:D.status,statusText:D.statusText,config:u,request:M})})}catch(k){throw S&&S(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new vl("Network Error",vl.ERR_NETWORK,u,M),{cause:k.cause||k}):vl.from(k,k&&k.code,u,M)}}},Ift=new Map,cV=e=>{let o=e&&e.env||{};const{fetch:s,Request:z,Response:W}=o,v=[z,W,s];let g=v.length,r=g,b,d,a=Ift;for(;r--;)b=v[r],d=a.get(b),d===void 0&&a.set(b,d=r?new Map:Pft(o)),a=d;return d};cV();const Jk={http:qpt,xhr:Sft,fetch:{get:cV}};An.forEach(Jk,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const uV=e=>`- ${e}`,Lft=e=>An.isFunction(e)||e===null||e===!1;function Bft(e,o){e=An.isArray(e)?e:[e];const{length:s}=e;let z,W;const v={};for(let g=0;g<s;g++){z=e[g];let r;if(W=z,!Lft(z)&&(W=Jk[(r=String(z)).toLowerCase()],W===void 0))throw new vl(`Unknown adapter '${r}'`);if(W&&(An.isFunction(W)||(W=W.get(o))))break;v[r||"#"+g]=W}if(!W){const g=Object.entries(v).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=s?g.length>1?`since :
4142
4142
  `+g.map(uV).join(`
4143
4143
  `):" "+uV(g[0]):"as no adapter specified";throw new vl("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return W}const dV={getAdapter:Bft,adapters:Jk};function $k(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new c2(null,e)}function hV(e){return $k(e),e.headers=mp.from(e.headers),e.data=Yk.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dV.getAdapter(e.adapter||ab.adapter,e)(e).then(function(o){return $k(e),o.data=Yk.call(e,e.transformResponse,o),o.headers=mp.from(o.headers),o},function(o){return $R(o)||($k(e),o&&o.response&&(o.response.data=Yk.call(e,e.transformResponse,o.response),o.response.headers=mp.from(o.response.headers))),Promise.reject(o)})}const pV="1.13.1",O5={};["object","boolean","number","function","string","symbol"].forEach((e,o)=>{O5[e]=function(s){return typeof s===e||"a"+(o<1?"n ":" ")+e}});const fV={};O5.transitional=function(e,o,s){function z(W,v){return"[Axios v"+pV+"] Transitional option '"+W+"'"+v+(s?". "+s:"")}return(W,v,g)=>{if(e===!1)throw new vl(z(v," has been removed"+(o?" in "+o:"")),vl.ERR_DEPRECATED);return o&&!fV[v]&&(fV[v]=!0,console.warn(z(v," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(W,v,g):!0}},O5.spelling=function(e){return(o,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Oft(e,o,s){if(typeof e!="object")throw new vl("options must be an object",vl.ERR_BAD_OPTION_VALUE);const z=Object.keys(e);let W=z.length;for(;W-- >0;){const v=z[W],g=o[v];if(g){const r=e[v],b=r===void 0||g(r,v,e);if(b!==!0)throw new vl("option "+v+" must be "+b,vl.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new vl("Unknown option "+v,vl.ERR_BAD_OPTION)}}const z5={assertOptions:Oft,validators:O5},X0=z5.validators;let ag=class{constructor(o){this.defaults=o||{},this.interceptors={request:new XR,response:new XR}}async request(o,s){try{return await this._request(o,s)}catch(z){if(z instanceof Error){let W={};Error.captureStackTrace?Error.captureStackTrace(W):W=new Error;const v=W.stack?W.stack.replace(/^.+\n/,""):"";try{z.stack?v&&!String(z.stack).endsWith(v.replace(/^.+\n.+\n/,""))&&(z.stack+=`
4144
- `+v):z.stack=v}catch{}}throw z}}_request(o,s){typeof o=="string"?(s=s||{},s.url=o):s=o||{},s=tg(this.defaults,s);const{transitional:z,paramsSerializer:W,headers:v}=s;z!==void 0&&z5.assertOptions(z,{silentJSONParsing:X0.transitional(X0.boolean),forcedJSONParsing:X0.transitional(X0.boolean),clarifyTimeoutError:X0.transitional(X0.boolean)},!1),W!=null&&(An.isFunction(W)?s.paramsSerializer={serialize:W}:z5.assertOptions(W,{encode:X0.function,serialize:X0.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),z5.assertOptions(s,{baseUrl:X0.spelling("baseURL"),withXsrfToken:X0.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let g=v&&An.merge(v.common,v[s.method]);v&&An.forEach(["delete","get","head","post","put","patch","common"],u=>{delete v[u]}),s.headers=mp.concat(g,v);const r=[];let b=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(s)===!1||(b=b&&u.synchronous,r.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let a,_=0,y;if(!b){const u=[hV.bind(this),void 0];for(u.unshift(...r),u.push(...d),y=u.length,a=Promise.resolve(s);_<y;)a=a.then(u[_++],u[_++]);return a}y=r.length;let x=s;for(;_<y;){const u=r[_++],n=r[_++];try{x=u(x)}catch(i){n.call(this,i);break}}try{a=hV.call(this,x)}catch(u){return Promise.reject(u)}for(_=0,y=d.length;_<y;)a=a.then(d[_++],d[_++]);return a}getUri(o){o=tg(this.defaults,o);const s=tV(o.baseURL,o.url,o.allowAbsoluteUrls);return WR(s,o.params,o.paramsSerializer)}};An.forEach(["delete","get","head","options"],function(e){ag.prototype[e]=function(o,s){return this.request(tg(s||{},{method:e,url:o,data:(s||{}).data}))}}),An.forEach(["post","put","patch"],function(e){function o(s){return function(z,W,v){return this.request(tg(v||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:z,data:W}))}}ag.prototype[e]=o(),ag.prototype[e+"Form"]=o(!0)});let zft=class FH{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(W){s=W});const z=this;this.promise.then(W=>{if(!z._listeners)return;let v=z._listeners.length;for(;v-- >0;)z._listeners[v](W);z._listeners=null}),this.promise.then=W=>{let v;const g=new Promise(r=>{z.subscribe(r),v=r}).then(W);return g.cancel=function(){z.unsubscribe(v)},g},o(function(W,v,g){z.reason||(z.reason=new c2(W,v,g),s(z.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const s=this._listeners.indexOf(o);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const o=new AbortController,s=z=>{o.abort(z)};return this.subscribe(s),o.signal.unsubscribe=()=>this.unsubscribe(s),o.signal}static source(){let o;return{token:new FH(function(s){o=s}),cancel:o}}};function Nft(e){return function(o){return e.apply(null,o)}}function Dft(e){return An.isObject(e)&&e.isAxiosError===!0}const Kk={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kk).forEach(([e,o])=>{Kk[o]=e});function mV(e){const o=new ag(e),s=IR(ag.prototype.request,o);return An.extend(s,ag.prototype,o,{allOwnKeys:!0}),An.extend(s,o,null,{allOwnKeys:!0}),s.create=function(z){return mV(tg(e,z))},s}const md=mV(ab);md.Axios=ag,md.CanceledError=c2,md.CancelToken=zft,md.isCancel=$R,md.VERSION=pV,md.toFormData=P5,md.AxiosError=vl,md.Cancel=md.CanceledError,md.all=function(e){return Promise.all(e)},md.spread=Nft,md.isAxiosError=Dft,md.mergeConfig=tg,md.AxiosHeaders=mp,md.formToJSON=e=>YR(An.isHTMLForm(e)?new FormData(e):e),md.getAdapter=dV.getAdapter,md.HttpStatusCode=Kk,md.default=md;const Fft={class:"header-row controls-row"},Rft={class:"input-wrapper"},Vft={class:"input-container"},jft=["min","max"],Uft={class:"input-wrapper"},Gft={class:"input-container"},Hft=["min","max"],Zft={class:"timeline-container"},Wft={class:"team-circle team-circle-top"},Xft=["src"],qft={class:"team-circle team-circle-bottom"},Yft=["src"],Jft={class:"timeline-line"},$ft={key:0,class:"event-icon event-icon-top"},Kft={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qft={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a0t={class:"minute-ball minute-ball-center"},r0t={key:1,class:"event-icon event-icon-bottom"},n0t={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},c0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},u0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},d0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},h0t={__name:"TimeLine",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:o}){const s=t.ref(0),z=t.ref(96),W=t.ref("1"),v=t.ref("2"),g=t.ref(0),r=t.ref(45),b=t.ref(96),d=t.ref(0),a=t.ref(0),_=t.ref("0px"),y=t.ref([]),x=o,u=e,n=md.create({headers:{Authorization:`${u.token}`}}),i=t.ref([]);let f=null;const l=t.ref(null),h=t.ref(!1),m=t.ref(0),w=t.ref(0),T=t.ref(!1),A=t.ref(!1);let C=!1,I=0;const L=t.ref(0),E=t.ref(!1),P=t.ref(!1),M=t.ref(96),S=t.ref(null);function B(){if(S.value){const pe=S.value,ne=pe.scrollWidth-pe.clientWidth,le=pe.scrollLeft,ie=pe.scrollWidth>pe.clientWidth;T.value=ie&&le>0,A.value=ie&&Math.ceil(le)<Math.floor(ne)}}function k(){if(l.value){const pe=l.value.parentElement.clientWidth;m.value=pe,w.value===0&&(w.value=pe-90),t.nextTick(()=>{B()})}}function O(){if(i.value.length>0){const pe=Math.max(...i.value.map(ne=>ne.minute));M.value=pe,z.value=M.value}}async function D(){try{const pe=await n.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${u.gameId}`);if(pe.data&&pe.data.plays){const ne=pe.data.plays.find(ie=>{var me;return ie.event_type_id===6&&((me=ie.comments)==null?void 0:me.includes("El árbitro silba el Final del Primer Tiempo"))});ne&&(g.value=ne.minute);const le=Math.max(...pe.data.plays.map(ie=>ie.minute));b.value=le,M.value=le,z.value=M.value,y.value=[];for(let ie=0;ie<=g.value;ie++){const me=pe.data.plays.filter(ye=>{var ke;return ye.minute===ie&&ye.match_lapse===1&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13||ye.event_type_id===6&&((ke=ye.comments)==null?void 0:ke.includes("El árbitro silba el Final del Primer Tiempo")))}),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:1,event:ve.length>0?ve:null})}for(let ie=r.value;ie<=b.value;ie++){const me=pe.data.plays.filter(ye=>ye.minute===ie&&ye.match_lapse===2&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13)),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:2,event:ve.length>0?ve:null})}if(i.value=y.value.filter(ie=>ie.event!==null).map(ie=>ie.event),y.value.length>0){const ie=y.value.filter(ke=>ke.match_lapse===1);if(ie.length>0){const ke=ie[0];s.value=ke.minute,W.value="1",d.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===1)}const me=y.value.filter(ke=>ke.match_lapse===2);if(me.length>0){const ke=me[me.length-1];z.value=ke.minute,v.value="2",a.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===2)}const ve=y.value.findIndex(ke=>ke.minute===s.value&&ke.match_lapse===parseInt(W.value)),ye=y.value.findIndex(ke=>ke.minute===z.value&&ke.match_lapse===parseInt(v.value));if(ve!==-1&&ye!==-1&&ve<ye){const ke=y.value.length,Ee=ve/(ke-1)*(u.timelineWidth-40),Te=ye/(ke-1)*(u.timelineWidth-40);_.value=`${Te-Ee}px`}}}}catch(pe){console.error("Error al obtener los datos del partido:",pe)}}function V(pe){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[pe]||""}t.onMounted(()=>{O(),k(),D(),t.nextTick(()=>{B()}),window.addEventListener("resize",()=>{k()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",B)}),t.watch(i,()=>{t.nextTick(()=>{B()})},{deep:!0}),t.watch([s,z,W,v],()=>{ce()},{immediate:!0}),t.watch([W],()=>{if(!(P.value||h.value)){if(parseInt(W.value)>parseInt(v.value)&&(v.value=W.value,E.value=!0),E.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}}else if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(d.value=le)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(d.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([v],()=>{if(!(P.value||h.value)){if(parseInt(v.value)<parseInt(W.value)&&(W.value=v.value,E.value=!0),E.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}}else if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(a.value=le)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(a.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([s],()=>{if(!(P.value||h.value)){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}if(W.value===v.value&&s.value>=z.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}}de()}}),t.watch([z],()=>{if(!(P.value||h.value)){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}if(W.value===v.value&&z.value<=s.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}}de()}});function G(pe){const ne=y.value.length;return pe<0||ne===0||ne===1?"0px":`${pe/(ne-1)*(u.timelineWidth-40)}px`}function H(pe,ne){ne.preventDefault(),f=pe,I=ne.type.includes("touch")?ne.touches[0].clientX:ne.clientX,C=!1,pe==="left"?L.value=d.value:pe==="right"&&(L.value=a.value),document.addEventListener("mousemove",U),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("mouseup",J),document.addEventListener("touchend",J),h.value=!0}function U(pe){if(!f)return;pe.preventDefault();const ne=pe.type.includes("touch")?pe.touches[0].clientX:pe.clientX;if(!C){if(Math.abs(ne-I)<5)return;C=!0}const le=Q(),ie=y.value.length,me=ne-I,ve=le/(ie-1),ye=Math.round(me/ve);let ke=L.value+ye;const Ee=Math.max(0,Math.min(ke,ie-1));if(f==="left"){const Be=y.value.findIndex(je=>je.minute===z.value&&je.match_lapse===parseInt(v.value));if(Ee>=Be-1)return;const Le=y.value[Ee];h.value=!0,d.value=Ee,s.value=Le.minute,W.value=Le.match_lapse.toString(),E.value=!0}else if(f==="right"){const Be=y.value.findIndex(je=>je.minute===s.value&&je.match_lapse===parseInt(W.value));if(Ee<=Be+1)return;const Le=y.value[Ee];h.value=!0,a.value=Ee,z.value=Le.minute,v.value=Le.match_lapse.toString(),E.value=!0}const Te=y.value.findIndex(Be=>Be.minute===s.value&&Be.match_lapse===parseInt(W.value)),Pe=y.value.findIndex(Be=>Be.minute===z.value&&Be.match_lapse===parseInt(v.value));if(Te!==-1&&Pe!==-1&&Te<Pe){const Be=y.value.length,Le=Te/(Be-1)*(u.timelineWidth-40),je=Pe/(Be-1)*(u.timelineWidth-40);_.value=`${je-Le}px`}t.nextTick(()=>{ce()})}function J(){f&&(s.value<0&&(s.value=0),z.value>M.value&&(z.value=M.value),t.nextTick(()=>{h.value=!1,E.value=!1}),ce()),f=null,document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",J),document.removeEventListener("touchend",J)}function re(){if(s.value>0){P.value=!0;let pe=s.value-1,ne=!1,le=W.value;if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];pe<ve.minute&&(pe=ve.minute)}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];if(pe<ve.minute){le="1",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===1);ye.length>0&&(pe=ye[ye.length-1].minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function q(){if(z.value<M.value){P.value=!0;let pe=z.value+1,ne=!1,le=v.value;if(le===W.value&&pe<=s.value){t.nextTick(()=>{P.value=!1});return}if(v.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(v.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)<parseInt(W.value)){if(W.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(a.value=ie,z.value=pe,ne&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function ae(){let pe=!1,ne=z.value-1,le=v.value;if(!(le===W.value&&ne<=s.value)){if(v.value==="1"){const ie=y.value.filter(me=>me.match_lapse===1);if(ie.length>0){const me=ie[0];ne>=me.minute&&(pe=!0)}}else if(v.value==="2"){const ie=y.value.filter(me=>me.match_lapse===2);if(ie.length>0){const me=ie[0];if(ne>=me.minute)pe=!0;else{const ve=y.value.filter(ye=>ye.match_lapse===1);if(ve.length>0){const ye=ve[ve.length-1];le="1",ne=ye.minute,pe=!0}}}}if(pe){P.value=!0;let ie=!1;le!==v.value&&(ie=!0);const me=y.value.findIndex(ve=>ve.minute===ne&&ve.match_lapse===parseInt(le));me!==-1&&(a.value=me,z.value=ne,ie&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}}function ee(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=Math.max(0,ne-150);pe.scrollTo({left:le,behavior:"smooth"}),setTimeout(B,300)}}function $(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=pe.scrollWidth-pe.clientWidth,ie=Math.min(le,ne+150);pe.scrollTo({left:ie,behavior:"smooth"}),setTimeout(B,300)}}function Q(){return l.value?l.value.getBoundingClientRect().width:600}function ce(){const pe=s.value*60,ne=z.value*60;x("range-change",{start:{minutes:s.value,seconds:pe,time:W.value,match_lapse:parseInt(W.value)},end:{minutes:z.value,seconds:ne,time:v.value,match_lapse:parseInt(v.value)}})}function de(){const pe=y.value.findIndex(le=>le.minute===s.value&&le.match_lapse===parseInt(W.value)),ne=y.value.findIndex(le=>le.minute===z.value&&le.match_lapse===parseInt(v.value));if(pe!==-1&&ne!==-1&&pe<ne){const le=y.value.length,ie=pe/(le-1)*(u.timelineWidth-40),me=ne/(le-1)*(u.timelineWidth-40);_.value=`${me-ie}px`}}function he(){P.value=!0;let pe=s.value+1,ne=!1,le=W.value;if(le===v.value&&pe>=z.value){t.nextTick(()=>{P.value=!1});return}if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)>parseInt(v.value)){if(v.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}return(pe,ne)=>{var le,ie,me,ve,ye,ke,Ee,Te;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["timeline",{"is-dragging":h.value}]),ref_key:"timelineRef",ref:l,style:t.normalizeStyle({width:`${m.value}px`})},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-header responsive-header",{"small-screen":m.value<470,"very-small-screen":m.value<420,"extra-small-screen":m.value<370,"mobile-column":m.value<500,"tablet-layout":m.value<800,"mobile-layout":m.value<580}])},[ne[21]||(ne[21]=t.createElementVNode("div",{class:"header-row"},[t.createElementVNode("span",{class:"header-title"},"Considerar eventos del ")],-1)),t.createElementVNode("div",Fft,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[0]||(ne[0]=Pe=>W.value=Pe),class:"time-select"},[...ne[12]||(ne[12]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,W.value]]),t.createElementVNode("div",Rft,[t.createElementVNode("div",Vft,[ne[15]||(ne[15]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[1]||(ne[1]=Pe=>s.value=Pe),readonly:"",min:W.value==="1"?((le=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:le.minute)||0:((ie=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ie.minute)||45,max:W.value==="1"?((me=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:me.minute)||45:((ve=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:ve.minute)||96},null,8,jft),[[t.vModelText,s.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:he},[...ne[13]||(ne[13]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:re},[...ne[14]||(ne[14]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])]),ne[20]||(ne[20]=t.createElementVNode("span",{class:"to-text"},"al",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[2]||(ne[2]=Pe=>v.value=Pe),class:"time-select"},[...ne[16]||(ne[16]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,v.value]]),t.createElementVNode("div",Uft,[t.createElementVNode("div",Gft,[ne[19]||(ne[19]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[3]||(ne[3]=Pe=>z.value=Pe),readonly:"",min:v.value==="1"?((ye=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:ye.minute)||0:((ke=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ke.minute)||45,max:v.value==="1"?((Ee=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:Ee.minute)||45:((Te=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:Te.minute)||96},null,8,Hft),[[t.vModelText,z.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:q},[...ne[17]||(ne[17]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:ae},[...ne[18]||(ne[18]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])])])],2),t.createElementVNode("div",Zft,[t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-left",onClick:ee},[...ne[22]||(ne[22]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,T.value]]),t.createElementVNode("div",{class:"timeline-scroll",ref_key:"scrollContainer",ref:S,onScroll:B},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-bar",{"has-scroll":T.value||A.value}]),style:t.normalizeStyle({width:`${e.timelineWidth}px`})},[t.createElementVNode("div",Wft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.homeTeam}.png`,alt:"Equipo local"},null,8,Xft)]),t.createElementVNode("div",qft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.awayTeam}.png`,alt:"Equipo visitante"},null,8,Yft)]),t.createElementVNode("div",Jft,[ne[38]||(ne[38]=t.createElementVNode("div",{class:"line"},null,-1)),t.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:t.normalizeStyle({left:G(0)})},"0'",4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,(Pe,Be)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.event,(Le,je)=>(t.openBlock(),t.createElementBlock("div",{key:"event-"+Be+"-"+je,class:"event",style:t.normalizeStyle({left:G(je===0?Be-1.5:Be-1.5+je*.3)})},[(Le==null?void 0:Le.team)==="local"?(t.openBlock(),t.createElementBlock("span",$ft,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",Kft,[...ne[23]||(ne[23]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",Qft,[...ne[24]||(ne[24]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",e0t,[...ne[25]||(ne[25]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",t0t,[...ne[26]||(ne[26]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0),t.createElementVNode("span",a0t,t.toDisplayString((Le==null?void 0:Le.minuteLabel)||Pe.minute)+"'",1),(Le==null?void 0:Le.team)==="visitante"?(t.openBlock(),t.createElementBlock("span",r0t,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",n0t,[...ne[27]||(ne[27]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",i0t,[...ne[28]||(ne[28]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",o0t,[...ne[29]||(ne[29]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",s0t,[...ne[30]||(ne[30]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0)],4))),128))],64))),256)),t.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:t.normalizeStyle({left:G(y.value.length-1)})},t.toDisplayString(b.value)+"'",5),t.createElementVNode("div",{class:"range-indicator",style:t.normalizeStyle({left:G(d.value),width:_.value})},[t.createElementVNode("div",{class:"handle left",onMousedown:ne[4]||(ne[4]=Pe=>H("left",Pe)),onTouchstart:ne[5]||(ne[5]=Pe=>H("left",Pe))},[(t.openBlock(),t.createElementBlock("svg",l0t,[...ne[31]||(ne[31]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[33]||(ne[33]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",c0t,[...ne[32]||(ne[32]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32),t.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:ne[6]||(ne[6]=Pe=>H("left",Pe)),onTouchstart:ne[7]||(ne[7]=Pe=>H("left",Pe))},null,32),ne[37]||(ne[37]=t.createElementVNode("div",{class:"range-line"},null,-1)),t.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:ne[8]||(ne[8]=Pe=>H("right",Pe)),onTouchstart:ne[9]||(ne[9]=Pe=>H("right",Pe))},null,32),t.createElementVNode("div",{class:"handle right",onMousedown:ne[10]||(ne[10]=Pe=>H("right",Pe)),onTouchstart:ne[11]||(ne[11]=Pe=>H("right",Pe))},[(t.openBlock(),t.createElementBlock("svg",u0t,[...ne[34]||(ne[34]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[36]||(ne[36]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",d0t,[...ne[35]||(ne[35]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32)],4)])],6)],544),t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-right",onClick:$},[...ne[39]||(ne[39]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M9 6L15 12L9 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,A.value]])])],6)}}},gV=du(h0t,[["__scopeId","data-v-e9ea1aeb"]]),p0t={class:"expandible-timeline"},f0t={class:"expandible-timeline__content"},m0t={__name:"ExpandibleTimeline",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""}},emits:["range-change"],setup(e,{emit:o}){const s=o;function z(W){s("range-change",W)}return(W,v)=>(t.openBlock(),t.createElementBlock("div",p0t,[t.createVNode(Kv,{"header-text":"Timeline de eventos","border-radius":"8px",onToggle:v[0]||(v[0]=g=>W.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",f0t,[t.createVNode(gV,{"timeline-width":539,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:e.token,onRangeChange:z},null,8,["game-id","home-team","away-team","token"])])]),_:1})]))}},g0t=du(m0t,[["__scopeId","data-v-be176377"]]),y0t={class:"filter-shadows-filters"},v0t={class:"filter-shadows-filters__timeline"},b0t={class:"filter-shadows-filters__filters"},x0t={__name:"FilterShadowsFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},selectedTeamTab:{type:Number,default:0},token:{type:String,default:""}},emits:["handleShadowsPossessionChange","handleShadowsExcludedFirstSecondsChange","handleShadowsExcludedLastSecondsChange","handleShadowsChainInitialZonesChange","handleShadowsChainFinalZonesChange","handleShadowsBallInterestZonesChange","handleShadowsDurationChange","range-change"],setup(e,{emit:o}){const s=o,z=_=>{s("handleShadowsPossessionChange",_)},W=(_,y)=>{s("handleShadowsDurationChange",_,y)},v=_=>{s("handleShadowsExcludedFirstSecondsChange",_)},g=_=>{s("handleShadowsExcludedLastSecondsChange",_)},r=_=>{s("handleShadowsChainInitialZonesChange",_)},b=_=>{s("handleShadowsChainFinalZonesChange",_)},d=_=>{s("handleShadowsBallInterestZonesChange",_)},a=_=>{s("range-change",_)};return(_,y)=>(t.openBlock(),t.createElementBlock("div",y0t,[t.createElementVNode("div",v0t,[t.createVNode(g0t,{token:e.token,game:e.game,onRangeChange:a},null,8,["token","game"])]),t.createElementVNode("div",b0t,[t.withDirectives(t.createVNode(T5,{"team-id":e.game.homeTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(T5,{"team-id":e.game.awayTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.awayTeam.team_id]])])]))}},yV=du(x0t,[["__scopeId","data-v-f148e6b3"]]),_0t={class:"filter-events"},w0t={class:"events-section"},k0t={class:"section-header"},S0t={class:"all-toggle"},T0t={class:"events-list"},C0t={class:"events-section"},E0t={class:"section-header"},A0t={class:"events-list"},M0t={__name:"FilterEventsShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["toggle-all-start-events","toggle-all-end-events","update-start-event","update-end-event"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",_0t,[t.createElementVNode("div",w0t,[t.createElementVNode("div",k0t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",S0t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",T0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",C0t,[t.createElementVNode("div",E0t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",A0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},vV=du(M0t,[["__scopeId","data-v-4232de5a"]]),P0t={class:"expandible-players"},I0t={class:"expandible-players__list"},L0t={class:"all-players list-item"},B0t={class:"player-item__checkbox"},O0t={class:"player-item__photo"},z0t=["src"],N0t={class:"player-item__info"},D0t={class:"player-item__info__name"},F0t={class:"player-item__info__secondary-info"},R0t={class:"player-item__info__secondary-info__nationality"},V0t=["src"],j0t={class:"player-item__info__secondary-info__position"},U0t={__name:"ExpandiblePlayers",props:{players:{type:Array,default:()=>[]},arePlayersTitular:{type:Boolean,default:!1}},setup(e){const o=e,s=t.computed(()=>o.arePlayersTitular?"Titulares:":"Cambios:"),z=t.computed(()=>`Todos los ${s.value.toLowerCase()}`);function W(v){v?o.players.forEach(g=>{g.isSelected=!0}):o.players.forEach((g,r)=>{g.isSelected=r===0})}return(v,g)=>(t.openBlock(),t.createElementBlock("div",P0t,[t.createVNode(Kv,{"border-radius":"8px","header-text":s.value,onToggle:g[0]||(g[0]=r=>v.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",I0t,[t.createElementVNode("div",L0t,[t.createVNode(t.unref(pp),{"model-value":o.players.every(r=>r.isSelected),label:z.value,"onUpdate:modelValue":W},null,8,["model-value","label"])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.players,r=>(t.openBlock(),t.createElementBlock("div",{key:r.player_id,class:"list-item player-item"},[t.createElementVNode("div",B0t,[t.createVNode(t.unref(pp),{modelValue:r.isSelected,"onUpdate:modelValue":b=>r.isSelected=b},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",O0t,[t.createElementVNode("img",{src:r.player_photo||r.photo},null,8,z0t)]),t.createElementVNode("div",N0t,[t.createElementVNode("div",D0t,t.toDisplayString(r.short_name||r.name||r.player_name),1),t.createElementVNode("div",F0t,[t.createElementVNode("div",R0t,[t.createElementVNode("img",{src:r.player_country_flag||r.nationality_photo||r.countryFlag},null,8,V0t)]),t.createElementVNode("div",j0t,t.toDisplayString(r.positionName||r.position_name||r.position),1)])])]))),128))])]),_:1},8,["header-text"])]))}},bV=du(U0t,[["__scopeId","data-v-bb8595b9"]]),G0t={class:"filter-players"},H0t={__name:"FilterPlayers",props:{players:{type:Array,default:()=>[]}},setup(e){const o=e,s=t.computed(()=>o.players.filter(W=>W.is_titular)),z=t.computed(()=>o.players.filter(W=>!W.is_titular));return(W,v)=>(t.openBlock(),t.createElementBlock("div",G0t,[t.createVNode(bV,{players:s.value,"are-players-titular":""},null,8,["players"]),t.createVNode(bV,{players:z.value,"are-players-titular":!1},null,8,["players"])]))}},N5=du(H0t,[["__scopeId","data-v-44980c4e"]]);let Z0t=class{constructor(){this.dataByTimePoint=new Map,this.playerPositions=new Map,this.ballPositions=new Map,this.matchlapseIndex=new Map,this.secondIndex=new Map}processPositions(o){return this.dataByTimePoint.clear(),this.playerPositions.clear(),this.ballPositions.clear(),this.matchlapseIndex.clear(),this.secondIndex.clear(),!o.info_by_second||!Array.isArray(o.info_by_second)?(console.error("No se encontraron datos válidos en info_by_second"),this):(o.info_by_second.forEach(s=>{const[z,W,v,g]=s,[r,b,d]=v,a=`${W}:${z}`;this.dataByTimePoint.set(a,{second:z,matchLapse:W,timeKey:a,ball:{x:r,y:b,zone:d},players:new Map}),this.ballPositions.set(a,{x:r,y:b,zone:d,second:z,matchLapse:W}),this.matchlapseIndex.has(W)||this.matchlapseIndex.set(W,new Set),this.matchlapseIndex.get(W).add(z),this.secondIndex.has(z)||this.secondIndex.set(z,new Set),this.secondIndex.get(z).add(W),Array.isArray(g)&&g.forEach(_=>{const[y,x,u,n,i]=_;this.dataByTimePoint.get(a).players.set(y,{playerId:y,teamId:x,x:u,y:n,zone:i,second:z,matchLapse:W,timeKey:a}),this.playerPositions.has(y)||this.playerPositions.set(y,[]),this.playerPositions.get(y).push({second:z,matchLapse:W,timeKey:a,teamId:x,x:u,y:n,zone:i})})}),this)}filterData(o={}){const{timeRanges:s=null,ballZones:z=null}=o,W=new Map;let v=[];return s&&s.length>0&&s.forEach(g=>{const{match_lapse:r,start:b,end:d}=g;this.matchlapseIndex.has(r)?Array.from(this.matchlapseIndex.get(r)).filter(a=>a>=b&&a<=d).forEach(a=>{v.push(`${r}:${a}`)}):console.error(`Matchlapse ${r} no encontrado en índice`)}),z&&z.length>0&&(v=v.filter(g=>{const r=this.ballPositions.get(g);return r&&z.includes(r.zone)})),v.forEach(g=>{const r=this.dataByTimePoint.get(g);if(!r)return;const b=new Map;r.players.forEach((d,a)=>{b.set(a,d)}),b.size>0&&W.set(g,{...r,players:b})}),W}calculatePlayerAverages(o){const s=new Map;o.forEach(W=>{W.players.forEach((v,g)=>{s.has(g)||s.set(g,{playerId:g,teamId:v.teamId,totalX:0,totalY:0,count:0,positions:[],matchlapses:new Set});const r=s.get(g);r.totalX+=v.x,r.totalY+=v.y,r.count++,r.matchlapses.add(v.matchLapse),r.positions.push({second:v.second,matchLapse:v.matchLapse,timeKey:v.timeKey,x:v.x,y:v.y,quadrant:v.quadrant})})});const z=new Map;return s.forEach((W,v)=>{z.set(v,{playerId:W.playerId,teamId:W.teamId,avgX:W.totalX/W.count,avgY:W.totalY/W.count,dataPoints:W.count,matchlapses:Array.from(W.matchlapses),positions:W.positions,id:W.playerId,name:`Jugador #${W.playerId}`,selected:!1,photo:null})}),z}getPlayerAverages(o={}){const s=this.filterData(o);return this.calculatePlayerAverages(s)}},W0t=class{constructor(){this.chains=[],this.indexedByInitialCategories=new Map,this.indexedByEndingCategories=new Map,this.indexedByTeam=new Map,this.indexedByMatchLapse=new Map,this.indexedByBallZones=new Map,this.indexedByBallInitialZones=new Map,this.indexedByBallFinalZones=new Map}processChains(o){return this.chains=Array.isArray(o)?o:[],this.createIndexes(),this.chains}createIndexes(){this.chains.forEach(o=>{o.initial_category_ids&&Array.isArray(o.initial_category_ids)&&o.initial_category_ids.forEach(s=>{this.indexedByInitialCategories.has(s)||this.indexedByInitialCategories.set(s,new Set),this.indexedByInitialCategories.get(s).add(o.id)}),o.ending_category_ids&&Array.isArray(o.ending_category_ids)&&o.ending_category_ids.forEach(s=>{this.indexedByEndingCategories.has(s)||this.indexedByEndingCategories.set(s,new Set),this.indexedByEndingCategories.get(s).add(o.id)}),o.team_id&&(this.indexedByTeam.has(o.team_id)||this.indexedByTeam.set(o.team_id,new Set),this.indexedByTeam.get(o.team_id).add(o.id)),o.match_lapse&&(this.indexedByMatchLapse.has(o.match_lapse)||this.indexedByMatchLapse.set(o.match_lapse,new Set),this.indexedByMatchLapse.get(o.match_lapse).add(o.id)),o.quadrant_ids&&Array.isArray(o.quadrant_ids)&&o.quadrant_ids.forEach(s=>{this.indexedByBallZones.has(s)||this.indexedByBallZones.set(s,new Set),this.indexedByBallZones.get(s).add(o.id)}),o.ball_initial_quadrant_id&&(this.indexedByBallInitialZones.has(o.ball_initial_quadrant_id)||this.indexedByBallInitialZones.set(o.ball_initial_quadrant_id,new Set),this.indexedByBallInitialZones.get(o.ball_initial_quadrant_id).add(o.id)),o.ball_ending_quadrant_id&&(this.indexedByBallFinalZones.has(o.ball_ending_quadrant_id)||this.indexedByBallFinalZones.set(o.ball_ending_quadrant_id,new Set),this.indexedByBallFinalZones.get(o.ball_ending_quadrant_id).add(o.id))})}getFilteredChains(o={}){let s=new Set(this.chains.map(W=>W.id));if(o.excludedStartCategories&&o.excludedStartCategories.length>0||o.startCategories&&o.startCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedStartCategories&&o.excludedStartCategories.length>0&&(o.excludedStartCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.startCategories&&o.startCategories.length>0&&(o.startCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.excludedEndCategories&&o.excludedEndCategories.length>0||o.endCategories&&o.endCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedEndCategories&&o.excludedEndCategories.length>0&&(o.excludedEndCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.endCategories&&o.endCategories.length>0&&(o.endCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.chainInitialZones&&o.chainInitialZones.length>0){const W=new Set;o.chainInitialZones.forEach(v=>{const g=this.indexedByBallInitialZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.chainFinalZones&&o.chainFinalZones.length>0){const W=new Set;o.chainFinalZones.forEach(v=>{const g=this.indexedByBallFinalZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.ballInterestZones&&o.ballInterestZones.length>0){const W=new Set;o.ballInterestZones.forEach(v=>{const g=this.indexedByBallZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.startTime&&o.endTime&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{match_lapse:W}=o.startTime,{match_lapse:v}=o.endTime,g=this.indexedByMatchLapse.get(W),r=this.indexedByMatchLapse.get(v);g&&r?s=new Set([...s].filter(b=>g.has(b)||r.has(b))):s=new Set}if(o.teamId){const W=this.indexedByTeam.get(o.teamId);W?s=new Set([...s].filter(v=>W.has(v))):s=new Set}let z=this.chains.filter(W=>s.has(W.id));if(o.minDuration!==void 0&&(z=z.filter(W=>W.duration>=o.minDuration)),o.maxDuration!==void 0&&(z=z.filter(W=>W.duration<=o.maxDuration)),o.startTime&&o.endTime&&o.startTime.seconds!==void 0&&o.endTime.seconds!==void 0&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{seconds:W}=o.startTime,{seconds:v}=o.endTime,{match_lapse:g}=o.startTime,{match_lapse:r}=o.endTime;z=z.filter(b=>{if(g===r&&b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0;if(g!==r){if(v>W){if(b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0}else if(b.match_lapse===g&&b.starting_second>=W||b.match_lapse===r&&b.ending_second<=v)return!0}return!1})}return(o.excludedFirstSeconds!==void 0||o.excludedLastSeconds!==void 0)&&(z=z.map(W=>{const v=o.excludedFirstSeconds!==void 0?W.starting_second+o.excludedFirstSeconds:W.starting_second;let g=W.ending_second;return W.duration>o.excludedLastSeconds&&(g=W.starting_second+o.excludedLastSeconds),v>=g||v<0||g<0?null:{...W,starting_second:v,ending_second:g}}).filter(W=>W!==null)),z}getChainStats(o={}){const s=this.getFilteredChains(o);return s.length===0?{totalChains:0,averageDuration:0,totalSeconds:0,totalDurationChains:0}:{totalChains:s.length,averageDuration:s.reduce((z,W)=>z+W.duration,0)/s.length,totalSeconds:s.reduce((z,W)=>z+(W.ending_second-W.starting_second),0),totalDurationChains:s.reduce((z,W)=>z+W.duration,0)}}mapFilterCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.category_ids&&z.push(...v.category_ids)}),z}mapFilterExcludedCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.excluded_category_ids&&z.push(...v.excluded_category_ids)}),z}};const xV="https://d1cfezxa8pcy7l.cloudfront.net",X0t="chains_by_game.json",q0t="positions_by_second.json",_V="==GolStatsHatTrick!";let Cp=class{static resetCache(){this._playersRawData=null,this._playersProcessedData=null,this._chainsRawData=null}static async _loadChainsData(o){if(this._chainsRawData)return this._chainsRawData;try{const s=await fetch(`${xV}/${o}/${X0t}`,{headers:{"x-api-key":`${_V}`}});if(!s.ok)throw new Error(`Error fetching game events: ${s.status}`);const z=await s.json();return this._chainsRawData=z,z}catch(s){throw console.error("Error fetching game events:",s),s}}static async _loadPlayersData(o){if(o!==void 0){if(this._playersRawData)return this._playersProcessedData;try{const s=await fetch(`${xV}/${o}/${q0t}`,{headers:{"x-api-key":`${_V}`}});if(!s.ok)throw new Error(`Error fetching game players: ${s.status}`);const z=await s.json(),W=new Z0t;return W.processPositions(z),this._playersRawData=z,this._playersProcessedData=W,W}catch(s){throw console.error("Error loading players data:",s),s}}}static async getPositions(o,s){try{return(await this._loadPlayersData(o)).getPlayerAverages(s)}catch(z){return console.error("Error getting positions:",z),new Map}}static getStartedCategories(){return[{id:1,category_ids:[6,312],name:"Balón recuperado",isSelected:!0},{id:2,category_ids:[28,264],name:"Saque de meta",isSelected:!0},{id:3,category_ids:[30,355],name:"Tiro libre",isSelected:!0},{id:4,category_ids:[210,212,854],name:"Saque de banda",isSelected:!0},{id:5,category_ids:[-1],excluded_category_ids:[6,312,28,264,30,355,210,212,854],name:"Otras",isSelected:!0}]}static getEndedCategories(){return[{id:1,category_ids:[13,25],name:"Centros",isSelected:!0},{id:2,category_ids:[607,608],name:"Oportunidades de gol",isSelected:!0},{id:3,category_ids:[-1],excluded_category_ids:[13,25,607,608],name:"Otras",isSelected:!0}]}static async getProcessedChains(o,s={}){try{const z=await this._loadChainsData(o),W=new W0t;W.processChains(z);const v={...s};return s.startCategories&&s.startCategories.length>0&&(v.startCategories=W.mapFilterCategoriesToIds(s.startCategories,this.getStartedCategories()),v.excludedStartCategories=W.mapFilterExcludedCategoriesToIds(s.startCategories,this.getStartedCategories())),s.endCategories&&s.endCategories.length>0&&(v.endCategories=W.mapFilterCategoriesToIds(s.endCategories,this.getEndedCategories()),v.excludedEndCategories=W.mapFilterExcludedCategoriesToIds(s.endCategories,this.getEndedCategories())),{chains:W.getFilteredChains(v),stats:W.getChainStats(v),totalChains:z.length,processor:W}}catch(z){throw console.error("Error processing chains:",z),z}}};Fk(Cp,"_playersRawData",null),Fk(Cp,"_playersProcessedData",null),Fk(Cp,"_chainsRawData",null);function wV(e){const o=t.ref([]),s=t.ref(null),z=t.ref(null),W=t.ref(!1),v=t.ref([]),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref(null),a=t.ref({min:5,max:null}),_=t.ref(5),y=t.ref(5),x=t.ref([]),u=t.ref([]),n=t.ref([]);return{isDataLoaded:W,selectedStartCategories:r,selectedEndCategories:b,selectedPossessionTeamId:d,durationRange:a,loadInitialData:async()=>{if(!(W.value||!e))try{const i=await Cp.getProcessedChains(e,{});z.value=i.processor,v.value=i.chains,g.value=i.stats,o.value=v.value,s.value=g.value}catch(i){console.error("Error loading data:",i)}finally{W.value=!0}},applyFilters:(i={})=>{if(!(!z.value||!W.value))try{const f=Object.keys(i).length>0?i:{startCategories:r.value,endCategories:b.value,teamId:d.value,minDuration:a.value.min,maxDuration:a.value.max,excludedFirstSeconds:_.value,excludedLastSeconds:y.value,chainInitialZones:x.value,chainFinalZones:u.value,ballInterestZones:n.value};o.value=z.value.getFilteredChains(f),s.value=z.value.getChainStats(f)}catch(f){console.error("Error aplicando filtros:",f)}},getFilteredData:(i={})=>{if(!W.value)return null;const{startCategories:f=[],endCategories:l=[],teamId:h=null,minDuration:m=null,maxDuration:w=null,excludedFirstSeconds:T=null,excludedLastSeconds:A=null,chainInitialZones:C=[],chainFinalZones:I=[],ballInterestZones:L=[],timeFromTimeline:E={}}=i,P={};if(f.length>0&&(P.startCategories=z.value.mapFilterCategoriesToIds(f,Cp.getStartedCategories()),P.excludedStartCategories=z.value.mapFilterExcludedCategoriesToIds(f,Cp.getStartedCategories())),l.length>0&&(P.endCategories=z.value.mapFilterCategoriesToIds(l,Cp.getEndedCategories()),P.excludedEndCategories=z.value.mapFilterExcludedCategoriesToIds(l,Cp.getEndedCategories())),h&&(P.teamId=h),m!==null&&(P.minDuration=parseInt(m)),w!==null&&(P.maxDuration=parseInt(w)),T!==null&&(P.excludedFirstSeconds=parseInt(T)),A!==null&&(P.excludedLastSeconds=parseInt(A)),C.length>0&&(P.chainInitialZones=C),I.length>0&&(P.chainFinalZones=I),L.length>0&&(P.ballInterestZones=L),Object.keys(E).length>0&&Object.keys(E.end).length>0&&Object.keys(E.start).length>0){const{start:M,end:S}=E;P.startTime={seconds:M.seconds,match_lapse:M.match_lapse},P.endTime={seconds:S.seconds,match_lapse:S.match_lapse}}return{chains:z.value.getFilteredChains(P),stats:z.value.getChainStats(P)}}}}const Y0t={class:"shadows"},J0t={class:"menu-content-shadows"},$0t={class:"menu-shadows-teams"},K0t={class:"team-switch-container"},Q0t={class:"team-switch team-switch-toggle"},emt={class:"team-content"},tmt=["src"],amt={class:"team-label"},rmt={class:"team-content"},nmt={class:"team-label"},imt=["src"],omt={class:"menu-shadows-tabs"},smt={class:"menu-shadows-tab-content"},lmt={key:0},cmt={key:1,class:"filter-events-container"},umt={key:2},dmt={__name:"FilterShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultShadowsFilters:{type:Object,default:()=>({})},game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},filterButtonProps:{type:Object,default:()=>({fontSize:"13px",gap:"6px",padding:"11px 12px"})}},emits:["home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered","home-range-change-shadows","away-range-change-shadows"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(!1),v=t.ref(!1),g=t.ref(["Filtros","Eventos","Jugadores"]),r=t.ref(g.value[0]),b=t.ref({...s.defaultShadowsFilters}),d=t.ref({...s.defaultShadowsFilters}),a=t.ref(structuredClone(s.startedCategories)),_=t.ref(structuredClone(s.endedCategories)),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(!0),n=t.ref(!0),i=t.ref(!0),f=t.ref(!0),l=t.ref(s.game.homeTeam.team_id),h=t.ref(!0),{selectedStartCategories:m,selectedEndCategories:w,isDataLoaded:T,loadInitialData:A,getFilteredData:C}=wV(s.game.gameId),I=m,L=w,E=t.ref(null),P=t.ref(!1),M=t.computed(()=>s.containerWidth>650?"650px":`${s.containerWidth-20}px`),S=he=>{const pe=he===s.game.homeTeam.team_id?b.value:d.value,ne={startCategories:pe.startCategories,endCategories:pe.endCategories,teamId:pe.possessionTeamId,minDuration:pe.durationRange.min,maxDuration:pe.durationRange.max,excludedFirstSeconds:pe.excludedFirstSeconds,excludedLastSeconds:pe.excludedLastSeconds,chainInitialZones:pe.chainInitialZones,chainFinalZones:pe.chainFinalZones,ballInterestZones:pe.ballInterestZones,timeFromTimeline:pe.timeFromTimeline},le=C(ne);le&&(he===s.game.homeTeam.team_id?(z("home-chains-shadows-filtered",le.chains,he),z("home-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("home-range-change-shadows",ne.timeFromTimeline,he)):(z("away-chains-shadows-filtered",le.chains,he),z("away-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("away-range-change-shadows",ne.timeFromTimeline,he)))},B=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;switch(he){case"home":pe.possessionTeamId=s.game.homeTeam.team_id;break;case"away":pe.possessionTeamId=s.game.awayTeam.team_id;break;case"both":pe.possessionTeamId=null;break}S(l.value)},k=(he,pe)=>{const ne=l.value===s.game.homeTeam.team_id?b.value:d.value;he==="less-than"?ne.durationRange={min:null,max:pe}:ne.durationRange={min:pe,max:null},S(l.value)},O=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedFirstSeconds=he,S(l.value)},D=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedLastSeconds=he,S(l.value)},V=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainInitialZones=he,S(l.value)},G=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainFinalZones=he,S(l.value)},H=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.ballInterestZones=he,S(l.value)};function U(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?a.value:y.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.startCategories.includes(pe.id)||ne.startCategories.push(pe.id):ne.startCategories=ne.startCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?u.value=ne.startCategories.length===a.value.length:i.value=ne.startCategories.length===y.value.length,S(l.value)}function J(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?_.value:x.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.endCategories.includes(pe.id)||ne.endCategories.push(pe.id):ne.endCategories=ne.endCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?n.value=ne.endCategories.length===_.value.length:f.value=ne.endCategories.length===x.value.length,S(l.value)}const re=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?a.value:y.value;ne.forEach(le=>le.isSelected=he),he?pe.startCategories=ne.map(le=>le.id):pe.startCategories=[],l.value===s.game.homeTeam.team_id?u.value=he:i.value=he,S(l.value)},q=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?_.value:x.value;ne.forEach(le=>le.isSelected=he),he?pe.endCategories=ne.map(le=>le.id):pe.endCategories=[],l.value===s.game.homeTeam.team_id?n.value=he:f.value=he,S(l.value)},ae=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.timeFromTimeline=he,S(l.value)},ee=t.computed(()=>s.startedCategories.length>0?l.value===s.game.homeTeam.team_id?a.value:y.value:[]),$=t.computed(()=>s.endedCategories.length>0?l.value===s.game.homeTeam.team_id?_.value:x.value:[]);t.watch([I,L],()=>{I.value.length===0&&(I.value=ee.value.map(he=>he.id)),L.value.length===0&&(L.value=$.value.map(he=>he.id))},{immediate:!0}),t.watch(()=>T.value,async he=>{he||(await A(),h.value?(S(s.game.homeTeam.team_id),S(s.game.awayTeam.team_id),h.value=!1):S(l.value))},{immediate:!0}),t.watch(W,he=>{P.value=he});function Q(he){he?W.value=!0:W.value=!1}function ce(he){v.value=he,z("is-shadows-selected",he)}function de(he){r.value=he}return(he,pe)=>(t.openBlock(),t.createElementBlock("div",Y0t,[t.createElementVNode("div",{ref_key:"filterContainerRef",ref:E,class:"filter-container"},[t.createVNode(S5,t.mergeProps(e.filterButtonProps,{text:"Shadows","is-active":P.value,onExpand:Q,onChangeSelected:ce}),null,16,["is-active"]),e.containerWidth>550?(t.openBlock(),t.createBlock(yht,{key:0})):t.createCommentVNode("",!0)],512),t.createVNode(t.unref(Rk),{modelValue:W.value,"onUpdate:modelValue":pe[2]||(pe[2]=ne=>W.value=ne),width:"fit-content","menu-width":M.value,"left-menu":"unset","menu-margin-top":8,"trigger-element":E.value,"z-index-open":15},{trigger:t.withCtx(()=>[...pe[3]||(pe[3]=[t.createElementVNode("div",{style:{display:"none"}},null,-1)])]),menu:t.withCtx(()=>[t.createElementVNode("div",J0t,[pe[4]||(pe[4]=t.createElementVNode("div",{class:"menu-shadows-header"},[t.createElementVNode("div",{class:"menu-shadows-header__title"}," Filtros shadows ")],-1)),t.createElementVNode("div",$0t,[t.createElementVNode("div",K0t,[t.createElementVNode("div",Q0t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:l.value===e.game.homeTeam.team_id?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.homeTeam.team_id}]),onClick:pe[0]||(pe[0]=ne=>l.value=e.game.homeTeam.team_id),type:"button"},[t.createElementVNode("span",emt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.homeTeam.team_id}.png`,alt:"Escudo local",class:"team-logo"},null,8,tmt),t.createElementVNode("span",amt,t.toDisplayString(e.game.homeTeam.colloquial_name),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.awayTeam.team_id}]),onClick:pe[1]||(pe[1]=ne=>l.value=e.game.awayTeam.team_id),type:"button"},[t.createElementVNode("span",rmt,[t.createElementVNode("span",nmt,t.toDisplayString(e.game.awayTeam.colloquial_name),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.awayTeam.team_id}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,imt)])],2)])])]),t.createElementVNode("div",omt,[t.createVNode(wht,{tabs:g.value,onChangeTab:de},null,8,["tabs"])]),t.createElementVNode("div",smt,[r.value===g.value[0]?(t.openBlock(),t.createElementBlock("div",lmt,[t.withDirectives(t.createVNode(yV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(yV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[1]?(t.openBlock(),t.createElementBlock("div",cmt,[t.withDirectives(t.createVNode(vV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":u.value,"all-end-events-selected":n.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(vV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[2]?(t.openBlock(),t.createElementBlock("div",umt,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.homeTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.awayTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):t.createCommentVNode("",!0)]),pe[5]||(pe[5]=t.createElementVNode("div",{class:"menu-shadows-tab-footer"},null,-1))])]),_:1},8,["modelValue","menu-width","trigger-element"])]))}},hmt=du(dmt,[["__scopeId","data-v-a8d58dcd"]]),pmt={__name:"TopFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},defaultShadowsFilters:{type:Object,default:()=>({})},startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]}},emits:["change-connections","change-distance","change-distance-custom","home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-range-change-shadows","away-range-change-shadows","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered"],setup(e,{emit:o}){let s=null;const z=e,W=o,v=t.ref(null),g=t.ref(0),r=t.computed(()=>"Distancia entre jugadores"),b=t.computed(()=>z.containerWidth<480?{fontSize:"10px",gap:"4px",padding:"8px 6px"}:{fontSize:"13px",gap:"6px",padding:"11px 12px"});function d(m){W("change-connections",m)}function a(m){W("change-distance-custom",m)}function _(m){W("change-distance",m)}function y(m,w){W("home-chains-shadows-filtered",m,w)}function x(m,w){W("away-chains-shadows-filtered",m,w)}function u(m,w){W("home-ball-zones-shadows-filtered",m,w)}function n(m,w){W("away-ball-zones-shadows-filtered",m,w)}function i(m){W("is-shadows-selected",m)}function f(m,w){W("home-range-change-shadows",m,w)}function l(m,w){W("away-range-change-shadows",m,w)}function h(){v.value&&(s=new ResizeObserver(m=>{for(let w of m)g.value=w.contentRect.width}),s.observe(v.value))}return t.onMounted(()=>{h()}),(m,w)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"filters",ref:v,class:"filters"},[w[0]||(w[0]=t.createElementVNode("div",{class:"filters__text"}," Mostrar: ",-1)),t.createVNode(tht,{game:e.game,"filter-button-props":b.value,onApply:d},null,8,["game","filter-button-props"]),t.createVNode(S5,t.mergeProps(b.value,{text:r.value,"is-arrow-visible":!1,onChangeSelected:_}),null,16,["text"]),t.createVNode(fht,{game:e.game,"filter-button-props":b.value,"container-width":e.containerWidth,onApply:a},null,8,["game","filter-button-props","container-width"]),t.createVNode(hmt,{game:e.game,token:e.token,"container-width":e.containerWidth,"default-shadows-filters":e.defaultShadowsFilters,"started-categories":e.startedCategories,"ended-categories":e.endedCategories,players:e.players,"filter-button-props":b.value,onHomeChainsShadowsFiltered:y,onAwayChainsShadowsFiltered:x,onHomeBallZonesShadowsFiltered:u,onAwayBallZonesShadowsFiltered:n,onHomeRangeChangeShadows:f,onAwayRangeChangeShadows:l,onIsShadowsSelected:i},null,8,["game","token","container-width","default-shadows-filters","started-categories","ended-categories","players","filter-button-props"])],512))}},fmt=du(pmt,[["__scopeId","data-v-28d461d8"]]),mmt={class:"page-header"},gmt={class:"page-header__time"},ymt={class:"value"},vmt={class:"value"},bmt={__name:"SectionHeader",props:{totalChains:{type:Number,default:0},totalSeconds:{type:Number,default:0},totalDurationChains:{type:Number,default:0}},emits:["update:selectedTeam"],setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("header",mmt,[s[2]||(s[2]=t.createElementVNode("div",{class:"page-header__title"},[t.createElementVNode("span",{class:"label"},"Posicionamiento y conexiones")],-1)),t.createElementVNode("div",gmt,[s[0]||(s[0]=t.createElementVNode("span",{class:"label"},"Estás viendo:",-1)),t.createElementVNode("span",ymt,t.toDisplayString(e.totalChains)+" posesiones",1),s[1]||(s[1]=t.createElementVNode("span",{class:"separator"},"|",-1)),t.createElementVNode("span",vmt,t.toDisplayString(e.totalSeconds)+" segundos",1)])]))}},xmt=du(bmt,[["__scopeId","data-v-4218da77"]]);function kV(){const e=t.ref(!1),o=t.ref(null),s=t.ref([]);async function z(v){e.value=!1,o.value=null;try{const g=await Cp._loadChainsData(v);s.value=g||[]}catch(g){o.value=g.message,console.error("Error cargando datos del juego:",g)}finally{e.value=!0}}async function W(v,g){return await Cp.getPositions(v,g)}return{isDataLoaded:e,startedCategories:Cp.getStartedCategories(),endedCategories:Cp.getEndedCategories(),loadGameData:z,getPositions:W}}const _mt={class:"tooltip-content-row"},wmt=["src"],kmt={class:"tooltip-content"},Smt={class:"player-name"},Tmt={class:"minutes-played"},Cmt={class:"minutes-number"},Emt={key:0,class:"entry-exit"},Amt={key:0,class:"entry-block"},Mmt={class:"entry-minute"},Pmt={key:1,class:"exit-block"},Imt={class:"exit-minute"},Lmt={key:1,class:"sub-info"},Bmt={key:0},Omt={class:"sub-name"},zmt={key:1},Nmt={class:"sub-name"},Dmt={__name:"TooltipPlayer",props:{show:Boolean,x:Number,y:Number,player:{type:Object,default:()=>({name:"Brian Rodríguez",minutes:26,inMinute:"Min 33",outMinute:"Min 22",subFor:"A. Zendejas"})}},setup(e){function o(s){if(!s)return"";const z=s.trim().split(",");if(z.length>=2){const W=z[0].trim().split(" ")[0];return`${z[1].trim().split(" ")[0].charAt(0)}. ${W}`}return s}return(s,z)=>e.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tooltip-box animated-tooltip",style:t.normalizeStyle({position:"fixed",left:e.x+"px",top:e.y+"px",transform:"translate(-50%, -105%)",zIndex:1e3})},[t.renderSlot(s.$slots,"default",{},()=>[t.createElementVNode("div",_mt,[t.createElementVNode("div",{class:t.normalizeClass(["player-photo",{"player-photo--no-move":!e.player.player_in&&!e.player.player_out,"player-photo--move":e.player.player_in||e.player.player_out}])},[t.createElementVNode("img",{src:e.player.photo||"https://i.imgur.com/1Q9Z1Zm.png",alt:"Foto jugador"},null,8,wmt)],2),t.createElementVNode("div",kmt,[t.createElementVNode("div",Smt,t.toDisplayString(e.player.formattedName),1),t.createElementVNode("div",Tmt,[t.createElementVNode("span",Cmt,t.toDisplayString(e.player.minutes_played),1),z[0]||(z[0]=t.createElementVNode("span",{class:"minutes-label"},"Minutos Jugados",-1))]),z[7]||(z[7]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Emt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Amt,[z[1]||(z[1]=t.createElementVNode("span",{class:"entry-label"},"Entró",-1)),t.createElementVNode("span",Mmt,"Min "+t.toDisplayString(e.player.player_in.minute),1)])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Pmt,[z[2]||(z[2]=t.createElementVNode("span",{class:"exit-label"},"Salió",-1)),t.createElementVNode("span",Imt,"Min "+t.toDisplayString(e.player.player_out.minute),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),z[8]||(z[8]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Lmt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Bmt,[z[4]||(z[4]=t.createElementVNode("span",null,"Entró por:",-1)),t.createElementVNode("span",Omt,[t.createTextVNode(t.toDisplayString(o(e.player.player_in.player_name_to_in))+" ",1),z[3]||(z[3]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",zmt,[z[6]||(z[6]=t.createElementVNode("span",null,"Salio por:",-1)),t.createElementVNode("span",Nmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_out.player_name_to_out))+" ",1),z[5]||(z[5]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])])],!0)],4)):t.createCommentVNode("",!0)}},Fmt=du(Dmt,[["__scopeId","data-v-ab5e17c5"]]),Rmt={class:"soccer-field__container"},Vmt={class:"field"},jmt={key:0,class:"loading-positions"},Umt={class:"players-container"},Gmt={viewBox:"0 0 611 407",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg-field-overlay"},Hmt=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],Zmt=["id","d"],Wmt=["id","d"],Xmt=["xlink:href"],qmt=["xlink:href"],Ymt=["x","y","stroke-width","fill","opacity"],Jmt=["x","y","fill","opacity"],$mt=["onMouseenter","onMouseleave","onClick"],Kmt=["x","y","stroke-width","fill","stroke","opacity"],Qmt=["x","y","fill","opacity"],e1t={key:0},t1t=["width","x"],a1t=["x1","x2"],r1t=["x"],n1t=["x"],i1t=["x"],o1t=["height","y"],s1t=["y1","y2"],l1t=["y"],c1t=["y"],u1t=["y"],d1t={key:1},h1t=["width","x"],p1t=["x1","x2"],f1t=["x"],m1t=["x"],g1t=["x"],y1t=["height","y"],v1t=["y1","y2"],b1t=["y"],x1t=["y"],_1t=["y"],w1t=["d"],k1t=["d"],S1t=["d"],T1t=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],C1t=["x1","y1","x2","y2"],E1t=["onMouseenter","onMouseleave","onClick"],A1t=["x","y","stroke-width","fill","stroke","opacity"],M1t=["x","y","fill","opacity"],P1t=["onMouseenter","onMouseleave","onClick"],I1t=["x","y","stroke-width","fill","stroke","opacity"],L1t=["x","y","fill","opacity"],B1t=["onClick"],O1t=["x","y","stroke"],z1t=["x","y","fill"],N1t=["x","y"],D1t=105,F1t=68,SV=611,TV=407,CV=3,R1t={__name:"SoccerField",props:{gameId:{type:Number,default:88247},playersSelected:{type:Array,default:()=>[]},playersSelectedShadows:{type:Array,default:()=>[]},homeTeamId:{type:Number,default:1},awayTeamId:{type:Number,default:5},homeFilteredChains:{type:Array,default:()=>[]},awayFilteredChains:{type:Array,default:()=>[]},homeFilteredBallZones:{type:Array,default:()=>[]},awayFilteredBallZones:{type:Array,default:()=>[]},homeFilteredChainsShadows:{type:Array,default:()=>[]},awayFilteredChainsShadows:{type:Array,default:()=>[]},homeFilteredBallZonesShadows:{type:Array,default:()=>[]},awayFilteredBallZonesShadows:{type:Array,default:()=>[]},isDataLoaded:{type:Boolean,default:!1},areConnectionsVisible:{type:Boolean,default:!1},isDistanceVisible:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},playersInfo:{type:Object,default:()=>({homeTeam:[],awayTeam:[]})},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},timeFromTimelineShadowsHome:{type:Object,default:()=>({})},timeFromTimelineShadowsAway:{type:Object,default:()=>({})},customDistance:{type:String,default:null}},emits:["home-possession-total-seconds","away-possession-total-seconds","change-custom-distances"],setup(e,{expose:o,emit:s}){const z=t.ref(!1),W=t.ref([]),v=t.ref([]),g=t.ref([]),r=kV(),b=t.ref({show:!1,x:0,y:0,player:{}}),d=t.ref(null),a=e,_=s,y=t.ref(D1t/611),x=t.ref(F1t/407),u=t.ref([{id:"h1",d:"M24 16H588",topRaw:16,type:"line",isVisible:!0,players:[],block:[]},{id:"h2",d:"M24 380H588",topRaw:380,type:"line",isVisible:!0,players:[],block:[]},{id:"v1",d:"M25 380V16.5",leftRaw:25,type:"line",isVisible:!0,players:[],block:[]},{id:"v2",d:"M86 380V16.5",leftRaw:86,type:"line",isVisible:!0,players:[],block:[]},{id:"v3",d:"M130.5 380V16.5",leftRaw:130.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v4",d:"M479.5 380V16.5",leftRaw:479.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v5",d:"M526 380V16.5",leftRaw:526,type:"line",isVisible:!0,players:[],block:[]},{id:"v6",d:"M588 380V16.5",leftRaw:588,type:"line",isVisible:!0,players:[],block:[]}]),n=t.ref(null),i=t.ref(null),f=t.ref([]),l=t.ref([]),h=t.ref(U()),m=t.ref(U()),w=t.ref([]),T=t.ref(null),A=t.ref(null);function C(Ze){A.value=Ze.id}function I(){A.value=null}function L(Ze){return A.value&&A.value!==Ze.id?.1:T.value?Ze.isCandidateToDelete?1:.2:1}function E(Ze){return A.value?.1:T.value?Ze.isCandidateToDelete?1:.2:1}const P=t.computed(()=>{if(a.customDistance){if(a.customDistance==="players")return f.value;if(a.customDistance==="block")return l.value}return[]});t.watch(()=>a.isAwayTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(()=>a.isHomeTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(m,()=>{H(h,m)},{immediate:!0,deep:!0});const M=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||W.value.length===0||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...W.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?(W.value.forEach(xe=>{xe.isVisible=a.playersSelected.includes(xe.id)}),W.value):(a.isHomeTeamVisible?Ze=Ze.filter(xe=>(xe.isVisible=xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible)):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>(xe.isVisible=!xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible))),Ce(),Ze)}),S=t.computed(()=>({"--cursor-svg-field-overlay":a.customDistance?"url('https://golstatsimages.blob.core.windows.net/todoelfut/cursor-02.svg') 17 17, pointer":"inherit"})),B=t.computed(()=>`activeDistances${a.customDistance.charAt(0).toUpperCase()+a.customDistance.slice(1)}`),k=t.computed(()=>a.customDistance?u.value:[]),O=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||v.value.length===0||!a.showShadows||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...v.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?v.value:(a.isHomeTeamVisible?Ze=Ze.filter(xe=>xe.is_home):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>xe.is_home===!1)),Ze)}),D=t.computed(()=>new Map(M.value.map(Ze=>[Ze.id,Ze]))),V=t.computed(()=>a.isHomeTeamVisible&&W.value.some(Ze=>Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1)),G=t.computed(()=>a.isAwayTeamVisible&&W.value.some(Ze=>!Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1));function H(Ze,xe){const Oe=[{id:"aB1",d:`M${xe.value.minimumX} ${xe.value.minimumY}H${xe.value.maximumX}`,topRaw:xe.value.minimumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB2",d:`M${xe.value.maximumX} ${xe.value.minimumY}V${xe.value.maximumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.maximumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB3",d:`M${xe.value.maximumX} ${xe.value.maximumY}H${xe.value.minimumX}`,topRaw:xe.value.maximumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB4",d:`M${xe.value.minimumX} ${xe.value.maximumY}V${xe.value.minimumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.minimumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"hB1",d:`M${Ze.value.minimumX} ${Ze.value.minimumY}H${Ze.value.maximumX}`,topRaw:Ze.value.minimumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB2",d:`M${Ze.value.maximumX} ${Ze.value.minimumY}V${Ze.value.maximumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.maximumX,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB3",d:`M${Ze.value.maximumX} ${Ze.value.maximumY}H${Ze.value.minimumX}`,topRaw:Ze.value.maximumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB4",d:`M${Ze.value.minimumX} ${Ze.value.maximumY}V${Ze.value.minimumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.minimumX,isVisible:a.isHomeTeamVisible,type:"boundary"}];w.value.length===0?w.value=[...Oe]:w.value.forEach(Fe=>{const We=Oe.find(et=>et.id===Fe.id);We&&(Fe.d=We.d,Fe.topRaw=We.topRaw,Fe.leftRaw=We.leftRaw,Fe.isVisible=We.isVisible)}),l.value.forEach(Fe=>{const We=w.value.find(tt=>tt.id===Fe.from.id),et=w.value.find(tt=>tt.id===Fe.to.id);We&&(Fe.from.d=We.d,Fe.from.topRaw=We.topRaw,Fe.from.leftRaw=We.leftRaw,Fe.from.isVisible=We.isVisible),et&&(Fe.to.d=et.d,Fe.to.topRaw=et.topRaw,Fe.to.leftRaw=et.leftRaw,Fe.to.isVisible=et.isVisible),ge(Fe.from,Fe.to,!0)}),setTimeout(()=>{Ce()},1e3)}function U(){return{minimumX:0,maximumX:SV,minimumY:0,maximumY:TV,isVisible:!0}}function J(Ze,xe){if(!Ze||Ze.length===0)return[];let Oe=null,Fe=null,We=null,et=null;xe.start&&xe.end&&(Oe=xe.start.match_lapse,Fe=xe.end.match_lapse,We=xe.start.seconds,et=xe.end.seconds);const tt=[];return Ze.forEach(ot=>{if(ot.starting_second!==void 0&&ot.ending_second!==void 0){let vt=ot.starting_second,yt=ot.ending_second;Oe!==null&&Fe!==null&&We!==null&&et!==null&&(Oe===Fe||et>We?(vt<We&&(vt=We),yt>et&&(yt=et)):(ot.match_lapse===Oe&&vt<We&&(vt=We),ot.match_lapse===Fe&&yt>et&&(yt=et))),tt.push({match_lapse:ot.match_lapse,start:vt,end:yt})}}),tt}function re(Ze){return Ze.reduce((xe,Oe)=>xe+(Oe.end-Oe.start),0)}const q=new Map,ae=new Map;async function ee(){try{q.clear(),ae.clear(),h.value=U(),m.value=U();const Ze=a.homeFilteredChains.length>0?J(a.homeFilteredChains,a.timeFromTimeline):[],xe=a.awayFilteredChains.length>0?J(a.awayFilteredChains,a.timeFromTimeline):[],Oe=a.homeFilteredChainsShadows.length>0?J(a.homeFilteredChainsShadows,a.timeFromTimelineShadowsHome):[],Fe=a.awayFilteredChainsShadows.length>0?J(a.awayFilteredChainsShadows,a.timeFromTimelineShadowsAway):[],We={timeRanges:Ze,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZones},et={timeRanges:xe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZones},tt={timeRanges:Oe,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZonesShadows},ot={timeRanges:Fe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZonesShadows},vt=[],yt=[],It=[],Ut=[],Gt=Ze.length>0?await r.getPositions(a.gameId,We):[],st=xe.length>0?await r.getPositions(a.gameId,et):[],Ke=Oe.length>0?await r.getPositions(a.gameId,tt):[],ht=Fe.length>0?await r.getPositions(a.gameId,ot):[];Gt&&Gt.size>0&&Gt.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),vt.push(Pt),q.set(mt.playerId,Pt)}}),st&&st.size>0&&st.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),yt.push(Pt),q.set(mt.playerId,Pt)}}),Ke&&Ke.size>0&&Ke.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};It.push(Pt),ae.set(mt.playerId,Pt)}}),ht&&ht.size>0&&ht.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};Ut.push(Pt),ae.set(mt.playerId,Pt)}}),_("home-possession-total-seconds",re(Ze),a.homeTeamId),_("away-possession-total-seconds",re(xe),a.awayTeamId),W.value.length===0?W.value=[...yt,...vt]:W.value.forEach(mt=>{const Pt=q.get(mt.id);Pt&&(mt.top=Pt.top,mt.left=Pt.left,mt.topRaw=Pt.topRaw,mt.leftRaw=Pt.leftRaw,mt.isVisible=Pt.isVisible,mt.number=Pt.number,mt.team=Pt.team,mt.position=Pt.position,mt.is_home=Pt.is_home,mt.is_titular=Pt.is_titular),f.value.forEach(Et=>{const nt=Et.from.id===mt.id?Et.from:null,ct=Et.to.id===mt.id?Et.to:null;(nt||ct)&&(nt&&(Et.from=mt),ct&&(Et.to=mt),ge(Et.from,Et.to,!0))}),l.value.forEach(Et=>{(Et.from.id===mt.id?Et.from:Et.to.id===mt.id&&Et.to)&&ge(Et.from,Et.to,!0)})}),v.value=[...Ut,...It]}catch(Ze){console.error("Error calculating filtered positions:",Ze),W.value=[],v.value=[],h.value=U(),m.value=U()}}function $(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.position_id:0}function Q(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.jersey:0}function ce(Ze){if(!Ze||!a.playersInfo)return!1;const xe=a.playersInfo.homeTeam.find(Oe=>Oe.player_id===Ze)||a.playersInfo.awayTeam.find(Oe=>Oe.player_id===Ze);return xe?xe.is_titular:!1}function de(Ze){if(!Ze||!a.playersSelected.includes(Ze.id)||Ze.position===1)return;const xe=Ze.is_home?h:m;xe.value||(xe.value=U()),(xe.value.minimumX===0||xe.value.minimumX>Ze.leftRaw)&&(xe.value.minimumX=Ze.leftRaw),(xe.value.maximumX===SV||xe.value.maximumX<Ze.leftRaw)&&(xe.value.maximumX=Ze.leftRaw),(xe.value.minimumY===0||xe.value.minimumY>Ze.topRaw)&&(xe.value.minimumY=Ze.topRaw),(xe.value.maximumY===TV||xe.value.maximumY<Ze.topRaw)&&(xe.value.maximumY=Ze.topRaw)}t.watch(()=>[a.homeFilteredChains,a.awayFilteredChains,a.homeFilteredChainsShadows,a.awayFilteredChainsShadows,z.value,a.isDataLoaded,a.playersInfo],()=>{a.isDataLoaded&&ee()},{immediate:!0,deep:!0});function he(Ze,xe,Oe,Fe,We=!1){const et=Oe-Ze,tt=Fe-xe;let ot=Math.atan2(tt,et)*(180/Math.PI);return We&&(ot+=90),ot}function pe(Ze){return Ze*(Math.PI/180)}function ne(Ze){if(!g.value||g.value.length===0)return 1;const xe=Math.max(...g.value.map(We=>We.count||1));if(xe<=0)return 1;const Oe=Ze.count||1;if(xe===1)return 5;const Fe=Oe/xe*5;return Fe<.5?.5:Fe}function le(Ze){return ne(Ze)>=3.5?Ze.is_home?"white":"black":""}const ie=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||!a.areConnectionsVisible||g.value.length===0||!D.value.size)return[];const Ze=g.value.reduce((xe,Oe)=>{if(D.value.has(Oe.to)&&D.value.has(Oe.from)&&a.playersSelected.includes(Oe.from)&&a.playersSelected.includes(Oe.to)){const Fe=`${Oe.from}-${Oe.to}`,We=`${Oe.to}-${Oe.from}`,et=xe.get(Fe)||xe.get(We),tt=D.value.get(Oe.from).leftRaw,ot=D.value.get(Oe.from).topRaw,vt=D.value.get(Oe.to).leftRaw,yt=D.value.get(Oe.to).topRaw,It=he(tt,ot,vt,yt,!0),Ut=pe(It),Gt=Math.cos(Ut)*CV,st=Math.sin(Ut)*CV;et?et.left?et.right={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:et.left={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:xe.set(Fe,{left:{...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st},right:null})}return xe},new Map);return Array.from(Ze.values()).filter(xe=>xe.left||xe.right)});function me(Ze){g.value=Ze}const ve=t.computed(()=>Ze=>Ze.isCandidateToDelete?"#F7A138":P.value.length>0&&(Ze.isDistanceActive||Ze.isDistanceCandidate||Ze.isDistanceSelected)?"#44E3E7":"#fff"),ye=t.computed(()=>(Ze,xe=!1)=>Ze.isDistanceActive?"#41AAEB":Ze.is_home?xe?"#797E89":Ze.is_titular?"#2d65d4":"#20539F":xe?"#515869":Ze.is_titular?"#CBEE6B":"#789626"),ke=t.computed(()=>Ze=>Ze.is_home?Ze.is_titular?"#6891F8":"#4376F6":Ze.is_titular?"#CBEE6B":"#789626"),Ee=t.computed(()=>(Ze,xe=!1)=>Ze.is_home||Ze.isDistanceActive||xe?"#fff":Ze.is_titular?"#000":"#fff");function Te(Ze){if(!Ze)return"";const xe=Ze.trim().split(",");if(xe.length>=2){const Oe=xe[0].trim().split(" ")[0];return`${xe[1].trim().split(" ")[0].charAt(0)}. ${Oe}`}return Ze}function Pe(Ze,xe){a.customDistance?(xe.isDistanceCandidate=!0,i.value=xe):Le(Ze,xe)}function Be(Ze){a.customDistance?(Ze.isDistanceCandidate=!1,i.value=null):je()}function Le(Ze,xe){const{homeTeam:Oe,awayTeam:Fe}=a.playersInfo,We=Oe.find(tt=>tt.player_id===xe.id)||Fe.find(tt=>tt.player_id===xe.id);We&&We.name&&(We.formattedName=Te(We.name));const et=Ze.target.getBoundingClientRect();b.value={show:!0,x:et.left+et.width/2,y:et.top,player:We||xe},t.nextTick(()=>{if(d.value){const tt=d.value.offsetHeight;b.value.y=et.top-tt-5}})}function je(){b.value.show=!1}function Me(Ze){!a.customDistance||T.value||(Ze.isDistanceCandidate=!0,i.value=Ze)}function Re(Ze){Ze.isDistanceActive||(Ze.isDistanceCandidate=!1,i.value=null)}function Ie(Ze){const xe=Ze.from,Oe=Ze.to,Fe=xe.type==="line"?xe:Oe.type==="line"?Oe:null,We=xe.type!=="line"?xe:Oe.type!=="line"?Oe:null;if(Fe&&We){const et=Fe[a.customDistance];et&&(et.find(tt=>tt.id===We.id)||et.push(We))}}function ge(Ze,xe,Oe=!1){if(!(Ze.type==="line"&&xe.type==="line")&&Ze&&xe){const Fe=`${Ze.id}-${xe.id}`;if(!Oe){if(Ze[B.value]&&Ze[B.value].includes(Fe))return;Ze[B.value]?Ze[B.value].push(Fe):Ze[B.value]=[Fe],xe[B.value]?xe[B.value].push(Fe):xe[B.value]=[Fe],Ze.isDistanceActive=!1,Ze.isDistanceSelected=!0,xe.isDistanceActive=!1,xe.isDistanceSelected=!0}Ze.distanceLeft=Ze.leftRaw||xe.leftRaw,Ze.distanceTop=Ze.topRaw||xe.topRaw,xe.distanceLeft=xe.leftRaw||Ze.leftRaw,xe.distanceTop=xe.topRaw||Ze.topRaw;const We=Math.abs(Ze.distanceLeft-xe.distanceLeft),et=Math.abs(Ze.distanceTop-xe.distanceTop),tt=We*y.value,ot=et*x.value,vt=Math.sqrt(tt*tt+ot*ot).toFixed(0),yt=Math.min(Ze.distanceLeft,xe.distanceLeft),It=Math.min(Ze.distanceTop,xe.distanceTop),Ut=yt+Math.abs(Ze.distanceLeft-xe.distanceLeft)/2,Gt=It+Math.abs(Ze.distanceTop-xe.distanceTop)/2,st=yt===Ze.distanceLeft,Ke=It===Ze.distanceTop,ht=0,mt=0,Pt=st?Ze.distanceLeft+ht:Ze.distanceLeft-ht,Et=Ke?Ze.distanceTop+mt:Ze.distanceTop-mt,nt=st?xe.distanceLeft-ht:xe.distanceLeft+ht,ct=Ke?xe.distanceTop-mt:xe.distanceTop+mt,Ye={from:Ze,to:xe,distanceInMeters:vt,lineLabelLeft:Ut,lineLabelTop:Gt,fromLineLeft:Pt,fromLineTop:Et,toLineLeft:nt,toLineTop:ct,id:Fe};if(a.customDistance==="block")if(Oe){const lt=l.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else l.value.push(Ye),Ie(Ye);else if(a.customDistance==="players")if(Oe){const lt=f.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else f.value.push(Ye),Ie(Ye);Ce(),n.value=null,i.value=null}}function Ce(){const Ze=l.value.filter(Oe=>{let Fe=Oe.from.isVisible!==!1,We=Oe.to.isVisible!==!1;return Oe.from.type==="line"&&Oe.from.block&&(Fe=Oe.from.block.some(et=>et.isVisible!==!1)),Oe.to.type==="line"&&Oe.to.block&&(We=Oe.to.block.some(et=>et.isVisible!==!1)),Fe&&We}),xe=f.value.filter(Oe=>{let Fe=Oe.from.isVisible,We=Oe.to.isVisible;return Oe.from.type==="line"&&Oe.from.players&&(Fe=Oe.from.players.some(et=>et.isVisible)),Oe.to.type==="line"&&Oe.to.players&&(We=Oe.to.players.some(et=>et.isVisible)),Fe&&We});_("change-custom-distances",{blockDistancesTotal:Ze.length,playerDistancesTotal:xe.length})}function we(Ze){!a.customDistance||T.value||n.value&&n.value.type==="line"&&Ze.type==="line"||(Ze.isDistanceActive=!0,n.value&&!n.value.team?ge(n.value,Ze):(n.value=Ze,i.value=null))}function Ve(Ze){!a.customDistance||T.value||(Ze.isDistanceActive=!Ze.isDistanceActive,n.value&&n.value.id!==Ze.id&&(ge(n.value,Ze),n.value&&(n.value.isDistanceActive=!1,n.value.isDistanceSelected=!0)),n.value=Ze.isDistanceActive?Ze:null)}function Ne(){a.customDistance&&(a.customDistance==="players"?(f.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesPlayers,delete Ze.to.activeDistancesPlayers,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.players&&(xe.players=[])}),f.value=[]):a.customDistance==="block"&&(l.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesBlock,delete Ze.to.activeDistancesBlock,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.block&&(xe.block=[])}),l.value=[]),u.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),w.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),n.value=null,i.value=null,T.value=null,Ce())}function Ue(Ze){if(!(T.value&&T.value.id!==Ze.id))if(!Ze.isCandidateToDelete)T.value=Ze,Ze.isCandidateToDelete=!0,Ze.from.isCandidateToDelete=!0,Ze.to.isCandidateToDelete=!0;else{const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null,Oe=Ze.from.type!=="line"?Ze.from:Ze.to.type!=="line"?Ze.to:null;if(xe&&Oe){const Fe=xe[a.customDistance];Fe&&(xe[a.customDistance]=Fe.filter(We=>We.id!==Oe.id))}a.customDistance==="players"?f.value=f.value.filter(Fe=>Fe.id!==Ze.id):a.customDistance==="block"&&(l.value=l.value.filter(Fe=>Fe.id!==Ze.id)),Ze.from.isDistanceActive=!1,Ze.from.isCandidateToDelete=!1,Ze.from.isDistanceCandidate=!1,Ze.to.isDistanceActive=!1,Ze.to.isCandidateToDelete=!1,Ze.to.isDistanceCandidate=!1,Ze.isCandidateToDelete=!1,T.value=null,Ze.from[B.value]=Ze.from[B.value].filter(Fe=>Fe!==Ze.id),Ze.to[B.value]=Ze.to[B.value].filter(Fe=>Fe!==Ze.id),Ze.from.isDistanceSelected=Ze.from[B.value].length>0,Ze.to.isDistanceSelected=Ze.to[B.value].length>0,Ce()}}function Xe(){T.value&&(T.value.isCandidateToDelete=!1,T.value.from.isCandidateToDelete=!1,T.value.to.isCandidateToDelete=!1,T.value=null)}return t.onMounted(()=>{document.addEventListener("click",Xe)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",Xe)}),o({setConnections:me,clearCustomDistances:Ne}),(Ze,xe)=>(t.openBlock(),t.createElementBlock("div",{class:"soccer-field",style:t.normalizeStyle(S.value)},[b.value.show?(t.openBlock(),t.createBlock(Fmt,{key:`tooltip-${b.value.player.id}`,show:b.value.show,player:b.value.player,x:b.value.x,y:b.value.y,ref_key:"tooltipBoxRef",ref:d},null,8,["show","player","x","y"])):t.createCommentVNode("",!0),t.createElementVNode("div",Rmt,[t.createElementVNode("div",Vmt,[a.isDataLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",jmt,[...xe[0]||(xe[0]=[t.createElementVNode("div",{class:"loading-spinner-small"},"⚡",-1),t.createElementVNode("span",null,"Calculando posiciones...",-1)])])),t.createElementVNode("div",Umt,[(t.openBlock(),t.createElementBlock("svg",Gmt,[xe[1]||(xe[1]=t.createStaticVNode('<defs data-v-57c79176><marker id="arrow-left-home" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-57c79176><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#33E4FF" data-v-57c79176></path></marker><marker id="arrow-right-home" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-57c79176><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#33E4FF" data-v-57c79176></path></marker><marker id="arrow-left-away" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-57c79176><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#CBEE6B" data-v-57c79176></path></marker><marker id="arrow-right-away" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-57c79176><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#CBEE6B" data-v-57c79176></path></marker></defs>',1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,Oe=>(t.openBlock(),t.createElementBlock("path",{key:Oe.id,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#4AC9FF","stroke-width":"3","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:Oe.isDistanceActive||Oe.isDistanceCandidate||Oe[e.customDistance].some(Fe=>Fe&&Fe.isVisible)?1:0,class:"distance-line",onMouseover:Fe=>Me(Oe),onMouseout:Fe=>Re(Oe),onClick:t.withModifiers(Fe=>we(Oe),["prevent","stop"])},null,40,Hmt))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ie.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("g",{key:`cc-${Fe}`},[Oe.left?(t.openBlock(),t.createElementBlock("path",{key:0,id:`pl-${Fe}`,d:`M ${Oe.left.x1} ${Oe.left.y1} L ${Oe.left.x2} ${Oe.left.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.left),"stroke-width":ne(Oe.left)})},null,12,Zmt)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("path",{key:1,id:`pr-${Fe}`,d:`M ${Oe.right.x1} ${Oe.right.y1} L ${Oe.right.x2} ${Oe.right.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.right),"stroke-width":ne(Oe.right)})},null,12,Wmt)):t.createCommentVNode("",!0),Oe.left?(t.openBlock(),t.createElementBlock("text",{key:2,style:t.normalizeStyle({fill:ke.value(Oe.left),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.left),"stroke-width":ne(Oe.left)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pl-${Fe}`,startOffset:"40%"},"➤",8,Xmt)],4)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("text",{key:3,style:t.normalizeStyle({fill:ke.value(Oe.right),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.right),"stroke-width":ne(Oe.right)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pr-${Fe}`,startOffset:"40%"},"➤",8,qmt)],4)):t.createCommentVNode("",!0)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe,!0),stroke:"#fff",opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},null,10,Ymt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe,!0),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},t.toDisplayString(Oe.number),11,Jmt)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id,style:t.normalizeStyle({opacity:E(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.isVisible}),onMouseenter:Fe=>Pe(Fe,Oe),onMouseleave:Fe=>Be(Oe),onClick:t.withModifiers(Fe=>Ve(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe),stroke:ve.value(Oe),opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,Kmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.number),13,Qmt)],46,$mt))),128)),e.isDistanceVisible&&V.value?(t.openBlock(),t.createElementBlock("g",e1t,[t.createElementVNode("rect",{width:`${h.value.maximumX-h.value.minimumX}`,height:"24",x:h.value.minimumX,y:"5",rx:"0",ry:"0",fill:"#20539F"},null,8,t1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:h.value.minimumX,y1:"16",x2:h.value.maximumX,y2:"16","marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,a1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,r1t),t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,n1t),t.createElementVNode("text",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2,y:"18","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((h.value.maximumX-h.value.minimumX)*y.value).toFixed(0))+" m ",9,i1t)]),t.createElementVNode("rect",{width:24,height:`${h.value.maximumY-h.value.minimumY}`,x:"15",y:h.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,o1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"25",y1:h.value.minimumY,x2:"25",y2:h.value.maximumY,"marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,s1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,l1t),t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,c1t),t.createElementVNode("text",{x:"24",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((h.value.maximumY-h.value.minimumY)*x.value).toFixed(0))+" m ",9,u1t)])])):t.createCommentVNode("",!0),e.isDistanceVisible&&G.value?(t.openBlock(),t.createElementBlock("g",d1t,[t.createElementVNode("rect",{width:`${m.value.maximumX-m.value.minimumX}`,height:"24",x:m.value.minimumX,y:"368",rx:"0",ry:"0",fill:"#20539F"},null,8,h1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:m.value.minimumX,y1:"379",x2:m.value.maximumX,y2:"379","marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,p1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,f1t),t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,m1t),t.createElementVNode("text",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2,y:"381","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((m.value.maximumX-m.value.minimumX)*y.value).toFixed(0))+" m ",9,g1t)]),t.createElementVNode("rect",{width:24,height:`${m.value.maximumY-m.value.minimumY}`,x:"578",y:m.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,y1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"588",y1:m.value.minimumY,x2:"588",y2:m.value.maximumY,"marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,v1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,b1t),t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,x1t),t.createElementVNode("text",{x:"586",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((m.value.maximumY-m.value.minimumY)*x.value).toFixed(0))+" m ",9,_1t)])])):t.createCommentVNode("",!0),n.value&&i.value?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M ${n.value.leftRaw||i.value.leftRaw} ${n.value.topRaw||i.value.topRaw} L ${i.value.leftRaw||n.value.leftRaw} ${i.value.topRaw||n.value.topRaw}`,style:{stroke:"#44E3E7","stroke-width":2}},null,8,w1t)):t.createCommentVNode("",!0),e.customDistance&&e.customDistance==="block"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.isAwayTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${m.value.minimumX} ${m.value.minimumY}H${m.value.maximumX}V${m.value.maximumY}H${m.value.minimumX}`,fill:"#CBEE6B","fill-opacity":"0.4"},null,8,k1t)):t.createCommentVNode("",!0),e.isHomeTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${h.value.minimumX} ${h.value.minimumY}H${h.value.maximumX}V${h.value.maximumY}H${h.value.minimumX}`,fill:"#33C9FF","fill-opacity":"0.4"},null,8,S1t)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("path",{key:`bloc-boundary-${Fe}`,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#33E4FF","stroke-width":"4","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:(Oe.isDistanceActive||Oe.isDistanceCandidate||Oe.isDistanceSelected)&&Oe.isVisible?1:0,onMouseover:We=>Me(Oe),onMouseout:We=>Re(Oe),onClick:t.withModifiers(We=>we(Oe),["prevent","stop"])},null,40,T1t))),128))],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`active-distance-${Fe}`},[Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("line",{key:0,style:t.normalizeStyle({stroke:Oe.isCandidateToDelete?"#F7A138":"#38F3F7","stroke-width":2,opacity:L(Oe)}),"stroke-dasharray":"2,2",x1:Oe.fromLineLeft,y1:Oe.fromLineTop,x2:Oe.toLineLeft,y2:Oe.toLineTop},null,12,C1t)):t.createCommentVNode("",!0),Oe.from.team?(t.openBlock(),t.createElementBlock("g",{key:1,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.from.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.from)},onMouseleave:We=>{I(),Be(Oe.from)},onClick:t.withModifiers(We=>Ve(Oe.from),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.from.leftRaw,y:Oe.from.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.from.is_titular?2:1,fill:ye.value(Oe.from),stroke:ve.value(Oe.from),opacity:Oe.from.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,A1t),t.createElementVNode("text",{x:Oe.from.leftRaw,y:Oe.from.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.from),opacity:Oe.from.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.from.number),13,M1t)],46,E1t)):t.createCommentVNode("",!0),Oe.to.team?(t.openBlock(),t.createElementBlock("g",{key:2,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.to.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.to)},onMouseleave:We=>{I(),Be(Oe.to)},onClick:t.withModifiers(We=>Ve(Oe.to),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.to.leftRaw,y:Oe.to.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.to.is_titular?2:1,fill:ye.value(Oe.to),stroke:ve.value(Oe.to),opacity:Oe.to.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,I1t),t.createElementVNode("text",{x:Oe.to.leftRaw,y:Oe.to.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.to),opacity:Oe.to.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.to.number),13,L1t)],46,P1t)):t.createCommentVNode("",!0),Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("g",{key:3,class:"is-pointer",onClick:t.withModifiers(We=>Ue(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,style:t.normalizeStyle({opacity:L(Oe)}),width:"48",height:"23",rx:"11.5979",stroke:Oe.isCandidateToDelete?"#F7A138":"#44E3E7","stroke-width":"2"},null,12,O1t),t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,width:"48",height:"23",rx:"11.5979",style:t.normalizeStyle({opacity:L(Oe)}),fill:Oe.isCandidateToDelete?"#F7A138":"#264F8C","fill-opacity":"1"},null,12,z1t),t.createElementVNode("text",{x:Oe.lineLabelLeft,y:Oe.lineLabelTop+1,"text-anchor":"middle","dominant-baseline":"middle","font-size":"13",fill:"white",style:t.normalizeStyle({opacity:L(Oe)})},t.toDisplayString(Oe.isCandidateToDelete?"X":`${Oe.distanceInMeters} m`),13,N1t)],8,B1t)):t.createCommentVNode("",!0)],64))),128))]))])])])],4))}},V1t=du(R1t,[["__scopeId","data-v-57c79176"]]),j1t={class:"filters-container"},U1t={class:"events-section"},G1t={class:"section-header"},H1t={class:"all-toggle"},Z1t={class:"events-list"},W1t={class:"events-section"},X1t={class:"section-header"},q1t={class:"events-list"},Y1t={__name:"FilterEvents",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["update-start-event","update-end-event","toggle-all-start-events","toggle-all-end-events"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",j1t,[t.createElementVNode("div",U1t,[t.createElementVNode("div",G1t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",H1t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",Z1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",W1t,[t.createElementVNode("div",X1t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",q1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},EV=du(Y1t,[["__scopeId","data-v-4a62a51c"]]),J1t={class:"side-filters"},$1t={class:"team-switch-container"},K1t={class:"team-switch team-switch-toggle"},Q1t={class:"team-content"},egt=["src"],tgt={class:"team-label"},agt={class:"team-content"},rgt={class:"team-label"},ngt=["src"],igt={class:"team-visible-checkbox"},ogt={class:"checkbox-container"},sgt=["checked"],lgt=["checked"],cgt={class:"side-filters__tabs"},ugt={class:"tabs-container"},dgt={class:"side-filters__content"},hgt={__name:"SideFilters",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultChainsFilters:{type:Object,default:()=>({})},homeTeamId:{type:Number,default:1},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},awayTeamId:{type:Number,default:5},gameId:{type:Number,default:88247},players:{type:Array,default:()=>[]},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},game:{type:Object,default:()=>({})}},emits:["home-chains-filtered","away-chains-filtered","home-ball-zones-filtered","away-ball-zones-filtered","home-stats-updated","away-stats-updated","selected-team-tab","home-team-visibility","away-team-visibility","update:isHomeTeamVisible","update:isAwayTeamVisible"],setup(e,{emit:o}){const s=e,z=t.ref("chains"),W=t.ref(!0),{selectedStartCategories:v,selectedEndCategories:g,isDataLoaded:r,loadInitialData:b,getFilteredData:d}=wV(s.gameId),a=t.ref({...s.defaultChainsFilters}),_=t.ref({...s.defaultChainsFilters}),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(structuredClone(s.startedCategories)),n=t.ref(structuredClone(s.endedCategories)),i=t.ref(!0),f=t.ref(!0),l=t.ref(!0),h=t.ref(!0),m=t.ref(s.homeTeamId),w=o,T=U=>{const J=U===s.homeTeamId?a.value:_.value,re={startCategories:J.startCategories,endCategories:J.endCategories,teamId:J.possessionTeamId,minDuration:J.durationRange.min,maxDuration:J.durationRange.max,excludedFirstSeconds:J.excludedFirstSeconds,excludedLastSeconds:J.excludedLastSeconds,chainInitialZones:J.chainInitialZones,chainFinalZones:J.chainFinalZones,ballInterestZones:J.ballInterestZones,timeFromTimeline:s.timeFromTimeline},q=d(re);q&&(U===s.homeTeamId?(w("home-chains-filtered",q.chains,U),w("home-ball-zones-filtered",re.ballInterestZones,U),w("home-stats-updated",q.stats,U)):(w("away-chains-filtered",q.chains,U),w("away-ball-zones-filtered",re.ballInterestZones,U),w("away-stats-updated",q.stats,U)))},A=U=>{const J=m.value===s.homeTeamId?a.value:_.value;switch(U){case"home":J.possessionTeamId=s.homeTeamId;break;case"away":J.possessionTeamId=s.awayTeamId;break;case"both":J.possessionTeamId=null;break}T(m.value)},C=(U,J)=>{const re=m.value===s.homeTeamId?a.value:_.value;U==="less-than"?re.durationRange={min:null,max:J}:re.durationRange={min:J,max:null},T(m.value)};function I(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?y.value:u.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.startCategories.includes(J.id)||re.startCategories.push(J.id):re.startCategories=re.startCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?i.value=re.startCategories.length===y.value.length:l.value=re.startCategories.length===u.value.length,T(m.value)}function L(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?x.value:n.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.endCategories.includes(J.id)||re.endCategories.push(J.id):re.endCategories=re.endCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?f.value=re.endCategories.length===x.value.length:h.value=re.endCategories.length===n.value.length,T(m.value)}const E=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?y.value:u.value;re.forEach(q=>q.isSelected=U),U?J.startCategories=re.map(q=>q.id):J.startCategories=[],m.value===s.homeTeamId?i.value=U:l.value=U,T(m.value)},P=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?x.value:n.value;re.forEach(q=>q.isSelected=U),U?J.endCategories=re.map(q=>q.id):J.endCategories=[],m.value===s.homeTeamId?f.value=U:h.value=U,T(m.value)},M=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedFirstSeconds=U,T(m.value)},S=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedLastSeconds=U,T(m.value)},B=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainInitialZones=U,T(m.value)},k=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainFinalZones=U,T(m.value)},O=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.ballInterestZones=U,T(m.value)},D=v,V=g;t.watch(()=>r.value,async U=>{U||(await b(),W.value?(T(s.homeTeamId),T(s.awayTeamId),W.value=!1):T(m.value))},{immediate:!0}),t.watch(()=>s.timeFromTimeline,()=>{T(s.homeTeamId),T(s.awayTeamId)},{immediate:!1});const G=t.computed(()=>s.startedCategories.length>0?m.value===s.homeTeamId?y.value:u.value:[]),H=t.computed(()=>s.endedCategories.length>0?m.value===s.homeTeamId?x.value:n.value:[]);return t.watch([D,V],()=>{D.value.length===0&&(D.value=G.value.map(U=>U.id)),V.value.length===0&&(V.value=H.value.map(U=>U.id))},{immediate:!0}),t.watch([m],([U])=>{w("selected-team-tab",U)},{immediate:!0}),(U,J)=>(t.openBlock(),t.createElementBlock("div",J1t,[t.createElementVNode("div",$1t,[t.createElementVNode("div",K1t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:m.value===s.homeTeamId?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.homeTeamId}]),onClick:J[0]||(J[0]=re=>m.value=s.homeTeamId),type:"button"},[t.createElementVNode("span",Q1t,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.homeTeamId}.png`,alt:"Escudo local",class:"team-logo"},null,8,egt),t.createElementVNode("span",tgt,t.toDisplayString(e.nameHomeTeam),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.awayTeamId}]),onClick:J[1]||(J[1]=re=>m.value=s.awayTeamId),type:"button"},[t.createElementVNode("span",agt,[t.createElementVNode("span",rgt,t.toDisplayString(e.nameAwayTeam),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.awayTeamId}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,ngt)])],2)])]),t.createElementVNode("div",igt,[t.createElementVNode("div",ogt,[t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isHomeTeamVisible,onChange:J[2]||(J[2]=re=>w("update:isHomeTeamVisible",re.target.checked))},null,40,sgt),J[7]||(J[7]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameHomeTeam)+" visible",1)],512),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isAwayTeamVisible,onChange:J[3]||(J[3]=re=>w("update:isAwayTeamVisible",re.target.checked))},null,40,lgt),J[8]||(J[8]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameAwayTeam)+" visible",1)],512),[[t.vShow,m.value===s.awayTeamId]])])]),t.createElementVNode("div",cgt,[t.createElementVNode("div",ugt,[t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="chains"}]),onClick:J[4]||(J[4]=re=>z.value="chains")}," Filtros ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="events"}]),onClick:J[5]||(J[5]=re=>z.value="events")}," Eventos ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="players"}]),onClick:J[6]||(J[6]=re=>z.value="players")}," Jugadores ",2)])]),t.createElementVNode("div",dgt,[t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(T5,{"team-id":s.homeTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(T5,{"team-id":s.awayTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="chains"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(EV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(EV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":l.value,"all-end-events-selected":h.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="events"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.homeTeamId)},null,8,["players"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.awayTeamId)},null,8,["players"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="players"]])])]))}},pgt=du(hgt,[["__scopeId","data-v-c043c4cf"]]),fgt={class:"team team-left"},mgt={class:"team-header"},ggt={class:"team-logo",style:{"margin-left":"-7px"}},ygt=["src","alt"],vgt={class:"team team-right"},bgt={class:"team-header"},xgt={class:"team-logo",style:{"margin-right":"4px"}},_gt=["src","alt"],wgt={class:"roles-section"},kgt={class:"role-label local"},Sgt={class:"team-logo small"},Tgt=["src","alt"],Cgt={class:"role-details"},Egt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Agt=["opacity"],Mgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pgt=["opacity"],Igt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"43px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Lgt={class:"role-label visitante"},Bgt={class:"team-logo small"},Ogt=["src","alt"],zgt={class:"role-details"},Ngt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Dgt=["opacity"],Fgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rgt=["opacity"],Vgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"46px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},jgt={__name:"LabelsTool",props:{game:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},players:{type:Array,default:()=>[]},showPases:{type:Boolean,default:!1},showDistancia:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},isDeleteVisible:{type:Boolean,default:!1}},emits:["update:isHomeTeamVisible","update:isAwayTeamVisible","delete-distances"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(s.isHomeTeamVisible),v=t.ref(s.isAwayTeamVisible),g=t.ref({local:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows},visitante:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows}}),r=t.computed(()=>({"--grid-template-columns":s.isMobile?"40px 1fr":"80px 1fr"})),b=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.homeTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isHomeTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isHomeTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}}),d=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.awayTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isAwayTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isAwayTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}});t.watch(()=>s.players,()=>{g.value.local.titular=b.value.selectedTitulares>0&&s.isHomeTeamVisible,g.value.local.cambios=b.value.selectedCambios>0&&s.isHomeTeamVisible,g.value.visitante.titular=d.value.selectedTitulares>0&&s.isAwayTeamVisible,g.value.visitante.cambios=d.value.selectedCambios>0&&s.isAwayTeamVisible},{deep:!0,immediate:!0}),t.watch(()=>s.showPases,_=>{g.value.local.pases=_&&s.isHomeTeamVisible,g.value.visitante.pases=_&&s.isAwayTeamVisible}),t.watch(()=>s.showDistancia,_=>{g.value.local.distancia=_&&s.isHomeTeamVisible,g.value.visitante.distancia=_&&s.isAwayTeamVisible}),t.watch(()=>s.showShadows,_=>{g.value.local.shadows=_&&s.isHomeTeamVisible,g.value.visitante.shadows=_&&s.isAwayTeamVisible},{immediate:!0}),t.watch(()=>s.isHomeTeamVisible,_=>{W.value=_,g.value.local.pases=s.showPases&&_,g.value.local.distancia=s.showDistancia&&_,g.value.local.shadows=s.showShadows&&_,g.value.local.titular=b.value.selectedTitulares>0&&_,g.value.local.cambios=b.value.selectedCambios>0&&_}),t.watch(()=>s.isAwayTeamVisible,_=>{v.value=_,g.value.visitante.pases=s.showPases&&_,g.value.visitante.distancia=s.showDistancia&&_,g.value.visitante.shadows=s.showShadows&&_,g.value.visitante.titular=d.value.selectedTitulares>0&&_,g.value.visitante.cambios=d.value.selectedCambios>0&&_}),t.watch(W,_=>{z("update:isHomeTeamVisible",_)}),t.watch(v,_=>{z("update:isAwayTeamVisible",_)});function a(){z("delete-distances")}return(_,y)=>(t.openBlock(),t.createElementBlock("div",{class:"labels-tool",style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:"teams-header",style:t.normalizeStyle(e.isMobile?"gap:0px":"")},[t.createElementVNode("div",fgt,[t.createElementVNode("div",mgt,[t.createVNode(t.unref(pp),{modelValue:W.value,"onUpdate:modelValue":y[0]||(y[0]=x=>W.value=x)},null,8,["modelValue"]),t.createElementVNode("div",ggt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,ygt)]),t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.homeTeam.colloquial_name),5),y[2]||(y[2]=t.createElementVNode("div",{class:"home-arrow"},[t.createElementVNode("svg",{width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M88.499 2.88087L83.499 5.76759L83.499 3.38087L6.11719 3.38086C5.88303 4.61447 4.80077 5.54785 3.49902 5.54785C2.02626 5.54785 0.832031 4.35362 0.832031 2.88086C0.832031 1.4081 2.02626 0.213867 3.49902 0.213867C4.80077 0.213868 5.88303 1.14725 6.11719 2.38086L83.499 2.38087L83.499 -0.00585215L88.499 2.88087Z",fill:"#336DFF"})])],-1))]),y[3]||(y[3]=t.createElementVNode("div",{class:"team-arrow blue"},null,-1))]),e.isDeleteVisible?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:"delete-button",onClick:a},[...y[4]||(y[4]=[t.createElementVNode("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10.549.91v.957h4.487v1.628h-.897v12.588c0 .472-.177.924-.488 1.256-.31.33-.73.514-1.164.514H3.513c-.435 0-.854-.183-1.164-.514a1.839 1.839 0 0 1-.488-1.256V3.495H.964V1.867H5.45V.91h5.098zm-7.18 15.316h9.262V3.495H3.369v12.731zm7.18-10.53v8.328H9.04V5.696h1.508zm-3.59 0v8.328H5.451V5.696H6.96z",fill:"#fff",stroke:"#2E3B46","stroke-width":".287"})],-1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",vgt,[t.createElementVNode("div",bgt,[t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.awayTeam.colloquial_name),5),t.createElementVNode("div",xgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,_gt)]),t.createVNode(t.unref(pp),{modelValue:v.value,"onUpdate:modelValue":y[1]||(y[1]=x=>v.value=x)},null,8,["modelValue"]),y[5]||(y[5]=t.createElementVNode("div",{class:"away-arrow"},[t.createElementVNode("svg",{class:"arrow-svg right",width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.500977 2.88087L5.50098 5.76759L5.50098 3.38087L82.8828 3.38086C83.117 4.61447 84.1992 5.54785 85.501 5.54785C86.9737 5.54785 88.168 4.35362 88.168 2.88086C88.168 1.4081 86.9737 0.213867 85.501 0.213867C84.1992 0.213868 83.117 1.14725 82.8828 2.38086L5.50098 2.38087L5.50098 -0.00585215L0.500977 2.88087Z",fill:"#CBEE6B"})])],-1))]),y[6]||(y[6]=t.createElementVNode("div",{class:"team-arrow green"},null,-1))])],4),t.createElementVNode("div",wgt,[t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",kgt,[t.createElementVNode("div",Sgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,Tgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"L":"LOCAL"),5)]),t.createElementVNode("div",Cgt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle blue",{inactive:!g.value.local.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle blue-substitution substitution-circle",{inactive:!g.value.local.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow blue",{inactive:!g.value.local.pases}])},[(t.openBlock(),t.createElementBlock("svg",Egt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#6891F8",opacity:g.value.local.pases?1:.4},null,8,Agt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Mgt,[t.createElementVNode("path",{d:"M12.5419 10.752C12.2528 11.041 11.7842 11.0411 11.4951 10.752C11.206 10.4629 11.2061 9.99424 11.4951 9.70509L15.3974 5.80275L15.3974 5.23048L11.4951 1.32814C11.2061 1.03899 11.206 0.570355 11.4951 0.281262C11.7842 -0.00783105 12.2528 -0.00774079 12.5419 0.281262L17.2538 4.99318C17.543 5.28231 17.543 5.75091 17.2538 6.04005L12.5419 10.752ZM10.0634 6.25685L10.0634 4.77638L12.7304 4.77638L12.7304 6.25685L10.0634 6.25685ZM4.73041 6.25685L4.73041 4.77638L7.3974 4.77638L7.3974 6.25685L4.73041 6.25685ZM0.730411 6.25685L0.654239 6.25294C0.281131 6.2148 -0.00982329 5.89979 -0.00982332 5.51661C-0.00982336 5.13344 0.281131 4.81843 0.654239 4.78029L0.730411 4.77638L2.06342 4.77638L2.06342 6.25685L0.730411 6.25685Z",fill:"#33E4FF",opacity:g.value.local.distancia?1:.4},null,8,Pgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.local.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Igt)):t.createCommentVNode("",!0)],6),t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Lgt,[t.createElementVNode("div",Bgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,Ogt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"V":"VISITANTE"),5)]),t.createElementVNode("div",zgt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle green",{inactive:!g.value.visitante.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle green-substitution substitution-circle",{inactive:!g.value.visitante.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow green",{inactive:!g.value.visitante.pases}])},[(t.openBlock(),t.createElementBlock("svg",Ngt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#CBEE6B",opacity:g.value.visitante.pases?1:.4},null,8,Dgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Fgt,[t.createElementVNode("path",{d:"M12.5419 11.252C12.2528 11.541 11.7842 11.5411 11.4951 11.252C11.206 10.9629 11.2061 10.4942 11.4951 10.2051L15.3974 6.30275L15.3974 5.73048L11.4951 1.82814C11.2061 1.53899 11.206 1.07035 11.4951 0.781262C11.7842 0.492169 12.2528 0.492259 12.5419 0.781262L17.2538 5.49318C17.543 5.78231 17.543 6.25091 17.2538 6.54005L12.5419 11.252ZM10.0634 6.75685L10.0634 5.27638L12.7304 5.27638L12.7304 6.75685L10.0634 6.75685ZM4.73041 6.75685L4.73041 5.27638L7.3974 5.27638L7.3974 6.75685L4.73041 6.75685ZM0.730411 6.75685L0.654239 6.75294C0.281131 6.7148 -0.00982329 6.39979 -0.00982332 6.01661C-0.00982336 5.63344 0.281131 5.31843 0.654239 5.28029L0.730411 5.27638L2.06342 5.27638L2.06342 6.75685L0.730411 6.75685Z",fill:"#CBEE6B",opacity:g.value.visitante.distancia?1:.4},null,8,Rgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.visitante.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Vgt)):t.createCommentVNode("",!0)],6)])],4))}},Ugt=du(jgt,[["__scopeId","data-v-8ecea783"]]),Ggt={__name:"ModalConfirm",props:{isVisible:{type:Boolean,default:!1}},emits:["close","delete"],setup(e,{emit:o}){const s=o;function z(){s("close")}function W(){s("delete"),z()}return(v,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:z},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:g[0]||(g[0]=t.withModifiers(()=>{},["stop"]))},[g[1]||(g[1]=t.createElementVNode("div",{class:"header"},[t.createElementVNode("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.904.116v.779h3.646v1.322h-.729v10.227c0 .384-.144.751-.396 1.02a1.297 1.297 0 0 1-.946.42H2.188c-.354 0-.695-.15-.947-.42a1.494 1.494 0 0 1-.395-1.02V2.217h-.73V.895h3.647V.116h4.141zM2.071 12.562h7.525V2.216H2.07v10.345zm5.833-8.556v6.767H6.68V4.006h1.225zm-2.917 0v6.767H3.763V4.006h1.224z",fill:"#fff",stroke:"#2E3B46","stroke-width":".233"})]),t.createElementVNode("div",null," Eliminar distancias ")],-1)),g[2]||(g[2]=t.createElementVNode("div",{class:"body"}," ¿Seguro que desea eliminar las distancias personalizadas? ",-1)),t.createElementVNode("div",{class:"footer"},[t.createElementVNode("div",{class:"cancel-button is-pointer",onClick:z}," Cancelar "),t.createElementVNode("div",{role:"button",class:"delete-button is-pointer",onClick:W}," Eliminar ")])],512)])):t.createCommentVNode("",!0)]),_:1})])),g[3]||(g[3]=t.createElementVNode("div",null,null,-1))],64))}},Hgt=du(Ggt,[["__scopeId","data-v-9d263082"]]),Zgt=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Wgt={class:"positions-container__body"},Xgt={class:"positions-container__filters"},qgt={class:"main-content"},Ygt={class:"left-content"},Jgt={class:"labels-tool-container"},$gt={class:"right-content"},Kgt={class:"timeline-container"},Qgt={__name:"GSC-PositionsAndConnections",props:{game:{type:Object,default:()=>({gameId:88247,homeTeam:{team_id:1,name:"Chivas"},awayTeam:{team_id:5,name:"Cruz Azul"}})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const o=e,{endedCategories:s,startedCategories:z,loadGameData:W,isDataLoaded:v}=kV(),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref([]),a=t.ref([]),_=t.ref([]),y=t.ref([]),x=t.ref([]),u=t.ref([]),n=t.ref({}),i=t.ref({}),f=t.ref({}),l=t.ref([]),h=t.ref([]),m=t.ref(o.game.homeTeam.team_id),w=t.ref(new Map),T=t.ref(new Map),A=t.ref([]),C=t.ref(!1),I=t.ref(!1),L=t.ref(!1),E=t.ref({originSections:[],destinationSections:[],distanceRange:{minValue:5,maxValue:30},isSelected:!1}),P=t.ref(!1),M=t.ref(!0),S=t.ref(!0),B=t.ref({startCategories:[1,2,3,4,5],endCategories:[1,2,3],durationRange:{min:1,max:null},possessionTeamId:null,excludedFirstSeconds:0,excludedLastSeconds:200,chainInitialZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],chainFinalZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],ballInterestZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],timeFromTimeline:{}}),k=t.ref(null),O=t.ref(!1),D=t.ref({blockDistancesTotal:0,passDistancesTotal:0}),V=t.computed(()=>k.value==="block"&&D.value.blockDistancesTotal>0||k.value==="players"&&D.value.playerDistancesTotal>0),G=t.computed(()=>w.value.size?w.value.get(m.value)||[]:[]),H=t.computed(()=>{const we=w.value.get(o.game.homeTeam.team_id)||[],Ve=w.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),U=t.computed(()=>{const we=T.value.get(o.game.homeTeam.team_id)||[],Ve=T.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),J=t.computed(()=>({homeTeam:w.value.get(o.game.homeTeam.team_id)||[],awayTeam:w.value.get(o.game.awayTeam.team_id)||[]})),re=t.computed(()=>H.value.filter(we=>we.isSelected).map(we=>we.player_id)),q=t.computed(()=>U.value.filter(we=>we.isSelected).map(we=>we.player_id));let ae=null;const ee=t.ref(null),$=t.ref(0);function Q(){ee.value&&(ae=new ResizeObserver(we=>{for(const Ve of we)Ve.contentRect.width!==$.value&&($.value=Ve.contentRect.width)}),ae.observe(ee.value))}t.onMounted(async()=>{await W(o.game.gameId),Q()});const ce=t.computed(()=>$.value<560);t.watch(()=>$.value,we=>{},{immediate:!0}),t.watch(()=>o.game.gameId,async we=>{we&&(Cp.resetCache(),await W(we),await ie(),await me())},{immediate:!0});function de(we,Ve){Ve===o.game.homeTeam.team_id?r.value=we:b.value=we}function he(we,Ve){Ve===o.game.homeTeam.team_id?d.value=we:a.value=we}function pe(we,Ve){Ve===o.game.homeTeam.team_id?l.value=we:h.value=we}async function ne(we){try{return(await(await fetch(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/v2/players/games/${we}`,{headers:{Authorization:o.token}})).json()).players||[]}catch(Ve){console.error("Error fetching players:",Ve)}}async function le(we){try{const Ve=await(await fetch(`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/connections/${we}`,{headers:{Authorization:o.token}})).json();return Ve.data&&Ve.headers?Ve.data.reduce((Ne,Ue)=>(Ne.push(Ue.reduce((Xe,Ze,xe)=>(Xe[Ve.headers[xe]]=Ze,Xe),{})),Ne),[]):[]}catch(Ve){console.error("Error fetching game connections:",Ve)}}async function ie(){try{const we=await ne(o.game.gameId);o.game.homeTeam&&o.game.awayTeam&&(w.value.clear(),w.value.set(o.game.homeTeam.team_id,[]),w.value.set(o.game.awayTeam.team_id,[]),T.value.clear(),T.value.set(o.game.homeTeam.team_id,[]),T.value.set(o.game.awayTeam.team_id,[]),we.forEach(Ve=>{if(Ve.positionName=Zgt.get(Ve.position_id),Ve.team_id===o.game.homeTeam.team_id){const Ne=w.value.get(o.game.homeTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.homeTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}else if(Ve.team_id===o.game.awayTeam.team_id){const Ne=w.value.get(o.game.awayTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.awayTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}}))}catch(we){console.error("Error filling game players:",we)}}async function me(){try{const we=await le(o.game.gameId);we&&we.length>0?A.value=we:A.value=[]}catch(we){console.error("Error filling game passes:",we)}}function ve(we){if(we.isSelected){if(E.value.isSelected=we.isSelected,C.value=!0,JSON.stringify(we.originSections)!==JSON.stringify(E.value.originSections)||JSON.stringify(we.destinationSections)!==JSON.stringify(E.value.destinationSections)||JSON.stringify(we.distanceRange)!==JSON.stringify(E.value.distanceRange)&&g.value){E.value.originSections=[...we.originSections],E.value.destinationSections=[...we.destinationSections],E.value.distanceRange={...we.distanceRange};const Ve=A.value.filter(Ne=>E.value.originSections.includes(Ne.section_origin)&&E.value.destinationSections.includes(Ne.section_destination)&&Ne.distance>=E.value.distanceRange.minValue&&Ne.distance<=E.value.distanceRange.maxValue).reduce((Ne,Ue)=>{const Xe=`${Ue.player_id}-${Ue.receiver_id}`,Ze=Ne.get(Xe);return Ze?Ze.count+=1:Ne.set(Xe,{to:Ue.receiver_id,from:Ue.player_id,count:1}),Ne},new Map);g.value.setConnections(Array.from(Ve.values()))}}else E.value.isSelected=!1,C.value=!1}function ye(we){P.value=we,I.value=we}function ke(we){k.value=we}function Ee(we){m.value=we}function Te(we){L.value=we}function Pe(we,Ve){Ve===o.game.homeTeam.team_id?_.value=we:y.value=we}function Be(we,Ve){Ve===o.game.homeTeam.team_id?x.value=we:u.value=we}function Le(we){n.value=we}function je(we,Ve){Ve===o.game.homeTeam.team_id?i.value=we:f.value=we}function Me(we,Ve){Ve===o.game.homeTeam.team_id?l.value.totalSeconds=we:h.value.totalSeconds=we}function Re(){O.value=!0}function Ie(){O.value=!1}function ge(){g.value&&g.value.clearCustomDistances()}function Ce(we){D.value=we}return(we,Ve)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Hgt,{"is-visible":O.value,onClose:Ie,onDelete:ge},null,8,["is-visible"]),t.createElementVNode("div",{ref_key:"positionsContainer",ref:ee,class:"positions-container"},[t.createVNode(xmt,{"total-seconds":m.value===e.game.homeTeam.team_id?l.value.totalSeconds:h.value.totalSeconds,"total-chains":m.value===e.game.homeTeam.team_id?l.value.totalChains:h.value.totalChains,"total-duration-chains":m.value===e.game.homeTeam.team_id?l.value.totalDurationChains:h.value.totalDurationChains},null,8,["total-seconds","total-chains","total-duration-chains"]),t.createElementVNode("div",Wgt,[t.createElementVNode("div",Xgt,[t.createVNode(fmt,{game:e.game,token:e.token,players:U.value,"container-width":$.value,"default-shadows-filters":B.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),onChangeConnections:ve,onChangeDistance:ye,onChangeDistanceCustom:ke,onIsShadowsSelected:Te,onHomeChainsShadowsFiltered:he,onAwayChainsShadowsFiltered:he,onHomeBallZonesShadowsFiltered:Be,onAwayBallZonesShadowsFiltered:Be,onHomeRangeChangeShadows:je,onAwayRangeChangeShadows:je},null,8,["game","token","players","container-width","default-shadows-filters","started-categories","ended-categories"])]),t.createElementVNode("main",qgt,[t.createElementVNode("div",Ygt,[t.createVNode(V1t,{ref_key:"soccerField",ref:g,"game-id":e.game.gameId,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"home-filtered-chains":r.value,"away-filtered-chains":b.value,"home-filtered-chains-shadows":d.value,"away-filtered-chains-shadows":a.value,"home-filtered-ball-zones":_.value,"away-filtered-ball-zones":y.value,"home-filtered-ball-zones-shadows":x.value,"away-filtered-ball-zones-shadows":u.value,"time-from-timeline":n.value,"time-from-timeline-shadows-home":i.value,"time-from-timeline-shadows-away":f.value,"show-shadows":L.value,"players-selected":re.value,"players-selected-shadows":q.value,"players-info":J.value,"is-data-loaded":t.unref(v),"are-connections-visible":E.value.isSelected,"is-distance-visible":P.value,"is-home-team-visible":M.value,"is-away-team-visible":S.value,"custom-distance":k.value,onHomePossessionTotalSeconds:Me,onAwayPossessionTotalSeconds:Me,onChangeCustomDistances:Ce},null,8,["game-id","home-team-id","away-team-id","home-filtered-chains","away-filtered-chains","home-filtered-chains-shadows","away-filtered-chains-shadows","home-filtered-ball-zones","away-filtered-ball-zones","home-filtered-ball-zones-shadows","away-filtered-ball-zones-shadows","time-from-timeline","time-from-timeline-shadows-home","time-from-timeline-shadows-away","show-shadows","players-selected","players-selected-shadows","players-info","is-data-loaded","are-connections-visible","is-distance-visible","is-home-team-visible","is-away-team-visible","custom-distance"]),t.createElementVNode("div",Jgt,[t.createVNode(Ugt,{"is-mobile":ce.value,game:e.game,players:H.value,"show-pases":C.value,"show-distancia":I.value,"show-shadows":L.value,"is-delete-visible":V.value,isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[0]||(Ve[0]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[1]||(Ve[1]=Ne=>S.value=Ne),onDeleteDistances:Re},null,8,["is-mobile","game","players","show-pases","show-distancia","show-shadows","is-delete-visible","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",$gt,[t.createVNode(pgt,{game:e.game,players:G.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),"default-chains-filters":B.value,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"name-home-team":e.game.homeTeam.colloquial_name,"name-away-team":e.game.awayTeam.colloquial_name,"game-id":e.game.gameId,"time-from-timeline":n.value,"is-data-loaded":t.unref(v),isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[2]||(Ve[2]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[3]||(Ve[3]=Ne=>S.value=Ne),onHomeChainsFiltered:de,onAwayChainsFiltered:de,onHomeStatsUpdated:pe,onAwayStatsUpdated:pe,onHomeBallZonesFiltered:Pe,onAwayBallZonesFiltered:Pe,onSelectedTeamTab:Ee},null,8,["game","players","started-categories","ended-categories","default-chains-filters","home-team-id","away-team-id","name-home-team","name-away-team","game-id","time-from-timeline","is-data-loaded","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Kgt,[t.createVNode(gV,{"timeline-width":940,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:o.token,onRangeChange:Le},null,8,["game-id","home-team","away-team","token"])])])],512)],64))}},eyt=du(Qgt,[["__scopeId","data-v-c28ec97b"]]),tyt=(e,o)=>{const s=e.__vccOpts||e;for(const[z,W]of o)s[z]=W;return s},ayt={__name:"gsc-positioning",props:{game:{type:Object,default:()=>({})}},setup(e){const o=t.ref(0);let s=null;const z=t.ref(null);function W(){s=new ResizeObserver(v=>{for(const g of v)o.value=g.contentRect.width}),s.observe(z.value)}return t.onMounted(()=>{W()}),t.onBeforeUnmount(()=>{s&&s.disconnect()}),(v,g)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-positioning",ref_key:"positioning",ref:z,style:t.normalizeStyle(o.value<700?"padding: 25px 0":"")},[t.createVNode(t.unref(qut),{game:e.game},null,8,["game"]),t.createVNode(t.unref(eyt),{game:e.game},null,8,["game"])],4))}},ryt=tyt(ayt,[["__scopeId","data-v-60e35461"]]),KYt="",QYt="",nyt={class:"datagame-container"},iyt=$i({__name:"GSCPositining",props:{game:{type:Object,default:()=>({})}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nyt,[t.createVNode(t.unref(ryt),{game:e.game},null,8,["game"])]))}},[["__scopeId","data-v-9a84d21f"]]);function AV(e,o){return function(){return e.apply(o,arguments)}}const{toString:oyt}=Object.prototype,{getPrototypeOf:Qk}=Object,{iterator:D5,toStringTag:MV}=Symbol,F5=(e=>o=>{const s=oyt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Rf=e=>(e=e.toLowerCase(),o=>F5(o)===e),R5=e=>o=>typeof o===e,{isArray:u2}=Array,d2=R5("undefined");function nb(e){return e!==null&&!d2(e)&&e.constructor!==null&&!d2(e.constructor)&&gp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const PV=Rf("ArrayBuffer");function syt(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&PV(e.buffer),o}const lyt=R5("string"),gp=R5("function"),IV=R5("number"),ib=e=>e!==null&&typeof e=="object",cyt=e=>e===!0||e===!1,V5=e=>{if(F5(e)!=="object")return!1;const o=Qk(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(MV in e)&&!(D5 in e)},uyt=e=>{if(!ib(e)||nb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dyt=Rf("Date"),hyt=Rf("File"),pyt=e=>!!(e&&typeof e.uri<"u"),fyt=e=>e&&typeof e.getParts<"u",myt=Rf("Blob"),gyt=Rf("FileList"),yyt=e=>ib(e)&&gp(e.pipe);function vyt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const LV=vyt(),BV=typeof LV.FormData<"u"?LV.FormData:void 0,byt=e=>{let o;return e&&(BV&&e instanceof BV||gp(e.append)&&((o=F5(e))==="formdata"||o==="object"&&gp(e.toString)&&e.toString()==="[object FormData]"))},xyt=Rf("URLSearchParams"),[_yt,wyt,kyt,Syt]=["ReadableStream","Request","Response","Headers"].map(Rf),Tyt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ob(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let z,W;if(typeof e!="object"&&(e=[e]),u2(e))for(z=0,W=e.length;z<W;z++)o.call(null,e[z],z,e);else{if(nb(e))return;const v=s?Object.getOwnPropertyNames(e):Object.keys(e),g=v.length;let r;for(z=0;z<g;z++)r=v[z],o.call(null,e[r],r,e)}}function OV(e,o){if(nb(e))return null;o=o.toLowerCase();const s=Object.keys(e);let z=s.length,W;for(;z-- >0;)if(W=s[z],o===W.toLowerCase())return W;return null}const rg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zV=e=>!d2(e)&&e!==rg;function eS(){const{caseless:e,skipUndefined:o}=zV(this)&&this||{},s={},z=(W,v)=>{if(v==="__proto__"||v==="constructor"||v==="prototype")return;const g=e&&OV(s,v)||v;V5(s[g])&&V5(W)?s[g]=eS(s[g],W):V5(W)?s[g]=eS({},W):u2(W)?s[g]=W.slice():(!o||!d2(W))&&(s[g]=W)};for(let W=0,v=arguments.length;W<v;W++)arguments[W]&&ob(arguments[W],z);return s}const Cyt=(e,o,s,{allOwnKeys:z}={})=>(ob(o,(W,v)=>{s&&gp(W)?Object.defineProperty(e,v,{value:AV(W,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,v,{value:W,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:z}),e),Eyt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ayt=(e,o,s,z)=>{e.prototype=Object.create(o.prototype,z),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},Myt=(e,o,s,z)=>{let W,v,g;const r={};if(o=o||{},e==null)return o;do{for(W=Object.getOwnPropertyNames(e),v=W.length;v-- >0;)g=W[v],(!z||z(g,e,o))&&!r[g]&&(o[g]=e[g],r[g]=!0);e=s!==!1&&Qk(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Pyt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const z=e.indexOf(o,s);return z!==-1&&z===s},Iyt=e=>{if(!e)return null;if(u2(e))return e;let o=e.length;if(!IV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Lyt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&Qk(Uint8Array)),Byt=(e,o)=>{const s=(e&&e[D5]).call(e);let z;for(;(z=s.next())&&!z.done;){const W=z.value;o.call(e,W[0],W[1])}},Oyt=(e,o)=>{let s;const z=[];for(;(s=e.exec(o))!==null;)z.push(s);return z},zyt=Rf("HTMLFormElement"),Nyt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,z){return s.toUpperCase()+z}),NV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),Dyt=Rf("RegExp"),DV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),z={};ob(s,(W,v)=>{let g;(g=o(W,v,e))!==!1&&(z[v]=g||W)}),Object.defineProperties(e,z)},Fyt=e=>{DV(e,(o,s)=>{if(gp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const z=e[s];if(gp(z)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Ryt=(e,o)=>{const s={},z=W=>{W.forEach(v=>{s[v]=!0})};return u2(e)?z(e):z(String(e).split(o)),s},Vyt=()=>{},jyt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function Uyt(e){return!!(e&&gp(e.append)&&e[MV]==="FormData"&&e[D5])}const Gyt=e=>{const o=new Array(10),s=(z,W)=>{if(ib(z)){if(o.indexOf(z)>=0)return;if(nb(z))return z;if(!("toJSON"in z)){o[W]=z;const v=u2(z)?[]:{};return ob(z,(g,r)=>{const b=s(g,W+1);!d2(b)&&(v[r]=b)}),o[W]=void 0,v}}return z};return s(e,0)},Hyt=Rf("AsyncFunction"),Zyt=e=>e&&(ib(e)||gp(e))&&gp(e.then)&&gp(e.catch),FV=((e,o)=>e?setImmediate:o?((s,z)=>(rg.addEventListener("message",({source:W,data:v})=>{W===rg&&v===s&&z.length&&z.shift()()},!1),W=>{z.push(W),rg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",gp(rg.postMessage)),Wyt=typeof queueMicrotask<"u"?queueMicrotask.bind(rg):typeof process<"u"&&process.nextTick||FV,Xyt=e=>e!=null&&gp(e[D5]),Mn={isArray:u2,isArrayBuffer:PV,isBuffer:nb,isFormData:byt,isArrayBufferView:syt,isString:lyt,isNumber:IV,isBoolean:cyt,isObject:ib,isPlainObject:V5,isEmptyObject:uyt,isReadableStream:_yt,isRequest:wyt,isResponse:kyt,isHeaders:Syt,isUndefined:d2,isDate:dyt,isFile:hyt,isReactNativeBlob:pyt,isReactNative:fyt,isBlob:myt,isRegExp:Dyt,isFunction:gp,isStream:yyt,isURLSearchParams:xyt,isTypedArray:Lyt,isFileList:gyt,forEach:ob,merge:eS,extend:Cyt,trim:Tyt,stripBOM:Eyt,inherits:Ayt,toFlatObject:Myt,kindOf:F5,kindOfTest:Rf,endsWith:Pyt,toArray:Iyt,forEachEntry:Byt,matchAll:Oyt,isHTMLForm:zyt,hasOwnProperty:NV,hasOwnProp:NV,reduceDescriptors:DV,freezeMethods:Fyt,toObjectSet:Ryt,toCamelCase:Nyt,noop:Vyt,toFiniteNumber:jyt,findKey:OV,global:rg,isContextDefined:zV,isSpecCompliantForm:Uyt,toJSONObject:Gyt,isAsyncFn:Hyt,isThenable:Zyt,setImmediate:FV,asap:Wyt,isIterable:Xyt};let ms=class RH extends Error{static from(o,s,z,W,v,g){const r=new RH(o.message,s||o.code,z,W,v);return r.cause=o,r.name=o.name,o.status!=null&&r.status==null&&(r.status=o.status),g&&Object.assign(r,g),r}constructor(o,s,z,W,v){super(o),Object.defineProperty(this,"message",{value:o,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),z&&(this.config=z),W&&(this.request=W),v&&(this.response=v,this.status=v.status)}toJSON(){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:Mn.toJSONObject(this.config),code:this.code,status:this.status}}};ms.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ms.ERR_BAD_OPTION="ERR_BAD_OPTION",ms.ECONNABORTED="ECONNABORTED",ms.ETIMEDOUT="ETIMEDOUT",ms.ERR_NETWORK="ERR_NETWORK",ms.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ms.ERR_DEPRECATED="ERR_DEPRECATED",ms.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ms.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ms.ERR_CANCELED="ERR_CANCELED",ms.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ms.ERR_INVALID_URL="ERR_INVALID_URL";const qyt=null;function tS(e){return Mn.isPlainObject(e)||Mn.isArray(e)}function RV(e){return Mn.endsWith(e,"[]")?e.slice(0,-2):e}function aS(e,o,s){return e?e.concat(o).map(function(z,W){return z=RV(z),!s&&W?"["+z+"]":z}).join(s?".":""):o}function Yyt(e){return Mn.isArray(e)&&!e.some(tS)}const Jyt=Mn.toFlatObject(Mn,{},null,function(e){return/^is[A-Z]/.test(e)});function j5(e,o,s){if(!Mn.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=Mn.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,u){return!Mn.isUndefined(u[x])});const z=s.metaTokens,W=s.visitor||d,v=s.dots,g=s.indexes,r=(s.Blob||typeof Blob<"u"&&Blob)&&Mn.isSpecCompliantForm(o);if(!Mn.isFunction(W))throw new TypeError("visitor must be a function");function b(x){if(x===null)return"";if(Mn.isDate(x))return x.toISOString();if(Mn.isBoolean(x))return x.toString();if(!r&&Mn.isBlob(x))throw new ms("Blob is not supported. Use a Buffer instead.");return Mn.isArrayBuffer(x)||Mn.isTypedArray(x)?r&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,u,n){let i=x;if(Mn.isReactNative(o)&&Mn.isReactNativeBlob(x))return o.append(aS(n,u,v),b(x)),!1;if(x&&!n&&typeof x=="object"){if(Mn.endsWith(u,"{}"))u=z?u:u.slice(0,-2),x=JSON.stringify(x);else if(Mn.isArray(x)&&Yyt(x)||(Mn.isFileList(x)||Mn.endsWith(u,"[]"))&&(i=Mn.toArray(x)))return u=RV(u),i.forEach(function(f,l){!(Mn.isUndefined(f)||f===null)&&o.append(g===!0?aS([u],l,v):g===null?u:u+"[]",b(f))}),!1}return tS(x)?!0:(o.append(aS(n,u,v),b(x)),!1)}const a=[],_=Object.assign(Jyt,{defaultVisitor:d,convertValue:b,isVisitable:tS});function y(x,u){if(!Mn.isUndefined(x)){if(a.indexOf(x)!==-1)throw Error("Circular reference detected in "+u.join("."));a.push(x),Mn.forEach(x,function(n,i){(!(Mn.isUndefined(n)||n===null)&&W.call(o,n,Mn.isString(i)?i.trim():i,u,_))===!0&&y(n,u?u.concat(i):[i])}),a.pop()}}if(!Mn.isObject(e))throw new TypeError("data must be an object");return y(e),o}function VV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function rS(e,o){this._pairs=[],e&&j5(e,this,o)}const jV=rS.prototype;jV.append=function(e,o){this._pairs.push([e,o])},jV.toString=function(e){const o=e?function(s){return e.call(this,s,VV)}:VV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function $yt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function UV(e,o,s){if(!o)return e;const z=s&&s.encode||$yt,W=Mn.isFunction(s)?{serialize:s}:s,v=W&&W.serialize;let g;if(v?g=v(o,W):g=Mn.isURLSearchParams(o)?o.toString():new rS(o,W).toString(z),g){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}class GV{constructor(){this.handlers=[]}use(o,s,z){return this.handlers.push({fulfilled:o,rejected:s,synchronous:z?z.synchronous:!1,runWhen:z?z.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){Mn.forEach(this.handlers,function(s){s!==null&&o(s)})}}const nS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Kyt=typeof URLSearchParams<"u"?URLSearchParams:rS,Qyt=typeof FormData<"u"?FormData:null,e2t=typeof Blob<"u"?Blob:null,t2t={isBrowser:!0,classes:{URLSearchParams:Kyt,FormData:Qyt,Blob:e2t},protocols:["http","https","file","blob","url","data"]},iS=typeof window<"u"&&typeof document<"u",oS=typeof navigator=="object"&&navigator||void 0,a2t=iS&&(!oS||["ReactNative","NativeScript","NS"].indexOf(oS.product)<0),r2t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n2t=iS&&window.location.href||"http://localhost",i2t=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:iS,hasStandardBrowserEnv:a2t,hasStandardBrowserWebWorkerEnv:r2t,navigator:oS,origin:n2t},Symbol.toStringTag,{value:"Module"})),kh={...i2t,...t2t};function o2t(e,o){return j5(e,new kh.classes.URLSearchParams,{visitor:function(s,z,W,v){return kh.isNode&&Mn.isBuffer(s)?(this.append(z,s.toString("base64")),!1):v.defaultVisitor.apply(this,arguments)},...o})}function s2t(e){return Mn.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function l2t(e){const o={},s=Object.keys(e);let z;const W=s.length;let v;for(z=0;z<W;z++)v=s[z],o[v]=e[v];return o}function HV(e){function o(s,z,W,v){let g=s[v++];if(g==="__proto__")return!0;const r=Number.isFinite(+g),b=v>=s.length;return g=!g&&Mn.isArray(W)?W.length:g,b?(Mn.hasOwnProp(W,g)?W[g]=[W[g],z]:W[g]=z,!r):((!W[g]||!Mn.isObject(W[g]))&&(W[g]=[]),o(s,z,W[g],v)&&Mn.isArray(W[g])&&(W[g]=l2t(W[g])),!r)}if(Mn.isFormData(e)&&Mn.isFunction(e.entries)){const s={};return Mn.forEachEntry(e,(z,W)=>{o(s2t(z),W,s,0)}),s}return null}function c2t(e,o,s){if(Mn.isString(e))try{return(o||JSON.parse)(e),Mn.trim(e)}catch(z){if(z.name!=="SyntaxError")throw z}return(s||JSON.stringify)(e)}const sb={transitional:nS,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",z=s.indexOf("application/json")>-1,W=Mn.isObject(e);if(W&&Mn.isHTMLForm(e)&&(e=new FormData(e)),Mn.isFormData(e))return z?JSON.stringify(HV(e)):e;if(Mn.isArrayBuffer(e)||Mn.isBuffer(e)||Mn.isStream(e)||Mn.isFile(e)||Mn.isBlob(e)||Mn.isReadableStream(e))return e;if(Mn.isArrayBufferView(e))return e.buffer;if(Mn.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let v;if(W){if(s.indexOf("application/x-www-form-urlencoded")>-1)return o2t(e,this.formSerializer).toString();if((v=Mn.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return j5(v?{"files[]":e}:e,g&&new g,this.formSerializer)}}return W||z?(o.setContentType("application/json",!1),c2t(e)):e}],transformResponse:[function(e){const o=this.transitional||sb.transitional,s=o&&o.forcedJSONParsing,z=this.responseType==="json";if(Mn.isResponse(e)||Mn.isReadableStream(e))return e;if(e&&Mn.isString(e)&&(s&&!this.responseType||z)){const W=!(o&&o.silentJSONParsing)&&z;try{return JSON.parse(e,this.parseReviver)}catch(v){if(W)throw v.name==="SyntaxError"?ms.from(v,ms.ERR_BAD_RESPONSE,this,null,this.response):v}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kh.classes.FormData,Blob:kh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mn.forEach(["delete","get","head","post","put","patch"],e=>{sb.headers[e]={}});const u2t=Mn.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"]),d2t=e=>{const o={};let s,z,W;return e&&e.split(`
4144
+ `+v):z.stack=v}catch{}}throw z}}_request(o,s){typeof o=="string"?(s=s||{},s.url=o):s=o||{},s=tg(this.defaults,s);const{transitional:z,paramsSerializer:W,headers:v}=s;z!==void 0&&z5.assertOptions(z,{silentJSONParsing:X0.transitional(X0.boolean),forcedJSONParsing:X0.transitional(X0.boolean),clarifyTimeoutError:X0.transitional(X0.boolean)},!1),W!=null&&(An.isFunction(W)?s.paramsSerializer={serialize:W}:z5.assertOptions(W,{encode:X0.function,serialize:X0.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),z5.assertOptions(s,{baseUrl:X0.spelling("baseURL"),withXsrfToken:X0.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let g=v&&An.merge(v.common,v[s.method]);v&&An.forEach(["delete","get","head","post","put","patch","common"],u=>{delete v[u]}),s.headers=mp.concat(g,v);const r=[];let b=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(s)===!1||(b=b&&u.synchronous,r.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let a,_=0,y;if(!b){const u=[hV.bind(this),void 0];for(u.unshift(...r),u.push(...d),y=u.length,a=Promise.resolve(s);_<y;)a=a.then(u[_++],u[_++]);return a}y=r.length;let x=s;for(;_<y;){const u=r[_++],n=r[_++];try{x=u(x)}catch(i){n.call(this,i);break}}try{a=hV.call(this,x)}catch(u){return Promise.reject(u)}for(_=0,y=d.length;_<y;)a=a.then(d[_++],d[_++]);return a}getUri(o){o=tg(this.defaults,o);const s=tV(o.baseURL,o.url,o.allowAbsoluteUrls);return WR(s,o.params,o.paramsSerializer)}};An.forEach(["delete","get","head","options"],function(e){ag.prototype[e]=function(o,s){return this.request(tg(s||{},{method:e,url:o,data:(s||{}).data}))}}),An.forEach(["post","put","patch"],function(e){function o(s){return function(z,W,v){return this.request(tg(v||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:z,data:W}))}}ag.prototype[e]=o(),ag.prototype[e+"Form"]=o(!0)});let zft=class FH{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(W){s=W});const z=this;this.promise.then(W=>{if(!z._listeners)return;let v=z._listeners.length;for(;v-- >0;)z._listeners[v](W);z._listeners=null}),this.promise.then=W=>{let v;const g=new Promise(r=>{z.subscribe(r),v=r}).then(W);return g.cancel=function(){z.unsubscribe(v)},g},o(function(W,v,g){z.reason||(z.reason=new c2(W,v,g),s(z.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const s=this._listeners.indexOf(o);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const o=new AbortController,s=z=>{o.abort(z)};return this.subscribe(s),o.signal.unsubscribe=()=>this.unsubscribe(s),o.signal}static source(){let o;return{token:new FH(function(s){o=s}),cancel:o}}};function Nft(e){return function(o){return e.apply(null,o)}}function Dft(e){return An.isObject(e)&&e.isAxiosError===!0}const Kk={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kk).forEach(([e,o])=>{Kk[o]=e});function mV(e){const o=new ag(e),s=IR(ag.prototype.request,o);return An.extend(s,ag.prototype,o,{allOwnKeys:!0}),An.extend(s,o,null,{allOwnKeys:!0}),s.create=function(z){return mV(tg(e,z))},s}const md=mV(ab);md.Axios=ag,md.CanceledError=c2,md.CancelToken=zft,md.isCancel=$R,md.VERSION=pV,md.toFormData=P5,md.AxiosError=vl,md.Cancel=md.CanceledError,md.all=function(e){return Promise.all(e)},md.spread=Nft,md.isAxiosError=Dft,md.mergeConfig=tg,md.AxiosHeaders=mp,md.formToJSON=e=>YR(An.isHTMLForm(e)?new FormData(e):e),md.getAdapter=dV.getAdapter,md.HttpStatusCode=Kk,md.default=md;const Fft={class:"header-row controls-row"},Rft={class:"input-wrapper"},Vft={class:"input-container"},jft=["min","max"],Uft={class:"input-wrapper"},Gft={class:"input-container"},Hft=["min","max"],Zft={class:"timeline-container"},Wft={class:"team-circle team-circle-top"},Xft=["src"],qft={class:"team-circle team-circle-bottom"},Yft=["src"],Jft={class:"timeline-line"},$ft={key:0,class:"event-icon event-icon-top"},Kft={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qft={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a0t={class:"minute-ball minute-ball-center"},r0t={key:1,class:"event-icon event-icon-bottom"},n0t={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},c0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},u0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},d0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},h0t={__name:"TimeLine",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:o}){const s=t.ref(0),z=t.ref(96),W=t.ref("1"),v=t.ref("2"),g=t.ref(0),r=t.ref(45),b=t.ref(96),d=t.ref(0),a=t.ref(0),_=t.ref("0px"),y=t.ref([]),x=o,u=e,n=md.create({headers:{Authorization:`${u.token}`}}),i=t.ref([]);let f=null;const l=t.ref(null),h=t.ref(!1),m=t.ref(0),w=t.ref(0),T=t.ref(!1),A=t.ref(!1);let C=!1,I=0;const L=t.ref(0),E=t.ref(!1),P=t.ref(!1),M=t.ref(96),S=t.ref(null);function B(){if(S.value){const pe=S.value,ne=pe.scrollWidth-pe.clientWidth,le=pe.scrollLeft,ie=pe.scrollWidth>pe.clientWidth;T.value=ie&&le>0,A.value=ie&&Math.ceil(le)<Math.floor(ne)}}function k(){if(l.value){const pe=l.value.parentElement.clientWidth;m.value=pe,w.value===0&&(w.value=pe-90),t.nextTick(()=>{B()})}}function O(){if(i.value.length>0){const pe=Math.max(...i.value.map(ne=>ne.minute));M.value=pe,z.value=M.value}}async function D(){try{const pe=await n.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${u.gameId}`);if(pe.data&&pe.data.plays){const ne=pe.data.plays.find(ie=>{var me;return ie.event_type_id===6&&((me=ie.comments)==null?void 0:me.includes("El árbitro silba el Final del Primer Tiempo"))});ne&&(g.value=ne.minute);const le=Math.max(...pe.data.plays.map(ie=>ie.minute));b.value=le,M.value=le,z.value=M.value,y.value=[];for(let ie=0;ie<=g.value;ie++){const me=pe.data.plays.filter(ye=>{var ke;return ye.minute===ie&&ye.match_lapse===1&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13||ye.event_type_id===6&&((ke=ye.comments)==null?void 0:ke.includes("El árbitro silba el Final del Primer Tiempo")))}),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:1,event:ve.length>0?ve:null})}for(let ie=r.value;ie<=b.value;ie++){const me=pe.data.plays.filter(ye=>ye.minute===ie&&ye.match_lapse===2&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13)),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:2,event:ve.length>0?ve:null})}if(i.value=y.value.filter(ie=>ie.event!==null).map(ie=>ie.event),y.value.length>0){const ie=y.value.filter(ke=>ke.match_lapse===1);if(ie.length>0){const ke=ie[0];s.value=ke.minute,W.value="1",d.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===1)}const me=y.value.filter(ke=>ke.match_lapse===2);if(me.length>0){const ke=me[me.length-1];z.value=ke.minute,v.value="2",a.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===2)}const ve=y.value.findIndex(ke=>ke.minute===s.value&&ke.match_lapse===parseInt(W.value)),ye=y.value.findIndex(ke=>ke.minute===z.value&&ke.match_lapse===parseInt(v.value));if(ve!==-1&&ye!==-1&&ve<ye){const ke=y.value.length,Ee=ve/(ke-1)*(u.timelineWidth-40),Te=ye/(ke-1)*(u.timelineWidth-40);_.value=`${Te-Ee}px`}}}}catch(pe){console.error("Error al obtener los datos del partido:",pe)}}function V(pe){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[pe]||""}t.onMounted(()=>{O(),k(),D(),t.nextTick(()=>{B()}),window.addEventListener("resize",()=>{k()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",B)}),t.watch(i,()=>{t.nextTick(()=>{B()})},{deep:!0}),t.watch([s,z,W,v],()=>{ce()},{immediate:!0}),t.watch([W],()=>{if(!(P.value||h.value)){if(parseInt(W.value)>parseInt(v.value)&&(v.value=W.value,E.value=!0),E.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}}else if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(d.value=le)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(d.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([v],()=>{if(!(P.value||h.value)){if(parseInt(v.value)<parseInt(W.value)&&(W.value=v.value,E.value=!0),E.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}}else if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(a.value=le)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(a.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([s],()=>{if(!(P.value||h.value)){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}if(W.value===v.value&&s.value>=z.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}}de()}}),t.watch([z],()=>{if(!(P.value||h.value)){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}if(W.value===v.value&&z.value<=s.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}}de()}});function G(pe){const ne=y.value.length;return pe<0||ne===0||ne===1?"0px":`${pe/(ne-1)*(u.timelineWidth-40)}px`}function H(pe,ne){ne.preventDefault(),f=pe,I=ne.type.includes("touch")?ne.touches[0].clientX:ne.clientX,C=!1,pe==="left"?L.value=d.value:pe==="right"&&(L.value=a.value),document.addEventListener("mousemove",U),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("mouseup",J),document.addEventListener("touchend",J),h.value=!0}function U(pe){if(!f)return;pe.preventDefault();const ne=pe.type.includes("touch")?pe.touches[0].clientX:pe.clientX;if(!C){if(Math.abs(ne-I)<5)return;C=!0}const le=Q(),ie=y.value.length,me=ne-I,ve=le/(ie-1),ye=Math.round(me/ve);let ke=L.value+ye;const Ee=Math.max(0,Math.min(ke,ie-1));if(f==="left"){const Be=y.value.findIndex(je=>je.minute===z.value&&je.match_lapse===parseInt(v.value));if(Ee>=Be-1)return;const Le=y.value[Ee];h.value=!0,d.value=Ee,s.value=Le.minute,W.value=Le.match_lapse.toString(),E.value=!0}else if(f==="right"){const Be=y.value.findIndex(je=>je.minute===s.value&&je.match_lapse===parseInt(W.value));if(Ee<=Be+1)return;const Le=y.value[Ee];h.value=!0,a.value=Ee,z.value=Le.minute,v.value=Le.match_lapse.toString(),E.value=!0}const Te=y.value.findIndex(Be=>Be.minute===s.value&&Be.match_lapse===parseInt(W.value)),Pe=y.value.findIndex(Be=>Be.minute===z.value&&Be.match_lapse===parseInt(v.value));if(Te!==-1&&Pe!==-1&&Te<Pe){const Be=y.value.length,Le=Te/(Be-1)*(u.timelineWidth-40),je=Pe/(Be-1)*(u.timelineWidth-40);_.value=`${je-Le}px`}t.nextTick(()=>{ce()})}function J(){f&&(s.value<0&&(s.value=0),z.value>M.value&&(z.value=M.value),t.nextTick(()=>{h.value=!1,E.value=!1}),ce()),f=null,document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",J),document.removeEventListener("touchend",J)}function re(){if(s.value>0){P.value=!0;let pe=s.value-1,ne=!1,le=W.value;if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];pe<ve.minute&&(pe=ve.minute)}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];if(pe<ve.minute){le="1",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===1);ye.length>0&&(pe=ye[ye.length-1].minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function q(){if(z.value<M.value){P.value=!0;let pe=z.value+1,ne=!1,le=v.value;if(le===W.value&&pe<=s.value){t.nextTick(()=>{P.value=!1});return}if(v.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(v.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)<parseInt(W.value)){if(W.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(a.value=ie,z.value=pe,ne&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function ae(){let pe=!1,ne=z.value-1,le=v.value;if(!(le===W.value&&ne<=s.value)){if(v.value==="1"){const ie=y.value.filter(me=>me.match_lapse===1);if(ie.length>0){const me=ie[0];ne>=me.minute&&(pe=!0)}}else if(v.value==="2"){const ie=y.value.filter(me=>me.match_lapse===2);if(ie.length>0){const me=ie[0];if(ne>=me.minute)pe=!0;else{const ve=y.value.filter(ye=>ye.match_lapse===1);if(ve.length>0){const ye=ve[ve.length-1];le="1",ne=ye.minute,pe=!0}}}}if(pe){P.value=!0;let ie=!1;le!==v.value&&(ie=!0);const me=y.value.findIndex(ve=>ve.minute===ne&&ve.match_lapse===parseInt(le));me!==-1&&(a.value=me,z.value=ne,ie&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}}function ee(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=Math.max(0,ne-150);pe.scrollTo({left:le,behavior:"smooth"}),setTimeout(B,300)}}function $(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=pe.scrollWidth-pe.clientWidth,ie=Math.min(le,ne+150);pe.scrollTo({left:ie,behavior:"smooth"}),setTimeout(B,300)}}function Q(){return l.value?l.value.getBoundingClientRect().width:600}function ce(){const pe=s.value*60,ne=z.value*60;x("range-change",{start:{minutes:s.value,seconds:pe,time:W.value,match_lapse:parseInt(W.value)},end:{minutes:z.value,seconds:ne,time:v.value,match_lapse:parseInt(v.value)}})}function de(){const pe=y.value.findIndex(le=>le.minute===s.value&&le.match_lapse===parseInt(W.value)),ne=y.value.findIndex(le=>le.minute===z.value&&le.match_lapse===parseInt(v.value));if(pe!==-1&&ne!==-1&&pe<ne){const le=y.value.length,ie=pe/(le-1)*(u.timelineWidth-40),me=ne/(le-1)*(u.timelineWidth-40);_.value=`${me-ie}px`}}function he(){P.value=!0;let pe=s.value+1,ne=!1,le=W.value;if(le===v.value&&pe>=z.value){t.nextTick(()=>{P.value=!1});return}if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)>parseInt(v.value)){if(v.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}return(pe,ne)=>{var le,ie,me,ve,ye,ke,Ee,Te;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["timeline",{"is-dragging":h.value}]),ref_key:"timelineRef",ref:l,style:t.normalizeStyle({width:`${m.value}px`})},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-header responsive-header",{"small-screen":m.value<470,"very-small-screen":m.value<420,"extra-small-screen":m.value<370,"mobile-column":m.value<500,"tablet-layout":m.value<800,"mobile-layout":m.value<580}])},[ne[21]||(ne[21]=t.createElementVNode("div",{class:"header-row"},[t.createElementVNode("span",{class:"header-title"},"Considerar eventos del ")],-1)),t.createElementVNode("div",Fft,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[0]||(ne[0]=Pe=>W.value=Pe),class:"time-select"},[...ne[12]||(ne[12]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,W.value]]),t.createElementVNode("div",Rft,[t.createElementVNode("div",Vft,[ne[15]||(ne[15]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[1]||(ne[1]=Pe=>s.value=Pe),readonly:"",min:W.value==="1"?((le=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:le.minute)||0:((ie=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ie.minute)||45,max:W.value==="1"?((me=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:me.minute)||45:((ve=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:ve.minute)||96},null,8,jft),[[t.vModelText,s.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:he},[...ne[13]||(ne[13]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:re},[...ne[14]||(ne[14]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])]),ne[20]||(ne[20]=t.createElementVNode("span",{class:"to-text"},"al",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[2]||(ne[2]=Pe=>v.value=Pe),class:"time-select"},[...ne[16]||(ne[16]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,v.value]]),t.createElementVNode("div",Uft,[t.createElementVNode("div",Gft,[ne[19]||(ne[19]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[3]||(ne[3]=Pe=>z.value=Pe),readonly:"",min:v.value==="1"?((ye=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:ye.minute)||0:((ke=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ke.minute)||45,max:v.value==="1"?((Ee=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:Ee.minute)||45:((Te=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:Te.minute)||96},null,8,Hft),[[t.vModelText,z.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:q},[...ne[17]||(ne[17]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:ae},[...ne[18]||(ne[18]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])])])],2),t.createElementVNode("div",Zft,[t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-left",onClick:ee},[...ne[22]||(ne[22]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,T.value]]),t.createElementVNode("div",{class:"timeline-scroll",ref_key:"scrollContainer",ref:S,onScroll:B},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-bar",{"has-scroll":T.value||A.value}]),style:t.normalizeStyle({width:`${e.timelineWidth}px`})},[t.createElementVNode("div",Wft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.homeTeam}.png`,alt:"Equipo local"},null,8,Xft)]),t.createElementVNode("div",qft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.awayTeam}.png`,alt:"Equipo visitante"},null,8,Yft)]),t.createElementVNode("div",Jft,[ne[38]||(ne[38]=t.createElementVNode("div",{class:"line"},null,-1)),t.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:t.normalizeStyle({left:G(0)})},"0'",4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,(Pe,Be)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.event,(Le,je)=>(t.openBlock(),t.createElementBlock("div",{key:"event-"+Be+"-"+je,class:"event",style:t.normalizeStyle({left:G(je===0?Be-1.5:Be-1.5+je*.3)})},[(Le==null?void 0:Le.team)==="local"?(t.openBlock(),t.createElementBlock("span",$ft,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",Kft,[...ne[23]||(ne[23]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",Qft,[...ne[24]||(ne[24]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",e0t,[...ne[25]||(ne[25]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",t0t,[...ne[26]||(ne[26]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0),t.createElementVNode("span",a0t,t.toDisplayString((Le==null?void 0:Le.minuteLabel)||Pe.minute)+"'",1),(Le==null?void 0:Le.team)==="visitante"?(t.openBlock(),t.createElementBlock("span",r0t,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",n0t,[...ne[27]||(ne[27]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",i0t,[...ne[28]||(ne[28]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",o0t,[...ne[29]||(ne[29]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",s0t,[...ne[30]||(ne[30]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0)],4))),128))],64))),256)),t.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:t.normalizeStyle({left:G(y.value.length-1)})},t.toDisplayString(b.value)+"'",5),t.createElementVNode("div",{class:"range-indicator",style:t.normalizeStyle({left:G(d.value),width:_.value})},[t.createElementVNode("div",{class:"handle left",onMousedown:ne[4]||(ne[4]=Pe=>H("left",Pe)),onTouchstart:ne[5]||(ne[5]=Pe=>H("left",Pe))},[(t.openBlock(),t.createElementBlock("svg",l0t,[...ne[31]||(ne[31]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[33]||(ne[33]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",c0t,[...ne[32]||(ne[32]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32),t.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:ne[6]||(ne[6]=Pe=>H("left",Pe)),onTouchstart:ne[7]||(ne[7]=Pe=>H("left",Pe))},null,32),ne[37]||(ne[37]=t.createElementVNode("div",{class:"range-line"},null,-1)),t.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:ne[8]||(ne[8]=Pe=>H("right",Pe)),onTouchstart:ne[9]||(ne[9]=Pe=>H("right",Pe))},null,32),t.createElementVNode("div",{class:"handle right",onMousedown:ne[10]||(ne[10]=Pe=>H("right",Pe)),onTouchstart:ne[11]||(ne[11]=Pe=>H("right",Pe))},[(t.openBlock(),t.createElementBlock("svg",u0t,[...ne[34]||(ne[34]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[36]||(ne[36]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",d0t,[...ne[35]||(ne[35]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32)],4)])],6)],544),t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-right",onClick:$},[...ne[39]||(ne[39]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M9 6L15 12L9 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,A.value]])])],6)}}},gV=du(h0t,[["__scopeId","data-v-e9ea1aeb"]]),p0t={class:"expandible-timeline"},f0t={class:"expandible-timeline__content"},m0t={__name:"ExpandibleTimeline",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""}},emits:["range-change"],setup(e,{emit:o}){const s=o;function z(W){s("range-change",W)}return(W,v)=>(t.openBlock(),t.createElementBlock("div",p0t,[t.createVNode(Kv,{"header-text":"Timeline de eventos","border-radius":"8px",onToggle:v[0]||(v[0]=g=>W.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",f0t,[t.createVNode(gV,{"timeline-width":539,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:e.token,onRangeChange:z},null,8,["game-id","home-team","away-team","token"])])]),_:1})]))}},g0t=du(m0t,[["__scopeId","data-v-be176377"]]),y0t={class:"filter-shadows-filters"},v0t={class:"filter-shadows-filters__timeline"},b0t={class:"filter-shadows-filters__filters"},x0t={__name:"FilterShadowsFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},selectedTeamTab:{type:Number,default:0},token:{type:String,default:""}},emits:["handleShadowsPossessionChange","handleShadowsExcludedFirstSecondsChange","handleShadowsExcludedLastSecondsChange","handleShadowsChainInitialZonesChange","handleShadowsChainFinalZonesChange","handleShadowsBallInterestZonesChange","handleShadowsDurationChange","range-change"],setup(e,{emit:o}){const s=o,z=_=>{s("handleShadowsPossessionChange",_)},W=(_,y)=>{s("handleShadowsDurationChange",_,y)},v=_=>{s("handleShadowsExcludedFirstSecondsChange",_)},g=_=>{s("handleShadowsExcludedLastSecondsChange",_)},r=_=>{s("handleShadowsChainInitialZonesChange",_)},b=_=>{s("handleShadowsChainFinalZonesChange",_)},d=_=>{s("handleShadowsBallInterestZonesChange",_)},a=_=>{s("range-change",_)};return(_,y)=>(t.openBlock(),t.createElementBlock("div",y0t,[t.createElementVNode("div",v0t,[t.createVNode(g0t,{token:e.token,game:e.game,onRangeChange:a},null,8,["token","game"])]),t.createElementVNode("div",b0t,[t.withDirectives(t.createVNode(T5,{"team-id":e.game.homeTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(T5,{"team-id":e.game.awayTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.awayTeam.team_id]])])]))}},yV=du(x0t,[["__scopeId","data-v-f148e6b3"]]),_0t={class:"filter-events"},w0t={class:"events-section"},k0t={class:"section-header"},S0t={class:"all-toggle"},T0t={class:"events-list"},C0t={class:"events-section"},E0t={class:"section-header"},A0t={class:"events-list"},M0t={__name:"FilterEventsShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["toggle-all-start-events","toggle-all-end-events","update-start-event","update-end-event"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",_0t,[t.createElementVNode("div",w0t,[t.createElementVNode("div",k0t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",S0t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",T0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",C0t,[t.createElementVNode("div",E0t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",A0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},vV=du(M0t,[["__scopeId","data-v-4232de5a"]]),P0t={class:"expandible-players"},I0t={class:"expandible-players__list"},L0t={class:"all-players list-item"},B0t={class:"player-item__checkbox"},O0t={class:"player-item__photo"},z0t=["src"],N0t={class:"player-item__info"},D0t={class:"player-item__info__name"},F0t={class:"player-item__info__secondary-info"},R0t={class:"player-item__info__secondary-info__nationality"},V0t=["src"],j0t={class:"player-item__info__secondary-info__position"},U0t={__name:"ExpandiblePlayers",props:{players:{type:Array,default:()=>[]},arePlayersTitular:{type:Boolean,default:!1}},setup(e){const o=e,s=t.computed(()=>o.arePlayersTitular?"Titulares:":"Cambios:"),z=t.computed(()=>`Todos los ${s.value.toLowerCase()}`);function W(v){v?o.players.forEach(g=>{g.isSelected=!0}):o.players.forEach((g,r)=>{g.isSelected=r===0})}return(v,g)=>(t.openBlock(),t.createElementBlock("div",P0t,[t.createVNode(Kv,{"border-radius":"8px","header-text":s.value,onToggle:g[0]||(g[0]=r=>v.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",I0t,[t.createElementVNode("div",L0t,[t.createVNode(t.unref(pp),{"model-value":o.players.every(r=>r.isSelected),label:z.value,"onUpdate:modelValue":W},null,8,["model-value","label"])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.players,r=>(t.openBlock(),t.createElementBlock("div",{key:r.player_id,class:"list-item player-item"},[t.createElementVNode("div",B0t,[t.createVNode(t.unref(pp),{modelValue:r.isSelected,"onUpdate:modelValue":b=>r.isSelected=b},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",O0t,[t.createElementVNode("img",{src:r.player_photo||r.photo},null,8,z0t)]),t.createElementVNode("div",N0t,[t.createElementVNode("div",D0t,t.toDisplayString(r.short_name||r.name||r.player_name),1),t.createElementVNode("div",F0t,[t.createElementVNode("div",R0t,[t.createElementVNode("img",{src:r.player_country_flag||r.nationality_photo||r.countryFlag},null,8,V0t)]),t.createElementVNode("div",j0t,t.toDisplayString(r.positionName||r.position_name||r.position),1)])])]))),128))])]),_:1},8,["header-text"])]))}},bV=du(U0t,[["__scopeId","data-v-bb8595b9"]]),G0t={class:"filter-players"},H0t={__name:"FilterPlayers",props:{players:{type:Array,default:()=>[]}},setup(e){const o=e,s=t.computed(()=>o.players.filter(W=>W.is_titular)),z=t.computed(()=>o.players.filter(W=>!W.is_titular));return(W,v)=>(t.openBlock(),t.createElementBlock("div",G0t,[t.createVNode(bV,{players:s.value,"are-players-titular":""},null,8,["players"]),t.createVNode(bV,{players:z.value,"are-players-titular":!1},null,8,["players"])]))}},N5=du(H0t,[["__scopeId","data-v-44980c4e"]]);let Z0t=class{constructor(){this.dataByTimePoint=new Map,this.playerPositions=new Map,this.ballPositions=new Map,this.matchlapseIndex=new Map,this.secondIndex=new Map}processPositions(o){return this.dataByTimePoint.clear(),this.playerPositions.clear(),this.ballPositions.clear(),this.matchlapseIndex.clear(),this.secondIndex.clear(),!o.info_by_second||!Array.isArray(o.info_by_second)?(console.error("No se encontraron datos válidos en info_by_second"),this):(o.info_by_second.forEach(s=>{const[z,W,v,g]=s,[r,b,d]=v,a=`${W}:${z}`;this.dataByTimePoint.set(a,{second:z,matchLapse:W,timeKey:a,ball:{x:r,y:b,zone:d},players:new Map}),this.ballPositions.set(a,{x:r,y:b,zone:d,second:z,matchLapse:W}),this.matchlapseIndex.has(W)||this.matchlapseIndex.set(W,new Set),this.matchlapseIndex.get(W).add(z),this.secondIndex.has(z)||this.secondIndex.set(z,new Set),this.secondIndex.get(z).add(W),Array.isArray(g)&&g.forEach(_=>{const[y,x,u,n,i]=_;this.dataByTimePoint.get(a).players.set(y,{playerId:y,teamId:x,x:u,y:n,zone:i,second:z,matchLapse:W,timeKey:a}),this.playerPositions.has(y)||this.playerPositions.set(y,[]),this.playerPositions.get(y).push({second:z,matchLapse:W,timeKey:a,teamId:x,x:u,y:n,zone:i})})}),this)}filterData(o={}){const{timeRanges:s=null,ballZones:z=null}=o,W=new Map;let v=[];return s&&s.length>0&&s.forEach(g=>{const{match_lapse:r,start:b,end:d}=g;this.matchlapseIndex.has(r)?Array.from(this.matchlapseIndex.get(r)).filter(a=>a>=b&&a<=d).forEach(a=>{v.push(`${r}:${a}`)}):console.error(`Matchlapse ${r} no encontrado en índice`)}),z&&z.length>0&&(v=v.filter(g=>{const r=this.ballPositions.get(g);return r&&z.includes(r.zone)})),v.forEach(g=>{const r=this.dataByTimePoint.get(g);if(!r)return;const b=new Map;r.players.forEach((d,a)=>{b.set(a,d)}),b.size>0&&W.set(g,{...r,players:b})}),W}calculatePlayerAverages(o){const s=new Map;o.forEach(W=>{W.players.forEach((v,g)=>{s.has(g)||s.set(g,{playerId:g,teamId:v.teamId,totalX:0,totalY:0,count:0,positions:[],matchlapses:new Set});const r=s.get(g);r.totalX+=v.x,r.totalY+=v.y,r.count++,r.matchlapses.add(v.matchLapse),r.positions.push({second:v.second,matchLapse:v.matchLapse,timeKey:v.timeKey,x:v.x,y:v.y,quadrant:v.quadrant})})});const z=new Map;return s.forEach((W,v)=>{z.set(v,{playerId:W.playerId,teamId:W.teamId,avgX:W.totalX/W.count,avgY:W.totalY/W.count,dataPoints:W.count,matchlapses:Array.from(W.matchlapses),positions:W.positions,id:W.playerId,name:`Jugador #${W.playerId}`,selected:!1,photo:null})}),z}getPlayerAverages(o={}){const s=this.filterData(o);return this.calculatePlayerAverages(s)}},W0t=class{constructor(){this.chains=[],this.indexedByInitialCategories=new Map,this.indexedByEndingCategories=new Map,this.indexedByTeam=new Map,this.indexedByMatchLapse=new Map,this.indexedByBallZones=new Map,this.indexedByBallInitialZones=new Map,this.indexedByBallFinalZones=new Map}processChains(o){return this.chains=Array.isArray(o)?o:[],this.createIndexes(),this.chains}createIndexes(){this.chains.forEach(o=>{o.initial_category_ids&&Array.isArray(o.initial_category_ids)&&o.initial_category_ids.forEach(s=>{this.indexedByInitialCategories.has(s)||this.indexedByInitialCategories.set(s,new Set),this.indexedByInitialCategories.get(s).add(o.id)}),o.ending_category_ids&&Array.isArray(o.ending_category_ids)&&o.ending_category_ids.forEach(s=>{this.indexedByEndingCategories.has(s)||this.indexedByEndingCategories.set(s,new Set),this.indexedByEndingCategories.get(s).add(o.id)}),o.team_id&&(this.indexedByTeam.has(o.team_id)||this.indexedByTeam.set(o.team_id,new Set),this.indexedByTeam.get(o.team_id).add(o.id)),o.match_lapse&&(this.indexedByMatchLapse.has(o.match_lapse)||this.indexedByMatchLapse.set(o.match_lapse,new Set),this.indexedByMatchLapse.get(o.match_lapse).add(o.id)),o.quadrant_ids&&Array.isArray(o.quadrant_ids)&&o.quadrant_ids.forEach(s=>{this.indexedByBallZones.has(s)||this.indexedByBallZones.set(s,new Set),this.indexedByBallZones.get(s).add(o.id)}),o.ball_initial_quadrant_id&&(this.indexedByBallInitialZones.has(o.ball_initial_quadrant_id)||this.indexedByBallInitialZones.set(o.ball_initial_quadrant_id,new Set),this.indexedByBallInitialZones.get(o.ball_initial_quadrant_id).add(o.id)),o.ball_ending_quadrant_id&&(this.indexedByBallFinalZones.has(o.ball_ending_quadrant_id)||this.indexedByBallFinalZones.set(o.ball_ending_quadrant_id,new Set),this.indexedByBallFinalZones.get(o.ball_ending_quadrant_id).add(o.id))})}getFilteredChains(o={}){let s=new Set(this.chains.map(W=>W.id));if(o.excludedStartCategories&&o.excludedStartCategories.length>0||o.startCategories&&o.startCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedStartCategories&&o.excludedStartCategories.length>0&&(o.excludedStartCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.startCategories&&o.startCategories.length>0&&(o.startCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.excludedEndCategories&&o.excludedEndCategories.length>0||o.endCategories&&o.endCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedEndCategories&&o.excludedEndCategories.length>0&&(o.excludedEndCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.endCategories&&o.endCategories.length>0&&(o.endCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.chainInitialZones&&o.chainInitialZones.length>0){const W=new Set;o.chainInitialZones.forEach(v=>{const g=this.indexedByBallInitialZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.chainFinalZones&&o.chainFinalZones.length>0){const W=new Set;o.chainFinalZones.forEach(v=>{const g=this.indexedByBallFinalZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.ballInterestZones&&o.ballInterestZones.length>0){const W=new Set;o.ballInterestZones.forEach(v=>{const g=this.indexedByBallZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.startTime&&o.endTime&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{match_lapse:W}=o.startTime,{match_lapse:v}=o.endTime,g=this.indexedByMatchLapse.get(W),r=this.indexedByMatchLapse.get(v);g&&r?s=new Set([...s].filter(b=>g.has(b)||r.has(b))):s=new Set}if(o.teamId){const W=this.indexedByTeam.get(o.teamId);W?s=new Set([...s].filter(v=>W.has(v))):s=new Set}let z=this.chains.filter(W=>s.has(W.id));if(o.minDuration!==void 0&&(z=z.filter(W=>W.duration>=o.minDuration)),o.maxDuration!==void 0&&(z=z.filter(W=>W.duration<=o.maxDuration)),o.startTime&&o.endTime&&o.startTime.seconds!==void 0&&o.endTime.seconds!==void 0&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{seconds:W}=o.startTime,{seconds:v}=o.endTime,{match_lapse:g}=o.startTime,{match_lapse:r}=o.endTime;z=z.filter(b=>{if(g===r&&b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0;if(g!==r){if(v>W){if(b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0}else if(b.match_lapse===g&&b.starting_second>=W||b.match_lapse===r&&b.ending_second<=v)return!0}return!1})}return(o.excludedFirstSeconds!==void 0||o.excludedLastSeconds!==void 0)&&(z=z.map(W=>{const v=o.excludedFirstSeconds!==void 0?W.starting_second+o.excludedFirstSeconds:W.starting_second;let g=W.ending_second;return W.duration>o.excludedLastSeconds&&(g=W.starting_second+o.excludedLastSeconds),v>=g||v<0||g<0?null:{...W,starting_second:v,ending_second:g}}).filter(W=>W!==null)),z}getChainStats(o={}){const s=this.getFilteredChains(o);return s.length===0?{totalChains:0,averageDuration:0,totalSeconds:0,totalDurationChains:0}:{totalChains:s.length,averageDuration:s.reduce((z,W)=>z+W.duration,0)/s.length,totalSeconds:s.reduce((z,W)=>z+(W.ending_second-W.starting_second),0),totalDurationChains:s.reduce((z,W)=>z+W.duration,0)}}mapFilterCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.category_ids&&z.push(...v.category_ids)}),z}mapFilterExcludedCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.excluded_category_ids&&z.push(...v.excluded_category_ids)}),z}};const xV="https://d1cfezxa8pcy7l.cloudfront.net",X0t="chains_by_game.json",q0t="positions_by_second.json",_V="==GolStatsHatTrick!";let Cp=class{static resetCache(){this._playersRawData=null,this._playersProcessedData=null,this._chainsRawData=null}static async _loadChainsData(o){if(this._chainsRawData)return this._chainsRawData;try{const s=await fetch(`${xV}/${o}/${X0t}`,{headers:{"x-api-key":`${_V}`}});if(!s.ok)throw new Error(`Error fetching game events: ${s.status}`);const z=await s.json();return this._chainsRawData=z,z}catch(s){throw console.error("Error fetching game events:",s),s}}static async _loadPlayersData(o){if(o!==void 0){if(this._playersRawData)return this._playersProcessedData;try{const s=await fetch(`${xV}/${o}/${q0t}`,{headers:{"x-api-key":`${_V}`}});if(!s.ok)throw new Error(`Error fetching game players: ${s.status}`);const z=await s.json(),W=new Z0t;return W.processPositions(z),this._playersRawData=z,this._playersProcessedData=W,W}catch(s){throw console.error("Error loading players data:",s),s}}}static async getPositions(o,s){try{return(await this._loadPlayersData(o)).getPlayerAverages(s)}catch(z){return console.error("Error getting positions:",z),new Map}}static getStartedCategories(){return[{id:1,category_ids:[6,312],name:"Balón recuperado",isSelected:!0},{id:2,category_ids:[28,264],name:"Saque de meta",isSelected:!0},{id:3,category_ids:[30,355],name:"Tiro libre",isSelected:!0},{id:4,category_ids:[210,212,854],name:"Saque de banda",isSelected:!0},{id:5,category_ids:[-1],excluded_category_ids:[6,312,28,264,30,355,210,212,854],name:"Otras",isSelected:!0}]}static getEndedCategories(){return[{id:1,category_ids:[13,25],name:"Centros",isSelected:!0},{id:2,category_ids:[607,608],name:"Oportunidades de gol",isSelected:!0},{id:3,category_ids:[-1],excluded_category_ids:[13,25,607,608],name:"Otras",isSelected:!0}]}static async getProcessedChains(o,s={}){try{const z=await this._loadChainsData(o),W=new W0t;W.processChains(z);const v={...s};return s.startCategories&&s.startCategories.length>0&&(v.startCategories=W.mapFilterCategoriesToIds(s.startCategories,this.getStartedCategories()),v.excludedStartCategories=W.mapFilterExcludedCategoriesToIds(s.startCategories,this.getStartedCategories())),s.endCategories&&s.endCategories.length>0&&(v.endCategories=W.mapFilterCategoriesToIds(s.endCategories,this.getEndedCategories()),v.excludedEndCategories=W.mapFilterExcludedCategoriesToIds(s.endCategories,this.getEndedCategories())),{chains:W.getFilteredChains(v),stats:W.getChainStats(v),totalChains:z.length,processor:W}}catch(z){throw console.error("Error processing chains:",z),z}}};Fk(Cp,"_playersRawData",null),Fk(Cp,"_playersProcessedData",null),Fk(Cp,"_chainsRawData",null);function wV(e){const o=t.ref([]),s=t.ref(null),z=t.ref(null),W=t.ref(!1),v=t.ref([]),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref(null),a=t.ref({min:5,max:null}),_=t.ref(5),y=t.ref(5),x=t.ref([]),u=t.ref([]),n=t.ref([]);return{isDataLoaded:W,selectedStartCategories:r,selectedEndCategories:b,selectedPossessionTeamId:d,durationRange:a,loadInitialData:async()=>{if(!(W.value||!e))try{const i=await Cp.getProcessedChains(e,{});z.value=i.processor,v.value=i.chains,g.value=i.stats,o.value=v.value,s.value=g.value}catch(i){console.error("Error loading data:",i)}finally{W.value=!0}},applyFilters:(i={})=>{if(!(!z.value||!W.value))try{const f=Object.keys(i).length>0?i:{startCategories:r.value,endCategories:b.value,teamId:d.value,minDuration:a.value.min,maxDuration:a.value.max,excludedFirstSeconds:_.value,excludedLastSeconds:y.value,chainInitialZones:x.value,chainFinalZones:u.value,ballInterestZones:n.value};o.value=z.value.getFilteredChains(f),s.value=z.value.getChainStats(f)}catch(f){console.error("Error aplicando filtros:",f)}},getFilteredData:(i={})=>{if(!W.value)return null;const{startCategories:f=[],endCategories:l=[],teamId:h=null,minDuration:m=null,maxDuration:w=null,excludedFirstSeconds:T=null,excludedLastSeconds:A=null,chainInitialZones:C=[],chainFinalZones:I=[],ballInterestZones:L=[],timeFromTimeline:E={}}=i,P={};if(f.length>0&&(P.startCategories=z.value.mapFilterCategoriesToIds(f,Cp.getStartedCategories()),P.excludedStartCategories=z.value.mapFilterExcludedCategoriesToIds(f,Cp.getStartedCategories())),l.length>0&&(P.endCategories=z.value.mapFilterCategoriesToIds(l,Cp.getEndedCategories()),P.excludedEndCategories=z.value.mapFilterExcludedCategoriesToIds(l,Cp.getEndedCategories())),h&&(P.teamId=h),m!==null&&(P.minDuration=parseInt(m)),w!==null&&(P.maxDuration=parseInt(w)),T!==null&&(P.excludedFirstSeconds=parseInt(T)),A!==null&&(P.excludedLastSeconds=parseInt(A)),C.length>0&&(P.chainInitialZones=C),I.length>0&&(P.chainFinalZones=I),L.length>0&&(P.ballInterestZones=L),Object.keys(E).length>0&&Object.keys(E.end).length>0&&Object.keys(E.start).length>0){const{start:M,end:S}=E;P.startTime={seconds:M.seconds,match_lapse:M.match_lapse},P.endTime={seconds:S.seconds,match_lapse:S.match_lapse}}return{chains:z.value.getFilteredChains(P),stats:z.value.getChainStats(P)}}}}const Y0t={class:"shadows"},J0t={class:"menu-content-shadows"},$0t={class:"menu-shadows-teams"},K0t={class:"team-switch-container"},Q0t={class:"team-switch team-switch-toggle"},emt={class:"team-content"},tmt=["src"],amt={class:"team-label"},rmt={class:"team-content"},nmt={class:"team-label"},imt=["src"],omt={class:"menu-shadows-tabs"},smt={class:"menu-shadows-tab-content"},lmt={key:0},cmt={key:1,class:"filter-events-container"},umt={key:2},dmt={__name:"FilterShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultShadowsFilters:{type:Object,default:()=>({})},game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},filterButtonProps:{type:Object,default:()=>({fontSize:"13px",gap:"6px",padding:"11px 12px"})}},emits:["home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered","home-range-change-shadows","away-range-change-shadows"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(!1),v=t.ref(!1),g=t.ref(["Filtros","Eventos","Jugadores"]),r=t.ref(g.value[0]),b=t.ref({...s.defaultShadowsFilters}),d=t.ref({...s.defaultShadowsFilters}),a=t.ref(structuredClone(s.startedCategories)),_=t.ref(structuredClone(s.endedCategories)),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(!0),n=t.ref(!0),i=t.ref(!0),f=t.ref(!0),l=t.ref(s.game.homeTeam.team_id),h=t.ref(!0),{selectedStartCategories:m,selectedEndCategories:w,isDataLoaded:T,loadInitialData:A,getFilteredData:C}=wV(s.game.gameId),I=m,L=w,E=t.ref(null),P=t.ref(!1),M=t.computed(()=>s.containerWidth>650?"650px":`${s.containerWidth-20}px`),S=he=>{const pe=he===s.game.homeTeam.team_id?b.value:d.value,ne={startCategories:pe.startCategories,endCategories:pe.endCategories,teamId:pe.possessionTeamId,minDuration:pe.durationRange.min,maxDuration:pe.durationRange.max,excludedFirstSeconds:pe.excludedFirstSeconds,excludedLastSeconds:pe.excludedLastSeconds,chainInitialZones:pe.chainInitialZones,chainFinalZones:pe.chainFinalZones,ballInterestZones:pe.ballInterestZones,timeFromTimeline:pe.timeFromTimeline},le=C(ne);le&&(he===s.game.homeTeam.team_id?(z("home-chains-shadows-filtered",le.chains,he),z("home-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("home-range-change-shadows",ne.timeFromTimeline,he)):(z("away-chains-shadows-filtered",le.chains,he),z("away-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("away-range-change-shadows",ne.timeFromTimeline,he)))},B=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;switch(he){case"home":pe.possessionTeamId=s.game.homeTeam.team_id;break;case"away":pe.possessionTeamId=s.game.awayTeam.team_id;break;case"both":pe.possessionTeamId=null;break}S(l.value)},k=(he,pe)=>{const ne=l.value===s.game.homeTeam.team_id?b.value:d.value;he==="less-than"?ne.durationRange={min:null,max:pe}:ne.durationRange={min:pe,max:null},S(l.value)},O=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedFirstSeconds=he,S(l.value)},D=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedLastSeconds=he,S(l.value)},V=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainInitialZones=he,S(l.value)},G=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainFinalZones=he,S(l.value)},H=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.ballInterestZones=he,S(l.value)};function U(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?a.value:y.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.startCategories.includes(pe.id)||ne.startCategories.push(pe.id):ne.startCategories=ne.startCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?u.value=ne.startCategories.length===a.value.length:i.value=ne.startCategories.length===y.value.length,S(l.value)}function J(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?_.value:x.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.endCategories.includes(pe.id)||ne.endCategories.push(pe.id):ne.endCategories=ne.endCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?n.value=ne.endCategories.length===_.value.length:f.value=ne.endCategories.length===x.value.length,S(l.value)}const re=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?a.value:y.value;ne.forEach(le=>le.isSelected=he),he?pe.startCategories=ne.map(le=>le.id):pe.startCategories=[],l.value===s.game.homeTeam.team_id?u.value=he:i.value=he,S(l.value)},q=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?_.value:x.value;ne.forEach(le=>le.isSelected=he),he?pe.endCategories=ne.map(le=>le.id):pe.endCategories=[],l.value===s.game.homeTeam.team_id?n.value=he:f.value=he,S(l.value)},ae=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.timeFromTimeline=he,S(l.value)},ee=t.computed(()=>s.startedCategories.length>0?l.value===s.game.homeTeam.team_id?a.value:y.value:[]),$=t.computed(()=>s.endedCategories.length>0?l.value===s.game.homeTeam.team_id?_.value:x.value:[]);t.watch([I,L],()=>{I.value.length===0&&(I.value=ee.value.map(he=>he.id)),L.value.length===0&&(L.value=$.value.map(he=>he.id))},{immediate:!0}),t.watch(()=>T.value,async he=>{he||(await A(),h.value?(S(s.game.homeTeam.team_id),S(s.game.awayTeam.team_id),h.value=!1):S(l.value))},{immediate:!0}),t.watch(W,he=>{P.value=he});function Q(he){he?W.value=!0:W.value=!1}function ce(he){v.value=he,z("is-shadows-selected",he)}function de(he){r.value=he}return(he,pe)=>(t.openBlock(),t.createElementBlock("div",Y0t,[t.createElementVNode("div",{ref_key:"filterContainerRef",ref:E,class:"filter-container"},[t.createVNode(S5,t.mergeProps(e.filterButtonProps,{text:"Shadows","is-active":P.value,onExpand:Q,onChangeSelected:ce}),null,16,["is-active"]),e.containerWidth>550?(t.openBlock(),t.createBlock(yht,{key:0})):t.createCommentVNode("",!0)],512),t.createVNode(t.unref(Rk),{modelValue:W.value,"onUpdate:modelValue":pe[2]||(pe[2]=ne=>W.value=ne),width:"fit-content","menu-width":M.value,"left-menu":"unset","menu-margin-top":8,"trigger-element":E.value,"z-index-open":15},{trigger:t.withCtx(()=>[...pe[3]||(pe[3]=[t.createElementVNode("div",{style:{display:"none"}},null,-1)])]),menu:t.withCtx(()=>[t.createElementVNode("div",J0t,[pe[4]||(pe[4]=t.createElementVNode("div",{class:"menu-shadows-header"},[t.createElementVNode("div",{class:"menu-shadows-header__title"}," Filtros shadows ")],-1)),t.createElementVNode("div",$0t,[t.createElementVNode("div",K0t,[t.createElementVNode("div",Q0t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:l.value===e.game.homeTeam.team_id?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.homeTeam.team_id}]),onClick:pe[0]||(pe[0]=ne=>l.value=e.game.homeTeam.team_id),type:"button"},[t.createElementVNode("span",emt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.homeTeam.team_id}.png`,alt:"Escudo local",class:"team-logo"},null,8,tmt),t.createElementVNode("span",amt,t.toDisplayString(e.game.homeTeam.colloquial_name),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.awayTeam.team_id}]),onClick:pe[1]||(pe[1]=ne=>l.value=e.game.awayTeam.team_id),type:"button"},[t.createElementVNode("span",rmt,[t.createElementVNode("span",nmt,t.toDisplayString(e.game.awayTeam.colloquial_name),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.awayTeam.team_id}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,imt)])],2)])])]),t.createElementVNode("div",omt,[t.createVNode(wht,{tabs:g.value,onChangeTab:de},null,8,["tabs"])]),t.createElementVNode("div",smt,[r.value===g.value[0]?(t.openBlock(),t.createElementBlock("div",lmt,[t.withDirectives(t.createVNode(yV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(yV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[1]?(t.openBlock(),t.createElementBlock("div",cmt,[t.withDirectives(t.createVNode(vV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":u.value,"all-end-events-selected":n.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(vV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[2]?(t.openBlock(),t.createElementBlock("div",umt,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.homeTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.awayTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):t.createCommentVNode("",!0)]),pe[5]||(pe[5]=t.createElementVNode("div",{class:"menu-shadows-tab-footer"},null,-1))])]),_:1},8,["modelValue","menu-width","trigger-element"])]))}},hmt=du(dmt,[["__scopeId","data-v-a8d58dcd"]]),pmt={__name:"TopFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},defaultShadowsFilters:{type:Object,default:()=>({})},startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]}},emits:["change-connections","change-distance","change-distance-custom","home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-range-change-shadows","away-range-change-shadows","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered"],setup(e,{emit:o}){let s=null;const z=e,W=o,v=t.ref(null),g=t.ref(0),r=t.computed(()=>"Distancia entre jugadores"),b=t.computed(()=>z.containerWidth<480?{fontSize:"10px",gap:"4px",padding:"8px 6px"}:{fontSize:"13px",gap:"6px",padding:"11px 12px"});function d(m){W("change-connections",m)}function a(m){W("change-distance-custom",m)}function _(m){W("change-distance",m)}function y(m,w){W("home-chains-shadows-filtered",m,w)}function x(m,w){W("away-chains-shadows-filtered",m,w)}function u(m,w){W("home-ball-zones-shadows-filtered",m,w)}function n(m,w){W("away-ball-zones-shadows-filtered",m,w)}function i(m){W("is-shadows-selected",m)}function f(m,w){W("home-range-change-shadows",m,w)}function l(m,w){W("away-range-change-shadows",m,w)}function h(){v.value&&(s=new ResizeObserver(m=>{for(let w of m)g.value=w.contentRect.width}),s.observe(v.value))}return t.onMounted(()=>{h()}),(m,w)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"filters",ref:v,class:"filters"},[w[0]||(w[0]=t.createElementVNode("div",{class:"filters__text"}," Mostrar: ",-1)),t.createVNode(tht,{game:e.game,"filter-button-props":b.value,onApply:d},null,8,["game","filter-button-props"]),t.createVNode(S5,t.mergeProps(b.value,{text:r.value,"is-arrow-visible":!1,onChangeSelected:_}),null,16,["text"]),t.createVNode(fht,{game:e.game,"filter-button-props":b.value,"container-width":e.containerWidth,onApply:a},null,8,["game","filter-button-props","container-width"]),t.createVNode(hmt,{game:e.game,token:e.token,"container-width":e.containerWidth,"default-shadows-filters":e.defaultShadowsFilters,"started-categories":e.startedCategories,"ended-categories":e.endedCategories,players:e.players,"filter-button-props":b.value,onHomeChainsShadowsFiltered:y,onAwayChainsShadowsFiltered:x,onHomeBallZonesShadowsFiltered:u,onAwayBallZonesShadowsFiltered:n,onHomeRangeChangeShadows:f,onAwayRangeChangeShadows:l,onIsShadowsSelected:i},null,8,["game","token","container-width","default-shadows-filters","started-categories","ended-categories","players","filter-button-props"])],512))}},fmt=du(pmt,[["__scopeId","data-v-28d461d8"]]),mmt={class:"page-header"},gmt={class:"page-header__time"},ymt={class:"value"},vmt={class:"value"},bmt={__name:"SectionHeader",props:{totalChains:{type:Number,default:0},totalSeconds:{type:Number,default:0},totalDurationChains:{type:Number,default:0}},emits:["update:selectedTeam"],setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("header",mmt,[s[2]||(s[2]=t.createElementVNode("div",{class:"page-header__title"},[t.createElementVNode("span",{class:"label"},"Posicionamiento y conexiones")],-1)),t.createElementVNode("div",gmt,[s[0]||(s[0]=t.createElementVNode("span",{class:"label"},"Estás viendo:",-1)),t.createElementVNode("span",ymt,t.toDisplayString(e.totalChains)+" posesiones",1),s[1]||(s[1]=t.createElementVNode("span",{class:"separator"},"|",-1)),t.createElementVNode("span",vmt,t.toDisplayString(e.totalSeconds)+" segundos",1)])]))}},xmt=du(bmt,[["__scopeId","data-v-4218da77"]]);function kV(){const e=t.ref(!1),o=t.ref(null),s=t.ref([]);async function z(v){e.value=!1,o.value=null;try{const g=await Cp._loadChainsData(v);s.value=g||[]}catch(g){o.value=g.message,console.error("Error cargando datos del juego:",g)}finally{e.value=!0}}async function W(v,g){return await Cp.getPositions(v,g)}return{isDataLoaded:e,startedCategories:Cp.getStartedCategories(),endedCategories:Cp.getEndedCategories(),loadGameData:z,getPositions:W}}const _mt={class:"tooltip-content-row"},wmt=["src"],kmt={class:"tooltip-content"},Smt={class:"player-name"},Tmt={class:"minutes-played"},Cmt={class:"minutes-number"},Emt={key:0,class:"entry-exit"},Amt={key:0,class:"entry-block"},Mmt={class:"entry-minute"},Pmt={key:1,class:"exit-block"},Imt={class:"exit-minute"},Lmt={key:1,class:"sub-info"},Bmt={key:0},Omt={class:"sub-name"},zmt={key:1},Nmt={class:"sub-name"},Dmt={__name:"TooltipPlayer",props:{show:Boolean,x:Number,y:Number,player:{type:Object,default:()=>({name:"Brian Rodríguez",minutes:26,inMinute:"Min 33",outMinute:"Min 22",subFor:"A. Zendejas"})}},setup(e){function o(s){if(!s)return"";const z=s.trim().split(",");if(z.length>=2){const W=z[0].trim().split(" ")[0];return`${z[1].trim().split(" ")[0].charAt(0)}. ${W}`}return s}return(s,z)=>e.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tooltip-box animated-tooltip",style:t.normalizeStyle({position:"fixed",left:e.x+"px",top:e.y+"px",transform:"translate(-50%, -105%)",zIndex:1e3})},[t.renderSlot(s.$slots,"default",{},()=>[t.createElementVNode("div",_mt,[t.createElementVNode("div",{class:t.normalizeClass(["player-photo",{"player-photo--no-move":!e.player.player_in&&!e.player.player_out,"player-photo--move":e.player.player_in||e.player.player_out}])},[t.createElementVNode("img",{src:e.player.photo||"https://i.imgur.com/1Q9Z1Zm.png",alt:"Foto jugador"},null,8,wmt)],2),t.createElementVNode("div",kmt,[t.createElementVNode("div",Smt,t.toDisplayString(e.player.formattedName),1),t.createElementVNode("div",Tmt,[t.createElementVNode("span",Cmt,t.toDisplayString(e.player.minutes_played),1),z[0]||(z[0]=t.createElementVNode("span",{class:"minutes-label"},"Minutos Jugados",-1))]),z[7]||(z[7]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Emt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Amt,[z[1]||(z[1]=t.createElementVNode("span",{class:"entry-label"},"Entró",-1)),t.createElementVNode("span",Mmt,"Min "+t.toDisplayString(e.player.player_in.minute),1)])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Pmt,[z[2]||(z[2]=t.createElementVNode("span",{class:"exit-label"},"Salió",-1)),t.createElementVNode("span",Imt,"Min "+t.toDisplayString(e.player.player_out.minute),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),z[8]||(z[8]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Lmt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Bmt,[z[4]||(z[4]=t.createElementVNode("span",null,"Entró por:",-1)),t.createElementVNode("span",Omt,[t.createTextVNode(t.toDisplayString(o(e.player.player_in.player_name_to_in))+" ",1),z[3]||(z[3]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",zmt,[z[6]||(z[6]=t.createElementVNode("span",null,"Salio por:",-1)),t.createElementVNode("span",Nmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_out.player_name_to_out))+" ",1),z[5]||(z[5]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])])],!0)],4)):t.createCommentVNode("",!0)}},Fmt=du(Dmt,[["__scopeId","data-v-ab5e17c5"]]),Rmt={class:"soccer-field__container"},Vmt={class:"field"},jmt={key:0,class:"loading-positions"},Umt={class:"players-container"},Gmt={viewBox:"0 0 611 407",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg-field-overlay"},Hmt=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],Zmt=["id","d"],Wmt=["id","d"],Xmt=["xlink:href"],qmt=["xlink:href"],Ymt=["x","y","stroke-width","fill","opacity"],Jmt=["x","y","fill","opacity"],$mt=["onMouseenter","onMouseleave","onClick"],Kmt=["x","y","stroke-width","fill","stroke","opacity"],Qmt=["x","y","fill","opacity"],e1t={key:0},t1t=["width","x"],a1t=["x1","x2"],r1t=["x"],n1t=["x"],i1t=["x"],o1t=["height","y"],s1t=["y1","y2"],l1t=["y"],c1t=["y"],u1t=["y"],d1t={key:1},h1t=["width","x"],p1t=["x1","x2"],f1t=["x"],m1t=["x"],g1t=["x"],y1t=["height","y"],v1t=["y1","y2"],b1t=["y"],x1t=["y"],_1t=["y"],w1t=["d"],k1t=["d"],S1t=["d"],T1t=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],C1t=["x1","y1","x2","y2"],E1t=["onMouseenter","onMouseleave","onClick"],A1t=["x","y","stroke-width","fill","stroke","opacity"],M1t=["x","y","fill","opacity"],P1t=["onMouseenter","onMouseleave","onClick"],I1t=["x","y","stroke-width","fill","stroke","opacity"],L1t=["x","y","fill","opacity"],B1t=["onMouseenter","onClick"],O1t=["x","y","stroke"],z1t=["x","y","fill"],N1t=["x","y"],D1t=105,F1t=68,SV=611,TV=407,CV=3,R1t={__name:"SoccerField",props:{gameId:{type:Number,default:88247},playersSelected:{type:Array,default:()=>[]},playersSelectedShadows:{type:Array,default:()=>[]},homeTeamId:{type:Number,default:1},awayTeamId:{type:Number,default:5},homeFilteredChains:{type:Array,default:()=>[]},awayFilteredChains:{type:Array,default:()=>[]},homeFilteredBallZones:{type:Array,default:()=>[]},awayFilteredBallZones:{type:Array,default:()=>[]},homeFilteredChainsShadows:{type:Array,default:()=>[]},awayFilteredChainsShadows:{type:Array,default:()=>[]},homeFilteredBallZonesShadows:{type:Array,default:()=>[]},awayFilteredBallZonesShadows:{type:Array,default:()=>[]},isDataLoaded:{type:Boolean,default:!1},areConnectionsVisible:{type:Boolean,default:!1},isDistanceVisible:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},playersInfo:{type:Object,default:()=>({homeTeam:[],awayTeam:[]})},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},timeFromTimelineShadowsHome:{type:Object,default:()=>({})},timeFromTimelineShadowsAway:{type:Object,default:()=>({})},customDistance:{type:String,default:null}},emits:["home-possession-total-seconds","away-possession-total-seconds","change-custom-distances"],setup(e,{expose:o,emit:s}){const z=t.ref(!1),W=t.ref([]),v=t.ref([]),g=t.ref([]),r=kV(),b=t.ref({show:!1,x:0,y:0,player:{}}),d=t.ref(null),a=e,_=s,y=t.ref(D1t/611),x=t.ref(F1t/407),u=t.ref([{id:"h1",d:"M24 16H588",topRaw:16,type:"line",isVisible:!0,players:[],block:[]},{id:"h2",d:"M24 380H588",topRaw:380,type:"line",isVisible:!0,players:[],block:[]},{id:"v1",d:"M25 380V16.5",leftRaw:25,type:"line",isVisible:!0,players:[],block:[]},{id:"v2",d:"M86 380V16.5",leftRaw:86,type:"line",isVisible:!0,players:[],block:[]},{id:"v3",d:"M130.5 380V16.5",leftRaw:130.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v4",d:"M479.5 380V16.5",leftRaw:479.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v5",d:"M526 380V16.5",leftRaw:526,type:"line",isVisible:!0,players:[],block:[]},{id:"v6",d:"M588 380V16.5",leftRaw:588,type:"line",isVisible:!0,players:[],block:[]}]),n=t.ref(null),i=t.ref(null),f=t.ref([]),l=t.ref([]),h=t.ref(U()),m=t.ref(U()),w=t.ref([]),T=t.ref(null),A=t.ref(null);function C(Ze){A.value=Ze.id}function I(){A.value=null}function L(Ze){return A.value&&A.value!==Ze.id?.1:T.value?Ze.isCandidateToDelete?1:.2:1}function E(Ze){return A.value?.1:T.value?Ze.isCandidateToDelete?1:.2:1}const P=t.computed(()=>{if(a.customDistance){if(a.customDistance==="players")return f.value;if(a.customDistance==="block")return l.value}return[]});t.watch(()=>a.isAwayTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(()=>a.isHomeTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(m,()=>{H(h,m)},{immediate:!0,deep:!0});const M=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||W.value.length===0||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...W.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?(W.value.forEach(xe=>{xe.isVisible=a.playersSelected.includes(xe.id)}),W.value):(a.isHomeTeamVisible?Ze=Ze.filter(xe=>(xe.isVisible=xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible)):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>(xe.isVisible=!xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible))),Ce(),Ze)}),S=t.computed(()=>({"--cursor-svg-field-overlay":a.customDistance?"url('https://golstatsimages.blob.core.windows.net/todoelfut/cursor-02.svg') 17 17, pointer":"inherit"})),B=t.computed(()=>`activeDistances${a.customDistance.charAt(0).toUpperCase()+a.customDistance.slice(1)}`),k=t.computed(()=>a.customDistance?u.value:[]),O=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||v.value.length===0||!a.showShadows||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...v.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?v.value:(a.isHomeTeamVisible?Ze=Ze.filter(xe=>xe.is_home):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>xe.is_home===!1)),Ze)}),D=t.computed(()=>new Map(M.value.map(Ze=>[Ze.id,Ze]))),V=t.computed(()=>a.isHomeTeamVisible&&W.value.some(Ze=>Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1)),G=t.computed(()=>a.isAwayTeamVisible&&W.value.some(Ze=>!Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1));function H(Ze,xe){const Oe=[{id:"aB1",d:`M${xe.value.minimumX} ${xe.value.minimumY}H${xe.value.maximumX}`,topRaw:xe.value.minimumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB2",d:`M${xe.value.maximumX} ${xe.value.minimumY}V${xe.value.maximumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.maximumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB3",d:`M${xe.value.maximumX} ${xe.value.maximumY}H${xe.value.minimumX}`,topRaw:xe.value.maximumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB4",d:`M${xe.value.minimumX} ${xe.value.maximumY}V${xe.value.minimumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.minimumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"hB1",d:`M${Ze.value.minimumX} ${Ze.value.minimumY}H${Ze.value.maximumX}`,topRaw:Ze.value.minimumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB2",d:`M${Ze.value.maximumX} ${Ze.value.minimumY}V${Ze.value.maximumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.maximumX,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB3",d:`M${Ze.value.maximumX} ${Ze.value.maximumY}H${Ze.value.minimumX}`,topRaw:Ze.value.maximumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB4",d:`M${Ze.value.minimumX} ${Ze.value.maximumY}V${Ze.value.minimumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.minimumX,isVisible:a.isHomeTeamVisible,type:"boundary"}];w.value.length===0?w.value=[...Oe]:w.value.forEach(Fe=>{const We=Oe.find(et=>et.id===Fe.id);We&&(Fe.d=We.d,Fe.topRaw=We.topRaw,Fe.leftRaw=We.leftRaw,Fe.isVisible=We.isVisible)}),l.value.forEach(Fe=>{const We=w.value.find(tt=>tt.id===Fe.from.id),et=w.value.find(tt=>tt.id===Fe.to.id);We&&(Fe.from.d=We.d,Fe.from.topRaw=We.topRaw,Fe.from.leftRaw=We.leftRaw,Fe.from.isVisible=We.isVisible),et&&(Fe.to.d=et.d,Fe.to.topRaw=et.topRaw,Fe.to.leftRaw=et.leftRaw,Fe.to.isVisible=et.isVisible),ge(Fe.from,Fe.to,!0)}),setTimeout(()=>{Ce()},1e3)}function U(){return{minimumX:0,maximumX:SV,minimumY:0,maximumY:TV,isVisible:!0}}function J(Ze,xe){if(!Ze||Ze.length===0)return[];let Oe=null,Fe=null,We=null,et=null;xe.start&&xe.end&&(Oe=xe.start.match_lapse,Fe=xe.end.match_lapse,We=xe.start.seconds,et=xe.end.seconds);const tt=[];return Ze.forEach(ot=>{if(ot.starting_second!==void 0&&ot.ending_second!==void 0){let vt=ot.starting_second,yt=ot.ending_second;Oe!==null&&Fe!==null&&We!==null&&et!==null&&(Oe===Fe||et>We?(vt<We&&(vt=We),yt>et&&(yt=et)):(ot.match_lapse===Oe&&vt<We&&(vt=We),ot.match_lapse===Fe&&yt>et&&(yt=et))),tt.push({match_lapse:ot.match_lapse,start:vt,end:yt})}}),tt}function re(Ze){return Ze.reduce((xe,Oe)=>xe+(Oe.end-Oe.start),0)}const q=new Map,ae=new Map;async function ee(){try{q.clear(),ae.clear(),h.value=U(),m.value=U();const Ze=a.homeFilteredChains.length>0?J(a.homeFilteredChains,a.timeFromTimeline):[],xe=a.awayFilteredChains.length>0?J(a.awayFilteredChains,a.timeFromTimeline):[],Oe=a.homeFilteredChainsShadows.length>0?J(a.homeFilteredChainsShadows,a.timeFromTimelineShadowsHome):[],Fe=a.awayFilteredChainsShadows.length>0?J(a.awayFilteredChainsShadows,a.timeFromTimelineShadowsAway):[],We={timeRanges:Ze,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZones},et={timeRanges:xe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZones},tt={timeRanges:Oe,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZonesShadows},ot={timeRanges:Fe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZonesShadows},vt=[],yt=[],It=[],Ut=[],Gt=Ze.length>0?await r.getPositions(a.gameId,We):[],st=xe.length>0?await r.getPositions(a.gameId,et):[],Ke=Oe.length>0?await r.getPositions(a.gameId,tt):[],ht=Fe.length>0?await r.getPositions(a.gameId,ot):[];Gt&&Gt.size>0&&Gt.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),vt.push(Pt),q.set(mt.playerId,Pt)}}),st&&st.size>0&&st.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),yt.push(Pt),q.set(mt.playerId,Pt)}}),Ke&&Ke.size>0&&Ke.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};It.push(Pt),ae.set(mt.playerId,Pt)}}),ht&&ht.size>0&&ht.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};Ut.push(Pt),ae.set(mt.playerId,Pt)}}),_("home-possession-total-seconds",re(Ze),a.homeTeamId),_("away-possession-total-seconds",re(xe),a.awayTeamId),W.value.length===0?W.value=[...yt,...vt]:W.value.forEach(mt=>{const Pt=q.get(mt.id);Pt&&(mt.top=Pt.top,mt.left=Pt.left,mt.topRaw=Pt.topRaw,mt.leftRaw=Pt.leftRaw,mt.isVisible=Pt.isVisible,mt.number=Pt.number,mt.team=Pt.team,mt.position=Pt.position,mt.is_home=Pt.is_home,mt.is_titular=Pt.is_titular),f.value.forEach(Et=>{const nt=Et.from.id===mt.id?Et.from:null,ct=Et.to.id===mt.id?Et.to:null;(nt||ct)&&(nt&&(Et.from=mt),ct&&(Et.to=mt),ge(Et.from,Et.to,!0))}),l.value.forEach(Et=>{(Et.from.id===mt.id?Et.from:Et.to.id===mt.id&&Et.to)&&ge(Et.from,Et.to,!0)})}),v.value=[...Ut,...It]}catch(Ze){console.error("Error calculating filtered positions:",Ze),W.value=[],v.value=[],h.value=U(),m.value=U()}}function $(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.position_id:0}function Q(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.jersey:0}function ce(Ze){if(!Ze||!a.playersInfo)return!1;const xe=a.playersInfo.homeTeam.find(Oe=>Oe.player_id===Ze)||a.playersInfo.awayTeam.find(Oe=>Oe.player_id===Ze);return xe?xe.is_titular:!1}function de(Ze){if(!Ze||!a.playersSelected.includes(Ze.id)||Ze.position===1)return;const xe=Ze.is_home?h:m;xe.value||(xe.value=U()),(xe.value.minimumX===0||xe.value.minimumX>Ze.leftRaw)&&(xe.value.minimumX=Ze.leftRaw),(xe.value.maximumX===SV||xe.value.maximumX<Ze.leftRaw)&&(xe.value.maximumX=Ze.leftRaw),(xe.value.minimumY===0||xe.value.minimumY>Ze.topRaw)&&(xe.value.minimumY=Ze.topRaw),(xe.value.maximumY===TV||xe.value.maximumY<Ze.topRaw)&&(xe.value.maximumY=Ze.topRaw)}t.watch(()=>[a.homeFilteredChains,a.awayFilteredChains,a.homeFilteredChainsShadows,a.awayFilteredChainsShadows,z.value,a.isDataLoaded,a.playersInfo],()=>{a.isDataLoaded&&ee()},{immediate:!0,deep:!0});function he(Ze,xe,Oe,Fe,We=!1){const et=Oe-Ze,tt=Fe-xe;let ot=Math.atan2(tt,et)*(180/Math.PI);return We&&(ot+=90),ot}function pe(Ze){return Ze*(Math.PI/180)}function ne(Ze){if(!g.value||g.value.length===0)return 1;const xe=Math.max(...g.value.map(We=>We.count||1));if(xe<=0)return 1;const Oe=Ze.count||1;if(xe===1)return 5;const Fe=Oe/xe*5;return Fe<.5?.5:Fe}function le(Ze){return ne(Ze)>=3.5?Ze.is_home?"white":"black":""}const ie=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||!a.areConnectionsVisible||g.value.length===0||!D.value.size)return[];const Ze=g.value.reduce((xe,Oe)=>{if(D.value.has(Oe.to)&&D.value.has(Oe.from)&&a.playersSelected.includes(Oe.from)&&a.playersSelected.includes(Oe.to)){const Fe=`${Oe.from}-${Oe.to}`,We=`${Oe.to}-${Oe.from}`,et=xe.get(Fe)||xe.get(We),tt=D.value.get(Oe.from).leftRaw,ot=D.value.get(Oe.from).topRaw,vt=D.value.get(Oe.to).leftRaw,yt=D.value.get(Oe.to).topRaw,It=he(tt,ot,vt,yt,!0),Ut=pe(It),Gt=Math.cos(Ut)*CV,st=Math.sin(Ut)*CV;et?et.left?et.right={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:et.left={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:xe.set(Fe,{left:{...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st},right:null})}return xe},new Map);return Array.from(Ze.values()).filter(xe=>xe.left||xe.right)});function me(Ze){g.value=Ze}const ve=t.computed(()=>Ze=>Ze.isCandidateToDelete?"#F7A138":P.value.length>0&&(Ze.isDistanceActive||Ze.isDistanceCandidate||Ze.isDistanceSelected)?"#44E3E7":"#fff"),ye=t.computed(()=>(Ze,xe=!1)=>Ze.isDistanceActive?"#41AAEB":Ze.is_home?xe?"#797E89":Ze.is_titular?"#2d65d4":"#20539F":xe?"#515869":Ze.is_titular?"#CBEE6B":"#789626"),ke=t.computed(()=>Ze=>Ze.is_home?Ze.is_titular?"#6891F8":"#4376F6":Ze.is_titular?"#CBEE6B":"#789626"),Ee=t.computed(()=>(Ze,xe=!1)=>Ze.is_home||Ze.isDistanceActive||xe?"#fff":Ze.is_titular?"#000":"#fff");function Te(Ze){if(!Ze)return"";const xe=Ze.trim().split(",");if(xe.length>=2){const Oe=xe[0].trim().split(" ")[0];return`${xe[1].trim().split(" ")[0].charAt(0)}. ${Oe}`}return Ze}function Pe(Ze,xe){a.customDistance?(xe.isDistanceCandidate=!0,i.value=xe):Le(Ze,xe)}function Be(Ze){a.customDistance?(Ze.isDistanceCandidate=!1,i.value=null):je()}function Le(Ze,xe){const{homeTeam:Oe,awayTeam:Fe}=a.playersInfo,We=Oe.find(tt=>tt.player_id===xe.id)||Fe.find(tt=>tt.player_id===xe.id);We&&We.name&&(We.formattedName=Te(We.name));const et=Ze.target.getBoundingClientRect();b.value={show:!0,x:et.left+et.width/2,y:et.top,player:We||xe},t.nextTick(()=>{if(d.value){const tt=d.value.offsetHeight;b.value.y=et.top-tt-5}})}function je(){b.value.show=!1}function Me(Ze){!a.customDistance||T.value||(Ze.isDistanceCandidate=!0,i.value=Ze)}function Re(Ze){Ze.isDistanceActive||(Ze.isDistanceCandidate=!1,i.value=null)}function Ie(Ze){const xe=Ze.from,Oe=Ze.to,Fe=xe.type==="line"?xe:Oe.type==="line"?Oe:null,We=xe.type!=="line"?xe:Oe.type!=="line"?Oe:null;if(Fe&&We){const et=Fe[a.customDistance];et&&(et.find(tt=>tt.id===We.id)||et.push(We))}}function ge(Ze,xe,Oe=!1){if(!(Ze.type==="line"&&xe.type==="line")&&Ze&&xe){const Fe=`${Ze.id}-${xe.id}`;if(!Oe){if(Ze[B.value]&&Ze[B.value].includes(Fe))return;Ze[B.value]?Ze[B.value].push(Fe):Ze[B.value]=[Fe],xe[B.value]?xe[B.value].push(Fe):xe[B.value]=[Fe],Ze.isDistanceActive=!1,Ze.isDistanceSelected=!0,xe.isDistanceActive=!1,xe.isDistanceSelected=!0}Ze.distanceLeft=Ze.leftRaw||xe.leftRaw,Ze.distanceTop=Ze.topRaw||xe.topRaw,xe.distanceLeft=xe.leftRaw||Ze.leftRaw,xe.distanceTop=xe.topRaw||Ze.topRaw;const We=Math.abs(Ze.distanceLeft-xe.distanceLeft),et=Math.abs(Ze.distanceTop-xe.distanceTop),tt=We*y.value,ot=et*x.value,vt=Math.sqrt(tt*tt+ot*ot).toFixed(0),yt=Math.min(Ze.distanceLeft,xe.distanceLeft),It=Math.min(Ze.distanceTop,xe.distanceTop),Ut=yt+Math.abs(Ze.distanceLeft-xe.distanceLeft)/2,Gt=It+Math.abs(Ze.distanceTop-xe.distanceTop)/2,st=yt===Ze.distanceLeft,Ke=It===Ze.distanceTop,ht=0,mt=0,Pt=st?Ze.distanceLeft+ht:Ze.distanceLeft-ht,Et=Ke?Ze.distanceTop+mt:Ze.distanceTop-mt,nt=st?xe.distanceLeft-ht:xe.distanceLeft+ht,ct=Ke?xe.distanceTop-mt:xe.distanceTop+mt,Ye={from:Ze,to:xe,distanceInMeters:vt,lineLabelLeft:Ut,lineLabelTop:Gt,fromLineLeft:Pt,fromLineTop:Et,toLineLeft:nt,toLineTop:ct,id:Fe};if(a.customDistance==="block")if(Oe){const lt=l.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else l.value.push(Ye),Ie(Ye);else if(a.customDistance==="players")if(Oe){const lt=f.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else f.value.push(Ye),Ie(Ye);Ce(),n.value=null,i.value=null}}function Ce(){const Ze=l.value.filter(Oe=>{let Fe=Oe.from.isVisible!==!1,We=Oe.to.isVisible!==!1;return Oe.from.type==="line"&&Oe.from.block&&(Fe=Oe.from.block.some(et=>et.isVisible!==!1)),Oe.to.type==="line"&&Oe.to.block&&(We=Oe.to.block.some(et=>et.isVisible!==!1)),Fe&&We}),xe=f.value.filter(Oe=>{let Fe=Oe.from.isVisible,We=Oe.to.isVisible;return Oe.from.type==="line"&&Oe.from.players&&(Fe=Oe.from.players.some(et=>et.isVisible)),Oe.to.type==="line"&&Oe.to.players&&(We=Oe.to.players.some(et=>et.isVisible)),Fe&&We});_("change-custom-distances",{blockDistancesTotal:Ze.length,playerDistancesTotal:xe.length})}function we(Ze){!a.customDistance||T.value||n.value&&n.value.type==="line"&&Ze.type==="line"||(Ze.isDistanceActive=!0,n.value&&!n.value.team?ge(n.value,Ze):(n.value=Ze,i.value=null))}function Ve(Ze){!a.customDistance||T.value||(Ze.isDistanceActive=!Ze.isDistanceActive,n.value&&n.value.id!==Ze.id&&(ge(n.value,Ze),n.value&&(n.value.isDistanceActive=!1,n.value.isDistanceSelected=!0)),n.value=Ze.isDistanceActive?Ze:null)}function Ne(){a.customDistance&&(a.customDistance==="players"?(f.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesPlayers,delete Ze.to.activeDistancesPlayers,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.players&&(xe.players=[])}),f.value=[]):a.customDistance==="block"&&(l.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesBlock,delete Ze.to.activeDistancesBlock,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.block&&(xe.block=[])}),l.value=[]),u.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),w.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),n.value=null,i.value=null,T.value=null,Ce())}function Ue(Ze){if(!(T.value&&T.value.id!==Ze.id))if(!Ze.isCandidateToDelete)T.value=Ze,Ze.isCandidateToDelete=!0,Ze.from.isCandidateToDelete=!0,Ze.to.isCandidateToDelete=!0;else{const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null,Oe=Ze.from.type!=="line"?Ze.from:Ze.to.type!=="line"?Ze.to:null;if(xe&&Oe){const Fe=xe[a.customDistance];Fe&&(xe[a.customDistance]=Fe.filter(We=>We.id!==Oe.id))}a.customDistance==="players"?f.value=f.value.filter(Fe=>Fe.id!==Ze.id):a.customDistance==="block"&&(l.value=l.value.filter(Fe=>Fe.id!==Ze.id)),Ze.from.isDistanceActive=!1,Ze.from.isCandidateToDelete=!1,Ze.from.isDistanceCandidate=!1,Ze.to.isDistanceActive=!1,Ze.to.isCandidateToDelete=!1,Ze.to.isDistanceCandidate=!1,Ze.isCandidateToDelete=!1,T.value=null,Ze.from[B.value]=Ze.from[B.value].filter(Fe=>Fe!==Ze.id),Ze.to[B.value]=Ze.to[B.value].filter(Fe=>Fe!==Ze.id),Ze.from.isDistanceSelected=Ze.from[B.value].length>0,Ze.to.isDistanceSelected=Ze.to[B.value].length>0,A.value=null,Ce()}}function Xe(){T.value&&(T.value.isCandidateToDelete=!1,T.value.from.isCandidateToDelete=!1,T.value.to.isCandidateToDelete=!1,T.value=null)}return t.onMounted(()=>{document.addEventListener("click",Xe)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",Xe)}),o({setConnections:me,clearCustomDistances:Ne}),(Ze,xe)=>(t.openBlock(),t.createElementBlock("div",{class:"soccer-field",style:t.normalizeStyle(S.value)},[b.value.show?(t.openBlock(),t.createBlock(Fmt,{key:`tooltip-${b.value.player.id}`,show:b.value.show,player:b.value.player,x:b.value.x,y:b.value.y,ref_key:"tooltipBoxRef",ref:d},null,8,["show","player","x","y"])):t.createCommentVNode("",!0),t.createElementVNode("div",Rmt,[t.createElementVNode("div",Vmt,[a.isDataLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",jmt,[...xe[1]||(xe[1]=[t.createElementVNode("div",{class:"loading-spinner-small"},"⚡",-1),t.createElementVNode("span",null,"Calculando posiciones...",-1)])])),t.createElementVNode("div",Umt,[(t.openBlock(),t.createElementBlock("svg",Gmt,[xe[2]||(xe[2]=t.createStaticVNode('<defs data-v-2aa801ce><marker id="arrow-left-home" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#33E4FF" data-v-2aa801ce></path></marker><marker id="arrow-right-home" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#33E4FF" data-v-2aa801ce></path></marker><marker id="arrow-left-away" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#CBEE6B" data-v-2aa801ce></path></marker><marker id="arrow-right-away" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#CBEE6B" data-v-2aa801ce></path></marker></defs>',1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,Oe=>(t.openBlock(),t.createElementBlock("path",{key:Oe.id,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#4AC9FF","stroke-width":"3","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:Oe.isDistanceActive||Oe.isDistanceCandidate||Oe[e.customDistance].some(Fe=>Fe&&Fe.isVisible)?1:0,class:"distance-line",onMouseover:Fe=>Me(Oe),onMouseout:Fe=>Re(Oe),onClick:t.withModifiers(Fe=>we(Oe),["prevent","stop"])},null,40,Hmt))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ie.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("g",{key:`cc-${Fe}`},[Oe.left?(t.openBlock(),t.createElementBlock("path",{key:0,id:`pl-${Fe}`,d:`M ${Oe.left.x1} ${Oe.left.y1} L ${Oe.left.x2} ${Oe.left.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.left),"stroke-width":ne(Oe.left)})},null,12,Zmt)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("path",{key:1,id:`pr-${Fe}`,d:`M ${Oe.right.x1} ${Oe.right.y1} L ${Oe.right.x2} ${Oe.right.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.right),"stroke-width":ne(Oe.right)})},null,12,Wmt)):t.createCommentVNode("",!0),Oe.left?(t.openBlock(),t.createElementBlock("text",{key:2,style:t.normalizeStyle({fill:ke.value(Oe.left),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.left),"stroke-width":ne(Oe.left)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pl-${Fe}`,startOffset:"40%"},"➤",8,Xmt)],4)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("text",{key:3,style:t.normalizeStyle({fill:ke.value(Oe.right),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.right),"stroke-width":ne(Oe.right)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pr-${Fe}`,startOffset:"40%"},"➤",8,qmt)],4)):t.createCommentVNode("",!0)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe,!0),stroke:"#fff",opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},null,10,Ymt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe,!0),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},t.toDisplayString(Oe.number),11,Jmt)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id,style:t.normalizeStyle({opacity:E(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.isVisible}),onMouseenter:Fe=>Pe(Fe,Oe),onMouseleave:Fe=>Be(Oe),onClick:t.withModifiers(Fe=>Ve(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe),stroke:ve.value(Oe),opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,Kmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.number),13,Qmt)],46,$mt))),128)),e.isDistanceVisible&&V.value?(t.openBlock(),t.createElementBlock("g",e1t,[t.createElementVNode("rect",{width:`${h.value.maximumX-h.value.minimumX}`,height:"24",x:h.value.minimumX,y:"5",rx:"0",ry:"0",fill:"#20539F"},null,8,t1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:h.value.minimumX,y1:"16",x2:h.value.maximumX,y2:"16","marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,a1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,r1t),t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,n1t),t.createElementVNode("text",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2,y:"18","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((h.value.maximumX-h.value.minimumX)*y.value).toFixed(0))+" m ",9,i1t)]),t.createElementVNode("rect",{width:24,height:`${h.value.maximumY-h.value.minimumY}`,x:"15",y:h.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,o1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"25",y1:h.value.minimumY,x2:"25",y2:h.value.maximumY,"marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,s1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,l1t),t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,c1t),t.createElementVNode("text",{x:"24",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((h.value.maximumY-h.value.minimumY)*x.value).toFixed(0))+" m ",9,u1t)])])):t.createCommentVNode("",!0),e.isDistanceVisible&&G.value?(t.openBlock(),t.createElementBlock("g",d1t,[t.createElementVNode("rect",{width:`${m.value.maximumX-m.value.minimumX}`,height:"24",x:m.value.minimumX,y:"368",rx:"0",ry:"0",fill:"#20539F"},null,8,h1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:m.value.minimumX,y1:"379",x2:m.value.maximumX,y2:"379","marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,p1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,f1t),t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,m1t),t.createElementVNode("text",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2,y:"381","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((m.value.maximumX-m.value.minimumX)*y.value).toFixed(0))+" m ",9,g1t)]),t.createElementVNode("rect",{width:24,height:`${m.value.maximumY-m.value.minimumY}`,x:"578",y:m.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,y1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"588",y1:m.value.minimumY,x2:"588",y2:m.value.maximumY,"marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,v1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,b1t),t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,x1t),t.createElementVNode("text",{x:"586",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((m.value.maximumY-m.value.minimumY)*x.value).toFixed(0))+" m ",9,_1t)])])):t.createCommentVNode("",!0),n.value&&i.value?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M ${n.value.leftRaw||i.value.leftRaw} ${n.value.topRaw||i.value.topRaw} L ${i.value.leftRaw||n.value.leftRaw} ${i.value.topRaw||n.value.topRaw}`,style:{stroke:"#44E3E7","stroke-width":2}},null,8,w1t)):t.createCommentVNode("",!0),e.customDistance&&e.customDistance==="block"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.isAwayTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${m.value.minimumX} ${m.value.minimumY}H${m.value.maximumX}V${m.value.maximumY}H${m.value.minimumX}`,fill:"#CBEE6B","fill-opacity":"0.4"},null,8,k1t)):t.createCommentVNode("",!0),e.isHomeTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${h.value.minimumX} ${h.value.minimumY}H${h.value.maximumX}V${h.value.maximumY}H${h.value.minimumX}`,fill:"#33C9FF","fill-opacity":"0.4"},null,8,S1t)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("path",{key:`bloc-boundary-${Fe}`,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#33E4FF","stroke-width":"4","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:(Oe.isDistanceActive||Oe.isDistanceCandidate||Oe.isDistanceSelected)&&Oe.isVisible?1:0,onMouseover:We=>Me(Oe),onMouseout:We=>Re(Oe),onClick:t.withModifiers(We=>we(Oe),["prevent","stop"])},null,40,T1t))),128))],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`active-distance-${Fe}`},[Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("line",{key:0,style:t.normalizeStyle({stroke:Oe.isCandidateToDelete?"#F7A138":"#38F3F7","stroke-width":2,opacity:L(Oe)}),"stroke-dasharray":"2,2",x1:Oe.fromLineLeft,y1:Oe.fromLineTop,x2:Oe.toLineLeft,y2:Oe.toLineTop},null,12,C1t)):t.createCommentVNode("",!0),Oe.from.team?(t.openBlock(),t.createElementBlock("g",{key:1,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.from.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.from)},onMouseleave:We=>{I(),Be(Oe.from)},onClick:t.withModifiers(We=>Ve(Oe.from),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.from.leftRaw,y:Oe.from.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.from.is_titular?2:1,fill:ye.value(Oe.from),stroke:ve.value(Oe.from),opacity:Oe.from.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,A1t),t.createElementVNode("text",{x:Oe.from.leftRaw,y:Oe.from.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.from),opacity:Oe.from.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.from.number),13,M1t)],46,E1t)):t.createCommentVNode("",!0),Oe.to.team?(t.openBlock(),t.createElementBlock("g",{key:2,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.to.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.to)},onMouseleave:We=>{I(),Be(Oe.to)},onClick:t.withModifiers(We=>Ve(Oe.to),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.to.leftRaw,y:Oe.to.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.to.is_titular?2:1,fill:ye.value(Oe.to),stroke:ve.value(Oe.to),opacity:Oe.to.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,I1t),t.createElementVNode("text",{x:Oe.to.leftRaw,y:Oe.to.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.to),opacity:Oe.to.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.to.number),13,L1t)],46,P1t)):t.createCommentVNode("",!0),Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("g",{key:3,class:"is-pointer",onMouseenter:We=>C(Oe),onMouseleave:xe[0]||(xe[0]=We=>I()),onClick:t.withModifiers(We=>Ue(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,style:t.normalizeStyle({opacity:L(Oe)}),width:"48",height:"23",rx:"11.5979",stroke:Oe.isCandidateToDelete?"#F7A138":"#44E3E7","stroke-width":"2"},null,12,O1t),t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,width:"48",height:"23",rx:"11.5979",style:t.normalizeStyle({opacity:L(Oe)}),fill:Oe.isCandidateToDelete?"#F7A138":"#264F8C","fill-opacity":"1"},null,12,z1t),t.createElementVNode("text",{x:Oe.lineLabelLeft,y:Oe.lineLabelTop+1,"text-anchor":"middle","dominant-baseline":"middle","font-size":"13",fill:"white",style:t.normalizeStyle({opacity:L(Oe)})},t.toDisplayString(Oe.isCandidateToDelete?"X":`${Oe.distanceInMeters} m`),13,N1t)],40,B1t)):t.createCommentVNode("",!0)],64))),128))]))])])])],4))}},V1t=du(R1t,[["__scopeId","data-v-2aa801ce"]]),j1t={class:"filters-container"},U1t={class:"events-section"},G1t={class:"section-header"},H1t={class:"all-toggle"},Z1t={class:"events-list"},W1t={class:"events-section"},X1t={class:"section-header"},q1t={class:"events-list"},Y1t={__name:"FilterEvents",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["update-start-event","update-end-event","toggle-all-start-events","toggle-all-end-events"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",j1t,[t.createElementVNode("div",U1t,[t.createElementVNode("div",G1t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",H1t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",Z1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",W1t,[t.createElementVNode("div",X1t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",q1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},EV=du(Y1t,[["__scopeId","data-v-4a62a51c"]]),J1t={class:"side-filters"},$1t={class:"team-switch-container"},K1t={class:"team-switch team-switch-toggle"},Q1t={class:"team-content"},egt=["src"],tgt={class:"team-label"},agt={class:"team-content"},rgt={class:"team-label"},ngt=["src"],igt={class:"team-visible-checkbox"},ogt={class:"checkbox-container"},sgt=["checked"],lgt=["checked"],cgt={class:"side-filters__tabs"},ugt={class:"tabs-container"},dgt={class:"side-filters__content"},hgt={__name:"SideFilters",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultChainsFilters:{type:Object,default:()=>({})},homeTeamId:{type:Number,default:1},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},awayTeamId:{type:Number,default:5},gameId:{type:Number,default:88247},players:{type:Array,default:()=>[]},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},game:{type:Object,default:()=>({})}},emits:["home-chains-filtered","away-chains-filtered","home-ball-zones-filtered","away-ball-zones-filtered","home-stats-updated","away-stats-updated","selected-team-tab","home-team-visibility","away-team-visibility","update:isHomeTeamVisible","update:isAwayTeamVisible"],setup(e,{emit:o}){const s=e,z=t.ref("chains"),W=t.ref(!0),{selectedStartCategories:v,selectedEndCategories:g,isDataLoaded:r,loadInitialData:b,getFilteredData:d}=wV(s.gameId),a=t.ref({...s.defaultChainsFilters}),_=t.ref({...s.defaultChainsFilters}),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(structuredClone(s.startedCategories)),n=t.ref(structuredClone(s.endedCategories)),i=t.ref(!0),f=t.ref(!0),l=t.ref(!0),h=t.ref(!0),m=t.ref(s.homeTeamId),w=o,T=U=>{const J=U===s.homeTeamId?a.value:_.value,re={startCategories:J.startCategories,endCategories:J.endCategories,teamId:J.possessionTeamId,minDuration:J.durationRange.min,maxDuration:J.durationRange.max,excludedFirstSeconds:J.excludedFirstSeconds,excludedLastSeconds:J.excludedLastSeconds,chainInitialZones:J.chainInitialZones,chainFinalZones:J.chainFinalZones,ballInterestZones:J.ballInterestZones,timeFromTimeline:s.timeFromTimeline},q=d(re);q&&(U===s.homeTeamId?(w("home-chains-filtered",q.chains,U),w("home-ball-zones-filtered",re.ballInterestZones,U),w("home-stats-updated",q.stats,U)):(w("away-chains-filtered",q.chains,U),w("away-ball-zones-filtered",re.ballInterestZones,U),w("away-stats-updated",q.stats,U)))},A=U=>{const J=m.value===s.homeTeamId?a.value:_.value;switch(U){case"home":J.possessionTeamId=s.homeTeamId;break;case"away":J.possessionTeamId=s.awayTeamId;break;case"both":J.possessionTeamId=null;break}T(m.value)},C=(U,J)=>{const re=m.value===s.homeTeamId?a.value:_.value;U==="less-than"?re.durationRange={min:null,max:J}:re.durationRange={min:J,max:null},T(m.value)};function I(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?y.value:u.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.startCategories.includes(J.id)||re.startCategories.push(J.id):re.startCategories=re.startCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?i.value=re.startCategories.length===y.value.length:l.value=re.startCategories.length===u.value.length,T(m.value)}function L(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?x.value:n.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.endCategories.includes(J.id)||re.endCategories.push(J.id):re.endCategories=re.endCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?f.value=re.endCategories.length===x.value.length:h.value=re.endCategories.length===n.value.length,T(m.value)}const E=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?y.value:u.value;re.forEach(q=>q.isSelected=U),U?J.startCategories=re.map(q=>q.id):J.startCategories=[],m.value===s.homeTeamId?i.value=U:l.value=U,T(m.value)},P=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?x.value:n.value;re.forEach(q=>q.isSelected=U),U?J.endCategories=re.map(q=>q.id):J.endCategories=[],m.value===s.homeTeamId?f.value=U:h.value=U,T(m.value)},M=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedFirstSeconds=U,T(m.value)},S=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedLastSeconds=U,T(m.value)},B=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainInitialZones=U,T(m.value)},k=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainFinalZones=U,T(m.value)},O=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.ballInterestZones=U,T(m.value)},D=v,V=g;t.watch(()=>r.value,async U=>{U||(await b(),W.value?(T(s.homeTeamId),T(s.awayTeamId),W.value=!1):T(m.value))},{immediate:!0}),t.watch(()=>s.timeFromTimeline,()=>{T(s.homeTeamId),T(s.awayTeamId)},{immediate:!1});const G=t.computed(()=>s.startedCategories.length>0?m.value===s.homeTeamId?y.value:u.value:[]),H=t.computed(()=>s.endedCategories.length>0?m.value===s.homeTeamId?x.value:n.value:[]);return t.watch([D,V],()=>{D.value.length===0&&(D.value=G.value.map(U=>U.id)),V.value.length===0&&(V.value=H.value.map(U=>U.id))},{immediate:!0}),t.watch([m],([U])=>{w("selected-team-tab",U)},{immediate:!0}),(U,J)=>(t.openBlock(),t.createElementBlock("div",J1t,[t.createElementVNode("div",$1t,[t.createElementVNode("div",K1t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:m.value===s.homeTeamId?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.homeTeamId}]),onClick:J[0]||(J[0]=re=>m.value=s.homeTeamId),type:"button"},[t.createElementVNode("span",Q1t,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.homeTeamId}.png`,alt:"Escudo local",class:"team-logo"},null,8,egt),t.createElementVNode("span",tgt,t.toDisplayString(e.nameHomeTeam),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.awayTeamId}]),onClick:J[1]||(J[1]=re=>m.value=s.awayTeamId),type:"button"},[t.createElementVNode("span",agt,[t.createElementVNode("span",rgt,t.toDisplayString(e.nameAwayTeam),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.awayTeamId}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,ngt)])],2)])]),t.createElementVNode("div",igt,[t.createElementVNode("div",ogt,[t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isHomeTeamVisible,onChange:J[2]||(J[2]=re=>w("update:isHomeTeamVisible",re.target.checked))},null,40,sgt),J[7]||(J[7]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameHomeTeam)+" visible",1)],512),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isAwayTeamVisible,onChange:J[3]||(J[3]=re=>w("update:isAwayTeamVisible",re.target.checked))},null,40,lgt),J[8]||(J[8]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameAwayTeam)+" visible",1)],512),[[t.vShow,m.value===s.awayTeamId]])])]),t.createElementVNode("div",cgt,[t.createElementVNode("div",ugt,[t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="chains"}]),onClick:J[4]||(J[4]=re=>z.value="chains")}," Filtros ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="events"}]),onClick:J[5]||(J[5]=re=>z.value="events")}," Eventos ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="players"}]),onClick:J[6]||(J[6]=re=>z.value="players")}," Jugadores ",2)])]),t.createElementVNode("div",dgt,[t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(T5,{"team-id":s.homeTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(T5,{"team-id":s.awayTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="chains"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(EV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(EV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":l.value,"all-end-events-selected":h.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="events"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.homeTeamId)},null,8,["players"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.awayTeamId)},null,8,["players"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="players"]])])]))}},pgt=du(hgt,[["__scopeId","data-v-c043c4cf"]]),fgt={class:"team team-left"},mgt={class:"team-header"},ggt={class:"team-logo",style:{"margin-left":"-7px"}},ygt=["src","alt"],vgt={class:"team team-right"},bgt={class:"team-header"},xgt={class:"team-logo",style:{"margin-right":"4px"}},_gt=["src","alt"],wgt={class:"roles-section"},kgt={class:"role-label local"},Sgt={class:"team-logo small"},Tgt=["src","alt"],Cgt={class:"role-details"},Egt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Agt=["opacity"],Mgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Pgt=["opacity"],Igt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"43px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Lgt={class:"role-label visitante"},Bgt={class:"team-logo small"},Ogt=["src","alt"],zgt={class:"role-details"},Ngt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Dgt=["opacity"],Fgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rgt=["opacity"],Vgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"46px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},jgt={__name:"LabelsTool",props:{game:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},players:{type:Array,default:()=>[]},showPases:{type:Boolean,default:!1},showDistancia:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},isDeleteVisible:{type:Boolean,default:!1}},emits:["update:isHomeTeamVisible","update:isAwayTeamVisible","delete-distances"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(s.isHomeTeamVisible),v=t.ref(s.isAwayTeamVisible),g=t.ref({local:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows},visitante:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows}}),r=t.computed(()=>({"--grid-template-columns":s.isMobile?"40px 1fr":"80px 1fr"})),b=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.homeTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isHomeTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isHomeTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}}),d=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.awayTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isAwayTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isAwayTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}});t.watch(()=>s.players,()=>{g.value.local.titular=b.value.selectedTitulares>0&&s.isHomeTeamVisible,g.value.local.cambios=b.value.selectedCambios>0&&s.isHomeTeamVisible,g.value.visitante.titular=d.value.selectedTitulares>0&&s.isAwayTeamVisible,g.value.visitante.cambios=d.value.selectedCambios>0&&s.isAwayTeamVisible},{deep:!0,immediate:!0}),t.watch(()=>s.showPases,_=>{g.value.local.pases=_&&s.isHomeTeamVisible,g.value.visitante.pases=_&&s.isAwayTeamVisible}),t.watch(()=>s.showDistancia,_=>{g.value.local.distancia=_&&s.isHomeTeamVisible,g.value.visitante.distancia=_&&s.isAwayTeamVisible}),t.watch(()=>s.showShadows,_=>{g.value.local.shadows=_&&s.isHomeTeamVisible,g.value.visitante.shadows=_&&s.isAwayTeamVisible},{immediate:!0}),t.watch(()=>s.isHomeTeamVisible,_=>{W.value=_,g.value.local.pases=s.showPases&&_,g.value.local.distancia=s.showDistancia&&_,g.value.local.shadows=s.showShadows&&_,g.value.local.titular=b.value.selectedTitulares>0&&_,g.value.local.cambios=b.value.selectedCambios>0&&_}),t.watch(()=>s.isAwayTeamVisible,_=>{v.value=_,g.value.visitante.pases=s.showPases&&_,g.value.visitante.distancia=s.showDistancia&&_,g.value.visitante.shadows=s.showShadows&&_,g.value.visitante.titular=d.value.selectedTitulares>0&&_,g.value.visitante.cambios=d.value.selectedCambios>0&&_}),t.watch(W,_=>{z("update:isHomeTeamVisible",_)}),t.watch(v,_=>{z("update:isAwayTeamVisible",_)});function a(){z("delete-distances")}return(_,y)=>(t.openBlock(),t.createElementBlock("div",{class:"labels-tool",style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:"teams-header",style:t.normalizeStyle(e.isMobile?"gap:0px":"")},[t.createElementVNode("div",fgt,[t.createElementVNode("div",mgt,[t.createVNode(t.unref(pp),{modelValue:W.value,"onUpdate:modelValue":y[0]||(y[0]=x=>W.value=x)},null,8,["modelValue"]),t.createElementVNode("div",ggt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,ygt)]),t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.homeTeam.colloquial_name),5),y[2]||(y[2]=t.createElementVNode("div",{class:"home-arrow"},[t.createElementVNode("svg",{width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M88.499 2.88087L83.499 5.76759L83.499 3.38087L6.11719 3.38086C5.88303 4.61447 4.80077 5.54785 3.49902 5.54785C2.02626 5.54785 0.832031 4.35362 0.832031 2.88086C0.832031 1.4081 2.02626 0.213867 3.49902 0.213867C4.80077 0.213868 5.88303 1.14725 6.11719 2.38086L83.499 2.38087L83.499 -0.00585215L88.499 2.88087Z",fill:"#336DFF"})])],-1))]),y[3]||(y[3]=t.createElementVNode("div",{class:"team-arrow blue"},null,-1))]),e.isDeleteVisible?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:"delete-button",onClick:a},[...y[4]||(y[4]=[t.createElementVNode("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10.549.91v.957h4.487v1.628h-.897v12.588c0 .472-.177.924-.488 1.256-.31.33-.73.514-1.164.514H3.513c-.435 0-.854-.183-1.164-.514a1.839 1.839 0 0 1-.488-1.256V3.495H.964V1.867H5.45V.91h5.098zm-7.18 15.316h9.262V3.495H3.369v12.731zm7.18-10.53v8.328H9.04V5.696h1.508zm-3.59 0v8.328H5.451V5.696H6.96z",fill:"#fff",stroke:"#2E3B46","stroke-width":".287"})],-1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",vgt,[t.createElementVNode("div",bgt,[t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.awayTeam.colloquial_name),5),t.createElementVNode("div",xgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,_gt)]),t.createVNode(t.unref(pp),{modelValue:v.value,"onUpdate:modelValue":y[1]||(y[1]=x=>v.value=x)},null,8,["modelValue"]),y[5]||(y[5]=t.createElementVNode("div",{class:"away-arrow"},[t.createElementVNode("svg",{class:"arrow-svg right",width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.500977 2.88087L5.50098 5.76759L5.50098 3.38087L82.8828 3.38086C83.117 4.61447 84.1992 5.54785 85.501 5.54785C86.9737 5.54785 88.168 4.35362 88.168 2.88086C88.168 1.4081 86.9737 0.213867 85.501 0.213867C84.1992 0.213868 83.117 1.14725 82.8828 2.38086L5.50098 2.38087L5.50098 -0.00585215L0.500977 2.88087Z",fill:"#CBEE6B"})])],-1))]),y[6]||(y[6]=t.createElementVNode("div",{class:"team-arrow green"},null,-1))])],4),t.createElementVNode("div",wgt,[t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",kgt,[t.createElementVNode("div",Sgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,Tgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"L":"LOCAL"),5)]),t.createElementVNode("div",Cgt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle blue",{inactive:!g.value.local.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle blue-substitution substitution-circle",{inactive:!g.value.local.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow blue",{inactive:!g.value.local.pases}])},[(t.openBlock(),t.createElementBlock("svg",Egt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#6891F8",opacity:g.value.local.pases?1:.4},null,8,Agt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Mgt,[t.createElementVNode("path",{d:"M12.5419 10.752C12.2528 11.041 11.7842 11.0411 11.4951 10.752C11.206 10.4629 11.2061 9.99424 11.4951 9.70509L15.3974 5.80275L15.3974 5.23048L11.4951 1.32814C11.2061 1.03899 11.206 0.570355 11.4951 0.281262C11.7842 -0.00783105 12.2528 -0.00774079 12.5419 0.281262L17.2538 4.99318C17.543 5.28231 17.543 5.75091 17.2538 6.04005L12.5419 10.752ZM10.0634 6.25685L10.0634 4.77638L12.7304 4.77638L12.7304 6.25685L10.0634 6.25685ZM4.73041 6.25685L4.73041 4.77638L7.3974 4.77638L7.3974 6.25685L4.73041 6.25685ZM0.730411 6.25685L0.654239 6.25294C0.281131 6.2148 -0.00982329 5.89979 -0.00982332 5.51661C-0.00982336 5.13344 0.281131 4.81843 0.654239 4.78029L0.730411 4.77638L2.06342 4.77638L2.06342 6.25685L0.730411 6.25685Z",fill:"#33E4FF",opacity:g.value.local.distancia?1:.4},null,8,Pgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.local.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Igt)):t.createCommentVNode("",!0)],6),t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Lgt,[t.createElementVNode("div",Bgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,Ogt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"V":"VISITANTE"),5)]),t.createElementVNode("div",zgt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle green",{inactive:!g.value.visitante.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle green-substitution substitution-circle",{inactive:!g.value.visitante.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow green",{inactive:!g.value.visitante.pases}])},[(t.openBlock(),t.createElementBlock("svg",Ngt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#CBEE6B",opacity:g.value.visitante.pases?1:.4},null,8,Dgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Fgt,[t.createElementVNode("path",{d:"M12.5419 11.252C12.2528 11.541 11.7842 11.5411 11.4951 11.252C11.206 10.9629 11.2061 10.4942 11.4951 10.2051L15.3974 6.30275L15.3974 5.73048L11.4951 1.82814C11.2061 1.53899 11.206 1.07035 11.4951 0.781262C11.7842 0.492169 12.2528 0.492259 12.5419 0.781262L17.2538 5.49318C17.543 5.78231 17.543 6.25091 17.2538 6.54005L12.5419 11.252ZM10.0634 6.75685L10.0634 5.27638L12.7304 5.27638L12.7304 6.75685L10.0634 6.75685ZM4.73041 6.75685L4.73041 5.27638L7.3974 5.27638L7.3974 6.75685L4.73041 6.75685ZM0.730411 6.75685L0.654239 6.75294C0.281131 6.7148 -0.00982329 6.39979 -0.00982332 6.01661C-0.00982336 5.63344 0.281131 5.31843 0.654239 5.28029L0.730411 5.27638L2.06342 5.27638L2.06342 6.75685L0.730411 6.75685Z",fill:"#CBEE6B",opacity:g.value.visitante.distancia?1:.4},null,8,Rgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.visitante.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Vgt)):t.createCommentVNode("",!0)],6)])],4))}},Ugt=du(jgt,[["__scopeId","data-v-8ecea783"]]),Ggt={__name:"ModalConfirm",props:{isVisible:{type:Boolean,default:!1}},emits:["close","delete"],setup(e,{emit:o}){const s=o;function z(){s("close")}function W(){s("delete"),z()}return(v,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:z},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:g[0]||(g[0]=t.withModifiers(()=>{},["stop"]))},[g[1]||(g[1]=t.createElementVNode("div",{class:"header"},[t.createElementVNode("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.904.116v.779h3.646v1.322h-.729v10.227c0 .384-.144.751-.396 1.02a1.297 1.297 0 0 1-.946.42H2.188c-.354 0-.695-.15-.947-.42a1.494 1.494 0 0 1-.395-1.02V2.217h-.73V.895h3.647V.116h4.141zM2.071 12.562h7.525V2.216H2.07v10.345zm5.833-8.556v6.767H6.68V4.006h1.225zm-2.917 0v6.767H3.763V4.006h1.224z",fill:"#fff",stroke:"#2E3B46","stroke-width":".233"})]),t.createElementVNode("div",null," Eliminar distancias ")],-1)),g[2]||(g[2]=t.createElementVNode("div",{class:"body"}," ¿Seguro que desea eliminar las distancias personalizadas? ",-1)),t.createElementVNode("div",{class:"footer"},[t.createElementVNode("div",{class:"cancel-button is-pointer",onClick:z}," Cancelar "),t.createElementVNode("div",{role:"button",class:"delete-button is-pointer",onClick:W}," Eliminar ")])],512)])):t.createCommentVNode("",!0)]),_:1})])),g[3]||(g[3]=t.createElementVNode("div",null,null,-1))],64))}},Hgt=du(Ggt,[["__scopeId","data-v-9d263082"]]),Zgt=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Wgt={class:"positions-container__body"},Xgt={class:"positions-container__filters"},qgt={class:"main-content"},Ygt={class:"left-content"},Jgt={class:"labels-tool-container"},$gt={class:"right-content"},Kgt={class:"timeline-container"},Qgt={__name:"GSC-PositionsAndConnections",props:{game:{type:Object,default:()=>({gameId:88247,homeTeam:{team_id:1,name:"Chivas"},awayTeam:{team_id:5,name:"Cruz Azul"}})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const o=e,{endedCategories:s,startedCategories:z,loadGameData:W,isDataLoaded:v}=kV(),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref([]),a=t.ref([]),_=t.ref([]),y=t.ref([]),x=t.ref([]),u=t.ref([]),n=t.ref({}),i=t.ref({}),f=t.ref({}),l=t.ref([]),h=t.ref([]),m=t.ref(o.game.homeTeam.team_id),w=t.ref(new Map),T=t.ref(new Map),A=t.ref([]),C=t.ref(!1),I=t.ref(!1),L=t.ref(!1),E=t.ref({originSections:[],destinationSections:[],distanceRange:{minValue:5,maxValue:30},isSelected:!1}),P=t.ref(!1),M=t.ref(!0),S=t.ref(!0),B=t.ref({startCategories:[1,2,3,4,5],endCategories:[1,2,3],durationRange:{min:1,max:null},possessionTeamId:null,excludedFirstSeconds:0,excludedLastSeconds:200,chainInitialZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],chainFinalZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],ballInterestZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],timeFromTimeline:{}}),k=t.ref(null),O=t.ref(!1),D=t.ref({blockDistancesTotal:0,passDistancesTotal:0}),V=t.computed(()=>k.value==="block"&&D.value.blockDistancesTotal>0||k.value==="players"&&D.value.playerDistancesTotal>0),G=t.computed(()=>w.value.size?w.value.get(m.value)||[]:[]),H=t.computed(()=>{const we=w.value.get(o.game.homeTeam.team_id)||[],Ve=w.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),U=t.computed(()=>{const we=T.value.get(o.game.homeTeam.team_id)||[],Ve=T.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),J=t.computed(()=>({homeTeam:w.value.get(o.game.homeTeam.team_id)||[],awayTeam:w.value.get(o.game.awayTeam.team_id)||[]})),re=t.computed(()=>H.value.filter(we=>we.isSelected).map(we=>we.player_id)),q=t.computed(()=>U.value.filter(we=>we.isSelected).map(we=>we.player_id));let ae=null;const ee=t.ref(null),$=t.ref(0);function Q(){ee.value&&(ae=new ResizeObserver(we=>{for(const Ve of we)Ve.contentRect.width!==$.value&&($.value=Ve.contentRect.width)}),ae.observe(ee.value))}t.onMounted(async()=>{await W(o.game.gameId),Q()});const ce=t.computed(()=>$.value<560);t.watch(()=>$.value,we=>{},{immediate:!0}),t.watch(()=>o.game.gameId,async we=>{we&&(Cp.resetCache(),await W(we),await ie(),await me())},{immediate:!0});function de(we,Ve){Ve===o.game.homeTeam.team_id?r.value=we:b.value=we}function he(we,Ve){Ve===o.game.homeTeam.team_id?d.value=we:a.value=we}function pe(we,Ve){Ve===o.game.homeTeam.team_id?l.value=we:h.value=we}async function ne(we){try{return(await(await fetch(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/v2/players/games/${we}`,{headers:{Authorization:o.token}})).json()).players||[]}catch(Ve){console.error("Error fetching players:",Ve)}}async function le(we){try{const Ve=await(await fetch(`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/connections/${we}`,{headers:{Authorization:o.token}})).json();return Ve.data&&Ve.headers?Ve.data.reduce((Ne,Ue)=>(Ne.push(Ue.reduce((Xe,Ze,xe)=>(Xe[Ve.headers[xe]]=Ze,Xe),{})),Ne),[]):[]}catch(Ve){console.error("Error fetching game connections:",Ve)}}async function ie(){try{const we=await ne(o.game.gameId);o.game.homeTeam&&o.game.awayTeam&&(w.value.clear(),w.value.set(o.game.homeTeam.team_id,[]),w.value.set(o.game.awayTeam.team_id,[]),T.value.clear(),T.value.set(o.game.homeTeam.team_id,[]),T.value.set(o.game.awayTeam.team_id,[]),we.forEach(Ve=>{if(Ve.positionName=Zgt.get(Ve.position_id),Ve.team_id===o.game.homeTeam.team_id){const Ne=w.value.get(o.game.homeTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.homeTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}else if(Ve.team_id===o.game.awayTeam.team_id){const Ne=w.value.get(o.game.awayTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.awayTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}}))}catch(we){console.error("Error filling game players:",we)}}async function me(){try{const we=await le(o.game.gameId);we&&we.length>0?A.value=we:A.value=[]}catch(we){console.error("Error filling game passes:",we)}}function ve(we){if(we.isSelected){if(E.value.isSelected=we.isSelected,C.value=!0,JSON.stringify(we.originSections)!==JSON.stringify(E.value.originSections)||JSON.stringify(we.destinationSections)!==JSON.stringify(E.value.destinationSections)||JSON.stringify(we.distanceRange)!==JSON.stringify(E.value.distanceRange)&&g.value){E.value.originSections=[...we.originSections],E.value.destinationSections=[...we.destinationSections],E.value.distanceRange={...we.distanceRange};const Ve=A.value.filter(Ne=>E.value.originSections.includes(Ne.section_origin)&&E.value.destinationSections.includes(Ne.section_destination)&&Ne.distance>=E.value.distanceRange.minValue&&Ne.distance<=E.value.distanceRange.maxValue).reduce((Ne,Ue)=>{const Xe=`${Ue.player_id}-${Ue.receiver_id}`,Ze=Ne.get(Xe);return Ze?Ze.count+=1:Ne.set(Xe,{to:Ue.receiver_id,from:Ue.player_id,count:1}),Ne},new Map);g.value.setConnections(Array.from(Ve.values()))}}else E.value.isSelected=!1,C.value=!1}function ye(we){P.value=we,I.value=we}function ke(we){k.value=we}function Ee(we){m.value=we}function Te(we){L.value=we}function Pe(we,Ve){Ve===o.game.homeTeam.team_id?_.value=we:y.value=we}function Be(we,Ve){Ve===o.game.homeTeam.team_id?x.value=we:u.value=we}function Le(we){n.value=we}function je(we,Ve){Ve===o.game.homeTeam.team_id?i.value=we:f.value=we}function Me(we,Ve){Ve===o.game.homeTeam.team_id?l.value.totalSeconds=we:h.value.totalSeconds=we}function Re(){O.value=!0}function Ie(){O.value=!1}function ge(){g.value&&g.value.clearCustomDistances()}function Ce(we){D.value=we}return(we,Ve)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Hgt,{"is-visible":O.value,onClose:Ie,onDelete:ge},null,8,["is-visible"]),t.createElementVNode("div",{ref_key:"positionsContainer",ref:ee,class:"positions-container"},[t.createVNode(xmt,{"total-seconds":m.value===e.game.homeTeam.team_id?l.value.totalSeconds:h.value.totalSeconds,"total-chains":m.value===e.game.homeTeam.team_id?l.value.totalChains:h.value.totalChains,"total-duration-chains":m.value===e.game.homeTeam.team_id?l.value.totalDurationChains:h.value.totalDurationChains},null,8,["total-seconds","total-chains","total-duration-chains"]),t.createElementVNode("div",Wgt,[t.createElementVNode("div",Xgt,[t.createVNode(fmt,{game:e.game,token:e.token,players:U.value,"container-width":$.value,"default-shadows-filters":B.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),onChangeConnections:ve,onChangeDistance:ye,onChangeDistanceCustom:ke,onIsShadowsSelected:Te,onHomeChainsShadowsFiltered:he,onAwayChainsShadowsFiltered:he,onHomeBallZonesShadowsFiltered:Be,onAwayBallZonesShadowsFiltered:Be,onHomeRangeChangeShadows:je,onAwayRangeChangeShadows:je},null,8,["game","token","players","container-width","default-shadows-filters","started-categories","ended-categories"])]),t.createElementVNode("main",qgt,[t.createElementVNode("div",Ygt,[t.createVNode(V1t,{ref_key:"soccerField",ref:g,"game-id":e.game.gameId,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"home-filtered-chains":r.value,"away-filtered-chains":b.value,"home-filtered-chains-shadows":d.value,"away-filtered-chains-shadows":a.value,"home-filtered-ball-zones":_.value,"away-filtered-ball-zones":y.value,"home-filtered-ball-zones-shadows":x.value,"away-filtered-ball-zones-shadows":u.value,"time-from-timeline":n.value,"time-from-timeline-shadows-home":i.value,"time-from-timeline-shadows-away":f.value,"show-shadows":L.value,"players-selected":re.value,"players-selected-shadows":q.value,"players-info":J.value,"is-data-loaded":t.unref(v),"are-connections-visible":E.value.isSelected,"is-distance-visible":P.value,"is-home-team-visible":M.value,"is-away-team-visible":S.value,"custom-distance":k.value,onHomePossessionTotalSeconds:Me,onAwayPossessionTotalSeconds:Me,onChangeCustomDistances:Ce},null,8,["game-id","home-team-id","away-team-id","home-filtered-chains","away-filtered-chains","home-filtered-chains-shadows","away-filtered-chains-shadows","home-filtered-ball-zones","away-filtered-ball-zones","home-filtered-ball-zones-shadows","away-filtered-ball-zones-shadows","time-from-timeline","time-from-timeline-shadows-home","time-from-timeline-shadows-away","show-shadows","players-selected","players-selected-shadows","players-info","is-data-loaded","are-connections-visible","is-distance-visible","is-home-team-visible","is-away-team-visible","custom-distance"]),t.createElementVNode("div",Jgt,[t.createVNode(Ugt,{"is-mobile":ce.value,game:e.game,players:H.value,"show-pases":C.value,"show-distancia":I.value,"show-shadows":L.value,"is-delete-visible":V.value,isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[0]||(Ve[0]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[1]||(Ve[1]=Ne=>S.value=Ne),onDeleteDistances:Re},null,8,["is-mobile","game","players","show-pases","show-distancia","show-shadows","is-delete-visible","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",$gt,[t.createVNode(pgt,{game:e.game,players:G.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),"default-chains-filters":B.value,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"name-home-team":e.game.homeTeam.colloquial_name,"name-away-team":e.game.awayTeam.colloquial_name,"game-id":e.game.gameId,"time-from-timeline":n.value,"is-data-loaded":t.unref(v),isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[2]||(Ve[2]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[3]||(Ve[3]=Ne=>S.value=Ne),onHomeChainsFiltered:de,onAwayChainsFiltered:de,onHomeStatsUpdated:pe,onAwayStatsUpdated:pe,onHomeBallZonesFiltered:Pe,onAwayBallZonesFiltered:Pe,onSelectedTeamTab:Ee},null,8,["game","players","started-categories","ended-categories","default-chains-filters","home-team-id","away-team-id","name-home-team","name-away-team","game-id","time-from-timeline","is-data-loaded","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Kgt,[t.createVNode(gV,{"timeline-width":940,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:o.token,onRangeChange:Le},null,8,["game-id","home-team","away-team","token"])])])],512)],64))}},eyt=du(Qgt,[["__scopeId","data-v-c28ec97b"]]),tyt=(e,o)=>{const s=e.__vccOpts||e;for(const[z,W]of o)s[z]=W;return s},ayt={__name:"gsc-positioning",props:{game:{type:Object,default:()=>({})}},setup(e){const o=t.ref(0);let s=null;const z=t.ref(null);function W(){s=new ResizeObserver(v=>{for(const g of v)o.value=g.contentRect.width}),s.observe(z.value)}return t.onMounted(()=>{W()}),t.onBeforeUnmount(()=>{s&&s.disconnect()}),(v,g)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-positioning",ref_key:"positioning",ref:z,style:t.normalizeStyle(o.value<700?"padding: 25px 0":"")},[t.createVNode(t.unref(qut),{game:e.game},null,8,["game"]),t.createVNode(t.unref(eyt),{game:e.game},null,8,["game"])],4))}},ryt=tyt(ayt,[["__scopeId","data-v-60e35461"]]),KYt="",QYt="",nyt={class:"datagame-container"},iyt=$i({__name:"GSCPositining",props:{game:{type:Object,default:()=>({})}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nyt,[t.createVNode(t.unref(ryt),{game:e.game},null,8,["game"])]))}},[["__scopeId","data-v-9a84d21f"]]);function AV(e,o){return function(){return e.apply(o,arguments)}}const{toString:oyt}=Object.prototype,{getPrototypeOf:Qk}=Object,{iterator:D5,toStringTag:MV}=Symbol,F5=(e=>o=>{const s=oyt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Rf=e=>(e=e.toLowerCase(),o=>F5(o)===e),R5=e=>o=>typeof o===e,{isArray:u2}=Array,d2=R5("undefined");function nb(e){return e!==null&&!d2(e)&&e.constructor!==null&&!d2(e.constructor)&&gp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const PV=Rf("ArrayBuffer");function syt(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&PV(e.buffer),o}const lyt=R5("string"),gp=R5("function"),IV=R5("number"),ib=e=>e!==null&&typeof e=="object",cyt=e=>e===!0||e===!1,V5=e=>{if(F5(e)!=="object")return!1;const o=Qk(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(MV in e)&&!(D5 in e)},uyt=e=>{if(!ib(e)||nb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dyt=Rf("Date"),hyt=Rf("File"),pyt=e=>!!(e&&typeof e.uri<"u"),fyt=e=>e&&typeof e.getParts<"u",myt=Rf("Blob"),gyt=Rf("FileList"),yyt=e=>ib(e)&&gp(e.pipe);function vyt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const LV=vyt(),BV=typeof LV.FormData<"u"?LV.FormData:void 0,byt=e=>{let o;return e&&(BV&&e instanceof BV||gp(e.append)&&((o=F5(e))==="formdata"||o==="object"&&gp(e.toString)&&e.toString()==="[object FormData]"))},xyt=Rf("URLSearchParams"),[_yt,wyt,kyt,Syt]=["ReadableStream","Request","Response","Headers"].map(Rf),Tyt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ob(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let z,W;if(typeof e!="object"&&(e=[e]),u2(e))for(z=0,W=e.length;z<W;z++)o.call(null,e[z],z,e);else{if(nb(e))return;const v=s?Object.getOwnPropertyNames(e):Object.keys(e),g=v.length;let r;for(z=0;z<g;z++)r=v[z],o.call(null,e[r],r,e)}}function OV(e,o){if(nb(e))return null;o=o.toLowerCase();const s=Object.keys(e);let z=s.length,W;for(;z-- >0;)if(W=s[z],o===W.toLowerCase())return W;return null}const rg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zV=e=>!d2(e)&&e!==rg;function eS(){const{caseless:e,skipUndefined:o}=zV(this)&&this||{},s={},z=(W,v)=>{if(v==="__proto__"||v==="constructor"||v==="prototype")return;const g=e&&OV(s,v)||v;V5(s[g])&&V5(W)?s[g]=eS(s[g],W):V5(W)?s[g]=eS({},W):u2(W)?s[g]=W.slice():(!o||!d2(W))&&(s[g]=W)};for(let W=0,v=arguments.length;W<v;W++)arguments[W]&&ob(arguments[W],z);return s}const Cyt=(e,o,s,{allOwnKeys:z}={})=>(ob(o,(W,v)=>{s&&gp(W)?Object.defineProperty(e,v,{value:AV(W,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,v,{value:W,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:z}),e),Eyt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ayt=(e,o,s,z)=>{e.prototype=Object.create(o.prototype,z),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},Myt=(e,o,s,z)=>{let W,v,g;const r={};if(o=o||{},e==null)return o;do{for(W=Object.getOwnPropertyNames(e),v=W.length;v-- >0;)g=W[v],(!z||z(g,e,o))&&!r[g]&&(o[g]=e[g],r[g]=!0);e=s!==!1&&Qk(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Pyt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const z=e.indexOf(o,s);return z!==-1&&z===s},Iyt=e=>{if(!e)return null;if(u2(e))return e;let o=e.length;if(!IV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Lyt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&Qk(Uint8Array)),Byt=(e,o)=>{const s=(e&&e[D5]).call(e);let z;for(;(z=s.next())&&!z.done;){const W=z.value;o.call(e,W[0],W[1])}},Oyt=(e,o)=>{let s;const z=[];for(;(s=e.exec(o))!==null;)z.push(s);return z},zyt=Rf("HTMLFormElement"),Nyt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,z){return s.toUpperCase()+z}),NV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),Dyt=Rf("RegExp"),DV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),z={};ob(s,(W,v)=>{let g;(g=o(W,v,e))!==!1&&(z[v]=g||W)}),Object.defineProperties(e,z)},Fyt=e=>{DV(e,(o,s)=>{if(gp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const z=e[s];if(gp(z)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Ryt=(e,o)=>{const s={},z=W=>{W.forEach(v=>{s[v]=!0})};return u2(e)?z(e):z(String(e).split(o)),s},Vyt=()=>{},jyt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function Uyt(e){return!!(e&&gp(e.append)&&e[MV]==="FormData"&&e[D5])}const Gyt=e=>{const o=new Array(10),s=(z,W)=>{if(ib(z)){if(o.indexOf(z)>=0)return;if(nb(z))return z;if(!("toJSON"in z)){o[W]=z;const v=u2(z)?[]:{};return ob(z,(g,r)=>{const b=s(g,W+1);!d2(b)&&(v[r]=b)}),o[W]=void 0,v}}return z};return s(e,0)},Hyt=Rf("AsyncFunction"),Zyt=e=>e&&(ib(e)||gp(e))&&gp(e.then)&&gp(e.catch),FV=((e,o)=>e?setImmediate:o?((s,z)=>(rg.addEventListener("message",({source:W,data:v})=>{W===rg&&v===s&&z.length&&z.shift()()},!1),W=>{z.push(W),rg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",gp(rg.postMessage)),Wyt=typeof queueMicrotask<"u"?queueMicrotask.bind(rg):typeof process<"u"&&process.nextTick||FV,Xyt=e=>e!=null&&gp(e[D5]),Mn={isArray:u2,isArrayBuffer:PV,isBuffer:nb,isFormData:byt,isArrayBufferView:syt,isString:lyt,isNumber:IV,isBoolean:cyt,isObject:ib,isPlainObject:V5,isEmptyObject:uyt,isReadableStream:_yt,isRequest:wyt,isResponse:kyt,isHeaders:Syt,isUndefined:d2,isDate:dyt,isFile:hyt,isReactNativeBlob:pyt,isReactNative:fyt,isBlob:myt,isRegExp:Dyt,isFunction:gp,isStream:yyt,isURLSearchParams:xyt,isTypedArray:Lyt,isFileList:gyt,forEach:ob,merge:eS,extend:Cyt,trim:Tyt,stripBOM:Eyt,inherits:Ayt,toFlatObject:Myt,kindOf:F5,kindOfTest:Rf,endsWith:Pyt,toArray:Iyt,forEachEntry:Byt,matchAll:Oyt,isHTMLForm:zyt,hasOwnProperty:NV,hasOwnProp:NV,reduceDescriptors:DV,freezeMethods:Fyt,toObjectSet:Ryt,toCamelCase:Nyt,noop:Vyt,toFiniteNumber:jyt,findKey:OV,global:rg,isContextDefined:zV,isSpecCompliantForm:Uyt,toJSONObject:Gyt,isAsyncFn:Hyt,isThenable:Zyt,setImmediate:FV,asap:Wyt,isIterable:Xyt};let ms=class RH extends Error{static from(o,s,z,W,v,g){const r=new RH(o.message,s||o.code,z,W,v);return r.cause=o,r.name=o.name,o.status!=null&&r.status==null&&(r.status=o.status),g&&Object.assign(r,g),r}constructor(o,s,z,W,v){super(o),Object.defineProperty(this,"message",{value:o,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),z&&(this.config=z),W&&(this.request=W),v&&(this.response=v,this.status=v.status)}toJSON(){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:Mn.toJSONObject(this.config),code:this.code,status:this.status}}};ms.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ms.ERR_BAD_OPTION="ERR_BAD_OPTION",ms.ECONNABORTED="ECONNABORTED",ms.ETIMEDOUT="ETIMEDOUT",ms.ERR_NETWORK="ERR_NETWORK",ms.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ms.ERR_DEPRECATED="ERR_DEPRECATED",ms.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ms.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ms.ERR_CANCELED="ERR_CANCELED",ms.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ms.ERR_INVALID_URL="ERR_INVALID_URL";const qyt=null;function tS(e){return Mn.isPlainObject(e)||Mn.isArray(e)}function RV(e){return Mn.endsWith(e,"[]")?e.slice(0,-2):e}function aS(e,o,s){return e?e.concat(o).map(function(z,W){return z=RV(z),!s&&W?"["+z+"]":z}).join(s?".":""):o}function Yyt(e){return Mn.isArray(e)&&!e.some(tS)}const Jyt=Mn.toFlatObject(Mn,{},null,function(e){return/^is[A-Z]/.test(e)});function j5(e,o,s){if(!Mn.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=Mn.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,u){return!Mn.isUndefined(u[x])});const z=s.metaTokens,W=s.visitor||d,v=s.dots,g=s.indexes,r=(s.Blob||typeof Blob<"u"&&Blob)&&Mn.isSpecCompliantForm(o);if(!Mn.isFunction(W))throw new TypeError("visitor must be a function");function b(x){if(x===null)return"";if(Mn.isDate(x))return x.toISOString();if(Mn.isBoolean(x))return x.toString();if(!r&&Mn.isBlob(x))throw new ms("Blob is not supported. Use a Buffer instead.");return Mn.isArrayBuffer(x)||Mn.isTypedArray(x)?r&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,u,n){let i=x;if(Mn.isReactNative(o)&&Mn.isReactNativeBlob(x))return o.append(aS(n,u,v),b(x)),!1;if(x&&!n&&typeof x=="object"){if(Mn.endsWith(u,"{}"))u=z?u:u.slice(0,-2),x=JSON.stringify(x);else if(Mn.isArray(x)&&Yyt(x)||(Mn.isFileList(x)||Mn.endsWith(u,"[]"))&&(i=Mn.toArray(x)))return u=RV(u),i.forEach(function(f,l){!(Mn.isUndefined(f)||f===null)&&o.append(g===!0?aS([u],l,v):g===null?u:u+"[]",b(f))}),!1}return tS(x)?!0:(o.append(aS(n,u,v),b(x)),!1)}const a=[],_=Object.assign(Jyt,{defaultVisitor:d,convertValue:b,isVisitable:tS});function y(x,u){if(!Mn.isUndefined(x)){if(a.indexOf(x)!==-1)throw Error("Circular reference detected in "+u.join("."));a.push(x),Mn.forEach(x,function(n,i){(!(Mn.isUndefined(n)||n===null)&&W.call(o,n,Mn.isString(i)?i.trim():i,u,_))===!0&&y(n,u?u.concat(i):[i])}),a.pop()}}if(!Mn.isObject(e))throw new TypeError("data must be an object");return y(e),o}function VV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function rS(e,o){this._pairs=[],e&&j5(e,this,o)}const jV=rS.prototype;jV.append=function(e,o){this._pairs.push([e,o])},jV.toString=function(e){const o=e?function(s){return e.call(this,s,VV)}:VV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function $yt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function UV(e,o,s){if(!o)return e;const z=s&&s.encode||$yt,W=Mn.isFunction(s)?{serialize:s}:s,v=W&&W.serialize;let g;if(v?g=v(o,W):g=Mn.isURLSearchParams(o)?o.toString():new rS(o,W).toString(z),g){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}class GV{constructor(){this.handlers=[]}use(o,s,z){return this.handlers.push({fulfilled:o,rejected:s,synchronous:z?z.synchronous:!1,runWhen:z?z.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){Mn.forEach(this.handlers,function(s){s!==null&&o(s)})}}const nS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Kyt=typeof URLSearchParams<"u"?URLSearchParams:rS,Qyt=typeof FormData<"u"?FormData:null,e2t=typeof Blob<"u"?Blob:null,t2t={isBrowser:!0,classes:{URLSearchParams:Kyt,FormData:Qyt,Blob:e2t},protocols:["http","https","file","blob","url","data"]},iS=typeof window<"u"&&typeof document<"u",oS=typeof navigator=="object"&&navigator||void 0,a2t=iS&&(!oS||["ReactNative","NativeScript","NS"].indexOf(oS.product)<0),r2t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n2t=iS&&window.location.href||"http://localhost",i2t=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:iS,hasStandardBrowserEnv:a2t,hasStandardBrowserWebWorkerEnv:r2t,navigator:oS,origin:n2t},Symbol.toStringTag,{value:"Module"})),kh={...i2t,...t2t};function o2t(e,o){return j5(e,new kh.classes.URLSearchParams,{visitor:function(s,z,W,v){return kh.isNode&&Mn.isBuffer(s)?(this.append(z,s.toString("base64")),!1):v.defaultVisitor.apply(this,arguments)},...o})}function s2t(e){return Mn.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function l2t(e){const o={},s=Object.keys(e);let z;const W=s.length;let v;for(z=0;z<W;z++)v=s[z],o[v]=e[v];return o}function HV(e){function o(s,z,W,v){let g=s[v++];if(g==="__proto__")return!0;const r=Number.isFinite(+g),b=v>=s.length;return g=!g&&Mn.isArray(W)?W.length:g,b?(Mn.hasOwnProp(W,g)?W[g]=[W[g],z]:W[g]=z,!r):((!W[g]||!Mn.isObject(W[g]))&&(W[g]=[]),o(s,z,W[g],v)&&Mn.isArray(W[g])&&(W[g]=l2t(W[g])),!r)}if(Mn.isFormData(e)&&Mn.isFunction(e.entries)){const s={};return Mn.forEachEntry(e,(z,W)=>{o(s2t(z),W,s,0)}),s}return null}function c2t(e,o,s){if(Mn.isString(e))try{return(o||JSON.parse)(e),Mn.trim(e)}catch(z){if(z.name!=="SyntaxError")throw z}return(s||JSON.stringify)(e)}const sb={transitional:nS,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",z=s.indexOf("application/json")>-1,W=Mn.isObject(e);if(W&&Mn.isHTMLForm(e)&&(e=new FormData(e)),Mn.isFormData(e))return z?JSON.stringify(HV(e)):e;if(Mn.isArrayBuffer(e)||Mn.isBuffer(e)||Mn.isStream(e)||Mn.isFile(e)||Mn.isBlob(e)||Mn.isReadableStream(e))return e;if(Mn.isArrayBufferView(e))return e.buffer;if(Mn.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let v;if(W){if(s.indexOf("application/x-www-form-urlencoded")>-1)return o2t(e,this.formSerializer).toString();if((v=Mn.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return j5(v?{"files[]":e}:e,g&&new g,this.formSerializer)}}return W||z?(o.setContentType("application/json",!1),c2t(e)):e}],transformResponse:[function(e){const o=this.transitional||sb.transitional,s=o&&o.forcedJSONParsing,z=this.responseType==="json";if(Mn.isResponse(e)||Mn.isReadableStream(e))return e;if(e&&Mn.isString(e)&&(s&&!this.responseType||z)){const W=!(o&&o.silentJSONParsing)&&z;try{return JSON.parse(e,this.parseReviver)}catch(v){if(W)throw v.name==="SyntaxError"?ms.from(v,ms.ERR_BAD_RESPONSE,this,null,this.response):v}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kh.classes.FormData,Blob:kh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mn.forEach(["delete","get","head","post","put","patch"],e=>{sb.headers[e]={}});const u2t=Mn.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"]),d2t=e=>{const o={};let s,z,W;return e&&e.split(`
4145
4145
  `).forEach(function(v){W=v.indexOf(":"),s=v.substring(0,W).trim().toLowerCase(),z=v.substring(W+1).trim(),!(!s||o[s]&&u2t[s])&&(s==="set-cookie"?o[s]?o[s].push(z):o[s]=[z]:o[s]=o[s]?o[s]+", "+z:z)}),o},ZV=Symbol("internals");function lb(e){return e&&String(e).trim().toLowerCase()}function U5(e){return e===!1||e==null?e:Mn.isArray(e)?e.map(U5):String(e)}function h2t(e){const o=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let z;for(;z=s.exec(e);)o[z[1]]=z[2];return o}const p2t=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sS(e,o,s,z,W){if(Mn.isFunction(z))return z.call(this,o,s);if(W&&(o=s),!!Mn.isString(o)){if(Mn.isString(z))return o.indexOf(z)!==-1;if(Mn.isRegExp(z))return z.test(o)}}function f2t(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,s,z)=>s.toUpperCase()+z)}function m2t(e,o){const s=Mn.toCamelCase(" "+o);["get","set","has"].forEach(z=>{Object.defineProperty(e,z+s,{value:function(W,v,g){return this[z].call(this,o,W,v,g)},configurable:!0})})}let yp=class{constructor(e){e&&this.set(e)}set(e,o,s){const z=this;function W(g,r,b){const d=lb(r);if(!d)throw new Error("header name must be a non-empty string");const a=Mn.findKey(z,d);(!a||z[a]===void 0||b===!0||b===void 0&&z[a]!==!1)&&(z[a||r]=U5(g))}const v=(g,r)=>Mn.forEach(g,(b,d)=>W(b,d,r));if(Mn.isPlainObject(e)||e instanceof this.constructor)v(e,o);else if(Mn.isString(e)&&(e=e.trim())&&!p2t(e))v(d2t(e),o);else if(Mn.isObject(e)&&Mn.isIterable(e)){let g={},r,b;for(const d of e){if(!Mn.isArray(d))throw TypeError("Object iterator must return a key-value pair");g[b=d[0]]=(r=g[b])?Mn.isArray(r)?[...r,d[1]]:[r,d[1]]:d[1]}v(g,o)}else e!=null&&W(o,e,s);return this}get(e,o){if(e=lb(e),e){const s=Mn.findKey(this,e);if(s){const z=this[s];if(!o)return z;if(o===!0)return h2t(z);if(Mn.isFunction(o))return o.call(this,z,s);if(Mn.isRegExp(o))return o.exec(z);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=lb(e),e){const s=Mn.findKey(this,e);return!!(s&&this[s]!==void 0&&(!o||sS(this,this[s],s,o)))}return!1}delete(e,o){const s=this;let z=!1;function W(v){if(v=lb(v),v){const g=Mn.findKey(s,v);g&&(!o||sS(s,s[g],g,o))&&(delete s[g],z=!0)}}return Mn.isArray(e)?e.forEach(W):W(e),z}clear(e){const o=Object.keys(this);let s=o.length,z=!1;for(;s--;){const W=o[s];(!e||sS(this,this[W],W,e,!0))&&(delete this[W],z=!0)}return z}normalize(e){const o=this,s={};return Mn.forEach(this,(z,W)=>{const v=Mn.findKey(s,W);if(v){o[v]=U5(z),delete o[W];return}const g=e?f2t(W):String(W).trim();g!==W&&delete o[W],o[g]=U5(z),s[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const o=Object.create(null);return Mn.forEach(this,(s,z)=>{s!=null&&s!==!1&&(o[z]=e&&Mn.isArray(s)?s.join(", "):s)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
4146
4146
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){const s=new this(e);return o.forEach(z=>s.set(z)),s}static accessor(e){const o=(this[ZV]=this[ZV]={accessors:{}}).accessors,s=this.prototype;function z(W){const v=lb(W);o[v]||(m2t(s,W),o[v]=!0)}return Mn.isArray(e)?e.forEach(z):z(e),this}};yp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Mn.reduceDescriptors(yp.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(z){this[s]=z}}}),Mn.freezeMethods(yp);function lS(e,o){const s=this||sb,z=o||s,W=yp.from(z.headers);let v=z.data;return Mn.forEach(e,function(g){v=g.call(s,v,W.normalize(),o?o.status:void 0)}),W.normalize(),v}function WV(e){return!!(e&&e.__CANCEL__)}let cb=class extends ms{constructor(e,o,s){super(e??"canceled",ms.ERR_CANCELED,o,s),this.name="CanceledError",this.__CANCEL__=!0}};function XV(e,o,s){const z=s.config.validateStatus;!s.status||!z||z(s.status)?e(s):o(new ms("Request failed with status code "+s.status,[ms.ERR_BAD_REQUEST,ms.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function g2t(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function y2t(e,o){e=e||10;const s=new Array(e),z=new Array(e);let W=0,v=0,g;return o=o!==void 0?o:1e3,function(r){const b=Date.now(),d=z[v];g||(g=b),s[W]=r,z[W]=b;let a=v,_=0;for(;a!==W;)_+=s[a++],a=a%e;if(W=(W+1)%e,W===v&&(v=(v+1)%e),b-g<o)return;const y=d&&b-d;return y?Math.round(_*1e3/y):void 0}}function v2t(e,o){let s=0,z=1e3/o,W,v;const g=(r,b=Date.now())=>{s=b,W=null,v&&(clearTimeout(v),v=null),e(...r)};return[(...r)=>{const b=Date.now(),d=b-s;d>=z?g(r,b):(W=r,v||(v=setTimeout(()=>{v=null,g(W)},z-d)))},()=>W&&g(W)]}const G5=(e,o,s=3)=>{let z=0;const W=y2t(50,250);return v2t(v=>{const g=v.loaded,r=v.lengthComputable?v.total:void 0,b=g-z,d=W(b),a=g<=r;z=g;const _={loaded:g,total:r,progress:r?g/r:void 0,bytes:b,rate:d||void 0,estimated:d&&r&&a?(r-g)/d:void 0,event:v,lengthComputable:r!=null,[o?"download":"upload"]:!0};e(_)},s)},qV=(e,o)=>{const s=e!=null;return[z=>o[0]({lengthComputable:s,total:e,loaded:z}),o[1]]},YV=e=>(...o)=>Mn.asap(()=>e(...o)),b2t=kh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,kh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(kh.origin),kh.navigator&&/(msie|trident)/i.test(kh.navigator.userAgent)):()=>!0,x2t=kh.hasStandardBrowserEnv?{write(e,o,s,z,W,v,g){if(typeof document>"u")return;const r=[`${e}=${encodeURIComponent(o)}`];Mn.isNumber(s)&&r.push(`expires=${new Date(s).toUTCString()}`),Mn.isString(z)&&r.push(`path=${z}`),Mn.isString(W)&&r.push(`domain=${W}`),v===!0&&r.push("secure"),Mn.isString(g)&&r.push(`SameSite=${g}`),document.cookie=r.join("; ")},read(e){if(typeof document>"u")return null;const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _2t(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function w2t(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function JV(e,o,s){let z=!_2t(o);return e&&(z||s==!1)?w2t(e,o):o}const $V=e=>e instanceof yp?{...e}:e;function ng(e,o){o=o||{};const s={};function z(d,a,_,y){return Mn.isPlainObject(d)&&Mn.isPlainObject(a)?Mn.merge.call({caseless:y},d,a):Mn.isPlainObject(a)?Mn.merge({},a):Mn.isArray(a)?a.slice():a}function W(d,a,_,y){if(Mn.isUndefined(a)){if(!Mn.isUndefined(d))return z(void 0,d,_,y)}else return z(d,a,_,y)}function v(d,a){if(!Mn.isUndefined(a))return z(void 0,a)}function g(d,a){if(Mn.isUndefined(a)){if(!Mn.isUndefined(d))return z(void 0,d)}else return z(void 0,a)}function r(d,a,_){if(_ in o)return z(d,a);if(_ in e)return z(void 0,d)}const b={url:v,method:v,data:v,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:r,headers:(d,a,_)=>W($V(d),$V(a),_,!0)};return Mn.forEach(Object.keys({...e,...o}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=Mn.hasOwnProp(b,d)?b[d]:W,_=a(e[d],o[d],d);Mn.isUndefined(_)&&a!==r||(s[d]=_)}),s}const KV=e=>{const o=ng({},e);let{data:s,withXSRFToken:z,xsrfHeaderName:W,xsrfCookieName:v,headers:g,auth:r}=o;if(o.headers=g=yp.from(g),o.url=UV(JV(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),r&&g.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),Mn.isFormData(s)){if(kh.hasStandardBrowserEnv||kh.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(Mn.isFunction(s.getHeaders)){const b=s.getHeaders(),d=["content-type","content-length"];Object.entries(b).forEach(([a,_])=>{d.includes(a.toLowerCase())&&g.set(a,_)})}}if(kh.hasStandardBrowserEnv&&(z&&Mn.isFunction(z)&&(z=z(o)),z||z!==!1&&b2t(o.url))){const b=W&&v&&x2t.read(v);b&&g.set(W,b)}return o},k2t=typeof XMLHttpRequest<"u",S2t=k2t&&function(e){return new Promise(function(o,s){const z=KV(e);let W=z.data;const v=yp.from(z.headers).normalize();let{responseType:g,onUploadProgress:r,onDownloadProgress:b}=z,d,a,_,y,x;function u(){y&&y(),x&&x(),z.cancelToken&&z.cancelToken.unsubscribe(d),z.signal&&z.signal.removeEventListener("abort",d)}let n=new XMLHttpRequest;n.open(z.method.toUpperCase(),z.url,!0),n.timeout=z.timeout;function i(){if(!n)return;const l=yp.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),h={data:!g||g==="text"||g==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};XV(function(m){o(m),u()},function(m){s(m),u()},h),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(s(new ms("Request aborted",ms.ECONNABORTED,e,n)),n=null)},n.onerror=function(l){const h=l&&l.message?l.message:"Network Error",m=new ms(h,ms.ERR_NETWORK,e,n);m.event=l||null,s(m),n=null},n.ontimeout=function(){let l=z.timeout?"timeout of "+z.timeout+"ms exceeded":"timeout exceeded";const h=z.transitional||nS;z.timeoutErrorMessage&&(l=z.timeoutErrorMessage),s(new ms(l,h.clarifyTimeoutError?ms.ETIMEDOUT:ms.ECONNABORTED,e,n)),n=null},W===void 0&&v.setContentType(null),"setRequestHeader"in n&&Mn.forEach(v.toJSON(),function(l,h){n.setRequestHeader(h,l)}),Mn.isUndefined(z.withCredentials)||(n.withCredentials=!!z.withCredentials),g&&g!=="json"&&(n.responseType=z.responseType),b&&([_,x]=G5(b,!0),n.addEventListener("progress",_)),r&&n.upload&&([a,y]=G5(r),n.upload.addEventListener("progress",a),n.upload.addEventListener("loadend",y)),(z.cancelToken||z.signal)&&(d=l=>{n&&(s(!l||l.type?new cb(null,e,n):l),n.abort(),n=null)},z.cancelToken&&z.cancelToken.subscribe(d),z.signal&&(z.signal.aborted?d():z.signal.addEventListener("abort",d)));const f=g2t(z.url);if(f&&kh.protocols.indexOf(f)===-1){s(new ms("Unsupported protocol "+f+":",ms.ERR_BAD_REQUEST,e));return}n.send(W||null)})},T2t=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let z=new AbortController,W;const v=function(d){if(!W){W=!0,r();const a=d instanceof Error?d:this.reason;z.abort(a instanceof ms?a:new cb(a instanceof Error?a.message:a))}};let g=o&&setTimeout(()=>{g=null,v(new ms(`timeout of ${o}ms exceeded`,ms.ETIMEDOUT))},o);const r=()=>{e&&(g&&clearTimeout(g),g=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(v):d.removeEventListener("abort",v)}),e=null)};e.forEach(d=>d.addEventListener("abort",v));const{signal:b}=z;return b.unsubscribe=()=>Mn.asap(r),b}},C2t=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let z=0,W;for(;z<s;)W=z+o,yield e.slice(z,W),z=W},E2t=async function*(e,o){for await(const s of A2t(e))yield*C2t(s,o)},A2t=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:z}=await o.read();if(s)break;yield z}}finally{await o.cancel()}},QV=(e,o,s,z)=>{const W=E2t(e,o);let v=0,g,r=b=>{g||(g=!0,z&&z(b))};return new ReadableStream({async pull(b){try{const{done:d,value:a}=await W.next();if(d){r(),b.close();return}let _=a.byteLength;if(s){let y=v+=_;s(y)}b.enqueue(new Uint8Array(a))}catch(d){throw r(d),d}},cancel(b){return r(b),W.return()}},{highWaterMark:2})},ej=64*1024,{isFunction:H5}=Mn,M2t=(({Request:e,Response:o})=>({Request:e,Response:o}))(Mn.global),{ReadableStream:tj,TextEncoder:aj}=Mn.global,rj=(e,...o)=>{try{return!!e(...o)}catch{return!1}},P2t=e=>{e=Mn.merge.call({skipUndefined:!0},M2t,e);const{fetch:o,Request:s,Response:z}=e,W=o?H5(o):typeof fetch=="function",v=H5(s),g=H5(z);if(!W)return!1;const r=W&&H5(tj),b=W&&(typeof aj=="function"?(u=>n=>u.encode(n))(new aj):async u=>new Uint8Array(await new s(u).arrayBuffer())),d=v&&r&&rj(()=>{let u=!1;const n=new s(kh.origin,{body:new tj,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!n}),a=g&&r&&rj(()=>Mn.isReadableStream(new z("").body)),_={stream:a&&(u=>u.body)};W&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!_[u]&&(_[u]=(n,i)=>{let f=n&&n[u];if(f)return f.call(n);throw new ms(`Response type '${u}' is not supported`,ms.ERR_NOT_SUPPORT,i)})});const y=async u=>{if(u==null)return 0;if(Mn.isBlob(u))return u.size;if(Mn.isSpecCompliantForm(u))return(await new s(kh.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(Mn.isArrayBufferView(u)||Mn.isArrayBuffer(u))return u.byteLength;if(Mn.isURLSearchParams(u)&&(u=u+""),Mn.isString(u))return(await b(u)).byteLength},x=async(u,n)=>Mn.toFiniteNumber(u.getContentLength())??y(n);return async u=>{let{url:n,method:i,data:f,signal:l,cancelToken:h,timeout:m,onDownloadProgress:w,onUploadProgress:T,responseType:A,headers:C,withCredentials:I="same-origin",fetchOptions:L}=KV(u),E=o||fetch;A=A?(A+"").toLowerCase():"text";let P=T2t([l,h&&h.toAbortSignal()],m),M=null;const S=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let B;try{if(T&&d&&i!=="get"&&i!=="head"&&(B=await x(C,f))!==0){let H=new s(n,{method:"POST",body:f,duplex:"half"}),U;if(Mn.isFormData(f)&&(U=H.headers.get("content-type"))&&C.setContentType(U),H.body){const[J,re]=qV(B,G5(YV(T)));f=QV(H.body,ej,J,re)}}Mn.isString(I)||(I=I?"include":"omit");const k=v&&"credentials"in s.prototype,O={...L,signal:P,method:i.toUpperCase(),headers:C.normalize().toJSON(),body:f,duplex:"half",credentials:k?I:void 0};M=v&&new s(n,O);let D=await(v?E(M,L):E(n,O));const V=a&&(A==="stream"||A==="response");if(a&&(w||V&&S)){const H={};["status","statusText","headers"].forEach(q=>{H[q]=D[q]});const U=Mn.toFiniteNumber(D.headers.get("content-length")),[J,re]=w&&qV(U,G5(YV(w),!0))||[];D=new z(QV(D.body,ej,J,()=>{re&&re(),S&&S()}),H)}A=A||"text";let G=await _[Mn.findKey(_,A)||"text"](D,u);return!V&&S&&S(),await new Promise((H,U)=>{XV(H,U,{data:G,headers:yp.from(D.headers),status:D.status,statusText:D.statusText,config:u,request:M})})}catch(k){throw S&&S(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new ms("Network Error",ms.ERR_NETWORK,u,M,k&&k.response),{cause:k.cause||k}):ms.from(k,k&&k.code,u,M,k&&k.response)}}},I2t=new Map,nj=e=>{let o=e&&e.env||{};const{fetch:s,Request:z,Response:W}=o,v=[z,W,s];let g=v.length,r=g,b,d,a=I2t;for(;r--;)b=v[r],d=a.get(b),d===void 0&&a.set(b,d=r?new Map:P2t(o)),a=d;return d};nj();const cS={http:qyt,xhr:S2t,fetch:{get:nj}};Mn.forEach(cS,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const ij=e=>`- ${e}`,L2t=e=>Mn.isFunction(e)||e===null||e===!1;function B2t(e,o){e=Mn.isArray(e)?e:[e];const{length:s}=e;let z,W;const v={};for(let g=0;g<s;g++){z=e[g];let r;if(W=z,!L2t(z)&&(W=cS[(r=String(z)).toLowerCase()],W===void 0))throw new ms(`Unknown adapter '${r}'`);if(W&&(Mn.isFunction(W)||(W=W.get(o))))break;v[r||"#"+g]=W}if(!W){const g=Object.entries(v).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=s?g.length>1?`since :
4147
4147
  `+g.map(ij).join(`