@golstats/gsc-lists 1.0.9 → 1.0.10

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.
@@ -8,4 +8,4 @@
8
8
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...o){const l=new this(a);return o.forEach(i=>l.set(i)),l}static accessor(a){const o=(this[el]=this[el]={accessors:{}}).accessors,l=this.prototype;function i(r){const n=Qe(r);o[n]||(Cm(l,r),o[n]=!0)}return k.isArray(a)?a.forEach(i):i(a),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(kt.prototype,({value:t},a)=>{let o=a[0].toUpperCase()+a.slice(1);return{get:()=>t,set(l){this[o]=l}}}),k.freezeMethods(kt);const ge=kt;function ma(t,a){const o=this||ca,l=a||o,i=ge.from(l.headers);let r=l.data;return k.forEach(t,function(n){r=n.call(o,r,i.normalize(),a?a.status:void 0)}),i.normalize(),r}function tl(t){return!!(t&&t.__CANCEL__)}function Ue(t,a,o){G.call(this,t??"canceled",G.ERR_CANCELED,a,o),this.name="CanceledError"}k.inherits(Ue,G,{__CANCEL__:!0});function al(t,a,o){const l=o.config.validateStatus;!o.status||!l||l(o.status)?t(o):a(new G("Request failed with status code "+o.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function km(t){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return a&&a[1]||""}function Vm(t,a){t=t||10;const o=new Array(t),l=new Array(t);let i=0,r=0,n;return a=a!==void 0?a:1e3,function(s){const c=Date.now(),d=l[r];n||(n=c),o[i]=s,l[i]=c;let h=r,m=0;for(;h!==i;)m+=o[h++],h=h%t;if(i=(i+1)%t,i===r&&(r=(r+1)%t),c-n<a)return;const y=d&&c-d;return y?Math.round(m*1e3/y):void 0}}function Nm(t,a){let o=0,l=1e3/a,i,r;const n=(s,c=Date.now())=>{o=c,i=null,r&&(clearTimeout(r),r=null),t.apply(null,s)};return[(...s)=>{const c=Date.now(),d=c-o;d>=l?n(s,c):(i=s,r||(r=setTimeout(()=>{r=null,n(i)},l-d)))},()=>i&&n(i)]}const Vt=(t,a,o=3)=>{let l=0;const i=Vm(50,250);return Nm(r=>{const n=r.loaded,s=r.lengthComputable?r.total:void 0,c=n-l,d=i(c),h=n<=s;l=n;const m={loaded:n,total:s,progress:s?n/s:void 0,bytes:c,rate:d||void 0,estimated:d&&s&&h?(s-n)/d:void 0,event:r,lengthComputable:s!=null,[a?"download":"upload"]:!0};t(m)},o)},ol=(t,a)=>{const o=t!=null;return[l=>a[0]({lengthComputable:o,total:t,loaded:l}),a[1]]},ll=t=>(...a)=>k.asap(()=>t(...a)),xm=se.hasStandardBrowserEnv?((t,a)=>o=>(o=new URL(o,se.origin),t.protocol===o.protocol&&t.host===o.host&&(a||t.port===o.port)))(new URL(se.origin),se.navigator&&/(msie|trident)/i.test(se.navigator.userAgent)):()=>!0,Bm=se.hasStandardBrowserEnv?{write(t,a,o,l,i,r){const n=[t+"="+encodeURIComponent(a)];k.isNumber(o)&&n.push("expires="+new Date(o).toGMTString()),k.isString(l)&&n.push("path="+l),k.isString(i)&&n.push("domain="+i),r===!0&&n.push("secure"),document.cookie=n.join("; ")},read(t){const a=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tm(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Fm(t,a){return a?t.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):t}function rl(t,a,o){let l=!Tm(a);return t&&(l||o==!1)?Fm(t,a):a}const il=t=>t instanceof ge?{...t}:t;function Le(t,a){a=a||{};const o={};function l(d,h,m,y){return k.isPlainObject(d)&&k.isPlainObject(h)?k.merge.call({caseless:y},d,h):k.isPlainObject(h)?k.merge({},h):k.isArray(h)?h.slice():h}function i(d,h,m,y){if(k.isUndefined(h)){if(!k.isUndefined(d))return l(void 0,d,m,y)}else return l(d,h,m,y)}function r(d,h){if(!k.isUndefined(h))return l(void 0,h)}function n(d,h){if(k.isUndefined(h)){if(!k.isUndefined(d))return l(void 0,d)}else return l(void 0,h)}function s(d,h,m){if(m in a)return l(d,h);if(m in t)return l(void 0,d)}const c={url:r,method:r,data:r,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:s,headers:(d,h,m)=>i(il(d),il(h),m,!0)};return k.forEach(Object.keys(Object.assign({},t,a)),function(d){const h=c[d]||i,m=h(t[d],a[d],d);k.isUndefined(m)&&h!==s||(o[d]=m)}),o}const nl=t=>{const a=Le({},t);let{data:o,withXSRFToken:l,xsrfHeaderName:i,xsrfCookieName:r,headers:n,auth:s}=a;a.headers=n=ge.from(n),a.url=Jo(rl(a.baseURL,a.url,a.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&n.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(k.isFormData(o)){if(se.hasStandardBrowserEnv||se.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if((c=n.getContentType())!==!1){const[d,...h]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];n.setContentType([d||"multipart/form-data",...h].join("; "))}}if(se.hasStandardBrowserEnv&&(l&&k.isFunction(l)&&(l=l(a)),l||l!==!1&&xm(a.url))){const d=i&&r&&Bm.read(r);d&&n.set(i,d)}return a},Mm=typeof XMLHttpRequest<"u",Am=Mm&&function(t){return new Promise(function(a,o){const l=nl(t);let i=l.data;const r=ge.from(l.headers).normalize();let{responseType:n,onUploadProgress:s,onDownloadProgress:c}=l,d,h,m,y,p;function f(){y&&y(),p&&p(),l.cancelToken&&l.cancelToken.unsubscribe(d),l.signal&&l.signal.removeEventListener("abort",d)}let u=new XMLHttpRequest;u.open(l.method.toUpperCase(),l.url,!0),u.timeout=l.timeout;function g(){if(!u)return;const B=ge.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),v={data:!n||n==="text"||n==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:B,config:t,request:u};al(function(Z){a(Z),f()},function(Z){o(Z),f()},v),u=null}"onloadend"in u?u.onloadend=g:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(g)},u.onabort=function(){u&&(o(new G("Request aborted",G.ECONNABORTED,t,u)),u=null)},u.onerror=function(){o(new G("Network Error",G.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let B=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const v=l.transitional||Xo;l.timeoutErrorMessage&&(B=l.timeoutErrorMessage),o(new G(B,v.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,t,u)),u=null},i===void 0&&r.setContentType(null),"setRequestHeader"in u&&k.forEach(r.toJSON(),function(B,v){u.setRequestHeader(v,B)}),k.isUndefined(l.withCredentials)||(u.withCredentials=!!l.withCredentials),n&&n!=="json"&&(u.responseType=l.responseType),c&&([m,p]=Vt(c,!0),u.addEventListener("progress",m)),s&&u.upload&&([h,y]=Vt(s),u.upload.addEventListener("progress",h),u.upload.addEventListener("loadend",y)),(l.cancelToken||l.signal)&&(d=B=>{u&&(o(!B||B.type?new Ue(null,t,u):B),u.abort(),u=null)},l.cancelToken&&l.cancelToken.subscribe(d),l.signal&&(l.signal.aborted?d():l.signal.addEventListener("abort",d)));const V=km(l.url);if(V&&se.protocols.indexOf(V)===-1){o(new G("Unsupported protocol "+V+":",G.ERR_BAD_REQUEST,t));return}u.send(i||null)})},Lm=(t,a)=>{const{length:o}=t=t?t.filter(Boolean):[];if(a||o){let l=new AbortController,i;const r=function(d){if(!i){i=!0,s();const h=d instanceof Error?d:this.reason;l.abort(h instanceof G?h:new Ue(h instanceof Error?h.message:h))}};let n=a&&setTimeout(()=>{n=null,r(new G(`timeout ${a} of ms exceeded`,G.ETIMEDOUT))},a);const s=()=>{t&&(n&&clearTimeout(n),n=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(r):d.removeEventListener("abort",r)}),t=null)};t.forEach(d=>d.addEventListener("abort",r));const{signal:c}=l;return c.unsubscribe=()=>k.asap(s),c}},Pm=Lm,Im=function*(t,a){let o=t.byteLength;if(o<a){yield t;return}let l=0,i;for(;l<o;)i=l+a,yield t.slice(l,i),l=i},Dm=async function*(t,a){for await(const o of vm(t))yield*Im(o,a)},vm=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const a=t.getReader();try{for(;;){const{done:o,value:l}=await a.read();if(o)break;yield l}}finally{await a.cancel()}},sl=(t,a,o,l)=>{const i=Dm(t,a);let r=0,n,s=c=>{n||(n=!0,l&&l(c))};return new ReadableStream({async pull(c){try{const{done:d,value:h}=await i.next();if(d){s(),c.close();return}let m=h.byteLength;if(o){let y=r+=m;o(y)}c.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},Nt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",dl=Nt&&typeof ReadableStream=="function",Rm=Nt&&(typeof TextEncoder=="function"?(t=>a=>t.encode(a))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),cl=(t,...a)=>{try{return!!t(...a)}catch{return!1}},Om=dl&&cl(()=>{let t=!1;const a=new Request(se.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!a}),pl=64*1024,ua=dl&&cl(()=>k.isReadableStream(new Response("").body)),xt={stream:ua&&(t=>t.body)};Nt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!xt[a]&&(xt[a]=k.isFunction(t[a])?o=>o[a]():(o,l)=>{throw new G(`Response type '${a}' is not supported`,G.ERR_NOT_SUPPORT,l)})})})(new Response);const zm=async t=>{if(t==null)return 0;if(k.isBlob(t))return t.size;if(k.isSpecCompliantForm(t))return(await new Request(se.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(k.isArrayBufferView(t)||k.isArrayBuffer(t))return t.byteLength;if(k.isURLSearchParams(t)&&(t=t+""),k.isString(t))return(await Rm(t)).byteLength},Um=async(t,a)=>k.toFiniteNumber(t.getContentLength())??zm(a),jm=Nt&&(async t=>{let{url:a,method:o,data:l,signal:i,cancelToken:r,timeout:n,onDownloadProgress:s,onUploadProgress:c,responseType:d,headers:h,withCredentials:m="same-origin",fetchOptions:y}=nl(t);d=d?(d+"").toLowerCase():"text";let p=Pm([i,r&&r.toAbortSignal()],n),f;const u=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(c&&Om&&o!=="get"&&o!=="head"&&(g=await Um(h,l))!==0){let U=new Request(a,{method:"POST",body:l,duplex:"half"}),O;if(k.isFormData(l)&&(O=U.headers.get("content-type"))&&h.setContentType(O),U.body){const[Q,K]=ol(g,Vt(ll(c)));l=sl(U.body,pl,Q,K)}}k.isString(m)||(m=m?"include":"omit");const V="credentials"in Request.prototype;f=new Request(a,{...y,signal:p,method:o.toUpperCase(),headers:h.normalize().toJSON(),body:l,duplex:"half",credentials:V?m:void 0});let B=await fetch(f);const v=ua&&(d==="stream"||d==="response");if(ua&&(s||v&&u)){const U={};["status","statusText","headers"].forEach(F=>{U[F]=B[F]});const O=k.toFiniteNumber(B.headers.get("content-length")),[Q,K]=s&&ol(O,Vt(ll(s),!0))||[];B=new Response(sl(B.body,pl,Q,()=>{K&&K(),u&&u()}),U)}d=d||"text";let Z=await xt[k.findKey(xt,d)||"text"](B,t);return!v&&u&&u(),await new Promise((U,O)=>{al(U,O,{data:Z,headers:ge.from(B.headers),status:B.status,statusText:B.statusText,config:t,request:f})})}catch(V){throw u&&u(),V&&V.name==="TypeError"&&/fetch/i.test(V.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,t,f),{cause:V.cause||V}):G.from(V,V&&V.code,t,f)}}),fa={http:tm,xhr:Am,fetch:jm};k.forEach(fa,(t,a)=>{if(t){try{Object.defineProperty(t,"name",{value:a})}catch{}Object.defineProperty(t,"adapterName",{value:a})}});const ml=t=>`- ${t}`,Hm=t=>k.isFunction(t)||t===null||t===!1,ul={getAdapter:t=>{t=k.isArray(t)?t:[t];const{length:a}=t;let o,l;const i={};for(let r=0;r<a;r++){o=t[r];let n;if(l=o,!Hm(o)&&(l=fa[(n=String(o)).toLowerCase()],l===void 0))throw new G(`Unknown adapter '${n}'`);if(l)break;i[n||"#"+r]=l}if(!l){const r=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let n=a?r.length>1?`since :
9
9
  `+r.map(ml).join(`
10
10
  `):" "+ml(r[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return l},adapters:fa};function ha(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ue(null,t)}function fl(t){return ha(t),t.headers=ge.from(t.headers),t.data=ma.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ul.getAdapter(t.adapter||ca.adapter)(t).then(function(a){return ha(t),a.data=ma.call(t,t.transformResponse,a),a.headers=ge.from(a.headers),a},function(a){return tl(a)||(ha(t),a&&a.response&&(a.response.data=ma.call(t,t.transformResponse,a.response),a.response.headers=ge.from(a.response.headers))),Promise.reject(a)})}const hl="1.8.4",Bt={};["object","boolean","number","function","string","symbol"].forEach((t,a)=>{Bt[t]=function(o){return typeof o===t||"a"+(a<1?"n ":" ")+t}});const yl={};Bt.transitional=function(t,a,o){function l(i,r){return"[Axios v"+hl+"] Transitional option '"+i+"'"+r+(o?". "+o:"")}return(i,r,n)=>{if(t===!1)throw new G(l(r," has been removed"+(a?" in "+a:"")),G.ERR_DEPRECATED);return a&&!yl[r]&&(yl[r]=!0,console.warn(l(r," has been deprecated since v"+a+" and will be removed in the near future"))),t?t(i,r,n):!0}},Bt.spelling=function(t){return(a,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function Wm(t,a,o){if(typeof t!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const l=Object.keys(t);let i=l.length;for(;i-- >0;){const r=l[i],n=a[r];if(n){const s=t[r],c=s===void 0||n(s,r,t);if(c!==!0)throw new G("option "+r+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new G("Unknown option "+r,G.ERR_BAD_OPTION)}}const Tt={assertOptions:Wm,validators:Bt},Se=Tt.validators;class Ft{constructor(a){this.defaults=a,this.interceptors={request:new Ko,response:new Ko}}async request(a,o){try{return await this._request(a,o)}catch(l){if(l instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{l.stack?r&&!String(l.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(l.stack+=`
11
- `+r):l.stack=r}catch{}}throw l}}_request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=Le(this.defaults,o);const{transitional:l,paramsSerializer:i,headers:r}=o;l!==void 0&&Tt.assertOptions(l,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean)},!1),i!=null&&(k.isFunction(i)?o.paramsSerializer={serialize:i}:Tt.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Tt.assertOptions(o,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let n=r&&k.merge(r.common,r[o.method]);r&&k.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),o.headers=ge.concat(n,r);const s=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(o)===!1||(c=c&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});const d=[];this.interceptors.response.forEach(function(f){d.push(f.fulfilled,f.rejected)});let h,m=0,y;if(!c){const f=[fl.bind(this),void 0];for(f.unshift.apply(f,s),f.push.apply(f,d),y=f.length,h=Promise.resolve(o);m<y;)h=h.then(f[m++],f[m++]);return h}y=s.length;let p=o;for(m=0;m<y;){const f=s[m++],u=s[m++];try{p=f(p)}catch(g){u.call(this,g);break}}try{h=fl.call(this,p)}catch(f){return Promise.reject(f)}for(m=0,y=d.length;m<y;)h=h.then(d[m++],d[m++]);return h}getUri(a){a=Le(this.defaults,a);const o=rl(a.baseURL,a.url,a.allowAbsoluteUrls);return Jo(o,a.params,a.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(t){Ft.prototype[t]=function(a,o){return this.request(Le(o||{},{method:t,url:a,data:(o||{}).data}))}}),k.forEach(["post","put","patch"],function(t){function a(o){return function(l,i,r){return this.request(Le(r||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:i}))}}Ft.prototype[t]=a(),Ft.prototype[t+"Form"]=a(!0)});const Mt=Ft;class ya{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const l=this;this.promise.then(i=>{if(!l._listeners)return;let r=l._listeners.length;for(;r-- >0;)l._listeners[r](i);l._listeners=null}),this.promise.then=i=>{let r;const n=new Promise(s=>{l.subscribe(s),r=s}).then(i);return n.cancel=function(){l.unsubscribe(r)},n},a(function(i,r,n){l.reason||(l.reason=new Ue(i,r,n),o(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const a=new AbortController,o=l=>{a.abort(l)};return this.subscribe(o),a.signal.unsubscribe=()=>this.unsubscribe(o),a.signal}static source(){let a;return{token:new ya(function(o){a=o}),cancel:a}}}const Gm=ya;function $m(t){return function(a){return t.apply(null,a)}}function qm(t){return k.isObject(t)&&t.isAxiosError===!0}const ga={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ga).forEach(([t,a])=>{ga[a]=t});const Ym=ga;function gl(t){const a=new Mt(t),o=Do(Mt.prototype.request,a);return k.extend(o,Mt.prototype,a,{allOwnKeys:!0}),k.extend(o,a,null,{allOwnKeys:!0}),o.create=function(l){return gl(Le(t,l))},o}const le=gl(ca);le.Axios=Mt,le.CanceledError=Ue,le.CancelToken=Gm,le.isCancel=tl,le.VERSION=hl,le.toFormData=wt,le.AxiosError=G,le.Cancel=le.CanceledError,le.all=function(t){return Promise.all(t)},le.spread=$m,le.isAxiosError=qm,le.mergeConfig=Le,le.AxiosHeaders=ge,le.formToJSON=t=>Qo(k.isHTMLForm(t)?new FormData(t):t),le.getAdapter=ul.getAdapter,le.HttpStatusCode=Ym,le.default=le;const et=le,ba={isAgeByRange:!0,isAgeByYear:!1,minAge:14,maxAge:43,availableYears:Array.from({length:30},(t,a)=>1981+a).sort((t,a)=>a-t),nationalTeams:[{booleanIsSelected:!1,stringName:"Selección mexicana",setAvailablePlayersIds:{},numberId:392}],isEligibilitySelected:!1,eligibility:[{isSelected:!0,id:138,name:"Mexicana"}],nationalities:[{isSelected:!0,id:138,name:"Mexicana"},{isSelected:!0,id:10,name:"Argentina"},{isSelected:!0,id:29,name:"Brasileña"},{isSelected:!0,id:47,name:"Colombiana"},{isSelected:!0,id:62,name:"Ecuatoriana"},{isSelected:!0,id:223,name:"Uruguaya"},{isSelected:!0,id:198,name:"Española"},{isSelected:!0,id:74,name:"Francesa"},{isSelected:!0,id:43,name:"Chilena"},{isSelected:!0,id:222,name:"Americana"},{isSelected:!0,id:165,name:"Paraguaya"},{isSelected:!0,id:226,name:"Venezolana"},{isSelected:!0,id:52,name:"Marfileña"},{isSelected:!0,id:166,name:"Peruana"}],positions:[{isSelected:!0,id:1,name:"Portero"},{isSelected:!0,id:2,name:"Defensa Central"},{isSelected:!0,id:3,name:"Lateral por izquierda"},{isSelected:!0,id:4,name:"Lateral por derecha"},{isSelected:!0,id:5,name:"Volante por izquierda"},{isSelected:!0,id:6,name:"Volante por derecha"},{isSelected:!0,id:7,name:"Volante defensivo"},{isSelected:!0,id:8,name:"Volante ofensivo"},{isSelected:!0,id:9,name:"Delantero"}]},Zm={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},Jm={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",10:"Desconocida"};function At(t){"@babel/helpers - typeof";return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},At(t)}function we(t){if(t===null||t===!0||t===!1)return NaN;var a=Number(t);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function oe(t,a){if(a.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+a.length+" present")}function ee(t){oe(1,arguments);var a=Object.prototype.toString.call(t);return t instanceof Date||At(t)==="object"&&a==="[object Date]"?new Date(t.getTime()):typeof t=="number"||a==="[object Number]"?new Date(t):((typeof t=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Km(t,a){oe(2,arguments);var o=ee(t),l=we(a);return isNaN(l)?new Date(NaN):(l&&o.setDate(o.getDate()+l),o)}function Xm(t,a){oe(2,arguments);var o=ee(t),l=we(a);if(isNaN(l))return new Date(NaN);if(!l)return o;var i=o.getDate(),r=new Date(o.getTime());r.setMonth(o.getMonth()+l+1,0);var n=r.getDate();return i>=n?r:(o.setFullYear(r.getFullYear(),r.getMonth(),i),o)}function tt(t,a){if(oe(2,arguments),!a||At(a)!=="object")return new Date(NaN);var o=a.years?we(a.years):0,l=a.months?we(a.months):0,i=a.weeks?we(a.weeks):0,r=a.days?we(a.days):0,n=a.hours?we(a.hours):0,s=a.minutes?we(a.minutes):0,c=a.seconds?we(a.seconds):0,d=ee(t),h=l||o?Xm(d,l+o*12):d,m=r||i?Km(h,r+i*7):h,y=s+n*60,p=c+y*60,f=p*1e3,u=new Date(m.getTime()+f);return u}function bl(t){var a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),t.getTime()-a.getTime()}function _l(t){oe(1,arguments);var a=ee(t);return a.setHours(0,0,0,0),a}var Qm=864e5;function eu(t,a){oe(2,arguments);var o=_l(t),l=_l(a),i=o.getTime()-bl(o),r=l.getTime()-bl(l);return Math.round((i-r)/Qm)}function je(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=o.getTime()-l.getTime();return i<0?-1:i>0?1:i}var tu=6e4,au=36e5;function ou(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=o.getFullYear()-l.getFullYear(),r=o.getMonth()-l.getMonth();return i*12+r}function lu(t,a){oe(2,arguments);var o=ee(t),l=ee(a);return o.getFullYear()-l.getFullYear()}function Sl(t,a){var o=t.getFullYear()-a.getFullYear()||t.getMonth()-a.getMonth()||t.getDate()-a.getDate()||t.getHours()-a.getHours()||t.getMinutes()-a.getMinutes()||t.getSeconds()-a.getSeconds()||t.getMilliseconds()-a.getMilliseconds();return o<0?-1:o>0?1:o}function ru(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=Sl(o,l),r=Math.abs(eu(o,l));o.setDate(o.getDate()-i*r);var n=+(Sl(o,l)===-i),s=i*(r-n);return s===0?0:s}function _a(t,a){return oe(2,arguments),ee(t).getTime()-ee(a).getTime()}var iu={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},nu="trunc";function Sa(t){return iu[nu]}function su(t,a,o){oe(2,arguments);var l=_a(t,a)/au;return Sa()(l)}function du(t,a,o){oe(2,arguments);var l=_a(t,a)/tu;return Sa()(l)}function cu(t){oe(1,arguments);var a=ee(t);return a.setHours(23,59,59,999),a}function pu(t){oe(1,arguments);var a=ee(t),o=a.getMonth();return a.setFullYear(a.getFullYear(),o+1,0),a.setHours(23,59,59,999),a}function mu(t){oe(1,arguments);var a=ee(t);return cu(a).getTime()===pu(a).getTime()}function uu(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=je(o,l),r=Math.abs(ou(o,l)),n;if(r<1)n=0;else{o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*r);var s=je(o,l)===-i;mu(ee(t))&&r===1&&je(t,l)===1&&(s=!1),n=i*(r-Number(s))}return n===0?0:n}function fu(t,a,o){oe(2,arguments);var l=_a(t,a)/1e3;return Sa()(l)}function hu(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=je(o,l),r=Math.abs(lu(o,l));o.setFullYear(1584),l.setFullYear(1584);var n=je(o,l)===-i,s=i*(r-Number(n));return s===0?0:s}function yu(t){return oe(1,arguments),ee(t).getFullYear()}function gu(t){oe(1,arguments);var a=ee(t.start),o=ee(t.end);if(isNaN(a.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(o.getTime()))throw new RangeError("End Date is invalid");var l={};l.years=Math.abs(hu(o,a));var i=je(o,a),r=tt(a,{years:i*l.years});l.months=Math.abs(uu(o,r));var n=tt(r,{months:i*l.months});l.days=Math.abs(ru(o,n));var s=tt(n,{days:i*l.days});l.hours=Math.abs(su(o,s));var c=tt(s,{hours:i*l.hours});l.minutes=Math.abs(du(o,c));var d=tt(c,{minutes:i*l.minutes});return l.seconds=Math.abs(fu(o,d)),l}const bu=new Set([1]),_u={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t,l=e.ref(null);e.watch(()=>o.modelValue,()=>{i()},{immediate:!0});function i(){l.value&&(l.value.checked=o.modelValue)}function r(n){a("update:modelValue",n.target.checked)}return e.onMounted(()=>{i()}),(n,s)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"switchCustom",ref:l,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:r},null,544))}},at=J(_u,[["__scopeId","data-v-e3a6ae4e"]]),Pe=t=>(e.pushScopeId("data-v-8c3ead4b"),t=t(),e.popScopeId(),t),Su={class:"personal-data"},Eu={class:"personal-data__age"},wu={class:"personal-data__age__toggle"},Cu={class:"personal-data__age__range"},ku={class:"personal-data__age__dropdown"},Vu=Pe(()=>e.createElementVNode("div",{class:"label"},"Año",-1)),Nu={class:"selected-item"},xu=Pe(()=>e.createElementVNode("div",{class:"separator"},null,-1)),Bu={class:"personal-data__nationality-position"},Tu={key:0,class:"personal-data__nationality-position__switch"},Fu=Pe(()=>e.createElementVNode("div",{class:"label"},"Nacionalidad",-1)),Mu=Pe(()=>e.createElementVNode("div",{class:"label"},"Elegibilidad",-1)),Au={class:"personal-data__nationality-position__nationality"},Lu=Pe(()=>e.createElementVNode("div",{class:"label"},"Nacionalidad",-1)),Pu={class:"selected-item"},Iu=Pe(()=>e.createElementVNode("div",{class:"label"},"Elegibilidad",-1)),Du={class:"selected-item"},vu={class:"personal-data__nationality-position__position"},Ru=Pe(()=>e.createElementVNode("div",{class:"label"},"Posición",-1)),Ou={class:"selected-item"},zu="https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/",Uu={__name:"TemplatePersonalData",props:{filters:{type:Object,default:()=>null},isFemale:{type:Boolean,default:!1},season:{type:Object,default:()=>({})},isScouting:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},fontFamily:{type:String,default:"'Poppins-Regular'"},awaitForFilters:{type:Boolean,default:!1}},emits:["update:filters"],setup(t,{expose:a,emit:o}){const l=t,i={id:0,name:"Todas las nacionalidades",isSelected:!1},r={id:0,name:"Todas las posiciones",isSelected:!1},n=e.ref({...ba}),s=e.ref(["Por edad","Por año"]),c=e.ref(0),d=e.ref({min:ba.minAge,max:ba.maxAge}),h=e.ref(Je),m=e.ref(""),y=e.ref(""),p=e.ref(n.value.availableYears[n.value.availableYears.length-1]),f=e.ref(0),u=e.computed(()=>{const E=n.value.nationalities?[...n.value.nationalities]:[];l.isSeleccion&&E.forEach(A=>{A.isSelected=A.id===138});const M=E[0];return(!M||M.id!==0)&&E.unshift(i),E}),g=e.computed(()=>{let E=(l.filter&&l.filter.positions?l.filter.positions:n.value.positions)?[...n.value.positions]:[];const M=E[0];return(!M||M.id!==0)&&E.unshift(r),E.sort((A,q)=>A.id-q.id),E}),V=e.computed(()=>l.season&&l.season.tournamentId&&bu.has(l.season.tournamentId)||l.filters&&l.filters.isEligibilitySwitchVisible);e.watch(u,E=>{const M=E.reduce((A,q,te)=>(te!==0&&q.isSelected&&A++,A),0);M===u.value.length-1&&(E[0].isSelected=!0),E[0]&&E[0].isSelected?m.value="Todas las nacionalidades":m.value=`${M} seleccionadas`,K()},{immediate:!0,deep:!0}),e.watch(g,E=>{const M=E.reduce((A,q,te)=>(te!==0&&q.isSelected&&A++,A),0);M===g.value.length-1&&(E[0].isSelected=!0),E[0]&&E[0].isSelected?y.value="Todas las posiciones":y.value=`${M} seleccionadas`,K()},{immediate:!0,deep:!0}),e.watch(()=>l.filters,E=>{if(E&&E.availableYears){const M=!Number.isNaN(Number(E.selectedYear));n.value=E,c.value=n.value.selectedYear&&M?1:0,p.value=M?n.value.selectedYear:n.value.availableYears[0],d.value.min=n.value.minAge,d.value.max=n.value.maxAge,r.isSelected=E.positions.every(A=>A.isSelected),K()}},{immediate:!0,deep:!0}),e.watch(()=>n.value.isEligibilitySelected,()=>{K()}),e.watch(()=>l.season,E=>{E&&E.id!==f.value&&!l.awaitForFilters&&(f.value=E.id,B(E))},{immediate:!0,deep:!1});async function B(E){try{if(E&&E.id){const M=new Set,A=await Z(E.id),q=new Date,te=[],de=new Map,re=new Map;A.forEach(N=>{const L=new Date(N.dob),R=yu(L),w=gu({start:L,end:q});de.has(N.nationality_id)||de.set(N.nationality_id,{id:N.nationality_id,isSelected:!0,name:Zm[`${N.nationality_id}`]}),re.has(N.position_id)||re.set(N.position_id,{id:N.position_id,isSelected:!0,name:Jm[`${N.position_id}`]}),M.add(R),te.push(w.years)}),n.value.minAge=Math.min(...te),n.value.maxAge=Math.max(...te),n.value.availableYears=[...M].sort((N,L)=>L-N),p.value=n.value.availableYears[0],n.value.nationalities=[...de.values()],n.value.positions=[...re.values()],d.value.min=n.value.minAge,d.value.max=n.value.maxAge}}catch(M){throw new Error(M)}}function v(E=null){const M=!E||E===ie.All;(M||E===ie.NATIONALITY)&&u.value.forEach(A=>{A.isSelected=!0}),(M||E===ie.ELIGIBILITY)&&(n.value.isEligibilitySelected=!1),(M||E===ie.POSITION)&&g.value.forEach(A=>{A.isSelected=!0}),(M||E===ie.AGE_RANGE)&&(d.value.min=n.value.minAge,d.value.max=n.value.maxAge,c.value=0),(M||E===ie.YEAR)&&(p.value=l.isScouting?n.value.availableYears[n.value.availableYears.length-1]:n.value.availableYears[0],c.value=0),K()}async function Z(E){try{const M={Authorization:localStorage.getItem("user_token")||l.token},A={}.API_PLAYERS_BY_SEASONS?{}.API_PLAYERS_BY_SEASONS:zu,q=await et.get(A+E,{headers:M});return q.data?q.data.players:[]}catch(M){return Promise.reject(M)}}function U(E){c.value=E.index,l.filters&&l.filters.availableYears&&E.index===0?l.filters.selectedYear="Sin límite":l.filters&&l.filters.availableYears&&E.index===1&&(l.filters.selectedYear=l.filters.availableYears[0])}function O(E){d.value.min=E.minValue,d.value.max=E.maxValue,K()}function Q(E,M){M.id===0?u.value.forEach(A=>{A.isSelected=E}):(M.isSelected=E,u.value[0].isSelected=u.value.every((A,q)=>q===0?!0:A.isSelected))}function K(){const E=c.value===0,M={};E?(M.ageByRange=d.value,M.ageLimits={min:n.value.minAge,max:n.value.maxAge}):M.year=p.value,n.value.isEligibilitySelected?M.eligibility=[...n.value.eligibility]:M.nationalities=u.value.reduce((A,q,te)=>(te!==0&&A.push({...q}),A),[]),M.positions=g.value.reduce((A,q,te)=>(te!==0&&A.push({...q}),A),[]),o("update:filters",M)}function F(E,M){M.id===0?g.value.forEach(A=>{A.isSelected=E}):(M.isSelected=E,g.value[0].isSelected=g.value.every((A,q)=>q===0?!0:A.isSelected))}function T(E){p.value=E,l.filters&&(l.filters.selectedYear=E),K()}return a({onClearFilters:v}),(E,M)=>(e.openBlock(),e.createElementBlock("div",Su,[e.createElementVNode("div",Eu,[e.createElementVNode("div",wu,[e.createVNode(y1,{"selected-button-index":c.value,buttons:s.value,width:"220px",onChange:U},null,8,["selected-button-index","buttons"])]),e.withDirectives(e.createElementVNode("div",Cu,[e.createVNode(e.unref(Bo),{"border-width":"0","background-color":"#0D1D29",height:"30px","font-size-value":"14px","font-size":"12px","border-width-indicador":"2px","line-in-range-color":"white","background-indicador":"#CBEE6B","min-limit":n.value.minAge,"max-limit":n.value.maxAge,"min-value":d.value.min,"max-value":d.value.max,onInput:O},null,8,["min-limit","max-limit","min-value","max-value"])],512),[[e.vShow,c.value===0]]),e.withDirectives(e.createElementVNode("div",ku,[Vu,e.createVNode(e.unref(ke),e.mergeProps({"model-value":p.value},h.value,{items:n.value.availableYears,onInput:T}),{default:e.withCtx(({selectedItem:A})=>[e.createElementVNode("div",Nu,e.toDisplayString(A),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,e.toDisplayString(A),1)]),_:1},16,["model-value","items"])],512),[[e.vShow,c.value===1]])]),xu,e.createElementVNode("div",Bu,[V.value?(e.openBlock(),e.createElementBlock("div",Tu,[Fu,e.createVNode(at,{modelValue:n.value.isEligibilitySelected,"onUpdate:modelValue":M[0]||(M[0]=A=>n.value.isEligibilitySelected=A)},null,8,["modelValue"]),Mu])):e.createCommentVNode("",!0),e.createElementVNode("div",Au,[n.value.isEligibilitySelected?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Iu,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:n.value.eligibility,"is-disabled":""}),{default:e.withCtx(({selectedItem:A})=>[e.createElementVNode("div",Du,e.toDisplayString(A.name),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:A.name,fontFamily:t.fontFamily,width:"100%","avoid-interaction":""},null,8,["model-value","label","fontFamily"])])]),_:1},16,["items"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Lu,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:u.value}),{default:e.withCtx(()=>[e.createElementVNode("div",Pu,e.toDisplayString(m.value),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:A.name,fontFamily:t.fontFamily,width:"100%","onUpdate:modelValue":q=>Q(q,A)},null,8,["model-value","label","fontFamily","onUpdate:modelValue"])])]),_:1},16,["items"])],64))]),e.createElementVNode("div",vu,[Ru,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:g.value}),{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[t.isFemale?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y.value.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva")),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(y.value),1)],64))])]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:t.isFemale?A.name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):A.name,fontFamily:t.fontFamily,width:"100%","onUpdate:modelValue":q=>F(q,A)},null,8,["model-value","label","fontFamily","onUpdate:modelValue"])])]),_:1},16,["items"])])])]))}},ju=J(Uu,[["__scopeId","data-v-8c3ead4b"]]),Hu={class:"plays"},Wu={class:"plays__body__offensive"},Gu={class:"plays__body__title"},$u={class:"number-of-categories"},qu={class:"plays__body__categories"},Yu={class:"plays__body__defensive-possession-offenses"},Zu={class:"plays__body__title"},Ju={class:"number-of-categories"},Ku={class:"plays__body__categories"},Xu={class:"plays__body__title"},Qu={class:"number-of-categories"},ef={class:"plays__body__categories"},tf={class:"plays__body__title"},af={class:"number-of-categories"},of={class:"plays__body__categories"},lf={__name:"TemplatePlays",props:{componentWidth:{type:Number,default:0},playsCategories:{type:Object,required:!0},isExpansionMode:{type:Boolean,default:!0},fontFamily:{type:String,default:"'Poppins-Regular'"}},setup(t){const a=t,o=e.ref(!1),l=e.ref(!1),i=e.ref(!1),r=e.ref(!1),n=e.computed(()=>({"--template-columns":a.isExpansionMode?"1fr":"1fr 1fr"})),s=e.computed(()=>a.playsCategories.offensive.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),c=e.computed(()=>a.playsCategories.defensive.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),d=e.computed(()=>a.playsCategories.possession.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),h=e.computed(()=>a.playsCategories.offenses.categories.reduce((p,f)=>(f.isSelected&&p++,p),0));function m(p,f){f.isSelected=p}function y(p){p==="offensive"?o.value=!o.value:p==="defensive"?l.value=!l.value:p==="possession"?i.value=!i.value:p==="offenses"&&(r.value=!r.value)}return(p,f)=>(e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",{class:"plays__body",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Wu,[e.createElementVNode("div",Gu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[0]||(f[0]=u=>y("offensive"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.offensive.title),1),e.createElementVNode("span",$u,"("+e.toDisplayString(s.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[1]||(f[1]=u=>y("offensive"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":o.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.offensive.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||o.value]])]),e.createElementVNode("div",Yu,[e.createElementVNode("div",Zu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[2]||(f[2]=u=>y("defensive"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.defensive.title),1),e.createElementVNode("span",Ju,"("+e.toDisplayString(c.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[3]||(f[3]=u=>y("defensive"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":l.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",Ku,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.defensive.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||l.value]]),e.createElementVNode("div",Xu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[4]||(f[4]=u=>y("possession"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.possession.title),1),e.createElementVNode("span",Qu,"("+e.toDisplayString(d.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[5]||(f[5]=u=>y("possession"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":i.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.possession.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||i.value]]),e.createElementVNode("div",tf,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[6]||(f[6]=u=>y("offenses"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.offenses.title),1),e.createElementVNode("span",af,"("+e.toDisplayString(h.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[7]||(f[7]=u=>y("offenses"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":r.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",of,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.offenses.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||r.value]])])],4)]))}},rf=J(lf,[["__scopeId","data-v-364e6cae"]]),nf={class:"template-results"},sf={__name:"TemplateResults",props:{resultsFilters:{type:Object,default:()=>({results:[]})}},emits:["update:resultsFilters"],setup(t,{emit:a}){const o=t,l=e.computed(()=>o.resultsFilters.results.filter(i=>i.isSelected).length);return e.watch(()=>o.resultsFilters,i=>{a("update:resultsFilters",i)},{deep:!0,immediate:!0}),(i,r)=>(e.openBlock(),e.createElementBlock("div",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.resultsFilters.results,(n,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:n.isSelected,"onUpdate:modelValue":c=>n.isSelected=c,label:n.name,"avoid-interaction":l.value===1&&n.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))]))}},df=J(sf,[["__scopeId","data-v-453e89c2"]]),cf={__name:"ButtonCustom",props:{text:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},padding:{type:String,default:"0px"},borderRadius:{type:String,default:"0px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"#d9d9d9"},backgroundColor:{type:String,default:"#FFFFFF"},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},activeFontColor:{type:String,default:""},fontColor:{type:String,default:"#000000"},fontSize:{type:String,default:"16px"},fontFamily:{type:String,default:"Poppins-Regular, sans-serif"},isActive:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const o=t,l=e.computed(()=>({"--height":o.height,"--width":o.width,"--padding":o.padding,"--border-radius":o.borderRadius,"--border":`solid ${o.borderWidth} ${o.borderColor}`,"--background-color":o.backgroundColor,"--font-color":o.fontColor,"--font-size":o.fontSize,"--font-family":o.fontFamily,"--active-background-color":o.activeBackgroundColor||o.backgroundColor,"--active-border-color":o.activeBorderColor||o.borderColor,"--active-font-color":o.activeFontColor||o.fontColor}));function i(){a("click")}return(r,n)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["button",{active:t.isActive}]),style:e.normalizeStyle(l.value),onClick:i},e.toDisplayString(t.text),7))}},ot=J(cf,[["__scopeId","data-v-9688933e"]]),pf={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},El={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},mf={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},uf={4:"OF",5:"Cf",6:"S",7:"F"};function Ea(t=""){return t?localStorage.getItem(t):localStorage.getItem("user_token")||localStorage.getItem("token")}const ff={class:"dropdown"},hf={class:"selected-item"},yf={__name:"DropdownTextOnly",props:{items:{type:Array,default:()=>[]},itemTextKey:{type:String,default:""},isListSameWidth:{type:Boolean,default:!0}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{"is-list-same-width":t.isListSameWidth,items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",hf,e.toDisplayString(t.itemTextKey?r[t.itemTextKey]:r),1)]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",null,e.toDisplayString(t.itemTextKey?r[t.itemTextKey]:r),1)]),_:1},16,["is-list-same-width","items"])]))}},me=J(yf,[["__scopeId","data-v-064d5f86"]]),gf={class:"dropdown"},bf={class:"game-item"},_f={key:0,class:"item-game"},Sf={class:"match-day"},Ef={class:"team-logo"},wf=["src"],Cf={class:"text"},kf={class:"text score"},Vf={class:"text"},Nf={class:"team-logo"},xf=["src"],Bf={class:"item-game"},Tf={class:"team-logo"},Ff=["src"],Mf={class:"text"},Af={class:"text score"},Lf={class:"text"},Pf={class:"team-logo"},If=["src"],Df={__name:"DropdownGame",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",gf,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",bf,[r.homeTeam?(e.openBlock(),e.createElementBlock("div",_f,[e.createElementVNode("div",Sf,e.toDisplayString(r.roundAbbreviation),1),e.createElementVNode("div",Ef,[e.createElementVNode("img",{src:r.homeTeam.logo,alt:""},null,8,wf)]),e.createElementVNode("div",Cf,e.toDisplayString(r.homeTeam.acronym),1),e.createElementVNode("div",kf,e.toDisplayString(r.score[0])+" - "+e.toDisplayString(r.score[1]),1),e.createElementVNode("div",Vf,e.toDisplayString(r.awayTeam.acronym),1),e.createElementVNode("div",Nf,[e.createElementVNode("img",{src:r.awayTeam.logo,alt:""},null,8,xf)])])):e.createCommentVNode("",!0)])]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",Bf,[e.createElementVNode("div",null,e.toDisplayString(r.roundAbbreviation),1),e.createElementVNode("div",Tf,[e.createElementVNode("img",{src:r.homeTeam.logo,alt:""},null,8,Ff)]),e.createElementVNode("div",Mf,e.toDisplayString(r.homeTeam.acronym),1),e.createElementVNode("div",Af,e.toDisplayString(r.score[0])+" - "+e.toDisplayString(r.score[1]),1),e.createElementVNode("div",Lf,e.toDisplayString(r.awayTeam.acronym),1),e.createElementVNode("div",Pf,[e.createElementVNode("img",{src:r.awayTeam.logo,alt:""},null,8,If)])])]),_:1},16,["items"])]))}},Lt=J(Df,[["__scopeId","data-v-7883a91e"]]),Pt=t=>(e.pushScopeId("data-v-b63e9c84"),t=t(),e.popScopeId(),t),vf={class:"container"},Rf={class:"container__row"},Of={class:"container__row__wrapper"},zf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Uf={class:"container__row__wrapper__input"},jf={class:"container__row two-items"},Hf={class:"container__row__wrapper"},Wf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),Gf={key:0,class:"container__row__wrapper__input"},$f={class:"container__row__wrapper"},qf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),Yf={key:0,class:"container__row__wrapper__input"},Zf={class:"container__row"},Jf={class:"container__row__wrapper"},Kf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),Xf={key:0,class:"container__row__wrapper__input"},Qf={class:"container__action"},eh={__name:"VideosGoals",props:{tournaments:{type:Array,required:!0}},emits:["update:tournament","update:season"],setup(t,{emit:a}){const o={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},l=e.ref(null),i=e.ref(null),r=e.ref(null),n=e.ref(null);function s(m){l.value=m,a("update:tournament",m)}function c(m){i.value=m,a("update:season",m)}function d(m){r.value=m}function h(m){n.value=m}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",vf,[e.createElementVNode("div",Rf,[e.createElementVNode("div",Of,[zf,e.createElementVNode("div",Uf,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:s},null,8,["items"])])])]),e.createElementVNode("div",jf,[e.createElementVNode("div",Hf,[Wf,l.value&&l.value.seasons?(e.openBlock(),e.createElementBlock("div",Gf,[e.createVNode(me,{items:l.value.seasons,itemTextKey:"name",onInput:c},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",$f,[qf,i.value&&i.value.arrayMatchDays?(e.openBlock(),e.createElementBlock("div",Yf,[e.createVNode(me,{items:i.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:d},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Zf,[e.createElementVNode("div",Jf,[Kf,r.value&&r.value.arrayGames?(e.openBlock(),e.createElementBlock("div",Xf,[e.createVNode(Lt,{items:r.value.arrayGames,onInput:h},null,8,["items"])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Qf,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(o)),null,16)])],64))}},th=J(eh,[["__scopeId","data-v-b63e9c84"]]),ah={class:"dropdown"},oh={class:"item-team"},lh={class:"team-logo"},rh=["src"],ih={class:"team-acronym"},nh={class:"item-team"},sh={class:"team-logo"},dh=["src"],ch={class:"team-acronym"},ph={__name:"DropdownTeam",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",oh,[e.createElementVNode("div",lh,[e.createElementVNode("img",{src:r.logo,alt:""},null,8,rh)]),e.createElementVNode("div",ih,e.toDisplayString(r.acronym),1)])]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",nh,[e.createElementVNode("div",sh,[e.createElementVNode("img",{src:r.logo,alt:""},null,8,dh)]),e.createElementVNode("div",ch,e.toDisplayString(r.acronym),1)])]),_:1},16,["items"])]))}},wl=J(ph,[["__scopeId","data-v-afd2bee8"]]),mh={class:"advanced-filters"},uh={class:"advanced-filters__buttons"},fh=["onClick"],hh={class:"advanced-filters__filters"},yh={__name:"AdvancedFilters",props:{selectedCategory:{type:Object,default:()=>({})}},setup(t){const a=t,o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>O6)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>ob)),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rb)),r=[{name:"Sub categorías",component:o},{name:"Cancha",component:i},{name:"Condiciones",component:l}],n=e.ref(r[0]),s=e.computed(()=>a.selectedCategory?a.selectedCategory.subcategoryGroups||[]:[]);function c(d){n.value=d}return(d,h)=>(e.openBlock(),e.createElementBlock("div",mh,[e.createElementVNode("div",uh,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,m=>e.createElementVNode("div",{key:m.name,role:"button",class:e.normalizeClass(["advanced-filters__buttons__button",{active:n.value.name===m.name}]),onClick:y=>c(m)},e.toDisplayString(m.name),11,fh)),64))]),e.createElementVNode("div",hh,[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value.component),{"subcategory-groups":s.value},null,8,["subcategory-groups"]))],1024))])]))}},wa=J(yh,[["__scopeId","data-v-c62c5b9c"]]),Ie=t=>(e.pushScopeId("data-v-575b26b5"),t=t(),e.popScopeId(),t),gh={class:"container"},bh={class:"container__row"},_h={class:"container__row__wrapper"},Sh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Eh={class:"container__row__wrapper__input"},wh={class:"container__row two-items"},Ch={class:"container__row__wrapper"},kh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),Vh={key:0,class:"container__row__wrapper__input"},Nh={class:"container__row__wrapper"},xh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. En que equipo juega?",-1)),Bh={key:0,class:"container__row__wrapper__input"},Th={class:"container__row"},Fh={class:"container__row__wrapper"},Mh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Nombre del jugador",-1)),Ah={key:0,class:"container__row__wrapper__input"},Lh={class:"container__row"},Ph={class:"container__row__wrapper"},Ih=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el partido",-1)),Dh={key:0,class:"container__row__wrapper__input"},vh={class:"container__row type-and-advanced"},Rh={class:"container__row__wrapper"},Oh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),zh={class:"container__row__wrapper__input"},Uh={class:"container__row__wrapper center"},jh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),Hh={class:"container__row__wrapper__input"},Wh={class:"container__row"},Gh={class:"container__action"},$h={__name:"VideosPlayer",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({player:[],goalkeeper:[]})}},emits:["update:tournament","update:season","update:team"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null);e.ref(null);const n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(null),h=e.ref(!0),m=e.computed(()=>c.value?c.value.position_id===1?o.advancedFilterCategories.goalkeeper:o.advancedFilterCategories.player:[]);function y(B){i.value=B,a("update:tournament",B)}function p(B){r.value=B,a("update:season",B)}function f(B){s.value=B,a("update:team",B)}function u(B){c.value=B}function g(B){n.value=B}function V(B){d.value=B}return(B,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gh,[e.createElementVNode("div",bh,[e.createElementVNode("div",_h,[Sh,e.createElementVNode("div",Eh,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:y},null,8,["items"])])])]),e.createElementVNode("div",wh,[e.createElementVNode("div",Ch,[kh,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",Vh,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Nh,[xh,r.value&&r.value.arrayTeams?(e.openBlock(),e.createElementBlock("div",Bh,[e.createVNode(wl,{items:r.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Th,[e.createElementVNode("div",Fh,[Mh,s.value&&s.value.arrayPlayers?(e.openBlock(),e.createElementBlock("div",Ah,[e.createVNode(me,{items:s.value.arrayPlayers,itemTextKey:"player_name",onInput:u},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Lh,[e.createElementVNode("div",Ph,[Ih,r.value&&r.value.mapGamesByTeam&&s.value?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Lt,{items:r.value.mapGamesByTeam.get(s.value.team_id),onInput:g},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",vh,[e.createElementVNode("div",Rh,[Oh,e.createElementVNode("div",zh,[e.createVNode(me,{items:m.value,itemTextKey:"name","is-list-same-width":!1,onInput:V},null,8,["items"])])]),e.createElementVNode("div",Uh,[jh,e.createElementVNode("div",Hh,[e.createVNode(at,{modelValue:h.value,"onUpdate:modelValue":v[0]||(v[0]=Z=>h.value=Z)},null,8,["modelValue"])])])]),e.createElementVNode("div",Wh,[e.createVNode(wa,{"selected-category":d.value},null,8,["selected-category"])])]),e.createElementVNode("div",Gh,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},qh=J($h,[["__scopeId","data-v-575b26b5"]]),He=t=>(e.pushScopeId("data-v-6d73d5e6"),t=t(),e.popScopeId(),t),Yh={class:"container"},Zh={class:"container__row"},Jh={class:"container__row__wrapper"},Kh=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Xh={class:"container__row__wrapper__input"},Qh={class:"container__row two-items"},e0={class:"container__row__wrapper"},t0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),a0={key:0,class:"container__row__wrapper__input"},o0={class:"container__row__wrapper"},l0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige el equipo",-1)),r0={key:0,class:"container__row__wrapper__input"},i0={class:"container__row"},n0={class:"container__row__wrapper"},s0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),d0={key:0,class:"container__row__wrapper__input"},c0={class:"container__row type-and-advanced"},p0={class:"container__row__wrapper"},m0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el tipo de video",-1)),u0={class:"container__row__wrapper__input"},f0={class:"container__row__wrapper center"},h0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),y0={class:"container__row__wrapper__input"},g0={class:"container__row"},b0={class:"container__action"},_0={__name:"VideosTeam",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({team:[]})}},emits:["update:tournament","update:season","update:team"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null);e.ref(null);const n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(!0),h=e.computed(()=>o.advancedFilterCategories.team);function m(g){i.value=g,a("update:tournament",g)}function y(g){r.value=g,a("update:season",g)}function p(g){s.value=g,a("update:team",g)}function f(g){n.value=g}function u(g){c.value=g}return(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Yh,[e.createElementVNode("div",Zh,[e.createElementVNode("div",Jh,[Kh,e.createElementVNode("div",Xh,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:m},null,8,["items"])])])]),e.createElementVNode("div",Qh,[e.createElementVNode("div",e0,[t0,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:y},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",o0,[l0,r.value&&r.value.arrayTeams?(e.openBlock(),e.createElementBlock("div",r0,[e.createVNode(wl,{items:r.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",i0,[e.createElementVNode("div",n0,[s0,r.value&&r.value.mapGamesByTeam&&s.value?(e.openBlock(),e.createElementBlock("div",d0,[e.createVNode(Lt,{items:r.value.mapGamesByTeam.get(s.value.team_id),onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",c0,[e.createElementVNode("div",p0,[m0,e.createElementVNode("div",u0,[e.createVNode(me,{items:h.value,itemTextKey:"name","is-list-same-width":!1,onInput:u},null,8,["items"])])]),e.createElementVNode("div",f0,[h0,e.createElementVNode("div",y0,[e.createVNode(at,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=B=>d.value=B)},null,8,["modelValue"])])])]),e.createElementVNode("div",g0,[e.createVNode(wa,{"selected-category":c.value},null,8,["selected-category"])])]),e.createElementVNode("div",b0,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},S0=J(_0,[["__scopeId","data-v-6d73d5e6"]]),We=t=>(e.pushScopeId("data-v-6e904db8"),t=t(),e.popScopeId(),t),E0={class:"container"},w0={class:"container__row"},C0={class:"container__row__wrapper"},k0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),V0={class:"container__row__wrapper__input"},N0={class:"container__row two-items"},x0={class:"container__row__wrapper"},B0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),T0={key:0,class:"container__row__wrapper__input"},F0={class:"container__row__wrapper"},M0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),A0={key:0,class:"container__row__wrapper__input"},L0={class:"container__row"},P0={class:"container__row__wrapper"},I0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),D0={key:0,class:"container__row__wrapper__input"},v0={class:"container__row type-and-advanced"},R0={class:"container__row__wrapper"},O0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),z0={class:"container__row__wrapper__input"},U0={class:"container__row__wrapper center"},j0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),H0={class:"container__row__wrapper__input",style:{width:"fit-content"}},W0={class:"container__row"},G0={class:"container__action"},$0={__name:"VideosGame",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({games:[]})}},emits:["update:tournament","update:season"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null),n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(!0),h=e.computed(()=>o.advancedFilterCategories.games);function m(g){i.value=g,a("update:tournament",g)}function y(g){r.value=g,a("update:season",g)}function p(g){n.value=g}function f(g){s.value=g}function u(g){c.value=g}return(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E0,[e.createElementVNode("div",w0,[e.createElementVNode("div",C0,[k0,e.createElementVNode("div",V0,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:m},null,8,["items"])])])]),e.createElementVNode("div",N0,[e.createElementVNode("div",x0,[B0,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",T0,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:y},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",F0,[M0,r.value&&r.value.arrayMatchDays?(e.openBlock(),e.createElementBlock("div",A0,[e.createVNode(me,{items:r.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",L0,[e.createElementVNode("div",P0,[I0,n.value&&n.value.arrayGames?(e.openBlock(),e.createElementBlock("div",D0,[e.createVNode(Lt,{items:n.value.arrayGames,onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",v0,[e.createElementVNode("div",R0,[O0,e.createElementVNode("div",z0,[e.createVNode(me,{items:h.value,itemTextKey:"name","is-list-same-width":!1,onInput:u},null,8,["items"])])]),e.createElementVNode("div",U0,[j0,e.createElementVNode("div",H0,[e.createVNode(at,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=B=>d.value=B)},null,8,["modelValue"])])])]),e.createElementVNode("div",W0,[e.createVNode(wa,{"selected-category":c.value},null,8,["selected-category"])])]),e.createElementVNode("div",G0,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},q0=J($0,[["__scopeId","data-v-6e904db8"]]),Y0={class:"template-videos"},Z0={class:"template-videos__header"},J0={class:"template-videos__body"},K0=e.defineComponent({name:"TemplateVideos",components:{VideosGoals:th,VideosPlayer:qh,VideosTeam:S0,VideosGame:q0}}),X0=Object.assign(K0,{props:{gamesUrl:{type:String,default:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?"},tournamentsUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"},playersUrl:{type:String,default:"https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/"},token:{type:String,default:""}},emits:["loading-data"],setup(t,{emit:a}){const o=t,l={padding:"4px 18px",borderRadius:"160px",backgroundColor:"#3A4851",borderColor:"#3A4851",activeBorderColor:"#CBEE6B",fontSize:"11px",fontColor:"#FFFFFF"},i=[],r=["g-23","g-24","g-25"],n={games:[607,608,12,55,54,35,14,52,15,53,466,477],team:[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39],player:{regular:[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257],goalkeeper:[55,324,323,608,39,774,802,52,53,40,54]}},s={player:1,team:2,goalkeeper:3},c=e.ref([{name:"Goles",componentName:"VideosGoals"},{name:"Jugador",componentName:"VideosPlayer"},{name:"Equipo",componentName:"VideosTeam"},{name:"Partido",componentName:"VideosGame"}]),d=e.ref([]),h=e.ref(c.value[0]),m=e.ref({}),y=e.ref({}),p=e.ref({}),f=e.ref({}),u=e.ref({games:[],player:[],team:[],goalkeeper:[],isEmpty:!0}),g=e.ref([]);e.ref({});const V=e.ref(null);e.watch(m,N=>{y.value.numberSeasonSelectedIndex=y.value.seasons.findIndex(L=>L.id===N.id),N.arrayMatchDays?(f.value=N.arrayMatchDays[0]||{},p.value=N.arrayTeams[0]||{}):(O(N),Q(N))}),e.watch(p,()=>{setTimeout(()=>{m.value.mapPlayersByTeam&&(!p.value.arrayPlayers||!p.value.arrayPlayers.length)&&(p.value.arrayPlayers=m.value.mapPlayersByTeam.get(p.value.team_id))},700)});async function B(){try{d.value=await v()}catch(N){throw new Error(N)}}async function v(){try{const N={Authorization:Ea()||o.token},L={}.API_TOURNAMENTS||o.tournamentsUrl,R=await et.get(L,{headers:N});return R.data?R.data.map(w=>({...w.tournament,seasons:w.seasons})):[]}catch(N){return Promise.reject(N)}}async function Z(N,L,R=""){a("loading-data");let w=R;try{w||(w={}.API_CALENDAR_GAMES_BY_SEASON||o.gamesUrl,N.forEach((P,_)=>{w+=`${_===0?"":"&"}seasons=${P}`}));const I={Authorization:Ea()||o.token},{data:{data:j,teams:z}}=await et.get(w,{headers:I});return{seasonsAndGames:j,seasonsAndTeams:z}}catch(I){if(L>0)return Z(N,L-1,w);throw new Error(I)}finally{a("loading-data")}}async function U(N){try{const L={Authorization:Ea()||o.token},R=` ${{}.API_PLAYERS_BY_SEASON||o.playersUrl}${N.seasonId}`,w=await et.get(R,{headers:L});return w.data?w.data.players:[]}catch(L){return Promise.reject(L)}}async function O(N){try{const{seasonsAndGames:L,seasonsAndTeams:R}=await Z([N.id,...N.related_seasons.map(z=>z.id)],3),w=R.find(z=>z._id===N.id);m.value.arrayTeams=[],m.value.mapTeams=new Map;const I=w.teams.reduce((z,P)=>(m.value.arrayTeams.push(P),m.value.mapTeams.set(P.team_id,{name:P.colloquial_name,acronym:P.acronym,logo:P.logo,id:P.team_id}),z.set(P.team_id,P),z),new Map);p.value=m.value.arrayTeams[0],m.value.mapGames=new Map,m.value.mapGamesByTeam=new Map;const j=Array.from(L.reduce((z,P)=>(P.games.forEach(_=>{if(_.game_status===1&&_.has_video){(!m.value.maxGameId||_.game_id>m.value.maxGameId)&&(m.value.maxGameId=_.game_id);let S=_.matchday_abbreviation.replace("M","J"),x=_.matchday_abbreviation.replace("M","Jornada ");const $=_.matchday_abbreviation.replace("M","");P.season_type===0?y.value.tournament_type===1&&(_.seasonId===881?(S=uf[$]||S,x=mf[$]||x):(S=El[_.matchday_abbreviation]?_.matchday_abbreviation:S,x=El[_.matchday_abbreviation]||x,S==="FINAL"&&(S="F"))):P.season_type===1?(S=pf[_.matchday_abbreviation],x=S):(S=_.matchday_abbreviation.replace("PO","R"),x="Repechaje"),_.roundAbbreviation=S,_.roundName=x,m.value.mapGames.set(_.game_id,{id:_.game_id,date:_.date,dateTimeMillis:new Date(_.date_time_utc).valueOf(),homeTeam:m.value.mapTeams.get(_.home_team),awayTeam:m.value.mapTeams.get(_.visiting_team),roundAbbreviation:_.roundAbbreviation,roundName:_.roundName,score:_.score,gameResult:_.score[0]>_.score[1]?1:_.score[0]<_.score[1]?2:3,seasonId:P.season_id});const Ne=z.get(_.roundAbbreviation);_.numberDateTimeMillis=new Date(_.date_time_utc).getTime(),_.homeTeam=I.get(_.home_team),_.awayTeam=I.get(_.visiting_team);const Dt=m.value.mapGamesByTeam.get(_.home_team),ae=m.value.mapGamesByTeam.get(_.visiting_team);Dt?Dt.push(_):m.value.mapGamesByTeam.set(_.home_team,[_]),ae?ae.push(_):m.value.mapGamesByTeam.set(_.visiting_team,[_]),Ne?Ne.arrayGames.push(_):z.set(_.roundAbbreviation,{stringMatchDayAbbreviation:_.roundAbbreviation,stringMatchDayName:_.roundName,arrayGames:[_]})}}),z),new Map).values());j.reverse(),j.forEach(z=>{z.arrayGames.sort((P,_)=>P.numberDateTimeMillis-_.numberDateTimeMillis)}),m.value.arrayMatchDays=j,f.value=j[0]||{}}catch(L){throw new Error(L)}}async function Q(N){try{const L=await M(N.id);m.value.mapPlayers=new Map,m.value.mapPlayersByTeam=L.reduce((R,w)=>{m.value.mapPlayers.set(w.player_id,{id:w.player_id,name:w.player_name,shortName:w.shortName,photo:w.player_photo,teamId:w.team_id,positionId:w.position_id});const I=R.get(w.team_id);return I?I.push(w):R.set(w.team_id,[w]),R},new Map)}catch(L){throw new Error(L)}}async function K(){try{let N=[];u.value.isEmpty?(N=await A(),g.value={...N}):N=g.value;const L=[];if(N&&N.length){u.value=N.reduce((P,_)=>{if(_.group_id!=="g-55"){const S={idAux:_.group_id,ids:[..._.ids?_.ids:[],..._.rival_Ids?_.rival_Ids:[]],type:_.type,name:_.name,coordinatePoint:_.coordinate_point,requiresRivalTransform:r.includes(_.group_id)};S.idsAux=[...S.ids],S.subcategoryGroups=_.group_id==="g-12"?[]:F(_,0,new Map,!1,{},S.idsAux),L.push(S),S.type.includes(s.player)&&P.player.push(S),S.type.includes(s.team)&&(S.idAux!=="g-2"&&P.games.push(S),P.team.push(S)),S.type.includes(s.goalkeeper)&&P.goalkeeper.push(S)}return P},{games:[],player:[],team:[],goalkeeper:[],isEmpty:!1});const R=new Map,w="Resumen",I="Todas sus jugadas",j=u.value.player.reduce((P,_)=>{const S=T(_);return S.forEach(x=>{R.set(x,_.name)}),P.push(...S),P},[]),z=u.value.goalkeeper.reduce((P,_)=>{const S=T(_);return S.forEach(x=>{R.set(x,_.name)}),P.push(...S),P},[]);u.value.games.unshift({name:w,arrayCategoriesIds:n.games,booleanIsBestPlays:!0}),u.value.team.unshift({name:w,arrayCategoriesIds:n.team,booleanIsBestPlays:!0}),u.value.player.unshift({name:w,arrayCategoriesIds:n.player.regular,booleanIsBestPlays:!0},{name:I,arrayCategoriesIds:j,booleanIsMinutesPlayed:!0}),u.value.goalkeeper.unshift({name:w,arrayCategoriesIds:n.player.goalkeeper,booleanIsBestPlays:!0},{name:I,arrayCategoriesIds:z,booleanIsMinutesPlayed:!0})}}catch(N){throw new Error(N)}}function F(N,L=0,R=new Map,w=!1,I={},j=[]){if(!N.group_id)return;let z=R.get(L);const P=w?`${N.id_category}_r`:N.id_category;N.id_category&&j.push(N.id_category);let _={ids:[P],groupId:N.group_id,level:L,name:N.name,isSelected:!0,fatherCategories:L>0?[I]:[],idsByFatherCategory:{[N.category_father]:[P]}};if(L>0&&L===1&&(_.id=N.id_category),z&&L!==0){const S=N.group_id.charAt(N.group_id.length-1),x=z.find($=>$.groupId.endsWith(S));x&&!i.includes(_.groupId)?(_=x,x.ids.push(P),x.fatherCategories.push(I),x.fatherCategories.forEach($=>{$.childCategories?$.childCategories.find(Ne=>Ne.groupId===_.groupId)||$.childCategories.push(_):$.childCategories=[_]}),x.idsByFatherCategory[N.category_father]?x.idsByFatherCategory[N.category_father].push(P):x.idsByFatherCategory[N.category_father]=[P]):(_.fatherCategories.forEach($=>{$.childCategories?$.childCategories.find(Ne=>Ne.groupId===_.groupId)||$.childCategories.push(_):$.childCategories=[_]}),z.push(_))}else L!==0&&(I.childCategories?I.childCategories.push(_):I.childCategories=[_],z=[_],R.set(L,z));if(N.categories&&N.categories.length?N.categories.forEach(S=>{F(S,L+1,R,w,_,j)}):N.rival_categories&&N.rival_categories.length&&N.rival_categories.forEach(S=>{F(S,L+1,R,!0,_,j)}),L===0)return Array.from(R.values())}function T(N){const L=N||N;if(L.booleanIsBestPlays)return L.arrayCategoriesIds;const R={total:[],toRemove:[]};if(L.subcategoryGroups&&L.subcategoryGroups.length?L.subcategoryGroups[0].forEach(w=>{E(w,null,R)}):(L.ids&&R.total.push(...L.ids),L.rival_ids&&L.rival_ids.forEach(w=>{R.total.push(`${w}_r`)})),R.total=R.total.reduce((w,I)=>(R.toRemove.includes(I)||w.push(I),w),[]),!N){const w=L.name.toLowerCase().includes("recibid");V.value.isRivalSubject=w,V.value.avoidCategorySingleName=w,V.value.coordinatePoint=L.coordinatePoint,V.value.requiresRivalTransform=L.requiresRivalTransform}return R.total}function E(N,L=[],R={total:[],toRemove:[]}){N.isSelected?N.childCategories?N.childCategories.forEach(w=>{const I=L?Object.entries(N.idsByFatherCategory).reduce((j,[z,P])=>(L.includes(Number(z))&&P.forEach(_=>{typeof _=="string"&&_.endsWith("_r")?j.push(Number(_.split("_")[0])):j.push(_)}),j),[]):[N.id];E(w,I,R)}):L?Object.entries(N.idsByFatherCategory).forEach(([w,I])=>{L.includes(Number(w))&&I.forEach(j=>{R.total.push(j)})}):N.level===1?Object.entries(N.idsByFatherCategory).forEach(([w,I])=>{I.forEach(j=>{R.total.push(j)})}):R.total.push(N.id):N.childCategories||N.ids.forEach(w=>{R.toRemove.push(w)})}async function M(N){try{const L=await U({seasonId:N});return L.forEach(R=>{const[w,I]=R.player_name.split(","),j=w.split(" ");let z="";for(const P of j)if(z+=` ${P}`,P.length>3)break;R.shortName=I&&w?`${I.trim().charAt(0)}.${z}`:""}),L}catch(L){return Promise.reject(L)}}async function A(){try{const N={Authorization:localStorage.getItem("user_token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"};return(await et.get("https://2gfppi9wb6.execute-api.us-east-2.amazonaws.com/prod/videos/categories",{headers:N})).data||[]}catch(N){return Promise.reject(N)}}function q(N){h.value=N}function te(N){y.value=N,m.value=N.seasons[0]}function de(N){m.value=N}function re(N){p.value=N}return B(),K(),(N,L)=>(e.openBlock(),e.createElementBlock("div",Y0,[e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,R=>(e.openBlock(),e.createBlock(ot,e.mergeProps({key:R.name},l,{text:R.name,"is-active":h.value.componentName===R.componentName,tournaments:d.value,onClick:w=>q(R)}),null,16,["text","is-active","tournaments","onClick"]))),128))]),e.createElementVNode("div",J0,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value.componentName),{tournaments:d.value,"advanced-filter-categories":u.value,"onUpdate:tournament":te,"onUpdate:season":de,"onUpdate:team":re},null,40,["tournaments","advanced-filter-categories"]))])]))}}),Q0=J(X0,[["__scopeId","data-v-d6f7aec8"]]),Cl=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 "],[10,"Desconocida"]]),e2={class:"template-taken-corners"},t2={class:"template-taken-corners__header"},a2={class:"template-taken-corners__header__all"},o2={class:"template-taken-corners__body"},l2={class:"template-taken-corners__body__players"},r2={class:"template-taken-corners__body__players__player__jersey"},i2={class:"template-taken-corners__body__players__player__photo"},n2={class:"template-taken-corners__body__players__player__photo__img"},s2=["src"],d2={class:"template-taken-corners__body__players__player__info"},c2={class:"template-taken-corners__body__players__player__info__name"},p2={class:"template-taken-corners__body__players__player__info__position"},m2={class:"template-taken-corners__body__players__player__info__position__nationality"},u2=["src"],f2={class:"template-taken-corners__body__players__player__info__position__name"},h2={class:"template-taken-corners__body__players__player__checkbox"},y2={__name:"TemplateTakenCorners",props:{isFemale:{type:Boolean,default:!1},isExpansionMode:{type:Boolean,default:!1},takenCornersFilters:{type:Array,default:()=>[]}},emits:["change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(!1),r=e.ref([]),n=e.computed(()=>l.isExpansionMode?"Cobradores filtrados:":"Cobradores con los filtros seleccionados"),s=e.computed(()=>r.value.reduce((u,g)=>g.isSelected?u+1:u,0));e.watch(()=>l.takenCornersFilters,u=>{r.value=u.map(g=>{const V={...g};return(g.isSelected===void 0||g.isSelected===null)&&(V.isSelected=!0),V})},{immediate:!0,deep:!0}),e.watch(s,u=>{i.value=u===r.value.length,o("change-filters-selected",u),o("update:filters",r.value)},{immediate:!0});function c(u){return`https://golstatsimages.blob.core.windows.net/flags/${u}.jpg`}function d(u){return`https://golstatsimages.blob.core.windows.net/players-profile/${u}.png`}function h(u){let g=!1;return u.split(" ").reduce((V,B)=>(g||(B.length>3?(V=B,g=!0):V+=`${B} `),V),"").trim()}function m(u){return`${h(u.last_name)}, ${u.first_name.trim()}`}function y(u){return l.isFemale?Cl.get(u.positions[0]).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):Cl.get(u.positions[0])}function p(u){u?r.value.forEach(g=>{g.isSelected=!0}):r.value.forEach((g,V)=>{g.isSelected=V===0})}function f(){r.value.forEach(u=>{u.isSelected=!0})}return a({clearFilters:f}),(u,g)=>(e.openBlock(),e.createElementBlock("div",e2,[e.createElementVNode("div",t2,[e.createElementVNode("div",{class:"template-taken-corners__header__text",style:e.normalizeStyle({opacity:t.isExpansionMode?"0.6":1,"font-size":t.isExpansionMode?"12px":"14px"})},e.toDisplayString(n.value),5),e.createElementVNode("div",a2,[e.createVNode(e.unref(Y),{"model-value":i.value,label:"Seleccionar todos","onUpdate:modelValue":p},null,8,["model-value"])])]),e.createElementVNode("div",o2,[e.createElementVNode("div",l2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,V=>(e.openBlock(),e.createElementBlock("div",{key:V.player_id,class:"template-taken-corners__body__players__player"},[e.createElementVNode("div",r2,e.toDisplayString(V.jersey),1),e.createElementVNode("div",i2,[e.createElementVNode("div",n2,[e.createElementVNode("img",{src:d(V.player_id),alt:"player photo",width:"36",height:"36"},null,8,s2)])]),e.createElementVNode("div",d2,[e.createElementVNode("div",c2,e.toDisplayString(m(V)),1),e.createElementVNode("div",p2,[e.createElementVNode("div",m2,[e.createElementVNode("img",{src:c(V.nationality_id),alt:"country flag"},null,8,u2)]),e.createElementVNode("div",f2,e.toDisplayString(y(V)),1)])]),e.createElementVNode("div",h2,[e.createVNode(e.unref(Y),{modelValue:V.isSelected,"onUpdate:modelValue":B=>V.isSelected=B,"avoid-interaction":s.value===1&&V.isSelected},null,8,["modelValue","onUpdate:modelValue","avoid-interaction"])])]))),128))])])]))}},g2=J(y2,[["__scopeId","data-v-763fcc54"]]),Ca={cornerType:"left",left:[{title:"Comba hacia afuera",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[120]},{title:"Comba hacia adentro",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[126]},{title:"Raso al área",imgSrc:"https://golstatsimages.blob.core.windows.net/content/raz-area-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[327]},{title:"En corto",imgSrc:"https://golstatsimages.blob.core.windows.net/content/en-corto-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[133]}],right:[{title:"Comba hacia afuera",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-derecha.png",howMany:0,isSelected:!0,categoriesIds:[134]},{title:"Comba hacia adentro",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-derecha.png",howMany:0,isSelected:!0,categoriesIds:[140]},{title:"Raso al área",imgSrc:"https://golstatsimages.blob.core.windows.net/content/raz-area-derecha.png",howMany:0,isSelected:!0,categoriesIds:[146]},{title:"En corto",imgSrc:"https://golstatsimages.blob.core.windows.net/content/en-corto-derecha.png",howMany:0,isSelected:!0,categoriesIds:[147]}]},ka=t=>(e.pushScopeId("data-v-b7e3b8e0"),t=t(),e.popScopeId(),t),b2={class:"template-how-was-corner"},_2={class:"template-how-was-corner__header"},S2=ka(()=>e.createElementVNode("div",{class:"template-how-was-corner__header__zone"},"ZONA:",-1)),E2={class:"template-how-was-corner__header__radio-input"},w2={class:"template-how-was-corner__header__radio-input__radio"},C2=ka(()=>e.createElementVNode("label",{for:"left"},"Por izquierda",-1)),k2={class:"template-how-was-corner__header__radio-input"},V2={class:"template-how-was-corner__header__radio-input__radio"},N2=ka(()=>e.createElementVNode("label",{for:"right"},"Por derecha",-1)),x2=["onClick"],B2={class:"template-how-was-corner__content__corner-type__img"},T2=["src","alt"],F2={class:"template-how-was-corner__content__corner-type__info"},M2={class:"template-how-was-corner__content__corner-type__info__title"},A2={__name:"TemplateHowWasCorner",props:{howWasCornerFilters:{type:Object,default:()=>Ca},isExpansionMode:{type:Boolean,default:!1}},emits:["update:filters","change-filters-selected"],setup(t,{emit:a}){const o=t,l=e.ref("left"),i=e.computed(()=>o.howWasCornerFilters[o.howWasCornerFilters.cornerType]),r=e.computed(()=>i.value.filter(s=>s.isSelected).length);e.watch(()=>l.value,s=>{o.howWasCornerFilters.cornerType=s}),e.watch(()=>o.howWasCornerFilters,s=>{a("change-filters-selected",o.howWasCornerFilters[s.cornerType].reduce((c,d)=>d.isSelected?c+1:c,0)),l.value=s.cornerType,a("update:filters",s)},{deep:!0,immediate:!0});function n(s){s.isSelected&&r.value===1||(s.isSelected=!s.isSelected)}return(s,c)=>(e.openBlock(),e.createElementBlock("div",b2,[e.createElementVNode("div",_2,[S2,e.createElementVNode("div",E2,[e.createElementVNode("div",w2,[e.withDirectives(e.createElementVNode("input",{type:"radio",id:"left",value:"left","onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d)},null,512),[[e.vModelRadio,l.value]]),C2])]),e.createElementVNode("div",k2,[e.createElementVNode("div",V2,[e.withDirectives(e.createElementVNode("input",{type:"radio",id:"right",value:"right","onUpdate:modelValue":c[1]||(c[1]=d=>l.value=d)},null,512),[[e.vModelRadio,l.value]]),N2])])]),e.createElementVNode("div",{class:e.normalizeClass(["template-how-was-corner__content",{"is-expansion-mode":t.isExpansionMode}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["template-how-was-corner__content__corner-type",{"is-selected":d.isSelected}]),onClick:m=>n(d)},[e.createElementVNode("div",B2,[e.createElementVNode("img",{src:d.imgSrc,alt:d.title},null,8,T2)]),e.createElementVNode("div",F2,[e.createElementVNode("div",M2,e.toDisplayString(d.title),1)])],10,x2))),128))],2)]))}},L2=J(A2,[["__scopeId","data-v-b7e3b8e0"]]),lt=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],Ve=t=>(e.pushScopeId("data-v-378bf7e2"),t=t(),e.popScopeId(),t),P2={class:"template-zone"},I2={class:"controls-zone-container"},D2={class:"controls-zone-container-title-checkcon"},v2={class:"controls-zone-container-title-checkcon-check"},R2={class:"gsc-field-img-container"},O2={width:"100%",height:"177",viewBox:"0 0 380 177",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z2=["fill"],U2=["fill"],j2=["fill"],H2=["fill"],W2=["fill"],G2=["fill"],$2=["fill"],q2=["fill"],Y2=["fill"],Z2=["fill"],J2=["fill"],K2=["fill"],X2=["fill"],Q2=["fill"],ey=["fill"],ty=["fill"],ay=["fill"],oy=["fill"],ly=["fill"],ry=["fill"],iy=["fill"],ny=["fill"],sy=["fill"],dy=["fill"],cy=["fill"],py=["fill"],my=["fill"],uy=["fill"],fy=["fill"],hy=["fill"],yy=["fill"],gy=["fill"],by=["fill"],_y=["fill"],Sy=["fill"],Ey=Ve(()=>e.createElementVNode("rect",{x:"91.6",y:"0.6",width:"196.8",height:"87.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),wy=Ve(()=>e.createElementVNode("rect",{x:"137.6",y:"0.782404",width:"104.8",height:"28.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),Cy=["id"],ky=Ve(()=>e.createElementVNode("rect",{width:"197.746",height:"24.6043",transform:"matrix(1 0 0 -1 91 113)",fill:"#D9D9D9"},null,-1)),Vy=[ky],Ny=["mask"],xy=Ve(()=>e.createElementVNode("circle",{cx:"185.329",cy:"56.5046",r:"52.6152",stroke:"#DFE3E2","stroke-width":"1.38817"},null,-1)),By=[xy],Ty=Ve(()=>e.createElementVNode("circle",{cx:"190.278",cy:"66.2782",r:"2.27817",fill:"white"},null,-1)),Fy=Ve(()=>e.createElementVNode("rect",{x:"0.7",y:"0.7",width:"378.6",height:"175.6",stroke:"#DFE3E2","stroke-width":"1.4"},null,-1)),My={class:"template-zone__total-corners"},Ay=Ve(()=>e.createElementVNode("div",{class:"template-zone__total-corners__text"}," Tiros de esquina cobrados a las zonas filtradas ",-1)),Ly=Ve(()=>e.createElementVNode("div",{class:"template-zone__total-corners__value"},"10",-1)),Py=[Ay,Ly],Iy={__name:"TemplateZone",props:{zoneFilters:{type:Array,default:()=>[...lt]},widthContainer:{type:Number,default:1280},show:{type:Boolean,default:!1}},emits:["update:filters","change-filters-selected"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(!0),r=e.ref([]),n=e.computed(()=>new Date().getTime());e.watch(r,h=>{i.value=h.length===35}),e.watch(()=>l.zoneFilters,h=>{r.value=h},{immediate:!0,deep:!0}),e.watch(()=>r.value,h=>{o("update:filters",h),o("change-filters-selected",h.length)},{deep:!0});function s(h){h?(r.value=lt,i.value=!0):(r.value=[],i.value=!1)}function c(h){r.value.includes(h)?r.value=r.value.filter(m=>m!==h):r.value.push(h),i.value=r.value.length===35}function d(){r.value=[...lt]}return a({clearFilters:d}),(h,m)=>(e.openBlock(),e.createElementBlock("div",P2,[e.createElementVNode("div",I2,[e.createElementVNode("div",{class:"controls-zone-container-title",style:e.normalizeStyle(t.widthContainer<=440?"font-size: 11px;":"#2e3b46")}," ¿A donde fue el balón?: ",4),e.createElementVNode("div",D2,[e.createElementVNode("div",{class:"controls-zone-container-title-checkcon-label",style:e.normalizeStyle(t.widthContainer<=440?"font-size: 12px;":"#2e3b46")}," Todas las zonas ",4),e.createElementVNode("div",v2,[e.createVNode(e.unref(Y),{label:"",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":i.value,"onUpdate:modelValue":s},null,8,["model-value"])])])]),e.createElementVNode("div",R2,[(e.openBlock(),e.createElementBlock("svg",O2,[e.createElementVNode("rect",{onClick:m[0]||(m[0]=y=>c(1)),class:"sector-field",x:"0.347042",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(1)?"#FFFF0030":"#2e3b46"},null,8,z2),e.createElementVNode("rect",{onClick:m[1]||(m[1]=y=>c(9)),class:"sector-field",x:"288.347",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(9)?"#FFFF0030":"#2e3b46"},null,8,U2),e.createElementVNode("rect",{onClick:m[2]||(m[2]=y=>c(17)),class:"sector-field",x:"0.347042",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(17)?"#FFFF0030":"#2e3b46"},null,8,j2),e.createElementVNode("rect",{onClick:m[3]||(m[3]=y=>c(25)),class:"sector-field",x:"288.347",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(25)?"#FFFF0030":"#2e3b46"},null,8,H2),e.createElementVNode("rect",{onClick:m[4]||(m[4]=y=>c(26)),class:"sector-field",x:"0.347042",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(26)?"#FFFF0030":"#2e3b46"},null,8,W2),e.createElementVNode("rect",{onClick:m[5]||(m[5]=y=>c(27)),class:"sector-field",x:"91.347",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(27)?"#FFFF0030":"#2e3b46"},null,8,G2),e.createElementVNode("rect",{onClick:m[6]||(m[6]=y=>c(28)),class:"sector-field",x:"157.015",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(28)?"#FFFF0030":"#2e3b46"},null,8,$2),e.createElementVNode("rect",{onClick:m[7]||(m[7]=y=>c(29)),class:"sector-field",x:"222.679",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(29)?"#FFFF0030":"#2e3b46"},null,8,q2),e.createElementVNode("rect",{onClick:m[8]||(m[8]=y=>c(30)),class:"sector-field",x:"288.347",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(30)?"#FFFF0030":"#2e3b46"},null,8,Y2),e.createElementVNode("rect",{onClick:m[9]||(m[9]=y=>c(31)),class:"sector-field",x:"0.347042",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(31)?"#FFFF0030":"#2e3b46"},null,8,Z2),e.createElementVNode("rect",{onClick:m[10]||(m[10]=y=>c(32)),class:"sector-field",x:"91.347",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(32)?"#FFFF0030":"#2e3b46"},null,8,J2),e.createElementVNode("rect",{onClick:m[11]||(m[11]=y=>c(33)),class:"sector-field",x:"157.015",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(33)?"#FFFF0030":"#2e3b46"},null,8,K2),e.createElementVNode("rect",{onClick:m[12]||(m[12]=y=>c(34)),class:"sector-field",x:"222.679",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(34)?"#FFFF0030":"#2e3b46"},null,8,X2),e.createElementVNode("rect",{onClick:m[13]||(m[13]=y=>c(35)),class:"sector-field",x:"288.347",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(35)?"#FFFF0030":"#2e3b46"},null,8,Q2),e.createElementVNode("rect",{onClick:m[14]||(m[14]=y=>c(2)),class:"sector-field",x:"91.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(2)?"#FFFF0030":"#2e3b46"},null,8,ey),e.createElementVNode("rect",{onClick:m[15]||(m[15]=y=>c(3)),class:"sector-field",x:"114.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(3)?"#FFFF0030":"#2e3b46"},null,8,ty),e.createElementVNode("rect",{onClick:m[16]||(m[16]=y=>c(4)),class:"sector-field",x:"137.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(4)?"#FFFF0030":"#2e3b46"},null,8,ay),e.createElementVNode("rect",{onClick:m[17]||(m[17]=y=>c(5)),class:"sector-field",x:"172.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(5)?"#FFFF0030":"#2e3b46"},null,8,oy),e.createElementVNode("rect",{onClick:m[18]||(m[18]=y=>c(6)),class:"sector-field",x:"207.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(6)?"#FFFF0030":"#2e3b46"},null,8,ly),e.createElementVNode("rect",{onClick:m[19]||(m[19]=y=>c(7)),class:"sector-field",x:"242.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(7)?"#FFFF0030":"#2e3b46"},null,8,ry),e.createElementVNode("rect",{onClick:m[20]||(m[20]=y=>c(8)),class:"sector-field",x:"265.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(8)?"#FFFF0030":"#2e3b46"},null,8,iy),e.createElementVNode("rect",{onClick:m[21]||(m[21]=y=>c(10)),class:"sector-field",x:"91.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(10)?"#FFFF0030":"#2e3b46"},null,8,ny),e.createElementVNode("rect",{onClick:m[22]||(m[22]=y=>c(11)),class:"sector-field",x:"114.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(11)?"#FFFF0030":"#2e3b46"},null,8,sy),e.createElementVNode("rect",{onClick:m[23]||(m[23]=y=>c(12)),class:"sector-field",x:"137.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(12)?"#FFFF0030":"#2e3b46"},null,8,dy),e.createElementVNode("rect",{onClick:m[24]||(m[24]=y=>c(13)),class:"sector-field",x:"172.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(13)?"#FFFF0030":"#2e3b46"},null,8,cy),e.createElementVNode("rect",{onClick:m[25]||(m[25]=y=>c(14)),class:"sector-field",x:"207.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(14)?"#FFFF0030":"#2e3b46"},null,8,py),e.createElementVNode("rect",{onClick:m[26]||(m[26]=y=>c(15)),class:"sector-field",x:"242.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(15)?"#FFFF0030":"#2e3b46"},null,8,my),e.createElementVNode("rect",{onClick:m[27]||(m[27]=y=>c(16)),class:"sector-field",x:"265.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(16)?"#FFFF0030":"#2e3b46"},null,8,uy),e.createElementVNode("rect",{onClick:m[28]||(m[28]=y=>c(18)),class:"sector-field",x:"91.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(18)?"#FFFF0030":"#2e3b46"},null,8,fy),e.createElementVNode("rect",{onClick:m[29]||(m[29]=y=>c(19)),class:"sector-field",x:"114.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(19)?"#FFFF0030":"#2e3b46"},null,8,hy),e.createElementVNode("rect",{onClick:m[30]||(m[30]=y=>c(20)),class:"sector-field",x:"137.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(20)?"#FFFF0030":"#2e3b46"},null,8,yy),e.createElementVNode("rect",{onClick:m[31]||(m[31]=y=>c(21)),class:"sector-field",x:"172.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(21)?"#FFFF0030":"#2e3b46"},null,8,gy),e.createElementVNode("rect",{onClick:m[32]||(m[32]=y=>c(22)),class:"sector-field",x:"207.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(22)?"#FFFF0030":"#2e3b46"},null,8,by),e.createElementVNode("rect",{onClick:m[33]||(m[33]=y=>c(23)),class:"sector-field",x:"242.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(23)?"#FFFF0030":"#2e3b46"},null,8,_y),e.createElementVNode("rect",{onClick:m[34]||(m[34]=y=>c(24)),class:"sector-field",x:"265.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(24)?"#FFFF0030":"#2e3b46"},null,8,Sy),Ey,wy,e.createElementVNode("mask",{id:n.value,style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"91",y:"88",width:"198",height:"25"},Vy,8,Cy),e.createElementVNode("g",{mask:`url(#${n.value})`},By,8,Ny),Ty,Fy]))]),e.withDirectives(e.createElementVNode("div",My,Py,512),[[e.vShow,!1]])]))}},Dy=J(Iy,[["__scopeId","data-v-378bf7e2"]]),Va=[{text:"Rematado con destino a portería",isSelected:!0,child:[{text:"Fue gol",isSelected:!0,categoryIds:[583,585,587,589]},{text:"No fue gol",isSelected:!0,categoryIds:[584,586,588,590]}]},{text:"Rematado sin destino a portería",isSelected:!0,categoryIds:[122,128,136,142]},{text:"Ganados por portero rival",isSelected:!0,categoryIds:[123,129,137,143]},{text:"Ganados por jugador rival",isSelected:!0,categoryIds:[124,130,138,144]},{text:"Sin destino",isSelected:!0,categoryIds:[125,131,139,145]}],vy={class:"what-happened"},Ry={class:"what-happened__all"},Oy={class:"what-happened__filters"},zy={key:0,class:"what-happened__filters__filter__composed"},Uy={class:"what-happened__filters__filter__composed__main"},jy={key:1,class:"what-happened__filters__filter__single"},Hy={__name:"TemplateWhatHappened",props:{isFemale:{type:Boolean,default:!1},whatHappenedFilters:{type:Array,default:()=>[...Va]}},emits:["change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.computed(()=>l.whatHappenedFilters.reduce((p,f)=>(f.child?f.child.forEach(u=>{u.isSelected&&p++}):f.isSelected&&p++,p),0)),r=e.computed(()=>l.whatHappenedFilters.reduce((p,f)=>(f.child?p+=f.child.length:p++,p),0)),n=e.computed(()=>i.value===r.value),s=e.computed(()=>i.value===1);e.watch(()=>l.whatHappenedFilters,p=>{o("change-filters-selected",i.value),o("update:filters",p)},{deep:!0,immediate:!0});function c(p){l.whatHappenedFilters.forEach(f=>{p?(f.isSelected=p,f.child&&f.child.forEach(u=>{u.isSelected=p})):f.child?(f.isSelected=!0,f.child.forEach(u=>{u.isSelected=!0})):f.isSelected=!1})}function d(p,f){f.isSelected=p,f.child.forEach(u=>{u.isSelected=p})}function h(p,f,u){u.isSelected=p,f.isSelected=f.child.every(g=>g.isSelected)}function m(p,f){f.isSelected=p}function y(){l.whatHappenedFilters.forEach(p=>{p.child?p.child.forEach(f=>{f.isSelected=!0}):p.isSelected=!0})}return a({onResetFilters:y}),(p,f)=>(e.openBlock(),e.createElementBlock("div",vy,[e.createElementVNode("div",Ry,[e.createVNode(e.unref(Y),{label:"Todos","model-value":n.value,"box-position":"right","onUpdate:modelValue":c},null,8,["model-value"])]),e.createElementVNode("div",Oy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.whatHappenedFilters,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"what-happened__filters__filter"},[u.child?(e.openBlock(),e.createElementBlock("div",zy,[e.createElementVNode("div",Uy,[e.createVNode(e.unref(Y),{"model-value":u.isSelected,label:t.isFemale?u.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):u.text,"avoid-interaction":s.value&&u.isSelected,"onUpdate:modelValue":V=>d(V,u)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.child,(V,B)=>(e.openBlock(),e.createElementBlock("div",{key:`c${B}`,class:"what-happened__filters__filter__composed__child"},[e.createVNode(e.unref(Y),{"model-value":V.isSelected,label:t.isFemale?V.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):V.text,"avoid-interaction":s.value&&V.isSelected,"onUpdate:modelValue":v=>h(v,u,V)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]))),128))])):(e.openBlock(),e.createElementBlock("div",jy,[e.createVNode(e.unref(Y),{"model-value":u.isSelected,label:t.isFemale?u.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):u.text,"avoid-interaction":s.value&&u.isSelected,"onUpdate:modelValue":V=>m(V,u)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]))]))),128))])]))}},Wy=J(Hy,[["__scopeId","data-v-8f375a1a"]]),Na={isMoment:!1,isMomentOnly:!1,results:{final:[{name:"Partidos ganados",value:1,isSelected:!0},{name:"Partidos perdidos",value:2,isSelected:!0},{name:"Partidos empatados",value:3,isSelected:!0}],moment:[{name:"Iba ganando",value:1,isSelected:!0},{name:"Iba perdiendo",value:2,isSelected:!0},{name:"Iba empatando",value:3,isSelected:!0}]}},kl=t=>(e.pushScopeId("data-v-ee3b28d3"),t=t(),e.popScopeId(),t),Gy={class:"template-results"},$y={class:"template-results__type-switch"},qy=kl(()=>e.createElementVNode("div",{class:"template-results__type-switch__label"},"Final",-1)),Yy=kl(()=>e.createElementVNode("div",{class:"template-results__type-switch__label"},"Al momento",-1)),Zy={class:"template-results__info"},Jy={key:0,class:"template-results__group"},Ky={key:1,class:"template-results__group"},Xy={__name:"TemplateResultsByTime",props:{resultsFilters:{type:Object,default:()=>({...Na})}},emits:["update:resultsFilters","change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(null),r=e.computed(()=>{const c=i.value.isMoment?i.value.results.moment.filter(d=>d.isSelected).length:i.value.results.final.filter(d=>d.isSelected).length;return o("change-filters-selected",c),c}),n=e.computed(()=>i.value.isMoment?"Resultado al momento del cobro":"Resultado al final del partido");e.watch(()=>l.resultsFilters,c=>{i.value===null&&(i.value={...c})},{deep:!0,immediate:!0}),e.watch(i,c=>{o("update:filters",c)},{deep:!0,immediate:!0});function s(){i.value.isMoment=!1,i.value.results.moment.forEach(c=>{c.isSelected=!0}),i.value.results.final.forEach(c=>{c.isSelected=!0})}return a({removeFilters:s}),(c,d)=>(e.openBlock(),e.createElementBlock("div",Gy,[e.withDirectives(e.createElementVNode("div",$y,[qy,e.createVNode(at,{modelValue:i.value.isMoment,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.isMoment=h)},null,8,["modelValue"]),Yy],512),[[e.vShow,!i.value.isMomentOnly]]),e.createElementVNode("div",Zy,e.toDisplayString(n.value),1),i.value.isMoment?(e.openBlock(),e.createElementBlock("div",Jy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.results.moment,(h,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:h.isSelected,"onUpdate:modelValue":y=>h.isSelected=y,label:h.name,"avoid-interaction":r.value===1&&h.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))])):(e.openBlock(),e.createElementBlock("div",Ky,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.results.final,(h,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:h.isSelected,"onUpdate:modelValue":y=>h.isSelected=y,label:h.name,"avoid-interaction":r.value===1&&h.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))]))]))}},Qy=J(Xy,[["__scopeId","data-v-ee3b28d3"]]),eg=t=>(e.pushScopeId("data-v-6f640dee"),t=t(),e.popScopeId(),t),tg={key:0,class:"productivity__header__text"},ag={key:0},og=eg(()=>e.createElementVNode("span",null,"mínimo 5 categorías y máximo 12",-1)),lg={key:1},rg={key:2},ig={key:1,class:"productivity__header__checkbox"},ng={class:"templates__body"},sg={key:0,class:"templates-plays"},dg={key:1,class:"templates-productivity"},cg={key:2,class:"template-field"},pg={key:3,class:"template-details"},mg={key:4,class:"template-personal-data"},ug={key:5,class:"template-leagues"},fg={key:6,class:"template-plays"},hg={key:7,class:"template-plays"},yg={key:8,class:"template-universe"},gg={key:9,class:"template-distance"},bg={key:10,class:"template-results"},_g={key:11,class:"template-results-by-type"},Sg={key:12,class:"template-games"},Eg={key:13,class:"template-taken-corners"},wg={key:14,class:"template-videos"},Cg={key:15,class:"template-how-was-corner"},kg={key:16,class:"template-zone"},Vg={key:17,class:"template-what-happened"},Ng={key:1,class:"templates__footer"},xg={class:"templates__footer__button"},Bg={class:"templates__footer__button"},Tg={__name:"GSC-FilterTemplates",props:{filterType:{type:String,default:""},width:{type:String,default:"100%"},maxWidth:{type:String,default:"100%"},productivityMaxCategories:{type:Number,default:5},productivityMinCategories:{type:Number,default:0},productivityCategories:{type:[Object,null],default:()=>null},playsCategories:{type:[Object,null],default:()=>null},fieldAreas:{type:[Array,null],default:()=>[]},playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},statisticType:{type:String,default:"total"},isStatisticTypeVisible:{type:Boolean,default:!1},isPlayingAsHidden:{type:Boolean,default:!1},isFromTemplates:{type:Boolean,default:!1},isForTemplateForm:{type:Boolean,default:!1},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},isFemale:{type:Boolean,default:!1},tournaments:{type:Array,default:()=>[]},playsGolstatsCategories:{type:Array,default:()=>[]},universeFilters:{type:Object,default:()=>({minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(t,a)=>a+1),statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}})},zoneFilters:{type:Array,default:()=>[]},whatHappenedFilters:{type:Array,default:()=>[]},personalDataFilters:{type:Object,default:()=>({})},distanceFilters:{type:Object,default:()=>({minValue:5,maxValue:30,minLimit:5,maxLimit:30})},resultsFilters:{type:Object,default:()=>({})},resultsByTimeFilters:{type:Object,default:()=>({})},gamesFilters:{type:Array,default:()=>[]},takenCornersFilters:{type:Array,default:()=>[]},howWasCornerFilters:{type:Object,default:()=>({})},awaitForFilters:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#2E3B46"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"rgba(255, 255, 255, 0)"},borderWidth:{type:String,default:"1px"},boxShadow:{type:String,default:"0 14px 28px 0 rgba(0, 0, 0, 0.25)"},padding:{type:String,default:"20px"},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:String,default:"1px"},textColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"'Poppins-Regular'"},isExpansionMode:{type:Boolean,default:!0},isFooterVisible:{type:Boolean,default:!1},isFooterCancelOnly:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},isScouting:{type:Boolean,default:!1},fieldComponentProps:{type:Object,default:()=>{}},season:{type:Object,default:()=>({})},token:{type:String,default:""},modalHeight:{type:String,default:"fit-content"},isOneTournamentOnly:{type:Boolean,default:!1},defaultTournamentId:{type:Number,default:1}},emits:["change-categories-selected","change-filters-selected","change-universe-filters","change-field-areas","apply","click-cancel","update:filters","total-filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(null),r=e.ref(!1),n=e.ref({playingAs:l.playingAs,gameSections:l.gameSections,statisticType:l.statisticType}),s=e.ref({areYellowCardsSelected:!1,areRedCardsSelected:!1,areFoulsCommittedSelected:!1}),c=e.ref(null),d=e.ref(null),h=e.ref(null),m=e.ref(null),y=e.ref(null),p=e.computed(()=>({"--width":l.width,"--max-width":l.maxWidth,"--background-color":l.backgroundColor,"--border-radius":l.borderRadius,"--border-color":l.borderColor,"--border-width":l.borderWidth,"--box-shadow":l.boxShadow,"--padding":l.filterType!==b.VIDEOS?l.isExpansionMode?"10px 0":l.padding:"0","--footer-border-color":l.footerBorderColor,"--footer-border-width":l.footerBorderWidth,"--text-color":l.textColor})),f=e.computed(()=>{const S=[];return l.productivityCategories&&Object.values(l.productivityCategories).forEach(x=>{x.categories&&x.categories.forEach($=>{S.push($)})}),S}),u=e.computed(()=>{const S=[];return l.playsCategories&&Object.values(l.playsCategories).forEach(x=>{x.categories&&x.categories.forEach($=>{S.push($)})}),S}),g=e.computed(()=>{const S=f.value.filter(x=>x.isSelected);return Z(S),l.filterType===b.PRODUCTIVITY&&o("change-categories-selected",S.length),S.length}),V=e.computed(()=>g.value>=l.productivityMaxCategories),B=e.computed(()=>g.value<=l.productivityMinCategories),v=e.computed(()=>l.isPlayingAsHidden?l.gameSections:l.playingAs.concat(l.gameSections));e.watch(n,S=>{l.filterType===b.DETAILS&&o("update:filters",S)},{immediate:!0,deep:!0}),e.watch(()=>v.value,S=>{if(l.filterType===b.DETAILS){const x=S.filter($=>$.isSelected);o("change-filters-selected",x.length)}},{immediate:!0,deep:!0}),e.watch(()=>l.playsGolstatsCategories,S=>{if(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS){const x=S.filter($=>$.isSelected);o("change-filters-selected",x.length)}},{immediate:!0}),e.watch(()=>l.fieldAreas,S=>{l.filterType===b.FIELD&&o("change-filters-selected",S.length)}),e.watch(u,()=>{l.filterType===b.PLAYS&&A()},{immediate:!0,deep:!0}),e.watch(f,()=>{l.filterType===b.PRODUCTIVITY&&q()},{immediate:!0,deep:!0}),e.watch(()=>l.resultsFilters,S=>{l.filterType===b.RESULTS&&o("change-filters-selected",S.results.filter(x=>x.isSelected).length)},{immediate:!0,deep:!0});function Z(S){setTimeout(()=>{S.sort((x,$)=>x.priority-$.priority),S.forEach((x,$)=>{x.priority=$+1})},10)}function U(S=null){O(S)}function O(S=null){l.filterType===b.PRODUCTIVITY?f.value.forEach(x=>{x.isSelected=!1}):l.filterType===b.PLAYS?(u.value.forEach(x=>{x.isSelected=!0}),r.value=!0):l.filterType===b.FIELD?o("change-field-areas",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]):l.filterType===b.DETAILS?(l.playingAs.forEach(x=>{x.isSelected=!0}),l.gameSections.forEach(x=>{x.isSelected=!0})):l.filterType===b.TOURNAMENTS?(l.tournaments.forEach((x,$)=>{l.isOneTournamentOnly?x.isSelected=$===0:x.isSelected=!0}),o("change-filters-selected",0)):l.filterType===b.PLAYS_TYPES?l.playsGolstatsCategories.forEach(x=>{x.isSelected=!0}):l.filterType===b.GOLSTATS?l.playsGolstatsCategories.forEach(x=>{x.isSelected=!1}):l.filterType===b.UNIVERSE?c.value&&c.value.resetFilters():l.filterType===b.PERSONAL_DATA?(i.value&&i.value.onClearFilters(S||ie.All),o("change-personal-data-filters",{})):l.filterType===b.DISTANCE?o("update:filters",{minValue:l.distanceFilters.minLimit,maxValue:l.distanceFilters.maxLimit}):l.filterType===b.RESULTS?o("update:filters",{results:l.resultsFilters.results.map(x=>(x.isSelected=!0,x))}):l.filterType===b.RESULTS_BY_TIME?y.value&&y.value.removeFilters():l.filterType===b.GAMES?l.gamesFilters.forEach(x=>{x.isSelected=!0}):l.filterType===b.TAKEN_CORNERS?d.value.clearFilters():l.filterType===b.HOW_WAS_CORNER?(l.howWasCornerFilters.left.forEach(x=>{x.isSelected=!0}),l.howWasCornerFilters.right.forEach(x=>{x.isSelected=!0})):l.filterType===b.ZONE?h.value&&h.value.clearFilters():l.filterType===b.WHAT_HAPPENED&&m.value&&m.value.onResetFilters()}function Q(S){l.filterType===b.TOURNAMENTS&&o("change-filters-selected",S)}function K(S){l.filterType===b.UNIVERSE&&o("change-universe-filters",S)}function F(S){l.filterType===b.FIELD&&o("change-field-areas",S)}function T(S){l.filterType===b.GOLSTATS&&o("change-filters-selected",S)}function E(S){o("change-filters-selected",S)}function M(S){l.filterType===b.PRODUCTIVITY?f.value.forEach(x=>{x.isSelected=S}):(r.value=S,l.playsCategories.offensive.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.defensive.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.possession.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.offenses.categories.forEach(x=>{x.isSelected=S}))}function A(){let S=0;const x={playsCategories:u.value.filter($=>$.isSelected)};r.value=x.playsCategories.length===u.value.length,S=x.playsCategories.length,Object.values(s.value).forEach($=>{$&&S++}),o("change-filters-selected",S),o("update:filters",x)}function q(){let S=0;const x={productivityFilters:f.value.filter($=>$.isSelected),offensesConditions:s.value};S=x.productivityFilters.length,Object.values(s.value).forEach($=>{$&&S++}),o("change-filters-selected",S),o("update:filters",x)}function te(){o("apply")}function de(){(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS)&&l.playsGolstatsCategories&&l.playsGolstatsCategories.forEach(S=>{S.isSelected=!1}),l.filterType===b.PRODUCTIVITY&&f.value.forEach(S=>{S.isSelected=!1}),o("apply")}function re(S){o("update:filters",S)}function N(S){l.filterType===b.PERSONAL_DATA&&o("update:filters",S)}function L(S){l.filterType===b.TOURNAMENTS&&o("update:filters",S)}function R(S){(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS)&&o("update:filters",S)}function w(S){l.filterType===b.PRODUCTIVITY&&(s.value=S,q())}function I(S){l.filterType===b.DISTANCE&&o("update:filters",S)}function j(S){l.filterType===b.RESULTS&&o("update:filters",S)}function z(S){l.filterType===b.GAMES&&(o("update:filters",S),o("change-filters-selected",S.filter(x=>x.isSelected).length))}function P(S){n.value.statisticType=S}const _=e.computed(()=>l.filterType===b.PLAYS?u.value.length:l.filterType===b.PRODUCTIVITY?f.value.length:l.filterType===b.FIELD?16:l.filterType===b.UNIVERSE?6:l.filterType===b.DETAILS?8:l.filterType===b.RESULTS||l.filterType===b.RESULTS_BY_TIME?3:l.filterType===b.GAMES?l.gamesFilters.length:0);return o("total-filters",_),a({clearFilters:U}),(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"templates",style:e.normalizeStyle(p.value)},[t.filterType===e.unref(b).PRODUCTIVITY||t.filterType===e.unref(b).PLAYS?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.isExpansionMode?"productivity__header__expansion":"productivity__header")},[t.filterType===e.unref(b).PRODUCTIVITY?(e.openBlock(),e.createElementBlock("div",tg,[t.isFromTemplates?(e.openBlock(),e.createElementBlock("div",ag,[e.createTextVNode(" Elige tipo de jugadas: "),og])):t.isForTemplateForm?(e.openBlock(),e.createElementBlock("div",lg,"Tipo de participación")):(e.openBlock(),e.createElementBlock("div",rg,"Selecciona hasta 5 categorias en orden de importancia"))])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PLAYS||t.isForTemplateForm?(e.openBlock(),e.createElementBlock("div",ig,[e.createVNode(e.unref(Y),{label:t.isForTemplateForm?"Seleccionar todas":"Todos los tipos de jugadas","box-position":t.isForTemplateForm?"right":"left",fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":r.value,"label-color":t.textColor,"onUpdate:modelValue":M},null,8,["label","box-position","model-value","label-color"])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",ng,[t.filterType===e.unref(b).PLAYS?(e.openBlock(),e.createElementBlock("div",sg,[e.createVNode(rf,{"plays-categories":t.playsCategories,"is-expansion-mode":t.isExpansionMode},null,8,["plays-categories","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PRODUCTIVITY?(e.openBlock(),e.createElementBlock("div",dg,[e.createVNode(Qs,{"productivity-categories":t.productivityCategories,"number-of-categories-selected":g.value,"are-max-categories-reached":V.value,"are-min-categories-reached":B.value,"is-expansion-mode":t.isExpansionMode,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"onUpdate:offensesConditions":w},null,8,["productivity-categories","number-of-categories-selected","are-max-categories-reached","are-min-categories-reached","is-expansion-mode","is-from-templates","is-for-template-form"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).FIELD?(e.openBlock(),e.createElementBlock("div",cg,[e.createVNode(e.unref(Io),e.mergeProps(t.fieldComponentProps,{"background-color":t.backgroundColor,value:t.fieldAreas,"onUpdate:modelValue":F}),null,16,["background-color","value"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).DETAILS?(e.openBlock(),e.createElementBlock("div",pg,[e.createVNode(Fd,{"is-playing-as-hidden":t.isPlayingAsHidden,"playing-as":t.playingAs,"game-sections":t.gameSections,"font-gamily":t.fontFamily,"is-statistic-type-visible":t.isStatisticTypeVisible,"statistic-type":t.statisticType,onChangeStatisticType:P},null,8,["is-playing-as-hidden","playing-as","game-sections","font-gamily","is-statistic-type-visible","statistic-type"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PERSONAL_DATA?(e.openBlock(),e.createElementBlock("div",mg,[e.createVNode(ju,{"is-female":t.isFemale,ref_key:"templatePersonalData",ref:i,"personal-data-filters":t.personalDataFilters,season:t.season,"is-seleccion":t.isSeleccion,"is-scouting":t.isScouting,token:t.token,filters:t.personalDataFilters,"onUpdate:filters":N},null,8,["is-female","personal-data-filters","season","is-seleccion","is-scouting","token","filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).TOURNAMENTS?(e.openBlock(),e.createElementBlock("div",ug,[e.createVNode(Dd,{tournaments:t.tournaments,"is-one-tournament-only":t.isOneTournamentOnly,"default-tournament-id":t.defaultTournamentId,onChangeFiltersSelected:Q,"onUpdate:filters":L},null,8,["tournaments","is-one-tournament-only","default-tournament-id"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PLAYS_TYPES?(e.openBlock(),e.createElementBlock("div",fg,[e.createVNode(bo,{height:t.modalHeight,type:t.filterType,categories:t.playsGolstatsCategories,"onUpdate:filters":R},null,8,["height","type","categories"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).GOLSTATS?(e.openBlock(),e.createElementBlock("div",hg,[e.createVNode(bo,{height:t.modalHeight,type:t.filterType,categories:t.playsGolstatsCategories,onChangeFiltersSelected:T,"onUpdate:filters":R},null,8,["height","type","categories"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).UNIVERSE?(e.openBlock(),e.createElementBlock("div",yg,[e.createVNode(Mc,{ref_key:"templateUniverse",ref:c,"universe-filters":t.universeFilters,"onUpdate:universeFilters":K},null,8,["universe-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).DISTANCE?(e.openBlock(),e.createElementBlock("div",gg,[e.createVNode(Xc,{distance:t.distanceFilters,"onUpdate:distanceFilters":I},null,8,["distance"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).RESULTS?(e.openBlock(),e.createElementBlock("div",bg,[e.createVNode(df,{ref_key:"templateResults",ref:y,"results-filters":t.resultsFilters,"onUpdate:resultsFilters":j},null,8,["results-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).RESULTS_BY_TIME?(e.openBlock(),e.createElementBlock("div",_g,[e.createVNode(Qy,{ref_key:"templateResults",ref:y,"results-filters":t.resultsByTimeFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["results-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).GAMES?(e.openBlock(),e.createElementBlock("div",Sg,[e.createVNode(rp,{"games-filters":t.gamesFilters,"onUpdate:gamesFilters":z},null,8,["games-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).TAKEN_CORNERS?(e.openBlock(),e.createElementBlock("div",Eg,[e.createVNode(g2,{"is-female":t.isFemale,ref_key:"templateTakenCorners",ref:d,"taken-corners-filters":t.takenCornersFilters,"is-expansion-mode":t.isExpansionMode,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["is-female","taken-corners-filters","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).VIDEOS?(e.openBlock(),e.createElementBlock("div",wg,[e.createVNode(Q0,{token:t.token},null,8,["token"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).HOW_WAS_CORNER?(e.openBlock(),e.createElementBlock("div",Cg,[e.createVNode(L2,{"how-was-corner-filters":t.howWasCornerFilters,"is-expansion-mode":t.isExpansionMode,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["how-was-corner-filters","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).ZONE?(e.openBlock(),e.createElementBlock("div",kg,[e.createVNode(Dy,{ref_key:"templateZone",ref:h,"zone-filters":t.zoneFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["zone-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).WHAT_HAPPENED?(e.openBlock(),e.createElementBlock("div",Vg,[e.createVNode(Wy,{"is-female":t.isFemale,ref_key:"templateWhatHappened",ref:m,"what-happened-filters":t.whatHappenedFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["is-female","what-happened-filters"])])):e.createCommentVNode("",!0)]),t.isFooterVisible?(e.openBlock(),e.createElementBlock("div",Ng,[t.isFooterCancelOnly?(e.openBlock(),e.createBlock(e.unref(gt),{key:0,"text-value":"Cancelar","font-size":"12px",height:"22px",width:"72px","border-radius":"62px","border-width":.8,"border-color":"white","background-color":"rgba(255, 255, 255, 0.06)",onClick:de})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",xg,[t.isForTemplateForm?(e.openBlock(),e.createBlock(e.unref(gt),{key:0,"text-value":"Cancelar","font-size":"12px","font-color":"rgba(255,255,255,0.7)","text-decoration":"underline",onClick:de})):(e.openBlock(),e.createBlock(e.unref(gt),{key:1,"text-value":"Quitar filtros","font-size":"12px","font-color":"rgba(255,255,255,0.7)","text-decoration":"underline",onClick:O}))]),e.createElementVNode("div",Bg,[e.createVNode(e.unref(gt),{"text-value":"Listo","font-size":"12px",height:"22px",width:"72px","border-radius":"62px","border-width":.8,"border-color":"#cbee6b",onClick:te})])],64))])):e.createCommentVNode("",!0)],4))}},Vl=J(Tg,[["__scopeId","data-v-6f640dee"]]),Fg=(t,a)=>{const o=t.__vccOpts||t;for(const[l,i]of a)o[l]=i;return o},Mg={__name:"GSC-Menu",props:{menuMarginTop:{type:Number,default:0,validator(t){return!Number.isNaN(t)}},modelValue:{type:Boolean,default:!1},width:{type:String,default:"fit-content"},menuWidth:{type:String,default:"fit-content"},zIndexOpen:{type:Number,default:3},leftMenu:{type:String,default:"unset"}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t;e.useCssVars(p=>({"398d9242":t.width,f164e302:c.value,"4bb88040":t.menuWidth}));const l=e.ref(null),i=e.ref(!1),r=e.ref(null),n=e.ref({}),s=e.computed(()=>{const p={top:"0px","--left-menu":o.leftMenu};if(l.value){const f=l.value.getBoundingClientRect();p.top=`${f.height+o.menuMarginTop}px`}return p}),c=e.computed(()=>i.value?o.zIndexOpen:1);e.watch(()=>o.modelValue,p=>{p!==i.value&&(i.value=p)},{immediate:!0}),e.watch(i,p=>{p||setTimeout(()=>{n.value["--translate-x"]="0px"},500)});function d(p){const f=window.innerWidth,u=p.boundingClientRect.x,g=p.boundingClientRect.x+p.boundingClientRect.width,V=u<=0?Math.abs(u)+4:g>=f?f-(g+10):0;n.value["--translate-x"]=`${V}px`}function h(){new IntersectionObserver(p=>{p[0].intersectionRatio>0&&d(p[0])}).observe(r.value)}function m(){i.value=!i.value,a("update:modelValue",i.value)}function y(){i.value=!1,a("update:modelValue",i.value)}return e.onMounted(()=>{e.nextTick(()=>{h()})}),(p,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:"menu-overlay",onClick:y})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"menu-container",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",{ref_key:"trigger",ref:l,class:"menu-container__trigger",onClick:m},[e.renderSlot(p.$slots,"trigger",{},void 0,!0)],512),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"menu",ref:r,class:"menu-container__menu",style:e.normalizeStyle(s.value)},[e.renderSlot(p.$slots,"menu",{},void 0,!0)],4),[[e.vShow,i.value]])]),_:3})],4)],64))}},Ag=Fg(Mg,[["__scopeId","data-v-18c0df61"]]),De=t=>(e.pushScopeId("data-v-2504d135"),t=t(),e.popScopeId(),t),Lg={key:0,class:"button__icon"},Pg={key:0,width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ig=["stroke"],Dg=["stroke"],vg=["stroke"],Rg={key:1,width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Og=["stroke"],zg=["stroke"],Ug=["fill"],jg={key:2,width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Hg=["fill"],Wg={key:3,width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Gg=["stroke"],$g=["stroke"],qg=["stroke"],Yg=["stroke"],Zg=["stroke"],Jg={key:4,width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Kg=De(()=>e.createElementVNode("path",{d:"M1.85113 13.0897C1.9303 13.2137 2.01739 13.3404 2.10447 13.4617C2.30239 13.7361 2.51878 14 2.74837 14.2507C3.74589 15.3298 5.01785 16.1504 6.41385 16.5963C6.4719 16.6148 6.52996 16.6332 6.58802 16.6491C6.60385 16.6544 6.61704 16.657 6.63024 16.6623C6.70413 16.6834 6.77538 16.7045 6.84927 16.723C7.54859 16.9077 8.27429 17 9.00264 17C9.73098 17 10.4593 16.9077 11.1586 16.7256C11.3064 16.686 11.4542 16.6438 11.5967 16.5989C11.9187 16.496 12.2353 16.372 12.5414 16.2322C12.7895 16.1187 13.0296 15.9921 13.2645 15.8549C14.2963 15.2533 15.2041 14.438 15.9034 13.467C15.9668 13.3799 16.0301 13.2876 16.0908 13.1926C16.1119 13.1609 16.133 13.1293 16.1541 13.095C16.9432 11.8681 17.405 10.4486 17.4868 8.98945C17.4947 8.84169 17.5 8.69393 17.5 8.54618C17.5 8.53034 17.5 8.51715 17.5 8.50132C17.5 6.90765 17.0646 5.37995 16.2386 4.04222C16.1198 3.85224 15.9932 3.66491 15.8612 3.48021C15.8586 3.47493 15.8559 3.4723 15.8533 3.46702C15.8084 3.40633 15.7636 3.34565 15.7161 3.2876C15.6712 3.22955 15.6237 3.1715 15.5789 3.1161C14.6526 1.98417 13.4466 1.10818 12.0928 0.580475C11.9556 0.525066 11.8105 0.474934 11.668 0.42744C10.8103 0.145118 9.91307 0 9.00264 0C8.09221 0 7.19497 0.14248 6.33732 0.424802C6.19482 0.472295 6.04967 0.525066 5.91245 0.577836C4.55604 1.10554 3.35005 1.98417 2.42378 3.11346C2.37364 3.17678 2.32086 3.24011 2.27072 3.30607C2.2285 3.35884 2.18892 3.41161 2.14933 3.46702C2.14933 3.46702 2.14933 3.46966 2.14669 3.4723C2.14669 3.47493 2.14405 3.47757 2.14142 3.48021C1.43418 4.44591 0.94598 5.53034 0.69792 6.68074C0.660975 6.85224 0.626669 7.02639 0.600279 7.20053C0.571251 7.39578 0.547501 7.59103 0.531667 7.78892C0.521111 7.91293 0.513195 8.03694 0.507917 8.16095C0.502639 8.27441 0.5 8.38786 0.5 8.50132V8.61214C0.502639 8.73615 0.507917 8.8628 0.513195 8.98945C0.595002 10.4486 1.05681 11.8681 1.84586 13.0923L1.85113 13.0897ZM1.82738 7.64908C1.82738 7.63325 1.83002 7.62005 1.83266 7.60422C1.84322 7.52771 1.85377 7.45119 1.86433 7.37731C1.86433 7.36412 1.86697 7.35092 1.86961 7.33773C1.8828 7.25594 1.89863 7.1715 1.91447 7.08971C1.91711 7.07124 1.92238 7.05541 1.92502 7.03694C1.94086 6.95778 1.95933 6.87599 1.9778 6.79683V6.78628C1.99891 6.70449 2.02266 6.62269 2.04378 6.5409C2.04905 6.52243 2.05433 6.5066 2.05961 6.48813C2.08336 6.40897 2.10711 6.32718 2.1335 6.24802L2.14142 6.22164C2.16517 6.14776 2.19156 6.07652 2.21794 6.00264C2.22322 5.98681 2.23114 5.97098 2.23642 5.95515C2.26545 5.87863 2.29711 5.79947 2.32878 5.72559C2.33406 5.70976 2.34197 5.69657 2.34725 5.68338C2.37628 5.61478 2.40795 5.54617 2.43962 5.47757C2.44489 5.46702 2.45017 5.45383 2.45545 5.44063C2.48975 5.36676 2.5267 5.29024 2.56628 5.21636C2.5742 5.20053 2.58212 5.1847 2.59267 5.16887C2.63226 5.09499 2.6692 5.02375 2.71143 4.94987V4.94195H2.7167L3.2656 6.63061L1.82738 7.67546C1.82738 7.67546 1.82738 7.65699 1.83002 7.64908H1.82738ZM4.08367 7.6095L5.62745 8.31926L6.52204 11.0712L5.62481 12.1108H2.74309C2.23642 11.2348 1.92238 10.2612 1.81683 9.25594L4.08367 7.6095ZM7.58026 1.41161C7.65942 1.39578 7.74123 1.37995 7.8204 1.36675C7.84151 1.36412 7.86262 1.35884 7.88109 1.3562C7.96026 1.34301 8.03679 1.33245 8.11596 1.32454C8.13971 1.3219 8.16346 1.31926 8.18721 1.31662C8.24791 1.30871 8.30596 1.30343 8.36666 1.29815C8.39305 1.29815 8.42207 1.29288 8.44846 1.29024C8.52235 1.28496 8.59361 1.27968 8.6675 1.27705C8.69916 1.27705 8.73347 1.27441 8.76514 1.27177C8.82319 1.27177 8.88125 1.26913 8.94194 1.26913C8.98153 1.26913 9.01847 1.26913 9.05806 1.26913C9.11611 1.26913 9.17681 1.26913 9.23487 1.27177C9.26653 1.27177 9.30084 1.27177 9.33251 1.27705C9.4064 1.27968 9.48029 1.28496 9.55154 1.29024C9.58057 1.29024 9.60696 1.29551 9.63334 1.29815C9.69404 1.30343 9.75473 1.30871 9.81279 1.31662C9.83654 1.31926 9.86029 1.3219 9.88668 1.32454C9.96585 1.33509 10.045 1.34565 10.1215 1.3562L10.1849 1.36675C10.264 1.37995 10.3459 1.39314 10.425 1.41161C10.4277 1.41161 10.4303 1.41161 10.4356 1.41161H10.4382L9 2.45646L7.56178 1.41161H7.56442C7.56442 1.41161 7.5697 1.41161 7.57234 1.41161H7.58026ZM9.00528 6.56728L11.1138 8.10026L10.3089 10.5805H7.70165L6.89677 8.10026L9.00528 6.56728ZM15.3018 4.94459V4.94987C15.3466 5.02111 15.3862 5.09499 15.4232 5.16887L15.4469 5.21636C15.4839 5.29024 15.5208 5.36676 15.5577 5.44063C15.563 5.45119 15.5683 5.46438 15.5736 5.47493C15.6052 5.54354 15.6369 5.61214 15.6659 5.68338C15.6712 5.69657 15.6791 5.7124 15.6844 5.72559C15.7161 5.80211 15.7478 5.87863 15.7768 5.95778C15.7821 5.97361 15.79 5.98945 15.7953 6.00528C15.8216 6.07916 15.848 6.1504 15.8718 6.22428C15.8744 6.23219 15.8771 6.24011 15.8797 6.25066C15.9061 6.32982 15.9298 6.40897 15.9536 6.49077C15.9589 6.50923 15.9641 6.52771 15.9694 6.54618C15.9905 6.62797 16.0143 6.70976 16.0328 6.78892C16.0328 6.7942 16.0328 6.79683 16.0328 6.80211C16.0512 6.88127 16.0697 6.96042 16.0855 7.03958L16.0961 7.09235C16.1119 7.17414 16.1278 7.25594 16.141 7.33773C16.141 7.35092 16.1462 7.36412 16.1462 7.37731C16.1568 7.45119 16.1673 7.52771 16.1779 7.60422C16.1779 7.62005 16.1805 7.63325 16.1832 7.64908C16.1832 7.65699 16.1832 7.66755 16.1858 7.67546L14.7476 6.63061L15.2965 4.93931L15.3018 4.94459ZM13.9295 7.61214L16.1937 9.25858C16.0882 10.2639 15.7715 11.2401 15.2675 12.1135H12.3858L11.4912 11.0739L12.3858 8.3219L13.9295 7.61214ZM14.3306 13.3879C14.3306 13.3879 14.3254 13.3931 14.3227 13.3958C14.2673 13.4565 14.2093 13.5172 14.1512 13.5752C14.138 13.5884 14.1248 13.6016 14.1116 13.6148C14.0536 13.6728 13.9929 13.7309 13.9322 13.7889C13.9216 13.7995 13.9111 13.81 13.8979 13.8206C13.8424 13.8707 13.7844 13.9235 13.729 13.971C13.7184 13.9789 13.7079 13.9894 13.6973 14C13.634 14.0554 13.5706 14.1055 13.5047 14.1583C13.4888 14.1715 13.473 14.1821 13.4598 14.1953C13.3938 14.2454 13.3278 14.2955 13.2619 14.3456C13.2619 14.3456 13.2566 14.3483 13.2566 14.3509C13.188 14.4011 13.1194 14.4486 13.0481 14.496C13.0323 14.5066 13.0165 14.5172 12.998 14.5277C12.9294 14.5726 12.8581 14.6174 12.7895 14.6623C12.7763 14.6702 12.7658 14.6781 12.7526 14.6834C12.6892 14.723 12.6233 14.7599 12.5573 14.7968C12.5441 14.8048 12.5283 14.8127 12.5151 14.8206C12.4438 14.8602 12.3699 14.8997 12.296 14.9367C12.2802 14.9446 12.2617 14.9525 12.2459 14.9631C12.1746 15 12.1007 15.0343 12.0295 15.0686C12.0242 15.0686 12.0189 15.0739 12.0137 15.0765H12.0084L12.5573 13.3879H14.3306ZM6.00217 15.0765L5.98898 15.0712C5.91509 15.0369 5.8412 15 5.76731 14.9631C5.75147 14.9551 5.73564 14.9472 5.71981 14.9393C5.64592 14.9024 5.57203 14.8628 5.49814 14.8206C5.48494 14.8127 5.47175 14.8048 5.45855 14.7995C5.39258 14.7625 5.32661 14.723 5.26063 14.6834C5.25008 14.6781 5.23688 14.6702 5.22633 14.6623C5.15508 14.6201 5.08646 14.5726 5.01521 14.5277C4.99938 14.5172 4.98355 14.5066 4.96771 14.496C4.89646 14.4486 4.82785 14.4011 4.75924 14.3509H4.75396C4.68799 14.2982 4.61937 14.248 4.5534 14.1953C4.53757 14.1821 4.52437 14.1715 4.50854 14.1583C4.44256 14.1055 4.37923 14.0554 4.3159 14C4.30534 13.9894 4.29478 13.9815 4.28159 13.971C4.22353 13.9208 4.16812 13.8707 4.1127 13.8206C4.10214 13.81 4.08895 13.7995 4.07839 13.7889C4.0177 13.7335 3.957 13.6755 3.89894 13.6148C3.88575 13.6016 3.87256 13.5884 3.85936 13.5752C3.8013 13.5172 3.74589 13.4591 3.69047 13.3984C3.68783 13.3958 3.68519 13.3931 3.67991 13.3879H5.45328L6.00217 15.0765C6.00217 15.0765 5.99954 15.0765 5.9969 15.0765H6.00217ZM7.50636 15.5726L6.63552 12.8971L7.53012 11.8602H10.4804L11.375 12.8971L10.5042 15.5726C9.52251 15.7784 8.48805 15.781 7.50373 15.5726H7.50636ZM14.3755 3.66755L13.4809 6.41953L11.9371 7.12929L9.6439 5.46174V3.57784L11.9503 1.90237C12.8713 2.31135 13.6999 2.91557 14.3781 3.66755H14.3755ZM6.06287 1.90237L8.3693 3.57784V5.46174L6.07606 7.12929L4.53229 6.41953L3.63769 3.66755C4.3159 2.91557 5.14452 2.31398 6.06551 1.90237H6.06287Z",fill:"#979DA2"},null,-1)),Xg=[Kg],Qg={key:5,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e3=De(()=>e.createElementVNode("path",{d:"M17.182 5.9a.538.538 0 0 0-.13-.416L14.24 2.109a.558.558 0 0 0-.433-.203h-2.25c-.017 0-.034.012-.056.012a.557.557 0 0 0-.563.41 1.68 1.68 0 0 1-1.63 1.266 1.68 1.68 0 0 1-1.632-1.266.55.55 0 0 0-.563-.41c-.017 0-.033-.012-.056-.012h-2.25a.558.558 0 0 0-.433.203L1.561 5.484a.586.586 0 0 0-.129.416c.017.152.09.287.208.382l2.605 2.082v8.167c0 .31.253.563.562.563h9c.31 0 .563-.253.563-.563V8.364l2.604-2.082a.59.59 0 0 0 .208-.382zm-3.937 4.444H5.37V9.78h7.875v.563zM5.37 15.969v-4.5h7.875v4.5H5.37zm9-9.045v-.518a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v2.25H5.37v-2.25a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v.518L2.793 5.765l2.278-2.734h1.66A2.802 2.802 0 0 0 9.307 4.72a2.803 2.803 0 0 0 2.576-1.688h1.66l2.278 2.734-1.451 1.159z",fill:"#98A2B3"},null,-1)),t3=[e3],a3={key:6,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o3=De(()=>e.createElementVNode("path",{d:"M15.426 3.353a2.384 2.384 0 0 0-2.381 2.381 2.384 2.384 0 0 0 2.381 2.382 2.384 2.384 0 0 0 2.381-2.382 2.384 2.384 0 0 0-2.381-2.38zm0 3.766a1.386 1.386 0 0 1-1.385-1.385c0-.763.622-1.384 1.385-1.384s1.385.621 1.385 1.384c0 .764-.622 1.385-1.385 1.385zM1.424 6.558a.497.497 0 0 0 .704 0l1.295-1.296L4.72 6.558a.497.497 0 0 0 .704 0 .498.498 0 0 0 0-.705L4.128 4.558l1.295-1.295a.498.498 0 0 0-.705-.705L3.423 3.853 2.128 2.558a.499.499 0 0 0-.704.705l1.295 1.295-1.295 1.295a.498.498 0 0 0 0 .705zM13.013 12.443a.498.498 0 0 0-.705 0l-1.295 1.295-1.295-1.295a.499.499 0 0 0-.704.704l1.295 1.295-1.295 1.295a.499.499 0 0 0 .704.705l1.295-1.295 1.295 1.295a.497.497 0 0 0 .705 0 .498.498 0 0 0 0-.705l-1.295-1.295 1.295-1.295a.498.498 0 0 0 0-.704zM12.052 5.455l-2.01-1.747a.498.498 0 0 0-.654.753l1.066.926c-3.145.411-5.008 2.055-6.043 3.444a9.569 9.569 0 0 0-1.501 3.012 2.384 2.384 0 0 0-2.103 2.364 2.384 2.384 0 0 0 2.381 2.381 2.384 2.384 0 0 0 2.381-2.381 2.385 2.385 0 0 0-1.647-2.265 8.674 8.674 0 0 1 1.312-2.547C6.53 7.674 8.33 6.66 10.594 6.372l-.992 1.142a.498.498 0 0 0 .752.654l1.747-2.01a.498.498 0 0 0-.05-.703zm-7.48 8.752c0 .763-.62 1.384-1.384 1.384a1.386 1.386 0 0 1-1.384-1.384c0-.764.62-1.385 1.384-1.385.763 0 1.385.622 1.385 1.385z",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":".3"},null,-1)),l3=[o3],r3={key:7,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i3=De(()=>e.createElementVNode("rect",{x:".707",y:".9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),n3=De(()=>e.createElementVNode("rect",{x:"8.707",y:".9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),s3=De(()=>e.createElementVNode("rect",{x:".707",y:"8.9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),d3=De(()=>e.createElementVNode("rect",{x:"8.707",y:"8.9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),c3=[i3,n3,s3,d3],p3={key:8,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m3=e.createStaticVNode('<g clip-path="url(#gpdeo9cu3a)" fill="#98A2B3" data-v-2504d135><path d="M9.307.5C4.505.5.598 4.407.598 9.209c0 2 .69 3.938 1.946 5.486l-.754 3.159a.524.524 0 0 0 .727.599l3.038-1.384a8.743 8.743 0 0 0 3.752.848c4.802 0 8.709-3.907 8.709-8.708C18.016 4.407 14.109.5 9.307.5zm0 16.368a7.574 7.574 0 0 1-3.502-.845.525.525 0 0 0-.457-.011l-2.289 1.042.566-2.372a.524.524 0 0 0-.113-.465A7.657 7.657 0 0 1 1.647 9.21c0-4.224 3.436-7.66 7.66-7.66s7.66 3.436 7.66 7.66c0 4.223-3.436 7.66-7.66 7.66z" data-v-2504d135></path><path d="M9.68 5.199c-1.094-.115-2.459.397-3.041 1.797a.524.524 0 0 0 .968.403c.375-.902 1.255-1.231 1.964-1.157.721.075 1.232.542 1.365 1.25.13.693-.136 1.097-1.097 1.662-1.042.613-1.372.874-1.372 2.27a.524.524 0 0 0 1.049 0c0-.479.033-.715.118-.843.094-.14.33-.283.737-.523.666-.392 1.905-1.12 1.596-2.76-.221-1.171-1.098-1.975-2.288-2.1zM9.145 12.673a.608.608 0 0 0-.506.17c-.13.13-.19.31-.17.505a.525.525 0 0 0 .939.263.523.523 0 0 0-.263-.938z" data-v-2504d135></path></g><defs data-v-2504d135><clipPath id="gpdeo9cu3a" data-v-2504d135><path fill="#fff" transform="translate(.307 .5)" d="M0 0h18v18H0z" data-v-2504d135></path></clipPath></defs>',2),u3=[m3],f3={class:"button__text"},h3={key:0,class:"info-container"},y3={key:1,style:{width:"20px"}},g3={width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b3=["fill"],_3={__name:"ButtonFilter",props:{isActive:{type:Boolean,default:!1},showBadge:{type:Boolean,default:!0},showBadgeOnFilterFull:{type:Boolean,default:!0},text:{type:String,default:""},infoValue:{type:[String,Number],default:""},filtersTotal:{type:Number,default:0},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"14px"},fontColor:{type:String,default:"white"},infoBackgroundColor:{type:String,default:"#424D58"},infoFontColor:{type:String,default:"#CBEE6B"},infoFontFamily:{type:String,default:"sans-serif"},infoFontSize:{type:String,default:"10px"},infoBorderColor:{type:String,default:"#0D1D29"},infoBorderRadius:{type:String,default:"4px"},infoHeight:{type:String,default:"20px"},infoWidth:{type:String,default:"20px"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#0D1D29"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"#172531"},borderColorActive:{type:String,default:"white"},borderWidth:{type:String,default:"1px"},padding:{type:String,default:"12px"},arrowColor:{type:String,default:"#92929D"},iconColor:{type:String,default:"#92929D"},iconType:{type:String,default:"productivity"},showIcon:{type:Boolean,default:!0}},setup(t){const a=t,o=e.computed(()=>({"--height":a.height,"--width":a.width,"--text-font-family":a.textFontFamily,"--text-font-size":a.textFontSize,"--background-color":a.backgroundColor,"--border-radius":a.borderRadius,"--border-color":a.isActive?a.borderColorActive:a.borderColor,"--border-width":a.borderWidth,"--padding":a.padding,"--font-color":a.fontColor})),l=e.computed(()=>({"--info-background-color":a.infoValue?a.infoBackgroundColor:"transparent","--info-border-color":a.infoValue?a.infoBorderColor:"transparent","--info-border-radius":a.infoBorderRadius,"--info-font-family":a.infoFontFamily,"--info-font-size":a.infoFontSize,"--info-font-color":a.infoFontColor,"--info-height":a.infoHeight,"--info-width":a.infoWidth})),i=e.computed(()=>[b.PLAYS_TYPES,b.GOLSTATS,b.TOURNAMENTS,b.PLAYS,b.RESULTS,b.RESULTS_BY_TIME].includes(a.iconType)),r=e.computed(()=>[b.FIELD,b.GAMES].includes(a.iconType)),n=e.computed(()=>[b.DETAILS,b.UNIVERSE].includes(a.iconType)),s=e.computed(()=>[b.PERSONAL_DATA].includes(a.iconType)),c=e.computed(()=>[b.PRODUCTIVITY].includes(a.iconType)),d=e.computed(()=>[b.HOW_WAS_CORNER].includes(a.iconType)),h=e.computed(()=>[b.TAKEN_CORNERS].includes(a.iconType)),m=e.computed(()=>[b.ZONE].includes(a.iconType)),y=e.computed(()=>[b.WHAT_HAPPENED].includes(a.iconType));return(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"button",style:e.normalizeStyle(o.value)},[t.showIcon?(e.openBlock(),e.createElementBlock("div",Lg,[s.value?(e.openBlock(),e.createElementBlock("svg",Pg,[e.createElementVNode("path",{d:"M12.6665 16.0001V14.3334C12.6665 13.4494 12.3153 12.6015 11.6902 11.9764C11.0651 11.3513 10.2173 11.0001 9.33323 11.0001H4.33329C3.44925 11.0001 2.60141 11.3513 1.9763 11.9764C1.35119 12.6015 1 13.4494 1 14.3334V16.0001",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ig),e.createElementVNode("path",{d:"M6.83329 7.66658C8.67422 7.66658 10.1666 6.17422 10.1666 4.33329C10.1666 2.49237 8.67422 1 6.83329 1C4.99237 1 3.5 2.49237 3.5 4.33329C3.5 6.17422 4.99237 7.66658 6.83329 7.66658Z",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Dg),e.createElementVNode("path",{d:"M15.164 5.16663V10.1666M17.664 7.66659H12.6641",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,vg)])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("svg",Rg,[e.createElementVNode("path",{d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:t.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Og),e.createElementVNode("path",{d:"M15.9996 16.8727L14.8359 15.7091",stroke:t.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,zg),e.createElementVNode("path",{d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:t.iconColor,stroke:"#353F47","stroke-width":"0.3"},null,8,Ug)])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("svg",jg,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 0C13.1944 0 17 3.80558 17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0ZM8.49751 1.54553C4.65662 1.54553 1.54297 4.65919 1.54297 8.50008C1.54297 12.341 4.65662 15.4546 8.49751 15.4546C12.3384 15.4546 15.4521 12.341 15.4521 8.50008C15.4521 4.65919 12.3384 1.54553 8.49751 1.54553ZM8.49929 3.09082C8.92605 3.09082 9.27202 3.43678 9.27202 3.86355V8.12198L12.451 10.5945C12.7878 10.8565 12.8485 11.342 12.5865 11.6789C12.3245 12.0157 11.839 12.0764 11.5022 11.8144L8.02488 9.10986C7.83666 8.96347 7.72656 8.73837 7.72656 8.49991V3.86355C7.72656 3.43678 8.07252 3.09082 8.49929 3.09082Z",fill:t.iconColor},null,8,Hg)])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",Wg,[e.createElementVNode("rect",{x:"1.16772",y:"1.16699",width:"19",height:"15.6667",stroke:t.iconColor},null,8,Gg),e.createElementVNode("rect",{x:"16.1677",y:"6.16699",width:"4",height:"5.66667",stroke:t.iconColor},null,8,$g),e.createElementVNode("rect",{x:"1.16772",y:"6.16699",width:"4",height:"5.66667",stroke:t.iconColor},null,8,qg),e.createElementVNode("path",{d:"M10.6677 0.666992V16.5003",stroke:t.iconColor},null,8,Yg),e.createElementVNode("path",{d:"M13.5033 9.00032C13.5033 10.5651 12.2348 11.8337 10.67 11.8337C9.1052 11.8337 7.83667 10.5651 7.83667 9.00032C7.83667 7.43552 9.1052 6.16699 10.67 6.16699C12.2348 6.16699 13.5033 7.43552 13.5033 9.00032Z",stroke:t.iconColor},null,8,Zg)])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",Jg,Xg)):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("svg",Qg,t3)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("svg",a3,l3)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",r3,c3)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",p3,u3)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",f3,e.toDisplayString(t.text),1),t.showBadge?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.showBadgeOnFilterFull?(e.openBlock(),e.createElementBlock("div",h3,[e.createElementVNode("div",{class:"button__info",style:e.normalizeStyle(l.value)},[e.withDirectives(e.createElementVNode("span",null,e.toDisplayString(t.infoValue),513),[[e.vShow,t.infoValue]])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.filtersTotal>0&&t.filtersTotal!=parseInt(t.infoValue)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"button__info",style:e.normalizeStyle(l.value)},[e.withDirectives(e.createElementVNode("span",null,e.toDisplayString(t.infoValue),513),[[e.vShow,t.infoValue]])],4)):t.filtersTotal>0?(e.openBlock(),e.createElementBlock("div",y3)):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["button__arrow",{"rotated-180":t.isActive}])},[(e.openBlock(),e.createElementBlock("svg",g3,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:t.arrowColor},null,8,b3)]))],2)],4))}},S3=J(_3,[["__scopeId","data-v-2504d135"]]),E3=(t,a)=>{const o=t.__vccOpts||t;for(const[l,i]of a)o[l]=i;return o},w3=t=>(e.pushScopeId("data-v-0ca35abc"),t=t(),e.popScopeId(),t),C3={class:"panel__activator__icon"},k3=["src"],V3={class:"panel__activator__text"},N3=["height","width"],x3=["stroke"],B3={class:"panel__content"},T3=w3(()=>e.createElementVNode("div",{class:"panel__content__separator"},null,-1)),F3={class:"panel__content__slot"},M3={__name:"GSC-ExpansionPanel",props:{modelValue:{type:Boolean,default:!1},text:{type:String,default:""},textColor:{type:String,default:"white"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"12px"},icon:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#2E3A45"},borderRadius:{type:String,default:"4px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},arrowColor:{type:String,default:"white"},separatorWidth:{type:String,default:"100%"},separatorColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},panelPadding:{type:String,default:"0px 6px"}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t,l=e.ref(o.modelValue),i=e.computed(()=>({"--activator-height":o.height,"--activator-text-font-family":o.textFontFamily,"--activator-text-font-size":o.textFontSize,"--activator-text-color":o.textColor,"--background-color":o.backgroundColor,"--panel-width":o.width,"--panel-padding":o.panelPadding,"--panel-border-radius":o.borderRadius,"--panel-border-color":o.borderColor,"--panel-border-width":o.borderWidth,"--arrow-height":o.arrowHeight,"--arrow-width":o.arrowWidth,"--separator-width":o.separatorWidth,"--separator-color":o.separatorColor}));e.watch(()=>o.modelValue,n=>{l.value=n},{immediate:!0});function r(){l.value=!l.value,a("update:modelValue",l.value)}return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:"panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",{class:"panel__activator",onClick:r},[e.createElementVNode("div",C3,[o.icon?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.icon,alt:""},null,8,k3)):e.createCommentVNode("",!0)]),e.createElementVNode("div",V3,e.toDisplayString(t.text),1),e.createElementVNode("div",{class:e.normalizeClass(["panel__activator__arrow",{"rotated-180":l.value}])},[(e.openBlock(),e.createElementBlock("svg",{height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:t.arrowColor},null,8,x3)],8,N3))],2)]),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",B3,[T3,e.createElementVNode("div",F3,[e.renderSlot(n.$slots,"content",{},void 0,!0)])],512),[[e.vShow,l.value]])]),_:3})],4))}},A3=E3(M3,[["__scopeId","data-v-0ca35abc"]]),Ee={isPlayingAsHidden:!1,playingAs:[{name:"Local",isSelected:!0,value:1},{name:"Visitante",isSelected:!0,value:2}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}],statisticType:"total",isStatisticTypeVisible:!1},L3={offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!1,id:[12]},{name:"Asistencias",isSelected:!1,id:[10]},{name:"Participaciones en gol",isSelected:!1,id:[27]},{name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{name:"Centros por izquierda",isSelected:!1,id:[13]},{name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{name:"Centros por derecha",isSelected:!1,id:[25]},{name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},P3={offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:2},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:21},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]}},I3={minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(t,a)=>a+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},D3=[{name:"Sub-20",logo:null,isSelected:!0,id:44,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Clausura 2023",related_seasons:[{type:1,id:1752}],id:1713,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1592}],id:1542,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1521}],id:1486,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]},{name:"Tournoi Maurice Revello",logo:null,isSelected:!0,id:108,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Tournoi Maurice Revello 23",related_seasons:[],id:1770,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"FIFA World Cup",logo:null,isSelected:!0,id:33,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Copa del Mundo 2022",related_seasons:[],id:1512,type:0},{name:"Copa del Mundo 2018",related_seasons:[],id:881,type:0}]},{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Copa Oro",logo:null,isSelected:!0,id:29,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Copa Oro 2023",related_seasons:[],id:1741,type:0}]},{name:"Women Revelations Cup",logo:null,isSelected:!0,id:1137,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Women Revelations Cup 2023",related_seasons:[],id:1731,type:0}]},{name:"Leagues Cup",logo:null,isSelected:!0,id:1046,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Leagues Cup 2023",related_seasons:[],id:1784,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]}],v3=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Tiros a gol",isSelected:!1},{id:3,name:"Asistencias",isSelected:!1},{id:4,name:"Centros",isSelected:!1},{id:5,name:"Balones ganados en área propia",isSelected:!1},{id:6,name:"Participaciones en gol",isSelected:!1},{id:7,name:"Cabeceo area rival",isSelected:!1}],R3=[{id:1,name:"Mas goles anotados",isSelected:!1,value:1},{id:2,name:"Mas goles durante los ultimos 15 min de 2do tiempo",isSelected:!1,value:7},{id:3,name:"Con mas goles como visitante",isSelected:!1,value:3},{id:4,name:"Con mas goles como local",isSelected:!1,value:3},{id:5,name:"Mas goles durante el 1er tiempo",isSelected:!1,value:3},{id:6,name:"Mas goles durante el 2do tiempo",isSelected:!1,value:3},{id:7,name:"Mas goles como local durante el 2do tiempo",isSelected:!1,value:7}],O3={distance:{minValue:5,maxValue:30,minLimit:5,maxLimit:30}},Nl={results:[{name:"Partidos ganados",value:1,isSelected:!0},{name:"Partidos perdidos",value:2,isSelected:!0},{name:"Partidos empatados",value:3,isSelected:!0}]},z3={class:"filters"},U3={key:0,class:"filters__expansion"},j3={class:"content"},H3={key:1,class:"filters__menus"},W3={__name:"GSC-Filters",props:{filterType:{type:String,default:""},isFromTemplates:{type:Boolean,default:!1},isForTemplateForm:{type:Boolean,default:!1},isForTemplatesForm:{type:Boolean,default:!1},isExpansionPanel:{type:Boolean,default:!1},isFemale:{type:Boolean,default:!1},showBadgeOnFilterFull:{type:Boolean,default:!0},isScouting:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},filters:{type:[Object,Array],default:()=>null},awaitForFilters:{type:Boolean,default:!1},menuButtonText:{type:String,default:""},expansionPanelText:{type:String,default:""},buttonFilterProps:{type:Object,default:()=>{}},expansionPanelProps:{type:Object,default:()=>{}},templateProps:{type:Object,default:()=>{}},fieldComponentProps:{type:Object,default:()=>{}},tournament:{type:Object,default:()=>null},season:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},width:{type:String,default:"fit-content"},modalHeight:{type:String,default:"fit-content"},isOneTournamentOnly:{type:Boolean,default:!1},defaultTournamentId:{type:Number,default:1},productivityMaxCategories:{type:Number,default:5},productivityMinCategories:{type:Number,default:0}},emits:["update:filters","apply","close"],setup(t,{expose:a,emit:o}){const l=t;e.useCssVars(_=>({"5e59eb26":t.width}));const i={width:"604px",maxWidth:"604px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PRODUCTIVITY,isFooterVisible:!0},r={width:"604px",maxWidth:"604px",padding:"0 20px 10px 20px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PLAYS,isFooterVisible:!0},n={width:"fit-content",maxWidth:"608px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.FIELD,isFooterVisible:!0},s={width:"320px",maxWidth:"320px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.DETAILS,isFooterVisible:!0},c={width:"246px",maxWidth:"246px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.TOURNAMENTS,isFooterVisible:!0},d={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PERSONAL_DATA,isFooterVisible:!0},h={width:"310px",modalHeight:l.modalHeight,maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PLAYS_TYPES,isFooterVisible:!0,isFooterCancelOnly:!0},m={width:"380px",modalHeight:l.modalHeight,maxWidth:"380px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.GOLSTATS,isFooterVisible:!0,isFooterCancelOnly:!0},y={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.UNIVERSE,isFooterVisible:!0},p={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.DISTANCE,isFooterVisible:!0},f={width:"250px",maxWidth:"250px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.RESULTS,padding:"0",isFooterVisible:!0},u={width:"250px",maxWidth:"250px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.RESULTS_BY_TIME,padding:"0",isFooterVisible:!0},g={width:"380px",maxWidth:"380px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.VIDEOS,isFooterVisible:!1},V={width:"300px",maxWidth:"300px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.GAMES,isFooterVisible:!0},B={width:"520px",maxWidth:"520px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.TAKEN_CORNERS,isFooterVisible:!0},v={width:"670px",maxWidth:"670px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.HOW_WAS_CORNER,isFooterVisible:!0},Z={width:"426px",maxWidth:"426px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.ZONE,isFooterVisible:!0},U={width:"285px",maxWidth:"285px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.WHAT_HAPPENED,isFooterVisible:!0},O=e.ref(!1),Q=e.ref(!1),K=e.ref(0),F=e.ref(0),T=e.ref({}),E=e.ref(null),M=e.ref(null),A=e.computed(()=>l.isForTemplateForm?"0":"unset"),q=e.computed(()=>l.buttonFilterProps&&l.buttonFilterProps.text?l.buttonFilterProps.text:l.menuButtonText||R()),te=e.computed(()=>l.isFromTemplates?b.RESULTS:l.filterType),de=e.computed(()=>l.expansionPanelText||R()),re=e.ref(null);e.watch(()=>l.filterType,_=>{if(_===b.PRODUCTIVITY)T.value={...i,...l.templateProps,productivityCategories:l.filters||L3};else if(_===b.PLAYS)T.value={...r,...l.templateProps,fontFamily:l.buttonFilterProps?l.buttonFilterProps.textFontFamily:"sans-serif",playsCategories:l.filters||P3};else if(_===b.FIELD)T.value={...n,...l.templateProps,fieldComponentProps:l.fieldComponentProps,fieldAreas:l.filters||[]};else if(_===b.DETAILS)T.value={...s,...l.templateProps,isPlayingAsHidden:l.filters?l.filters.isPlayingAsHidden:Ee.isPlayingAsHidden,playingAs:l.filters&&l.filters.playingAs||Ee.playingAs,gameSections:l.filters&&l.filters.gameSections||Ee.gameSections,statisticType:l.filters?l.filters.statisticType:Ee.statisticType,isStatisticTypeVisible:l.filters?l.filters.isStatisticTypeVisible:Ee.isStatisticTypeVisible};else if(_===b.TOURNAMENTS){const S=l.filters||D3;l.isOneTournamentOnly&&S.forEach(x=>{x.isSelected=x.id===l.defaultTournamentId}),T.value={...c,...l.templateProps,tournaments:S}}else _===b.PERSONAL_DATA?T.value={...d,...l.templateProps,token:l.token,awaitForFilters:l.awaitForFilters,personalDataFilters:l.filters}:_===b.PLAYS_TYPES?T.value={...h,...l.templateProps,playsGolstatsCategories:l.filters||v3}:_===b.GOLSTATS?T.value={...m,...l.templateProps,playsGolstatsCategories:l.filters||R3}:_===b.UNIVERSE?T.value={...y,...l.templateProps,universeFilters:l.filters||I3}:_===b.DISTANCE?T.value={...p,...l.templateProps,distanceFilters:l.filters||O3}:_===b.RESULTS?T.value={...f,...l.templateProps,resultsFilters:l.filters||Nl}:_===b.RESULTS_BY_TIME?T.value={...u,...l.templateProps,resultsByTimeFilters:l.filters||Na}:_===b.GAMES?T.value={...V,...l.templateProps,gamesFilters:l.filters||[]}:_===b.VIDEOS?T.value={...g,...l.templateProps,token:l.token}:_===b.TAKEN_CORNERS?T.value={...B,...l.templateProps,takenCornersFilters:l.filters||[]}:_===b.HOW_WAS_CORNER?T.value={...v,...l.templateProps,howWasCornerFilters:l.filters||Ca}:_===b.ZONE?T.value={...Z,...l.templateProps,zoneFilters:l.filters||[...lt]}:_===b.WHAT_HAPPENED&&(T.value={...U,...l.templateProps,whatHappenedFilters:l.filters||[...Va]});T.value.isExpansionMode=l.isExpansionPanel,l.isExpansionPanel&&(T.value.width="100%",T.value.maxWidth="100%")},{immediate:!0}),e.watch(()=>l.filters,()=>{if(l.filterType===b.PRODUCTIVITY)T.value={...i,...l.templateProps,productivityCategories:l.filters};else if(l.filterType===b.PLAYS)T.value={...r,...l.templateProps,playsCategories:l.filters};else if(l.filterType===b.FIELD)T.value={...n,...l.templateProps,fieldComponentProps:l.fieldComponentProps,fieldAreas:l.filters};else if(l.filterType===b.DETAILS)T.value={...s,...l.templateProps,isPlayingAsHidden:l.filters?l.filters.isPlayingAsHidden:Ee.isPlayingAsHidden,playingAs:l.filters?l.filters.playingAs:Ee.playingAs,gameSections:l.filters?l.filters.gameSections:Ee.gameSections,statisticType:l.filters?l.filters.statisticType:Ee.statisticType,isStatisticVisible:l.filters?l.filters.isStatisticVisible:Ee.isStatisticVisible};else if(l.filterType===b.TOURNAMENTS){const _=l.filters;l.isOneTournamentOnly&&_.forEach(S=>{S.isSelected=S.id===l.defaultTournamentId}),T.value={...c,...l.templateProps,tournaments:_}}else l.filterType===b.PERSONAL_DATA?T.value={...d,...l.templateProps,token:l.token,awaitForFilters:l.awaitForFilters,personalDataFilters:l.filters}:l.filterType===b.PLAYS_TYPES?T.value={...h,...l.templateProps,playsGolstatsCategories:l.filters}:l.filterType===b.GOLSTATS?T.value={...m,...l.templateProps,playsGolstatsCategories:l.filters}:l.filterType===b.UNIVERSE?T.value={...y,...l.templateProps,universeFilters:l.filters}:l.filterType===b.DISTANCE?T.value={...p,...l.templateProps,distanceFilters:l.filters}:l.filterType===b.RESULTS?T.value={...f,...l.templateProps,resultsFilters:l.filters||Nl}:l.filterType===b.RESULTS_BY_TIME?T.value={...u,...l.templateProps,resultsByTimeFilters:l.filters||Na}:l.filterType===b.GAMES?T.value={...V,...l.templateProps,gamesFilters:l.filters}:l.filterType===b.VIDEOS?T.value={...g,...l.templateProps,token:l.token}:l.filterType===b.TAKEN_CORNERS?T.value={...B,...l.templateProps,takenCornersFilters:l.filters||[]}:l.filterType===b.HOW_WAS_CORNER?T.value={...v,...l.templateProps,howWasCornerFilters:l.filters||Ca}:l.filterType===b.ZONE?T.value={...Z,...l.templateProps,zoneFilters:l.filters||[...lt]}:l.filterType===b.WHAT_HAPPENED&&(T.value={...U,...l.templateProps,whatHappenedFilters:l.filters||[...Va]});T.value.isExpansionMode=l.isExpansionPanel,l.isExpansionPanel&&(T.value.width="100%",T.value.maxWidth="100%")}),e.watch(O,_=>{_||o("close",re.value)}),e.watch(Q,_=>{_||o("close",re.value)});function N(_){K.value=_}function L(){l.isExpansionPanel?Q.value=!1:O.value=!1,o("apply",re.value)}function R(){if(l.filterType===b.PRODUCTIVITY)return l.isFromTemplates?"Tipos de jugadas":"Características de juego";if(l.filterType===b.PLAYS)return"Jugada(s)";if(l.filterType===b.FIELD)return"Zona de cancha";if(l.filterType===b.DETAILS)return"Detalles";if(l.filterType===b.TOURNAMENTS)return"Ligas";if(l.filterType===b.PERSONAL_DATA)return"Datos personales";if(l.filterType===b.PLAYS_TYPES)return"Tipos de jugada";if(l.filterType===b.GOLSTATS)return"Filtros Golstats";if(l.filterType===b.UNIVERSE)return"Universo";if(l.filterType===b.DISTANCE)return"Distancia";if([b.RESULTS,b.RESULTS_BY_TIME].includes(l.filterType))return"Resultados";if(l.filterType===b.GAMES)return"Partidos";if(l.filterType===b.VIDEOS)return"Videos";if(l.filterType===b.TAKEN_CORNERS)return"¿Quién cobró?";if(l.filterType===b.HOW_WAS_CORNER)return"¿Cómo fue cobrado?";if(l.filterType===b.ZONE)return"Zona";if(l.filterType===b.WHAT_HAPPENED)return"¿Qué sucedió?"}function w(_){T.value.fieldAreas=_,K.value=_.length,j(_)}function I(_){let S=0;_.value&&_.value.statistics&&(_.value.minutesPlayed&&S++,_.value.percentMinutesPlayed&&S++,_.value.lastMonths&&S++,_.value.statistics.totals&&S++,_.value.statistics.averagePerGame&&S++,_.value.statistics.averagePerMinute&&S++),T.value.universe=_.value,K.value=S,j(_.value)}function j(_){re.value=_,o("update:filters",_)}function z(_){F.value=_}function P(_=null){E.value&&E.value.clearFilters(_),M.value&&M.value.clearFilters(_)}return a({clearFilters:P}),(_,S)=>(e.openBlock(),e.createElementBlock("div",z3,[t.isExpansionPanel?(e.openBlock(),e.createElementBlock("div",U3,[e.createVNode(e.unref(A3),e.mergeProps(t.expansionPanelProps,{modelValue:Q.value,"onUpdate:modelValue":S[0]||(S[0]=x=>Q.value=x),text:de.value,"text-color":"rgba(255,255,255,.7)",icon:"/"+l.filterType+"-icon.png"}),{content:e.withCtx(()=>[e.createElementVNode("div",j3,[e.createVNode(Vl,e.mergeProps(T.value,{season:t.season,"is-female":t.isFemale,"is-expansion-mode":!0,"is-seleccion":t.isSeleccion,"is-one-tournament-only":t.isOneTournamentOnly,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"default-tournament-id":t.defaultTournamentId,"productivity-max-categories":t.productivityMaxCategories,"productivity-min-categories":t.productivityMinCategories,ref_key:"filterTemplateExpansionPanel",ref:M,onChangeFieldAreas:w,onChangeCategoriesSelected:N,onChangeFiltersSelected:N,onChangeUniverseFilters:I,onApply:L,"onUpdate:filters":j,onTotalFilters:z}),null,16,["season","is-female","is-seleccion","is-one-tournament-only","is-from-templates","is-for-template-form","default-tournament-id","productivity-max-categories","productivity-min-categories"])])]),_:1},16,["modelValue","text","icon"])])):(e.openBlock(),e.createElementBlock("div",H3,[e.createVNode(e.unref(Ag),{modelValue:O.value,"onUpdate:modelValue":S[1]||(S[1]=x=>O.value=x),width:t.width,"left-menu":A.value,"menu-margin-top":18},{trigger:e.withCtx(()=>[e.createVNode(S3,e.mergeProps(t.buttonFilterProps,{text:q.value,"show-badge-on-filter-full":t.showBadgeOnFilterFull,"info-value":K.value,"filters-total":F.value.value,"is-active":O.value,"icon-type":te.value}),null,16,["text","show-badge-on-filter-full","info-value","filters-total","is-active","icon-type"])]),menu:e.withCtx(()=>[e.createVNode(Vl,e.mergeProps(T.value,{season:t.season,"is-female":t.isFemale,"is-scouting":t.isScouting,"is-seleccion":t.isSeleccion,"is-one-tournament-only":t.isOneTournamentOnly,"default-tournament-id":t.defaultTournamentId,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"productivity-max-categories":t.productivityMaxCategories,"productivity-min-categories":t.productivityMinCategories,ref_key:"filterTemplateMenu",ref:E,onChangeFieldAreas:w,onChangeCategoriesSelected:N,onChangeFiltersSelected:N,onChangeUniverseFilters:I,"onUpdate:filters":j,onTotalFilters:z,onApply:L}),null,16,["season","is-female","is-scouting","is-seleccion","is-one-tournament-only","default-tournament-id","is-from-templates","is-for-template-form","productivity-max-categories","productivity-min-categories"])]),_:1},8,["modelValue","width","left-menu"])]))]))}},xl=J(W3,[["__scopeId","data-v-a8b543ef"]]);function Bl(){return{backgroundColor:"#2e3b46",width:"98.9%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"30px",padding:"5px 2.2%",textFontFamily:"'Poppins-Regular'"}}const G3={name:"ModalCreatePlayList",components:{GSCFilters:xl},props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},userTeamId:{type:Number,default:1},teamId:{type:Number,required:!0},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0}},setup(t,{emit:a}){const o=e.ref(Bl()),l=e.ref(null),i=e.ref(1),r=e.ref({title:"",position:""}),n=e.ref(0),s=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"],[10,"Desconocida"]]),c=e.ref(!1),d=e.ref([]),h=e.ref([]),m=e.ref(!1),y=e.ref(new Set),p=e.ref({tournaments:[],personalData:[]}),f=e.ref(null),u=e.ref(!0),g=e.ref(!1),V=e.ref(""),B=e.ref(0),v="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",Z=()=>{l.value&&(n.value=l.value.offsetWidth)},U=w=>{document.body.style.overflow=w?"hidden":"auto"},O=e.ref(null),Q=()=>{Z(),t.isVisible&&U(!0)},K=()=>{i.value=1,r.value={title:"",position:""},O.value&&(O.value.clearFilters(ie.ALL),O.value.clearFilters(ie.AGE_RANGE),O.value.clearFilters(ie.YEAR),O.value.clearFilters(ie.NATIONALITY),O.value.clearFilters(ie.POSITION)),yt.forEach(w=>{w.isSelected=w.name==="Liga MX",w.seasons.forEach(I=>{I.isSelected=w.name==="Liga MX"})}),y.value.clear(),B.value++,V.value="",g.value=!1,u.value=!0,f.value=null,h.value=[],a("close")},F=()=>{if(i.value===1){if(!r.value.title||!r.value.position)return;i.value=2,u.value=!0,f.value=null}},T=async()=>{try{c.value=!0;const I=await X.create({headers:{Authorization:`${v}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/teams/${t.userTeamId}/templates`);d.value=I.data.data}catch(w){console.error("Error al cargar templates:",w)}finally{c.value=!1}};e.onMounted(()=>{T(),window.addEventListener("resize",Q)}),e.onUnmounted(()=>{window.removeEventListener("resize",Q),U(!1)}),e.watch(()=>t.isVisible,w=>{w?(i.value=1,setTimeout(Z,0),U(!0)):(i.value=1,U(!1))});const E=e.computed(()=>({...o.value})),M=async w=>{p.value.tournaments=w,q()},A=async w=>{p.value.personalData=w,q()},q=()=>{if(!f.value){u.value=!0;return}const w=JSON.stringify(p.value)!==JSON.stringify(f.value);u.value=w},te=async()=>{var w,I,j,z,P,_;if(u.value){g.value=!0;try{const S=p.value.tournaments.find(x=>x.isSelected===!0);if(S&&S.seasons.length>0){const x=S.seasons[0];m.value=!0,h.value=[];try{let ae=[...(await X.create({headers:{Authorization:`${v}`}}).get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${x.id}`)).data.players.map(D=>{var H;return{id:D.player_id,name:re(D.player_name),name_full:D.player_name,photo:D.player_photo||"https://golstatsimages.blob.core.windows.net/players-profile/default.png",position:s.get(D.position_id)||"No especificada",position_id:D.position_id||0,age:D.age||"-",dob:D.dob||"-",jersey:D.jersey||0,nationality:D.nationality||"",is_female:D.is_female,nationality_id:D.nationality_id||0,minutes_played:D.minutes_played||0,team_id:D.team_id,team:{logo:`https://golstatsimages.blob.core.windows.net/teams-80/${D.team_id}.png`,shortName:((H=D.team)==null?void 0:H.shortName)||"-",tournament:S.name||"No especificada"},isSelected:y.value.has(D.player_id)}})];if((w=p.value.personalData)!=null&&w.ageByRange&&(ae=ae.filter(D=>{const H=parseInt(D.age);return!isNaN(H)&&H>=p.value.personalData.ageByRange.min&&H<=p.value.personalData.ageByRange.max})),(I=p.value.personalData)!=null&&I.year){const D=p.value.personalData.year;ae=ae.filter(H=>H.dob?parseInt(H.dob.substring(0,4))===D:!1)}if(((z=(j=p.value.personalData)==null?void 0:j.nationalities)==null?void 0:z.length)>0){const D=p.value.personalData.nationalities.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.nationality_id)))}if(((_=(P=p.value.personalData)==null?void 0:P.positions)==null?void 0:_.length)>0){const D=p.value.personalData.positions.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.position_id)))}h.value=ae,f.value=JSON.parse(JSON.stringify(p.value)),u.value=!1}catch($){console.error("Error al obtener jugadores:",$),h.value=[]}finally{m.value=!1}}}catch(S){console.error("Error al procesar la búsqueda:",S),m.value=!1}}},de=w=>{y.value.has(w)?y.value.delete(w):y.value.add(w)},re=w=>{if(!w)return"-";const[I,j]=w.split(",").map(P=>P.trim());if(!j)return w;const z=I.split(" ")[0];return`${j[0]}. ${z}`};e.watch(i,w=>{w===2&&(g.value=!1,u.value=!0,f.value=null)});const N=e.computed(()=>{if(!V.value)return h.value;const w=V.value.toLowerCase().trim();return h.value.filter(I=>I.name_full.toLowerCase().includes(w))});return{modalContent:l,currentStep:i,playlistData:r,modalWidth:n,isLoading:c,templates:d,closeModal:K,handleNext:F,filterButtonProps:E,filtersTypes:b,onFiltersTournamentsTops:M,tournamentsToFilter:yt,onFiltersPersonalData:A,players:h,isLoadingPlayers:m,positions:s,isSearchButtonActive:u,handleSearch:te,handlePlayerSelection:de,selectedPlayers:y,hasSearched:g,searchQuery:V,filteredPlayers:N,clearSearch:()=>{V.value=""},handleCreatePlaylist:async()=>{try{const w=d.value.find(P=>P.id===parseInt(r.value.position)),I={user_id:t.userId,name:r.value.title,template:w,players:y.value.size>0?Array.from(y.value).map(P=>{const _=h.value.find(S=>S.id===P);return{player_id:P,name:_.name_full,position:_.position_id,dob:_.dob,team_id:_.team_id,jersey:_.jersey,nationality:_.nationality,is_female:_.is_female}}):[]},z=await X.create({headers:{Authorization:`${v}`}}).post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed`,I);(z.status===200||z.status===201)&&(a("playlist-created",z.data),K())}catch(w){console.error("Error al crear la playlist:",w)}},filterKey:B,personalDataFilter:O}}},$3={class:"modal-header"},q3={class:"title-section"},Y3={key:0,class:"modal-body"},Z3=["value"],J3={key:1,disabled:""},K3={key:1,class:"modal-body"},X3={class:"search-section"},Q3={class:"filters-row"},e4={class:"filter-container"},t4={class:"filter-container"},a4={class:"search-input"},o4={class:"players-table"},l4={class:"table-body"},r4={key:0,class:"loading-container"},i4={key:1,class:"no-results"},n4={key:2,class:"no-results"},s4={class:"cell checkbox-cell"},d4=["checked","onChange"],c4={class:"cell player-cell"},p4=["src"],m4={class:"cell team-cell"},u4=["src"],f4={class:"cell"},h4={class:"cell"},y4={class:"cell"},g4={class:"cell"},b4={class:"modal-footer"},_4={key:0,class:"buttons-container buttons-container-step1"},S4=["disabled"],E4={class:"selected-players-info"},w4={class:"bold"},C4={class:"buttons-container buttons-container-step2"};function k4(t,a,o,l,i,r){const n=e.resolveComponent("GSCFilters");return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[11]||(a[11]=(...s)=>l.closeModal&&l.closeModal(...s))},[e.createElementVNode("div",{class:"modal-content",onClick:a[10]||(a[10]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",$3,[e.createElementVNode("div",q3,[a[12]||(a[12]=e.createElementVNode("svg",{width:"29",height:"22",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.249 4.88982H1.56809C0.980641 4.88982 0.5 5.35635 0.5 5.92655C0.5 6.49675 0.980641 6.96327 1.56809 6.96327H12.249C12.8365 6.96327 13.3171 6.49675 13.3171 5.92655C13.3171 5.35635 12.8365 4.88982 12.249 4.88982ZM12.249 0.74292H1.56809C0.980641 0.74292 0.5 1.20945 0.5 1.77965C0.5 2.34984 0.980641 2.81637 1.56809 2.81637H12.249C12.8365 2.81637 13.3171 2.34984 13.3171 1.77965C13.3171 1.20945 12.8365 0.74292 12.249 0.74292ZM17.5895 9.03673V5.92655C17.5895 5.35635 17.1088 4.88982 16.5214 4.88982C15.9339 4.88982 15.4533 5.35635 15.4533 5.92655V9.03673H12.249C11.6616 9.03673 11.1809 9.50325 11.1809 10.0735C11.1809 10.6437 11.6616 11.1102 12.249 11.1102H15.4533V14.2204C15.4533 14.7906 15.9339 15.2571 16.5214 15.2571C17.1088 15.2571 17.5895 14.7906 17.5895 14.2204V11.1102H20.7937C21.3812 11.1102 21.8618 10.6437 21.8618 10.0735C21.8618 9.50325 21.3812 9.03673 20.7937 9.03673H17.5895ZM1.56809 11.1102H7.97664C8.5641 11.1102 9.04474 10.6437 9.04474 10.0735C9.04474 9.50325 8.5641 9.03673 7.97664 9.03673H1.56809C0.980641 9.03673 0.5 9.50325 0.5 10.0735C0.5 10.6437 0.980641 11.1102 1.56809 11.1102Z",fill:"#ffffff",stroke:"#0D1D29","stroke-width":"0.191682"})],-1)),e.createElementVNode("h2",null,e.toDisplayString(l.currentStep===1?"Crear nueva lista":"Agregar jugadores"),1)]),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...s)=>l.closeModal&&l.closeModal(...s))},a[13]||(a[13]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),l.currentStep===1?(e.openBlock(),e.createElementBlock("div",Y3,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=s=>l.playlistData.title=s),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=s=>l.playlistData.position=s),class:"select-position"},[a[14]||(a[14]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona una posición para tu lista",-1)),l.isLoading?(e.openBlock(),e.createElementBlock("option",J3,"Cargando templates...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.templates,s=>(e.openBlock(),e.createElementBlock("option",{key:s.id,value:s.id},e.toDisplayString(s.name),9,Z3))),128))],512),[[e.vModelSelect,l.playlistData.position]])])):(e.openBlock(),e.createElementBlock("div",K3,[e.createElementVNode("div",X3,[e.createElementVNode("div",Q3,[e.createElementVNode("div",e4,[(e.openBlock(),e.createBlock(n,{key:l.filterKey,width:"98.9%",class:"filter-mobile","button-filter-props":l.filterButtonProps,"is-one-tournament-only":!0,"filter-type":l.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:l.tournamentsToFilter,"onUpdate:filters":l.onFiltersTournamentsTops},null,8,["button-filter-props","filter-type","filters","onUpdate:filters"]))]),e.createElementVNode("div",t4,[(e.openBlock(),e.createBlock(n,{ref:"personalDataFilter",key:`personal-${l.filterKey}`,class:"filter-mobile","button-filter-props":l.filterButtonProps,"filter-type":l.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,"is-scouting":"",width:"98.9%",season:null,"onUpdate:filters":l.onFiltersPersonalData},null,8,["button-filter-props","filter-type","onUpdate:filters"]))]),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{"search-button-active":l.isSearchButtonActive}]),onClick:a[3]||(a[3]=(...s)=>l.handleSearch&&l.handleSearch(...s))}," Buscar ",2)]),e.createElementVNode("div",a4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>l.searchQuery=s),type:"text",placeholder:"Filtrar jugador por nombre"},null,512),[[e.vModelText,l.searchQuery]]),l.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search",onClick:a[5]||(a[5]=(...s)=>l.clearSearch&&l.clearSearch(...s))},a[15]||(a[15]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1 1L13 13M1 13L13 1",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)]))):e.createCommentVNode("",!0)])]),e.createElementVNode("div",o4,[a[17]||(a[17]=e.createElementVNode("div",{class:"table-header"},[e.createElementVNode("div",{class:"header-cell checkbox-cell"}),e.createElementVNode("div",{class:"header-cell"},"Jugadores"),e.createElementVNode("div",{class:"header-cell"},"Equipo"),e.createElementVNode("div",{class:"header-cell"},"Posición"),e.createElementVNode("div",{class:"header-cell"},"Edad"),e.createElementVNode("div",{class:"header-cell"},"Liga"),e.createElementVNode("div",{class:"header-cell"},"Minutos")],-1)),e.createElementVNode("div",l4,[l.isLoadingPlayers?(e.openBlock(),e.createElementBlock("div",r4,a[16]||(a[16]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Buscando jugadores...",-1)]))):l.hasSearched?!l.isLoadingPlayers&&l.players.length===0?(e.openBlock(),e.createElementBlock("div",n4," No se encontraron resultados para tu búsqueda ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(l.filteredPlayers,s=>(e.openBlock(),e.createElementBlock("div",{class:"table-row",key:s.id},[e.createElementVNode("div",s4,[e.createElementVNode("input",{type:"checkbox",class:"checkbox-player",checked:l.selectedPlayers.has(s.id),onChange:c=>l.handlePlayerSelection(s.id)},null,40,d4)]),e.createElementVNode("div",c4,[e.createElementVNode("img",{src:s.photo,class:"player-avatar"},null,8,p4),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),e.createElementVNode("div",m4,[e.createElementVNode("img",{src:s.team.logo,class:"team-logo"},null,8,u4),e.createElementVNode("span",null,e.toDisplayString(s.team.shortName),1)]),e.createElementVNode("div",f4,e.toDisplayString(s.position),1),e.createElementVNode("div",h4,e.toDisplayString(s.age),1),e.createElementVNode("div",y4,e.toDisplayString(s.team.tournament),1),e.createElementVNode("div",g4,e.toDisplayString(s.minutes_played),1)]))),128)):(e.openBlock(),e.createElementBlock("div",i4,' Haz click en "Buscar" para aplicar tus filtros '))])])])),e.createElementVNode("div",b4,[l.currentStep===1?(e.openBlock(),e.createElementBlock("div",_4,[e.createElementVNode("button",{class:"cancelar",onClick:a[6]||(a[6]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[7]||(a[7]=(...s)=>l.handleNext&&l.handleNext(...s)),disabled:!l.playlistData.title||!l.playlistData.position}," Siguiente ",8,S4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",E4,[l.selectedPlayers.size===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[18]||(a[18]=e.createElementVNode("span",{class:"bold"},"No tienes",-1)),a[19]||(a[19]=e.createTextVNode(" jugadores seleccionados. "))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",w4,"Tienes "+e.toDisplayString(l.selectedPlayers.size),1),e.createTextVNode(" "+e.toDisplayString(l.selectedPlayers.size===1?"jugador seleccionado":"jugadores seleccionados")+". ",1)],64))]),e.createElementVNode("div",C4,[e.createElementVNode("button",{class:"cancelar",onClick:a[8]||(a[8]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[9]||(a[9]=(...s)=>l.handleCreatePlaylist&&l.handleCreatePlaylist(...s))}," Crear lista ")])],64))])],512)])):e.createCommentVNode("",!0)]),_:1})}const V4=be(G3,[["render",k4],["__scopeId","data-v-9986253d"]]),N4={name:"ModalCreatePlayList",props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},teamId:{type:Number,required:!0},listData:{type:Object,default:null},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0}},setup(t,{emit:a}){const o=e.ref(null),l=e.ref([]),i=e.ref({title:"",templateId:""}),r=e.ref(0),n=()=>{o.value&&(r.value=o.value.offsetWidth)},s=p=>{document.body.style.overflow=p?"hidden":"auto"},c="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",d=()=>{n(),t.isVisible&&s(!0)},h=()=>{i.value={title:"",templateId:""},a("close")},m=async()=>{var p,f;if(!(!i.value.title||!i.value.templateId))try{const u=X.create({headers:{Authorization:`${c}`}}),g=(p=t.listData)==null?void 0:p.id;(await u.put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed/${g}`,{user_id:t.userId,template:l.value.find(B=>B.id===i.value.templateId),name:i.value.title,id:g,players:(f=t.listData)==null?void 0:f.players})).status===200&&(a("next",i.value),h())}catch(u){console.error("Error al actualizar la lista:",u)}},y=async()=>{try{const f=await X.create({headers:{Authorization:`${c}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates");l.value=f.data.data}catch(p){console.error("Error al obtener templates:",p)}};return e.onMounted(()=>{window.addEventListener("resize",d),y()}),e.onUnmounted(()=>{window.removeEventListener("resize",d),s(!1)}),e.watch(()=>t.isVisible,p=>{p?(setTimeout(n,0),s(!0)):s(!1)}),e.watch(()=>t.listData,p=>{p&&(p.name&&(i.value.title=p.name),p.template&&(i.value.templateId=Number(p.template)))},{immediate:!0}),{modalContent:o,playlistData:i,modalWidth:r,closeModal:h,handleNext:m,templates:l}}},x4={class:"modal-header"},B4={class:"modal-body"},T4=["value"],F4={class:"modal-footer"},M4={class:"buttons-container buttons-container-step1"},A4=["disabled"];function L4(t,a,o,l,i,r){return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[6]||(a[6]=(...n)=>l.closeModal&&l.closeModal(...n))},[e.createElementVNode("div",{class:"modal-content",onClick:a[5]||(a[5]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",x4,[a[8]||(a[8]=e.createElementVNode("div",{class:"title-section"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3214_107704)"},[e.createElementVNode("path",{d:"M8.25 3H3C2.60218 3 2.22064 3.15804 1.93934 3.43934C1.65804 3.72064 1.5 4.10218 1.5 4.5V15C1.5 15.3978 1.65804 15.7794 1.93934 16.0607C2.22064 16.342 2.60218 16.5 3 16.5H13.5C13.8978 16.5 14.2794 16.342 14.5607 16.0607C14.842 15.7794 15 15.3978 15 15V9.75",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M13.875 1.87493C14.1734 1.57656 14.578 1.40894 15 1.40894C15.422 1.40894 15.8266 1.57656 16.125 1.87493C16.4234 2.17329 16.591 2.57797 16.591 2.99993C16.591 3.42188 16.4234 3.82656 16.125 4.12493L9 11.2499L6 11.9999L6.75 8.99993L13.875 1.87493Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3214_107704"},[e.createElementVNode("rect",{width:"18",height:"18",fill:"white"})])])]),e.createElementVNode("h2",null,"Editar lista")],-1)),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...n)=>l.closeModal&&l.closeModal(...n))},a[7]||(a[7]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),e.createElementVNode("div",B4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=n=>l.playlistData.title=n),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=n=>l.playlistData.templateId=n),class:"select-position"},[a[9]||(a[9]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona una plantilla",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.templates,n=>(e.openBlock(),e.createElementBlock("option",{key:n.id,value:n.id},e.toDisplayString(n.name),9,T4))),128))],512),[[e.vModelSelect,l.playlistData.templateId]])]),e.createElementVNode("div",F4,[e.createElementVNode("div",M4,[e.createElementVNode("button",{class:"cancelar",onClick:a[3]||(a[3]=(...n)=>l.closeModal&&l.closeModal(...n))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[4]||(a[4]=(...n)=>l.handleNext&&l.handleNext(...n)),disabled:!l.playlistData.title||!l.playlistData.templateId}," Guardar ",8,A4)])])],512)])):e.createCommentVNode("",!0)]),_:1})}const P4=be(N4,[["render",L4],["__scopeId","data-v-6aa243d7"]]),I4={name:"ModalCreatePlayList",components:{GSCFilters:xl},props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},teamId:{type:Number,required:!0},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0},listId:{type:Number,required:!0}},setup(t,{emit:a}){const o=e.ref(Bl()),l=e.ref(null),i=e.ref(2),r=e.ref({title:"",position:""}),n=e.ref(0),s=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"],[10,"Desconocida"]]),c=e.ref(!1),d=e.ref([]),h=e.ref([]),m=e.ref(!1),y=e.ref(new Set),p=e.ref({tournaments:[],personalData:[]}),f=e.ref(null),u=e.ref(!0),g=e.ref(!1),V=e.ref(""),B=e.ref(0),v="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",Z=()=>{l.value&&(n.value=l.value.offsetWidth)},U=w=>{document.body.style.overflow=w?"hidden":"auto"},O=e.ref(null),Q=()=>{Z(),t.isVisible&&U(!0)},K=()=>{r.value={title:"",position:""},O.value&&(O.value.clearFilters(ie.ALL),O.value.clearFilters(ie.AGE_RANGE),O.value.clearFilters(ie.YEAR),O.value.clearFilters(ie.NATIONALITY),O.value.clearFilters(ie.POSITION)),yt.forEach(w=>{w.isSelected=w.name==="Liga MX",w.seasons.forEach(I=>{I.isSelected=w.name==="Liga MX"})}),y.value.clear(),B.value++,V.value="",g.value=!1,u.value=!0,f.value=null,h.value=[],a("close")},F=()=>{if(i.value===1){if(!r.value.title||!r.value.position)return;i.value=2,u.value=!0,f.value=null}},T=async()=>{try{c.value=!0;const I=await X.create({headers:{Authorization:`${v}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates");d.value=I.data.data}catch(w){console.error("Error al cargar templates:",w)}finally{c.value=!1}};e.onMounted(()=>{T(),window.addEventListener("resize",Q)}),e.onUnmounted(()=>{window.removeEventListener("resize",Q),U(!1)}),e.watch(()=>t.isVisible,w=>{w?(setTimeout(Z,0),U(!0)):U(!1)});const E=e.computed(()=>({...o.value})),M=async w=>{p.value.tournaments=w,q()},A=async w=>{p.value.personalData=w,q()},q=()=>{if(!f.value){u.value=!0;return}const w=JSON.stringify(p.value)!==JSON.stringify(f.value);u.value=w},te=async()=>{var w,I,j,z,P,_;if(u.value){g.value=!0;try{const S=p.value.tournaments.find(x=>x.isSelected===!0);if(S&&S.seasons.length>0){const x=S.seasons[0];m.value=!0,h.value=[];try{let ae=[...(await X.create({headers:{Authorization:`${v}`}}).get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${x.id}`)).data.players.map(D=>{var H;return{id:D.player_id,name:re(D.player_name),name_full:D.player_name,photo:D.player_photo||"https://golstatsimages.blob.core.windows.net/players-profile/default.png",position:s.get(D.position_id)||"No especificada",position_id:D.position_id||0,age:D.age||"-",dob:D.dob||"-",jersey:D.jersey||0,nationality:D.nationality||"",is_female:D.is_female,nationality_id:D.nationality_id||0,minutes_played:D.minutes_played||0,team_id:D.team_id,team:{logo:`https://golstatsimages.blob.core.windows.net/teams-80/${D.team_id}.png`,shortName:((H=D.team)==null?void 0:H.shortName)||"-",tournament:S.name||"No especificada"},isSelected:y.value.has(D.player_id)}})];if((w=p.value.personalData)!=null&&w.ageByRange&&(ae=ae.filter(D=>{const H=parseInt(D.age);return!isNaN(H)&&H>=p.value.personalData.ageByRange.min&&H<=p.value.personalData.ageByRange.max})),(I=p.value.personalData)!=null&&I.year){const D=p.value.personalData.year;ae=ae.filter(H=>H.dob?parseInt(H.dob.substring(0,4))===D:!1)}if(((z=(j=p.value.personalData)==null?void 0:j.nationalities)==null?void 0:z.length)>0){const D=p.value.personalData.nationalities.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.nationality_id)))}if(((_=(P=p.value.personalData)==null?void 0:P.positions)==null?void 0:_.length)>0){const D=p.value.personalData.positions.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.position_id)))}h.value=ae,f.value=JSON.parse(JSON.stringify(p.value)),u.value=!1}catch($){console.error("Error al obtener jugadores:",$),h.value=[]}finally{m.value=!1}}}catch(S){console.error("Error al procesar la búsqueda:",S),m.value=!1}}},de=w=>{y.value.has(w)?y.value.delete(w):y.value.add(w)},re=w=>{if(!w)return"-";const[I,j]=w.split(",").map(P=>P.trim());if(!j)return w;const z=I.split(" ")[0];return`${j[0]}. ${z}`};e.watch(i,w=>{w===2&&(g.value=!1,u.value=!0,f.value=null)});const N=e.computed(()=>{if(!V.value)return h.value;const w=V.value.toLowerCase().trim();return h.value.filter(I=>I.name_full.toLowerCase().includes(w))});return{modalContent:l,currentStep:i,playlistData:r,modalWidth:n,isLoading:c,templates:d,closeModal:K,handleNext:F,filterButtonProps:E,filtersTypes:b,onFiltersTournamentsTops:M,tournamentsToFilter:yt,onFiltersPersonalData:A,players:h,isLoadingPlayers:m,positions:s,isSearchButtonActive:u,handleSearch:te,handlePlayerSelection:de,selectedPlayers:y,hasSearched:g,searchQuery:V,filteredPlayers:N,clearSearch:()=>{V.value=""},handleCreatePlaylist:async()=>{try{const w={user_id:t.userId,id:t.listId,players:Array.from(y.value).map(z=>{const P=h.value.find(_=>_.id===z);return{player_id:z,name:P.name_full,position:P.position_id,dob:P.dob,team_id:P.team_id,jersey:P.jersey,nationality:P.nationality,nationality_id:P.nationality_id,is_female:P.is_female}})},j=await X.create({headers:{Authorization:`${v}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed/${t.listId}/players`,w);(j.status===200||j.status===201)&&(a("playlist-created",j.data),K())}catch(w){console.error("Error al agregar jugadores a la lista:",w)}},filterKey:B,personalDataFilter:O}}},D4={class:"modal-header"},v4={class:"title-section"},R4={key:0,class:"modal-body"},O4=["value"],z4={key:1,disabled:""},U4={key:1,class:"modal-body"},j4={class:"search-section"},H4={class:"filters-row"},W4={class:"filter-container"},G4={class:"filter-container"},$4={class:"search-input"},q4={class:"players-table"},Y4={class:"table-body"},Z4={key:0,class:"loading-container"},J4={key:1,class:"no-results"},K4={key:2,class:"no-results"},X4={class:"cell checkbox-cell"},Q4=["checked","onChange"],e5={class:"cell player-cell"},t5=["src"],a5={class:"cell team-cell"},o5=["src"],l5={class:"cell"},r5={class:"cell"},i5={class:"cell"},n5={class:"cell"},s5={class:"modal-footer"},d5={key:0,class:"buttons-container buttons-container-step1"},c5=["disabled"],p5={class:"selected-players-info"},m5={class:"bold"},u5={class:"buttons-container buttons-container-step2"},f5=["disabled"];function h5(t,a,o,l,i,r){const n=e.resolveComponent("GSCFilters");return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[11]||(a[11]=(...s)=>l.closeModal&&l.closeModal(...s))},[e.createElementVNode("div",{class:"modal-content",onClick:a[10]||(a[10]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",D4,[e.createElementVNode("div",v4,[a[12]||(a[12]=e.createElementVNode("svg",{width:"29",height:"22",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.249 4.88982H1.56809C0.980641 4.88982 0.5 5.35635 0.5 5.92655C0.5 6.49675 0.980641 6.96327 1.56809 6.96327H12.249C12.8365 6.96327 13.3171 6.49675 13.3171 5.92655C13.3171 5.35635 12.8365 4.88982 12.249 4.88982ZM12.249 0.74292H1.56809C0.980641 0.74292 0.5 1.20945 0.5 1.77965C0.5 2.34984 0.980641 2.81637 1.56809 2.81637H12.249C12.8365 2.81637 13.3171 2.34984 13.3171 1.77965C13.3171 1.20945 12.8365 0.74292 12.249 0.74292ZM17.5895 9.03673V5.92655C17.5895 5.35635 17.1088 4.88982 16.5214 4.88982C15.9339 4.88982 15.4533 5.35635 15.4533 5.92655V9.03673H12.249C11.6616 9.03673 11.1809 9.50325 11.1809 10.0735C11.1809 10.6437 11.6616 11.1102 12.249 11.1102H15.4533V14.2204C15.4533 14.7906 15.9339 15.2571 16.5214 15.2571C17.1088 15.2571 17.5895 14.7906 17.5895 14.2204V11.1102H20.7937C21.3812 11.1102 21.8618 10.6437 21.8618 10.0735C21.8618 9.50325 21.3812 9.03673 20.7937 9.03673H17.5895ZM1.56809 11.1102H7.97664C8.5641 11.1102 9.04474 10.6437 9.04474 10.0735C9.04474 9.50325 8.5641 9.03673 7.97664 9.03673H1.56809C0.980641 9.03673 0.5 9.50325 0.5 10.0735C0.5 10.6437 0.980641 11.1102 1.56809 11.1102Z",fill:"#ffffff",stroke:"#0D1D29","stroke-width":"0.191682"})],-1)),e.createElementVNode("h2",null,e.toDisplayString(l.currentStep===1?"Crear nueva lista":"Agregar jugadores"),1)]),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...s)=>l.closeModal&&l.closeModal(...s))},a[13]||(a[13]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),l.currentStep===1?(e.openBlock(),e.createElementBlock("div",R4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=s=>l.playlistData.title=s),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=s=>l.playlistData.position=s),class:"select-position"},[a[14]||(a[14]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona una posición para tu lista",-1)),l.isLoading?(e.openBlock(),e.createElementBlock("option",z4,"Cargando templates...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.templates,s=>(e.openBlock(),e.createElementBlock("option",{key:s.id,value:s.id},e.toDisplayString(s.name),9,O4))),128))],512),[[e.vModelSelect,l.playlistData.position]])])):(e.openBlock(),e.createElementBlock("div",U4,[e.createElementVNode("div",j4,[e.createElementVNode("div",H4,[e.createElementVNode("div",W4,[(e.openBlock(),e.createBlock(n,{key:l.filterKey,width:"98.9%",class:"filter-mobile","button-filter-props":l.filterButtonProps,"is-one-tournament-only":!0,"filter-type":l.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:l.tournamentsToFilter,"onUpdate:filters":l.onFiltersTournamentsTops},null,8,["button-filter-props","filter-type","filters","onUpdate:filters"]))]),e.createElementVNode("div",G4,[(e.openBlock(),e.createBlock(n,{ref:"personalDataFilter",key:`personal-${l.filterKey}`,class:"filter-mobile","button-filter-props":l.filterButtonProps,"filter-type":l.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,"is-scouting":"",width:"98.9%",season:null,"onUpdate:filters":l.onFiltersPersonalData},null,8,["button-filter-props","filter-type","onUpdate:filters"]))]),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{"search-button-active":l.isSearchButtonActive}]),onClick:a[3]||(a[3]=(...s)=>l.handleSearch&&l.handleSearch(...s))}," Buscar ",2)]),e.createElementVNode("div",$4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>l.searchQuery=s),type:"text",placeholder:"Filtrar jugador por nombre"},null,512),[[e.vModelText,l.searchQuery]]),l.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search",onClick:a[5]||(a[5]=(...s)=>l.clearSearch&&l.clearSearch(...s))},a[15]||(a[15]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1 1L13 13M1 13L13 1",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)]))):e.createCommentVNode("",!0)])]),e.createElementVNode("div",q4,[a[17]||(a[17]=e.createElementVNode("div",{class:"table-header"},[e.createElementVNode("div",{class:"header-cell checkbox-cell"}),e.createElementVNode("div",{class:"header-cell"},"Jugadores"),e.createElementVNode("div",{class:"header-cell"},"Equipo"),e.createElementVNode("div",{class:"header-cell"},"Posición"),e.createElementVNode("div",{class:"header-cell"},"Edad"),e.createElementVNode("div",{class:"header-cell"},"Liga"),e.createElementVNode("div",{class:"header-cell"},"Minutos")],-1)),e.createElementVNode("div",Y4,[l.isLoadingPlayers?(e.openBlock(),e.createElementBlock("div",Z4,a[16]||(a[16]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Buscando jugadores...",-1)]))):l.hasSearched?!l.isLoadingPlayers&&l.players.length===0?(e.openBlock(),e.createElementBlock("div",K4," No se encontraron resultados para tu búsqueda ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(l.filteredPlayers,s=>(e.openBlock(),e.createElementBlock("div",{class:"table-row",key:s.id},[e.createElementVNode("div",X4,[e.createElementVNode("input",{type:"checkbox",class:"checkbox-player",checked:l.selectedPlayers.has(s.id),onChange:c=>l.handlePlayerSelection(s.id)},null,40,Q4)]),e.createElementVNode("div",e5,[e.createElementVNode("img",{src:s.photo,class:"player-avatar"},null,8,t5),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),e.createElementVNode("div",a5,[e.createElementVNode("img",{src:s.team.logo,class:"team-logo"},null,8,o5),e.createElementVNode("span",null,e.toDisplayString(s.team.shortName),1)]),e.createElementVNode("div",l5,e.toDisplayString(s.position),1),e.createElementVNode("div",r5,e.toDisplayString(s.age),1),e.createElementVNode("div",i5,e.toDisplayString(s.team.tournament),1),e.createElementVNode("div",n5,e.toDisplayString(s.minutes_played),1)]))),128)):(e.openBlock(),e.createElementBlock("div",J4,' Haz click en "Buscar" para aplicar tus filtros '))])])])),e.createElementVNode("div",s5,[l.currentStep===1?(e.openBlock(),e.createElementBlock("div",d5,[e.createElementVNode("button",{class:"cancelar",onClick:a[6]||(a[6]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[7]||(a[7]=(...s)=>l.handleNext&&l.handleNext(...s)),disabled:!l.playlistData.title||!l.playlistData.position}," Siguiente ",8,c5)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",p5,[l.selectedPlayers.size===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[18]||(a[18]=e.createElementVNode("span",{class:"bold"},"No tienes",-1)),a[19]||(a[19]=e.createTextVNode(" jugadores seleccionados. "))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",m5,"Tienes "+e.toDisplayString(l.selectedPlayers.size),1),e.createTextVNode(" "+e.toDisplayString(l.selectedPlayers.size===1?"jugador seleccionado":"jugadores seleccionados")+". ",1)],64))]),e.createElementVNode("div",u5,[e.createElementVNode("button",{class:"cancelar",onClick:a[8]||(a[8]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[9]||(a[9]=(...s)=>l.handleCreatePlaylist&&l.handleCreatePlaylist(...s)),disabled:l.selectedPlayers.size===0}," Agregar a lista ",8,f5)])],64))])],512)])):e.createCommentVNode("",!0)]),_:1})}const y5=be(I4,[["render",h5],["__scopeId","data-v-b922cef0"]]),g5={name:"ModalDeleteLista",data(){return{show:!1}},methods:{open(){this.show=!0},close(){this.show=!1,this.$emit("close")},handleDelete(){this.$emit("confirm-delete-lista"),this.close()}}},b5={key:0,class:"modal-wrapper"},_5={class:"modal-content"},S5={class:"modal-actions"};function E5(t,a,o,l,i,r){return i.show?(e.openBlock(),e.createElementBlock("div",b5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[3]||(a[3]=n=>t.$emit("close"))},[e.createElementVNode("div",{class:"modal-container",onClick:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",_5,[a[4]||(a[4]=e.createStaticVNode('<div class="modal-header" data-v-e18c4a60><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar playlist" class="icon-trash" data-v-e18c4a60><span data-v-e18c4a60>Eliminar Lista</span></div><div class="separator" data-v-e18c4a60></div><p class="modal-message" data-v-e18c4a60> ¿Estás seguro que deseas eliminar<br data-v-e18c4a60> esta lista? Si lo haces no hay manera<br data-v-e18c4a60> de recuperala. </p><div class="separator" data-v-e18c4a60></div>',4)),e.createElementVNode("div",S5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("close"))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.handleDelete&&r.handleDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const w5=be(g5,[["render",E5],["__scopeId","data-v-e18c4a60"]]),C5={name:"ModalDeletePlayers",data(){return{show:!1}},methods:{open(){this.show=!0},close(){this.show=!1,this.$emit("close")},handleDelete(){this.$emit("confirm-delete"),this.close()}}},k5={key:0,class:"modal-wrapper"},V5={class:"modal-content"},N5={class:"modal-actions"};function x5(t,a,o,l,i,r){return i.show?(e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[3]||(a[3]=n=>t.$emit("close"))},[e.createElementVNode("div",{class:"modal-container",onClick:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",V5,[a[4]||(a[4]=e.createStaticVNode('<div class="modal-header" data-v-3d60eaf1><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar jugadores" class="icon-trash" data-v-3d60eaf1><span data-v-3d60eaf1>Eliminar jugadores</span></div><div class="separator" data-v-3d60eaf1></div><p class="modal-message" data-v-3d60eaf1> ¿Estás seguro que deseas eliminar a<br data-v-3d60eaf1> estos jugadores de la lista? </p><div class="separator" data-v-3d60eaf1></div>',4)),e.createElementVNode("div",N5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("close"))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.handleDelete&&r.handleDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const B5=be(C5,[["render",x5],["__scopeId","data-v-3d60eaf1"]]),T5={name:"ModalDeletePlayers",props:{modelValue:{type:Boolean,required:!0}},methods:{confirmDelete(){this.$emit("confirm-delete"),this.$emit("update:modelValue",!1)}}},F5={key:0,class:"modal-wrapper"},M5={class:"modal-container"},A5={class:"modal-content"},L5={class:"modal-actions"};function P5(t,a,o,l,i,r){return o.modelValue?(e.openBlock(),e.createElementBlock("div",F5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[2]||(a[2]=n=>t.$emit("update:modelValue",!1))},[e.createElementVNode("div",M5,[e.createElementVNode("div",A5,[a[3]||(a[3]=e.createStaticVNode('<div class="modal-header" data-v-e9a8dd88><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar jugadores" class="icon-trash" data-v-e9a8dd88><span data-v-e9a8dd88>Eliminar jugadores</span></div><div class="separator" data-v-e9a8dd88></div><p class="modal-message" data-v-e9a8dd88> ¿Estás seguro que deseas eliminar a<br data-v-e9a8dd88> estos jugadores de la lista? </p><div class="separator" data-v-e9a8dd88></div>',4)),e.createElementVNode("div",L5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("update:modelValue",!1))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.confirmDelete&&r.confirmDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const I5=be(T5,[["render",P5],["__scopeId","data-v-e9a8dd88"]]);function D5(t){const a=e.ref({width:0,height:0});function o(){const l=t.value.getBoundingClientRect();a.value.width=l.width,a.value.height=l.height}return e.onMounted(()=>{o(),window.addEventListener("resize",o)}),e.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const xa={name:"GSCList",props:{userId:{type:Number,default:0},userTeamId:{type:Number,default:1}},components:{GridView:rr,ListView:vi,ModalCreatePlaylist:V4,ModalEditarLista:P4,ModalAddPlayers:y5,ModalDeleteLista:w5,ModalDeletePlayers:B5,ModalDeletePlayer:I5},data(){return{modalVisible:!1,modalEditarVisible:!1,modalAddPlayersVisible:!1,modalDeleteVisible:!1,modalCompareVisible:!1,selectedListId:null,selectedListName:"",activeItem:null,activeTooltip:null,viewMode:"grid",searchText:"",tooltipY:0,positions: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 "],[10,"Desconocida"]]),positionsFemale:new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",lists:[],templates:{},showDeleteModal:!1,selectedPlayersToDelete:[],hasSelectedPlayers:!1,currentListIndex:null,selectedListData:null,statsLoaded:!1,originalOverflow:null,isScrollLocked:!1}},setup(){const t=e.ref(null),{elementSize:a}=D5(t);return{elementSize:a,myDivRefList:t}},computed:{isMobileLayout(){return this.elementSize.width<768},isCompactLayout(){return this.elementSize.width<768},searchCompact(){return this.elementSize.width<1e3},searchCloseCompact(){return this.elementSize.width<920},smallMobileCompact(){return this.elementSize.width<480},tooltipStyle(){return this.smallMobileCompact?{top:`${this.tooltipY}px`,transform:"translateX(-50%)"}:{}},filteredLists(){if(!this.searchText)return this.lists;const t=this.searchText.toLowerCase();return this.lists.filter(a=>a.name.toLowerCase().includes(t))},currentTemplateCategories(){if(this.activeItem===null)return[];const t=this.lists.find(o=>o.id===this.activeItem);if(!t)return[];const a=this.templates[t.template];return!a||!a.variables?[]:a.variables.map(o=>({id:o.id,id_variable:o.custom_id,name:o.name}))},isAnyListInDeleteMode(){return this.lists.some(t=>t.deleteActive)}},methods:{handleViewProfile(t){this.$emit("showProfile",t)},handleDeleteFromList(t){let a={player_id:t.player_id,name:t.player_name,position:t.position_name};this.handleDeletePlayer(a)},ShowGraph(t){this.$emit("showGraph",t)},async fetchUserLists(){try{await this.fetchTemplates();const a=await X.create({headers:{Authorization:`${this.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed`);this.lists=a.data.data.map(o=>{var l,i,r,n,s;return{id:o.id,name:o.name,position:((r=this.templates[((l=o.template)==null?void 0:l.id)||((i=o.template_id)==null?void 0:i.id)])==null?void 0:r.name)||"Sin posición",template:((n=o.template)==null?void 0:n.id)||((s=o.template_id)==null?void 0:s.id),createdAt:this.formatDate(o.created_at),deleteActive:!1,players:(o.players||[]).map(c=>({...c,position:c.is_female?this.positionsFemale.get(c.position)||"Desconocida":this.positions.get(c.position)||"Desconocida",name:c.name.split(",").map(d=>d.trim().split(" ")[0]).reverse().join(" "),photo:`https://golstatsimages.blob.core.windows.net/players-profile/${c.player_id}.png`,countryFlag:c.nationality_id?`https://golstatsimages.blob.core.windows.net/flags/${c.nationality_id}.jpg`:"",nationality:c.nationality})),playerStats:{}}})}catch(t){console.error("Error al obtener las listas:",t)}},async fetchTemplates(){try{const a=await X.create({headers:{Authorization:`${this.token}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates"),o={};a.data.data.forEach(l=>{o[l.id]=l}),this.templates=o}catch(t){console.error("Error al obtener los templates:",t)}},getOriginalList(t){return this.lists.find(a=>a.id===t)},toggleItem(t,a){if(this.isAnyListInDeleteMode&&!this.getOriginalList(t).deleteActive){a.preventDefault();return}this.activeItem===t?this.activeItem=null:(this.lists.forEach(o=>{o.deleteActive=!1}),this.statsLoaded=!1,this.activeItem=t,this.fetchPlayerStats(t))},async fetchPlayerStats(t){try{const o=await X.create({headers:{Authorization:`${this.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${t}/stats`),l=this.lists.findIndex(c=>c.id===t),i={},r={},n={};o.data.max.forEach(([c,d])=>{r[c]=parseInt(d)}),Object.entries(o.data.data).forEach(([c,d])=>{c!=="max"&&(i[c]={},d.forEach(h=>{const[m,,y,p,f]=h;i[c][m]={variable_id:m,value:y,max:r[m]||0,season:p,categories:f}}))}),Object.entries(o.data.additional_data).forEach(([c,d])=>{n[c]=d}),l!==-1&&(this.lists[l].playerStats=i,this.lists[l].additionalData=n),this.statsLoaded=!0}catch(a){console.error("Error fetching player stats:",a),this.statsLoaded=!0}},toggleViewMode(t){this.viewMode=t},toggleTooltip(t,a){this.activeTooltip===t?(this.activeTooltip=null,this.handleScroll(!1)):(this.activeTooltip!==null&&this.handleScroll(!1),this.activeTooltip=t,this.smallMobileCompact&&(this.tooltipY=a.clientY,this.handleScroll(!0))),a.stopPropagation()},editarLista(t){this.selectedListId=this.lists[t].id,this.selectedListData=this.lists[t],this.modalEditarVisible=!0,this.activeTooltip=null},closeModalEditar(){this.modalEditarVisible=!1,this.selectedListId=null},agregarJugadores(t){const a=this.filteredLists[t];this.currentListIndex=this.lists.findIndex(o=>o.id===a.id),this.selectedListId=a.id,this.modalAddPlayersVisible=!0,this.activeTooltip=null},closeModalAddPlayers(){this.modalAddPlayersVisible=!1,this.selectedListId=null},eliminarJugadores(t){const a=this.filteredLists[t];this.activeItem!==a.id&&this.toggleItem(a.id),this.lists.forEach(l=>{l.deleteActive=!1});const o=this.getOriginalList(a.id);o&&(o.deleteActive=!0),this.currentListIndex=this.lists.findIndex(l=>l.id===a.id),this.activeTooltip=null},async compararListas(t){const a=this.filteredLists[t],o=this.lists.find(i=>i.id===a.id);if(!o||!o.players){console.error("No se encontró la lista o no tiene jugadores");return}this.activeItem!==a.id&&(this.statsLoaded=!1,this.activeItem=a.id,await this.fetchPlayerStats(a.id));const l=o.players.map(i=>{var r,n,s,c,d,h,m,y,p,f;return{position:i.position,player_name:i.name,player_photo:i.photo,total:"-",id:i.player_id,player_age:this.calculateAge(i.dob),team_abrev:((n=(r=o.additionalData)==null?void 0:r[i.player_id])==null?void 0:n.team_abrev)||"-",team_name:((c=(s=o.additionalData)==null?void 0:s[i.player_id])==null?void 0:c.team_name)||"-",team_logo:`https://golstatsimages.blob.core.windows.net/teams-80/${i.team_id}.png`,position_name:i.position,player_position:i.position,player_country:La[`${i.nationality_id}`]||i.nationality,player_country_flag:i.countryFlag,player_games:((h=(d=o.additionalData)==null?void 0:d[i.player_id])==null?void 0:h.games_played)||0,player_min:((y=(m=o.additionalData)==null?void 0:m[i.player_id])==null?void 0:y.minutes)||0,league_name:"-",seasons:[...new Set(this.currentTemplateCategories.map(u=>{var g,V;return((V=(g=o.playerStats[i.player_id])==null?void 0:g[u.id_variable])==null?void 0:V.season)||[]}).flat())].filter(u=>u&&u!==0),season_id:((f=(p=o.additionalData)==null?void 0:p[i.player_id])==null?void 0:f.season_id)||0,stats:this.currentTemplateCategories.map(u=>{var g,V,B,v,Z,U,O,Q;return{category_id:((V=(g=o.playerStats[i.player_id])==null?void 0:g[u.id_variable])==null?void 0:V.variable_id)||null,custom_category_id:((v=(B=o.playerStats[i.player_id])==null?void 0:B[u.id_variable])==null?void 0:v.variable_id)||null,name:u.name,total:((U=(Z=o.playerStats[i.player_id])==null?void 0:Z[u.id_variable])==null?void 0:U.value)||0,seasons:((Q=(O=o.playerStats[i.player_id])==null?void 0:O[u.id_variable])==null?void 0:Q.season)||null}})}});this.$emit("compare-players",l),this.activeTooltip=null},calculateAge(t){if(!t)return"-";const a=new Date(t),o=new Date;let l=o.getFullYear()-a.getFullYear();const i=o.getMonth()-a.getMonth();return(i<0||i===0&&o.getDate()<a.getDate())&&l--,l},closeModalCompare(){this.modalCompareVisible=!1},eliminarLista(t){const a=this.filteredLists[t];this.selectedListId=a.id,this.selectedListName=a.name,this.$refs.deleteModal.open(),this.activeTooltip=null},closeModalDelete(){this.$refs.deleteModal.close(),this.selectedListId=null,this.selectedListName=""},closeModalDeletePlayers(){this.$refs.deleteModalPlayers.close()},closeModalDeletePlayer(){this.$refs.deleteModalPlayer.close()},async handleConfirmDeleteLista(){try{await X.create({headers:{Authorization:`${this.token}`}}).delete(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${this.selectedListId}`);const a=this.searchText;this.lists=this.lists.filter(o=>o.id!==this.selectedListId),this.$refs.deleteModal.close(),await this.fetchUserLists(),a&&(this.searchText=a)}catch(t){console.error("Error al eliminar la lista:",t),await this.fetchUserLists()}},async handleConfirmDeletePlayers(){try{const t=this.lists[this.currentListIndex],a=t.id,o={user_id:this.userId,players:this.selectedPlayersToDelete,id:a};await X.create({headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${a}/players/delete`,o),t&&(t.players=t.players.filter(i=>!this.selectedPlayersToDelete.some(r=>r.player_id===i.player_id))),this.selectedPlayersToDelete=[],this.hasSelectedPlayers=!1,t&&(t.deleteActive=!1),this.$refs.deleteModalPlayers.close()}catch(t){console.error("Error al eliminar jugadores:",t)}},async handleConfirmDeletePlayer(){try{const t=this.lists.find(r=>r.id===this.activeItem);if(!t){console.error("No se encontró la lista activa");return}const a=t.id,o={user_id:this.userId,players:this.selectedPlayersToDelete,id:a};await X.create({headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${a}/players/delete`,o);const i=this.lists.findIndex(r=>r.id===a);if(i!==-1){const r=JSON.parse(JSON.stringify(this.lists[i]));r.players=r.players.filter(n=>!this.selectedPlayersToDelete.some(s=>s.player_id===n.player_id)),this.lists[i]=r}this.selectedPlayersToDelete=[],this.hasSelectedPlayers=!1,i!==-1&&(this.lists[i].deleteActive=!1)}catch(t){console.error("Error al eliminar jugadores:",t)}},formatDate(t){if(!t)return"";const a=new Date(t),o=a.getDate().toString().padStart(2,"0"),l=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"][a.getMonth()],i=a.getFullYear();return`${o} - ${l} - ${i}`},clearSearch(){this.searchText=""},cancelDelete(t){const a=this.filteredLists[t],o=this.getOriginalList(a.id);o&&(o.deleteActive=!1),this.hasSelectedPlayers=!1},handleShowGraph(t){this.$emit("showGraph",t)},handleSelectedPlayers(t){this.selectedPlayersToDelete=t,this.hasSelectedPlayers=t.length>0},handleSelectedPlayersToDelete(t){this.selectedPlayersToDelete=t,this.hasSelectedPlayers=t.length>0},updateSelectionStatus(t){this.hasSelectedPlayers=t},onOpenMedia(t){this.$emit("open-media",t)},openModal(){this.modalVisible=!0},closeModal(){this.modalVisible=!1},async handlePlaylistAddPlayer(t){try{const a=this.selectedListId,o=this.searchText;this.statsLoaded=!1,await this.fetchUserLists(),a&&(this.searchText=o,await this.$nextTick(),this.activeItem=a,await this.fetchPlayerStats(a),this.lists.find(i=>i.id===a)&&(this.filteredLists.some(r=>r.id===a)||(this.searchText=""))),this.closeModalAddPlayers()}catch(a){console.error("Error al recargar las listas:",a)}},handlePlaylistCreated(){try{this.fetchUserLists()}catch(t){console.error("Error al recargar las listas:",t)}},confirmDelete(t){if(!this.hasSelectedPlayers)return;const a=this.filteredLists[t];this.currentListIndex=this.lists.findIndex(o=>o.id===a.id),this.$refs.deleteModalPlayers.open()},handleListEdited(){this.closeModalEditar(),this.fetchUserLists()},handleScroll(t){t&&!this.isScrollLocked?(this.originalOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.documentElement.style.position="fixed",document.documentElement.style.width="100%",this.isScrollLocked=!0):!t&&this.isScrollLocked&&(document.documentElement.style.overflow="",document.body.style.overflow="",document.documentElement.style.position="",document.documentElement.style.width="",this.originalOverflow=null,this.isScrollLocked=!1)},closeTooltip(){this.activeTooltip!==null&&(this.activeTooltip=null,this.handleScroll(!1))},handleDeletePlayer(t){const a=this.lists.find(l=>l.id===this.activeItem);if(!a){console.error("No se encontró la lista activa");return}const o=a.players.find(l=>l.player_id===t.player_id);if(!o){console.error("No se encontró el jugador en la lista");return}this.userId,a.id,this.selectedPlayersToDelete=[o],this.hasSelectedPlayers=!0,this.showDeleteModal=!0},handleShowProfile(t){const a=this.lists.find(n=>n.id===this.activeItem);if(!a){console.error("No se encontró la lista activa");return}const o=a.players.find(n=>n.player_id===t.player_id);if(!o){console.error("No se encontró el jugador en la lista");return}const l=a.playerStats[o.player_id];let i=0;l&&Object.values(l).forEach(n=>{n.season!==null&&n.season!==void 0&&(i=n.season)});const r={team_id:o.team_id,player_id:o.player_id,seasons:i,season_id:t.season_id};this.$emit("showProfile",r)}},watch:{userId:{immediate:!0,handler(t){t&&t!==0&&this.fetchUserLists()}},smallMobileCompact(t){!t&&this.isScrollLocked&&this.handleScroll(!1)},activeTooltip(t){t===null&&this.isScrollLocked&&this.handleScroll(!1)}},mounted(){const t=o=>{if(this.activeTooltip!==null){const l=document.querySelector(".tooltip-menu"),i=document.querySelector(".more-options");l&&!l.contains(o.target)&&i&&!i.contains(o.target)&&this.closeTooltip()}};document.addEventListener("click",t),this._handleGlobalClick=t;const a=o=>{o.key==="Escape"&&this.activeTooltip!==null&&this.closeTooltip()};document.addEventListener("keydown",a),this._handleEscape=a,this.fetchTemplates()},beforeUnmount(){this._handleGlobalClick&&document.removeEventListener("click",this._handleGlobalClick),this._handleEscape&&document.removeEventListener("keydown",this._handleEscape),this.isScrollLocked&&this.handleScroll(!1)}},Tl=()=>{e.useCssVars(t=>({"4dc009ae":t.smallMobileCompact?"12px":"14px","6ddbfde3":(t.isMobileLayout,"8px"),"9fd9de9a":t.isMobileLayout?"0":"8px","603cacf0":t.smallMobileCompact?"0 5px":"0 24px",cfc1cfe4:t.smallMobileCompact?"24px":"32px","4f4ad28f":t.smallMobileCompact?"4px":"24px",d98f499c:t.smallMobileCompact?"16px":"20px",c5f7f924:t.smallMobileCompact?"32px":"40px","41b70b95":t.smallMobileCompact?"128px":"160px","013909f4":t.isMobileLayout?"13px":"14px","3dbed8d1":t.smallMobileCompact?"5px":"12px","1beab5da":t.smallMobileCompact?"4px":"0px","651ce6db":t.searchCompact?t.isMobileLayout?t.smallMobileCompact?"calc(100% - 46px)":"calc(100% - 44px)":"88%":"93%",c530e79c:t.isMobileLayout?"-10px -15px -15px -15px":"-15px -15px","730619cb":t.tooltipY+"px","03c9b5cb":t.searchCompact?t.searchCloseCompact?t.isMobileLayout?t.smallMobileCompact?"2%":"1%":"2.5%":"5%":"1%","51d1f024":t.isMobileLayout?"0":"16px","9dde4258":t.isMobileLayout?"-12px 0px 8px 0px":"-15px -15px 15px -15px","5ea3a273":t.isMobileLayout?"7px":"16px","33083a4b":(t.smallMobileCompact,"column"),28093715:t.isMobileLayout?"100%":"150px","07cdf52e":t.smallMobileCompact?"10px":"12px",b236f4a8:t.isMobileLayout?"center":"right","51ec4daa":t.isMobileLayout?"0":"32px","51fd1f65":t.isMobileLayout?"0":"48px","7033fa1f":t.isMobileLayout&&!t.smallMobileCompact?"flex":"none","8cceede2":t.isMobileLayout?"auto":"32px"}))},Fl=xa.setup;xa.setup=Fl?(t,a)=>(Tl(),Fl(t,a)):Tl;const v5={ref:"myDivRefList",class:"gsc-list"},R5={class:"list-header"},O5={class:"list-count"},z5={class:"search-container"},U5={class:"search-box"},j5={class:"header-buttons"},H5=["disabled"],W5={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G5=["stroke"],$5=["stroke"],q5=["stroke"],Y5=["stroke"],Z5=["disabled"],J5={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},K5=["stroke"],X5=["stroke"],Q5=["stroke"],e6=["stroke"],t6=["stroke"],a6=["stroke"],o6={class:"search-container full-width"},l6={class:"search-box"},r6={class:"list-items"},i6={class:"list-name"},n6={class:"delete-mode-actions"},s6=["onClick"],d6=["disabled","onClick"],c6={key:0,class:"second-row-container"},p6={class:"delete-mode-actions"},m6=["onClick"],u6=["disabled","onClick"],f6={class:"delete-mode-actions mobile small"},h6=["onClick"],y6=["disabled","onClick"],g6=["onClick"],b6={class:"header-main-row"},_6={class:"item-title"},S6={class:"item-controls"},E6={class:"tooltip-container"},w6=["onClick"],C6=["onClick"],k6=["onClick"],V6=["onClick"],N6=["onClick"],x6=["onClick"],B6={key:0,class:"separator"},T6={key:1,class:"mobile-meta-info"},F6={key:0,class:"item-content"},M6={class:"expanded-container"},A6={key:0,class:"no-results"};function L6(t,a,o,l,i,r){const n=e.resolveComponent("ModalCreatePlaylist"),s=e.resolveComponent("ModalEditarLista"),c=e.resolveComponent("ModalAddPlayers"),d=e.resolveComponent("ModalDeleteLista"),h=e.resolveComponent("ModalDeletePlayers"),m=e.resolveComponent("ModalDeletePlayer");return e.openBlock(),e.createElementBlock("div",v5,[e.createVNode(n,{isVisible:i.modalVisible,onClose:r.closeModal,seasons:[1922],"user-team-id":o.userTeamId,"team-id":2,"user-id":o.userId,"player-id":0,"position-id":9,onPlaylistCreated:r.handlePlaylistCreated},null,8,["isVisible","onClose","user-team-id","user-id","onPlaylistCreated"]),e.createVNode(s,{isVisible:i.modalEditarVisible,onClose:r.closeModalEditar,onNext:r.handleListEdited,"user-id":o.userId,"list-id":i.selectedListId,"list-data":i.selectedListData},null,8,["isVisible","onClose","onNext","user-id","list-id","list-data"]),e.createVNode(c,{isVisible:i.modalAddPlayersVisible,onClose:r.closeModalAddPlayers,"user-id":o.userId,"list-id":i.selectedListId,onPlaylistCreated:r.handlePlaylistAddPlayer},null,8,["isVisible","onClose","user-id","list-id","onPlaylistCreated"]),e.createVNode(d,{ref:"deleteModal",onClose:r.closeModalDelete,onConfirmDeleteLista:r.handleConfirmDeleteLista},null,8,["onClose","onConfirmDeleteLista"]),e.createVNode(h,{ref:"deleteModalPlayers",onClose:r.closeModalDeletePlayers,onConfirmDelete:r.handleConfirmDeletePlayers},null,8,["onClose","onConfirmDelete"]),e.createVNode(m,{modelValue:i.showDeleteModal,"onUpdate:modelValue":a[0]||(a[0]=y=>i.showDeleteModal=y),onConfirmDelete:r.handleConfirmDeletePlayer},null,8,["modelValue","onConfirmDelete"]),i.activeTooltip!==null&&r.smallMobileCompact?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tooltip-overlay",onClick:a[1]||(a[1]=e.withModifiers(y=>i.activeTooltip=null,["stop"]))})):e.createCommentVNode("",!0),e.createElementVNode("div",R5,[e.createElementVNode("div",{class:e.normalizeClass(["top-row",{compact:r.isCompactLayout}])},[e.createElementVNode("div",O5,e.toDisplayString(i.lists.length)+" "+e.toDisplayString(i.lists.length===1?"Lista":"Listas"),1),e.withDirectives(e.createElementVNode("div",z5,[e.createElementVNode("div",U5,[a[11]||(a[11]=e.createElementVNode("img",{class:"search-icon",src:"https://golstatsimages.blob.core.windows.net/todoelfut/search-svg.svg"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":a[2]||(a[2]=y=>i.searchText=y),placeholder:"Buscar lista..."},null,512),[[e.vModelText,i.searchText]]),i.searchText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search-btn",onClick:a[3]||(a[3]=(...y)=>r.clearSearch&&r.clearSearch(...y))},a[10]||(a[10]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13 1L1 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M1 1L13 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):e.createCommentVNode("",!0)])],512),[[e.vShow,!r.isCompactLayout]]),e.createElementVNode("div",j5,[e.createElementVNode("button",{class:"create-list-btn",onClick:a[4]||(a[4]=(...y)=>r.openModal&&r.openModal(...y))},a[12]||(a[12]=[e.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-crear-lista.png"},null,-1),e.createTextVNode(" Crear lista ")])),e.createElementVNode("button",{class:e.normalizeClass(["view-mode-btn grid",{active:i.viewMode==="grid"}]),onClick:a[5]||(a[5]=y=>r.toggleViewMode("grid")),disabled:r.isAnyListInDeleteMode},[(e.openBlock(),e.createElementBlock("svg",W5,[e.createElementVNode("path",{d:"M10 3H3V10H10V3Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,G5),e.createElementVNode("path",{d:"M21 3H14V10H21V3Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,$5),e.createElementVNode("path",{d:"M21 14H14V21H21V14Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,q5),e.createElementVNode("path",{d:"M10 14H3V21H10V14Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Y5)]))],10,H5),e.createElementVNode("button",{class:e.normalizeClass(["view-mode-btn list",{active:i.viewMode==="list"}]),onClick:a[6]||(a[6]=y=>r.toggleViewMode("list")),disabled:r.isAnyListInDeleteMode},[(e.openBlock(),e.createElementBlock("svg",J5,[e.createElementVNode("path",{d:"M8 6H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,K5),e.createElementVNode("path",{d:"M8 12H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,X5),e.createElementVNode("path",{d:"M8 18H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Q5),e.createElementVNode("path",{d:"M3 6H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,e6),e.createElementVNode("path",{d:"M3 12H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,t6),e.createElementVNode("path",{d:"M3 18H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,a6)]))],10,Z5)])],2),e.withDirectives(e.createElementVNode("div",o6,[e.createElementVNode("div",l6,[a[14]||(a[14]=e.createElementVNode("img",{class:"search-icon",src:"https://golstatsimages.blob.core.windows.net/todoelfut/search-svg.svg"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":a[7]||(a[7]=y=>i.searchText=y),placeholder:"Buscar lista..."},null,512),[[e.vModelText,i.searchText]]),i.searchText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search-btn",onClick:a[8]||(a[8]=(...y)=>r.clearSearch&&r.clearSearch(...y))},a[13]||(a[13]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13 1L1 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M1 1L13 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):e.createCommentVNode("",!0)])],512),[[e.vShow,r.isCompactLayout]])]),e.createElementVNode("div",r6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.filteredLists,(y,p)=>(e.openBlock(),e.createElementBlock("div",{class:"list-item",key:y.id},[r.getOriginalList(y.id).deleteActive?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["delete-mode-header",{mobile:r.isMobileLayout,small:r.smallMobileCompact}])},[e.createElementVNode("div",{class:e.normalizeClass(["delete-mode-content",{mobile:r.isMobileLayout,small:r.smallMobileCompact}])},[r.isMobileLayout?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["list-name mobile",{small:r.smallMobileCompact}])},e.toDisplayString(y.name),3),r.smallMobileCompact?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a[17]||(a[17]=e.createElementVNode("div",{class:"delete-mode-title mobile small"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",f6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,h6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,y6)])],64)):(e.openBlock(),e.createElementBlock("div",c6,[a[16]||(a[16]=e.createElementVNode("div",{class:"delete-mode-title"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",p6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,m6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,u6)])]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",i6,e.toDisplayString(y.name),1),a[15]||(a[15]=e.createElementVNode("div",{class:"delete-mode-title"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",n6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,s6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,d6)])],64))],2)],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["item-header",{"mobile-layout":r.isMobileLayout,disabled:r.isAnyListInDeleteMode&&!r.getOriginalList(y.id).deleteActive}]),onClick:f=>r.toggleItem(y.id,f)},[e.createElementVNode("div",b6,[e.createElementVNode("div",_6,e.toDisplayString(y.name),1),e.createElementVNode("div",{class:e.normalizeClass(["meta-info",{"mobile-layout":r.isMobileLayout}])},[e.createElementVNode("span",null," "+e.toDisplayString(y.createdAt),1),e.createElementVNode("span",null," "+e.toDisplayString(y.position||"Sin posición"),1)],2),e.createElementVNode("div",S6,[e.createElementVNode("div",E6,[e.createElementVNode("button",{class:"more-options",onClick:e.withModifiers(f=>r.toggleTooltip(p,f),["stop"])},a[18]||(a[18]=[e.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-options.png"},null,-1)]),8,w6),i.activeTooltip===p?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tooltip-menu",{mobile:r.smallMobileCompact}]),style:e.normalizeStyle(r.tooltipStyle),onClick:a[9]||(a[9]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.editarLista(p)},a[19]||(a[19]=[e.createStaticVNode('<svg width="16" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ee0a15de><g clip-path="url(#clip0_3214_107704)" data-v-ee0a15de><path d="M8.25 3H3C2.60218 3 2.22064 3.15804 1.93934 3.43934C1.65804 3.72064 1.5 4.10218 1.5 4.5V15C1.5 15.3978 1.65804 15.7794 1.93934 16.0607C2.22064 16.342 2.60218 16.5 3 16.5H13.5C13.8978 16.5 14.2794 16.342 14.5607 16.0607C14.842 15.7794 15 15.3978 15 15V9.75" stroke="#CBEE6B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-ee0a15de></path><path d="M13.875 1.87493C14.1734 1.57656 14.578 1.40894 15 1.40894C15.422 1.40894 15.8266 1.57656 16.125 1.87493C16.4234 2.17329 16.591 2.57797 16.591 2.99993C16.591 3.42188 16.4234 3.82656 16.125 4.12493L9 11.2499L6 11.9999L6.75 8.99993L13.875 1.87493Z" stroke="#CBEE6B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-ee0a15de></path></g><defs data-v-ee0a15de><clipPath id="clip0_3214_107704" data-v-ee0a15de><rect width="18" height="18" fill="#CBEE6B" data-v-ee0a15de></rect></clipPath></defs></svg> Editar lista ',2)]),8,C6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.agregarJugadores(p)},a[20]||(a[20]=[e.createElementVNode("svg",{width:"17",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1),e.createTextVNode(" Agregar jugadores ")]),8,k6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.eliminarJugadores(p)},a[21]||(a[21]=[e.createElementVNode("svg",{width:"17",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),e.createTextVNode(" Eliminar jugadores ")]),8,V6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.compararListas(p)},a[22]||(a[22]=[e.createStaticVNode('<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ee0a15de><g clip-path="url(#clip0_2936_393289)" data-v-ee0a15de><mask id="mask0_2936_393289" style="mask-type:luminance;" maskUnits="userSpaceOnUse" x="0" y="0" width="18" height="18" data-v-ee0a15de><path d="M0 0H18V18H0V0Z" fill="#CBEE6B" data-v-ee0a15de></path></mask><g mask="url(#mask0_2936_393289)" data-v-ee0a15de><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 1.28571C2.7248 1.28571 1.28571 2.7248 1.28571 4.5V13.5C1.28571 15.2752 2.7248 16.7143 4.5 16.7143H13.5C15.2752 16.7143 16.7143 15.2752 16.7143 13.5V4.5C16.7143 2.7248 15.2752 1.28571 13.5 1.28571H4.5ZM0 4.5C0 2.01471 2.01471 0 4.5 0H13.5C15.9853 0 18 2.01471 18 4.5V13.5C18 15.9853 15.9853 18 13.5 18H4.5C2.01471 18 0 15.9853 0 13.5V4.5Z" fill="#CBEE6B" data-v-ee0a15de></path><path fill-rule="evenodd" clip-rule="evenodd" d="M10.9285 4.5C11.2835 4.5 11.5714 4.78782 11.5714 5.14286V11.3051L13.0453 9.83115C13.2964 9.58009 13.7035 9.58009 13.9546 9.83115C14.2055 10.0822 14.2055 10.4892 13.9546 10.7403L11.3831 13.3118C11.1992 13.4956 10.9227 13.5505 10.6825 13.451C10.4423 13.3515 10.2856 13.1171 10.2856 12.8571V5.14286C10.2856 4.78782 10.5735 4.5 10.9285 4.5Z" fill="#CBEE6B" data-v-ee0a15de></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.31723 4.54895C7.55745 4.64845 7.71408 4.88287 7.71408 5.14288V12.8572C7.71408 13.2121 7.42626 13.5 7.07122 13.5C6.71619 13.5 6.42837 13.2121 6.42837 12.8572V6.69487L4.95436 8.16887C4.70331 8.41993 4.29628 8.41993 4.04523 8.16887C3.79417 7.91782 3.79417 7.51079 4.04523 7.25974L6.61666 4.68831C6.80052 4.50445 7.07701 4.44945 7.31723 4.54895Z" fill="#CBEE6B" data-v-ee0a15de></path></g></g><defs data-v-ee0a15de><clipPath id="clip0_2936_393289" data-v-ee0a15de><rect width="18" height="18" fill="#CBEE6B" data-v-ee0a15de></rect></clipPath></defs></svg> Comparar ',2)]),8,N6),e.createElementVNode("div",{class:"tooltip-item delete",onClick:f=>r.eliminarLista(p)},a[23]||(a[23]=[e.createElementVNode("svg",{width:"19",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.64583 0.894444H3.7625V0.777778V0.116667H7.90417V0.777778V0.894444H8.02083H11.55V2.21667H10.9375H10.8208V2.33333V12.4444C10.8208 12.8284 10.6778 13.1952 10.4253 13.4646C10.173 13.7337 9.83248 13.8833 9.47917 13.8833H2.1875C1.83419 13.8833 1.49369 13.7337 1.24142 13.4646C0.988898 13.1952 0.845833 12.8284 0.845833 12.4444V2.33333V2.21667H0.729167H0.116667V0.894444H3.64583ZM2.1875 2.21667H2.07083V2.33333V12.4444V12.5611H2.1875H9.47917H9.59583V12.4444V2.33333V2.21667H9.47917H2.1875ZM4.9875 10.7722H3.7625V4.00556H4.9875V10.7722ZM7.90417 10.7722H6.67917V4.00556H7.90417V10.7722Z",fill:"#CBEE6B",stroke:"#CBEE6B","stroke-width":"0.233333"})],-1),e.createTextVNode(" Eliminar lista ")]),8,x6)],6)):e.createCommentVNode("",!0)]),e.createElementVNode("i",{class:e.normalizeClass(["arrow",{"arrow-up":i.activeItem===y.id}])},a[24]||(a[24]=[e.createElementVNode("img",{width:"23",src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-collapse@2x.png"},null,-1)]),2)])]),r.isMobileLayout?(e.openBlock(),e.createElementBlock("div",B6)):e.createCommentVNode("",!0),r.isMobileLayout?(e.openBlock(),e.createElementBlock("div",T6,[e.createElementVNode("span",null," "+e.toDisplayString(y.createdAt),1),e.createElementVNode("span",null," "+e.toDisplayString(y.position||"Sin posición"),1)])):e.createCommentVNode("",!0)],10,g6),[[e.vShow,!r.getOriginalList(y.id).deleteActive]]),e.createVNode(e.Transition,{name:"expand"},{default:e.withCtx(()=>[i.activeItem===y.id?(e.openBlock(),e.createElementBlock("div",F6,[e.createElementVNode("div",M6,[e.createElementVNode("div",{class:e.normalizeClass(["expanded-content",{"list-view-margin":i.viewMode==="list"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.viewMode==="grid"?"GridView":"ListView"),{categories:r.currentTemplateCategories,deleteActive:i.lists[p].deleteActive,players:y.players,playerStats:y.playerStats,playerAddtionalData:y.additionalData,"stats-loaded":i.statsLoaded,onShowGraph:[r.handleShowGraph,r.ShowGraph],onShowProfile:r.handleShowProfile,onViewProfile:r.handleViewProfile,onDeleteFromList:r.handleDeleteFromList,onChangeSelectedPlayers:r.handleSelectedPlayersToDelete,onSelectedPlayersToDelete:r.handleSelectedPlayers,onDeletePlayer:r.handleDeletePlayer,onUpdateSelection:r.updateSelectionStatus,onOpenMedia:r.onOpenMedia},null,40,["categories","deleteActive","players","playerStats","playerAddtionalData","stats-loaded","onShowGraph","onShowProfile","onViewProfile","onDeleteFromList","onChangeSelectedPlayers","onSelectedPlayersToDelete","onDeletePlayer","onUpdateSelection","onOpenMedia"]))],2)])])):e.createCommentVNode("",!0)]),_:2},1024)]))),128)),r.filteredLists.length===0&&i.searchText!=""?(e.openBlock(),e.createElementBlock("div",A6," No se encontraron listas que coincidan con tu búsqueda ")):e.createCommentVNode("",!0)])],512)}const P6=be(xa,[["render",L6],["__scopeId","data-v-ee0a15de"]]),I6={class:"subcategory-group"},D6={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("div",I6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(Y),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},v6=J(D6,[["__scopeId","data-v-ae6f3d72"]]),R6={class:"filter-subcategories"},O6=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("div",R6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(v6,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),It=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),z6={class:"details__header"},U6=It(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),j6={class:"details__header__checkbox"},H6={class:"details__body"},W6={class:"details__body__playing-as"},G6=["onClick"],$6={class:"details__header"},q6=It(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Y6={class:"details__header__checkbox"},Z6={class:"details__body"},J6=It(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),K6={class:"details__body__game-section"},X6=["onClick"],Q6={class:"details__body"},eb=It(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),tb={class:"details__body__game-section"},ab=["onClick"],ob=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const a=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const o=e.computed(()=>a.playingAs.every(h=>h.isSelected)),l=e.computed(()=>a.gameSections.every(h=>h.isSelected)),i=e.computed(()=>a.gameSections.reduce((h,m)=>(m.value<=3?h.firstHalf.push(m):h.secondHalf.push(m),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${a.buttonsBorderRadius} 0 0 ${a.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${a.buttonsBorderRadius} ${a.buttonsBorderRadius} 0`}));function n(h){h?a.playingAs.forEach(m=>{m.isSelected=!0}):a.playingAs.forEach((m,y)=>{m.isSelected=y===0})}function s(h){a.playingAs.filter(m=>m.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){a.gameSections.filter(m=>m.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){h?a.gameSections.forEach(m=>{m.isSelected=!0}):a.gameSections.forEach((m,y)=>{m.isSelected=y===0})}return(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",z6,[U6,e.createElementVNode("div",j6,[e.createVNode(e.unref(Y),{label:"Todos","model-value":o.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",H6,[e.createElementVNode("div",W6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.playingAs,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,G6))),128))])]),e.createElementVNode("div",$6,[q6,e.createElementVNode("div",Y6,[e.createVNode(e.unref(Y),{label:"Todos","model-value":l.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),e.createElementVNode("div",Z6,[J6,e.createElementVNode("div",K6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>c(y)},e.toDisplayString(y.text),11,X6))),128))])]),e.createElementVNode("div",Q6,[eb,e.createElementVNode("div",tb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>c(y)},e.toDisplayString(y.text),11,ab))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),lb={class:"filter-field"},rb=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterField",setup(t){const a=e.ref(Array.from({length:16},(l,i)=>i+1));function o(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",lb,[e.createVNode(e.unref(Io),{width:"100%","background-color":"#2E3B46",value:a.value,"onUpdate:modelValue":o},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));xe.GSCList=P6,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
11
+ `+r):l.stack=r}catch{}}throw l}}_request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=Le(this.defaults,o);const{transitional:l,paramsSerializer:i,headers:r}=o;l!==void 0&&Tt.assertOptions(l,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean)},!1),i!=null&&(k.isFunction(i)?o.paramsSerializer={serialize:i}:Tt.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Tt.assertOptions(o,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let n=r&&k.merge(r.common,r[o.method]);r&&k.forEach(["delete","get","head","post","put","patch","common"],f=>{delete r[f]}),o.headers=ge.concat(n,r);const s=[];let c=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(o)===!1||(c=c&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});const d=[];this.interceptors.response.forEach(function(f){d.push(f.fulfilled,f.rejected)});let h,m=0,y;if(!c){const f=[fl.bind(this),void 0];for(f.unshift.apply(f,s),f.push.apply(f,d),y=f.length,h=Promise.resolve(o);m<y;)h=h.then(f[m++],f[m++]);return h}y=s.length;let p=o;for(m=0;m<y;){const f=s[m++],u=s[m++];try{p=f(p)}catch(g){u.call(this,g);break}}try{h=fl.call(this,p)}catch(f){return Promise.reject(f)}for(m=0,y=d.length;m<y;)h=h.then(d[m++],d[m++]);return h}getUri(a){a=Le(this.defaults,a);const o=rl(a.baseURL,a.url,a.allowAbsoluteUrls);return Jo(o,a.params,a.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(t){Ft.prototype[t]=function(a,o){return this.request(Le(o||{},{method:t,url:a,data:(o||{}).data}))}}),k.forEach(["post","put","patch"],function(t){function a(o){return function(l,i,r){return this.request(Le(r||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:i}))}}Ft.prototype[t]=a(),Ft.prototype[t+"Form"]=a(!0)});const Mt=Ft;class ya{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const l=this;this.promise.then(i=>{if(!l._listeners)return;let r=l._listeners.length;for(;r-- >0;)l._listeners[r](i);l._listeners=null}),this.promise.then=i=>{let r;const n=new Promise(s=>{l.subscribe(s),r=s}).then(i);return n.cancel=function(){l.unsubscribe(r)},n},a(function(i,r,n){l.reason||(l.reason=new Ue(i,r,n),o(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const a=new AbortController,o=l=>{a.abort(l)};return this.subscribe(o),a.signal.unsubscribe=()=>this.unsubscribe(o),a.signal}static source(){let a;return{token:new ya(function(o){a=o}),cancel:a}}}const Gm=ya;function $m(t){return function(a){return t.apply(null,a)}}function qm(t){return k.isObject(t)&&t.isAxiosError===!0}const ga={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ga).forEach(([t,a])=>{ga[a]=t});const Ym=ga;function gl(t){const a=new Mt(t),o=Do(Mt.prototype.request,a);return k.extend(o,Mt.prototype,a,{allOwnKeys:!0}),k.extend(o,a,null,{allOwnKeys:!0}),o.create=function(l){return gl(Le(t,l))},o}const le=gl(ca);le.Axios=Mt,le.CanceledError=Ue,le.CancelToken=Gm,le.isCancel=tl,le.VERSION=hl,le.toFormData=wt,le.AxiosError=G,le.Cancel=le.CanceledError,le.all=function(t){return Promise.all(t)},le.spread=$m,le.isAxiosError=qm,le.mergeConfig=Le,le.AxiosHeaders=ge,le.formToJSON=t=>Qo(k.isHTMLForm(t)?new FormData(t):t),le.getAdapter=ul.getAdapter,le.HttpStatusCode=Ym,le.default=le;const et=le,ba={isAgeByRange:!0,isAgeByYear:!1,minAge:14,maxAge:43,availableYears:Array.from({length:30},(t,a)=>1981+a).sort((t,a)=>a-t),nationalTeams:[{booleanIsSelected:!1,stringName:"Selección mexicana",setAvailablePlayersIds:{},numberId:392}],isEligibilitySelected:!1,eligibility:[{isSelected:!0,id:138,name:"Mexicana"}],nationalities:[{isSelected:!0,id:138,name:"Mexicana"},{isSelected:!0,id:10,name:"Argentina"},{isSelected:!0,id:29,name:"Brasileña"},{isSelected:!0,id:47,name:"Colombiana"},{isSelected:!0,id:62,name:"Ecuatoriana"},{isSelected:!0,id:223,name:"Uruguaya"},{isSelected:!0,id:198,name:"Española"},{isSelected:!0,id:74,name:"Francesa"},{isSelected:!0,id:43,name:"Chilena"},{isSelected:!0,id:222,name:"Americana"},{isSelected:!0,id:165,name:"Paraguaya"},{isSelected:!0,id:226,name:"Venezolana"},{isSelected:!0,id:52,name:"Marfileña"},{isSelected:!0,id:166,name:"Peruana"}],positions:[{isSelected:!0,id:1,name:"Portero"},{isSelected:!0,id:2,name:"Defensa Central"},{isSelected:!0,id:3,name:"Lateral por izquierda"},{isSelected:!0,id:4,name:"Lateral por derecha"},{isSelected:!0,id:5,name:"Volante por izquierda"},{isSelected:!0,id:6,name:"Volante por derecha"},{isSelected:!0,id:7,name:"Volante defensivo"},{isSelected:!0,id:8,name:"Volante ofensivo"},{isSelected:!0,id:9,name:"Delantero"}]},Zm={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},Jm={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",10:"Desconocida"};function At(t){"@babel/helpers - typeof";return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},At(t)}function we(t){if(t===null||t===!0||t===!1)return NaN;var a=Number(t);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function oe(t,a){if(a.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+a.length+" present")}function ee(t){oe(1,arguments);var a=Object.prototype.toString.call(t);return t instanceof Date||At(t)==="object"&&a==="[object Date]"?new Date(t.getTime()):typeof t=="number"||a==="[object Number]"?new Date(t):((typeof t=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Km(t,a){oe(2,arguments);var o=ee(t),l=we(a);return isNaN(l)?new Date(NaN):(l&&o.setDate(o.getDate()+l),o)}function Xm(t,a){oe(2,arguments);var o=ee(t),l=we(a);if(isNaN(l))return new Date(NaN);if(!l)return o;var i=o.getDate(),r=new Date(o.getTime());r.setMonth(o.getMonth()+l+1,0);var n=r.getDate();return i>=n?r:(o.setFullYear(r.getFullYear(),r.getMonth(),i),o)}function tt(t,a){if(oe(2,arguments),!a||At(a)!=="object")return new Date(NaN);var o=a.years?we(a.years):0,l=a.months?we(a.months):0,i=a.weeks?we(a.weeks):0,r=a.days?we(a.days):0,n=a.hours?we(a.hours):0,s=a.minutes?we(a.minutes):0,c=a.seconds?we(a.seconds):0,d=ee(t),h=l||o?Xm(d,l+o*12):d,m=r||i?Km(h,r+i*7):h,y=s+n*60,p=c+y*60,f=p*1e3,u=new Date(m.getTime()+f);return u}function bl(t){var a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),t.getTime()-a.getTime()}function _l(t){oe(1,arguments);var a=ee(t);return a.setHours(0,0,0,0),a}var Qm=864e5;function eu(t,a){oe(2,arguments);var o=_l(t),l=_l(a),i=o.getTime()-bl(o),r=l.getTime()-bl(l);return Math.round((i-r)/Qm)}function je(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=o.getTime()-l.getTime();return i<0?-1:i>0?1:i}var tu=6e4,au=36e5;function ou(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=o.getFullYear()-l.getFullYear(),r=o.getMonth()-l.getMonth();return i*12+r}function lu(t,a){oe(2,arguments);var o=ee(t),l=ee(a);return o.getFullYear()-l.getFullYear()}function Sl(t,a){var o=t.getFullYear()-a.getFullYear()||t.getMonth()-a.getMonth()||t.getDate()-a.getDate()||t.getHours()-a.getHours()||t.getMinutes()-a.getMinutes()||t.getSeconds()-a.getSeconds()||t.getMilliseconds()-a.getMilliseconds();return o<0?-1:o>0?1:o}function ru(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=Sl(o,l),r=Math.abs(eu(o,l));o.setDate(o.getDate()-i*r);var n=+(Sl(o,l)===-i),s=i*(r-n);return s===0?0:s}function _a(t,a){return oe(2,arguments),ee(t).getTime()-ee(a).getTime()}var iu={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},nu="trunc";function Sa(t){return iu[nu]}function su(t,a,o){oe(2,arguments);var l=_a(t,a)/au;return Sa()(l)}function du(t,a,o){oe(2,arguments);var l=_a(t,a)/tu;return Sa()(l)}function cu(t){oe(1,arguments);var a=ee(t);return a.setHours(23,59,59,999),a}function pu(t){oe(1,arguments);var a=ee(t),o=a.getMonth();return a.setFullYear(a.getFullYear(),o+1,0),a.setHours(23,59,59,999),a}function mu(t){oe(1,arguments);var a=ee(t);return cu(a).getTime()===pu(a).getTime()}function uu(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=je(o,l),r=Math.abs(ou(o,l)),n;if(r<1)n=0;else{o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*r);var s=je(o,l)===-i;mu(ee(t))&&r===1&&je(t,l)===1&&(s=!1),n=i*(r-Number(s))}return n===0?0:n}function fu(t,a,o){oe(2,arguments);var l=_a(t,a)/1e3;return Sa()(l)}function hu(t,a){oe(2,arguments);var o=ee(t),l=ee(a),i=je(o,l),r=Math.abs(lu(o,l));o.setFullYear(1584),l.setFullYear(1584);var n=je(o,l)===-i,s=i*(r-Number(n));return s===0?0:s}function yu(t){return oe(1,arguments),ee(t).getFullYear()}function gu(t){oe(1,arguments);var a=ee(t.start),o=ee(t.end);if(isNaN(a.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(o.getTime()))throw new RangeError("End Date is invalid");var l={};l.years=Math.abs(hu(o,a));var i=je(o,a),r=tt(a,{years:i*l.years});l.months=Math.abs(uu(o,r));var n=tt(r,{months:i*l.months});l.days=Math.abs(ru(o,n));var s=tt(n,{days:i*l.days});l.hours=Math.abs(su(o,s));var c=tt(s,{hours:i*l.hours});l.minutes=Math.abs(du(o,c));var d=tt(c,{minutes:i*l.minutes});return l.seconds=Math.abs(fu(o,d)),l}const bu=new Set([1]),_u={__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t,l=e.ref(null);e.watch(()=>o.modelValue,()=>{i()},{immediate:!0});function i(){l.value&&(l.value.checked=o.modelValue)}function r(n){a("update:modelValue",n.target.checked)}return e.onMounted(()=>{i()}),(n,s)=>(e.openBlock(),e.createElementBlock("input",{ref_key:"switchCustom",ref:l,id:"toggle",class:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:r},null,544))}},at=J(_u,[["__scopeId","data-v-e3a6ae4e"]]),Pe=t=>(e.pushScopeId("data-v-8c3ead4b"),t=t(),e.popScopeId(),t),Su={class:"personal-data"},Eu={class:"personal-data__age"},wu={class:"personal-data__age__toggle"},Cu={class:"personal-data__age__range"},ku={class:"personal-data__age__dropdown"},Vu=Pe(()=>e.createElementVNode("div",{class:"label"},"Año",-1)),Nu={class:"selected-item"},xu=Pe(()=>e.createElementVNode("div",{class:"separator"},null,-1)),Bu={class:"personal-data__nationality-position"},Tu={key:0,class:"personal-data__nationality-position__switch"},Fu=Pe(()=>e.createElementVNode("div",{class:"label"},"Nacionalidad",-1)),Mu=Pe(()=>e.createElementVNode("div",{class:"label"},"Elegibilidad",-1)),Au={class:"personal-data__nationality-position__nationality"},Lu=Pe(()=>e.createElementVNode("div",{class:"label"},"Nacionalidad",-1)),Pu={class:"selected-item"},Iu=Pe(()=>e.createElementVNode("div",{class:"label"},"Elegibilidad",-1)),Du={class:"selected-item"},vu={class:"personal-data__nationality-position__position"},Ru=Pe(()=>e.createElementVNode("div",{class:"label"},"Posición",-1)),Ou={class:"selected-item"},zu="https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/",Uu={__name:"TemplatePersonalData",props:{filters:{type:Object,default:()=>null},isFemale:{type:Boolean,default:!1},season:{type:Object,default:()=>({})},isScouting:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},fontFamily:{type:String,default:"'Poppins-Regular'"},awaitForFilters:{type:Boolean,default:!1}},emits:["update:filters"],setup(t,{expose:a,emit:o}){const l=t,i={id:0,name:"Todas las nacionalidades",isSelected:!1},r={id:0,name:"Todas las posiciones",isSelected:!1},n=e.ref({...ba}),s=e.ref(["Por edad","Por año"]),c=e.ref(0),d=e.ref({min:ba.minAge,max:ba.maxAge}),h=e.ref(Je),m=e.ref(""),y=e.ref(""),p=e.ref(n.value.availableYears[n.value.availableYears.length-1]),f=e.ref(0),u=e.computed(()=>{const E=n.value.nationalities?[...n.value.nationalities]:[];l.isSeleccion&&E.forEach(A=>{A.isSelected=A.id===138});const M=E[0];return(!M||M.id!==0)&&E.unshift(i),E}),g=e.computed(()=>{let E=(l.filter&&l.filter.positions?l.filter.positions:n.value.positions)?[...n.value.positions]:[];const M=E[0];return(!M||M.id!==0)&&E.unshift(r),E.sort((A,q)=>A.id-q.id),E}),V=e.computed(()=>l.season&&l.season.tournamentId&&bu.has(l.season.tournamentId)||l.filters&&l.filters.isEligibilitySwitchVisible);e.watch(u,E=>{const M=E.reduce((A,q,te)=>(te!==0&&q.isSelected&&A++,A),0);M===u.value.length-1&&(E[0].isSelected=!0),E[0]&&E[0].isSelected?m.value="Todas las nacionalidades":m.value=`${M} seleccionadas`,K()},{immediate:!0,deep:!0}),e.watch(g,E=>{const M=E.reduce((A,q,te)=>(te!==0&&q.isSelected&&A++,A),0);M===g.value.length-1&&(E[0].isSelected=!0),E[0]&&E[0].isSelected?y.value="Todas las posiciones":y.value=`${M} seleccionadas`,K()},{immediate:!0,deep:!0}),e.watch(()=>l.filters,E=>{if(E&&E.availableYears){const M=!Number.isNaN(Number(E.selectedYear));n.value=E,c.value=n.value.selectedYear&&M?1:0,p.value=M?n.value.selectedYear:n.value.availableYears[0],d.value.min=n.value.minAge,d.value.max=n.value.maxAge,r.isSelected=E.positions.every(A=>A.isSelected),K()}},{immediate:!0,deep:!0}),e.watch(()=>n.value.isEligibilitySelected,()=>{K()}),e.watch(()=>l.season,E=>{E&&E.id!==f.value&&!l.awaitForFilters&&(f.value=E.id,B(E))},{immediate:!0,deep:!1});async function B(E){try{if(E&&E.id){const M=new Set,A=await Z(E.id),q=new Date,te=[],de=new Map,re=new Map;A.forEach(N=>{const L=new Date(N.dob),R=yu(L),w=gu({start:L,end:q});de.has(N.nationality_id)||de.set(N.nationality_id,{id:N.nationality_id,isSelected:!0,name:Zm[`${N.nationality_id}`]}),re.has(N.position_id)||re.set(N.position_id,{id:N.position_id,isSelected:!0,name:Jm[`${N.position_id}`]}),M.add(R),te.push(w.years)}),n.value.minAge=Math.min(...te),n.value.maxAge=Math.max(...te),n.value.availableYears=[...M].sort((N,L)=>L-N),p.value=n.value.availableYears[0],n.value.nationalities=[...de.values()],n.value.positions=[...re.values()],d.value.min=n.value.minAge,d.value.max=n.value.maxAge}}catch(M){throw new Error(M)}}function v(E=null){const M=!E||E===ie.All;(M||E===ie.NATIONALITY)&&u.value.forEach(A=>{A.isSelected=!0}),(M||E===ie.ELIGIBILITY)&&(n.value.isEligibilitySelected=!1),(M||E===ie.POSITION)&&g.value.forEach(A=>{A.isSelected=!0}),(M||E===ie.AGE_RANGE)&&(d.value.min=n.value.minAge,d.value.max=n.value.maxAge,c.value=0),(M||E===ie.YEAR)&&(p.value=l.isScouting?n.value.availableYears[n.value.availableYears.length-1]:n.value.availableYears[0],c.value=0),K()}async function Z(E){try{const M={Authorization:localStorage.getItem("user_token")||l.token},A={}.API_PLAYERS_BY_SEASONS?{}.API_PLAYERS_BY_SEASONS:zu,q=await et.get(A+E,{headers:M});return q.data?q.data.players:[]}catch(M){return Promise.reject(M)}}function U(E){c.value=E.index,l.filters&&l.filters.availableYears&&E.index===0?l.filters.selectedYear="Sin límite":l.filters&&l.filters.availableYears&&E.index===1&&(l.filters.selectedYear=l.filters.availableYears[0])}function O(E){d.value.min=E.minValue,d.value.max=E.maxValue,K()}function Q(E,M){M.id===0?u.value.forEach(A=>{A.isSelected=E}):(M.isSelected=E,u.value[0].isSelected=u.value.every((A,q)=>q===0?!0:A.isSelected))}function K(){const E=c.value===0,M={};E?(M.ageByRange=d.value,M.ageLimits={min:n.value.minAge,max:n.value.maxAge}):M.year=p.value,n.value.isEligibilitySelected?M.eligibility=[...n.value.eligibility]:M.nationalities=u.value.reduce((A,q,te)=>(te!==0&&A.push({...q}),A),[]),M.positions=g.value.reduce((A,q,te)=>(te!==0&&A.push({...q}),A),[]),o("update:filters",M)}function F(E,M){M.id===0?g.value.forEach(A=>{A.isSelected=E}):(M.isSelected=E,g.value[0].isSelected=g.value.every((A,q)=>q===0?!0:A.isSelected))}function T(E){p.value=E,l.filters&&(l.filters.selectedYear=E),K()}return a({onClearFilters:v}),(E,M)=>(e.openBlock(),e.createElementBlock("div",Su,[e.createElementVNode("div",Eu,[e.createElementVNode("div",wu,[e.createVNode(y1,{"selected-button-index":c.value,buttons:s.value,width:"220px",onChange:U},null,8,["selected-button-index","buttons"])]),e.withDirectives(e.createElementVNode("div",Cu,[e.createVNode(e.unref(Bo),{"border-width":"0","background-color":"#0D1D29",height:"30px","font-size-value":"14px","font-size":"12px","border-width-indicador":"2px","line-in-range-color":"white","background-indicador":"#CBEE6B","min-limit":n.value.minAge,"max-limit":n.value.maxAge,"min-value":d.value.min,"max-value":d.value.max,onInput:O},null,8,["min-limit","max-limit","min-value","max-value"])],512),[[e.vShow,c.value===0]]),e.withDirectives(e.createElementVNode("div",ku,[Vu,e.createVNode(e.unref(ke),e.mergeProps({"model-value":p.value},h.value,{items:n.value.availableYears,onInput:T}),{default:e.withCtx(({selectedItem:A})=>[e.createElementVNode("div",Nu,e.toDisplayString(A),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,e.toDisplayString(A),1)]),_:1},16,["model-value","items"])],512),[[e.vShow,c.value===1]])]),xu,e.createElementVNode("div",Bu,[V.value?(e.openBlock(),e.createElementBlock("div",Tu,[Fu,e.createVNode(at,{modelValue:n.value.isEligibilitySelected,"onUpdate:modelValue":M[0]||(M[0]=A=>n.value.isEligibilitySelected=A)},null,8,["modelValue"]),Mu])):e.createCommentVNode("",!0),e.createElementVNode("div",Au,[n.value.isEligibilitySelected?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Iu,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:n.value.eligibility,"is-disabled":""}),{default:e.withCtx(({selectedItem:A})=>[e.createElementVNode("div",Du,e.toDisplayString(A.name),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:A.name,fontFamily:t.fontFamily,width:"100%","avoid-interaction":""},null,8,["model-value","label","fontFamily"])])]),_:1},16,["items"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Lu,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:u.value}),{default:e.withCtx(()=>[e.createElementVNode("div",Pu,e.toDisplayString(m.value),1)]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:A.name,fontFamily:t.fontFamily,width:"100%","onUpdate:modelValue":q=>Q(q,A)},null,8,["model-value","label","fontFamily","onUpdate:modelValue"])])]),_:1},16,["items"])],64))]),e.createElementVNode("div",vu,[Ru,e.createVNode(e.unref(ke),e.mergeProps(h.value,{"is-multiple-option":"",items:g.value}),{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[t.isFemale?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y.value.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva")),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(y.value),1)],64))])]),availableItem:e.withCtx(({item:A})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(Y),{"model-value":A.isSelected,label:t.isFemale?A.name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):A.name,fontFamily:t.fontFamily,width:"100%","onUpdate:modelValue":q=>F(q,A)},null,8,["model-value","label","fontFamily","onUpdate:modelValue"])])]),_:1},16,["items"])])])]))}},ju=J(Uu,[["__scopeId","data-v-8c3ead4b"]]),Hu={class:"plays"},Wu={class:"plays__body__offensive"},Gu={class:"plays__body__title"},$u={class:"number-of-categories"},qu={class:"plays__body__categories"},Yu={class:"plays__body__defensive-possession-offenses"},Zu={class:"plays__body__title"},Ju={class:"number-of-categories"},Ku={class:"plays__body__categories"},Xu={class:"plays__body__title"},Qu={class:"number-of-categories"},ef={class:"plays__body__categories"},tf={class:"plays__body__title"},af={class:"number-of-categories"},of={class:"plays__body__categories"},lf={__name:"TemplatePlays",props:{componentWidth:{type:Number,default:0},playsCategories:{type:Object,required:!0},isExpansionMode:{type:Boolean,default:!0},fontFamily:{type:String,default:"'Poppins-Regular'"}},setup(t){const a=t,o=e.ref(!1),l=e.ref(!1),i=e.ref(!1),r=e.ref(!1),n=e.computed(()=>({"--template-columns":a.isExpansionMode?"1fr":"1fr 1fr"})),s=e.computed(()=>a.playsCategories.offensive.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),c=e.computed(()=>a.playsCategories.defensive.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),d=e.computed(()=>a.playsCategories.possession.categories.reduce((p,f)=>(f.isSelected&&p++,p),0)),h=e.computed(()=>a.playsCategories.offenses.categories.reduce((p,f)=>(f.isSelected&&p++,p),0));function m(p,f){f.isSelected=p}function y(p){p==="offensive"?o.value=!o.value:p==="defensive"?l.value=!l.value:p==="possession"?i.value=!i.value:p==="offenses"&&(r.value=!r.value)}return(p,f)=>(e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",{class:"plays__body",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Wu,[e.createElementVNode("div",Gu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[0]||(f[0]=u=>y("offensive"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.offensive.title),1),e.createElementVNode("span",$u,"("+e.toDisplayString(s.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[1]||(f[1]=u=>y("offensive"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":o.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.offensive.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||o.value]])]),e.createElementVNode("div",Yu,[e.createElementVNode("div",Zu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[2]||(f[2]=u=>y("defensive"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.defensive.title),1),e.createElementVNode("span",Ju,"("+e.toDisplayString(c.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[3]||(f[3]=u=>y("defensive"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":l.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",Ku,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.defensive.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||l.value]]),e.createElementVNode("div",Xu,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[4]||(f[4]=u=>y("possession"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.possession.title),1),e.createElementVNode("span",Qu,"("+e.toDisplayString(d.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[5]||(f[5]=u=>y("possession"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":i.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.possession.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||i.value]]),e.createElementVNode("div",tf,[e.createElementVNode("div",{class:"plays__body__title__info",onClick:f[6]||(f[6]=u=>y("offenses"))},[e.createElementVNode("span",null,e.toDisplayString(t.playsCategories.offenses.title),1),e.createElementVNode("span",af,"("+e.toDisplayString(h.value)+")",1)]),e.createElementVNode("div",{class:"plays__body__title__expand-button",onClick:f[7]||(f[7]=u=>y("offenses"))},[e.withDirectives(e.createVNode(Me,{"is-expanded":r.value},null,8,["is-expanded"]),[[e.vShow,t.isExpansionMode]])])]),e.withDirectives(e.createElementVNode("div",of,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playsCategories.offenses.categories,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"plays__checkbox"},[e.createVNode(e.unref(Y),{label:u.name,fontFamily:t.fontFamily,labelFontSize:"13px","model-value":u.isSelected,"box-value":u.priority||0,"onUpdate:modelValue":g=>m(g,u)},null,8,["label","fontFamily","model-value","box-value","onUpdate:modelValue"])]))),128))],512),[[e.vShow,!t.isExpansionMode||r.value]])])],4)]))}},rf=J(lf,[["__scopeId","data-v-364e6cae"]]),nf={class:"template-results"},sf={__name:"TemplateResults",props:{resultsFilters:{type:Object,default:()=>({results:[]})}},emits:["update:resultsFilters"],setup(t,{emit:a}){const o=t,l=e.computed(()=>o.resultsFilters.results.filter(i=>i.isSelected).length);return e.watch(()=>o.resultsFilters,i=>{a("update:resultsFilters",i)},{deep:!0,immediate:!0}),(i,r)=>(e.openBlock(),e.createElementBlock("div",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.resultsFilters.results,(n,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:n.isSelected,"onUpdate:modelValue":c=>n.isSelected=c,label:n.name,"avoid-interaction":l.value===1&&n.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))]))}},df=J(sf,[["__scopeId","data-v-453e89c2"]]),cf={__name:"ButtonCustom",props:{text:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},padding:{type:String,default:"0px"},borderRadius:{type:String,default:"0px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"#d9d9d9"},backgroundColor:{type:String,default:"#FFFFFF"},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},activeFontColor:{type:String,default:""},fontColor:{type:String,default:"#000000"},fontSize:{type:String,default:"16px"},fontFamily:{type:String,default:"Poppins-Regular, sans-serif"},isActive:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const o=t,l=e.computed(()=>({"--height":o.height,"--width":o.width,"--padding":o.padding,"--border-radius":o.borderRadius,"--border":`solid ${o.borderWidth} ${o.borderColor}`,"--background-color":o.backgroundColor,"--font-color":o.fontColor,"--font-size":o.fontSize,"--font-family":o.fontFamily,"--active-background-color":o.activeBackgroundColor||o.backgroundColor,"--active-border-color":o.activeBorderColor||o.borderColor,"--active-font-color":o.activeFontColor||o.fontColor}));function i(){a("click")}return(r,n)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["button",{active:t.isActive}]),style:e.normalizeStyle(l.value),onClick:i},e.toDisplayString(t.text),7))}},ot=J(cf,[["__scopeId","data-v-9688933e"]]),pf={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},El={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},mf={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},uf={4:"OF",5:"Cf",6:"S",7:"F"};function Ea(t=""){return t?localStorage.getItem(t):localStorage.getItem("user_token")||localStorage.getItem("token")}const ff={class:"dropdown"},hf={class:"selected-item"},yf={__name:"DropdownTextOnly",props:{items:{type:Array,default:()=>[]},itemTextKey:{type:String,default:""},isListSameWidth:{type:Boolean,default:!0}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{"is-list-same-width":t.isListSameWidth,items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",hf,e.toDisplayString(t.itemTextKey?r[t.itemTextKey]:r),1)]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",null,e.toDisplayString(t.itemTextKey?r[t.itemTextKey]:r),1)]),_:1},16,["is-list-same-width","items"])]))}},me=J(yf,[["__scopeId","data-v-064d5f86"]]),gf={class:"dropdown"},bf={class:"game-item"},_f={key:0,class:"item-game"},Sf={class:"match-day"},Ef={class:"team-logo"},wf=["src"],Cf={class:"text"},kf={class:"text score"},Vf={class:"text"},Nf={class:"team-logo"},xf=["src"],Bf={class:"item-game"},Tf={class:"team-logo"},Ff=["src"],Mf={class:"text"},Af={class:"text score"},Lf={class:"text"},Pf={class:"team-logo"},If=["src"],Df={__name:"DropdownGame",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",gf,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",bf,[r.homeTeam?(e.openBlock(),e.createElementBlock("div",_f,[e.createElementVNode("div",Sf,e.toDisplayString(r.roundAbbreviation),1),e.createElementVNode("div",Ef,[e.createElementVNode("img",{src:r.homeTeam.logo,alt:""},null,8,wf)]),e.createElementVNode("div",Cf,e.toDisplayString(r.homeTeam.acronym),1),e.createElementVNode("div",kf,e.toDisplayString(r.score[0])+" - "+e.toDisplayString(r.score[1]),1),e.createElementVNode("div",Vf,e.toDisplayString(r.awayTeam.acronym),1),e.createElementVNode("div",Nf,[e.createElementVNode("img",{src:r.awayTeam.logo,alt:""},null,8,xf)])])):e.createCommentVNode("",!0)])]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",Bf,[e.createElementVNode("div",null,e.toDisplayString(r.roundAbbreviation),1),e.createElementVNode("div",Tf,[e.createElementVNode("img",{src:r.homeTeam.logo,alt:""},null,8,Ff)]),e.createElementVNode("div",Mf,e.toDisplayString(r.homeTeam.acronym),1),e.createElementVNode("div",Af,e.toDisplayString(r.score[0])+" - "+e.toDisplayString(r.score[1]),1),e.createElementVNode("div",Lf,e.toDisplayString(r.awayTeam.acronym),1),e.createElementVNode("div",Pf,[e.createElementVNode("img",{src:r.awayTeam.logo,alt:""},null,8,If)])])]),_:1},16,["items"])]))}},Lt=J(Df,[["__scopeId","data-v-7883a91e"]]),Pt=t=>(e.pushScopeId("data-v-b63e9c84"),t=t(),e.popScopeId(),t),vf={class:"container"},Rf={class:"container__row"},Of={class:"container__row__wrapper"},zf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Uf={class:"container__row__wrapper__input"},jf={class:"container__row two-items"},Hf={class:"container__row__wrapper"},Wf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),Gf={key:0,class:"container__row__wrapper__input"},$f={class:"container__row__wrapper"},qf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),Yf={key:0,class:"container__row__wrapper__input"},Zf={class:"container__row"},Jf={class:"container__row__wrapper"},Kf=Pt(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),Xf={key:0,class:"container__row__wrapper__input"},Qf={class:"container__action"},eh={__name:"VideosGoals",props:{tournaments:{type:Array,required:!0}},emits:["update:tournament","update:season"],setup(t,{emit:a}){const o={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},l=e.ref(null),i=e.ref(null),r=e.ref(null),n=e.ref(null);function s(m){l.value=m,a("update:tournament",m)}function c(m){i.value=m,a("update:season",m)}function d(m){r.value=m}function h(m){n.value=m}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",vf,[e.createElementVNode("div",Rf,[e.createElementVNode("div",Of,[zf,e.createElementVNode("div",Uf,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:s},null,8,["items"])])])]),e.createElementVNode("div",jf,[e.createElementVNode("div",Hf,[Wf,l.value&&l.value.seasons?(e.openBlock(),e.createElementBlock("div",Gf,[e.createVNode(me,{items:l.value.seasons,itemTextKey:"name",onInput:c},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",$f,[qf,i.value&&i.value.arrayMatchDays?(e.openBlock(),e.createElementBlock("div",Yf,[e.createVNode(me,{items:i.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:d},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Zf,[e.createElementVNode("div",Jf,[Kf,r.value&&r.value.arrayGames?(e.openBlock(),e.createElementBlock("div",Xf,[e.createVNode(Lt,{items:r.value.arrayGames,onInput:h},null,8,["items"])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Qf,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(o)),null,16)])],64))}},th=J(eh,[["__scopeId","data-v-b63e9c84"]]),ah={class:"dropdown"},oh={class:"item-team"},lh={class:"team-logo"},rh=["src"],ih={class:"team-acronym"},nh={class:"item-team"},sh={class:"team-logo"},dh=["src"],ch={class:"team-acronym"},ph={__name:"DropdownTeam",props:{items:{type:Array,default:()=>[]}},emits:["input"],setup(t,{emit:a}){function o(l){a("input",l)}return(l,i)=>(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(e.unref(ke),e.mergeProps(e.unref(Je),{items:t.items,onInput:o}),{default:e.withCtx(({selectedItem:r})=>[e.createElementVNode("div",oh,[e.createElementVNode("div",lh,[e.createElementVNode("img",{src:r.logo,alt:""},null,8,rh)]),e.createElementVNode("div",ih,e.toDisplayString(r.acronym),1)])]),availableItem:e.withCtx(({item:r})=>[e.createElementVNode("div",nh,[e.createElementVNode("div",sh,[e.createElementVNode("img",{src:r.logo,alt:""},null,8,dh)]),e.createElementVNode("div",ch,e.toDisplayString(r.acronym),1)])]),_:1},16,["items"])]))}},wl=J(ph,[["__scopeId","data-v-afd2bee8"]]),mh={class:"advanced-filters"},uh={class:"advanced-filters__buttons"},fh=["onClick"],hh={class:"advanced-filters__filters"},yh={__name:"AdvancedFilters",props:{selectedCategory:{type:Object,default:()=>({})}},setup(t){const a=t,o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>O6)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>ob)),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rb)),r=[{name:"Sub categorías",component:o},{name:"Cancha",component:i},{name:"Condiciones",component:l}],n=e.ref(r[0]),s=e.computed(()=>a.selectedCategory?a.selectedCategory.subcategoryGroups||[]:[]);function c(d){n.value=d}return(d,h)=>(e.openBlock(),e.createElementBlock("div",mh,[e.createElementVNode("div",uh,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,m=>e.createElementVNode("div",{key:m.name,role:"button",class:e.normalizeClass(["advanced-filters__buttons__button",{active:n.value.name===m.name}]),onClick:y=>c(m)},e.toDisplayString(m.name),11,fh)),64))]),e.createElementVNode("div",hh,[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value.component),{"subcategory-groups":s.value},null,8,["subcategory-groups"]))],1024))])]))}},wa=J(yh,[["__scopeId","data-v-c62c5b9c"]]),Ie=t=>(e.pushScopeId("data-v-575b26b5"),t=t(),e.popScopeId(),t),gh={class:"container"},bh={class:"container__row"},_h={class:"container__row__wrapper"},Sh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Eh={class:"container__row__wrapper__input"},wh={class:"container__row two-items"},Ch={class:"container__row__wrapper"},kh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),Vh={key:0,class:"container__row__wrapper__input"},Nh={class:"container__row__wrapper"},xh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. En que equipo juega?",-1)),Bh={key:0,class:"container__row__wrapper__input"},Th={class:"container__row"},Fh={class:"container__row__wrapper"},Mh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Nombre del jugador",-1)),Ah={key:0,class:"container__row__wrapper__input"},Lh={class:"container__row"},Ph={class:"container__row__wrapper"},Ih=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el partido",-1)),Dh={key:0,class:"container__row__wrapper__input"},vh={class:"container__row type-and-advanced"},Rh={class:"container__row__wrapper"},Oh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),zh={class:"container__row__wrapper__input"},Uh={class:"container__row__wrapper center"},jh=Ie(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),Hh={class:"container__row__wrapper__input"},Wh={class:"container__row"},Gh={class:"container__action"},$h={__name:"VideosPlayer",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({player:[],goalkeeper:[]})}},emits:["update:tournament","update:season","update:team"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null);e.ref(null);const n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(null),h=e.ref(!0),m=e.computed(()=>c.value?c.value.position_id===1?o.advancedFilterCategories.goalkeeper:o.advancedFilterCategories.player:[]);function y(B){i.value=B,a("update:tournament",B)}function p(B){r.value=B,a("update:season",B)}function f(B){s.value=B,a("update:team",B)}function u(B){c.value=B}function g(B){n.value=B}function V(B){d.value=B}return(B,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gh,[e.createElementVNode("div",bh,[e.createElementVNode("div",_h,[Sh,e.createElementVNode("div",Eh,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:y},null,8,["items"])])])]),e.createElementVNode("div",wh,[e.createElementVNode("div",Ch,[kh,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",Vh,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Nh,[xh,r.value&&r.value.arrayTeams?(e.openBlock(),e.createElementBlock("div",Bh,[e.createVNode(wl,{items:r.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Th,[e.createElementVNode("div",Fh,[Mh,s.value&&s.value.arrayPlayers?(e.openBlock(),e.createElementBlock("div",Ah,[e.createVNode(me,{items:s.value.arrayPlayers,itemTextKey:"player_name",onInput:u},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Lh,[e.createElementVNode("div",Ph,[Ih,r.value&&r.value.mapGamesByTeam&&s.value?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Lt,{items:r.value.mapGamesByTeam.get(s.value.team_id),onInput:g},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",vh,[e.createElementVNode("div",Rh,[Oh,e.createElementVNode("div",zh,[e.createVNode(me,{items:m.value,itemTextKey:"name","is-list-same-width":!1,onInput:V},null,8,["items"])])]),e.createElementVNode("div",Uh,[jh,e.createElementVNode("div",Hh,[e.createVNode(at,{modelValue:h.value,"onUpdate:modelValue":v[0]||(v[0]=Z=>h.value=Z)},null,8,["modelValue"])])])]),e.createElementVNode("div",Wh,[e.createVNode(wa,{"selected-category":d.value},null,8,["selected-category"])])]),e.createElementVNode("div",Gh,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},qh=J($h,[["__scopeId","data-v-575b26b5"]]),He=t=>(e.pushScopeId("data-v-6d73d5e6"),t=t(),e.popScopeId(),t),Yh={class:"container"},Zh={class:"container__row"},Jh={class:"container__row__wrapper"},Kh=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),Xh={class:"container__row__wrapper__input"},Qh={class:"container__row two-items"},e0={class:"container__row__wrapper"},t0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),a0={key:0,class:"container__row__wrapper__input"},o0={class:"container__row__wrapper"},l0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige el equipo",-1)),r0={key:0,class:"container__row__wrapper__input"},i0={class:"container__row"},n0={class:"container__row__wrapper"},s0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),d0={key:0,class:"container__row__wrapper__input"},c0={class:"container__row type-and-advanced"},p0={class:"container__row__wrapper"},m0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"5. Elige el tipo de video",-1)),u0={class:"container__row__wrapper__input"},f0={class:"container__row__wrapper center"},h0=He(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),y0={class:"container__row__wrapper__input"},g0={class:"container__row"},b0={class:"container__action"},_0={__name:"VideosTeam",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({team:[]})}},emits:["update:tournament","update:season","update:team"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null);e.ref(null);const n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(!0),h=e.computed(()=>o.advancedFilterCategories.team);function m(g){i.value=g,a("update:tournament",g)}function y(g){r.value=g,a("update:season",g)}function p(g){s.value=g,a("update:team",g)}function f(g){n.value=g}function u(g){c.value=g}return(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Yh,[e.createElementVNode("div",Zh,[e.createElementVNode("div",Jh,[Kh,e.createElementVNode("div",Xh,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:m},null,8,["items"])])])]),e.createElementVNode("div",Qh,[e.createElementVNode("div",e0,[t0,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:y},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",o0,[l0,r.value&&r.value.arrayTeams?(e.openBlock(),e.createElementBlock("div",r0,[e.createVNode(wl,{items:r.value.arrayTeams,itemTextKey:"stringMatchDayAbbreviation",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",i0,[e.createElementVNode("div",n0,[s0,r.value&&r.value.mapGamesByTeam&&s.value?(e.openBlock(),e.createElementBlock("div",d0,[e.createVNode(Lt,{items:r.value.mapGamesByTeam.get(s.value.team_id),onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",c0,[e.createElementVNode("div",p0,[m0,e.createElementVNode("div",u0,[e.createVNode(me,{items:h.value,itemTextKey:"name","is-list-same-width":!1,onInput:u},null,8,["items"])])]),e.createElementVNode("div",f0,[h0,e.createElementVNode("div",y0,[e.createVNode(at,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=B=>d.value=B)},null,8,["modelValue"])])])]),e.createElementVNode("div",g0,[e.createVNode(wa,{"selected-category":c.value},null,8,["selected-category"])])]),e.createElementVNode("div",b0,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},S0=J(_0,[["__scopeId","data-v-6d73d5e6"]]),We=t=>(e.pushScopeId("data-v-6e904db8"),t=t(),e.popScopeId(),t),E0={class:"container"},w0={class:"container__row"},C0={class:"container__row__wrapper"},k0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"1. Elige la liga",-1)),V0={class:"container__row__wrapper__input"},N0={class:"container__row two-items"},x0={class:"container__row__wrapper"},B0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"2. Elige el torneo",-1)),T0={key:0,class:"container__row__wrapper__input"},F0={class:"container__row__wrapper"},M0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"3. Elige la jornada",-1)),A0={key:0,class:"container__row__wrapper__input"},L0={class:"container__row"},P0={class:"container__row__wrapper"},I0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"4. Elige el partido",-1)),D0={key:0,class:"container__row__wrapper__input"},v0={class:"container__row type-and-advanced"},R0={class:"container__row__wrapper"},O0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"6. Elige el tipo de video",-1)),z0={class:"container__row__wrapper__input"},U0={class:"container__row__wrapper center"},j0=We(()=>e.createElementVNode("div",{class:"container__row__wrapper__label"},"Filtrado avanzado",-1)),H0={class:"container__row__wrapper__input",style:{width:"fit-content"}},W0={class:"container__row"},G0={class:"container__action"},$0={__name:"VideosGame",props:{tournaments:{type:Array,required:!0},advancedFilterCategories:{type:Object,default:()=>({games:[]})}},emits:["update:tournament","update:season"],setup(t,{emit:a}){const o=t,l={text:"Buscar",width:"100%",padding:"12px 0",borderRadius:"34px",backgroundColor:"#CBEE6B",borderColor:"#CBEE6B",fontColor:"#132634"},i=e.ref(null),r=e.ref(null),n=e.ref(null),s=e.ref(null),c=e.ref(null),d=e.ref(!0),h=e.computed(()=>o.advancedFilterCategories.games);function m(g){i.value=g,a("update:tournament",g)}function y(g){r.value=g,a("update:season",g)}function p(g){n.value=g}function f(g){s.value=g}function u(g){c.value=g}return(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E0,[e.createElementVNode("div",w0,[e.createElementVNode("div",C0,[k0,e.createElementVNode("div",V0,[e.createVNode(me,{items:t.tournaments,itemTextKey:"name",onInput:m},null,8,["items"])])])]),e.createElementVNode("div",N0,[e.createElementVNode("div",x0,[B0,i.value&&i.value.seasons?(e.openBlock(),e.createElementBlock("div",T0,[e.createVNode(me,{items:i.value.seasons,itemTextKey:"name",onInput:y},null,8,["items"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",F0,[M0,r.value&&r.value.arrayMatchDays?(e.openBlock(),e.createElementBlock("div",A0,[e.createVNode(me,{items:r.value.arrayMatchDays,itemTextKey:"stringMatchDayAbbreviation",onInput:p},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",L0,[e.createElementVNode("div",P0,[I0,n.value&&n.value.arrayGames?(e.openBlock(),e.createElementBlock("div",D0,[e.createVNode(Lt,{items:n.value.arrayGames,onInput:f},null,8,["items"])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",v0,[e.createElementVNode("div",R0,[O0,e.createElementVNode("div",z0,[e.createVNode(me,{items:h.value,itemTextKey:"name","is-list-same-width":!1,onInput:u},null,8,["items"])])]),e.createElementVNode("div",U0,[j0,e.createElementVNode("div",H0,[e.createVNode(at,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=B=>d.value=B)},null,8,["modelValue"])])])]),e.createElementVNode("div",W0,[e.createVNode(wa,{"selected-category":c.value},null,8,["selected-category"])])]),e.createElementVNode("div",G0,[e.createVNode(ot,e.normalizeProps(e.guardReactiveProps(l)),null,16)])],64))}},q0=J($0,[["__scopeId","data-v-6e904db8"]]),Y0={class:"template-videos"},Z0={class:"template-videos__header"},J0={class:"template-videos__body"},K0=e.defineComponent({name:"TemplateVideos",components:{VideosGoals:th,VideosPlayer:qh,VideosTeam:S0,VideosGame:q0}}),X0=Object.assign(K0,{props:{gamesUrl:{type:String,default:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?"},tournamentsUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"},playersUrl:{type:String,default:"https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/"},token:{type:String,default:""}},emits:["loading-data"],setup(t,{emit:a}){const o=t,l={padding:"4px 18px",borderRadius:"160px",backgroundColor:"#3A4851",borderColor:"#3A4851",activeBorderColor:"#CBEE6B",fontSize:"11px",fontColor:"#FFFFFF"},i=[],r=["g-23","g-24","g-25"],n={games:[607,608,12,55,54,35,14,52,15,53,466,477],team:[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39],player:{regular:[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257],goalkeeper:[55,324,323,608,39,774,802,52,53,40,54]}},s={player:1,team:2,goalkeeper:3},c=e.ref([{name:"Goles",componentName:"VideosGoals"},{name:"Jugador",componentName:"VideosPlayer"},{name:"Equipo",componentName:"VideosTeam"},{name:"Partido",componentName:"VideosGame"}]),d=e.ref([]),h=e.ref(c.value[0]),m=e.ref({}),y=e.ref({}),p=e.ref({}),f=e.ref({}),u=e.ref({games:[],player:[],team:[],goalkeeper:[],isEmpty:!0}),g=e.ref([]);e.ref({});const V=e.ref(null);e.watch(m,N=>{y.value.numberSeasonSelectedIndex=y.value.seasons.findIndex(L=>L.id===N.id),N.arrayMatchDays?(f.value=N.arrayMatchDays[0]||{},p.value=N.arrayTeams[0]||{}):(O(N),Q(N))}),e.watch(p,()=>{setTimeout(()=>{m.value.mapPlayersByTeam&&(!p.value.arrayPlayers||!p.value.arrayPlayers.length)&&(p.value.arrayPlayers=m.value.mapPlayersByTeam.get(p.value.team_id))},700)});async function B(){try{d.value=await v()}catch(N){throw new Error(N)}}async function v(){try{const N={Authorization:Ea()||o.token},L={}.API_TOURNAMENTS||o.tournamentsUrl,R=await et.get(L,{headers:N});return R.data?R.data.map(w=>({...w.tournament,seasons:w.seasons})):[]}catch(N){return Promise.reject(N)}}async function Z(N,L,R=""){a("loading-data");let w=R;try{w||(w={}.API_CALENDAR_GAMES_BY_SEASON||o.gamesUrl,N.forEach((P,_)=>{w+=`${_===0?"":"&"}seasons=${P}`}));const I={Authorization:Ea()||o.token},{data:{data:j,teams:z}}=await et.get(w,{headers:I});return{seasonsAndGames:j,seasonsAndTeams:z}}catch(I){if(L>0)return Z(N,L-1,w);throw new Error(I)}finally{a("loading-data")}}async function U(N){try{const L={Authorization:Ea()||o.token},R=` ${{}.API_PLAYERS_BY_SEASON||o.playersUrl}${N.seasonId}`,w=await et.get(R,{headers:L});return w.data?w.data.players:[]}catch(L){return Promise.reject(L)}}async function O(N){try{const{seasonsAndGames:L,seasonsAndTeams:R}=await Z([N.id,...N.related_seasons.map(z=>z.id)],3),w=R.find(z=>z._id===N.id);m.value.arrayTeams=[],m.value.mapTeams=new Map;const I=w.teams.reduce((z,P)=>(m.value.arrayTeams.push(P),m.value.mapTeams.set(P.team_id,{name:P.colloquial_name,acronym:P.acronym,logo:P.logo,id:P.team_id}),z.set(P.team_id,P),z),new Map);p.value=m.value.arrayTeams[0],m.value.mapGames=new Map,m.value.mapGamesByTeam=new Map;const j=Array.from(L.reduce((z,P)=>(P.games.forEach(_=>{if(_.game_status===1&&_.has_video){(!m.value.maxGameId||_.game_id>m.value.maxGameId)&&(m.value.maxGameId=_.game_id);let S=_.matchday_abbreviation.replace("M","J"),x=_.matchday_abbreviation.replace("M","Jornada ");const $=_.matchday_abbreviation.replace("M","");P.season_type===0?y.value.tournament_type===1&&(_.seasonId===881?(S=uf[$]||S,x=mf[$]||x):(S=El[_.matchday_abbreviation]?_.matchday_abbreviation:S,x=El[_.matchday_abbreviation]||x,S==="FINAL"&&(S="F"))):P.season_type===1?(S=pf[_.matchday_abbreviation],x=S):(S=_.matchday_abbreviation.replace("PO","R"),x="Repechaje"),_.roundAbbreviation=S,_.roundName=x,m.value.mapGames.set(_.game_id,{id:_.game_id,date:_.date,dateTimeMillis:new Date(_.date_time_utc).valueOf(),homeTeam:m.value.mapTeams.get(_.home_team),awayTeam:m.value.mapTeams.get(_.visiting_team),roundAbbreviation:_.roundAbbreviation,roundName:_.roundName,score:_.score,gameResult:_.score[0]>_.score[1]?1:_.score[0]<_.score[1]?2:3,seasonId:P.season_id});const Ne=z.get(_.roundAbbreviation);_.numberDateTimeMillis=new Date(_.date_time_utc).getTime(),_.homeTeam=I.get(_.home_team),_.awayTeam=I.get(_.visiting_team);const Dt=m.value.mapGamesByTeam.get(_.home_team),ae=m.value.mapGamesByTeam.get(_.visiting_team);Dt?Dt.push(_):m.value.mapGamesByTeam.set(_.home_team,[_]),ae?ae.push(_):m.value.mapGamesByTeam.set(_.visiting_team,[_]),Ne?Ne.arrayGames.push(_):z.set(_.roundAbbreviation,{stringMatchDayAbbreviation:_.roundAbbreviation,stringMatchDayName:_.roundName,arrayGames:[_]})}}),z),new Map).values());j.reverse(),j.forEach(z=>{z.arrayGames.sort((P,_)=>P.numberDateTimeMillis-_.numberDateTimeMillis)}),m.value.arrayMatchDays=j,f.value=j[0]||{}}catch(L){throw new Error(L)}}async function Q(N){try{const L=await M(N.id);m.value.mapPlayers=new Map,m.value.mapPlayersByTeam=L.reduce((R,w)=>{m.value.mapPlayers.set(w.player_id,{id:w.player_id,name:w.player_name,shortName:w.shortName,photo:w.player_photo,teamId:w.team_id,positionId:w.position_id});const I=R.get(w.team_id);return I?I.push(w):R.set(w.team_id,[w]),R},new Map)}catch(L){throw new Error(L)}}async function K(){try{let N=[];u.value.isEmpty?(N=await A(),g.value={...N}):N=g.value;const L=[];if(N&&N.length){u.value=N.reduce((P,_)=>{if(_.group_id!=="g-55"){const S={idAux:_.group_id,ids:[..._.ids?_.ids:[],..._.rival_Ids?_.rival_Ids:[]],type:_.type,name:_.name,coordinatePoint:_.coordinate_point,requiresRivalTransform:r.includes(_.group_id)};S.idsAux=[...S.ids],S.subcategoryGroups=_.group_id==="g-12"?[]:F(_,0,new Map,!1,{},S.idsAux),L.push(S),S.type.includes(s.player)&&P.player.push(S),S.type.includes(s.team)&&(S.idAux!=="g-2"&&P.games.push(S),P.team.push(S)),S.type.includes(s.goalkeeper)&&P.goalkeeper.push(S)}return P},{games:[],player:[],team:[],goalkeeper:[],isEmpty:!1});const R=new Map,w="Resumen",I="Todas sus jugadas",j=u.value.player.reduce((P,_)=>{const S=T(_);return S.forEach(x=>{R.set(x,_.name)}),P.push(...S),P},[]),z=u.value.goalkeeper.reduce((P,_)=>{const S=T(_);return S.forEach(x=>{R.set(x,_.name)}),P.push(...S),P},[]);u.value.games.unshift({name:w,arrayCategoriesIds:n.games,booleanIsBestPlays:!0}),u.value.team.unshift({name:w,arrayCategoriesIds:n.team,booleanIsBestPlays:!0}),u.value.player.unshift({name:w,arrayCategoriesIds:n.player.regular,booleanIsBestPlays:!0},{name:I,arrayCategoriesIds:j,booleanIsMinutesPlayed:!0}),u.value.goalkeeper.unshift({name:w,arrayCategoriesIds:n.player.goalkeeper,booleanIsBestPlays:!0},{name:I,arrayCategoriesIds:z,booleanIsMinutesPlayed:!0})}}catch(N){throw new Error(N)}}function F(N,L=0,R=new Map,w=!1,I={},j=[]){if(!N.group_id)return;let z=R.get(L);const P=w?`${N.id_category}_r`:N.id_category;N.id_category&&j.push(N.id_category);let _={ids:[P],groupId:N.group_id,level:L,name:N.name,isSelected:!0,fatherCategories:L>0?[I]:[],idsByFatherCategory:{[N.category_father]:[P]}};if(L>0&&L===1&&(_.id=N.id_category),z&&L!==0){const S=N.group_id.charAt(N.group_id.length-1),x=z.find($=>$.groupId.endsWith(S));x&&!i.includes(_.groupId)?(_=x,x.ids.push(P),x.fatherCategories.push(I),x.fatherCategories.forEach($=>{$.childCategories?$.childCategories.find(Ne=>Ne.groupId===_.groupId)||$.childCategories.push(_):$.childCategories=[_]}),x.idsByFatherCategory[N.category_father]?x.idsByFatherCategory[N.category_father].push(P):x.idsByFatherCategory[N.category_father]=[P]):(_.fatherCategories.forEach($=>{$.childCategories?$.childCategories.find(Ne=>Ne.groupId===_.groupId)||$.childCategories.push(_):$.childCategories=[_]}),z.push(_))}else L!==0&&(I.childCategories?I.childCategories.push(_):I.childCategories=[_],z=[_],R.set(L,z));if(N.categories&&N.categories.length?N.categories.forEach(S=>{F(S,L+1,R,w,_,j)}):N.rival_categories&&N.rival_categories.length&&N.rival_categories.forEach(S=>{F(S,L+1,R,!0,_,j)}),L===0)return Array.from(R.values())}function T(N){const L=N||N;if(L.booleanIsBestPlays)return L.arrayCategoriesIds;const R={total:[],toRemove:[]};if(L.subcategoryGroups&&L.subcategoryGroups.length?L.subcategoryGroups[0].forEach(w=>{E(w,null,R)}):(L.ids&&R.total.push(...L.ids),L.rival_ids&&L.rival_ids.forEach(w=>{R.total.push(`${w}_r`)})),R.total=R.total.reduce((w,I)=>(R.toRemove.includes(I)||w.push(I),w),[]),!N){const w=L.name.toLowerCase().includes("recibid");V.value.isRivalSubject=w,V.value.avoidCategorySingleName=w,V.value.coordinatePoint=L.coordinatePoint,V.value.requiresRivalTransform=L.requiresRivalTransform}return R.total}function E(N,L=[],R={total:[],toRemove:[]}){N.isSelected?N.childCategories?N.childCategories.forEach(w=>{const I=L?Object.entries(N.idsByFatherCategory).reduce((j,[z,P])=>(L.includes(Number(z))&&P.forEach(_=>{typeof _=="string"&&_.endsWith("_r")?j.push(Number(_.split("_")[0])):j.push(_)}),j),[]):[N.id];E(w,I,R)}):L?Object.entries(N.idsByFatherCategory).forEach(([w,I])=>{L.includes(Number(w))&&I.forEach(j=>{R.total.push(j)})}):N.level===1?Object.entries(N.idsByFatherCategory).forEach(([w,I])=>{I.forEach(j=>{R.total.push(j)})}):R.total.push(N.id):N.childCategories||N.ids.forEach(w=>{R.toRemove.push(w)})}async function M(N){try{const L=await U({seasonId:N});return L.forEach(R=>{const[w,I]=R.player_name.split(","),j=w.split(" ");let z="";for(const P of j)if(z+=` ${P}`,P.length>3)break;R.shortName=I&&w?`${I.trim().charAt(0)}.${z}`:""}),L}catch(L){return Promise.reject(L)}}async function A(){try{const N={Authorization:localStorage.getItem("user_token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"};return(await et.get("https://2gfppi9wb6.execute-api.us-east-2.amazonaws.com/prod/videos/categories",{headers:N})).data||[]}catch(N){return Promise.reject(N)}}function q(N){h.value=N}function te(N){y.value=N,m.value=N.seasons[0]}function de(N){m.value=N}function re(N){p.value=N}return B(),K(),(N,L)=>(e.openBlock(),e.createElementBlock("div",Y0,[e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,R=>(e.openBlock(),e.createBlock(ot,e.mergeProps({key:R.name},l,{text:R.name,"is-active":h.value.componentName===R.componentName,tournaments:d.value,onClick:w=>q(R)}),null,16,["text","is-active","tournaments","onClick"]))),128))]),e.createElementVNode("div",J0,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value.componentName),{tournaments:d.value,"advanced-filter-categories":u.value,"onUpdate:tournament":te,"onUpdate:season":de,"onUpdate:team":re},null,40,["tournaments","advanced-filter-categories"]))])]))}}),Q0=J(X0,[["__scopeId","data-v-d6f7aec8"]]),Cl=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 "],[10,"Desconocida"]]),e2={class:"template-taken-corners"},t2={class:"template-taken-corners__header"},a2={class:"template-taken-corners__header__all"},o2={class:"template-taken-corners__body"},l2={class:"template-taken-corners__body__players"},r2={class:"template-taken-corners__body__players__player__jersey"},i2={class:"template-taken-corners__body__players__player__photo"},n2={class:"template-taken-corners__body__players__player__photo__img"},s2=["src"],d2={class:"template-taken-corners__body__players__player__info"},c2={class:"template-taken-corners__body__players__player__info__name"},p2={class:"template-taken-corners__body__players__player__info__position"},m2={class:"template-taken-corners__body__players__player__info__position__nationality"},u2=["src"],f2={class:"template-taken-corners__body__players__player__info__position__name"},h2={class:"template-taken-corners__body__players__player__checkbox"},y2={__name:"TemplateTakenCorners",props:{isFemale:{type:Boolean,default:!1},isExpansionMode:{type:Boolean,default:!1},takenCornersFilters:{type:Array,default:()=>[]}},emits:["change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(!1),r=e.ref([]),n=e.computed(()=>l.isExpansionMode?"Cobradores filtrados:":"Cobradores con los filtros seleccionados"),s=e.computed(()=>r.value.reduce((u,g)=>g.isSelected?u+1:u,0));e.watch(()=>l.takenCornersFilters,u=>{r.value=u.map(g=>{const V={...g};return(g.isSelected===void 0||g.isSelected===null)&&(V.isSelected=!0),V})},{immediate:!0,deep:!0}),e.watch(s,u=>{i.value=u===r.value.length,o("change-filters-selected",u),o("update:filters",r.value)},{immediate:!0});function c(u){return`https://golstatsimages.blob.core.windows.net/flags/${u}.jpg`}function d(u){return`https://golstatsimages.blob.core.windows.net/players-profile/${u}.png`}function h(u){let g=!1;return u.split(" ").reduce((V,B)=>(g||(B.length>3?(V=B,g=!0):V+=`${B} `),V),"").trim()}function m(u){return`${h(u.last_name)}, ${u.first_name.trim()}`}function y(u){return l.isFemale?Cl.get(u.positions[0]).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):Cl.get(u.positions[0])}function p(u){u?r.value.forEach(g=>{g.isSelected=!0}):r.value.forEach((g,V)=>{g.isSelected=V===0})}function f(){r.value.forEach(u=>{u.isSelected=!0})}return a({clearFilters:f}),(u,g)=>(e.openBlock(),e.createElementBlock("div",e2,[e.createElementVNode("div",t2,[e.createElementVNode("div",{class:"template-taken-corners__header__text",style:e.normalizeStyle({opacity:t.isExpansionMode?"0.6":1,"font-size":t.isExpansionMode?"12px":"14px"})},e.toDisplayString(n.value),5),e.createElementVNode("div",a2,[e.createVNode(e.unref(Y),{"model-value":i.value,label:"Seleccionar todos","onUpdate:modelValue":p},null,8,["model-value"])])]),e.createElementVNode("div",o2,[e.createElementVNode("div",l2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,V=>(e.openBlock(),e.createElementBlock("div",{key:V.player_id,class:"template-taken-corners__body__players__player"},[e.createElementVNode("div",r2,e.toDisplayString(V.jersey),1),e.createElementVNode("div",i2,[e.createElementVNode("div",n2,[e.createElementVNode("img",{src:d(V.player_id),alt:"player photo",width:"36",height:"36"},null,8,s2)])]),e.createElementVNode("div",d2,[e.createElementVNode("div",c2,e.toDisplayString(m(V)),1),e.createElementVNode("div",p2,[e.createElementVNode("div",m2,[e.createElementVNode("img",{src:c(V.nationality_id),alt:"country flag"},null,8,u2)]),e.createElementVNode("div",f2,e.toDisplayString(y(V)),1)])]),e.createElementVNode("div",h2,[e.createVNode(e.unref(Y),{modelValue:V.isSelected,"onUpdate:modelValue":B=>V.isSelected=B,"avoid-interaction":s.value===1&&V.isSelected},null,8,["modelValue","onUpdate:modelValue","avoid-interaction"])])]))),128))])])]))}},g2=J(y2,[["__scopeId","data-v-763fcc54"]]),Ca={cornerType:"left",left:[{title:"Comba hacia afuera",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[120]},{title:"Comba hacia adentro",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[126]},{title:"Raso al área",imgSrc:"https://golstatsimages.blob.core.windows.net/content/raz-area-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[327]},{title:"En corto",imgSrc:"https://golstatsimages.blob.core.windows.net/content/en-corto-izquierda.png",howMany:0,isSelected:!0,categoriesIds:[133]}],right:[{title:"Comba hacia afuera",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-afuera-derecha.png",howMany:0,isSelected:!0,categoriesIds:[134]},{title:"Comba hacia adentro",imgSrc:"https://golstatsimages.blob.core.windows.net/content/comba-adentro-derecha.png",howMany:0,isSelected:!0,categoriesIds:[140]},{title:"Raso al área",imgSrc:"https://golstatsimages.blob.core.windows.net/content/raz-area-derecha.png",howMany:0,isSelected:!0,categoriesIds:[146]},{title:"En corto",imgSrc:"https://golstatsimages.blob.core.windows.net/content/en-corto-derecha.png",howMany:0,isSelected:!0,categoriesIds:[147]}]},ka=t=>(e.pushScopeId("data-v-b7e3b8e0"),t=t(),e.popScopeId(),t),b2={class:"template-how-was-corner"},_2={class:"template-how-was-corner__header"},S2=ka(()=>e.createElementVNode("div",{class:"template-how-was-corner__header__zone"},"ZONA:",-1)),E2={class:"template-how-was-corner__header__radio-input"},w2={class:"template-how-was-corner__header__radio-input__radio"},C2=ka(()=>e.createElementVNode("label",{for:"left"},"Por izquierda",-1)),k2={class:"template-how-was-corner__header__radio-input"},V2={class:"template-how-was-corner__header__radio-input__radio"},N2=ka(()=>e.createElementVNode("label",{for:"right"},"Por derecha",-1)),x2=["onClick"],B2={class:"template-how-was-corner__content__corner-type__img"},T2=["src","alt"],F2={class:"template-how-was-corner__content__corner-type__info"},M2={class:"template-how-was-corner__content__corner-type__info__title"},A2={__name:"TemplateHowWasCorner",props:{howWasCornerFilters:{type:Object,default:()=>Ca},isExpansionMode:{type:Boolean,default:!1}},emits:["update:filters","change-filters-selected"],setup(t,{emit:a}){const o=t,l=e.ref("left"),i=e.computed(()=>o.howWasCornerFilters[o.howWasCornerFilters.cornerType]),r=e.computed(()=>i.value.filter(s=>s.isSelected).length);e.watch(()=>l.value,s=>{o.howWasCornerFilters.cornerType=s}),e.watch(()=>o.howWasCornerFilters,s=>{a("change-filters-selected",o.howWasCornerFilters[s.cornerType].reduce((c,d)=>d.isSelected?c+1:c,0)),l.value=s.cornerType,a("update:filters",s)},{deep:!0,immediate:!0});function n(s){s.isSelected&&r.value===1||(s.isSelected=!s.isSelected)}return(s,c)=>(e.openBlock(),e.createElementBlock("div",b2,[e.createElementVNode("div",_2,[S2,e.createElementVNode("div",E2,[e.createElementVNode("div",w2,[e.withDirectives(e.createElementVNode("input",{type:"radio",id:"left",value:"left","onUpdate:modelValue":c[0]||(c[0]=d=>l.value=d)},null,512),[[e.vModelRadio,l.value]]),C2])]),e.createElementVNode("div",k2,[e.createElementVNode("div",V2,[e.withDirectives(e.createElementVNode("input",{type:"radio",id:"right",value:"right","onUpdate:modelValue":c[1]||(c[1]=d=>l.value=d)},null,512),[[e.vModelRadio,l.value]]),N2])])]),e.createElementVNode("div",{class:e.normalizeClass(["template-how-was-corner__content",{"is-expansion-mode":t.isExpansionMode}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["template-how-was-corner__content__corner-type",{"is-selected":d.isSelected}]),onClick:m=>n(d)},[e.createElementVNode("div",B2,[e.createElementVNode("img",{src:d.imgSrc,alt:d.title},null,8,T2)]),e.createElementVNode("div",F2,[e.createElementVNode("div",M2,e.toDisplayString(d.title),1)])],10,x2))),128))],2)]))}},L2=J(A2,[["__scopeId","data-v-b7e3b8e0"]]),lt=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],Ve=t=>(e.pushScopeId("data-v-378bf7e2"),t=t(),e.popScopeId(),t),P2={class:"template-zone"},I2={class:"controls-zone-container"},D2={class:"controls-zone-container-title-checkcon"},v2={class:"controls-zone-container-title-checkcon-check"},R2={class:"gsc-field-img-container"},O2={width:"100%",height:"177",viewBox:"0 0 380 177",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z2=["fill"],U2=["fill"],j2=["fill"],H2=["fill"],W2=["fill"],G2=["fill"],$2=["fill"],q2=["fill"],Y2=["fill"],Z2=["fill"],J2=["fill"],K2=["fill"],X2=["fill"],Q2=["fill"],ey=["fill"],ty=["fill"],ay=["fill"],oy=["fill"],ly=["fill"],ry=["fill"],iy=["fill"],ny=["fill"],sy=["fill"],dy=["fill"],cy=["fill"],py=["fill"],my=["fill"],uy=["fill"],fy=["fill"],hy=["fill"],yy=["fill"],gy=["fill"],by=["fill"],_y=["fill"],Sy=["fill"],Ey=Ve(()=>e.createElementVNode("rect",{x:"91.6",y:"0.6",width:"196.8",height:"87.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),wy=Ve(()=>e.createElementVNode("rect",{x:"137.6",y:"0.782404",width:"104.8",height:"28.8",stroke:"#DFE3E2","stroke-width":"1.2"},null,-1)),Cy=["id"],ky=Ve(()=>e.createElementVNode("rect",{width:"197.746",height:"24.6043",transform:"matrix(1 0 0 -1 91 113)",fill:"#D9D9D9"},null,-1)),Vy=[ky],Ny=["mask"],xy=Ve(()=>e.createElementVNode("circle",{cx:"185.329",cy:"56.5046",r:"52.6152",stroke:"#DFE3E2","stroke-width":"1.38817"},null,-1)),By=[xy],Ty=Ve(()=>e.createElementVNode("circle",{cx:"190.278",cy:"66.2782",r:"2.27817",fill:"white"},null,-1)),Fy=Ve(()=>e.createElementVNode("rect",{x:"0.7",y:"0.7",width:"378.6",height:"175.6",stroke:"#DFE3E2","stroke-width":"1.4"},null,-1)),My={class:"template-zone__total-corners"},Ay=Ve(()=>e.createElementVNode("div",{class:"template-zone__total-corners__text"}," Tiros de esquina cobrados a las zonas filtradas ",-1)),Ly=Ve(()=>e.createElementVNode("div",{class:"template-zone__total-corners__value"},"10",-1)),Py=[Ay,Ly],Iy={__name:"TemplateZone",props:{zoneFilters:{type:Array,default:()=>[...lt]},widthContainer:{type:Number,default:1280},show:{type:Boolean,default:!1}},emits:["update:filters","change-filters-selected"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(!0),r=e.ref([]),n=e.computed(()=>new Date().getTime());e.watch(r,h=>{i.value=h.length===35}),e.watch(()=>l.zoneFilters,h=>{r.value=h},{immediate:!0,deep:!0}),e.watch(()=>r.value,h=>{o("update:filters",h),o("change-filters-selected",h.length)},{deep:!0});function s(h){h?(r.value=lt,i.value=!0):(r.value=[],i.value=!1)}function c(h){r.value.includes(h)?r.value=r.value.filter(m=>m!==h):r.value.push(h),i.value=r.value.length===35}function d(){r.value=[...lt]}return a({clearFilters:d}),(h,m)=>(e.openBlock(),e.createElementBlock("div",P2,[e.createElementVNode("div",I2,[e.createElementVNode("div",{class:"controls-zone-container-title",style:e.normalizeStyle(t.widthContainer<=440?"font-size: 11px;":"#2e3b46")}," ¿A donde fue el balón?: ",4),e.createElementVNode("div",D2,[e.createElementVNode("div",{class:"controls-zone-container-title-checkcon-label",style:e.normalizeStyle(t.widthContainer<=440?"font-size: 12px;":"#2e3b46")}," Todas las zonas ",4),e.createElementVNode("div",v2,[e.createVNode(e.unref(Y),{label:"",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":i.value,"onUpdate:modelValue":s},null,8,["model-value"])])])]),e.createElementVNode("div",R2,[(e.openBlock(),e.createElementBlock("svg",O2,[e.createElementVNode("rect",{onClick:m[0]||(m[0]=y=>c(1)),class:"sector-field",x:"0.347042",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(1)?"#FFFF0030":"#2e3b46"},null,8,z2),e.createElementVNode("rect",{onClick:m[1]||(m[1]=y=>c(9)),class:"sector-field",x:"288.347",y:"0.347042",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(9)?"#FFFF0030":"#2e3b46"},null,8,U2),e.createElementVNode("rect",{onClick:m[2]||(m[2]=y=>c(17)),class:"sector-field",x:"0.347042",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(17)?"#FFFF0030":"#2e3b46"},null,8,j2),e.createElementVNode("rect",{onClick:m[3]||(m[3]=y=>c(25)),class:"sector-field",x:"288.347",y:"44.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(25)?"#FFFF0030":"#2e3b46"},null,8,H2),e.createElementVNode("rect",{onClick:m[4]||(m[4]=y=>c(26)),class:"sector-field",x:"0.347042",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(26)?"#FFFF0030":"#2e3b46"},null,8,W2),e.createElementVNode("rect",{onClick:m[5]||(m[5]=y=>c(27)),class:"sector-field",x:"91.347",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(27)?"#FFFF0030":"#2e3b46"},null,8,G2),e.createElementVNode("rect",{onClick:m[6]||(m[6]=y=>c(28)),class:"sector-field",x:"157.015",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(28)?"#FFFF0030":"#2e3b46"},null,8,$2),e.createElementVNode("rect",{onClick:m[7]||(m[7]=y=>c(29)),class:"sector-field",x:"222.679",y:"88.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(29)?"#FFFF0030":"#2e3b46"},null,8,q2),e.createElementVNode("rect",{onClick:m[8]||(m[8]=y=>c(30)),class:"sector-field",x:"288.347",y:"88.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(30)?"#FFFF0030":"#2e3b46"},null,8,Y2),e.createElementVNode("rect",{onClick:m[9]||(m[9]=y=>c(31)),class:"sector-field",x:"0.347042",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(31)?"#FFFF0030":"#2e3b46"},null,8,Z2),e.createElementVNode("rect",{onClick:m[10]||(m[10]=y=>c(32)),class:"sector-field",x:"91.347",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(32)?"#FFFF0030":"#2e3b46"},null,8,J2),e.createElementVNode("rect",{onClick:m[11]||(m[11]=y=>c(33)),class:"sector-field",x:"157.015",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(33)?"#FFFF0030":"#2e3b46"},null,8,K2),e.createElementVNode("rect",{onClick:m[12]||(m[12]=y=>c(34)),class:"sector-field",x:"222.679",y:"132.347",width:"65.9726",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(34)?"#FFFF0030":"#2e3b46"},null,8,X2),e.createElementVNode("rect",{onClick:m[13]||(m[13]=y=>c(35)),class:"sector-field",x:"288.347",y:"132.347",width:"91.3059",height:"44.3059",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(35)?"#FFFF0030":"#2e3b46"},null,8,Q2),e.createElementVNode("rect",{onClick:m[14]||(m[14]=y=>c(2)),class:"sector-field",x:"91.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(2)?"#FFFF0030":"#2e3b46"},null,8,ey),e.createElementVNode("rect",{onClick:m[15]||(m[15]=y=>c(3)),class:"sector-field",x:"114.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(3)?"#FFFF0030":"#2e3b46"},null,8,ty),e.createElementVNode("rect",{onClick:m[16]||(m[16]=y=>c(4)),class:"sector-field",x:"137.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(4)?"#FFFF0030":"#2e3b46"},null,8,ay),e.createElementVNode("rect",{onClick:m[17]||(m[17]=y=>c(5)),class:"sector-field",x:"172.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(5)?"#FFFF0030":"#2e3b46"},null,8,oy),e.createElementVNode("rect",{onClick:m[18]||(m[18]=y=>c(6)),class:"sector-field",x:"207.347",y:"0.347042",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(6)?"#FFFF0030":"#2e3b46"},null,8,ly),e.createElementVNode("rect",{onClick:m[19]||(m[19]=y=>c(7)),class:"sector-field",x:"242.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(7)?"#FFFF0030":"#2e3b46"},null,8,ry),e.createElementVNode("rect",{onClick:m[20]||(m[20]=y=>c(8)),class:"sector-field",x:"265.347",y:"0.347042",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(8)?"#FFFF0030":"#2e3b46"},null,8,iy),e.createElementVNode("rect",{onClick:m[21]||(m[21]=y=>c(10)),class:"sector-field",x:"91.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(10)?"#FFFF0030":"#2e3b46"},null,8,ny),e.createElementVNode("rect",{onClick:m[22]||(m[22]=y=>c(11)),class:"sector-field",x:"114.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(11)?"#FFFF0030":"#2e3b46"},null,8,sy),e.createElementVNode("rect",{onClick:m[23]||(m[23]=y=>c(12)),class:"sector-field",x:"137.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(12)?"#FFFF0030":"#2e3b46"},null,8,dy),e.createElementVNode("rect",{onClick:m[24]||(m[24]=y=>c(13)),class:"sector-field",x:"172.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(13)?"#FFFF0030":"#2e3b46"},null,8,cy),e.createElementVNode("rect",{onClick:m[25]||(m[25]=y=>c(14)),class:"sector-field",x:"207.347",y:"29.6804",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(14)?"#FFFF0030":"#2e3b46"},null,8,py),e.createElementVNode("rect",{onClick:m[26]||(m[26]=y=>c(15)),class:"sector-field",x:"242.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(15)?"#FFFF0030":"#2e3b46"},null,8,my),e.createElementVNode("rect",{onClick:m[27]||(m[27]=y=>c(16)),class:"sector-field",x:"265.347",y:"29.6804",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(16)?"#FFFF0030":"#2e3b46"},null,8,uy),e.createElementVNode("rect",{onClick:m[28]||(m[28]=y=>c(18)),class:"sector-field",x:"91.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(18)?"#FFFF0030":"#2e3b46"},null,8,fy),e.createElementVNode("rect",{onClick:m[29]||(m[29]=y=>c(19)),class:"sector-field",x:"114.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(19)?"#FFFF0030":"#2e3b46"},null,8,hy),e.createElementVNode("rect",{onClick:m[30]||(m[30]=y=>c(20)),class:"sector-field",x:"137.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(20)?"#FFFF0030":"#2e3b46"},null,8,yy),e.createElementVNode("rect",{onClick:m[31]||(m[31]=y=>c(21)),class:"sector-field",x:"172.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(21)?"#FFFF0030":"#2e3b46"},null,8,gy),e.createElementVNode("rect",{onClick:m[32]||(m[32]=y=>c(22)),class:"sector-field",x:"207.347",y:"59.0137",width:"35.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(22)?"#FFFF0030":"#2e3b46"},null,8,by),e.createElementVNode("rect",{onClick:m[33]||(m[33]=y=>c(23)),class:"sector-field",x:"242.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(23)?"#FFFF0030":"#2e3b46"},null,8,_y),e.createElementVNode("rect",{onClick:m[34]||(m[34]=y=>c(24)),class:"sector-field",x:"265.347",y:"59.0137",width:"23.3059",height:"29.6392",stroke:"#9ECF55","stroke-width":"0.694084","stroke-dasharray":"2 2",fill:r.value.includes(24)?"#FFFF0030":"#2e3b46"},null,8,Sy),Ey,wy,e.createElementVNode("mask",{id:n.value,style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"91",y:"88",width:"198",height:"25"},Vy,8,Cy),e.createElementVNode("g",{mask:`url(#${n.value})`},By,8,Ny),Ty,Fy]))]),e.withDirectives(e.createElementVNode("div",My,Py,512),[[e.vShow,!1]])]))}},Dy=J(Iy,[["__scopeId","data-v-378bf7e2"]]),Va=[{text:"Rematado con destino a portería",isSelected:!0,child:[{text:"Fue gol",isSelected:!0,categoryIds:[583,585,587,589]},{text:"No fue gol",isSelected:!0,categoryIds:[584,586,588,590]}]},{text:"Rematado sin destino a portería",isSelected:!0,categoryIds:[122,128,136,142]},{text:"Ganados por portero rival",isSelected:!0,categoryIds:[123,129,137,143]},{text:"Ganados por jugador rival",isSelected:!0,categoryIds:[124,130,138,144]},{text:"Sin destino",isSelected:!0,categoryIds:[125,131,139,145]}],vy={class:"what-happened"},Ry={class:"what-happened__all"},Oy={class:"what-happened__filters"},zy={key:0,class:"what-happened__filters__filter__composed"},Uy={class:"what-happened__filters__filter__composed__main"},jy={key:1,class:"what-happened__filters__filter__single"},Hy={__name:"TemplateWhatHappened",props:{isFemale:{type:Boolean,default:!1},whatHappenedFilters:{type:Array,default:()=>[...Va]}},emits:["change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.computed(()=>l.whatHappenedFilters.reduce((p,f)=>(f.child?f.child.forEach(u=>{u.isSelected&&p++}):f.isSelected&&p++,p),0)),r=e.computed(()=>l.whatHappenedFilters.reduce((p,f)=>(f.child?p+=f.child.length:p++,p),0)),n=e.computed(()=>i.value===r.value),s=e.computed(()=>i.value===1);e.watch(()=>l.whatHappenedFilters,p=>{o("change-filters-selected",i.value),o("update:filters",p)},{deep:!0,immediate:!0});function c(p){l.whatHappenedFilters.forEach(f=>{p?(f.isSelected=p,f.child&&f.child.forEach(u=>{u.isSelected=p})):f.child?(f.isSelected=!0,f.child.forEach(u=>{u.isSelected=!0})):f.isSelected=!1})}function d(p,f){f.isSelected=p,f.child.forEach(u=>{u.isSelected=p})}function h(p,f,u){u.isSelected=p,f.isSelected=f.child.every(g=>g.isSelected)}function m(p,f){f.isSelected=p}function y(){l.whatHappenedFilters.forEach(p=>{p.child?p.child.forEach(f=>{f.isSelected=!0}):p.isSelected=!0})}return a({onResetFilters:y}),(p,f)=>(e.openBlock(),e.createElementBlock("div",vy,[e.createElementVNode("div",Ry,[e.createVNode(e.unref(Y),{label:"Todos","model-value":n.value,"box-position":"right","onUpdate:modelValue":c},null,8,["model-value"])]),e.createElementVNode("div",Oy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.whatHappenedFilters,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"what-happened__filters__filter"},[u.child?(e.openBlock(),e.createElementBlock("div",zy,[e.createElementVNode("div",Uy,[e.createVNode(e.unref(Y),{"model-value":u.isSelected,label:t.isFemale?u.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):u.text,"avoid-interaction":s.value&&u.isSelected,"onUpdate:modelValue":V=>d(V,u)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.child,(V,B)=>(e.openBlock(),e.createElementBlock("div",{key:`c${B}`,class:"what-happened__filters__filter__composed__child"},[e.createVNode(e.unref(Y),{"model-value":V.isSelected,label:t.isFemale?V.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):V.text,"avoid-interaction":s.value&&V.isSelected,"onUpdate:modelValue":v=>h(v,u,V)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]))),128))])):(e.openBlock(),e.createElementBlock("div",jy,[e.createVNode(e.unref(Y),{"model-value":u.isSelected,label:t.isFemale?u.text.replace("Ganados por portero rival","Ganados por portera rival").replace("Ganados por jugador rival","Ganados por jugadora rival"):u.text,"avoid-interaction":s.value&&u.isSelected,"onUpdate:modelValue":V=>m(V,u)},null,8,["model-value","label","avoid-interaction","onUpdate:modelValue"])]))]))),128))])]))}},Wy=J(Hy,[["__scopeId","data-v-8f375a1a"]]),Na={isMoment:!1,isMomentOnly:!1,results:{final:[{name:"Partidos ganados",value:1,isSelected:!0},{name:"Partidos perdidos",value:2,isSelected:!0},{name:"Partidos empatados",value:3,isSelected:!0}],moment:[{name:"Iba ganando",value:1,isSelected:!0},{name:"Iba perdiendo",value:2,isSelected:!0},{name:"Iba empatando",value:3,isSelected:!0}]}},kl=t=>(e.pushScopeId("data-v-ee3b28d3"),t=t(),e.popScopeId(),t),Gy={class:"template-results"},$y={class:"template-results__type-switch"},qy=kl(()=>e.createElementVNode("div",{class:"template-results__type-switch__label"},"Final",-1)),Yy=kl(()=>e.createElementVNode("div",{class:"template-results__type-switch__label"},"Al momento",-1)),Zy={class:"template-results__info"},Jy={key:0,class:"template-results__group"},Ky={key:1,class:"template-results__group"},Xy={__name:"TemplateResultsByTime",props:{resultsFilters:{type:Object,default:()=>({...Na})}},emits:["update:resultsFilters","change-filters-selected","update:filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(null),r=e.computed(()=>{const c=i.value.isMoment?i.value.results.moment.filter(d=>d.isSelected).length:i.value.results.final.filter(d=>d.isSelected).length;return o("change-filters-selected",c),c}),n=e.computed(()=>i.value.isMoment?"Resultado al momento del cobro":"Resultado al final del partido");e.watch(()=>l.resultsFilters,c=>{i.value===null&&(i.value={...c})},{deep:!0,immediate:!0}),e.watch(i,c=>{o("update:filters",c)},{deep:!0,immediate:!0});function s(){i.value.isMoment=!1,i.value.results.moment.forEach(c=>{c.isSelected=!0}),i.value.results.final.forEach(c=>{c.isSelected=!0})}return a({removeFilters:s}),(c,d)=>(e.openBlock(),e.createElementBlock("div",Gy,[e.withDirectives(e.createElementVNode("div",$y,[qy,e.createVNode(at,{modelValue:i.value.isMoment,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.isMoment=h)},null,8,["modelValue"]),Yy],512),[[e.vShow,!i.value.isMomentOnly]]),e.createElementVNode("div",Zy,e.toDisplayString(n.value),1),i.value.isMoment?(e.openBlock(),e.createElementBlock("div",Jy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.results.moment,(h,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:h.isSelected,"onUpdate:modelValue":y=>h.isSelected=y,label:h.name,"avoid-interaction":r.value===1&&h.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))])):(e.openBlock(),e.createElementBlock("div",Ky,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.results.final,(h,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"template-results__result"},[e.createVNode(e.unref(Y),{modelValue:h.isSelected,"onUpdate:modelValue":y=>h.isSelected=y,label:h.name,"avoid-interaction":r.value===1&&h.isSelected},null,8,["modelValue","onUpdate:modelValue","label","avoid-interaction"])]))),128))]))]))}},Qy=J(Xy,[["__scopeId","data-v-ee3b28d3"]]),eg=t=>(e.pushScopeId("data-v-6f640dee"),t=t(),e.popScopeId(),t),tg={key:0,class:"productivity__header__text"},ag={key:0},og=eg(()=>e.createElementVNode("span",null,"mínimo 5 categorías y máximo 12",-1)),lg={key:1},rg={key:2},ig={key:1,class:"productivity__header__checkbox"},ng={class:"templates__body"},sg={key:0,class:"templates-plays"},dg={key:1,class:"templates-productivity"},cg={key:2,class:"template-field"},pg={key:3,class:"template-details"},mg={key:4,class:"template-personal-data"},ug={key:5,class:"template-leagues"},fg={key:6,class:"template-plays"},hg={key:7,class:"template-plays"},yg={key:8,class:"template-universe"},gg={key:9,class:"template-distance"},bg={key:10,class:"template-results"},_g={key:11,class:"template-results-by-type"},Sg={key:12,class:"template-games"},Eg={key:13,class:"template-taken-corners"},wg={key:14,class:"template-videos"},Cg={key:15,class:"template-how-was-corner"},kg={key:16,class:"template-zone"},Vg={key:17,class:"template-what-happened"},Ng={key:1,class:"templates__footer"},xg={class:"templates__footer__button"},Bg={class:"templates__footer__button"},Tg={__name:"GSC-FilterTemplates",props:{filterType:{type:String,default:""},width:{type:String,default:"100%"},maxWidth:{type:String,default:"100%"},productivityMaxCategories:{type:Number,default:5},productivityMinCategories:{type:Number,default:0},productivityCategories:{type:[Object,null],default:()=>null},playsCategories:{type:[Object,null],default:()=>null},fieldAreas:{type:[Array,null],default:()=>[]},playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},statisticType:{type:String,default:"total"},isStatisticTypeVisible:{type:Boolean,default:!1},isPlayingAsHidden:{type:Boolean,default:!1},isFromTemplates:{type:Boolean,default:!1},isForTemplateForm:{type:Boolean,default:!1},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},isFemale:{type:Boolean,default:!1},tournaments:{type:Array,default:()=>[]},playsGolstatsCategories:{type:Array,default:()=>[]},universeFilters:{type:Object,default:()=>({minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(t,a)=>a+1),statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}})},zoneFilters:{type:Array,default:()=>[]},whatHappenedFilters:{type:Array,default:()=>[]},personalDataFilters:{type:Object,default:()=>({})},distanceFilters:{type:Object,default:()=>({minValue:5,maxValue:30,minLimit:5,maxLimit:30})},resultsFilters:{type:Object,default:()=>({})},resultsByTimeFilters:{type:Object,default:()=>({})},gamesFilters:{type:Array,default:()=>[]},takenCornersFilters:{type:Array,default:()=>[]},howWasCornerFilters:{type:Object,default:()=>({})},awaitForFilters:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#2E3B46"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"rgba(255, 255, 255, 0)"},borderWidth:{type:String,default:"1px"},boxShadow:{type:String,default:"0 14px 28px 0 rgba(0, 0, 0, 0.25)"},padding:{type:String,default:"20px"},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:String,default:"1px"},textColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"'Poppins-Regular'"},isExpansionMode:{type:Boolean,default:!0},isFooterVisible:{type:Boolean,default:!1},isFooterCancelOnly:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},isScouting:{type:Boolean,default:!1},fieldComponentProps:{type:Object,default:()=>{}},season:{type:Object,default:()=>({})},token:{type:String,default:""},modalHeight:{type:String,default:"fit-content"},isOneTournamentOnly:{type:Boolean,default:!1},defaultTournamentId:{type:Number,default:1}},emits:["change-categories-selected","change-filters-selected","change-universe-filters","change-field-areas","apply","click-cancel","update:filters","total-filters"],setup(t,{expose:a,emit:o}){const l=t,i=e.ref(null),r=e.ref(!1),n=e.ref({playingAs:l.playingAs,gameSections:l.gameSections,statisticType:l.statisticType}),s=e.ref({areYellowCardsSelected:!1,areRedCardsSelected:!1,areFoulsCommittedSelected:!1}),c=e.ref(null),d=e.ref(null),h=e.ref(null),m=e.ref(null),y=e.ref(null),p=e.computed(()=>({"--width":l.width,"--max-width":l.maxWidth,"--background-color":l.backgroundColor,"--border-radius":l.borderRadius,"--border-color":l.borderColor,"--border-width":l.borderWidth,"--box-shadow":l.boxShadow,"--padding":l.filterType!==b.VIDEOS?l.isExpansionMode?"10px 0":l.padding:"0","--footer-border-color":l.footerBorderColor,"--footer-border-width":l.footerBorderWidth,"--text-color":l.textColor})),f=e.computed(()=>{const S=[];return l.productivityCategories&&Object.values(l.productivityCategories).forEach(x=>{x.categories&&x.categories.forEach($=>{S.push($)})}),S}),u=e.computed(()=>{const S=[];return l.playsCategories&&Object.values(l.playsCategories).forEach(x=>{x.categories&&x.categories.forEach($=>{S.push($)})}),S}),g=e.computed(()=>{const S=f.value.filter(x=>x.isSelected);return Z(S),l.filterType===b.PRODUCTIVITY&&o("change-categories-selected",S.length),S.length}),V=e.computed(()=>g.value>=l.productivityMaxCategories),B=e.computed(()=>g.value<=l.productivityMinCategories),v=e.computed(()=>l.isPlayingAsHidden?l.gameSections:l.playingAs.concat(l.gameSections));e.watch(n,S=>{l.filterType===b.DETAILS&&o("update:filters",S)},{immediate:!0,deep:!0}),e.watch(()=>v.value,S=>{if(l.filterType===b.DETAILS){const x=S.filter($=>$.isSelected);o("change-filters-selected",x.length)}},{immediate:!0,deep:!0}),e.watch(()=>l.playsGolstatsCategories,S=>{if(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS){const x=S.filter($=>$.isSelected);o("change-filters-selected",x.length)}},{immediate:!0}),e.watch(()=>l.fieldAreas,S=>{l.filterType===b.FIELD&&o("change-filters-selected",S.length)}),e.watch(u,()=>{l.filterType===b.PLAYS&&A()},{immediate:!0,deep:!0}),e.watch(f,()=>{l.filterType===b.PRODUCTIVITY&&q()},{immediate:!0,deep:!0}),e.watch(()=>l.resultsFilters,S=>{l.filterType===b.RESULTS&&o("change-filters-selected",S.results.filter(x=>x.isSelected).length)},{immediate:!0,deep:!0});function Z(S){setTimeout(()=>{S.sort((x,$)=>x.priority-$.priority),S.forEach((x,$)=>{x.priority=$+1})},10)}function U(S=null){O(S)}function O(S=null){l.filterType===b.PRODUCTIVITY?f.value.forEach(x=>{x.isSelected=!1}):l.filterType===b.PLAYS?(u.value.forEach(x=>{x.isSelected=!0}),r.value=!0):l.filterType===b.FIELD?o("change-field-areas",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]):l.filterType===b.DETAILS?(l.playingAs.forEach(x=>{x.isSelected=!0}),l.gameSections.forEach(x=>{x.isSelected=!0})):l.filterType===b.TOURNAMENTS?(l.tournaments.forEach((x,$)=>{l.isOneTournamentOnly?x.isSelected=$===0:x.isSelected=!0}),o("change-filters-selected",0)):l.filterType===b.PLAYS_TYPES?l.playsGolstatsCategories.forEach(x=>{x.isSelected=!0}):l.filterType===b.GOLSTATS?l.playsGolstatsCategories.forEach(x=>{x.isSelected=!1}):l.filterType===b.UNIVERSE?c.value&&c.value.resetFilters():l.filterType===b.PERSONAL_DATA?(i.value&&i.value.onClearFilters(S||ie.All),o("change-personal-data-filters",{})):l.filterType===b.DISTANCE?o("update:filters",{minValue:l.distanceFilters.minLimit,maxValue:l.distanceFilters.maxLimit}):l.filterType===b.RESULTS?o("update:filters",{results:l.resultsFilters.results.map(x=>(x.isSelected=!0,x))}):l.filterType===b.RESULTS_BY_TIME?y.value&&y.value.removeFilters():l.filterType===b.GAMES?l.gamesFilters.forEach(x=>{x.isSelected=!0}):l.filterType===b.TAKEN_CORNERS?d.value.clearFilters():l.filterType===b.HOW_WAS_CORNER?(l.howWasCornerFilters.left.forEach(x=>{x.isSelected=!0}),l.howWasCornerFilters.right.forEach(x=>{x.isSelected=!0})):l.filterType===b.ZONE?h.value&&h.value.clearFilters():l.filterType===b.WHAT_HAPPENED&&m.value&&m.value.onResetFilters()}function Q(S){l.filterType===b.TOURNAMENTS&&o("change-filters-selected",S)}function K(S){l.filterType===b.UNIVERSE&&o("change-universe-filters",S)}function F(S){l.filterType===b.FIELD&&o("change-field-areas",S)}function T(S){l.filterType===b.GOLSTATS&&o("change-filters-selected",S)}function E(S){o("change-filters-selected",S)}function M(S){l.filterType===b.PRODUCTIVITY?f.value.forEach(x=>{x.isSelected=S}):(r.value=S,l.playsCategories.offensive.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.defensive.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.possession.categories.forEach(x=>{x.isSelected=S}),l.playsCategories.offenses.categories.forEach(x=>{x.isSelected=S}))}function A(){let S=0;const x={playsCategories:u.value.filter($=>$.isSelected)};r.value=x.playsCategories.length===u.value.length,S=x.playsCategories.length,Object.values(s.value).forEach($=>{$&&S++}),o("change-filters-selected",S),o("update:filters",x)}function q(){let S=0;const x={productivityFilters:f.value.filter($=>$.isSelected),offensesConditions:s.value};S=x.productivityFilters.length,Object.values(s.value).forEach($=>{$&&S++}),o("change-filters-selected",S),o("update:filters",x)}function te(){o("apply")}function de(){(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS)&&l.playsGolstatsCategories&&l.playsGolstatsCategories.forEach(S=>{S.isSelected=!1}),l.filterType===b.PRODUCTIVITY&&f.value.forEach(S=>{S.isSelected=!1}),o("apply")}function re(S){o("update:filters",S)}function N(S){l.filterType===b.PERSONAL_DATA&&o("update:filters",S)}function L(S){l.filterType===b.TOURNAMENTS&&o("update:filters",S)}function R(S){(l.filterType===b.PLAYS_TYPES||l.filterType===b.GOLSTATS)&&o("update:filters",S)}function w(S){l.filterType===b.PRODUCTIVITY&&(s.value=S,q())}function I(S){l.filterType===b.DISTANCE&&o("update:filters",S)}function j(S){l.filterType===b.RESULTS&&o("update:filters",S)}function z(S){l.filterType===b.GAMES&&(o("update:filters",S),o("change-filters-selected",S.filter(x=>x.isSelected).length))}function P(S){n.value.statisticType=S}const _=e.computed(()=>l.filterType===b.PLAYS?u.value.length:l.filterType===b.PRODUCTIVITY?f.value.length:l.filterType===b.FIELD?16:l.filterType===b.UNIVERSE?6:l.filterType===b.DETAILS?8:l.filterType===b.RESULTS||l.filterType===b.RESULTS_BY_TIME?3:l.filterType===b.GAMES?l.gamesFilters.length:0);return o("total-filters",_),a({clearFilters:U}),(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"templates",style:e.normalizeStyle(p.value)},[t.filterType===e.unref(b).PRODUCTIVITY||t.filterType===e.unref(b).PLAYS?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.isExpansionMode?"productivity__header__expansion":"productivity__header")},[t.filterType===e.unref(b).PRODUCTIVITY?(e.openBlock(),e.createElementBlock("div",tg,[t.isFromTemplates?(e.openBlock(),e.createElementBlock("div",ag,[e.createTextVNode(" Elige tipo de jugadas: "),og])):t.isForTemplateForm?(e.openBlock(),e.createElementBlock("div",lg,"Tipo de participación")):(e.openBlock(),e.createElementBlock("div",rg,"Selecciona hasta 5 categorias en orden de importancia"))])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PLAYS||t.isForTemplateForm?(e.openBlock(),e.createElementBlock("div",ig,[e.createVNode(e.unref(Y),{label:t.isForTemplateForm?"Seleccionar todas":"Todos los tipos de jugadas","box-position":t.isForTemplateForm?"right":"left",fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":r.value,"label-color":t.textColor,"onUpdate:modelValue":M},null,8,["label","box-position","model-value","label-color"])])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",ng,[t.filterType===e.unref(b).PLAYS?(e.openBlock(),e.createElementBlock("div",sg,[e.createVNode(rf,{"plays-categories":t.playsCategories,"is-expansion-mode":t.isExpansionMode},null,8,["plays-categories","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PRODUCTIVITY?(e.openBlock(),e.createElementBlock("div",dg,[e.createVNode(Qs,{"productivity-categories":t.productivityCategories,"number-of-categories-selected":g.value,"are-max-categories-reached":V.value,"are-min-categories-reached":B.value,"is-expansion-mode":t.isExpansionMode,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"onUpdate:offensesConditions":w},null,8,["productivity-categories","number-of-categories-selected","are-max-categories-reached","are-min-categories-reached","is-expansion-mode","is-from-templates","is-for-template-form"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).FIELD?(e.openBlock(),e.createElementBlock("div",cg,[e.createVNode(e.unref(Io),e.mergeProps(t.fieldComponentProps,{"background-color":t.backgroundColor,value:t.fieldAreas,"onUpdate:modelValue":F}),null,16,["background-color","value"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).DETAILS?(e.openBlock(),e.createElementBlock("div",pg,[e.createVNode(Fd,{"is-playing-as-hidden":t.isPlayingAsHidden,"playing-as":t.playingAs,"game-sections":t.gameSections,"font-gamily":t.fontFamily,"is-statistic-type-visible":t.isStatisticTypeVisible,"statistic-type":t.statisticType,onChangeStatisticType:P},null,8,["is-playing-as-hidden","playing-as","game-sections","font-gamily","is-statistic-type-visible","statistic-type"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PERSONAL_DATA?(e.openBlock(),e.createElementBlock("div",mg,[e.createVNode(ju,{"is-female":t.isFemale,ref_key:"templatePersonalData",ref:i,"personal-data-filters":t.personalDataFilters,season:t.season,"is-seleccion":t.isSeleccion,"is-scouting":t.isScouting,token:t.token,filters:t.personalDataFilters,"onUpdate:filters":N},null,8,["is-female","personal-data-filters","season","is-seleccion","is-scouting","token","filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).TOURNAMENTS?(e.openBlock(),e.createElementBlock("div",ug,[e.createVNode(Dd,{tournaments:t.tournaments,"is-one-tournament-only":t.isOneTournamentOnly,"default-tournament-id":t.defaultTournamentId,onChangeFiltersSelected:Q,"onUpdate:filters":L},null,8,["tournaments","is-one-tournament-only","default-tournament-id"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).PLAYS_TYPES?(e.openBlock(),e.createElementBlock("div",fg,[e.createVNode(bo,{height:t.modalHeight,type:t.filterType,categories:t.playsGolstatsCategories,"onUpdate:filters":R},null,8,["height","type","categories"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).GOLSTATS?(e.openBlock(),e.createElementBlock("div",hg,[e.createVNode(bo,{height:t.modalHeight,type:t.filterType,categories:t.playsGolstatsCategories,onChangeFiltersSelected:T,"onUpdate:filters":R},null,8,["height","type","categories"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).UNIVERSE?(e.openBlock(),e.createElementBlock("div",yg,[e.createVNode(Mc,{ref_key:"templateUniverse",ref:c,"universe-filters":t.universeFilters,"onUpdate:universeFilters":K},null,8,["universe-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).DISTANCE?(e.openBlock(),e.createElementBlock("div",gg,[e.createVNode(Xc,{distance:t.distanceFilters,"onUpdate:distanceFilters":I},null,8,["distance"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).RESULTS?(e.openBlock(),e.createElementBlock("div",bg,[e.createVNode(df,{ref_key:"templateResults",ref:y,"results-filters":t.resultsFilters,"onUpdate:resultsFilters":j},null,8,["results-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).RESULTS_BY_TIME?(e.openBlock(),e.createElementBlock("div",_g,[e.createVNode(Qy,{ref_key:"templateResults",ref:y,"results-filters":t.resultsByTimeFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["results-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).GAMES?(e.openBlock(),e.createElementBlock("div",Sg,[e.createVNode(rp,{"games-filters":t.gamesFilters,"onUpdate:gamesFilters":z},null,8,["games-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).TAKEN_CORNERS?(e.openBlock(),e.createElementBlock("div",Eg,[e.createVNode(g2,{"is-female":t.isFemale,ref_key:"templateTakenCorners",ref:d,"taken-corners-filters":t.takenCornersFilters,"is-expansion-mode":t.isExpansionMode,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["is-female","taken-corners-filters","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).VIDEOS?(e.openBlock(),e.createElementBlock("div",wg,[e.createVNode(Q0,{token:t.token},null,8,["token"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).HOW_WAS_CORNER?(e.openBlock(),e.createElementBlock("div",Cg,[e.createVNode(L2,{"how-was-corner-filters":t.howWasCornerFilters,"is-expansion-mode":t.isExpansionMode,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["how-was-corner-filters","is-expansion-mode"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).ZONE?(e.openBlock(),e.createElementBlock("div",kg,[e.createVNode(Dy,{ref_key:"templateZone",ref:h,"zone-filters":t.zoneFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["zone-filters"])])):e.createCommentVNode("",!0),t.filterType===e.unref(b).WHAT_HAPPENED?(e.openBlock(),e.createElementBlock("div",Vg,[e.createVNode(Wy,{"is-female":t.isFemale,ref_key:"templateWhatHappened",ref:m,"what-happened-filters":t.whatHappenedFilters,onChangeFiltersSelected:E,"onUpdate:filters":re},null,8,["is-female","what-happened-filters"])])):e.createCommentVNode("",!0)]),t.isFooterVisible?(e.openBlock(),e.createElementBlock("div",Ng,[t.isFooterCancelOnly?(e.openBlock(),e.createBlock(e.unref(gt),{key:0,"text-value":"Cancelar","font-size":"12px",height:"22px",width:"72px","border-radius":"62px","border-width":.8,"border-color":"white","background-color":"rgba(255, 255, 255, 0.06)",onClick:de})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",xg,[t.isForTemplateForm?(e.openBlock(),e.createBlock(e.unref(gt),{key:0,"text-value":"Cancelar","font-size":"12px","font-color":"rgba(255,255,255,0.7)","text-decoration":"underline",onClick:de})):(e.openBlock(),e.createBlock(e.unref(gt),{key:1,"text-value":"Quitar filtros","font-size":"12px","font-color":"rgba(255,255,255,0.7)","text-decoration":"underline",onClick:O}))]),e.createElementVNode("div",Bg,[e.createVNode(e.unref(gt),{"text-value":"Listo","font-size":"12px",height:"22px",width:"72px","border-radius":"62px","border-width":.8,"border-color":"#cbee6b",onClick:te})])],64))])):e.createCommentVNode("",!0)],4))}},Vl=J(Tg,[["__scopeId","data-v-6f640dee"]]),Fg=(t,a)=>{const o=t.__vccOpts||t;for(const[l,i]of a)o[l]=i;return o},Mg={__name:"GSC-Menu",props:{menuMarginTop:{type:Number,default:0,validator(t){return!Number.isNaN(t)}},modelValue:{type:Boolean,default:!1},width:{type:String,default:"fit-content"},menuWidth:{type:String,default:"fit-content"},zIndexOpen:{type:Number,default:3},leftMenu:{type:String,default:"unset"}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t;e.useCssVars(p=>({"398d9242":t.width,f164e302:c.value,"4bb88040":t.menuWidth}));const l=e.ref(null),i=e.ref(!1),r=e.ref(null),n=e.ref({}),s=e.computed(()=>{const p={top:"0px","--left-menu":o.leftMenu};if(l.value){const f=l.value.getBoundingClientRect();p.top=`${f.height+o.menuMarginTop}px`}return p}),c=e.computed(()=>i.value?o.zIndexOpen:1);e.watch(()=>o.modelValue,p=>{p!==i.value&&(i.value=p)},{immediate:!0}),e.watch(i,p=>{p||setTimeout(()=>{n.value["--translate-x"]="0px"},500)});function d(p){const f=window.innerWidth,u=p.boundingClientRect.x,g=p.boundingClientRect.x+p.boundingClientRect.width,V=u<=0?Math.abs(u)+4:g>=f?f-(g+10):0;n.value["--translate-x"]=`${V}px`}function h(){new IntersectionObserver(p=>{p[0].intersectionRatio>0&&d(p[0])}).observe(r.value)}function m(){i.value=!i.value,a("update:modelValue",i.value)}function y(){i.value=!1,a("update:modelValue",i.value)}return e.onMounted(()=>{e.nextTick(()=>{h()})}),(p,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:"menu-overlay",onClick:y})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"menu-container",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",{ref_key:"trigger",ref:l,class:"menu-container__trigger",onClick:m},[e.renderSlot(p.$slots,"trigger",{},void 0,!0)],512),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"menu",ref:r,class:"menu-container__menu",style:e.normalizeStyle(s.value)},[e.renderSlot(p.$slots,"menu",{},void 0,!0)],4),[[e.vShow,i.value]])]),_:3})],4)],64))}},Ag=Fg(Mg,[["__scopeId","data-v-18c0df61"]]),De=t=>(e.pushScopeId("data-v-2504d135"),t=t(),e.popScopeId(),t),Lg={key:0,class:"button__icon"},Pg={key:0,width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ig=["stroke"],Dg=["stroke"],vg=["stroke"],Rg={key:1,width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Og=["stroke"],zg=["stroke"],Ug=["fill"],jg={key:2,width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Hg=["fill"],Wg={key:3,width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Gg=["stroke"],$g=["stroke"],qg=["stroke"],Yg=["stroke"],Zg=["stroke"],Jg={key:4,width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Kg=De(()=>e.createElementVNode("path",{d:"M1.85113 13.0897C1.9303 13.2137 2.01739 13.3404 2.10447 13.4617C2.30239 13.7361 2.51878 14 2.74837 14.2507C3.74589 15.3298 5.01785 16.1504 6.41385 16.5963C6.4719 16.6148 6.52996 16.6332 6.58802 16.6491C6.60385 16.6544 6.61704 16.657 6.63024 16.6623C6.70413 16.6834 6.77538 16.7045 6.84927 16.723C7.54859 16.9077 8.27429 17 9.00264 17C9.73098 17 10.4593 16.9077 11.1586 16.7256C11.3064 16.686 11.4542 16.6438 11.5967 16.5989C11.9187 16.496 12.2353 16.372 12.5414 16.2322C12.7895 16.1187 13.0296 15.9921 13.2645 15.8549C14.2963 15.2533 15.2041 14.438 15.9034 13.467C15.9668 13.3799 16.0301 13.2876 16.0908 13.1926C16.1119 13.1609 16.133 13.1293 16.1541 13.095C16.9432 11.8681 17.405 10.4486 17.4868 8.98945C17.4947 8.84169 17.5 8.69393 17.5 8.54618C17.5 8.53034 17.5 8.51715 17.5 8.50132C17.5 6.90765 17.0646 5.37995 16.2386 4.04222C16.1198 3.85224 15.9932 3.66491 15.8612 3.48021C15.8586 3.47493 15.8559 3.4723 15.8533 3.46702C15.8084 3.40633 15.7636 3.34565 15.7161 3.2876C15.6712 3.22955 15.6237 3.1715 15.5789 3.1161C14.6526 1.98417 13.4466 1.10818 12.0928 0.580475C11.9556 0.525066 11.8105 0.474934 11.668 0.42744C10.8103 0.145118 9.91307 0 9.00264 0C8.09221 0 7.19497 0.14248 6.33732 0.424802C6.19482 0.472295 6.04967 0.525066 5.91245 0.577836C4.55604 1.10554 3.35005 1.98417 2.42378 3.11346C2.37364 3.17678 2.32086 3.24011 2.27072 3.30607C2.2285 3.35884 2.18892 3.41161 2.14933 3.46702C2.14933 3.46702 2.14933 3.46966 2.14669 3.4723C2.14669 3.47493 2.14405 3.47757 2.14142 3.48021C1.43418 4.44591 0.94598 5.53034 0.69792 6.68074C0.660975 6.85224 0.626669 7.02639 0.600279 7.20053C0.571251 7.39578 0.547501 7.59103 0.531667 7.78892C0.521111 7.91293 0.513195 8.03694 0.507917 8.16095C0.502639 8.27441 0.5 8.38786 0.5 8.50132V8.61214C0.502639 8.73615 0.507917 8.8628 0.513195 8.98945C0.595002 10.4486 1.05681 11.8681 1.84586 13.0923L1.85113 13.0897ZM1.82738 7.64908C1.82738 7.63325 1.83002 7.62005 1.83266 7.60422C1.84322 7.52771 1.85377 7.45119 1.86433 7.37731C1.86433 7.36412 1.86697 7.35092 1.86961 7.33773C1.8828 7.25594 1.89863 7.1715 1.91447 7.08971C1.91711 7.07124 1.92238 7.05541 1.92502 7.03694C1.94086 6.95778 1.95933 6.87599 1.9778 6.79683V6.78628C1.99891 6.70449 2.02266 6.62269 2.04378 6.5409C2.04905 6.52243 2.05433 6.5066 2.05961 6.48813C2.08336 6.40897 2.10711 6.32718 2.1335 6.24802L2.14142 6.22164C2.16517 6.14776 2.19156 6.07652 2.21794 6.00264C2.22322 5.98681 2.23114 5.97098 2.23642 5.95515C2.26545 5.87863 2.29711 5.79947 2.32878 5.72559C2.33406 5.70976 2.34197 5.69657 2.34725 5.68338C2.37628 5.61478 2.40795 5.54617 2.43962 5.47757C2.44489 5.46702 2.45017 5.45383 2.45545 5.44063C2.48975 5.36676 2.5267 5.29024 2.56628 5.21636C2.5742 5.20053 2.58212 5.1847 2.59267 5.16887C2.63226 5.09499 2.6692 5.02375 2.71143 4.94987V4.94195H2.7167L3.2656 6.63061L1.82738 7.67546C1.82738 7.67546 1.82738 7.65699 1.83002 7.64908H1.82738ZM4.08367 7.6095L5.62745 8.31926L6.52204 11.0712L5.62481 12.1108H2.74309C2.23642 11.2348 1.92238 10.2612 1.81683 9.25594L4.08367 7.6095ZM7.58026 1.41161C7.65942 1.39578 7.74123 1.37995 7.8204 1.36675C7.84151 1.36412 7.86262 1.35884 7.88109 1.3562C7.96026 1.34301 8.03679 1.33245 8.11596 1.32454C8.13971 1.3219 8.16346 1.31926 8.18721 1.31662C8.24791 1.30871 8.30596 1.30343 8.36666 1.29815C8.39305 1.29815 8.42207 1.29288 8.44846 1.29024C8.52235 1.28496 8.59361 1.27968 8.6675 1.27705C8.69916 1.27705 8.73347 1.27441 8.76514 1.27177C8.82319 1.27177 8.88125 1.26913 8.94194 1.26913C8.98153 1.26913 9.01847 1.26913 9.05806 1.26913C9.11611 1.26913 9.17681 1.26913 9.23487 1.27177C9.26653 1.27177 9.30084 1.27177 9.33251 1.27705C9.4064 1.27968 9.48029 1.28496 9.55154 1.29024C9.58057 1.29024 9.60696 1.29551 9.63334 1.29815C9.69404 1.30343 9.75473 1.30871 9.81279 1.31662C9.83654 1.31926 9.86029 1.3219 9.88668 1.32454C9.96585 1.33509 10.045 1.34565 10.1215 1.3562L10.1849 1.36675C10.264 1.37995 10.3459 1.39314 10.425 1.41161C10.4277 1.41161 10.4303 1.41161 10.4356 1.41161H10.4382L9 2.45646L7.56178 1.41161H7.56442C7.56442 1.41161 7.5697 1.41161 7.57234 1.41161H7.58026ZM9.00528 6.56728L11.1138 8.10026L10.3089 10.5805H7.70165L6.89677 8.10026L9.00528 6.56728ZM15.3018 4.94459V4.94987C15.3466 5.02111 15.3862 5.09499 15.4232 5.16887L15.4469 5.21636C15.4839 5.29024 15.5208 5.36676 15.5577 5.44063C15.563 5.45119 15.5683 5.46438 15.5736 5.47493C15.6052 5.54354 15.6369 5.61214 15.6659 5.68338C15.6712 5.69657 15.6791 5.7124 15.6844 5.72559C15.7161 5.80211 15.7478 5.87863 15.7768 5.95778C15.7821 5.97361 15.79 5.98945 15.7953 6.00528C15.8216 6.07916 15.848 6.1504 15.8718 6.22428C15.8744 6.23219 15.8771 6.24011 15.8797 6.25066C15.9061 6.32982 15.9298 6.40897 15.9536 6.49077C15.9589 6.50923 15.9641 6.52771 15.9694 6.54618C15.9905 6.62797 16.0143 6.70976 16.0328 6.78892C16.0328 6.7942 16.0328 6.79683 16.0328 6.80211C16.0512 6.88127 16.0697 6.96042 16.0855 7.03958L16.0961 7.09235C16.1119 7.17414 16.1278 7.25594 16.141 7.33773C16.141 7.35092 16.1462 7.36412 16.1462 7.37731C16.1568 7.45119 16.1673 7.52771 16.1779 7.60422C16.1779 7.62005 16.1805 7.63325 16.1832 7.64908C16.1832 7.65699 16.1832 7.66755 16.1858 7.67546L14.7476 6.63061L15.2965 4.93931L15.3018 4.94459ZM13.9295 7.61214L16.1937 9.25858C16.0882 10.2639 15.7715 11.2401 15.2675 12.1135H12.3858L11.4912 11.0739L12.3858 8.3219L13.9295 7.61214ZM14.3306 13.3879C14.3306 13.3879 14.3254 13.3931 14.3227 13.3958C14.2673 13.4565 14.2093 13.5172 14.1512 13.5752C14.138 13.5884 14.1248 13.6016 14.1116 13.6148C14.0536 13.6728 13.9929 13.7309 13.9322 13.7889C13.9216 13.7995 13.9111 13.81 13.8979 13.8206C13.8424 13.8707 13.7844 13.9235 13.729 13.971C13.7184 13.9789 13.7079 13.9894 13.6973 14C13.634 14.0554 13.5706 14.1055 13.5047 14.1583C13.4888 14.1715 13.473 14.1821 13.4598 14.1953C13.3938 14.2454 13.3278 14.2955 13.2619 14.3456C13.2619 14.3456 13.2566 14.3483 13.2566 14.3509C13.188 14.4011 13.1194 14.4486 13.0481 14.496C13.0323 14.5066 13.0165 14.5172 12.998 14.5277C12.9294 14.5726 12.8581 14.6174 12.7895 14.6623C12.7763 14.6702 12.7658 14.6781 12.7526 14.6834C12.6892 14.723 12.6233 14.7599 12.5573 14.7968C12.5441 14.8048 12.5283 14.8127 12.5151 14.8206C12.4438 14.8602 12.3699 14.8997 12.296 14.9367C12.2802 14.9446 12.2617 14.9525 12.2459 14.9631C12.1746 15 12.1007 15.0343 12.0295 15.0686C12.0242 15.0686 12.0189 15.0739 12.0137 15.0765H12.0084L12.5573 13.3879H14.3306ZM6.00217 15.0765L5.98898 15.0712C5.91509 15.0369 5.8412 15 5.76731 14.9631C5.75147 14.9551 5.73564 14.9472 5.71981 14.9393C5.64592 14.9024 5.57203 14.8628 5.49814 14.8206C5.48494 14.8127 5.47175 14.8048 5.45855 14.7995C5.39258 14.7625 5.32661 14.723 5.26063 14.6834C5.25008 14.6781 5.23688 14.6702 5.22633 14.6623C5.15508 14.6201 5.08646 14.5726 5.01521 14.5277C4.99938 14.5172 4.98355 14.5066 4.96771 14.496C4.89646 14.4486 4.82785 14.4011 4.75924 14.3509H4.75396C4.68799 14.2982 4.61937 14.248 4.5534 14.1953C4.53757 14.1821 4.52437 14.1715 4.50854 14.1583C4.44256 14.1055 4.37923 14.0554 4.3159 14C4.30534 13.9894 4.29478 13.9815 4.28159 13.971C4.22353 13.9208 4.16812 13.8707 4.1127 13.8206C4.10214 13.81 4.08895 13.7995 4.07839 13.7889C4.0177 13.7335 3.957 13.6755 3.89894 13.6148C3.88575 13.6016 3.87256 13.5884 3.85936 13.5752C3.8013 13.5172 3.74589 13.4591 3.69047 13.3984C3.68783 13.3958 3.68519 13.3931 3.67991 13.3879H5.45328L6.00217 15.0765C6.00217 15.0765 5.99954 15.0765 5.9969 15.0765H6.00217ZM7.50636 15.5726L6.63552 12.8971L7.53012 11.8602H10.4804L11.375 12.8971L10.5042 15.5726C9.52251 15.7784 8.48805 15.781 7.50373 15.5726H7.50636ZM14.3755 3.66755L13.4809 6.41953L11.9371 7.12929L9.6439 5.46174V3.57784L11.9503 1.90237C12.8713 2.31135 13.6999 2.91557 14.3781 3.66755H14.3755ZM6.06287 1.90237L8.3693 3.57784V5.46174L6.07606 7.12929L4.53229 6.41953L3.63769 3.66755C4.3159 2.91557 5.14452 2.31398 6.06551 1.90237H6.06287Z",fill:"#979DA2"},null,-1)),Xg=[Kg],Qg={key:5,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e3=De(()=>e.createElementVNode("path",{d:"M17.182 5.9a.538.538 0 0 0-.13-.416L14.24 2.109a.558.558 0 0 0-.433-.203h-2.25c-.017 0-.034.012-.056.012a.557.557 0 0 0-.563.41 1.68 1.68 0 0 1-1.63 1.266 1.68 1.68 0 0 1-1.632-1.266.55.55 0 0 0-.563-.41c-.017 0-.033-.012-.056-.012h-2.25a.558.558 0 0 0-.433.203L1.561 5.484a.586.586 0 0 0-.129.416c.017.152.09.287.208.382l2.605 2.082v8.167c0 .31.253.563.562.563h9c.31 0 .563-.253.563-.563V8.364l2.604-2.082a.59.59 0 0 0 .208-.382zm-3.937 4.444H5.37V9.78h7.875v.563zM5.37 15.969v-4.5h7.875v4.5H5.37zm9-9.045v-.518a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v2.25H5.37v-2.25a.564.564 0 0 0-.563-.562.564.564 0 0 0-.562.562v.518L2.793 5.765l2.278-2.734h1.66A2.802 2.802 0 0 0 9.307 4.72a2.803 2.803 0 0 0 2.576-1.688h1.66l2.278 2.734-1.451 1.159z",fill:"#98A2B3"},null,-1)),t3=[e3],a3={key:6,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o3=De(()=>e.createElementVNode("path",{d:"M15.426 3.353a2.384 2.384 0 0 0-2.381 2.381 2.384 2.384 0 0 0 2.381 2.382 2.384 2.384 0 0 0 2.381-2.382 2.384 2.384 0 0 0-2.381-2.38zm0 3.766a1.386 1.386 0 0 1-1.385-1.385c0-.763.622-1.384 1.385-1.384s1.385.621 1.385 1.384c0 .764-.622 1.385-1.385 1.385zM1.424 6.558a.497.497 0 0 0 .704 0l1.295-1.296L4.72 6.558a.497.497 0 0 0 .704 0 .498.498 0 0 0 0-.705L4.128 4.558l1.295-1.295a.498.498 0 0 0-.705-.705L3.423 3.853 2.128 2.558a.499.499 0 0 0-.704.705l1.295 1.295-1.295 1.295a.498.498 0 0 0 0 .705zM13.013 12.443a.498.498 0 0 0-.705 0l-1.295 1.295-1.295-1.295a.499.499 0 0 0-.704.704l1.295 1.295-1.295 1.295a.499.499 0 0 0 .704.705l1.295-1.295 1.295 1.295a.497.497 0 0 0 .705 0 .498.498 0 0 0 0-.705l-1.295-1.295 1.295-1.295a.498.498 0 0 0 0-.704zM12.052 5.455l-2.01-1.747a.498.498 0 0 0-.654.753l1.066.926c-3.145.411-5.008 2.055-6.043 3.444a9.569 9.569 0 0 0-1.501 3.012 2.384 2.384 0 0 0-2.103 2.364 2.384 2.384 0 0 0 2.381 2.381 2.384 2.384 0 0 0 2.381-2.381 2.385 2.385 0 0 0-1.647-2.265 8.674 8.674 0 0 1 1.312-2.547C6.53 7.674 8.33 6.66 10.594 6.372l-.992 1.142a.498.498 0 0 0 .752.654l1.747-2.01a.498.498 0 0 0-.05-.703zm-7.48 8.752c0 .763-.62 1.384-1.384 1.384a1.386 1.386 0 0 1-1.384-1.384c0-.764.62-1.385 1.384-1.385.763 0 1.385.622 1.385 1.385z",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":".3"},null,-1)),l3=[o3],r3={key:7,width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i3=De(()=>e.createElementVNode("rect",{x:".707",y:".9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),n3=De(()=>e.createElementVNode("rect",{x:"8.707",y:".9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),s3=De(()=>e.createElementVNode("rect",{x:".707",y:"8.9",width:"5.2",height:"5.2",rx:".8",fill:"#98A2B3",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),d3=De(()=>e.createElementVNode("rect",{x:"8.707",y:"8.9",width:"5.2",height:"5.2",rx:".8",stroke:"#98A2B3","stroke-width":"1.2"},null,-1)),c3=[i3,n3,s3,d3],p3={key:8,width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m3=e.createStaticVNode('<g clip-path="url(#gpdeo9cu3a)" fill="#98A2B3" data-v-2504d135><path d="M9.307.5C4.505.5.598 4.407.598 9.209c0 2 .69 3.938 1.946 5.486l-.754 3.159a.524.524 0 0 0 .727.599l3.038-1.384a8.743 8.743 0 0 0 3.752.848c4.802 0 8.709-3.907 8.709-8.708C18.016 4.407 14.109.5 9.307.5zm0 16.368a7.574 7.574 0 0 1-3.502-.845.525.525 0 0 0-.457-.011l-2.289 1.042.566-2.372a.524.524 0 0 0-.113-.465A7.657 7.657 0 0 1 1.647 9.21c0-4.224 3.436-7.66 7.66-7.66s7.66 3.436 7.66 7.66c0 4.223-3.436 7.66-7.66 7.66z" data-v-2504d135></path><path d="M9.68 5.199c-1.094-.115-2.459.397-3.041 1.797a.524.524 0 0 0 .968.403c.375-.902 1.255-1.231 1.964-1.157.721.075 1.232.542 1.365 1.25.13.693-.136 1.097-1.097 1.662-1.042.613-1.372.874-1.372 2.27a.524.524 0 0 0 1.049 0c0-.479.033-.715.118-.843.094-.14.33-.283.737-.523.666-.392 1.905-1.12 1.596-2.76-.221-1.171-1.098-1.975-2.288-2.1zM9.145 12.673a.608.608 0 0 0-.506.17c-.13.13-.19.31-.17.505a.525.525 0 0 0 .939.263.523.523 0 0 0-.263-.938z" data-v-2504d135></path></g><defs data-v-2504d135><clipPath id="gpdeo9cu3a" data-v-2504d135><path fill="#fff" transform="translate(.307 .5)" d="M0 0h18v18H0z" data-v-2504d135></path></clipPath></defs>',2),u3=[m3],f3={class:"button__text"},h3={key:0,class:"info-container"},y3={key:1,style:{width:"20px"}},g3={width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b3=["fill"],_3={__name:"ButtonFilter",props:{isActive:{type:Boolean,default:!1},showBadge:{type:Boolean,default:!0},showBadgeOnFilterFull:{type:Boolean,default:!0},text:{type:String,default:""},infoValue:{type:[String,Number],default:""},filtersTotal:{type:Number,default:0},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"14px"},fontColor:{type:String,default:"white"},infoBackgroundColor:{type:String,default:"#424D58"},infoFontColor:{type:String,default:"#CBEE6B"},infoFontFamily:{type:String,default:"sans-serif"},infoFontSize:{type:String,default:"10px"},infoBorderColor:{type:String,default:"#0D1D29"},infoBorderRadius:{type:String,default:"4px"},infoHeight:{type:String,default:"20px"},infoWidth:{type:String,default:"20px"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#0D1D29"},borderRadius:{type:String,default:"8px"},borderColor:{type:String,default:"#172531"},borderColorActive:{type:String,default:"white"},borderWidth:{type:String,default:"1px"},padding:{type:String,default:"12px"},arrowColor:{type:String,default:"#92929D"},iconColor:{type:String,default:"#92929D"},iconType:{type:String,default:"productivity"},showIcon:{type:Boolean,default:!0}},setup(t){const a=t,o=e.computed(()=>({"--height":a.height,"--width":a.width,"--text-font-family":a.textFontFamily,"--text-font-size":a.textFontSize,"--background-color":a.backgroundColor,"--border-radius":a.borderRadius,"--border-color":a.isActive?a.borderColorActive:a.borderColor,"--border-width":a.borderWidth,"--padding":a.padding,"--font-color":a.fontColor})),l=e.computed(()=>({"--info-background-color":a.infoValue?a.infoBackgroundColor:"transparent","--info-border-color":a.infoValue?a.infoBorderColor:"transparent","--info-border-radius":a.infoBorderRadius,"--info-font-family":a.infoFontFamily,"--info-font-size":a.infoFontSize,"--info-font-color":a.infoFontColor,"--info-height":a.infoHeight,"--info-width":a.infoWidth})),i=e.computed(()=>[b.PLAYS_TYPES,b.GOLSTATS,b.TOURNAMENTS,b.PLAYS,b.RESULTS,b.RESULTS_BY_TIME].includes(a.iconType)),r=e.computed(()=>[b.FIELD,b.GAMES].includes(a.iconType)),n=e.computed(()=>[b.DETAILS,b.UNIVERSE].includes(a.iconType)),s=e.computed(()=>[b.PERSONAL_DATA].includes(a.iconType)),c=e.computed(()=>[b.PRODUCTIVITY].includes(a.iconType)),d=e.computed(()=>[b.HOW_WAS_CORNER].includes(a.iconType)),h=e.computed(()=>[b.TAKEN_CORNERS].includes(a.iconType)),m=e.computed(()=>[b.ZONE].includes(a.iconType)),y=e.computed(()=>[b.WHAT_HAPPENED].includes(a.iconType));return(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"button",style:e.normalizeStyle(o.value)},[t.showIcon?(e.openBlock(),e.createElementBlock("div",Lg,[s.value?(e.openBlock(),e.createElementBlock("svg",Pg,[e.createElementVNode("path",{d:"M12.6665 16.0001V14.3334C12.6665 13.4494 12.3153 12.6015 11.6902 11.9764C11.0651 11.3513 10.2173 11.0001 9.33323 11.0001H4.33329C3.44925 11.0001 2.60141 11.3513 1.9763 11.9764C1.35119 12.6015 1 13.4494 1 14.3334V16.0001",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ig),e.createElementVNode("path",{d:"M6.83329 7.66658C8.67422 7.66658 10.1666 6.17422 10.1666 4.33329C10.1666 2.49237 8.67422 1 6.83329 1C4.99237 1 3.5 2.49237 3.5 4.33329C3.5 6.17422 4.99237 7.66658 6.83329 7.66658Z",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Dg),e.createElementVNode("path",{d:"M15.164 5.16663V10.1666M17.664 7.66659H12.6641",stroke:t.iconColor,"stroke-opacity":"1","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,vg)])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("svg",Rg,[e.createElementVNode("path",{d:"M11.3464 15.7091C13.2744 15.7091 14.8373 14.1462 14.8373 12.2182C14.8373 10.2902 13.2744 8.72729 11.3464 8.72729C9.4184 8.72729 7.85547 10.2902 7.85547 12.2182C7.85547 14.1462 9.4184 15.7091 11.3464 15.7091Z",stroke:t.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Og),e.createElementVNode("path",{d:"M15.9996 16.8727L14.8359 15.7091",stroke:t.iconColor,"stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,zg),e.createElementVNode("path",{d:"M1.74545 14.1136H5.57341C5.80365 14.6432 6.11192 15.1265 6.4797 15.5591H1.74545C0.85957 15.5591 0.15 14.8495 0.15 13.9636V1.74545C0.15 0.85957 0.85957 0.15 1.74545 0.15H13.9636C14.8495 0.15 15.5591 0.85957 15.5591 1.74545V8.27117C15.1619 7.74472 14.6701 7.28299 14.1136 6.90213V1.74545V1.59545H13.9636H1.74545H1.59545V1.74545V13.9636V14.1136H1.74545ZM3.64091 3.64091H12.0682V5.08636H3.64091V3.64091ZM3.64091 7.13182H7.39844C6.87199 7.52898 6.41026 8.02079 6.0294 8.57727H3.64091V7.13182ZM3.64091 10.6227H5.20065C5.12651 11.0081 5.08636 11.3945 5.08636 11.7818V12.0682H3.64091V10.6227Z",fill:t.iconColor,stroke:"#353F47","stroke-width":"0.3"},null,8,Ug)])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("svg",jg,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 0C13.1944 0 17 3.80558 17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0ZM8.49751 1.54553C4.65662 1.54553 1.54297 4.65919 1.54297 8.50008C1.54297 12.341 4.65662 15.4546 8.49751 15.4546C12.3384 15.4546 15.4521 12.341 15.4521 8.50008C15.4521 4.65919 12.3384 1.54553 8.49751 1.54553ZM8.49929 3.09082C8.92605 3.09082 9.27202 3.43678 9.27202 3.86355V8.12198L12.451 10.5945C12.7878 10.8565 12.8485 11.342 12.5865 11.6789C12.3245 12.0157 11.839 12.0764 11.5022 11.8144L8.02488 9.10986C7.83666 8.96347 7.72656 8.73837 7.72656 8.49991V3.86355C7.72656 3.43678 8.07252 3.09082 8.49929 3.09082Z",fill:t.iconColor},null,8,Hg)])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",Wg,[e.createElementVNode("rect",{x:"1.16772",y:"1.16699",width:"19",height:"15.6667",stroke:t.iconColor},null,8,Gg),e.createElementVNode("rect",{x:"16.1677",y:"6.16699",width:"4",height:"5.66667",stroke:t.iconColor},null,8,$g),e.createElementVNode("rect",{x:"1.16772",y:"6.16699",width:"4",height:"5.66667",stroke:t.iconColor},null,8,qg),e.createElementVNode("path",{d:"M10.6677 0.666992V16.5003",stroke:t.iconColor},null,8,Yg),e.createElementVNode("path",{d:"M13.5033 9.00032C13.5033 10.5651 12.2348 11.8337 10.67 11.8337C9.1052 11.8337 7.83667 10.5651 7.83667 9.00032C7.83667 7.43552 9.1052 6.16699 10.67 6.16699C12.2348 6.16699 13.5033 7.43552 13.5033 9.00032Z",stroke:t.iconColor},null,8,Zg)])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",Jg,Xg)):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("svg",Qg,t3)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("svg",a3,l3)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",r3,c3)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",p3,u3)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",f3,e.toDisplayString(t.text),1),t.showBadge?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.showBadgeOnFilterFull?(e.openBlock(),e.createElementBlock("div",h3,[e.createElementVNode("div",{class:"button__info",style:e.normalizeStyle(l.value)},[e.withDirectives(e.createElementVNode("span",null,e.toDisplayString(t.infoValue),513),[[e.vShow,t.infoValue]])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.filtersTotal>0&&t.filtersTotal!=parseInt(t.infoValue)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"button__info",style:e.normalizeStyle(l.value)},[e.withDirectives(e.createElementVNode("span",null,e.toDisplayString(t.infoValue),513),[[e.vShow,t.infoValue]])],4)):t.filtersTotal>0?(e.openBlock(),e.createElementBlock("div",y3)):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["button__arrow",{"rotated-180":t.isActive}])},[(e.openBlock(),e.createElementBlock("svg",g3,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:t.arrowColor},null,8,b3)]))],2)],4))}},S3=J(_3,[["__scopeId","data-v-2504d135"]]),E3=(t,a)=>{const o=t.__vccOpts||t;for(const[l,i]of a)o[l]=i;return o},w3=t=>(e.pushScopeId("data-v-0ca35abc"),t=t(),e.popScopeId(),t),C3={class:"panel__activator__icon"},k3=["src"],V3={class:"panel__activator__text"},N3=["height","width"],x3=["stroke"],B3={class:"panel__content"},T3=w3(()=>e.createElementVNode("div",{class:"panel__content__separator"},null,-1)),F3={class:"panel__content__slot"},M3={__name:"GSC-ExpansionPanel",props:{modelValue:{type:Boolean,default:!1},text:{type:String,default:""},textColor:{type:String,default:"white"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"12px"},icon:{type:String,default:""},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#2E3A45"},borderRadius:{type:String,default:"4px"},borderWidth:{type:String,default:"1px"},borderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},arrowColor:{type:String,default:"white"},separatorWidth:{type:String,default:"100%"},separatorColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},panelPadding:{type:String,default:"0px 6px"}},emits:["update:modelValue"],setup(t,{emit:a}){const o=t,l=e.ref(o.modelValue),i=e.computed(()=>({"--activator-height":o.height,"--activator-text-font-family":o.textFontFamily,"--activator-text-font-size":o.textFontSize,"--activator-text-color":o.textColor,"--background-color":o.backgroundColor,"--panel-width":o.width,"--panel-padding":o.panelPadding,"--panel-border-radius":o.borderRadius,"--panel-border-color":o.borderColor,"--panel-border-width":o.borderWidth,"--arrow-height":o.arrowHeight,"--arrow-width":o.arrowWidth,"--separator-width":o.separatorWidth,"--separator-color":o.separatorColor}));e.watch(()=>o.modelValue,n=>{l.value=n},{immediate:!0});function r(){l.value=!l.value,a("update:modelValue",l.value)}return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:"panel",style:e.normalizeStyle(i.value)},[e.createElementVNode("div",{class:"panel__activator",onClick:r},[e.createElementVNode("div",C3,[o.icon?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.icon,alt:""},null,8,k3)):e.createCommentVNode("",!0)]),e.createElementVNode("div",V3,e.toDisplayString(t.text),1),e.createElementVNode("div",{class:e.normalizeClass(["panel__activator__arrow",{"rotated-180":l.value}])},[(e.openBlock(),e.createElementBlock("svg",{height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:t.arrowColor},null,8,x3)],8,N3))],2)]),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",B3,[T3,e.createElementVNode("div",F3,[e.renderSlot(n.$slots,"content",{},void 0,!0)])],512),[[e.vShow,l.value]])]),_:3})],4))}},A3=E3(M3,[["__scopeId","data-v-0ca35abc"]]),Ee={isPlayingAsHidden:!1,playingAs:[{name:"Local",isSelected:!0,value:1},{name:"Visitante",isSelected:!0,value:2}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}],statisticType:"total",isStatisticTypeVisible:!1},L3={offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!1,id:[12]},{name:"Asistencias",isSelected:!1,id:[10]},{name:"Participaciones en gol",isSelected:!1,id:[27]},{name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{name:"Centros por izquierda",isSelected:!1,id:[13]},{name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{name:"Centros por derecha",isSelected:!1,id:[25]},{name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},P3={offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:2},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:21},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]}},I3={minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(t,a)=>a+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},D3=[{name:"Sub-20",logo:null,isSelected:!0,id:44,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Clausura 2023",related_seasons:[{type:1,id:1752}],id:1713,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1592}],id:1542,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1521}],id:1486,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]},{name:"Tournoi Maurice Revello",logo:null,isSelected:!0,id:108,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Tournoi Maurice Revello 23",related_seasons:[],id:1770,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"FIFA World Cup",logo:null,isSelected:!0,id:33,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Copa del Mundo 2022",related_seasons:[],id:1512,type:0},{name:"Copa del Mundo 2018",related_seasons:[],id:881,type:0}]},{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Copa Oro",logo:null,isSelected:!0,id:29,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Copa Oro 2023",related_seasons:[],id:1741,type:0}]},{name:"Women Revelations Cup",logo:null,isSelected:!0,id:1137,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Women Revelations Cup 2023",related_seasons:[],id:1731,type:0}]},{name:"Leagues Cup",logo:null,isSelected:!0,id:1046,show_logos:0,tournament_type:1,tournament_status:0,seasons:[{name:"Leagues Cup 2023",related_seasons:[],id:1784,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]}],v3=[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Tiros a gol",isSelected:!1},{id:3,name:"Asistencias",isSelected:!1},{id:4,name:"Centros",isSelected:!1},{id:5,name:"Balones ganados en área propia",isSelected:!1},{id:6,name:"Participaciones en gol",isSelected:!1},{id:7,name:"Cabeceo area rival",isSelected:!1}],R3=[{id:1,name:"Mas goles anotados",isSelected:!1,value:1},{id:2,name:"Mas goles durante los ultimos 15 min de 2do tiempo",isSelected:!1,value:7},{id:3,name:"Con mas goles como visitante",isSelected:!1,value:3},{id:4,name:"Con mas goles como local",isSelected:!1,value:3},{id:5,name:"Mas goles durante el 1er tiempo",isSelected:!1,value:3},{id:6,name:"Mas goles durante el 2do tiempo",isSelected:!1,value:3},{id:7,name:"Mas goles como local durante el 2do tiempo",isSelected:!1,value:7}],O3={distance:{minValue:5,maxValue:30,minLimit:5,maxLimit:30}},Nl={results:[{name:"Partidos ganados",value:1,isSelected:!0},{name:"Partidos perdidos",value:2,isSelected:!0},{name:"Partidos empatados",value:3,isSelected:!0}]},z3={class:"filters"},U3={key:0,class:"filters__expansion"},j3={class:"content"},H3={key:1,class:"filters__menus"},W3={__name:"GSC-Filters",props:{filterType:{type:String,default:""},isFromTemplates:{type:Boolean,default:!1},isForTemplateForm:{type:Boolean,default:!1},isForTemplatesForm:{type:Boolean,default:!1},isExpansionPanel:{type:Boolean,default:!1},isFemale:{type:Boolean,default:!1},showBadgeOnFilterFull:{type:Boolean,default:!0},isScouting:{type:Boolean,default:!1},isSeleccion:{type:Boolean,default:!1},filters:{type:[Object,Array],default:()=>null},awaitForFilters:{type:Boolean,default:!1},menuButtonText:{type:String,default:""},expansionPanelText:{type:String,default:""},buttonFilterProps:{type:Object,default:()=>{}},expansionPanelProps:{type:Object,default:()=>{}},templateProps:{type:Object,default:()=>{}},fieldComponentProps:{type:Object,default:()=>{}},tournament:{type:Object,default:()=>null},season:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},width:{type:String,default:"fit-content"},modalHeight:{type:String,default:"fit-content"},isOneTournamentOnly:{type:Boolean,default:!1},defaultTournamentId:{type:Number,default:1},productivityMaxCategories:{type:Number,default:5},productivityMinCategories:{type:Number,default:0}},emits:["update:filters","apply","close"],setup(t,{expose:a,emit:o}){const l=t;e.useCssVars(_=>({"5e59eb26":t.width}));const i={width:"604px",maxWidth:"604px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PRODUCTIVITY,isFooterVisible:!0},r={width:"604px",maxWidth:"604px",padding:"0 20px 10px 20px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PLAYS,isFooterVisible:!0},n={width:"fit-content",maxWidth:"608px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.FIELD,isFooterVisible:!0},s={width:"320px",maxWidth:"320px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.DETAILS,isFooterVisible:!0},c={width:"246px",maxWidth:"246px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.TOURNAMENTS,isFooterVisible:!0},d={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PERSONAL_DATA,isFooterVisible:!0},h={width:"310px",modalHeight:l.modalHeight,maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.PLAYS_TYPES,isFooterVisible:!0,isFooterCancelOnly:!0},m={width:"380px",modalHeight:l.modalHeight,maxWidth:"380px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.GOLSTATS,isFooterVisible:!0,isFooterCancelOnly:!0},y={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.UNIVERSE,isFooterVisible:!0},p={width:"310px",maxWidth:"310px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.DISTANCE,isFooterVisible:!0},f={width:"250px",maxWidth:"250px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.RESULTS,padding:"0",isFooterVisible:!0},u={width:"250px",maxWidth:"250px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.RESULTS_BY_TIME,padding:"0",isFooterVisible:!0},g={width:"380px",maxWidth:"380px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.VIDEOS,isFooterVisible:!1},V={width:"300px",maxWidth:"300px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.GAMES,isFooterVisible:!0},B={width:"520px",maxWidth:"520px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.TAKEN_CORNERS,isFooterVisible:!0},v={width:"670px",maxWidth:"670px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.HOW_WAS_CORNER,isFooterVisible:!0},Z={width:"426px",maxWidth:"426px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.ZONE,isFooterVisible:!0},U={width:"285px",maxWidth:"285px",backgroundColor:"#2E3B46",borderRadius:"12px",filterType:b.WHAT_HAPPENED,isFooterVisible:!0},O=e.ref(!1),Q=e.ref(!1),K=e.ref(0),F=e.ref(0),T=e.ref({}),E=e.ref(null),M=e.ref(null),A=e.computed(()=>l.isForTemplateForm?"0":"unset"),q=e.computed(()=>l.buttonFilterProps&&l.buttonFilterProps.text?l.buttonFilterProps.text:l.menuButtonText||R()),te=e.computed(()=>l.isFromTemplates?b.RESULTS:l.filterType),de=e.computed(()=>l.expansionPanelText||R()),re=e.ref(null);e.watch(()=>l.filterType,_=>{if(_===b.PRODUCTIVITY)T.value={...i,...l.templateProps,productivityCategories:l.filters||L3};else if(_===b.PLAYS)T.value={...r,...l.templateProps,fontFamily:l.buttonFilterProps?l.buttonFilterProps.textFontFamily:"sans-serif",playsCategories:l.filters||P3};else if(_===b.FIELD)T.value={...n,...l.templateProps,fieldComponentProps:l.fieldComponentProps,fieldAreas:l.filters||[]};else if(_===b.DETAILS)T.value={...s,...l.templateProps,isPlayingAsHidden:l.filters?l.filters.isPlayingAsHidden:Ee.isPlayingAsHidden,playingAs:l.filters&&l.filters.playingAs||Ee.playingAs,gameSections:l.filters&&l.filters.gameSections||Ee.gameSections,statisticType:l.filters?l.filters.statisticType:Ee.statisticType,isStatisticTypeVisible:l.filters?l.filters.isStatisticTypeVisible:Ee.isStatisticTypeVisible};else if(_===b.TOURNAMENTS){const S=l.filters||D3;l.isOneTournamentOnly&&S.forEach(x=>{x.isSelected=x.id===l.defaultTournamentId}),T.value={...c,...l.templateProps,tournaments:S}}else _===b.PERSONAL_DATA?T.value={...d,...l.templateProps,token:l.token,awaitForFilters:l.awaitForFilters,personalDataFilters:l.filters}:_===b.PLAYS_TYPES?T.value={...h,...l.templateProps,playsGolstatsCategories:l.filters||v3}:_===b.GOLSTATS?T.value={...m,...l.templateProps,playsGolstatsCategories:l.filters||R3}:_===b.UNIVERSE?T.value={...y,...l.templateProps,universeFilters:l.filters||I3}:_===b.DISTANCE?T.value={...p,...l.templateProps,distanceFilters:l.filters||O3}:_===b.RESULTS?T.value={...f,...l.templateProps,resultsFilters:l.filters||Nl}:_===b.RESULTS_BY_TIME?T.value={...u,...l.templateProps,resultsByTimeFilters:l.filters||Na}:_===b.GAMES?T.value={...V,...l.templateProps,gamesFilters:l.filters||[]}:_===b.VIDEOS?T.value={...g,...l.templateProps,token:l.token}:_===b.TAKEN_CORNERS?T.value={...B,...l.templateProps,takenCornersFilters:l.filters||[]}:_===b.HOW_WAS_CORNER?T.value={...v,...l.templateProps,howWasCornerFilters:l.filters||Ca}:_===b.ZONE?T.value={...Z,...l.templateProps,zoneFilters:l.filters||[...lt]}:_===b.WHAT_HAPPENED&&(T.value={...U,...l.templateProps,whatHappenedFilters:l.filters||[...Va]});T.value.isExpansionMode=l.isExpansionPanel,l.isExpansionPanel&&(T.value.width="100%",T.value.maxWidth="100%")},{immediate:!0}),e.watch(()=>l.filters,()=>{if(l.filterType===b.PRODUCTIVITY)T.value={...i,...l.templateProps,productivityCategories:l.filters};else if(l.filterType===b.PLAYS)T.value={...r,...l.templateProps,playsCategories:l.filters};else if(l.filterType===b.FIELD)T.value={...n,...l.templateProps,fieldComponentProps:l.fieldComponentProps,fieldAreas:l.filters};else if(l.filterType===b.DETAILS)T.value={...s,...l.templateProps,isPlayingAsHidden:l.filters?l.filters.isPlayingAsHidden:Ee.isPlayingAsHidden,playingAs:l.filters?l.filters.playingAs:Ee.playingAs,gameSections:l.filters?l.filters.gameSections:Ee.gameSections,statisticType:l.filters?l.filters.statisticType:Ee.statisticType,isStatisticVisible:l.filters?l.filters.isStatisticVisible:Ee.isStatisticVisible};else if(l.filterType===b.TOURNAMENTS){const _=l.filters;l.isOneTournamentOnly&&_.forEach(S=>{S.isSelected=S.id===l.defaultTournamentId}),T.value={...c,...l.templateProps,tournaments:_}}else l.filterType===b.PERSONAL_DATA?T.value={...d,...l.templateProps,token:l.token,awaitForFilters:l.awaitForFilters,personalDataFilters:l.filters}:l.filterType===b.PLAYS_TYPES?T.value={...h,...l.templateProps,playsGolstatsCategories:l.filters}:l.filterType===b.GOLSTATS?T.value={...m,...l.templateProps,playsGolstatsCategories:l.filters}:l.filterType===b.UNIVERSE?T.value={...y,...l.templateProps,universeFilters:l.filters}:l.filterType===b.DISTANCE?T.value={...p,...l.templateProps,distanceFilters:l.filters}:l.filterType===b.RESULTS?T.value={...f,...l.templateProps,resultsFilters:l.filters||Nl}:l.filterType===b.RESULTS_BY_TIME?T.value={...u,...l.templateProps,resultsByTimeFilters:l.filters||Na}:l.filterType===b.GAMES?T.value={...V,...l.templateProps,gamesFilters:l.filters}:l.filterType===b.VIDEOS?T.value={...g,...l.templateProps,token:l.token}:l.filterType===b.TAKEN_CORNERS?T.value={...B,...l.templateProps,takenCornersFilters:l.filters||[]}:l.filterType===b.HOW_WAS_CORNER?T.value={...v,...l.templateProps,howWasCornerFilters:l.filters||Ca}:l.filterType===b.ZONE?T.value={...Z,...l.templateProps,zoneFilters:l.filters||[...lt]}:l.filterType===b.WHAT_HAPPENED&&(T.value={...U,...l.templateProps,whatHappenedFilters:l.filters||[...Va]});T.value.isExpansionMode=l.isExpansionPanel,l.isExpansionPanel&&(T.value.width="100%",T.value.maxWidth="100%")}),e.watch(O,_=>{_||o("close",re.value)}),e.watch(Q,_=>{_||o("close",re.value)});function N(_){K.value=_}function L(){l.isExpansionPanel?Q.value=!1:O.value=!1,o("apply",re.value)}function R(){if(l.filterType===b.PRODUCTIVITY)return l.isFromTemplates?"Tipos de jugadas":"Características de juego";if(l.filterType===b.PLAYS)return"Jugada(s)";if(l.filterType===b.FIELD)return"Zona de cancha";if(l.filterType===b.DETAILS)return"Detalles";if(l.filterType===b.TOURNAMENTS)return"Ligas";if(l.filterType===b.PERSONAL_DATA)return"Datos personales";if(l.filterType===b.PLAYS_TYPES)return"Tipos de jugada";if(l.filterType===b.GOLSTATS)return"Filtros Golstats";if(l.filterType===b.UNIVERSE)return"Universo";if(l.filterType===b.DISTANCE)return"Distancia";if([b.RESULTS,b.RESULTS_BY_TIME].includes(l.filterType))return"Resultados";if(l.filterType===b.GAMES)return"Partidos";if(l.filterType===b.VIDEOS)return"Videos";if(l.filterType===b.TAKEN_CORNERS)return"¿Quién cobró?";if(l.filterType===b.HOW_WAS_CORNER)return"¿Cómo fue cobrado?";if(l.filterType===b.ZONE)return"Zona";if(l.filterType===b.WHAT_HAPPENED)return"¿Qué sucedió?"}function w(_){T.value.fieldAreas=_,K.value=_.length,j(_)}function I(_){let S=0;_.value&&_.value.statistics&&(_.value.minutesPlayed&&S++,_.value.percentMinutesPlayed&&S++,_.value.lastMonths&&S++,_.value.statistics.totals&&S++,_.value.statistics.averagePerGame&&S++,_.value.statistics.averagePerMinute&&S++),T.value.universe=_.value,K.value=S,j(_.value)}function j(_){re.value=_,o("update:filters",_)}function z(_){F.value=_}function P(_=null){E.value&&E.value.clearFilters(_),M.value&&M.value.clearFilters(_)}return a({clearFilters:P}),(_,S)=>(e.openBlock(),e.createElementBlock("div",z3,[t.isExpansionPanel?(e.openBlock(),e.createElementBlock("div",U3,[e.createVNode(e.unref(A3),e.mergeProps(t.expansionPanelProps,{modelValue:Q.value,"onUpdate:modelValue":S[0]||(S[0]=x=>Q.value=x),text:de.value,"text-color":"rgba(255,255,255,.7)",icon:"/"+l.filterType+"-icon.png"}),{content:e.withCtx(()=>[e.createElementVNode("div",j3,[e.createVNode(Vl,e.mergeProps(T.value,{season:t.season,"is-female":t.isFemale,"is-expansion-mode":!0,"is-seleccion":t.isSeleccion,"is-one-tournament-only":t.isOneTournamentOnly,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"default-tournament-id":t.defaultTournamentId,"productivity-max-categories":t.productivityMaxCategories,"productivity-min-categories":t.productivityMinCategories,ref_key:"filterTemplateExpansionPanel",ref:M,onChangeFieldAreas:w,onChangeCategoriesSelected:N,onChangeFiltersSelected:N,onChangeUniverseFilters:I,onApply:L,"onUpdate:filters":j,onTotalFilters:z}),null,16,["season","is-female","is-seleccion","is-one-tournament-only","is-from-templates","is-for-template-form","default-tournament-id","productivity-max-categories","productivity-min-categories"])])]),_:1},16,["modelValue","text","icon"])])):(e.openBlock(),e.createElementBlock("div",H3,[e.createVNode(e.unref(Ag),{modelValue:O.value,"onUpdate:modelValue":S[1]||(S[1]=x=>O.value=x),width:t.width,"left-menu":A.value,"menu-margin-top":18},{trigger:e.withCtx(()=>[e.createVNode(S3,e.mergeProps(t.buttonFilterProps,{text:q.value,"show-badge-on-filter-full":t.showBadgeOnFilterFull,"info-value":K.value,"filters-total":F.value.value,"is-active":O.value,"icon-type":te.value}),null,16,["text","show-badge-on-filter-full","info-value","filters-total","is-active","icon-type"])]),menu:e.withCtx(()=>[e.createVNode(Vl,e.mergeProps(T.value,{season:t.season,"is-female":t.isFemale,"is-scouting":t.isScouting,"is-seleccion":t.isSeleccion,"is-one-tournament-only":t.isOneTournamentOnly,"default-tournament-id":t.defaultTournamentId,"is-from-templates":t.isFromTemplates,"is-for-template-form":t.isForTemplateForm,"productivity-max-categories":t.productivityMaxCategories,"productivity-min-categories":t.productivityMinCategories,ref_key:"filterTemplateMenu",ref:E,onChangeFieldAreas:w,onChangeCategoriesSelected:N,onChangeFiltersSelected:N,onChangeUniverseFilters:I,"onUpdate:filters":j,onTotalFilters:z,onApply:L}),null,16,["season","is-female","is-scouting","is-seleccion","is-one-tournament-only","default-tournament-id","is-from-templates","is-for-template-form","productivity-max-categories","productivity-min-categories"])]),_:1},8,["modelValue","width","left-menu"])]))]))}},xl=J(W3,[["__scopeId","data-v-a8b543ef"]]);function Bl(){return{backgroundColor:"#2e3b46",width:"98.9%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"30px",padding:"5px 2.2%",textFontFamily:"'Poppins-Regular'"}}const G3={name:"ModalCreatePlayList",components:{GSCFilters:xl},props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},userTeamId:{type:Number,default:1},teamId:{type:Number,required:!0},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0}},setup(t,{emit:a}){const o=e.ref(Bl()),l=e.ref(null),i=e.ref(1),r=e.ref({title:"",position:""}),n=e.ref(0),s=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"],[10,"Desconocida"]]),c=e.ref(!1),d=e.ref([]),h=e.ref([]),m=e.ref(!1),y=e.ref(new Set),p=e.ref({tournaments:[],personalData:[]}),f=e.ref(null),u=e.ref(!0),g=e.ref(!1),V=e.ref(""),B=e.ref(0),v="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",Z=()=>{l.value&&(n.value=l.value.offsetWidth)},U=w=>{document.body.style.overflow=w?"hidden":"auto"},O=e.ref(null),Q=()=>{Z(),t.isVisible&&U(!0)},K=()=>{i.value=1,r.value={title:"",position:""},O.value&&(O.value.clearFilters(ie.ALL),O.value.clearFilters(ie.AGE_RANGE),O.value.clearFilters(ie.YEAR),O.value.clearFilters(ie.NATIONALITY),O.value.clearFilters(ie.POSITION)),yt.forEach(w=>{w.isSelected=w.name==="Liga MX",w.seasons.forEach(I=>{I.isSelected=w.name==="Liga MX"})}),y.value.clear(),B.value++,V.value="",g.value=!1,u.value=!0,f.value=null,h.value=[],a("close")},F=()=>{if(i.value===1){if(!r.value.title||!r.value.position)return;i.value=2,u.value=!0,f.value=null}},T=async()=>{try{c.value=!0;const I=await X.create({headers:{Authorization:`${v}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/teams/${t.userTeamId}/templates?general=1`);d.value=I.data.data}catch(w){console.error("Error al cargar templates:",w)}finally{c.value=!1}};e.onMounted(()=>{T(),window.addEventListener("resize",Q)}),e.onUnmounted(()=>{window.removeEventListener("resize",Q),U(!1)}),e.watch(()=>t.isVisible,w=>{w?(i.value=1,setTimeout(Z,0),U(!0)):(i.value=1,U(!1))});const E=e.computed(()=>({...o.value})),M=async w=>{p.value.tournaments=w,q()},A=async w=>{p.value.personalData=w,q()},q=()=>{if(!f.value){u.value=!0;return}const w=JSON.stringify(p.value)!==JSON.stringify(f.value);u.value=w},te=async()=>{var w,I,j,z,P,_;if(u.value){g.value=!0;try{const S=p.value.tournaments.find(x=>x.isSelected===!0);if(S&&S.seasons.length>0){const x=S.seasons[0];m.value=!0,h.value=[];try{let ae=[...(await X.create({headers:{Authorization:`${v}`}}).get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${x.id}`)).data.players.map(D=>{var H;return{id:D.player_id,name:re(D.player_name),name_full:D.player_name,photo:D.player_photo||"https://golstatsimages.blob.core.windows.net/players-profile/default.png",position:s.get(D.position_id)||"No especificada",position_id:D.position_id||0,age:D.age||"-",dob:D.dob||"-",jersey:D.jersey||0,nationality:D.nationality||"",is_female:D.is_female,nationality_id:D.nationality_id||0,minutes_played:D.minutes_played||0,team_id:D.team_id,team:{logo:`https://golstatsimages.blob.core.windows.net/teams-80/${D.team_id}.png`,shortName:((H=D.team)==null?void 0:H.shortName)||"-",tournament:S.name||"No especificada"},isSelected:y.value.has(D.player_id)}})];if((w=p.value.personalData)!=null&&w.ageByRange&&(ae=ae.filter(D=>{const H=parseInt(D.age);return!isNaN(H)&&H>=p.value.personalData.ageByRange.min&&H<=p.value.personalData.ageByRange.max})),(I=p.value.personalData)!=null&&I.year){const D=p.value.personalData.year;ae=ae.filter(H=>H.dob?parseInt(H.dob.substring(0,4))===D:!1)}if(((z=(j=p.value.personalData)==null?void 0:j.nationalities)==null?void 0:z.length)>0){const D=p.value.personalData.nationalities.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.nationality_id)))}if(((_=(P=p.value.personalData)==null?void 0:P.positions)==null?void 0:_.length)>0){const D=p.value.personalData.positions.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.position_id)))}h.value=ae,f.value=JSON.parse(JSON.stringify(p.value)),u.value=!1}catch($){console.error("Error al obtener jugadores:",$),h.value=[]}finally{m.value=!1}}}catch(S){console.error("Error al procesar la búsqueda:",S),m.value=!1}}},de=w=>{y.value.has(w)?y.value.delete(w):y.value.add(w)},re=w=>{if(!w)return"-";const[I,j]=w.split(",").map(P=>P.trim());if(!j)return w;const z=I.split(" ")[0];return`${j[0]}. ${z}`};e.watch(i,w=>{w===2&&(g.value=!1,u.value=!0,f.value=null)});const N=e.computed(()=>{if(!V.value)return h.value;const w=V.value.toLowerCase().trim();return h.value.filter(I=>I.name_full.toLowerCase().includes(w))});return{modalContent:l,currentStep:i,playlistData:r,modalWidth:n,isLoading:c,templates:d,closeModal:K,handleNext:F,filterButtonProps:E,filtersTypes:b,onFiltersTournamentsTops:M,tournamentsToFilter:yt,onFiltersPersonalData:A,players:h,isLoadingPlayers:m,positions:s,isSearchButtonActive:u,handleSearch:te,handlePlayerSelection:de,selectedPlayers:y,hasSearched:g,searchQuery:V,filteredPlayers:N,clearSearch:()=>{V.value=""},handleCreatePlaylist:async()=>{try{const w=d.value.find(P=>P.id===parseInt(r.value.position)),I={user_id:t.userId,name:r.value.title,template:w,players:y.value.size>0?Array.from(y.value).map(P=>{const _=h.value.find(S=>S.id===P);return{player_id:P,name:_.name_full,position:_.position_id,dob:_.dob,team_id:_.team_id,jersey:_.jersey,nationality:_.nationality,is_female:_.is_female}}):[]},z=await X.create({headers:{Authorization:`${v}`}}).post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed`,I);(z.status===200||z.status===201)&&(a("playlist-created",z.data),K())}catch(w){console.error("Error al crear la playlist:",w)}},filterKey:B,personalDataFilter:O}}},$3={class:"modal-header"},q3={class:"title-section"},Y3={key:0,class:"modal-body"},Z3=["value"],J3={key:1,disabled:""},K3={key:1,class:"modal-body"},X3={class:"search-section"},Q3={class:"filters-row"},e4={class:"filter-container"},t4={class:"filter-container"},a4={class:"search-input"},o4={class:"players-table"},l4={class:"table-body"},r4={key:0,class:"loading-container"},i4={key:1,class:"no-results"},n4={key:2,class:"no-results"},s4={class:"cell checkbox-cell"},d4=["checked","onChange"],c4={class:"cell player-cell"},p4=["src"],m4={class:"cell team-cell"},u4=["src"],f4={class:"cell"},h4={class:"cell"},y4={class:"cell"},g4={class:"cell"},b4={class:"modal-footer"},_4={key:0,class:"buttons-container buttons-container-step1"},S4=["disabled"],E4={class:"selected-players-info"},w4={class:"bold"},C4={class:"buttons-container buttons-container-step2"};function k4(t,a,o,l,i,r){const n=e.resolveComponent("GSCFilters");return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[11]||(a[11]=(...s)=>l.closeModal&&l.closeModal(...s))},[e.createElementVNode("div",{class:"modal-content",onClick:a[10]||(a[10]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",$3,[e.createElementVNode("div",q3,[a[12]||(a[12]=e.createElementVNode("svg",{width:"29",height:"22",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.249 4.88982H1.56809C0.980641 4.88982 0.5 5.35635 0.5 5.92655C0.5 6.49675 0.980641 6.96327 1.56809 6.96327H12.249C12.8365 6.96327 13.3171 6.49675 13.3171 5.92655C13.3171 5.35635 12.8365 4.88982 12.249 4.88982ZM12.249 0.74292H1.56809C0.980641 0.74292 0.5 1.20945 0.5 1.77965C0.5 2.34984 0.980641 2.81637 1.56809 2.81637H12.249C12.8365 2.81637 13.3171 2.34984 13.3171 1.77965C13.3171 1.20945 12.8365 0.74292 12.249 0.74292ZM17.5895 9.03673V5.92655C17.5895 5.35635 17.1088 4.88982 16.5214 4.88982C15.9339 4.88982 15.4533 5.35635 15.4533 5.92655V9.03673H12.249C11.6616 9.03673 11.1809 9.50325 11.1809 10.0735C11.1809 10.6437 11.6616 11.1102 12.249 11.1102H15.4533V14.2204C15.4533 14.7906 15.9339 15.2571 16.5214 15.2571C17.1088 15.2571 17.5895 14.7906 17.5895 14.2204V11.1102H20.7937C21.3812 11.1102 21.8618 10.6437 21.8618 10.0735C21.8618 9.50325 21.3812 9.03673 20.7937 9.03673H17.5895ZM1.56809 11.1102H7.97664C8.5641 11.1102 9.04474 10.6437 9.04474 10.0735C9.04474 9.50325 8.5641 9.03673 7.97664 9.03673H1.56809C0.980641 9.03673 0.5 9.50325 0.5 10.0735C0.5 10.6437 0.980641 11.1102 1.56809 11.1102Z",fill:"#ffffff",stroke:"#0D1D29","stroke-width":"0.191682"})],-1)),e.createElementVNode("h2",null,e.toDisplayString(l.currentStep===1?"Crear nueva lista":"Agregar jugadores"),1)]),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...s)=>l.closeModal&&l.closeModal(...s))},a[13]||(a[13]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),l.currentStep===1?(e.openBlock(),e.createElementBlock("div",Y3,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=s=>l.playlistData.title=s),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=s=>l.playlistData.position=s),class:"select-position"},[a[14]||(a[14]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona un template para tu lista",-1)),l.isLoading?(e.openBlock(),e.createElementBlock("option",J3,"Cargando templates...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.templates,s=>(e.openBlock(),e.createElementBlock("option",{key:s.id,value:s.id},e.toDisplayString(s.name),9,Z3))),128))],512),[[e.vModelSelect,l.playlistData.position]])])):(e.openBlock(),e.createElementBlock("div",K3,[e.createElementVNode("div",X3,[e.createElementVNode("div",Q3,[e.createElementVNode("div",e4,[(e.openBlock(),e.createBlock(n,{key:l.filterKey,width:"98.9%",class:"filter-mobile","button-filter-props":l.filterButtonProps,"is-one-tournament-only":!0,"filter-type":l.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:l.tournamentsToFilter,"onUpdate:filters":l.onFiltersTournamentsTops},null,8,["button-filter-props","filter-type","filters","onUpdate:filters"]))]),e.createElementVNode("div",t4,[(e.openBlock(),e.createBlock(n,{ref:"personalDataFilter",key:`personal-${l.filterKey}`,class:"filter-mobile","button-filter-props":l.filterButtonProps,"filter-type":l.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,"is-scouting":"",width:"98.9%",season:null,"onUpdate:filters":l.onFiltersPersonalData},null,8,["button-filter-props","filter-type","onUpdate:filters"]))]),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{"search-button-active":l.isSearchButtonActive}]),onClick:a[3]||(a[3]=(...s)=>l.handleSearch&&l.handleSearch(...s))}," Buscar ",2)]),e.createElementVNode("div",a4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>l.searchQuery=s),type:"text",placeholder:"Filtrar jugador por nombre"},null,512),[[e.vModelText,l.searchQuery]]),l.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search",onClick:a[5]||(a[5]=(...s)=>l.clearSearch&&l.clearSearch(...s))},a[15]||(a[15]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1 1L13 13M1 13L13 1",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)]))):e.createCommentVNode("",!0)])]),e.createElementVNode("div",o4,[a[17]||(a[17]=e.createElementVNode("div",{class:"table-header"},[e.createElementVNode("div",{class:"header-cell checkbox-cell"}),e.createElementVNode("div",{class:"header-cell"},"Jugadores"),e.createElementVNode("div",{class:"header-cell"},"Equipo"),e.createElementVNode("div",{class:"header-cell"},"Posición"),e.createElementVNode("div",{class:"header-cell"},"Edad"),e.createElementVNode("div",{class:"header-cell"},"Liga"),e.createElementVNode("div",{class:"header-cell"},"Minutos")],-1)),e.createElementVNode("div",l4,[l.isLoadingPlayers?(e.openBlock(),e.createElementBlock("div",r4,a[16]||(a[16]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Buscando jugadores...",-1)]))):l.hasSearched?!l.isLoadingPlayers&&l.players.length===0?(e.openBlock(),e.createElementBlock("div",n4," No se encontraron resultados para tu búsqueda ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(l.filteredPlayers,s=>(e.openBlock(),e.createElementBlock("div",{class:"table-row",key:s.id},[e.createElementVNode("div",s4,[e.createElementVNode("input",{type:"checkbox",class:"checkbox-player",checked:l.selectedPlayers.has(s.id),onChange:c=>l.handlePlayerSelection(s.id)},null,40,d4)]),e.createElementVNode("div",c4,[e.createElementVNode("img",{src:s.photo,class:"player-avatar"},null,8,p4),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),e.createElementVNode("div",m4,[e.createElementVNode("img",{src:s.team.logo,class:"team-logo"},null,8,u4),e.createElementVNode("span",null,e.toDisplayString(s.team.shortName),1)]),e.createElementVNode("div",f4,e.toDisplayString(s.position),1),e.createElementVNode("div",h4,e.toDisplayString(s.age),1),e.createElementVNode("div",y4,e.toDisplayString(s.team.tournament),1),e.createElementVNode("div",g4,e.toDisplayString(s.minutes_played),1)]))),128)):(e.openBlock(),e.createElementBlock("div",i4,' Haz click en "Buscar" para aplicar tus filtros '))])])])),e.createElementVNode("div",b4,[l.currentStep===1?(e.openBlock(),e.createElementBlock("div",_4,[e.createElementVNode("button",{class:"cancelar",onClick:a[6]||(a[6]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[7]||(a[7]=(...s)=>l.handleNext&&l.handleNext(...s)),disabled:!l.playlistData.title||!l.playlistData.position}," Siguiente ",8,S4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",E4,[l.selectedPlayers.size===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[18]||(a[18]=e.createElementVNode("span",{class:"bold"},"No tienes",-1)),a[19]||(a[19]=e.createTextVNode(" jugadores seleccionados. "))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",w4,"Tienes "+e.toDisplayString(l.selectedPlayers.size),1),e.createTextVNode(" "+e.toDisplayString(l.selectedPlayers.size===1?"jugador seleccionado":"jugadores seleccionados")+". ",1)],64))]),e.createElementVNode("div",C4,[e.createElementVNode("button",{class:"cancelar",onClick:a[8]||(a[8]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[9]||(a[9]=(...s)=>l.handleCreatePlaylist&&l.handleCreatePlaylist(...s))}," Crear lista ")])],64))])],512)])):e.createCommentVNode("",!0)]),_:1})}const V4=be(G3,[["render",k4],["__scopeId","data-v-df61e2d4"]]),N4={name:"ModalCreatePlayList",props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},teamId:{type:Number,required:!0},listData:{type:Object,default:null},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0}},setup(t,{emit:a}){const o=e.ref(null),l=e.ref([]),i=e.ref({title:"",templateId:""}),r=e.ref(0),n=()=>{o.value&&(r.value=o.value.offsetWidth)},s=p=>{document.body.style.overflow=p?"hidden":"auto"},c="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",d=()=>{n(),t.isVisible&&s(!0)},h=()=>{i.value={title:"",templateId:""},a("close")},m=async()=>{var p,f;if(!(!i.value.title||!i.value.templateId))try{const u=X.create({headers:{Authorization:`${c}`}}),g=(p=t.listData)==null?void 0:p.id;(await u.put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed/${g}`,{user_id:t.userId,template:l.value.find(B=>B.id===i.value.templateId),name:i.value.title,id:g,players:(f=t.listData)==null?void 0:f.players})).status===200&&(a("next",i.value),h())}catch(u){console.error("Error al actualizar la lista:",u)}},y=async()=>{try{const f=await X.create({headers:{Authorization:`${c}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates");l.value=f.data.data}catch(p){console.error("Error al obtener templates:",p)}};return e.onMounted(()=>{window.addEventListener("resize",d),y()}),e.onUnmounted(()=>{window.removeEventListener("resize",d),s(!1)}),e.watch(()=>t.isVisible,p=>{p?(setTimeout(n,0),s(!0)):s(!1)}),e.watch(()=>t.listData,p=>{p&&(p.name&&(i.value.title=p.name),p.template&&(i.value.templateId=Number(p.template)))},{immediate:!0}),{modalContent:o,playlistData:i,modalWidth:r,closeModal:h,handleNext:m,templates:l}}},x4={class:"modal-header"},B4={class:"modal-body"},T4=["value"],F4={class:"modal-footer"},M4={class:"buttons-container buttons-container-step1"},A4=["disabled"];function L4(t,a,o,l,i,r){return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[6]||(a[6]=(...n)=>l.closeModal&&l.closeModal(...n))},[e.createElementVNode("div",{class:"modal-content",onClick:a[5]||(a[5]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",x4,[a[8]||(a[8]=e.createElementVNode("div",{class:"title-section"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3214_107704)"},[e.createElementVNode("path",{d:"M8.25 3H3C2.60218 3 2.22064 3.15804 1.93934 3.43934C1.65804 3.72064 1.5 4.10218 1.5 4.5V15C1.5 15.3978 1.65804 15.7794 1.93934 16.0607C2.22064 16.342 2.60218 16.5 3 16.5H13.5C13.8978 16.5 14.2794 16.342 14.5607 16.0607C14.842 15.7794 15 15.3978 15 15V9.75",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M13.875 1.87493C14.1734 1.57656 14.578 1.40894 15 1.40894C15.422 1.40894 15.8266 1.57656 16.125 1.87493C16.4234 2.17329 16.591 2.57797 16.591 2.99993C16.591 3.42188 16.4234 3.82656 16.125 4.12493L9 11.2499L6 11.9999L6.75 8.99993L13.875 1.87493Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3214_107704"},[e.createElementVNode("rect",{width:"18",height:"18",fill:"white"})])])]),e.createElementVNode("h2",null,"Editar lista")],-1)),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...n)=>l.closeModal&&l.closeModal(...n))},a[7]||(a[7]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),e.createElementVNode("div",B4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=n=>l.playlistData.title=n),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=n=>l.playlistData.templateId=n),class:"select-position"},[a[9]||(a[9]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona una plantilla",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.templates,n=>(e.openBlock(),e.createElementBlock("option",{key:n.id,value:n.id},e.toDisplayString(n.name),9,T4))),128))],512),[[e.vModelSelect,l.playlistData.templateId]])]),e.createElementVNode("div",F4,[e.createElementVNode("div",M4,[e.createElementVNode("button",{class:"cancelar",onClick:a[3]||(a[3]=(...n)=>l.closeModal&&l.closeModal(...n))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[4]||(a[4]=(...n)=>l.handleNext&&l.handleNext(...n)),disabled:!l.playlistData.title||!l.playlistData.templateId}," Guardar ",8,A4)])])],512)])):e.createCommentVNode("",!0)]),_:1})}const P4=be(N4,[["render",L4],["__scopeId","data-v-6aa243d7"]]),I4={name:"ModalCreatePlayList",components:{GSCFilters:xl},props:{isVisible:{type:Boolean,default:!1},seasons:{type:Array,required:!0},teamId:{type:Number,required:!0},userId:{type:Number,default:0},playerId:{type:Number,default:0},positionId:{type:Number,default:0},listId:{type:Number,required:!0}},setup(t,{emit:a}){const o=e.ref(Bl()),l=e.ref(null),i=e.ref(2),r=e.ref({title:"",position:""}),n=e.ref(0),s=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"],[10,"Desconocida"]]),c=e.ref(!1),d=e.ref([]),h=e.ref([]),m=e.ref(!1),y=e.ref(new Set),p=e.ref({tournaments:[],personalData:[]}),f=e.ref(null),u=e.ref(!0),g=e.ref(!1),V=e.ref(""),B=e.ref(0),v="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",Z=()=>{l.value&&(n.value=l.value.offsetWidth)},U=w=>{document.body.style.overflow=w?"hidden":"auto"},O=e.ref(null),Q=()=>{Z(),t.isVisible&&U(!0)},K=()=>{r.value={title:"",position:""},O.value&&(O.value.clearFilters(ie.ALL),O.value.clearFilters(ie.AGE_RANGE),O.value.clearFilters(ie.YEAR),O.value.clearFilters(ie.NATIONALITY),O.value.clearFilters(ie.POSITION)),yt.forEach(w=>{w.isSelected=w.name==="Liga MX",w.seasons.forEach(I=>{I.isSelected=w.name==="Liga MX"})}),y.value.clear(),B.value++,V.value="",g.value=!1,u.value=!0,f.value=null,h.value=[],a("close")},F=()=>{if(i.value===1){if(!r.value.title||!r.value.position)return;i.value=2,u.value=!0,f.value=null}},T=async()=>{try{c.value=!0;const I=await X.create({headers:{Authorization:`${v}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates");d.value=I.data.data}catch(w){console.error("Error al cargar templates:",w)}finally{c.value=!1}};e.onMounted(()=>{T(),window.addEventListener("resize",Q)}),e.onUnmounted(()=>{window.removeEventListener("resize",Q),U(!1)}),e.watch(()=>t.isVisible,w=>{w?(setTimeout(Z,0),U(!0)):U(!1)});const E=e.computed(()=>({...o.value})),M=async w=>{p.value.tournaments=w,q()},A=async w=>{p.value.personalData=w,q()},q=()=>{if(!f.value){u.value=!0;return}const w=JSON.stringify(p.value)!==JSON.stringify(f.value);u.value=w},te=async()=>{var w,I,j,z,P,_;if(u.value){g.value=!0;try{const S=p.value.tournaments.find(x=>x.isSelected===!0);if(S&&S.seasons.length>0){const x=S.seasons[0];m.value=!0,h.value=[];try{let ae=[...(await X.create({headers:{Authorization:`${v}`}}).get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${x.id}`)).data.players.map(D=>{var H;return{id:D.player_id,name:re(D.player_name),name_full:D.player_name,photo:D.player_photo||"https://golstatsimages.blob.core.windows.net/players-profile/default.png",position:s.get(D.position_id)||"No especificada",position_id:D.position_id||0,age:D.age||"-",dob:D.dob||"-",jersey:D.jersey||0,nationality:D.nationality||"",is_female:D.is_female,nationality_id:D.nationality_id||0,minutes_played:D.minutes_played||0,team_id:D.team_id,team:{logo:`https://golstatsimages.blob.core.windows.net/teams-80/${D.team_id}.png`,shortName:((H=D.team)==null?void 0:H.shortName)||"-",tournament:S.name||"No especificada"},isSelected:y.value.has(D.player_id)}})];if((w=p.value.personalData)!=null&&w.ageByRange&&(ae=ae.filter(D=>{const H=parseInt(D.age);return!isNaN(H)&&H>=p.value.personalData.ageByRange.min&&H<=p.value.personalData.ageByRange.max})),(I=p.value.personalData)!=null&&I.year){const D=p.value.personalData.year;ae=ae.filter(H=>H.dob?parseInt(H.dob.substring(0,4))===D:!1)}if(((z=(j=p.value.personalData)==null?void 0:j.nationalities)==null?void 0:z.length)>0){const D=p.value.personalData.nationalities.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.nationality_id)))}if(((_=(P=p.value.personalData)==null?void 0:P.positions)==null?void 0:_.length)>0){const D=p.value.personalData.positions.filter(H=>H.isSelected).map(H=>H.id);D.length>0&&(ae=ae.filter(H=>D.includes(H.position_id)))}h.value=ae,f.value=JSON.parse(JSON.stringify(p.value)),u.value=!1}catch($){console.error("Error al obtener jugadores:",$),h.value=[]}finally{m.value=!1}}}catch(S){console.error("Error al procesar la búsqueda:",S),m.value=!1}}},de=w=>{y.value.has(w)?y.value.delete(w):y.value.add(w)},re=w=>{if(!w)return"-";const[I,j]=w.split(",").map(P=>P.trim());if(!j)return w;const z=I.split(" ")[0];return`${j[0]}. ${z}`};e.watch(i,w=>{w===2&&(g.value=!1,u.value=!0,f.value=null)});const N=e.computed(()=>{if(!V.value)return h.value;const w=V.value.toLowerCase().trim();return h.value.filter(I=>I.name_full.toLowerCase().includes(w))});return{modalContent:l,currentStep:i,playlistData:r,modalWidth:n,isLoading:c,templates:d,closeModal:K,handleNext:F,filterButtonProps:E,filtersTypes:b,onFiltersTournamentsTops:M,tournamentsToFilter:yt,onFiltersPersonalData:A,players:h,isLoadingPlayers:m,positions:s,isSearchButtonActive:u,handleSearch:te,handlePlayerSelection:de,selectedPlayers:y,hasSearched:g,searchQuery:V,filteredPlayers:N,clearSearch:()=>{V.value=""},handleCreatePlaylist:async()=>{try{const w={user_id:t.userId,id:t.listId,players:Array.from(y.value).map(z=>{const P=h.value.find(_=>_.id===z);return{player_id:z,name:P.name_full,position:P.position_id,dob:P.dob,team_id:P.team_id,jersey:P.jersey,nationality:P.nationality,nationality_id:P.nationality_id,is_female:P.is_female}})},j=await X.create({headers:{Authorization:`${v}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${t.userId}/in-followed/${t.listId}/players`,w);(j.status===200||j.status===201)&&(a("playlist-created",j.data),K())}catch(w){console.error("Error al agregar jugadores a la lista:",w)}},filterKey:B,personalDataFilter:O}}},D4={class:"modal-header"},v4={class:"title-section"},R4={key:0,class:"modal-body"},O4=["value"],z4={key:1,disabled:""},U4={key:1,class:"modal-body"},j4={class:"search-section"},H4={class:"filters-row"},W4={class:"filter-container"},G4={class:"filter-container"},$4={class:"search-input"},q4={class:"players-table"},Y4={class:"table-body"},Z4={key:0,class:"loading-container"},J4={key:1,class:"no-results"},K4={key:2,class:"no-results"},X4={class:"cell checkbox-cell"},Q4=["checked","onChange"],e5={class:"cell player-cell"},t5=["src"],a5={class:"cell team-cell"},o5=["src"],l5={class:"cell"},r5={class:"cell"},i5={class:"cell"},n5={class:"cell"},s5={class:"modal-footer"},d5={key:0,class:"buttons-container buttons-container-step1"},c5=["disabled"],p5={class:"selected-players-info"},m5={class:"bold"},u5={class:"buttons-container buttons-container-step2"},f5=["disabled"];function h5(t,a,o,l,i,r){const n=e.resolveComponent("GSCFilters");return e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.isVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal-overlay",onClick:a[11]||(a[11]=(...s)=>l.closeModal&&l.closeModal(...s))},[e.createElementVNode("div",{class:"modal-content",onClick:a[10]||(a[10]=e.withModifiers(()=>{},["stop"])),ref:"modalContent"},[e.createElementVNode("div",D4,[e.createElementVNode("div",v4,[a[12]||(a[12]=e.createElementVNode("svg",{width:"29",height:"22",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.249 4.88982H1.56809C0.980641 4.88982 0.5 5.35635 0.5 5.92655C0.5 6.49675 0.980641 6.96327 1.56809 6.96327H12.249C12.8365 6.96327 13.3171 6.49675 13.3171 5.92655C13.3171 5.35635 12.8365 4.88982 12.249 4.88982ZM12.249 0.74292H1.56809C0.980641 0.74292 0.5 1.20945 0.5 1.77965C0.5 2.34984 0.980641 2.81637 1.56809 2.81637H12.249C12.8365 2.81637 13.3171 2.34984 13.3171 1.77965C13.3171 1.20945 12.8365 0.74292 12.249 0.74292ZM17.5895 9.03673V5.92655C17.5895 5.35635 17.1088 4.88982 16.5214 4.88982C15.9339 4.88982 15.4533 5.35635 15.4533 5.92655V9.03673H12.249C11.6616 9.03673 11.1809 9.50325 11.1809 10.0735C11.1809 10.6437 11.6616 11.1102 12.249 11.1102H15.4533V14.2204C15.4533 14.7906 15.9339 15.2571 16.5214 15.2571C17.1088 15.2571 17.5895 14.7906 17.5895 14.2204V11.1102H20.7937C21.3812 11.1102 21.8618 10.6437 21.8618 10.0735C21.8618 9.50325 21.3812 9.03673 20.7937 9.03673H17.5895ZM1.56809 11.1102H7.97664C8.5641 11.1102 9.04474 10.6437 9.04474 10.0735C9.04474 9.50325 8.5641 9.03673 7.97664 9.03673H1.56809C0.980641 9.03673 0.5 9.50325 0.5 10.0735C0.5 10.6437 0.980641 11.1102 1.56809 11.1102Z",fill:"#ffffff",stroke:"#0D1D29","stroke-width":"0.191682"})],-1)),e.createElementVNode("h2",null,e.toDisplayString(l.currentStep===1?"Crear nueva lista":"Agregar jugadores"),1)]),e.createElementVNode("button",{class:"close-button",onClick:a[0]||(a[0]=(...s)=>l.closeModal&&l.closeModal(...s))},a[13]||(a[13]=[e.createElementVNode("img",{width:"22",src:"http://golstatsimages.blob.core.windows.net/playlist-icons/close@3x.png",alt:"Cerrar"},null,-1)]))]),l.currentStep===1?(e.openBlock(),e.createElementBlock("div",R4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=s=>l.playlistData.title=s),type:"text",class:"input-playlist",placeholder:"Nombre de tu lista..."},null,512),[[e.vModelText,l.playlistData.title]]),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":a[2]||(a[2]=s=>l.playlistData.position=s),class:"select-position"},[a[14]||(a[14]=e.createElementVNode("option",{value:"",disabled:"",selected:""},"Selecciona una posición para tu lista",-1)),l.isLoading?(e.openBlock(),e.createElementBlock("option",z4,"Cargando templates...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.templates,s=>(e.openBlock(),e.createElementBlock("option",{key:s.id,value:s.id},e.toDisplayString(s.name),9,O4))),128))],512),[[e.vModelSelect,l.playlistData.position]])])):(e.openBlock(),e.createElementBlock("div",U4,[e.createElementVNode("div",j4,[e.createElementVNode("div",H4,[e.createElementVNode("div",W4,[(e.openBlock(),e.createBlock(n,{key:l.filterKey,width:"98.9%",class:"filter-mobile","button-filter-props":l.filterButtonProps,"is-one-tournament-only":!0,"filter-type":l.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:l.tournamentsToFilter,"onUpdate:filters":l.onFiltersTournamentsTops},null,8,["button-filter-props","filter-type","filters","onUpdate:filters"]))]),e.createElementVNode("div",G4,[(e.openBlock(),e.createBlock(n,{ref:"personalDataFilter",key:`personal-${l.filterKey}`,class:"filter-mobile","button-filter-props":l.filterButtonProps,"filter-type":l.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,"is-scouting":"",width:"98.9%",season:null,"onUpdate:filters":l.onFiltersPersonalData},null,8,["button-filter-props","filter-type","onUpdate:filters"]))]),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{"search-button-active":l.isSearchButtonActive}]),onClick:a[3]||(a[3]=(...s)=>l.handleSearch&&l.handleSearch(...s))}," Buscar ",2)]),e.createElementVNode("div",$4,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>l.searchQuery=s),type:"text",placeholder:"Filtrar jugador por nombre"},null,512),[[e.vModelText,l.searchQuery]]),l.searchQuery?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search",onClick:a[5]||(a[5]=(...s)=>l.clearSearch&&l.clearSearch(...s))},a[15]||(a[15]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M1 1L13 13M1 13L13 1",stroke:"white","stroke-width":"2","stroke-linecap":"round"})],-1)]))):e.createCommentVNode("",!0)])]),e.createElementVNode("div",q4,[a[17]||(a[17]=e.createElementVNode("div",{class:"table-header"},[e.createElementVNode("div",{class:"header-cell checkbox-cell"}),e.createElementVNode("div",{class:"header-cell"},"Jugadores"),e.createElementVNode("div",{class:"header-cell"},"Equipo"),e.createElementVNode("div",{class:"header-cell"},"Posición"),e.createElementVNode("div",{class:"header-cell"},"Edad"),e.createElementVNode("div",{class:"header-cell"},"Liga"),e.createElementVNode("div",{class:"header-cell"},"Minutos")],-1)),e.createElementVNode("div",Y4,[l.isLoadingPlayers?(e.openBlock(),e.createElementBlock("div",Z4,a[16]||(a[16]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Buscando jugadores...",-1)]))):l.hasSearched?!l.isLoadingPlayers&&l.players.length===0?(e.openBlock(),e.createElementBlock("div",K4," No se encontraron resultados para tu búsqueda ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(l.filteredPlayers,s=>(e.openBlock(),e.createElementBlock("div",{class:"table-row",key:s.id},[e.createElementVNode("div",X4,[e.createElementVNode("input",{type:"checkbox",class:"checkbox-player",checked:l.selectedPlayers.has(s.id),onChange:c=>l.handlePlayerSelection(s.id)},null,40,Q4)]),e.createElementVNode("div",e5,[e.createElementVNode("img",{src:s.photo,class:"player-avatar"},null,8,t5),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),e.createElementVNode("div",a5,[e.createElementVNode("img",{src:s.team.logo,class:"team-logo"},null,8,o5),e.createElementVNode("span",null,e.toDisplayString(s.team.shortName),1)]),e.createElementVNode("div",l5,e.toDisplayString(s.position),1),e.createElementVNode("div",r5,e.toDisplayString(s.age),1),e.createElementVNode("div",i5,e.toDisplayString(s.team.tournament),1),e.createElementVNode("div",n5,e.toDisplayString(s.minutes_played),1)]))),128)):(e.openBlock(),e.createElementBlock("div",J4,' Haz click en "Buscar" para aplicar tus filtros '))])])])),e.createElementVNode("div",s5,[l.currentStep===1?(e.openBlock(),e.createElementBlock("div",d5,[e.createElementVNode("button",{class:"cancelar",onClick:a[6]||(a[6]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[7]||(a[7]=(...s)=>l.handleNext&&l.handleNext(...s)),disabled:!l.playlistData.title||!l.playlistData.position}," Siguiente ",8,c5)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",p5,[l.selectedPlayers.size===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a[18]||(a[18]=e.createElementVNode("span",{class:"bold"},"No tienes",-1)),a[19]||(a[19]=e.createTextVNode(" jugadores seleccionados. "))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",m5,"Tienes "+e.toDisplayString(l.selectedPlayers.size),1),e.createTextVNode(" "+e.toDisplayString(l.selectedPlayers.size===1?"jugador seleccionado":"jugadores seleccionados")+". ",1)],64))]),e.createElementVNode("div",u5,[e.createElementVNode("button",{class:"cancelar",onClick:a[8]||(a[8]=(...s)=>l.closeModal&&l.closeModal(...s))},"Cancelar"),e.createElementVNode("button",{class:"siguiente",onClick:a[9]||(a[9]=(...s)=>l.handleCreatePlaylist&&l.handleCreatePlaylist(...s)),disabled:l.selectedPlayers.size===0}," Agregar a lista ",8,f5)])],64))])],512)])):e.createCommentVNode("",!0)]),_:1})}const y5=be(I4,[["render",h5],["__scopeId","data-v-b922cef0"]]),g5={name:"ModalDeleteLista",data(){return{show:!1}},methods:{open(){this.show=!0},close(){this.show=!1,this.$emit("close")},handleDelete(){this.$emit("confirm-delete-lista"),this.close()}}},b5={key:0,class:"modal-wrapper"},_5={class:"modal-content"},S5={class:"modal-actions"};function E5(t,a,o,l,i,r){return i.show?(e.openBlock(),e.createElementBlock("div",b5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[3]||(a[3]=n=>t.$emit("close"))},[e.createElementVNode("div",{class:"modal-container",onClick:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",_5,[a[4]||(a[4]=e.createStaticVNode('<div class="modal-header" data-v-e18c4a60><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar playlist" class="icon-trash" data-v-e18c4a60><span data-v-e18c4a60>Eliminar Lista</span></div><div class="separator" data-v-e18c4a60></div><p class="modal-message" data-v-e18c4a60> ¿Estás seguro que deseas eliminar<br data-v-e18c4a60> esta lista? Si lo haces no hay manera<br data-v-e18c4a60> de recuperala. </p><div class="separator" data-v-e18c4a60></div>',4)),e.createElementVNode("div",S5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("close"))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.handleDelete&&r.handleDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const w5=be(g5,[["render",E5],["__scopeId","data-v-e18c4a60"]]),C5={name:"ModalDeletePlayers",data(){return{show:!1}},methods:{open(){this.show=!0},close(){this.show=!1,this.$emit("close")},handleDelete(){this.$emit("confirm-delete"),this.close()}}},k5={key:0,class:"modal-wrapper"},V5={class:"modal-content"},N5={class:"modal-actions"};function x5(t,a,o,l,i,r){return i.show?(e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[3]||(a[3]=n=>t.$emit("close"))},[e.createElementVNode("div",{class:"modal-container",onClick:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",V5,[a[4]||(a[4]=e.createStaticVNode('<div class="modal-header" data-v-3d60eaf1><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar jugadores" class="icon-trash" data-v-3d60eaf1><span data-v-3d60eaf1>Eliminar jugadores</span></div><div class="separator" data-v-3d60eaf1></div><p class="modal-message" data-v-3d60eaf1> ¿Estás seguro que deseas eliminar a<br data-v-3d60eaf1> estos jugadores de la lista? </p><div class="separator" data-v-3d60eaf1></div>',4)),e.createElementVNode("div",N5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("close"))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.handleDelete&&r.handleDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const B5=be(C5,[["render",x5],["__scopeId","data-v-3d60eaf1"]]),T5={name:"ModalDeletePlayers",props:{modelValue:{type:Boolean,required:!0}},methods:{confirmDelete(){this.$emit("confirm-delete"),this.$emit("update:modelValue",!1)}}},F5={key:0,class:"modal-wrapper"},M5={class:"modal-container"},A5={class:"modal-content"},L5={class:"modal-actions"};function P5(t,a,o,l,i,r){return o.modelValue?(e.openBlock(),e.createElementBlock("div",F5,[e.createElementVNode("div",{class:"modal-overlay",onClick:a[2]||(a[2]=n=>t.$emit("update:modelValue",!1))},[e.createElementVNode("div",M5,[e.createElementVNode("div",A5,[a[3]||(a[3]=e.createStaticVNode('<div class="modal-header" data-v-e9a8dd88><img src="http://golstatsimages.blob.core.windows.net/playlist-icons/icon-delete-modal.png" alt="Eliminar jugadores" class="icon-trash" data-v-e9a8dd88><span data-v-e9a8dd88>Eliminar jugadores</span></div><div class="separator" data-v-e9a8dd88></div><p class="modal-message" data-v-e9a8dd88> ¿Estás seguro que deseas eliminar a<br data-v-e9a8dd88> estos jugadores de la lista? </p><div class="separator" data-v-e9a8dd88></div>',4)),e.createElementVNode("div",L5,[e.createElementVNode("button",{class:"btn-cancel",onClick:a[0]||(a[0]=n=>t.$emit("update:modelValue",!1))},"Cancelar"),e.createElementVNode("button",{class:"btn-delete",onClick:a[1]||(a[1]=(...n)=>r.confirmDelete&&r.confirmDelete(...n))},"Eliminar")])])])])])):e.createCommentVNode("",!0)}const I5=be(T5,[["render",P5],["__scopeId","data-v-e9a8dd88"]]);function D5(t){const a=e.ref({width:0,height:0});function o(){const l=t.value.getBoundingClientRect();a.value.width=l.width,a.value.height=l.height}return e.onMounted(()=>{o(),window.addEventListener("resize",o)}),e.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const xa={name:"GSCList",props:{userId:{type:Number,default:0},userTeamId:{type:Number,default:1}},components:{GridView:rr,ListView:vi,ModalCreatePlaylist:V4,ModalEditarLista:P4,ModalAddPlayers:y5,ModalDeleteLista:w5,ModalDeletePlayers:B5,ModalDeletePlayer:I5},data(){return{modalVisible:!1,modalEditarVisible:!1,modalAddPlayersVisible:!1,modalDeleteVisible:!1,modalCompareVisible:!1,selectedListId:null,selectedListName:"",activeItem:null,activeTooltip:null,viewMode:"grid",searchText:"",tooltipY:0,positions: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 "],[10,"Desconocida"]]),positionsFemale:new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",lists:[],templates:{},showDeleteModal:!1,selectedPlayersToDelete:[],hasSelectedPlayers:!1,currentListIndex:null,selectedListData:null,statsLoaded:!1,originalOverflow:null,isScrollLocked:!1}},setup(){const t=e.ref(null),{elementSize:a}=D5(t);return{elementSize:a,myDivRefList:t}},computed:{isMobileLayout(){return this.elementSize.width<768},isCompactLayout(){return this.elementSize.width<768},searchCompact(){return this.elementSize.width<1e3},searchCloseCompact(){return this.elementSize.width<920},smallMobileCompact(){return this.elementSize.width<480},tooltipStyle(){return this.smallMobileCompact?{top:`${this.tooltipY}px`,transform:"translateX(-50%)"}:{}},filteredLists(){if(!this.searchText)return this.lists;const t=this.searchText.toLowerCase();return this.lists.filter(a=>a.name.toLowerCase().includes(t))},currentTemplateCategories(){if(this.activeItem===null)return[];const t=this.lists.find(o=>o.id===this.activeItem);if(!t)return[];const a=this.templates[t.template];return!a||!a.variables?[]:a.variables.map(o=>({id:o.id,id_variable:o.custom_id,name:o.name}))},isAnyListInDeleteMode(){return this.lists.some(t=>t.deleteActive)}},methods:{handleViewProfile(t){this.$emit("showProfile",t)},handleDeleteFromList(t){let a={player_id:t.player_id,name:t.player_name,position:t.position_name};this.handleDeletePlayer(a)},ShowGraph(t){this.$emit("showGraph",t)},async fetchUserLists(){try{await this.fetchTemplates();const a=await X.create({headers:{Authorization:`${this.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed`);this.lists=a.data.data.map(o=>{var l,i,r,n,s;return{id:o.id,name:o.name,position:((r=this.templates[((l=o.template)==null?void 0:l.id)||((i=o.template_id)==null?void 0:i.id)])==null?void 0:r.name)||"Sin posición",template:((n=o.template)==null?void 0:n.id)||((s=o.template_id)==null?void 0:s.id),createdAt:this.formatDate(o.created_at),deleteActive:!1,players:(o.players||[]).map(c=>({...c,position:c.is_female?this.positionsFemale.get(c.position)||"Desconocida":this.positions.get(c.position)||"Desconocida",name:c.name.split(",").map(d=>d.trim().split(" ")[0]).reverse().join(" "),photo:`https://golstatsimages.blob.core.windows.net/players-profile/${c.player_id}.png`,countryFlag:c.nationality_id?`https://golstatsimages.blob.core.windows.net/flags/${c.nationality_id}.jpg`:"",nationality:c.nationality})),playerStats:{}}})}catch(t){console.error("Error al obtener las listas:",t)}},async fetchTemplates(){try{const a=await X.create({headers:{Authorization:`${this.token}`}}).get("https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/templates"),o={};a.data.data.forEach(l=>{o[l.id]=l}),this.templates=o}catch(t){console.error("Error al obtener los templates:",t)}},getOriginalList(t){return this.lists.find(a=>a.id===t)},toggleItem(t,a){if(this.isAnyListInDeleteMode&&!this.getOriginalList(t).deleteActive){a.preventDefault();return}this.activeItem===t?this.activeItem=null:(this.lists.forEach(o=>{o.deleteActive=!1}),this.statsLoaded=!1,this.activeItem=t,this.fetchPlayerStats(t))},async fetchPlayerStats(t){try{const o=await X.create({headers:{Authorization:`${this.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${t}/stats`),l=this.lists.findIndex(c=>c.id===t),i={},r={},n={};o.data.max.forEach(([c,d])=>{r[c]=parseInt(d)}),Object.entries(o.data.data).forEach(([c,d])=>{c!=="max"&&(i[c]={},d.forEach(h=>{const[m,,y,p,f]=h;i[c][m]={variable_id:m,value:y,max:r[m]||0,season:p,categories:f}}))}),Object.entries(o.data.additional_data).forEach(([c,d])=>{n[c]=d}),l!==-1&&(this.lists[l].playerStats=i,this.lists[l].additionalData=n),this.statsLoaded=!0}catch(a){console.error("Error fetching player stats:",a),this.statsLoaded=!0}},toggleViewMode(t){this.viewMode=t},toggleTooltip(t,a){this.activeTooltip===t?(this.activeTooltip=null,this.handleScroll(!1)):(this.activeTooltip!==null&&this.handleScroll(!1),this.activeTooltip=t,this.smallMobileCompact&&(this.tooltipY=a.clientY,this.handleScroll(!0))),a.stopPropagation()},editarLista(t){this.selectedListId=this.lists[t].id,this.selectedListData=this.lists[t],this.modalEditarVisible=!0,this.activeTooltip=null},closeModalEditar(){this.modalEditarVisible=!1,this.selectedListId=null},agregarJugadores(t){const a=this.filteredLists[t];this.currentListIndex=this.lists.findIndex(o=>o.id===a.id),this.selectedListId=a.id,this.modalAddPlayersVisible=!0,this.activeTooltip=null},closeModalAddPlayers(){this.modalAddPlayersVisible=!1,this.selectedListId=null},eliminarJugadores(t){const a=this.filteredLists[t];this.activeItem!==a.id&&this.toggleItem(a.id),this.lists.forEach(l=>{l.deleteActive=!1});const o=this.getOriginalList(a.id);o&&(o.deleteActive=!0),this.currentListIndex=this.lists.findIndex(l=>l.id===a.id),this.activeTooltip=null},async compararListas(t){const a=this.filteredLists[t],o=this.lists.find(i=>i.id===a.id);if(!o||!o.players){console.error("No se encontró la lista o no tiene jugadores");return}this.activeItem!==a.id&&(this.statsLoaded=!1,this.activeItem=a.id,await this.fetchPlayerStats(a.id));const l=o.players.map(i=>{var r,n,s,c,d,h,m,y,p,f;return{position:i.position,player_name:i.name,player_photo:i.photo,total:"-",id:i.player_id,player_age:this.calculateAge(i.dob),team_abrev:((n=(r=o.additionalData)==null?void 0:r[i.player_id])==null?void 0:n.team_abrev)||"-",team_name:((c=(s=o.additionalData)==null?void 0:s[i.player_id])==null?void 0:c.team_name)||"-",team_logo:`https://golstatsimages.blob.core.windows.net/teams-80/${i.team_id}.png`,position_name:i.position,player_position:i.position,player_country:La[`${i.nationality_id}`]||i.nationality,player_country_flag:i.countryFlag,player_games:((h=(d=o.additionalData)==null?void 0:d[i.player_id])==null?void 0:h.games_played)||0,player_min:((y=(m=o.additionalData)==null?void 0:m[i.player_id])==null?void 0:y.minutes)||0,league_name:"-",seasons:[...new Set(this.currentTemplateCategories.map(u=>{var g,V;return((V=(g=o.playerStats[i.player_id])==null?void 0:g[u.id_variable])==null?void 0:V.season)||[]}).flat())].filter(u=>u&&u!==0),season_id:((f=(p=o.additionalData)==null?void 0:p[i.player_id])==null?void 0:f.season_id)||0,stats:this.currentTemplateCategories.map(u=>{var g,V,B,v,Z,U,O,Q;return{category_id:((V=(g=o.playerStats[i.player_id])==null?void 0:g[u.id_variable])==null?void 0:V.variable_id)||null,custom_category_id:((v=(B=o.playerStats[i.player_id])==null?void 0:B[u.id_variable])==null?void 0:v.variable_id)||null,name:u.name,total:((U=(Z=o.playerStats[i.player_id])==null?void 0:Z[u.id_variable])==null?void 0:U.value)||0,seasons:((Q=(O=o.playerStats[i.player_id])==null?void 0:O[u.id_variable])==null?void 0:Q.season)||null}})}});this.$emit("compare-players",l),this.activeTooltip=null},calculateAge(t){if(!t)return"-";const a=new Date(t),o=new Date;let l=o.getFullYear()-a.getFullYear();const i=o.getMonth()-a.getMonth();return(i<0||i===0&&o.getDate()<a.getDate())&&l--,l},closeModalCompare(){this.modalCompareVisible=!1},eliminarLista(t){const a=this.filteredLists[t];this.selectedListId=a.id,this.selectedListName=a.name,this.$refs.deleteModal.open(),this.activeTooltip=null},closeModalDelete(){this.$refs.deleteModal.close(),this.selectedListId=null,this.selectedListName=""},closeModalDeletePlayers(){this.$refs.deleteModalPlayers.close()},closeModalDeletePlayer(){this.$refs.deleteModalPlayer.close()},async handleConfirmDeleteLista(){try{await X.create({headers:{Authorization:`${this.token}`}}).delete(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${this.selectedListId}`);const a=this.searchText;this.lists=this.lists.filter(o=>o.id!==this.selectedListId),this.$refs.deleteModal.close(),await this.fetchUserLists(),a&&(this.searchText=a)}catch(t){console.error("Error al eliminar la lista:",t),await this.fetchUserLists()}},async handleConfirmDeletePlayers(){try{const t=this.lists[this.currentListIndex],a=t.id,o={user_id:this.userId,players:this.selectedPlayersToDelete,id:a};await X.create({headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${a}/players/delete`,o),t&&(t.players=t.players.filter(i=>!this.selectedPlayersToDelete.some(r=>r.player_id===i.player_id))),this.selectedPlayersToDelete=[],this.hasSelectedPlayers=!1,t&&(t.deleteActive=!1),this.$refs.deleteModalPlayers.close()}catch(t){console.error("Error al eliminar jugadores:",t)}},async handleConfirmDeletePlayer(){try{const t=this.lists.find(r=>r.id===this.activeItem);if(!t){console.error("No se encontró la lista activa");return}const a=t.id,o={user_id:this.userId,players:this.selectedPlayersToDelete,id:a};await X.create({headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${this.userId}/in-followed/${a}/players/delete`,o);const i=this.lists.findIndex(r=>r.id===a);if(i!==-1){const r=JSON.parse(JSON.stringify(this.lists[i]));r.players=r.players.filter(n=>!this.selectedPlayersToDelete.some(s=>s.player_id===n.player_id)),this.lists[i]=r}this.selectedPlayersToDelete=[],this.hasSelectedPlayers=!1,i!==-1&&(this.lists[i].deleteActive=!1)}catch(t){console.error("Error al eliminar jugadores:",t)}},formatDate(t){if(!t)return"";const a=new Date(t),o=a.getDate().toString().padStart(2,"0"),l=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"][a.getMonth()],i=a.getFullYear();return`${o} - ${l} - ${i}`},clearSearch(){this.searchText=""},cancelDelete(t){const a=this.filteredLists[t],o=this.getOriginalList(a.id);o&&(o.deleteActive=!1),this.hasSelectedPlayers=!1},handleShowGraph(t){this.$emit("showGraph",t)},handleSelectedPlayers(t){this.selectedPlayersToDelete=t,this.hasSelectedPlayers=t.length>0},handleSelectedPlayersToDelete(t){this.selectedPlayersToDelete=t,this.hasSelectedPlayers=t.length>0},updateSelectionStatus(t){this.hasSelectedPlayers=t},onOpenMedia(t){this.$emit("open-media",t)},openModal(){this.modalVisible=!0},closeModal(){this.modalVisible=!1},async handlePlaylistAddPlayer(t){try{const a=this.selectedListId,o=this.searchText;this.statsLoaded=!1,await this.fetchUserLists(),a&&(this.searchText=o,await this.$nextTick(),this.activeItem=a,await this.fetchPlayerStats(a),this.lists.find(i=>i.id===a)&&(this.filteredLists.some(r=>r.id===a)||(this.searchText=""))),this.closeModalAddPlayers()}catch(a){console.error("Error al recargar las listas:",a)}},handlePlaylistCreated(){try{this.fetchUserLists()}catch(t){console.error("Error al recargar las listas:",t)}},confirmDelete(t){if(!this.hasSelectedPlayers)return;const a=this.filteredLists[t];this.currentListIndex=this.lists.findIndex(o=>o.id===a.id),this.$refs.deleteModalPlayers.open()},handleListEdited(){this.closeModalEditar(),this.fetchUserLists()},handleScroll(t){t&&!this.isScrollLocked?(this.originalOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.documentElement.style.position="fixed",document.documentElement.style.width="100%",this.isScrollLocked=!0):!t&&this.isScrollLocked&&(document.documentElement.style.overflow="",document.body.style.overflow="",document.documentElement.style.position="",document.documentElement.style.width="",this.originalOverflow=null,this.isScrollLocked=!1)},closeTooltip(){this.activeTooltip!==null&&(this.activeTooltip=null,this.handleScroll(!1))},handleDeletePlayer(t){const a=this.lists.find(l=>l.id===this.activeItem);if(!a){console.error("No se encontró la lista activa");return}const o=a.players.find(l=>l.player_id===t.player_id);if(!o){console.error("No se encontró el jugador en la lista");return}this.userId,a.id,this.selectedPlayersToDelete=[o],this.hasSelectedPlayers=!0,this.showDeleteModal=!0},handleShowProfile(t){const a=this.lists.find(n=>n.id===this.activeItem);if(!a){console.error("No se encontró la lista activa");return}const o=a.players.find(n=>n.player_id===t.player_id);if(!o){console.error("No se encontró el jugador en la lista");return}const l=a.playerStats[o.player_id];let i=0;l&&Object.values(l).forEach(n=>{n.season!==null&&n.season!==void 0&&(i=n.season)});const r={team_id:o.team_id,player_id:o.player_id,seasons:i,season_id:t.season_id};this.$emit("showProfile",r)}},watch:{userId:{immediate:!0,handler(t){t&&t!==0&&this.fetchUserLists()}},smallMobileCompact(t){!t&&this.isScrollLocked&&this.handleScroll(!1)},activeTooltip(t){t===null&&this.isScrollLocked&&this.handleScroll(!1)}},mounted(){const t=o=>{if(this.activeTooltip!==null){const l=document.querySelector(".tooltip-menu"),i=document.querySelector(".more-options");l&&!l.contains(o.target)&&i&&!i.contains(o.target)&&this.closeTooltip()}};document.addEventListener("click",t),this._handleGlobalClick=t;const a=o=>{o.key==="Escape"&&this.activeTooltip!==null&&this.closeTooltip()};document.addEventListener("keydown",a),this._handleEscape=a,this.fetchTemplates()},beforeUnmount(){this._handleGlobalClick&&document.removeEventListener("click",this._handleGlobalClick),this._handleEscape&&document.removeEventListener("keydown",this._handleEscape),this.isScrollLocked&&this.handleScroll(!1)}},Tl=()=>{e.useCssVars(t=>({"4dc009ae":t.smallMobileCompact?"12px":"14px","6ddbfde3":(t.isMobileLayout,"8px"),"9fd9de9a":t.isMobileLayout?"0":"8px","603cacf0":t.smallMobileCompact?"0 5px":"0 24px",cfc1cfe4:t.smallMobileCompact?"24px":"32px","4f4ad28f":t.smallMobileCompact?"4px":"24px",d98f499c:t.smallMobileCompact?"16px":"20px",c5f7f924:t.smallMobileCompact?"32px":"40px","41b70b95":t.smallMobileCompact?"128px":"160px","013909f4":t.isMobileLayout?"13px":"14px","3dbed8d1":t.smallMobileCompact?"5px":"12px","1beab5da":t.smallMobileCompact?"4px":"0px","651ce6db":t.searchCompact?t.isMobileLayout?t.smallMobileCompact?"calc(100% - 46px)":"calc(100% - 44px)":"88%":"93%",c530e79c:t.isMobileLayout?"-10px -15px -15px -15px":"-15px -15px","730619cb":t.tooltipY+"px","03c9b5cb":t.searchCompact?t.searchCloseCompact?t.isMobileLayout?t.smallMobileCompact?"2%":"1%":"2.5%":"5%":"1%","51d1f024":t.isMobileLayout?"0":"16px","9dde4258":t.isMobileLayout?"-12px 0px 8px 0px":"-15px -15px 15px -15px","5ea3a273":t.isMobileLayout?"7px":"16px","33083a4b":(t.smallMobileCompact,"column"),28093715:t.isMobileLayout?"100%":"150px","07cdf52e":t.smallMobileCompact?"10px":"12px",b236f4a8:t.isMobileLayout?"center":"right","51ec4daa":t.isMobileLayout?"0":"32px","51fd1f65":t.isMobileLayout?"0":"48px","7033fa1f":t.isMobileLayout&&!t.smallMobileCompact?"flex":"none","8cceede2":t.isMobileLayout?"auto":"32px"}))},Fl=xa.setup;xa.setup=Fl?(t,a)=>(Tl(),Fl(t,a)):Tl;const v5={ref:"myDivRefList",class:"gsc-list"},R5={class:"list-header"},O5={class:"list-count"},z5={class:"search-container"},U5={class:"search-box"},j5={class:"header-buttons"},H5=["disabled"],W5={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G5=["stroke"],$5=["stroke"],q5=["stroke"],Y5=["stroke"],Z5=["disabled"],J5={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},K5=["stroke"],X5=["stroke"],Q5=["stroke"],e6=["stroke"],t6=["stroke"],a6=["stroke"],o6={class:"search-container full-width"},l6={class:"search-box"},r6={class:"list-items"},i6={class:"list-name"},n6={class:"delete-mode-actions"},s6=["onClick"],d6=["disabled","onClick"],c6={key:0,class:"second-row-container"},p6={class:"delete-mode-actions"},m6=["onClick"],u6=["disabled","onClick"],f6={class:"delete-mode-actions mobile small"},h6=["onClick"],y6=["disabled","onClick"],g6=["onClick"],b6={class:"header-main-row"},_6={class:"item-title"},S6={class:"item-controls"},E6={class:"tooltip-container"},w6=["onClick"],C6=["onClick"],k6=["onClick"],V6=["onClick"],N6=["onClick"],x6=["onClick"],B6={key:0,class:"separator"},T6={key:1,class:"mobile-meta-info"},F6={key:0,class:"item-content"},M6={class:"expanded-container"},A6={key:0,class:"no-results"};function L6(t,a,o,l,i,r){const n=e.resolveComponent("ModalCreatePlaylist"),s=e.resolveComponent("ModalEditarLista"),c=e.resolveComponent("ModalAddPlayers"),d=e.resolveComponent("ModalDeleteLista"),h=e.resolveComponent("ModalDeletePlayers"),m=e.resolveComponent("ModalDeletePlayer");return e.openBlock(),e.createElementBlock("div",v5,[e.createVNode(n,{isVisible:i.modalVisible,onClose:r.closeModal,seasons:[1922],"user-team-id":o.userTeamId,"team-id":2,"user-id":o.userId,"player-id":0,"position-id":9,onPlaylistCreated:r.handlePlaylistCreated},null,8,["isVisible","onClose","user-team-id","user-id","onPlaylistCreated"]),e.createVNode(s,{isVisible:i.modalEditarVisible,onClose:r.closeModalEditar,onNext:r.handleListEdited,"user-id":o.userId,"list-id":i.selectedListId,"list-data":i.selectedListData},null,8,["isVisible","onClose","onNext","user-id","list-id","list-data"]),e.createVNode(c,{isVisible:i.modalAddPlayersVisible,onClose:r.closeModalAddPlayers,"user-id":o.userId,"list-id":i.selectedListId,onPlaylistCreated:r.handlePlaylistAddPlayer},null,8,["isVisible","onClose","user-id","list-id","onPlaylistCreated"]),e.createVNode(d,{ref:"deleteModal",onClose:r.closeModalDelete,onConfirmDeleteLista:r.handleConfirmDeleteLista},null,8,["onClose","onConfirmDeleteLista"]),e.createVNode(h,{ref:"deleteModalPlayers",onClose:r.closeModalDeletePlayers,onConfirmDelete:r.handleConfirmDeletePlayers},null,8,["onClose","onConfirmDelete"]),e.createVNode(m,{modelValue:i.showDeleteModal,"onUpdate:modelValue":a[0]||(a[0]=y=>i.showDeleteModal=y),onConfirmDelete:r.handleConfirmDeletePlayer},null,8,["modelValue","onConfirmDelete"]),i.activeTooltip!==null&&r.smallMobileCompact?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tooltip-overlay",onClick:a[1]||(a[1]=e.withModifiers(y=>i.activeTooltip=null,["stop"]))})):e.createCommentVNode("",!0),e.createElementVNode("div",R5,[e.createElementVNode("div",{class:e.normalizeClass(["top-row",{compact:r.isCompactLayout}])},[e.createElementVNode("div",O5,e.toDisplayString(i.lists.length)+" "+e.toDisplayString(i.lists.length===1?"Lista":"Listas"),1),e.withDirectives(e.createElementVNode("div",z5,[e.createElementVNode("div",U5,[a[11]||(a[11]=e.createElementVNode("img",{class:"search-icon",src:"https://golstatsimages.blob.core.windows.net/todoelfut/search-svg.svg"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":a[2]||(a[2]=y=>i.searchText=y),placeholder:"Buscar lista..."},null,512),[[e.vModelText,i.searchText]]),i.searchText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search-btn",onClick:a[3]||(a[3]=(...y)=>r.clearSearch&&r.clearSearch(...y))},a[10]||(a[10]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13 1L1 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M1 1L13 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):e.createCommentVNode("",!0)])],512),[[e.vShow,!r.isCompactLayout]]),e.createElementVNode("div",j5,[e.createElementVNode("button",{class:"create-list-btn",onClick:a[4]||(a[4]=(...y)=>r.openModal&&r.openModal(...y))},a[12]||(a[12]=[e.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-crear-lista.png"},null,-1),e.createTextVNode(" Crear lista ")])),e.createElementVNode("button",{class:e.normalizeClass(["view-mode-btn grid",{active:i.viewMode==="grid"}]),onClick:a[5]||(a[5]=y=>r.toggleViewMode("grid")),disabled:r.isAnyListInDeleteMode},[(e.openBlock(),e.createElementBlock("svg",W5,[e.createElementVNode("path",{d:"M10 3H3V10H10V3Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,G5),e.createElementVNode("path",{d:"M21 3H14V10H21V3Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,$5),e.createElementVNode("path",{d:"M21 14H14V21H21V14Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,q5),e.createElementVNode("path",{d:"M10 14H3V21H10V14Z",stroke:i.viewMode==="grid"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Y5)]))],10,H5),e.createElementVNode("button",{class:e.normalizeClass(["view-mode-btn list",{active:i.viewMode==="list"}]),onClick:a[6]||(a[6]=y=>r.toggleViewMode("list")),disabled:r.isAnyListInDeleteMode},[(e.openBlock(),e.createElementBlock("svg",J5,[e.createElementVNode("path",{d:"M8 6H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,K5),e.createElementVNode("path",{d:"M8 12H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,X5),e.createElementVNode("path",{d:"M8 18H21",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Q5),e.createElementVNode("path",{d:"M3 6H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,e6),e.createElementVNode("path",{d:"M3 12H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,t6),e.createElementVNode("path",{d:"M3 18H3.01",stroke:i.viewMode==="list"?"#CBEE6B":"#808080","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,a6)]))],10,Z5)])],2),e.withDirectives(e.createElementVNode("div",o6,[e.createElementVNode("div",l6,[a[14]||(a[14]=e.createElementVNode("img",{class:"search-icon",src:"https://golstatsimages.blob.core.windows.net/todoelfut/search-svg.svg"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":a[7]||(a[7]=y=>i.searchText=y),placeholder:"Buscar lista..."},null,512),[[e.vModelText,i.searchText]]),i.searchText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"clear-search-btn",onClick:a[8]||(a[8]=(...y)=>r.clearSearch&&r.clearSearch(...y))},a[13]||(a[13]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13 1L1 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M1 1L13 13",stroke:"#808080","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):e.createCommentVNode("",!0)])],512),[[e.vShow,r.isCompactLayout]])]),e.createElementVNode("div",r6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.filteredLists,(y,p)=>(e.openBlock(),e.createElementBlock("div",{class:"list-item",key:y.id},[r.getOriginalList(y.id).deleteActive?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["delete-mode-header",{mobile:r.isMobileLayout,small:r.smallMobileCompact}])},[e.createElementVNode("div",{class:e.normalizeClass(["delete-mode-content",{mobile:r.isMobileLayout,small:r.smallMobileCompact}])},[r.isMobileLayout?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["list-name mobile",{small:r.smallMobileCompact}])},e.toDisplayString(y.name),3),r.smallMobileCompact?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a[17]||(a[17]=e.createElementVNode("div",{class:"delete-mode-title mobile small"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",f6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,h6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,y6)])],64)):(e.openBlock(),e.createElementBlock("div",c6,[a[16]||(a[16]=e.createElementVNode("div",{class:"delete-mode-title"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",p6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,m6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,u6)])]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",i6,e.toDisplayString(y.name),1),a[15]||(a[15]=e.createElementVNode("div",{class:"delete-mode-title"}," Selecciona los jugadores que quieres eliminar de la lista ",-1)),e.createElementVNode("div",n6,[e.createElementVNode("button",{class:"cancel-btn",onClick:e.withModifiers(f=>r.cancelDelete(p),["stop"])}," Cancelar ",8,s6),e.createElementVNode("button",{class:e.normalizeClass(["delete-btn",{active:i.hasSelectedPlayers}]),disabled:!i.hasSelectedPlayers,onClick:e.withModifiers(f=>r.confirmDelete(p),["stop"])}," Eliminar ",10,d6)])],64))],2)],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["item-header",{"mobile-layout":r.isMobileLayout,disabled:r.isAnyListInDeleteMode&&!r.getOriginalList(y.id).deleteActive}]),onClick:f=>r.toggleItem(y.id,f)},[e.createElementVNode("div",b6,[e.createElementVNode("div",_6,e.toDisplayString(y.name),1),e.createElementVNode("div",{class:e.normalizeClass(["meta-info",{"mobile-layout":r.isMobileLayout}])},[e.createElementVNode("span",null," "+e.toDisplayString(y.createdAt),1),e.createElementVNode("span",null," "+e.toDisplayString(y.position||"Sin posición"),1)],2),e.createElementVNode("div",S6,[e.createElementVNode("div",E6,[e.createElementVNode("button",{class:"more-options",onClick:e.withModifiers(f=>r.toggleTooltip(p,f),["stop"])},a[18]||(a[18]=[e.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-options.png"},null,-1)]),8,w6),i.activeTooltip===p?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tooltip-menu",{mobile:r.smallMobileCompact}]),style:e.normalizeStyle(r.tooltipStyle),onClick:a[9]||(a[9]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.editarLista(p)},a[19]||(a[19]=[e.createStaticVNode('<svg width="16" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ee0a15de><g clip-path="url(#clip0_3214_107704)" data-v-ee0a15de><path d="M8.25 3H3C2.60218 3 2.22064 3.15804 1.93934 3.43934C1.65804 3.72064 1.5 4.10218 1.5 4.5V15C1.5 15.3978 1.65804 15.7794 1.93934 16.0607C2.22064 16.342 2.60218 16.5 3 16.5H13.5C13.8978 16.5 14.2794 16.342 14.5607 16.0607C14.842 15.7794 15 15.3978 15 15V9.75" stroke="#CBEE6B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-ee0a15de></path><path d="M13.875 1.87493C14.1734 1.57656 14.578 1.40894 15 1.40894C15.422 1.40894 15.8266 1.57656 16.125 1.87493C16.4234 2.17329 16.591 2.57797 16.591 2.99993C16.591 3.42188 16.4234 3.82656 16.125 4.12493L9 11.2499L6 11.9999L6.75 8.99993L13.875 1.87493Z" stroke="#CBEE6B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-ee0a15de></path></g><defs data-v-ee0a15de><clipPath id="clip0_3214_107704" data-v-ee0a15de><rect width="18" height="18" fill="#CBEE6B" data-v-ee0a15de></rect></clipPath></defs></svg> Editar lista ',2)]),8,C6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.agregarJugadores(p)},a[20]||(a[20]=[e.createElementVNode("svg",{width:"17",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"#CBEE6B","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1),e.createTextVNode(" Agregar jugadores ")]),8,k6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.eliminarJugadores(p)},a[21]||(a[21]=[e.createElementVNode("svg",{width:"17",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"#CBEE6B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),e.createTextVNode(" Eliminar jugadores ")]),8,V6),e.createElementVNode("div",{class:"tooltip-item",onClick:f=>r.compararListas(p)},a[22]||(a[22]=[e.createStaticVNode('<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ee0a15de><g clip-path="url(#clip0_2936_393289)" data-v-ee0a15de><mask id="mask0_2936_393289" style="mask-type:luminance;" maskUnits="userSpaceOnUse" x="0" y="0" width="18" height="18" data-v-ee0a15de><path d="M0 0H18V18H0V0Z" fill="#CBEE6B" data-v-ee0a15de></path></mask><g mask="url(#mask0_2936_393289)" data-v-ee0a15de><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 1.28571C2.7248 1.28571 1.28571 2.7248 1.28571 4.5V13.5C1.28571 15.2752 2.7248 16.7143 4.5 16.7143H13.5C15.2752 16.7143 16.7143 15.2752 16.7143 13.5V4.5C16.7143 2.7248 15.2752 1.28571 13.5 1.28571H4.5ZM0 4.5C0 2.01471 2.01471 0 4.5 0H13.5C15.9853 0 18 2.01471 18 4.5V13.5C18 15.9853 15.9853 18 13.5 18H4.5C2.01471 18 0 15.9853 0 13.5V4.5Z" fill="#CBEE6B" data-v-ee0a15de></path><path fill-rule="evenodd" clip-rule="evenodd" d="M10.9285 4.5C11.2835 4.5 11.5714 4.78782 11.5714 5.14286V11.3051L13.0453 9.83115C13.2964 9.58009 13.7035 9.58009 13.9546 9.83115C14.2055 10.0822 14.2055 10.4892 13.9546 10.7403L11.3831 13.3118C11.1992 13.4956 10.9227 13.5505 10.6825 13.451C10.4423 13.3515 10.2856 13.1171 10.2856 12.8571V5.14286C10.2856 4.78782 10.5735 4.5 10.9285 4.5Z" fill="#CBEE6B" data-v-ee0a15de></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.31723 4.54895C7.55745 4.64845 7.71408 4.88287 7.71408 5.14288V12.8572C7.71408 13.2121 7.42626 13.5 7.07122 13.5C6.71619 13.5 6.42837 13.2121 6.42837 12.8572V6.69487L4.95436 8.16887C4.70331 8.41993 4.29628 8.41993 4.04523 8.16887C3.79417 7.91782 3.79417 7.51079 4.04523 7.25974L6.61666 4.68831C6.80052 4.50445 7.07701 4.44945 7.31723 4.54895Z" fill="#CBEE6B" data-v-ee0a15de></path></g></g><defs data-v-ee0a15de><clipPath id="clip0_2936_393289" data-v-ee0a15de><rect width="18" height="18" fill="#CBEE6B" data-v-ee0a15de></rect></clipPath></defs></svg> Comparar ',2)]),8,N6),e.createElementVNode("div",{class:"tooltip-item delete",onClick:f=>r.eliminarLista(p)},a[23]||(a[23]=[e.createElementVNode("svg",{width:"19",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M3.64583 0.894444H3.7625V0.777778V0.116667H7.90417V0.777778V0.894444H8.02083H11.55V2.21667H10.9375H10.8208V2.33333V12.4444C10.8208 12.8284 10.6778 13.1952 10.4253 13.4646C10.173 13.7337 9.83248 13.8833 9.47917 13.8833H2.1875C1.83419 13.8833 1.49369 13.7337 1.24142 13.4646C0.988898 13.1952 0.845833 12.8284 0.845833 12.4444V2.33333V2.21667H0.729167H0.116667V0.894444H3.64583ZM2.1875 2.21667H2.07083V2.33333V12.4444V12.5611H2.1875H9.47917H9.59583V12.4444V2.33333V2.21667H9.47917H2.1875ZM4.9875 10.7722H3.7625V4.00556H4.9875V10.7722ZM7.90417 10.7722H6.67917V4.00556H7.90417V10.7722Z",fill:"#CBEE6B",stroke:"#CBEE6B","stroke-width":"0.233333"})],-1),e.createTextVNode(" Eliminar lista ")]),8,x6)],6)):e.createCommentVNode("",!0)]),e.createElementVNode("i",{class:e.normalizeClass(["arrow",{"arrow-up":i.activeItem===y.id}])},a[24]||(a[24]=[e.createElementVNode("img",{width:"23",src:"http://golstatsimages.blob.core.windows.net/todoelfut/icn-collapse@2x.png"},null,-1)]),2)])]),r.isMobileLayout?(e.openBlock(),e.createElementBlock("div",B6)):e.createCommentVNode("",!0),r.isMobileLayout?(e.openBlock(),e.createElementBlock("div",T6,[e.createElementVNode("span",null," "+e.toDisplayString(y.createdAt),1),e.createElementVNode("span",null," "+e.toDisplayString(y.position||"Sin posición"),1)])):e.createCommentVNode("",!0)],10,g6),[[e.vShow,!r.getOriginalList(y.id).deleteActive]]),e.createVNode(e.Transition,{name:"expand"},{default:e.withCtx(()=>[i.activeItem===y.id?(e.openBlock(),e.createElementBlock("div",F6,[e.createElementVNode("div",M6,[e.createElementVNode("div",{class:e.normalizeClass(["expanded-content",{"list-view-margin":i.viewMode==="list"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.viewMode==="grid"?"GridView":"ListView"),{categories:r.currentTemplateCategories,deleteActive:i.lists[p].deleteActive,players:y.players,playerStats:y.playerStats,playerAddtionalData:y.additionalData,"stats-loaded":i.statsLoaded,onShowGraph:[r.handleShowGraph,r.ShowGraph],onShowProfile:r.handleShowProfile,onViewProfile:r.handleViewProfile,onDeleteFromList:r.handleDeleteFromList,onChangeSelectedPlayers:r.handleSelectedPlayersToDelete,onSelectedPlayersToDelete:r.handleSelectedPlayers,onDeletePlayer:r.handleDeletePlayer,onUpdateSelection:r.updateSelectionStatus,onOpenMedia:r.onOpenMedia},null,40,["categories","deleteActive","players","playerStats","playerAddtionalData","stats-loaded","onShowGraph","onShowProfile","onViewProfile","onDeleteFromList","onChangeSelectedPlayers","onSelectedPlayersToDelete","onDeletePlayer","onUpdateSelection","onOpenMedia"]))],2)])])):e.createCommentVNode("",!0)]),_:2},1024)]))),128)),r.filteredLists.length===0&&i.searchText!=""?(e.openBlock(),e.createElementBlock("div",A6," No se encontraron listas que coincidan con tu búsqueda ")):e.createCommentVNode("",!0)])],512)}const P6=be(xa,[["render",L6],["__scopeId","data-v-ee0a15de"]]),I6={class:"subcategory-group"},D6={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("div",I6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(Y),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},v6=J(D6,[["__scopeId","data-v-ae6f3d72"]]),R6={class:"filter-subcategories"},O6=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("div",R6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(v6,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),It=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),z6={class:"details__header"},U6=It(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),j6={class:"details__header__checkbox"},H6={class:"details__body"},W6={class:"details__body__playing-as"},G6=["onClick"],$6={class:"details__header"},q6=It(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Y6={class:"details__header__checkbox"},Z6={class:"details__body"},J6=It(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),K6={class:"details__body__game-section"},X6=["onClick"],Q6={class:"details__body"},eb=It(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),tb={class:"details__body__game-section"},ab=["onClick"],ob=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const a=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const o=e.computed(()=>a.playingAs.every(h=>h.isSelected)),l=e.computed(()=>a.gameSections.every(h=>h.isSelected)),i=e.computed(()=>a.gameSections.reduce((h,m)=>(m.value<=3?h.firstHalf.push(m):h.secondHalf.push(m),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${a.buttonsBorderRadius} 0 0 ${a.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${a.buttonsBorderRadius} ${a.buttonsBorderRadius} 0`}));function n(h){h?a.playingAs.forEach(m=>{m.isSelected=!0}):a.playingAs.forEach((m,y)=>{m.isSelected=y===0})}function s(h){a.playingAs.filter(m=>m.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){a.gameSections.filter(m=>m.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){h?a.gameSections.forEach(m=>{m.isSelected=!0}):a.gameSections.forEach((m,y)=>{m.isSelected=y===0})}return(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",z6,[U6,e.createElementVNode("div",j6,[e.createVNode(e.unref(Y),{label:"Todos","model-value":o.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",H6,[e.createElementVNode("div",W6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.playingAs,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,G6))),128))])]),e.createElementVNode("div",$6,[q6,e.createElementVNode("div",Y6,[e.createVNode(e.unref(Y),{label:"Todos","model-value":l.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),e.createElementVNode("div",Z6,[J6,e.createElementVNode("div",K6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>c(y)},e.toDisplayString(y.text),11,X6))),128))])]),e.createElementVNode("div",Q6,[eb,e.createElementVNode("div",tb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,p)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${p}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>c(y)},e.toDisplayString(y.text),11,ab))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),lb={class:"filter-field"},rb=Object.freeze(Object.defineProperty({__proto__:null,default:J({__name:"FilterField",setup(t){const a=e.ref(Array.from({length:16},(l,i)=>i+1));function o(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",lb,[e.createVNode(e.unref(Io),{width:"100%","background-color":"#2E3B46",value:a.value,"onUpdate:modelValue":o},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));xe.GSCList=P6,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});