@golstats/gsc-reports 1.0.38 → 1.0.39

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.
Files changed (31) hide show
  1. package/README.md +2 -2
  2. package/dist/{FilterConditions-55d68355-BUvCA8gG-BPn5xlRo-DL2yNI8l.js → FilterConditions-55d68355-BUvCA8gG-BPn5xlRo-BqZ9kW1R.js} +1 -1
  3. package/dist/{FilterField-59a73e38-C85AzksG-foC1DM6I-D4V61quH.js → FilterField-59a73e38-C85AzksG-foC1DM6I-DQo9lgMn.js} +1 -1
  4. package/dist/{FilterSubcategories-a9b32cc9-B7ERo60D-DElBxdRY-BDeFqZbJ.js → FilterSubcategories-a9b32cc9-B7ERo60D-DElBxdRY-Cn7e5wLo.js} +1 -1
  5. package/dist/css/fonts.css +83 -83
  6. package/dist/gsc-reports.css +1 -1
  7. package/dist/gsc-reports.es.js +1 -1
  8. package/dist/gsc-reports.umd.js +5 -5
  9. package/dist/{index-DE2YpBdU.js → index-BoKfNOA9.js} +27 -27
  10. package/package.json +1 -1
  11. package/src/components/elementsTemplates/ModalDeleteReport.vue +246 -246
  12. package/src/components/elementsTemplates/ModalDeleteTemplate.vue +249 -249
  13. package/src/components/elementsTemplates/ModalRenameReporte.vue +330 -330
  14. package/src/components/elementsTemplates/ModalRenameTemplate.vue +337 -337
  15. package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
  16. package/src/components/elementsTemplates/ModalduplicateTemplate.vue +300 -300
  17. package/src/components/elementsTemplates/TooltipReportOptions.vue +97 -97
  18. package/src/components/elementsTemplates/TooltipTemplateOptions.vue +168 -168
  19. package/src/components/filters.vue +935 -935
  20. package/src/components/gsc-reports.vue +2 -2
  21. package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
  22. package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
  23. package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +463 -463
  24. package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +462 -462
  25. package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +164 -164
  26. package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +163 -163
  27. package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
  28. package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
  29. package/src/index.js +4 -4
  30. package/src/types.d.ts +45 -45
  31. package/src/utils/dateUtils.js +52 -52
@@ -4083,16 +4083,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4083
4083
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...y){const F=new this(i);return y.forEach(Y=>F.set(Y)),F}static accessor(i){const F=(this[Q6]=this[Q6]={accessors:{}}).accessors,Y=this.prototype;function L(T){const t=lm(T);F[t]||(Ode(Y,T),F[t]=!0)}return Xn.isArray(i)?i.forEach(L):L(i),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Xn.reduceDescriptors(mu.prototype,({value:r},i)=>{let y=i[0].toUpperCase()+i.slice(1);return{get:()=>r,set(F){this[y]=F}}}),Xn.freezeMethods(mu);function Q2(r,i){const y=this||sm,F=i||y,Y=mu.from(F.headers);let L=F.data;return Xn.forEach(r,function(t){L=t.call(y,L,Y.normalize(),i?i.status:void 0)}),Y.normalize(),L}function $6(r){return!!(r&&r.__CANCEL__)}function jp(r,i,y){yi.call(this,r??"canceled",yi.ERR_CANCELED,i,y),this.name="CanceledError"}Xn.inherits(jp,yi,{__CANCEL__:!0});function eT(r,i,y){const F=y.config.validateStatus;!y.status||!F||F(y.status)?r(y):i(new yi("Request failed with status code "+y.status,[yi.ERR_BAD_REQUEST,yi.ERR_BAD_RESPONSE][Math.floor(y.status/100)-4],y.config,y.request,y))}function zde(r){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return i&&i[1]||""}function Rde(r,i){r=r||10;const y=new Array(r),F=new Array(r);let Y=0,L=0,T;return i=i!==void 0?i:1e3,function(b){const d=Date.now(),e=F[L];T||(T=d),y[Y]=b,F[Y]=d;let x=L,m=0;for(;x!==Y;)m+=y[x++],x=x%r;if(Y=(Y+1)%r,Y===L&&(L=(L+1)%r),d-T<i)return;const v=e&&d-e;return v?Math.round(m*1e3/v):void 0}}function Dde(r,i){let y=0,F=1e3/i,Y,L;const T=(d,e=Date.now())=>{y=e,Y=null,L&&(clearTimeout(L),L=null),r(...d)};return[(...d)=>{const e=Date.now(),x=e-y;x>=F?T(d,e):(Y=d,L||(L=setTimeout(()=>{L=null,T(Y)},F-x)))},()=>Y&&T(Y)]}const uy=(r,i,y=3)=>{let F=0;const Y=Rde(50,250);return Dde(L=>{const T=L.loaded,t=L.lengthComputable?L.total:void 0,b=T-F,d=Y(b),e=T<=t;F=T;const x={loaded:T,total:t,progress:t?T/t:void 0,bytes:b,rate:d||void 0,estimated:d&&t&&e?(t-T)/d:void 0,event:L,lengthComputable:t!=null,[i?"download":"upload"]:!0};r(x)},y)},tT=(r,i)=>{const y=r!=null;return[F=>i[0]({lengthComputable:y,total:r,loaded:F}),i[1]]},rT=r=>(...i)=>Xn.asap(()=>r(...i)),Ide=Pc.hasStandardBrowserEnv?((r,i)=>y=>(y=new URL(y,Pc.origin),r.protocol===y.protocol&&r.host===y.host&&(i||r.port===y.port)))(new URL(Pc.origin),Pc.navigator&&/(msie|trident)/i.test(Pc.navigator.userAgent)):()=>!0,Fde=Pc.hasStandardBrowserEnv?{write(r,i,y,F,Y,L){const T=[r+"="+encodeURIComponent(i)];Xn.isNumber(y)&&T.push("expires="+new Date(y).toGMTString()),Xn.isString(F)&&T.push("path="+F),Xn.isString(Y)&&T.push("domain="+Y),L===!0&&T.push("secure"),document.cookie=T.join("; ")},read(r){const i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bde(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Vde(r,i){return i?r.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):r}function nT(r,i,y){let F=!Bde(i);return r&&(F||y==!1)?Vde(r,i):i}const aT=r=>r instanceof mu?{...r}:r;function Jh(r,i){i=i||{};const y={};function F(d,e,x,m){return Xn.isPlainObject(d)&&Xn.isPlainObject(e)?Xn.merge.call({caseless:m},d,e):Xn.isPlainObject(e)?Xn.merge({},e):Xn.isArray(e)?e.slice():e}function Y(d,e,x,m){if(Xn.isUndefined(e)){if(!Xn.isUndefined(d))return F(void 0,d,x,m)}else return F(d,e,x,m)}function L(d,e){if(!Xn.isUndefined(e))return F(void 0,e)}function T(d,e){if(Xn.isUndefined(e)){if(!Xn.isUndefined(d))return F(void 0,d)}else return F(void 0,e)}function t(d,e,x){if(x in i)return F(d,e);if(x in r)return F(void 0,d)}const b={url:L,method:L,data:L,baseURL:T,transformRequest:T,transformResponse:T,paramsSerializer:T,timeout:T,timeoutMessage:T,withCredentials:T,withXSRFToken:T,adapter:T,responseType:T,xsrfCookieName:T,xsrfHeaderName:T,onUploadProgress:T,onDownloadProgress:T,decompress:T,maxContentLength:T,maxBodyLength:T,beforeRedirect:T,transport:T,httpAgent:T,httpsAgent:T,cancelToken:T,socketPath:T,responseEncoding:T,validateStatus:t,headers:(d,e,x)=>Y(aT(d),aT(e),x,!0)};return Xn.forEach(Object.keys({...r,...i}),function(e){const x=b[e]||Y,m=x(r[e],i[e],e);Xn.isUndefined(m)&&x!==t||(y[e]=m)}),y}const iT=r=>{const i=Jh({},r);let{data:y,withXSRFToken:F,xsrfHeaderName:Y,xsrfCookieName:L,headers:T,auth:t}=i;i.headers=T=mu.from(T),i.url=K6(nT(i.baseURL,i.url,i.allowAbsoluteUrls),r.params,r.paramsSerializer),t&&T.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):"")));let b;if(Xn.isFormData(y)){if(Pc.hasStandardBrowserEnv||Pc.hasStandardBrowserWebWorkerEnv)T.setContentType(void 0);else if((b=T.getContentType())!==!1){const[d,...e]=b?b.split(";").map(x=>x.trim()).filter(Boolean):[];T.setContentType([d||"multipart/form-data",...e].join("; "))}}if(Pc.hasStandardBrowserEnv&&(F&&Xn.isFunction(F)&&(F=F(i)),F||F!==!1&&Ide(i.url))){const d=Y&&L&&Fde.read(L);d&&T.set(Y,d)}return i},Ude=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(y,F){const Y=iT(r);let L=Y.data;const T=mu.from(Y.headers).normalize();let{responseType:t,onUploadProgress:b,onDownloadProgress:d}=Y,e,x,m,v,h;function n(){v&&v(),h&&h(),Y.cancelToken&&Y.cancelToken.unsubscribe(e),Y.signal&&Y.signal.removeEventListener("abort",e)}let a=new XMLHttpRequest;a.open(Y.method.toUpperCase(),Y.url,!0),a.timeout=Y.timeout;function u(){if(!a)return;const l=mu.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),g={data:!t||t==="text"||t==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:l,config:r,request:a};eT(function(E){y(E),n()},function(E){F(E),n()},g),a=null}"onloadend"in a?a.onloadend=u:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(u)},a.onabort=function(){a&&(F(new yi("Request aborted",yi.ECONNABORTED,r,a)),a=null)},a.onerror=function(){F(new yi("Network Error",yi.ERR_NETWORK,r,a)),a=null},a.ontimeout=function(){let f=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded";const g=Y.transitional||J6;Y.timeoutErrorMessage&&(f=Y.timeoutErrorMessage),F(new yi(f,g.clarifyTimeoutError?yi.ETIMEDOUT:yi.ECONNABORTED,r,a)),a=null},L===void 0&&T.setContentType(null),"setRequestHeader"in a&&Xn.forEach(T.toJSON(),function(f,g){a.setRequestHeader(g,f)}),Xn.isUndefined(Y.withCredentials)||(a.withCredentials=!!Y.withCredentials),t&&t!=="json"&&(a.responseType=Y.responseType),d&&([m,h]=uy(d,!0),a.addEventListener("progress",m)),b&&a.upload&&([x,v]=uy(b),a.upload.addEventListener("progress",x),a.upload.addEventListener("loadend",v)),(Y.cancelToken||Y.signal)&&(e=l=>{a&&(F(!l||l.type?new jp(null,r,a):l),a.abort(),a=null)},Y.cancelToken&&Y.cancelToken.subscribe(e),Y.signal&&(Y.signal.aborted?e():Y.signal.addEventListener("abort",e)));const s=zde(Y.url);if(s&&Pc.protocols.indexOf(s)===-1){F(new yi("Unsupported protocol "+s+":",yi.ERR_BAD_REQUEST,r));return}a.send(L||null)})},jde=(r,i)=>{const{length:y}=r=r?r.filter(Boolean):[];if(i||y){let F=new AbortController,Y;const L=function(d){if(!Y){Y=!0,t();const e=d instanceof Error?d:this.reason;F.abort(e instanceof yi?e:new jp(e instanceof Error?e.message:e))}};let T=i&&setTimeout(()=>{T=null,L(new yi(`timeout ${i} of ms exceeded`,yi.ETIMEDOUT))},i);const t=()=>{r&&(T&&clearTimeout(T),T=null,r.forEach(d=>{d.unsubscribe?d.unsubscribe(L):d.removeEventListener("abort",L)}),r=null)};r.forEach(d=>d.addEventListener("abort",L));const{signal:b}=F;return b.unsubscribe=()=>Xn.asap(t),b}},qde=function*(r,i){let y=r.byteLength;if(y<i){yield r;return}let F=0,Y;for(;F<y;)Y=F+i,yield r.slice(F,Y),F=Y},Wde=async function*(r,i){for await(const y of Gde(r))yield*qde(y,i)},Gde=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const i=r.getReader();try{for(;;){const{done:y,value:F}=await i.read();if(y)break;yield F}}finally{await i.cancel()}},oT=(r,i,y,F)=>{const Y=Wde(r,i);let L=0,T,t=b=>{T||(T=!0,F&&F(b))};return new ReadableStream({async pull(b){try{const{done:d,value:e}=await Y.next();if(d){t(),b.close();return}let x=e.byteLength;if(y){let m=L+=x;y(m)}b.enqueue(new Uint8Array(e))}catch(d){throw t(d),d}},cancel(b){return t(b),Y.return()}},{highWaterMark:2})},dy=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sT=dy&&typeof ReadableStream=="function",Xde=dy&&(typeof TextEncoder=="function"?(r=>i=>r.encode(i))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),lT=(r,...i)=>{try{return!!r(...i)}catch{return!1}},Hde=sT&&lT(()=>{let r=!1;const i=new Request(Pc.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!i}),cT=64*1024,$2=sT&&lT(()=>Xn.isReadableStream(new Response("").body)),hy={stream:$2&&(r=>r.body)};dy&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!hy[i]&&(hy[i]=Xn.isFunction(r[i])?y=>y[i]():(y,F)=>{throw new yi(`Response type '${i}' is not supported`,yi.ERR_NOT_SUPPORT,F)})})})(new Response);const Kde=async r=>{if(r==null)return 0;if(Xn.isBlob(r))return r.size;if(Xn.isSpecCompliantForm(r))return(await new Request(Pc.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(Xn.isArrayBufferView(r)||Xn.isArrayBuffer(r))return r.byteLength;if(Xn.isURLSearchParams(r)&&(r=r+""),Xn.isString(r))return(await Xde(r)).byteLength},Zde=async(r,i)=>{const y=Xn.toFiniteNumber(r.getContentLength());return y??Kde(i)},eb={http:gde,xhr:Ude,fetch:dy&&(async r=>{let{url:i,method:y,data:F,signal:Y,cancelToken:L,timeout:T,onDownloadProgress:t,onUploadProgress:b,responseType:d,headers:e,withCredentials:x="same-origin",fetchOptions:m}=iT(r);d=d?(d+"").toLowerCase():"text";let v=jde([Y,L&&L.toAbortSignal()],T),h;const n=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let a;try{if(b&&Hde&&y!=="get"&&y!=="head"&&(a=await Zde(e,F))!==0){let g=new Request(i,{method:"POST",body:F,duplex:"half"}),k;if(Xn.isFormData(F)&&(k=g.headers.get("content-type"))&&e.setContentType(k),g.body){const[E,S]=tT(a,uy(rT(b)));F=oT(g.body,cT,E,S)}}Xn.isString(x)||(x=x?"include":"omit");const u="credentials"in Request.prototype;h=new Request(i,{...m,signal:v,method:y.toUpperCase(),headers:e.normalize().toJSON(),body:F,duplex:"half",credentials:u?x:void 0});let s=await fetch(h,m);const l=$2&&(d==="stream"||d==="response");if($2&&(t||l&&n)){const g={};["status","statusText","headers"].forEach(M=>{g[M]=s[M]});const k=Xn.toFiniteNumber(s.headers.get("content-length")),[E,S]=t&&tT(k,uy(rT(t),!0))||[];s=new Response(oT(s.body,cT,E,()=>{S&&S(),n&&n()}),g)}d=d||"text";let f=await hy[Xn.findKey(hy,d)||"text"](s,r);return!l&&n&&n(),await new Promise((g,k)=>{eT(g,k,{data:f,headers:mu.from(s.headers),status:s.status,statusText:s.statusText,config:r,request:h})})}catch(u){throw n&&n(),u&&u.name==="TypeError"&&/Load failed|fetch/i.test(u.message)?Object.assign(new yi("Network Error",yi.ERR_NETWORK,r,h),{cause:u.cause||u}):yi.from(u,u&&u.code,r,h)}})};Xn.forEach(eb,(r,i)=>{if(r){try{Object.defineProperty(r,"name",{value:i})}catch{}Object.defineProperty(r,"adapterName",{value:i})}});const uT=r=>`- ${r}`,Jde=r=>Xn.isFunction(r)||r===null||r===!1,dT={getAdapter:r=>{r=Xn.isArray(r)?r:[r];const{length:i}=r;let y,F;const Y={};for(let L=0;L<i;L++){y=r[L];let T;if(F=y,!Jde(y)&&(F=eb[(T=String(y)).toLowerCase()],F===void 0))throw new yi(`Unknown adapter '${T}'`);if(F)break;Y[T||"#"+L]=F}if(!F){const L=Object.entries(Y).map(([t,b])=>`adapter ${t} `+(b===!1?"is not supported by the environment":"is not available in the build"));let T=i?L.length>1?`since :
4084
4084
  `+L.map(uT).join(`
4085
4085
  `):" "+uT(L[0]):"as no adapter specified";throw new yi("There is no suitable adapter to dispatch the request "+T,"ERR_NOT_SUPPORT")}return F},adapters:eb};function tb(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new jp(null,r)}function hT(r){return tb(r),r.headers=mu.from(r.headers),r.data=Q2.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),dT.getAdapter(r.adapter||sm.adapter)(r).then(function(F){return tb(r),F.data=Q2.call(r,r.transformResponse,F),F.headers=mu.from(F.headers),F},function(F){return $6(F)||(tb(r),F&&F.response&&(F.response.data=Q2.call(r,r.transformResponse,F.response),F.response.headers=mu.from(F.response.headers))),Promise.reject(F)})}const pT="1.11.0",py={};["object","boolean","number","function","string","symbol"].forEach((r,i)=>{py[r]=function(F){return typeof F===r||"a"+(i<1?"n ":" ")+r}});const fT={};py.transitional=function(i,y,F){function Y(L,T){return"[Axios v"+pT+"] Transitional option '"+L+"'"+T+(F?". "+F:"")}return(L,T,t)=>{if(i===!1)throw new yi(Y(T," has been removed"+(y?" in "+y:"")),yi.ERR_DEPRECATED);return y&&!fT[T]&&(fT[T]=!0,console.warn(Y(T," has been deprecated since v"+y+" and will be removed in the near future"))),i?i(L,T,t):!0}},py.spelling=function(i){return(y,F)=>(console.warn(`${F} is likely a misspelling of ${i}`),!0)};function Yde(r,i,y){if(typeof r!="object")throw new yi("options must be an object",yi.ERR_BAD_OPTION_VALUE);const F=Object.keys(r);let Y=F.length;for(;Y-- >0;){const L=F[Y],T=i[L];if(T){const t=r[L],b=t===void 0||T(t,L,r);if(b!==!0)throw new yi("option "+L+" must be "+b,yi.ERR_BAD_OPTION_VALUE);continue}if(y!==!0)throw new yi("Unknown option "+L,yi.ERR_BAD_OPTION)}}const fy={assertOptions:Yde,validators:py},_d=fy.validators;let Yh=class{constructor(i){this.defaults=i||{},this.interceptors={request:new Z6,response:new Z6}}async request(i,y){try{return await this._request(i,y)}catch(F){if(F instanceof Error){let Y={};Error.captureStackTrace?Error.captureStackTrace(Y):Y=new Error;const L=Y.stack?Y.stack.replace(/^.+\n/,""):"";try{F.stack?L&&!String(F.stack).endsWith(L.replace(/^.+\n.+\n/,""))&&(F.stack+=`
4086
- `+L):F.stack=L}catch{}}throw F}}_request(i,y){typeof i=="string"?(y=y||{},y.url=i):y=i||{},y=Jh(this.defaults,y);const{transitional:F,paramsSerializer:Y,headers:L}=y;F!==void 0&&fy.assertOptions(F,{silentJSONParsing:_d.transitional(_d.boolean),forcedJSONParsing:_d.transitional(_d.boolean),clarifyTimeoutError:_d.transitional(_d.boolean)},!1),Y!=null&&(Xn.isFunction(Y)?y.paramsSerializer={serialize:Y}:fy.assertOptions(Y,{encode:_d.function,serialize:_d.function},!0)),y.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:y.allowAbsoluteUrls=!0),fy.assertOptions(y,{baseUrl:_d.spelling("baseURL"),withXsrfToken:_d.spelling("withXSRFToken")},!0),y.method=(y.method||this.defaults.method||"get").toLowerCase();let T=L&&Xn.merge(L.common,L[y.method]);L&&Xn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete L[h]}),y.headers=mu.concat(T,L);const t=[];let b=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(y)===!1||(b=b&&n.synchronous,t.unshift(n.fulfilled,n.rejected))});const d=[];this.interceptors.response.forEach(function(n){d.push(n.fulfilled,n.rejected)});let e,x=0,m;if(!b){const h=[hT.bind(this),void 0];for(h.unshift(...t),h.push(...d),m=h.length,e=Promise.resolve(y);x<m;)e=e.then(h[x++],h[x++]);return e}m=t.length;let v=y;for(x=0;x<m;){const h=t[x++],n=t[x++];try{v=h(v)}catch(a){n.call(this,a);break}}try{e=hT.call(this,v)}catch(h){return Promise.reject(h)}for(x=0,m=d.length;x<m;)e=e.then(d[x++],d[x++]);return e}getUri(i){i=Jh(this.defaults,i);const y=nT(i.baseURL,i.url,i.allowAbsoluteUrls);return K6(y,i.params,i.paramsSerializer)}};Xn.forEach(["delete","get","head","options"],function(i){Yh.prototype[i]=function(y,F){return this.request(Jh(F||{},{method:i,url:y,data:(F||{}).data}))}}),Xn.forEach(["post","put","patch"],function(i){function y(F){return function(L,T,t){return this.request(Jh(t||{},{method:i,headers:F?{"Content-Type":"multipart/form-data"}:{},url:L,data:T}))}}Yh.prototype[i]=y(),Yh.prototype[i+"Form"]=y(!0)});let Qde=class UT{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let y;this.promise=new Promise(function(L){y=L});const F=this;this.promise.then(Y=>{if(!F._listeners)return;let L=F._listeners.length;for(;L-- >0;)F._listeners[L](Y);F._listeners=null}),this.promise.then=Y=>{let L;const T=new Promise(t=>{F.subscribe(t),L=t}).then(Y);return T.cancel=function(){F.unsubscribe(L)},T},i(function(L,T,t){F.reason||(F.reason=new jp(L,T,t),y(F.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const y=this._listeners.indexOf(i);y!==-1&&this._listeners.splice(y,1)}toAbortSignal(){const i=new AbortController,y=F=>{i.abort(F)};return this.subscribe(y),i.signal.unsubscribe=()=>this.unsubscribe(y),i.signal}static source(){let i;return{token:new UT(function(Y){i=Y}),cancel:i}}};function $de(r){return function(y){return r.apply(null,y)}}function ehe(r){return Xn.isObject(r)&&r.isAxiosError===!0}const rb={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(rb).forEach(([r,i])=>{rb[i]=r});function mT(r){const i=new Yh(r),y=O6(Yh.prototype.request,i);return Xn.extend(y,Yh.prototype,i,{allOwnKeys:!0}),Xn.extend(y,i,null,{allOwnKeys:!0}),y.create=function(Y){return mT(Jh(r,Y))},y}const to=mT(sm);to.Axios=Yh,to.CanceledError=jp,to.CancelToken=Qde,to.isCancel=$6,to.VERSION=pT,to.toFormData=ly,to.AxiosError=yi,to.Cancel=to.CanceledError,to.all=function(i){return Promise.all(i)},to.spread=$de,to.isAxiosError=ehe,to.mergeConfig=Jh,to.AxiosHeaders=mu,to.formToJSON=r=>Y6(Xn.isHTMLForm(r)?new FormData(r):r),to.getAdapter=dT.getAdapter,to.HttpStatusCode=rb,to.default=to;const{Axios:Lve,AxiosError:Pve,CanceledError:Nve,isCancel:Ove,CancelToken:zve,VERSION:Rve,all:Dve,Cancel:Ive,isAxiosError:Fve,spread:Bve,toFormData:Vve,AxiosHeaders:Uve,HttpStatusCode:jve,formToJSON:qve,getAdapter:Wve,mergeConfig:Gve}=to,ws=(r,i)=>{const y=r.__vccOpts||r;for(const[F,Y]of i)y[F]=Y;return y},the={class:"tooltip-template-options"},rhe=ws({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(r,{emit:i}){return(y,F)=>(p.openBlock(),p.createElementBlock("div",the,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:F[0]||(F[0]=Y=>y.$emit("generar-reporte"))},F[5]||(F[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),p.createTextVNode(" Generar reporte ",-1)])),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:0,class:"option",onClick:F[1]||(F[1]=Y=>y.$emit("renombrar"))},F[6]||(F[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),p.createTextVNode(" Renombrar template ",-1)]))):p.createCommentVNode("",!0),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:1,class:"option",onClick:F[2]||(F[2]=Y=>y.$emit("editar"))},F[7]||(F[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),p.createTextVNode(" Editar template ",-1)]))):p.createCommentVNode("",!0),p.createElementVNode("li",{class:"option",onClick:F[3]||(F[3]=Y=>y.$emit("duplicar"))},F[8]||(F[8]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),p.createTextVNode(" Duplicar template ",-1)])),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:2,class:"option",onClick:F[4]||(F[4]=Y=>y.$emit("eliminar"))},F[9]||(F[9]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),p.createTextVNode(" Eliminar template ",-1)]))):p.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-127740d3"]]),nhe={class:"template-card postpartido",style:{position:"relative"}},ahe={key:0,class:"template-img-placeholder",style:{position:"relative"}},ihe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},ohe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},she={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},lhe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},che={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},uhe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},dhe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},hhe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},phe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},fhe={class:"inner-card-postpartido"},mhe={class:"postpartido-footer"},ghe={class:"postpartido-version"},yhe={class:"postpartido-status"},vhe={class:"tipo-value"},bhe=ws({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1),L=p.computed(()=>y.userId===y.template.user_id);function T(){console.log("generar-reporte"),Y.value=!1,F("generar-reporte")}function t(){console.log("renombrar"),Y.value=!1;const m=y.template.name||"";F("renombrar",m)}function b(){console.log("editar"),Y.value=!1,F("edit-template",y.template)}function d(){console.log("duplicar"),Y.value=!1;const m=y.template.name||"";F("duplicar",m)}function e(){console.log("eliminar"),Y.value=!1,F("eliminar",y.template)}function x(m){console.log("toggle-autogen",m)}return(m,v)=>(p.openBlock(),p.createElementBlock("div",nhe,[p.createElementVNode("div",{class:"three-dots",onClick:v[0]||(v[0]=p.withModifiers(h=>Y.value=!Y.value,["stop"]))},v[5]||(v[5]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])),r.template.pages&&r.template.pages[0]?(p.openBlock(),p.createElementBlock("div",ahe,[r.template.template_type===1&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ihe)):r.template.template_type===2&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ohe)):r.template.template_type===1&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",she)):r.template.template_type===2&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",lhe)):r.template.template_type===1&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",che)):r.template.template_type===2&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",uhe)):r.template.template_type===1&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",dhe)):r.template.template_type===2&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",hhe)):(p.openBlock(),p.createElementBlock("img",phe))])):p.createCommentVNode("",!0),p.createElementVNode("div",fhe,[p.createElementVNode("div",mhe,[p.createElementVNode("div",ghe,p.toDisplayString(r.template.name),1),p.createElementVNode("div",yhe,[v[6]||(v[6]=p.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),p.createElementVNode("span",vhe," "+p.toDisplayString(r.template.template_type==1?"Prepartido":"Postpartido"),1)]),p.createElementVNode("button",{class:"postpartido-btn",onClick:v[1]||(v[1]=h=>F("generar-reporte"))},"Generar reporte")])]),Y.value?(p.openBlock(),p.createBlock(rhe,{key:1,"can-edit":L.value,onClick:v[2]||(v[2]=p.withModifiers(h=>Y.value=!1,["self"])),onMouseleave:v[3]||(v[3]=h=>Y.value=!1),onGenerarReporte:T,onRenombrar:t,onEditar:b,onDuplicar:d,onEliminar:e,onToggleAutogen:x},null,8,["can-edit"])):p.createCommentVNode("",!0),Y.value?(p.openBlock(),p.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:v[4]||(v[4]=h=>Y.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-06712795"]]),xhe={class:"modal-overlay"},_he={class:"modal-content"},whe={class:"modal-body"},The={class:"radio-group"},khe=["disabled"],She={key:0,class:"error-message"},Ehe={class:"modal-footer"},Che=["disabled"],Ahe=["disabled"],Mhe=["disabled"],Lhe={key:0,class:"loading-spinner"},Phe={key:1},gT=ws({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(1),L=p.ref("pre"),T=p.ref(""),t=p.ref(!1),b=p.ref(""),d=async()=>{var e;if(!(T.value.trim().length<3)){t.value=!0,b.value="";try{const x={name:T.value.trim(),team_id:y.team,template_type:L.value==="pre"?1:2};console.log("toke mostrado es: ",y.token);const v=await to.create({headers:{Authorization:`${y.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",x);console.log("response.data",v.data),F("template-created",v.data),F("open-modal-new-template",(e=v.data)==null?void 0:e.data),F("close")}catch(x){console.error("Error al guardar template:",x),x.response&&x.response.status===409&&(b.value="Ya existe un template con el mismo nombre")}finally{t.value=!1}}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(e,x)=>(p.openBlock(),p.createElementBlock("div",xhe,[p.createElementVNode("div",_he,[p.createElementVNode("button",{class:"close-btn",onClick:x[0]||(x[0]=m=>e.$emit("close"))},x[6]||(x[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),x[11]||(x[11]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),x[12]||(x[12]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",whe,[Y.value===1?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[x[9]||(x[9]=p.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),p.createElementVNode("div",The,[p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:L.value==="pre"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":x[1]||(x[1]=m=>L.value=m)},null,512),[[p.vModelRadio,L.value]]),x[7]||(x[7]=p.createTextVNode(" Prepartido ",-1))],2),p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:L.value==="post"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":x[2]||(x[2]=m=>L.value=m)},null,512),[[p.vModelRadio,L.value]]),x[8]||(x[8]=p.createTextVNode(" Postpartido ",-1))],2)])],64)):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x[10]||(x[10]=p.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":x[3]||(x[3]=m=>T.value=m),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:t.value},null,8,khe),[[p.vModelText,T.value]]),b.value?(p.openBlock(),p.createElementBlock("div",She,p.toDisplayString(b.value),1)):p.createCommentVNode("",!0)],64))]),x[13]||(x[13]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ehe,[p.createElementVNode("button",{class:"cancel-btn",onClick:x[4]||(x[4]=m=>e.$emit("close")),disabled:t.value},"Cancelar",8,Che),Y.value===1?(p.openBlock(),p.createElementBlock("button",{key:0,class:"next-btn",disabled:!L.value,onClick:x[5]||(x[5]=m=>Y.value=2)}," Siguiente ",8,Ahe)):(p.openBlock(),p.createElementBlock("button",{key:1,class:"next-btn",disabled:T.value.trim().length<3||t.value,onClick:d},[t.value?(p.openBlock(),p.createElementBlock("div",Lhe)):(p.openBlock(),p.createElementBlock("span",Phe,"Guardar"))],8,Mhe))])])]))}},[["__scopeId","data-v-7e85c356"]]),Nhe={class:"modal-overlay"},Ohe={class:"modal-content"},zhe={class:"modal-body"},Rhe={key:0,class:"error-message-container"},Dhe={key:1},Ihe={class:"modal-group"},Fhe={key:0,class:"placeholder"},Bhe={key:0,class:"placeholder"},Vhe={key:1},Uhe={key:0,class:"custom-select-dropdown"},jhe=["onMousedown"],qhe={class:"modal-row"},Whe={class:"modal-group"},Ghe={key:0,class:"placeholder"},Xhe={key:0,class:"placeholder"},Hhe={key:1},Khe={key:0,class:"custom-select-dropdown"},Zhe=["onMousedown"],Jhe={class:"modal-group"},Yhe={key:0,class:"placeholder"},Qhe={key:0,class:"placeholder"},$he={key:1},epe={key:0,class:"custom-select-dropdown"},tpe=["onMousedown"],rpe={class:"modal-group"},npe={key:0,class:"placeholder"},ape={key:0,class:"placeholder"},ipe=["src"],ope=["src"],spe={key:0,class:"custom-select-dropdown"},lpe=["onMousedown"],cpe=["src"],upe=["src"],dpe={key:0,class:"header-separator"},hpe={key:1,class:"modal-footer"},ppe=["disabled"],fpe={key:0,class:"loading-spinner select-spinner"},mpe=ws({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1}},emits:["close","generar","switch-to-reports"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref([]),L=p.ref([]),T=p.ref([]),t=p.ref([]),b=p.ref(""),d=p.ref(""),e=p.ref(""),x=p.ref(null),m=to.create({headers:{Authorization:y.token}}),v=p.ref(!1),h=p.ref(!1),n=p.ref(!1),a=p.ref(!1),u=p.ref(!1),s=p.ref([]),l=p.ref([]),f=p.ref(!1),g=p.ref(!1),k=p.ref(!1);function E(q){b.value=q,f.value=!1,P()}function S(q){d.value=q,g.value=!1,A()}function M(q){e.value=q,k.value=!1,O()}async function N(){try{h.value=!0;const q=await to.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");q.data&&Array.isArray(q.data)&&(s.value=q.data,Y.value=q.data.map(J=>J.tournament).sort((J,ne)=>J.order&&ne.order?J.order-ne.order:J.order&&!ne.order?-1:!J.order&&ne.order?1:0),b.value="",L.value=[],d.value="",T.value=[],e.value="",t.value=[],x.value=null)}catch(q){console.error("Error al cargar torneos:",q),Y.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],L.value=[],T.value=[],b.value="",d.value="",e.value="",x.value=null}finally{h.value=!1}}function C(q){const J=s.value.find(ne=>ne.tournament&&ne.tournament.name===q.name);J&&Array.isArray(J.seasons)?(L.value=J.seasons,d.value="",T.value=[],e.value="",t.value=[],x.value=null):(L.value=[],d.value="",T.value=[],e.value="",t.value=[],x.value=null)}function P(){d.value="",e.value="",x.value=null,b.value?C(b.value):(L.value=[],T.value=[],t.value=[])}function A(){if(a.value=!0,e.value="",x.value=null,T.value=[],t.value=[],d.value&&d.value.id){const q=[d.value.id];if(d.value.related_seasons&&Array.isArray(d.value.related_seasons)){const J=d.value.related_seasons.map(ne=>ne.id).filter(Boolean);q.push(...J),console.log("relatedIds",J)}w(q)}setTimeout(()=>{a.value=!1},400)}async function w(q){n.value=!0;try{const J=Array.isArray(q)?q.join("&seasons="):q,ne=await m.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${J}`);if(console.log("response.data:: 2",ne.data),ne.data.data&&Array.isArray(ne.data.data)){console.log("response.data:: 4ddd",ne.data.data);const H=ne.data.data.reduce((Z,ee)=>ee.games&&Array.isArray(ee.games)?Z.concat(ee.games):Z,[]);console.log("Todos los partidos unidos:",H),l.value=H.map(Z=>({label:Z.label||`${Z.home_team_acronym||"Local"} vs ${Z.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+Z.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+Z.visiting_team+".png"||"",...Z}));let re=l.value;y.templateType==="2"||y.templateType===2?re=re.filter(Z=>Z.game_status===1):(y.templateType==="1"||y.templateType===1)&&(re=re.filter(Z=>Z.game_status===4));const te=[...new Set(re.map(Z=>Z.matchday_id).filter(Boolean))];T.value=te.map(Z=>{const ee=l.value.find(le=>le.matchday_id&&le.matchday_id===Z);return{id:Z,name:ee.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}}).sort((Z,ee)=>{const le=Z.name.startsWith("Jornada"),ce=ee.name.startsWith("Jornada");return le&&ce?Z.id-ee.id:le&&!ce?-1:!le&&ce?1:0}),console.log("jornadas: ",T),e.value="",t.value=[],x.value=null}else l.value=[],T.value=[],e.value="",t.value=[],x.value=null}catch(J){console.error("Error al cargar partidos:",J),l.value=[],T.value=[],e.value="",t.value=[],x.value=null}finally{n.value=!1}}function O(){x.value=null,t.value=[],e.value&&e.value.id&&_(e.value)}function _(q){if(!q||!q.id){t.value=[];return}let J=l.value.filter(ne=>ne.matchday_id===q.id);y.templateType==="2"||y.templateType===2?J=J.filter(ne=>ne.game_status===1):(y.templateType==="1"||y.templateType===1)&&(J=J.filter(ne=>ne.game_status===4)),t.value=J}async function z(){try{h.value=!0;let q="";d.value&&d.value.name&&(q=d.value.name);const J={template_id:y.templateId,user_id:parseInt(y.userId),tournament_id:b.value.id||1,tournament_name:b.value.name,season_id:x.value.season_id,season_name:q,game_id:x.value.id||x.value.game_id},ne=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports`,J,{headers:{Authorization:y.token,"Content-Type":"application/json"}});console.log("Reporte generado exitosamente:",ne.data),F("generar",{liga:b.value,torneo:d.value,jornada:e.value,partido:x.value,reportData:ne.data}),F("switch-to-reports"),F("close")}catch(q){console.error("Error al generar el reporte:",q),q.response&&q.response.status===409?u.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function I(q){x.value=q,v.value=!1}function V(){document.body.style.overflow="hidden"}function j(){document.body.style.overflow=""}p.onMounted(()=>{N(),V()}),p.onUnmounted(()=>{j()});function G(){u.value=!1,j(),F("close")}return(q,J)=>(p.openBlock(),p.createElementBlock("div",Nhe,[p.createElementVNode("div",Ohe,[p.createElementVNode("button",{class:"close-btn",onClick:J[0]||(J[0]=ne=>q.$emit("close"))},J[10]||(J[10]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),J[24]||(J[24]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),p.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),J[25]||(J[25]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",zhe,[u.value?(p.openBlock(),p.createElementBlock("div",Rhe,[J[11]||(J[11]=p.createElementVNode("p",{class:"error-text"},[p.createTextVNode(" Este reporte ya fue generado previamente"),p.createElementVNode("br"),p.createTextVNode(" con este template para el partido seleccionado. ")],-1)),p.createElementVNode("button",{class:"accept-btn",onClick:G},"Aceptar")])):(p.openBlock(),p.createElementBlock("div",Dhe,[p.createElementVNode("div",Ihe,[J[14]||(J[14]=p.createElementVNode("label",null,"1. Elige la liga",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:J[1]||(J[1]=ne=>f.value=!f.value),onBlur:J[2]||(J[2]=ne=>f.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:h.value||Y.value.length===0}])},[h.value?(p.openBlock(),p.createElementBlock("span",Fhe,J[12]||(J[12]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando ligas...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[b.value?(p.openBlock(),p.createElementBlock("span",Vhe,p.toDisplayString(b.value.name),1)):(p.openBlock(),p.createElementBlock("span",Bhe,"Selecciona la liga"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:f.value}])},J[13]||(J[13]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),f.value&&Y.value.length>0?(p.openBlock(),p.createElementBlock("div",Uhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.name,class:"custom-select-option",onMousedown:p.withModifiers(H=>E(ne),["prevent"])},p.toDisplayString(ne.name),41,jhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",qhe,[p.createElementVNode("div",Whe,[J[17]||(J[17]=p.createElementVNode("label",null,"2. Elige el torneo",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:J[3]||(J[3]=ne=>g.value=!g.value),onBlur:J[4]||(J[4]=ne=>g.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!b.value||L.value.length===0||h.value}])},[h.value?(p.openBlock(),p.createElementBlock("span",Ghe,J[15]||(J[15]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando torneos...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[d.value?(p.openBlock(),p.createElementBlock("span",Hhe,p.toDisplayString(d.value.name),1)):(p.openBlock(),p.createElementBlock("span",Xhe,"Elige el torneo"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:g.value}])},J[16]||(J[16]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),g.value&&L.value.length>0&&b.value?(p.openBlock(),p.createElementBlock("div",Khe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(L.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.id,class:"custom-select-option",onMousedown:p.withModifiers(H=>S(ne),["prevent"])},p.toDisplayString(ne.name),41,Zhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Jhe,[J[20]||(J[20]=p.createElementVNode("label",null,"3. Elige la jornada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:J[5]||(J[5]=ne=>k.value=!k.value),onBlur:J[6]||(J[6]=ne=>k.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!d.value||T.value.length===0||a.value}])},[a.value?(p.openBlock(),p.createElementBlock("span",Yhe,J[18]||(J[18]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando jornadas...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[e.value?(p.openBlock(),p.createElementBlock("span",$he,p.toDisplayString(e.value.name),1)):(p.openBlock(),p.createElementBlock("span",Qhe,"Elige la jornada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:k.value}])},J[19]||(J[19]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),k.value&&T.value.length>0&&d.value?(p.openBlock(),p.createElementBlock("div",epe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(T.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.id,class:"custom-select-option",onMousedown:p.withModifiers(H=>M(ne),["prevent"])},p.toDisplayString(ne.name),41,tpe))),128))])):p.createCommentVNode("",!0)],32)])]),p.createElementVNode("div",rpe,[J[23]||(J[23]=p.createElementVNode("label",null,"4. Elige el partido",-1)),p.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:J[7]||(J[7]=ne=>v.value=!v.value),onBlur:J[8]||(J[8]=ne=>v.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!e.value||n.value}])},[n.value?(p.openBlock(),p.createElementBlock("span",npe,J[21]||(J[21]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando partidos...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x.value.localLogo?(p.openBlock(),p.createElementBlock("img",{key:0,src:x.value.localLogo,class:"logo-equipo",alt:"local"},null,8,ipe)):p.createCommentVNode("",!0),p.createElementVNode("span",null,p.toDisplayString(x.value.label),1),x.value.visitanteLogo?(p.openBlock(),p.createElementBlock("img",{key:1,src:x.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,ope)):p.createCommentVNode("",!0)],64)):(p.openBlock(),p.createElementBlock("span",ape,"Selecciona el partido"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:v.value}])},J[22]||(J[22]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),v.value&&!n.value&&e.value?(p.openBlock(),p.createElementBlock("div",spe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(t.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.label,class:"custom-select-option",onMousedown:p.withModifiers(H=>I(ne),["prevent"])},[p.createElementVNode("img",{src:ne.localLogo,class:"logo-equipo",alt:"local"},null,8,cpe),p.createElementVNode("span",null,p.toDisplayString(ne.label),1),p.createElementVNode("img",{src:ne.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,upe)],40,lpe))),128))])):p.createCommentVNode("",!0)],32)])]))]),u.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",dpe)),u.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",hpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:J[9]||(J[9]=ne=>q.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:!b.value||!d.value||!e.value||!x.value||h.value,onClick:z},[h.value?(p.openBlock(),p.createElementBlock("span",fpe)):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(h.value?"Generando...":"Generar"),1)],8,ppe)]))])]))}},[["__scopeId","data-v-d86b1497"]]),gpe={class:"modal-overlay"},ype={class:"modal-content"},vpe={class:"modal-body"},bpe=["placeholder","disabled"],xpe={key:0,class:"error-message"},_pe={class:"modal-footer"},wpe=["disabled"],Tpe=["disabled"],kpe={key:0},Spe={key:1},Epe=ws({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName),L=p.ref(!1),T=p.ref("");p.watch(()=>y.initialName,b=>{Y.value=b,T.value=""}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function t(){var b;if(console.log("acceptRename"),!(Y.value.trim().length<3)){console.log("acceptRename 22"),L.value=!0,T.value="";try{await to.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/templates/${y.templateId}/general`,{name:Y.value.trim()},{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}}),F("rename",Y.value.trim()),F("refresh"),F("close")}catch(d){console.error("Error al renombrar el template:",d),((b=d.response)==null?void 0:b.status)===409?T.value="Ya existe un template con el mismo nombre":T.value="Error al renombrar el template. Inténtalo de nuevo."}finally{L.value=!1}}}return(b,d)=>(p.openBlock(),p.createElementBlock("div",gpe,[p.createElementVNode("div",ype,[p.createElementVNode("button",{class:"close-btn",onClick:d[0]||(d[0]=e=>b.$emit("close"))},d[3]||(d[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),d[5]||(d[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),d[6]||(d[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",vpe,[d[4]||(d[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":d[1]||(d[1]=e=>Y.value=e),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:L.value},null,8,bpe),[[p.vModelText,Y.value]]),T.value?(p.openBlock(),p.createElementBlock("div",xpe,p.toDisplayString(T.value),1)):p.createCommentVNode("",!0)]),d[7]||(d[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",_pe,[p.createElementVNode("button",{class:"cancel-btn",onClick:d[2]||(d[2]=e=>b.$emit("close")),disabled:L.value},"Cancelar",8,wpe),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:t},[L.value?(p.openBlock(),p.createElementBlock("span",kpe,"Guardando...")):(p.openBlock(),p.createElementBlock("span",Spe,"Guardar"))],8,Tpe)])])]))}},[["__scopeId","data-v-2f6df9c1"]]),Cpe={class:"modal-overlay"},Ape={class:"modal-content"},Mpe={class:"modal-body"},Lpe=["placeholder"],Ppe={class:"modal-footer"},Npe=["disabled"],Ope=ws({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName+" copy"),L=p.ref(!1);p.watch(()=>y.initialName,t=>{Y.value=t+" copy"}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function T(){if(Y.value.trim().length>=3&&!L.value){L.value=!0;try{const t=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${y.templateId}/duplicate`,{name:Y.value.trim()},{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}});F("template-duplicated",{originalTemplateId:y.templateId,newTemplateName:Y.value.trim(),responseData:t.data}),F("close")}catch(t){console.error("Error al duplicar template:",t),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{L.value=!1}}}return(t,b)=>(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Ape,[p.createElementVNode("button",{class:"close-btn",onClick:b[0]||(b[0]=d=>t.$emit("close"))},b[3]||(b[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),b[5]||(b[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),b[6]||(b[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Mpe,[b[4]||(b[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":b[1]||(b[1]=d=>Y.value=d),placeholder:r.initialName,maxlength:"40",autocomplete:"off"},null,8,Lpe),[[p.vModelText,Y.value]])]),b[7]||(b[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ppe,[p.createElementVNode("button",{class:"cancel-btn",onClick:b[2]||(b[2]=d=>t.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:T},p.toDisplayString(L.value?"Duplicando...":"Aceptar"),9,Npe)])])]))}},[["__scopeId","data-v-abfffcd1"]]),zpe={class:"modal-overlay"},Rpe={class:"modal-content"},Dpe={class:"modal-footer"},Ipe=["disabled"],Fpe=ws({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1);p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});const L=async()=>{try{Y.value=!0;const t=await to.create({headers:{Authorization:`${y.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/templates/${y.templateId}`);(t.status===200||t.status===204)&&(F("templateDeleted",y.templateId),F("close"))}catch(T){console.error("Error al eliminar template:",T),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{Y.value=!1}};return(T,t)=>(p.openBlock(),p.createElementBlock("div",zpe,[p.createElementVNode("div",Rpe,[p.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=b=>T.$emit("close"))},t[2]||(t[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=p.createStaticVNode('<div class="modal-header" data-v-93a27145><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-93a27145><span class="modal-title" data-v-93a27145>Eliminar template</span></div><div class="header-separator" data-v-93a27145></div><div class="modal-body confirm-text" data-v-93a27145> ¿Estás seguro que deseas eliminar<br data-v-93a27145> este template? Si lo haces no habrá manera<br data-v-93a27145> de recuperarlo. </div><div class="header-separator" data-v-93a27145></div>',4)),p.createElementVNode("div",Dpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=b=>T.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"delete-btn",onClick:L,disabled:Y.value},p.toDisplayString(Y.value?"Eliminando...":"Eliminar"),9,Ipe)])])]))}},[["__scopeId","data-v-93a27145"]]),Bpe={class:"templates-header"},Vpe={class:"count"},Upe={key:0,class:"sort-options"},jpe=["onClick"],qpe={key:0,class:"checkmark"},Wpe={key:0,class:"loading-state"},Gpe=ws({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(r,{expose:i,emit:y}){const F=y,Y=r,L=p.ref(!1),T=p.ref(null),t=p.ref(!1),b=p.ref(!1),d=p.ref(!1),e=p.ref(!1),x=p.ref(!1),m=p.ref(""),v=p.ref(""),h=p.ref(""),n=p.ref(""),a=p.ref(""),u=p.ref(""),s=p.ref(""),l=p.ref(""),f=p.ref(""),g=p.ref(null),k=p.ref(null),E=p.ref(null),S=p.ref(0),M=p.ref([]),N=p.ref(!1),C=p.ref(null);p.watch([()=>Y.team,()=>Y.token],()=>{Y.team&&Y.token&&A()},{immediate:!1});const P=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],A=async()=>{try{N.value=!0,C.value=null;const ne=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${Y.team}`,{headers:{Authorization:`${Y.token}`,"Content-Type":"application/json"}});ne.data&&Array.isArray(ne.data)?M.value=ne.data:ne.data&&ne.data.templates?M.value=ne.data.templates:ne.data&&ne.data.data?M.value=ne.data.data:M.value=[]}catch(ne){console.error("Error al obtener templates:",ne),console.error("Error response:",ne.response),C.value=ne.message||"Error al cargar los templates",M.value=[]}finally{N.value=!1}},w=p.computed(()=>{if(!M.value.length)return[];let ne=[...M.value];if(Y.searchQuery.trim()){const H=Y.searchQuery.toLowerCase().trim();ne=ne.filter(re=>re.name.toLowerCase().includes(H))}switch(T.value){case"name-asc":return ne.sort((H,re)=>H.name.localeCompare(re.name));case"date-desc":return ne.sort((H,re)=>new Date(re.created_at)-new Date(H.created_at));default:return ne}}),O=p.computed(()=>{if(!S.value)return"grid-1-column";const ne=340,H=20,te=S.value-40,Z=Math.floor((te+H)/(ne+H)),ee=Math.max(1,Z);return ee>=4?"grid-4-columns":ee>=3?"grid-3-columns":ee>=2?"grid-2-columns":"grid-1-column"}),_=()=>{L.value=!L.value},z=ne=>{T.value=ne,L.value=!1},I=ne=>{const H=P.find(re=>re.value===ne);return H?H.label:null},V=ne=>{L.value&&g.value&&!g.value.contains(ne.target)&&(L.value=!1)},j=()=>{k.value&&(S.value=k.value.offsetWidth)};function G(ne){F("edit-template",ne)}let q=null;p.onMounted(async()=>{document.addEventListener("mousedown",V),await p.nextTick(),j(),window.ResizeObserver?(q=new ResizeObserver(()=>{j()}),k.value&&q.observe(k.value)):window.addEventListener("resize",j),A()});function J(ne){console.log("onOpenModalNewTemplate template section, called with data:",ne),F("open-modal-new-template",ne)}return p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",V),q?q.disconnect():window.removeEventListener("resize",j)}),i({obtenerTemplates:A}),(ne,H)=>(p.openBlock(),p.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:k},[p.createElementVNode("div",Bpe,[p.createElementVNode("span",null,[H[11]||(H[11]=p.createTextVNode("Templates ",-1)),p.createElementVNode("span",Vpe,"("+p.toDisplayString(w.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:g},[p.createElementVNode("button",{class:"sort-button",onClick:_},[p.createTextVNode(p.toDisplayString(I(T.value)||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:L.value}])},null,2)]),L.value?(p.openBlock(),p.createElementBlock("div",Upe,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(P,re=>p.createElementVNode("div",{key:re.value,class:p.normalizeClass(["sort-option",{selected:T.value===re.value}]),onClick:te=>z(re.value)},[p.createElementVNode("span",null,p.toDisplayString(re.label),1),T.value===re.value?(p.openBlock(),p.createElementBlock("span",qpe,H[12]||(H[12]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)],10,jpe)),64))])):p.createCommentVNode("",!0)],512)]),N.value?(p.openBlock(),p.createElementBlock("div",Wpe,H[13]||(H[13]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando templates...",-1)]))):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["templates-list",O.value]),ref_key:"templatesListRef",ref:E},[p.createElementVNode("div",{class:"template-card create",onClick:H[0]||(H[0]=re=>t.value=!0)},H[14]||(H[14]=[p.createElementVNode("div",{class:"inner-card"},[p.createElementVNode("div",{class:"plus"},[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),p.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(w.value,re=>(p.openBlock(),p.createBlock(bhe,{key:re.id,template:re,"user-id":r.userId,onGenerarReporte:te=>{s.value=re.id,f.value=re.template_type,b.value=!0},onRenombrar:te=>{l.value=re.id,m.value=te,v.value=re.template_type,d.value=!0},onDuplicar:te=>{u.value=re.id,h.value=te,e.value=!0},onEliminar:te=>{n.value=te.name,a.value=te.id,x.value=!0},onEditTemplate:G},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),t.value?(p.openBlock(),p.createBlock(gT,{key:2,token:r.token,team:r.team,onClose:H[1]||(H[1]=re=>t.value=!1),onOpenModalNewTemplate:J},null,8,["token","team"])):p.createCommentVNode("",!0),b.value?(p.openBlock(),p.createBlock(mpe,{key:3,"user-id":r.userId,token:r.token,"template-id":s.value,"template-type":f.value,onClose:H[2]||(H[2]=re=>b.value=!1),onSwitchToReports:H[3]||(H[3]=re=>ne.$emit("switch-to-reports"))},null,8,["user-id","token","template-id","template-type"])):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(Epe,{key:4,initialName:m.value,token:r.token,"template-id":l.value,"template-type":v.value,"user-id":r.userId,onRefresh:H[4]||(H[4]=re=>A()),onClose:H[5]||(H[5]=re=>d.value=!1),onRename:H[6]||(H[6]=re=>{d.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):p.createCommentVNode("",!0),e.value?(p.openBlock(),p.createBlock(Ope,{key:5,initialName:h.value,token:r.token,"template-id":u.value,onClose:H[7]||(H[7]=re=>e.value=!1),onTemplateDuplicated:H[8]||(H[8]=re=>{e.value=!1,A()})},null,8,["initialName","token","template-id"])):p.createCommentVNode("",!0),x.value?(p.openBlock(),p.createBlock(Fpe,{key:6,"template-id":a.value,"user-id":r.userId,token:r.token,onClose:H[9]||(H[9]=re=>x.value=!1),onTemplateDeleted:H[10]||(H[10]=re=>{x.value=!1,A()})},null,8,["template-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-d8747d94"]]),Xpe={class:"tooltip-report-options"},Hpe=ws({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(r,{emit:i}){return(y,F)=>(p.openBlock(),p.createElementBlock("div",Xpe,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:F[0]||(F[0]=Y=>y.$emit("renombrar"))},F[3]||(F[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),p.createTextVNode(" Renombrar reporte ",-1)])),p.createElementVNode("li",{class:"option",onClick:F[1]||(F[1]=Y=>y.$emit("descargar"))},F[4]||(F[4]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),p.createTextVNode(" Descargar reporte ",-1)])),p.createElementVNode("li",{class:"option",onClick:F[2]||(F[2]=Y=>y.$emit("eliminar"))},F[5]||(F[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),p.createTextVNode(" Eliminar reporte ",-1)]))])]))}},[["__scopeId","data-v-246ad2d7"]]);function Bd(r){if(!r)return"";const i=new Date(r);if(isNaN(i.getTime()))return"";const y=i.getDate(),F=i.toLocaleDateString("es-ES",{month:"short"}),Y=i.getFullYear();return`${y} ${F}, ${Y}`}const Kpe={class:"prematch-bg"},Zpe={class:"subtitle"},Jpe={class:"jornada"},Ype={class:"fecha"},Qpe={class:"teams-row"},$pe={class:"team team-local"},efe={class:"escudo-svg"},tfe=["src"],rfe={class:"team-name"},nfe={class:"team team-visitor"},afe={class:"escudo-svg"},ife=["src"],ofe={class:"team-name"},sfe=ws({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Kpe,[Y[0]||(Y[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Zpe,[p.createElementVNode("span",Jpe,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",Ype," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",Qpe,[p.createElementVNode("div",$pe,[p.createElementVNode("span",efe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,tfe)]),p.createElementVNode("span",rfe,p.toDisplayString(y.report.game.home_team_acronym),1)]),p.createElementVNode("div",nfe,[p.createElementVNode("span",afe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,ife)]),p.createElementVNode("span",ofe,p.toDisplayString(y.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-8646ef7d"]]),lfe={class:"prematch-bg"},cfe={class:"background-shields"},ufe={class:"shield-left"},dfe=["src"],hfe={class:"shield-right"},pfe=["src"],ffe={class:"subtitle"},mfe={class:"jornada"},gfe={class:"fecha"},yfe={class:"teams-grid"},vfe={class:"row row-top"},bfe={class:"team team-local"},xfe={class:"escudo-svg"},_fe=["src"],wfe={class:"team-name"},Tfe={class:"score"},kfe={class:"score-text"},Sfe={class:"team team-visitor"},Efe={class:"team-name"},Cfe={class:"escudo-svg"},Afe=["src"],Mfe={class:"row row-bottom"},Lfe={class:"team-stats"},Pfe={class:"stat red"},Nfe={class:"stat-number"},Ofe={class:"stat yellow"},zfe={class:"stat-number"},Rfe={class:"team-stats"},Dfe={class:"stat-number"},Ife={class:"stat-number"},Ffe=ws({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function i(d){return d?d.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r,F=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4086
+ `+L):F.stack=L}catch{}}throw F}}_request(i,y){typeof i=="string"?(y=y||{},y.url=i):y=i||{},y=Jh(this.defaults,y);const{transitional:F,paramsSerializer:Y,headers:L}=y;F!==void 0&&fy.assertOptions(F,{silentJSONParsing:_d.transitional(_d.boolean),forcedJSONParsing:_d.transitional(_d.boolean),clarifyTimeoutError:_d.transitional(_d.boolean)},!1),Y!=null&&(Xn.isFunction(Y)?y.paramsSerializer={serialize:Y}:fy.assertOptions(Y,{encode:_d.function,serialize:_d.function},!0)),y.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:y.allowAbsoluteUrls=!0),fy.assertOptions(y,{baseUrl:_d.spelling("baseURL"),withXsrfToken:_d.spelling("withXSRFToken")},!0),y.method=(y.method||this.defaults.method||"get").toLowerCase();let T=L&&Xn.merge(L.common,L[y.method]);L&&Xn.forEach(["delete","get","head","post","put","patch","common"],h=>{delete L[h]}),y.headers=mu.concat(T,L);const t=[];let b=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(y)===!1||(b=b&&n.synchronous,t.unshift(n.fulfilled,n.rejected))});const d=[];this.interceptors.response.forEach(function(n){d.push(n.fulfilled,n.rejected)});let e,x=0,m;if(!b){const h=[hT.bind(this),void 0];for(h.unshift(...t),h.push(...d),m=h.length,e=Promise.resolve(y);x<m;)e=e.then(h[x++],h[x++]);return e}m=t.length;let v=y;for(x=0;x<m;){const h=t[x++],n=t[x++];try{v=h(v)}catch(a){n.call(this,a);break}}try{e=hT.call(this,v)}catch(h){return Promise.reject(h)}for(x=0,m=d.length;x<m;)e=e.then(d[x++],d[x++]);return e}getUri(i){i=Jh(this.defaults,i);const y=nT(i.baseURL,i.url,i.allowAbsoluteUrls);return K6(y,i.params,i.paramsSerializer)}};Xn.forEach(["delete","get","head","options"],function(i){Yh.prototype[i]=function(y,F){return this.request(Jh(F||{},{method:i,url:y,data:(F||{}).data}))}}),Xn.forEach(["post","put","patch"],function(i){function y(F){return function(L,T,t){return this.request(Jh(t||{},{method:i,headers:F?{"Content-Type":"multipart/form-data"}:{},url:L,data:T}))}}Yh.prototype[i]=y(),Yh.prototype[i+"Form"]=y(!0)});let Qde=class UT{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let y;this.promise=new Promise(function(L){y=L});const F=this;this.promise.then(Y=>{if(!F._listeners)return;let L=F._listeners.length;for(;L-- >0;)F._listeners[L](Y);F._listeners=null}),this.promise.then=Y=>{let L;const T=new Promise(t=>{F.subscribe(t),L=t}).then(Y);return T.cancel=function(){F.unsubscribe(L)},T},i(function(L,T,t){F.reason||(F.reason=new jp(L,T,t),y(F.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const y=this._listeners.indexOf(i);y!==-1&&this._listeners.splice(y,1)}toAbortSignal(){const i=new AbortController,y=F=>{i.abort(F)};return this.subscribe(y),i.signal.unsubscribe=()=>this.unsubscribe(y),i.signal}static source(){let i;return{token:new UT(function(Y){i=Y}),cancel:i}}};function $de(r){return function(y){return r.apply(null,y)}}function ehe(r){return Xn.isObject(r)&&r.isAxiosError===!0}const rb={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(rb).forEach(([r,i])=>{rb[i]=r});function mT(r){const i=new Yh(r),y=O6(Yh.prototype.request,i);return Xn.extend(y,Yh.prototype,i,{allOwnKeys:!0}),Xn.extend(y,i,null,{allOwnKeys:!0}),y.create=function(Y){return mT(Jh(r,Y))},y}const to=mT(sm);to.Axios=Yh,to.CanceledError=jp,to.CancelToken=Qde,to.isCancel=$6,to.VERSION=pT,to.toFormData=ly,to.AxiosError=yi,to.Cancel=to.CanceledError,to.all=function(i){return Promise.all(i)},to.spread=$de,to.isAxiosError=ehe,to.mergeConfig=Jh,to.AxiosHeaders=mu,to.formToJSON=r=>Y6(Xn.isHTMLForm(r)?new FormData(r):r),to.getAdapter=dT.getAdapter,to.HttpStatusCode=rb,to.default=to;const{Axios:Lve,AxiosError:Pve,CanceledError:Nve,isCancel:Ove,CancelToken:zve,VERSION:Rve,all:Dve,Cancel:Ive,isAxiosError:Fve,spread:Bve,toFormData:Vve,AxiosHeaders:Uve,HttpStatusCode:jve,formToJSON:qve,getAdapter:Wve,mergeConfig:Gve}=to,ws=(r,i)=>{const y=r.__vccOpts||r;for(const[F,Y]of i)y[F]=Y;return y},the={class:"tooltip-template-options"},rhe=ws({__name:"TooltipTemplateOptions",props:{canEdit:{type:Boolean,default:!0}},emits:["generar-reporte","renombrar","editar","duplicar","eliminar"],setup(r,{emit:i}){return(y,F)=>(p.openBlock(),p.createElementBlock("div",the,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:F[0]||(F[0]=Y=>y.$emit("generar-reporte"))},F[5]||(F[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report.svg",alt:"Generar reporte",class:"icon"},null,-1),p.createTextVNode(" Generar reporte ",-1)])),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:0,class:"option",onClick:F[1]||(F[1]=Y=>y.$emit("renombrar"))},F[6]||(F[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar template",class:"icon"},null,-1),p.createTextVNode(" Renombrar template ",-1)]))):p.createCommentVNode("",!0),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:1,class:"option",onClick:F[2]||(F[2]=Y=>y.$emit("editar"))},F[7]||(F[7]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg",alt:"Editar template",class:"icon"},null,-1),p.createTextVNode(" Editar template ",-1)]))):p.createCommentVNode("",!0),p.createElementVNode("li",{class:"option",onClick:F[3]||(F[3]=Y=>y.$emit("duplicar"))},F[8]||(F[8]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate.svg",alt:"Duplicar template",class:"icon"},null,-1),p.createTextVNode(" Duplicar template ",-1)])),r.canEdit?(p.openBlock(),p.createElementBlock("li",{key:2,class:"option",onClick:F[4]||(F[4]=Y=>y.$emit("eliminar"))},F[9]||(F[9]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar template",class:"icon"},null,-1),p.createTextVNode(" Eliminar template ",-1)]))):p.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-137412ab"]]),nhe={class:"template-card postpartido",style:{position:"relative"}},ahe={key:0,class:"template-img-placeholder",style:{position:"relative"}},ihe={key:0,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-01.jpg",alt:"Template Prematch Type 1",class:"template-img"},ohe={key:1,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-01.jpg",alt:"Template Postmatch Type 1",class:"template-img"},she={key:2,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-02.jpg",alt:"Template Prematch Type 2",class:"template-img"},lhe={key:3,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-02.jpg",alt:"Template Postmatch Type 2",class:"template-img"},che={key:4,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-03.jpg",alt:"Template Prematch Type 3",class:"template-img"},uhe={key:5,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-03.jpg",alt:"Template Postmatch Type 3",class:"template-img"},dhe={key:6,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-prmatch-04.jpg",alt:"Template Prematch Type 4",class:"template-img"},hhe={key:7,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumbnail-portada-04.jpg",alt:"Template Postmatch Type 4",class:"template-img"},phe={key:8,src:"https://golstatsimages.blob.core.windows.net/reports-images/thumb1.png",alt:"Template Default",class:"template-img"},fhe={class:"inner-card-postpartido"},mhe={class:"postpartido-footer"},ghe={class:"postpartido-version"},yhe={class:"postpartido-status"},vhe={class:"tipo-value"},bhe=ws({__name:"TemplateItem",props:{template:{type:Object,required:!0},userId:{type:Number,required:!0}},emits:["generar-reporte","renombrar","duplicar","eliminar","edit-template"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1),L=p.computed(()=>y.userId===y.template.user_id);function T(){console.log("generar-reporte"),Y.value=!1,F("generar-reporte")}function t(){console.log("renombrar"),Y.value=!1;const m=y.template.name||"";F("renombrar",m)}function b(){console.log("editar"),Y.value=!1,F("edit-template",y.template)}function d(){console.log("duplicar"),Y.value=!1;const m=y.template.name||"";F("duplicar",m)}function e(){console.log("eliminar"),Y.value=!1,F("eliminar",y.template)}function x(m){console.log("toggle-autogen",m)}return(m,v)=>(p.openBlock(),p.createElementBlock("div",nhe,[p.createElementVNode("div",{class:"three-dots",onClick:v[0]||(v[0]=p.withModifiers(h=>Y.value=!Y.value,["stop"]))},v[5]||(v[5]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])),r.template.pages&&r.template.pages[0]?(p.openBlock(),p.createElementBlock("div",ahe,[r.template.template_type===1&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ihe)):r.template.template_type===2&&r.template.pages[0].type==1?(p.openBlock(),p.createElementBlock("img",ohe)):r.template.template_type===1&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",she)):r.template.template_type===2&&r.template.pages[0].type==2?(p.openBlock(),p.createElementBlock("img",lhe)):r.template.template_type===1&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",che)):r.template.template_type===2&&r.template.pages[0].type==3?(p.openBlock(),p.createElementBlock("img",uhe)):r.template.template_type===1&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",dhe)):r.template.template_type===2&&r.template.pages[0].type==4?(p.openBlock(),p.createElementBlock("img",hhe)):(p.openBlock(),p.createElementBlock("img",phe))])):p.createCommentVNode("",!0),p.createElementVNode("div",fhe,[p.createElementVNode("div",mhe,[p.createElementVNode("div",ghe,p.toDisplayString(r.template.name),1),p.createElementVNode("div",yhe,[v[6]||(v[6]=p.createElementVNode("span",{class:"tipo-label"},"Tipo:",-1)),p.createElementVNode("span",vhe," "+p.toDisplayString(r.template.template_type==1?"Prepartido":"Postpartido"),1)]),p.createElementVNode("button",{class:"postpartido-btn",onClick:v[1]||(v[1]=h=>F("generar-reporte"))},"Generar reporte")])]),Y.value?(p.openBlock(),p.createBlock(rhe,{key:1,"can-edit":L.value,onClick:v[2]||(v[2]=p.withModifiers(h=>Y.value=!1,["self"])),onMouseleave:v[3]||(v[3]=h=>Y.value=!1),onGenerarReporte:T,onRenombrar:t,onEditar:b,onDuplicar:d,onEliminar:e,onToggleAutogen:x},null,8,["can-edit"])):p.createCommentVNode("",!0),Y.value?(p.openBlock(),p.createElementBlock("div",{key:2,class:"tooltip-overlay",onClick:v[4]||(v[4]=h=>Y.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-06712795"]]),xhe={class:"modal-overlay"},_he={class:"modal-content"},whe={class:"modal-body"},The={class:"radio-group"},khe=["disabled"],She={key:0,class:"error-message"},Ehe={class:"modal-footer"},Che=["disabled"],Ahe=["disabled"],Mhe=["disabled"],Lhe={key:0,class:"loading-spinner"},Phe={key:1},gT=ws({__name:"ModalCreateTemplate",props:{token:{type:String,required:!0},team:{type:Number,required:!0}},emits:["close","template-created","open-modal-new-template"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(1),L=p.ref("pre"),T=p.ref(""),t=p.ref(!1),b=p.ref(""),d=async()=>{var e;if(!(T.value.trim().length<3)){t.value=!0,b.value="";try{const x={name:T.value.trim(),team_id:y.team,template_type:L.value==="pre"?1:2};console.log("toke mostrado es: ",y.token);const v=await to.create({headers:{Authorization:`${y.token}`}}).post("https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates",x);console.log("response.data",v.data),F("template-created",v.data),F("open-modal-new-template",(e=v.data)==null?void 0:e.data),F("close")}catch(x){console.error("Error al guardar template:",x),x.response&&x.response.status===409&&(b.value="Ya existe un template con el mismo nombre")}finally{t.value=!1}}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(e,x)=>(p.openBlock(),p.createElementBlock("div",xhe,[p.createElementVNode("div",_he,[p.createElementVNode("button",{class:"close-btn",onClick:x[0]||(x[0]=m=>e.$emit("close"))},x[6]||(x[6]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),x[11]||(x[11]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-editar-withe.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Crear Template")],-1)),x[12]||(x[12]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",whe,[Y.value===1?(p.openBlock(),p.createElementBlock(p.Fragment,{key:0},[x[9]||(x[9]=p.createElementVNode("div",{class:"modal-label"},"Define el tipo de análisis para tu template:",-1)),p.createElementVNode("div",The,[p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:L.value==="pre"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"pre","onUpdate:modelValue":x[1]||(x[1]=m=>L.value=m)},null,512),[[p.vModelRadio,L.value]]),x[7]||(x[7]=p.createTextVNode(" Prepartido ",-1))],2),p.createElementVNode("label",{class:p.normalizeClass(["radio-label",{selected:L.value==="post"}])},[p.withDirectives(p.createElementVNode("input",{type:"radio",value:"post","onUpdate:modelValue":x[2]||(x[2]=m=>L.value=m)},null,512),[[p.vModelRadio,L.value]]),x[8]||(x[8]=p.createTextVNode(" Postpartido ",-1))],2)])],64)):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x[10]||(x[10]=p.createElementVNode("div",{class:"modal-label"},"Agrega un nombre a tu template:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":x[3]||(x[3]=m=>T.value=m),placeholder:"Untitled",maxlength:"40",autocomplete:"off",disabled:t.value},null,8,khe),[[p.vModelText,T.value]]),b.value?(p.openBlock(),p.createElementBlock("div",She,p.toDisplayString(b.value),1)):p.createCommentVNode("",!0)],64))]),x[13]||(x[13]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ehe,[p.createElementVNode("button",{class:"cancel-btn",onClick:x[4]||(x[4]=m=>e.$emit("close")),disabled:t.value},"Cancelar",8,Che),Y.value===1?(p.openBlock(),p.createElementBlock("button",{key:0,class:"next-btn",disabled:!L.value,onClick:x[5]||(x[5]=m=>Y.value=2)}," Siguiente ",8,Ahe)):(p.openBlock(),p.createElementBlock("button",{key:1,class:"next-btn",disabled:T.value.trim().length<3||t.value,onClick:d},[t.value?(p.openBlock(),p.createElementBlock("div",Lhe)):(p.openBlock(),p.createElementBlock("span",Phe,"Guardar"))],8,Mhe))])])]))}},[["__scopeId","data-v-7e85c356"]]),Nhe={class:"modal-overlay"},Ohe={class:"modal-content"},zhe={class:"modal-body"},Rhe={key:0,class:"error-message-container"},Dhe={key:1},Ihe={class:"modal-group"},Fhe={key:0,class:"placeholder"},Bhe={key:0,class:"placeholder"},Vhe={key:1},Uhe={key:0,class:"custom-select-dropdown"},jhe=["onMousedown"],qhe={class:"modal-row"},Whe={class:"modal-group"},Ghe={key:0,class:"placeholder"},Xhe={key:0,class:"placeholder"},Hhe={key:1},Khe={key:0,class:"custom-select-dropdown"},Zhe=["onMousedown"],Jhe={class:"modal-group"},Yhe={key:0,class:"placeholder"},Qhe={key:0,class:"placeholder"},$he={key:1},epe={key:0,class:"custom-select-dropdown"},tpe=["onMousedown"],rpe={class:"modal-group"},npe={key:0,class:"placeholder"},ape={key:0,class:"placeholder"},ipe=["src"],ope=["src"],spe={key:0,class:"custom-select-dropdown"},lpe=["onMousedown"],cpe=["src"],upe=["src"],dpe={key:0,class:"header-separator"},hpe={key:1,class:"modal-footer"},ppe=["disabled"],fpe={key:0,class:"loading-spinner select-spinner"},mpe=ws({__name:"ModalGenerarReporte",props:{userId:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0},templateType:{type:String,required:!1}},emits:["close","generar","switch-to-reports"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref([]),L=p.ref([]),T=p.ref([]),t=p.ref([]),b=p.ref(""),d=p.ref(""),e=p.ref(""),x=p.ref(null),m=to.create({headers:{Authorization:y.token}}),v=p.ref(!1),h=p.ref(!1),n=p.ref(!1),a=p.ref(!1),u=p.ref(!1),s=p.ref([]),l=p.ref([]),f=p.ref(!1),g=p.ref(!1),k=p.ref(!1);function E(q){b.value=q,f.value=!1,P()}function S(q){d.value=q,g.value=!1,A()}function M(q){e.value=q,k.value=!1,O()}async function N(){try{h.value=!0;const q=await to.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments");q.data&&Array.isArray(q.data)&&(s.value=q.data,Y.value=q.data.map(J=>J.tournament).sort((J,ne)=>J.order&&ne.order?J.order-ne.order:J.order&&!ne.order?-1:!J.order&&ne.order?1:0),b.value="",L.value=[],d.value="",T.value=[],e.value="",t.value=[],x.value=null)}catch(q){console.error("Error al cargar torneos:",q),Y.value=[{name:"Concacaf Copa Oro"},{name:"Liga MX"},{name:"MLS"}],L.value=[],T.value=[],b.value="",d.value="",e.value="",x.value=null}finally{h.value=!1}}function C(q){const J=s.value.find(ne=>ne.tournament&&ne.tournament.name===q.name);J&&Array.isArray(J.seasons)?(L.value=J.seasons,d.value="",T.value=[],e.value="",t.value=[],x.value=null):(L.value=[],d.value="",T.value=[],e.value="",t.value=[],x.value=null)}function P(){d.value="",e.value="",x.value=null,b.value?C(b.value):(L.value=[],T.value=[],t.value=[])}function A(){if(a.value=!0,e.value="",x.value=null,T.value=[],t.value=[],d.value&&d.value.id){const q=[d.value.id];if(d.value.related_seasons&&Array.isArray(d.value.related_seasons)){const J=d.value.related_seasons.map(ne=>ne.id).filter(Boolean);q.push(...J),console.log("relatedIds",J)}w(q)}setTimeout(()=>{a.value=!1},400)}async function w(q){n.value=!0;try{const J=Array.isArray(q)?q.join("&seasons="):q,ne=await m.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${J}`);if(console.log("response.data:: 2",ne.data),ne.data.data&&Array.isArray(ne.data.data)){console.log("response.data:: 4ddd",ne.data.data);const H=ne.data.data.reduce((Z,ee)=>ee.games&&Array.isArray(ee.games)?Z.concat(ee.games):Z,[]);console.log("Todos los partidos unidos:",H),l.value=H.map(Z=>({label:Z.label||`${Z.home_team_acronym||"Local"} vs ${Z.visiting_team_acronym||"Visitante"}`,localLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+Z.home_team+".png"||"",visitanteLogo:"https://golstatsimages.blob.core.windows.net/teams-80/"+Z.visiting_team+".png"||"",...Z}));let re=l.value;y.templateType==="2"||y.templateType===2?re=re.filter(Z=>Z.game_status===1):(y.templateType==="1"||y.templateType===1)&&(re=re.filter(Z=>Z.game_status===4));const te=[...new Set(re.map(Z=>Z.matchday_id).filter(Boolean))];T.value=te.map(Z=>{const ee=l.value.find(le=>le.matchday_id&&le.matchday_id===Z);return{id:Z,name:ee.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta")}}).sort((Z,ee)=>{const le=Z.name.startsWith("Jornada"),ce=ee.name.startsWith("Jornada");return le&&ce?Z.id-ee.id:le&&!ce?-1:!le&&ce?1:0}),console.log("jornadas: ",T),e.value="",t.value=[],x.value=null}else l.value=[],T.value=[],e.value="",t.value=[],x.value=null}catch(J){console.error("Error al cargar partidos:",J),l.value=[],T.value=[],e.value="",t.value=[],x.value=null}finally{n.value=!1}}function O(){x.value=null,t.value=[],e.value&&e.value.id&&_(e.value)}function _(q){if(!q||!q.id){t.value=[];return}let J=l.value.filter(ne=>ne.matchday_id===q.id);y.templateType==="2"||y.templateType===2?J=J.filter(ne=>ne.game_status===1):(y.templateType==="1"||y.templateType===1)&&(J=J.filter(ne=>ne.game_status===4)),t.value=J}async function z(){try{h.value=!0;let q="";d.value&&d.value.name&&(q=d.value.name);const J={template_id:y.templateId,user_id:parseInt(y.userId),tournament_id:b.value.id||1,tournament_name:b.value.name,season_id:x.value.season_id,season_name:q,game_id:x.value.id||x.value.game_id},ne=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports`,J,{headers:{Authorization:y.token,"Content-Type":"application/json"}});console.log("Reporte generado exitosamente:",ne.data),F("generar",{liga:b.value,torneo:d.value,jornada:e.value,partido:x.value,reportData:ne.data}),F("switch-to-reports"),F("close")}catch(q){console.error("Error al generar el reporte:",q),q.response&&q.response.status===409?u.value=!0:alert("Error al generar el reporte. Por favor, intenta de nuevo.")}finally{h.value=!1}}function I(q){x.value=q,v.value=!1}function V(){document.body.style.overflow="hidden"}function j(){document.body.style.overflow=""}p.onMounted(()=>{N(),V()}),p.onUnmounted(()=>{j()});function G(){u.value=!1,j(),F("close")}return(q,J)=>(p.openBlock(),p.createElementBlock("div",Nhe,[p.createElementVNode("div",Ohe,[p.createElementVNode("button",{class:"close-btn",onClick:J[0]||(J[0]=ne=>q.$emit("close"))},J[10]||(J[10]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),J[24]||(J[24]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-report-white.svg",class:"icon-title",alt:"icono reporte blanco"}),p.createElementVNode("span",{class:"modal-title"},"Generar reporte")],-1)),J[25]||(J[25]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",zhe,[u.value?(p.openBlock(),p.createElementBlock("div",Rhe,[J[11]||(J[11]=p.createElementVNode("p",{class:"error-text"},[p.createTextVNode(" Este reporte ya fue generado previamente"),p.createElementVNode("br"),p.createTextVNode(" con este template para el partido seleccionado. ")],-1)),p.createElementVNode("button",{class:"accept-btn",onClick:G},"Aceptar")])):(p.openBlock(),p.createElementBlock("div",Dhe,[p.createElementVNode("div",Ihe,[J[14]||(J[14]=p.createElementVNode("label",null,"1. Elige la liga",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown liga-select",tabindex:"0",onClick:J[1]||(J[1]=ne=>f.value=!f.value),onBlur:J[2]||(J[2]=ne=>f.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:h.value||Y.value.length===0}])},[h.value?(p.openBlock(),p.createElementBlock("span",Fhe,J[12]||(J[12]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando ligas...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[b.value?(p.openBlock(),p.createElementBlock("span",Vhe,p.toDisplayString(b.value.name),1)):(p.openBlock(),p.createElementBlock("span",Bhe,"Selecciona la liga"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:f.value}])},J[13]||(J[13]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),f.value&&Y.value.length>0?(p.openBlock(),p.createElementBlock("div",Uhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.name,class:"custom-select-option",onMousedown:p.withModifiers(H=>E(ne),["prevent"])},p.toDisplayString(ne.name),41,jhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",qhe,[p.createElementVNode("div",Whe,[J[17]||(J[17]=p.createElementVNode("label",null,"2. Elige el torneo",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown torneo-select",tabindex:"0",onClick:J[3]||(J[3]=ne=>g.value=!g.value),onBlur:J[4]||(J[4]=ne=>g.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!b.value||L.value.length===0||h.value}])},[h.value?(p.openBlock(),p.createElementBlock("span",Ghe,J[15]||(J[15]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando torneos...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[d.value?(p.openBlock(),p.createElementBlock("span",Hhe,p.toDisplayString(d.value.name),1)):(p.openBlock(),p.createElementBlock("span",Xhe,"Elige el torneo"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:g.value}])},J[16]||(J[16]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),g.value&&L.value.length>0&&b.value?(p.openBlock(),p.createElementBlock("div",Khe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(L.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.id,class:"custom-select-option",onMousedown:p.withModifiers(H=>S(ne),["prevent"])},p.toDisplayString(ne.name),41,Zhe))),128))])):p.createCommentVNode("",!0)],32)]),p.createElementVNode("div",Jhe,[J[20]||(J[20]=p.createElementVNode("label",null,"3. Elige la jornada",-1)),p.createElementVNode("div",{class:"select-wrapper custom-dropdown jornada-select",tabindex:"0",onClick:J[5]||(J[5]=ne=>k.value=!k.value),onBlur:J[6]||(J[6]=ne=>k.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!d.value||T.value.length===0||a.value}])},[a.value?(p.openBlock(),p.createElementBlock("span",Yhe,J[18]||(J[18]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando jornadas...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[e.value?(p.openBlock(),p.createElementBlock("span",$he,p.toDisplayString(e.value.name),1)):(p.openBlock(),p.createElementBlock("span",Qhe,"Elige la jornada"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:k.value}])},J[19]||(J[19]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),k.value&&T.value.length>0&&d.value?(p.openBlock(),p.createElementBlock("div",epe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(T.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.id,class:"custom-select-option",onMousedown:p.withModifiers(H=>M(ne),["prevent"])},p.toDisplayString(ne.name),41,tpe))),128))])):p.createCommentVNode("",!0)],32)])]),p.createElementVNode("div",rpe,[J[23]||(J[23]=p.createElementVNode("label",null,"4. Elige el partido",-1)),p.createElementVNode("div",{class:"select-wrapper partido-select",tabindex:"0",onClick:J[7]||(J[7]=ne=>v.value=!v.value),onBlur:J[8]||(J[8]=ne=>v.value=!1)},[p.createElementVNode("div",{class:p.normalizeClass(["custom-select-display",{disabled:!e.value||n.value}])},[n.value?(p.openBlock(),p.createElementBlock("span",npe,J[21]||(J[21]=[p.createElementVNode("span",{class:"loading-spinner select-spinner"},null,-1),p.createTextVNode("Cargando partidos...",-1)]))):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x.value?(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[x.value.localLogo?(p.openBlock(),p.createElementBlock("img",{key:0,src:x.value.localLogo,class:"logo-equipo",alt:"local"},null,8,ipe)):p.createCommentVNode("",!0),p.createElementVNode("span",null,p.toDisplayString(x.value.label),1),x.value.visitanteLogo?(p.openBlock(),p.createElementBlock("img",{key:1,src:x.value.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,ope)):p.createCommentVNode("",!0)],64)):(p.openBlock(),p.createElementBlock("span",ape,"Selecciona el partido"))],64)),p.createElementVNode("span",{class:p.normalizeClass(["select-chevron",{open:v.value}])},J[22]||(J[22]=[p.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 7L8 10L11 7",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),2)],2),v.value&&!n.value&&e.value?(p.openBlock(),p.createElementBlock("div",spe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(t.value,ne=>(p.openBlock(),p.createElementBlock("div",{key:ne.label,class:"custom-select-option",onMousedown:p.withModifiers(H=>I(ne),["prevent"])},[p.createElementVNode("img",{src:ne.localLogo,class:"logo-equipo",alt:"local"},null,8,cpe),p.createElementVNode("span",null,p.toDisplayString(ne.label),1),p.createElementVNode("img",{src:ne.visitanteLogo,class:"logo-equipo",alt:"visitante"},null,8,upe)],40,lpe))),128))])):p.createCommentVNode("",!0)],32)])]))]),u.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",dpe)),u.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",hpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:J[9]||(J[9]=ne=>q.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:!b.value||!d.value||!e.value||!x.value||h.value,onClick:z},[h.value?(p.openBlock(),p.createElementBlock("span",fpe)):p.createCommentVNode("",!0),p.createTextVNode(" "+p.toDisplayString(h.value?"Generando...":"Generar"),1)],8,ppe)]))])]))}},[["__scopeId","data-v-d86b1497"]]),gpe={class:"modal-overlay"},ype={class:"modal-content"},vpe={class:"modal-body"},bpe=["placeholder","disabled"],xpe={key:0,class:"error-message"},_pe={class:"modal-footer"},wpe=["disabled"],Tpe=["disabled"],kpe={key:0},Spe={key:1},Epe=ws({__name:"ModalRenameTemplate",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","rename","refresh"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName),L=p.ref(!1),T=p.ref("");p.watch(()=>y.initialName,b=>{Y.value=b,T.value=""}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function t(){var b;if(console.log("acceptRename"),!(Y.value.trim().length<3)){console.log("acceptRename 22"),L.value=!0,T.value="";try{await to.put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/templates/${y.templateId}/general`,{name:Y.value.trim()},{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}}),F("rename",Y.value.trim()),F("refresh"),F("close")}catch(d){console.error("Error al renombrar el template:",d),((b=d.response)==null?void 0:b.status)===409?T.value="Ya existe un template con el mismo nombre":T.value="Error al renombrar el template. Inténtalo de nuevo."}finally{L.value=!1}}}return(b,d)=>(p.openBlock(),p.createElementBlock("div",gpe,[p.createElementVNode("div",ype,[p.createElementVNode("button",{class:"close-btn",onClick:d[0]||(d[0]=e=>b.$emit("close"))},d[3]||(d[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),d[5]||(d[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Template")],-1)),d[6]||(d[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",vpe,[d[4]||(d[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":d[1]||(d[1]=e=>Y.value=e),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:L.value},null,8,bpe),[[p.vModelText,Y.value]]),T.value?(p.openBlock(),p.createElementBlock("div",xpe,p.toDisplayString(T.value),1)):p.createCommentVNode("",!0)]),d[7]||(d[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",_pe,[p.createElementVNode("button",{class:"cancel-btn",onClick:d[2]||(d[2]=e=>b.$emit("close")),disabled:L.value},"Cancelar",8,wpe),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:t},[L.value?(p.openBlock(),p.createElementBlock("span",kpe,"Guardando...")):(p.openBlock(),p.createElementBlock("span",Spe,"Guardar"))],8,Tpe)])])]))}},[["__scopeId","data-v-95975b9e"]]),Cpe={class:"modal-overlay"},Ape={class:"modal-content"},Mpe={class:"modal-body"},Lpe=["placeholder"],Ppe={class:"modal-footer"},Npe=["disabled"],Ope=ws({__name:"ModalduplicateTemplate",props:{initialName:{type:String,required:!0},token:{type:String,required:!0},templateId:{type:String,required:!0}},emits:["close","duplicate","template-duplicated"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName+" copy"),L=p.ref(!1);p.watch(()=>y.initialName,t=>{Y.value=t+" copy"}),p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});async function T(){if(Y.value.trim().length>=3&&!L.value){L.value=!0;try{const t=await to.post(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/${y.templateId}/duplicate`,{name:Y.value.trim()},{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}});F("template-duplicated",{originalTemplateId:y.templateId,newTemplateName:Y.value.trim(),responseData:t.data}),F("close")}catch(t){console.error("Error al duplicar template:",t),alert("Error al duplicar el template. Por favor, intenta de nuevo.")}finally{L.value=!1}}}return(t,b)=>(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Ape,[p.createElementVNode("button",{class:"close-btn",onClick:b[0]||(b[0]=d=>t.$emit("close"))},b[3]||(b[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),b[5]||(b[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-duplicate-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Duplicar template")],-1)),b[6]||(b[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Mpe,[b[4]||(b[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":b[1]||(b[1]=d=>Y.value=d),placeholder:r.initialName,maxlength:"40",autocomplete:"off"},null,8,Lpe),[[p.vModelText,Y.value]])]),b[7]||(b[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",Ppe,[p.createElementVNode("button",{class:"cancel-btn",onClick:b[2]||(b[2]=d=>t.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:T},p.toDisplayString(L.value?"Duplicando...":"Aceptar"),9,Npe)])])]))}},[["__scopeId","data-v-98cd9dcd"]]),zpe={class:"modal-overlay"},Rpe={class:"modal-content"},Dpe={class:"modal-footer"},Ipe=["disabled"],Fpe=ws({__name:"ModalDeleteTemplate",props:{templateId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","templateDeleted"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1);p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""});const L=async()=>{try{Y.value=!0;const t=await to.create({headers:{Authorization:`${y.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/templates/${y.templateId}`);(t.status===200||t.status===204)&&(F("templateDeleted",y.templateId),F("close"))}catch(T){console.error("Error al eliminar template:",T),alert("Error al eliminar el template. Por favor, inténtalo de nuevo.")}finally{Y.value=!1}};return(T,t)=>(p.openBlock(),p.createElementBlock("div",zpe,[p.createElementVNode("div",Rpe,[p.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=b=>T.$emit("close"))},t[2]||(t[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=p.createStaticVNode('<div class="modal-header" data-v-65422842><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-65422842><span class="modal-title" data-v-65422842>Eliminar template</span></div><div class="header-separator" data-v-65422842></div><div class="modal-body confirm-text" data-v-65422842> ¿Estás seguro que deseas eliminar<br data-v-65422842> este template? Si lo haces no habrá manera<br data-v-65422842> de recuperarlo. </div><div class="header-separator" data-v-65422842></div>',4)),p.createElementVNode("div",Dpe,[p.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=b=>T.$emit("close"))},"Cancelar"),p.createElementVNode("button",{class:"delete-btn",onClick:L,disabled:Y.value},p.toDisplayString(Y.value?"Eliminando...":"Eliminar"),9,Ipe)])])]))}},[["__scopeId","data-v-65422842"]]),Bpe={class:"templates-header"},Vpe={class:"count"},Upe={key:0,class:"sort-options"},jpe=["onClick"],qpe={key:0,class:"checkmark"},Wpe={key:0,class:"loading-state"},Gpe=ws({__name:"TemplatesSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["switch-to-reports","open-modal-new-template","edit-template"],setup(r,{expose:i,emit:y}){const F=y,Y=r,L=p.ref(!1),T=p.ref(null),t=p.ref(!1),b=p.ref(!1),d=p.ref(!1),e=p.ref(!1),x=p.ref(!1),m=p.ref(""),v=p.ref(""),h=p.ref(""),n=p.ref(""),a=p.ref(""),u=p.ref(""),s=p.ref(""),l=p.ref(""),f=p.ref(""),g=p.ref(null),k=p.ref(null),E=p.ref(null),S=p.ref(0),M=p.ref([]),N=p.ref(!1),C=p.ref(null);p.watch([()=>Y.team,()=>Y.token],()=>{Y.team&&Y.token&&A()},{immediate:!1});const P=[{label:"A - Z",value:"name-asc"},{label:"Más recientes",value:"date-desc"}],A=async()=>{try{N.value=!0,C.value=null;const ne=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/templates/teams/${Y.team}`,{headers:{Authorization:`${Y.token}`,"Content-Type":"application/json"}});ne.data&&Array.isArray(ne.data)?M.value=ne.data:ne.data&&ne.data.templates?M.value=ne.data.templates:ne.data&&ne.data.data?M.value=ne.data.data:M.value=[]}catch(ne){console.error("Error al obtener templates:",ne),console.error("Error response:",ne.response),C.value=ne.message||"Error al cargar los templates",M.value=[]}finally{N.value=!1}},w=p.computed(()=>{if(!M.value.length)return[];let ne=[...M.value];if(Y.searchQuery.trim()){const H=Y.searchQuery.toLowerCase().trim();ne=ne.filter(re=>re.name.toLowerCase().includes(H))}switch(T.value){case"name-asc":return ne.sort((H,re)=>H.name.localeCompare(re.name));case"date-desc":return ne.sort((H,re)=>new Date(re.created_at)-new Date(H.created_at));default:return ne}}),O=p.computed(()=>{if(!S.value)return"grid-1-column";const ne=340,H=20,te=S.value-40,Z=Math.floor((te+H)/(ne+H)),ee=Math.max(1,Z);return ee>=4?"grid-4-columns":ee>=3?"grid-3-columns":ee>=2?"grid-2-columns":"grid-1-column"}),_=()=>{L.value=!L.value},z=ne=>{T.value=ne,L.value=!1},I=ne=>{const H=P.find(re=>re.value===ne);return H?H.label:null},V=ne=>{L.value&&g.value&&!g.value.contains(ne.target)&&(L.value=!1)},j=()=>{k.value&&(S.value=k.value.offsetWidth)};function G(ne){F("edit-template",ne)}let q=null;p.onMounted(async()=>{document.addEventListener("mousedown",V),await p.nextTick(),j(),window.ResizeObserver?(q=new ResizeObserver(()=>{j()}),k.value&&q.observe(k.value)):window.addEventListener("resize",j),A()});function J(ne){console.log("onOpenModalNewTemplate template section, called with data:",ne),F("open-modal-new-template",ne)}return p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",V),q?q.disconnect():window.removeEventListener("resize",j)}),i({obtenerTemplates:A}),(ne,H)=>(p.openBlock(),p.createElementBlock("div",{class:"templates-section",ref_key:"templatesSectionRef",ref:k},[p.createElementVNode("div",Bpe,[p.createElementVNode("span",null,[H[11]||(H[11]=p.createTextVNode("Templates ",-1)),p.createElementVNode("span",Vpe,"("+p.toDisplayString(w.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:g},[p.createElementVNode("button",{class:"sort-button",onClick:_},[p.createTextVNode(p.toDisplayString(I(T.value)||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:L.value}])},null,2)]),L.value?(p.openBlock(),p.createElementBlock("div",Upe,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(P,re=>p.createElementVNode("div",{key:re.value,class:p.normalizeClass(["sort-option",{selected:T.value===re.value}]),onClick:te=>z(re.value)},[p.createElementVNode("span",null,p.toDisplayString(re.label),1),T.value===re.value?(p.openBlock(),p.createElementBlock("span",qpe,H[12]||(H[12]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)],10,jpe)),64))])):p.createCommentVNode("",!0)],512)]),N.value?(p.openBlock(),p.createElementBlock("div",Wpe,H[13]||(H[13]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando templates...",-1)]))):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["templates-list",O.value]),ref_key:"templatesListRef",ref:E},[p.createElementVNode("div",{class:"template-card create",onClick:H[0]||(H[0]=re=>t.value=!0)},H[14]||(H[14]=[p.createElementVNode("div",{class:"inner-card"},[p.createElementVNode("div",{class:"plus"},[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-add@3x.png",alt:"Agregar"})]),p.createElementVNode("div",{class:"create-text"},"Crear Template")],-1)])),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(w.value,re=>(p.openBlock(),p.createBlock(bhe,{key:re.id,template:re,"user-id":r.userId,onGenerarReporte:te=>{s.value=re.id,f.value=re.template_type,b.value=!0},onRenombrar:te=>{l.value=re.id,m.value=te,v.value=re.template_type,d.value=!0},onDuplicar:te=>{u.value=re.id,h.value=te,e.value=!0},onEliminar:te=>{n.value=te.name,a.value=te.id,x.value=!0},onEditTemplate:G},null,8,["template","user-id","onGenerarReporte","onRenombrar","onDuplicar","onEliminar"]))),128))],2)),t.value?(p.openBlock(),p.createBlock(gT,{key:2,token:r.token,team:r.team,onClose:H[1]||(H[1]=re=>t.value=!1),onOpenModalNewTemplate:J},null,8,["token","team"])):p.createCommentVNode("",!0),b.value?(p.openBlock(),p.createBlock(mpe,{key:3,"user-id":r.userId,token:r.token,"template-id":s.value,"template-type":f.value,onClose:H[2]||(H[2]=re=>b.value=!1),onSwitchToReports:H[3]||(H[3]=re=>ne.$emit("switch-to-reports"))},null,8,["user-id","token","template-id","template-type"])):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(Epe,{key:4,initialName:m.value,token:r.token,"template-id":l.value,"template-type":v.value,"user-id":r.userId,onRefresh:H[4]||(H[4]=re=>A()),onClose:H[5]||(H[5]=re=>d.value=!1),onRename:H[6]||(H[6]=re=>{d.value=!1})},null,8,["initialName","token","template-id","template-type","user-id"])):p.createCommentVNode("",!0),e.value?(p.openBlock(),p.createBlock(Ope,{key:5,initialName:h.value,token:r.token,"template-id":u.value,onClose:H[7]||(H[7]=re=>e.value=!1),onTemplateDuplicated:H[8]||(H[8]=re=>{e.value=!1,A()})},null,8,["initialName","token","template-id"])):p.createCommentVNode("",!0),x.value?(p.openBlock(),p.createBlock(Fpe,{key:6,"template-id":a.value,"user-id":r.userId,token:r.token,onClose:H[9]||(H[9]=re=>x.value=!1),onTemplateDeleted:H[10]||(H[10]=re=>{x.value=!1,A()})},null,8,["template-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-d8747d94"]]),Xpe={class:"tooltip-report-options"},Hpe=ws({__name:"TooltipReportOptions",emits:["ver-reporte","renombrar","editar","duplicar","descargar","eliminar"],setup(r,{emit:i}){return(y,F)=>(p.openBlock(),p.createElementBlock("div",Xpe,[p.createElementVNode("ul",null,[p.createElementVNode("li",{class:"option",onClick:F[0]||(F[0]=Y=>y.$emit("renombrar"))},F[3]||(F[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg",alt:"Renombrar reporte",class:"icon"},null,-1),p.createTextVNode(" Renombrar reporte ",-1)])),p.createElementVNode("li",{class:"option",onClick:F[1]||(F[1]=Y=>y.$emit("descargar"))},F[4]||(F[4]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-download.svg",alt:"Descargar reporte",class:"icon"},null,-1),p.createTextVNode(" Descargar reporte ",-1)])),p.createElementVNode("li",{class:"option",onClick:F[2]||(F[2]=Y=>y.$emit("eliminar"))},F[5]||(F[5]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg",alt:"Eliminar reporte",class:"icon"},null,-1),p.createTextVNode(" Eliminar reporte ",-1)]))])]))}},[["__scopeId","data-v-d17eb1eb"]]);function Bd(r){if(!r)return"";const i=new Date(r);if(isNaN(i.getTime()))return"";const y=i.getDate(),F=i.toLocaleDateString("es-ES",{month:"short"}),Y=i.getFullYear();return`${y} ${F}, ${Y}`}const Kpe={class:"prematch-bg"},Zpe={class:"subtitle"},Jpe={class:"jornada"},Ype={class:"fecha"},Qpe={class:"teams-row"},$pe={class:"team team-local"},efe={class:"escudo-svg"},tfe=["src"],rfe={class:"team-name"},nfe={class:"team team-visitor"},afe={class:"escudo-svg"},ife=["src"],ofe={class:"team-name"},sfe=ws({__name:"AnalisisPrematchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Kpe,[Y[0]||(Y[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Zpe,[p.createElementVNode("span",Jpe,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",Ype," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",Qpe,[p.createElementVNode("div",$pe,[p.createElementVNode("span",efe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,tfe)]),p.createElementVNode("span",rfe,p.toDisplayString(y.report.game.home_team_acronym),1)]),p.createElementVNode("div",nfe,[p.createElementVNode("span",afe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,ife)]),p.createElementVNode("span",ofe,p.toDisplayString(y.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-0c222d1b"]]),lfe={class:"prematch-bg"},cfe={class:"background-shields"},ufe={class:"shield-left"},dfe=["src"],hfe={class:"shield-right"},pfe=["src"],ffe={class:"subtitle"},mfe={class:"jornada"},gfe={class:"fecha"},yfe={class:"teams-grid"},vfe={class:"row row-top"},bfe={class:"team team-local"},xfe={class:"escudo-svg"},_fe=["src"],wfe={class:"team-name"},Tfe={class:"score"},kfe={class:"score-text"},Sfe={class:"team team-visitor"},Efe={class:"team-name"},Cfe={class:"escudo-svg"},Afe=["src"],Mfe={class:"row row-bottom"},Lfe={class:"team-stats"},Pfe={class:"stat red"},Nfe={class:"stat-number"},Ofe={class:"stat yellow"},zfe={class:"stat-number"},Rfe={class:"team-stats"},Dfe={class:"stat-number"},Ife={class:"stat-number"},Ffe=ws({__name:"AnalisisPostMatchType1",props:{report:{type:Object,default:()=>({})}},setup(r){function i(d){return d?d.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r,F=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4087
4087
  ${n}`}return e.join(", ")}),Y=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.visiting_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4088
- ${n}`}return e.join(", ")}),L=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),T=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),t=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),b=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null});return(d,e)=>(p.openBlock(),p.createElementBlock("div",lfe,[p.createElementVNode("div",cfe,[p.createElementVNode("div",ufe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,dfe)]),p.createElementVNode("div",hfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,pfe)])]),e[7]||(e[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",ffe,[p.createElementVNode("span",mfe,p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",gfe," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",yfe,[p.createElementVNode("div",vfe,[p.createElementVNode("div",bfe,[p.createElementVNode("span",xfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,_fe)]),p.createElementVNode("span",wfe,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Tfe,[p.createElementVNode("span",kfe,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Sfe,[p.createElementVNode("span",Efe,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Cfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Afe)])])]),p.createElementVNode("div",Mfe,[p.createElementVNode("div",Lfe,[e[2]||(e[2]=p.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1)),F.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":F.value&&F.value.includes(`
4088
+ ${n}`}return e.join(", ")}),L=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),T=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),t=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),b=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null});return(d,e)=>(p.openBlock(),p.createElementBlock("div",lfe,[p.createElementVNode("div",cfe,[p.createElementVNode("div",ufe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,dfe)]),p.createElementVNode("div",hfe,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,pfe)])]),e[7]||(e[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",ffe,[p.createElementVNode("span",mfe,p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",gfe," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",yfe,[p.createElementVNode("div",vfe,[p.createElementVNode("div",bfe,[p.createElementVNode("span",xfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,_fe)]),p.createElementVNode("span",wfe,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",Tfe,[p.createElementVNode("span",kfe,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",Sfe,[p.createElementVNode("span",Efe,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",Cfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,Afe)])])]),p.createElementVNode("div",Mfe,[p.createElementVNode("div",Lfe,[e[2]||(e[2]=p.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1)),F.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":F.value&&F.value.includes(`
4089
4089
  `)}])},p.toDisplayString(F.value),3)):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":F.value&&F.value.includes(`
4090
4090
  `)}])},null,2),p.createElementVNode("span",Pfe,[e[0]||(e[0]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),p.createElementVNode("span",Nfe,p.toDisplayString(L.value||0),1)]),p.createElementVNode("span",Ofe,[e[1]||(e[1]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),p.createElementVNode("span",zfe,p.toDisplayString(T.value||0),1)])]),e[6]||(e[6]=p.createElementVNode("div",{class:"empty"},null,-1)),p.createElementVNode("div",Rfe,[p.createElementVNode("span",Dfe,p.toDisplayString(t.value||0),1),e[3]||(e[3]=p.createElementVNode("span",{class:"stat yellow"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),p.createElementVNode("span",Ife,p.toDisplayString(b.value||0),1),e[4]||(e[4]=p.createElementVNode("span",{class:"stat red"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":Y.value&&Y.value.includes(`
4091
4091
  `)}])},null,2),Y.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":Y.value&&Y.value.includes(`
4092
- `)}])},p.toDisplayString(Y.value),3)):p.createCommentVNode("",!0),e[5]||(e[5]=p.createStaticVNode('<span class="stat ball" data-v-78d552f2><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-78d552f2><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-78d552f2></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-78d552f2"]]),Bfe={class:"prematch-bg"},Vfe={class:"subtitle"},Ufe={class:"jornada"},jfe={class:"fecha"},qfe={class:"teams-row"},Wfe={class:"team team-local"},Gfe={class:"escudo-svg"},Xfe=["src"],Hfe={class:"team-name"},Kfe={class:"team team-visitor"},Zfe={class:"escudo-svg"},Jfe=["src"],Yfe={class:"team-name"},Qfe=ws({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Bfe,[Y[0]||(Y[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Vfe,[p.createElementVNode("span",Ufe,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",jfe," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",qfe,[p.createElementVNode("div",Wfe,[p.createElementVNode("span",Gfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,Xfe)]),p.createElementVNode("span",Hfe,p.toDisplayString(y.report.game.home_team_acronym),1)]),p.createElementVNode("div",Kfe,[p.createElementVNode("span",Zfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,Jfe)]),p.createElementVNode("span",Yfe,p.toDisplayString(y.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-8d5b1620"]]),$fe={class:"prematch-bg"},eme={class:"background-shields"},tme={class:"shield-left"},rme=["src"],nme={class:"shield-right"},ame=["src"],ime={class:"subtitle"},ome={class:"jornada"},sme={class:"fecha"},lme={class:"teams-grid"},cme={class:"row row-top"},ume={class:"team team-local"},dme={class:"escudo-svg"},hme=["src"],pme={class:"team-name"},fme={class:"score"},mme={class:"score-text"},gme={class:"team team-visitor"},yme={class:"team-name"},vme={class:"escudo-svg"},bme=["src"],xme={class:"row row-bottom"},_me={class:"team-stats"},wme={class:"stat red"},Tme={class:"stat-number"},kme={class:"stat yellow"},Sme={class:"stat-number"},Eme={class:"team-stats"},Cme={class:"stat-number"},Ame={class:"stat-number"},Mme=ws({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function i(d){return d?d.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r,F=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4092
+ `)}])},p.toDisplayString(Y.value),3)):p.createCommentVNode("",!0),e[5]||(e[5]=p.createStaticVNode('<span class="stat ball" data-v-7dd14646><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7dd14646><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-7dd14646></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-7dd14646"]]),Bfe={class:"prematch-bg"},Vfe={class:"subtitle"},Ufe={class:"jornada"},jfe={class:"fecha"},qfe={class:"teams-row"},Wfe={class:"team team-local"},Gfe={class:"escudo-svg"},Xfe=["src"],Hfe={class:"team-name"},Kfe={class:"team team-visitor"},Zfe={class:"escudo-svg"},Jfe=["src"],Yfe={class:"team-name"},Qfe=ws({__name:"AnalisisPrematchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Bfe,[Y[0]||(Y[0]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Vfe,[p.createElementVNode("span",Ufe,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",jfe," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",qfe,[p.createElementVNode("div",Wfe,[p.createElementVNode("span",Gfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,Xfe)]),p.createElementVNode("span",Hfe,p.toDisplayString(y.report.game.home_team_acronym),1)]),p.createElementVNode("div",Kfe,[p.createElementVNode("span",Zfe,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,Jfe)]),p.createElementVNode("span",Yfe,p.toDisplayString(y.report.game.visiting_team_acronym),1)])])]))}},[["__scopeId","data-v-16777c2c"]]),$fe={class:"prematch-bg"},eme={class:"background-shields"},tme={class:"shield-left"},rme=["src"],nme={class:"shield-right"},ame=["src"],ime={class:"subtitle"},ome={class:"jornada"},sme={class:"fecha"},lme={class:"teams-grid"},cme={class:"row row-top"},ume={class:"team team-local"},dme={class:"escudo-svg"},hme=["src"],pme={class:"team-name"},fme={class:"score"},mme={class:"score-text"},gme={class:"team team-visitor"},yme={class:"team-name"},vme={class:"escudo-svg"},bme=["src"],xme={class:"row row-bottom"},_me={class:"team-stats"},wme={class:"stat red"},Tme={class:"stat-number"},kme={class:"stat yellow"},Sme={class:"stat-number"},Eme={class:"team-stats"},Cme={class:"stat-number"},Ame={class:"stat-number"},Mme=ws({__name:"AnalisisPostMatchType2",props:{report:{type:Object,default:()=>({})}},setup(r){function i(d){return d?d.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r,F=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.home_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4093
4093
  ${n}`}return e.join(", ")}),Y=p.computed(()=>{var x,m,v;const d=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.minutes)==null?void 0:v.visiting_goals_minutes;if(!Array.isArray(d)||d.length===0)return null;const e=d.map(h=>{const n=h.match(/(\d+)'$/);return n?n[1]+"'":""}).filter(h=>h!=="");if(e.length>5){const h=e.slice(0,5).join(", "),n=e.slice(5).join(", ");return`${h}
4094
- ${n}`}return e.join(", ")}),L=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),T=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),t=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),b=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null});return(d,e)=>(p.openBlock(),p.createElementBlock("div",$fe,[p.createElementVNode("div",eme,[p.createElementVNode("div",tme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,rme)]),p.createElementVNode("div",nme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,ame)])]),e[7]||(e[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",ime,[p.createElementVNode("span",ome,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",sme," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",lme,[p.createElementVNode("div",cme,[p.createElementVNode("div",ume,[p.createElementVNode("span",dme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,hme)]),p.createElementVNode("span",pme,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",fme,[p.createElementVNode("span",mme,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",gme,[p.createElementVNode("span",yme,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",vme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,bme)])])]),p.createElementVNode("div",xme,[p.createElementVNode("div",_me,[e[2]||(e[2]=p.createStaticVNode('<span class="stat ball" data-v-2a752817><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-2a752817><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path></svg></span>',1)),F.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":F.value&&F.value.includes(`
4094
+ ${n}`}return e.join(", ")}),L=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),T=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.home_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),t=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_yellow_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null}),b=p.computed(()=>{var e,x,m;const d=(m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.minutes)==null?void 0:m.away_red_cards_minutes;return Array.isArray(d)&&d.length>0?d.length:null});return(d,e)=>(p.openBlock(),p.createElementBlock("div",$fe,[p.createElementVNode("div",eme,[p.createElementVNode("div",tme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,rme)]),p.createElementVNode("div",nme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,ame)])]),e[7]||(e[7]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",ime,[p.createElementVNode("span",ome,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",sme," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",lme,[p.createElementVNode("div",cme,[p.createElementVNode("div",ume,[p.createElementVNode("span",dme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,hme)]),p.createElementVNode("span",pme,p.toDisplayString(r.report.game.home_team_acronym),1)]),p.createElementVNode("div",fme,[p.createElementVNode("span",mme,p.toDisplayString(r.report.game.score[0])+":"+p.toDisplayString(r.report.game.score[1]),1)]),p.createElementVNode("div",gme,[p.createElementVNode("span",yme,p.toDisplayString(r.report.game.visiting_team_acronym),1),p.createElementVNode("span",vme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,bme)])])]),p.createElementVNode("div",xme,[p.createElementVNode("div",_me,[e[2]||(e[2]=p.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1)),F.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":F.value&&F.value.includes(`
4095
4095
  `)}])},p.toDisplayString(F.value),3)):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":F.value&&F.value.includes(`
4096
4096
  `)}])},null,2),p.createElementVNode("span",wme,[e[0]||(e[0]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})],-1)),p.createElementVNode("span",Tme,p.toDisplayString(L.value||0),1)]),p.createElementVNode("span",kme,[e[1]||(e[1]=p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})],-1)),p.createElementVNode("span",Sme,p.toDisplayString(T.value||0),1)])]),e[6]||(e[6]=p.createElementVNode("div",{class:"empty"},null,-1)),p.createElementVNode("div",Eme,[p.createElementVNode("span",Cme,p.toDisplayString(t.value||0),1),e[3]||(e[3]=p.createElementVNode("span",{class:"stat yellow"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FFE066",stroke:"#BFA600"})])],-1)),p.createElementVNode("span",Ame,p.toDisplayString(b.value||0),1),e[4]||(e[4]=p.createElementVNode("span",{class:"stat red"},[p.createElementVNode("svg",{width:"12",height:"16",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("rect",{width:"14",height:"18",rx:"2",fill:"#FF4D4F",stroke:"#A80000"})])],-1)),p.createElementVNode("div",{class:p.normalizeClass(["separator",{"two-lines":Y.value&&Y.value.includes(`
4097
4097
  `)}])},null,2),Y.value!==null?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["stat time",{"two-lines":Y.value&&Y.value.includes(`
4098
- `)}])},p.toDisplayString(Y.value),3)):p.createCommentVNode("",!0),e[5]||(e[5]=p.createStaticVNode('<span class="stat ball" data-v-2a752817><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-2a752817><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-2a752817></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-2a752817"]]),Lme={class:"prematch-bg"},Pme={class:"subtitle"},Nme={class:"jornada"},Ome={class:"fecha"},zme={class:"teams-row"},Rme={class:"team team-local"},Dme={class:"escudo-svg"},Ime=["src"],Fme={class:"team team-visitor"},Bme={class:"escudo-svg"},Vme=["src"],Ume=ws({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Lme,[Y[1]||(Y[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Pme,[p.createElementVNode("span",Nme,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",Ome," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",zme,[p.createElementVNode("div",Rme,[p.createElementVNode("span",Dme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,Ime)])]),Y[0]||(Y[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",Fme,[p.createElementVNode("span",Bme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,Vme)])])])]))}},[["__scopeId","data-v-23601285"]]),jme={class:"prematch-bg"},qme={class:"background-shields"},Wme={class:"shield-left"},Gme=["src"],Xme={class:"shield-right"},Hme=["src"],Kme={class:"subtitle"},Zme={class:"jornada"},Jme={class:"fecha"},Yme={class:"teams-row"},Qme={class:"team team-local"},$me={class:"team-header"},e0e={class:"escudo-svg"},t0e=["src"],r0e={class:"score"},n0e={class:"players-list"},a0e={class:"player-name"},i0e={key:0,class:"more-events-indicator"},o0e={class:"team team-visitor"},s0e={class:"team-header"},l0e={class:"score"},c0e={class:"escudo-svg"},u0e=["src"],d0e={class:"players-list"},h0e={class:"player-name"},p0e={key:0},f0e={key:0,class:"more-events-indicator"},m0e=ws({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(r){var b,d;function i(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;console.log("Props report: ",y.report),console.log("Game minutes: ",(d=(b=y.report)==null?void 0:b.game)==null?void 0:d.report_minutes);const F=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.home_goals_minutes)||[]).slice(0,5)}),Y=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.visiting_goals_minutes)||[]).slice(0,5)});function L(e){const x=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),m=e.match(/^(.*?)\s*\d+'/),v=m?" "+m[1].trim():"";return{minutos:x,nombre:v}}const T=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,x)=>(p.openBlock(),p.createElementBlock("div",jme,[p.createElementVNode("div",qme,[p.createElementVNode("div",Wme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,Gme)]),p.createElementVNode("div",Xme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Hme)])]),x[5]||(x[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",Kme,[p.createElementVNode("span",Zme,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",Jme," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",Yme,[p.createElementVNode("div",Qme,[p.createElementVNode("div",$me,[p.createElementVNode("span",e0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,t0e)]),p.createElementVNode("div",r0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",n0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(F.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[p.createElementVNode("span",a0e,p.toDisplayString(m)+" ",1),x[0]||(x[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),T.value?(p.openBlock(),p.createElementBlock("div",i0e,x[1]||(x[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])]),x[4]||(x[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",o0e,[p.createElementVNode("div",s0e,[p.createElementVNode("div",l0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",c0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,u0e)])]),p.createElementVNode("div",d0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[x[2]||(x[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),p.createElementVNode("span",h0e,[p.createTextVNode(p.toDisplayString(L(m).minutos)+" ",1),L(m).nombre?(p.openBlock(),p.createElementBlock("span",p0e,p.toDisplayString(L(m).nombre),1)):p.createCommentVNode("",!0)])]))),128)),t.value?(p.openBlock(),p.createElementBlock("div",f0e,x[3]||(x[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-55d29d0e"]]),g0e={class:"prematch-bg"},y0e={class:"subtitle"},v0e={class:"jornada"},b0e={class:"fecha"},x0e={class:"teams-row"},_0e={class:"team team-local"},w0e={class:"escudo-svg"},T0e=["src"],k0e={class:"team team-visitor"},S0e={class:"escudo-svg"},E0e=["src"],C0e=ws({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",g0e,[Y[1]||(Y[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",y0e,[p.createElementVNode("span",v0e,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",b0e," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",x0e,[p.createElementVNode("div",_0e,[p.createElementVNode("span",w0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,T0e)])]),Y[0]||(Y[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",k0e,[p.createElementVNode("span",S0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,E0e)])])])]))}},[["__scopeId","data-v-347d4c02"]]),A0e={class:"prematch-bg"},M0e={class:"background-shields"},L0e={class:"shield-left"},P0e=["src"],N0e={class:"shield-right"},O0e=["src"],z0e={class:"subtitle"},R0e={class:"jornada"},D0e={class:"fecha"},I0e={class:"teams-row"},F0e={class:"team team-local"},B0e={class:"team-header"},V0e={class:"escudo-svg"},U0e=["src"],j0e={class:"score"},q0e={class:"players-list"},W0e={class:"player-name"},G0e={key:0,class:"more-events-indicator"},X0e={class:"team team-visitor"},H0e={class:"team-header"},K0e={class:"score"},Z0e={class:"escudo-svg"},J0e=["src"],Y0e={class:"players-list"},Q0e={class:"player-name"},$0e={key:0},ege={key:0,class:"more-events-indicator"},tge=ws({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(r){var b,d;function i(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;console.log("Props report: ",y.report),console.log("Game minutes: ",(d=(b=y.report)==null?void 0:b.game)==null?void 0:d.report_minutes);const F=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.home_goals_minutes)||[]).slice(0,5)}),Y=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.visiting_goals_minutes)||[]).slice(0,5)});function L(e){const x=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),m=e.match(/^(.*?)\s*\d+'/),v=m?m[1].trim():"";return{minutos:x,nombre:v}}const T=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,x)=>(p.openBlock(),p.createElementBlock("div",A0e,[p.createElementVNode("div",M0e,[p.createElementVNode("div",L0e,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,P0e)]),p.createElementVNode("div",N0e,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,O0e)])]),x[5]||(x[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",z0e,[p.createElementVNode("span",R0e,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",D0e," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",I0e,[p.createElementVNode("div",F0e,[p.createElementVNode("div",B0e,[p.createElementVNode("span",V0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,U0e)]),p.createElementVNode("div",j0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",q0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(F.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[p.createElementVNode("span",W0e,p.toDisplayString(m)+" ",1),x[0]||(x[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),T.value?(p.openBlock(),p.createElementBlock("div",G0e,x[1]||(x[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])]),x[4]||(x[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",X0e,[p.createElementVNode("div",H0e,[p.createElementVNode("div",K0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",Z0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,J0e)])]),p.createElementVNode("div",Y0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[x[2]||(x[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),p.createElementVNode("span",Q0e,[p.createTextVNode(p.toDisplayString(L(m).minutos)+" ",1),L(m).nombre?(p.openBlock(),p.createElementBlock("span",$0e," "+p.toDisplayString(L(m).nombre),1)):p.createCommentVNode("",!0)])]))),128)),t.value?(p.openBlock(),p.createElementBlock("div",ege,x[3]||(x[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-4a4e18cd"]]),rge={class:"report-card",style:{position:"relative"}},nge={class:"report-img-placeholder",style:{position:"relative"}},age={class:"inner-card-report"},ige={class:"report-footer"},oge={class:"report-title"},sge={class:"report-template"},lge={class:"template-name"},cge={class:"report-league"},uge={class:"report-tournament"},dge=ws({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(r,{emit:i}){const y=i,F=r,Y=p.ref(!1);function L(){Y.value=!1,y("open-report",F.report)}function T(){console.log("renombrar"),Y.value=!1,y("renombrar",F.report.report_name||"Reporte",F.report.id)}function t(){console.log("editar"),Y.value=!1,y("edit-template",F.report)}function b(){console.log("duplicar"),Y.value=!1}function d(){console.log("eliminar"),Y.value=!1,y("eliminar",F.report)}function e(){console.log("descargar"),y("download-report",F.report),Y.value=!1}function x(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function m(){y("open-report",F.report)}return(v,h)=>(p.openBlock(),p.createElementBlock("div",rge,[p.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=p.withModifiers(n=>Y.value=!Y.value,["stop"]))},h[4]||(h[4]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])),p.createElementVNode("div",nge,[r.report.template_type===1&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(sfe,{key:0,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(Ffe,{key:1,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Qfe,{key:2,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Mme,{key:3,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(Ume,{key:4,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(m0e,{key:5,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===1&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(C0e,{key:6,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(tge,{key:7,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:"report-img-overlay"},[p.createElementVNode("button",{class:"report-img-button",onClick:m},"Ver reporte")])]),p.createElementVNode("div",age,[p.createElementVNode("div",ige,[p.createElementVNode("div",oge,p.toDisplayString(r.report.report_name),1),p.createElementVNode("div",sge,[h[5]||(h[5]=p.createTextVNode(" Template: ",-1)),p.createElementVNode("span",lge,p.toDisplayString(r.report.name),1)]),p.createElementVNode("div",cge,p.toDisplayString(r.report.season_name)+" - "+p.toDisplayString(x(r.report.game.matchday_name))+"  |  "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1),p.createElementVNode("div",uge,p.toDisplayString(r.report.tournament_name),1)])]),Y.value?(p.openBlock(),p.createBlock(Hpe,{key:0,onClick:h[1]||(h[1]=p.withModifiers(n=>Y.value=!1,["self"])),onMouseleave:h[2]||(h[2]=n=>Y.value=!1),onVerReporte:L,onRenombrar:T,onEditar:t,onDuplicar:b,onEliminar:d,onDescargar:e})):p.createCommentVNode("",!0),Y.value?(p.openBlock(),p.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=n=>Y.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a75289c7"]]),hge={class:"modal-overlay"},pge={class:"modal-content"},fge={class:"modal-body"},mge=["placeholder","disabled"],gge={key:0,class:"error-message"},yge={class:"modal-footer"},vge=["disabled"],bge=["disabled"],xge={key:0},_ge={key:1},wge=ws({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName),L=p.ref(!1),T=p.ref("");p.watch(()=>y.initialName,b=>{Y.value=b,T.value=""});async function t(){var b;if(console.log("acceptRename"),!(Y.value.trim().length<3)){console.log("acceptRename 22"),L.value=!0,T.value="";try{await to.create({headers:{Authorization:`${y.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports/${y.reportId}/rename`,{name:Y.value.trim()}),F("rename",Y.value.trim()),F("refresh"),F("close")}catch(d){console.error("Error al renombrar el reporte:",d),((b=d.response)==null?void 0:b.status)===409?T.value="Ya existe un reporte con el mismo nombre":T.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{L.value=!1}}}return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(b,d)=>(p.openBlock(),p.createElementBlock("div",hge,[p.createElementVNode("div",pge,[p.createElementVNode("button",{class:"close-btn",onClick:d[0]||(d[0]=e=>b.$emit("close"))},d[3]||(d[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),d[5]||(d[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),d[6]||(d[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",fge,[d[4]||(d[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":d[1]||(d[1]=e=>Y.value=e),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:L.value},null,8,mge),[[p.vModelText,Y.value]]),T.value?(p.openBlock(),p.createElementBlock("div",gge,p.toDisplayString(T.value),1)):p.createCommentVNode("",!0)]),d[7]||(d[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",yge,[p.createElementVNode("button",{class:"cancel-btn",onClick:d[2]||(d[2]=e=>b.$emit("close")),disabled:L.value},"Cancelar",8,vge),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:t},[L.value?(p.openBlock(),p.createElementBlock("span",xge,"Guardando...")):(p.openBlock(),p.createElementBlock("span",_ge,"Guardar"))],8,bge)])])]))}},[["__scopeId","data-v-3a66dd5f"]]),Tge={class:"modal-overlay"},kge={class:"modal-content"},Sge={class:"modal-footer"},Ege=["disabled"],Cge=["disabled"],Age=ws({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1),L=async()=>{try{Y.value=!0;const t=await to.create({headers:{Authorization:`${y.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports/${y.reportId}`);console.log("Reporte eliminado exitosamente:",t.data),F("reportDeleted",y.reportId),F("close")}catch(T){console.error("Error al eliminar el reporte:",T),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{Y.value=!1}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(T,t)=>(p.openBlock(),p.createElementBlock("div",Tge,[p.createElementVNode("div",kge,[p.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=b=>T.$emit("close"))},t[2]||(t[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=p.createStaticVNode('<div class="modal-header" data-v-8c239161><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-8c239161><span class="modal-title" data-v-8c239161>Eliminar reporte</span></div><div class="header-separator" data-v-8c239161></div><div class="modal-body confirm-text" data-v-8c239161> ¿Estás seguro que deseas eliminar<br data-v-8c239161> este reporte? Si lo haces no habrá manera<br data-v-8c239161> de recuperarlo. </div><div class="header-separator" data-v-8c239161></div>',4)),p.createElementVNode("div",Sge,[p.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=b=>T.$emit("close")),disabled:Y.value},"Cancelar",8,Ege),p.createElementVNode("button",{class:"delete-btn",onClick:L,disabled:Y.value},p.toDisplayString(Y.value?"Eliminando...":"Eliminar"),9,Cge)])])]))}},[["__scopeId","data-v-8c239161"]]),Mge={class:"reports-header"},Lge={class:"count"},Pge={key:0,class:"sort-options"},Nge=["onClick"],Oge={key:0,class:"checkmark"},zge={key:0,class:"loading-state"},Rge={key:1,class:"error-state"},Dge={key:3,class:"empty-reports"},Ige={key:4,class:"empty-reports"},Fge=ws({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref([]),L=p.ref(!1),T=p.ref(null),t=p.computed(()=>{let V=Y.value;if(y.searchQuery.trim()){const j=y.searchQuery.toLowerCase().trim();V=Y.value.filter(G=>{var re,te,Z,ee,le,ce,he;return!!((((re=G.report_name)==null?void 0:re.toLowerCase())||"").includes(j)||(((te=G.name)==null?void 0:te.toLowerCase())||"").includes(j)||G.created_at&&new Date(G.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(j)||(Z=G.game)!=null&&Z.date_time_utc&&new Date(G.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(j)||(((le=(ee=G.game)==null?void 0:ee.season_name)==null?void 0:le.toLowerCase())||"").includes(j)||(((ce=G.tournament_name)==null?void 0:ce.toLowerCase())||"").includes(j)||(he=G.game)!=null&&he.matchday&&G.game.matchday.toString().includes(j))})}return d.value&&(V=[...V].sort((j,G)=>{var q,J;if(d.value==="A - Z"){const ne=(j.report_name||"").toLowerCase(),H=(G.report_name||"").toLowerCase();return ne.localeCompare(H,"es",{sensitivity:"base"})}else if(d.value==="Más recientes"){const ne=new Date(j.created_at||0);return new Date(G.created_at||0)-ne}else if(d.value==="Torneo"){const ne=(j.tournament_name||"").toLowerCase(),H=(G.tournament_name||"").toLowerCase();if(ne!==H)return ne.localeCompare(H,"es",{sensitivity:"base"});const re=j.season_id||0;return(G.season_id||0)-re}else if(d.value==="Jornada"){const ne=((q=j.game)==null?void 0:q.matchday_id)||0,H=((J=G.game)==null?void 0:J.matchday_id)||0;return ne-H}return 0})),V}),b=p.ref(!1),d=p.ref("Más recientes"),e=p.ref(!1),x=p.ref(""),m=p.ref(""),v=p.ref(""),h=p.ref(!1),n=p.ref(""),a=p.ref(""),u=p.ref(null),s=p.ref(null),l=p.ref(null),f=p.ref(0),g=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],k=async()=>{L.value=!0,T.value=null;try{const V=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports`,{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?Y.value=V.data:V.data&&V.data.reports?Y.value=V.data.reports:V.data&&V.data.data?Y.value=V.data.data:Y.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),T.value=V.message||"Error al cargar los reportes",Y.value=[]}finally{L.value=!1}},E=p.computed(()=>{if(!f.value)return"grid-1-column";const V=340,j=20,q=f.value-40,J=Math.floor((q+j)/(V+j)),ne=Math.max(1,J);return ne>=4?"grid-4-columns":ne>=3?"grid-3-columns":ne>=2?"grid-2-columns":"grid-1-column"}),S=()=>{b.value=!b.value},M=V=>{console.log("Ordenando por:",V),d.value=V,b.value=!1};function N(V){console.log("reports section onOpenReport",V),F("open-report",V)}const C=(V,j)=>{x.value=V,m.value=j;const G=Y.value.find(q=>q.id===j);v.value=G?G.template_type:"",e.value=!0},P=V=>{console.log("Renombrar reporte de",x.value,"a",V),e.value=!1;const j=Y.value.findIndex(G=>G.id===m.value);j!==-1&&(Y.value[j].report_name=V)},A=V=>{n.value=V.report_name||"Reporte",a.value=V.id,h.value=!0},w=V=>{h.value=!1,Y.value=Y.value.filter(j=>j.id!==V)};function O(V){console.log("Descargando reporte:",V),F("download-report",V)}const _=V=>{b.value&&u.value&&!u.value.contains(V.target)&&(b.value=!1)},z=()=>{s.value&&(f.value=s.value.offsetWidth)};let I=null;return p.onMounted(async()=>{document.addEventListener("mousedown",_),await k(),await p.nextTick(),z(),window.ResizeObserver?(I=new ResizeObserver(()=>{z()}),s.value&&I.observe(s.value)):window.addEventListener("resize",z)}),p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_),I?I.disconnect():window.removeEventListener("resize",z)}),(V,j)=>(p.openBlock(),p.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:s},[p.createElementVNode("div",Mge,[p.createElementVNode("span",null,[j[2]||(j[2]=p.createTextVNode("Reportes ",-1)),p.createElementVNode("span",Lge,"("+p.toDisplayString(t.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:u},[p.createElementVNode("button",{class:"sort-button",onClick:S},[p.createTextVNode(p.toDisplayString(d.value||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:b.value}])},null,2)]),b.value?(p.openBlock(),p.createElementBlock("div",Pge,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(g,G=>p.createElementVNode("div",{key:G.value,class:p.normalizeClass(["sort-option",{selected:d.value===G.value}]),onClick:q=>d.value!==G.value&&M(G.value)},[p.createElementVNode("span",null,p.toDisplayString(G.label),1),d.value===G.value?(p.openBlock(),p.createElementBlock("span",Oge,j[3]||(j[3]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)],10,Nge)),64))])):p.createCommentVNode("",!0)],512)]),L.value?(p.openBlock(),p.createElementBlock("div",zge,j[4]||(j[4]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando reportes...",-1)]))):T.value?(p.openBlock(),p.createElementBlock("div",Rge,[p.createElementVNode("p",null,"Error al cargar reportes: "+p.toDisplayString(T.value),1),p.createElementVNode("button",{onClick:k,class:"retry-button"},"Reintentar")])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass(["reports-grid",E.value]),ref_key:"reportsGridRef",ref:l},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(t.value,G=>(p.openBlock(),p.createBlock(dge,{key:G.id,report:G,onOpenReport:N,onRenombrar:C,onEliminar:A,onDownloadReport:O},null,8,["report"]))),128))],2)),!L.value&&!T.value&&Y.value.length===0?(p.openBlock(),p.createElementBlock("div",Dge," No tienes reportes aún. ")):p.createCommentVNode("",!0),!L.value&&!T.value&&Y.value.length>0&&t.value.length===0?(p.openBlock(),p.createElementBlock("div",Ige," No se encontraron reportes que coincidan con tu búsqueda. ")):p.createCommentVNode("",!0),e.value?(p.openBlock(),p.createBlock(wge,{key:5,initialName:x.value,templateType:v.value,token:r.token,userId:r.userId,reportId:m.value,onClose:j[0]||(j[0]=G=>e.value=!1),onRename:P,onRefresh:k},null,8,["initialName","templateType","token","userId","reportId"])):p.createCommentVNode("",!0),h.value?(p.openBlock(),p.createBlock(Age,{key:6,"report-id":a.value,"user-id":r.userId,token:r.token,onClose:j[1]||(j[1]=G=>h.value=!1),onReportDeleted:w},null,8,["report-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),Bge={class:"modal-overlay"},Vge={class:"modal-content"},Uge=ws({__name:"ModalSoloEscritorio",setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",Bge,[p.createElementVNode("div",Vge,[y[1]||(y[1]=p.createStaticVNode('<div class="modal-icon" data-v-76d7f6ed><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-76d7f6ed><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-76d7f6ed></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-76d7f6ed></rect></svg></div><div class="modal-text" data-v-76d7f6ed> Esta sección solo está disponible para<br data-v-76d7f6ed> escritorio. Utiliza tu computadora <br data-v-76d7f6ed>para ingresar. </div>',2)),p.createElementVNode("button",{class:"modal-btn",onClick:y[0]||(y[0]=F=>i.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-76d7f6ed"]]),jge={class:"top-bar"},qge={class:"tabs-container"},Wge={class:"tabs"},Gge={key:0,class:"actions"},Xge={class:"search-container"},Hge={key:1,class:"actions"},Kge={class:"search-container"},Zge=ws({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(r,{emit:i}){const y=r,{userId:F,team:Y,token:L}=y,T=p.ref("templates"),t=p.ref(!1),b=p.ref(null),d=p.ref(!1),e=p.ref(""),x=p.ref(""),m=p.ref(null),v=p.ref(null),h=i;function n(){if(b.value){const S=b.value.offsetWidth;t.value=S<1028}}p.watch(t,S=>{S?document.body.style.overflow="hidden":document.body.style.overflow=""}),p.onBeforeUnmount(()=>{document.body.style.overflow=""}),p.onMounted(()=>{n(),window.addEventListener("resize",n)}),p.onBeforeUnmount(()=>{window.removeEventListener("resize",n)});function a(S){console.log("onOpenModalNewTemplate, gsc-reports:",S),u(S)}function u(S){console.log("onEditTemplate, template:",S),console.log("Edicion es: "),console.log({template:S,isTemplateMode:!0}),m.value.show({template:S,isTemplateMode:!0})}const s=()=>{e.value=""},l=()=>{x.value=""};function f(S){console.log("gsc-report onOpenReport, report:",S),m.value&&m.value.show({template:S,isTemplateMode:!1})}function g(S){h("download-report",S)}function k(){h("toHome")}function E(){v.value&&v.value.obtenerTemplates()}return(S,M)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(p.unref(Pue),{ref_key:"reportTemplateMaker",ref:m,token:p.unref(L),onClose:E},null,8,["token"]),p.createElementVNode("div",{ref_key:"containerRef",ref:b,class:"reports-container"},[t.value?(p.openBlock(),p.createBlock(Uge,{key:0,onToHome:k})):p.createCommentVNode("",!0),M[12]||(M[12]=p.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),p.createElementVNode("div",jge,[p.createElementVNode("div",qge,[p.createElementVNode("div",Wge,[p.createElementVNode("div",{class:p.normalizeClass(["tab tab-templates",{active:T.value==="templates"}]),onClick:M[0]||(M[0]=N=>T.value="templates")}," Templates ",2),p.createElementVNode("div",{class:p.normalizeClass(["tab tab-reports",{active:T.value==="reports"}]),onClick:M[1]||(M[1]=N=>T.value="reports")}," Tus reportes ",2)])]),T.value==="templates"?(p.openBlock(),p.createElementBlock("div",Gge,[p.createElementVNode("div",Xge,[M[8]||(M[8]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":M[2]||(M[2]=N=>e.value=N),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[p.vModelText,e.value]]),e.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:s,class:"clear-search-btn",type:"button"},M[7]||(M[7]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)]),p.createElementVNode("button",{class:"create-template-btn",onClick:M[3]||(M[3]=N=>d.value=!0)},M[9]||(M[9]=[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),p.createTextVNode(" Crear template ",-1)]))])):p.createCommentVNode("",!0),T.value==="reports"?(p.openBlock(),p.createElementBlock("div",Hge,[p.createElementVNode("div",Kge,[M[11]||(M[11]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":M[4]||(M[4]=N=>x.value=N),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[p.vModelText,x.value]]),x.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:l,class:"clear-search-btn",type:"button"},M[10]||(M[10]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)])])):p.createCommentVNode("",!0)]),T.value==="templates"?(p.openBlock(),p.createBlock(Gpe,{key:1,ref_key:"templatesSectionRef",ref:v,userId:p.unref(F),token:p.unref(L),team:p.unref(Y),searchQuery:e.value,onSwitchToReports:M[5]||(M[5]=N=>T.value="reports"),onOpenModalNewTemplate:a,onEditTemplate:u},null,8,["userId","token","team","searchQuery"])):(p.openBlock(),p.createBlock(Fge,{key:2,userId:p.unref(F),token:p.unref(L),team:p.unref(Y),searchQuery:x.value,onOpenReport:f,onDownloadReport:g},null,8,["userId","token","team","searchQuery"])),d.value?(p.openBlock(),p.createBlock(gT,{key:3,token:p.unref(L),team:p.unref(Y),onOpenModalNewTemplate:a,onClose:M[6]||(M[6]=N=>d.value=!1)},null,8,["token","team"])):p.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-d422079f"]]),Jge={class:"subcategory-group"},Yge={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",Jge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroup,F=>(p.openBlock(),p.createBlock(p.unref(K1),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Qge=nu(Yge,[["__scopeId","data-v-ae6f3d72"]]),$ge={class:"filter-subcategories"},eye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",$ge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroups,F=>(p.openBlock(),p.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[p.createVNode(Qge,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),my=r=>(p.pushScopeId("data-v-80d9c265"),r=r(),p.popScopeId(),r),tye={class:"details__header"},rye=my(()=>p.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),nye={class:"details__header__checkbox"},aye={class:"details__body"},iye={class:"details__body__playing-as"},oye=["onClick"],sye={class:"details__header"},lye=my(()=>p.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),cye={class:"details__header__checkbox"},uye={class:"details__body"},dye=my(()=>p.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),hye={class:"details__body__game-section"},pye=["onClick"],fye={class:"details__body"},mye=my(()=>p.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),gye={class:"details__body__game-section"},yye=["onClick"],vye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__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(r){const i=r;p.useCssVars(e=>({"49cba245":r.buttonsBackgroundColor,"52f02da6":r.buttonsTextColor,"7d3f686a":r.buttonsBorderWidth,"7c286a07":r.buttonsBorderColor,"24a6f4aa":r.buttonsBackgroundColorActive,cd8d7768:r.buttonsTextColorActive,"35fa5c10":r.buttonsBorderWidthActive,"0cde1826":r.buttonsBorderColorActive}));const y=p.computed(()=>i.playingAs.every(e=>e.isSelected)),F=p.computed(()=>i.gameSections.every(e=>e.isSelected)),Y=p.computed(()=>i.gameSections.reduce((e,x)=>(x.value<=3?e.firstHalf.push(x):e.secondHalf.push(x),e),{firstHalf:[],secondHalf:[]})),L=p.computed(()=>({"--border-radius-first-button":`${i.buttonsBorderRadius} 0 0 ${i.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${i.buttonsBorderRadius} ${i.buttonsBorderRadius} 0`}));function T(e){e?i.playingAs.forEach(x=>{x.isSelected=!0}):i.playingAs.forEach((x,m)=>{x.isSelected=m===0})}function t(e){i.playingAs.filter(x=>x.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function b(e){i.gameSections.filter(x=>x.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function d(e){e?i.gameSections.forEach(x=>{x.isSelected=!0}):i.gameSections.forEach((x,m)=>{x.isSelected=m===0})}return(e,x)=>(p.openBlock(),p.createElementBlock("div",{class:"details",style:p.normalizeStyle(L.value)},[p.createElementVNode("div",tye,[rye,p.createElementVNode("div",nye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":y.value,"onUpdate:modelValue":T},null,8,["model-value"])])]),p.createElementVNode("div",aye,[p.createElementVNode("div",iye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.playingAs,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>t(m)},p.toDisplayString(m.name),11,oye))),128))])]),p.createElementVNode("div",sye,[lye,p.createElementVNode("div",cye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":F.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),p.createElementVNode("div",uye,[dye,p.createElementVNode("div",hye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value.firstHalf,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>b(m)},p.toDisplayString(m.text),11,pye))),128))])]),p.createElementVNode("div",fye,[mye,p.createElementVNode("div",gye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value.secondHalf,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>b(m)},p.toDisplayString(m.text),11,yye))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),bye={class:"filter-field"},xye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterField",setup(r){const i=p.ref(Array.from({length:16},(F,Y)=>Y+1));function y(){}return(F,Y)=>(p.openBlock(),p.createElementBlock("div",bye,[p.createVNode(p.unref(iO),{width:"100%","background-color":"#2E3B46",value:i.value,"onUpdate:modelValue":y},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Sh.GSCReports=Zge,Object.defineProperty(Sh,Symbol.toStringTag,{value:"Module"})});
4098
+ `)}])},p.toDisplayString(Y.value),3)):p.createCommentVNode("",!0),e[5]||(e[5]=p.createStaticVNode('<span class="stat ball" data-v-63a8a7f8><svg width="19" height="19" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-63a8a7f8><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M12.7277 3.39453L10.0276 4.54375L7.32812 3.39453" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.65662 5.34766L4.91603 8.27341L2.98828 10.4871" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.01562 13.6523L6.87533 14.3093L8.38436 16.8279" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.7031 16.8213L13.2109 14.3015L16.0697 13.6445" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M17.1051 10.4865L15.1758 8.27156L15.4349 5.34766" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M10.0456 4.54688V6.92693" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M13.2109 9.32248L15.1681 8.27344" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M11.9961 12.9609L13.2064 14.3086" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M8.08198 12.9609L6.87109 14.3099" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path><path d="M4.91797 8.27344L6.87609 9.22818" stroke="white" stroke-width="1.36665" stroke-linecap="round" stroke-linejoin="round" data-v-63a8a7f8></path></svg></span>',1))])])])]))}},[["__scopeId","data-v-63a8a7f8"]]),Lme={class:"prematch-bg"},Pme={class:"subtitle"},Nme={class:"jornada"},Ome={class:"fecha"},zme={class:"teams-row"},Rme={class:"team team-local"},Dme={class:"escudo-svg"},Ime=["src"],Fme={class:"team team-visitor"},Bme={class:"escudo-svg"},Vme=["src"],Ume=ws({__name:"AnalisisPrematchType3",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",Lme,[Y[1]||(Y[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",Pme,[p.createElementVNode("span",Nme,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",Ome," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",zme,[p.createElementVNode("div",Rme,[p.createElementVNode("span",Dme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,Ime)])]),Y[0]||(Y[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",Fme,[p.createElementVNode("span",Bme,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,Vme)])])])]))}},[["__scopeId","data-v-b31afbdf"]]),jme={class:"prematch-bg"},qme={class:"background-shields"},Wme={class:"shield-left"},Gme=["src"],Xme={class:"shield-right"},Hme=["src"],Kme={class:"subtitle"},Zme={class:"jornada"},Jme={class:"fecha"},Yme={class:"teams-row"},Qme={class:"team team-local"},$me={class:"team-header"},e0e={class:"escudo-svg"},t0e=["src"],r0e={class:"score"},n0e={class:"players-list"},a0e={class:"player-name"},i0e={key:0,class:"more-events-indicator"},o0e={class:"team team-visitor"},s0e={class:"team-header"},l0e={class:"score"},c0e={class:"escudo-svg"},u0e=["src"],d0e={class:"players-list"},h0e={class:"player-name"},p0e={key:0},f0e={key:0,class:"more-events-indicator"},m0e=ws({__name:"AnalisisPostMatchType3",props:{report:{type:Object,default:()=>({})}},setup(r){var b,d;function i(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;console.log("Props report: ",y.report),console.log("Game minutes: ",(d=(b=y.report)==null?void 0:b.game)==null?void 0:d.report_minutes);const F=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.home_goals_minutes)||[]).slice(0,5)}),Y=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.visiting_goals_minutes)||[]).slice(0,5)});function L(e){const x=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),m=e.match(/^(.*?)\s*\d+'/),v=m?" "+m[1].trim():"";return{minutos:x,nombre:v}}const T=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,x)=>(p.openBlock(),p.createElementBlock("div",jme,[p.createElementVNode("div",qme,[p.createElementVNode("div",Wme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,Gme)]),p.createElementVNode("div",Xme,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,Hme)])]),x[5]||(x[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",Kme,[p.createElementVNode("span",Zme,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",Jme," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",Yme,[p.createElementVNode("div",Qme,[p.createElementVNode("div",$me,[p.createElementVNode("span",e0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,t0e)]),p.createElementVNode("div",r0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",n0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(F.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[p.createElementVNode("span",a0e,p.toDisplayString(m)+" ",1),x[0]||(x[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),T.value?(p.openBlock(),p.createElementBlock("div",i0e,x[1]||(x[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])]),x[4]||(x[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",o0e,[p.createElementVNode("div",s0e,[p.createElementVNode("div",l0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",c0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,u0e)])]),p.createElementVNode("div",d0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[x[2]||(x[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),p.createElementVNode("span",h0e,[p.createTextVNode(p.toDisplayString(L(m).minutos)+" ",1),L(m).nombre?(p.openBlock(),p.createElementBlock("span",p0e,p.toDisplayString(L(m).nombre),1)):p.createCommentVNode("",!0)])]))),128)),t.value?(p.openBlock(),p.createElementBlock("div",f0e,x[3]||(x[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-68c1aac1"]]),g0e={class:"prematch-bg"},y0e={class:"subtitle"},v0e={class:"jornada"},b0e={class:"fecha"},x0e={class:"teams-row"},_0e={class:"team team-local"},w0e={class:"escudo-svg"},T0e=["src"],k0e={class:"team team-visitor"},S0e={class:"escudo-svg"},E0e=["src"],C0e=ws({__name:"AnalisisPrematchType4",props:{report:{type:Object,default:()=>({})}},setup(r){function i(F){return F?F.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;return(F,Y)=>(p.openBlock(),p.createElementBlock("div",g0e,[Y[1]||(Y[1]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Prematch")],-1)),p.createElementVNode("div",y0e,[p.createElementVNode("span",v0e,p.toDisplayString(i(y.report.game.matchday_name)),1),p.createElementVNode("span",b0e," - "+p.toDisplayString(p.unref(Bd)(y.report.game.date_time_utc)),1)]),p.createElementVNode("div",x0e,[p.createElementVNode("div",_0e,[p.createElementVNode("span",w0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.home_team+".png"},null,8,T0e)])]),Y[0]||(Y[0]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",k0e,[p.createElementVNode("span",S0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+y.report.game.visiting_team+".png"},null,8,E0e)])])])]))}},[["__scopeId","data-v-ef3bf0e5"]]),A0e={class:"prematch-bg"},M0e={class:"background-shields"},L0e={class:"shield-left"},P0e=["src"],N0e={class:"shield-right"},O0e=["src"],z0e={class:"subtitle"},R0e={class:"jornada"},D0e={class:"fecha"},I0e={class:"teams-row"},F0e={class:"team team-local"},B0e={class:"team-header"},V0e={class:"escudo-svg"},U0e=["src"],j0e={class:"score"},q0e={class:"players-list"},W0e={class:"player-name"},G0e={key:0,class:"more-events-indicator"},X0e={class:"team team-visitor"},H0e={class:"team-header"},K0e={class:"score"},Z0e={class:"escudo-svg"},J0e=["src"],Y0e={class:"players-list"},Q0e={class:"player-name"},$0e={key:0},ege={key:0,class:"more-events-indicator"},tge=ws({__name:"AnalisisPostMatchType4",props:{report:{type:Object,default:()=>({})}},setup(r){var b,d;function i(e){return e?e.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}const y=r;console.log("Props report: ",y.report),console.log("Game minutes: ",(d=(b=y.report)==null?void 0:b.game)==null?void 0:d.report_minutes);const F=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.home_goals_minutes)||[]).slice(0,5)}),Y=p.computed(()=>{var e,x,m;return(((m=(x=(e=y.report)==null?void 0:e.game)==null?void 0:x.report_minutes)==null?void 0:m.visiting_goals_minutes)||[]).slice(0,5)});function L(e){const x=Array.from(e.matchAll(/\d+\s*\+*\s*\d*'/g)).map(h=>h[0]).join(", "),m=e.match(/^(.*?)\s*\d+'/),v=m?m[1].trim():"";return{minutos:x,nombre:v}}const T=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.home_goals_minutes)==null?void 0:h.length)||0)>5}),t=p.computed(()=>{var x,m,v,h;return(((h=(v=(m=(x=y.report)==null?void 0:x.game)==null?void 0:m.report_minutes)==null?void 0:v.visiting_goals_minutes)==null?void 0:h.length)||0)>5});return(e,x)=>(p.openBlock(),p.createElementBlock("div",A0e,[p.createElementVNode("div",M0e,[p.createElementVNode("div",L0e,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.home_team+".png",alt:"Escudo local"},null,8,P0e)]),p.createElementVNode("div",N0e,[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/teams-150/"+r.report.game.visiting_team+".png",alt:"Escudo visitante"},null,8,O0e)])]),x[5]||(x[5]=p.createElementVNode("div",{class:"title"},[p.createTextVNode("Análisis "),p.createElementVNode("span",{class:"highlight"},"Postmatch")],-1)),p.createElementVNode("div",z0e,[p.createElementVNode("span",R0e,"Jornada "+p.toDisplayString(i(r.report.game.matchday_name)),1),p.createElementVNode("span",D0e," - "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1)]),p.createElementVNode("div",I0e,[p.createElementVNode("div",F0e,[p.createElementVNode("div",B0e,[p.createElementVNode("span",V0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.home_team+".png"},null,8,U0e)]),p.createElementVNode("div",j0e,p.toDisplayString(r.report.game.score[0]),1)]),p.createElementVNode("div",q0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(F.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`home-event-${v}`,class:"player-item"},[p.createElementVNode("span",W0e,p.toDisplayString(m)+" ",1),x[0]||(x[0]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]))),128)),T.value?(p.openBlock(),p.createElementBlock("div",G0e,x[1]||(x[1]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])]),x[4]||(x[4]=p.createElementVNode("div",{class:"divider-line"},[p.createElementVNode("div",{class:"dotted-line"})],-1)),p.createElementVNode("div",X0e,[p.createElementVNode("div",H0e,[p.createElementVNode("div",K0e,p.toDisplayString(r.report.game.score[1]),1),p.createElementVNode("span",Z0e,[p.createElementVNode("img",{width:"55px",src:"https://golstatsimages.blob.core.windows.net/teams-80/"+r.report.game.visiting_team+".png"},null,8,J0e)])]),p.createElementVNode("div",Y0e,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`visiting-event-${v}`,class:"player-item"},[x[2]||(x[2]=p.createElementVNode("span",{class:"player-icon"},[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"}),p.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z",stroke:"white","stroke-width":"1.36665","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),p.createElementVNode("span",Q0e,[p.createTextVNode(p.toDisplayString(L(m).minutos)+" ",1),L(m).nombre?(p.openBlock(),p.createElementBlock("span",$0e," "+p.toDisplayString(L(m).nombre),1)):p.createCommentVNode("",!0)])]))),128)),t.value?(p.openBlock(),p.createElementBlock("div",ege,x[3]||(x[3]=[p.createElementVNode("span",{class:"more-events-text"},"...",-1)]))):p.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-5cd30395"]]),rge={class:"report-card",style:{position:"relative"}},nge={class:"report-img-placeholder",style:{position:"relative"}},age={class:"inner-card-report"},ige={class:"report-footer"},oge={class:"report-title"},sge={class:"report-template"},lge={class:"template-name"},cge={class:"report-league"},uge={class:"report-tournament"},dge=ws({__name:"ReportItem",props:{type:{type:Number,default:1},localTeam:{type:String,default:"América"},report:{type:Object,default:()=>{}},visitorTeam:{type:String,default:"Chivas"},localScore:{type:Number,default:2},visitorScore:{type:Number,default:1},league:{type:String,default:"Liga MX"},date:{type:String,default:"15 Nov 2024"}},emits:["ver-reporte","renombrar","eliminar","edit-template","open-report","download-report"],setup(r,{emit:i}){const y=i,F=r,Y=p.ref(!1);function L(){Y.value=!1,y("open-report",F.report)}function T(){console.log("renombrar"),Y.value=!1,y("renombrar",F.report.report_name||"Reporte",F.report.id)}function t(){console.log("editar"),Y.value=!1,y("edit-template",F.report)}function b(){console.log("duplicar"),Y.value=!1}function d(){console.log("eliminar"),Y.value=!1,y("eliminar",F.report)}function e(){console.log("descargar"),y("download-report",F.report),Y.value=!1}function x(v){return v?v.replace("Matchday","J").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SI").replace("Playoffs 4","SV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"):""}function m(){y("open-report",F.report)}return(v,h)=>(p.openBlock(),p.createElementBlock("div",rge,[p.createElementVNode("div",{class:"three-dots",onClick:h[0]||(h[0]=p.withModifiers(n=>Y.value=!Y.value,["stop"]))},h[4]||(h[4]=[p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1),p.createElementVNode("span",null,null,-1)])),p.createElementVNode("div",nge,[r.report.template_type===1&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(sfe,{key:0,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==1?(p.openBlock(),p.createBlock(Ffe,{key:1,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Qfe,{key:2,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==2?(p.openBlock(),p.createBlock(Mme,{key:3,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),r.report.template_type===1&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(Ume,{key:4,"local-team":r.localTeam,"visitor-team":r.visitorTeam,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==3?(p.openBlock(),p.createBlock(m0e,{key:5,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===1&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(C0e,{key:6,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):r.report.template_type===2&&r.report.pages[0].type==4?(p.openBlock(),p.createBlock(tge,{key:7,"local-team":r.localTeam,"visitor-team":r.visitorTeam,"local-score":r.localScore,"visitor-score":r.visitorScore,league:r.league,date:r.date,report:r.report},null,8,["local-team","visitor-team","local-score","visitor-score","league","date","report"])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:"report-img-overlay"},[p.createElementVNode("button",{class:"report-img-button",onClick:m},"Ver reporte")])]),p.createElementVNode("div",age,[p.createElementVNode("div",ige,[p.createElementVNode("div",oge,p.toDisplayString(r.report.report_name),1),p.createElementVNode("div",sge,[h[5]||(h[5]=p.createTextVNode(" Template: ",-1)),p.createElementVNode("span",lge,p.toDisplayString(r.report.name),1)]),p.createElementVNode("div",cge,p.toDisplayString(r.report.season_name)+" - "+p.toDisplayString(x(r.report.game.matchday_name))+"  |  "+p.toDisplayString(p.unref(Bd)(r.report.game.date_time_utc)),1),p.createElementVNode("div",uge,p.toDisplayString(r.report.tournament_name),1)])]),Y.value?(p.openBlock(),p.createBlock(Hpe,{key:0,onClick:h[1]||(h[1]=p.withModifiers(n=>Y.value=!1,["self"])),onMouseleave:h[2]||(h[2]=n=>Y.value=!1),onVerReporte:L,onRenombrar:T,onEditar:t,onDuplicar:b,onEliminar:d,onDescargar:e})):p.createCommentVNode("",!0),Y.value?(p.openBlock(),p.createElementBlock("div",{key:1,class:"tooltip-overlay",onClick:h[3]||(h[3]=n=>Y.value=!1)})):p.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a75289c7"]]),hge={class:"modal-overlay"},pge={class:"modal-content"},fge={class:"modal-body"},mge=["placeholder","disabled"],gge={key:0,class:"error-message"},yge={class:"modal-footer"},vge=["disabled"],bge=["disabled"],xge={key:0},_ge={key:1},wge=ws({__name:"ModalRenameReporte",props:{initialName:{type:String,required:!0},templateType:{type:String,required:!0},token:{type:String,required:!0},userId:{type:[String,Number],required:!0},reportId:{type:[String,Number],required:!0}},emits:["close","rename","refresh"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(y.initialName),L=p.ref(!1),T=p.ref("");p.watch(()=>y.initialName,b=>{Y.value=b,T.value=""});async function t(){var b;if(console.log("acceptRename"),!(Y.value.trim().length<3)){console.log("acceptRename 22"),L.value=!0,T.value="";try{await to.create({headers:{Authorization:`${y.token}`}}).put(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports/${y.reportId}/rename`,{name:Y.value.trim()}),F("rename",Y.value.trim()),F("refresh"),F("close")}catch(d){console.error("Error al renombrar el reporte:",d),((b=d.response)==null?void 0:b.status)===409?T.value="Ya existe un reporte con el mismo nombre":T.value="Error al renombrar el reporte. Inténtalo de nuevo."}finally{L.value=!1}}}return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(b,d)=>(p.openBlock(),p.createElementBlock("div",hge,[p.createElementVNode("div",pge,[p.createElementVNode("button",{class:"close-btn",onClick:d[0]||(d[0]=e=>b.$emit("close"))},d[3]||(d[3]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),d[5]||(d[5]=p.createElementVNode("div",{class:"modal-header"},[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-rename-white.svg",class:"icon-title",alt:"icon"}),p.createElementVNode("span",{class:"modal-title"},"Renombrar Reporte")],-1)),d[6]||(d[6]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",fge,[d[4]||(d[4]=p.createElementVNode("div",{class:"modal-label"},"Nombre:",-1)),p.withDirectives(p.createElementVNode("input",{class:"template-name-input",type:"text","onUpdate:modelValue":d[1]||(d[1]=e=>Y.value=e),placeholder:r.initialName,maxlength:"40",autocomplete:"off",disabled:L.value},null,8,mge),[[p.vModelText,Y.value]]),T.value?(p.openBlock(),p.createElementBlock("div",gge,p.toDisplayString(T.value),1)):p.createCommentVNode("",!0)]),d[7]||(d[7]=p.createElementVNode("div",{class:"header-separator"},null,-1)),p.createElementVNode("div",yge,[p.createElementVNode("button",{class:"cancel-btn",onClick:d[2]||(d[2]=e=>b.$emit("close")),disabled:L.value},"Cancelar",8,vge),p.createElementVNode("button",{class:"next-btn",disabled:Y.value.trim().length<3||L.value,onClick:t},[L.value?(p.openBlock(),p.createElementBlock("span",xge,"Guardando...")):(p.openBlock(),p.createElementBlock("span",_ge,"Guardar"))],8,bge)])])]))}},[["__scopeId","data-v-21795291"]]),Tge={class:"modal-overlay"},kge={class:"modal-content"},Sge={class:"modal-footer"},Ege=["disabled"],Cge=["disabled"],Age=ws({__name:"ModalDeleteReport",props:{reportId:{type:String,required:!0},userId:{type:String,required:!0},token:{type:String,required:!0}},emits:["close","delete","reportDeleted"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref(!1),L=async()=>{try{Y.value=!0;const t=await to.create({headers:{Authorization:`${y.token}`}}).delete(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports/${y.reportId}`);console.log("Reporte eliminado exitosamente:",t.data),F("reportDeleted",y.reportId),F("close")}catch(T){console.error("Error al eliminar el reporte:",T),alert("Error al eliminar el reporte. Por favor, intenta de nuevo.")}finally{Y.value=!1}};return p.onMounted(()=>{document.body.style.overflow="hidden"}),p.onUnmounted(()=>{document.body.style.overflow=""}),(T,t)=>(p.openBlock(),p.createElementBlock("div",Tge,[p.createElementVNode("div",kge,[p.createElementVNode("button",{class:"close-btn",onClick:t[0]||(t[0]=b=>T.$emit("close"))},t[2]||(t[2]=[p.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/reports-images/icn-close.svg",alt:"Cerrar"},null,-1)])),t[3]||(t[3]=p.createStaticVNode('<div class="modal-header" data-v-faeee5ba><img src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete-delete.svg" class="icon-title" alt="icon" data-v-faeee5ba><span class="modal-title" data-v-faeee5ba>Eliminar reporte</span></div><div class="header-separator" data-v-faeee5ba></div><div class="modal-body confirm-text" data-v-faeee5ba> ¿Estás seguro que deseas eliminar<br data-v-faeee5ba> este reporte? Si lo haces no habrá manera<br data-v-faeee5ba> de recuperarlo. </div><div class="header-separator" data-v-faeee5ba></div>',4)),p.createElementVNode("div",Sge,[p.createElementVNode("button",{class:"cancel-btn",onClick:t[1]||(t[1]=b=>T.$emit("close")),disabled:Y.value},"Cancelar",8,Ege),p.createElementVNode("button",{class:"delete-btn",onClick:L,disabled:Y.value},p.toDisplayString(Y.value?"Eliminando...":"Eliminar"),9,Cge)])])]))}},[["__scopeId","data-v-faeee5ba"]]),Mge={class:"reports-header"},Lge={class:"count"},Pge={key:0,class:"sort-options"},Nge=["onClick"],Oge={key:0,class:"checkmark"},zge={key:0,class:"loading-state"},Rge={key:1,class:"error-state"},Dge={key:3,class:"empty-reports"},Ige={key:4,class:"empty-reports"},Fge=ws({__name:"ReportsSection",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0},searchQuery:{type:String,default:""}},emits:["open-report"],setup(r,{emit:i}){const y=r,F=i,Y=p.ref([]),L=p.ref(!1),T=p.ref(null),t=p.computed(()=>{let V=Y.value;if(y.searchQuery.trim()){const j=y.searchQuery.toLowerCase().trim();V=Y.value.filter(G=>{var re,te,Z,ee,le,ce,he;return!!((((re=G.report_name)==null?void 0:re.toLowerCase())||"").includes(j)||(((te=G.name)==null?void 0:te.toLowerCase())||"").includes(j)||G.created_at&&new Date(G.created_at).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(j)||(Z=G.game)!=null&&Z.date_time_utc&&new Date(G.game.date_time_utc).toLocaleDateString("es-ES",{year:"numeric",month:"long",day:"numeric"}).toLowerCase().includes(j)||(((le=(ee=G.game)==null?void 0:ee.season_name)==null?void 0:le.toLowerCase())||"").includes(j)||(((ce=G.tournament_name)==null?void 0:ce.toLowerCase())||"").includes(j)||(he=G.game)!=null&&he.matchday&&G.game.matchday.toString().includes(j))})}return d.value&&(V=[...V].sort((j,G)=>{var q,J;if(d.value==="A - Z"){const ne=(j.report_name||"").toLowerCase(),H=(G.report_name||"").toLowerCase();return ne.localeCompare(H,"es",{sensitivity:"base"})}else if(d.value==="Más recientes"){const ne=new Date(j.created_at||0);return new Date(G.created_at||0)-ne}else if(d.value==="Torneo"){const ne=(j.tournament_name||"").toLowerCase(),H=(G.tournament_name||"").toLowerCase();if(ne!==H)return ne.localeCompare(H,"es",{sensitivity:"base"});const re=j.season_id||0;return(G.season_id||0)-re}else if(d.value==="Jornada"){const ne=((q=j.game)==null?void 0:q.matchday_id)||0,H=((J=G.game)==null?void 0:J.matchday_id)||0;return ne-H}return 0})),V}),b=p.ref(!1),d=p.ref("Más recientes"),e=p.ref(!1),x=p.ref(""),m=p.ref(""),v=p.ref(""),h=p.ref(!1),n=p.ref(""),a=p.ref(""),u=p.ref(null),s=p.ref(null),l=p.ref(null),f=p.ref(0),g=[{label:"A - Z",value:"A - Z"},{label:"Más recientes",value:"Más recientes"},{label:"Torneo",value:"Torneo"},{label:"Jornada",value:"Jornada"}],k=async()=>{L.value=!0,T.value=null;try{const V=await to.get(`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${y.userId}/reports`,{headers:{Authorization:`${y.token}`,"Content-Type":"application/json"}});V.data&&Array.isArray(V.data)?Y.value=V.data:V.data&&V.data.reports?Y.value=V.data.reports:V.data&&V.data.data?Y.value=V.data.data:Y.value=[]}catch(V){console.error("Error cargando reportes:",V),console.error("Error response:",V.response),T.value=V.message||"Error al cargar los reportes",Y.value=[]}finally{L.value=!1}},E=p.computed(()=>{if(!f.value)return"grid-1-column";const V=340,j=20,q=f.value-40,J=Math.floor((q+j)/(V+j)),ne=Math.max(1,J);return ne>=4?"grid-4-columns":ne>=3?"grid-3-columns":ne>=2?"grid-2-columns":"grid-1-column"}),S=()=>{b.value=!b.value},M=V=>{console.log("Ordenando por:",V),d.value=V,b.value=!1};function N(V){console.log("reports section onOpenReport",V),F("open-report",V)}const C=(V,j)=>{x.value=V,m.value=j;const G=Y.value.find(q=>q.id===j);v.value=G?G.template_type:"",e.value=!0},P=V=>{console.log("Renombrar reporte de",x.value,"a",V),e.value=!1;const j=Y.value.findIndex(G=>G.id===m.value);j!==-1&&(Y.value[j].report_name=V)},A=V=>{n.value=V.report_name||"Reporte",a.value=V.id,h.value=!0},w=V=>{h.value=!1,Y.value=Y.value.filter(j=>j.id!==V)};function O(V){console.log("Descargando reporte:",V),F("download-report",V)}const _=V=>{b.value&&u.value&&!u.value.contains(V.target)&&(b.value=!1)},z=()=>{s.value&&(f.value=s.value.offsetWidth)};let I=null;return p.onMounted(async()=>{document.addEventListener("mousedown",_),await k(),await p.nextTick(),z(),window.ResizeObserver?(I=new ResizeObserver(()=>{z()}),s.value&&I.observe(s.value)):window.addEventListener("resize",z)}),p.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_),I?I.disconnect():window.removeEventListener("resize",z)}),(V,j)=>(p.openBlock(),p.createElementBlock("div",{class:"reports-section",ref_key:"reportsSectionRef",ref:s},[p.createElementVNode("div",Mge,[p.createElementVNode("span",null,[j[2]||(j[2]=p.createTextVNode("Reportes ",-1)),p.createElementVNode("span",Lge,"("+p.toDisplayString(t.value.length)+")",1)]),p.createElementVNode("div",{class:"sort-dropdown",ref_key:"sortDropdownRef",ref:u},[p.createElementVNode("button",{class:"sort-button",onClick:S},[p.createTextVNode(p.toDisplayString(d.value||"Ordenar")+" ",1),p.createElementVNode("span",{class:p.normalizeClass(["dropdown-arrow",{rotated:b.value}])},null,2)]),b.value?(p.openBlock(),p.createElementBlock("div",Pge,[(p.openBlock(),p.createElementBlock(p.Fragment,null,p.renderList(g,G=>p.createElementVNode("div",{key:G.value,class:p.normalizeClass(["sort-option",{selected:d.value===G.value}]),onClick:q=>d.value!==G.value&&M(G.value)},[p.createElementVNode("span",null,p.toDisplayString(G.label),1),d.value===G.value?(p.openBlock(),p.createElementBlock("span",Oge,j[3]||(j[3]=[p.createElementVNode("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M5 10.5L9 14.5L15 7.5",stroke:"#cbee6b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)],10,Nge)),64))])):p.createCommentVNode("",!0)],512)]),L.value?(p.openBlock(),p.createElementBlock("div",zge,j[4]||(j[4]=[p.createElementVNode("div",{class:"loading-spinner"},null,-1),p.createElementVNode("p",null,"Cargando reportes...",-1)]))):T.value?(p.openBlock(),p.createElementBlock("div",Rge,[p.createElementVNode("p",null,"Error al cargar reportes: "+p.toDisplayString(T.value),1),p.createElementVNode("button",{onClick:k,class:"retry-button"},"Reintentar")])):(p.openBlock(),p.createElementBlock("div",{key:2,class:p.normalizeClass(["reports-grid",E.value]),ref_key:"reportsGridRef",ref:l},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(t.value,G=>(p.openBlock(),p.createBlock(dge,{key:G.id,report:G,onOpenReport:N,onRenombrar:C,onEliminar:A,onDownloadReport:O},null,8,["report"]))),128))],2)),!L.value&&!T.value&&Y.value.length===0?(p.openBlock(),p.createElementBlock("div",Dge," No tienes reportes aún. ")):p.createCommentVNode("",!0),!L.value&&!T.value&&Y.value.length>0&&t.value.length===0?(p.openBlock(),p.createElementBlock("div",Ige," No se encontraron reportes que coincidan con tu búsqueda. ")):p.createCommentVNode("",!0),e.value?(p.openBlock(),p.createBlock(wge,{key:5,initialName:x.value,templateType:v.value,token:r.token,userId:r.userId,reportId:m.value,onClose:j[0]||(j[0]=G=>e.value=!1),onRename:P,onRefresh:k},null,8,["initialName","templateType","token","userId","reportId"])):p.createCommentVNode("",!0),h.value?(p.openBlock(),p.createBlock(Age,{key:6,"report-id":a.value,"user-id":r.userId,token:r.token,onClose:j[1]||(j[1]=G=>h.value=!1),onReportDeleted:w},null,8,["report-id","user-id","token"])):p.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-70130c65"]]),Bge={class:"modal-overlay"},Vge={class:"modal-content"},Uge=ws({__name:"ModalSoloEscritorio",setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",Bge,[p.createElementVNode("div",Vge,[y[1]||(y[1]=p.createStaticVNode('<div class="modal-icon" data-v-30303ebd><svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-30303ebd><rect x="8" y="10" width="32" height="20" rx="2" stroke="#C0CBE0" stroke-width="2" data-v-30303ebd></rect><rect x="16" y="34" width="16" height="2" rx="1" fill="#C0CBE0" data-v-30303ebd></rect></svg></div><div class="modal-text" data-v-30303ebd> Esta sección solo está disponible para<br data-v-30303ebd> escritorio. Utiliza tu computadora <br data-v-30303ebd>para ingresar. </div>',2)),p.createElementVNode("button",{class:"modal-btn",onClick:y[0]||(y[0]=F=>i.$emit("toHome"))},"OK")])]))}},[["__scopeId","data-v-30303ebd"]]),jge={class:"top-bar"},qge={class:"tabs-container"},Wge={class:"tabs"},Gge={key:0,class:"actions"},Xge={class:"search-container"},Hge={key:1,class:"actions"},Kge={class:"search-container"},Zge=ws({__name:"gsc-reports",props:{userId:{type:Number,required:!0},team:{type:Number,required:!0},token:{type:String,required:!0}},emits:["toHome","download-report"],setup(r,{emit:i}){const y=r,{userId:F,team:Y,token:L}=y,T=p.ref("templates"),t=p.ref(!1),b=p.ref(null),d=p.ref(!1),e=p.ref(""),x=p.ref(""),m=p.ref(null),v=p.ref(null),h=i;function n(){if(b.value){const S=b.value.offsetWidth;t.value=S<1028}}p.watch(t,S=>{S?document.body.style.overflow="hidden":document.body.style.overflow=""}),p.onBeforeUnmount(()=>{document.body.style.overflow=""}),p.onMounted(()=>{n(),window.addEventListener("resize",n)}),p.onBeforeUnmount(()=>{window.removeEventListener("resize",n)});function a(S){console.log("onOpenModalNewTemplate, gsc-reports:",S),u(S)}function u(S){console.log("onEditTemplate, template:",S),console.log("Edicion es: "),console.log({template:S,isTemplateMode:!0}),m.value.show({template:S,isTemplateMode:!0})}const s=()=>{e.value=""},l=()=>{x.value=""};function f(S){console.log("gsc-report onOpenReport, report:",S),m.value&&m.value.show({template:S,isTemplateMode:!1})}function g(S){h("download-report",S)}function k(){h("toHome")}function E(){v.value&&v.value.obtenerTemplates()}return(S,M)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(p.unref(Pue),{ref_key:"reportTemplateMaker",ref:m,token:p.unref(L),onClose:E},null,8,["token"]),p.createElementVNode("div",{ref_key:"containerRef",ref:b,class:"reports-container"},[t.value?(p.openBlock(),p.createBlock(Uge,{key:0,onToHome:k})):p.createCommentVNode("",!0),M[12]||(M[12]=p.createElementVNode("h1",{class:"title"},"Mis reportes",-1)),p.createElementVNode("div",jge,[p.createElementVNode("div",qge,[p.createElementVNode("div",Wge,[p.createElementVNode("div",{class:p.normalizeClass(["tab tab-templates",{active:T.value==="templates"}]),onClick:M[0]||(M[0]=N=>T.value="templates")}," Templates ",2),p.createElementVNode("div",{class:p.normalizeClass(["tab tab-reports",{active:T.value==="reports"}]),onClick:M[1]||(M[1]=N=>T.value="reports")}," Tus reportes ",2)])]),T.value==="templates"?(p.openBlock(),p.createElementBlock("div",Gge,[p.createElementVNode("div",Xge,[M[8]||(M[8]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":M[2]||(M[2]=N=>e.value=N),class:"search",type:"text",placeholder:"Buscar template"},null,512),[[p.vModelText,e.value]]),e.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:s,class:"clear-search-btn",type:"button"},M[7]||(M[7]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)]),p.createElementVNode("button",{class:"create-template-btn",onClick:M[3]||(M[3]=N=>d.value=!0)},M[9]||(M[9]=[p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-agregar@3x.png",alt:"Agregar",class:"create-icon"},null,-1),p.createTextVNode(" Crear template ",-1)]))])):p.createCommentVNode("",!0),T.value==="reports"?(p.openBlock(),p.createElementBlock("div",Hge,[p.createElementVNode("div",Kge,[M[11]||(M[11]=p.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/playlist-icons/icn-search@3x.png",alt:"Buscar",class:"search-icon"},null,-1)),p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":M[4]||(M[4]=N=>x.value=N),class:"search search-reports",type:"text",placeholder:"Buscar reporte"},null,512),[[p.vModelText,x.value]]),x.value?(p.openBlock(),p.createElementBlock("button",{key:0,onClick:l,class:"clear-search-btn",type:"button"},M[10]||(M[10]=[p.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M9 3L3 9M3 3L9 9",stroke:"#8B98A9","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):p.createCommentVNode("",!0)])])):p.createCommentVNode("",!0)]),T.value==="templates"?(p.openBlock(),p.createBlock(Gpe,{key:1,ref_key:"templatesSectionRef",ref:v,userId:p.unref(F),token:p.unref(L),team:p.unref(Y),searchQuery:e.value,onSwitchToReports:M[5]||(M[5]=N=>T.value="reports"),onOpenModalNewTemplate:a,onEditTemplate:u},null,8,["userId","token","team","searchQuery"])):(p.openBlock(),p.createBlock(Fge,{key:2,userId:p.unref(F),token:p.unref(L),team:p.unref(Y),searchQuery:x.value,onOpenReport:f,onDownloadReport:g},null,8,["userId","token","team","searchQuery"])),d.value?(p.openBlock(),p.createBlock(gT,{key:3,token:p.unref(L),team:p.unref(Y),onOpenModalNewTemplate:a,onClose:M[6]||(M[6]=N=>d.value=!1)},null,8,["token","team"])):p.createCommentVNode("",!0)],512)],64))}},[["__scopeId","data-v-3db0ba35"]]),Jge={class:"subcategory-group"},Yge={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",Jge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroup,F=>(p.openBlock(),p.createBlock(p.unref(K1),{key:F.id,modelValue:F.isSelected,"onUpdate:modelValue":Y=>F.isSelected=Y,label:F.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Qge=nu(Yge,[["__scopeId","data-v-ae6f3d72"]]),$ge={class:"filter-subcategories"},eye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(r){return(i,y)=>(p.openBlock(),p.createElementBlock("div",$ge,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.subcategoryGroups,F=>(p.openBlock(),p.createElementBlock("div",{key:F.id,class:"filter-subcategories__group"},[p.createVNode(Qge,{subcategoryGroup:F},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),my=r=>(p.pushScopeId("data-v-80d9c265"),r=r(),p.popScopeId(),r),tye={class:"details__header"},rye=my(()=>p.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),nye={class:"details__header__checkbox"},aye={class:"details__body"},iye={class:"details__body__playing-as"},oye=["onClick"],sye={class:"details__header"},lye=my(()=>p.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),cye={class:"details__header__checkbox"},uye={class:"details__body"},dye=my(()=>p.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),hye={class:"details__body__game-section"},pye=["onClick"],fye={class:"details__body"},mye=my(()=>p.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),gye={class:"details__body__game-section"},yye=["onClick"],vye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__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(r){const i=r;p.useCssVars(e=>({"49cba245":r.buttonsBackgroundColor,"52f02da6":r.buttonsTextColor,"7d3f686a":r.buttonsBorderWidth,"7c286a07":r.buttonsBorderColor,"24a6f4aa":r.buttonsBackgroundColorActive,cd8d7768:r.buttonsTextColorActive,"35fa5c10":r.buttonsBorderWidthActive,"0cde1826":r.buttonsBorderColorActive}));const y=p.computed(()=>i.playingAs.every(e=>e.isSelected)),F=p.computed(()=>i.gameSections.every(e=>e.isSelected)),Y=p.computed(()=>i.gameSections.reduce((e,x)=>(x.value<=3?e.firstHalf.push(x):e.secondHalf.push(x),e),{firstHalf:[],secondHalf:[]})),L=p.computed(()=>({"--border-radius-first-button":`${i.buttonsBorderRadius} 0 0 ${i.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${i.buttonsBorderRadius} ${i.buttonsBorderRadius} 0`}));function T(e){e?i.playingAs.forEach(x=>{x.isSelected=!0}):i.playingAs.forEach((x,m)=>{x.isSelected=m===0})}function t(e){i.playingAs.filter(x=>x.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function b(e){i.gameSections.filter(x=>x.isSelected).length===1&&e.isSelected||(e.isSelected=!e.isSelected)}function d(e){e?i.gameSections.forEach(x=>{x.isSelected=!0}):i.gameSections.forEach((x,m)=>{x.isSelected=m===0})}return(e,x)=>(p.openBlock(),p.createElementBlock("div",{class:"details",style:p.normalizeStyle(L.value)},[p.createElementVNode("div",tye,[rye,p.createElementVNode("div",nye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":y.value,"onUpdate:modelValue":T},null,8,["model-value"])])]),p.createElementVNode("div",aye,[p.createElementVNode("div",iye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.playingAs,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>t(m)},p.toDisplayString(m.name),11,oye))),128))])]),p.createElementVNode("div",sye,[lye,p.createElementVNode("div",cye,[p.createVNode(p.unref(K1),{label:"Todos","model-value":F.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),p.createElementVNode("div",uye,[dye,p.createElementVNode("div",hye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value.firstHalf,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>b(m)},p.toDisplayString(m.text),11,pye))),128))])]),p.createElementVNode("div",fye,[mye,p.createElementVNode("div",gye,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Y.value.secondHalf,(m,v)=>(p.openBlock(),p.createElementBlock("div",{key:`pa${v}`,class:p.normalizeClass(["details__body__button",{active:m.isSelected}]),onClick:h=>b(m)},p.toDisplayString(m.text),11,yye))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),bye={class:"filter-field"},xye=Object.freeze(Object.defineProperty({__proto__:null,default:nu({__name:"FilterField",setup(r){const i=p.ref(Array.from({length:16},(F,Y)=>Y+1));function y(){}return(F,Y)=>(p.openBlock(),p.createElementBlock("div",bye,[p.createVNode(p.unref(iO),{width:"100%","background-color":"#2E3B46",value:i.value,"onUpdate:modelValue":y},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Sh.GSCReports=Zge,Object.defineProperty(Sh,Symbol.toStringTag,{value:"Module"})});