@golstats/gsc-landing 1.0.163 → 1.0.164

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.
@@ -3,7 +3,7 @@
3
3
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const a=new this(e);return t.forEach(i=>a.set(i)),a}static accessor(e){const a=(this[fc]=this[fc]={accessors:{}}).accessors,i=this.prototype;function o(r){const l=Qs(r);a[l]||(f0(i,r),a[l]=!0)}return D.isArray(e)?e.forEach(o):o(e),this}}ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),D.reduceDescriptors(ht.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),D.freezeMethods(ht);function Ri(s,e){const t=this||Zs,a=e||t,i=ht.from(a.headers);let o=a.data;return D.forEach(s,function(l){o=l.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function pc(s){return!!(s&&s.__CANCEL__)}function vs(s,e,t){be.call(this,s??"canceled",be.ERR_CANCELED,e,t),this.name="CanceledError"}D.inherits(vs,be,{__CANCEL__:!0});function gc(s,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?s(t):e(new be("Request failed with status code "+t.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function p0(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function g0(s,e){s=s||10;const t=new Array(s),a=new Array(s);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(d){const c=Date.now(),h=a[o];r||(r=c),t[i]=d,a[i]=c;let u=o,f=0;for(;u!==i;)f+=t[u++],u=u%s;if(i=(i+1)%s,i===o&&(o=(o+1)%s),c-r<e)return;const p=h&&c-h;return p?Math.round(f*1e3/p):void 0}}function y0(s,e){let t=0,a=1e3/e,i,o;const r=(c,h=Date.now())=>{t=h,i=null,o&&(clearTimeout(o),o=null),s.apply(null,c)};return[(...c)=>{const h=Date.now(),u=h-t;u>=a?r(c,h):(i=c,o||(o=setTimeout(()=>{o=null,r(i)},a-u)))},()=>i&&r(i)]}const Na=(s,e,t=3)=>{let a=0;const i=g0(50,250);return y0(o=>{const r=o.loaded,l=o.lengthComputable?o.total:void 0,d=r-a,c=i(d),h=r<=l;a=r;const u={loaded:r,total:l,progress:l?r/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&h?(l-r)/c:void 0,event:o,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(u)},t)},yc=(s,e)=>{const t=s!=null;return[a=>e[0]({lengthComputable:t,total:s,loaded:a}),e[1]]},bc=s=>(...e)=>D.asap(()=>s(...e)),b0=dt.hasStandardBrowserEnv?function(){const e=dt.navigator&&/(msie|trident)/i.test(dt.navigator.userAgent),t=document.createElement("a");let a;function i(o){let r=o;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=i(window.location.href),function(r){const l=D.isString(r)?i(r):r;return l.protocol===a.protocol&&l.host===a.host}}():function(){return function(){return!0}}(),S0=dt.hasStandardBrowserEnv?{write(s,e,t,a,i,o){const r=[s+"="+encodeURIComponent(e)];D.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),D.isString(a)&&r.push("path="+a),D.isString(i)&&r.push("domain="+i),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function w0(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function _0(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Sc(s,e){return s&&!w0(e)?_0(s,e):e}const wc=s=>s instanceof ht?{...s}:s;function ms(s,e){e=e||{};const t={};function a(c,h,u){return D.isPlainObject(c)&&D.isPlainObject(h)?D.merge.call({caseless:u},c,h):D.isPlainObject(h)?D.merge({},h):D.isArray(h)?h.slice():h}function i(c,h,u){if(D.isUndefined(h)){if(!D.isUndefined(c))return a(void 0,c,u)}else return a(c,h,u)}function o(c,h){if(!D.isUndefined(h))return a(void 0,h)}function r(c,h){if(D.isUndefined(h)){if(!D.isUndefined(c))return a(void 0,c)}else return a(void 0,h)}function l(c,h,u){if(u in e)return a(c,h);if(u in s)return a(void 0,c)}const d={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(c,h)=>i(wc(c),wc(h),!0)};return D.forEach(Object.keys(Object.assign({},s,e)),function(h){const u=d[h]||i,f=u(s[h],e[h],h);D.isUndefined(f)&&u!==l||(t[h]=f)}),t}const _c=s=>{const e=ms({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=ht.from(r),e.url=dc(Sc(e.baseURL,e.url),s.params,s.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(D.isFormData(t)){if(dt.hasStandardBrowserEnv||dt.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((d=r.getContentType())!==!1){const[c,...h]=d?d.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...h].join("; "))}}if(dt.hasStandardBrowserEnv&&(a&&D.isFunction(a)&&(a=a(e)),a||a!==!1&&b0(e.url))){const c=i&&o&&S0.read(o);c&&r.set(i,c)}return e},k0=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(t,a){const i=_c(s);let o=i.data;const r=ht.from(i.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=i,h,u,f,p,m;function g(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const _=ht.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:s,request:y};gc(function(T){t(T),g()},function(T){a(T),g()},E),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(a(new be("Request aborted",be.ECONNABORTED,s,y)),y=null)},y.onerror=function(){a(new be("Network Error",be.ERR_NETWORK,s,y)),y=null},y.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||uc;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),a(new be(C,E.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,s,y)),y=null},o===void 0&&r.setContentType(null),"setRequestHeader"in y&&D.forEach(r.toJSON(),function(C,E){y.setRequestHeader(E,C)}),D.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),c&&([f,m]=Na(c,!0),y.addEventListener("progress",f)),d&&y.upload&&([u,p]=Na(d),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(h=_=>{y&&(a(!_||_.type?new vs(null,s,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const S=p0(i.url);if(S&&dt.protocols.indexOf(S)===-1){a(new be("Unsupported protocol "+S+":",be.ERR_BAD_REQUEST,s));return}y.send(o||null)})},E0=(s,e)=>{const{length:t}=s=s?s.filter(Boolean):[];if(e||t){let a=new AbortController,i;const o=function(c){if(!i){i=!0,l();const h=c instanceof Error?c:this.reason;a.abort(h instanceof be?h:new vs(h instanceof Error?h.message:h))}};let r=e&&setTimeout(()=>{r=null,o(new be(`timeout ${e} of ms exceeded`,be.ETIMEDOUT))},e);const l=()=>{s&&(r&&clearTimeout(r),r=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),s=null)};s.forEach(c=>c.addEventListener("abort",o));const{signal:d}=a;return d.unsubscribe=()=>D.asap(l),d}},T0=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let a=0,i;for(;a<t;)i=a+e,yield s.slice(a,i),a=i},C0=async function*(s,e){for await(const t of x0(s))yield*T0(t,e)},x0=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:a}=await e.read();if(t)break;yield a}}finally{await e.cancel()}},kc=(s,e,t,a)=>{const i=C0(s,e);let o=0,r,l=d=>{r||(r=!0,a&&a(d))};return new ReadableStream({async pull(d){try{const{done:c,value:h}=await i.next();if(c){l(),d.close();return}let u=h.byteLength;if(t){let f=o+=u;t(f)}d.enqueue(new Uint8Array(h))}catch(c){throw l(c),c}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},Da=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ec=Da&&typeof ReadableStream=="function",v0=Da&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Tc=(s,...e)=>{try{return!!s(...e)}catch{return!1}},A0=Ec&&Tc(()=>{let s=!1;const e=new Request(dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Cc=64*1024,Bi=Ec&&Tc(()=>D.isReadableStream(new Response("").body)),Pa={stream:Bi&&(s=>s.body)};Da&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Pa[e]&&(Pa[e]=D.isFunction(s[e])?t=>t[e]():(t,a)=>{throw new be(`Response type '${e}' is not supported`,be.ERR_NOT_SUPPORT,a)})})})(new Response);const L0=async s=>{if(s==null)return 0;if(D.isBlob(s))return s.size;if(D.isSpecCompliantForm(s))return(await new Request(dt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(D.isArrayBufferView(s)||D.isArrayBuffer(s))return s.byteLength;if(D.isURLSearchParams(s)&&(s=s+""),D.isString(s))return(await v0(s)).byteLength},I0=async(s,e)=>{const t=D.toFiniteNumber(s.getContentLength());return t??L0(e)},Ni={http:Xg,xhr:k0,fetch:Da&&(async s=>{let{url:e,method:t,data:a,signal:i,cancelToken:o,timeout:r,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:h,withCredentials:u="same-origin",fetchOptions:f}=_c(s);c=c?(c+"").toLowerCase():"text";let p=E0([i,o&&o.toAbortSignal()],r),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(d&&A0&&t!=="get"&&t!=="head"&&(y=await I0(h,a))!==0){let E=new Request(e,{method:"POST",body:a,duplex:"half"}),v;if(D.isFormData(a)&&(v=E.headers.get("content-type"))&&h.setContentType(v),E.body){const[T,B]=yc(y,Na(bc(d)));a=kc(E.body,Cc,T,B)}}D.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:b?u:void 0});let S=await fetch(m);const _=Bi&&(c==="stream"||c==="response");if(Bi&&(l||_&&g)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=S[L]});const v=D.toFiniteNumber(S.headers.get("content-length")),[T,B]=l&&yc(v,Na(bc(l),!0))||[];S=new Response(kc(S.body,Cc,T,()=>{B&&B(),g&&g()}),E)}c=c||"text";let C=await Pa[D.findKey(Pa,c)||"text"](S,s);return!_&&g&&g(),await new Promise((E,v)=>{gc(E,v,{data:C,headers:ht.from(S.headers),status:S.status,statusText:S.statusText,config:s,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,s,m),{cause:b.cause||b}):be.from(b,b&&b.code,s,m)}})};D.forEach(Ni,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const xc=s=>`- ${s}`,R0=s=>D.isFunction(s)||s===null||s===!1,vc={getAdapter:s=>{s=D.isArray(s)?s:[s];const{length:e}=s;let t,a;const i={};for(let o=0;o<e;o++){t=s[o];let r;if(a=t,!R0(t)&&(a=Ni[(r=String(t)).toLowerCase()],a===void 0))throw new be(`Unknown adapter '${r}'`);if(a)break;i[r||"#"+o]=a}if(!a){const o=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=e?o.length>1?`since :
4
4
  `+o.map(xc).join(`
5
5
  `):" "+xc(o[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a},adapters:Ni};function Di(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new vs(null,s)}function Ac(s){return Di(s),s.headers=ht.from(s.headers),s.data=Ri.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),vc.getAdapter(s.adapter||Zs.adapter)(s).then(function(a){return Di(s),a.data=Ri.call(s,s.transformResponse,a),a.headers=ht.from(a.headers),a},function(a){return pc(a)||(Di(s),a&&a.response&&(a.response.data=Ri.call(s,s.transformResponse,a.response),a.response.headers=ht.from(a.response.headers))),Promise.reject(a)})}const Lc="1.7.7",Pi={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{Pi[s]=function(a){return typeof a===s||"a"+(e<1?"n ":" ")+s}});const Ic={};Pi.transitional=function(e,t,a){function i(o,r){return"[Axios v"+Lc+"] Transitional option '"+o+"'"+r+(a?". "+a:"")}return(o,r,l)=>{if(e===!1)throw new be(i(r," has been removed"+(t?" in "+t:"")),be.ERR_DEPRECATED);return t&&!Ic[r]&&(Ic[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,r,l):!0}};function B0(s,e,t){if(typeof s!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const a=Object.keys(s);let i=a.length;for(;i-- >0;){const o=a[i],r=e[o];if(r){const l=s[o],d=l===void 0||r(l,o,s);if(d!==!0)throw new be("option "+o+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new be("Unknown option "+o,be.ERR_BAD_OPTION)}}const Oi={assertOptions:B0,validators:Pi},ts=Oi.validators;class fs{constructor(e){this.defaults=e,this.interceptors={request:new hc,response:new hc}}async request(e,t){try{return await this._request(e,t)}catch(a){if(a instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{a.stack?o&&!String(a.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(a.stack+=`
6
- `+o):a.stack=o}catch{}}throw a}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ms(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Oi.assertOptions(a,{silentJSONParsing:ts.transitional(ts.boolean),forcedJSONParsing:ts.transitional(ts.boolean),clarifyTimeoutError:ts.transitional(ts.boolean)},!1),i!=null&&(D.isFunction(i)?t.paramsSerializer={serialize:i}:Oi.assertOptions(i,{encode:ts.function,serialize:ts.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&D.merge(o.common,o[t.method]);o&&D.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=ht.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(d=d&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let h,u=0,f;if(!d){const m=[Ac.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,c),f=m.length,h=Promise.resolve(t);u<f;)h=h.then(m[u++],m[u++]);return h}f=l.length;let p=t;for(u=0;u<f;){const m=l[u++],g=l[u++];try{p=m(p)}catch(y){g.call(this,y);break}}try{h=Ac.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,f=c.length;u<f;)h=h.then(c[u++],c[u++]);return h}getUri(e){e=ms(this.defaults,e);const t=Sc(e.baseURL,e.url);return dc(t,e.params,e.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(e){fs.prototype[e]=function(t,a){return this.request(ms(a||{},{method:e,url:t,data:(a||{}).data}))}}),D.forEach(["post","put","patch"],function(e){function t(a){return function(o,r,l){return this.request(ms(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}fs.prototype[e]=t(),fs.prototype[e+"Form"]=t(!0)});class Fi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(l=>{a.subscribe(l),o=l}).then(i);return r.cancel=function(){a.unsubscribe(o)},r},e(function(o,r,l){a.reason||(a.reason=new vs(o,r,l),t(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=a=>{e.abort(a)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Fi(function(i){e=i}),cancel:e}}}function N0(s){return function(t){return s.apply(null,t)}}function D0(s){return D.isObject(s)&&s.isAxiosError===!0}const Mi={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(Mi).forEach(([s,e])=>{Mi[e]=s});function Rc(s){const e=new fs(s),t=ql(fs.prototype.request,e);return D.extend(t,fs.prototype,e,{allOwnKeys:!0}),D.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Rc(ms(s,i))},t}const ve=Rc(Zs);ve.Axios=fs,ve.CanceledError=vs,ve.CancelToken=Fi,ve.isCancel=pc,ve.VERSION=Lc,ve.toFormData=Ra,ve.AxiosError=be,ve.Cancel=ve.CanceledError,ve.all=function(e){return Promise.all(e)},ve.spread=N0,ve.isAxiosError=D0,ve.mergeConfig=ms,ve.AxiosHeaders=ht,ve.formToJSON=s=>mc(D.isHTMLForm(s)?new FormData(s):s),ve.getAdapter=vc.getAdapter,ve.HttpStatusCode=Mi,ve.default=ve;const P0=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},$i={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Bc=()=>{n.useCssVars(s=>({"26acffa8":s.backgroundColor,"3d95bef4":s.height,"86ba1cc0":s.arrowsPosition,"140b6ada":s.arrowsPadding+"px","7df46be5":s.arrowsBackground,"33f99798":s.arrowsHeight*2+"px","1c8a858d":s.arrowsWidth*2+"px","4a7876c9":s.arrowsRadius,"2ff67e63":s.arrowsBorder,"59c5dd08":s.arrowsMargin+"px","6658215d":s.arrowsContainerBgL,66582163:s.arrowsContainerBgR,e5900a2e:s.scrollColor}))},Nc=$i.setup;$i.setup=Nc?(s,e)=>(Bc(),Nc(s,e)):Bc;const O0={ref:"gscScrollableContainer",class:"scrollable-container"},F0={class:"scrollable-arrows"},M0=["width","height","viewBox"],$0=["stroke"],V0={class:"scrollable-wrapper"},U0={class:"scrollable-arrows"},z0=["width","height","viewBox"],G0=["stroke"];function j0(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",O0,[t.arrows?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["arrows-container",o.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...r)=>o.scrollLeft&&o.scrollLeft(...r))},[n.createElementVNode("div",F0,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,$0)],8,M0))])],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...r)=>o.getScroll&&o.getScroll(...r))},[n.createElementVNode("div",V0,[n.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(n.openBlock(),n.createElementBlock("div",{key:1,id:"arrows-container-right",class:n.normalizeClass(["arrows-container",o.hideShowRightArrow]),onClick:e[2]||(e[2]=(...r)=>o.scrollRight&&o.scrollRight(...r))},[n.createElementVNode("div",U0,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,G0)],8,z0))])],2)):n.createCommentVNode("",!0)],512)}const ea=P0($i,[["render",j0],["__scopeId","data-v-7d0811ac"]]);function H0(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const Oa=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero "],[10,"Desconocida"]]),qe=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},W0={class:"player-card"},K0={class:"player-card__image"},q0=["src"],Y0={class:"player-card__number"},J0={class:"player-card__right-data"},X0={class:"player-card__details"},Z0={class:"player-card__name"},Q0={class:"player-card__position"},ey=qe({__name:"GSCPlayerCard",props:{countryFlag:{type:String,default:""},tournamentSelected:{type:Object,default:()=>({})},jersey:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position_id:{type:Number,default:0},position:{type:String,default:"-"},photo:{type:String,default:""},photoNoBg:{type:String,default:""},isImgFullWidth:{type:Boolean,default:!1}},emits:["clickProfileBtn"],setup(s,{emit:e}){return(t,a)=>(n.openBlock(),n.createElementBlock("div",W0,[n.createElementVNode("div",K0,[n.createElementVNode("img",{class:n.normalizeClass(["player-card__photo",{"full-width":s.isImgFullWidth}]),src:s.photo,alt:"Player Image"},null,10,q0),n.createElementVNode("div",Y0,n.toDisplayString(s.jersey),1),n.createElementVNode("div",J0,[n.createElementVNode("button",{class:"player-card__profile-button",onClick:a[0]||(a[0]=i=>e("clickProfileBtn"))}," Ver perfil ")])]),n.createElementVNode("div",X0,[n.createElementVNode("p",Z0,n.toDisplayString(s.name),1),n.createElementVNode("p",Q0,n.toDisplayString(s.tournamentSelected.is_female==1?n.unref(Oa).get(s.position_id).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):n.unref(Oa).get(s.position_id)),1)])]))}},[["__scopeId","data-v-1dc995c5"]]),ty=s=>(n.pushScopeId("data-v-cda2c99f"),s=s(),n.popScopeId(),s),sy={class:"my-players"},ay={class:"my-players__header"},ny={class:"my-players__title"},iy={style:{"text-decoration-line":"underline"}},oy=ty(()=>n.createElementVNode("span",null,"→",-1)),ry={class:"my-players__list"},ly=qe({__name:"GSCPlayersLanding",props:{tournamentSelected:{type:Object,default:()=>({})},isPlayer:{type:Boolean,default:!1},isImgFullWidth:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzE4ODAsIm5hbWUiOiJHb2xTdGF0cyIsInVzZXJuYW1lIjoiYnJpenVlbGEiLCJlbWFpbCI6IiIsInByb3ZpZGVyX2lkIjoxLCJsb2dpbl9nb2xzdGF0cyI6MSwiaWF0IjoxNjk4NzIzODA1LCJleHAiOjE3MzAyNTk4MDV9.3DR48YLPVAQKTisQg9SABSqDdurMuS6_z7IJfjXRlPQ"},playerId:{type:Number,default:34605},teamId:{type:Number,default:2},seasonId:{type:Number,default:1772}},emits:["viewAll","clickProfileBtn","totalPlayers"],setup(s,{emit:e}){const t=s,a=n.ref([]),i=n.ref(0),o=n.ref(0);n.onMounted(async()=>{const l=await r(t.teamId,t.seasonId,t.token);o.value=l.length,a.value=l.map(d=>({...d,position:Oa.get(d.position_id)})),t.isPlayer&&t.playerId&&(a.value=l.filter(d=>d.player_id!==t.playerId)),e("totalPlayers",o.value)});const r=async(l,d,c)=>{var u;const h="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";try{return((u=(await(await fetch(`https://pa3kubpuhg.execute-api.us-west-2.amazonaws.com/prod/playersByTeamAndSeason/${d}/${l}`,{headers:{Authorization:c||h}})).json())[0])==null?void 0:u.players)||[]}catch(f){return Promise.reject(f)}};return n.watch(()=>t.seasonId,async l=>{a.value=[];const d=await r(t.teamId,l,t.token);o.value=d.length,a.value=d.map(c=>({...c,position:Oa.get(c.position_id)})),e("totalPlayers",o.value),i.value+=1}),(l,d)=>(n.openBlock(),n.createElementBlock("div",sy,[n.createElementVNode("div",ay,[n.createElementVNode("h3",ny,n.toDisplayString(s.isPlayer?s.tournamentSelected.is_female==1?"Mis compañeras":"Mis compañeros":s.tournamentSelected.is_female==1?"Mis jugadoras":"Mis jugadores"),1),n.createElementVNode("button",{class:"my-players__button",onClick:d[0]||(d[0]=c=>e("viewAll"))},[n.createElementVNode("span",iy,[s.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Ver todas")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Ver todos")],64))]),oy])]),(n.openBlock(),n.createBlock(n.unref(ea),{pxScroll:209,scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",key:i.value,arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",ry,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,c=>(n.openBlock(),n.createBlock(ey,n.mergeProps(c,{"tournament-selected":s.tournamentSelected,isImgFullWidth:s.isImgFullWidth,onClickProfileBtn:h=>e("clickProfileBtn",c),key:c.player_id}),null,16,["tournament-selected","isImgFullWidth","onClickProfileBtn"]))),128))])]),_:1}))]))}},[["__scopeId","data-v-cda2c99f"]]),Dc="data:image/svg+xml,%3csvg%20width='69'%20height='70'%20viewBox='0%200%2069%2070'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_b_3196_29756)'%3e%3crect%20x='29'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='29.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20filter='url(%23filter1_b_3196_29756)'%3e%3crect%20x='48'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='48.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20filter='url(%23filter2_b_3196_29756)'%3e%3crect%20x='10'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='10.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20opacity='0.6'%3e%3cpath%20d='M60.5556%208.70056H8.44444C4.33299%208.70056%201%2011.7003%201%2015.4006V62.3007C1%2066.001%204.33299%2069.0007%208.44444%2069.0007H60.5556C64.667%2069.0007%2068%2066.001%2068%2062.3007V15.4006C68%2011.7003%2064.667%208.70056%2060.5556%208.70056Z'%20stroke='white'%20stroke-width='1.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1%2028.7991H68'%20stroke='white'%20stroke-width='1.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M49.3872%201.99982V15.3999'%20stroke='white'%20stroke-width='3.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.6128%201.99982V15.3999'%20stroke='white'%20stroke-width='3.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_b_3196_29756'%20x='13'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter1_b_3196_29756'%20x='32'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter2_b_3196_29756'%20x='-6'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",cy="data:image/svg+xml,%3csvg%20width='75'%20height='75'%20viewBox='0%200%2075%2075'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_b_3196_29781)'%3e%3crect%20x='6.00049'%20y='6'%20width='60'%20height='60'%20rx='30'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='6.50049'%20y='6.5'%20width='59'%20height='59'%20rx='29.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cpath%20opacity='0.6'%20d='M71%2036C71%2042.9221%2068.9475%2049.6887%2065.1019%2055.4443C61.2563%2061.1998%2055.7905%2065.6859%2049.3954%2068.3351C43.0004%2070.9844%2035.9634%2071.6779%2029.1743%2070.3279C22.3851%2068.978%2016.1487%2065.6452%2011.2536%2060.751C6.3585%2055.8569%203.02455%2049.6211%201.67333%2042.8322C0.322108%2036.0433%201.01429%2029.0061%203.66235%2022.6106C6.31041%2016.2151%2010.7954%2010.7484%2016.5503%206.90175C22.3051%203.05512%2029.0714%201.0013%2035.9934%201C40.5903%200.999139%2045.1422%201.9038%2049.3894%203.66233C53.6365%205.42086%2057.4957%207.99881%2060.7464%2011.2489C63.9972%2014.4991%2066.5758%2018.3577%2068.3352%2022.6046C70.0945%2026.8514%2071%2031.4032%2071%2036V36Z'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.6'%20d='M74%2074L62%2062'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M44.4013%2048.6044V45.4039C44.4013%2043.7062%2043.727%2042.0781%2042.5266%2040.8777C41.3263%2039.6773%2039.6983%2039.0029%2038.0007%2039.0029H28.3999C26.7024%2039.0029%2025.0743%2039.6773%2023.874%2040.8777C22.6737%2042.0781%2021.9993%2043.7062%2021.9993%2045.4039V48.6044'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M33.2031%2032.6016C36.738%2032.6016%2039.6037%2029.7358%2039.6037%2026.2006C39.6037%2022.6654%2036.738%2019.7996%2033.2031%2019.7996C29.6682%2019.7996%2026.8026%2022.6654%2026.8026%2026.2006C26.8026%2029.7358%2029.6682%2032.6016%2033.2031%2032.6016Z'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M49.1998%2027.8009V37.4024M54.0003%2032.6017H44.3994'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3cfilter%20id='filter0_b_3196_29781'%20x='-9.99951'%20y='-10'%20width='92'%20height='92'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29781'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29781'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",Pc="data:image/svg+xml,%3csvg%20width='90'%20height='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Football%20Jersey'%3e%3cg%20id='Layer%2010'%3e%3cpath%20id='Vector'%20d='M71.7192%2052.1016V40.3172L87.7223%2033.6376C87.9169%2033.558%2088.0912%2033.4359%2088.2323%2033.2802C88.3735%2033.1244%2088.4779%2032.939%2088.538%2032.7376C88.5985%2032.5342%2088.6123%2032.3197%2088.5782%2032.1103C88.5441%2031.9009%2088.463%2031.7018%2088.3411%2031.5282L71.4661%207.62193C71.4289%207.5532%2071.3866%207.48739%2071.3395%207.42506C69.4243%205.50395%2067.1463%203.98259%2064.6381%202.94935C62.1298%201.91612%2059.4413%201.39161%2056.7286%201.40631H53.438C53.065%201.40631%2052.7073%201.55446%2052.4436%201.81819C52.1799%202.08191%2052.0317%202.4396%2052.0317%202.81256V5.62506C52.0317%207.48986%2051.2909%209.27829%2049.9723%2010.5969C48.6537%2011.9155%2046.8653%2012.6563%2045.0005%2012.6563C43.1357%2012.6563%2041.3472%2011.9155%2040.0286%2010.5969C38.71%209.27829%2037.9692%207.48986%2037.9692%205.62506V2.81256C37.9692%202.4396%2037.8211%202.08191%2037.5573%201.81819C37.2936%201.55446%2036.9359%201.40631%2036.563%201.40631H33.2723C30.5634%201.39718%2027.8796%201.92572%2025.3764%202.96128C22.8731%203.99684%2020.6003%205.51885%2018.6895%207.43912C18.6424%207.50145%2018.6001%207.56727%2018.563%207.63599L1.68797%2031.5422C1.56603%2031.7159%201.48498%2031.9149%201.45089%2032.1244C1.41679%2032.3338%201.43054%2032.5482%201.49109%2032.7516C1.55114%2032.9531%201.65558%2033.1385%201.79673%2033.2942C1.93788%2033.45%202.11215%2033.5721%202.30672%2033.6516L18.2817%2040.3172V81.5626C18.2817%2081.9355%2018.4299%2082.2932%2018.6936%2082.5569C18.9573%2082.8206%2019.315%2082.9688%2019.688%2082.9688H57.1505C59.2007%2085.1122%2061.7416%2086.7246%2064.5541%2087.6667C67.3665%2088.6089%2070.366%2088.8527%2073.2936%2088.3769C76.2213%2087.9011%2078.9892%2086.7202%2081.3586%2084.9359C83.7279%2083.1516%2085.6276%2080.8176%2086.8936%2078.1353C88.1596%2075.453%2088.7539%2072.503%2088.6253%2069.5397C88.4967%2066.5764%2087.649%2063.6889%2086.1554%2061.1264C84.6617%2058.5639%2082.567%2056.4032%2080.052%2054.8309C77.5369%2053.2587%2074.6771%2052.3219%2071.7192%2052.1016ZM84.8255%2065.011L77.7942%2066.0235L71.7192%2061.2001V54.9141C74.6356%2055.1837%2077.4155%2056.2757%2079.7356%2058.0631C82.0558%2059.8505%2083.8208%2062.2599%2084.8255%2065.011ZM73.5755%2074.5313H67.1067L64.927%2067.9922L70.313%2063.6751L75.6989%2067.9922L73.5755%2074.5313ZM54.8442%2070.3126C54.8475%2069.4546%2054.9227%2068.5985%2055.0692%2067.7532L62.227%2068.7657L64.5192%2075.6563L59.7661%2081.5626C58.2159%2080.1269%2056.9786%2078.3867%2056.1317%2076.4509C55.2848%2074.5152%2054.8465%2072.4255%2054.8442%2070.3126ZM68.9067%2052.0313C66.9688%2052.1978%2065.07%2052.6726%2063.2817%2053.4376V51.3141C63.2728%2045.3135%2065.2507%2039.4787%2068.9067%2034.7204V52.0313ZM68.9067%2054.8438V61.1297L62.8739%2066.0938L55.8427%2065.0813C56.8334%2062.3231%2058.5873%2059.9031%2060.9002%2058.1031C63.213%2056.3031%2065.9897%2055.1972%2068.9067%2054.9141V54.8438ZM71.7192%2037.2657V12.8672L85.0223%2031.7251L71.7192%2037.2657ZM4.97859%2031.7251L18.2817%2012.8672V37.2657L4.97859%2031.7251ZM21.0942%2034.7204C24.7503%2039.4787%2026.7282%2045.3135%2026.7192%2051.3141V80.1563H21.0942V34.7204ZM29.5317%2080.1563V51.3141C29.546%2043.5117%2026.5194%2036.0108%2021.0942%2030.4032V9.02818C24.3875%205.92407%2028.7467%204.20253%2033.2723%204.21881H35.1567V5.62506C35.1567%208.23578%2036.1938%2010.7396%2038.0399%2012.5856C39.8859%2014.4317%2042.3897%2015.4688%2045.0005%2015.4688C47.6112%2015.4688%2050.115%2014.4317%2051.9611%2012.5856C53.8071%2010.7396%2054.8442%208.23578%2054.8442%205.62506V4.21881H56.7286C61.2542%204.20253%2065.6134%205.92407%2068.9067%209.02818V30.4032C63.4816%2036.0108%2060.455%2043.5117%2060.4692%2051.3141V54.9282C56.3926%2057.542%2053.5197%2061.6664%2052.4809%2066.3963C51.4421%2071.1261%2052.3224%2076.0748%2054.9286%2080.1563H29.5317ZM61.988%2083.3204L66.7692%2077.3438H73.8005L78.5817%2083.3204C76.1021%2084.9263%2073.211%2085.7808%2070.2567%2085.7808C67.3025%2085.7808%2064.4113%2084.9263%2061.9317%2083.3204H61.988ZM80.8598%2081.5626L76.1067%2075.6563L78.3989%2068.7657L85.5567%2067.7532C85.9891%2070.2641%2085.7858%2072.8433%2084.9653%2075.2555C84.1449%2077.6677%2082.7335%2079.836%2080.8598%2081.5626Z'%20fill='%23A0A9AF'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Oc="data:image/svg+xml,%3csvg%20width='90'%20height='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='fi_8584464'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M76.9582%2067.1642V5.59678C76.9582%204.8244%2076.3322%204.19775%2075.5592%204.19775H13.9918C13.2194%204.19775%2012.5928%204.8244%2012.5928%205.59678V67.1642C12.5928%2067.676%2012.8722%2068.1475%2013.3222%2068.3926L44.1055%2085.1836C44.5233%2085.4113%2045.0277%2085.4113%2045.4455%2085.1836L76.2295%2068.3926C76.6788%2068.1475%2076.9582%2067.676%2076.9582%2067.1642ZM74.1602%2018.1901V66.3333L44.7758%2082.3614L15.3915%2066.3333V18.1901H74.1602ZM44.7758%2023.7875C32.419%2023.7875%2022.3873%2033.8192%2022.3873%2046.1754C22.3873%2058.5316%2032.419%2068.5632%2044.7758%2068.5632C57.132%2068.5632%2067.1637%2058.5316%2067.1637%2046.1754C67.1637%2033.8192%2057.132%2023.7875%2044.7758%2023.7875ZM38.8795%2064.8604L44.7758%2059.985L50.6715%2064.8604C48.8104%2065.4481%2046.8297%2065.7651%2044.7758%2065.7651C42.7213%2065.7651%2040.7406%2065.4481%2038.8795%2064.8604ZM35.939%2028.6905C32.2168%2030.5772%2029.177%2033.617%2027.2903%2037.3392L33.8603%2045.2834C34.2881%2045.8013%2034.2881%2046.5495%2033.8603%2047.0673L27.2903%2055.0115C29.177%2058.7337%2032.2175%2061.7742%2035.939%2063.6602L43.8839%2057.0909C44.4011%2056.6631%2045.1499%2056.6631%2045.6671%2057.0909L53.6119%2063.6602C57.3342%2061.7736%2060.374%2058.7337%2062.2607%2055.0115L55.6907%2047.0673C55.2628%2046.5495%2055.2628%2045.8013%2055.6907%2045.2834L62.2607%2037.3392C60.374%2033.617%2057.3342%2030.5765%2053.6119%2028.6905L45.6671%2035.2598C45.1499%2035.6877%2044.4011%2035.6877%2043.8839%2035.2598L35.939%2028.6905ZM45.5979%2037.5475C45.1076%2037.1908%2044.4434%2037.1908%2043.9531%2037.5475L36.8243%2042.7272C36.3333%2043.0831%2036.1284%2043.7151%2036.3158%2044.2914L39.0387%2052.6722C39.2261%2053.2484%2039.7634%2053.6393%2040.3699%2053.6393H49.1818C49.7876%2053.6393%2050.3249%2053.2484%2050.5123%2052.6722L53.2358%2044.2914C53.4225%2043.7151%2053.2177%2043.0831%2052.7274%2042.7272L45.5979%2037.5475ZM58.5848%2046.1754L63.4609%2040.279C64.0486%2042.1401%2064.3649%2044.1208%2064.3649%2046.1754C64.3649%2048.2299%2064.0486%2050.2106%2063.4609%2052.0717L58.5848%2046.1754ZM26.0908%2040.279L30.9662%2046.1754L26.0908%2052.0717C25.5031%2050.2106%2025.1861%2048.2299%2025.1861%2046.1754C25.1861%2044.1208%2025.5031%2042.1401%2026.0908%2040.279ZM44.7758%2040.4086L50.2598%2044.3935L48.1649%2050.8406H41.3861L39.2912%2044.3935L44.7758%2040.4086ZM50.6715%2027.4903L44.7758%2032.3657L38.8795%2027.4903C40.7406%2026.9026%2042.7213%2026.5856%2044.7758%2026.5856C46.8297%2026.5856%2048.8104%2026.9026%2050.6715%2027.4903ZM74.1602%2015.392H15.3915C15.3915%2014.9548%2015.3915%2012.5933%2015.3915%2012.5933H74.1602V15.392ZM15.3915%209.79454V6.99648H74.1602V9.79454H15.3915Z'%20fill='%23A0A9AF'/%3e%3c/g%3e%3c/svg%3e",dy=["onClick"],hy=["src"],uy=qe({__name:"GSCGridTeamsMatches",props:{isPlayer:{type:Boolean,default:!1},playerId:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({id:0})},teamId:{type:Number,default:0},seasonSelected:{type:Number,default:0},nextRivalId:{type:Number,default:0},isPublic:{type:Boolean,default:!0},hasTeam:{type:Boolean,default:!1},teamImg:{type:[String,void 0],default:void 0},rivalImg:{type:[String,void 0],default:void 0},playerImg:{type:[String,void 0],default:void 0},componentWidth:{type:Number,default:768}},emits:["action"],setup(s,{emit:e}){const t=s;function a(r){e("action",r)}const i=n.computed(()=>t.componentWidth<768),o=n.computed(()=>{let r;return t.isPlayer?r=[{type:"player",label:"Mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"team",label:"Analizar mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected}]:t.hasTeam?r=[{type:"team",label:"Analizar mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Analizar mi próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected}]:t.isPublic?r=[{type:"teamOtherLeague",label:"Buscar equipo →",image:Oc,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.tournamentSelected.is_female==1?"Buscar jugadora →":"Buscar jugador →",image:Pc,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Dc,imgType:"svg",season:t.seasonSelected}]:r=[{type:"teamOtherLeague",label:"Buscar equipo →",image:Oc,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.tournamentSelected.is_female==1?"Buscar jugadora →":"Buscar jugador →",image:Pc,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Dc,imgType:"svg",season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:cy,imgType:"svg",season:t.seasonSelected}],r});return(r,l)=>(n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["grid-section",{mobile:i.value}]),style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"margin-top: 55px; height: 79% !important;":"margin-top: 37px; height: 37% !important; display: inline-block !important;":"")},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(d,c)=>(n.openBlock(),n.createElementBlock("div",{key:c,class:"grid-section__card",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"height: 100% !important; ":"height: 100% !important; margin-top: 20px; display: inline-flex; width: 100%":""),onClick:h=>a(d)},[n.createElementVNode("figure",{class:"grid-section__image",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"height: 294px;":"height: 162px; width: 50%;":"")},[d.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:d.image,alt:"",class:n.normalizeClass(d.imgType),style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":d.imgType=="player"?s.componentWidth>1e3?"width: 210px; height: 290px":"width: 210px; height: 160px":s.componentWidth>1e3?"width: 180px; height: 180px":"width: 120px; height: 120px":"")},null,14,hy)):n.createCommentVNode("",!0)],4),n.createElementVNode("p",{class:"grid-section__label",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value||s.componentWidth>1e3?"":"height: 162px; width: 50%; border-radius: 0px; font-size: 12px; border-top-right-radius: 10px; border-bottom-right-radius: 10px;":"")},n.toDisplayString(d.label),5)],12,dy))),128))],6))}},[["__scopeId","data-v-8e6065f2"]]);function Fc(s,e){return function(){return s.apply(e,arguments)}}const{toString:my}=Object.prototype,{getPrototypeOf:Vi}=Object,Fa=(s=>e=>{const t=my.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Et=s=>(s=s.toLowerCase(),e=>Fa(e)===s),Ma=s=>e=>typeof e===s,{isArray:As}=Array,ta=Ma("undefined");function fy(s){return s!==null&&!ta(s)&&s.constructor!==null&&!ta(s.constructor)&&yt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Mc=Et("ArrayBuffer");function py(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Mc(s.buffer),e}const gy=Ma("string"),yt=Ma("function"),$c=Ma("number"),$a=s=>s!==null&&typeof s=="object",yy=s=>s===!0||s===!1,Va=s=>{if(Fa(s)!=="object")return!1;const e=Vi(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},by=Et("Date"),Sy=Et("File"),wy=Et("Blob"),_y=Et("FileList"),ky=s=>$a(s)&&yt(s.pipe),Ey=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||yt(s.append)&&((e=Fa(s))==="formdata"||e==="object"&&yt(s.toString)&&s.toString()==="[object FormData]"))},Ty=Et("URLSearchParams"),[Cy,xy,vy,Ay]=["ReadableStream","Request","Response","Headers"].map(Et),Ly=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sa(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),As(s))for(a=0,i=s.length;a<i;a++)e.call(null,s[a],a,s);else{const o=t?Object.getOwnPropertyNames(s):Object.keys(s),r=o.length;let l;for(a=0;a<r;a++)l=o[a],e.call(null,s[l],l,s)}}function Vc(s,e){e=e.toLowerCase();const t=Object.keys(s);let a=t.length,i;for(;a-- >0;)if(i=t[a],e===i.toLowerCase())return i;return null}const Uc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zc=s=>!ta(s)&&s!==Uc;function Ui(){const{caseless:s}=zc(this)&&this||{},e={},t=(a,i)=>{const o=s&&Vc(e,i)||i;Va(e[o])&&Va(a)?e[o]=Ui(e[o],a):Va(a)?e[o]=Ui({},a):As(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&sa(arguments[a],t);return e}const Iy=(s,e,t,{allOwnKeys:a}={})=>(sa(e,(i,o)=>{t&&yt(i)?s[o]=Fc(i,t):s[o]=i},{allOwnKeys:a}),s),Ry=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),By=(s,e,t,a)=>{s.prototype=Object.create(e.prototype,a),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},Ny=(s,e,t,a)=>{let i,o,r;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),o=i.length;o-- >0;)r=i[o],(!a||a(r,s,e))&&!l[r]&&(e[r]=s[r],l[r]=!0);s=t!==!1&&Vi(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},Dy=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const a=s.indexOf(e,t);return a!==-1&&a===t},Py=s=>{if(!s)return null;if(As(s))return s;let e=s.length;if(!$c(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},Oy=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Vi(Uint8Array)),Fy=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=t.next())&&!a.done;){const i=a.value;e.call(s,i[0],i[1])}},My=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},$y=Et("HTMLFormElement"),Vy=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Gc=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),Uy=Et("RegExp"),jc=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};sa(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},zy=s=>{jc(s,(e,t)=>{if(yt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(yt(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Gy=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return As(s)?a(s):a(String(s).split(e)),t},jy=()=>{},Hy=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,zi="abcdefghijklmnopqrstuvwxyz",Hc="0123456789",Wc={DIGIT:Hc,ALPHA:zi,ALPHA_DIGIT:zi+zi.toUpperCase()+Hc},Wy=(s=16,e=Wc.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function Ky(s){return!!(s&&yt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const qy=s=>{const e=new Array(10),t=(a,i)=>{if($a(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=As(a)?[]:{};return sa(a,(r,l)=>{const d=t(r,i+1);!ta(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},Yy=Et("AsyncFunction"),Jy=s=>s&&($a(s)||yt(s))&&yt(s.then)&&yt(s.catch),O={isArray:As,isArrayBuffer:Mc,isBuffer:fy,isFormData:Ey,isArrayBufferView:py,isString:gy,isNumber:$c,isBoolean:yy,isObject:$a,isPlainObject:Va,isReadableStream:Cy,isRequest:xy,isResponse:vy,isHeaders:Ay,isUndefined:ta,isDate:by,isFile:Sy,isBlob:wy,isRegExp:Uy,isFunction:yt,isStream:ky,isURLSearchParams:Ty,isTypedArray:Oy,isFileList:_y,forEach:sa,merge:Ui,extend:Iy,trim:Ly,stripBOM:Ry,inherits:By,toFlatObject:Ny,kindOf:Fa,kindOfTest:Et,endsWith:Dy,toArray:Py,forEachEntry:Fy,matchAll:My,isHTMLForm:$y,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:jc,freezeMethods:zy,toObjectSet:Gy,toCamelCase:Vy,noop:jy,toFiniteNumber:Hy,findKey:Vc,global:Uc,isContextDefined:zc,ALPHABET:Wc,generateString:Wy,isSpecCompliantForm:Ky,toJSONObject:qy,isAsyncFn:Yy,isThenable:Jy};function Se(s,e,t,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),a&&(this.request=a),i&&(this.response=i)}O.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kc=Se.prototype,qc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{qc[s]={value:s}}),Object.defineProperties(Se,qc),Object.defineProperty(Kc,"isAxiosError",{value:!0}),Se.from=(s,e,t,a,i,o)=>{const r=Object.create(Kc);return O.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Se.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const Xy=null;function Gi(s){return O.isPlainObject(s)||O.isArray(s)}function Yc(s){return O.endsWith(s,"[]")?s.slice(0,-2):s}function Jc(s,e,t){return s?s.concat(e).map(function(a,i){return a=Yc(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function Zy(s){return O.isArray(s)&&!s.some(Gi)}const Qy=O.toFlatObject(O,{},null,function(s){return/^is[A-Z]/.test(s)});function Ua(s,e,t){if(!O.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,m){return!O.isUndefined(m[p])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(O.isDate(p))return p.toISOString();if(!l&&O.isBlob(p))throw new Se("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(p)||O.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,g){let y=p;if(p&&!g&&typeof p=="object"){if(O.endsWith(m,"{}"))m=a?m:m.slice(0,-2),p=JSON.stringify(p);else if(O.isArray(p)&&Zy(p)||(O.isFileList(p)||O.endsWith(m,"[]"))&&(y=O.toArray(p)))return m=Yc(m),y.forEach(function(b,S){!(O.isUndefined(b)||b===null)&&e.append(r===!0?Jc([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Gi(p)?!0:(e.append(Jc(g,m,o),d(p)),!1)}const h=[],u=Object.assign(Qy,{defaultVisitor:c,convertValue:d,isVisitable:Gi});function f(p,m){if(!O.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(p),O.forEach(p,function(g,y){(!(O.isUndefined(g)||g===null)&&i.call(e,g,O.isString(y)?y.trim():y,m,u))===!0&&f(g,m?m.concat(y):[y])}),h.pop()}}if(!O.isObject(s))throw new TypeError("data must be an object");return f(s),e}function Xc(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function ji(s,e){this._pairs=[],s&&Ua(s,this,e)}const Zc=ji.prototype;Zc.append=function(s,e){this._pairs.push([s,e])},Zc.toString=function(s){const e=s?function(t){return s.call(this,t,Xc)}:Xc;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function e1(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Qc(s,e,t){if(!e)return s;const a=t&&t.encode||e1,i=t&&t.serialize;let o;if(i?o=i(e,t):o=O.isURLSearchParams(e)?e.toString():new ji(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}const ed=class{constructor(){this.handlers=[]}use(e,t,a){return this.handlers.push({fulfilled:e,rejected:t,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(t){t!==null&&e(t)})}},td={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},t1=typeof URLSearchParams<"u"?URLSearchParams:ji,s1=typeof FormData<"u"?FormData:null,a1=typeof Blob<"u"?Blob:null,n1={isBrowser:!0,classes:{URLSearchParams:t1,FormData:s1,Blob:a1},protocols:["http","https","file","blob","url","data"]},Hi=typeof window<"u"&&typeof document<"u",i1=(s=>Hi&&["ReactNative","NativeScript","NS"].indexOf(s)<0)(typeof navigator<"u"&&navigator.product),o1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r1=Hi&&window.location.href||"http://localhost",l1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserEnv:i1,hasStandardBrowserWebWorkerEnv:o1,origin:r1},Symbol.toStringTag,{value:"Module"})),Tt={...l1,...n1};function c1(s,e){return Ua(s,new Tt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return Tt.isNode&&O.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function d1(s){return O.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function h1(s){const e={},t=Object.keys(s);let a;const i=t.length;let o;for(a=0;a<i;a++)o=t[a],e[o]=s[o];return e}function sd(s){function e(t,a,i,o){let r=t[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=t.length;return r=!r&&O.isArray(i)?i.length:r,d?(O.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!O.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&O.isArray(i[r])&&(i[r]=h1(i[r])),!l)}if(O.isFormData(s)&&O.isFunction(s.entries)){const t={};return O.forEachEntry(s,(a,i)=>{e(d1(a),i,t,0)}),t}return null}function u1(s,e,t){if(O.isString(s))try{return(e||JSON.parse)(s),O.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Wi={transitional:td,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=O.isObject(s);if(i&&O.isHTMLForm(s)&&(s=new FormData(s)),O.isFormData(s))return a?JSON.stringify(sd(s)):s;if(O.isArrayBuffer(s)||O.isBuffer(s)||O.isStream(s)||O.isFile(s)||O.isBlob(s)||O.isReadableStream(s))return s;if(O.isArrayBufferView(s))return s.buffer;if(O.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return c1(s,this.formSerializer).toString();if((o=O.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Ua(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),u1(s)):s}],transformResponse:[function(s){const e=this.transitional||Wi.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(O.isResponse(s)||O.isReadableStream(s))return s;if(s&&O.isString(s)&&(t&&!this.responseType||a)){const i=!(e&&e.silentJSONParsing)&&a;try{return JSON.parse(s)}catch(o){if(i)throw o.name==="SyntaxError"?Se.from(o,Se.ERR_BAD_RESPONSE,this,null,this.response):o}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tt.classes.FormData,Blob:Tt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],s=>{Wi.headers[s]={}});const Ki=Wi,m1=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),f1=s=>{const e={};let t,a,i;return s&&s.split(`
6
+ `+o):a.stack=o}catch{}}throw a}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ms(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Oi.assertOptions(a,{silentJSONParsing:ts.transitional(ts.boolean),forcedJSONParsing:ts.transitional(ts.boolean),clarifyTimeoutError:ts.transitional(ts.boolean)},!1),i!=null&&(D.isFunction(i)?t.paramsSerializer={serialize:i}:Oi.assertOptions(i,{encode:ts.function,serialize:ts.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&D.merge(o.common,o[t.method]);o&&D.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=ht.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(d=d&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let h,u=0,f;if(!d){const m=[Ac.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,c),f=m.length,h=Promise.resolve(t);u<f;)h=h.then(m[u++],m[u++]);return h}f=l.length;let p=t;for(u=0;u<f;){const m=l[u++],g=l[u++];try{p=m(p)}catch(y){g.call(this,y);break}}try{h=Ac.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,f=c.length;u<f;)h=h.then(c[u++],c[u++]);return h}getUri(e){e=ms(this.defaults,e);const t=Sc(e.baseURL,e.url);return dc(t,e.params,e.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(e){fs.prototype[e]=function(t,a){return this.request(ms(a||{},{method:e,url:t,data:(a||{}).data}))}}),D.forEach(["post","put","patch"],function(e){function t(a){return function(o,r,l){return this.request(ms(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}fs.prototype[e]=t(),fs.prototype[e+"Form"]=t(!0)});class Fi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(l=>{a.subscribe(l),o=l}).then(i);return r.cancel=function(){a.unsubscribe(o)},r},e(function(o,r,l){a.reason||(a.reason=new vs(o,r,l),t(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=a=>{e.abort(a)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Fi(function(i){e=i}),cancel:e}}}function N0(s){return function(t){return s.apply(null,t)}}function D0(s){return D.isObject(s)&&s.isAxiosError===!0}const Mi={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(Mi).forEach(([s,e])=>{Mi[e]=s});function Rc(s){const e=new fs(s),t=ql(fs.prototype.request,e);return D.extend(t,fs.prototype,e,{allOwnKeys:!0}),D.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Rc(ms(s,i))},t}const ve=Rc(Zs);ve.Axios=fs,ve.CanceledError=vs,ve.CancelToken=Fi,ve.isCancel=pc,ve.VERSION=Lc,ve.toFormData=Ra,ve.AxiosError=be,ve.Cancel=ve.CanceledError,ve.all=function(e){return Promise.all(e)},ve.spread=N0,ve.isAxiosError=D0,ve.mergeConfig=ms,ve.AxiosHeaders=ht,ve.formToJSON=s=>mc(D.isHTMLForm(s)?new FormData(s):s),ve.getAdapter=vc.getAdapter,ve.HttpStatusCode=Mi,ve.default=ve;const P0=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},$i={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Bc=()=>{n.useCssVars(s=>({"26acffa8":s.backgroundColor,"3d95bef4":s.height,"86ba1cc0":s.arrowsPosition,"140b6ada":s.arrowsPadding+"px","7df46be5":s.arrowsBackground,"33f99798":s.arrowsHeight*2+"px","1c8a858d":s.arrowsWidth*2+"px","4a7876c9":s.arrowsRadius,"2ff67e63":s.arrowsBorder,"59c5dd08":s.arrowsMargin+"px","6658215d":s.arrowsContainerBgL,66582163:s.arrowsContainerBgR,e5900a2e:s.scrollColor}))},Nc=$i.setup;$i.setup=Nc?(s,e)=>(Bc(),Nc(s,e)):Bc;const O0={ref:"gscScrollableContainer",class:"scrollable-container"},F0={class:"scrollable-arrows"},M0=["width","height","viewBox"],$0=["stroke"],V0={class:"scrollable-wrapper"},U0={class:"scrollable-arrows"},z0=["width","height","viewBox"],G0=["stroke"];function j0(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",O0,[t.arrows?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["arrows-container",o.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...r)=>o.scrollLeft&&o.scrollLeft(...r))},[n.createElementVNode("div",F0,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,$0)],8,M0))])],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...r)=>o.getScroll&&o.getScroll(...r))},[n.createElementVNode("div",V0,[n.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(n.openBlock(),n.createElementBlock("div",{key:1,id:"arrows-container-right",class:n.normalizeClass(["arrows-container",o.hideShowRightArrow]),onClick:e[2]||(e[2]=(...r)=>o.scrollRight&&o.scrollRight(...r))},[n.createElementVNode("div",U0,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,G0)],8,z0))])],2)):n.createCommentVNode("",!0)],512)}const ea=P0($i,[["render",j0],["__scopeId","data-v-7d0811ac"]]);function H0(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const Oa=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero "],[10,"Desconocida"]]),qe=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},W0={class:"player-card"},K0={class:"player-card__image"},q0=["src"],Y0={class:"player-card__number"},J0={class:"player-card__right-data"},X0={class:"player-card__details"},Z0={class:"player-card__name"},Q0={class:"player-card__position"},ey=qe({__name:"GSCPlayerCard",props:{countryFlag:{type:String,default:""},tournamentSelected:{type:Object,default:()=>({})},jersey:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position_id:{type:Number,default:0},position:{type:String,default:"-"},photo:{type:String,default:""},photoNoBg:{type:String,default:""},isImgFullWidth:{type:Boolean,default:!1}},emits:["clickProfileBtn"],setup(s,{emit:e}){return(t,a)=>(n.openBlock(),n.createElementBlock("div",W0,[n.createElementVNode("div",K0,[n.createElementVNode("img",{class:n.normalizeClass(["player-card__photo",{"full-width":s.isImgFullWidth}]),src:s.photo,alt:"Player Image"},null,10,q0),n.createElementVNode("div",Y0,n.toDisplayString(s.jersey),1),n.createElementVNode("div",J0,[n.createElementVNode("button",{class:"player-card__profile-button",onClick:a[0]||(a[0]=i=>e("clickProfileBtn"))}," Ver perfil ")])]),n.createElementVNode("div",X0,[n.createElementVNode("p",Z0,n.toDisplayString(s.name),1),n.createElementVNode("p",Q0,n.toDisplayString(s.tournamentSelected.is_female==1?n.unref(Oa).get(s.position_id).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):n.unref(Oa).get(s.position_id)),1)])]))}},[["__scopeId","data-v-013d8511"]]),ty=s=>(n.pushScopeId("data-v-7acb97f6"),s=s(),n.popScopeId(),s),sy={class:"my-players"},ay={class:"my-players__header"},ny={class:"my-players__title"},iy={style:{"text-decoration-line":"underline"}},oy=ty(()=>n.createElementVNode("span",null,"→",-1)),ry={class:"my-players__list"},ly=qe({__name:"GSCPlayersLanding",props:{tournamentSelected:{type:Object,default:()=>({})},isPlayer:{type:Boolean,default:!1},isImgFullWidth:{type:Boolean,default:!0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzE4ODAsIm5hbWUiOiJHb2xTdGF0cyIsInVzZXJuYW1lIjoiYnJpenVlbGEiLCJlbWFpbCI6IiIsInByb3ZpZGVyX2lkIjoxLCJsb2dpbl9nb2xzdGF0cyI6MSwiaWF0IjoxNjk4NzIzODA1LCJleHAiOjE3MzAyNTk4MDV9.3DR48YLPVAQKTisQg9SABSqDdurMuS6_z7IJfjXRlPQ"},playerId:{type:Number,default:34605},teamId:{type:Number,default:2},seasonId:{type:Number,default:1772}},emits:["viewAll","clickProfileBtn","totalPlayers"],setup(s,{emit:e}){const t=s,a=n.ref([]),i=n.ref(0),o=n.ref(0);n.onMounted(async()=>{const l=await r(t.teamId,t.seasonId,t.token);o.value=l.length,a.value=l.map(d=>({...d,position:Oa.get(d.position_id)})),t.isPlayer&&t.playerId&&(a.value=l.filter(d=>d.player_id!==t.playerId)),e("totalPlayers",o.value)});const r=async(l,d,c)=>{var u;const h="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";try{return((u=(await(await fetch(`https://pa3kubpuhg.execute-api.us-west-2.amazonaws.com/prod/playersByTeamAndSeason/${d}/${l}`,{headers:{Authorization:c||h}})).json())[0])==null?void 0:u.players)||[]}catch(f){return Promise.reject(f)}};return n.watch(()=>t.seasonId,async l=>{a.value=[];const d=await r(t.teamId,l,t.token);o.value=d.length,a.value=d.map(c=>({...c,position:Oa.get(c.position_id)})),e("totalPlayers",o.value),i.value+=1}),(l,d)=>(n.openBlock(),n.createElementBlock("div",sy,[n.createElementVNode("div",ay,[n.createElementVNode("h3",ny,n.toDisplayString(s.isPlayer?s.tournamentSelected.is_female==1?"Mis compañeras":"Mis compañeros":s.tournamentSelected.is_female==1?"Mis jugadoras":"Mis jugadores"),1),n.createElementVNode("button",{class:"my-players__button",onClick:d[0]||(d[0]=c=>e("viewAll"))},[n.createElementVNode("span",iy,[s.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Ver todas")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Ver todos")],64))]),oy])]),(n.openBlock(),n.createBlock(n.unref(ea),{pxScroll:209,scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",key:i.value,arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",ry,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,c=>(n.openBlock(),n.createBlock(ey,n.mergeProps(c,{"tournament-selected":s.tournamentSelected,isImgFullWidth:s.isImgFullWidth,onClickProfileBtn:h=>e("clickProfileBtn",c),key:c.player_id}),null,16,["tournament-selected","isImgFullWidth","onClickProfileBtn"]))),128))])]),_:1}))]))}},[["__scopeId","data-v-7acb97f6"]]),Dc="data:image/svg+xml,%3csvg%20width='69'%20height='70'%20viewBox='0%200%2069%2070'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_b_3196_29756)'%3e%3crect%20x='29'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='29.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20filter='url(%23filter1_b_3196_29756)'%3e%3crect%20x='48'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='48.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20filter='url(%23filter2_b_3196_29756)'%3e%3crect%20x='10'%20y='35'%20width='11'%20height='11'%20rx='1'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='10.5'%20y='35.5'%20width='10'%20height='10'%20rx='0.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cg%20opacity='0.6'%3e%3cpath%20d='M60.5556%208.70056H8.44444C4.33299%208.70056%201%2011.7003%201%2015.4006V62.3007C1%2066.001%204.33299%2069.0007%208.44444%2069.0007H60.5556C64.667%2069.0007%2068%2066.001%2068%2062.3007V15.4006C68%2011.7003%2064.667%208.70056%2060.5556%208.70056Z'%20stroke='white'%20stroke-width='1.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1%2028.7991H68'%20stroke='white'%20stroke-width='1.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M49.3872%201.99982V15.3999'%20stroke='white'%20stroke-width='3.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.6128%201.99982V15.3999'%20stroke='white'%20stroke-width='3.88'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_b_3196_29756'%20x='13'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter1_b_3196_29756'%20x='32'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter2_b_3196_29756'%20x='-6'%20y='19'%20width='43'%20height='43'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29756'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29756'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",cy="data:image/svg+xml,%3csvg%20width='75'%20height='75'%20viewBox='0%200%2075%2075'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_b_3196_29781)'%3e%3crect%20x='6.00049'%20y='6'%20width='60'%20height='60'%20rx='30'%20fill='white'%20fill-opacity='0.08'/%3e%3crect%20x='6.50049'%20y='6.5'%20width='59'%20height='59'%20rx='29.5'%20stroke='white'%20stroke-opacity='0.16'/%3e%3c/g%3e%3cpath%20opacity='0.6'%20d='M71%2036C71%2042.9221%2068.9475%2049.6887%2065.1019%2055.4443C61.2563%2061.1998%2055.7905%2065.6859%2049.3954%2068.3351C43.0004%2070.9844%2035.9634%2071.6779%2029.1743%2070.3279C22.3851%2068.978%2016.1487%2065.6452%2011.2536%2060.751C6.3585%2055.8569%203.02455%2049.6211%201.67333%2042.8322C0.322108%2036.0433%201.01429%2029.0061%203.66235%2022.6106C6.31041%2016.2151%2010.7954%2010.7484%2016.5503%206.90175C22.3051%203.05512%2029.0714%201.0013%2035.9934%201C40.5903%200.999139%2045.1422%201.9038%2049.3894%203.66233C53.6365%205.42086%2057.4957%207.99881%2060.7464%2011.2489C63.9972%2014.4991%2066.5758%2018.3577%2068.3352%2022.6046C70.0945%2026.8514%2071%2031.4032%2071%2036V36Z'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.6'%20d='M74%2074L62%2062'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M44.4013%2048.6044V45.4039C44.4013%2043.7062%2043.727%2042.0781%2042.5266%2040.8777C41.3263%2039.6773%2039.6983%2039.0029%2038.0007%2039.0029H28.3999C26.7024%2039.0029%2025.0743%2039.6773%2023.874%2040.8777C22.6737%2042.0781%2021.9993%2043.7062%2021.9993%2045.4039V48.6044'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M33.2031%2032.6016C36.738%2032.6016%2039.6037%2029.7358%2039.6037%2026.2006C39.6037%2022.6654%2036.738%2019.7996%2033.2031%2019.7996C29.6682%2019.7996%2026.8026%2022.6654%2026.8026%2026.2006C26.8026%2029.7358%2029.6682%2032.6016%2033.2031%2032.6016Z'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M49.1998%2027.8009V37.4024M54.0003%2032.6017H44.3994'%20stroke='white'%20stroke-opacity='0.6'%20stroke-width='2.38256'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3cfilter%20id='filter0_b_3196_29781'%20x='-9.99951'%20y='-10'%20width='92'%20height='92'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeGaussianBlur%20in='BackgroundImageFix'%20stdDeviation='8'/%3e%3cfeComposite%20in2='SourceAlpha'%20operator='in'%20result='effect1_backgroundBlur_3196_29781'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_backgroundBlur_3196_29781'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",Pc="data:image/svg+xml,%3csvg%20width='90'%20height='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Football%20Jersey'%3e%3cg%20id='Layer%2010'%3e%3cpath%20id='Vector'%20d='M71.7192%2052.1016V40.3172L87.7223%2033.6376C87.9169%2033.558%2088.0912%2033.4359%2088.2323%2033.2802C88.3735%2033.1244%2088.4779%2032.939%2088.538%2032.7376C88.5985%2032.5342%2088.6123%2032.3197%2088.5782%2032.1103C88.5441%2031.9009%2088.463%2031.7018%2088.3411%2031.5282L71.4661%207.62193C71.4289%207.5532%2071.3866%207.48739%2071.3395%207.42506C69.4243%205.50395%2067.1463%203.98259%2064.6381%202.94935C62.1298%201.91612%2059.4413%201.39161%2056.7286%201.40631H53.438C53.065%201.40631%2052.7073%201.55446%2052.4436%201.81819C52.1799%202.08191%2052.0317%202.4396%2052.0317%202.81256V5.62506C52.0317%207.48986%2051.2909%209.27829%2049.9723%2010.5969C48.6537%2011.9155%2046.8653%2012.6563%2045.0005%2012.6563C43.1357%2012.6563%2041.3472%2011.9155%2040.0286%2010.5969C38.71%209.27829%2037.9692%207.48986%2037.9692%205.62506V2.81256C37.9692%202.4396%2037.8211%202.08191%2037.5573%201.81819C37.2936%201.55446%2036.9359%201.40631%2036.563%201.40631H33.2723C30.5634%201.39718%2027.8796%201.92572%2025.3764%202.96128C22.8731%203.99684%2020.6003%205.51885%2018.6895%207.43912C18.6424%207.50145%2018.6001%207.56727%2018.563%207.63599L1.68797%2031.5422C1.56603%2031.7159%201.48498%2031.9149%201.45089%2032.1244C1.41679%2032.3338%201.43054%2032.5482%201.49109%2032.7516C1.55114%2032.9531%201.65558%2033.1385%201.79673%2033.2942C1.93788%2033.45%202.11215%2033.5721%202.30672%2033.6516L18.2817%2040.3172V81.5626C18.2817%2081.9355%2018.4299%2082.2932%2018.6936%2082.5569C18.9573%2082.8206%2019.315%2082.9688%2019.688%2082.9688H57.1505C59.2007%2085.1122%2061.7416%2086.7246%2064.5541%2087.6667C67.3665%2088.6089%2070.366%2088.8527%2073.2936%2088.3769C76.2213%2087.9011%2078.9892%2086.7202%2081.3586%2084.9359C83.7279%2083.1516%2085.6276%2080.8176%2086.8936%2078.1353C88.1596%2075.453%2088.7539%2072.503%2088.6253%2069.5397C88.4967%2066.5764%2087.649%2063.6889%2086.1554%2061.1264C84.6617%2058.5639%2082.567%2056.4032%2080.052%2054.8309C77.5369%2053.2587%2074.6771%2052.3219%2071.7192%2052.1016ZM84.8255%2065.011L77.7942%2066.0235L71.7192%2061.2001V54.9141C74.6356%2055.1837%2077.4155%2056.2757%2079.7356%2058.0631C82.0558%2059.8505%2083.8208%2062.2599%2084.8255%2065.011ZM73.5755%2074.5313H67.1067L64.927%2067.9922L70.313%2063.6751L75.6989%2067.9922L73.5755%2074.5313ZM54.8442%2070.3126C54.8475%2069.4546%2054.9227%2068.5985%2055.0692%2067.7532L62.227%2068.7657L64.5192%2075.6563L59.7661%2081.5626C58.2159%2080.1269%2056.9786%2078.3867%2056.1317%2076.4509C55.2848%2074.5152%2054.8465%2072.4255%2054.8442%2070.3126ZM68.9067%2052.0313C66.9688%2052.1978%2065.07%2052.6726%2063.2817%2053.4376V51.3141C63.2728%2045.3135%2065.2507%2039.4787%2068.9067%2034.7204V52.0313ZM68.9067%2054.8438V61.1297L62.8739%2066.0938L55.8427%2065.0813C56.8334%2062.3231%2058.5873%2059.9031%2060.9002%2058.1031C63.213%2056.3031%2065.9897%2055.1972%2068.9067%2054.9141V54.8438ZM71.7192%2037.2657V12.8672L85.0223%2031.7251L71.7192%2037.2657ZM4.97859%2031.7251L18.2817%2012.8672V37.2657L4.97859%2031.7251ZM21.0942%2034.7204C24.7503%2039.4787%2026.7282%2045.3135%2026.7192%2051.3141V80.1563H21.0942V34.7204ZM29.5317%2080.1563V51.3141C29.546%2043.5117%2026.5194%2036.0108%2021.0942%2030.4032V9.02818C24.3875%205.92407%2028.7467%204.20253%2033.2723%204.21881H35.1567V5.62506C35.1567%208.23578%2036.1938%2010.7396%2038.0399%2012.5856C39.8859%2014.4317%2042.3897%2015.4688%2045.0005%2015.4688C47.6112%2015.4688%2050.115%2014.4317%2051.9611%2012.5856C53.8071%2010.7396%2054.8442%208.23578%2054.8442%205.62506V4.21881H56.7286C61.2542%204.20253%2065.6134%205.92407%2068.9067%209.02818V30.4032C63.4816%2036.0108%2060.455%2043.5117%2060.4692%2051.3141V54.9282C56.3926%2057.542%2053.5197%2061.6664%2052.4809%2066.3963C51.4421%2071.1261%2052.3224%2076.0748%2054.9286%2080.1563H29.5317ZM61.988%2083.3204L66.7692%2077.3438H73.8005L78.5817%2083.3204C76.1021%2084.9263%2073.211%2085.7808%2070.2567%2085.7808C67.3025%2085.7808%2064.4113%2084.9263%2061.9317%2083.3204H61.988ZM80.8598%2081.5626L76.1067%2075.6563L78.3989%2068.7657L85.5567%2067.7532C85.9891%2070.2641%2085.7858%2072.8433%2084.9653%2075.2555C84.1449%2077.6677%2082.7335%2079.836%2080.8598%2081.5626Z'%20fill='%23A0A9AF'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Oc="data:image/svg+xml,%3csvg%20width='90'%20height='90'%20viewBox='0%200%2090%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='fi_8584464'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M76.9582%2067.1642V5.59678C76.9582%204.8244%2076.3322%204.19775%2075.5592%204.19775H13.9918C13.2194%204.19775%2012.5928%204.8244%2012.5928%205.59678V67.1642C12.5928%2067.676%2012.8722%2068.1475%2013.3222%2068.3926L44.1055%2085.1836C44.5233%2085.4113%2045.0277%2085.4113%2045.4455%2085.1836L76.2295%2068.3926C76.6788%2068.1475%2076.9582%2067.676%2076.9582%2067.1642ZM74.1602%2018.1901V66.3333L44.7758%2082.3614L15.3915%2066.3333V18.1901H74.1602ZM44.7758%2023.7875C32.419%2023.7875%2022.3873%2033.8192%2022.3873%2046.1754C22.3873%2058.5316%2032.419%2068.5632%2044.7758%2068.5632C57.132%2068.5632%2067.1637%2058.5316%2067.1637%2046.1754C67.1637%2033.8192%2057.132%2023.7875%2044.7758%2023.7875ZM38.8795%2064.8604L44.7758%2059.985L50.6715%2064.8604C48.8104%2065.4481%2046.8297%2065.7651%2044.7758%2065.7651C42.7213%2065.7651%2040.7406%2065.4481%2038.8795%2064.8604ZM35.939%2028.6905C32.2168%2030.5772%2029.177%2033.617%2027.2903%2037.3392L33.8603%2045.2834C34.2881%2045.8013%2034.2881%2046.5495%2033.8603%2047.0673L27.2903%2055.0115C29.177%2058.7337%2032.2175%2061.7742%2035.939%2063.6602L43.8839%2057.0909C44.4011%2056.6631%2045.1499%2056.6631%2045.6671%2057.0909L53.6119%2063.6602C57.3342%2061.7736%2060.374%2058.7337%2062.2607%2055.0115L55.6907%2047.0673C55.2628%2046.5495%2055.2628%2045.8013%2055.6907%2045.2834L62.2607%2037.3392C60.374%2033.617%2057.3342%2030.5765%2053.6119%2028.6905L45.6671%2035.2598C45.1499%2035.6877%2044.4011%2035.6877%2043.8839%2035.2598L35.939%2028.6905ZM45.5979%2037.5475C45.1076%2037.1908%2044.4434%2037.1908%2043.9531%2037.5475L36.8243%2042.7272C36.3333%2043.0831%2036.1284%2043.7151%2036.3158%2044.2914L39.0387%2052.6722C39.2261%2053.2484%2039.7634%2053.6393%2040.3699%2053.6393H49.1818C49.7876%2053.6393%2050.3249%2053.2484%2050.5123%2052.6722L53.2358%2044.2914C53.4225%2043.7151%2053.2177%2043.0831%2052.7274%2042.7272L45.5979%2037.5475ZM58.5848%2046.1754L63.4609%2040.279C64.0486%2042.1401%2064.3649%2044.1208%2064.3649%2046.1754C64.3649%2048.2299%2064.0486%2050.2106%2063.4609%2052.0717L58.5848%2046.1754ZM26.0908%2040.279L30.9662%2046.1754L26.0908%2052.0717C25.5031%2050.2106%2025.1861%2048.2299%2025.1861%2046.1754C25.1861%2044.1208%2025.5031%2042.1401%2026.0908%2040.279ZM44.7758%2040.4086L50.2598%2044.3935L48.1649%2050.8406H41.3861L39.2912%2044.3935L44.7758%2040.4086ZM50.6715%2027.4903L44.7758%2032.3657L38.8795%2027.4903C40.7406%2026.9026%2042.7213%2026.5856%2044.7758%2026.5856C46.8297%2026.5856%2048.8104%2026.9026%2050.6715%2027.4903ZM74.1602%2015.392H15.3915C15.3915%2014.9548%2015.3915%2012.5933%2015.3915%2012.5933H74.1602V15.392ZM15.3915%209.79454V6.99648H74.1602V9.79454H15.3915Z'%20fill='%23A0A9AF'/%3e%3c/g%3e%3c/svg%3e",dy=["onClick"],hy=["src"],uy=qe({__name:"GSCGridTeamsMatches",props:{isPlayer:{type:Boolean,default:!1},playerId:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({id:0})},teamId:{type:Number,default:0},seasonSelected:{type:Number,default:0},nextRivalId:{type:Number,default:0},isPublic:{type:Boolean,default:!0},hasTeam:{type:Boolean,default:!1},teamImg:{type:[String,void 0],default:void 0},rivalImg:{type:[String,void 0],default:void 0},playerImg:{type:[String,void 0],default:void 0},componentWidth:{type:Number,default:768}},emits:["action"],setup(s,{emit:e}){const t=s;function a(r){e("action",r)}const i=n.computed(()=>t.componentWidth<768),o=n.computed(()=>{let r;return t.isPlayer?r=[{type:"player",label:"Mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"team",label:"Analizar mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected}]:t.hasTeam?r=[{type:"team",label:"Analizar mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Analizar mi próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected}]:t.isPublic?r=[{type:"teamOtherLeague",label:"Buscar equipo →",image:Oc,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.tournamentSelected.is_female==1?"Buscar jugadora →":"Buscar jugador →",image:Pc,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Dc,imgType:"svg",season:t.seasonSelected}]:r=[{type:"teamOtherLeague",label:"Buscar equipo →",image:Oc,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.tournamentSelected.is_female==1?"Buscar jugadora →":"Buscar jugador →",image:Pc,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Dc,imgType:"svg",season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:cy,imgType:"svg",season:t.seasonSelected}],r});return(r,l)=>(n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["grid-section",{mobile:i.value}]),style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"margin-top: 55px; height: 79% !important;":"margin-top: 37px; height: 37% !important; display: inline-block !important;":"")},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(d,c)=>(n.openBlock(),n.createElementBlock("div",{key:c,class:"grid-section__card",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"height: 100% !important; ":"height: 100% !important; margin-top: 20px; display: inline-flex; width: 100%":""),onClick:h=>a(d)},[n.createElementVNode("figure",{class:"grid-section__image",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":s.componentWidth>1e3?"height: 294px;":"height: 162px; width: 50%;":"")},[d.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:d.image,alt:"",class:n.normalizeClass(d.imgType),style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value?"":d.imgType=="player"?s.componentWidth>1e3?"width: 210px; height: 290px":"width: 210px; height: 160px":s.componentWidth>1e3?"width: 180px; height: 180px":"width: 120px; height: 120px":"")},null,14,hy)):n.createCommentVNode("",!0)],4),n.createElementVNode("p",{class:"grid-section__label",style:n.normalizeStyle(s.isPlayer||s.hasTeam?i.value||s.componentWidth>1e3?"":"height: 162px; width: 50%; border-radius: 0px; font-size: 12px; border-top-right-radius: 10px; border-bottom-right-radius: 10px;":"")},n.toDisplayString(d.label),5)],12,dy))),128))],6))}},[["__scopeId","data-v-7fdd0307"]]);function Fc(s,e){return function(){return s.apply(e,arguments)}}const{toString:my}=Object.prototype,{getPrototypeOf:Vi}=Object,Fa=(s=>e=>{const t=my.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Et=s=>(s=s.toLowerCase(),e=>Fa(e)===s),Ma=s=>e=>typeof e===s,{isArray:As}=Array,ta=Ma("undefined");function fy(s){return s!==null&&!ta(s)&&s.constructor!==null&&!ta(s.constructor)&&yt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Mc=Et("ArrayBuffer");function py(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Mc(s.buffer),e}const gy=Ma("string"),yt=Ma("function"),$c=Ma("number"),$a=s=>s!==null&&typeof s=="object",yy=s=>s===!0||s===!1,Va=s=>{if(Fa(s)!=="object")return!1;const e=Vi(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},by=Et("Date"),Sy=Et("File"),wy=Et("Blob"),_y=Et("FileList"),ky=s=>$a(s)&&yt(s.pipe),Ey=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||yt(s.append)&&((e=Fa(s))==="formdata"||e==="object"&&yt(s.toString)&&s.toString()==="[object FormData]"))},Ty=Et("URLSearchParams"),[Cy,xy,vy,Ay]=["ReadableStream","Request","Response","Headers"].map(Et),Ly=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sa(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),As(s))for(a=0,i=s.length;a<i;a++)e.call(null,s[a],a,s);else{const o=t?Object.getOwnPropertyNames(s):Object.keys(s),r=o.length;let l;for(a=0;a<r;a++)l=o[a],e.call(null,s[l],l,s)}}function Vc(s,e){e=e.toLowerCase();const t=Object.keys(s);let a=t.length,i;for(;a-- >0;)if(i=t[a],e===i.toLowerCase())return i;return null}const Uc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zc=s=>!ta(s)&&s!==Uc;function Ui(){const{caseless:s}=zc(this)&&this||{},e={},t=(a,i)=>{const o=s&&Vc(e,i)||i;Va(e[o])&&Va(a)?e[o]=Ui(e[o],a):Va(a)?e[o]=Ui({},a):As(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&sa(arguments[a],t);return e}const Iy=(s,e,t,{allOwnKeys:a}={})=>(sa(e,(i,o)=>{t&&yt(i)?s[o]=Fc(i,t):s[o]=i},{allOwnKeys:a}),s),Ry=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),By=(s,e,t,a)=>{s.prototype=Object.create(e.prototype,a),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},Ny=(s,e,t,a)=>{let i,o,r;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),o=i.length;o-- >0;)r=i[o],(!a||a(r,s,e))&&!l[r]&&(e[r]=s[r],l[r]=!0);s=t!==!1&&Vi(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},Dy=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const a=s.indexOf(e,t);return a!==-1&&a===t},Py=s=>{if(!s)return null;if(As(s))return s;let e=s.length;if(!$c(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},Oy=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Vi(Uint8Array)),Fy=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=t.next())&&!a.done;){const i=a.value;e.call(s,i[0],i[1])}},My=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},$y=Et("HTMLFormElement"),Vy=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Gc=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),Uy=Et("RegExp"),jc=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};sa(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},zy=s=>{jc(s,(e,t)=>{if(yt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(yt(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Gy=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return As(s)?a(s):a(String(s).split(e)),t},jy=()=>{},Hy=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,zi="abcdefghijklmnopqrstuvwxyz",Hc="0123456789",Wc={DIGIT:Hc,ALPHA:zi,ALPHA_DIGIT:zi+zi.toUpperCase()+Hc},Wy=(s=16,e=Wc.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function Ky(s){return!!(s&&yt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const qy=s=>{const e=new Array(10),t=(a,i)=>{if($a(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=As(a)?[]:{};return sa(a,(r,l)=>{const d=t(r,i+1);!ta(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},Yy=Et("AsyncFunction"),Jy=s=>s&&($a(s)||yt(s))&&yt(s.then)&&yt(s.catch),O={isArray:As,isArrayBuffer:Mc,isBuffer:fy,isFormData:Ey,isArrayBufferView:py,isString:gy,isNumber:$c,isBoolean:yy,isObject:$a,isPlainObject:Va,isReadableStream:Cy,isRequest:xy,isResponse:vy,isHeaders:Ay,isUndefined:ta,isDate:by,isFile:Sy,isBlob:wy,isRegExp:Uy,isFunction:yt,isStream:ky,isURLSearchParams:Ty,isTypedArray:Oy,isFileList:_y,forEach:sa,merge:Ui,extend:Iy,trim:Ly,stripBOM:Ry,inherits:By,toFlatObject:Ny,kindOf:Fa,kindOfTest:Et,endsWith:Dy,toArray:Py,forEachEntry:Fy,matchAll:My,isHTMLForm:$y,hasOwnProperty:Gc,hasOwnProp:Gc,reduceDescriptors:jc,freezeMethods:zy,toObjectSet:Gy,toCamelCase:Vy,noop:jy,toFiniteNumber:Hy,findKey:Vc,global:Uc,isContextDefined:zc,ALPHABET:Wc,generateString:Wy,isSpecCompliantForm:Ky,toJSONObject:qy,isAsyncFn:Yy,isThenable:Jy};function Se(s,e,t,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),a&&(this.request=a),i&&(this.response=i)}O.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kc=Se.prototype,qc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{qc[s]={value:s}}),Object.defineProperties(Se,qc),Object.defineProperty(Kc,"isAxiosError",{value:!0}),Se.from=(s,e,t,a,i,o)=>{const r=Object.create(Kc);return O.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Se.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const Xy=null;function Gi(s){return O.isPlainObject(s)||O.isArray(s)}function Yc(s){return O.endsWith(s,"[]")?s.slice(0,-2):s}function Jc(s,e,t){return s?s.concat(e).map(function(a,i){return a=Yc(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function Zy(s){return O.isArray(s)&&!s.some(Gi)}const Qy=O.toFlatObject(O,{},null,function(s){return/^is[A-Z]/.test(s)});function Ua(s,e,t){if(!O.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,m){return!O.isUndefined(m[p])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(O.isDate(p))return p.toISOString();if(!l&&O.isBlob(p))throw new Se("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(p)||O.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,g){let y=p;if(p&&!g&&typeof p=="object"){if(O.endsWith(m,"{}"))m=a?m:m.slice(0,-2),p=JSON.stringify(p);else if(O.isArray(p)&&Zy(p)||(O.isFileList(p)||O.endsWith(m,"[]"))&&(y=O.toArray(p)))return m=Yc(m),y.forEach(function(b,S){!(O.isUndefined(b)||b===null)&&e.append(r===!0?Jc([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Gi(p)?!0:(e.append(Jc(g,m,o),d(p)),!1)}const h=[],u=Object.assign(Qy,{defaultVisitor:c,convertValue:d,isVisitable:Gi});function f(p,m){if(!O.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(p),O.forEach(p,function(g,y){(!(O.isUndefined(g)||g===null)&&i.call(e,g,O.isString(y)?y.trim():y,m,u))===!0&&f(g,m?m.concat(y):[y])}),h.pop()}}if(!O.isObject(s))throw new TypeError("data must be an object");return f(s),e}function Xc(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function ji(s,e){this._pairs=[],s&&Ua(s,this,e)}const Zc=ji.prototype;Zc.append=function(s,e){this._pairs.push([s,e])},Zc.toString=function(s){const e=s?function(t){return s.call(this,t,Xc)}:Xc;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function e1(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Qc(s,e,t){if(!e)return s;const a=t&&t.encode||e1,i=t&&t.serialize;let o;if(i?o=i(e,t):o=O.isURLSearchParams(e)?e.toString():new ji(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}const ed=class{constructor(){this.handlers=[]}use(e,t,a){return this.handlers.push({fulfilled:e,rejected:t,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(t){t!==null&&e(t)})}},td={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},t1=typeof URLSearchParams<"u"?URLSearchParams:ji,s1=typeof FormData<"u"?FormData:null,a1=typeof Blob<"u"?Blob:null,n1={isBrowser:!0,classes:{URLSearchParams:t1,FormData:s1,Blob:a1},protocols:["http","https","file","blob","url","data"]},Hi=typeof window<"u"&&typeof document<"u",i1=(s=>Hi&&["ReactNative","NativeScript","NS"].indexOf(s)<0)(typeof navigator<"u"&&navigator.product),o1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r1=Hi&&window.location.href||"http://localhost",l1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserEnv:i1,hasStandardBrowserWebWorkerEnv:o1,origin:r1},Symbol.toStringTag,{value:"Module"})),Tt={...l1,...n1};function c1(s,e){return Ua(s,new Tt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return Tt.isNode&&O.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function d1(s){return O.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function h1(s){const e={},t=Object.keys(s);let a;const i=t.length;let o;for(a=0;a<i;a++)o=t[a],e[o]=s[o];return e}function sd(s){function e(t,a,i,o){let r=t[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=t.length;return r=!r&&O.isArray(i)?i.length:r,d?(O.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!O.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&O.isArray(i[r])&&(i[r]=h1(i[r])),!l)}if(O.isFormData(s)&&O.isFunction(s.entries)){const t={};return O.forEachEntry(s,(a,i)=>{e(d1(a),i,t,0)}),t}return null}function u1(s,e,t){if(O.isString(s))try{return(e||JSON.parse)(s),O.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Wi={transitional:td,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=O.isObject(s);if(i&&O.isHTMLForm(s)&&(s=new FormData(s)),O.isFormData(s))return a?JSON.stringify(sd(s)):s;if(O.isArrayBuffer(s)||O.isBuffer(s)||O.isStream(s)||O.isFile(s)||O.isBlob(s)||O.isReadableStream(s))return s;if(O.isArrayBufferView(s))return s.buffer;if(O.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return c1(s,this.formSerializer).toString();if((o=O.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Ua(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),u1(s)):s}],transformResponse:[function(s){const e=this.transitional||Wi.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(O.isResponse(s)||O.isReadableStream(s))return s;if(s&&O.isString(s)&&(t&&!this.responseType||a)){const i=!(e&&e.silentJSONParsing)&&a;try{return JSON.parse(s)}catch(o){if(i)throw o.name==="SyntaxError"?Se.from(o,Se.ERR_BAD_RESPONSE,this,null,this.response):o}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tt.classes.FormData,Blob:Tt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],s=>{Wi.headers[s]={}});const Ki=Wi,m1=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),f1=s=>{const e={};let t,a,i;return s&&s.split(`
7
7
  `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),a=o.substring(i+1).trim(),!(!t||e[t]&&m1[t])&&(t==="set-cookie"?e[t]?e[t].push(a):e[t]=[a]:e[t]=e[t]?e[t]+", "+a:a)}),e},ad=Symbol("internals");function aa(s){return s&&String(s).trim().toLowerCase()}function za(s){return s===!1||s==null?s:O.isArray(s)?s.map(za):String(s)}function p1(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=t.exec(s);)e[a[1]]=a[2];return e}const g1=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function qi(s,e,t,a,i){if(O.isFunction(a))return a.call(this,e,t);if(i&&(e=t),!!O.isString(e)){if(O.isString(a))return e.indexOf(a)!==-1;if(O.isRegExp(a))return a.test(e)}}function y1(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,a)=>t.toUpperCase()+a)}function b1(s,e){const t=O.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(s,a+t,{value:function(i,o,r){return this[a].call(this,e,i,o,r)},configurable:!0})})}let Ga=class{constructor(e){e&&this.set(e)}set(e,t,a){const i=this;function o(l,d,c){const h=aa(d);if(!h)throw new Error("header name must be a non-empty string");const u=O.findKey(i,h);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||d]=za(l))}const r=(l,d)=>O.forEach(l,(c,h)=>o(c,h,d));if(O.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(O.isString(e)&&(e=e.trim())&&!g1(e))r(f1(e),t);else if(O.isHeaders(e))for(const[l,d]of e.entries())o(d,l,a);else e!=null&&o(t,e,a);return this}get(e,t){if(e=aa(e),e){const a=O.findKey(this,e);if(a){const i=this[a];if(!t)return i;if(t===!0)return p1(i);if(O.isFunction(t))return t.call(this,i,a);if(O.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=aa(e),e){const a=O.findKey(this,e);return!!(a&&this[a]!==void 0&&(!t||qi(this,this[a],a,t)))}return!1}delete(e,t){const a=this;let i=!1;function o(r){if(r=aa(r),r){const l=O.findKey(a,r);l&&(!t||qi(a,a[l],l,t))&&(delete a[l],i=!0)}}return O.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let a=t.length,i=!1;for(;a--;){const o=t[a];(!e||qi(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,a={};return O.forEach(this,(i,o)=>{const r=O.findKey(a,o);if(r){t[r]=za(i),delete t[o];return}const l=e?y1(o):String(o).trim();l!==o&&delete t[o],t[l]=za(i),a[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return O.forEach(this,(a,i)=>{a!=null&&a!==!1&&(t[i]=e&&O.isArray(a)?a.join(", "):a)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
8
8
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const a=new this(e);return t.forEach(i=>a.set(i)),a}static accessor(e){const t=(this[ad]=this[ad]={accessors:{}}).accessors,a=this.prototype;function i(o){const r=aa(o);t[r]||(b1(a,o),t[r]=!0)}return O.isArray(e)?e.forEach(i):i(e),this}};Ga.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(Ga.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),O.freezeMethods(Ga);const Ct=Ga;function Yi(s,e){const t=this||Ki,a=e||t,i=Ct.from(a.headers);let o=a.data;return O.forEach(s,function(r){o=r.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function nd(s){return!!(s&&s.__CANCEL__)}function Ls(s,e,t){Se.call(this,s??"canceled",Se.ERR_CANCELED,e,t),this.name="CanceledError"}O.inherits(Ls,Se,{__CANCEL__:!0});function id(s,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?s(t):e(new Se("Request failed with status code "+t.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function S1(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function w1(s,e){s=s||10;const t=new Array(s),a=new Array(s);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=a[o];r||(r=d),t[i]=l,a[i]=d;let h=o,u=0;for(;h!==i;)u+=t[h++],h=h%s;if(i=(i+1)%s,i===o&&(o=(o+1)%s),d-r<e)return;const f=c&&d-c;return f?Math.round(u*1e3/f):void 0}}function _1(s,e){let t=0;const a=1e3/e;let i=null;return function(){const o=this===!0,r=Date.now();if(o||r-t>a)return i&&(clearTimeout(i),i=null),t=r,s.apply(null,arguments);i||(i=setTimeout(()=>(i=null,t=Date.now(),s.apply(null,arguments)),a-(r-t)))}}const ja=(s,e,t=3)=>{let a=0;const i=w1(50,250);return _1(o=>{const r=o.loaded,l=o.lengthComputable?o.total:void 0,d=r-a,c=i(d),h=r<=l;a=r;const u={loaded:r,total:l,progress:l?r/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&h?(l-r)/c:void 0,event:o,lengthComputable:l!=null};u[e?"download":"upload"]=!0,s(u)},t)},k1=Tt.hasStandardBrowserEnv?function(){const s=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let t;function a(i){let o=i;return s&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return t=a(window.location.href),function(i){const o=O.isString(i)?a(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}(),E1=Tt.hasStandardBrowserEnv?{write(s,e,t,a,i,o){const r=[s+"="+encodeURIComponent(e)];O.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),O.isString(a)&&r.push("path="+a),O.isString(i)&&r.push("domain="+i),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function T1(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function C1(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function od(s,e){return s&&!T1(e)?C1(s,e):e}const rd=s=>s instanceof Ct?{...s}:s;function ps(s,e){e=e||{};const t={};function a(c,h,u){return O.isPlainObject(c)&&O.isPlainObject(h)?O.merge.call({caseless:u},c,h):O.isPlainObject(h)?O.merge({},h):O.isArray(h)?h.slice():h}function i(c,h,u){if(O.isUndefined(h)){if(!O.isUndefined(c))return a(void 0,c,u)}else return a(c,h,u)}function o(c,h){if(!O.isUndefined(h))return a(void 0,h)}function r(c,h){if(O.isUndefined(h)){if(!O.isUndefined(c))return a(void 0,c)}else return a(void 0,h)}function l(c,h,u){if(u in e)return a(c,h);if(u in s)return a(void 0,c)}const d={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(c,h)=>i(rd(c),rd(h),!0)};return O.forEach(Object.keys(Object.assign({},s,e)),function(c){const h=d[c]||i,u=h(s[c],e[c],c);O.isUndefined(u)&&h!==l||(t[c]=u)}),t}const ld=s=>{const e=ps({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=Ct.from(r),e.url=Qc(od(e.baseURL,e.url),s.params,s.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(O.isFormData(t)){if(Tt.hasStandardBrowserEnv||Tt.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((d=r.getContentType())!==!1){const[c,...h]=d?d.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...h].join("; "))}}if(Tt.hasStandardBrowserEnv&&(a&&O.isFunction(a)&&(a=a(e)),a||a!==!1&&k1(e.url))){const c=i&&o&&E1.read(o);c&&r.set(i,c)}return e},x1=typeof XMLHttpRequest<"u",v1=x1&&function(s){return new Promise(function(e,t){const a=ld(s);let i=a.data;const o=Ct.from(a.headers).normalize();let{responseType:r}=a,l;function d(){a.cancelToken&&a.cancelToken.unsubscribe(l),a.signal&&a.signal.removeEventListener("abort",l)}let c=new XMLHttpRequest;c.open(a.method.toUpperCase(),a.url,!0),c.timeout=a.timeout;function h(){if(!c)return;const f=Ct.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),p={data:!r||r==="text"||r==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:s,request:c};id(function(m){e(m),d()},function(m){t(m),d()},p),c=null}"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){c&&(t(new Se("Request aborted",Se.ECONNABORTED,a,c)),c=null)},c.onerror=function(){t(new Se("Network Error",Se.ERR_NETWORK,a,c)),c=null},c.ontimeout=function(){let f=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const p=a.transitional||td;a.timeoutErrorMessage&&(f=a.timeoutErrorMessage),t(new Se(f,p.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,a,c)),c=null},i===void 0&&o.setContentType(null),"setRequestHeader"in c&&O.forEach(o.toJSON(),function(f,p){c.setRequestHeader(p,f)}),O.isUndefined(a.withCredentials)||(c.withCredentials=!!a.withCredentials),r&&r!=="json"&&(c.responseType=a.responseType),typeof a.onDownloadProgress=="function"&&c.addEventListener("progress",ja(a.onDownloadProgress,!0)),typeof a.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",ja(a.onUploadProgress)),(a.cancelToken||a.signal)&&(l=f=>{c&&(t(!f||f.type?new Ls(null,s,c):f),c.abort(),c=null)},a.cancelToken&&a.cancelToken.subscribe(l),a.signal&&(a.signal.aborted?l():a.signal.addEventListener("abort",l)));const u=S1(a.url);if(u&&Tt.protocols.indexOf(u)===-1){t(new Se("Unsupported protocol "+u+":",Se.ERR_BAD_REQUEST,s));return}c.send(i||null)})},A1=(s,e)=>{let t=new AbortController,a;const i=function(d){if(!a){a=!0,r();const c=d instanceof Error?d:this.reason;t.abort(c instanceof Se?c:new Ls(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{i(new Se(`timeout ${e} of ms exceeded`,Se.ETIMEDOUT))},e);const r=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(d=>{d&&(d.removeEventListener?d.removeEventListener("abort",i):d.unsubscribe(i))}),s=null)};s.forEach(d=>d&&d.addEventListener&&d.addEventListener("abort",i));const{signal:l}=t;return l.unsubscribe=r,[l,()=>{o&&clearTimeout(o),o=null}]},L1=A1,I1=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let a=0,i;for(;a<t;)i=a+e,yield s.slice(a,i),a=i},R1=async function*(s,e,t){for await(const a of s)yield*I1(ArrayBuffer.isView(a)?a:await t(String(a)),e)},cd=(s,e,t,a,i)=>{const o=R1(s,e,i);let r=0;return new ReadableStream({type:"bytes",async pull(l){const{done:d,value:c}=await o.next();if(d){l.close(),a();return}let h=c.byteLength;t&&t(r+=h),l.enqueue(new Uint8Array(c))},cancel(l){return a(l),o.return()}},{highWaterMark:2})},dd=(s,e)=>{const t=s!=null;return a=>setTimeout(()=>e({lengthComputable:t,total:s,loaded:a}))},Ha=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",hd=Ha&&typeof ReadableStream=="function",Ji=Ha&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),B1=hd&&(()=>{let s=!1;const e=new Request(Tt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e})(),ud=64*1024,Xi=hd&&!!(()=>{try{return O.isReadableStream(new Response("").body)}catch{}})(),Wa={stream:Xi&&(s=>s.body)};Ha&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Wa[e]&&(Wa[e]=O.isFunction(s[e])?t=>t[e]():(t,a)=>{throw new Se(`Response type '${e}' is not supported`,Se.ERR_NOT_SUPPORT,a)})})})(new Response);const N1=async s=>{if(s==null)return 0;if(O.isBlob(s))return s.size;if(O.isSpecCompliantForm(s))return(await new Request(s).arrayBuffer()).byteLength;if(O.isArrayBufferView(s))return s.byteLength;if(O.isURLSearchParams(s)&&(s=s+""),O.isString(s))return(await Ji(s)).byteLength},D1=async(s,e)=>O.toFiniteNumber(s.getContentLength())??N1(e),P1=Ha&&(async s=>{let{url:e,method:t,data:a,signal:i,cancelToken:o,timeout:r,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:h,withCredentials:u="same-origin",fetchOptions:f}=ld(s);c=c?(c+"").toLowerCase():"text";let[p,m]=i||o||r?L1([i,o],r):[],g,y;const b=()=>{!g&&setTimeout(()=>{p&&p.unsubscribe()}),g=!0};let S;try{if(d&&B1&&t!=="get"&&t!=="head"&&(S=await D1(h,a))!==0){let v=new Request(e,{method:"POST",body:a,duplex:"half"}),T;O.isFormData(a)&&(T=v.headers.get("content-type"))&&h.setContentType(T),v.body&&(a=cd(v.body,ud,dd(S,ja(d)),null,Ji))}O.isString(u)||(u=u?"cors":"omit"),y=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",withCredentials:u});let _=await fetch(y);const C=Xi&&(c==="stream"||c==="response");if(Xi&&(l||C)){const v={};["status","statusText","headers"].forEach(B=>{v[B]=_[B]});const T=O.toFiniteNumber(_.headers.get("content-length"));_=new Response(cd(_.body,ud,l&&dd(T,ja(l,!0)),C&&b,Ji),v)}c=c||"text";let E=await Wa[O.findKey(Wa,c)||"text"](_,s);return!C&&b(),m&&m(),await new Promise((v,T)=>{id(v,T,{data:E,headers:Ct.from(_.headers),status:_.status,statusText:_.statusText,config:s,request:y})})}catch(_){throw b(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new Se("Network Error",Se.ERR_NETWORK,s,y),{cause:_.cause||_}):Se.from(_,_&&_.code,s,y)}}),Zi={http:Xy,xhr:v1,fetch:P1};O.forEach(Zi,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const md=s=>`- ${s}`,O1=s=>O.isFunction(s)||s===null||s===!1,fd={getAdapter:s=>{s=O.isArray(s)?s:[s];const{length:e}=s;let t,a;const i={};for(let o=0;o<e;o++){t=s[o];let r;if(a=t,!O1(t)&&(a=Zi[(r=String(t)).toLowerCase()],a===void 0))throw new Se(`Unknown adapter '${r}'`);if(a)break;i[r||"#"+o]=a}if(!a){const o=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=e?o.length>1?`since :
9
9
  `+o.map(md).join(`
@@ -25,21 +25,21 @@
25
25
  * Vue 3 Carousel 0.3.3
26
26
  * (c) 2024
27
27
  * @license MIT
28
- */const je={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Ih={itemsToShow:{default:je.itemsToShow,type:Number},itemsToScroll:{default:je.itemsToScroll,type:Number},wrapAround:{default:je.wrapAround,type:Boolean},throttle:{default:je.throttle,type:Number},snapAlign:{default:je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:je.transition,type:Number},breakpoints:{default:je.breakpoints,type:Object},autoplay:{default:je.autoplay,type:Number},pauseAutoplayOnHover:{default:je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:je.mouseDrag,type:Boolean},touchDrag:{default:je.touchDrag,type:Boolean},dir:{default:je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:je.i18n,type:Object},settings:{default(){return{}},type:Object}};function Dk({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:a,itemsToShow:i=1}=s;if(a)return Math.max(e-1,0);let o;switch(t){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function Pk({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:a,itemsToShow:i=1}=s;let o=0;if(t||i>e)return o;switch(a){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function Oo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function Ok({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:o=1}=s;let r=e;switch(a){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:Oo({val:r,max:t-o,min:0})}function Rh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...Rh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Fo({val:s,max:e,min:t=0}){return s>e?Fo({val:s-(e+1),max:e,min:t}):s<t?Fo({val:s+(e+1),max:e,min:t}):s}function Fk(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function Mk(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function $k(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Vk=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},je))),e=n.inject("currentSlide",n.ref(0)),t=n.inject("slidesCount",n.ref(0));return()=>n.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},$k(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Uk=n.defineComponent({name:"Carousel",props:Ih,setup(s,{slots:e,emit:t,expose:a}){var i;const o=n.ref(null),r=n.ref([]),l=n.ref(0),d=n.ref(0),c=n.reactive(Object.assign({},je));let h=Object.assign({},je),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=n.ref(0),m=n.ref(0),g=n.ref(0),y=n.ref(0);let b,S;n.provide("config",c),n.provide("slidesCount",d),n.provide("currentSlide",f),n.provide("maxSlide",g),n.provide("minSlide",y),n.provide("slideWidth",l);function _(){u=Object.assign({},s.breakpoints),h=Object.assign(Object.assign(Object.assign({},h),s),{i18n:Object.assign(Object.assign({},h.i18n),s.i18n),breakpoints:void 0}),E(h)}function C(){if(!u||!Object.keys(u).length)return;const x=Object.keys(u).map(U=>Number(U)).sort((U,M)=>+M-+U);let j=Object.assign({},h);x.some(U=>{const M=window.matchMedia(`(min-width: ${U}px)`).matches;return M&&(j=Object.assign(Object.assign({},j),u[U])),M}),E(j)}function E(x){Object.entries(x).forEach(([j,U])=>c[j]=U)}const v=Mk(()=>{C(),B(),T()},16);function T(){if(!o.value)return;const x=o.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function B(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),g.value=Dk({config:c,slidesCount:d.value}),y.value=Pk({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Oo({val:f.value,max:g.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),q(),window.addEventListener("resize",v,{passive:!0}),t("init")}),n.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",v,{passive:!0})});let L=!1;const R={x:0,y:0},$={x:0,y:0},K=n.reactive({x:0,y:0}),z=n.ref(!1),ae=n.ref(!1),oe=()=>{z.value=!0},ie=()=>{z.value=!1};function ce(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(L=x.type==="touchstart",L||x.preventDefault(),!(!L&&x.button!==0||J.value)&&(R.x=L?x.touches[0].clientX:x.clientX,R.y=L?x.touches[0].clientY:x.clientY,document.addEventListener(L?"touchmove":"mousemove",de,!0),document.addEventListener(L?"touchend":"mouseup",Q,!0)))}const de=Fk(x=>{ae.value=!0,$.x=L?x.touches[0].clientX:x.clientX,$.y=L?x.touches[0].clientY:x.clientY;const j=$.x-R.x,U=$.y-R.y;K.y=U,K.x=j},c.throttle);function Q(){const x=c.dir==="rtl"?-1:1,j=Math.sign(K.x)*.4,U=Math.round(K.x/l.value+j)*x;if(U&&!L){const M=W=>{window.removeEventListener("click",M,!0)};window.addEventListener("click",M,!0)}Z(f.value-U),K.x=0,K.y=0,ae.value=!1,document.removeEventListener(L?"touchmove":"mousemove",de,!0),document.removeEventListener(L?"touchend":"mouseup",Q,!0)}function q(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&z.value||ue()},c.autoplay))}function he(){b&&(clearInterval(b),b=null),q()}const J=n.ref(!1);function Z(x){const j=c.wrapAround?x:Oo({val:x,max:g.value,min:y.value});f.value===j||J.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!0,p.value=f.value,f.value=j,S=setTimeout(()=>{if(c.wrapAround){const U=Fo({val:j,max:g.value,min:0});U!==f.value&&(f.value=U,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!1,he()},c.transition))}function ue(){Z(f.value+c.itemsToScroll)}function ge(){Z(f.value-c.itemsToScroll)}const Ce={slideTo:Z,next:ue,prev:ge};n.provide("nav",Ce),n.provide("isSliding",J);const se=n.computed(()=>Ok({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",se);const Ee=n.computed(()=>{const x=c.dir==="rtl"?-1:1,j=se.value*l.value*x;return{transform:`translateX(${K.x-j}px)`,transition:`${J.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),B(),T(),he()}Object.keys(Ih).forEach(x=>{["modelValue"].includes(x)||n.watch(()=>s[x],Te)}),n.watch(()=>s.modelValue,x=>{x!==f.value&&Z(Number(x))}),n.watch(d,B),t("before-init"),_();const Fe={config:c,slidesCount:d,slideWidth:l,next:ue,prev:ge,slideTo:Z,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:C,updateSlidesData:B,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:Z,next:ue,prev:ge,nav:Ce,data:Fe});const et=e.default||e.slides,it=e.addons,ot=n.reactive(Fe);return()=>{const x=Rh(et==null?void 0:et(ot)),j=(it==null?void 0:it(ot))||[];x.forEach((H,G)=>H.props.index=G);let U=x;if(c.wrapAround){const H=x.map((X,Y)=>n.cloneVNode(X,{index:-x.length+Y,isClone:!0,key:`clone-before-${Y}`})),G=x.map((X,Y)=>n.cloneVNode(X,{index:x.length+Y,isClone:!0,key:`clone-after-${Y}`}));U=[...H,...x,...G]}r.value=x,d.value=Math.max(x.length,1);const M=n.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ce:null,onTouchstartPassiveCapture:c.touchDrag?ce:null},U),W=n.h("div",{class:"carousel__viewport"},M);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":J.value,"is-dragging":ae.value,"is-hover":z.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ie},[W,j,n.h(Vk)])}}}),Mo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Mo||(Mo={}));const zk={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function Gk(s){return s in Mo}const $o=s=>{const e=n.inject("config",n.reactive(Object.assign({},je))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!Gk(t))return;const i=zk[t],o=n.h("path",{d:i}),r=e.i18n[a]||s.title||t,l=n.h("title",r);return n.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":r},[l,o])};$o.props={name:String,title:String};const jk=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},je))),r=n.inject("maxSlide",n.ref(1)),l=n.inject("minSlide",n.ref(1)),d=n.inject("currentSlide",n.ref(1)),c=n.inject("nav",{}),{dir:h,wrapAround:u,i18n:f}=o,p=h==="rtl",m=n.h("button",{type:"button",class:["carousel__prev",!u&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||n.h($o,{name:p?"arrowRight":"arrowLeft"})),g=n.h("button",{type:"button",class:["carousel__next",!u&&d.value>=r.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(a==null?void 0:a())||n.h($o,{name:p?"arrowLeft":"arrowRight"}));return[m,g]};var Hk=n.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=n.inject("config",n.reactive(Object.assign({},je))),a=n.inject("currentSlide",n.ref(0)),i=n.inject("slidesToScroll",n.ref(0)),o=n.inject("isSliding",n.ref(!1)),r=n.computed(()=>s.index===a.value),l=n.computed(()=>s.index===a.value-1),d=n.computed(()=>s.index===a.value+1),c=n.computed(()=>{const h=Math.floor(i.value),u=Math.ceil(i.value+t.itemsToShow-1);return s.index>=h&&s.index<=u});return()=>{var h;return n.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":r.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":o.value},"aria-hidden":!c.value},(h=e.default)===null||h===void 0?void 0:h.call(e,{isActive:r.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:o.value,isVisible:c.value}))}}});const Lt=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Wk={__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:Number,default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=n.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),o=n.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function r(l){e("click-match-day",l)}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day",style:n.normalizeStyle({...a.value}),onClick:d[0]||(d[0]=c=>r(s.matchDay))},[n.createElementVNode("div",{class:"match-day__value",style:n.normalizeStyle(i.value)},n.toDisplayString(s.matchDay.valueText),5),Number.isNaN(s.matchDay.value)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"match-day__text",style:n.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",o.value])},n.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5))],4))}},Kk=Lt(Wk,[["__scopeId","data-v-687d929a"]]),qk={__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:Number,default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;n.useCssVars(c=>({"26769adc":o.value,"2678c95c":r.value}));const a=n.ref(null),i=n.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=n.computed(()=>a.value.data.currentSlide.value==0?"none":"inline"),r=n.computed(()=>a.value.data.currentSlide.value==a.value.data.maxSlide.value?"none":"inline"),l=n.ref({});n.watch(()=>t.closestMatchDay,c=>{if(c){const h=t.matchDays.find(u=>u.key===c);d(h||t.matchDays[0],!0)}}),n.watch(()=>t.matchDays,c=>{if(!t.closestMatchDay&&c&&c.length){const h=c.find(u=>u.key===t.defaultMatchDayKey);l.value=h||c[0],e("change-match-day",l.value)}else t.closestMatchDay&&(l.value=c.find(h=>h.key===t.closestMatchDay)||{})},{immediate:!0});function d(c,h=!1){h&&a.value&&a.value.slideTo(c.index),l.value=c,e("change-match-day",l.value)}return(c,h)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day-picker",style:n.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[n.createVNode(n.unref(Uk),n.mergeProps(i.value,{ref_key:"matchDayPickerCarousel",ref:a}),{addons:n.withCtx(()=>[n.createVNode(n.unref(jk))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,u=>(n.openBlock(),n.createBlock(n.unref(Hk),{key:u.key},{default:n.withCtx(()=>[n.createVNode(Kk,n.mergeProps(t,{"match-day":u,"match-day-selected":l.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:d}),null,16,["match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16)],4))}},Yk=Lt(qk,[["__scopeId","data-v-1621f164"]]);function Bs(s,e=80){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-"}${e}/${s}.png`}function Bh(s){if(typeof s=="string"){let e=s.replace("M","J ");return e=e.replace("PO1","CFI"),e=e.replace("PO2","CFV"),e=e.replace("PO3","SFI"),e=e.replace("PO4","SFV"),e=e.replace("PO5","FI"),e=e.replace("PO6","FV"),e}}function Jk(s){let e="";return s.game_status!=4&&(e+="Finalizado"),(s.penalties_score_home_team!=0||s.penalties_score_visiting_team!=0)&&(e+=" - Penales "+s.penalties_score_home_team+" - "+s.penalties_score_visiting_team),e}const Xk={class:"game-info__teams"},Zk={class:"game-info__teams__team__logo"},Qk=["src"],eE={class:"game-info__teams__detail"},tE={key:0,class:"game-info__teams__detail__pre-game"},sE={class:"game-info__teams__team__logo away"},aE=["src"],nE={key:0},iE={key:0},oE={key:1},rE={__name:"GameInfo",props:{isLandingMode:{type:Boolean,default:!1},isAcronymVisible:{type:Boolean,default:!1},isTelevisionVisible:{type:Boolean,default:!0},game:{type:Object,required:!0},colorPrimary:{type:String,default:"white"},colorSecondary:{type:String,default:"grey"},namesFontSize:{type:String,default:"12px"},timeFontSize:{type:String,default:"12px"},timeZoneFontSize:{type:String,default:"8px"},scoreFontSize:{type:String,default:"13px"},namesFontFamily:{type:String,default:"sans-serif"},scoreFontFamily:{type:String,default:"sans-serif"},additionalInfoFontFamily:{type:String,default:"sans-serif"},additionalInfoFontSize:{type:String,default:"9px"}},setup(s){const e=s,t=n.computed(()=>{let c=e.game.schedule.split(":");return c.pop(),c=c.join(":"),c}),a=n.computed(()=>{let c="120px";return(e.isLandingMode||e.isAcronymVisible)&&(c="70px"),{"min-width":c}}),i=n.computed(()=>({"font-size":e.namesFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary})),o=n.computed(()=>({"font-size":e.additionalInfoFontSize,"font-family":e.additionalInfoFontFamily,color:e.colorSecondary})),r=n.computed(()=>({"font-size":e.scoreFontSize,"font-family":e.scoreFontFamily,color:e.colorPrimary})),l=n.computed(()=>({"font-size":e.timeZoneFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary})),d=n.computed(()=>({"font-size":e.timeFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary}));return(c,h)=>(n.openBlock(),n.createElementBlock("div",{class:"game-info",style:n.normalizeStyle(s.isLandingMode?"gap:5px":"")},[n.createElementVNode("div",Xk,[n.createElementVNode("div",{class:"game-info__teams__team",style:n.normalizeStyle(a.value)},[n.createElementVNode("div",{class:"game-info__teams__team__name",style:n.normalizeStyle(i.value)},n.toDisplayString(s.isLandingMode||s.isAcronymVisible?s.game.home_team.acronym:s.game.home_team.colloquial_name),5),n.createElementVNode("div",Zk,[n.createElementVNode("img",{src:n.unref(Bs)(s.game.home_team.team_id),alt:""},null,8,Qk)])],4),n.createElementVNode("div",eE,[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("div",tE,[n.createElementVNode("div",null,[n.createElementVNode("span",{style:n.normalizeStyle(d.value)},n.toDisplayString(t.value),5),n.createTextVNode(),n.createElementVNode("span",{style:n.normalizeStyle(l.value)},"CST",4)])])):(n.openBlock(),n.createElementBlock("div",{key:1,class:"game-info__teams__detail__score",style:n.normalizeStyle(r.value)},[n.createElementVNode("span",null,n.toDisplayString(s.game.score[0])+" - "+n.toDisplayString(s.game.score[1]),1)],4))]),n.createElementVNode("div",{class:"game-info__teams__team away",style:n.normalizeStyle(a.value)},[n.createElementVNode("div",sE,[n.createElementVNode("img",{src:n.unref(Bs)(s.game.visiting_team.team_id),alt:""},null,8,aE)]),n.createElementVNode("div",{class:"game-info__teams__team__name",style:n.normalizeStyle(i.value)},n.toDisplayString(s.isLandingMode||s.isAcronymVisible?s.game.visiting_team.acronym:s.game.visiting_team.colloquial_name),5)],4)]),n.createElementVNode("div",{class:"game-info__status",style:n.normalizeStyle([o.value,s.isLandingMode?"line-height: normal":""])},[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("span",nE,[s.isTelevisionVisible?(n.openBlock(),n.createElementBlock("span",iE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock("span",oE,n.toDisplayString(n.unref(Jk)(s.game)),1))],4)],4))}},Nh=Lt(rE,[["__scopeId","data-v-a6b3fc44"]]),Dh=s=>(n.pushScopeId("data-v-e2fc9ed0"),s=s(),n.popScopeId(),s),lE={class:"game-status"},cE={key:0,class:"game-status__day__live"},dE=Dh(()=>n.createElementVNode("span",null,"LIVE",-1)),hE=Dh(()=>n.createElementVNode("span",{class:"dot"},null,-1)),uE=[dE,hE],mE={key:0,class:"game-status__round"},fE={__name:"GameStatus",props:{isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},status:{type:Number,default:4},isLive:{type:Boolean,default:!1},dateTimeMillis:{type:Number,default:0},roundAbbreviation:{type:String,default:""},fontSize:{type:String,default:"10px"}},setup(s){const e=s,t=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],a=n.computed(()=>{let r="";if(e.dateTimeMillis){const l=new Date(e.dateTimeMillis);r=`${l.getDate()} ${t[l.getMonth()]}`}return r}),i=n.computed(()=>({"font-size":e.fontSize})),o=n.computed(()=>{let r=[];return e.isLive?r.push("live"):e.status!==1&&r.push("pre-match"),r});return(r,l)=>(n.openBlock(),n.createElementBlock("div",lE,[n.createElementVNode("div",{class:n.normalizeClass(["game-status__day",o.value]),style:n.normalizeStyle(i.value)},[s.isLive?(n.openBlock(),n.createElementBlock("div",cE,uE)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(a.value),1)],64))],6),s.isRoundMode?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",mE,n.toDisplayString(s.roundAbbreviation),1))]))}},Ph=Lt(fE,[["__scopeId","data-v-e2fc9ed0"]]),It={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},pE=s=>(n.pushScopeId("data-v-5711c5a6"),s=s(),n.popScopeId(),s),gE={class:"actions"},yE={class:"actions__row"},bE=pE(()=>n.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),SE=[bE],wE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_E=["fill"],kE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},EE=["fill"],TE={__name:"GameActionsLanding",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.computed(()=>({backgroundColor:t.iconBackgroundColor,borderColor:t.iconBorderColor}));function i(o){e("action",o)}return(o,r)=>(n.openBlock(),n.createElementBlock("div",gE,[n.createElementVNode("div",yE,[n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[0]||(r[0]=l=>i(n.unref(It).STATISTICS))},SE,4),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[1]||(r[1]=l=>i(n.unref(It).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",wE,[n.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:t.iconColor},null,8,_E)]))],4)):n.createCommentVNode("",!0),s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:1,class:"actions__button",onClick:r[2]||(r[2]=l=>i(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",kE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,EE)]))])):n.createCommentVNode("",!0)])]))}},CE=Lt(TE,[["__scopeId","data-v-5711c5a6"]]),Vo=s=>(n.pushScopeId("data-v-d64f8667"),s=s(),n.popScopeId(),s),xE={class:"actions"},vE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},AE=["fill"],LE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},IE=["fill"],RE=Vo(()=>n.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),BE=[RE],NE={key:0,class:"actions__videos"},DE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PE=["fill"],OE={key:1,class:"actions__videos__thumbnails"},FE=Vo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),ME=Vo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),$E={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},VE=["stroke"],UE={__name:"GameActionsFull",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!0},hasGoals:{type:Boolean,default:!0},areEventsVisible:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1},arrowColor:{type:String,default:"white"},thumbnailFontFamily:{type:String,default:"sans-serif"},thumbnailFontSize:{type:String,default:"8px"},thumbnailColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.computed(()=>({backgroundColor:t.iconBackgroundColor,borderColor:t.iconBorderColor})),i=n.computed(()=>{const d=[];return t.componentWidth<540&&d.push("mobile"),d}),o=n.computed(()=>t.componentWidth>730),r=n.computed(()=>({color:t.thumbnailColor,fontFamily:t.thumbnailFontFamily,fontSize:t.thumbnailFontSize}));function l(d){e("action",d)}return(d,c)=>(n.openBlock(),n.createElementBlock("div",xE,[n.createElementVNode("div",{class:n.normalizeClass(["actions__buttons",i.value])},[s.gameStatus===4444&&!s.isLive&&!o.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[0]||(c[0]=h=>l(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",vE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,AE)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo&&!o.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:c[1]||(c[1]=h=>l(n.unref(It).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",LE,[n.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:t.iconColor},null,8,IE)]))],4)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:c[2]||(c[2]=h=>l(n.unref(It).STATISTICS))},BE,4)],2),o.value?(n.openBlock(),n.createElementBlock("div",NE,[s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[3]||(c[3]=h=>l(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",DE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,PE)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",OE,[s.hasGoals?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:c[4]||(c[4]=h=>l(n.unref(It).PLAY_GOALS))},[FE,n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:n.normalizeStyle(r.value)}," Goles ",4)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail",onClick:c[5]||(c[5]=h=>l(n.unref(It).PLAY_RESUME))},[ME,n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:n.normalizeStyle(r.value)}," Resumen ",4)])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),(s.gameStatus!==4||s.isLive)&&s.hasActions?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["actions__button expand",{"rotated-180":s.areEventsVisible,mobile:s.componentWidth<540}]),onClick:c[6]||(c[6]=h=>l(n.unref(It).SHOW_GAME_EVENTS))},[(n.openBlock(),n.createElementBlock("svg",$E,[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,VE)]))],2)):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:s.componentWidth<540}])},null,2))]))}},zE=Lt(UE,[["__scopeId","data-v-d64f8667"]]),cn=s=>(n.pushScopeId("data-v-2968a2f6"),s=s(),n.popScopeId(),s),GE={class:"row-landing__game-status"},jE={class:"row-landing__game-actions"},HE={class:"row-full__game-status"},WE={class:"row-full__game-info"},KE={key:0},qE={class:"row-full__game-actions"},YE={class:"game-events-container"},JE=cn(()=>n.createElementVNode("div",{class:"separator"},null,-1)),XE=cn(()=>n.createElementVNode("div",null,null,-1)),ZE={class:"game-events__data"},QE={class:"game-events__data__team"},eT=["src"],tT={class:"game-events__data__team__event__text"},sT={class:"game-events__data__team away"},aT={class:"game-events__data__team__event__text"},nT=["src"],iT=cn(()=>n.createElementVNode("div",null,null,-1)),oT=cn(()=>n.createElementVNode("div",null,null,-1)),rT={__name:"CalendarRow",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},game:{type:Object,required:!0},height:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#172531"},showPlayButton:{type:Boolean,default:!1},componentWidth:{type:Number,default:400,validator(s){return s>0}},televisionFontSize:{type:String,default:"12px"},televisionFontFamily:{type:String,default:"sans-serif"},televisionColor:{type:String,default:"rgba(255, 255, 255, 0.5)"}},emits:["action"],setup(s,{emit:e}){const t=s,a={GOAL:{}.GAME_EVENTS_ICONS_GOAL||"/icn-gol.svg",RED_CARD:{}.GAME_EVENTS_ICONS_RED_CARD||"/icn-expulsion.svg",YELLOW_CARD:{}.GAME_EVENTS_ICONS_YELLOW_CARD||"/icn-amarilla.svg"},i=n.ref(!1),o=n.ref(!1),r=n.computed(()=>{const y={homeTeam:[],awayTeam:[]};return t.game&&t.game.game_status!==4&&!t.game.is_live&&t.game.minutes&&(y.homeTeam.push(...m(t.game.minutes.home_goals_minutes,a.GOAL)),y.homeTeam.push(...m(t.game.minutes.home_red_cards_minutes,a.RED_CARD)),y.homeTeam.push(...m(t.game.minutes.home_yellow_cards_minutes,a.YELLOW_CARD)),y.awayTeam.push(...m(t.game.minutes.visiting_goals_minutes,a.GOAL)),y.awayTeam.push(...m(t.game.minutes.away_red_cards_minutes,a.RED_CARD)),y.awayTeam.push(...m(t.game.minutes.away_yellow_cards_minutes,a.YELLOW_CARD))),y}),l=n.computed(()=>{const y=r.value.homeTeam.length,b=r.value.awayTeam.length;return y+b>0}),d=n.computed(()=>{const y=t.game.score[0],b=t.game.score[1];return y>0||b>0}),c=n.computed(()=>({"background-color":t.backgroundColor})),h=n.computed(()=>({height:t.height})),u=n.computed(()=>{const y={game:[],events:[]};return t.componentWidth<500?(y.events.push("break-point-3"),y.game.push("break-point-2")):t.componentWidth<730?(y.game.push("break-point-2"),y.events.push("break-point-2")):t.componentWidth<910&&(y.game.push("break-point-1"),y.events.push("break-point-1")),y}),f=n.computed(()=>({isLandingMode:t.isLandingMode,game:t.game,colorPrimary:"#fff",colorSecondary:"#fff",namesFontSize:"12px",timeFontSize:"12px",timeZoneFontSize:"8px",scoreFontSize:"13px",namesFontFamily:"sans-serif",scoreFontFamily:"sans-serif",additionalInfoFontFamily:"sans-serif",additionalInfoFontSize:"9px"})),p=n.computed(()=>({"font-size":t.televisionFontSize,"font-family":t.televisionFontFamily,color:t.televisionColor}));n.watch(()=>t.componentWidth,y=>{o.value=y<910});function m(y,b){return y.map(S=>({iconUrl:b,text:S}))}function g(y){y===It.SHOW_GAME_EVENTS?i.value=!i.value:e("action",{action:y,game:t.game})}return(y,b)=>s.isLandingMode?(n.openBlock(),n.createElementBlock("div",{key:0,class:"row-landing",style:n.normalizeStyle(c.value)},[n.createVNode(Nh,{game:s.game,"is-landing-mode":s.isLandingMode},null,8,["game","is-landing-mode"]),n.createElementVNode("div",GE,[n.createVNode(Ph,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(Bh)(s.game.matchday_abbreviation),"is-landing-mode":s.isLandingMode,"is-round-mode":s.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),n.createElementVNode("div",jE,[s.game.home_team?(n.openBlock(),n.createBlock(CE,{key:0,"is-live":!!s.game.is_live,"has-video":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?!!s.game.has_video:!1,"game-status":s.game.game_status,"show-play-button":!0,onAction:g},null,8,["is-live","has-video","game-status"])):n.createCommentVNode("",!0)])],4)):(n.openBlock(),n.createElementBlock("div",{key:1,class:"row-full-container",style:n.normalizeStyle(c.value)},[n.createElementVNode("div",{class:n.normalizeClass(["row-full",u.value.game]),style:n.normalizeStyle(h.value)},[n.createElementVNode("div",HE,[n.createVNode(Ph,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(Bh)(s.game.matchday_abbreviation),"is-landing-mode":s.isLandingMode,"is-round-mode":s.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),n.createElementVNode("div",WE,[n.createVNode(Nh,n.mergeProps(f.value,{"is-television-visible":o.value,game:s.game,"is-landing-mode":s.isLandingMode,"is-acronym-visible":s.componentWidth<540}),null,16,["is-television-visible","game","is-landing-mode","is-acronym-visible"])]),s.componentWidth>=910?(n.openBlock(),n.createElementBlock("div",{key:0,class:"row-full__television",style:n.normalizeStyle(p.value)},[!o.value&&(s.game.game_status===4||s.game.is_live)?(n.openBlock(),n.createElementBlock("span",KE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",qE,[s.game.home_team?(n.openBlock(),n.createBlock(zE,{key:0,"is-live":!!s.game.is_live,"has-video":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?!!s.game.has_video:!1,"has-actions":l.value,"has-goals":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?d.value:!1,"game-status":s.game.game_status,"show-play-button":!0,"are-events-visible":i.value,"component-width":s.componentWidth,onAction:g},null,8,["is-live","has-video","has-actions","has-goals","game-status","are-events-visible","component-width"])):n.createCommentVNode("",!0)])],6),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",YE,[JE,n.createElementVNode("div",{class:n.normalizeClass(["game-events",u.value.events])},[XE,n.createElementVNode("div",ZE,[n.createElementVNode("div",QE,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.homeTeam,(S,_)=>(n.openBlock(),n.createElementBlock("div",{key:`h${_}`,class:"game-events__data__team__event"},[n.createElementVNode("img",{src:S.iconUrl},null,8,eT),n.createElementVNode("div",tT,n.toDisplayString(S.text),1)]))),128))]),n.createElementVNode("div",sT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.awayTeam,(S,_)=>(n.openBlock(),n.createElementBlock("div",{key:`a${_}`,class:"game-events__data__team__event"},[n.createElementVNode("div",aT,n.toDisplayString(S.text),1),n.createElementVNode("img",{src:S.iconUrl},null,8,nT)]))),128))])]),iT,oT],2)],512),[[n.vShow,i.value]])]),_:1})],4))}},Oh=Lt(rT,[["__scopeId","data-v-2968a2f6"]]),lT={class:"calendar-table"},cT={__name:"CalendarTable",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},gamesPerPage:{type:Array,default:()=>[]},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s;function a(o){return o%2===0?t.evenRowColor:t.oddRowColor}function i(o){e("action",o)}return(o,r)=>(n.openBlock(),n.createElementBlock("div",lT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.gamesPerPage,(l,d)=>(n.openBlock(),n.createBlock(Oh,{key:l.game_id,game:l,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":s.isLandingMode,height:s.rowHeight,"background-color":a(d),"component-width":s.componentWidth,"is-round-mode":s.isRoundMode,onAction:i},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode"]))),128))]))}},dT=Lt(cT,[["__scopeId","data-v-c7bf1232"]]),hT={class:"calendar-by-team"},uT={class:"playing-as-picker"},mT={class:"calendar-by-team__page"},fT={__name:"CalendarTableByTeam",props:{showVideos:{type:Number,default:0},teamId:{type:Number,default:0},isPaginationVisible:{type:Boolean,default:!0},gamesPages:{type:Map,default:()=>new Map},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},rowHeight:{type:String,default:"fit-content"},nameRowColor:{type:String,default:"#172531"},gameRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.ref(0),i=n.computed(()=>{let d=[];if(t.gamesPages.size>0){const c=Array.from(t.gamesPages.entries()).reduce((h,[u,f])=>{const p=Number(u),m=Number.isNaN(p)?u:`Jornada ${p<10?"0":""}${p}`,g=f.reduce((y,b)=>(y.push(...b),y),[]).filter(y=>a.value===0||a.value===1&&y.visiting_team.team_id===t.teamId?!0:a.value===2&&y.home_team.team_id===t.teamId);return g.length>0&&h.push({roundName:m,games:g}),h},[]);d.push(c)}return d});function o(d){e("action",d)}function r(d){document.querySelector("#opc0").classList.remove("selected"),document.querySelector("#opc1").classList.remove("selected"),document.querySelector("#opc2").classList.remove("selected"),a.value=d,document.querySelector("#opc"+d).classList.add("selected")}function l(d){let c=d;switch(d){case"PI1":c="Play In 1";break;case"PI2":c="Play In 2";break;case"R1":c="Repechaje";break;case"CFI":c="Cuartos de final - Ida";break;case"CFV":c="Cuartos de final - Vuelta";break;case"SFI":c="Semifinal - Ida";break;case"SFV":c="Semifinal - Vuelta";break;case"FI":c="Final - Ida";break;case"FV":c="Final - Vuelta";break}return c}return(d,c)=>(n.openBlock(),n.createElementBlock("div",hT,[n.createElementVNode("div",uT,[n.createElementVNode("div",{class:"playing-as-picker__type selected",id:"opc0",onClick:c[0]||(c[0]=h=>r(0))}," Todas "),n.createElementVNode("div",{class:"playing-as-picker__type",id:"opc1",onClick:c[1]||(c[1]=h=>r(1))},"Visitante"),n.createElementVNode("div",{class:"playing-as-picker__type",id:"opc2",onClick:c[2]||(c[2]=h=>r(2))},"Local")]),n.createVNode(n.unref(Lh),{"is-pagination-visible":s.isPaginationVisible,items:i.value},{default:n.withCtx(({item:h})=>[n.createElementVNode("div",mT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h,(u,f)=>(n.openBlock(),n.createElementBlock("div",{key:f,class:"calendar-by-team__page__round"},[n.createElementVNode("div",{class:"calendar-by-team__page__round__round-name",style:n.normalizeStyle([{color:"white"},s.componentWidth<=425?"padding: 5px 10px":""])},n.toDisplayString(l(u.roundName)),5),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.games,p=>(n.openBlock(),n.createBlock(Oh,{key:p.game_id,game:p,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":s.isLandingMode,height:s.rowHeight,"background-color":s.gameRowColor,"component-width":s.componentWidth,"is-round-mode":s.isRoundMode,onAction:o},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode"]))),128))]))),128))])]),_:1},8,["is-pagination-visible","items"])]))}},pT=Lt(fT,[["__scopeId","data-v-6e0e406c"]]),gT="_liveMinutes_1utnm_2",yT="_viewButtomEvent_1utnm_6",bT="_containerEvents_1utnm_20",ST="_sepEvents_1utnm_26",wT="_goalsContainer_1utnm_36",_T="_yellowContainer_1utnm_44",kT="_redContainer_1utnm_52",ET="_containerEventsGameHometeam_1utnm_60",TT="_containerEventsGameAwayteam_1utnm_73",CT="_image62Icon_1utnm_86",xT="_imgChivasIcon_1utnm_95",vT="_nameDesktop_1utnm_102",AT="_nameMobile_1utnm_115",LT="_homeTeam_1utnm_127",IT="_sbado16De_1utnm_138",RT="_gameDate_1utnm_147",BT="_sab16092023_1utnm_151",NT="_div_1utnm_164",DT="_divscore_1utnm_173",PT="_cst_1utnm_183",OT="_hour_1utnm_192",FT="_score_1utnm_193",MT="_chivasTvCanal_1utnm_204",$T="_gameStatus_1utnm_216",VT="_matchInfo_1utnm_227",UT="_image62Icon1_1utnm_241",zT="_name_1utnm_102",GT="_imgAtlasIcon_1utnm_263",jT="_name1_1utnm_270",HT="_awayTeam_1utnm_282",WT="_matchCard_1utnm_293",KT={liveMinutes:gT,viewButtomEvent:yT,containerEvents:bT,sepEvents:ST,goalsContainer:wT,yellowContainer:_T,redContainer:kT,containerEventsGameHometeam:ET,containerEventsGameAwayteam:TT,image62Icon:CT,imgChivasIcon:xT,nameDesktop:vT,nameMobile:AT,homeTeam:LT,sbado16De:IT,gameDate:RT,sab16092023:BT,div:NT,divscore:DT,cst:PT,hour:OT,score:FT,chivasTvCanal:MT,gameStatus:$T,matchInfo:VT,image62Icon1:UT,name:zT,imgAtlasIcon:GT,name1:jT,awayTeam:HT,matchCard:WT},qT=["src"],YT=["src"],JT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),XT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),ZT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),QT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),eC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),tC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),sC=n.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),aC={key:0},nC=n.createElementVNode("div",null,"ver eventos",-1),iC=n.createElementVNode("img",{width:"13",style:{"margin-top":"1px"},src:"http://golstatsimages.blob.core.windows.net/todoelfut/arrow-live-down.png"},null,-1),oC=["src"],rC=["src"],lC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},cC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},dC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},hC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),uC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),mC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),fC={__name:"CardPreMatch",props:{game:{type:Object,default:()=>{}},playsLive:{type:Object,default:()=>{}},is_captured:{type:Number,default:1},infoLive:{type:Object,default:()=>{}}},emits:["open-modal-event"],setup(s,{emit:e}){const t=s,a=new Map([[1,45],[2,90],[3,105],[4,120]]),i=n.computed(()=>{const h=a.get(t.infoLive.recent_lapse);return h&&h<t.infoLive.minute?`${h}' + ${t.infoLive.minute-h}'`:`${t.infoLive.minute}'`}),o=n.computed(()=>{let h=0,u=0,f=!1;var p=!1;return Object.keys(t.infoLive).includes("score")&&(t.infoLive.score["own_"+t.game.home_team.team_id]!=null&&t.infoLive.score["own_"+t.game.home_team.team_id]!=0&&(p=!0),t.infoLive.score["own_"+t.game.visiting_team.team_id]!=null&&t.infoLive.score["own_"+t.game.visiting_team.team_id]!=0&&(f=!0),f?t.infoLive.score[t.game.home_team.team_id]!=null&&(h=parseInt(t.infoLive.score[t.game.home_team.team_id])+parseInt(t.infoLive.score["own_"+t.game.visiting_team.team_id])):t.infoLive.score[t.game.home_team.team_id]!=null&&(h=parseInt(t.infoLive.score[t.game.home_team.team_id])),p?t.infoLive.score[t.game.visiting_team.team_id]!=null&&(u=parseInt(t.infoLive.score[t.game.visiting_team.team_id])+parseInt(t.infoLive.score["own_"+t.game.home_team.team_id])):t.infoLive.score[t.game.visiting_team.team_id]!=null&&(u=parseInt(t.infoLive.score[t.game.visiting_team.team_id]))),h+" - "+u}),r=n.computed(()=>{const h={...t.game};return h.gameSchedule=t.game.schedule.split(":"),h.gameSchedule.pop(),h.gameSchedule=h.gameSchedule.join(":"),h});function l(h){let u=h.split(" "),f=u[u.length-2];return f.includes("+")?u[u.length-3]+"+"+u[u.length-1]:(f=u[u.length-1],f)}function d(h){e("open-modal-event",h)}function c(h,u){const f=new Date(h);if(u==1){const p=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],m=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${p[f.getDay()]} ${f.getDate()} de ${m[f.getMonth()]}`}else return`${f.getDate()}-${f.getMonth()+1}-${f.getFullYear()}`}return(h,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(h.$style.matchCard)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.homeTeam),id:"container-home-team"},[n.createElementVNode("img",{class:n.normalizeClass(h.$style.image62Icon),alt:"",src:n.unref(Bs)(r.value.home_team.team_id,150)},null,10,qT),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgChivasIcon),alt:"",src:n.unref(Bs)(r.value.home_team.team_id)},null,10,YT),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.nameDesktop),id:"team-name"},n.toDisplayString(r.value.home_team.colloquial_name),3),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.nameMobile),id:"team-name"},n.toDisplayString(r.value.home_team.acronym),3),r.value.game_status==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.value.is_live==0&&r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameHometeam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[JT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_goals_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),p!=r.value.minutes.home_goals_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0&&r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.yellowContainer)},[XT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_red_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.home_red_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0||r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.home_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(h.$style.redContainer)},[ZT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_yellow_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.home_yellow_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value.is_live==1&&r.value.game_status!=1||r.value.game_status==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameHometeam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[Object.keys(s.playsLive).length>0?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[s.playsLive[s.game.home_team.team_id]&&"goals"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[QT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].goals),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].goals).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.home_team.team_id]&&"red"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0&&Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.yellowContainer)},[eC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].red),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].red).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.home_team.team_id]&&"yellow"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0||Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.home_team.team_id].yellow).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.redContainer)},[tC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].yellow),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].yellow).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64))],2),r.value.game_status==4&&r.value.is_live==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.matchInfo),id:"container-match-info"},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.sbado16De)},n.toDisplayString(c(r.value.date_time_utc,1)),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.sab16092023)},n.toDisplayString(c(r.value.date_time_utc,0)),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.hour)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.div)},n.toDisplayString(r.value.gameSchedule),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.cst)},"CST",2)],2),n.createElementVNode("div",{class:n.normalizeClass(h.$style.chivasTvCanal)},n.toDisplayString(r.value.tv_stations.join(", ")),3)],2)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.matchInfo),id:"container-match-info"},[r.value.is_live?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(c(r.value.date_time_utc,1)),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("div",{class:n.normalizeClass([h.$style.sbado16De,h.$style.gameDate])},n.toDisplayString(c(r.value.date_time_utc,1)),3),n.createElementVNode("div",{class:n.normalizeClass([h.$style.sab16092023,h.$style.gameDate])},n.toDisplayString(c(r.value.date_time_utc,0)),3)],64)),r.value.is_live||r.value.game_status!=1&&r.value.game_status!=4?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.score)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.divscore)},n.toDisplayString(o.value),3)],2)):(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.score)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.divscore)},n.toDisplayString(r.value.score.join(" - ")),3)],2)),n.createElementVNode("div",{class:n.normalizeClass(h.$style.gameStatus)},[r.value.is_live?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.liveMinutes)},[sC,n.createTextVNode(" LIVE - "+n.toDisplayString(i.value)+"' ",1)],2)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(" Finalizado "),r.value.penalties_score_home_team!=0||r.value.penalties_score_visiting_team!=0?(n.openBlock(),n.createElementBlock("span",aC," - Penales "+n.toDisplayString(r.value.penalties_score_home_team)+" - "+n.toDisplayString(r.value.penalties_score_visiting_team),1)):n.createCommentVNode("",!0)],64))],2),s.is_captured==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:4},[r.value.is_live==1||r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.viewButtomEvent),onClick:u[0]||(u[0]=f=>d(r.value))},[nC,n.createTextVNode("  "),iC],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)),n.createElementVNode("div",{class:n.normalizeClass(h.$style.awayTeam),id:"container-away-team"},[n.createElementVNode("img",{class:n.normalizeClass(h.$style.image62Icon1),alt:"",src:n.unref(Bs)(r.value.visiting_team.team_id,150)},null,10,oC),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.name),id:"team-name"},n.toDisplayString(r.value.visiting_team.colloquial_name),3),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgAtlasIcon),alt:"",src:n.unref(Bs)(r.value.visiting_team.team_id)},null,10,rC),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.name1),id:"team-name"},n.toDisplayString(r.value.visiting_team.acronym),3),r.value.game_status==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.value.is_live==0&&r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameAwayteam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("img",lC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.visiting_goals_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),p!=r.value.minutes.visiting_goals_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0&&r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.yellowContainer)},[r.value.minutes.away_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("img",cC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_red_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.away_red_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0||r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.away_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(h.$style.redContainer)},[r.value.minutes.away_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("img",dC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_yellow_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f))+"'",1),p!=r.value.minutes.away_yellow_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value.is_live==1&&r.value.game_status!=1||r.value.game_status==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameAwayteam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[Object.keys(s.playsLive).length>0?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[s.playsLive[s.game.visiting_team.team_id]&&"goals"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[hC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].goals),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.visiting_team.team_id]&&"red"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0&&Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.yellowContainer)},[uC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].red),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.visiting_team.team_id]&&"yellow"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0||Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.redContainer)},[mC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64))],2)],2))}},pC={$style:KT},gC=Lt(fC,[["__cssModules",pC]]),yC={class:"calendar-by-game__carousel"},bC="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",SC={__name:"GSC-CalendarByGame",props:{showVideos:{type:Number,default:0},playsLive:{type:Object,default:()=>{}},infoLive:{type:Object,default:()=>{}},height:{type:String,default:"fit-content"},width:{type:String,default:"100%"},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},isRoundPickerVisible:{type:Boolean,default:!0},isPaginationVisible:{type:Boolean,default:!0},awaitForSeasons:{type:Boolean,default:!1},seasons:{type:Array,default:()=>[]},isCup:{type:Boolean,default:!1},isCupLegacy:{type:Boolean,default:!1},token:{type:String,default:""},pagesWithGames:{type:Array,default:()=>[]},maxGamesToShow:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},areRoundsVisible:{type:Boolean,default:!0},is_captured:{type:Number,default:1},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},games:{type:Array,default:()=>null},teamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},avoidTeamIdFilter:{type:Boolean,default:!1},areGamesCarouselType:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},userTeamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},sortCalendar:{type:Boolean,default:!0},isTeamGamePerPage:{type:Boolean,default:!1},onlyGamesTeamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},tournamentType:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2},gamesEventsIntervalMinutes:{type:Number,default:2},checkStartedLiveGamesMinutes:{type:Number,default:5}},emits:["tournament-selected","change-teams","change-round","change-game-carousel","action","change-games-by-client-privileges","open-modal-event"],setup(s,{emit:e}){const t=s;let a=null,i=null,o=null;const r=n.ref([]),l=n.ref({}),d=n.ref(0),c=n.ref(null),h=n.ref({}),u=n.ref(new Map),f=n.ref(!1),p=n.ref(null),m=n.ref(null),g=n.ref(null),y=n.ref([]),b=n.ref(new Map),S=n.ref(new Set),_=n.computed(()=>t.isCup),C=n.computed(()=>t.isCupLegacy),E=n.computed(()=>({height:t.height,width:t.width})),v=n.computed(()=>{if(t.games)return Ee(t.games,t.isTeamGamePerPage);{const M=u.value.get(h.value.key);return M&&t.isTeamGamePerPage&&t.onlyGamesTeamId?[M[0].filter(W=>W.home_team.team_id===t.onlyGamesTeamId||W.visiting_team.team_id===t.onlyGamesTeamId)]:M||[]}}),T=n.computed(()=>t.areGamesCarouselType?v.value[0]:v.value),B=n.ref([]),L=n.ref([]),R=n.computed(()=>{const M=L.value&&L.value.length?z(l.value):K(l.value),W=B.value.find(H=>H.key===M);return W&&f.value&&($(!1),et(W)),M});n.watch(()=>t.seasons,M=>{M&&M.length&&($(!0),r.value=M.map(W=>W.id),ie(M,!0))},{immediate:!0,deep:!0}),n.watch(u,M=>{if(t.onlyGamesTeamId&&M.size){const W=Array.from(M.values()).reduce((H,G)=>(G.forEach(X=>{const Y=X.find(ke=>ke.home_team.team_id===t.onlyGamesTeamId||ke.visiting_team.team_id===t.onlyGamesTeamId);Y&&H.push(Y)}),H),[]);e("change-games-by-client-privileges",W)}},{immediate:!0});function $(M){f.value=M}function K(M){const W=Object.entries(Object.entries(M).reduce((X,[Y,ke])=>(X[Y]=[],ke.forEach(Pe=>{Pe.games.forEach(ct=>{const Mt=new Date(ct.date_time_utc).getTime()+66e5;X[Y].push(Mt)})}),X),{}));if(!W.length)return"1";const H=new Date().getTime(),G=W.reduce((X,[Y,ke])=>{let Pe=null;return ke.forEach(ct=>{const Mt=ct-H;Mt>=0&&(Pe===null||Mt<Pe)&&(Pe=Mt)}),Pe&&(X.shortestTime===null||Pe<X.shortestTime)&&(X.round=Y,X.shortestTime=Pe),X},{round:"",shortestTime:null});return G.shortestTime!==null?G.round:W[W.length-1][0]}function z(M){let W=1;if(L.value.length){const H=L.value[0];for(const[G,X]of Object.entries(M))for(const Y of X)if(Y.games.find(ke=>ke.game_id===H.game_id))return G}return W}n.watch(()=>t.teamId,()=>{se()},{immediate:!0});async function ae(M,W,H=""){let G=H;try{const X={};t.token&&(X.Authorization=t.token),G||(G="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",M.forEach((Pe,ct)=>{G+=`${ct===0?"":"&"}seasons=${Pe}`}));const{data:{data:Y,teams:ke}}=await ln.get(G,{headers:X});return{seasonsAndGames:Y,seasonsAndTeams:ke}}catch(X){if(W>0)return ae(M,W-1,G);throw new Error(X)}}function oe(M){for(const W of M)if(!r.value.includes(W.season_id))return!0;return!1}async function ie(M,W){try{l.value={};let H=0;const{seasonsAndGames:G,seasonsAndTeams:X}=await ae(M.map(ke=>ke.id),3);if(W&&oe(G))return;G.forEach(ke=>{const{type:Pe}=M.find(ct=>ct.id===ke.season_id);ke.type=Pe,ke.games.forEach(ct=>{ct.season_id=ke.season_id}),Pe===0&&(H=ke.season_id)}),p.value={seasonsGames:G};const{teams:Y}=X.find(ke=>ke.season_id===H);m.value=Y,e("change-teams",Y),se(),S.value.size?Q():await ce()}catch(H){throw new Error(H)}}async function ce(){try{const M=await Ce(),W=new Set;if(y.value=M.data.reduce((H,G)=>(G.games.forEach(X=>{W.add(X.game_id),H.push(X)}),H),[]),y.value.length){i||await de();const H=[];S.value.forEach(G=>{const X=b.value.get(G);X&&new Date().valueOf()>X.dateTimeMillis&&H.push(G)}),H.length&&H.every(G=>b.value.get(G).isLiveTracked)&&J()}}catch(M){throw new Error(M)}}async function de(){try{const M=[];for(const H of y.value){const G=b.value.get(H.game_id);G&&(G.is_live=1,G.game_status=4),G.isLiveTracked=!0,M.push(ge(H.game_id))}const W=await Promise.all(M);for(const H of W){const G=b.value.get(H.game_id);G&&ue(G,H.plays)}i||he()}catch(M){throw new Error(M)}}function Q(){S.value.size&&S.value.forEach(M=>{const W=b.value.get(M);if(W){const H=new Date().valueOf();if(60*1e3*30+W.dateTimeMillis-H>0){const G=W.dateTimeMillis-H-3e5;setTimeout(()=>{q()},G>0?G:0)}}})}function q(){J(),o||(o=setInterval(()=>{ce()},t.checkLiveGamesIntervalMinutes*60*1e3))}function he(){Z(),i=setInterval(()=>{de()},t.gamesEventsIntervalMinutes*60*1e3)}function J(){clearInterval(o),o=null}function Z(){clearInterval(i),i=null}function ue(M,W){for(const H of W)if(H.category_id===0&&H.game_status_id===13){const G=b.value.get(H.game_id);y.value=y.value.filter(X=>X.game_id!==M.game_id),G.is_live=0,G.game_status=0}}async function ge(M){try{return(await ln.get(`${bC}${M}`,{headers:{Authorization:`${t.token}`}})).data}catch(W){throw new Error(W)}}async function Ce(){try{if(t.seasons.length===0)return[];const M=t.seasons.reduce((G,X)=>`${G}seasons=${X.id}&`,""),W=ln.create({headers:{Authorization:`${t.token}`}}),{data:H}=await W.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${M}`);return H}catch(M){throw new Error(M)}}function se(){if(J(),!m.value)return;b.value.clear(),S.value.clear(),L.value=[];const M=p.value&&p.value.seasonsGames?p.value.seasonsGames.map(W=>{const H=W.games.reduce((G,X)=>{if(t.onlyGamesTeamId&&t.onlyGamesTeamId!==X.home_team&&t.onlyGamesTeamId!==X.visiting_team)return G;const Y={...X},ke=new Date,[Pe,ct,Mt]=Y.date.split("-"),[wi,_i,wO]=Y.schedule.split(":"),ki=new Date(Number(Pe),Number(ct)-1,Number(Mt),Number(wi),Number(_i),Number(wO));return Y.dateTimeMillis=ki.valueOf(),Y.home_team=m.value.find(Kl=>Kl.team_id===X.home_team),Y.visiting_team=m.value.find(Kl=>Kl.team_id===X.visiting_team),Y.game_status===4&&ke.getFullYear()===ki.getFullYear()&&ke.getMonth()===ki.getMonth()&&ke.getDate()===ki.getDate()&&S.value.add(Y.game_id),b.value.set(Y.game_id,Y),t.teamId&&Y.home_team.team_id!==t.teamId&&Y.visiting_team.team_id!==t.teamId||(G[X.matchday_abbreviation]?G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date]?G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date].push(Y):G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date]=[Y]:G[X.matchday_abbreviation]={[X.game_status===3?"canceled":X.date]:[Y]},t.userTeamId&&Y.game_status===4&&(Y.home_team.team_id===t.userTeamId||Y.visiting_team.team_id===t.userTeamId)&&L.value.push(Y)),G},{});for(let[G,X]of Object.entries(H))H[G]=Object.entries(X).map(([Y,ke])=>({date:Y,games:ke.sort((Pe,ct)=>Pe.dateTimeMillis-ct.dateTimeMillis)})),H[G].sort((Y,ke)=>Y.date<ke.date?-1:Y.date>ke.date?1:0);return{type:W.type,weight:W.type===0?0:W.type===2?1:2,schedule:H}}):[];M.sort((W,H)=>W.weight-H.weight),l.value=M.reduce((W,H)=>{for(const[G,X]of Object.entries(H.schedule))if(H.type===0)if([1,2].includes(t.tournamentType)){const Y=Nk.get(t.tournamentType);if(Y){const ke=Y.get(G);ke&&(W[ke.matchDayAbbreviation]=X)}}else if(_.value){const Y=G.replace("M",""),ke=Y;C.value?W[Bk[Y]||ke]=X:W[Rk[G]||ke]=X}else W[Number(G.replace("M","")).toString()]=X;else H.type===2?G.charAt(1)=="I"?W[`PI${Number(G.replace("PI",""))}`]=X:W[`R${Number(G.replace("PO",""))}`]=X:H.type===1&&(W[Ik[G]]=X);return W},{}),u.value=new Map,B.value=Array.from(Object.entries(l.value).reduce((W,[H,G],X)=>{const Y=Number(H);let ke="";Number.isNaN(Y)?ke=H:ke=Y<10?`0${Y}`:H,W.set(H,{key:H,value:Y,valueText:ke,index:X});const Pe=G.reduce((Mt,wi)=>(wi.games.forEach(_i=>{_i.game_id===t.defaultGameId&&(g.value=H),_i.roundAbbreviation=Number.isNaN(Y)?Y:`J ${Y}`}),Mt=Mt.concat(wi.games),Mt),[]),ct=Ee(Pe);return u.value.set(H,ct),W},new Map).values())}function Ee(M,W=!1){const H=[];if(t.gamesPerMatchDay>0){let G=[];M.forEach((X,Y)=>{G.push(X),(Y+1)%t.gamesPerMatchDay===0&&(H.push([...G]),G=[])}),G.length&&H.push([...G])}else H.push(M);return W&&t.isTeamGamePerPage&&t.defaultGameId?H.filter(G=>G.game_id===t.defaultGameId||G.gameId===t.defaultGameId):H}async function Te(M){try{const{data:W}=await ln.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return W}catch(W){if(M>0)return Te(M-1);throw new Error(W)}}function Fe(){if(window.ResizeObserver)a=new ResizeObserver(()=>{d.value=c.value.clientWidth}),a.observe(c.value);else throw new Error("Resize observer not supported!")}function et(M){h.value.value!==M.value&&(h.value=M,e("change-round",M))}function it(M){t.areGamesCarouselType&&e("change-game-carousel",M.selectedItem)}function ot(M){e("action",M),j(M)}function x(M){e("open-modal-event",M)}function j(M){const W="PLAY_RESUME",H="PLAY_GOALS",G=[607,608,12,55,54,35,14,52,15,53,466,477],X=[12,55,"35_r","54_r"],{game_id:Y,season_id:ke}=M.game;let Pe={seasonId:ke,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[Y],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};M.action===W?(Pe.categoryIds=G,Pe.advancedFilter.playListTitle="Resumen",e("openmedia",Pe)):M.action===H&&(Pe.categoryIds=X,Pe.advancedFilter.playListTitle="Goles",e("openmedia",Pe))}async function U(){try{if(!t.awaitForSeasons&&!t.games){const M=(await Te(3)).find(G=>G._id===1),W=M.seasons[0],H=[{id:W.id,type:W.type}];M&&M.tournament&&e("tournament-selected",M.tournament),W.related_seasons&&W.related_seasons.length&&H.push(...W.related_seasons.map(G=>({id:G.id,type:G.type}))),await ie(H,!1)}}catch(M){throw new Error(M)}}return n.onMounted(()=>{Fe()}),U(),(M,W)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"calendarByGame",ref:c,class:"calendar-by-game",style:n.normalizeStyle(E.value)},[s.teamId&&!s.avoidTeamIdFilter?(n.openBlock(),n.createBlock(pT,{key:0,"full-tournament-schedule":l.value,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":!1,"row-height":s.rowHeight,"component-width":d.value,"games-pages":u.value,"is-pagination-visible":s.isPaginationVisible,"is-round-mode":s.isRoundMode,onAction:ot},null,8,["full-tournament-schedule","team-id","show-videos","row-height","component-width","games-pages","is-pagination-visible","is-round-mode"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[s.areRoundsVisible&&B.value?(n.openBlock(),n.createBlock(Yk,{key:0,"match-days":B.value,"is-landing-mode":s.isLandingMode,height:"48px","items-to-show":s.itemsToShow,"items-to-scroll":s.itemsToScroll,"component-width":d.value,"default-match-day-key":g.value,"closest-match-day":s.sortCalendar?R.value:"",onChangeMatchDay:et},null,8,["match-days","is-landing-mode","items-to-show","items-to-scroll","component-width","default-match-day-key","closest-match-day"])):n.createCommentVNode("",!0),n.createElementVNode("div",yC,[v.value?(n.openBlock(),n.createBlock(n.unref(Lh),{key:0,"is-pagination-visible":s.isPaginationVisible&&!s.areGamesCarouselType,items:T.value,"are-navigation-arrows-visible":s.areGamesCarouselType?!s.areGamesCarouselType:s.isPaginationVisible,"wrap-around":s.areGamesCarouselType&&!s.isTeamGamePerPage,"items-to-show":s.areGamesCarouselType&&!s.isTeamGamePerPage?1.2:1,"is-main-slide-priority":s.areGamesCarouselType,"are-slides-arrows-visible":s.areGamesCarouselType&&!s.isTeamGamePerPage,"slides-arrows-left-and-right":s.areGamesCarouselType?"30px":"0px","default-item-by-prop":s.areGamesCarouselType?{propName:"game_id",value:s.defaultGameId}:{},onInput:it},{default:n.withCtx(({item:H})=>[s.areGamesCarouselType?(n.openBlock(),n.createBlock(gC,{key:0,is_captured:s.is_captured,game:H,onOpenModalEvent:x,"plays-live":s.playsLive,"info-live":s.infoLive},null,8,["is_captured","game","plays-live","info-live"])):(n.openBlock(),n.createBlock(dT,{key:1,"team-id":s.teamId,"show-videos":s.showVideos,"games-per-page":H,"is-landing-mode":s.isLandingMode,"row-height":s.rowHeight,"component-width":d.value,"is-round-mode":s.isRoundMode,onAction:ot},null,8,["team-id","show-videos","games-per-page","is-landing-mode","row-height","component-width","is-round-mode"]))]),_:1},8,["is-pagination-visible","items","are-navigation-arrows-visible","wrap-around","items-to-show","is-main-slide-priority","are-slides-arrows-visible","slides-arrows-left-and-right","default-item-by-prop"])):n.createCommentVNode("",!0)])],64))],4))}},wC=Lt(SC,[["__scopeId","data-v-3c66b88d"]]),_C=["Mi posición","Tabla General","Fases","Play Off"],kC={components:{GscSwitchComponent:go,GSCGeneraltable:a_,GSCCalendarByGame:wC},props:{privileges:{type:Object,default:()=>{}},isPublic:{type:Boolean,default:!0},season:{type:Object,default:()=>{}},onlyTable:{type:Boolean,default:!0},seasons:{type:Array,default:()=>[]},tournamentType:{type:Number,default:0},tournament:{type:Number,default:1},teamId:{type:Number,default:0},componentWidth:{type:Number,default:768},tournaments:{type:Array,default:()=>[]}},data(){return{selectedOpt:"Mi posición",tokenFree:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},computed:{tableTitle(){return this.tournamentType!==0?this.tournamentType===1?"Fases":"Play Off":(this.selectedOpt!=="Calendario"&&this.changeCategory(this.teamId!=0?"Mi posición":"Tabla General"),this.teamId!==0?"Mi posición":"Tabla General")},isGeneralTableVisible(){return _C.includes(this.selectedOpt)}},watch:{tableTitle:{handler(s){this.selectedOpt=s},immediate:!0}},methods:{onAction(s){this.$emit("action",s)},changeCategory(s){this.selectedOpt=s},onOpenMedia(s){this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)}},mounted(){this.selectedOpt=this.teamId!==0?"Mi posición":"Tabla General"}},EC={key:0,class:"gsc-switch-container"},TC={key:1,class:"gsc-switch-container"},CC={class:"gsc-app-component"},xC={key:0};function vC(s,e,t,a,i,o){const r=n.resolveComponent("GscSwitchComponent"),l=n.resolveComponent("GSCGeneraltable"),d=n.resolveComponent("GSCCalendarByGame");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(t.componentWidth>1e3?"gsc-calendar-table":"gsc-calendar-table-movil")},[t.onlyTable?(n.openBlock(),n.createElementBlock("div",TC,"Mi posicion")):(n.openBlock(),n.createElementBlock("div",EC,[n.createVNode(r,{type:0,arrow:!1,"font-family":"Poppins-Light",buttons:[o.tableTitle,"Calendario"],height:"40px","selected-option":i.selectedOpt,"font-size":t.componentWidth>=768?"16px":"14px",width:"355px",onInput:o.changeCategory},null,8,["buttons","selected-option","font-size","onInput"])])),n.createElementVNode("div",CC,[o.isGeneralTableVisible?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(l,{isPaginationVisible:!0,"current-season-id":t.season.id,"team-default-select":t.teamId,"team-id":t.teamId,type:1,"show-videos":t.isPublic?t.privileges.vr_privileges!=0:!0,tournament:t.tournament,"type-view":t.tournamentType,"await-for-season":"","await-for-tournaments":"","external-tournaments":t.tournaments,onOpenmedia:o.onOpenMedia,onOpenTableProfile:o.onOpenProfile},null,8,["current-season-id","team-default-select","team-id","show-videos","tournament","type-view","external-tournaments","onOpenmedia","onOpenTableProfile"]),n.createElementVNode("div",{onClick:e[0]||(e[0]=c=>s.$router.push({name:"table"})),class:"gsc-app-component-view-all"}," Ver todo ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.onlyTable?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",xC,[n.createVNode(d,{width:"100%",token:i.tokenFree,seasons:t.seasons,"tournament-type":t.tournamentType,"show-videos":t.isPublic,"row-height":"90px","is-landing-mode":!0,"is-pagination-visible":!0,isRoundPickerVisible:!0,"await-for-seasons":"","items-to-show":9,"items-to-scroll":5,"max-games-to-show":5,"games-per-match-day":5,onOpenmedia:o.onOpenMedia,onAction:o.onAction},null,8,["token","seasons","tournament-type","show-videos","onOpenmedia","onAction"]),n.createElementVNode("div",{onClick:e[1]||(e[1]=c=>this.$router.push({name:"calendar"})),class:"gsc-app-component-view-all"}," Ver todo ")]))],64))])],2)}const AC=qe(kC,[["render",vC],["__scopeId","data-v-3d4de135"]]),Fh=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],Mh=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],$h=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],LC={class:"match"},IC={class:"match__header"},RC={key:0,class:"match__final-tag"},BC={key:1,class:"match__final-tag__no-border"},NC={class:"match__header__match-date"},DC={class:"match__tag"},PC={class:"match__body"},OC={class:"match__data"},FC={class:"match__acronym"},MC=["src"],$C={class:"match__score"},VC=["src"],UC={class:"match__acronym"},zC={class:"match__status"},dn=qe({__name:"PreviousMatch",props:{visitTeam:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},homeTeam:{type:Object,default:()=>{}},score:{type:String,default:"2 - 1"},journey:{type:[String,Number],default:2},penalScore:{type:String,default:""},infoType:{type:String,default:"postmatch"}},setup(s){const e=s,t=n.computed(()=>{const a=new Date(e.data.date_time_utc);return`${Fh[a.getDay()]}, ${a.getDate()} de ${Mh[a.getMonth()]}`});return(a,i)=>{var o,r,l;return n.openBlock(),n.createElementBlock("section",LC,[n.createElementVNode("div",IC,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock("div",RC,"FINAL")):(n.openBlock(),n.createElementBlock("div",BC)),n.createElementVNode("div",NC,n.toDisplayString(t.value),1),n.createElementVNode("div",DC,n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`),1)]),n.createElementVNode("div",PC,[n.createElementVNode("div",OC,[n.createElementVNode("div",FC,n.toDisplayString((o=s.data)==null?void 0:o.home_team_acronym),1),n.createElementVNode("img",{class:"match__img",src:"https://az755631.vo.msecnd.net/teams-80/"+s.data.home_team+".png",alt:"team-img"},null,8,MC),n.createElementVNode("div",$C,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(s.data.score[0])+" - "+n.toDisplayString(s.data.score[1]),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString((r=s.data)==null?void 0:r.schedule.replace(":00","")),1)],64))]),n.createElementVNode("img",{class:"match__img",src:"https://az755631.vo.msecnd.net/teams-80/"+s.data.visiting_team+".png",alt:"team-img"},null,8,VC),n.createElementVNode("div",UC,n.toDisplayString((l=s.data)==null?void 0:l.visiting_team_acronym),1)]),n.createElementVNode("div",zC,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Finalizado"+n.toDisplayString(s.penalScore?` - Penales ${s.penalScore}`:""),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("CST")],64))])]),n.createElementVNode("div",{class:"match__button",onClick:i[0]||(i[0]=d=>a.$emit("clickMatch"))},"Analizar partido →")])}}},[["__scopeId","data-v-a55efbe4"]]),Vh=s=>(n.pushScopeId("data-v-ae6e5950"),s=s(),n.popScopeId(),s),GC=["src"],jC=["src"],HC={class:"coming-match__body"},WC={class:"coming-match__data"},KC=["src"],qC={key:0,class:"coming-match__live"},YC={class:"coming-match__live__score"},JC={class:"coming-match__live__time"},XC=Vh(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ZC=Vh(()=>n.createElementVNode("div",{class:"coming-match__live__time__text"},"LIVE",-1)),QC={class:"coming-match__live__time__time"},ex={key:1,style:{"margin-top":"16px"}},tx={class:"coming-match__time"},sx={class:"coming-match__cst"},ax={key:0},nx=["src"],Ns=qe({__name:"ComingMatch",props:{small:{type:Boolean,default:!1},visitTeam:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},homeTeam:{type:Object,default:()=>{}},date:{type:String,default:"Jueves 7 de Abril"},time:{type:String,default:"5: 00"}},setup(s){const e=s,t=n.computed(()=>{const i=new Date(e.data.date_time_utc);return`${Fh[i.getDay()]}, ${i.getDate()} de ${e.small?$h[i.getMonth()]:Mh[i.getMonth()]}`}),a=n.computed(()=>e.data.is_live||e.data.game_status===0);return(i,o)=>{var r,l,d,c,h,u,f,p,m,g,y,b,S,_,C;return n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["coming-match",{small:s.small}])},[n.createElementVNode("img",{class:n.normalizeClass(["coming-match__bg",{small:s.small}]),src:typeof s.data.home_team=="object"?"https://az755631.vo.msecnd.net/teams-150/"+((r=s.data)==null?void 0:r.home_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-150/"+((l=s.data)==null?void 0:l.home_team)+".png",alt:"team-img"},null,10,GC),n.createElementVNode("img",{class:n.normalizeClass(["coming-match__bg",{small:s.small}]),src:typeof s.data.visiting_team=="object"?"https://az755631.vo.msecnd.net/teams-150/"+((d=s.data)==null?void 0:d.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-150/"+((c=s.data)==null?void 0:c.visiting_team)+".png",alt:"team-img"},null,10,jC),n.createElementVNode("div",HC,[a.value?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["coming-match__date",{small:s.small}])},n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`)+" | "+n.toDisplayString(t.value),3)),n.createElementVNode("div",WC,[n.createElementVNode("div",{class:n.normalizeClass(["coming-match__team",{small:s.small}])},[n.createElementVNode("img",{class:n.normalizeClass(["coming-match__img",{small:s.small}]),src:typeof s.data.home_team=="object"?"https://az755631.vo.msecnd.net/teams-80/"+((h=s.data)==null?void 0:h.home_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((u=s.data)==null?void 0:u.home_team)+".png",alt:"team-img"},null,10,KC),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__acronym",{small:s.small}])},n.toDisplayString((f=s.data)==null?void 0:f.home_team_name),3)],2),a.value?(n.openBlock(),n.createElementBlock("div",qC,[n.createElementVNode("div",YC,n.toDisplayString((p=s.data)==null?void 0:p.score[0])+" - "+n.toDisplayString((m=s.data)==null?void 0:m.score[1]),1),n.createElementVNode("div",JC,[XC,ZC,n.createElementVNode("div",QC,n.toDisplayString(s.data.currentTimeLive||"0'"),1)])])):(n.openBlock(),n.createElementBlock("div",ex,[n.createElementVNode("div",tx,[s.data.game_status!==4?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((g=s.data)==null?void 0:g.score[0])+" - "+n.toDisplayString((y=s.data)==null?void 0:y.score[1]),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString((b=s.data)==null?void 0:b.schedule.replace(":00","")),1)],64))]),n.createElementVNode("div",sx,[s.data.game_status===4?(n.openBlock(),n.createElementBlock("span",ax,"CST")):n.createCommentVNode("",!0)])])),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__team away",{small:s.small}])},[n.createElementVNode("div",{class:n.normalizeClass(["coming-match__acronym",{small:s.small}])},n.toDisplayString((S=s.data)==null?void 0:S.visiting_team_name),3),n.createElementVNode("img",{class:n.normalizeClass(["coming-match__img",{small:s.small}]),src:typeof s.data.visiting_team=="object"?"https://az755631.vo.msecnd.net/teams-80/"+((_=s.data)==null?void 0:_.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((C=s.data)==null?void 0:C.visiting_team)+".png",alt:"team-img"},null,10,nx)],2)])]),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__button",{small:s.small}]),onClick:o[0]||(o[0]=E=>i.$emit("clickMatch"))},[s.data.game_status===4&&!s.data.is_live?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Analizar previa →")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Analizar partido →")],64))],2)],2)}}},[["__scopeId","data-v-ae6e5950"]]),hn=s=>(n.pushScopeId("data-v-237e905b"),s=s(),n.popScopeId(),s),ix={class:"game-item__header"},ox={class:"game-item__header__info text-type-1"},rx={key:0,class:"game-item__header__info__live"},lx=hn(()=>n.createElementVNode("div",{class:"game-item__header__info__live__status text-type-2"},[n.createElementVNode("div",{class:"bullet"}),n.createElementVNode("span",null,"LIVE")],-1)),cx={class:"text-type-1"},dx={key:1,class:"game-item__header__info__pre-match text-type-2"},hx=hn(()=>n.createElementVNode("span",{class:"game-item__header__info__pre-match text-type-1"},[n.createTextVNode(" "),n.createElementVNode("small",null,"CST")],-1)),ux={key:2,class:"game-item__header__info__post-match"},mx=[hn(()=>n.createElementVNode("span",{class:"text-type-2"},"Finalizado",-1))],fx={class:"game-item__body"},px={class:"game-item__body__team__info"},gx=["src"],yx={class:"game-item__body__team__info__acronym"},bx={class:"game-item__body__team__score"},Sx=[hn(()=>n.createElementVNode("div",null,"Analizar partido →",-1))],wx=qe({__name:"GameItem",props:{game:{type:Object,default:()=>{}}},emits:["clickMatch"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{let l="";const d=Number(t.game.roundAbbreviationV2);if(l=Number.isNaN(d)?t.game.roundAbbreviationV2:`JOR ${d}`,t.game.game_status===4){const c=new Date(t.game.date_time_utc);l+=` • ${c.getDate()} ${$h[c.getMonth()]}`}return l}),i=n.computed(()=>t.game.schedule.replace(":00","")),o=n.computed(()=>[{id:t.game.home_team.team_id,teamLogo:t.game.home_team.logo,acronym:t.game.home_team.acronym,score:t.game.score[0]},{id:t.game.visiting_team.team_id,teamLogo:t.game.visiting_team.logo,acronym:t.game.visiting_team.acronym,score:t.game.score[1]}]);function r(){e("clickMatch")}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["game-item",{"is-live":s.game.is_live}])},[n.createElementVNode("div",ix,[n.createElementVNode("div",ox,n.toDisplayString(a.value),1),s.game.is_live?(n.openBlock(),n.createElementBlock("div",rx,[lx,n.createElementVNode("div",cx,n.toDisplayString(s.game.currentTimeLive||"0'"),1)])):s.game.game_status===4?(n.openBlock(),n.createElementBlock("div",dx,[n.createTextVNode(n.toDisplayString(i.value)+" ",1),hx])):(n.openBlock(),n.createElementBlock("div",ux,mx))]),n.createElementVNode("div",fx,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,c=>(n.openBlock(),n.createElementBlock("div",{key:c.id,class:"game-item__body__team"},[n.createElementVNode("div",px,[n.createElementVNode("img",{src:c.teamLogo,alt:"team-logo"},null,8,gx),n.createElementVNode("div",yx,n.toDisplayString(c.acronym),1)]),n.createElementVNode("div",bx,[n.withDirectives(n.createElementVNode("div",{class:"game-item__body__team__score__value"},n.toDisplayString(c.score||0),513),[[n.vShow,s.game.is_live||s.game.game_status!==4]])])]))),128))]),n.createElementVNode("div",{class:"game-item__footer",onClick:r},Sx)],2))}},[["__scopeId","data-v-237e905b"]]),_x=qe({__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref(null);n.watch(()=>t.modelValue,()=>{i()},{immediate:!0});function i(){a.value&&(a.value.checked=t.modelValue)}function o(r){e("update:modelValue",r.target.checked)}return n.onMounted(()=>{i()}),(r,l)=>(n.openBlock(),n.createElementBlock("input",{ref_key:"switchCustom",ref:a,id:"toggle",className:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:o},null,544))}},[["__scopeId","data-v-3571f7e0"]]);/**
28
+ */const je={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Ih={itemsToShow:{default:je.itemsToShow,type:Number},itemsToScroll:{default:je.itemsToScroll,type:Number},wrapAround:{default:je.wrapAround,type:Boolean},throttle:{default:je.throttle,type:Number},snapAlign:{default:je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:je.transition,type:Number},breakpoints:{default:je.breakpoints,type:Object},autoplay:{default:je.autoplay,type:Number},pauseAutoplayOnHover:{default:je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:je.mouseDrag,type:Boolean},touchDrag:{default:je.touchDrag,type:Boolean},dir:{default:je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:je.i18n,type:Object},settings:{default(){return{}},type:Object}};function Dk({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:a,itemsToShow:i=1}=s;if(a)return Math.max(e-1,0);let o;switch(t){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function Pk({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:a,itemsToShow:i=1}=s;let o=0;if(t||i>e)return o;switch(a){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function Oo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function Ok({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:o=1}=s;let r=e;switch(a){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:Oo({val:r,max:t-o,min:0})}function Rh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...Rh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Fo({val:s,max:e,min:t=0}){return s>e?Fo({val:s-(e+1),max:e,min:t}):s<t?Fo({val:s+(e+1),max:e,min:t}):s}function Fk(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function Mk(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function $k(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Vk=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},je))),e=n.inject("currentSlide",n.ref(0)),t=n.inject("slidesCount",n.ref(0));return()=>n.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},$k(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Uk=n.defineComponent({name:"Carousel",props:Ih,setup(s,{slots:e,emit:t,expose:a}){var i;const o=n.ref(null),r=n.ref([]),l=n.ref(0),d=n.ref(0),c=n.reactive(Object.assign({},je));let h=Object.assign({},je),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=n.ref(0),m=n.ref(0),g=n.ref(0),y=n.ref(0);let b,S;n.provide("config",c),n.provide("slidesCount",d),n.provide("currentSlide",f),n.provide("maxSlide",g),n.provide("minSlide",y),n.provide("slideWidth",l);function _(){u=Object.assign({},s.breakpoints),h=Object.assign(Object.assign(Object.assign({},h),s),{i18n:Object.assign(Object.assign({},h.i18n),s.i18n),breakpoints:void 0}),E(h)}function C(){if(!u||!Object.keys(u).length)return;const x=Object.keys(u).map(U=>Number(U)).sort((U,M)=>+M-+U);let j=Object.assign({},h);x.some(U=>{const M=window.matchMedia(`(min-width: ${U}px)`).matches;return M&&(j=Object.assign(Object.assign({},j),u[U])),M}),E(j)}function E(x){Object.entries(x).forEach(([j,U])=>c[j]=U)}const v=Mk(()=>{C(),B(),T()},16);function T(){if(!o.value)return;const x=o.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function B(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),g.value=Dk({config:c,slidesCount:d.value}),y.value=Pk({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Oo({val:f.value,max:g.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),q(),window.addEventListener("resize",v,{passive:!0}),t("init")}),n.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",v,{passive:!0})});let L=!1;const R={x:0,y:0},$={x:0,y:0},K=n.reactive({x:0,y:0}),z=n.ref(!1),ae=n.ref(!1),oe=()=>{z.value=!0},ie=()=>{z.value=!1};function ce(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(L=x.type==="touchstart",L||x.preventDefault(),!(!L&&x.button!==0||J.value)&&(R.x=L?x.touches[0].clientX:x.clientX,R.y=L?x.touches[0].clientY:x.clientY,document.addEventListener(L?"touchmove":"mousemove",de,!0),document.addEventListener(L?"touchend":"mouseup",Q,!0)))}const de=Fk(x=>{ae.value=!0,$.x=L?x.touches[0].clientX:x.clientX,$.y=L?x.touches[0].clientY:x.clientY;const j=$.x-R.x,U=$.y-R.y;K.y=U,K.x=j},c.throttle);function Q(){const x=c.dir==="rtl"?-1:1,j=Math.sign(K.x)*.4,U=Math.round(K.x/l.value+j)*x;if(U&&!L){const M=W=>{window.removeEventListener("click",M,!0)};window.addEventListener("click",M,!0)}Z(f.value-U),K.x=0,K.y=0,ae.value=!1,document.removeEventListener(L?"touchmove":"mousemove",de,!0),document.removeEventListener(L?"touchend":"mouseup",Q,!0)}function q(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&z.value||ue()},c.autoplay))}function he(){b&&(clearInterval(b),b=null),q()}const J=n.ref(!1);function Z(x){const j=c.wrapAround?x:Oo({val:x,max:g.value,min:y.value});f.value===j||J.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!0,p.value=f.value,f.value=j,S=setTimeout(()=>{if(c.wrapAround){const U=Fo({val:j,max:g.value,min:0});U!==f.value&&(f.value=U,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!1,he()},c.transition))}function ue(){Z(f.value+c.itemsToScroll)}function ge(){Z(f.value-c.itemsToScroll)}const Ce={slideTo:Z,next:ue,prev:ge};n.provide("nav",Ce),n.provide("isSliding",J);const se=n.computed(()=>Ok({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",se);const Ee=n.computed(()=>{const x=c.dir==="rtl"?-1:1,j=se.value*l.value*x;return{transform:`translateX(${K.x-j}px)`,transition:`${J.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),B(),T(),he()}Object.keys(Ih).forEach(x=>{["modelValue"].includes(x)||n.watch(()=>s[x],Te)}),n.watch(()=>s.modelValue,x=>{x!==f.value&&Z(Number(x))}),n.watch(d,B),t("before-init"),_();const Fe={config:c,slidesCount:d,slideWidth:l,next:ue,prev:ge,slideTo:Z,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:C,updateSlidesData:B,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:Z,next:ue,prev:ge,nav:Ce,data:Fe});const et=e.default||e.slides,it=e.addons,ot=n.reactive(Fe);return()=>{const x=Rh(et==null?void 0:et(ot)),j=(it==null?void 0:it(ot))||[];x.forEach((H,G)=>H.props.index=G);let U=x;if(c.wrapAround){const H=x.map((X,Y)=>n.cloneVNode(X,{index:-x.length+Y,isClone:!0,key:`clone-before-${Y}`})),G=x.map((X,Y)=>n.cloneVNode(X,{index:x.length+Y,isClone:!0,key:`clone-after-${Y}`}));U=[...H,...x,...G]}r.value=x,d.value=Math.max(x.length,1);const M=n.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ce:null,onTouchstartPassiveCapture:c.touchDrag?ce:null},U),W=n.h("div",{class:"carousel__viewport"},M);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":J.value,"is-dragging":ae.value,"is-hover":z.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ie},[W,j,n.h(Vk)])}}}),Mo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Mo||(Mo={}));const zk={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function Gk(s){return s in Mo}const $o=s=>{const e=n.inject("config",n.reactive(Object.assign({},je))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!Gk(t))return;const i=zk[t],o=n.h("path",{d:i}),r=e.i18n[a]||s.title||t,l=n.h("title",r);return n.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":r},[l,o])};$o.props={name:String,title:String};const jk=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},je))),r=n.inject("maxSlide",n.ref(1)),l=n.inject("minSlide",n.ref(1)),d=n.inject("currentSlide",n.ref(1)),c=n.inject("nav",{}),{dir:h,wrapAround:u,i18n:f}=o,p=h==="rtl",m=n.h("button",{type:"button",class:["carousel__prev",!u&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||n.h($o,{name:p?"arrowRight":"arrowLeft"})),g=n.h("button",{type:"button",class:["carousel__next",!u&&d.value>=r.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(a==null?void 0:a())||n.h($o,{name:p?"arrowLeft":"arrowRight"}));return[m,g]};var Hk=n.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=n.inject("config",n.reactive(Object.assign({},je))),a=n.inject("currentSlide",n.ref(0)),i=n.inject("slidesToScroll",n.ref(0)),o=n.inject("isSliding",n.ref(!1)),r=n.computed(()=>s.index===a.value),l=n.computed(()=>s.index===a.value-1),d=n.computed(()=>s.index===a.value+1),c=n.computed(()=>{const h=Math.floor(i.value),u=Math.ceil(i.value+t.itemsToShow-1);return s.index>=h&&s.index<=u});return()=>{var h;return n.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":r.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":o.value},"aria-hidden":!c.value},(h=e.default)===null||h===void 0?void 0:h.call(e,{isActive:r.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:o.value,isVisible:c.value}))}}});const Lt=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Wk={__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:Number,default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=n.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),o=n.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function r(l){e("click-match-day",l)}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day",style:n.normalizeStyle({...a.value}),onClick:d[0]||(d[0]=c=>r(s.matchDay))},[n.createElementVNode("div",{class:"match-day__value",style:n.normalizeStyle(i.value)},n.toDisplayString(s.matchDay.valueText),5),Number.isNaN(s.matchDay.value)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"match-day__text",style:n.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",o.value])},n.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5))],4))}},Kk=Lt(Wk,[["__scopeId","data-v-687d929a"]]),qk={__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:Number,default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;n.useCssVars(c=>({"26769adc":o.value,"2678c95c":r.value}));const a=n.ref(null),i=n.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=n.computed(()=>a.value.data.currentSlide.value==0?"none":"inline"),r=n.computed(()=>a.value.data.currentSlide.value==a.value.data.maxSlide.value?"none":"inline"),l=n.ref({});n.watch(()=>t.closestMatchDay,c=>{if(c){const h=t.matchDays.find(u=>u.key===c);d(h||t.matchDays[0],!0)}}),n.watch(()=>t.matchDays,c=>{if(!t.closestMatchDay&&c&&c.length){const h=c.find(u=>u.key===t.defaultMatchDayKey);l.value=h||c[0],e("change-match-day",l.value)}else t.closestMatchDay&&(l.value=c.find(h=>h.key===t.closestMatchDay)||{})},{immediate:!0});function d(c,h=!1){h&&a.value&&a.value.slideTo(c.index),l.value=c,e("change-match-day",l.value)}return(c,h)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day-picker",style:n.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[n.createVNode(n.unref(Uk),n.mergeProps(i.value,{ref_key:"matchDayPickerCarousel",ref:a}),{addons:n.withCtx(()=>[n.createVNode(n.unref(jk))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,u=>(n.openBlock(),n.createBlock(n.unref(Hk),{key:u.key},{default:n.withCtx(()=>[n.createVNode(Kk,n.mergeProps(t,{"match-day":u,"match-day-selected":l.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:d}),null,16,["match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16)],4))}},Yk=Lt(qk,[["__scopeId","data-v-1621f164"]]);function Bs(s,e=80){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-"}${e}/${s}.png`}function Bh(s){if(typeof s=="string"){let e=s.replace("M","J ");return e=e.replace("PO1","CFI"),e=e.replace("PO2","CFV"),e=e.replace("PO3","SFI"),e=e.replace("PO4","SFV"),e=e.replace("PO5","FI"),e=e.replace("PO6","FV"),e}}function Jk(s){let e="";return s.game_status!=4&&(e+="Finalizado"),(s.penalties_score_home_team!=0||s.penalties_score_visiting_team!=0)&&(e+=" - Penales "+s.penalties_score_home_team+" - "+s.penalties_score_visiting_team),e}const Xk={class:"game-info__teams"},Zk={class:"game-info__teams__team__logo"},Qk=["src"],eE={class:"game-info__teams__detail"},tE={key:0,class:"game-info__teams__detail__pre-game"},sE={class:"game-info__teams__team__logo away"},aE=["src"],nE={key:0},iE={key:0},oE={key:1},rE={__name:"GameInfo",props:{isLandingMode:{type:Boolean,default:!1},isAcronymVisible:{type:Boolean,default:!1},isTelevisionVisible:{type:Boolean,default:!0},game:{type:Object,required:!0},colorPrimary:{type:String,default:"white"},colorSecondary:{type:String,default:"grey"},namesFontSize:{type:String,default:"12px"},timeFontSize:{type:String,default:"12px"},timeZoneFontSize:{type:String,default:"8px"},scoreFontSize:{type:String,default:"13px"},namesFontFamily:{type:String,default:"sans-serif"},scoreFontFamily:{type:String,default:"sans-serif"},additionalInfoFontFamily:{type:String,default:"sans-serif"},additionalInfoFontSize:{type:String,default:"9px"}},setup(s){const e=s,t=n.computed(()=>{let c=e.game.schedule.split(":");return c.pop(),c=c.join(":"),c}),a=n.computed(()=>{let c="120px";return(e.isLandingMode||e.isAcronymVisible)&&(c="70px"),{"min-width":c}}),i=n.computed(()=>({"font-size":e.namesFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary})),o=n.computed(()=>({"font-size":e.additionalInfoFontSize,"font-family":e.additionalInfoFontFamily,color:e.colorSecondary})),r=n.computed(()=>({"font-size":e.scoreFontSize,"font-family":e.scoreFontFamily,color:e.colorPrimary})),l=n.computed(()=>({"font-size":e.timeZoneFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary})),d=n.computed(()=>({"font-size":e.timeFontSize,"font-family":e.namesFontFamily,color:e.colorPrimary}));return(c,h)=>(n.openBlock(),n.createElementBlock("div",{class:"game-info",style:n.normalizeStyle(s.isLandingMode?"gap:5px":"")},[n.createElementVNode("div",Xk,[n.createElementVNode("div",{class:"game-info__teams__team",style:n.normalizeStyle(a.value)},[n.createElementVNode("div",{class:"game-info__teams__team__name",style:n.normalizeStyle(i.value)},n.toDisplayString(s.isLandingMode||s.isAcronymVisible?s.game.home_team.acronym:s.game.home_team.colloquial_name),5),n.createElementVNode("div",Zk,[n.createElementVNode("img",{src:n.unref(Bs)(s.game.home_team.team_id),alt:""},null,8,Qk)])],4),n.createElementVNode("div",eE,[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("div",tE,[n.createElementVNode("div",null,[n.createElementVNode("span",{style:n.normalizeStyle(d.value)},n.toDisplayString(t.value),5),n.createTextVNode(),n.createElementVNode("span",{style:n.normalizeStyle(l.value)},"CST",4)])])):(n.openBlock(),n.createElementBlock("div",{key:1,class:"game-info__teams__detail__score",style:n.normalizeStyle(r.value)},[n.createElementVNode("span",null,n.toDisplayString(s.game.score[0])+" - "+n.toDisplayString(s.game.score[1]),1)],4))]),n.createElementVNode("div",{class:"game-info__teams__team away",style:n.normalizeStyle(a.value)},[n.createElementVNode("div",sE,[n.createElementVNode("img",{src:n.unref(Bs)(s.game.visiting_team.team_id),alt:""},null,8,aE)]),n.createElementVNode("div",{class:"game-info__teams__team__name",style:n.normalizeStyle(i.value)},n.toDisplayString(s.isLandingMode||s.isAcronymVisible?s.game.visiting_team.acronym:s.game.visiting_team.colloquial_name),5)],4)]),n.createElementVNode("div",{class:"game-info__status",style:n.normalizeStyle([o.value,s.isLandingMode?"line-height: normal":""])},[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("span",nE,[s.isTelevisionVisible?(n.openBlock(),n.createElementBlock("span",iE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock("span",oE,n.toDisplayString(n.unref(Jk)(s.game)),1))],4)],4))}},Nh=Lt(rE,[["__scopeId","data-v-a6b3fc44"]]),Dh=s=>(n.pushScopeId("data-v-e2fc9ed0"),s=s(),n.popScopeId(),s),lE={class:"game-status"},cE={key:0,class:"game-status__day__live"},dE=Dh(()=>n.createElementVNode("span",null,"LIVE",-1)),hE=Dh(()=>n.createElementVNode("span",{class:"dot"},null,-1)),uE=[dE,hE],mE={key:0,class:"game-status__round"},fE={__name:"GameStatus",props:{isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},status:{type:Number,default:4},isLive:{type:Boolean,default:!1},dateTimeMillis:{type:Number,default:0},roundAbbreviation:{type:String,default:""},fontSize:{type:String,default:"10px"}},setup(s){const e=s,t=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],a=n.computed(()=>{let r="";if(e.dateTimeMillis){const l=new Date(e.dateTimeMillis);r=`${l.getDate()} ${t[l.getMonth()]}`}return r}),i=n.computed(()=>({"font-size":e.fontSize})),o=n.computed(()=>{let r=[];return e.isLive?r.push("live"):e.status!==1&&r.push("pre-match"),r});return(r,l)=>(n.openBlock(),n.createElementBlock("div",lE,[n.createElementVNode("div",{class:n.normalizeClass(["game-status__day",o.value]),style:n.normalizeStyle(i.value)},[s.isLive?(n.openBlock(),n.createElementBlock("div",cE,uE)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(a.value),1)],64))],6),s.isRoundMode?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",mE,n.toDisplayString(s.roundAbbreviation),1))]))}},Ph=Lt(fE,[["__scopeId","data-v-e2fc9ed0"]]),It={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},pE=s=>(n.pushScopeId("data-v-5711c5a6"),s=s(),n.popScopeId(),s),gE={class:"actions"},yE={class:"actions__row"},bE=pE(()=>n.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),SE=[bE],wE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_E=["fill"],kE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},EE=["fill"],TE={__name:"GameActionsLanding",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.computed(()=>({backgroundColor:t.iconBackgroundColor,borderColor:t.iconBorderColor}));function i(o){e("action",o)}return(o,r)=>(n.openBlock(),n.createElementBlock("div",gE,[n.createElementVNode("div",yE,[n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[0]||(r[0]=l=>i(n.unref(It).STATISTICS))},SE,4),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[1]||(r[1]=l=>i(n.unref(It).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",wE,[n.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:t.iconColor},null,8,_E)]))],4)):n.createCommentVNode("",!0),s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:1,class:"actions__button",onClick:r[2]||(r[2]=l=>i(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",kE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,EE)]))])):n.createCommentVNode("",!0)])]))}},CE=Lt(TE,[["__scopeId","data-v-5711c5a6"]]),Vo=s=>(n.pushScopeId("data-v-d64f8667"),s=s(),n.popScopeId(),s),xE={class:"actions"},vE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},AE=["fill"],LE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},IE=["fill"],RE=Vo(()=>n.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),BE=[RE],NE={key:0,class:"actions__videos"},DE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PE=["fill"],OE={key:1,class:"actions__videos__thumbnails"},FE=Vo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),ME=Vo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),$E={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},VE=["stroke"],UE={__name:"GameActionsFull",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!0},hasGoals:{type:Boolean,default:!0},areEventsVisible:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1},arrowColor:{type:String,default:"white"},thumbnailFontFamily:{type:String,default:"sans-serif"},thumbnailFontSize:{type:String,default:"8px"},thumbnailColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.computed(()=>({backgroundColor:t.iconBackgroundColor,borderColor:t.iconBorderColor})),i=n.computed(()=>{const d=[];return t.componentWidth<540&&d.push("mobile"),d}),o=n.computed(()=>t.componentWidth>730),r=n.computed(()=>({color:t.thumbnailColor,fontFamily:t.thumbnailFontFamily,fontSize:t.thumbnailFontSize}));function l(d){e("action",d)}return(d,c)=>(n.openBlock(),n.createElementBlock("div",xE,[n.createElementVNode("div",{class:n.normalizeClass(["actions__buttons",i.value])},[s.gameStatus===4444&&!s.isLive&&!o.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[0]||(c[0]=h=>l(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",vE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,AE)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo&&!o.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:c[1]||(c[1]=h=>l(n.unref(It).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",LE,[n.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:t.iconColor},null,8,IE)]))],4)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:c[2]||(c[2]=h=>l(n.unref(It).STATISTICS))},BE,4)],2),o.value?(n.openBlock(),n.createElementBlock("div",NE,[s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[3]||(c[3]=h=>l(n.unref(It).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",DE,[n.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:t.iconColor},null,8,PE)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",OE,[s.hasGoals?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:c[4]||(c[4]=h=>l(n.unref(It).PLAY_GOALS))},[FE,n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:n.normalizeStyle(r.value)}," Goles ",4)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail",onClick:c[5]||(c[5]=h=>l(n.unref(It).PLAY_RESUME))},[ME,n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:n.normalizeStyle(r.value)}," Resumen ",4)])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),(s.gameStatus!==4||s.isLive)&&s.hasActions?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["actions__button expand",{"rotated-180":s.areEventsVisible,mobile:s.componentWidth<540}]),onClick:c[6]||(c[6]=h=>l(n.unref(It).SHOW_GAME_EVENTS))},[(n.openBlock(),n.createElementBlock("svg",$E,[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,VE)]))],2)):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:s.componentWidth<540}])},null,2))]))}},zE=Lt(UE,[["__scopeId","data-v-d64f8667"]]),cn=s=>(n.pushScopeId("data-v-2968a2f6"),s=s(),n.popScopeId(),s),GE={class:"row-landing__game-status"},jE={class:"row-landing__game-actions"},HE={class:"row-full__game-status"},WE={class:"row-full__game-info"},KE={key:0},qE={class:"row-full__game-actions"},YE={class:"game-events-container"},JE=cn(()=>n.createElementVNode("div",{class:"separator"},null,-1)),XE=cn(()=>n.createElementVNode("div",null,null,-1)),ZE={class:"game-events__data"},QE={class:"game-events__data__team"},eT=["src"],tT={class:"game-events__data__team__event__text"},sT={class:"game-events__data__team away"},aT={class:"game-events__data__team__event__text"},nT=["src"],iT=cn(()=>n.createElementVNode("div",null,null,-1)),oT=cn(()=>n.createElementVNode("div",null,null,-1)),rT={__name:"CalendarRow",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},game:{type:Object,required:!0},height:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#172531"},showPlayButton:{type:Boolean,default:!1},componentWidth:{type:Number,default:400,validator(s){return s>0}},televisionFontSize:{type:String,default:"12px"},televisionFontFamily:{type:String,default:"sans-serif"},televisionColor:{type:String,default:"rgba(255, 255, 255, 0.5)"}},emits:["action"],setup(s,{emit:e}){const t=s,a={GOAL:{}.GAME_EVENTS_ICONS_GOAL||"/icn-gol.svg",RED_CARD:{}.GAME_EVENTS_ICONS_RED_CARD||"/icn-expulsion.svg",YELLOW_CARD:{}.GAME_EVENTS_ICONS_YELLOW_CARD||"/icn-amarilla.svg"},i=n.ref(!1),o=n.ref(!1),r=n.computed(()=>{const y={homeTeam:[],awayTeam:[]};return t.game&&t.game.game_status!==4&&!t.game.is_live&&t.game.minutes&&(y.homeTeam.push(...m(t.game.minutes.home_goals_minutes,a.GOAL)),y.homeTeam.push(...m(t.game.minutes.home_red_cards_minutes,a.RED_CARD)),y.homeTeam.push(...m(t.game.minutes.home_yellow_cards_minutes,a.YELLOW_CARD)),y.awayTeam.push(...m(t.game.minutes.visiting_goals_minutes,a.GOAL)),y.awayTeam.push(...m(t.game.minutes.away_red_cards_minutes,a.RED_CARD)),y.awayTeam.push(...m(t.game.minutes.away_yellow_cards_minutes,a.YELLOW_CARD))),y}),l=n.computed(()=>{const y=r.value.homeTeam.length,b=r.value.awayTeam.length;return y+b>0}),d=n.computed(()=>{const y=t.game.score[0],b=t.game.score[1];return y>0||b>0}),c=n.computed(()=>({"background-color":t.backgroundColor})),h=n.computed(()=>({height:t.height})),u=n.computed(()=>{const y={game:[],events:[]};return t.componentWidth<500?(y.events.push("break-point-3"),y.game.push("break-point-2")):t.componentWidth<730?(y.game.push("break-point-2"),y.events.push("break-point-2")):t.componentWidth<910&&(y.game.push("break-point-1"),y.events.push("break-point-1")),y}),f=n.computed(()=>({isLandingMode:t.isLandingMode,game:t.game,colorPrimary:"#fff",colorSecondary:"#fff",namesFontSize:"12px",timeFontSize:"12px",timeZoneFontSize:"8px",scoreFontSize:"13px",namesFontFamily:"sans-serif",scoreFontFamily:"sans-serif",additionalInfoFontFamily:"sans-serif",additionalInfoFontSize:"9px"})),p=n.computed(()=>({"font-size":t.televisionFontSize,"font-family":t.televisionFontFamily,color:t.televisionColor}));n.watch(()=>t.componentWidth,y=>{o.value=y<910});function m(y,b){return y.map(S=>({iconUrl:b,text:S}))}function g(y){y===It.SHOW_GAME_EVENTS?i.value=!i.value:e("action",{action:y,game:t.game})}return(y,b)=>s.isLandingMode?(n.openBlock(),n.createElementBlock("div",{key:0,class:"row-landing",style:n.normalizeStyle(c.value)},[n.createVNode(Nh,{game:s.game,"is-landing-mode":s.isLandingMode},null,8,["game","is-landing-mode"]),n.createElementVNode("div",GE,[n.createVNode(Ph,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(Bh)(s.game.matchday_abbreviation),"is-landing-mode":s.isLandingMode,"is-round-mode":s.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),n.createElementVNode("div",jE,[s.game.home_team?(n.openBlock(),n.createBlock(CE,{key:0,"is-live":!!s.game.is_live,"has-video":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?!!s.game.has_video:!1,"game-status":s.game.game_status,"show-play-button":!0,onAction:g},null,8,["is-live","has-video","game-status"])):n.createCommentVNode("",!0)])],4)):(n.openBlock(),n.createElementBlock("div",{key:1,class:"row-full-container",style:n.normalizeStyle(c.value)},[n.createElementVNode("div",{class:n.normalizeClass(["row-full",u.value.game]),style:n.normalizeStyle(h.value)},[n.createElementVNode("div",HE,[n.createVNode(Ph,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(Bh)(s.game.matchday_abbreviation),"is-landing-mode":s.isLandingMode,"is-round-mode":s.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),n.createElementVNode("div",WE,[n.createVNode(Nh,n.mergeProps(f.value,{"is-television-visible":o.value,game:s.game,"is-landing-mode":s.isLandingMode,"is-acronym-visible":s.componentWidth<540}),null,16,["is-television-visible","game","is-landing-mode","is-acronym-visible"])]),s.componentWidth>=910?(n.openBlock(),n.createElementBlock("div",{key:0,class:"row-full__television",style:n.normalizeStyle(p.value)},[!o.value&&(s.game.game_status===4||s.game.is_live)?(n.openBlock(),n.createElementBlock("span",KE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",qE,[s.game.home_team?(n.openBlock(),n.createBlock(zE,{key:0,"is-live":!!s.game.is_live,"has-video":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?!!s.game.has_video:!1,"has-actions":l.value,"has-goals":s.showVideos==0||s.showVideos==1&&s.teamId==s.game.home_team.team_id?d.value:!1,"game-status":s.game.game_status,"show-play-button":!0,"are-events-visible":i.value,"component-width":s.componentWidth,onAction:g},null,8,["is-live","has-video","has-actions","has-goals","game-status","are-events-visible","component-width"])):n.createCommentVNode("",!0)])],6),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",YE,[JE,n.createElementVNode("div",{class:n.normalizeClass(["game-events",u.value.events])},[XE,n.createElementVNode("div",ZE,[n.createElementVNode("div",QE,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.homeTeam,(S,_)=>(n.openBlock(),n.createElementBlock("div",{key:`h${_}`,class:"game-events__data__team__event"},[n.createElementVNode("img",{src:S.iconUrl},null,8,eT),n.createElementVNode("div",tT,n.toDisplayString(S.text),1)]))),128))]),n.createElementVNode("div",sT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.awayTeam,(S,_)=>(n.openBlock(),n.createElementBlock("div",{key:`a${_}`,class:"game-events__data__team__event"},[n.createElementVNode("div",aT,n.toDisplayString(S.text),1),n.createElementVNode("img",{src:S.iconUrl},null,8,nT)]))),128))])]),iT,oT],2)],512),[[n.vShow,i.value]])]),_:1})],4))}},Oh=Lt(rT,[["__scopeId","data-v-2968a2f6"]]),lT={class:"calendar-table"},cT={__name:"CalendarTable",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},gamesPerPage:{type:Array,default:()=>[]},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s;function a(o){return o%2===0?t.evenRowColor:t.oddRowColor}function i(o){e("action",o)}return(o,r)=>(n.openBlock(),n.createElementBlock("div",lT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.gamesPerPage,(l,d)=>(n.openBlock(),n.createBlock(Oh,{key:l.game_id,game:l,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":s.isLandingMode,height:s.rowHeight,"background-color":a(d),"component-width":s.componentWidth,"is-round-mode":s.isRoundMode,onAction:i},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode"]))),128))]))}},dT=Lt(cT,[["__scopeId","data-v-c7bf1232"]]),hT={class:"calendar-by-team"},uT={class:"playing-as-picker"},mT={class:"calendar-by-team__page"},fT={__name:"CalendarTableByTeam",props:{showVideos:{type:Number,default:0},teamId:{type:Number,default:0},isPaginationVisible:{type:Boolean,default:!0},gamesPages:{type:Map,default:()=>new Map},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},rowHeight:{type:String,default:"fit-content"},nameRowColor:{type:String,default:"#172531"},gameRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(s){return s>0}}},emits:["action"],setup(s,{emit:e}){const t=s,a=n.ref(0),i=n.computed(()=>{let d=[];if(t.gamesPages.size>0){const c=Array.from(t.gamesPages.entries()).reduce((h,[u,f])=>{const p=Number(u),m=Number.isNaN(p)?u:`Jornada ${p<10?"0":""}${p}`,g=f.reduce((y,b)=>(y.push(...b),y),[]).filter(y=>a.value===0||a.value===1&&y.visiting_team.team_id===t.teamId?!0:a.value===2&&y.home_team.team_id===t.teamId);return g.length>0&&h.push({roundName:m,games:g}),h},[]);d.push(c)}return d});function o(d){e("action",d)}function r(d){document.querySelector("#opc0").classList.remove("selected"),document.querySelector("#opc1").classList.remove("selected"),document.querySelector("#opc2").classList.remove("selected"),a.value=d,document.querySelector("#opc"+d).classList.add("selected")}function l(d){let c=d;switch(d){case"PI1":c="Play In 1";break;case"PI2":c="Play In 2";break;case"R1":c="Repechaje";break;case"CFI":c="Cuartos de final - Ida";break;case"CFV":c="Cuartos de final - Vuelta";break;case"SFI":c="Semifinal - Ida";break;case"SFV":c="Semifinal - Vuelta";break;case"FI":c="Final - Ida";break;case"FV":c="Final - Vuelta";break}return c}return(d,c)=>(n.openBlock(),n.createElementBlock("div",hT,[n.createElementVNode("div",uT,[n.createElementVNode("div",{class:"playing-as-picker__type selected",id:"opc0",onClick:c[0]||(c[0]=h=>r(0))}," Todas "),n.createElementVNode("div",{class:"playing-as-picker__type",id:"opc1",onClick:c[1]||(c[1]=h=>r(1))},"Visitante"),n.createElementVNode("div",{class:"playing-as-picker__type",id:"opc2",onClick:c[2]||(c[2]=h=>r(2))},"Local")]),n.createVNode(n.unref(Lh),{"is-pagination-visible":s.isPaginationVisible,items:i.value},{default:n.withCtx(({item:h})=>[n.createElementVNode("div",mT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h,(u,f)=>(n.openBlock(),n.createElementBlock("div",{key:f,class:"calendar-by-team__page__round"},[n.createElementVNode("div",{class:"calendar-by-team__page__round__round-name",style:n.normalizeStyle([{color:"white"},s.componentWidth<=425?"padding: 5px 10px":""])},n.toDisplayString(l(u.roundName)),5),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.games,p=>(n.openBlock(),n.createBlock(Oh,{key:p.game_id,game:p,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":s.isLandingMode,height:s.rowHeight,"background-color":s.gameRowColor,"component-width":s.componentWidth,"is-round-mode":s.isRoundMode,onAction:o},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode"]))),128))]))),128))])]),_:1},8,["is-pagination-visible","items"])]))}},pT=Lt(fT,[["__scopeId","data-v-6e0e406c"]]),gT="_liveMinutes_1utnm_2",yT="_viewButtomEvent_1utnm_6",bT="_containerEvents_1utnm_20",ST="_sepEvents_1utnm_26",wT="_goalsContainer_1utnm_36",_T="_yellowContainer_1utnm_44",kT="_redContainer_1utnm_52",ET="_containerEventsGameHometeam_1utnm_60",TT="_containerEventsGameAwayteam_1utnm_73",CT="_image62Icon_1utnm_86",xT="_imgChivasIcon_1utnm_95",vT="_nameDesktop_1utnm_102",AT="_nameMobile_1utnm_115",LT="_homeTeam_1utnm_127",IT="_sbado16De_1utnm_138",RT="_gameDate_1utnm_147",BT="_sab16092023_1utnm_151",NT="_div_1utnm_164",DT="_divscore_1utnm_173",PT="_cst_1utnm_183",OT="_hour_1utnm_192",FT="_score_1utnm_193",MT="_chivasTvCanal_1utnm_204",$T="_gameStatus_1utnm_216",VT="_matchInfo_1utnm_227",UT="_image62Icon1_1utnm_241",zT="_name_1utnm_102",GT="_imgAtlasIcon_1utnm_263",jT="_name1_1utnm_270",HT="_awayTeam_1utnm_282",WT="_matchCard_1utnm_293",KT={liveMinutes:gT,viewButtomEvent:yT,containerEvents:bT,sepEvents:ST,goalsContainer:wT,yellowContainer:_T,redContainer:kT,containerEventsGameHometeam:ET,containerEventsGameAwayteam:TT,image62Icon:CT,imgChivasIcon:xT,nameDesktop:vT,nameMobile:AT,homeTeam:LT,sbado16De:IT,gameDate:RT,sab16092023:BT,div:NT,divscore:DT,cst:PT,hour:OT,score:FT,chivasTvCanal:MT,gameStatus:$T,matchInfo:VT,image62Icon1:UT,name:zT,imgAtlasIcon:GT,name1:jT,awayTeam:HT,matchCard:WT},qT=["src"],YT=["src"],JT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),XT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),ZT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),QT=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),eC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),tC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),sC=n.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),aC={key:0},nC=n.createElementVNode("div",null,"ver eventos",-1),iC=n.createElementVNode("img",{width:"13",style:{"margin-top":"1px"},src:"http://golstatsimages.blob.core.windows.net/todoelfut/arrow-live-down.png"},null,-1),oC=["src"],rC=["src"],lC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},cC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},dC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},hC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),uC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),mC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),fC={__name:"CardPreMatch",props:{game:{type:Object,default:()=>{}},playsLive:{type:Object,default:()=>{}},is_captured:{type:Number,default:1},infoLive:{type:Object,default:()=>{}}},emits:["open-modal-event"],setup(s,{emit:e}){const t=s,a=new Map([[1,45],[2,90],[3,105],[4,120]]),i=n.computed(()=>{const h=a.get(t.infoLive.recent_lapse);return h&&h<t.infoLive.minute?`${h}' + ${t.infoLive.minute-h}'`:`${t.infoLive.minute}'`}),o=n.computed(()=>{let h=0,u=0,f=!1;var p=!1;return Object.keys(t.infoLive).includes("score")&&(t.infoLive.score["own_"+t.game.home_team.team_id]!=null&&t.infoLive.score["own_"+t.game.home_team.team_id]!=0&&(p=!0),t.infoLive.score["own_"+t.game.visiting_team.team_id]!=null&&t.infoLive.score["own_"+t.game.visiting_team.team_id]!=0&&(f=!0),f?t.infoLive.score[t.game.home_team.team_id]!=null&&(h=parseInt(t.infoLive.score[t.game.home_team.team_id])+parseInt(t.infoLive.score["own_"+t.game.visiting_team.team_id])):t.infoLive.score[t.game.home_team.team_id]!=null&&(h=parseInt(t.infoLive.score[t.game.home_team.team_id])),p?t.infoLive.score[t.game.visiting_team.team_id]!=null&&(u=parseInt(t.infoLive.score[t.game.visiting_team.team_id])+parseInt(t.infoLive.score["own_"+t.game.home_team.team_id])):t.infoLive.score[t.game.visiting_team.team_id]!=null&&(u=parseInt(t.infoLive.score[t.game.visiting_team.team_id]))),h+" - "+u}),r=n.computed(()=>{const h={...t.game};return h.gameSchedule=t.game.schedule.split(":"),h.gameSchedule.pop(),h.gameSchedule=h.gameSchedule.join(":"),h});function l(h){let u=h.split(" "),f=u[u.length-2];return f.includes("+")?u[u.length-3]+"+"+u[u.length-1]:(f=u[u.length-1],f)}function d(h){e("open-modal-event",h)}function c(h,u){const f=new Date(h);if(u==1){const p=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],m=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${p[f.getDay()]} ${f.getDate()} de ${m[f.getMonth()]}`}else return`${f.getDate()}-${f.getMonth()+1}-${f.getFullYear()}`}return(h,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(h.$style.matchCard)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.homeTeam),id:"container-home-team"},[n.createElementVNode("img",{class:n.normalizeClass(h.$style.image62Icon),alt:"",src:n.unref(Bs)(r.value.home_team.team_id,150)},null,10,qT),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgChivasIcon),alt:"",src:n.unref(Bs)(r.value.home_team.team_id)},null,10,YT),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.nameDesktop),id:"team-name"},n.toDisplayString(r.value.home_team.colloquial_name),3),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.nameMobile),id:"team-name"},n.toDisplayString(r.value.home_team.acronym),3),r.value.game_status==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.value.is_live==0&&r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameHometeam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[JT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_goals_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),p!=r.value.minutes.home_goals_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0&&r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.yellowContainer)},[XT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_red_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.home_red_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.home_red_cards_minutes.length>0||r.value.minutes.home_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.home_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(h.$style.redContainer)},[ZT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_yellow_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.home_yellow_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value.is_live==1&&r.value.game_status!=1||r.value.game_status==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameHometeam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[Object.keys(s.playsLive).length>0?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[s.playsLive[s.game.home_team.team_id]&&"goals"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[QT,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].goals),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].goals).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.home_team.team_id]&&"red"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0&&Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.yellowContainer)},[eC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].red),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].red).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.home_team.team_id]&&"yellow"in s.playsLive[s.game.home_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[Object.keys(s.playsLive[s.game.home_team.team_id].red).length>0||Object.keys(s.playsLive[s.game.home_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.home_team.team_id].yellow).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.redContainer)},[tC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].yellow),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.home_team.team_id].yellow).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64))],2),r.value.game_status==4&&r.value.is_live==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.matchInfo),id:"container-match-info"},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.sbado16De)},n.toDisplayString(c(r.value.date_time_utc,1)),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.sab16092023)},n.toDisplayString(c(r.value.date_time_utc,0)),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.hour)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.div)},n.toDisplayString(r.value.gameSchedule),3),n.createElementVNode("div",{class:n.normalizeClass(h.$style.cst)},"CST",2)],2),n.createElementVNode("div",{class:n.normalizeClass(h.$style.chivasTvCanal)},n.toDisplayString(r.value.tv_stations.join(", ")),3)],2)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.matchInfo),id:"container-match-info"},[r.value.is_live?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(c(r.value.date_time_utc,1)),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("div",{class:n.normalizeClass([h.$style.sbado16De,h.$style.gameDate])},n.toDisplayString(c(r.value.date_time_utc,1)),3),n.createElementVNode("div",{class:n.normalizeClass([h.$style.sab16092023,h.$style.gameDate])},n.toDisplayString(c(r.value.date_time_utc,0)),3)],64)),r.value.is_live||r.value.game_status!=1&&r.value.game_status!=4?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.score)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.divscore)},n.toDisplayString(o.value),3)],2)):(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.score)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.divscore)},n.toDisplayString(r.value.score.join(" - ")),3)],2)),n.createElementVNode("div",{class:n.normalizeClass(h.$style.gameStatus)},[r.value.is_live?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.liveMinutes)},[sC,n.createTextVNode(" LIVE - "+n.toDisplayString(i.value)+"' ",1)],2)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(" Finalizado "),r.value.penalties_score_home_team!=0||r.value.penalties_score_visiting_team!=0?(n.openBlock(),n.createElementBlock("span",aC," - Penales "+n.toDisplayString(r.value.penalties_score_home_team)+" - "+n.toDisplayString(r.value.penalties_score_visiting_team),1)):n.createCommentVNode("",!0)],64))],2),s.is_captured==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:4},[r.value.is_live==1||r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.viewButtomEvent),onClick:u[0]||(u[0]=f=>d(r.value))},[nC,n.createTextVNode("  "),iC],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)),n.createElementVNode("div",{class:n.normalizeClass(h.$style.awayTeam),id:"container-away-team"},[n.createElementVNode("img",{class:n.normalizeClass(h.$style.image62Icon1),alt:"",src:n.unref(Bs)(r.value.visiting_team.team_id,150)},null,10,oC),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.name),id:"team-name"},n.toDisplayString(r.value.visiting_team.colloquial_name),3),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgAtlasIcon),alt:"",src:n.unref(Bs)(r.value.visiting_team.team_id)},null,10,rC),n.createElementVNode("h3",{class:n.normalizeClass(h.$style.name1),id:"team-name"},n.toDisplayString(r.value.visiting_team.acronym),3),r.value.game_status==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.value.is_live==0&&r.value.game_status==1||Object.keys(r.value.minutes).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameAwayteam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("img",lC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.visiting_goals_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),p!=r.value.minutes.visiting_goals_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0&&r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(h.$style.yellowContainer)},[r.value.minutes.away_red_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("img",cC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_red_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f)),1),p!=r.value.minutes.away_red_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0),r.value.minutes.away_red_cards_minutes.length>0||r.value.minutes.visiting_goals_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),r.value.minutes.away_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(h.$style.redContainer)},[r.value.minutes.away_yellow_cards_minutes.length>0?(n.openBlock(),n.createElementBlock("img",dC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_yellow_cards_minutes,(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(l(f))+"'",1),p!=r.value.minutes.away_yellow_cards_minutes.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value.is_live==1&&r.value.game_status!=1||r.value.game_status==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.containerEventsGameAwayteam)},[n.createElementVNode("div",{class:n.normalizeClass(h.$style.containerEvents)},[Object.keys(s.playsLive).length>0?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[s.playsLive[s.game.visiting_team.team_id]&&"goals"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.goalsContainer)},[hC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].goals),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.visiting_team.team_id]&&"red"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0&&Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.yellowContainer)},[uC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].red),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),s.playsLive[s.game.visiting_team.team_id]&&"yellow"in s.playsLive[s.game.visiting_team.team_id]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[Object.keys(s.playsLive[s.game.visiting_team.team_id].red).length>0||Object.keys(s.playsLive[s.game.visiting_team.team_id].goals).length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(h.$style.sepEvents)}," | ",2)):n.createCommentVNode("",!0),Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow).length>0?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(h.$style.redContainer)},[mC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow),(f,p)=>(n.openBlock(),n.createElementBlock("div",{key:p},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),p!=Object.keys(s.playsLive[s.game.visiting_team.team_id].yellow).length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(", ")],64)):n.createCommentVNode("",!0)]))),128))],2)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0)],2)],2)):n.createCommentVNode("",!0)],64))],2)],2))}},pC={$style:KT},gC=Lt(fC,[["__cssModules",pC]]),yC={class:"calendar-by-game__carousel"},bC="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",SC={__name:"GSC-CalendarByGame",props:{showVideos:{type:Number,default:0},playsLive:{type:Object,default:()=>{}},infoLive:{type:Object,default:()=>{}},height:{type:String,default:"fit-content"},width:{type:String,default:"100%"},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},isRoundPickerVisible:{type:Boolean,default:!0},isPaginationVisible:{type:Boolean,default:!0},awaitForSeasons:{type:Boolean,default:!1},seasons:{type:Array,default:()=>[]},isCup:{type:Boolean,default:!1},isCupLegacy:{type:Boolean,default:!1},token:{type:String,default:""},pagesWithGames:{type:Array,default:()=>[]},maxGamesToShow:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},areRoundsVisible:{type:Boolean,default:!0},is_captured:{type:Number,default:1},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},games:{type:Array,default:()=>null},teamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},avoidTeamIdFilter:{type:Boolean,default:!1},areGamesCarouselType:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},userTeamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},sortCalendar:{type:Boolean,default:!0},isTeamGamePerPage:{type:Boolean,default:!1},onlyGamesTeamId:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},tournamentType:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2},gamesEventsIntervalMinutes:{type:Number,default:2},checkStartedLiveGamesMinutes:{type:Number,default:5}},emits:["tournament-selected","change-teams","change-round","change-game-carousel","action","change-games-by-client-privileges","open-modal-event"],setup(s,{emit:e}){const t=s;let a=null,i=null,o=null;const r=n.ref([]),l=n.ref({}),d=n.ref(0),c=n.ref(null),h=n.ref({}),u=n.ref(new Map),f=n.ref(!1),p=n.ref(null),m=n.ref(null),g=n.ref(null),y=n.ref([]),b=n.ref(new Map),S=n.ref(new Set),_=n.computed(()=>t.isCup),C=n.computed(()=>t.isCupLegacy),E=n.computed(()=>({height:t.height,width:t.width})),v=n.computed(()=>{if(t.games)return Ee(t.games,t.isTeamGamePerPage);{const M=u.value.get(h.value.key);return M&&t.isTeamGamePerPage&&t.onlyGamesTeamId?[M[0].filter(W=>W.home_team.team_id===t.onlyGamesTeamId||W.visiting_team.team_id===t.onlyGamesTeamId)]:M||[]}}),T=n.computed(()=>t.areGamesCarouselType?v.value[0]:v.value),B=n.ref([]),L=n.ref([]),R=n.computed(()=>{const M=L.value&&L.value.length?z(l.value):K(l.value),W=B.value.find(H=>H.key===M);return W&&f.value&&($(!1),et(W)),M});n.watch(()=>t.seasons,M=>{M&&M.length&&($(!0),r.value=M.map(W=>W.id),ie(M,!0))},{immediate:!0,deep:!0}),n.watch(u,M=>{if(t.onlyGamesTeamId&&M.size){const W=Array.from(M.values()).reduce((H,G)=>(G.forEach(X=>{const Y=X.find(ke=>ke.home_team.team_id===t.onlyGamesTeamId||ke.visiting_team.team_id===t.onlyGamesTeamId);Y&&H.push(Y)}),H),[]);e("change-games-by-client-privileges",W)}},{immediate:!0});function $(M){f.value=M}function K(M){const W=Object.entries(Object.entries(M).reduce((X,[Y,ke])=>(X[Y]=[],ke.forEach(Pe=>{Pe.games.forEach(ct=>{const Mt=new Date(ct.date_time_utc).getTime()+66e5;X[Y].push(Mt)})}),X),{}));if(!W.length)return"1";const H=new Date().getTime(),G=W.reduce((X,[Y,ke])=>{let Pe=null;return ke.forEach(ct=>{const Mt=ct-H;Mt>=0&&(Pe===null||Mt<Pe)&&(Pe=Mt)}),Pe&&(X.shortestTime===null||Pe<X.shortestTime)&&(X.round=Y,X.shortestTime=Pe),X},{round:"",shortestTime:null});return G.shortestTime!==null?G.round:W[W.length-1][0]}function z(M){let W=1;if(L.value.length){const H=L.value[0];for(const[G,X]of Object.entries(M))for(const Y of X)if(Y.games.find(ke=>ke.game_id===H.game_id))return G}return W}n.watch(()=>t.teamId,()=>{se()},{immediate:!0});async function ae(M,W,H=""){let G=H;try{const X={};t.token&&(X.Authorization=t.token),G||(G="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",M.forEach((Pe,ct)=>{G+=`${ct===0?"":"&"}seasons=${Pe}`}));const{data:{data:Y,teams:ke}}=await ln.get(G,{headers:X});return{seasonsAndGames:Y,seasonsAndTeams:ke}}catch(X){if(W>0)return ae(M,W-1,G);throw new Error(X)}}function oe(M){for(const W of M)if(!r.value.includes(W.season_id))return!0;return!1}async function ie(M,W){try{l.value={};let H=0;const{seasonsAndGames:G,seasonsAndTeams:X}=await ae(M.map(ke=>ke.id),3);if(W&&oe(G))return;G.forEach(ke=>{const{type:Pe}=M.find(ct=>ct.id===ke.season_id);ke.type=Pe,ke.games.forEach(ct=>{ct.season_id=ke.season_id}),Pe===0&&(H=ke.season_id)}),p.value={seasonsGames:G};const{teams:Y}=X.find(ke=>ke.season_id===H);m.value=Y,e("change-teams",Y),se(),S.value.size?Q():await ce()}catch(H){throw new Error(H)}}async function ce(){try{const M=await Ce(),W=new Set;if(y.value=M.data.reduce((H,G)=>(G.games.forEach(X=>{W.add(X.game_id),H.push(X)}),H),[]),y.value.length){i||await de();const H=[];S.value.forEach(G=>{const X=b.value.get(G);X&&new Date().valueOf()>X.dateTimeMillis&&H.push(G)}),H.length&&H.every(G=>b.value.get(G).isLiveTracked)&&J()}}catch(M){throw new Error(M)}}async function de(){try{const M=[];for(const H of y.value){const G=b.value.get(H.game_id);G&&(G.is_live=1,G.game_status=4),G.isLiveTracked=!0,M.push(ge(H.game_id))}const W=await Promise.all(M);for(const H of W){const G=b.value.get(H.game_id);G&&ue(G,H.plays)}i||he()}catch(M){throw new Error(M)}}function Q(){S.value.size&&S.value.forEach(M=>{const W=b.value.get(M);if(W){const H=new Date().valueOf();if(60*1e3*30+W.dateTimeMillis-H>0){const G=W.dateTimeMillis-H-3e5;setTimeout(()=>{q()},G>0?G:0)}}})}function q(){J(),o||(o=setInterval(()=>{ce()},t.checkLiveGamesIntervalMinutes*60*1e3))}function he(){Z(),i=setInterval(()=>{de()},t.gamesEventsIntervalMinutes*60*1e3)}function J(){clearInterval(o),o=null}function Z(){clearInterval(i),i=null}function ue(M,W){for(const H of W)if(H.category_id===0&&H.game_status_id===13){const G=b.value.get(H.game_id);y.value=y.value.filter(X=>X.game_id!==M.game_id),G.is_live=0,G.game_status=0}}async function ge(M){try{return(await ln.get(`${bC}${M}`,{headers:{Authorization:`${t.token}`}})).data}catch(W){throw new Error(W)}}async function Ce(){try{if(t.seasons.length===0)return[];const M=t.seasons.reduce((G,X)=>`${G}seasons=${X.id}&`,""),W=ln.create({headers:{Authorization:`${t.token}`}}),{data:H}=await W.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${M}`);return H}catch(M){throw new Error(M)}}function se(){if(J(),!m.value)return;b.value.clear(),S.value.clear(),L.value=[];const M=p.value&&p.value.seasonsGames?p.value.seasonsGames.map(W=>{const H=W.games.reduce((G,X)=>{if(t.onlyGamesTeamId&&t.onlyGamesTeamId!==X.home_team&&t.onlyGamesTeamId!==X.visiting_team)return G;const Y={...X},ke=new Date,[Pe,ct,Mt]=Y.date.split("-"),[wi,_i,wO]=Y.schedule.split(":"),ki=new Date(Number(Pe),Number(ct)-1,Number(Mt),Number(wi),Number(_i),Number(wO));return Y.dateTimeMillis=ki.valueOf(),Y.home_team=m.value.find(Kl=>Kl.team_id===X.home_team),Y.visiting_team=m.value.find(Kl=>Kl.team_id===X.visiting_team),Y.game_status===4&&ke.getFullYear()===ki.getFullYear()&&ke.getMonth()===ki.getMonth()&&ke.getDate()===ki.getDate()&&S.value.add(Y.game_id),b.value.set(Y.game_id,Y),t.teamId&&Y.home_team.team_id!==t.teamId&&Y.visiting_team.team_id!==t.teamId||(G[X.matchday_abbreviation]?G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date]?G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date].push(Y):G[X.matchday_abbreviation][X.game_status===3?"canceled":X.date]=[Y]:G[X.matchday_abbreviation]={[X.game_status===3?"canceled":X.date]:[Y]},t.userTeamId&&Y.game_status===4&&(Y.home_team.team_id===t.userTeamId||Y.visiting_team.team_id===t.userTeamId)&&L.value.push(Y)),G},{});for(let[G,X]of Object.entries(H))H[G]=Object.entries(X).map(([Y,ke])=>({date:Y,games:ke.sort((Pe,ct)=>Pe.dateTimeMillis-ct.dateTimeMillis)})),H[G].sort((Y,ke)=>Y.date<ke.date?-1:Y.date>ke.date?1:0);return{type:W.type,weight:W.type===0?0:W.type===2?1:2,schedule:H}}):[];M.sort((W,H)=>W.weight-H.weight),l.value=M.reduce((W,H)=>{for(const[G,X]of Object.entries(H.schedule))if(H.type===0)if([1,2].includes(t.tournamentType)){const Y=Nk.get(t.tournamentType);if(Y){const ke=Y.get(G);ke&&(W[ke.matchDayAbbreviation]=X)}}else if(_.value){const Y=G.replace("M",""),ke=Y;C.value?W[Bk[Y]||ke]=X:W[Rk[G]||ke]=X}else W[Number(G.replace("M","")).toString()]=X;else H.type===2?G.charAt(1)=="I"?W[`PI${Number(G.replace("PI",""))}`]=X:W[`R${Number(G.replace("PO",""))}`]=X:H.type===1&&(W[Ik[G]]=X);return W},{}),u.value=new Map,B.value=Array.from(Object.entries(l.value).reduce((W,[H,G],X)=>{const Y=Number(H);let ke="";Number.isNaN(Y)?ke=H:ke=Y<10?`0${Y}`:H,W.set(H,{key:H,value:Y,valueText:ke,index:X});const Pe=G.reduce((Mt,wi)=>(wi.games.forEach(_i=>{_i.game_id===t.defaultGameId&&(g.value=H),_i.roundAbbreviation=Number.isNaN(Y)?Y:`J ${Y}`}),Mt=Mt.concat(wi.games),Mt),[]),ct=Ee(Pe);return u.value.set(H,ct),W},new Map).values())}function Ee(M,W=!1){const H=[];if(t.gamesPerMatchDay>0){let G=[];M.forEach((X,Y)=>{G.push(X),(Y+1)%t.gamesPerMatchDay===0&&(H.push([...G]),G=[])}),G.length&&H.push([...G])}else H.push(M);return W&&t.isTeamGamePerPage&&t.defaultGameId?H.filter(G=>G.game_id===t.defaultGameId||G.gameId===t.defaultGameId):H}async function Te(M){try{const{data:W}=await ln.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return W}catch(W){if(M>0)return Te(M-1);throw new Error(W)}}function Fe(){if(window.ResizeObserver)a=new ResizeObserver(()=>{d.value=c.value.clientWidth}),a.observe(c.value);else throw new Error("Resize observer not supported!")}function et(M){h.value.value!==M.value&&(h.value=M,e("change-round",M))}function it(M){t.areGamesCarouselType&&e("change-game-carousel",M.selectedItem)}function ot(M){e("action",M),j(M)}function x(M){e("open-modal-event",M)}function j(M){const W="PLAY_RESUME",H="PLAY_GOALS",G=[607,608,12,55,54,35,14,52,15,53,466,477],X=[12,55,"35_r","54_r"],{game_id:Y,season_id:ke}=M.game;let Pe={seasonId:ke,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[Y],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};M.action===W?(Pe.categoryIds=G,Pe.advancedFilter.playListTitle="Resumen",e("openmedia",Pe)):M.action===H&&(Pe.categoryIds=X,Pe.advancedFilter.playListTitle="Goles",e("openmedia",Pe))}async function U(){try{if(!t.awaitForSeasons&&!t.games){const M=(await Te(3)).find(G=>G._id===1),W=M.seasons[0],H=[{id:W.id,type:W.type}];M&&M.tournament&&e("tournament-selected",M.tournament),W.related_seasons&&W.related_seasons.length&&H.push(...W.related_seasons.map(G=>({id:G.id,type:G.type}))),await ie(H,!1)}}catch(M){throw new Error(M)}}return n.onMounted(()=>{Fe()}),U(),(M,W)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"calendarByGame",ref:c,class:"calendar-by-game",style:n.normalizeStyle(E.value)},[s.teamId&&!s.avoidTeamIdFilter?(n.openBlock(),n.createBlock(pT,{key:0,"full-tournament-schedule":l.value,"team-id":s.teamId,"show-videos":s.showVideos,"is-landing-mode":!1,"row-height":s.rowHeight,"component-width":d.value,"games-pages":u.value,"is-pagination-visible":s.isPaginationVisible,"is-round-mode":s.isRoundMode,onAction:ot},null,8,["full-tournament-schedule","team-id","show-videos","row-height","component-width","games-pages","is-pagination-visible","is-round-mode"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[s.areRoundsVisible&&B.value?(n.openBlock(),n.createBlock(Yk,{key:0,"match-days":B.value,"is-landing-mode":s.isLandingMode,height:"48px","items-to-show":s.itemsToShow,"items-to-scroll":s.itemsToScroll,"component-width":d.value,"default-match-day-key":g.value,"closest-match-day":s.sortCalendar?R.value:"",onChangeMatchDay:et},null,8,["match-days","is-landing-mode","items-to-show","items-to-scroll","component-width","default-match-day-key","closest-match-day"])):n.createCommentVNode("",!0),n.createElementVNode("div",yC,[v.value?(n.openBlock(),n.createBlock(n.unref(Lh),{key:0,"is-pagination-visible":s.isPaginationVisible&&!s.areGamesCarouselType,items:T.value,"are-navigation-arrows-visible":s.areGamesCarouselType?!s.areGamesCarouselType:s.isPaginationVisible,"wrap-around":s.areGamesCarouselType&&!s.isTeamGamePerPage,"items-to-show":s.areGamesCarouselType&&!s.isTeamGamePerPage?1.2:1,"is-main-slide-priority":s.areGamesCarouselType,"are-slides-arrows-visible":s.areGamesCarouselType&&!s.isTeamGamePerPage,"slides-arrows-left-and-right":s.areGamesCarouselType?"30px":"0px","default-item-by-prop":s.areGamesCarouselType?{propName:"game_id",value:s.defaultGameId}:{},onInput:it},{default:n.withCtx(({item:H})=>[s.areGamesCarouselType?(n.openBlock(),n.createBlock(gC,{key:0,is_captured:s.is_captured,game:H,onOpenModalEvent:x,"plays-live":s.playsLive,"info-live":s.infoLive},null,8,["is_captured","game","plays-live","info-live"])):(n.openBlock(),n.createBlock(dT,{key:1,"team-id":s.teamId,"show-videos":s.showVideos,"games-per-page":H,"is-landing-mode":s.isLandingMode,"row-height":s.rowHeight,"component-width":d.value,"is-round-mode":s.isRoundMode,onAction:ot},null,8,["team-id","show-videos","games-per-page","is-landing-mode","row-height","component-width","is-round-mode"]))]),_:1},8,["is-pagination-visible","items","are-navigation-arrows-visible","wrap-around","items-to-show","is-main-slide-priority","are-slides-arrows-visible","slides-arrows-left-and-right","default-item-by-prop"])):n.createCommentVNode("",!0)])],64))],4))}},wC=Lt(SC,[["__scopeId","data-v-3c66b88d"]]),_C=["Mi posición","Tabla General","Fases","Play Off"],kC={components:{GscSwitchComponent:go,GSCGeneraltable:a_,GSCCalendarByGame:wC},props:{privileges:{type:Object,default:()=>{}},isPublic:{type:Boolean,default:!0},season:{type:Object,default:()=>{}},onlyTable:{type:Boolean,default:!0},seasons:{type:Array,default:()=>[]},tournamentType:{type:Number,default:0},tournament:{type:Number,default:1},teamId:{type:Number,default:0},componentWidth:{type:Number,default:768},tournaments:{type:Array,default:()=>[]}},data(){return{selectedOpt:"Mi posición",tokenFree:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},computed:{tableTitle(){return this.tournamentType!==0?this.tournamentType===1?"Fases":"Play Off":(this.selectedOpt!=="Calendario"&&this.changeCategory(this.teamId!=0?"Mi posición":"Tabla General"),this.teamId!==0?"Mi posición":"Tabla General")},isGeneralTableVisible(){return _C.includes(this.selectedOpt)}},watch:{tableTitle:{handler(s){this.selectedOpt=s},immediate:!0}},methods:{onAction(s){this.$emit("action",s)},changeCategory(s){this.selectedOpt=s},onOpenMedia(s){this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)}},mounted(){this.selectedOpt=this.teamId!==0?"Mi posición":"Tabla General"}},EC={key:0,class:"gsc-switch-container"},TC={key:1,class:"gsc-switch-container"},CC={class:"gsc-app-component"},xC={key:0};function vC(s,e,t,a,i,o){const r=n.resolveComponent("GscSwitchComponent"),l=n.resolveComponent("GSCGeneraltable"),d=n.resolveComponent("GSCCalendarByGame");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(t.componentWidth>1e3?"gsc-calendar-table":"gsc-calendar-table-movil")},[t.onlyTable?(n.openBlock(),n.createElementBlock("div",TC,"Mi posicion")):(n.openBlock(),n.createElementBlock("div",EC,[n.createVNode(r,{type:0,arrow:!1,"font-family":"Poppins-Light",buttons:[o.tableTitle,"Calendario"],height:"40px","selected-option":i.selectedOpt,"font-size":t.componentWidth>=768?"16px":"14px",width:"355px",onInput:o.changeCategory},null,8,["buttons","selected-option","font-size","onInput"])])),n.createElementVNode("div",CC,[o.isGeneralTableVisible?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(l,{isPaginationVisible:!0,"current-season-id":t.season.id,"team-default-select":t.teamId,"team-id":t.teamId,type:1,"show-videos":t.isPublic?t.privileges.vr_privileges!=0:!0,tournament:t.tournament,"type-view":t.tournamentType,"await-for-season":"","await-for-tournaments":"","external-tournaments":t.tournaments,onOpenmedia:o.onOpenMedia,onOpenTableProfile:o.onOpenProfile},null,8,["current-season-id","team-default-select","team-id","show-videos","tournament","type-view","external-tournaments","onOpenmedia","onOpenTableProfile"]),n.createElementVNode("div",{onClick:e[0]||(e[0]=c=>s.$router.push({name:"table"})),class:"gsc-app-component-view-all"}," Ver todo ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.onlyTable?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",xC,[n.createVNode(d,{width:"100%",token:i.tokenFree,seasons:t.seasons,"tournament-type":t.tournamentType,"show-videos":t.isPublic,"row-height":"90px","is-landing-mode":!0,"is-pagination-visible":!0,isRoundPickerVisible:!0,"await-for-seasons":"","items-to-show":9,"items-to-scroll":5,"max-games-to-show":5,"games-per-match-day":5,onOpenmedia:o.onOpenMedia,onAction:o.onAction},null,8,["token","seasons","tournament-type","show-videos","onOpenmedia","onAction"]),n.createElementVNode("div",{onClick:e[1]||(e[1]=c=>this.$router.push({name:"calendar"})),class:"gsc-app-component-view-all"}," Ver todo ")]))],64))])],2)}const AC=qe(kC,[["render",vC],["__scopeId","data-v-c8707277"]]),Fh=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],Mh=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],$h=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],LC={class:"match"},IC={class:"match__header"},RC={key:0,class:"match__final-tag"},BC={key:1,class:"match__final-tag__no-border"},NC={class:"match__header__match-date"},DC={class:"match__tag"},PC={class:"match__body"},OC={class:"match__data"},FC={class:"match__acronym"},MC=["src"],$C={class:"match__score"},VC=["src"],UC={class:"match__acronym"},zC={class:"match__status"},dn=qe({__name:"PreviousMatch",props:{visitTeam:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},homeTeam:{type:Object,default:()=>{}},score:{type:String,default:"2 - 1"},journey:{type:[String,Number],default:2},penalScore:{type:String,default:""},infoType:{type:String,default:"postmatch"}},setup(s){const e=s,t=n.computed(()=>{const a=new Date(e.data.date_time_utc);return`${Fh[a.getDay()]}, ${a.getDate()} de ${Mh[a.getMonth()]}`});return(a,i)=>{var o,r,l;return n.openBlock(),n.createElementBlock("section",LC,[n.createElementVNode("div",IC,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock("div",RC,"FINAL")):(n.openBlock(),n.createElementBlock("div",BC)),n.createElementVNode("div",NC,n.toDisplayString(t.value),1),n.createElementVNode("div",DC,n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`),1)]),n.createElementVNode("div",PC,[n.createElementVNode("div",OC,[n.createElementVNode("div",FC,n.toDisplayString((o=s.data)==null?void 0:o.home_team_acronym),1),n.createElementVNode("img",{class:"match__img",src:"https://az755631.vo.msecnd.net/teams-80/"+s.data.home_team+".png",alt:"team-img"},null,8,MC),n.createElementVNode("div",$C,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(s.data.score[0])+" - "+n.toDisplayString(s.data.score[1]),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString((r=s.data)==null?void 0:r.schedule.replace(":00","")),1)],64))]),n.createElementVNode("img",{class:"match__img",src:"https://az755631.vo.msecnd.net/teams-80/"+s.data.visiting_team+".png",alt:"team-img"},null,8,VC),n.createElementVNode("div",UC,n.toDisplayString((l=s.data)==null?void 0:l.visiting_team_acronym),1)]),n.createElementVNode("div",zC,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Finalizado"+n.toDisplayString(s.penalScore?` - Penales ${s.penalScore}`:""),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("CST")],64))])]),n.createElementVNode("div",{class:"match__button",onClick:i[0]||(i[0]=d=>a.$emit("clickMatch"))},"Ver →")])}}},[["__scopeId","data-v-2d7ed7f2"]]),Vh=s=>(n.pushScopeId("data-v-540e357c"),s=s(),n.popScopeId(),s),GC=["src"],jC=["src"],HC={class:"coming-match__body"},WC={class:"coming-match__data"},KC=["src"],qC={key:0,class:"coming-match__live"},YC={class:"coming-match__live__score"},JC={class:"coming-match__live__time"},XC=Vh(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ZC=Vh(()=>n.createElementVNode("div",{class:"coming-match__live__time__text"},"LIVE",-1)),QC={class:"coming-match__live__time__time"},ex={key:1,style:{"margin-top":"16px"}},tx={class:"coming-match__time"},sx={class:"coming-match__cst"},ax={key:0},nx=["src"],Ns=qe({__name:"ComingMatch",props:{small:{type:Boolean,default:!1},visitTeam:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},homeTeam:{type:Object,default:()=>{}},date:{type:String,default:"Jueves 7 de Abril"},time:{type:String,default:"5: 00"}},setup(s){const e=s,t=n.computed(()=>{const i=new Date(e.data.date_time_utc);return`${Fh[i.getDay()]}, ${i.getDate()} de ${e.small?$h[i.getMonth()]:Mh[i.getMonth()]}`}),a=n.computed(()=>e.data.is_live||e.data.game_status===0);return(i,o)=>{var r,l,d,c,h,u,f,p,m,g,y,b,S,_,C;return n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["coming-match",{small:s.small}])},[n.createElementVNode("img",{class:n.normalizeClass(["coming-match__bg",{small:s.small}]),src:typeof s.data.home_team=="object"?"https://az755631.vo.msecnd.net/teams-150/"+((r=s.data)==null?void 0:r.home_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-150/"+((l=s.data)==null?void 0:l.home_team)+".png",alt:"team-img"},null,10,GC),n.createElementVNode("img",{class:n.normalizeClass(["coming-match__bg",{small:s.small}]),src:typeof s.data.visiting_team=="object"?"https://az755631.vo.msecnd.net/teams-150/"+((d=s.data)==null?void 0:d.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-150/"+((c=s.data)==null?void 0:c.visiting_team)+".png",alt:"team-img"},null,10,jC),n.createElementVNode("div",HC,[a.value?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["coming-match__date",{small:s.small}])},n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`)+" | "+n.toDisplayString(t.value),3)),n.createElementVNode("div",WC,[n.createElementVNode("div",{class:n.normalizeClass(["coming-match__team",{small:s.small}])},[n.createElementVNode("img",{class:n.normalizeClass(["coming-match__img",{small:s.small}]),src:typeof s.data.home_team=="object"?"https://az755631.vo.msecnd.net/teams-80/"+((h=s.data)==null?void 0:h.home_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((u=s.data)==null?void 0:u.home_team)+".png",alt:"team-img"},null,10,KC),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__acronym",{small:s.small}])},n.toDisplayString((f=s.data)==null?void 0:f.home_team_name),3)],2),a.value?(n.openBlock(),n.createElementBlock("div",qC,[n.createElementVNode("div",YC,n.toDisplayString((p=s.data)==null?void 0:p.score[0])+" - "+n.toDisplayString((m=s.data)==null?void 0:m.score[1]),1),n.createElementVNode("div",JC,[XC,ZC,n.createElementVNode("div",QC,n.toDisplayString(s.data.currentTimeLive||"0'"),1)])])):(n.openBlock(),n.createElementBlock("div",ex,[n.createElementVNode("div",tx,[s.data.game_status!==4?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((g=s.data)==null?void 0:g.score[0])+" - "+n.toDisplayString((y=s.data)==null?void 0:y.score[1]),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString((b=s.data)==null?void 0:b.schedule.replace(":00","")),1)],64))]),n.createElementVNode("div",sx,[s.data.game_status===4?(n.openBlock(),n.createElementBlock("span",ax,"CST")):n.createCommentVNode("",!0)])])),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__team away",{small:s.small}])},[n.createElementVNode("div",{class:n.normalizeClass(["coming-match__acronym",{small:s.small}])},n.toDisplayString((S=s.data)==null?void 0:S.visiting_team_name),3),n.createElementVNode("img",{class:n.normalizeClass(["coming-match__img",{small:s.small}]),src:typeof s.data.visiting_team=="object"?"https://az755631.vo.msecnd.net/teams-80/"+((_=s.data)==null?void 0:_.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((C=s.data)==null?void 0:C.visiting_team)+".png",alt:"team-img"},null,10,nx)],2)])]),n.createElementVNode("div",{class:n.normalizeClass(["coming-match__button",{small:s.small}]),onClick:o[0]||(o[0]=E=>i.$emit("clickMatch"))},[s.data.game_status===4&&!s.data.is_live?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Ver →")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Ver →")],64))],2)],2)}}},[["__scopeId","data-v-540e357c"]]),hn=s=>(n.pushScopeId("data-v-8a08c1a3"),s=s(),n.popScopeId(),s),ix={class:"game-item__header"},ox={class:"game-item__header__info text-type-1"},rx={key:0,class:"game-item__header__info__live"},lx=hn(()=>n.createElementVNode("div",{class:"game-item__header__info__live__status text-type-2"},[n.createElementVNode("div",{class:"bullet"}),n.createElementVNode("span",null,"LIVE")],-1)),cx={class:"text-type-1"},dx={key:1,class:"game-item__header__info__pre-match text-type-2"},hx=hn(()=>n.createElementVNode("span",{class:"game-item__header__info__pre-match text-type-1"},[n.createTextVNode(" "),n.createElementVNode("small",null,"CST")],-1)),ux={key:2,class:"game-item__header__info__post-match"},mx=[hn(()=>n.createElementVNode("span",{class:"text-type-2"},"Finalizado",-1))],fx={class:"game-item__body"},px={class:"game-item__body__team__info"},gx=["src"],yx={class:"game-item__body__team__info__acronym"},bx={class:"game-item__body__team__score"},Sx=[hn(()=>n.createElementVNode("div",null,"Ver →",-1))],wx=qe({__name:"GameItem",props:{game:{type:Object,default:()=>{}}},emits:["clickMatch"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{let l="";const d=Number(t.game.roundAbbreviationV2);if(l=Number.isNaN(d)?t.game.roundAbbreviationV2:`JOR ${d}`,t.game.game_status===4){const c=new Date(t.game.date_time_utc);l+=` • ${c.getDate()} ${$h[c.getMonth()]}`}return l}),i=n.computed(()=>t.game.schedule.replace(":00","")),o=n.computed(()=>[{id:t.game.home_team.team_id,teamLogo:t.game.home_team.logo,acronym:t.game.home_team.acronym,score:t.game.score[0]},{id:t.game.visiting_team.team_id,teamLogo:t.game.visiting_team.logo,acronym:t.game.visiting_team.acronym,score:t.game.score[1]}]);function r(){e("clickMatch")}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["game-item",{"is-live":s.game.is_live}])},[n.createElementVNode("div",ix,[n.createElementVNode("div",ox,n.toDisplayString(a.value),1),s.game.is_live?(n.openBlock(),n.createElementBlock("div",rx,[lx,n.createElementVNode("div",cx,n.toDisplayString(s.game.currentTimeLive||"0'"),1)])):s.game.game_status===4?(n.openBlock(),n.createElementBlock("div",dx,[n.createTextVNode(n.toDisplayString(i.value)+" ",1),hx])):(n.openBlock(),n.createElementBlock("div",ux,mx))]),n.createElementVNode("div",fx,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,c=>(n.openBlock(),n.createElementBlock("div",{key:c.id,class:"game-item__body__team"},[n.createElementVNode("div",px,[n.createElementVNode("img",{src:c.teamLogo,alt:"team-logo"},null,8,gx),n.createElementVNode("div",yx,n.toDisplayString(c.acronym),1)]),n.createElementVNode("div",bx,[n.withDirectives(n.createElementVNode("div",{class:"game-item__body__team__score__value"},n.toDisplayString(c.score||0),513),[[n.vShow,s.game.is_live||s.game.game_status!==4]])])]))),128))]),n.createElementVNode("div",{class:"game-item__footer",onClick:r},Sx)],2))}},[["__scopeId","data-v-8a08c1a3"]]),_x=qe({__name:"SwitchCustom",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref(null);n.watch(()=>t.modelValue,()=>{i()},{immediate:!0});function i(){a.value&&(a.value.checked=t.modelValue)}function o(r){e("update:modelValue",r.target.checked)}return n.onMounted(()=>{i()}),(r,l)=>(n.openBlock(),n.createElementBlock("input",{ref_key:"switchCustom",ref:a,id:"toggle",className:"toggle",type:"checkbox",role:"switch",name:"toggle",onInput:o},null,544))}},[["__scopeId","data-v-9e2bfbd7"]]);/**
29
29
  * Vue 3 Carousel 0.3.4
30
30
  * (c) 2024
31
31
  * @license MIT
32
- */const He={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Uh={itemsToShow:{default:He.itemsToShow,type:Number},itemsToScroll:{default:He.itemsToScroll,type:Number},wrapAround:{default:He.wrapAround,type:Boolean},throttle:{default:He.throttle,type:Number},snapAlign:{default:He.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:He.transition,type:Number},breakpoints:{default:He.breakpoints,type:Object},autoplay:{default:He.autoplay,type:Number},pauseAutoplayOnHover:{default:He.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:He.mouseDrag,type:Boolean},touchDrag:{default:He.touchDrag,type:Boolean},dir:{default:He.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:He.i18n,type:Object},settings:{default(){return{}},type:Object}};function kx({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:a,itemsToShow:i=1}=s;if(a)return Math.max(e-1,0);let o;switch(t){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function Ex({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:a,itemsToShow:i=1}=s;let o=0;if(t||i>e)return o;switch(a){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function Uo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function Tx({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:o=1}=s;let r=e;switch(a){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:Uo({val:r,max:t-o,min:0})}function zh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...zh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function zo({val:s,max:e,min:t=0}){return s>e?zo({val:s-(e+1),max:e,min:t}):s<t?zo({val:s+(e+1),max:e,min:t}):s}function Cx(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function xx(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function vx(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Ax=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},He))),e=n.inject("currentSlide",n.ref(0)),t=n.inject("slidesCount",n.ref(0));return()=>n.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},vx(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Lx=n.defineComponent({name:"Carousel",props:Uh,setup(s,{slots:e,emit:t,expose:a}){var i;const o=n.ref(null),r=n.ref([]),l=n.ref(0),d=n.ref(0),c=n.reactive(Object.assign({},He));let h=Object.assign({},He),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=n.ref(0),m=n.ref(0),g=n.ref(0),y=n.ref(0);let b,S;n.provide("config",c),n.provide("slidesCount",d),n.provide("currentSlide",f),n.provide("maxSlide",g),n.provide("minSlide",y),n.provide("slideWidth",l);function _(){u=Object.assign({},s.breakpoints),h=Object.assign(Object.assign(Object.assign({},h),s),{i18n:Object.assign(Object.assign({},h.i18n),s.i18n),breakpoints:void 0}),E(h)}function C(){if(!u||!Object.keys(u).length)return;const x=Object.keys(u).map(U=>Number(U)).sort((U,M)=>+M-+U);let j=Object.assign({},h);x.some(U=>{const M=window.matchMedia(`(min-width: ${U}px)`).matches;return M&&(j=Object.assign(Object.assign({},j),u[U])),M}),E(j)}function E(x){Object.entries(x).forEach(([j,U])=>c[j]=U)}const v=xx(()=>{C(),B(),T()},16);function T(){if(!o.value)return;const x=o.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function B(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),g.value=kx({config:c,slidesCount:d.value}),y.value=Ex({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Uo({val:f.value,max:g.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),q(),window.addEventListener("resize",v,{passive:!0}),t("init")}),n.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",v,{passive:!0})});let L=!1;const R={x:0,y:0},$={x:0,y:0},K=n.reactive({x:0,y:0}),z=n.ref(!1),ae=n.ref(!1),oe=()=>{z.value=!0},ie=()=>{z.value=!1};function ce(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(L=x.type==="touchstart",L||x.preventDefault(),!(!L&&x.button!==0||J.value)&&(R.x=L?x.touches[0].clientX:x.clientX,R.y=L?x.touches[0].clientY:x.clientY,document.addEventListener(L?"touchmove":"mousemove",de,!0),document.addEventListener(L?"touchend":"mouseup",Q,!0)))}const de=Cx(x=>{ae.value=!0,$.x=L?x.touches[0].clientX:x.clientX,$.y=L?x.touches[0].clientY:x.clientY;const j=$.x-R.x,U=$.y-R.y;K.y=U,K.x=j},c.throttle);function Q(){const x=c.dir==="rtl"?-1:1,j=Math.sign(K.x)*.4,U=Math.round(K.x/l.value+j)*x;if(U&&!L){const M=W=>{window.removeEventListener("click",M,!0)};window.addEventListener("click",M,!0)}Z(f.value-U),K.x=0,K.y=0,ae.value=!1,document.removeEventListener(L?"touchmove":"mousemove",de,!0),document.removeEventListener(L?"touchend":"mouseup",Q,!0)}function q(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&z.value||ue()},c.autoplay))}function he(){b&&(clearInterval(b),b=null),q()}const J=n.ref(!1);function Z(x){const j=c.wrapAround?x:Uo({val:x,max:g.value,min:y.value});f.value===j||J.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!0,p.value=f.value,f.value=j,S=setTimeout(()=>{if(c.wrapAround){const U=zo({val:j,max:g.value,min:0});U!==f.value&&(f.value=U,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!1,he()},c.transition))}function ue(){Z(f.value+c.itemsToScroll)}function ge(){Z(f.value-c.itemsToScroll)}const Ce={slideTo:Z,next:ue,prev:ge};n.provide("nav",Ce),n.provide("isSliding",J);const se=n.computed(()=>Tx({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",se);const Ee=n.computed(()=>{const x=c.dir==="rtl"?-1:1,j=se.value*l.value*x;return{transform:`translateX(${K.x-j}px)`,transition:`${J.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),B(),T(),he()}Object.keys(Uh).forEach(x=>{["modelValue"].includes(x)||n.watch(()=>s[x],Te)}),n.watch(()=>s.modelValue,x=>{x!==f.value&&Z(Number(x))}),n.watch(d,B),t("before-init"),_();const Fe={config:c,slidesCount:d,slideWidth:l,next:ue,prev:ge,slideTo:Z,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:C,updateSlidesData:B,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:Z,next:ue,prev:ge,nav:Ce,data:Fe});const et=e.default||e.slides,it=e.addons,ot=n.reactive(Fe);return()=>{const x=zh(et==null?void 0:et(ot)),j=(it==null?void 0:it(ot))||[];x.forEach((H,G)=>H.props.index=G);let U=x;if(c.wrapAround){const H=x.map((X,Y)=>n.cloneVNode(X,{index:-x.length+Y,isClone:!0,key:`clone-before-${Y}`})),G=x.map((X,Y)=>n.cloneVNode(X,{index:x.length+Y,isClone:!0,key:`clone-after-${Y}`}));U=[...H,...x,...G]}r.value=x,d.value=Math.max(x.length,1);const M=n.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ce:null,onTouchstartPassiveCapture:c.touchDrag?ce:null},U),W=n.h("div",{class:"carousel__viewport"},M);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":J.value,"is-dragging":ae.value,"is-hover":z.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ie},[W,j,n.h(Ax)])}}}),Go;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Go||(Go={}));const Ix={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function Rx(s){return s in Go}const jo=s=>{const e=n.inject("config",n.reactive(Object.assign({},He))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!Rx(t))return;const i=Ix[t],o=n.h("path",{d:i}),r=e.i18n[a]||s.title||t,l=n.h("title",r);return n.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":r},[l,o])};jo.props={name:String,title:String};const Bx=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},He))),r=n.inject("maxSlide",n.ref(1)),l=n.inject("minSlide",n.ref(1)),d=n.inject("currentSlide",n.ref(1)),c=n.inject("nav",{}),{dir:h,wrapAround:u,i18n:f}=o,p=h==="rtl",m=n.h("button",{type:"button",class:["carousel__prev",!u&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||n.h(jo,{name:p?"arrowRight":"arrowLeft"})),g=n.h("button",{type:"button",class:["carousel__next",!u&&d.value>=r.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(a==null?void 0:a())||n.h(jo,{name:p?"arrowLeft":"arrowRight"}));return[m,g]};var Nx=n.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=n.inject("config",n.reactive(Object.assign({},He))),a=n.inject("currentSlide",n.ref(0)),i=n.inject("slidesToScroll",n.ref(0)),o=n.inject("isSliding",n.ref(!1)),r=n.computed(()=>s.index===a.value),l=n.computed(()=>s.index===a.value-1),d=n.computed(()=>s.index===a.value+1),c=n.computed(()=>{const h=Math.floor(i.value),u=Math.ceil(i.value+t.itemsToShow-1);return s.index>=h&&s.index<=u});return()=>{var h;return n.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":r.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":o.value},"aria-hidden":!c.value},(h=e.default)===null||h===void 0?void 0:h.call(e,{isActive:r.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:o.value,isVisible:c.value}))}}});const Dx=qe({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=n.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),o=n.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function r(l){e("click-match-day",l)}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day",style:n.normalizeStyle({...a.value}),onClick:d[0]||(d[0]=c=>r(s.matchDay))},[n.createElementVNode("div",{class:"match-day__value",style:n.normalizeStyle(i.value)},n.toDisplayString(s.matchDay.valueText),5),Number.isNaN(s.matchDay.value)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"match-day__text",style:n.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",o.value])},n.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5))],4))}},[["__scopeId","data-v-e32ea7af"]]),Gh=qe({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;n.useCssVars(h=>({"11596bb3":r.value,11585473:l.value}));const a=n.ref(null),i=n.ref(-1),o=n.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),r=n.computed(()=>a.value.data.currentSlide.value===0?"none":"inline"),l=n.computed(()=>a.value.data.currentSlide.value===a.value.data.maxSlide.value?"none":"inline"),d=n.ref({});n.watch(()=>t.closestMatchDay,h=>{if(h){const u=t.matchDays.find(f=>f.key===h);c(u||t.matchDays[0],!0)}}),n.watch(()=>t.matchDays,h=>{if(!t.closestMatchDay&&h&&h.length){const u=h.find(f=>f.key===t.defaultMatchDayKey);i.value=h.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=u||h[0],e("change-match-day",d.value)}},{immediate:!0}),n.watch(()=>t.defaultMatchDayKey,h=>{if(h){let u=-1;const f=t.matchDays.find((p,m)=>p.key===h?(u=m,!0):!1);f&&(d.value=f),u>-1&&a.value&&a.value.slideTo(u)}});function c(h,u=!1){u&&a.value.slideTo(h.index),t.disableMatchdays?h.avaible==!0&&(d.value=h,e("change-match-day",d.value)):(d.value=h,e("change-match-day",d.value))}return(h,u)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day-picker",style:n.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(n.openBlock(),n.createBlock(n.unref(Lx),n.mergeProps(o.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:a,key:i.value}),{addons:n.withCtx(()=>[n.createVNode(n.unref(Bx))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,f=>(n.openBlock(),n.createBlock(n.unref(Nx),{key:f.key},{default:n.withCtx(()=>[n.createVNode(Dx,n.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-3930107a"]]),Px=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Ho(){return"https://az755631.vo.msecnd.net/golstats-app/"}function Ox(s){return Px[s]}function Fx(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function Wo(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,a=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":a.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function Mx(s){const[e,t]=s.split(","),a=e.split(" ");let i="";for(const o of a)if(i+=` ${o}`,o.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const qt=s=>(n.pushScopeId("data-v-189ece00"),s=s(),n.popScopeId(),s),$x={class:"quadrant-matches"},Vx={class:"quadrant-matches__header"},Ux={class:"quadrant-matches__header__pc"},zx={class:"title-and-switch"},Gx={class:"quadrant-matches__title"},jx=qt(()=>n.createElementVNode("span",null," →",-1)),Hx={key:0,class:"quadrant-matches__header__games-type"},Wx=qt(()=>n.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),Kx={class:"quadrant-matches__header__games-type__logo"},qx=["src"],Yx={class:"quadrant-matches__header__games-type__switch"},Jx={class:"quadrant-matches__header__games-type__logo"},Xx=["src"],Zx={key:0,class:"quadrant-matches__header__my-team"},Qx=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],ev={key:1,class:"quadrant-matches__header__my-team"},tv=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],sv={class:"quadrant-matches__header__mobile"},av=qt(()=>n.createElementVNode("span",null," →",-1)),nv=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],iv={key:0,class:"quadrant-matches__body"},ov={class:"quadrant-matches__view-more"},rv=["src"],lv={class:"quadrant-matches__body",style:{"column-gap":"16px"}},cv={class:"quadrant-matches__view-more"},dv=["src"],hv={class:"quadrant-matches__body matches"},uv={class:"quadrant-matches__view-more"},mv=["src"],fv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},pv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},gv=qe({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,a=Ho(),i=n.ref(!1),o=n.toRef(t,"componentWidth"),r=n.computed(()=>o.value<768);n.watch(i,h=>{e("change-is-league-selected",h)}),n.watch(()=>t.currentTournament,h=>{h&&(i.value=!h.id===t.user.tournament)});function l(h){e("change-match-day",h)}function d(h){i.value=h}function c(){i.value=!0,setTimeout(()=>{e("click-live")},500)}return(h,u)=>(n.openBlock(),n.createElementBlock("section",$x,[n.createElementVNode("div",Vx,[n.createElementVNode("div",Ux,[n.createElementVNode("div",zx,[n.createElementVNode("h2",Gx,n.toDisplayString((s.isFull,"Calendario")),1),n.createElementVNode("button",{class:"quadrant-matches__button",onClick:u[0]||(u[0]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("span",null,n.toDisplayString(s.isFull||i.value?"Calendario completo":"Mi calendario completo"),1),jx])]),s.isFull?s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",ev,[n.createElementVNode("div",{role:"button",class:"btn-live",onClick:c},tv)])):n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Hx,[Wx,n.createElementVNode("div",Kx,[s.user&&s.user.team?(n.openBlock(),n.createElementBlock("img",{key:0,src:`https://az755631.vo.msecnd.net/teams-80/${s.user.team}.png`},null,8,qx)):n.createCommentVNode("",!0)]),n.createElementVNode("div",Yx,[n.createVNode(_x,{"model-value":i.value,"onUpdate:modelValue":d},null,8,["model-value"])]),n.createElementVNode("div",Jx,[s.currentTournament&&s.currentTournament.id?(n.openBlock(),n.createElementBlock("img",{key:0,src:`https://az755631.vo.msecnd.net/todoelfut/${s.currentTournament.id}.png`},null,8,Xx)):n.createCommentVNode("",!0)]),s.currentTournament?(n.openBlock(),n.createElementBlock("div",Zx,[n.createElementVNode("div",null,n.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:c},Qx)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]))]),n.createElementVNode("div",sv,[n.createElementVNode("button",{class:"quadrant-matches__button",onClick:u[1]||(u[1]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("span",null,n.toDisplayString(s.isFull||i.value?"Calendario completo":"Mi calendario completo"),1),av]),s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:c},nv)):n.createCommentVNode("",!0)])]),(s.isFull||i.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(n.openBlock(),n.createBlock(Gh,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:l},null,8,["match-days","is-landing-mode","default-match-day-key"])):n.createCommentVNode("",!0),!s.isFull&&!i.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createBlock(n.unref(ea),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",lv,[n.createVNode(Ns,{small:"",data:s.data.data.prematch,onClickMatch:u[7]||(u[7]=f=>h.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(n.openBlock(),n.createBlock(dn,{key:0,data:s.data.data.postmatch,onClickMatch:u[8]||(u[8]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(dn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[9]||(u[9]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])),n.createElementVNode("div",cv,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[10]||(u[10]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,dv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[11]||(u[11]=f=>h.$emit("clickCalendar"))}," Ver más ")])])]),_:1})):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",iv,[n.createVNode(Ns,{data:s.data.data.prematch,onClickMatch:u[2]||(u[2]=f=>h.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(n.openBlock(),n.createBlock(dn,{key:0,data:s.data.data.postmatch,onClickMatch:u[3]||(u[3]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(dn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])),n.createElementVNode("div",ov,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[5]||(u[5]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,rv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[6]||(u[6]=f=>h.$emit("clickCalendar"))}," Ver más ")])])):n.createCommentVNode("",!0)],64))],64)):s.data?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[s.data.length>1?(n.openBlock(),n.createBlock(n.unref(ea),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",hv,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(f,p)=>(n.openBlock(),n.createBlock(wx,{key:p,game:f,onClickMatch:m=>h.$emit("clickMatch",f)},null,8,["game","onClickMatch"]))),128)),n.createElementVNode("div",uv,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[12]||(u[12]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,mv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[13]||(u[13]=f=>h.$emit("clickCalendar"))}," Ver más ")])])]),_:1})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",pv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Ns,{key:0,data:s.data[0],small:"",onClickMatch:u[16]||(u[16]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Ns,{key:1,data:s.data[0],small:"",onClickMatch:u[17]||(u[17]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",fv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Ns,{key:0,data:s.data[0],small:"",onClickMatch:u[14]||(u[14]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Ns,{key:1,data:s.data[0],small:"",onClickMatch:u[15]||(u[15]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64))],64))],64)):n.createCommentVNode("",!0)]))}},[["__scopeId","data-v-189ece00"]]),yv={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(n.openBlock(),n.createElementBlock("main",null,[n.createVNode(gv,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=a=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=a=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=a=>e.$emit("clickMatch",a)),onChangeMatchDay:t[3]||(t[3]=a=>e.$emit("change-match-day",a)),onChangeIsLeagueSelected:t[4]||(t[4]=a=>e.$emit("change-is-league-selected",a))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-tournament","is-live-button-visible"])]))}},bv="_toniKroos_ov00i_18",Sv="_centralMidfielder_ov00i_28",wv="_icnPlayIcon_ov00i_38",_v="_verVideos_ov00i_45",kv="_btnVideosOptions_ov00i_55",Ev="_btnVideosOptionsTeams_ov00i_70",Tv="_info_ov00i_90",Cv="_goalUnlock_ov00i_102",xv="_teamsAmerica_ov00i_115",vv="_imageIcon_ov00i_125",Av="_imageIconTeam_ov00i_136",Lv="_playerTops_ov00i_148",Iv={toniKroos:bv,centralMidfielder:Sv,icnPlayIcon:wv,verVideos:_v,btnVideosOptions:kv,btnVideosOptionsTeams:Ev,info:Tv,goalUnlock:Cv,teamsAmerica:xv,imageIcon:vv,imageIconTeam:Av,playerTops:Lv},Rv=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Bv={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},Nv=["src"],Dv=["src"],Pv=["src"];function Ov(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(s.$style.playerTops),style:n.normalizeStyle(o.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=r=>o.onPlayerTopsClick(t.data.player_id))},[n.createElementVNode("div",{class:n.normalizeClass(s.$style.info)},[n.createElementVNode("h3",{class:n.normalizeClass(s.$style.toniKroos),style:n.normalizeStyle(o.customNamePlayer)},n.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(s.$style.centralMidfielder),style:n.normalizeStyle(o.customNamePosition)},n.toDisplayString(t.data.player_position),7)):n.createCommentVNode("",!0),n.createElementVNode("button",{class:n.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:n.normalizeStyle(o.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=r=>o.onButtonVideos(t.data))},[t.showIconVideo?(n.openBlock(),n.createElementBlock("img",{key:0,class:n.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,Nv)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(s.$style.verVideos),style:n.normalizeStyle(o.customTotal)},n.toDisplayString(t.data.player_stat)+" "+n.toDisplayString(t.data.category),7)],6)],2),n.createElementVNode("b",{style:n.normalizeStyle(o.customNumberTop),class:n.normalizeClass(s.$style.goalUnlock)},n.toDisplayString(t.data.top),7),t.showShieldTeam?(n.openBlock(),n.createElementBlock("img",{key:0,class:n.normalizeClass(s.$style.teamsAmerica),style:n.normalizeStyle(o.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,Dv)):n.createCommentVNode("",!0),n.createElementVNode("img",{style:n.normalizeStyle(o.customPhotoPlayerOrTeam),class:n.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,Pv)],6)}const Fv={$style:Iv},Mv=Rv(Bv,[["render",Ov],["__cssModules",Fv]]),$v=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Ko={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jh=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Hh=Ko.setup;Ko.setup=Hh?(s,e)=>(jh(),Hh(s,e)):jh;const Vv=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),Uv=["src"],zv={key:1,class:"text"},Gv=["src"],jv={class:"stats"},Hv=Vv(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Wv={class:"numstats"},Kv={class:"leyend"};function qv(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Uv)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",zv,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Gv)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",jv,[Hv,n.createElementVNode("div",Wv,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",Kv,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const Yv=$v(Ko,[["render",qv],["__scopeId","data-v-fb269a1e"]]);function Jv(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const qo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},Wh=()=>{n.useCssVars(s=>({"2bf57034":s.backgroundColor,b8f32872:s.widthCircle,23023166:s.heightCircle}))},Kh=qo.setup;qo.setup=Kh?(s,e)=>(Wh(),Kh(s,e)):Wh;const Xv={key:0,class:"text-left"},Zv=["width","src"],Qv=["checked"],eA=["width","src"],tA={key:3,class:"text-right"};function sA(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{class:"gsc-switch-radio",style:n.normalizeStyle(o.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",Xv,n.toDisplayString(t.textOptionLeft),1)):n.createCommentVNode("",!0),t.iconA!=""?(n.openBlock(),n.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,Zv)):n.createCommentVNode("",!0),n.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...r)=>o.handleSwitchChange&&o.handleSwitchChange(...r)),checked:i.OptionDefault},null,40,Qv),n.createElementVNode("label",{for:"toggle-btn",style:n.normalizeStyle([o.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(n.openBlock(),n.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,eA)):n.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",tA,n.toDisplayString(t.textOptionRight),1)):n.createCommentVNode("",!0)],4)}const Yo={components:{GSCSlider:ea,GSCMosaicthebest:Mv,GscSwitchComponent:go,GSCButton:Yv,GSCRadioToggle:qe(qo,[["render",sA],["__scopeId","data-v-c2ae0cf9"]])},setup(){const s=n.ref("myDivRef"),{elementSize:e}=Jv(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var a;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(a=e[0])==null?void 0:a.trim().split(" ");for(let o of i)if(t=`${t} ${o.trim()}`,o.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,a=3;let i=[],o=0,r=0;this.isTeam?(o=s.player_id,r=a):(i=[s.player_id],r=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:r,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:o,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let o={},r={},l=[];const d=ve.create({headers:{Authorization:`${this.token}`}});var a={};if(e==0&&(a=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(a=await d.get(this.url+s)),a.data.players.length==0?this.showTops=!1:this.showTops=!0,a&&a.data){a.data.teams.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[3],o[c[0]].abrv=c[2],o[c[0]].logo=c[3]}),a.data.players.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[2],r[c[0]].position=c[6],r[c[0]].minutes=c[13],r[c[0]].logo="https://az755631.vo.msecnd.net/teams-80/"+c[10][0].team_id+".png"});var i=1;a.data.tops.map(c=>{l[c.category?c.category:i]={};var h={},u={};c.teams.map(m=>{h[m[0]]={},h[m[0]].total=m[1],h[m[0]].id=o[m[0]].id,h[m[0]].name=o[m[0]].name,h[m[0]].img="https://az755631.vo.msecnd.net/teams-150/"+m[0]+".png",h[m[0]].logo="https://az755631.vo.msecnd.net/teams-80/"+m[0]+".png"}),c.players.map(m=>{u[m[0]]={},u[m[0]].minutes=r[m[0]].minutes,u[m[0]].total=m[1],u[m[0]].name=r[m[0]].name,u[m[0]].img=r[m[0]].img.replace("players-profile/","players-profile/"),u[m[0]].id=r[m[0]].id,u[m[0]].position=this.tournamentSelected.is_female==1?this.positions[r[m[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[r[m[0]].position-1].name,u[m[0]].logo=r[m[0]].logo});var f=[],p=[];for(const m in h)f.push(h[m]);for(const m in u)p.push(u[m]);f.sort((m,g)=>m.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(o){return Promise.reject(o)}}}},qh=()=>{n.useCssVars(s=>({adfeba70:s.backgroundColor,"2e79f680":s.fontFamily,"0f73305d":s.fontSize,"43d82af2":s.fontColor,"675d9676":s.marginMosaic}))},Yh=Yo.setup;Yo.setup=Yh?(s,e)=>(qh(),Yh(s,e)):qh;const aA={key:0,class:"gsc-best",ref:"myDivRef"},nA={class:"gsc-best__line-bar-tools"},iA={key:0,class:"gsc-best__line-bar-tools__title"},oA={key:1,class:"gsc-best__line-bar-tools__titlefull"},rA={class:"unit-items"},lA={key:2,class:"gsc-best__line-bar-tools__tools"},cA={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},dA={key:1,class:"gsc-best__line-bar-tools__tools__btn"},hA={key:0,class:"gsc-best__line-bar-tools-movil"},uA={class:"gsc-best__line-bar-tools-movil__tabs"},mA={class:"gsc-best__categories"},fA={class:"gsc-best__players"};function pA(s,e,t,a,i,o){const r=n.resolveComponent("GSCRadioToggle"),l=n.resolveComponent("GSCButton"),d=n.resolveComponent("GscSwitchComponent"),c=n.resolveComponent("GSCMosaicthebest"),h=n.resolveComponent("GSCSlider");return s.showTops?(n.openBlock(),n.createElementBlock("div",aA,[n.createElementVNode("div",nA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",iA,[n.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Las mejores")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(n.openBlock(),n.createBlock(r,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://az755631.vo.msecnd.net/teams-150/"+t.teamId+".png",iconB:"https://az755631.vo.msecnd.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:o.ChangeRadio},null,8,["iconA","onChange"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),a.elementSize.width<=900?(n.openBlock(),n.createElementBlock("div",oA,[n.createElementVNode("span",{style:n.normalizeStyle(a.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Las mejores")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Los mejores")],64))],4),n.createElementVNode("span",rA,[s.optionSelected!=="Equipos"&&t.showSwitch?(n.openBlock(),n.createBlock(r,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://az755631.vo.msecnd.net/teams-150/"+t.teamId+".png",iconB:"https://az755631.vo.msecnd.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:o.ChangeRadio},null,8,["iconA","onChange"])):n.createCommentVNode("",!0),a.elementSize.width<=900?(n.openBlock(),n.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":a.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":a.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:o.clickMore},null,8,["font-color","font-size","onClick"])):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",lA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",cA,[t.showSelect?(n.openBlock(),n.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:o.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),t.showMore?(n.openBlock(),n.createElementBlock("div",dA,[n.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:o.clickMore},null,8,["onClick"]),n.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:o.clickMore},null,8,["onClick"])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),a.elementSize.width<=900&&t.showSelect?(n.openBlock(),n.createElementBlock("div",hA,[n.createElementVNode("div",uA,[t.showSelect?(n.openBlock(),n.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:o.changeType},null,8,["buttons","selected-option","onInput"])):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),n.createElementVNode("div",mA,[n.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":a.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:o.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),n.createElementVNode("div",fA,[n.createVNode(h,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.topData,(u,f)=>(n.openBlock(),n.createElementBlock("div",{key:f,class:n.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[n.createVNode(c,{data:{player_id:u.id,player_name:this.isTeam?u.name:o.formatPlayerName(u.name),player_position:u.position,player_stat:u.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:u.logo,player_photo:u.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:o.clickMosaic,onOpenmedia:o.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):n.createCommentVNode("",!0)}const gA=qe(Yo,[["render",pA],["__scopeId","data-v-51e267e2"]]);/**
32
+ */const He={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Uh={itemsToShow:{default:He.itemsToShow,type:Number},itemsToScroll:{default:He.itemsToScroll,type:Number},wrapAround:{default:He.wrapAround,type:Boolean},throttle:{default:He.throttle,type:Number},snapAlign:{default:He.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:He.transition,type:Number},breakpoints:{default:He.breakpoints,type:Object},autoplay:{default:He.autoplay,type:Number},pauseAutoplayOnHover:{default:He.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:He.mouseDrag,type:Boolean},touchDrag:{default:He.touchDrag,type:Boolean},dir:{default:He.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:He.i18n,type:Object},settings:{default(){return{}},type:Object}};function kx({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:a,itemsToShow:i=1}=s;if(a)return Math.max(e-1,0);let o;switch(t){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function Ex({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:a,itemsToShow:i=1}=s;let o=0;if(t||i>e)return o;switch(a){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function Uo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function Tx({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:o=1}=s;let r=e;switch(a){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:Uo({val:r,max:t-o,min:0})}function zh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...zh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function zo({val:s,max:e,min:t=0}){return s>e?zo({val:s-(e+1),max:e,min:t}):s<t?zo({val:s+(e+1),max:e,min:t}):s}function Cx(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function xx(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function vx(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Ax=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},He))),e=n.inject("currentSlide",n.ref(0)),t=n.inject("slidesCount",n.ref(0));return()=>n.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},vx(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Lx=n.defineComponent({name:"Carousel",props:Uh,setup(s,{slots:e,emit:t,expose:a}){var i;const o=n.ref(null),r=n.ref([]),l=n.ref(0),d=n.ref(0),c=n.reactive(Object.assign({},He));let h=Object.assign({},He),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=n.ref(0),m=n.ref(0),g=n.ref(0),y=n.ref(0);let b,S;n.provide("config",c),n.provide("slidesCount",d),n.provide("currentSlide",f),n.provide("maxSlide",g),n.provide("minSlide",y),n.provide("slideWidth",l);function _(){u=Object.assign({},s.breakpoints),h=Object.assign(Object.assign(Object.assign({},h),s),{i18n:Object.assign(Object.assign({},h.i18n),s.i18n),breakpoints:void 0}),E(h)}function C(){if(!u||!Object.keys(u).length)return;const x=Object.keys(u).map(U=>Number(U)).sort((U,M)=>+M-+U);let j=Object.assign({},h);x.some(U=>{const M=window.matchMedia(`(min-width: ${U}px)`).matches;return M&&(j=Object.assign(Object.assign({},j),u[U])),M}),E(j)}function E(x){Object.entries(x).forEach(([j,U])=>c[j]=U)}const v=xx(()=>{C(),B(),T()},16);function T(){if(!o.value)return;const x=o.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function B(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),g.value=kx({config:c,slidesCount:d.value}),y.value=Ex({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Uo({val:f.value,max:g.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),q(),window.addEventListener("resize",v,{passive:!0}),t("init")}),n.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",v,{passive:!0})});let L=!1;const R={x:0,y:0},$={x:0,y:0},K=n.reactive({x:0,y:0}),z=n.ref(!1),ae=n.ref(!1),oe=()=>{z.value=!0},ie=()=>{z.value=!1};function ce(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(L=x.type==="touchstart",L||x.preventDefault(),!(!L&&x.button!==0||J.value)&&(R.x=L?x.touches[0].clientX:x.clientX,R.y=L?x.touches[0].clientY:x.clientY,document.addEventListener(L?"touchmove":"mousemove",de,!0),document.addEventListener(L?"touchend":"mouseup",Q,!0)))}const de=Cx(x=>{ae.value=!0,$.x=L?x.touches[0].clientX:x.clientX,$.y=L?x.touches[0].clientY:x.clientY;const j=$.x-R.x,U=$.y-R.y;K.y=U,K.x=j},c.throttle);function Q(){const x=c.dir==="rtl"?-1:1,j=Math.sign(K.x)*.4,U=Math.round(K.x/l.value+j)*x;if(U&&!L){const M=W=>{window.removeEventListener("click",M,!0)};window.addEventListener("click",M,!0)}Z(f.value-U),K.x=0,K.y=0,ae.value=!1,document.removeEventListener(L?"touchmove":"mousemove",de,!0),document.removeEventListener(L?"touchend":"mouseup",Q,!0)}function q(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&z.value||ue()},c.autoplay))}function he(){b&&(clearInterval(b),b=null),q()}const J=n.ref(!1);function Z(x){const j=c.wrapAround?x:Uo({val:x,max:g.value,min:y.value});f.value===j||J.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!0,p.value=f.value,f.value=j,S=setTimeout(()=>{if(c.wrapAround){const U=zo({val:j,max:g.value,min:0});U!==f.value&&(f.value=U,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!1,he()},c.transition))}function ue(){Z(f.value+c.itemsToScroll)}function ge(){Z(f.value-c.itemsToScroll)}const Ce={slideTo:Z,next:ue,prev:ge};n.provide("nav",Ce),n.provide("isSliding",J);const se=n.computed(()=>Tx({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",se);const Ee=n.computed(()=>{const x=c.dir==="rtl"?-1:1,j=se.value*l.value*x;return{transform:`translateX(${K.x-j}px)`,transition:`${J.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),B(),T(),he()}Object.keys(Uh).forEach(x=>{["modelValue"].includes(x)||n.watch(()=>s[x],Te)}),n.watch(()=>s.modelValue,x=>{x!==f.value&&Z(Number(x))}),n.watch(d,B),t("before-init"),_();const Fe={config:c,slidesCount:d,slideWidth:l,next:ue,prev:ge,slideTo:Z,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:C,updateSlidesData:B,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:Z,next:ue,prev:ge,nav:Ce,data:Fe});const et=e.default||e.slides,it=e.addons,ot=n.reactive(Fe);return()=>{const x=zh(et==null?void 0:et(ot)),j=(it==null?void 0:it(ot))||[];x.forEach((H,G)=>H.props.index=G);let U=x;if(c.wrapAround){const H=x.map((X,Y)=>n.cloneVNode(X,{index:-x.length+Y,isClone:!0,key:`clone-before-${Y}`})),G=x.map((X,Y)=>n.cloneVNode(X,{index:x.length+Y,isClone:!0,key:`clone-after-${Y}`}));U=[...H,...x,...G]}r.value=x,d.value=Math.max(x.length,1);const M=n.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ce:null,onTouchstartPassiveCapture:c.touchDrag?ce:null},U),W=n.h("div",{class:"carousel__viewport"},M);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":J.value,"is-dragging":ae.value,"is-hover":z.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ie},[W,j,n.h(Ax)])}}}),Go;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Go||(Go={}));const Ix={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function Rx(s){return s in Go}const jo=s=>{const e=n.inject("config",n.reactive(Object.assign({},He))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!Rx(t))return;const i=Ix[t],o=n.h("path",{d:i}),r=e.i18n[a]||s.title||t,l=n.h("title",r);return n.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":r},[l,o])};jo.props={name:String,title:String};const Bx=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},He))),r=n.inject("maxSlide",n.ref(1)),l=n.inject("minSlide",n.ref(1)),d=n.inject("currentSlide",n.ref(1)),c=n.inject("nav",{}),{dir:h,wrapAround:u,i18n:f}=o,p=h==="rtl",m=n.h("button",{type:"button",class:["carousel__prev",!u&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||n.h(jo,{name:p?"arrowRight":"arrowLeft"})),g=n.h("button",{type:"button",class:["carousel__next",!u&&d.value>=r.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(a==null?void 0:a())||n.h(jo,{name:p?"arrowLeft":"arrowRight"}));return[m,g]};var Nx=n.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=n.inject("config",n.reactive(Object.assign({},He))),a=n.inject("currentSlide",n.ref(0)),i=n.inject("slidesToScroll",n.ref(0)),o=n.inject("isSliding",n.ref(!1)),r=n.computed(()=>s.index===a.value),l=n.computed(()=>s.index===a.value-1),d=n.computed(()=>s.index===a.value+1),c=n.computed(()=>{const h=Math.floor(i.value),u=Math.ceil(i.value+t.itemsToShow-1);return s.index>=h&&s.index<=u});return()=>{var h;return n.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":r.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":o.value},"aria-hidden":!c.value},(h=e.default)===null||h===void 0?void 0:h.call(e,{isActive:r.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:o.value,isVisible:c.value}))}}});const Dx=qe({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,a=n.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=n.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),o=n.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function r(l){e("click-match-day",l)}return(l,d)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day",style:n.normalizeStyle({...a.value}),onClick:d[0]||(d[0]=c=>r(s.matchDay))},[n.createElementVNode("div",{class:"match-day__value",style:n.normalizeStyle(i.value)},n.toDisplayString(s.matchDay.valueText),5),Number.isNaN(s.matchDay.value)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"match-day__text",style:n.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",o.value])},n.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5))],4))}},[["__scopeId","data-v-1ef250cb"]]),Gh=qe({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;n.useCssVars(h=>({"179f4a74":r.value,"17a178f4":l.value}));const a=n.ref(null),i=n.ref(-1),o=n.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),r=n.computed(()=>a.value.data.currentSlide.value===0?"none":"inline"),l=n.computed(()=>a.value.data.currentSlide.value===a.value.data.maxSlide.value?"none":"inline"),d=n.ref({});n.watch(()=>t.closestMatchDay,h=>{if(h){const u=t.matchDays.find(f=>f.key===h);c(u||t.matchDays[0],!0)}}),n.watch(()=>t.matchDays,h=>{if(!t.closestMatchDay&&h&&h.length){const u=h.find(f=>f.key===t.defaultMatchDayKey);i.value=h.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=u||h[0],e("change-match-day",d.value)}},{immediate:!0}),n.watch(()=>t.defaultMatchDayKey,h=>{if(h){let u=-1;const f=t.matchDays.find((p,m)=>p.key===h?(u=m,!0):!1);f&&(d.value=f),u>-1&&a.value&&a.value.slideTo(u)}});function c(h,u=!1){u&&a.value.slideTo(h.index),t.disableMatchdays?h.avaible==!0&&(d.value=h,e("change-match-day",d.value)):(d.value=h,e("change-match-day",d.value))}return(h,u)=>(n.openBlock(),n.createElementBlock("div",{class:"match-day-picker",style:n.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(n.openBlock(),n.createBlock(n.unref(Lx),n.mergeProps(o.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:a,key:i.value}),{addons:n.withCtx(()=>[n.createVNode(n.unref(Bx))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,f=>(n.openBlock(),n.createBlock(n.unref(Nx),{key:f.key},{default:n.withCtx(()=>[n.createVNode(Dx,n.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-d4bf2975"]]),Px=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Ho(){return"https://az755631.vo.msecnd.net/golstats-app/"}function Ox(s){return Px[s]}function Fx(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function Wo(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,a=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":a.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function Mx(s){const[e,t]=s.split(","),a=e.split(" ");let i="";for(const o of a)if(i+=` ${o}`,o.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const qt=s=>(n.pushScopeId("data-v-34517377"),s=s(),n.popScopeId(),s),$x={class:"quadrant-matches"},Vx={class:"quadrant-matches__header"},Ux={class:"quadrant-matches__header__pc"},zx={class:"title-and-switch"},Gx={class:"quadrant-matches__title"},jx=qt(()=>n.createElementVNode("span",null," →",-1)),Hx={key:0,class:"quadrant-matches__header__games-type"},Wx=qt(()=>n.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),Kx={class:"quadrant-matches__header__games-type__logo"},qx=["src"],Yx={class:"quadrant-matches__header__games-type__switch"},Jx={class:"quadrant-matches__header__games-type__logo"},Xx=["src"],Zx={key:0,class:"quadrant-matches__header__my-team"},Qx=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],ev={key:1,class:"quadrant-matches__header__my-team"},tv=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],sv={class:"quadrant-matches__header__mobile"},av=qt(()=>n.createElementVNode("span",null," →",-1)),nv=[qt(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),qt(()=>n.createElementVNode("span",null,"LIVE",-1))],iv={key:0,class:"quadrant-matches__body"},ov={class:"quadrant-matches__view-more"},rv=["src"],lv={class:"quadrant-matches__body",style:{"column-gap":"16px"}},cv={class:"quadrant-matches__view-more"},dv=["src"],hv={class:"quadrant-matches__body matches"},uv={class:"quadrant-matches__view-more"},mv=["src"],fv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},pv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},gv=qe({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,a=Ho(),i=n.ref(!1),o=n.toRef(t,"componentWidth"),r=n.computed(()=>o.value<768);n.watch(i,h=>{e("change-is-league-selected",h)}),n.watch(()=>t.currentTournament,h=>{h&&(i.value=!h.id===t.user.tournament)});function l(h){e("change-match-day",h)}function d(h){i.value=h}function c(){i.value=!0,setTimeout(()=>{e("click-live")},500)}return(h,u)=>(n.openBlock(),n.createElementBlock("section",$x,[n.createElementVNode("div",Vx,[n.createElementVNode("div",Ux,[n.createElementVNode("div",zx,[n.createElementVNode("h2",Gx,n.toDisplayString((s.isFull,"Calendario")),1),n.createElementVNode("button",{class:"quadrant-matches__button",onClick:u[0]||(u[0]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("span",null,n.toDisplayString(s.isFull||i.value?"Calendario completo":"Mi calendario completo"),1),jx])]),s.isFull?s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",ev,[n.createElementVNode("div",{role:"button",class:"btn-live",onClick:c},tv)])):n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Hx,[Wx,n.createElementVNode("div",Kx,[s.user&&s.user.team?(n.openBlock(),n.createElementBlock("img",{key:0,src:`https://az755631.vo.msecnd.net/teams-80/${s.user.team}.png`},null,8,qx)):n.createCommentVNode("",!0)]),n.createElementVNode("div",Yx,[n.createVNode(_x,{"model-value":i.value,"onUpdate:modelValue":d},null,8,["model-value"])]),n.createElementVNode("div",Jx,[s.currentTournament&&s.currentTournament.id?(n.openBlock(),n.createElementBlock("img",{key:0,src:`https://az755631.vo.msecnd.net/todoelfut/${s.currentTournament.id}.png`},null,8,Xx)):n.createCommentVNode("",!0)]),s.currentTournament?(n.openBlock(),n.createElementBlock("div",Zx,[n.createElementVNode("div",null,n.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:c},Qx)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]))]),n.createElementVNode("div",sv,[n.createElementVNode("button",{class:"quadrant-matches__button",onClick:u[1]||(u[1]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("span",null,n.toDisplayString(s.isFull||i.value?"Calendario completo":"Mi calendario completo"),1),av]),s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:c},nv)):n.createCommentVNode("",!0)])]),(s.isFull||i.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(n.openBlock(),n.createBlock(Gh,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:l},null,8,["match-days","is-landing-mode","default-match-day-key"])):n.createCommentVNode("",!0),!s.isFull&&!i.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createBlock(n.unref(ea),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",lv,[n.createVNode(Ns,{small:"",data:s.data.data.prematch,onClickMatch:u[7]||(u[7]=f=>h.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(n.openBlock(),n.createBlock(dn,{key:0,data:s.data.data.postmatch,onClickMatch:u[8]||(u[8]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(dn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[9]||(u[9]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])),n.createElementVNode("div",cv,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[10]||(u[10]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,dv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[11]||(u[11]=f=>h.$emit("clickCalendar"))}," Ver más ")])])]),_:1})):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",iv,[n.createVNode(Ns,{data:s.data.data.prematch,onClickMatch:u[2]||(u[2]=f=>h.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(n.openBlock(),n.createBlock(dn,{key:0,data:s.data.data.postmatch,onClickMatch:u[3]||(u[3]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(dn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=f=>h.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])),n.createElementVNode("div",ov,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[5]||(u[5]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,rv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[6]||(u[6]=f=>h.$emit("clickCalendar"))}," Ver más ")])])):n.createCommentVNode("",!0)],64))],64)):s.data?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[s.data.length>1?(n.openBlock(),n.createBlock(n.unref(ea),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createElementVNode("div",hv,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(f,p)=>(n.openBlock(),n.createBlock(wx,{key:p,game:f,onClickMatch:m=>h.$emit("clickMatch",f)},null,8,["game","onClickMatch"]))),128)),n.createElementVNode("div",uv,[n.createElementVNode("div",{class:"quadrant-matches__view-more__icon",onClick:u[12]||(u[12]=f=>h.$emit("clickCalendar"))},[n.createElementVNode("img",{src:`${n.unref(a)}calendario.svg`,alt:""},null,8,mv)]),n.createElementVNode("div",{class:"quadrant-matches__view-more__button",onClick:u[13]||(u[13]=f=>h.$emit("clickCalendar"))}," Ver más ")])])]),_:1})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",pv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Ns,{key:0,data:s.data[0],small:"",onClickMatch:u[16]||(u[16]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Ns,{key:1,data:s.data[0],small:"",onClickMatch:u[17]||(u[17]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",fv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Ns,{key:0,data:s.data[0],small:"",onClickMatch:u[14]||(u[14]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Ns,{key:1,data:s.data[0],small:"",onClickMatch:u[15]||(u[15]=f=>h.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64))],64))],64)):n.createCommentVNode("",!0)]))}},[["__scopeId","data-v-34517377"]]),yv={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(n.openBlock(),n.createElementBlock("main",null,[n.createVNode(gv,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=a=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=a=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=a=>e.$emit("clickMatch",a)),onChangeMatchDay:t[3]||(t[3]=a=>e.$emit("change-match-day",a)),onChangeIsLeagueSelected:t[4]||(t[4]=a=>e.$emit("change-is-league-selected",a))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-tournament","is-live-button-visible"])]))}},bv="_toniKroos_ov00i_18",Sv="_centralMidfielder_ov00i_28",wv="_icnPlayIcon_ov00i_38",_v="_verVideos_ov00i_45",kv="_btnVideosOptions_ov00i_55",Ev="_btnVideosOptionsTeams_ov00i_70",Tv="_info_ov00i_90",Cv="_goalUnlock_ov00i_102",xv="_teamsAmerica_ov00i_115",vv="_imageIcon_ov00i_125",Av="_imageIconTeam_ov00i_136",Lv="_playerTops_ov00i_148",Iv={toniKroos:bv,centralMidfielder:Sv,icnPlayIcon:wv,verVideos:_v,btnVideosOptions:kv,btnVideosOptionsTeams:Ev,info:Tv,goalUnlock:Cv,teamsAmerica:xv,imageIcon:vv,imageIconTeam:Av,playerTops:Lv},Rv=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Bv={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},Nv=["src"],Dv=["src"],Pv=["src"];function Ov(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(s.$style.playerTops),style:n.normalizeStyle(o.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=r=>o.onPlayerTopsClick(t.data.player_id))},[n.createElementVNode("div",{class:n.normalizeClass(s.$style.info)},[n.createElementVNode("h3",{class:n.normalizeClass(s.$style.toniKroos),style:n.normalizeStyle(o.customNamePlayer)},n.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(s.$style.centralMidfielder),style:n.normalizeStyle(o.customNamePosition)},n.toDisplayString(t.data.player_position),7)):n.createCommentVNode("",!0),n.createElementVNode("button",{class:n.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:n.normalizeStyle(o.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=r=>o.onButtonVideos(t.data))},[t.showIconVideo?(n.openBlock(),n.createElementBlock("img",{key:0,class:n.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,Nv)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(s.$style.verVideos),style:n.normalizeStyle(o.customTotal)},n.toDisplayString(t.data.player_stat)+" "+n.toDisplayString(t.data.category),7)],6)],2),n.createElementVNode("b",{style:n.normalizeStyle(o.customNumberTop),class:n.normalizeClass(s.$style.goalUnlock)},n.toDisplayString(t.data.top),7),t.showShieldTeam?(n.openBlock(),n.createElementBlock("img",{key:0,class:n.normalizeClass(s.$style.teamsAmerica),style:n.normalizeStyle(o.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,Dv)):n.createCommentVNode("",!0),n.createElementVNode("img",{style:n.normalizeStyle(o.customPhotoPlayerOrTeam),class:n.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,Pv)],6)}const Fv={$style:Iv},Mv=Rv(Bv,[["render",Ov],["__cssModules",Fv]]),$v=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Ko={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jh=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Hh=Ko.setup;Ko.setup=Hh?(s,e)=>(jh(),Hh(s,e)):jh;const Vv=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),Uv=["src"],zv={key:1,class:"text"},Gv=["src"],jv={class:"stats"},Hv=Vv(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Wv={class:"numstats"},Kv={class:"leyend"};function qv(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Uv)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",zv,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Gv)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",jv,[Hv,n.createElementVNode("div",Wv,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",Kv,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const Yv=$v(Ko,[["render",qv],["__scopeId","data-v-fb269a1e"]]);function Jv(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const qo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},Wh=()=>{n.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},Kh=qo.setup;qo.setup=Kh?(s,e)=>(Wh(),Kh(s,e)):Wh;const Xv={key:0,class:"text-left"},Zv=["width","src"],Qv=["checked"],eA=["width","src"],tA={key:3,class:"text-right"};function sA(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{class:"gsc-switch-radio",style:n.normalizeStyle(o.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",Xv,n.toDisplayString(t.textOptionLeft),1)):n.createCommentVNode("",!0),t.iconA!=""?(n.openBlock(),n.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,Zv)):n.createCommentVNode("",!0),n.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...r)=>o.handleSwitchChange&&o.handleSwitchChange(...r)),checked:i.OptionDefault},null,40,Qv),n.createElementVNode("label",{for:"toggle-btn",style:n.normalizeStyle([o.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(n.openBlock(),n.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,eA)):n.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",tA,n.toDisplayString(t.textOptionRight),1)):n.createCommentVNode("",!0)],4)}const Yo={components:{GSCSlider:ea,GSCMosaicthebest:Mv,GscSwitchComponent:go,GSCButton:Yv,GSCRadioToggle:qe(qo,[["render",sA],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=n.ref("myDivRef"),{elementSize:e}=Jv(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var a;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(a=e[0])==null?void 0:a.trim().split(" ");for(let o of i)if(t=`${t} ${o.trim()}`,o.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,a=3;let i=[],o=0,r=0;this.isTeam?(o=s.player_id,r=a):(i=[s.player_id],r=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:r,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:o,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let o={},r={},l=[];const d=ve.create({headers:{Authorization:`${this.token}`}});var a={};if(e==0&&(a=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(a=await d.get(this.url+s)),a.data.players.length==0?this.showTops=!1:this.showTops=!0,a&&a.data){a.data.teams.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[3],o[c[0]].abrv=c[2],o[c[0]].logo=c[3]}),a.data.players.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[2],r[c[0]].position=c[6],r[c[0]].minutes=c[13],r[c[0]].logo="https://az755631.vo.msecnd.net/teams-80/"+c[10][0].team_id+".png"});var i=1;a.data.tops.map(c=>{l[c.category?c.category:i]={};var h={},u={};c.teams.map(m=>{h[m[0]]={},h[m[0]].total=m[1],h[m[0]].id=o[m[0]].id,h[m[0]].name=o[m[0]].name,h[m[0]].img="https://az755631.vo.msecnd.net/teams-150/"+m[0]+".png",h[m[0]].logo="https://az755631.vo.msecnd.net/teams-80/"+m[0]+".png"}),c.players.map(m=>{u[m[0]]={},u[m[0]].minutes=r[m[0]].minutes,u[m[0]].total=m[1],u[m[0]].name=r[m[0]].name,u[m[0]].img=r[m[0]].img.replace("players-profile/","players-profile/"),u[m[0]].id=r[m[0]].id,u[m[0]].position=this.tournamentSelected.is_female==1?this.positions[r[m[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[r[m[0]].position-1].name,u[m[0]].logo=r[m[0]].logo});var f=[],p=[];for(const m in h)f.push(h[m]);for(const m in u)p.push(u[m]);f.sort((m,g)=>m.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(o){return Promise.reject(o)}}}},qh=()=>{n.useCssVars(s=>({bf4b4102:s.backgroundColor,b4141cae:s.fontFamily,"0b1e4386":s.fontSize,"57cb3c7e":s.fontColor,"087c8b6e":s.marginMosaic}))},Yh=Yo.setup;Yo.setup=Yh?(s,e)=>(qh(),Yh(s,e)):qh;const aA={key:0,class:"gsc-best",ref:"myDivRef"},nA={class:"gsc-best__line-bar-tools"},iA={key:0,class:"gsc-best__line-bar-tools__title"},oA={key:1,class:"gsc-best__line-bar-tools__titlefull"},rA={class:"unit-items"},lA={key:2,class:"gsc-best__line-bar-tools__tools"},cA={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},dA={key:1,class:"gsc-best__line-bar-tools__tools__btn"},hA={key:0,class:"gsc-best__line-bar-tools-movil"},uA={class:"gsc-best__line-bar-tools-movil__tabs"},mA={class:"gsc-best__categories"},fA={class:"gsc-best__players"};function pA(s,e,t,a,i,o){const r=n.resolveComponent("GSCRadioToggle"),l=n.resolveComponent("GSCButton"),d=n.resolveComponent("GscSwitchComponent"),c=n.resolveComponent("GSCMosaicthebest"),h=n.resolveComponent("GSCSlider");return s.showTops?(n.openBlock(),n.createElementBlock("div",aA,[n.createElementVNode("div",nA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",iA,[n.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Las mejores")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(n.openBlock(),n.createBlock(r,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://az755631.vo.msecnd.net/teams-150/"+t.teamId+".png",iconB:"https://az755631.vo.msecnd.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:o.ChangeRadio},null,8,["iconA","onChange"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),a.elementSize.width<=900?(n.openBlock(),n.createElementBlock("div",oA,[n.createElementVNode("span",{style:n.normalizeStyle(a.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Las mejores")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Los mejores")],64))],4),n.createElementVNode("span",rA,[s.optionSelected!=="Equipos"&&t.showSwitch?(n.openBlock(),n.createBlock(r,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://az755631.vo.msecnd.net/teams-150/"+t.teamId+".png",iconB:"https://az755631.vo.msecnd.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:o.ChangeRadio},null,8,["iconA","onChange"])):n.createCommentVNode("",!0),a.elementSize.width<=900?(n.openBlock(),n.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":a.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":a.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:o.clickMore},null,8,["font-color","font-size","onClick"])):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",lA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",cA,[t.showSelect?(n.openBlock(),n.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:o.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),t.showMore?(n.openBlock(),n.createElementBlock("div",dA,[n.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:o.clickMore},null,8,["onClick"]),n.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:o.clickMore},null,8,["onClick"])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),a.elementSize.width<=900&&t.showSelect?(n.openBlock(),n.createElementBlock("div",hA,[n.createElementVNode("div",uA,[t.showSelect?(n.openBlock(),n.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:o.changeType},null,8,["buttons","selected-option","onInput"])):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),n.createElementVNode("div",mA,[n.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":a.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:o.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),n.createElementVNode("div",fA,[n.createVNode(h,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.topData,(u,f)=>(n.openBlock(),n.createElementBlock("div",{key:f,class:n.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[n.createVNode(c,{data:{player_id:u.id,player_name:this.isTeam?u.name:o.formatPlayerName(u.name),player_position:u.position,player_stat:u.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:u.logo,player_photo:u.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:o.clickMosaic,onOpenmedia:o.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):n.createCommentVNode("",!0)}const gA=qe(Yo,[["render",pA],["__scopeId","data-v-8c67a665"]]);/**
33
33
  * Vue 3 Carousel 0.3.1
34
34
  * (c) 2023
35
35
  * @license MIT
36
36
  */const at={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Jh={itemsToShow:{default:at.itemsToShow,type:Number},itemsToScroll:{default:at.itemsToScroll,type:Number},wrapAround:{default:at.wrapAround,type:Boolean},throttle:{default:at.throttle,type:Number},snapAlign:{default:at.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:at.transition,type:Number},breakpoints:{default:at.breakpoints,type:Object},autoplay:{default:at.autoplay,type:Number},pauseAutoplayOnHover:{default:at.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:at.mouseDrag,type:Boolean},touchDrag:{default:at.touchDrag,type:Boolean},dir:{default:at.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:at.i18n,type:Object},settings:{default(){return{}},type:Object}};function yA({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:a,itemsToShow:i=1}=s;if(a)return Math.max(e-1,0);let o;switch(t){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function bA({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:a,itemsToShow:i=1}=s;let o=0;if(t||i>e)return o;switch(a){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function Jo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function SA({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:o=1}=s;let r=e;switch(a){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:Jo({val:r,max:t-o,min:0})}function Xh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...Xh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Xo({val:s,max:e,min:t=0}){return s>e?Xo({val:s-(e+1),max:e,min:t}):s<t?Xo({val:s+(e+1),max:e,min:t}):s}function wA(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function _A(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function kA(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var EA=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},at))),e=n.inject("currentSlide",n.ref(0)),t=n.inject("slidesCount",n.ref(0));return()=>n.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},kA(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),TA=n.defineComponent({name:"Carousel",props:Jh,setup(s,{slots:e,emit:t,expose:a}){var i;const o=n.ref(null),r=n.ref([]),l=n.ref(0),d=n.ref(0),c=n.reactive(Object.assign({},at));let h=Object.assign({},at),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=n.ref(0),m=n.ref(0),g=n.ref(0),y=n.ref(0);let b,S;n.provide("config",c),n.provide("slidesCount",d),n.provide("currentSlide",f),n.provide("maxSlide",g),n.provide("minSlide",y),n.provide("slideWidth",l);function _(){u=Object.assign({},s.breakpoints),h=Object.assign(Object.assign(Object.assign({},h),s),{i18n:Object.assign(Object.assign({},h.i18n),s.i18n),breakpoints:void 0}),E(h)}function C(){if(!u||!Object.keys(u).length)return;const x=Object.keys(u).map(U=>Number(U)).sort((U,M)=>+M-+U);let j=Object.assign({},h);x.some(U=>{const M=window.matchMedia(`(min-width: ${U}px)`).matches;return M&&(j=Object.assign(Object.assign({},j),u[U])),M}),E(j)}function E(x){Object.entries(x).forEach(([j,U])=>c[j]=U)}const v=_A(()=>{C(),T()},16);function T(){if(!o.value)return;const x=o.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function B(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),g.value=yA({config:c,slidesCount:d.value}),y.value=bA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Jo({val:f.value,max:g.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),q(),window.addEventListener("resize",v,{passive:!0}),t("init")}),n.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",v,{passive:!0})});let L=!1;const R={x:0,y:0},$={x:0,y:0},K=n.reactive({x:0,y:0}),z=n.ref(!1),ae=n.ref(!1),oe=()=>{z.value=!0},ie=()=>{z.value=!1};function ce(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(L=x.type==="touchstart",L||x.preventDefault(),!(!L&&x.button!==0||J.value)&&(R.x=L?x.touches[0].clientX:x.clientX,R.y=L?x.touches[0].clientY:x.clientY,document.addEventListener(L?"touchmove":"mousemove",de,!0),document.addEventListener(L?"touchend":"mouseup",Q,!0)))}const de=wA(x=>{ae.value=!0,$.x=L?x.touches[0].clientX:x.clientX,$.y=L?x.touches[0].clientY:x.clientY;const j=$.x-R.x,U=$.y-R.y;K.y=U,K.x=j},c.throttle);function Q(){const x=c.dir==="rtl"?-1:1,j=Math.sign(K.x)*.4,U=Math.round(K.x/l.value+j)*x;if(U&&!L){const M=W=>{W.stopPropagation(),window.removeEventListener("click",M,!0)};window.addEventListener("click",M,!0)}Z(f.value-U),K.x=0,K.y=0,ae.value=!1,document.removeEventListener(L?"touchmove":"mousemove",de,!0),document.removeEventListener(L?"touchend":"mouseup",Q,!0)}function q(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&z.value||ue()},c.autoplay))}function he(){b&&(clearInterval(b),b=null),q()}const J=n.ref(!1);function Z(x){const j=c.wrapAround?x:Jo({val:x,max:g.value,min:y.value});f.value===j||J.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!0,p.value=f.value,f.value=j,S=setTimeout(()=>{if(c.wrapAround){const U=Xo({val:j,max:g.value,min:0});U!==f.value&&(f.value=U,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),J.value=!1,he()},c.transition))}function ue(){Z(f.value+c.itemsToScroll)}function ge(){Z(f.value-c.itemsToScroll)}const Ce={slideTo:Z,next:ue,prev:ge};n.provide("nav",Ce),n.provide("isSliding",J);const se=n.computed(()=>SA({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",se);const Ee=n.computed(()=>{const x=c.dir==="rtl"?-1:1,j=se.value*l.value*x;return{transform:`translateX(${K.x-j}px)`,transition:`${J.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),B(),T(),he()}Object.keys(Jh).forEach(x=>{["modelValue"].includes(x)||n.watch(()=>s[x],Te)}),n.watch(()=>s.modelValue,x=>{x!==f.value&&Z(Number(x))}),n.watch(d,B),t("before-init"),_();const Fe={config:c,slidesCount:d,slideWidth:l,next:ue,prev:ge,slideTo:Z,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:C,updateSlidesData:B,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:Z,next:ue,prev:ge,nav:Ce,data:Fe});const et=e.default||e.slides,it=e.addons,ot=n.reactive(Fe);return()=>{const x=Xh(et==null?void 0:et(ot)),j=(it==null?void 0:it(ot))||[];x.forEach((H,G)=>H.props.index=G);let U=x;if(c.wrapAround){const H=x.map((X,Y)=>n.cloneVNode(X,{index:-x.length+Y,isClone:!0,key:`clone-before-${Y}`})),G=x.map((X,Y)=>n.cloneVNode(X,{index:x.length+Y,isClone:!0,key:`clone-after-${Y}`}));U=[...H,...x,...G]}r.value=x,d.value=Math.max(x.length,1);const M=n.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ce:null,onTouchstartPassiveCapture:c.touchDrag?ce:null},U),W=n.h("div",{class:"carousel__viewport"},M);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":J.value,"is-dragging":ae.value,"is-hover":z.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ie},[W,j,n.h(EA)])}}}),Zh;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Zh||(Zh={}));var CA=n.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=n.inject("config",n.reactive(Object.assign({},at))),a=n.inject("currentSlide",n.ref(0)),i=n.inject("slidesToScroll",n.ref(0)),o=n.inject("isSliding",n.ref(!1)),r=()=>s.index===a.value,l=()=>s.index===a.value-1,d=()=>s.index===a.value+1,c=()=>{const h=Math.floor(i.value),u=Math.ceil(i.value+t.itemsToShow-1);return s.index>=h&&s.index<=u};return()=>{var h;return n.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":r(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":o.value},"aria-hidden":!c()},(h=e.default)===null||h===void 0?void 0:h.call(e))}}});const xA=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},vA=s=>(n.pushScopeId("data-v-54620d25"),s=s(),n.popScopeId(),s),AA={class:"gsc-carousel"},LA={key:0},IA=vA(()=>n.createElementVNode("div",null,"no hay",-1)),RA=[IA],BA={class:"gsc-carousel__2d__slides"},NA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},DA=["fill"],PA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},OA=["fill"],FA={class:"gsc-carousel__2d__navigation"},MA={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$A=["stroke"],VA={key:1,class:"gsc-carousel__2d__navigation__pagination"},UA=["onClick"],zA={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},GA=["stroke"],jA={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(s,{expose:e,emit:t}){const a=s;n.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=n.ref(null),o=n.ref({}),r=n.ref(0),l=n.ref(!1);n.watch(i,g=>{g&&l.value?(l.value=!1,d(a.items)):g&&g.slideTo&&g.slideTo(r.value)},{deep:!0}),n.watch(()=>a.currentItemIndex,g=>{r.value!==g&&f(g)}),n.watch(()=>a.defaultItemByIndex,g=>{r.value!==g&&f(g)}),n.watch(()=>a.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(a.defaultItemByProp){const y=a.items.findIndex(b=>b[a.defaultItemByProp.propName]===a.defaultItemByProp.value);y!==-1?(r.value=y,o.value=g[y]):(r.value=0,o.value=g[0])}else r.value=a.defaultItemByIndex,o.value=g[a.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(r.value),o.value&&r.value===0&&t("input",{selectedItem:o.value,selectedItemIndex:r.value})},500)}function c(){i.value&&i.value.next()}function h(){i.value&&i.value.prev()}function u(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function m(g){const y=g.slidingToIndex<0?a.items.length-1:g.slidingToIndex===a.items.length?0:g.slidingToIndex;r.value=y,o.value=a.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:o.value,selectedItemIndex:r.value})}return e({prev:h,next:c,updateSlideWidth:u,slideTo:f}),(g,y)=>(n.openBlock(),n.createElementBlock("div",AA,[a.is3d?(n.openBlock(),n.createElementBlock("div",LA,RA)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[n.createElementVNode("div",BA,[n.createVNode(n.unref(TA),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:m},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(b,S)=>(n.openBlock(),n.createBlock(n.unref(CA),{key:S},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(n.openBlock(),n.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:n.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[n.createElementVNode("div",{class:n.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(n.openBlock(),n.createElementBlock("svg",NA,[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:s.arrowsColor},null,8,DA)]))],2)],4)):n.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:n.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[n.createElementVNode("div",{class:n.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(n.openBlock(),n.createElementBlock("svg",PA,[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:s.arrowsColor},null,8,OA)]))],2)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",FA,[s.areNavigationArrowsVisible?(n.openBlock(),n.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>h())},[(n.openBlock(),n.createElementBlock("svg",MA,[n.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:a.arrowsColor},null,8,$A)]))])):n.createCommentVNode("",!0),s.isPaginationVisible?(n.openBlock(),n.createElementBlock("div",VA,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(b,S)=>(n.openBlock(),n.createElementBlock("div",{key:`i-${S}`,class:"gsc-carousel__2d__navigation__pagination__item",style:n.normalizeStyle({height:`${a.navigationHeight}px`,width:`${r.value===S?a.navigationActiveWidth:a.navigationActiveWidth/2}px`,borderRadius:`${a.navigationBorderRadius}px`,backgroundColor:`${r.value===S?a.navigationActiveColor:a.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(S)},null,12,UA))),128))])):n.createCommentVNode("",!0),s.areNavigationArrowsVisible?(n.openBlock(),n.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(n.openBlock(),n.createElementBlock("svg",zA,[n.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:a.arrowsColor},null,8,GA)]))])):n.createCommentVNode("",!0)])],2))]))}},HA=xA(jA,[["__scopeId","data-v-54620d25"]]),Qh=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function te(s,e,t){return(e=KA(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function WA(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var a=t.call(s,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function KA(s){var e=WA(s,"string");return typeof e=="symbol"?e:String(e)}function qA(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function eu(s,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function YA(s,e,t){return e&&eu(s.prototype,e),t&&eu(s,t),s}function JA(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function tu(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,a)}return t}function su(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tu(Object(t),!0).forEach(function(a){JA(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):tu(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}var au={addCSS:!0,thumbWidth:15,watch:!0};function XA(s,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function ZA(s,e){if(s&&e){var t=new Event(e,{bubbles:!0});s.dispatchEvent(t)}}var ra=function(s){return s!=null?s.constructor:null},Zo=function(s,e){return!!(s&&e&&s instanceof e)},nu=function(s){return s==null},iu=function(s){return ra(s)===Object},QA=function(s){return ra(s)===Number&&!Number.isNaN(s)},ou=function(s){return ra(s)===String},e5=function(s){return ra(s)===Boolean},t5=function(s){return ra(s)===Function},ru=function(s){return Array.isArray(s)},lu=function(s){return Zo(s,NodeList)},s5=function(s){return Zo(s,Element)},a5=function(s){return Zo(s,Event)},n5=function(s){return nu(s)||(ou(s)||ru(s)||lu(s))&&!s.length||iu(s)&&!Object.keys(s).length},rt={nullOrUndefined:nu,object:iu,number:QA,string:ou,boolean:e5,function:t5,array:ru,nodeList:lu,element:s5,event:a5,empty:n5};function i5(s){var e="".concat(s).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function o5(s,e){if(1>e){var t=i5(e);return parseFloat(s.toFixed(t))}return Math.round(s/e)*e}var r5=function(){function s(e,t){qA(this,s),rt.element(e)?this.element=e:rt.string(e)&&(this.element=document.querySelector(e)),rt.element(this.element)&&rt.empty(this.element.rangeTouch)&&(this.config=su({},au,{},t),this.init())}return YA(s,[{key:"init",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,a=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){t.element[a](i,function(o){return t.set(o)},!1)})}},{key:"get",value:function(e){if(!s.enabled||!rt.event(e))return null;var t,a=e.target,i=e.changedTouches[0],o=parseFloat(a.getAttribute("min"))||0,r=parseFloat(a.getAttribute("max"))||100,l=parseFloat(a.getAttribute("step"))||1,d=a.getBoundingClientRect(),c=100/d.width*(this.config.thumbWidth/2)/100;return 0>(t=100/d.width*(i.clientX-d.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),o+o5(t/100*(r-o),l)}},{key:"set",value:function(e){s.enabled&&rt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),ZA(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},a=null;if(rt.empty(e)||rt.string(e)?a=Array.from(document.querySelectorAll(rt.string(e)?e:'input[type="range"]')):rt.element(e)?a=[e]:rt.nodeList(e)?a=Array.from(e):rt.array(e)&&(a=e.filter(rt.element)),rt.empty(a))return null;var i=su({},au,{},t);if(rt.string(e)&&i.watch){var o=new MutationObserver(function(r){Array.from(r).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){rt.element(d)&&XA(d,e)&&new s(d,i)})})});o.observe(document.body,{childList:!0,subtree:!0})}return a.map(function(r){return new s(r,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),s}();const la=s=>s!=null?s.constructor:null,Yt=(s,e)=>!!(s&&e&&s instanceof e),Qo=s=>s==null,cu=s=>la(s)===Object,l5=s=>la(s)===Number&&!Number.isNaN(s),un=s=>la(s)===String,c5=s=>la(s)===Boolean,du=s=>typeof s=="function",hu=s=>Array.isArray(s),d5=s=>Yt(s,WeakMap),uu=s=>Yt(s,NodeList),h5=s=>la(s)===Text,u5=s=>Yt(s,Event),m5=s=>Yt(s,KeyboardEvent),f5=s=>Yt(s,window.TextTrackCue)||Yt(s,window.VTTCue),p5=s=>Yt(s,TextTrack)||!Qo(s)&&un(s.kind),g5=s=>Yt(s,Promise)&&du(s.then),y5=s=>s!==null&&typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object",mu=s=>Qo(s)||(un(s)||hu(s)||uu(s))&&!s.length||cu(s)&&!Object.keys(s).length;var k={nullOrUndefined:Qo,object:cu,number:l5,string:un,boolean:c5,function:du,array:hu,weakMap:d5,nodeList:uu,element:y5,textNode:h5,event:u5,keyboardEvent:m5,cue:f5,track:p5,promise:g5,url:s=>{if(Yt(s,window.URL))return!0;if(!un(s))return!1;let e=s;s.startsWith("http://")&&s.startsWith("https://")||(e=`http://${s}`);try{return!mu(new URL(e).hostname)}catch{return!1}},empty:mu};const er=(()=>{const s=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(e).find(a=>s.style[a]!==void 0);return!!k.string(t)&&e[t]})();function fu(s,e){setTimeout(()=>{try{s.hidden=!0,s.offsetHeight,s.hidden=!1}catch{}},e)}const b5=!!window.document.documentMode,S5=/Edge/g.test(navigator.userAgent),w5="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),_5=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,k5=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,E5=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Ye={isIE:b5,isEdge:S5,isWebKit:w5,isIPhone:_5,isIPadOS:k5,isIos:E5};function T5(s){return JSON.parse(JSON.stringify(s))}function pu(s,e){return e.split(".").reduce((t,a)=>t&&t[a],s)}function Me(s={},...e){if(!e.length)return s;const t=e.shift();return k.object(t)?(Object.keys(t).forEach(a=>{k.object(t[a])?(Object.keys(s).includes(a)||Object.assign(s,{[a]:{}}),Me(s[a],t[a])):Object.assign(s,{[a]:t[a]})}),Me(s,...e)):s}function gu(s,e){const t=s.length?s:[s];Array.from(t).reverse().forEach((a,i)=>{const o=i>0?e.cloneNode(!0):e,r=a.parentNode,l=a.nextSibling;o.appendChild(a),l?r.insertBefore(o,l):r.appendChild(o)})}function tr(s,e){k.element(s)&&!k.empty(e)&&Object.entries(e).filter(([,t])=>!k.nullOrUndefined(t)).forEach(([t,a])=>s.setAttribute(t,a))}function me(s,e,t){const a=document.createElement(s);return k.object(e)&&tr(a,e),k.string(t)&&(a.innerText=t),a}function C5(s,e){k.element(s)&&k.element(e)&&e.parentNode.insertBefore(s,e.nextSibling)}function yu(s,e,t,a){k.element(e)&&e.appendChild(me(s,t,a))}function Jt(s){k.nodeList(s)||k.array(s)?Array.from(s).forEach(Jt):k.element(s)&&k.element(s.parentNode)&&s.parentNode.removeChild(s)}function mn(s){if(!k.element(s))return;let{length:e}=s.childNodes;for(;e>0;)s.removeChild(s.lastChild),e-=1}function fn(s,e){return k.element(e)&&k.element(e.parentNode)&&k.element(s)?(e.parentNode.replaceChild(s,e),s):null}function $t(s,e){if(!k.string(s)||k.empty(s))return{};const t={},a=Me({},e);return s.split(",").forEach(i=>{const o=i.trim(),r=o.replace(".",""),l=o.replace(/[[\]]/g,"").split("="),[d]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(o.charAt(0)){case".":k.string(a.class)?t.class=`${a.class} ${r}`:t.class=r;break;case"#":t.id=o.replace("#","");break;case"[":t[d]=c}}),Me(a,t)}function ys(s,e){if(!k.element(s))return;let t=e;k.boolean(t)||(t=!s.hidden),s.hidden=t}function Ie(s,e,t){if(k.nodeList(s))return Array.from(s).map(a=>Ie(a,e,t));if(k.element(s)){let a="toggle";return t!==void 0&&(a=t?"add":"remove"),s.classList[a](e),s.classList.contains(e)}return!1}function pn(s,e){return k.element(s)&&s.classList.contains(e)}function bs(s,e){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function x5(s,e){const{prototype:t}=Element;return(t.closest||function(){let a=this;do{if(bs.matches(a,e))return a;a=a.parentElement||a.parentNode}while(a!==null&&a.nodeType===1);return null}).call(s,e)}function ca(s){return this.elements.container.querySelectorAll(s)}function We(s){return this.elements.container.querySelector(s)}function sr(s=null,e=!1){k.element(s)&&s.focus({preventScroll:!0,focusVisible:e})}const bu={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},$e={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(s,e){const t=$e[s]||e!=="html5";return{api:t,ui:t&&$e.rangeInput}},pip:!(Ye.isIPhone||!k.function(me("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||me("video").disablePictureInPicture)),airplay:k.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(s){if(k.empty(s))return!1;const[e]=s.split("/");let t=s;if(!this.isHTML5||e!==this.type)return!1;Object.keys(bu).includes(t)&&(t+=`; codecs="${bu[s]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const s=document.createElement("input");return s.type="range",s.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:er!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},v5=(()=>{let s=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(s=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return s})();function da(s,e,t,a=!1,i=!0,o=!1){if(!s||!("addEventListener"in s)||k.empty(e)||!k.function(t))return;const r=e.split(" ");let l=o;v5&&(l={passive:i,capture:o}),r.forEach(d=>{this&&this.eventListeners&&a&&this.eventListeners.push({element:s,type:d,callback:t,options:l}),s[a?"addEventListener":"removeEventListener"](d,t,l)})}function Ae(s,e="",t,a=!0,i=!1){da.call(this,s,e,t,!0,a,i)}function gn(s,e="",t,a=!0,i=!1){da.call(this,s,e,t,!1,a,i)}function ar(s,e="",t,a=!0,i=!1){const o=(...r)=>{gn(s,e,o,a,i),t.apply(this,r)};da.call(this,s,e,o,!0,a,i)}function pe(s,e="",t=!1,a={}){if(!k.element(s)||k.empty(e))return;const i=new CustomEvent(e,{bubbles:t,detail:{...a,plyr:this}});s.dispatchEvent(i)}function A5(){this&&this.eventListeners&&(this.eventListeners.forEach(s=>{const{element:e,type:t,callback:a,options:i}=s;e.removeEventListener(t,a,i)}),this.eventListeners=[])}function L5(){return new Promise(s=>this.ready?setTimeout(s,0):Ae.call(this,this.elements.container,"ready",s)).then(()=>{})}function Vt(s){k.promise(s)&&s.then(null,()=>{})}function nr(s){return k.array(s)?s.filter((e,t)=>s.indexOf(e)===t):s}function Su(s,e){return k.array(s)&&s.length?s.reduce((t,a)=>Math.abs(a-e)<Math.abs(t-e)?a:t):null}function wu(s){return!(!window||!window.CSS)&&window.CSS.supports(s)}const _u=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((s,[e,t])=>({...s,[e/t]:[e,t]}),{});function ku(s){return k.array(s)||k.string(s)&&s.includes(":")?(k.array(s)?s:s.split(":")).map(Number).every(k.number):!1}function yn(s){if(!k.array(s)||!s.every(k.number))return null;const[e,t]=s,a=(o,r)=>r===0?o:a(r,o%r),i=a(e,t);return[e/i,t/i]}function ir(s){const e=a=>ku(a)?a.split(":").map(Number):null;let t=e(s);if(t===null&&(t=e(this.config.ratio)),t===null&&!k.empty(this.embed)&&k.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:a,videoHeight:i}=this.media;t=[a,i]}return yn(t)}function Ds(s){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=ir.call(this,s);if(!k.array(t))return{};const[a,i]=yn(t),o=100/a*i;if(wu(`aspect-ratio: ${a}/${i}`)?e.style.aspectRatio=`${a}/${i}`:e.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const r=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(r-o)/(r/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:t}}function Eu(s,e,t=.05){const a=s/e,i=Su(Object.keys(_u),a);return Math.abs(i-a)<=t?_u[i]:[s,e]}function I5(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const ns={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(s=>{const e=s.getAttribute("type");return!!k.empty(e)||$e.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:ns.getSources.call(this).map(s=>Number(s.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const s=this;s.options.speed=s.config.speed.options,k.empty(this.config.ratio)||Ds.call(s),Object.defineProperty(s.media,"quality",{get(){const e=ns.getSources.call(s).find(t=>t.getAttribute("src")===s.source);return e&&Number(e.getAttribute("size"))},set(e){if(s.quality!==e){if(s.config.quality.forced&&k.function(s.config.quality.onChange))s.config.quality.onChange(e);else{const t=ns.getSources.call(s).find(d=>Number(d.getAttribute("size"))===e);if(!t)return;const{currentTime:a,paused:i,preload:o,readyState:r,playbackRate:l}=s.media;s.media.src=t.getAttribute("src"),(o!=="none"||r)&&(s.once("loadedmetadata",()=>{s.speed=l,s.currentTime=a,i||Vt(s.play())}),s.media.load())}pe.call(s,s.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(Jt(ns.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function R5(s){return`${s}-${Math.floor(1e4*Math.random())}`}function or(s,...e){return k.empty(s)?s:s.toString().replace(/{(\d+)}/g,(t,a)=>e[a].toString())}function B5(s,e){return s===0||e===0||Number.isNaN(s)||Number.isNaN(e)?0:(s/e*100).toFixed(2)}const ha=(s="",e="",t="")=>s.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Tu=(s="")=>s.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function N5(s=""){let e=s.toString();return e=ha(e,"-"," "),e=ha(e,"_"," "),e=Tu(e),ha(e," ","")}function D5(s=""){let e=s.toString();return e=N5(e),e.charAt(0).toLowerCase()+e.slice(1)}function P5(s){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=s,e.firstChild.innerText}function O5(s){const e=document.createElement("div");return e.appendChild(s),e.innerHTML}const Cu={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Je={get(s="",e={}){if(k.empty(s)||k.empty(e))return"";let t=pu(e.i18n,s);if(k.empty(t))return Object.keys(Cu).includes(s)?Cu[s]:"";const a={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(a).forEach(([i,o])=>{t=ha(t,i,o)}),t}};class ua{constructor(e){te(this,"get",t=>{if(!ua.supported||!this.enabled)return null;const a=window.localStorage.getItem(this.key);if(k.empty(a))return null;const i=JSON.parse(a);return k.string(t)&&t.length?i[t]:i}),te(this,"set",t=>{if(!ua.supported||!this.enabled||!k.object(t))return;let a=this.get();k.empty(a)&&(a={}),Me(a,t);try{window.localStorage.setItem(this.key,JSON.stringify(a))}catch{}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function ma(s,e="text"){return new Promise((t,a)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(e==="text")try{t(JSON.parse(i.responseText))}catch{t(i.responseText)}else t(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",s,!0),i.responseType=e,i.send()}catch(i){a(i)}})}function xu(s,e){if(!k.string(s))return;const t="cache",a=k.string(e);let i=!1;const o=()=>document.getElementById(e)!==null,r=(l,d)=>{l.innerHTML=d,a&&o()||document.body.insertAdjacentElement("afterbegin",l)};if(!a||!o()){const l=ua.supported,d=document.createElement("div");if(d.setAttribute("hidden",""),a&&d.setAttribute("id",e),l){const c=window.localStorage.getItem(`${t}-${e}`);if(i=c!==null,i){const h=JSON.parse(c);r(d,h.content)}}ma(s).then(c=>{if(!k.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${e}`,JSON.stringify({content:c}))}catch{}r(d,c)}}).catch(()=>{})}}const vu=s=>Math.trunc(s/60/60%60,10),F5=s=>Math.trunc(s/60%60,10),M5=s=>Math.trunc(s%60,10);function bn(s=0,e=!1,t=!1){if(!k.number(s))return bn(void 0,e,t);const a=l=>`0${l}`.slice(-2);let i=vu(s);const o=F5(s),r=M5(s);return i=e||i>0?`${i}:`:"",`${t&&s>0?"-":""}${i}${a(o)}:${a(r)}`}const ee={getIconUrl(){const s=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,t=s.host!==e||Ye.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=We.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ca.call(this,this.config.selectors.buttons.play),pause:We.call(this,this.config.selectors.buttons.pause),restart:We.call(this,this.config.selectors.buttons.restart),rewind:We.call(this,this.config.selectors.buttons.rewind),fastForward:We.call(this,this.config.selectors.buttons.fastForward),mute:We.call(this,this.config.selectors.buttons.mute),pip:We.call(this,this.config.selectors.buttons.pip),airplay:We.call(this,this.config.selectors.buttons.airplay),settings:We.call(this,this.config.selectors.buttons.settings),captions:We.call(this,this.config.selectors.buttons.captions),fullscreen:We.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=We.call(this,this.config.selectors.progress),this.elements.inputs={seek:We.call(this,this.config.selectors.inputs.seek),volume:We.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:We.call(this,this.config.selectors.display.buffer),currentTime:We.call(this,this.config.selectors.display.currentTime),duration:We.call(this,this.config.selectors.display.duration)},k.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(s){return this.debug.warn("It looks like there is a problem with your custom controls HTML",s),this.toggleNativeControls(!0),!1}},createIcon(s,e){const t="http://www.w3.org/2000/svg",a=ee.getIconUrl.call(this),i=`${a.cors?"":a.url}#${this.config.iconPrefix}`,o=document.createElementNS(t,"svg");tr(o,Me(e,{"aria-hidden":"true",focusable:"false"}));const r=document.createElementNS(t,"use"),l=`${i}-${s}`;return"href"in r&&r.setAttributeNS("http://www.w3.org/1999/xlink","href",l),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.appendChild(r),o},createLabel(s,e={}){const t=Je.get(s,this.config);return me("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(s){if(k.empty(s))return null;const e=me("span",{class:this.config.classNames.menu.value});return e.appendChild(me("span",{class:this.config.classNames.menu.badge},s)),e},createButton(s,e){const t=Me({},e);let a=D5(s);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(r=>{Object.keys(t).includes(r)&&(i[r]=t[r],delete t[r])}),i.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(r=>r===this.config.classNames.control)||Me(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,s){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,a="play",i.label="play",i.icon="play";break;default:k.empty(i.label)&&(i.label=a),k.empty(i.icon)&&(i.icon=s)}const o=me(i.element);return i.toggle?(o.appendChild(ee.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),o.appendChild(ee.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),o.appendChild(ee.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),o.appendChild(ee.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(o.appendChild(ee.createIcon.call(this,i.icon)),o.appendChild(ee.createLabel.call(this,i.label))),Me(t,$t(this.config.selectors.buttons[a],t)),tr(o,t),a==="play"?(k.array(this.elements.buttons[a])||(this.elements.buttons[a]=[]),this.elements.buttons[a].push(o)):this.elements.buttons[a]=o,o},createRange(s,e){const t=me("input",Me($t(this.config.selectors.inputs[s]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Je.get(s,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[s]=t,ee.updateRangeFill.call(this,t),r5.setup(t),t},createProgress(s,e){const t=me("progress",Me($t(this.config.selectors.display[s]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(s!=="volume"){t.appendChild(me("span",null,"0"));const a={played:"played",buffer:"buffered"}[s],i=a?Je.get(a,this.config):"";t.innerText=`% ${i.toLowerCase()}`}return this.elements.display[s]=t,t},createTime(s,e){const t=$t(this.config.selectors.display[s],e),a=me("div",Me(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Je.get(s,this.config),role:"timer"}),"00:00");return this.elements.display[s]=a,a},bindMenuItemShortcuts(s,e){Ae.call(this,s,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const a=bs(s,'[role="menuitemradio"]');if(!a&&[" ","ArrowRight"].includes(t.key))ee.showMenuPanel.call(this,e,!0);else{let i;t.key!==" "&&(t.key==="ArrowDown"||a&&t.key==="ArrowRight"?(i=s.nextElementSibling,k.element(i)||(i=s.parentNode.firstElementChild)):(i=s.previousElementSibling,k.element(i)||(i=s.parentNode.lastElementChild)),sr.call(this,i,!0))}},!1),Ae.call(this,s,"keyup",t=>{t.key==="Return"&&ee.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:s,list:e,type:t,title:a,badge:i=null,checked:o=!1}){const r=$t(this.config.selectors.inputs[t]),l=me("button",Me(r,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${r.class?r.class:""}`.trim(),"aria-checked":o,value:s})),d=me("span");d.innerHTML=a,k.element(i)&&d.appendChild(i),l.appendChild(d),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(h=>bs(h,'[role="menuitemradio"]')).forEach(h=>h.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!k.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(s);break;case"quality":this.quality=s;break;case"speed":this.speed=parseFloat(s)}ee.showMenuPanel.call(this,"home",k.keyboardEvent(c))}},t,!1),ee.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(s=0,e=!1){return k.number(s)?bn(s,vu(this.duration)>0,e):s},updateTimeDisplay(s=null,e=0,t=!1){k.element(s)&&k.number(e)&&(s.innerText=ee.formatTime(e,t))},updateVolume(){this.supported.ui&&(k.element(this.elements.inputs.volume)&&ee.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),k.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(s,e=0){k.element(s)&&(s.value=e,ee.updateRangeFill.call(this,s))},updateProgress(s){if(!this.supported.ui||!k.event(s))return;let e=0;const t=(a,i)=>{const o=k.number(i)?i:0,r=k.element(a)?a:this.elements.display.buffer;if(k.element(r)){r.value=o;const l=r.getElementsByTagName("span")[0];k.element(l)&&(l.childNodes[0].nodeValue=o)}};if(s)switch(s.type){case"timeupdate":case"seeking":case"seeked":e=B5(this.currentTime,this.duration),s.type==="timeupdate"&&ee.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(s){const e=k.event(s)?s.target:s;if(k.element(e)&&e.getAttribute("type")==="range"){if(bs(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=ee.formatTime(this.currentTime),a=ee.formatTime(this.duration),i=Je.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",a))}else if(bs(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(Ye.isWebKit||Ye.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(s){var e,t;if(!this.config.tooltips.seek||!k.element(this.elements.inputs.seek)||!k.element(this.elements.display.seekTooltip)||this.duration===0)return;const a=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,o=h=>Ie(a,i,h);if(this.touch)return void o(!1);let r=0;const l=this.elements.progress.getBoundingClientRect();if(k.event(s))r=100/l.width*(s.pageX-l.left);else{if(!pn(a,i))return;r=parseFloat(a.style.left,10)}r<0?r=0:r>100&&(r=100);const d=this.duration/100*r;a.innerText=ee.formatTime(d);const c=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.find(({time:h})=>h===Math.round(d));c&&a.insertAdjacentHTML("afterbegin",`${c.label}<br>`),a.style.left=`${r}%`,k.event(s)&&["mouseenter","mouseleave"].includes(s.type)&&o(s.type==="mouseenter")},timeUpdate(s){const e=!k.element(this.elements.display.duration)&&this.config.invertTime;ee.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),s&&s.type==="timeupdate"&&this.media.seeking||ee.updateProgress.call(this,s)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ys(this.elements.display.currentTime,!0),void ys(this.elements.progress,!0);k.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const s=k.element(this.elements.display.duration);!s&&this.config.displayDuration&&this.paused&&ee.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),s&&ee.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&ee.setMarkers.call(this),ee.updateSeekTooltip.call(this)},toggleMenuButton(s,e){ys(this.elements.settings.buttons[s],!e)},updateSetting(s,e,t){const a=this.elements.settings.panels[s];let i=null,o=e;if(s==="captions")i=this.currentTrack;else{if(i=k.empty(t)?this[s]:t,k.empty(i)&&(i=this.config[s].default),!k.empty(this.options[s])&&!this.options[s].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${s}`);if(!this.config[s].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${s}`)}if(k.element(o)||(o=a&&a.querySelector('[role="menu"]')),!k.element(o))return;this.elements.settings.buttons[s].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=ee.getLabel.call(this,s,i);const r=o&&o.querySelector(`[value="${i}"]`);k.element(r)&&(r.checked=!0)},getLabel(s,e){switch(s){case"speed":return e===1?Je.get("normal",this.config):`${e}&times;`;case"quality":if(k.number(e)){const t=Je.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return Tu(e);case"captions":return Le.getLabel.call(this);default:return null}},setQualityMenu(s){if(!k.element(this.elements.settings.panels.quality))return;const e="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');k.array(s)&&(this.options.quality=nr(s).filter(o=>this.config.quality.options.includes(o)));const a=!k.empty(this.options.quality)&&this.options.quality.length>1;if(ee.toggleMenuButton.call(this,e,a),mn(t),ee.checkMenu.call(this),!a)return;const i=o=>{const r=Je.get(`qualityBadge.${o}`,this.config);return r.length?ee.createBadge.call(this,r):null};this.options.quality.sort((o,r)=>{const l=this.config.quality.options;return l.indexOf(o)>l.indexOf(r)?1:-1}).forEach(o=>{ee.createMenuItem.call(this,{value:o,list:t,type:e,title:ee.getLabel.call(this,"quality",o),badge:i(o)})}),ee.updateSetting.call(this,e,t)},setCaptionsMenu(){if(!k.element(this.elements.settings.panels.captions))return;const s="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=Le.getTracks.call(this),a=!!t.length;if(ee.toggleMenuButton.call(this,s,a),mn(e),ee.checkMenu.call(this),!a)return;const i=t.map((o,r)=>({value:r,checked:this.captions.toggled&&this.currentTrack===r,title:Le.getLabel.call(this,o),badge:o.language&&ee.createBadge.call(this,o.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:Je.get("disabled",this.config),list:e,type:"language"}),i.forEach(ee.createMenuItem.bind(this)),ee.updateSetting.call(this,s,e)},setSpeedMenu(){if(!k.element(this.elements.settings.panels.speed))return;const s="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(a=>a>=this.minimumSpeed&&a<=this.maximumSpeed);const t=!k.empty(this.options.speed)&&this.options.speed.length>1;ee.toggleMenuButton.call(this,s,t),mn(e),ee.checkMenu.call(this),t&&(this.options.speed.forEach(a=>{ee.createMenuItem.call(this,{value:a,list:e,type:s,title:ee.getLabel.call(this,"speed",a)})}),ee.updateSetting.call(this,s,e))},checkMenu(){const{buttons:s}=this.elements.settings,e=!k.empty(s)&&Object.values(s).some(t=>!t.hidden);ys(this.elements.settings.menu,!e)},focusFirstMenuItem(s,e=!1){if(this.elements.settings.popup.hidden)return;let t=s;k.element(t)||(t=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const a=t.querySelector('[role^="menuitem"]');sr.call(this,a,e)},toggleMenu(s){const{popup:e}=this.elements.settings,t=this.elements.buttons.settings;if(!k.element(e)||!k.element(t))return;const{hidden:a}=e;let i=a;if(k.boolean(s))i=s;else if(k.keyboardEvent(s)&&s.key==="Escape")i=!1;else if(k.event(s)){const o=k.function(s.composedPath)?s.composedPath()[0]:s.target,r=e.contains(o);if(r||!r&&s.target!==t&&i)return}t.setAttribute("aria-expanded",i),ys(e,!i),Ie(this.elements.container,this.config.classNames.menu.open,i),i&&k.keyboardEvent(s)?ee.focusFirstMenuItem.call(this,null,!0):i||a||sr.call(this,t,k.keyboardEvent(s))},getMenuSize(s){const e=s.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),s.parentNode.appendChild(e);const t=e.scrollWidth,a=e.scrollHeight;return Jt(e),{width:t,height:a}},showMenuPanel(s="",e=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${s}`);if(!k.element(t))return;const a=t.parentNode,i=Array.from(a.children).find(o=>!o.hidden);if($e.transitions&&!$e.reducedMotion){a.style.width=`${i.scrollWidth}px`,a.style.height=`${i.scrollHeight}px`;const o=ee.getMenuSize.call(this,t),r=l=>{l.target===a&&["width","height"].includes(l.propertyName)&&(a.style.width="",a.style.height="",gn.call(this,a,er,r))};Ae.call(this,a,er,r),a.style.width=`${o.width}px`,a.style.height=`${o.height}px`}ys(i,!0),ys(t,!1),ee.focusFirstMenuItem.call(this,t,e)},setDownloadUrl(){const s=this.elements.buttons.download;k.element(s)&&s.setAttribute("href",this.download)},create(s){const{bindMenuItemShortcuts:e,createButton:t,createProgress:a,createRange:i,createTime:o,setQualityMenu:r,setSpeedMenu:l,showMenuPanel:d}=ee;this.elements.controls=null,k.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=me("div",$t(this.config.selectors.controls.wrapper));this.elements.controls=c;const h={class:"plyr__controls__item"};return nr(k.array(this.config.controls)?this.config.controls:[]).forEach(u=>{if(u==="restart"&&c.appendChild(t.call(this,"restart",h)),u==="rewind"&&c.appendChild(t.call(this,"rewind",h)),u==="play"&&c.appendChild(t.call(this,"play",h)),u==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",h)),u==="progress"){const f=me("div",{class:`${h.class} plyr__progress__container`}),p=me("div",$t(this.config.selectors.progress));if(p.appendChild(i.call(this,"seek",{id:`plyr-seek-${s.id}`})),p.appendChild(a.call(this,"buffer")),this.config.tooltips.seek){const m=me("span",{class:this.config.classNames.tooltip},"00:00");p.appendChild(m),this.elements.display.seekTooltip=m}this.elements.progress=p,f.appendChild(this.elements.progress),c.appendChild(f)}if(u==="current-time"&&c.appendChild(o.call(this,"currentTime",h)),u==="duration"&&c.appendChild(o.call(this,"duration",h)),u==="mute"||u==="volume"){let{volume:f}=this.elements;if(k.element(f)&&c.contains(f)||(f=me("div",Me({},h,{class:`${h.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),u==="mute"&&f.appendChild(t.call(this,"mute")),u==="volume"&&!Ye.isIos&&!Ye.isIPadOS){const p={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",Me(p,{id:`plyr-volume-${s.id}`})))}}if(u==="captions"&&c.appendChild(t.call(this,"captions",h)),u==="settings"&&!k.empty(this.config.settings)){const f=me("div",Me({},h,{class:`${h.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${s.id}`,"aria-expanded":!1}));const p=me("div",{class:"plyr__menu__container",id:`plyr-settings-${s.id}`,hidden:""}),m=me("div"),g=me("div",{id:`plyr-settings-${s.id}-home`}),y=me("div",{role:"menu"});g.appendChild(y),m.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(b=>{const S=me("button",Me($t(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,S,b),Ae.call(this,S,"click",()=>{d.call(this,b,!1)});const _=me("span",null,Je.get(b,this.config)),C=me("span",{class:this.config.classNames.menu.value});C.innerHTML=s[b],_.appendChild(C),S.appendChild(_),y.appendChild(S);const E=me("div",{id:`plyr-settings-${s.id}-${b}`,hidden:""}),v=me("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});v.appendChild(me("span",{"aria-hidden":!0},Je.get(b,this.config))),v.appendChild(me("span",{class:this.config.classNames.hidden},Je.get("menuBack",this.config))),Ae.call(this,E,"keydown",T=>{T.key==="ArrowLeft"&&(T.preventDefault(),T.stopPropagation(),d.call(this,"home",!0))},!1),Ae.call(this,v,"click",()=>{d.call(this,"home",!1)}),E.appendChild(v),E.appendChild(me("div",{role:"menu"})),m.appendChild(E),this.elements.settings.buttons[b]=S,this.elements.settings.panels[b]=E}),p.appendChild(m),f.appendChild(p),c.appendChild(f),this.elements.settings.popup=p,this.elements.settings.menu=f}if(u==="pip"&&$e.pip&&c.appendChild(t.call(this,"pip",h)),u==="airplay"&&$e.airplay&&c.appendChild(t.call(this,"airplay",h)),u==="download"){const f=Me({},h,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:p}=this.config.urls;!k.url(p)&&this.isEmbed&&Me(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}u==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",h))}),this.isHTML5&&r.call(this,ns.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const i=ee.getIconUrl.call(this);i.cors&&xu(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let s=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;k.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),k.element(this.config.controls)||k.string(this.config.controls)?s=this.config.controls:(s=ee.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Le.getLabel.call(this)}),t=!1);let a;if(t&&k.string(this.config.controls)&&(s=(i=>{let o=i;return Object.entries(e).forEach(([r,l])=>{o=ha(o,`{${r}}`,l)}),o})(s)),k.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),k.element(a)||(a=this.elements.container),a[k.element(s)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",s),k.element(this.elements.controls)||ee.findElements.call(this),!k.empty(this.elements.buttons)){const i=o=>{const r=this.config.classNames.controlPressed;o.setAttribute("aria-pressed","false"),Object.defineProperty(o,"pressed",{configurable:!0,enumerable:!0,get:()=>pn(o,r),set(l=!1){Ie(o,r,l),o.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(o=>{k.array(o)||k.nodeList(o)?Array.from(o).filter(Boolean).forEach(i):i(o)})}if(Ye.isEdge&&fu(a),this.config.tooltips.controls){const{classNames:i,selectors:o}=this.config,r=`${o.controls.wrapper} ${o.labels} .${i.hidden}`,l=ca.call(this,r);Array.from(l).forEach(d=>{Ie(d,this.config.classNames.hidden,!1),Ie(d,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var s,e;if(!this.duration||this.elements.markers)return;const t=(s=this.config.markers)===null||s===void 0||(e=s.points)===null||e===void 0?void 0:e.filter(({time:d})=>d>0&&d<this.duration);if(t==null||!t.length)return;const a=document.createDocumentFragment(),i=document.createDocumentFragment();let o=null;const r=`${this.config.classNames.tooltip}--visible`,l=d=>Ie(o,r,d);t.forEach(d=>{const c=me("span",{class:this.config.classNames.marker},""),h=d.time/this.duration*100+"%";o&&(c.addEventListener("mouseenter",()=>{d.label||(o.style.left=h,o.innerHTML=d.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=d.time}),c.style.left=h,i.appendChild(c)}),a.appendChild(i),this.config.tooltips.seek||(o=me("span",{class:this.config.classNames.tooltip},""),a.appendChild(o)),this.elements.markers={points:i,tip:o},this.elements.progress.appendChild(a)}};function Au(s,e=!0){let t=s;if(e){const a=document.createElement("a");a.href=t,t=a.href}try{return new URL(t)}catch{return null}}function Lu(s){const e=new URLSearchParams;return k.object(s)&&Object.entries(s).forEach(([t,a])=>{e.set(t,a)}),e}const Le={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!$e.textTracks)return void(k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&ee.setCaptionsMenu.call(this));if(k.element(this.elements.captions)||(this.elements.captions=me("div",$t(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),C5(this.elements.captions,this.elements.wrapper)),Ye.isIE&&window.URL){const a=this.media.querySelectorAll("track");Array.from(a).forEach(i=>{const o=i.getAttribute("src"),r=Au(o);r!==null&&r.hostname!==window.location.href.hostname&&["http:","https:"].includes(r.protocol)&&ma(o,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{Jt(i)})})}const s=nr((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(a=>a.split("-")[0]));let e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();e==="auto"&&([e]=s);let t=this.storage.get("captions");if(k.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:e,languages:s}),this.isHTML5){const a=this.config.captions.update?"addtrack removetrack":"removetrack";Ae.call(this,this.media.textTracks,a,Le.update.bind(this))}setTimeout(Le.update.bind(this),0)},update(){const s=Le.getTracks.call(this,!0),{active:e,language:t,meta:a,currentTrackNode:i}=this.captions,o=!!s.find(r=>r.language===t);this.isHTML5&&this.isVideo&&s.filter(r=>!a.get(r)).forEach(r=>{this.debug.log("Track added",r),a.set(r,{default:r.mode==="showing"}),r.mode==="showing"&&(r.mode="hidden"),Ae.call(this,r,"cuechange",()=>Le.updateCues.call(this))}),(o&&this.language!==t||!s.includes(i))&&(Le.setLanguage.call(this,t),Le.toggle.call(this,e&&o)),this.elements&&Ie(this.elements.container,this.config.classNames.captions.enabled,!k.empty(s)),k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&ee.setCaptionsMenu.call(this)},toggle(s,e=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,a=this.config.classNames.captions.active,i=k.nullOrUndefined(s)?!t:s;if(i!==t){if(e||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!e){const o=Le.getTracks.call(this),r=Le.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=r.language,void Le.set.call(this,o.indexOf(r))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Ie(this.elements.container,a,i),this.captions.toggled=i,ee.updateSetting.call(this,"captions"),pe.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(s,e=!0){const t=Le.getTracks.call(this);if(s!==-1)if(k.number(s))if(s in t){if(this.captions.currentTrack!==s){this.captions.currentTrack=s;const a=t[s],{language:i}=a||{};this.captions.currentTrackNode=a,ee.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),pe.call(this,this.media,"languagechange")}Le.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Le.updateCues.call(this)}else this.debug.warn("Track not found",s);else this.debug.warn("Invalid caption argument",s);else Le.toggle.call(this,!1,e)},setLanguage(s,e=!0){if(!k.string(s))return void this.debug.warn("Invalid language argument",s);const t=s.toLowerCase();this.captions.language=t;const a=Le.getTracks.call(this),i=Le.findTrack.call(this,[t]);Le.set.call(this,a.indexOf(i),e)},getTracks(s=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||s||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(s,e=!1){const t=Le.getTracks.call(this),a=r=>Number((this.captions.meta.get(r)||{}).default),i=Array.from(t).sort((r,l)=>a(l)-a(r));let o;return s.every(r=>(o=i.find(l=>l.language===r),!o)),o||(e?i[0]:void 0)},getCurrentTrack(){return Le.getTracks.call(this)[this.currentTrack]},getLabel(s){let e=s;return!k.track(e)&&$e.textTracks&&this.captions.toggled&&(e=Le.getCurrentTrack.call(this)),k.track(e)?k.empty(e.label)?k.empty(e.language)?Je.get("enabled",this.config):s.language.toUpperCase():e.label:Je.get("disabled",this.config)},updateCues(s){if(!this.supported.ui)return;if(!k.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!k.nullOrUndefined(s)&&!Array.isArray(s))return void this.debug.warn("updateCues: Invalid input",s);let e=s;if(!e){const a=Le.getCurrentTrack.call(this);e=Array.from((a||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(O5)}const t=e.map(a=>a.trim()).join(`
37
- `);if(t!==this.elements.captions.innerHTML){mn(this.elements.captions);const a=me("span",$t(this.config.selectors.caption));a.innerHTML=t,this.elements.captions.appendChild(a),pe.call(this,this.media,"cuechange")}}},Iu={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},rr={active:"picture-in-picture",inactive:"inline"},is={html5:"html5",youtube:"youtube",vimeo:"vimeo"},lr={audio:"audio",video:"video"};function $5(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?is.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?is.vimeo:null}const cr=()=>{};class V5{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):cr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):cr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):cr}}class Rt{constructor(e){te(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const a=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,a,this.active?"enterfullscreen":"exitfullscreen",!0)}),te(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ie(this.target,this.player.config.classNames.fullscreen.fallback,t),Ye.isIos){let a=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";a||(a=document.createElement("meta"),a.setAttribute("name","viewport"));const o=k.string(a.content)&&a.content.includes(i);t?(this.cleanupViewport=!o,o||(a.content+=`,${i}`)):this.cleanupViewport&&(a.content=a.content.split(",").filter(r=>r.trim()!==i).join(","))}this.onChange()}),te(this,"trapFocus",t=>{if(Ye.isIos||Ye.isIPadOS||!this.active||t.key!=="Tab")return;const a=document.activeElement,i=ca.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=i,r=i[i.length-1];a!==r||t.shiftKey?a===o&&t.shiftKey&&(r.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}),te(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Rt.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ie(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),te(this,"enter",()=>{this.supported&&(Ye.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Rt.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),te(this,"exit",()=>{if(this.supported)if(Ye.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Vt(this.player.play());else if(!Rt.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),te(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Rt.prefix,this.property=Rt.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&x5(this.player.elements.container,e.config.fullscreen.container),Ae.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ae.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ae.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Rt.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Rt.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Rt.nativeSupported||!Ye.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Rt.nativeSupported||this.forceFallback)return pn(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return Ye.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Sn(s,e=1){return new Promise((t,a)=>{const i=new Image,o=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:a)(i)};Object.assign(i,{onload:o,onerror:o,src:s})})}const Be={addStyleHook(){Ie(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ie(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Be.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(ee.inject.call(this),this.listeners.controls()),Be.toggleNativeControls.call(this),this.isHTML5&&Le.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,ee.updateVolume.call(this),ee.timeUpdate.call(this),ee.durationUpdate.call(this),Be.checkPlaying.call(this),Ie(this.elements.container,this.config.classNames.pip.supported,$e.pip&&this.isHTML5&&this.isVideo),Ie(this.elements.container,this.config.classNames.airplay.supported,$e.airplay&&this.isHTML5),Ie(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Be.setTitle.call(this),this.poster&&Be.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&ee.durationUpdate.call(this),this.config.mediaMetadata&&ee.setMediaMetadata.call(this)},setTitle(){let s=Je.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=We.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,a=Je.get("frameTitle",this.config);e.setAttribute("title",a.replace("{title}",t))}},togglePoster(s){Ie(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),L5.call(this).then(()=>Sn(s)).catch(t=>{throw s===this.poster&&Be.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Be.togglePoster.call(this,!0),s)))},checkPlaying(s){Ie(this.elements.container,this.config.classNames.playing,this.playing),Ie(this.elements.container,this.config.classNames.paused,this.paused),Ie(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Je.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Be.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ie(this.elements.container,this.config.classNames.loading,this.loading),Be.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class U5{constructor(e){te(this,"firstTouch",()=>{const{player:t}=this,{elements:a}=t;t.touch=!0,Ie(a.container,t.config.classNames.isTouch,!0)}),te(this,"global",(t=!0)=>{const{player:a}=this;a.config.keyboard.global&&da.call(a,window,"keydown keyup",this.handleKey,t,!1),da.call(a,document.body,"click",this.toggleMenu,t),ar.call(a,document.body,"touchstart",this.firstTouch)}),te(this,"container",()=>{const{player:t}=this,{config:a,elements:i,timers:o}=t;!a.keyboard.global&&a.keyboard.focused&&Ae.call(t,i.container,"keydown keyup",this.handleKey,!1),Ae.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let h=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Be.toggleControls.call(t,!0),h=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>Be.toggleControls.call(t,!1),h)});const r=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[h,u]=ir.call(t),f=wu(`aspect-ratio: ${h} / ${u}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,m]=I5(),g=p/m>h/u;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?m/u*h+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Ae.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(r(),(d.type==="enterfullscreen"?Ae:gn).call(t,window,"resize",l)))})}),te(this,"media",()=>{const{player:t}=this,{elements:a}=t;if(Ae.call(t,t.media,"timeupdate seeking seeked",o=>ee.timeUpdate.call(t,o)),Ae.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>ee.durationUpdate.call(t,o)),Ae.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ae.call(t,t.media,"progress playing seeking seeked",o=>ee.updateProgress.call(t,o)),Ae.call(t,t.media,"volumechange",o=>ee.updateVolume.call(t,o)),Ae.call(t,t.media,"playing play pause ended emptied timeupdate",o=>Be.checkPlaying.call(t,o)),Ae.call(t,t.media,"waiting canplay seeked playing",o=>Be.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=We.call(t,`.${t.config.classNames.video}`);if(!k.element(o))return;Ae.call(t,a.container,"click",r=>{([a.container,o].includes(r.target)||o.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(r,t.restart,"restart"),this.proxy(r,()=>{Vt(t.play())},"play")):this.proxy(r,()=>{Vt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ae.call(t,a.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Ae.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ae.call(t,t.media,"ratechange",()=>{ee.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ae.call(t,t.media,"qualitychange",o=>{ee.updateSetting.call(t,"quality",null,o.detail.quality)}),Ae.call(t,t.media,"ready qualitychange",()=>{ee.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ae.call(t,t.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=t.media.error),pe.call(t,a.container,o.type,!0,r)})}),te(this,"proxy",(t,a,i)=>{const{player:o}=this,r=o.config.listeners[i];let l=!0;k.function(r)&&(l=r.call(o,t)),l!==!1&&k.function(a)&&a.call(o,t)}),te(this,"bind",(t,a,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=k.function(d);Ae.call(l,t,a,h=>this.proxy(h,i,o),r&&!c)}),te(this,"controls",()=>{const{player:t}=this,{elements:a}=t,i=Ye.isIE?"change":"input";if(a.buttons.play&&Array.from(a.buttons.play).forEach(o=>{this.bind(o,"click",()=>{Vt(t.togglePlay())},"play")}),this.bind(a.buttons.restart,"click",t.restart,"restart"),this.bind(a.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(a.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(a.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(a.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(a.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(a.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(a.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(a.buttons.airplay,"click",t.airplay,"airplay"),this.bind(a.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),ee.toggleMenu.call(t,o)},null,!1),this.bind(a.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),ee.toggleMenu.call(t,o)):ee.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(a.settings.menu,"keydown",o=>{o.key==="Escape"&&ee.toggleMenu.call(t,o)}),this.bind(a.inputs.seek,"mousedown mousemove",o=>{const r=a.progress.getBoundingClientRect(),l=100/r.width*(o.pageX-r.left);o.currentTarget.setAttribute("seek-value",l)}),this.bind(a.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const r=o.currentTarget,l="play-on-seeked";if(k.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;t.lastSeekTime=Date.now();const d=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(o.type);d&&c?(r.removeAttribute(l),Vt(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Ye.isIos){const o=ca.call(t,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>fu(l.target)))}this.bind(a.inputs.seek,i,o=>{const r=o.currentTarget;let l=r.getAttribute("seek-value");k.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),t.currentTime=l/r.max*t.duration},"seek"),this.bind(a.progress,"mouseenter mouseleave mousemove",o=>ee.updateSeekTooltip.call(t,o)),this.bind(a.progress,"mousemove touchmove",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startMove(o)}),this.bind(a.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(a.progress,"mousedown touchstart",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startScrubbing(o)}),this.bind(a.progress,"mouseup touchend",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endScrubbing(o)}),Ye.isWebKit&&Array.from(ca.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>ee.updateRangeFill.call(t,r.target))}),t.config.toggleInvert&&!k.element(a.display.duration)&&this.bind(a.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,ee.timeUpdate.call(t))}),this.bind(a.inputs.volume,i,o=>{t.volume=o.target.value},"volume"),this.bind(a.controls,"mouseenter mouseleave",o=>{a.controls.hover=!t.touch&&o.type==="mouseenter"}),a.fullscreen&&Array.from(a.fullscreen.children).filter(o=>!o.contains(a.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",r=>{a.controls&&(a.controls.hover=!t.touch&&r.type==="mouseenter")})}),this.bind(a.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{a.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(a.controls,"focusin",()=>{const{config:o,timers:r}=t;Ie(a.controls,o.classNames.noTransition,!0),Be.toggleControls.call(t,!0),setTimeout(()=>{Ie(a.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>Be.toggleControls.call(t,!1),l)}),this.bind(a.inputs.volume,"wheel",o=>{const r=o.webkitDirectionInvertedFromDevice,[l,d]=[o.deltaX,-o.deltaY].map(u=>r?-u:u),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:h}=t.media;(c===1&&h<1||c===-1&&h>0)&&o.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:a}=t,{key:i,type:o,altKey:r,ctrlKey:l,metaKey:d,shiftKey:c}=e,h=o==="keydown",u=h&&i===this.lastKey;if(!(r||l||d||c)&&i){if(h){const p=document.activeElement;if(k.element(p)){const{editable:m}=t.config.selectors,{seek:g}=a.inputs;if(p!==g&&bs(p,m)||e.key===" "&&bs(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":u||Vt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){ee.toggleMenu.call(this.player,e)}}function z5(s,e){return s(e={exports:{}},e.exports),e.exports}var G5=z5(function(s,e){s.exports=function(){var t=function(){},a={},i={},o={};function r(f,p){f=f.push?f:[f];var m,g,y,b=[],S=f.length,_=S;for(m=function(C,E){E.length&&b.push(C),--_||p(b)};S--;)g=f[S],(y=i[g])?m(g,y):(o[g]=o[g]||[]).push(m)}function l(f,p){if(f){var m=o[f];if(i[f]=p,m)for(;m.length;)m[0](f,p),m.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,m,g){var y,b,S=document,_=m.async,C=(m.numRetries||0)+1,E=m.before||t,v=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(v)?((b=S.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(v)?(b=S.createElement("img")).src=T:((b=S.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(B){var L=B.type[0];if(y)try{b.sheet.cssText.length||(L="e")}catch(R){R.code!=18&&(L="e")}if(L=="e"){if((g+=1)<C)return c(f,p,m,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,L,B.defaultPrevented)},E(f,b)!==!1&&S.head.appendChild(b)}function h(f,p,m){var g,y,b=(f=f.push?f:[f]).length,S=b,_=[];for(g=function(C,E,v){if(E=="e"&&_.push(C),E=="b"){if(!v)return;_.push(C)}--b||p(_)},y=0;y<S;y++)c(f[y],g,m)}function u(f,p,m){var g,y;if(p&&p.trim&&(g=p),y=(g?m:p)||{},g){if(g in a)throw"LoadJS";a[g]=!0}function b(S,_){h(f,function(C){d(y,C),S&&d({success:S,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return u.ready=function(f,p){return r(f,function(m){d(p,m)}),u},u.done=function(f){l(f,[])},u.reset=function(){a={},i={},o={}},u.isDefined=function(f){return f in a},u}()});function dr(s){return new Promise((e,t)=>{G5(s,{success:e,error:t})})}function j5(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function H5(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function fa(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const hr={setup(){const s=this;Ie(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,Ds.call(s),k.object(window.Vimeo)?hr.ready.call(s):dr(s.config.urls.vimeo.sdk).then(()=>{hr.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:a,...i}=e;let o=s.media.getAttribute("src"),r="";k.empty(o)?(o=s.media.getAttribute(s.config.attributes.embed.id),r=s.media.getAttribute(s.config.attributes.embed.hash)):r=H5(o);const l=r?{h:r}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Lu({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=j5(o),h=me("iframe"),u=or(s.config.urls.vimeo.iframe,c,d);if(h.setAttribute("src",u),h.setAttribute("allowfullscreen",""),h.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(a)||h.setAttribute("referrerPolicy",a),t||!e.customControls)h.setAttribute("data-poster",s.poster),s.media=fn(h,s.media);else{const S=me("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});S.appendChild(h),s.media=fn(S,s.media)}e.customControls||ma(or(s.config.urls.vimeo.api,u)).then(S=>{!k.empty(S)&&S.thumbnail_url&&Be.setPoster.call(s,S.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(h,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(fa.call(s,!0),s.embed.play()),s.media.pause=()=>(fa.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(S){const{embed:_,media:C,paused:E,volume:v}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(S)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(v)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(S){s.embed.setPlaybackRate(S).then(()=>{p=S,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:m}=s.config;Object.defineProperty(s.media,"volume",{get:()=>m,set(S){s.embed.setVolume(S).then(()=>{m=S,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(S){const _=!!k.boolean(S)&&S;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(S){const _=k.boolean(S)?S:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(S=>{y=S,ee.setDownloadUrl.call(s)}).catch(S=>{this.debug.warn(S)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(S=>{const[_,C]=S;s.embed.ratio=Eu(_,C),Ds.call(this)}),s.embed.setAutopause(s.config.autopause).then(S=>{s.config.autopause=S}),s.embed.getVideoTitle().then(S=>{s.config.title=S,Be.setTitle.call(this)}),s.embed.getCurrentTime().then(S=>{f=S,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(S=>{s.media.duration=S,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(S=>{s.media.textTracks=S,Le.setup.call(s)}),s.embed.on("cuechange",({cues:S=[]})=>{const _=S.map(C=>P5(C.text));Le.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(S=>{fa.call(s,!S),S||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{fa.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{fa.call(s,!1)}),s.embed.on("timeupdate",S=>{s.media.seeking=!1,f=S.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",S=>{s.media.buffered=S.percent,pe.call(s,s.media,"progress"),parseInt(S.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",S=>{s.media.error=S,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Be.build.call(s),0)}};function W5(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function pa(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function K5(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const wn={setup(){if(Ie(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))wn.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),wn.ready.call(this)},dr(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){ma(or(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:a,width:i}=e;this.config.title=t,Be.setTitle.call(this),this.embed.ratio=Eu(i,a)}Ds.call(this)}).catch(()=>{Ds.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let a=s.media.getAttribute("src");k.empty(a)&&(a=s.media.getAttribute(this.config.attributes.embed.id));const i=W5(a),o=me("div",{id:R5(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=fn(o,s.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Sn(r("maxres"),121).catch(()=>Sn(r("sd"),121)).catch(()=>Sn(r("hq"))).then(l=>Be.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:K5(e),playerVars:Me({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(r){if(!s.media.error){const l=r.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(r){const l=r.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(r){if(k.function(s.media.play))return;const l=r.target;wn.getTitle.call(s,i),s.media.play=()=>{pa.call(s,!0),l.playVideo()},s.media.pause=()=>{pa.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(u){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(u)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(u){l.setPlaybackRate(u)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(u){d=u,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(u){const f=k.boolean(u)?u:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const h=l.getAvailablePlaybackRates();s.options.speed=h.filter(u=>s.config.speed.options.includes(u)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Be.build.call(s),50)},onStateChange(r){const l=r.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(r.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),r.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:pa.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(pa.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),pa.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:r.data})}}})}},Ru={setup(){this.media?(Ie(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ie(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ie(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=me("div",{class:this.config.classNames.video}),gu(this.media,this.elements.wrapper),this.elements.poster=me("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ns.setup.call(this):this.isYouTube?wn.setup.call(this):this.isVimeo&&hr.setup.call(this)):this.debug.warn("No media element found!")}};class q5{constructor(e){te(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():dr(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),te(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),te(this,"setupIMA",()=>{this.elements.container=me("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),te(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const a=new google.ima.AdsRequest;a.adTagUrl=this.tagUrl,a.linearAdSlotWidth=t.offsetWidth,a.linearAdSlotHeight=t.offsetHeight,a.nonLinearAdSlotWidth=t.offsetWidth,a.nonLinearAdSlotHeight=t.offsetHeight,a.forceNonLinearFullSlot=!1,a.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(a)}catch(a){this.onAdError(a)}}),te(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const a=bn(Math.max(this.manager.getRemainingTime(),0)),i=`${Je.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),te(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const a=new google.ima.AdsRenderingSettings;a.restoreCustomPlaybackStateOnAdBreakComplete=!0,a.enablePreloading=!0,this.manager=t.getAdsManager(this.player,a),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],o=>this.onAdEvent(o))}),this.trigger("loaded")}),te(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const a=this.player.elements.progress;if(k.element(a)){const i=100/this.player.duration*t,o=me("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,a.appendChild(o)}}})}),te(this,"onAdEvent",t=>{const{container:a}=this.player.elements,i=t.getAd(),o=t.getAdData();switch((r=>{pe.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=a.offsetWidth,i.height=a.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),te(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),te(this,"listeners",()=>{const{container:t}=this.player.elements;let a;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{a=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((o,r)=>{a<o&&o<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),te(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(a){this.onAdError(a)}}).catch(()=>{})}),te(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Vt(this.player.media.play())}),te(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),te(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),te(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),te(this,"trigger",(t,...a)=>{const i=this.events[t];k.array(i)&&i.forEach(o=>{k.function(o)&&o.apply(this,a)})}),te(this,"on",(t,a)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(a),this)),te(this,"startSafetyTimer",(t,a)=>{this.player.debug.log(`Safety timer invoked from: ${a}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),te(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,a)=>{this.on("loaded",t),this.on("error",a)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Lu({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function Bu(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const Y5=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const a={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(a.startTime)){if(!k.empty(i.trim())&&k.empty(a.text)){const o=i.trim().split("#xywh=");[a.text]=o,o[1]&&([a.x,a.y,a.w,a.h]=o[1].split(","))}}else{const o=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);o&&(a.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+ +`0.${o[4]}`,a.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+ +`0.${o[9]}`)}}),a.text&&e.push(a)}),e},Nu=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class ur{constructor(e){te(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),te(this,"getThumbnails",()=>new Promise(t=>{const{src:a}=this.player.config.previewThumbnails;if(k.empty(a))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((o,r)=>o.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(a))a(o=>{this.thumbnails=o,i()});else{const o=(k.string(a)?[a]:a).map(r=>this.getThumbnail(r));Promise.all(o).then(i)}})),te(this,"getThumbnail",t=>new Promise(a=>{ma(t).then(i=>{const o={frames:Y5(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{o.height=r.naturalHeight,o.width=r.naturalWidth,this.thumbnails.push(o),a()},r.src=o.urlPrefix+o.frames[0].text})})),te(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var a,i;const o=this.player.elements.progress.getBoundingClientRect(),r=100/o.width*(t.pageX-o.left);this.seekTime=this.player.media.duration*(r/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=bn(this.seekTime);const l=(a=this.player.config.markers)===null||a===void 0||(i=a.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),te(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),te(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),te(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ar.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),te(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),te(this,"render",()=>{this.elements.thumb.container=me("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=me("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=me("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=me("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=me("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),te(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),te(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),a=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(a),a&&(this.thumbnails.forEach((o,r)=>{this.loadedImages.includes(o.frames[t].text)&&(i=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),te(this,"loadImage",(t=0)=>{const a=this.showingThumb,i=this.thumbnails[t],{urlPrefix:o}=i,r=i.frames[a],l=i.frames[a].text,d=o+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,t,a,l,!1),this.currentImageElement.dataset.index=a,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=a,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,r,t,a,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),te(this,"showImage",(t,a,i,o,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${o}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,a),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(i,t,a,r))}),te(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(a=>{if(a.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(a.dataset.index!==t.dataset.index&&!a.dataset.deleting){a.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(a),this.player.debug.log(`Removing thumb: ${a.dataset.filename}`)},i)}})}),te(this,"preloadNearby",(t,a=!0)=>new Promise(i=>{setTimeout(()=>{const o=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===o){let r;r=a?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;r.forEach(d=>{const c=d.text;if(c!==o&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:h}=this.thumbnails[0],u=h+c,f=new Image;f.src=u,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),te(this,"getHigherQuality",(t,a,i,o)=>{if(t<this.thumbnails.length-1){let r=a.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(t+1))},300)}}),te(this,"toggleThumbContainer",(t=!1,a=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&a&&(this.showingThumb=null,this.showingThumbFilename=null)}),te(this,"toggleScrubbingContainer",(t=!1)=>{const a=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(a,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),te(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),te(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const a=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${a}px`}else if(t.clientHeight<20&&t.clientWidth>20){const a=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${a}px`}}else{const a=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${a}px`}this.setThumbContainerPos()}),te(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),a=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,o=a.left-t.left+10,r=a.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=Bu(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),te(this,"setScrubbingContainerSize",()=>{const{width:t,height:a}=Nu(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${a}px`}),te(this,"setImageSizeAndOffset",(t,a)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/a.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${a.x*i}px`,t.style.top=`-${a.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Nu(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const mr={insertElements(s,e){k.string(e)?yu(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{yu(s,this.media,t)})},change(s){pu(s,"sources.length")?(ns.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Jt(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:a=is.html5,src:i}]=e,o=a==="html5"?t:"div",r=a==="html5"?{}:{src:i};Object.assign(this,{provider:a,type:t,supported:$e.check(t,a,this.config.playsinline),media:me(o,r)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Be.addStyleHook.call(this),this.isHTML5&&mr.insertElements.call(this,"source",e),this.config.title=s.title,Ru.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&mr.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Be.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Ps{constructor(e,t){if(te(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Vt(this.media.play())),this.media.play()):null),te(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),te(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),te(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),te(this,"restart",()=>{this.currentTime=0}),te(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),te(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),te(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),te(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),te(this,"airplay",()=>{$e.airplay&&this.media.webkitShowPlaybackTargetPicker()}),te(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=pn(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,h=Ie(this.elements.container,this.config.classNames.hideControls,c);if(h&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&ee.toggleMenu.call(this,!1),h!==d){const u=h?"controlshidden":"controlsshown";pe.call(this,this.media,u)}return!h}return!1}),te(this,"on",(l,d)=>{Ae.call(this,this.elements.container,l,d)}),te(this,"once",(l,d)=>{ar.call(this,this.elements.container,l,d)}),te(this,"off",(l,d)=>{gn(this.elements.container,l,d)}),te(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(Jt(this.elements.buttons.play),Jt(this.elements.captions),Jt(this.elements.controls),Jt(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(A5.call(this),ns.cancelRequests.call(this),fn(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Be.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),te(this,"supports",l=>$e.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=$e.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Me({},Iu,Ps.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new V5(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",$e),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!$e.check().api)return void this.debug.error("Setup failed: no support");const a=this.media.cloneNode(!0);a.autoplay=!1,this.elements.original=a;const i=this.media.tagName.toLowerCase();let o=null,r=null;switch(i){case"div":if(o=this.media.querySelector("iframe"),k.element(o)){if(r=Au(o.getAttribute("src")),this.provider=$5(r.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",r.search.length){const l=["1","true"];l.includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(is).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=lr.video;break;case"video":case"audio":this.type=i,this.provider=is.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=$e.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new U5(this),this.storage=new ua(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=me("div"),gu(this.media,this.elements.container)),Be.migrateStyles.call(this),Be.addStyleHook.call(this),Ru.setup.call(this),this.config.debug&&Ae.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Rt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Be.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new q5(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Vt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===is.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===is.youtube}get isVimeo(){return this.provider===is.vimeo}get isVideo(){return this.type===lr.video}get isAudio(){return this.type===lr.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,a=k.number(t)&&t!==1/0?t:0;return e||a}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:a,maximumSpeed:i}=this;t=Bu(t,a,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,a=this.options.quality;if(!a.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),o=!0;if(!a.includes(i)){const r=Su(a,i);this.debug.warn(`Unsupported quality option: ${i}, using ${r} instead`),i=r,o=!1}t.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){mr.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,ee.setDownloadUrl.call(this))}set poster(e){this.isVideo?Be.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=yn(ir.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&ku(e)?(this.config.ratio=yn(e),Ds.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Le.toggle.call(this,e,!1)}set currentTrack(e){Le.set.call(this,e,!1),Le.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Le.setLanguage.call(this,e,!1)}get language(){return(Le.getCurrentTrack.call(this)||{}).language}set pip(e){if(!$e.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?rr.active:rr.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return $e.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===rr.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))}static supported(e,t){return $e.check(e,t)}static loadSprite(e,t){return xu(e,t)}static setup(e,t={}){let a=null;return k.string(e)?a=Array.from(document.querySelectorAll(e)):k.nodeList(e)?a=Array.from(e):k.array(e)&&(a=e.filter(k.element)),k.empty(a)?null:a.map(i=>new Ps(i,t))}}Ps.defaults=T5(Iu);const J5={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},X5={class:"carousel-video-player__play-info-portrait__date"},Z5={class:"carousel-video-player__play-info-portrait__game"},Q5={key:2,class:"carousel-video-player__play-info__data"},eL={class:"video-container"},tL=["id"],sL=qe({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,a=n.ref(null),i=n.ref(!1),o=n.computed(()=>`p-${t.play.playId||t.play.play_id}`),r=n.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${Ox(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${Qh[f.getMonth()]} ${f.getFullYear()}`}),l=n.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=n.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=n.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function h(){a.value=new Ps(`#${o.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(a.value.on("loadeddata",()=>{a.value.currentTime=t.play.startSeconds}),a.value.on("timeupdate",()=>{a.value.currentTime>=t.play.endSeconds&&(a.value.pause(),a.value.currentTime=t.play.startSeconds,e("play-ended"))})),a.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},a.value.isDestroyed=!1,t.play.videoPlayer=a.value,t.play.plyrInit=h,a.value.on("webkitfullscreenchange",u()),a.value.on("mozfullscreenchange",u()),a.value.on("fullscreenchange",u())}function u(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return n.onMounted(()=>{setTimeout(()=>{h()},100)}),(f,p)=>(n.openBlock(),n.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=m=>i.value=!0),onMouseleave:p[1]||(p[1]=m=>i.value=!1)},[n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},n.toDisplayString(r.value),3)):n.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(n.openBlock(),n.createElementBlock("div",J5,[n.createElementVNode("div",X5,[n.createTextVNode(n.toDisplayString(r.value)+" - ",1),n.createElementVNode("div",Z5,n.toDisplayString(d.value),1)]),n.createTextVNode(" "+n.toDisplayString(c.value),1)])):(n.openBlock(),n.createElementBlock("div",Q5,n.toDisplayString(l.value),1))],2),[[n.vShow,i.value]]),n.createElementVNode("div",eL,[n.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,tL)])],32))}},[["__scopeId","data-v-7f6d1b57"]]),fr=s=>(n.pushScopeId("data-v-e0039d6a"),s=s(),n.popScopeId(),s),aL=[fr(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[n.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),n.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],nL={class:"carousel-full-screen__carousel"},iL={key:0,class:"icon-mobil-scrren"},oL=[fr(()=>n.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),fr(()=>n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],rL={class:"carousel-full-screen__carousel__video-player"},pr=2,lL=qe({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let a=0,i=new Map;const o=n.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=n.ref(null),l=n.ref([]);n.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((S,_)=>(S.index=_,{...S})),a=t.playlistIndex,i=new Map(l.value.map(S=>[S.index,S])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function h({selectedItem:b}){if(a!==b.index){const S=b.index-a;a=b.index;const _=i.get(a+S*-1),C=i.get(a);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),S>0){const E=i.get(a+pr),v=i.get(a+1),T=i.get(a-pr);E&&(l.value.find(B=>B.index===E.index)||l.value.push(E)),v&&v.videoPlayer&&v.videoPlayer.isDestroyed&&v.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(S<0){const E=i.get(a-1),v=i.get(a+pr);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),v&&v.videoPlayer&&(v.videoPlayer.pause(),v.videoPlayer.src="",v.videoPlayer.destroy(),v.videoPlayer.isDestroyed=!0)}}}function u(){r.value&&r.value.next()}function f(){e("close",a)}const p=n.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=n.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return n.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,_)=>{S.id=`plyrFS${_+1}`})},100)}),n.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,S)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["carousel-full-screen",c()&&!m.value?"paddingIos":""]),id:"carousel-swipe"},[n.createElementVNode("div",{class:"carousel-full-screen__close",style:n.normalizeStyle(c()&&m.value?"padding-top:30px":""),onClick:f},aL,4),n.createElementVNode("div",nL,[m.value&&d()?(n.openBlock(),n.createElementBlock("div",iL,oL)):n.createCommentVNode("",!0),n.createVNode(n.unref(HA),n.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:h}),{default:n.withCtx(({item:_})=>[n.createElementVNode("div",rL,[n.createVNode(sL,{play:_,"is-portrait":m.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:u},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-e0039d6a"]]),cL=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),dL=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Du={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Pu={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ou={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Fu=new Map([[1,cL],[2,dL]]),hL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},gr={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Mu=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},$u=gr.setup;gr.setup=$u?(s,e)=>(Mu(),$u(s,e)):Mu;const uL=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),mL=["src"],fL={key:1,class:"text"},pL=["src"],gL={class:"stats"},yL=uL(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),bL={class:"numstats"},SL={class:"leyend"};function wL(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,mL)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",fL,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,pL)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",gL,[yL,n.createElementVNode("div",bL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",SL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const _L=hL(gr,[["render",wL],["__scopeId","data-v-fb269a1e"]]),kL={class:"gsc-dropdown__main-container__item-selected"},EL=["height","width"],TL=["stroke"],CL={class:"gsc-dropdown__items-container"},xL=["onClick"],vL={key:0,class:"gsc-dropdown__items-footer"},AL={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref({}),i=n.ref(null),o=n.ref(t.isMultipleOption?-1:0),r=n.ref(!1);n.watch(()=>t.items,(p,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(o.value=g,a.value=p[g]):(o.value=0,a.value=p[0])}else a.value=p[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,p=>{if(p){const m=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);m!==-1&&(o.value=m,a.value=t.items[m],e("update:modelValue",a.value))}},{immediate:!0});const l=n.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=n.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function h(p){i.value&&!i.value.contains(p.target)&&(r.value=!1)}function u(p,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=p,e("input",a.value),e("update:modelValue",a.value)}function f(){r.value=!1,e("click-ready")}return n.onMounted(()=>{document.addEventListener("click",h)}),n.onBeforeMount(()=>{document.removeEventListener("click",h)}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:n.normalizeStyle(l.value)},[n.createElementVNode("div",{class:"gsc-dropdown__main-container",style:n.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[n.createElementVNode("div",kL,[n.renderSlot(p.$slots,"default",{selectedItem:a.value})]),n.createElementVNode("div",{class:n.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:n.normalizeStyle(d.value)},[(n.openBlock(),n.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,TL)],8,EL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",CL,[n.createElementVNode("div",null,[n.createElementVNode("div",{class:"gsc-dropdown__items",style:n.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(g,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(g,y)},[n.renderSlot(p.$slots,"availableItem",{item:g})],10,xL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",vL,[n.createVNode(n.unref(_L),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):n.createCommentVNode("",!0)])],512),[[n.vShow,r.value]])]),_:3})],4))}},LL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},IL={class:"tournament-select__selected-tournament"},RL={class:"tournament-select__selected-tournament__logo"},BL=["src"],NL={class:"tournament-select__selected-tournament__name"},DL="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",PL={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://az755631.vo.msecnd.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,a=n.ref([]),i=n.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),o=n.computed(()=>t.tournamentsIdsToInclude.size?d(a.value):a.value),r=n.computed(()=>o.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||o.value[0]);async function l(){try{if(t.items&&t.items.length)a.value=[...t.items];else{const p=await h();e("change-tournaments",p),a.value=p.map(m=>({...m.tournament,seasons:m.seasons,seasonsIds:m.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((m,g)=>m.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(m=>t.tournamentsIdsToInclude.has(m.id))}function c(p){const m=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return m.open("HEAD",g,!1),m.send(),m.status!==404}async function h(){try{return(await fetch(t.apiUrl||DL)).json()}catch(p){return Promise.reject(p)}}function u(p){e("input",p)}function f(p){e("input",p)}return n.onMounted(()=>{l()}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{class:"tournament-select",style:n.normalizeStyle(i.value)},[n.createVNode(n.unref(AL),n.mergeProps(t,{"model-value":r.value,items:o.value,onInput:u,"onUpdate:modelValue":f}),{default:n.withCtx(({selectedItem:g})=>[n.createElementVNode("div",IL,[n.createElementVNode("div",RL,[c(g.id)?(n.openBlock(),n.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,BL)):n.createCommentVNode("",!0)]),n.createElementVNode("div",NL,n.toDisplayString(g.name),1)])]),availableItem:n.withCtx(({item:g})=>[n.createElementVNode("div",null,n.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},OL=LL(PL,[["__scopeId","data-v-60385f70"]]),FL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},yr={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Vu=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Uu=yr.setup;yr.setup=Uu?(s,e)=>(Vu(),Uu(s,e)):Vu;const ML=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),$L=["src"],VL={key:1,class:"text"},UL=["src"],zL={class:"stats"},GL=ML(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),jL={class:"numstats"},HL={class:"leyend"};function WL(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,$L)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",VL,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,UL)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",zL,[GL,n.createElementVNode("div",jL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",HL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const KL=FL(yr,[["render",WL],["__scopeId","data-v-fb269a1e"]]),qL={class:"gsc-dropdown__main-container__item-selected"},YL=["height","width"],JL=["stroke"],XL={class:"gsc-dropdown__items-container"},ZL=["onClick"],QL={key:0,class:"gsc-dropdown__items-footer"},eI={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref({}),i=n.ref(null),o=n.ref(t.isMultipleOption?-1:0),r=n.ref(!1);n.watch(()=>t.items,(p,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(o.value=g,a.value=p[g]):(o.value=0,a.value=p[0])}else a.value=p[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,p=>{if(p){const m=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);m!==-1&&(o.value=m,a.value=t.items[m],e("update:modelValue",a.value))}},{immediate:!0});const l=n.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=n.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function h(p){i.value&&!i.value.contains(p.target)&&(r.value=!1)}function u(p,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=p,e("input",a.value),e("update:modelValue",a.value)}function f(){r.value=!1,e("click-ready")}return n.onMounted(()=>{document.addEventListener("click",h)}),n.onBeforeMount(()=>{document.removeEventListener("click",h)}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:n.normalizeStyle(l.value)},[n.createElementVNode("div",{class:"gsc-dropdown__main-container",style:n.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[n.createElementVNode("div",qL,[n.renderSlot(p.$slots,"default",{selectedItem:a.value})]),n.createElementVNode("div",{class:n.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:n.normalizeStyle(d.value)},[(n.openBlock(),n.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,JL)],8,YL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",XL,[n.createElementVNode("div",null,[n.createElementVNode("div",{class:"gsc-dropdown__items",style:n.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(g,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(g,y)},[n.renderSlot(p.$slots,"availableItem",{item:g})],10,ZL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",QL,[n.createVNode(n.unref(KL),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):n.createCommentVNode("",!0)])],512),[[n.vShow,r.value]])]),_:3})],4))}},tI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},sI={class:"season-name"},aI={class:"items-list-season"},nI={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,a=n.computed(()=>t.seasons.find(r=>r.id===t.currentSeasonId));function i(r){e("input",r)}function o(r){e("input",r)}return(r,l)=>(n.openBlock(),n.createBlock(n.unref(eI),{items:s.seasons,"model-value":a.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:o,"onUpdate:modelValue":i},{default:n.withCtx(({selectedItem:d})=>[n.createElementVNode("div",sI,[n.createElementVNode("span",null,n.toDisplayString(d.name),1)])]),availableItem:n.withCtx(({item:d})=>[n.createElementVNode("span",aI,n.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},iI=tI(nI,[["__scopeId","data-v-81bba1d4"]]);function zu(s,e){return function(){return s.apply(e,arguments)}}const{toString:oI}=Object.prototype,{getPrototypeOf:br}=Object,_n=(s=>e=>{const t=oI.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Bt=s=>(s=s.toLowerCase(),e=>_n(e)===s),kn=s=>e=>typeof e===s,{isArray:Os}=Array,ga=kn("undefined");function rI(s){return s!==null&&!ga(s)&&s.constructor!==null&&!ga(s.constructor)&&pt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Gu=Bt("ArrayBuffer");function lI(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Gu(s.buffer),e}const cI=kn("string"),pt=kn("function"),ju=kn("number"),En=s=>s!==null&&typeof s=="object",dI=s=>s===!0||s===!1,Tn=s=>{if(_n(s)!=="object")return!1;const e=br(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},hI=Bt("Date"),uI=Bt("File"),mI=Bt("Blob"),fI=Bt("FileList"),pI=s=>En(s)&&pt(s.pipe),gI=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||pt(s.append)&&((e=_n(s))==="formdata"||e==="object"&&pt(s.toString)&&s.toString()==="[object FormData]"))},yI=Bt("URLSearchParams"),[bI,SI,wI,_I]=["ReadableStream","Request","Response","Headers"].map(Bt),kI=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ya(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Os(s))for(a=0,i=s.length;a<i;a++)e.call(null,s[a],a,s);else{const o=t?Object.getOwnPropertyNames(s):Object.keys(s),r=o.length;let l;for(a=0;a<r;a++)l=o[a],e.call(null,s[l],l,s)}}function Hu(s,e){e=e.toLowerCase();const t=Object.keys(s);let a=t.length,i;for(;a-- >0;)if(i=t[a],e===i.toLowerCase())return i;return null}const Ss=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wu=s=>!ga(s)&&s!==Ss;function Sr(){const{caseless:s}=Wu(this)&&this||{},e={},t=(a,i)=>{const o=s&&Hu(e,i)||i;Tn(e[o])&&Tn(a)?e[o]=Sr(e[o],a):Tn(a)?e[o]=Sr({},a):Os(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&ya(arguments[a],t);return e}const EI=(s,e,t,{allOwnKeys:a}={})=>(ya(e,(i,o)=>{t&&pt(i)?s[o]=zu(i,t):s[o]=i},{allOwnKeys:a}),s),TI=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),CI=(s,e,t,a)=>{s.prototype=Object.create(e.prototype,a),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},xI=(s,e,t,a)=>{let i,o,r;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),o=i.length;o-- >0;)r=i[o],(!a||a(r,s,e))&&!l[r]&&(e[r]=s[r],l[r]=!0);s=t!==!1&&br(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},vI=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const a=s.indexOf(e,t);return a!==-1&&a===t},AI=s=>{if(!s)return null;if(Os(s))return s;let e=s.length;if(!ju(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},LI=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&br(Uint8Array)),II=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=t.next())&&!a.done;){const i=a.value;e.call(s,i[0],i[1])}},RI=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},BI=Bt("HTMLFormElement"),NI=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Ku=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),DI=Bt("RegExp"),qu=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};ya(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},PI=s=>{qu(s,(e,t)=>{if(pt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(pt(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},OI=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Os(s)?a(s):a(String(s).split(e)),t},FI=()=>{},MI=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,wr="abcdefghijklmnopqrstuvwxyz",Yu="0123456789",Ju={DIGIT:Yu,ALPHA:wr,ALPHA_DIGIT:wr+wr.toUpperCase()+Yu},$I=(s=16,e=Ju.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function VI(s){return!!(s&&pt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const UI=s=>{const e=new Array(10),t=(a,i)=>{if(En(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Os(a)?[]:{};return ya(a,(r,l)=>{const d=t(r,i+1);!ga(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},zI=Bt("AsyncFunction"),GI=s=>s&&(En(s)||pt(s))&&pt(s.then)&&pt(s.catch),Xu=((s,e)=>s?setImmediate:e?((t,a)=>(Ss.addEventListener("message",({source:i,data:o})=>{i===Ss&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),Ss.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",pt(Ss.postMessage)),jI=typeof queueMicrotask<"u"?queueMicrotask.bind(Ss):typeof process<"u"&&process.nextTick||Xu,P={isArray:Os,isArrayBuffer:Gu,isBuffer:rI,isFormData:gI,isArrayBufferView:lI,isString:cI,isNumber:ju,isBoolean:dI,isObject:En,isPlainObject:Tn,isReadableStream:bI,isRequest:SI,isResponse:wI,isHeaders:_I,isUndefined:ga,isDate:hI,isFile:uI,isBlob:mI,isRegExp:DI,isFunction:pt,isStream:pI,isURLSearchParams:yI,isTypedArray:LI,isFileList:fI,forEach:ya,merge:Sr,extend:EI,trim:kI,stripBOM:TI,inherits:CI,toFlatObject:xI,kindOf:_n,kindOfTest:Bt,endsWith:vI,toArray:AI,forEachEntry:II,matchAll:RI,isHTMLForm:BI,hasOwnProperty:Ku,hasOwnProp:Ku,reduceDescriptors:qu,freezeMethods:PI,toObjectSet:OI,toCamelCase:NI,noop:FI,toFiniteNumber:MI,findKey:Hu,global:Ss,isContextDefined:Wu,ALPHABET:Ju,generateString:$I,isSpecCompliantForm:VI,toJSONObject:UI,isAsyncFn:zI,isThenable:GI,setImmediate:Xu,asap:jI};function _e(s,e,t,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),a&&(this.request=a),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const Zu=_e.prototype,Qu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{Qu[s]={value:s}}),Object.defineProperties(_e,Qu),Object.defineProperty(Zu,"isAxiosError",{value:!0}),_e.from=(s,e,t,a,i,o)=>{const r=Object.create(Zu);return P.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),_e.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const HI=null;function _r(s){return P.isPlainObject(s)||P.isArray(s)}function em(s){return P.endsWith(s,"[]")?s.slice(0,-2):s}function tm(s,e,t){return s?s.concat(e).map(function(a,i){return a=em(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function WI(s){return P.isArray(s)&&!s.some(_r)}const KI=P.toFlatObject(P,{},null,function(s){return/^is[A-Z]/.test(s)});function Cn(s,e,t){if(!P.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=P.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,m){return!P.isUndefined(m[p])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(P.isDate(p))return p.toISOString();if(!l&&P.isBlob(p))throw new _e("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(p)||P.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,g){let y=p;if(p&&!g&&typeof p=="object"){if(P.endsWith(m,"{}"))m=a?m:m.slice(0,-2),p=JSON.stringify(p);else if(P.isArray(p)&&WI(p)||(P.isFileList(p)||P.endsWith(m,"[]"))&&(y=P.toArray(p)))return m=em(m),y.forEach(function(b,S){!(P.isUndefined(b)||b===null)&&e.append(r===!0?tm([m],S,o):r===null?m:m+"[]",d(b))}),!1}return _r(p)?!0:(e.append(tm(g,m,o),d(p)),!1)}const h=[],u=Object.assign(KI,{defaultVisitor:c,convertValue:d,isVisitable:_r});function f(p,m){if(!P.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(p),P.forEach(p,function(g,y){(!(P.isUndefined(g)||g===null)&&i.call(e,g,P.isString(y)?y.trim():y,m,u))===!0&&f(g,m?m.concat(y):[y])}),h.pop()}}if(!P.isObject(s))throw new TypeError("data must be an object");return f(s),e}function sm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function kr(s,e){this._pairs=[],s&&Cn(s,this,e)}const am=kr.prototype;am.append=function(s,e){this._pairs.push([s,e])},am.toString=function(s){const e=s?function(t){return s.call(this,t,sm)}:sm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function qI(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nm(s,e,t){if(!e)return s;const a=t&&t.encode||qI,i=t&&t.serialize;let o;if(i?o=i(e,t):o=P.isURLSearchParams(e)?e.toString():new kr(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}class YI{constructor(){this.handlers=[]}use(e,t,a){return this.handlers.push({fulfilled:e,rejected:t,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(t){t!==null&&e(t)})}}const im=YI,om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JI=typeof URLSearchParams<"u"?URLSearchParams:kr,XI=typeof FormData<"u"?FormData:null,ZI=typeof Blob<"u"?Blob:null,QI={isBrowser:!0,classes:{URLSearchParams:JI,FormData:XI,Blob:ZI},protocols:["http","https","file","blob","url","data"]},Er=typeof window<"u"&&typeof document<"u",Tr=typeof navigator=="object"&&navigator||void 0,eR=Er&&(!Tr||["ReactNative","NativeScript","NS"].indexOf(Tr.product)<0),tR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sR=Er&&window.location.href||"http://localhost",aR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Er,hasStandardBrowserEnv:eR,hasStandardBrowserWebWorkerEnv:tR,navigator:Tr,origin:sR},Symbol.toStringTag,{value:"Module"})),gt={...aR,...QI};function nR(s,e){return Cn(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return gt.isNode&&P.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function iR(s){return P.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function oR(s){const e={},t=Object.keys(s);let a;const i=t.length;let o;for(a=0;a<i;a++)o=t[a],e[o]=s[o];return e}function rm(s){function e(t,a,i,o){let r=t[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=t.length;return r=!r&&P.isArray(i)?i.length:r,d?(P.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!P.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&P.isArray(i[r])&&(i[r]=oR(i[r])),!l)}if(P.isFormData(s)&&P.isFunction(s.entries)){const t={};return P.forEachEntry(s,(a,i)=>{e(iR(a),i,t,0)}),t}return null}function rR(s,e,t){if(P.isString(s))try{return(e||JSON.parse)(s),P.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Cr={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=P.isObject(s);if(i&&P.isHTMLForm(s)&&(s=new FormData(s)),P.isFormData(s))return a?JSON.stringify(rm(s)):s;if(P.isArrayBuffer(s)||P.isBuffer(s)||P.isStream(s)||P.isFile(s)||P.isBlob(s)||P.isReadableStream(s))return s;if(P.isArrayBufferView(s))return s.buffer;if(P.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return nR(s,this.formSerializer).toString();if((o=P.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Cn(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),rR(s)):s}],transformResponse:[function(s){const e=this.transitional||Cr.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(P.isResponse(s)||P.isReadableStream(s))return s;if(s&&P.isString(s)&&(t&&!this.responseType||a)){const i=!(e&&e.silentJSONParsing)&&a;try{return JSON.parse(s)}catch(o){if(i)throw o.name==="SyntaxError"?_e.from(o,_e.ERR_BAD_RESPONSE,this,null,this.response):o}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],s=>{Cr.headers[s]={}});const xr=Cr,lR=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cR=s=>{const e={};let t,a,i;return s&&s.split(`
37
+ `);if(t!==this.elements.captions.innerHTML){mn(this.elements.captions);const a=me("span",$t(this.config.selectors.caption));a.innerHTML=t,this.elements.captions.appendChild(a),pe.call(this,this.media,"cuechange")}}},Iu={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},rr={active:"picture-in-picture",inactive:"inline"},is={html5:"html5",youtube:"youtube",vimeo:"vimeo"},lr={audio:"audio",video:"video"};function $5(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?is.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?is.vimeo:null}const cr=()=>{};class V5{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):cr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):cr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):cr}}class Rt{constructor(e){te(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const a=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,a,this.active?"enterfullscreen":"exitfullscreen",!0)}),te(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ie(this.target,this.player.config.classNames.fullscreen.fallback,t),Ye.isIos){let a=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";a||(a=document.createElement("meta"),a.setAttribute("name","viewport"));const o=k.string(a.content)&&a.content.includes(i);t?(this.cleanupViewport=!o,o||(a.content+=`,${i}`)):this.cleanupViewport&&(a.content=a.content.split(",").filter(r=>r.trim()!==i).join(","))}this.onChange()}),te(this,"trapFocus",t=>{if(Ye.isIos||Ye.isIPadOS||!this.active||t.key!=="Tab")return;const a=document.activeElement,i=ca.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=i,r=i[i.length-1];a!==r||t.shiftKey?a===o&&t.shiftKey&&(r.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}),te(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Rt.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ie(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),te(this,"enter",()=>{this.supported&&(Ye.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Rt.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),te(this,"exit",()=>{if(this.supported)if(Ye.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Vt(this.player.play());else if(!Rt.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),te(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Rt.prefix,this.property=Rt.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&x5(this.player.elements.container,e.config.fullscreen.container),Ae.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ae.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ae.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Rt.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Rt.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Rt.nativeSupported||!Ye.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Rt.nativeSupported||this.forceFallback)return pn(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return Ye.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Sn(s,e=1){return new Promise((t,a)=>{const i=new Image,o=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:a)(i)};Object.assign(i,{onload:o,onerror:o,src:s})})}const Be={addStyleHook(){Ie(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ie(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Be.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(ee.inject.call(this),this.listeners.controls()),Be.toggleNativeControls.call(this),this.isHTML5&&Le.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,ee.updateVolume.call(this),ee.timeUpdate.call(this),ee.durationUpdate.call(this),Be.checkPlaying.call(this),Ie(this.elements.container,this.config.classNames.pip.supported,$e.pip&&this.isHTML5&&this.isVideo),Ie(this.elements.container,this.config.classNames.airplay.supported,$e.airplay&&this.isHTML5),Ie(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Be.setTitle.call(this),this.poster&&Be.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&ee.durationUpdate.call(this),this.config.mediaMetadata&&ee.setMediaMetadata.call(this)},setTitle(){let s=Je.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=We.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,a=Je.get("frameTitle",this.config);e.setAttribute("title",a.replace("{title}",t))}},togglePoster(s){Ie(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),L5.call(this).then(()=>Sn(s)).catch(t=>{throw s===this.poster&&Be.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Be.togglePoster.call(this,!0),s)))},checkPlaying(s){Ie(this.elements.container,this.config.classNames.playing,this.playing),Ie(this.elements.container,this.config.classNames.paused,this.paused),Ie(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Je.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Be.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ie(this.elements.container,this.config.classNames.loading,this.loading),Be.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class U5{constructor(e){te(this,"firstTouch",()=>{const{player:t}=this,{elements:a}=t;t.touch=!0,Ie(a.container,t.config.classNames.isTouch,!0)}),te(this,"global",(t=!0)=>{const{player:a}=this;a.config.keyboard.global&&da.call(a,window,"keydown keyup",this.handleKey,t,!1),da.call(a,document.body,"click",this.toggleMenu,t),ar.call(a,document.body,"touchstart",this.firstTouch)}),te(this,"container",()=>{const{player:t}=this,{config:a,elements:i,timers:o}=t;!a.keyboard.global&&a.keyboard.focused&&Ae.call(t,i.container,"keydown keyup",this.handleKey,!1),Ae.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let h=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Be.toggleControls.call(t,!0),h=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>Be.toggleControls.call(t,!1),h)});const r=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[h,u]=ir.call(t),f=wu(`aspect-ratio: ${h} / ${u}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,m]=I5(),g=p/m>h/u;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?m/u*h+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Ae.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(r(),(d.type==="enterfullscreen"?Ae:gn).call(t,window,"resize",l)))})}),te(this,"media",()=>{const{player:t}=this,{elements:a}=t;if(Ae.call(t,t.media,"timeupdate seeking seeked",o=>ee.timeUpdate.call(t,o)),Ae.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>ee.durationUpdate.call(t,o)),Ae.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ae.call(t,t.media,"progress playing seeking seeked",o=>ee.updateProgress.call(t,o)),Ae.call(t,t.media,"volumechange",o=>ee.updateVolume.call(t,o)),Ae.call(t,t.media,"playing play pause ended emptied timeupdate",o=>Be.checkPlaying.call(t,o)),Ae.call(t,t.media,"waiting canplay seeked playing",o=>Be.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=We.call(t,`.${t.config.classNames.video}`);if(!k.element(o))return;Ae.call(t,a.container,"click",r=>{([a.container,o].includes(r.target)||o.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(r,t.restart,"restart"),this.proxy(r,()=>{Vt(t.play())},"play")):this.proxy(r,()=>{Vt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ae.call(t,a.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Ae.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ae.call(t,t.media,"ratechange",()=>{ee.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ae.call(t,t.media,"qualitychange",o=>{ee.updateSetting.call(t,"quality",null,o.detail.quality)}),Ae.call(t,t.media,"ready qualitychange",()=>{ee.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ae.call(t,t.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=t.media.error),pe.call(t,a.container,o.type,!0,r)})}),te(this,"proxy",(t,a,i)=>{const{player:o}=this,r=o.config.listeners[i];let l=!0;k.function(r)&&(l=r.call(o,t)),l!==!1&&k.function(a)&&a.call(o,t)}),te(this,"bind",(t,a,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=k.function(d);Ae.call(l,t,a,h=>this.proxy(h,i,o),r&&!c)}),te(this,"controls",()=>{const{player:t}=this,{elements:a}=t,i=Ye.isIE?"change":"input";if(a.buttons.play&&Array.from(a.buttons.play).forEach(o=>{this.bind(o,"click",()=>{Vt(t.togglePlay())},"play")}),this.bind(a.buttons.restart,"click",t.restart,"restart"),this.bind(a.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(a.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(a.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(a.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(a.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(a.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(a.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(a.buttons.airplay,"click",t.airplay,"airplay"),this.bind(a.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),ee.toggleMenu.call(t,o)},null,!1),this.bind(a.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),ee.toggleMenu.call(t,o)):ee.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(a.settings.menu,"keydown",o=>{o.key==="Escape"&&ee.toggleMenu.call(t,o)}),this.bind(a.inputs.seek,"mousedown mousemove",o=>{const r=a.progress.getBoundingClientRect(),l=100/r.width*(o.pageX-r.left);o.currentTarget.setAttribute("seek-value",l)}),this.bind(a.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const r=o.currentTarget,l="play-on-seeked";if(k.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;t.lastSeekTime=Date.now();const d=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(o.type);d&&c?(r.removeAttribute(l),Vt(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Ye.isIos){const o=ca.call(t,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>fu(l.target)))}this.bind(a.inputs.seek,i,o=>{const r=o.currentTarget;let l=r.getAttribute("seek-value");k.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),t.currentTime=l/r.max*t.duration},"seek"),this.bind(a.progress,"mouseenter mouseleave mousemove",o=>ee.updateSeekTooltip.call(t,o)),this.bind(a.progress,"mousemove touchmove",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startMove(o)}),this.bind(a.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(a.progress,"mousedown touchstart",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startScrubbing(o)}),this.bind(a.progress,"mouseup touchend",o=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endScrubbing(o)}),Ye.isWebKit&&Array.from(ca.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>ee.updateRangeFill.call(t,r.target))}),t.config.toggleInvert&&!k.element(a.display.duration)&&this.bind(a.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,ee.timeUpdate.call(t))}),this.bind(a.inputs.volume,i,o=>{t.volume=o.target.value},"volume"),this.bind(a.controls,"mouseenter mouseleave",o=>{a.controls.hover=!t.touch&&o.type==="mouseenter"}),a.fullscreen&&Array.from(a.fullscreen.children).filter(o=>!o.contains(a.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",r=>{a.controls&&(a.controls.hover=!t.touch&&r.type==="mouseenter")})}),this.bind(a.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{a.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(a.controls,"focusin",()=>{const{config:o,timers:r}=t;Ie(a.controls,o.classNames.noTransition,!0),Be.toggleControls.call(t,!0),setTimeout(()=>{Ie(a.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>Be.toggleControls.call(t,!1),l)}),this.bind(a.inputs.volume,"wheel",o=>{const r=o.webkitDirectionInvertedFromDevice,[l,d]=[o.deltaX,-o.deltaY].map(u=>r?-u:u),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:h}=t.media;(c===1&&h<1||c===-1&&h>0)&&o.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:a}=t,{key:i,type:o,altKey:r,ctrlKey:l,metaKey:d,shiftKey:c}=e,h=o==="keydown",u=h&&i===this.lastKey;if(!(r||l||d||c)&&i){if(h){const p=document.activeElement;if(k.element(p)){const{editable:m}=t.config.selectors,{seek:g}=a.inputs;if(p!==g&&bs(p,m)||e.key===" "&&bs(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":u||Vt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){ee.toggleMenu.call(this.player,e)}}function z5(s,e){return s(e={exports:{}},e.exports),e.exports}var G5=z5(function(s,e){s.exports=function(){var t=function(){},a={},i={},o={};function r(f,p){f=f.push?f:[f];var m,g,y,b=[],S=f.length,_=S;for(m=function(C,E){E.length&&b.push(C),--_||p(b)};S--;)g=f[S],(y=i[g])?m(g,y):(o[g]=o[g]||[]).push(m)}function l(f,p){if(f){var m=o[f];if(i[f]=p,m)for(;m.length;)m[0](f,p),m.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,m,g){var y,b,S=document,_=m.async,C=(m.numRetries||0)+1,E=m.before||t,v=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(v)?((b=S.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(v)?(b=S.createElement("img")).src=T:((b=S.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(B){var L=B.type[0];if(y)try{b.sheet.cssText.length||(L="e")}catch(R){R.code!=18&&(L="e")}if(L=="e"){if((g+=1)<C)return c(f,p,m,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,L,B.defaultPrevented)},E(f,b)!==!1&&S.head.appendChild(b)}function h(f,p,m){var g,y,b=(f=f.push?f:[f]).length,S=b,_=[];for(g=function(C,E,v){if(E=="e"&&_.push(C),E=="b"){if(!v)return;_.push(C)}--b||p(_)},y=0;y<S;y++)c(f[y],g,m)}function u(f,p,m){var g,y;if(p&&p.trim&&(g=p),y=(g?m:p)||{},g){if(g in a)throw"LoadJS";a[g]=!0}function b(S,_){h(f,function(C){d(y,C),S&&d({success:S,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return u.ready=function(f,p){return r(f,function(m){d(p,m)}),u},u.done=function(f){l(f,[])},u.reset=function(){a={},i={},o={}},u.isDefined=function(f){return f in a},u}()});function dr(s){return new Promise((e,t)=>{G5(s,{success:e,error:t})})}function j5(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function H5(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function fa(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const hr={setup(){const s=this;Ie(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,Ds.call(s),k.object(window.Vimeo)?hr.ready.call(s):dr(s.config.urls.vimeo.sdk).then(()=>{hr.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:a,...i}=e;let o=s.media.getAttribute("src"),r="";k.empty(o)?(o=s.media.getAttribute(s.config.attributes.embed.id),r=s.media.getAttribute(s.config.attributes.embed.hash)):r=H5(o);const l=r?{h:r}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Lu({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=j5(o),h=me("iframe"),u=or(s.config.urls.vimeo.iframe,c,d);if(h.setAttribute("src",u),h.setAttribute("allowfullscreen",""),h.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(a)||h.setAttribute("referrerPolicy",a),t||!e.customControls)h.setAttribute("data-poster",s.poster),s.media=fn(h,s.media);else{const S=me("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});S.appendChild(h),s.media=fn(S,s.media)}e.customControls||ma(or(s.config.urls.vimeo.api,u)).then(S=>{!k.empty(S)&&S.thumbnail_url&&Be.setPoster.call(s,S.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(h,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(fa.call(s,!0),s.embed.play()),s.media.pause=()=>(fa.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(S){const{embed:_,media:C,paused:E,volume:v}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(S)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(v)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(S){s.embed.setPlaybackRate(S).then(()=>{p=S,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:m}=s.config;Object.defineProperty(s.media,"volume",{get:()=>m,set(S){s.embed.setVolume(S).then(()=>{m=S,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(S){const _=!!k.boolean(S)&&S;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(S){const _=k.boolean(S)?S:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(S=>{y=S,ee.setDownloadUrl.call(s)}).catch(S=>{this.debug.warn(S)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(S=>{const[_,C]=S;s.embed.ratio=Eu(_,C),Ds.call(this)}),s.embed.setAutopause(s.config.autopause).then(S=>{s.config.autopause=S}),s.embed.getVideoTitle().then(S=>{s.config.title=S,Be.setTitle.call(this)}),s.embed.getCurrentTime().then(S=>{f=S,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(S=>{s.media.duration=S,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(S=>{s.media.textTracks=S,Le.setup.call(s)}),s.embed.on("cuechange",({cues:S=[]})=>{const _=S.map(C=>P5(C.text));Le.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(S=>{fa.call(s,!S),S||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{fa.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{fa.call(s,!1)}),s.embed.on("timeupdate",S=>{s.media.seeking=!1,f=S.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",S=>{s.media.buffered=S.percent,pe.call(s,s.media,"progress"),parseInt(S.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",S=>{s.media.error=S,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Be.build.call(s),0)}};function W5(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function pa(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function K5(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const wn={setup(){if(Ie(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))wn.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),wn.ready.call(this)},dr(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){ma(or(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:a,width:i}=e;this.config.title=t,Be.setTitle.call(this),this.embed.ratio=Eu(i,a)}Ds.call(this)}).catch(()=>{Ds.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let a=s.media.getAttribute("src");k.empty(a)&&(a=s.media.getAttribute(this.config.attributes.embed.id));const i=W5(a),o=me("div",{id:R5(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=fn(o,s.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Sn(r("maxres"),121).catch(()=>Sn(r("sd"),121)).catch(()=>Sn(r("hq"))).then(l=>Be.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:K5(e),playerVars:Me({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(r){if(!s.media.error){const l=r.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(r){const l=r.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(r){if(k.function(s.media.play))return;const l=r.target;wn.getTitle.call(s,i),s.media.play=()=>{pa.call(s,!0),l.playVideo()},s.media.pause=()=>{pa.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(u){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(u)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(u){l.setPlaybackRate(u)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(u){d=u,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(u){const f=k.boolean(u)?u:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const h=l.getAvailablePlaybackRates();s.options.speed=h.filter(u=>s.config.speed.options.includes(u)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Be.build.call(s),50)},onStateChange(r){const l=r.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(r.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),r.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:pa.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(pa.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),pa.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:r.data})}}})}},Ru={setup(){this.media?(Ie(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ie(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ie(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=me("div",{class:this.config.classNames.video}),gu(this.media,this.elements.wrapper),this.elements.poster=me("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ns.setup.call(this):this.isYouTube?wn.setup.call(this):this.isVimeo&&hr.setup.call(this)):this.debug.warn("No media element found!")}};class q5{constructor(e){te(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():dr(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),te(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),te(this,"setupIMA",()=>{this.elements.container=me("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),te(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const a=new google.ima.AdsRequest;a.adTagUrl=this.tagUrl,a.linearAdSlotWidth=t.offsetWidth,a.linearAdSlotHeight=t.offsetHeight,a.nonLinearAdSlotWidth=t.offsetWidth,a.nonLinearAdSlotHeight=t.offsetHeight,a.forceNonLinearFullSlot=!1,a.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(a)}catch(a){this.onAdError(a)}}),te(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const a=bn(Math.max(this.manager.getRemainingTime(),0)),i=`${Je.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),te(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const a=new google.ima.AdsRenderingSettings;a.restoreCustomPlaybackStateOnAdBreakComplete=!0,a.enablePreloading=!0,this.manager=t.getAdsManager(this.player,a),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],o=>this.onAdEvent(o))}),this.trigger("loaded")}),te(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const a=this.player.elements.progress;if(k.element(a)){const i=100/this.player.duration*t,o=me("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,a.appendChild(o)}}})}),te(this,"onAdEvent",t=>{const{container:a}=this.player.elements,i=t.getAd(),o=t.getAdData();switch((r=>{pe.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=a.offsetWidth,i.height=a.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),te(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),te(this,"listeners",()=>{const{container:t}=this.player.elements;let a;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{a=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((o,r)=>{a<o&&o<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),te(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(a){this.onAdError(a)}}).catch(()=>{})}),te(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Vt(this.player.media.play())}),te(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),te(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),te(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),te(this,"trigger",(t,...a)=>{const i=this.events[t];k.array(i)&&i.forEach(o=>{k.function(o)&&o.apply(this,a)})}),te(this,"on",(t,a)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(a),this)),te(this,"startSafetyTimer",(t,a)=>{this.player.debug.log(`Safety timer invoked from: ${a}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),te(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,a)=>{this.on("loaded",t),this.on("error",a)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Lu({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function Bu(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const Y5=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const a={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(a.startTime)){if(!k.empty(i.trim())&&k.empty(a.text)){const o=i.trim().split("#xywh=");[a.text]=o,o[1]&&([a.x,a.y,a.w,a.h]=o[1].split(","))}}else{const o=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);o&&(a.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+ +`0.${o[4]}`,a.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+ +`0.${o[9]}`)}}),a.text&&e.push(a)}),e},Nu=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class ur{constructor(e){te(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),te(this,"getThumbnails",()=>new Promise(t=>{const{src:a}=this.player.config.previewThumbnails;if(k.empty(a))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((o,r)=>o.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(a))a(o=>{this.thumbnails=o,i()});else{const o=(k.string(a)?[a]:a).map(r=>this.getThumbnail(r));Promise.all(o).then(i)}})),te(this,"getThumbnail",t=>new Promise(a=>{ma(t).then(i=>{const o={frames:Y5(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{o.height=r.naturalHeight,o.width=r.naturalWidth,this.thumbnails.push(o),a()},r.src=o.urlPrefix+o.frames[0].text})})),te(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var a,i;const o=this.player.elements.progress.getBoundingClientRect(),r=100/o.width*(t.pageX-o.left);this.seekTime=this.player.media.duration*(r/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=bn(this.seekTime);const l=(a=this.player.config.markers)===null||a===void 0||(i=a.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),te(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),te(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),te(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ar.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),te(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),te(this,"render",()=>{this.elements.thumb.container=me("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=me("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=me("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=me("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=me("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),te(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),te(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),a=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(a),a&&(this.thumbnails.forEach((o,r)=>{this.loadedImages.includes(o.frames[t].text)&&(i=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),te(this,"loadImage",(t=0)=>{const a=this.showingThumb,i=this.thumbnails[t],{urlPrefix:o}=i,r=i.frames[a],l=i.frames[a].text,d=o+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,t,a,l,!1),this.currentImageElement.dataset.index=a,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=a,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,r,t,a,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),te(this,"showImage",(t,a,i,o,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${o}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,a),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(i,t,a,r))}),te(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(a=>{if(a.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(a.dataset.index!==t.dataset.index&&!a.dataset.deleting){a.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(a),this.player.debug.log(`Removing thumb: ${a.dataset.filename}`)},i)}})}),te(this,"preloadNearby",(t,a=!0)=>new Promise(i=>{setTimeout(()=>{const o=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===o){let r;r=a?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;r.forEach(d=>{const c=d.text;if(c!==o&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:h}=this.thumbnails[0],u=h+c,f=new Image;f.src=u,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),te(this,"getHigherQuality",(t,a,i,o)=>{if(t<this.thumbnails.length-1){let r=a.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(t+1))},300)}}),te(this,"toggleThumbContainer",(t=!1,a=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&a&&(this.showingThumb=null,this.showingThumbFilename=null)}),te(this,"toggleScrubbingContainer",(t=!1)=>{const a=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(a,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),te(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),te(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const a=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${a}px`}else if(t.clientHeight<20&&t.clientWidth>20){const a=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${a}px`}}else{const a=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${a}px`}this.setThumbContainerPos()}),te(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),a=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,o=a.left-t.left+10,r=a.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=Bu(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),te(this,"setScrubbingContainerSize",()=>{const{width:t,height:a}=Nu(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${a}px`}),te(this,"setImageSizeAndOffset",(t,a)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/a.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${a.x*i}px`,t.style.top=`-${a.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Nu(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const mr={insertElements(s,e){k.string(e)?yu(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{yu(s,this.media,t)})},change(s){pu(s,"sources.length")?(ns.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Jt(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:a=is.html5,src:i}]=e,o=a==="html5"?t:"div",r=a==="html5"?{}:{src:i};Object.assign(this,{provider:a,type:t,supported:$e.check(t,a,this.config.playsinline),media:me(o,r)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Be.addStyleHook.call(this),this.isHTML5&&mr.insertElements.call(this,"source",e),this.config.title=s.title,Ru.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&mr.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Be.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Ps{constructor(e,t){if(te(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Vt(this.media.play())),this.media.play()):null),te(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),te(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),te(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),te(this,"restart",()=>{this.currentTime=0}),te(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),te(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),te(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),te(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),te(this,"airplay",()=>{$e.airplay&&this.media.webkitShowPlaybackTargetPicker()}),te(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=pn(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,h=Ie(this.elements.container,this.config.classNames.hideControls,c);if(h&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&ee.toggleMenu.call(this,!1),h!==d){const u=h?"controlshidden":"controlsshown";pe.call(this,this.media,u)}return!h}return!1}),te(this,"on",(l,d)=>{Ae.call(this,this.elements.container,l,d)}),te(this,"once",(l,d)=>{ar.call(this,this.elements.container,l,d)}),te(this,"off",(l,d)=>{gn(this.elements.container,l,d)}),te(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(Jt(this.elements.buttons.play),Jt(this.elements.captions),Jt(this.elements.controls),Jt(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(A5.call(this),ns.cancelRequests.call(this),fn(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Be.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),te(this,"supports",l=>$e.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=$e.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Me({},Iu,Ps.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new V5(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",$e),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!$e.check().api)return void this.debug.error("Setup failed: no support");const a=this.media.cloneNode(!0);a.autoplay=!1,this.elements.original=a;const i=this.media.tagName.toLowerCase();let o=null,r=null;switch(i){case"div":if(o=this.media.querySelector("iframe"),k.element(o)){if(r=Au(o.getAttribute("src")),this.provider=$5(r.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",r.search.length){const l=["1","true"];l.includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(is).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=lr.video;break;case"video":case"audio":this.type=i,this.provider=is.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=$e.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new U5(this),this.storage=new ua(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=me("div"),gu(this.media,this.elements.container)),Be.migrateStyles.call(this),Be.addStyleHook.call(this),Ru.setup.call(this),this.config.debug&&Ae.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Rt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Be.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new q5(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Vt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===is.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===is.youtube}get isVimeo(){return this.provider===is.vimeo}get isVideo(){return this.type===lr.video}get isAudio(){return this.type===lr.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,a=k.number(t)&&t!==1/0?t:0;return e||a}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:a,maximumSpeed:i}=this;t=Bu(t,a,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,a=this.options.quality;if(!a.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),o=!0;if(!a.includes(i)){const r=Su(a,i);this.debug.warn(`Unsupported quality option: ${i}, using ${r} instead`),i=r,o=!1}t.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){mr.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,ee.setDownloadUrl.call(this))}set poster(e){this.isVideo?Be.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=yn(ir.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&ku(e)?(this.config.ratio=yn(e),Ds.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Le.toggle.call(this,e,!1)}set currentTrack(e){Le.set.call(this,e,!1),Le.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Le.setLanguage.call(this,e,!1)}get language(){return(Le.getCurrentTrack.call(this)||{}).language}set pip(e){if(!$e.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?rr.active:rr.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return $e.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===rr.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ur(this))}static supported(e,t){return $e.check(e,t)}static loadSprite(e,t){return xu(e,t)}static setup(e,t={}){let a=null;return k.string(e)?a=Array.from(document.querySelectorAll(e)):k.nodeList(e)?a=Array.from(e):k.array(e)&&(a=e.filter(k.element)),k.empty(a)?null:a.map(i=>new Ps(i,t))}}Ps.defaults=T5(Iu);const J5={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},X5={class:"carousel-video-player__play-info-portrait__date"},Z5={class:"carousel-video-player__play-info-portrait__game"},Q5={key:2,class:"carousel-video-player__play-info__data"},eL={class:"video-container"},tL=["id"],sL=qe({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,a=n.ref(null),i=n.ref(!1),o=n.computed(()=>`p-${t.play.playId||t.play.play_id}`),r=n.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${Ox(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${Qh[f.getMonth()]} ${f.getFullYear()}`}),l=n.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=n.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=n.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function h(){a.value=new Ps(`#${o.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(a.value.on("loadeddata",()=>{a.value.currentTime=t.play.startSeconds}),a.value.on("timeupdate",()=>{a.value.currentTime>=t.play.endSeconds&&(a.value.pause(),a.value.currentTime=t.play.startSeconds,e("play-ended"))})),a.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},a.value.isDestroyed=!1,t.play.videoPlayer=a.value,t.play.plyrInit=h,a.value.on("webkitfullscreenchange",u()),a.value.on("mozfullscreenchange",u()),a.value.on("fullscreenchange",u())}function u(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return n.onMounted(()=>{setTimeout(()=>{h()},100)}),(f,p)=>(n.openBlock(),n.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=m=>i.value=!0),onMouseleave:p[1]||(p[1]=m=>i.value=!1)},[n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},n.toDisplayString(r.value),3)):n.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(n.openBlock(),n.createElementBlock("div",J5,[n.createElementVNode("div",X5,[n.createTextVNode(n.toDisplayString(r.value)+" - ",1),n.createElementVNode("div",Z5,n.toDisplayString(d.value),1)]),n.createTextVNode(" "+n.toDisplayString(c.value),1)])):(n.openBlock(),n.createElementBlock("div",Q5,n.toDisplayString(l.value),1))],2),[[n.vShow,i.value]]),n.createElementVNode("div",eL,[n.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,tL)])],32))}},[["__scopeId","data-v-96776f5d"]]),fr=s=>(n.pushScopeId("data-v-64d330ca"),s=s(),n.popScopeId(),s),aL=[fr(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[n.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),n.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],nL={class:"carousel-full-screen__carousel"},iL={key:0,class:"icon-mobil-scrren"},oL=[fr(()=>n.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),fr(()=>n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),n.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],rL={class:"carousel-full-screen__carousel__video-player"},pr=2,lL=qe({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let a=0,i=new Map;const o=n.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=n.ref(null),l=n.ref([]);n.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((S,_)=>(S.index=_,{...S})),a=t.playlistIndex,i=new Map(l.value.map(S=>[S.index,S])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function h({selectedItem:b}){if(a!==b.index){const S=b.index-a;a=b.index;const _=i.get(a+S*-1),C=i.get(a);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),S>0){const E=i.get(a+pr),v=i.get(a+1),T=i.get(a-pr);E&&(l.value.find(B=>B.index===E.index)||l.value.push(E)),v&&v.videoPlayer&&v.videoPlayer.isDestroyed&&v.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(S<0){const E=i.get(a-1),v=i.get(a+pr);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),v&&v.videoPlayer&&(v.videoPlayer.pause(),v.videoPlayer.src="",v.videoPlayer.destroy(),v.videoPlayer.isDestroyed=!0)}}}function u(){r.value&&r.value.next()}function f(){e("close",a)}const p=n.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=n.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return n.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,_)=>{S.id=`plyrFS${_+1}`})},100)}),n.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,S)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["carousel-full-screen",c()&&!m.value?"paddingIos":""]),id:"carousel-swipe"},[n.createElementVNode("div",{class:"carousel-full-screen__close",style:n.normalizeStyle(c()&&m.value?"padding-top:30px":""),onClick:f},aL,4),n.createElementVNode("div",nL,[m.value&&d()?(n.openBlock(),n.createElementBlock("div",iL,oL)):n.createCommentVNode("",!0),n.createVNode(n.unref(HA),n.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:h}),{default:n.withCtx(({item:_})=>[n.createElementVNode("div",rL,[n.createVNode(sL,{play:_,"is-portrait":m.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:u},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),cL=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),dL=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Du={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Pu={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ou={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Fu=new Map([[1,cL],[2,dL]]),hL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},gr={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Mu=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},$u=gr.setup;gr.setup=$u?(s,e)=>(Mu(),$u(s,e)):Mu;const uL=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),mL=["src"],fL={key:1,class:"text"},pL=["src"],gL={class:"stats"},yL=uL(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),bL={class:"numstats"},SL={class:"leyend"};function wL(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,mL)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",fL,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,pL)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",gL,[yL,n.createElementVNode("div",bL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",SL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const _L=hL(gr,[["render",wL],["__scopeId","data-v-fb269a1e"]]),kL={class:"gsc-dropdown__main-container__item-selected"},EL=["height","width"],TL=["stroke"],CL={class:"gsc-dropdown__items-container"},xL=["onClick"],vL={key:0,class:"gsc-dropdown__items-footer"},AL={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref({}),i=n.ref(null),o=n.ref(t.isMultipleOption?-1:0),r=n.ref(!1);n.watch(()=>t.items,(p,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(o.value=g,a.value=p[g]):(o.value=0,a.value=p[0])}else a.value=p[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,p=>{if(p){const m=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);m!==-1&&(o.value=m,a.value=t.items[m],e("update:modelValue",a.value))}},{immediate:!0});const l=n.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=n.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function h(p){i.value&&!i.value.contains(p.target)&&(r.value=!1)}function u(p,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=p,e("input",a.value),e("update:modelValue",a.value)}function f(){r.value=!1,e("click-ready")}return n.onMounted(()=>{document.addEventListener("click",h)}),n.onBeforeMount(()=>{document.removeEventListener("click",h)}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:n.normalizeStyle(l.value)},[n.createElementVNode("div",{class:"gsc-dropdown__main-container",style:n.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[n.createElementVNode("div",kL,[n.renderSlot(p.$slots,"default",{selectedItem:a.value})]),n.createElementVNode("div",{class:n.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:n.normalizeStyle(d.value)},[(n.openBlock(),n.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,TL)],8,EL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",CL,[n.createElementVNode("div",null,[n.createElementVNode("div",{class:"gsc-dropdown__items",style:n.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(g,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(g,y)},[n.renderSlot(p.$slots,"availableItem",{item:g})],10,xL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",vL,[n.createVNode(n.unref(_L),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):n.createCommentVNode("",!0)])],512),[[n.vShow,r.value]])]),_:3})],4))}},LL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},IL={class:"tournament-select__selected-tournament"},RL={class:"tournament-select__selected-tournament__logo"},BL=["src"],NL={class:"tournament-select__selected-tournament__name"},DL="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",PL={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://az755631.vo.msecnd.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,a=n.ref([]),i=n.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),o=n.computed(()=>t.tournamentsIdsToInclude.size?d(a.value):a.value),r=n.computed(()=>o.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||o.value[0]);async function l(){try{if(t.items&&t.items.length)a.value=[...t.items];else{const p=await h();e("change-tournaments",p),a.value=p.map(m=>({...m.tournament,seasons:m.seasons,seasonsIds:m.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((m,g)=>m.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(m=>t.tournamentsIdsToInclude.has(m.id))}function c(p){const m=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return m.open("HEAD",g,!1),m.send(),m.status!==404}async function h(){try{return(await fetch(t.apiUrl||DL)).json()}catch(p){return Promise.reject(p)}}function u(p){e("input",p)}function f(p){e("input",p)}return n.onMounted(()=>{l()}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{class:"tournament-select",style:n.normalizeStyle(i.value)},[n.createVNode(n.unref(AL),n.mergeProps(t,{"model-value":r.value,items:o.value,onInput:u,"onUpdate:modelValue":f}),{default:n.withCtx(({selectedItem:g})=>[n.createElementVNode("div",IL,[n.createElementVNode("div",RL,[c(g.id)?(n.openBlock(),n.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,BL)):n.createCommentVNode("",!0)]),n.createElementVNode("div",NL,n.toDisplayString(g.name),1)])]),availableItem:n.withCtx(({item:g})=>[n.createElementVNode("div",null,n.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},OL=LL(PL,[["__scopeId","data-v-60385f70"]]),FL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},yr={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(s){this.status=s}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Vu=()=>{n.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Uu=yr.setup;yr.setup=Uu?(s,e)=>(Vu(),Uu(s,e)):Vu;const ML=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),$L=["src"],VL={key:1,class:"text"},UL=["src"],zL={class:"stats"},GL=ML(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),jL={class:"numstats"},HL={class:"leyend"};function WL(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",null,[t.type==0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:n.normalizeStyle([o.customStyle,i.status&&t.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(n.openBlock(),n.createElementBlock("img",{key:0,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,$L)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",VL,n.toDisplayString(t.textValue),1)):n.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(n.openBlock(),n.createElementBlock("img",{key:2,class:"icon",style:n.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,UL)):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0),t.type==1?(n.openBlock(),n.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[n.createElementVNode("div",zL,[GL,n.createElementVNode("div",jL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",HL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const KL=FL(yr,[["render",WL],["__scopeId","data-v-fb269a1e"]]),qL={class:"gsc-dropdown__main-container__item-selected"},YL=["height","width"],JL=["stroke"],XL={class:"gsc-dropdown__items-container"},ZL=["onClick"],QL={key:0,class:"gsc-dropdown__items-footer"},eI={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,a=n.ref({}),i=n.ref(null),o=n.ref(t.isMultipleOption?-1:0),r=n.ref(!1);n.watch(()=>t.items,(p,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(o.value=g,a.value=p[g]):(o.value=0,a.value=p[0])}else a.value=p[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,p=>{if(p){const m=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);m!==-1&&(o.value=m,a.value=t.items[m],e("update:modelValue",a.value))}},{immediate:!0});const l=n.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=n.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function h(p){i.value&&!i.value.contains(p.target)&&(r.value=!1)}function u(p,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=p,e("input",a.value),e("update:modelValue",a.value)}function f(){r.value=!1,e("click-ready")}return n.onMounted(()=>{document.addEventListener("click",h)}),n.onBeforeMount(()=>{document.removeEventListener("click",h)}),(p,m)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:n.normalizeStyle(l.value)},[n.createElementVNode("div",{class:"gsc-dropdown__main-container",style:n.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[n.createElementVNode("div",qL,[n.renderSlot(p.$slots,"default",{selectedItem:a.value})]),n.createElementVNode("div",{class:n.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:n.normalizeStyle(d.value)},[(n.openBlock(),n.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,JL)],8,YL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",XL,[n.createElementVNode("div",null,[n.createElementVNode("div",{class:"gsc-dropdown__items",style:n.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,(g,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(g,y)},[n.renderSlot(p.$slots,"availableItem",{item:g})],10,ZL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",QL,[n.createVNode(n.unref(KL),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):n.createCommentVNode("",!0)])],512),[[n.vShow,r.value]])]),_:3})],4))}},tI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},sI={class:"season-name"},aI={class:"items-list-season"},nI={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,a=n.computed(()=>t.seasons.find(r=>r.id===t.currentSeasonId));function i(r){e("input",r)}function o(r){e("input",r)}return(r,l)=>(n.openBlock(),n.createBlock(n.unref(eI),{items:s.seasons,"model-value":a.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:o,"onUpdate:modelValue":i},{default:n.withCtx(({selectedItem:d})=>[n.createElementVNode("div",sI,[n.createElementVNode("span",null,n.toDisplayString(d.name),1)])]),availableItem:n.withCtx(({item:d})=>[n.createElementVNode("span",aI,n.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},iI=tI(nI,[["__scopeId","data-v-81bba1d4"]]);function zu(s,e){return function(){return s.apply(e,arguments)}}const{toString:oI}=Object.prototype,{getPrototypeOf:br}=Object,_n=(s=>e=>{const t=oI.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Bt=s=>(s=s.toLowerCase(),e=>_n(e)===s),kn=s=>e=>typeof e===s,{isArray:Os}=Array,ga=kn("undefined");function rI(s){return s!==null&&!ga(s)&&s.constructor!==null&&!ga(s.constructor)&&pt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Gu=Bt("ArrayBuffer");function lI(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Gu(s.buffer),e}const cI=kn("string"),pt=kn("function"),ju=kn("number"),En=s=>s!==null&&typeof s=="object",dI=s=>s===!0||s===!1,Tn=s=>{if(_n(s)!=="object")return!1;const e=br(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},hI=Bt("Date"),uI=Bt("File"),mI=Bt("Blob"),fI=Bt("FileList"),pI=s=>En(s)&&pt(s.pipe),gI=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||pt(s.append)&&((e=_n(s))==="formdata"||e==="object"&&pt(s.toString)&&s.toString()==="[object FormData]"))},yI=Bt("URLSearchParams"),[bI,SI,wI,_I]=["ReadableStream","Request","Response","Headers"].map(Bt),kI=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ya(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Os(s))for(a=0,i=s.length;a<i;a++)e.call(null,s[a],a,s);else{const o=t?Object.getOwnPropertyNames(s):Object.keys(s),r=o.length;let l;for(a=0;a<r;a++)l=o[a],e.call(null,s[l],l,s)}}function Hu(s,e){e=e.toLowerCase();const t=Object.keys(s);let a=t.length,i;for(;a-- >0;)if(i=t[a],e===i.toLowerCase())return i;return null}const Ss=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wu=s=>!ga(s)&&s!==Ss;function Sr(){const{caseless:s}=Wu(this)&&this||{},e={},t=(a,i)=>{const o=s&&Hu(e,i)||i;Tn(e[o])&&Tn(a)?e[o]=Sr(e[o],a):Tn(a)?e[o]=Sr({},a):Os(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&ya(arguments[a],t);return e}const EI=(s,e,t,{allOwnKeys:a}={})=>(ya(e,(i,o)=>{t&&pt(i)?s[o]=zu(i,t):s[o]=i},{allOwnKeys:a}),s),TI=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),CI=(s,e,t,a)=>{s.prototype=Object.create(e.prototype,a),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},xI=(s,e,t,a)=>{let i,o,r;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),o=i.length;o-- >0;)r=i[o],(!a||a(r,s,e))&&!l[r]&&(e[r]=s[r],l[r]=!0);s=t!==!1&&br(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},vI=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const a=s.indexOf(e,t);return a!==-1&&a===t},AI=s=>{if(!s)return null;if(Os(s))return s;let e=s.length;if(!ju(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},LI=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&br(Uint8Array)),II=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=t.next())&&!a.done;){const i=a.value;e.call(s,i[0],i[1])}},RI=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},BI=Bt("HTMLFormElement"),NI=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Ku=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),DI=Bt("RegExp"),qu=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};ya(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},PI=s=>{qu(s,(e,t)=>{if(pt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(pt(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},OI=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Os(s)?a(s):a(String(s).split(e)),t},FI=()=>{},MI=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,wr="abcdefghijklmnopqrstuvwxyz",Yu="0123456789",Ju={DIGIT:Yu,ALPHA:wr,ALPHA_DIGIT:wr+wr.toUpperCase()+Yu},$I=(s=16,e=Ju.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function VI(s){return!!(s&&pt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const UI=s=>{const e=new Array(10),t=(a,i)=>{if(En(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Os(a)?[]:{};return ya(a,(r,l)=>{const d=t(r,i+1);!ga(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},zI=Bt("AsyncFunction"),GI=s=>s&&(En(s)||pt(s))&&pt(s.then)&&pt(s.catch),Xu=((s,e)=>s?setImmediate:e?((t,a)=>(Ss.addEventListener("message",({source:i,data:o})=>{i===Ss&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),Ss.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",pt(Ss.postMessage)),jI=typeof queueMicrotask<"u"?queueMicrotask.bind(Ss):typeof process<"u"&&process.nextTick||Xu,P={isArray:Os,isArrayBuffer:Gu,isBuffer:rI,isFormData:gI,isArrayBufferView:lI,isString:cI,isNumber:ju,isBoolean:dI,isObject:En,isPlainObject:Tn,isReadableStream:bI,isRequest:SI,isResponse:wI,isHeaders:_I,isUndefined:ga,isDate:hI,isFile:uI,isBlob:mI,isRegExp:DI,isFunction:pt,isStream:pI,isURLSearchParams:yI,isTypedArray:LI,isFileList:fI,forEach:ya,merge:Sr,extend:EI,trim:kI,stripBOM:TI,inherits:CI,toFlatObject:xI,kindOf:_n,kindOfTest:Bt,endsWith:vI,toArray:AI,forEachEntry:II,matchAll:RI,isHTMLForm:BI,hasOwnProperty:Ku,hasOwnProp:Ku,reduceDescriptors:qu,freezeMethods:PI,toObjectSet:OI,toCamelCase:NI,noop:FI,toFiniteNumber:MI,findKey:Hu,global:Ss,isContextDefined:Wu,ALPHABET:Ju,generateString:$I,isSpecCompliantForm:VI,toJSONObject:UI,isAsyncFn:zI,isThenable:GI,setImmediate:Xu,asap:jI};function _e(s,e,t,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),a&&(this.request=a),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const Zu=_e.prototype,Qu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{Qu[s]={value:s}}),Object.defineProperties(_e,Qu),Object.defineProperty(Zu,"isAxiosError",{value:!0}),_e.from=(s,e,t,a,i,o)=>{const r=Object.create(Zu);return P.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),_e.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const HI=null;function _r(s){return P.isPlainObject(s)||P.isArray(s)}function em(s){return P.endsWith(s,"[]")?s.slice(0,-2):s}function tm(s,e,t){return s?s.concat(e).map(function(a,i){return a=em(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function WI(s){return P.isArray(s)&&!s.some(_r)}const KI=P.toFlatObject(P,{},null,function(s){return/^is[A-Z]/.test(s)});function Cn(s,e,t){if(!P.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=P.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,m){return!P.isUndefined(m[p])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(P.isDate(p))return p.toISOString();if(!l&&P.isBlob(p))throw new _e("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(p)||P.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,g){let y=p;if(p&&!g&&typeof p=="object"){if(P.endsWith(m,"{}"))m=a?m:m.slice(0,-2),p=JSON.stringify(p);else if(P.isArray(p)&&WI(p)||(P.isFileList(p)||P.endsWith(m,"[]"))&&(y=P.toArray(p)))return m=em(m),y.forEach(function(b,S){!(P.isUndefined(b)||b===null)&&e.append(r===!0?tm([m],S,o):r===null?m:m+"[]",d(b))}),!1}return _r(p)?!0:(e.append(tm(g,m,o),d(p)),!1)}const h=[],u=Object.assign(KI,{defaultVisitor:c,convertValue:d,isVisitable:_r});function f(p,m){if(!P.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(p),P.forEach(p,function(g,y){(!(P.isUndefined(g)||g===null)&&i.call(e,g,P.isString(y)?y.trim():y,m,u))===!0&&f(g,m?m.concat(y):[y])}),h.pop()}}if(!P.isObject(s))throw new TypeError("data must be an object");return f(s),e}function sm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function kr(s,e){this._pairs=[],s&&Cn(s,this,e)}const am=kr.prototype;am.append=function(s,e){this._pairs.push([s,e])},am.toString=function(s){const e=s?function(t){return s.call(this,t,sm)}:sm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function qI(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nm(s,e,t){if(!e)return s;const a=t&&t.encode||qI,i=t&&t.serialize;let o;if(i?o=i(e,t):o=P.isURLSearchParams(e)?e.toString():new kr(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}class YI{constructor(){this.handlers=[]}use(e,t,a){return this.handlers.push({fulfilled:e,rejected:t,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(t){t!==null&&e(t)})}}const im=YI,om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JI=typeof URLSearchParams<"u"?URLSearchParams:kr,XI=typeof FormData<"u"?FormData:null,ZI=typeof Blob<"u"?Blob:null,QI={isBrowser:!0,classes:{URLSearchParams:JI,FormData:XI,Blob:ZI},protocols:["http","https","file","blob","url","data"]},Er=typeof window<"u"&&typeof document<"u",Tr=typeof navigator=="object"&&navigator||void 0,eR=Er&&(!Tr||["ReactNative","NativeScript","NS"].indexOf(Tr.product)<0),tR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sR=Er&&window.location.href||"http://localhost",aR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Er,hasStandardBrowserEnv:eR,hasStandardBrowserWebWorkerEnv:tR,navigator:Tr,origin:sR},Symbol.toStringTag,{value:"Module"})),gt={...aR,...QI};function nR(s,e){return Cn(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return gt.isNode&&P.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function iR(s){return P.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function oR(s){const e={},t=Object.keys(s);let a;const i=t.length;let o;for(a=0;a<i;a++)o=t[a],e[o]=s[o];return e}function rm(s){function e(t,a,i,o){let r=t[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=t.length;return r=!r&&P.isArray(i)?i.length:r,d?(P.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!P.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&P.isArray(i[r])&&(i[r]=oR(i[r])),!l)}if(P.isFormData(s)&&P.isFunction(s.entries)){const t={};return P.forEachEntry(s,(a,i)=>{e(iR(a),i,t,0)}),t}return null}function rR(s,e,t){if(P.isString(s))try{return(e||JSON.parse)(s),P.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Cr={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=P.isObject(s);if(i&&P.isHTMLForm(s)&&(s=new FormData(s)),P.isFormData(s))return a?JSON.stringify(rm(s)):s;if(P.isArrayBuffer(s)||P.isBuffer(s)||P.isStream(s)||P.isFile(s)||P.isBlob(s)||P.isReadableStream(s))return s;if(P.isArrayBufferView(s))return s.buffer;if(P.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return nR(s,this.formSerializer).toString();if((o=P.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Cn(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),rR(s)):s}],transformResponse:[function(s){const e=this.transitional||Cr.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(P.isResponse(s)||P.isReadableStream(s))return s;if(s&&P.isString(s)&&(t&&!this.responseType||a)){const i=!(e&&e.silentJSONParsing)&&a;try{return JSON.parse(s)}catch(o){if(i)throw o.name==="SyntaxError"?_e.from(o,_e.ERR_BAD_RESPONSE,this,null,this.response):o}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],s=>{Cr.headers[s]={}});const xr=Cr,lR=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cR=s=>{const e={};let t,a,i;return s&&s.split(`
38
38
  `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),a=o.substring(i+1).trim(),!(!t||e[t]&&lR[t])&&(t==="set-cookie"?e[t]?e[t].push(a):e[t]=[a]:e[t]=e[t]?e[t]+", "+a:a)}),e},lm=Symbol("internals");function ba(s){return s&&String(s).trim().toLowerCase()}function xn(s){return s===!1||s==null?s:P.isArray(s)?s.map(xn):String(s)}function dR(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=t.exec(s);)e[a[1]]=a[2];return e}const hR=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function vr(s,e,t,a,i){if(P.isFunction(a))return a.call(this,e,t);if(i&&(e=t),!!P.isString(e)){if(P.isString(a))return e.indexOf(a)!==-1;if(P.isRegExp(a))return a.test(e)}}function uR(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,a)=>t.toUpperCase()+a)}function mR(s,e){const t=P.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(s,a+t,{value:function(i,o,r){return this[a].call(this,e,i,o,r)},configurable:!0})})}class vn{constructor(e){e&&this.set(e)}set(e,t,a){const i=this;function o(l,d,c){const h=ba(d);if(!h)throw new Error("header name must be a non-empty string");const u=P.findKey(i,h);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||d]=xn(l))}const r=(l,d)=>P.forEach(l,(c,h)=>o(c,h,d));if(P.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(P.isString(e)&&(e=e.trim())&&!hR(e))r(cR(e),t);else if(P.isHeaders(e))for(const[l,d]of e.entries())o(d,l,a);else e!=null&&o(t,e,a);return this}get(e,t){if(e=ba(e),e){const a=P.findKey(this,e);if(a){const i=this[a];if(!t)return i;if(t===!0)return dR(i);if(P.isFunction(t))return t.call(this,i,a);if(P.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ba(e),e){const a=P.findKey(this,e);return!!(a&&this[a]!==void 0&&(!t||vr(this,this[a],a,t)))}return!1}delete(e,t){const a=this;let i=!1;function o(r){if(r=ba(r),r){const l=P.findKey(a,r);l&&(!t||vr(a,a[l],l,t))&&(delete a[l],i=!0)}}return P.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let a=t.length,i=!1;for(;a--;){const o=t[a];(!e||vr(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,a={};return P.forEach(this,(i,o)=>{const r=P.findKey(a,o);if(r){t[r]=xn(i),delete t[o];return}const l=e?uR(o):String(o).trim();l!==o&&delete t[o],t[l]=xn(i),a[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return P.forEach(this,(a,i)=>{a!=null&&a!==!1&&(t[i]=e&&P.isArray(a)?a.join(", "):a)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
39
39
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const a=new this(e);return t.forEach(i=>a.set(i)),a}static accessor(e){const t=(this[lm]=this[lm]={accessors:{}}).accessors,a=this.prototype;function i(o){const r=ba(o);t[r]||(mR(a,o),t[r]=!0)}return P.isArray(e)?e.forEach(i):i(e),this}}vn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(vn.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),P.freezeMethods(vn);const Nt=vn;function Ar(s,e){const t=this||xr,a=e||t,i=Nt.from(a.headers);let o=a.data;return P.forEach(s,function(r){o=r.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function cm(s){return!!(s&&s.__CANCEL__)}function Fs(s,e,t){_e.call(this,s??"canceled",_e.ERR_CANCELED,e,t),this.name="CanceledError"}P.inherits(Fs,_e,{__CANCEL__:!0});function dm(s,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?s(t):e(new _e("Request failed with status code "+t.status,[_e.ERR_BAD_REQUEST,_e.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function fR(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function pR(s,e){s=s||10;const t=new Array(s),a=new Array(s);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=a[o];r||(r=d),t[i]=l,a[i]=d;let h=o,u=0;for(;h!==i;)u+=t[h++],h=h%s;if(i=(i+1)%s,i===o&&(o=(o+1)%s),d-r<e)return;const f=c&&d-c;return f?Math.round(u*1e3/f):void 0}}function gR(s,e){let t=0,a=1e3/e,i,o;const r=(l,d=Date.now())=>{t=d,i=null,o&&(clearTimeout(o),o=null),s.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-t;c>=a?r(l,d):(i=l,o||(o=setTimeout(()=>{o=null,r(i)},a-c)))},()=>i&&r(i)]}const An=(s,e,t=3)=>{let a=0;const i=pR(50,250);return gR(o=>{const r=o.loaded,l=o.lengthComputable?o.total:void 0,d=r-a,c=i(d),h=r<=l;a=r;const u={loaded:r,total:l,progress:l?r/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&h?(l-r)/c:void 0,event:o,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(u)},t)},hm=(s,e)=>{const t=s!=null;return[a=>e[0]({lengthComputable:t,total:s,loaded:a}),e[1]]},um=s=>(...e)=>P.asap(()=>s(...e)),yR=gt.hasStandardBrowserEnv?function(){const s=gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent),e=document.createElement("a");let t;function a(i){let o=i;return s&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return t=a(window.location.href),function(i){const o=P.isString(i)?a(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}(),bR=gt.hasStandardBrowserEnv?{write(s,e,t,a,i,o){const r=[s+"="+encodeURIComponent(e)];P.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),P.isString(a)&&r.push("path="+a),P.isString(i)&&r.push("domain="+i),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function SR(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function wR(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function mm(s,e){return s&&!SR(e)?wR(s,e):e}const fm=s=>s instanceof Nt?{...s}:s;function ws(s,e){e=e||{};const t={};function a(c,h,u){return P.isPlainObject(c)&&P.isPlainObject(h)?P.merge.call({caseless:u},c,h):P.isPlainObject(h)?P.merge({},h):P.isArray(h)?h.slice():h}function i(c,h,u){if(P.isUndefined(h)){if(!P.isUndefined(c))return a(void 0,c,u)}else return a(c,h,u)}function o(c,h){if(!P.isUndefined(h))return a(void 0,h)}function r(c,h){if(P.isUndefined(h)){if(!P.isUndefined(c))return a(void 0,c)}else return a(void 0,h)}function l(c,h,u){if(u in e)return a(c,h);if(u in s)return a(void 0,c)}const d={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(c,h)=>i(fm(c),fm(h),!0)};return P.forEach(Object.keys(Object.assign({},s,e)),function(c){const h=d[c]||i,u=h(s[c],e[c],c);P.isUndefined(u)&&h!==l||(t[c]=u)}),t}const pm=s=>{const e=ws({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=Nt.from(r),e.url=nm(mm(e.baseURL,e.url),s.params,s.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(P.isFormData(t)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((d=r.getContentType())!==!1){const[c,...h]=d?d.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...h].join("; "))}}if(gt.hasStandardBrowserEnv&&(a&&P.isFunction(a)&&(a=a(e)),a||a!==!1&&yR(e.url))){const c=i&&o&&bR.read(o);c&&r.set(i,c)}return e},_R=typeof XMLHttpRequest<"u",kR=_R&&function(s){return new Promise(function(e,t){const a=pm(s);let i=a.data;const o=Nt.from(a.headers).normalize();let{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,h,u,f,p;function m(){f&&f(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(a.method.toUpperCase(),a.url,!0),g.timeout=a.timeout;function y(){if(!g)return;const S=Nt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!r||r==="text"||r==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:S,config:s,request:g};dm(function(C){e(C),m()},function(C){t(C),m()},_),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(t(new _e("Request aborted",_e.ECONNABORTED,s,g)),g=null)},g.onerror=function(){t(new _e("Network Error",_e.ERR_NETWORK,s,g)),g=null},g.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const _=a.transitional||om;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),t(new _e(S,_.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,s,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&P.forEach(o.toJSON(),function(S,_){g.setRequestHeader(_,S)}),P.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),r&&r!=="json"&&(g.responseType=a.responseType),d&&([u,p]=An(d,!0),g.addEventListener("progress",u)),l&&g.upload&&([h,f]=An(l),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",f)),(a.cancelToken||a.signal)&&(c=S=>{g&&(t(!S||S.type?new Fs(null,s,g):S),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const b=fR(a.url);if(b&&gt.protocols.indexOf(b)===-1){t(new _e("Unsupported protocol "+b+":",_e.ERR_BAD_REQUEST,s));return}g.send(i||null)})},ER=(s,e)=>{let t=new AbortController,a;const i=function(d){if(!a){a=!0,r();const c=d instanceof Error?d:this.reason;t.abort(c instanceof _e?c:new Fs(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{i(new _e(`timeout ${e} of ms exceeded`,_e.ETIMEDOUT))},e);const r=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(d=>{d&&(d.removeEventListener?d.removeEventListener("abort",i):d.unsubscribe(i))}),s=null)};s.forEach(d=>d&&d.addEventListener&&d.addEventListener("abort",i));const{signal:l}=t;return l.unsubscribe=r,[l,()=>{o&&clearTimeout(o),o=null}]},TR=ER,CR=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let a=0,i;for(;a<t;)i=a+e,yield s.slice(a,i),a=i},xR=async function*(s,e,t){for await(const a of s)yield*CR(ArrayBuffer.isView(a)?a:await t(String(a)),e)},gm=(s,e,t,a,i)=>{const o=xR(s,e,i);let r=0,l,d=c=>{l||(l=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await o.next();if(h){d(),c.close();return}let f=u.byteLength;if(t){let p=r+=f;t(p)}c.enqueue(new Uint8Array(u))}catch(h){throw d(h),h}},cancel(c){return d(c),o.return()}},{highWaterMark:2})},Ln=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ym=Ln&&typeof ReadableStream=="function",Lr=Ln&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),bm=(s,...e)=>{try{return!!s(...e)}catch{return!1}},vR=ym&&bm(()=>{let s=!1;const e=new Request(gt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Sm=64*1024,Ir=ym&&bm(()=>P.isReadableStream(new Response("").body)),In={stream:Ir&&(s=>s.body)};Ln&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!In[e]&&(In[e]=P.isFunction(s[e])?t=>t[e]():(t,a)=>{throw new _e(`Response type '${e}' is not supported`,_e.ERR_NOT_SUPPORT,a)})})})(new Response);const AR=async s=>{if(s==null)return 0;if(P.isBlob(s))return s.size;if(P.isSpecCompliantForm(s))return(await new Request(s).arrayBuffer()).byteLength;if(P.isArrayBufferView(s)||P.isArrayBuffer(s))return s.byteLength;if(P.isURLSearchParams(s)&&(s=s+""),P.isString(s))return(await Lr(s)).byteLength},LR=async(s,e)=>P.toFiniteNumber(s.getContentLength())??AR(e),IR=Ln&&(async s=>{let{url:e,method:t,data:a,signal:i,cancelToken:o,timeout:r,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:h,withCredentials:u="same-origin",fetchOptions:f}=pm(s);c=c?(c+"").toLowerCase():"text";let[p,m]=i||o||r?TR([i,o],r):[],g,y;const b=()=>{!g&&setTimeout(()=>{p&&p.unsubscribe()}),g=!0};let S;try{if(d&&vR&&t!=="get"&&t!=="head"&&(S=await LR(h,a))!==0){let T=new Request(e,{method:"POST",body:a,duplex:"half"}),B;if(P.isFormData(a)&&(B=T.headers.get("content-type"))&&h.setContentType(B),T.body){const[L,R]=hm(S,An(um(d)));a=gm(T.body,Sm,L,R,Lr)}}P.isString(u)||(u=u?"include":"omit");const _="credentials"in Request.prototype;y=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:_?u:void 0});let C=await fetch(y);const E=Ir&&(c==="stream"||c==="response");if(Ir&&(l||E)){const T={};["status","statusText","headers"].forEach($=>{T[$]=C[$]});const B=P.toFiniteNumber(C.headers.get("content-length")),[L,R]=l&&hm(B,An(um(l),!0))||[];C=new Response(gm(C.body,Sm,L,()=>{R&&R(),E&&b()},Lr),T)}c=c||"text";let v=await In[P.findKey(In,c)||"text"](C,s);return!E&&b(),m&&m(),await new Promise((T,B)=>{dm(T,B,{data:v,headers:Nt.from(C.headers),status:C.status,statusText:C.statusText,config:s,request:y})})}catch(_){throw b(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new _e("Network Error",_e.ERR_NETWORK,s,y),{cause:_.cause||_}):_e.from(_,_&&_.code,s,y)}}),Rr={http:HI,xhr:kR,fetch:IR};P.forEach(Rr,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const wm=s=>`- ${s}`,RR=s=>P.isFunction(s)||s===null||s===!1,_m={getAdapter:s=>{s=P.isArray(s)?s:[s];const{length:e}=s;let t,a;const i={};for(let o=0;o<e;o++){t=s[o];let r;if(a=t,!RR(t)&&(a=Rr[(r=String(t)).toLowerCase()],a===void 0))throw new _e(`Unknown adapter '${r}'`);if(a)break;i[r||"#"+o]=a}if(!a){const o=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=e?o.length>1?`since :
40
40
  `+o.map(wm).join(`
41
41
  `):" "+wm(o[0]):"as no adapter specified";throw new _e("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a},adapters:Rr};function Br(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Fs(null,s)}function km(s){return Br(s),s.headers=Nt.from(s.headers),s.data=Ar.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),_m.getAdapter(s.adapter||xr.adapter)(s).then(function(e){return Br(s),e.data=Ar.call(s,s.transformResponse,e),e.headers=Nt.from(e.headers),e},function(e){return cm(e)||(Br(s),e&&e.response&&(e.response.data=Ar.call(s,s.transformResponse,e.response),e.response.headers=Nt.from(e.response.headers))),Promise.reject(e)})}const Em="1.7.5",Nr={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{Nr[s]=function(t){return typeof t===s||"a"+(e<1?"n ":" ")+s}});const Tm={};Nr.transitional=function(s,e,t){function a(i,o){return"[Axios v"+Em+"] Transitional option '"+i+"'"+o+(t?". "+t:"")}return(i,o,r)=>{if(s===!1)throw new _e(a(o," has been removed"+(e?" in "+e:"")),_e.ERR_DEPRECATED);return e&&!Tm[o]&&(Tm[o]=!0,console.warn(a(o," has been deprecated since v"+e+" and will be removed in the near future"))),s?s(i,o,r):!0}};function BR(s,e,t){if(typeof s!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);const a=Object.keys(s);let i=a.length;for(;i-- >0;){const o=a[i],r=e[o];if(r){const l=s[o],d=l===void 0||r(l,o,s);if(d!==!0)throw new _e("option "+o+" must be "+d,_e.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _e("Unknown option "+o,_e.ERR_BAD_OPTION)}}const Dr={assertOptions:BR,validators:Nr},os=Dr.validators;class Rn{constructor(e){this.defaults=e,this.interceptors={request:new im,response:new im}}async request(e,t){try{return await this._request(e,t)}catch(a){if(a instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{a.stack?o&&!String(a.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(a.stack+=`
42
- `+o):a.stack=o}catch{}}throw a}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ws(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Dr.assertOptions(a,{silentJSONParsing:os.transitional(os.boolean),forcedJSONParsing:os.transitional(os.boolean),clarifyTimeoutError:os.transitional(os.boolean)},!1),i!=null&&(P.isFunction(i)?t.paramsSerializer={serialize:i}:Dr.assertOptions(i,{encode:os.function,serialize:os.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&P.merge(o.common,o[t.method]);o&&P.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=Nt.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(d=d&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let h,u=0,f;if(!d){const m=[km.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,c),f=m.length,h=Promise.resolve(t);u<f;)h=h.then(m[u++],m[u++]);return h}f=l.length;let p=t;for(u=0;u<f;){const m=l[u++],g=l[u++];try{p=m(p)}catch(y){g.call(this,y);break}}try{h=km.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,f=c.length;u<f;)h=h.then(c[u++],c[u++]);return h}getUri(e){e=ws(this.defaults,e);const t=mm(e.baseURL,e.url);return nm(t,e.params,e.paramsSerializer)}}P.forEach(["delete","get","head","options"],function(s){Rn.prototype[s]=function(e,t){return this.request(ws(t||{},{method:s,url:e,data:(t||{}).data}))}}),P.forEach(["post","put","patch"],function(s){function e(t){return function(a,i,o){return this.request(ws(o||{},{method:s,headers:t?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Rn.prototype[s]=e(),Rn.prototype[s+"Form"]=e(!0)});const Bn=Rn;class Pr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(l=>{a.subscribe(l),o=l}).then(i);return r.cancel=function(){a.unsubscribe(o)},r},e(function(i,o,r){a.reason||(a.reason=new Fs(i,o,r),t(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pr(function(t){e=t}),cancel:e}}}const NR=Pr;function DR(s){return function(e){return s.apply(null,e)}}function PR(s){return P.isObject(s)&&s.isAxiosError===!0}const Or={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(Or).forEach(([s,e])=>{Or[e]=s});const OR=Or;function Cm(s){const e=new Bn(s),t=zu(Bn.prototype.request,e);return P.extend(t,Bn.prototype,e,{allOwnKeys:!0}),P.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Cm(ws(s,a))},t}const ze=Cm(xr);ze.Axios=Bn,ze.CanceledError=Fs,ze.CancelToken=NR,ze.isCancel=cm,ze.VERSION=Em,ze.toFormData=Cn,ze.AxiosError=_e,ze.Cancel=ze.CanceledError,ze.all=function(s){return Promise.all(s)},ze.spread=DR,ze.isAxiosError=PR,ze.mergeConfig=ws,ze.AxiosHeaders=Nt,ze.formToJSON=s=>rm(P.isHTMLForm(s)?new FormData(s):s),ze.getAdapter=_m.getAdapter,ze.HttpStatusCode=OR,ze.default=ze;const xm=ze,FR=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Fr={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},vm=()=>{n.useCssVars(s=>({"26acffa8":s.backgroundColor,"3d95bef4":s.height,"86ba1cc0":s.arrowsPosition,"140b6ada":s.arrowsPadding+"px","7df46be5":s.arrowsBackground,"33f99798":s.arrowsHeight*2+"px","1c8a858d":s.arrowsWidth*2+"px","4a7876c9":s.arrowsRadius,"2ff67e63":s.arrowsBorder,"59c5dd08":s.arrowsMargin+"px","6658215d":s.arrowsContainerBgL,66582163:s.arrowsContainerBgR,e5900a2e:s.scrollColor}))},Am=Fr.setup;Fr.setup=Am?(s,e)=>(vm(),Am(s,e)):vm;const MR={ref:"gscScrollableContainer",class:"scrollable-container"},$R={class:"scrollable-arrows"},VR=["width","height","viewBox"],UR=["stroke"],zR={class:"scrollable-wrapper"},GR={class:"scrollable-arrows"},jR=["width","height","viewBox"],HR=["stroke"];function WR(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",MR,[t.arrows?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["arrows-container",o.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...r)=>o.scrollLeft&&o.scrollLeft(...r))},[n.createElementVNode("div",$R,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,UR)],8,VR))])],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...r)=>o.getScroll&&o.getScroll(...r))},[n.createElementVNode("div",zR,[n.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(n.openBlock(),n.createElementBlock("div",{key:1,id:"arrows-container-right",class:n.normalizeClass(["arrows-container",o.hideShowRightArrow]),onClick:e[2]||(e[2]=(...r)=>o.scrollRight&&o.scrollRight(...r))},[n.createElementVNode("div",GR,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,HR)],8,jR))])],2)):n.createCommentVNode("",!0)],512)}const KR=FR(Fr,[["render",WR],["__scopeId","data-v-7d0811ac"]]),rs=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t};let Lm=null;const Mr={components:{},props:{titleCategory:{type:String,default:"RESUMEN"},dateGame:{type:String,default:""},showVideos:{type:Boolean,default:!0},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},matchday:{type:String,default:""},seasonName:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""}},data(){return{gamesContainerGHWidth:0}},computed:{date(){const s=this.gamesContainerGHWidth;return s<=400?"date400":s<=540?"date540":s<=650?"date650":"date"},seasoncontainer(){const s=this.gamesContainerGHWidth;return s<=400?"season-container400":s<=540?"season-container540":s<=650?"season-container650":"season-container"},matchcontainer(){const s=this.gamesContainerGHWidth;return s<=400?"match-container400":s<=540?"match-container540":s<=650?"match-container650":"match-container"},containerinfogame(){const s=this.gamesContainerGHWidth;return s<=400?"container-info-game400":s<=540?"container-info-game540":s<=650?"container-info-game650":"container-info-game"},playbutton(){const s=this.gamesContainerGHWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},baselogo(){const s=this.gamesContainerGHWidth;return s<=400?"base-logo400":s<=540?"base-logo540":s<=650?"base-logo650":"base-logo"},baselogoright(){const s=this.gamesContainerGHWidth;return s<=400?"base-logo-right400":s<=540?"base-logo-right540":s<=650?"base-logo-right650":"base-logo-right"},thumbnailhighlights(){const s=this.gamesContainerGHWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},teamlogo(){const s=this.gamesContainerGHWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},logoright(){const s=this.gamesContainerGHWidth;return s<=400?"logo-right400":s<=540?"logo-right540":s<=650?"logo-right650":"logo-right"},secondline(){const s=this.gamesContainerGHWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},titlename(){const s=this.gamesContainerGHWidth;return s<=400?"title-name400":s<=540?"title-name540":s<=650?"title-name650":"title-name"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Lm=new ResizeObserver(()=>{this.gamesContainerGHWidth=this.$refs.gamesContainerGH?this.$refs.gamesContainerGH.clientWidth:0,this.movil=this.gamesContainerGHWidth<740}),Lm.observe(this.$refs.gamesContainerGH);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Im=()=>{n.useCssVars(s=>({a281566c:s.colorBackgroundHome+"45","692c47db":s.colorBackgroundAway+"45","229d672a":s.colorBackgroundHome,"229a5539":s.colorBackgroundAway}))},Rm=Mr.setup;Mr.setup=Rm?(s,e)=>(Im(),Rm(s,e)):Im;const Nn=s=>(n.pushScopeId("data-v-dd4b2ba3"),s=s(),n.popScopeId(),s),qR=Nn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),YR=[qR],JR=Nn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),XR=["src"],ZR=Nn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),QR=Nn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),e4=["src"],t4=["src"],s4={class:"text-container"};function a4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerGH",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},YR,2)):n.createCommentVNode("",!0),t.dateGame!=""?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.date)},n.toDisplayString(t.dateGame),3)):n.createCommentVNode("",!0),t.matchday!=""&&t.seasonName!=""?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(o.containerinfogame)},[t.matchday!=""?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.matchcontainer)},n.toDisplayString(t.matchday),3)):n.createCommentVNode("",!0),t.seasonName!=""?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.seasoncontainer)},n.toDisplayString(t.seasonName),3)):n.createCommentVNode("",!0)],2)):n.createCommentVNode("",!0),JR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,XR),n.createElementVNode("div",{class:n.normalizeClass([o.baselogo,"position-image"])},null,2),n.createElementVNode("div",{class:n.normalizeClass(o.baselogoright)},null,2),ZR,QR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,e4),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.logoright)},null,10,t4),n.createElementVNode("div",s4,[n.createElementVNode("span",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.score),3),n.createElementVNode("div",{class:n.normalizeClass(o.titlename)},n.toDisplayString(t.titleCategory),3)])],2)}const n4=rs(Mr,[["render",a4],["__scopeId","data-v-dd4b2ba3"]]);let Bm=null;const $r={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerCWidth:0}},computed:{playbutton(){const s=this.gamesContainerCWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},teamlogo(){const s=this.gamesContainerCWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},firstline(){const s=this.gamesContainerCWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},secondline(){const s=this.gamesContainerCWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},playerimage(){const s=this.gamesContainerCWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerCWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Bm=new ResizeObserver(()=>{this.gamesContainerCWidth=this.$refs.gamesContainerC?this.$refs.gamesContainerC.clientWidth:0,this.movil=this.gamesContainerCWidth<740}),Bm.observe(this.$refs.gamesContainerC);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Nm=()=>{n.useCssVars(s=>({"9cae8720":s.colorBackgroundHome,"58cca122":s.colorBackgroundHome+"36"}))},Dm=$r.setup;$r.setup=Dm?(s,e)=>(Nm(),Dm(s,e)):Nm;const Sa=s=>(n.pushScopeId("data-v-ef4021c1"),s=s(),n.popScopeId(),s),i4=Sa(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),o4=[i4],r4=Sa(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),l4=["src"],c4=Sa(()=>n.createElementVNode("div",{class:"base-logo"},null,-1)),d4=["src"],h4=Sa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),u4={class:"text-container"},m4={class:"player-image position-image"},f4=["src"],p4=["src"],g4=["src"],y4=Sa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function b4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerC",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},o4,2),r4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,l4),c4,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,d4),h4,n.createElementVNode("div",u4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},n.toDisplayString(t.namePlayer),3),n.createElementVNode("span",{class:n.normalizeClass(o.secondline),style:n.normalizeStyle(t.nameCategory=="Balones recuperados en disputa "?"font-size: 25px":"")},n.toDisplayString(t.nameCategory),7)]),n.createElementVNode("div",m4,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,f4)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,p4)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,g4)):n.createCommentVNode("",!0)]),y4],2)}const S4=rs($r,[["render",b4],["__scopeId","data-v-ef4021c1"]]);let Pm=null;const Vr={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},showVideos:{type:Boolean,default:!0},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerCTWidth:0}},computed:{playbutton(){const s=this.gamesContainerCTWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerCTWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerCTWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerCTWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerCTWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Pm=new ResizeObserver(()=>{this.gamesContainerCTWidth=this.$refs.gamesContainerCT?this.$refs.gamesContainerCT.clientWidth:0,this.gamesContainerCTWidth<740?this.movil=!0:this.movil=!1}),Pm.observe(this.$refs.gamesContainerCT);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Om=()=>{n.useCssVars(s=>({"3ce1ca00":s.colorBackgroundHome,"916c7edc":s.colorBackgroundHome+"36"}))},Fm=Vr.setup;Vr.setup=Fm?(s,e)=>(Om(),Fm(s,e)):Om;const Dn=s=>(n.pushScopeId("data-v-191985e2"),s=s(),n.popScopeId(),s),w4=Dn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),_4=[w4],k4=Dn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),E4=["src"],T4={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo"},C4=["fill"],x4=["id"],v4=["stop-color"],A4=["stop-color"],L4=["src"],I4=Dn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),R4={class:"text-container"},B4=Dn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function N4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerCT",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},_4,2)):n.createCommentVNode("",!0),k4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,E4),(n.openBlock(),n.createElementBlock("svg",T4,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,C4),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_7_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundHome},null,8,v4),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundHome},null,8,A4)],8,x4)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,L4),I4,n.createElementVNode("div",R4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Local"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),B4],2)}const D4=rs(Vr,[["render",N4],["__scopeId","data-v-191985e2"]]);let Mm=null;const Ur={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerTAWidth:0}},computed:{playbutton(){const s=this.gamesContainerTAWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerTAWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerTAWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerTAWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerTAWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Mm=new ResizeObserver(()=>{this.gamesContainerTAWidth=this.$refs.gamesContainerTA?this.$refs.gamesContainerTA.clientWidth:0,this.movil=this.gamesContainerTAWidth<740}),Mm.observe(this.$refs.gamesContainerTA);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},$m=()=>{n.useCssVars(s=>({"1e0230d2":s.colorBackgroundHome,"1ae427ca":s.colorBackgroundHome+"36"}))},Vm=Ur.setup;Ur.setup=Vm?(s,e)=>($m(),Vm(s,e)):$m;const Pn=s=>(n.pushScopeId("data-v-61a93c22"),s=s(),n.popScopeId(),s),P4=Pn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),O4=[P4],F4=Pn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),M4=["src"],$4={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away"},V4=["fill"],U4=["id"],z4=["stop-color"],G4=["stop-color"],j4=["src"],H4=Pn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),W4={class:"text-container"},K4=Pn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function q4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerTA",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},O4,2),F4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,M4),(n.openBlock(),n.createElementBlock("svg",$4,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,V4),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_7_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundAway},null,8,z4),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,G4)],8,U4)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,j4),H4,n.createElementVNode("div",W4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Away"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),K4],2)}const Y4=rs(Ur,[["render",q4],["__scopeId","data-v-61a93c22"]]);let Um=null;const zr={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerTALWidth:0}},computed:{playbutton(){const s=this.gamesContainerTALWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerTALWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerTALWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerTALWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerTALWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Um=new ResizeObserver(()=>{this.gamesContainerTALWidth=this.$refs.gamesContainerTAL?this.$refs.gamesContainerTAL.clientWidth:0,this.movil=this.gamesContainerTALWidth<740}),Um.observe(this.$refs.gamesContainerTAL);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},zm=()=>{n.useCssVars(s=>({"41af18a7":s.colorBackgroundHome,"1387690b":s.colorBackgroundHome+"36"}))},Gm=zr.setup;zr.setup=Gm?(s,e)=>(zm(),Gm(s,e)):zm;const On=s=>(n.pushScopeId("data-v-19ce95f3"),s=s(),n.popScopeId(),s),J4=On(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),X4=[J4],Z4=On(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),Q4=["src"],e3={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away-live"},t3=["fill"],s3=["id"],a3=["stop-color"],n3=["stop-color"],i3=["src"],o3=On(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),r3={class:"text-container"},l3=On(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function c3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerTAL",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},X4,2),Z4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,Q4),(n.openBlock(),n.createElementBlock("svg",e3,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_10_"+t.nameTeam.replaceAll(" ","")+")"},null,8,t3),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_10_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundAway},null,8,a3),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,n3)],8,s3)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,i3),o3,n.createElementVNode("div",r3,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Away"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),l3],2)}const d3=rs(zr,[["render",c3],["__scopeId","data-v-19ce95f3"]]);let jm=null;const Gr={components:{},props:{colorFontHome:{type:String,default:"#000000"},colorFontAway:{type:String,default:"#000000"},type:{type:Number,default:0},showVideos:{type:Boolean,default:!0},playStatus:{type:Number,default:2},matchday:{type:String,default:""},seasonName:{type:String,default:""},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},showimg:{type:Boolean,default:!0},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},date:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerGPWidth:0}},computed:{seasoncontainer(){const s=this.gamesContainerGPWidth;return s<=400?"season-container400":s<=540?"season-container540":s<=650?"season-container650":"season-container"},matchcontainer(){const s=this.gamesContainerGPWidth;return s<=400?"match-container400":s<=540?"match-container540":s<=650?"match-container650":"match-container"},seasonnameContainer(){const s=this.gamesContainerGPWidth;return s<=400?"seasonname400":s<=540?"seasonname540":s<=650?"seasonname650":"seasonname"},matchboxContainer(){const s=this.gamesContainerGPWidth;return s<=400?"matchbox400":s<=540?"matchbox540":s<=650?"matchbox650":"matchbox"},containerinfogame(){const s=this.gamesContainerGPWidth;return s<=400?"container-info-game400":s<=540?"container-info-game540":s<=650?"container-info-game650":"container-info-game"},playbutton(){const s=this.gamesContainerGPWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},points(){const s=this.gamesContainerGPWidth;return s<=400?"points400":s<=540?"points540":s<=650?"points650":"points"},teamname(){const s=this.gamesContainerGPWidth;return s<=400?"team-name400":s<=540?"team-name540":s<=650?"team-name650":"team-name"},teamscore(){const s=this.gamesContainerGPWidth;return s<=400?"team-score400":s<=540?"team-score540":s<=650?"team-score650":"team-score"},teamlogo(){const s=this.gamesContainerGPWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},hometeam(){const s=this.gamesContainerGPWidth;return s<=400?"home-team400":s<=540?"home-team540":s<=650?"home-team650":"home-team"},awayteam(){const s=this.gamesContainerGPWidth;return s<=400?"away-team400":s<=540?"away-team540":s<=650?"away-team650":"away-team"},texttitle(){const s=this.gamesContainerGPWidth;return s<=400?"text-title400":s<=540?"text-title540":s<=650?"text-title650":"text-title"},texttitle2(){const s=this.gamesContainerGPWidth;return s<=400?"text-title2400":s<=540?"text-title2540":s<=650?"text-title2650":"text-title2"},playerimage(){const s=this.gamesContainerGPWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerGPWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)jm=new ResizeObserver(()=>{this.gamesContainerGPWidth=this.$refs.gamesContainerGP?this.$refs.gamesContainerGP.clientWidth:0,this.gamesContainerGPWidth<740?this.movil=!0:this.movil=!1}),jm.observe(this.$refs.gamesContainerGP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Hm=()=>{n.useCssVars(s=>({"14532c00":s.colorBackgroundHome,"14594fe2":s.colorBackgroundAway,"672ee12c":s.colorBackgroundAway+"62","11fb9192":s.colorBackgroundHome+"36"}))},Wm=Gr.setup;Gr.setup=Wm?(s,e)=>(Hm(),Wm(s,e)):Hm;const Fn=s=>(n.pushScopeId("data-v-77384f47"),s=s(),n.popScopeId(),s),h3=["width","src"],u3=Fn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),m3=Fn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),f3=[m3],p3={class:"player-container"},g3=["src"],y3=["src"],b3=["src"],S3={class:"container-score"},w3=["src"],_3=["src"],k3=["src"],E3=Fn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),T3=Fn(()=>n.createElementVNode("div",{class:"gradient-color"},null,-1));function C3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerGP",class:n.normalizeClass(o.thumbnailhighlights)},[t.playStatus!=2?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass((t.playStatus==1,"icon-thumb"))},[n.createElementVNode("img",{width:t.playStatus==1?60:40,src:t.playStatus==1?"http://golstatsimages.blob.core.windows.net/images-library/icn-live@2x.png":"http://golstatsimages.blob.core.windows.net/images-library/icn-info@2x.png"},null,8,h3)],2)):n.createCommentVNode("",!0),u3,t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},f3,2)):n.createCommentVNode("",!0),n.createElementVNode("div",p3,[n.createElementVNode("div",{class:n.normalizeClass(o.containerinfogame)},[n.createElementVNode("div",{class:n.normalizeClass(o.matchcontainer)},[t.matchday?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.matchboxContainer)},n.toDisplayString(t.matchday),3)):n.createCommentVNode("",!0),t.seasonName?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.seasonnameContainer)},n.toDisplayString(t.seasonName),3)):n.createCommentVNode("",!0)],2),t.date?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.seasoncontainer)},n.toDisplayString(t.date),3)):n.createCommentVNode("",!0)],2),t.type==0?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(o.texttitle)},n.toDisplayString(t.nameCategory),3)):(n.openBlock(),n.createElementBlock("span",{key:1,class:n.normalizeClass(o.texttitle2)},n.toDisplayString(t.nameCategory),3)),t.showimg?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,g3)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,y3)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,b3)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),n.createElementVNode("div",S3,[n.createElementVNode("div",{class:n.normalizeClass(o.hometeam)},[n.createElementVNode("span",{class:n.normalizeClass(o.teamname),style:n.normalizeStyle({color:t.colorFontAway})},n.toDisplayString(t.nameHomeTeam),7),n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,w3),n.createElementVNode("span",{class:n.normalizeClass(o.teamscore)},n.toDisplayString(t.scoreHome),3)],2),n.createElementVNode("span",{class:n.normalizeClass(o.points)},":",2),n.createElementVNode("div",{class:n.normalizeClass(o.awayteam)},[n.createElementVNode("span",{class:n.normalizeClass(o.teamscore)},n.toDisplayString(t.scoreAway),3),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,_3),n.createElementVNode("span",{class:n.normalizeClass(o.teamname),style:n.normalizeStyle({color:t.colorFontAway})},n.toDisplayString(t.nameAwayTeam),7)],2)])]),n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,k3),E3,T3],2)}const x3=rs(Gr,[["render",C3],["__scopeId","data-v-77384f47"]]);let Km=null;const jr={components:{},props:{colorFont:{type:String,default:"#000000"},showVideos:{type:Boolean,default:!0},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerSPWidth:0}},computed:{playbutton(){const s=this.gamesContainerSPWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},firstline(){const s=this.gamesContainerSPWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},secondline(){const s=this.gamesContainerSPWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},playername(){const s=this.gamesContainerSPWidth;return s<=400?"player-name400":s<=540?"player-name540":s<=650?"player-name650":"player-name"},playerimage(){const s=this.gamesContainerSPWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerSPWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Km=new ResizeObserver(()=>{this.gamesContainerSPWidth=this.$refs.gamesContainerSP?this.$refs.gamesContainerSP.clientWidth:0,this.movil=this.gamesContainerSPWidth<740}),Km.observe(this.$refs.gamesContainerSP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},qm=()=>{n.useCssVars(s=>({"17845cea":s.colorBackgroundHome+"30","3e8f3cad":s.colorBackgroundHome}))},Ym=jr.setup;jr.setup=Ym?(s,e)=>(qm(),Ym(s,e)):qm;const Mn=s=>(n.pushScopeId("data-v-df5486d2"),s=s(),n.popScopeId(),s),v3=Mn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),A3=[v3],L3={class:"player-image position-image"},I3=["src"],R3=["src"],B3=["src"],N3=["src"],D3=Mn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),P3=["src"],O3=Mn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),F3={class:"text-container"},M3=Mn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),$3={class:"base-logo",width:"91",height:"216",viewBox:"0 0 91 216",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V3=["fill"];function U3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerSP",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},A3,2)):n.createCommentVNode("",!0),n.createElementVNode("div",L3,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,I3)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,R3)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,B3)):n.createCommentVNode("",!0)]),n.createElementVNode("img",{src:t.logoHome,alt:"",class:"team-logo"},null,8,N3),D3,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,P3),O3,n.createElementVNode("div",F3,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},"MEJORES JUGADAS",2),n.createElementVNode("span",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3),n.createElementVNode("div",{class:n.normalizeClass(o.playername),style:n.normalizeStyle({color:t.colorFont})},n.toDisplayString(t.namePlayer),7)]),M3,(n.openBlock(),n.createElementBlock("svg",$3,[n.createElementVNode("path",{d:"M91.5 216L0 -0.5H91.5V216Z",fill:t.colorBackgroundHome},null,8,V3)]))],2)}const z3=rs(jr,[["render",U3],["__scopeId","data-v-df5486d2"]]);function G3(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const j3="_ptg_1shb4_2",H3="_ptgtitle_1shb4_7",W3="_ptgtitle450_1shb4_23",K3="_pgtcontainercard_1shb4_39",q3="_pgtcontainercard350_1shb4_44",Y3={ptg:j3,ptgtitle:H3,ptgtitle450:W3,pgtcontainercard:K3,pgtcontainercard350:q3},Hr={components:{GSCSlider:KR,GSCThumbnailCategory:S4,GSCThumbnailCategoryTeam:D4,GSCThumbnailCategoryTeamAway:Y4,GSCThumbnailHighlightGamePlayer:x3,GSCThumbnailCategoryTeamAwayLive:d3,GSCThumbnailSummaryPlayer:z3,GSCThumbnailHighlightGameHistoric:n4},setup(){const s=n.ref("ptgDiv"),{elementSize:e}=G3(s);return{ptgDiv:s,elementSize:e}},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},receiveData:{type:Boolean,default:!1},information:{type:Array,default:()=>[]},title:{type:String,default:"100% de sus participaciones en cada partido:"},type:{type:Number,default:0},showVideos:{type:Boolean,default:!0},viewType:{type:Number,default:2},local:{type:Boolean,default:!0},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0D1D29"},backgroundFooter:{type:String,default:"#192733"},matchdayView:{type:Number,default:1},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsScrollHide:{type:Boolean,default:!1},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},awaitForSpecificsPlaysBySeason:{type:Boolean,default:!1},awaitForBestPlaysBySeasonAndTeam:{type:Boolean,default:!1},awaitForBestPlaysBySeasonAndGame:{type:Boolean,default:!1},awaitForTeamsInfo:{type:Boolean,default:!1},specificsPlaysBySeasonResponse:{type:Object,default:null},bestPlaysBySeasonAndTeamResponse:{type:Object,default:null},bestPlaysBySeasonAndGameResponse:{type:Object,default:null},teamsInfoResponse:{type:Object,default:null}},data(){return{token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",printData:[],teamsInfo:[],playerPhoto:!0,homeTeam:0,flagGames:[],lastseason:0,arrayMatchdays:[],awayTeam:0,goalCategories:[12,55,"35_r","54_r"],resumeCategories:[607,608,12,55,54,35,14,52,15,53,466,477],lastType:0,lastUrl:"",teamsInfoLastUrl:""}},watch:{data:{immediate:!0,handler(s){this.type!==14&&(this.receiveData||this.getTeamsInfo(s)),this.getStats(s)}},teamsInfoResponse(s){s&&(this.receiveData||this.getTeamsInfo(this.data))},bestPlaysBySeasonAndTeamResponse(s){s&&this.getStats(this.data)},bestPlaysBySeasonAndGameResponse(s){s&&this.getStats(this.data)},specificsPlaysBySeasonResponse(s){s&&this.getStats(this.data)}},computed:{ptgtitleClass(){return this.elementSize.width<=450?this.$style.ptgtitle450:this.$style.ptgtitle},pgtcontainercardClass(){return this.elementSize.width<=350?this.$style.pgtcontainercard350:this.$style.pgtcontainercard}},methods:{getBestPlaysUrl({season:s,player:e,team:t,game:a,category:i}){let o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/best-plays/seasons/";return s&&(o+=`${s}`),e&&(o+=`/players/${e}`),t&&(o+=`/teams/${t}`),a&&(o+=`/games/${a}`),i&&(o+=`/categories/${i}`),this.videoPrivilegesPlayingAs.has(1)&&!this.videoPrivilegesPlayingAs.has(2)?o+="?isLocal=1":this.videoPrivilegesPlayingAs.has(2)&&!this.videoPrivilegesPlayingAs.has(1)&&(o+="?isVisitor=1"),this.isWidget&&this.teamWidget!=0&&[3,4,5].includes(this.type)&&(o+=`?t=${this.teamWidget}`),o},getIsSameScenario(s,e){const t=this.lastType===s&&this.lastUrl===e;return t||(this.lastType=s,this.lastUrl=e),t},onclickPlayVideos(s){let e=[],t=s.data.game_id?[s.data.game_id]:null;s.type==2?s.data.position_id==1?s.data.category==0?e=s.isAllPlays?[14,52,15,53,300,301,308,309,310,311,304,305,306,307,260,261,312,265,266,267,268,313,314,43,324,323,478,479,480,481,474,475,476,477,40,26,325,16,51,462,463,151,154,156,591,592,159,162,163,429,165,593,594,168,171,172,430,174,595,596,177,180,181,431,467,358,361,363,366,369,370,469,372,376,378,379,470,381,385,387,388,471,607,608,262,263]:[42,55,324,323,608,39,774,802,52,53,40,54]:e=s.data.category:s.data.category==0?e=s.isAllPlays?[56,57,59,60,326,213,214,215,216,583,584,122,123,124,125,585,586,128,129,130,131,133,327,587,588,136,137,138,139,589,590,142,143,144,145,146,147,485,486,487,488,489,490,491,492,10,27,597,598,538,539,599,600,541,542,601,602,545,546,603,604,548,549,561,562,100,563,564,103,104,105,106,107,108,565,566,111,567,568,114,115,116,117,118,119,4,88,5,34,402,459,460,461,233,403,456,457,458,236,404,453,454,455,240,405,450,451,452,243,408,447,448,449,283,409,444,445,446,285,410,441,442,443,290,411,438,439,440,292,412,435,436,437,297,414,415,416,417,244,418,419,420,421,401,581,582,331,506,530,579,580,334,507,531,577,578,344,508,532,575,576,424,509,533,573,574,341,529,534,571,572,340,528,535,569,570,427,527,536,348,349,350,465,352,353,354,466,14,52,15,53,218,219,220,221,496,497,498,499,500,501,502,503,217,504,505,521,522,543,33,209,208,517,206,207,26,325,16,51,463,151,154,156,591,592,159,162,163,429,165,593,594,168,171,172,430,174,595,596,177,180,181,431,467,358,361,363,366,369,370,469,372,376,378,379,470,381,385,387,388,471,607,608,210,212]:[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:e=s.data.category:s.type==3?s.data.category==0?e=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:e=s.data.category:s.data.category!=0?e=s.data.category:e=[607,608,12,55,54,35,14,52,15,53,466,477],this.data.isPrematch===1&&(t=null);const a=[1,2,3];let i={type:s.data.has_mxm?1:0,seasonId:s.data.season_id,mainSectionType:1,playListType:s.type,categoryIds:s.categories&&s.categories.length?s.categories:e,gameIds:t,playerIds:s.data.player_id?[s.data.player_id]:[],goalkeeperIds:s.data.position_id==1?s.data.player_id?[s.data.player_id]:[]:[],teamId:s.data.team_id?s.data.team_id:0,matchResult:s.data.matchResult?[s.matchResult]:a,playData:{},advancedFilter:{playListTitle:""}};s.data.category!==0&&(i.advancedFilter.mainCategoryId=s.data.category),this.$emit("openmedia",i)},onClickVideos(s){this.$emit("onClickVideos",s)},onClickCard(s){this.$emit("onClickCard",s)},async getTeamsInfo(s){if(this.awaitForTeamsInfo&&!this.teamsInfoResponse)return;const e="https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/"+s.season;if(e===this.teamsInfoLastUrl)return;this.teamsInfoLastUrl=e;const t=xm.create({headers:{Authorization:`${this.token}`}}),a=this.awaitForTeamsInfo?this.teamsInfoResponse:await t.get(e);for(let i=0;i<a.data.teams.length;i++)this.teamsInfo[a.data.teams[i].team_id]=a.data.teams[i]},async getStats(s){if(!this.receiveData){const i=xm.create({headers:{Authorization:`${this.token}`}});var e=[],t={},a={};if(this.type===0){if(a=await i.get("https://uof4tt5l46.execute-api.us-west-2.amazonaws.com/prod/v3/playerInfo/"+s.season+"/"+s.player),this.videoPrivilegesPlayingAs)if(a.data.seasons[s.season]){const o=a.data.team_id;a.data.seasons[s.season].games_played=a.data.seasons[s.season].games_played.filter(r=>(r.playingAs=r.home_team===o?1:2,this.videoPrivilegesPlayingAs.has(r.playingAs)))}else{const o=a.data.team_id;a.data.national_seasons[s.season].games_played=a.data.national_seasons[s.season].games_played.filter(r=>(r.playingAs=r.home_team===o?1:2,this.videoPrivilegesPlayingAs.has(r.playingAs)))}if(a.data.seasons[s.season])for(let o=0;o<a.data.seasons[s.season].games_played.length;o++)t={player_id:s.player,color:a.data.info_thumbnails.colors.background_color,colorfont:a.data.info_thumbnails.colors.font_color,photo_profile:a.data.info_thumbnails.images.player_in_action[0]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.player_in_action[0]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].home_team+".png",player_name:a.data.seasons[s.season].games_played[o].home_team_acronym+" "+a.data.seasons[s.season].games_played[o].home_team_score+" : "+a.data.seasons[s.season].games_played[o].visiting_team_score+" "+a.data.seasons[s.season].games_played[o].visiting_team_acronym,team_id_b:a.data.seasons[s.season].games_played[o].home_team,season_id:a.data.seasons[s.season].games_played[o].season_id,name:"",date:this.obtenerNombreCompletoFecha(a.data.seasons[s.season].games_played[o].date),category:0,team_id:a.data.team_id,game_id:a.data.seasons[s.season].games_played[o].game_id,has_mxm:a.data.seasons[s.season].games_played[o].has_mxm,position_id:a.data.position_id,scorehome:a.data.seasons[s.season].games_played[o].home_team_score,scoreaway:a.data.seasons[s.season].games_played[o].visiting_team_score,hometeamacronym:a.data.seasons[s.season].games_played[o].home_team_acronym,visitingteamacronym:a.data.seasons[s.season].games_played[o].visiting_team_acronym,seasonname:a.data.seasons[s.season].name,seasonname2:a.data.seasons[s.season].name.replace("Clausura","CL ").replace("Apertura","AP "),match:a.data.seasons[s.season].games_played[o].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),score:a.data.seasons[s.season].games_played[o].home_team_score+" : "+a.data.seasons[s.season].games_played[o].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:a.data.seasons[s.season].games_played[o].info_thumbnails.home_colors.background_color,backgroundaway:a.data.seasons[s.season].games_played[o].info_thumbnails.away_colors.background_color,colorfont_home:a.data.seasons[s.season].games_played[o].info_thumbnails.home_colors.font_color,colorfont_away:a.data.seasons[s.season].games_played[o].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].visiting_team+".png",total:a.data.seasons[s.season].games_played[o].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.seasons[s.season].games_played[o].home_team+"_"+a.data.seasons[s.season].games_played[o].season_id+"_r1.jpg"},e.push(t);else for(let o=0;o<a.data.national_seasons[s.season].games_played.length;o++)t={player_id:s.player,color:a.data.info_thumbnails.colors.background_color,colorfont:a.data.info_thumbnails.colors.font_color,photo_profile:a.data.info_thumbnails.images.player_in_action[0]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.player_in_action[0]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].home_team+".png",player_name:a.data.national_seasons[s.season].games_played[o].home_team_acronym+" "+a.data.national_seasons[s.season].games_played[o].home_team_score+" : "+a.data.national_seasons[s.season].games_played[o].visiting_team_score+" "+a.data.national_seasons[s.season].games_played[o].visiting_team_acronym,team_id_b:a.data.national_seasons[s.season].games_played[o].home_team,season_id:a.data.national_seasons[s.season].games_played[o].season_id,name:"",date:this.obtenerNombreCompletoFecha(a.data.national_seasons[s.season].games_played[o].date),category:0,team_id:a.data.team_id,game_id:a.data.national_seasons[s.season].games_played[o].game_id,position_id:a.data.position_id,scorehome:a.data.national_seasons[s.season].games_played[o].home_team_score,scoreaway:a.data.national_seasons[s.season].games_played[o].visiting_team_score,hometeamacronym:a.data.national_seasons[s.season].games_played[o].home_team_acronym,visitingteamacronym:a.data.national_seasons[s.season].games_played[o].visiting_team_acronym,seasonname:a.data.national_seasons[s.season].name,seasonname2:a.data.national_seasons[s.season].name.replace("Clausura","CL ").replace("Apertura","AP "),match:a.data.national_seasons[s.season].games_played[o].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),score:a.data.national_seasons[s.season].games_played[o].home_team_score+" : "+a.data.national_seasons[s.season].games_played[o].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:a.data.national_seasons[s.season].games_played[o].info_thumbnails.home_colors.background_color,backgroundaway:a.data.national_seasons[s.season].games_played[o].info_thumbnails.away_colors.background_color,colorfont_home:a.data.national_seasons[s.season].games_played[o].info_thumbnails.home_colors.font_color,colorfont_away:a.data.national_seasons[s.season].games_played[o].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].visiting_team+".png",total:a.data.national_seasons[s.season].games_played[o].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.national_seasons[s.season].games_played[o].home_team+"_"+a.data.national_seasons[s.season].games_played[o].season_id+"_r1.jpg"},e.push(t)}if(this.type===1){if(this.awaitForBestPlaysBySeasonAndTeam&&!this.bestPlaysBySeasonAndTeamResponse)return;const o=this.getBestPlaysUrl({season:s.season,team:s.team});if(this.getIsSameScenario(1,o))return;a=this.awaitForBestPlaysBySeasonAndTeam?this.bestPlaysBySeasonAndTeamResponse:await i.get(o);for(let r=0;r<a.data.categories.length;r++){this.playerPhoto=!1;const l=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_categories.length),d=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_teams.length);t={player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_categories[l],background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_teams[d],color:a.data.categories[r].info_thumbnails.colors.background_color,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+a.data.categories[r].info_thumbnails.team_logo,player_name:a.data.categories[r].category_name,team_name:this.teamsInfo[a.data.team_id].colloquial_name,team_id:a.data.team_id,colorfont:a.data.categories[r].info_thumbnails.colors.font_color,team_id_b:a.data.team_id,category:a.data.categories[r].categories,season_id:a.data.season_id,total:a.data.categories[r].total,background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===2){const o=this.getBestPlaysUrl({season:s.season,game:s.game});if(this.getIsSameScenario(2,o))return;a=await i.get(o);for(let r=0;r<a.data.categories.length;r++){this.playerPhoto=!1;const l=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.player_in_action.length),d=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_categories.length);t={player_action:a.data.categories[r].info_thumbnails.images.player_in_action[l]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.player_in_action[l]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_categories[d],color:a.data.categories[r].info_thumbnails.colors.background_color,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+a.data.categories[r].info_thumbnails.team_logo,player_name:a.data.categories[r].category_name,season_id:s.season,colorfont:a.data.categories[r].info_thumbnails.colors.font_color,player_id:s.player,team_id:a.data.categories[r].info_thumbnails.colors.team_id,category:a.data.categories[r].categories,total:a.data.categories[r].total,background_card:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png"},e.push(t)}}if(this.type===3){if(this.playerPhoto=!1,this.awaitForBestPlaysBySeasonAndGame&&!this.bestPlaysBySeasonAndGameResponse)return;const o=this.getBestPlaysUrl({season:s.season,game:s.game});if(this.getIsSameScenario(3,o))return;a=this.awaitForBestPlaysBySeasonAndGame?this.bestPlaysBySeasonAndGameResponse:await i.get(o),this.playVideosPrivileges&&(this.playVideosPrivileges.canPrivilegesTeamPlayVideos?a.data.games[0].players=a.data.games[0].players.filter(r=>r.team_id==this.playVideosPrivileges.seasonAndPrivileges.teamId):a.data.games[0].players=[]);for(let r=0;r<a.data.games[0].players.length;r++){const l=Math.floor(Math.random()*a.data.games[0].players[r].info_thumbnails.images.background_player_in_action.length),d=Math.floor(Math.random()*a.data.games[0].players[r].info_thumbnails.images.player_in_action.length);t={colorbackgroundhome:a.data.games[0].players[r].info_thumbnails.colors.background_color,colorbackgroundaway:"",nameplayer:a.data.games[0].players[r].player_name,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.games[0].players[r].info_thumbnails.images.background_player_in_action[l],namecategory:"RESUMEN",namehometeam:"",nameawayteam:"",category:0,colorfont:a.data.games[0].players[r].info_thumbnails.colors.font_color,team_id:a.data.games[0].players[r].team_id,player_id:a.data.games[0].players[r].player_id,game_id:a.data.games[0].game_id,has_mxm:a.data.games[0].has_mxm,season_id:a.data.season_id,logohome:a.data.games[0].players[r].team_logo,photoprofile:a.data.games[0].players[r].info_thumbnails.images.player_in_action[d]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.games[0].players[r].info_thumbnails.images.player_in_action[d]:"https://az755631.vo.msecnd.net/players-profile/"+a.data.games[0].players[r].player_id+".png",logoaway:"",scoreaway:"",scorehome:""},e.push(t)}}if(this.type===4){if(this.awaitForSpecificsPlaysBySeason&&!this.specificsPlaysBySeasonResponse)return;this.playerPhoto=!1;const o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/specifics-plays/seasons/"+s.season+"/games/"+s.game;if(this.getIsSameScenario(4,o))return;a=this.awaitForSpecificsPlaysBySeason?this.specificsPlaysBySeasonResponse:await i.get(o);for(let r=0;r<a.data.home_team.categories.length;r++){const l=Math.floor(Math.random()*a.data.home_team.categories[r].info_thumbnails.images.background_default_teams.length);t={game_id:a.data.game_id,has_mxm:a.data.has_mxm,season_id:a.data.season_id,team_id:a.data.home_team.team_id,category:a.data.home_team.categories[r].categories.concat(a.data.home_team.categories[r].rival_categories),background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.home_team.categories[r].info_thumbnails.images.background_default_categories[l],player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.home_team.categories[r].info_thumbnails.images.background_default_categories[l],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.home_team.team_id+".png",color:a.data.home_team.categories[r].info_thumbnails.colors.background_color,colorfont:a.data.home_team.categories[r].info_thumbnails.colors.font_color,player_name:a.data.home_team.categories[r].category_name,total:a.data.home_team.categories[r].total,team_name:"Local",background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.home_team.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===5){if(this.awaitForSpecificsPlaysBySeason&&!this.specificsPlaysBySeasonResponse)return;this.playerPhoto=!1;const o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/specifics-plays/seasons/"+s.season+"/games/"+s.game;if(this.getIsSameScenario(5,o))return;a=this.awaitForSpecificsPlaysBySeason?this.specificsPlaysBySeasonResponse:await i.get(o);for(let r=0;r<a.data.visiting_team.categories.length;r++){const l=Math.floor(Math.random()*a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories.length);t={game_id:a.data.game_id,has_mxm:a.data.has_mxm,season_id:a.data.season_id,team_id:a.data.visiting_team.team_id,category:a.data.visiting_team.categories[r].categories.concat(a.data.visiting_team.categories[r].rival_categories),background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories[l],player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories[l],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.visiting_team.team_id+".png",team_name:"Away",color:a.data.visiting_team.categories[r].info_thumbnails.colors.background_color,colorfont:a.data.visiting_team.categories[r].info_thumbnails.colors.font_color,player_name:a.data.visiting_team.categories[r].category_name,total:a.data.visiting_team.categories[r].total,background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.visiting_team.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===6){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(6,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===7){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(7,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===8){const o=this.getBestPlaysUrl({season:s.season,player:s.player,category:s.category});if(this.getIsSameScenario(8,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,player_id:a.data.player_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+a.data.best_plays[r].info_thumbnails.player_logo,hometeamacronym:a.data.best_plays[r].home_team_acronym,visitingteamacronym:a.data.best_plays[r].away_team_acronym,seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===9){const o=this.getBestPlaysUrl({season:s.season,player:s.player,category:s.category});if(this.getIsSameScenario(9,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,player_id:a.data.player_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+a.data.best_plays[r].info_thumbnails.player_logo,score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===10){const o="https://ws8d8ye2ii.execute-api.us-west-2.amazonaws.com/prod/v4/seasonsByTeam/"+s.team;if(this.getIsSameScenario(10,o))return;const r=await i.get(o);for(let l=0;l<r.data.seasons[s.season].games.length;l++){const d=Math.floor(Math.random()*r.data.seasons[s.season].games[l].info_thumbnails.images.background_default_games.length);t={photo_profile:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].visiting_team+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].home_team+".png",player_name:r.data.seasons[s.season].games[l].home_team_acronym+" "+r.data.seasons[s.season].games[l].home_team_score+" : "+r.data.seasons[s.season].games[l].visiting_team_score+" "+r.data.seasons[s.season].games[l].visiting_team_acronym,team_id:r.data.seasons[s.season].games[l].game_id,team_id_b:r.data.seasons[s.season].games[l].home_team,season_id:r.data.seasons[s.season].games[l].season_id,name:"",category:0,game_id:r.data.seasons[s.season].games[l].game_id,has_mxm:r.data.seasons[s.season].games[l].has_mxm,seasonname:r.data.seasons[s.season].name,match:r.data.seasons[s.season].games[l].matchday_name.replace("Matchday","Jor"),score:r.data.seasons[s.season].games[l].home_team_score+" : "+r.data.seasons[s.season].games[l].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.seasons[s.season].games[l].info_thumbnails.images.background_default_games[d],backgroundhome:r.data.seasons[s.season].games[l].info_thumbnails.home_colors.background_color,backgroundaway:r.data.seasons[s.season].games[l].info_thumbnails.away_colors.background_color,colorfont_home:r.data.best_plays[l].info_thumbnails.home_colors.font_color,colorfont_away:r.data.best_plays[l].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].visiting_team+".png",total:r.data.seasons[s.season].games[l].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+r.data.seasons[s.season].games[l].home_team+"_"+r.data.seasons[s.season].games[l].season_id+"_r1.jpg"},e.push(t)}}if(this.type===11){const o="https://uof4tt5l46.execute-api.us-west-2.amazonaws.com/prod/v3/playerInfo/"+s.season+"/"+s.player;if(this.getIsSameScenario(11,o))return;const r=await i.get(o);for(let l=0;l<r.data.seasons[s.season].games_played.length;l++)t={has_mxm:r.data.seasons[s.season].games_played[l].has_mxm,category:0,player_id:s.player,team_id:r.data.team_id,game_id:r.data.seasons[s.season].games_played[l].game_id,position_id:r.data.position_id,color:r.data.info_thumbnails.colors.background_color,photo_profile:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.info_thumbnails.images.player_in_action[0],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].home_team+".png",player_name:r.data.seasons[s.season].games_played[l].home_team_acronym+" "+r.data.seasons[s.season].games_played[l].home_team_score+" : "+r.data.seasons[s.season].games_played[l].visiting_team_score+" "+r.data.seasons[s.season].games_played[l].visiting_team_acronym,team_id_b:r.data.seasons[s.season].games_played[l].home_team,season_id:r.data.seasons[s.season].games_played[l].season_id,name:r.data.seasons[s.season].games_played[l].player_name,seasonname:r.data.seasons[s.season].name,match:r.data.seasons[s.season].games_played[l].matchday_name.replace("Matchday","Jor"),scorehome:r.data.seasons[s.season].games_played[l].home_team_score,scoreaway:r.data.seasons[s.season].games_played[l].visiting_team_score,hometeamacronym:r.data.seasons[s.season].games_played[l].home_team_acronym,visitingteamacronym:r.data.seasons[s.season].games_played[l].visiting_team_acronym,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:r.data.seasons[s.season].games_played[l].info_thumbnails.home_colors.background_color,backgroundaway:r.data.seasons[s.season].games_played[l].info_thumbnails.away_colors.background_color,colorfont_home:r.data.seasons[s.season].games_played[l].info_thumbnails.home_colors.font_color,colorfont_away:r.data.seasons[s.season].games_played[l].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].visiting_team+".png",total:r.data.seasons[s.season].games_played[l].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+r.data.seasons[s.season].games_played[l].home_team+"_"+r.data.seasons[s.season].games_played[l].season_id+"_r1.jpg"},e.push(t)}if(this.type===12){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(12,o))return;const r=await i.get(o);for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1]},e.push(t)}if(this.type===13){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(13,o))return;const r=await i.get(o);for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1]},e.push(t)}if(this.type===14&&(e=[],s.season)){if(this.lastseason!==s.season){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(14,o))return;const r=await i.get(o);this.flagGames=[],this.arrayMatchdays=[];for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)r.data[l].best_plays[d].score[0]==0&&r.data[l].best_plays[d].score[1]==0||(t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,plays_status:r.data[l].best_plays[d].plays_status,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,date_time:new Date(r.data[l].best_plays[d].date_time_utc).valueOf(),colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1],matchday_id:r.data[l].best_plays[d].matchday_id},this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]?this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id)):(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]=[],this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id))));e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((l,d)=>d.date_time-l.date_time):[]}else e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((o,r)=>r.date_time-o.date_time):[];this.lastseason=s.season}if(this.type===15&&(e=[],s.season)){if(this.lastseason!==s.season){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(15,o))return;const r=await i.get(o);this.flagGames=[],this.arrayMatchdays=[];for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)r.data[l].best_plays[d].score[0]==0&&r.data[l].best_plays[d].score[1]==0||r.data[l].best_plays[d].home_team!=s.team&&r.data[l].best_plays[d].visiting_team!=s.team||(t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,plays_status:r.data[l].best_plays[d].plays_status,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,date_time:new Date(r.data[l].best_plays[d].date_time_utc).valueOf(),colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1],matchday_id:r.data[l].best_plays[d].matchday_id},this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]?this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id)):(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]=[],this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id))));e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((l,d)=>d.date_time-l.date_time):[]}else e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((o,r)=>r.date_time-o.date_time):[];this.lastseason=s.season}if(this.type===16){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(16,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)this.viewType==2&&a.data.best_plays[r].home_team==s.team&&(t={has_mxm:a.data.best_plays[r].has_mxm,category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==1&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==3&&a.data.best_plays[r].visiting_team==s.team&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t))}if(this.type===17){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(17,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)this.viewType==2&&a.data.best_plays[r].home_team==s.team&&(t={has_mxm:a.data.best_plays[r].has_mxm,category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==1&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==3&&a.data.best_plays[r].visiting_team==s.team&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t))}this.printData=e}},obtenerNombreCompletoFecha(s){if(s){const e=new Date(s),t=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"][e.getUTCDay()],a=e.getUTCDate(),i=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][e.getUTCMonth()];return`${t} ${a} de ${i}`}else return""}},async created(){}},Jm=()=>{n.useCssVars(s=>({"4f699db7":s.backgroundColor}))},Xm=Hr.setup;Hr.setup=Xm?(s,e)=>(Jm(),Xm(s,e)):Jm;function J3(s,e,t,a,i,o){const r=n.resolveComponent("GSCThumbnailSummaryPlayer"),l=n.resolveComponent("GSCThumbnailCategoryTeam"),d=n.resolveComponent("GSCThumbnailCategoryTeamAwayLive"),c=n.resolveComponent("GSCSlider"),h=n.resolveComponent("GSCThumbnailCategory"),u=n.resolveComponent("GSCThumbnailCategoryTeamAway"),f=n.resolveComponent("GSCThumbnailHighlightGamePlayer"),p=n.resolveComponent("GSCThumbnailHighlightGameHistoric");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(s.$style.ptg),ref:"ptgDiv"},[n.createElementVNode("div",{class:n.normalizeClass(o.ptgtitleClass)},n.toDisplayString(t.title),3),t.receiveData?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t.information.length>0?(n.openBlock(),n.createBlock(c,{key:0,backgroundColor:t.backgroundColor,pxScroll:t.pxScroll,arrows:t.arrows,arrowsScrollHide:t.arrowsScrollHide,arrowsHideOnNoScroll:t.arrowsHideOnNoScroll,arrowsColor:t.arrowsColor,arrowsHeight:t.arrowsWidth,arrowsWidth:t.arrowsWidth,arrowsPadding:t.arrowsPadding,arrowsMargin:t.arrowsMargin,arrowsRadius:t.arrowsRadius,arrowsBorder:t.arrowsBorder,arrowsBackground:t.arrowsBackground,arrowsContainerBgL:t.arrowsContainerBgL,arrowsContainerBgR:t.arrowsContainerBgR,scrollColor:t.scrollColor,arrowsPosition:t.arrowsPosition,height:t.height},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.information,(m,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(g==0?"margin-left: 0px !important; color: white;":"")},[t.type==3e3?(n.openBlock(),n.createBlock(r,{key:0,type:"player","color-background-home":m.colorbackgroundhome,"color-background-away":m.colorbackgroundaway,"name-player":m.nameplayer,"type-img":0,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.namehometeam,"name-away-team":m.nameawayteam,"name-category":"RESUMEN","logo-away":m.logoaway,"logo-home":m.logohome,"color-font":m.colorfont,"score-home":m.scorehome,"photo-profile":m.photoprofile,"score-away":m.logoaway,"type-style":"summary"},null,8,["color-background-home","color-background-away","name-player","onOnclickPlayVideos","background","name-home-team","name-away-team","logo-away","logo-home","color-font","score-home","photo-profile","score-away"])):n.createCommentVNode("",!0),t.type==4e3?(n.openBlock(),n.createBlock(l,{key:1,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0),t.type==5e3?(n.openBlock(),n.createBlock(d,{key:2,type:"team","name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-away":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["name-team","color-background-away","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0)],6))),128))]),_:1},8,["backgroundColor","pxScroll","arrows","arrowsScrollHide","arrowsHideOnNoScroll","arrowsColor","arrowsHeight","arrowsWidth","arrowsPadding","arrowsMargin","arrowsRadius","arrowsBorder","arrowsBackground","arrowsContainerBgL","arrowsContainerBgR","scrollColor","arrowsPosition","height"])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[i.printData.length>0?(n.openBlock(),n.createBlock(c,{key:0,backgroundColor:t.backgroundColor,pxScroll:t.pxScroll,arrows:t.arrows,arrowsScrollHide:t.arrowsScrollHide,arrowsHideOnNoScroll:t.arrowsHideOnNoScroll,arrowsColor:t.arrowsColor,arrowsHeight:t.arrowsWidth,arrowsWidth:t.arrowsWidth,arrowsPadding:t.arrowsPadding,arrowsMargin:t.arrowsMargin,arrowsRadius:t.arrowsRadius,arrowsBorder:t.arrowsBorder,arrowsBackground:t.arrowsBackground,arrowsContainerBgL:t.arrowsContainerBgL,arrowsContainerBgR:t.arrowsContainerBgR,scrollColor:t.scrollColor,arrowsPosition:t.arrowsPosition,height:t.height},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.printData,(m,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(g==0?"margin-left: 0px !important; color: white;":"")},[t.type==2?(n.openBlock(),n.createBlock(h,{key:0,"color-background-home":m.color,"name-player":t.data.player_name,"type-img":"0",background:m.background_action,"name-category":m.player_name,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"photo-profile":m.player_action},null,8,["color-background-home","name-player","background","name-category","logo-home","onOnclickPlayVideos","photo-profile"])):t.type==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[m.total>0?(n.openBlock(),n.createBlock(l,{key:0,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0)],64)):t.type==4?(n.openBlock(),n.createBlock(l,{key:2,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):t.type==5?(n.openBlock(),n.createBlock(u,{key:3,type:"team","name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-away":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["name-team","color-background-away","logo-home","onOnclickPlayVideos","background","name-category"])):t.type==0?(n.openBlock(),n.createBlock(f,{key:4,items:m,type:2,"name-category":"TODAS SUS JUGADAS","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2,isAllPlays:!0}),background:m.background,date:m.date,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname2},null,8,["items","color-background-home","color-background-away","color-font-home","color-font-away","logo-home","logo-away","onOnclickPlayVideos","background","date","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==6?(n.openBlock(),n.createBlock(p,{key:5,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"title-category":"GOLES","show-videos":t.showVideos,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3,categories:i.goalCategories}),matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","show-videos","onOnclickPlayVideos","matchday","season-name","score"])):t.type==7||t.type==16?(n.openBlock(),n.createBlock(p,{key:6,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"show-videos":t.showVideos,"title-category":"RESUMEN",onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3,categories:i.resumeCategories}),matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","show-videos","onOnclickPlayVideos","matchday","season-name","score"])):t.type==8?(n.openBlock(),n.createBlock(f,{key:7,items:m,type:2,"name-category":"RESUMEN","color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-font-home","color-font-away","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==9?(n.openBlock(),n.createBlock(f,{key:8,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"logo-away":m.logoaway,background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","onOnclickPlayVideos","logo-away","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==10?(n.openBlock(),n.createBlock(p,{key:9,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1}),background:m.background,"title-category":"RESUMEN",matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","matchday","season-name","score"])):t.type==11?(n.openBlock(),n.createBlock(f,{key:10,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","name-home-team","name-away-team","matchday","color-font-home","color-font-away","onOnclickPlayVideos","score-home","photo-profile","score-away","season-name"])):t.type==12?(n.openBlock(),n.createBlock(f,{key:11,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","color-font-home","color-font-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==13?(n.openBlock(),n.createBlock(f,{key:12,items:m,type:2,"name-category":"GOLES","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1,categories:i.goalCategories}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==14||t.type==15||t.type==17?(n.openBlock(),n.createBlock(f,{key:13,items:m,type:2,"show-videos":t.showVideos,"play-status":m.plays_status?m.plays_status:0,"name-category":"GOLES","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1,categories:i.goalCategories}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,showimg:!1,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","show-videos","play-status","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):(n.openBlock(),n.createBlock(r,{key:14,type:"player","color-background-home":m.colorbackgroundhome,"color-background-away":m.colorbackgroundaway,"name-player":m.nameplayer,"type-img":0,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.namehometeam,"name-away-team":m.nameawayteam,"name-category":"RESUMEN","logo-away":m.logoaway,"logo-home":m.logohome,"color-font":m.colorfont,"score-home":m.scorehome,"photo-profile":m.photoprofile,"score-away":m.logoaway,"type-style":"summary"},null,8,["color-background-home","color-background-away","name-player","onOnclickPlayVideos","background","name-home-team","name-away-team","logo-away","logo-home","color-font","score-home","photo-profile","score-away"]))],6))),128))]),_:1},8,["backgroundColor","pxScroll","arrows","arrowsScrollHide","arrowsHideOnNoScroll","arrowsColor","arrowsHeight","arrowsWidth","arrowsPadding","arrowsMargin","arrowsRadius","arrowsBorder","arrowsBackground","arrowsContainerBgL","arrowsContainerBgR","scrollColor","arrowsPosition","height"])):n.createCommentVNode("",!0)],64))],2)}const X3={name:"DiscoverVideos",components:{GscSwitchComponent:go,GSCPlayerTeamGame:rs(Hr,[["render",J3],["__cssModules",{$style:Y3}],["__scopeId","data-v-762f089f"]]),MatchDayPicker:Gh},props:{componentWidth:{type:Number,default:768},myTournament:{type:Number,default:1},videoType:{type:Number,default:1},isplayer:{type:Boolean,default:!1},team:{type:Number,default:0},player:{type:Number,default:0},user:{type:Object,default:()=>{}},nextRivalTeam:{type:Object,default:()=>{}},tournamentSelected:{type:Object,default:()=>({id:0})},defaultMatchDayKey:{type:String,default:""},isLeagueSelected:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},tournamentScheduleKeys:{type:Array,default:()=>[]},seasonSelected:{type:Object,default:()=>{}},defaultMediaPlayerSeason:{type:Number,default:0}},watch:{seasonSelected:{immediate:!0,deep:!1,async handler(){this.getDataGoals()}},tournamentSelected:{immediate:!0,deep:!1,async handler(s){this.myTournament!==s.id?this.currentTabMoreVideos="Goles":this.currentTabMoreVideos="Goles"}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},activeDropGoals:{handler(s){s&&(this.matchDayPickerKey+=1)},immediate:!0}},data(){return{token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/best-plays/seasons/",showVideos:!0,currentTabMoreVideos:"Resumen",currentMobileTab:"Descubre videos",mobileClass:!1,activeDropGoals:!1,matchdayActive:{},resumeCategory:1000001,goalsCategory:1255e3,resumeType:1,goalsType:2,matchDayPickerKey:0}},mounted(){this.mobileClass=window.innerWidth<768,window.addEventListener("resize",this.handleResize)},methods:{async getDataGoals(){try{this.seasonSelected&&this.seasonSelected.id&&(await ve.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id+"/categories/"+this.goalsCategory),this.showVideos=!0)}catch{this.showVideos=!1}},onChangeMatchDay(s){this.matchdayActive=s,this.$emit("change-match-day",s)},handleResize(){this.mobileClass=window.innerWidth<768},onOpenMedia(s,e){e&&(s.type=0),this.$emit("openmedia",s)},onClickOpenMedia(){let t=1,a=[],i=[],o=0,r=this.defaultMediaPlayerSeason||this.user.season,l=[],d=[12,55,"35_r","54_r"],c=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257],h=[55,324,323,608,39,774,802,52,53,40,54];!this.user.is_generic&&this.tournamentSelected.id===this.user.tournament?(r=this.seasonSelected.id,this.user.is_goalkeeper?(a=[this.user.player],l=h,t=2):this.user.is_player?(i=[this.user.player],l=c,t=2):(o=this.user.team,l=d,t=3)):(l=d,t=1);const u={type:0,seasonId:r,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:t,gameIds:null,playerIds:i,goalkeeperIds:a,categoryIds:l,teamId:o,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};this.$emit("openmedia",u)}}},Z3={key:0,class:"discover-videos",ref:"discoverVideosRef"},Q3={class:"title-and-button"},e6={class:"calendar-container"};function t6(s,e,t,a,i,o){const r=n.resolveComponent("GscSwitchComponent"),l=n.resolveComponent("MatchDayPicker"),d=n.resolveComponent("GSCPlayerTeamGame");return i.showVideos?(n.openBlock(),n.createElementBlock("div",Z3,[n.createElementVNode("div",Q3,[n.createElementVNode("div",{class:n.normalizeClass(t.componentWidth>900?"menu-container":"menu-container-movil")},[n.createElementVNode("div",{class:n.normalizeClass(t.componentWidth>768?"title-value":t.componentWidth>600?"title-value-tablet":t.componentWidth>400?"title-value-mobile":"title-value-mobilesm")}," Videos ",2)],2),!t.user.is_generic&&t.myTournament===t.tournamentSelected.id?(n.openBlock(),n.createBlock(r,{key:0,buttons:["Goles","Resumen","Proximo rival"],onInput:e[0]||(e[0]=c=>i.currentTabMoreVideos=c),background:"trasparent",height:"24px",width:t.componentWidth>768?"140px":t.componentWidth>600?"120px":t.componentWidth>400?"100px":"81px","font-size":t.componentWidth>768?"14px":t.componentWidth>600||t.componentWidth>400?"12px":"9.1px","font-family":"Poppins-Light",backgroundOptionActive:"transparent",borderWidth:"2px",type:2,arrow:!1,selectedOption:i.currentTabMoreVideos,onOpenmedia:o.onOpenMedia},null,8,["width","font-size","selectedOption","onOpenmedia"])):n.createCommentVNode("",!0)]),i.currentTabMoreVideos=="Goles"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",e6,[n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(l,{height:"48px","margin-top":"5px","disable-matchdays":!0,"match-days":t.tournamentScheduleKeys,"is-landing-mode":!1,"items-to-show":t.componentWidth>600?17:t.componentWidth>400?13:9,"items-to-scroll":t.componentWidth>600?8:t.componentWidth>400?12:9,"default-match-day-key":t.defaultMatchDayKey,key:i.matchDayPickerKey,onChangeMatchDay:o.onChangeMatchDay},null,8,["match-days","items-to-show","items-to-scroll","default-match-day-key","onChangeMatchDay"]))]),n.createVNode(d,{style:{"margin-top":"-30px"},type:14,data:{season:t.seasonSelected.id,category:i.goalsCategory},width:"100%","matchday-view":Object.keys(i.matchdayActive).length>0?i.matchdayActive.matchDayId:1,backgroundColor:"transparent",title:"",onOpenmedia:o.onOpenMedia},null,8,["data","matchday-view","onOpenmedia"])],64)):n.createCommentVNode("",!0),i.currentTabMoreVideos=="Resumen"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.isplayer?(n.openBlock(),n.createBlock(d,{key:1,type:8,title:"",style:{"margin-top":"-30px"},backgroundColor:"transparent",data:{season:t.seasonSelected.id,player:t.player,category:1000001},width:"100%",onOpenmedia:e[3]||(e[3]=c=>o.onOpenMedia(c,!0))},null,8,["data"])):(n.openBlock(),n.createBlock(d,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"transparent",data:{season:t.seasonSelected.id,team:t.team,category:i.resumeCategory},width:"100%",onOpenmedia:e[2]||(e[2]=c=>o.onOpenMedia(c,!0))},null,8,["data"]))],64)):n.createCommentVNode("",!0),i.currentTabMoreVideos=="Proximo rival"?(n.openBlock(),n.createBlock(d,{key:2,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"transparent",data:{season:t.seasonSelected.id,team:t.nextRivalTeam.id,category:i.resumeCategory},width:"100%",onOpenmedia:e[4]||(e[4]=c=>o.onOpenMedia(c,!0))},null,8,["data"])):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0)}const s6=qe(X3,[["render",t6],["__scopeId","data-v-4af47259"]]),a6=["playId","league","season","gameId","playerName","refereeName","stadiumName","finalScore","scoreAtMomentOfPlay","gameDate","homeTeamName","homeTeamLogo","awayTeamName","awayTeamLogo","categoryId","categoryName","startTime","endTime","minuteOfPlay","momentOfPlay","videoUrl"];let Wr=null;function n6(){return Wr||(Wr=a6.reduce((s,e,t)=>(s[e]=t,s),{})),Wr}function i6(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Zm={exports:{}};(function(s,e){(function(t){var a=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(d,c,h){if(h=h||{},d=d.trim(),c=c.trim(),!c){if(!h.alwaysNormalize)return d;var u=l.parseURL(d);if(!u)throw new Error("Error trying to parse base URL.");return u.path=l.normalizePath(u.path),l.buildURLFromParts(u)}var f=l.parseURL(c);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return h.alwaysNormalize?(f.path=l.normalizePath(f.path),l.buildURLFromParts(f)):c;var p=l.parseURL(d);if(!p)throw new Error("Error trying to parse base URL.");if(!p.netLoc&&p.path&&p.path[0]!=="/"){var m=i.exec(p.path);p.netLoc=m[1],p.path=m[2]}p.netLoc&&!p.path&&(p.path="/");var g={scheme:p.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(g.netLoc=p.netLoc,f.path[0]!=="/"))if(!f.path)g.path=p.path,f.params||(g.params=p.params,f.query||(g.query=p.query));else{var y=p.path,b=y.substring(0,y.lastIndexOf("/")+1)+f.path;g.path=l.normalizePath(b)}return g.path===null&&(g.path=h.alwaysNormalize?l.normalizePath(f.path):f.path),l.buildURLFromParts(g)},parseURL:function(d){var c=a.exec(d);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(o,"");d.length!==(d=d.replace(r,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};s.exports=l})()})(Zm);var Kr=Zm.exports;function Qm(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,a)}return t}function Xe(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Qm(Object(t),!0).forEach(function(a){l6(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Qm(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}function o6(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var a=t.call(s,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function r6(s){var e=o6(s,"string");return typeof e=="symbol"?e:String(e)}function l6(s,e,t){return e=r6(e),e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Ge(){return Ge=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(s[a]=t[a])}return s},Ge.apply(this,arguments)}const ne=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},c6=Number.isSafeInteger||function(s){return typeof s=="number"&&Math.abs(s)<=d6},d6=Number.MAX_SAFE_INTEGER||9007199254740991;let w=function(s){return s.MEDIA_ATTACHING="hlsMediaAttaching",s.MEDIA_ATTACHED="hlsMediaAttached",s.MEDIA_DETACHING="hlsMediaDetaching",s.MEDIA_DETACHED="hlsMediaDetached",s.BUFFER_RESET="hlsBufferReset",s.BUFFER_CODECS="hlsBufferCodecs",s.BUFFER_CREATED="hlsBufferCreated",s.BUFFER_APPENDING="hlsBufferAppending",s.BUFFER_APPENDED="hlsBufferAppended",s.BUFFER_EOS="hlsBufferEos",s.BUFFER_FLUSHING="hlsBufferFlushing",s.BUFFER_FLUSHED="hlsBufferFlushed",s.MANIFEST_LOADING="hlsManifestLoading",s.MANIFEST_LOADED="hlsManifestLoaded",s.MANIFEST_PARSED="hlsManifestParsed",s.LEVEL_SWITCHING="hlsLevelSwitching",s.LEVEL_SWITCHED="hlsLevelSwitched",s.LEVEL_LOADING="hlsLevelLoading",s.LEVEL_LOADED="hlsLevelLoaded",s.LEVEL_UPDATED="hlsLevelUpdated",s.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",s.LEVELS_UPDATED="hlsLevelsUpdated",s.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",s.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",s.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",s.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",s.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",s.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",s.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",s.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",s.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",s.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",s.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",s.CUES_PARSED="hlsCuesParsed",s.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",s.INIT_PTS_FOUND="hlsInitPtsFound",s.FRAG_LOADING="hlsFragLoading",s.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",s.FRAG_LOADED="hlsFragLoaded",s.FRAG_DECRYPTED="hlsFragDecrypted",s.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",s.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",s.FRAG_PARSING_METADATA="hlsFragParsingMetadata",s.FRAG_PARSED="hlsFragParsed",s.FRAG_BUFFERED="hlsFragBuffered",s.FRAG_CHANGED="hlsFragChanged",s.FPS_DROP="hlsFpsDrop",s.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",s.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",s.ERROR="hlsError",s.DESTROYING="hlsDestroying",s.KEY_LOADING="hlsKeyLoading",s.KEY_LOADED="hlsKeyLoaded",s.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",s.BACK_BUFFER_REACHED="hlsBackBufferReached",s.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",s}({}),fe=function(s){return s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError",s}({}),N=function(s){return s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",s.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",s.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",s.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",s.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_PARSING_ERROR="levelParsingError",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.FRAG_GAP="fragGap",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown",s}({});const _s=function(){},qr={trace:_s,debug:_s,log:_s,warn:_s,info:_s,error:_s};let wa=qr;function h6(s){const e=self.console[s];return e?e.bind(self.console,`[${s}] >`):_s}function u6(s,...e){e.forEach(function(t){wa[t]=s[t]?s[t].bind(s):h6(t)})}function m6(s,e){if(typeof console=="object"&&s===!0||typeof s=="object"){u6(s,"debug","log","info","warn","error");try{wa.log(`Debug logs enabled for "${e}" in hls.js version 1.5.15`)}catch{wa=qr}}else wa=qr}const A=wa,f6=/^(\d+)x(\d+)$/,ef=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Oe{constructor(e){typeof e=="string"&&(e=Oe.parseAttrList(e)),Ge(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const a=new Uint8Array(t.length/2);for(let i=0;i<t.length/2;i++)a[i]=parseInt(t.slice(i*2,i*2+2),16);return a}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const a=this[e];return a?parseFloat(a):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=f6.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const a={},i='"';for(ef.lastIndex=0;(t=ef.exec(e))!==null;){let o=t[2];o.indexOf(i)===0&&o.lastIndexOf(i)===o.length-1&&(o=o.slice(1,-1));const r=t[1].trim();a[r]=o}return a}}function p6(s){return s!=="ID"&&s!=="CLASS"&&s!=="START-DATE"&&s!=="DURATION"&&s!=="END-DATE"&&s!=="END-ON-NEXT"}function g6(s){return s==="SCTE35-OUT"||s==="SCTE35-IN"}class tf{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const a=t.attr;for(const i in a)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==a[i]){A.warn(`DATERANGE tag attribute: "${i}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=i;break}e=Ge(new Oe({}),a,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const a=new Date(this.attr["END-DATE"]);ne(a.getTime())&&(this._endDate=a)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(ne(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&ne(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class $n{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Re={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class sf{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Re.AUDIO]:null,[Re.VIDEO]:null,[Re.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const a=e.split("@",2);let i;a.length===1?i=(t==null?void 0:t.byteRangeEndOffset)||0:i=parseInt(a[1]),this._byteRange=[i,parseInt(a[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Kr.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Yr extends sf{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new $n,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const a=Object.keys(this.levelkeys);if(a.length===1)return this._decryptdata=this.levelkeys[a[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!ne(this.programDateTime))return null;const e=ne(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),a=t.length;if(a>1||a===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,a,i,o,r=!1){const{elementaryStreams:l}=this,d=l[e];if(!d){l[e]={startPTS:t,endPTS:a,startDTS:i,endDTS:o,partial:r};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,a),d.startDTS=Math.min(d.startDTS,i),d.endDTS=Math.max(d.endDTS,o)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Re.AUDIO]=null,e[Re.VIDEO]=null,e[Re.AUDIOVIDEO]=null}}class y6 extends sf{constructor(e,t,a,i,o){super(a),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new $n,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;const r=e.enumeratedString("BYTERANGE");r&&this.setByteRange(r,o),o&&(this.fragOffset=o.fragOffset+o.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const b6=10;class S6{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,a=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!a||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?ne(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||b6}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Jr(s){return Uint8Array.from(atob(s),e=>e.charCodeAt(0))}function w6(s){const e=Xr(s).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function _6(s){const e=function(a,i,o){const r=a[i];a[i]=a[o],a[o]=r};e(s,0,3),e(s,1,2),e(s,4,5),e(s,6,7)}function k6(s){const e=s.split(":");let t=null;if(e[0]==="data"&&e.length===2){const a=e[1].split(";"),i=a[a.length-1].split(",");if(i.length===2){const o=i[0]==="base64",r=i[1];o?(a.splice(-1,1),t=Jr(r)):t=w6(r)}}return t}function Xr(s){return Uint8Array.from(unescape(encodeURIComponent(s)),e=>e.charCodeAt(0))}const Ms=typeof self<"u"?self:void 0;var Ne={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ut={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function af(s){switch(s){case ut.FAIRPLAY:return Ne.FAIRPLAY;case ut.PLAYREADY:return Ne.PLAYREADY;case ut.WIDEVINE:return Ne.WIDEVINE;case ut.CLEARKEY:return Ne.CLEARKEY}}var _a={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function nf(s){if(s===_a.WIDEVINE)return Ne.WIDEVINE;if(s===_a.PLAYREADY)return Ne.PLAYREADY;if(s===_a.CENC||s===_a.CLEARKEY)return Ne.CLEARKEY}function of(s){switch(s){case Ne.FAIRPLAY:return ut.FAIRPLAY;case Ne.PLAYREADY:return ut.PLAYREADY;case Ne.WIDEVINE:return ut.WIDEVINE;case Ne.CLEARKEY:return ut.CLEARKEY}}function Zr(s){const{drmSystems:e,widevineLicenseUrl:t}=s,a=e?[Ne.FAIRPLAY,Ne.WIDEVINE,Ne.PLAYREADY,Ne.CLEARKEY].filter(i=>!!e[i]):[];return!a[Ne.WIDEVINE]&&t&&a.push(Ne.WIDEVINE),a}const rf=function(s){return Ms!=null&&(s=Ms.navigator)!=null&&s.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function E6(s,e,t,a){let i;switch(s){case Ne.FAIRPLAY:i=["cenc","sinf"];break;case Ne.WIDEVINE:case Ne.PLAYREADY:i=["cenc"];break;case Ne.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${s}`)}return T6(i,e,t,a)}function T6(s,e,t,a){return[{initDataTypes:s,persistentState:a.persistentState||"optional",distinctiveIdentifier:a.distinctiveIdentifier||"optional",sessionTypes:a.sessionTypes||[a.sessionType||"temporary"],audioCapabilities:e.map(o=>({contentType:`audio/mp4; codecs="${o}"`,robustness:a.audioRobustness||"",encryptionScheme:a.audioEncryptionScheme||null})),videoCapabilities:t.map(o=>({contentType:`video/mp4; codecs="${o}"`,robustness:a.videoRobustness||"",encryptionScheme:a.videoEncryptionScheme||null}))}]}function ks(s,e,t){return Uint8Array.prototype.slice?s.slice(e,t):new Uint8Array(Array.prototype.slice.call(s,e,t))}const Qr=(s,e)=>e+10<=s.length&&s[e]===73&&s[e+1]===68&&s[e+2]===51&&s[e+3]<255&&s[e+4]<255&&s[e+6]<128&&s[e+7]<128&&s[e+8]<128&&s[e+9]<128,lf=(s,e)=>e+10<=s.length&&s[e]===51&&s[e+1]===68&&s[e+2]===73&&s[e+3]<255&&s[e+4]<255&&s[e+6]<128&&s[e+7]<128&&s[e+8]<128&&s[e+9]<128,ka=(s,e)=>{const t=e;let a=0;for(;Qr(s,e);){a+=10;const i=Vn(s,e+6);a+=i,lf(s,e+10)&&(a+=10),e+=a}if(a>0)return s.subarray(t,t+a)},Vn=(s,e)=>{let t=0;return t=(s[e]&127)<<21,t|=(s[e+1]&127)<<14,t|=(s[e+2]&127)<<7,t|=s[e+3]&127,t},C6=(s,e)=>Qr(s,e)&&Vn(s,e+6)+10<=s.length-e,el=s=>{const e=df(s);for(let t=0;t<e.length;t++){const a=e[t];if(cf(a))return R6(a)}},cf=s=>s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp",x6=s=>{const e=String.fromCharCode(s[0],s[1],s[2],s[3]),t=Vn(s,4),a=10;return{type:e,size:t,data:s.subarray(a,a+t)}},df=s=>{let e=0;const t=[];for(;Qr(s,e);){const a=Vn(s,e+6);e+=10;const i=e+a;for(;e+8<i;){const o=x6(s.subarray(e)),r=v6(o);r&&t.push(r),e+=o.size+10}lf(s,e)&&(e+=10)}return t},v6=s=>s.type==="PRIV"?A6(s):s.type[0]==="W"?I6(s):L6(s),A6=s=>{if(s.size<2)return;const e=Ut(s.data,!0),t=new Uint8Array(s.data.subarray(e.length+1));return{key:s.type,info:e,data:t.buffer}},L6=s=>{if(s.size<2)return;if(s.type==="TXXX"){let t=1;const a=Ut(s.data.subarray(t),!0);t+=a.length+1;const i=Ut(s.data.subarray(t));return{key:s.type,info:a,data:i}}const e=Ut(s.data.subarray(1));return{key:s.type,data:e}},I6=s=>{if(s.type==="WXXX"){if(s.size<2)return;let t=1;const a=Ut(s.data.subarray(t),!0);t+=a.length+1;const i=Ut(s.data.subarray(t));return{key:s.type,info:a,data:i}}const e=Ut(s.data);return{key:s.type,data:e}},R6=s=>{if(s.data.byteLength===8){const e=new Uint8Array(s.data),t=e[3]&1;let a=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return a/=45,t&&(a+=4772185884e-2),Math.round(a)}},Ut=(s,e=!1)=>{const t=B6();if(t){const c=t.decode(s);if(e){const h=c.indexOf("\0");return h!==-1?c.substring(0,h):c}return c.replace(/\0/g,"")}const a=s.length;let i,o,r,l="",d=0;for(;d<a;){if(i=s[d++],i===0&&e)return l;if(i===0||i===3)continue;switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(i);break;case 12:case 13:o=s[d++],l+=String.fromCharCode((i&31)<<6|o&63);break;case 14:o=s[d++],r=s[d++],l+=String.fromCharCode((i&15)<<12|(o&63)<<6|(r&63)<<0);break}}return l};let tl;function B6(){if(!navigator.userAgent.includes("PlayStation 4"))return!tl&&typeof self.TextDecoder<"u"&&(tl=new self.TextDecoder("utf-8")),tl}const zt={hexDump:function(s){let e="";for(let t=0;t<s.length;t++){let a=s[t].toString(16);a.length<2&&(a="0"+a),e+=a}return e}},Un=Math.pow(2,32)-1,N6=[].push,hf={video:1,audio:2,id3:3,text:4};function Ke(s){return String.fromCharCode.apply(null,s)}function uf(s,e){const t=s[e]<<8|s[e+1];return t<0?65536+t:t}function re(s,e){const t=ff(s,e);return t<0?4294967296+t:t}function mf(s,e){let t=re(s,e);return t*=Math.pow(2,32),t+=re(s,e+4),t}function ff(s,e){return s[e]<<24|s[e+1]<<16|s[e+2]<<8|s[e+3]}function sl(s,e,t){s[e]=t>>24,s[e+1]=t>>16&255,s[e+2]=t>>8&255,s[e+3]=t&255}function D6(s){const e=s.byteLength;for(let t=0;t<e;){const a=re(s,t);if(a>8&&s[t+4]===109&&s[t+5]===111&&s[t+6]===111&&s[t+7]===102)return!0;t=a>1?t+a:e}return!1}function ye(s,e){const t=[];if(!e.length)return t;const a=s.byteLength;for(let i=0;i<a;){const o=re(s,i),r=Ke(s.subarray(i+4,i+8)),l=o>1?i+o:a;if(r===e[0])if(e.length===1)t.push(s.subarray(i+8,l));else{const d=ye(s.subarray(i+8,l),e.slice(1));d.length&&N6.apply(t,d)}i=l}return t}function P6(s){const e=[],t=s[0];let a=8;const i=re(s,a);a+=4;let o=0,r=0;t===0?(o=re(s,a),r=re(s,a+4),a+=8):(o=mf(s,a),r=mf(s,a+8),a+=16),a+=2;let l=s.length+r;const d=uf(s,a);a+=2;for(let c=0;c<d;c++){let h=a;const u=re(s,h);h+=4;const f=u&2147483647;if((u&2147483648)>>>31===1)return A.warn("SIDX has hierarchical references (not supported)"),null;const m=re(s,h);h+=4,e.push({referenceSize:f,subsegmentDuration:m,info:{duration:m/i,start:l,end:l+f-1}}),l+=f,h+=4,a=h}return{earliestPresentationTime:o,timescale:i,version:t,referencesCount:d,references:e}}function pf(s){const e=[],t=ye(s,["moov","trak"]);for(let i=0;i<t.length;i++){const o=t[i],r=ye(o,["tkhd"])[0];if(r){let l=r[0];const d=re(r,l===0?12:20),c=ye(o,["mdia","mdhd"])[0];if(c){l=c[0];const h=re(c,l===0?12:20),u=ye(o,["mdia","hdlr"])[0];if(u){const f=Ke(u.subarray(8,12)),p={soun:Re.AUDIO,vide:Re.VIDEO}[f];if(p){const m=ye(o,["mdia","minf","stbl","stsd"])[0],g=O6(m);e[d]={timescale:h,type:p},e[p]=Xe({timescale:h,id:d},g)}}}}}return ye(s,["moov","mvex","trex"]).forEach(i=>{const o=re(i,4),r=e[o];r&&(r.default={duration:re(i,12),flags:re(i,20)})}),e}function O6(s){const e=s.subarray(8),t=e.subarray(86),a=Ke(e.subarray(4,8));let i=a;const o=a==="enca"||a==="encv";if(o){const l=ye(e,[a])[0].subarray(a==="enca"?28:78);ye(l,["sinf"]).forEach(c=>{const h=ye(c,["schm"])[0];if(h){const u=Ke(h.subarray(4,8));if(u==="cbcs"||u==="cenc"){const f=ye(c,["frma"])[0];f&&(i=Ke(f))}}})}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const r=ye(t,["avcC"])[0];i+="."+zn(r[1])+zn(r[2])+zn(r[3]);break}case"mp4a":{const r=ye(e,[a])[0],l=ye(r.subarray(28),["esds"])[0];if(l&&l.length>12){let d=4;if(l[d++]!==3)break;d=al(l,d),d+=2;const c=l[d++];if(c&128&&(d+=2),c&64&&(d+=l[d++]),l[d++]!==4)break;d=al(l,d);const h=l[d++];if(h===64)i+="."+zn(h);else break;if(d+=12,l[d++]!==5)break;d=al(l,d);const u=l[d++];let f=(u&248)>>3;f===31&&(f+=1+((u&7)<<3)+((l[d]&224)>>5)),i+="."+f}break}case"hvc1":case"hev1":{const r=ye(t,["hvcC"])[0],l=r[1],d=["","A","B","C"][l>>6],c=l&31,h=re(r,2),u=(l&32)>>5?"H":"L",f=r[12],p=r.subarray(6,12);i+="."+d+c,i+="."+h.toString(16).toUpperCase(),i+="."+u+f;let m="";for(let g=p.length;g--;){const y=p[g];(y||m)&&(m="."+y.toString(16).toUpperCase()+m)}i+=m;break}case"dvh1":case"dvhe":{const r=ye(t,["dvcC"])[0],l=r[2]>>1&127,d=r[2]<<5&32|r[3]>>3&31;i+="."+Gt(l)+"."+Gt(d);break}case"vp09":{const r=ye(t,["vpcC"])[0],l=r[4],d=r[5],c=r[6]>>4&15;i+="."+Gt(l)+"."+Gt(d)+"."+Gt(c);break}case"av01":{const r=ye(t,["av1C"])[0],l=r[1]>>>5,d=r[1]&31,c=r[2]>>>7?"H":"M",h=(r[2]&64)>>6,u=(r[2]&32)>>5,f=l===2&&h?u?12:10:h?10:8,p=(r[2]&16)>>4,m=(r[2]&8)>>3,g=(r[2]&4)>>2,y=r[2]&3;i+="."+l+"."+Gt(d)+c+"."+Gt(f)+"."+p+"."+m+g+y+"."+Gt(1)+"."+Gt(1)+"."+Gt(1)+"."+0;break}}return{codec:i,encrypted:o}}function al(s,e){const t=e+5;for(;s[e++]&128&&e<t;);return e}function zn(s){return("0"+s.toString(16).toUpperCase()).slice(-2)}function Gt(s){return(s<10?"0":"")+s}function F6(s,e){if(!s||!e)return s;const t=e.keyId;return t&&e.isCommonEncryption&&ye(s,["moov","trak"]).forEach(i=>{const r=ye(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=ye(r,["enca"]);const d=l.length>0;d||(l=ye(r,["encv"])),l.forEach(c=>{const h=d?c.subarray(28):c.subarray(78);ye(h,["sinf"]).forEach(f=>{const p=gf(f);if(p){const m=p.subarray(8,24);m.some(g=>g!==0)||(A.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${zt.hexDump(m)} -> ${zt.hexDump(t)}`),p.set(t,8))}})})}),s}function gf(s){const e=ye(s,["schm"])[0];if(e){const t=Ke(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ye(s,["schi","tenc"])[0]}return null}function M6(s,e){return ye(e,["moof","traf"]).reduce((t,a)=>{const i=ye(a,["tfdt"])[0],o=i[0],r=ye(a,["tfhd"]).reduce((l,d)=>{const c=re(d,4),h=s[c];if(h){let u=re(i,4);if(o===1){if(u===Un)return A.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;u*=Un+1,u+=re(i,8)}const f=h.timescale||9e4,p=u/f;if(ne(p)&&(l===null||p<l))return p}return l},null);return r!==null&&ne(r)&&(t===null||r<t)?r:t},null)}function $6(s,e){let t=0,a=0,i=0;const o=ye(s,["moof","traf"]);for(let r=0;r<o.length;r++){const l=o[r],d=ye(l,["tfhd"])[0],c=re(d,4),h=e[c];if(!h)continue;const u=h.default,f=re(d,0)|(u==null?void 0:u.flags);let p=u==null?void 0:u.duration;f&8&&(f&2?p=re(d,12):p=re(d,8));const m=h.timescale||9e4,g=ye(l,["trun"]);for(let y=0;y<g.length;y++){if(t=V6(g[y]),!t&&p){const b=re(g[y],4);t=p*b}h.type===Re.VIDEO?a+=t/m:h.type===Re.AUDIO&&(i+=t/m)}}if(a===0&&i===0){let r=1/0,l=0,d=0;const c=ye(s,["sidx"]);for(let h=0;h<c.length;h++){const u=P6(c[h]);if(u!=null&&u.references){r=Math.min(r,u.earliestPresentationTime/u.timescale);const f=u.references.reduce((p,m)=>p+m.info.duration||0,0);l=Math.max(l,f+u.earliestPresentationTime/u.timescale),d=l-r}}if(d&&ne(d))return d}return a||i}function V6(s){const e=re(s,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let a=0;const i=re(s,4);for(let o=0;o<i;o++){if(e&256){const r=re(s,t);a+=r,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return a}function U6(s,e,t){ye(e,["moof","traf"]).forEach(a=>{ye(a,["tfhd"]).forEach(i=>{const o=re(i,4),r=s[o];if(!r)return;const l=r.timescale||9e4;ye(a,["tfdt"]).forEach(d=>{const c=d[0],h=t*l;if(h){let u=re(d,4);if(c===0)u-=h,u=Math.max(u,0),sl(d,4,u);else{u*=Math.pow(2,32),u+=re(d,8),u-=h,u=Math.max(u,0);const f=Math.floor(u/(Un+1)),p=Math.floor(u%(Un+1));sl(d,4,f),sl(d,8,p)}}})})})}function z6(s){const e={valid:null,remainder:null},t=ye(s,["moof"]);if(t.length<2)return e.remainder=s,e;const a=t[t.length-1];return e.valid=ks(s,0,a.byteOffset-8),e.remainder=ks(s,a.byteOffset-8),e}function St(s,e){const t=new Uint8Array(s.length+e.length);return t.set(s),t.set(e,s.length),t}function yf(s,e){const t=[],a=e.samples,i=e.timescale,o=e.id;let r=!1;return ye(a,["moof"]).map(d=>{const c=d.byteOffset-8;ye(d,["traf"]).map(u=>{const f=ye(u,["tfdt"]).map(p=>{const m=p[0];let g=re(p,4);return m===1&&(g*=Math.pow(2,32),g+=re(p,8)),g/i})[0];return f!==void 0&&(s=f),ye(u,["tfhd"]).map(p=>{const m=re(p,4),g=re(p,0)&16777215,y=(g&1)!==0,b=(g&2)!==0,S=(g&8)!==0;let _=0;const C=(g&16)!==0;let E=0;const v=(g&32)!==0;let T=8;m===o&&(y&&(T+=8),b&&(T+=4),S&&(_=re(p,T),T+=4),C&&(E=re(p,T),T+=4),v&&(T+=4),e.type==="video"&&(r=G6(e.codec)),ye(u,["trun"]).map(B=>{const L=B[0],R=re(B,0)&16777215,$=(R&1)!==0;let K=0;const z=(R&4)!==0,ae=(R&256)!==0;let oe=0;const ie=(R&512)!==0;let ce=0;const de=(R&1024)!==0,Q=(R&2048)!==0;let q=0;const he=re(B,4);let J=8;$&&(K=re(B,J),J+=4),z&&(J+=4);let Z=K+c;for(let ue=0;ue<he;ue++){if(ae?(oe=re(B,J),J+=4):oe=_,ie?(ce=re(B,J),J+=4):ce=E,de&&(J+=4),Q&&(L===0?q=re(B,J):q=ff(B,J),J+=4),e.type===Re.VIDEO){let ge=0;for(;ge<ce;){const Ce=re(a,Z);if(Z+=4,j6(r,a[Z])){const se=a.subarray(Z,Z+Ce);bf(se,r?2:1,s+q/i,t)}Z+=Ce,ge+=Ce+4}}s+=oe/i}}))})})}),t}function G6(s){if(!s)return!1;const e=s.indexOf("."),t=e<0?s:s.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function j6(s,e){if(s){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function bf(s,e,t,a){const i=Sf(s);let o=0;o+=e;let r=0,l=0,d=0;for(;o<i.length;){r=0;do{if(o>=i.length)break;d=i[o++],r+=d}while(d===255);l=0;do{if(o>=i.length)break;d=i[o++],l+=d}while(d===255);const c=i.length-o;let h=o;if(l<c)o+=l;else if(l>c){A.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(r===4){if(i[h++]===181){const f=uf(i,h);if(h+=2,f===49){const p=re(i,h);if(h+=4,p===1195456820){const m=i[h++];if(m===3){const g=i[h++],y=31&g,b=64&g,S=b?2+y*3:0,_=new Uint8Array(S);if(b){_[0]=g;for(let C=1;C<S;C++)_[C]=i[h++]}a.push({type:m,payloadType:r,pts:t,bytes:_})}}}}}else if(r===5&&l>16){const u=[];for(let m=0;m<16;m++){const g=i[h++].toString(16);u.push(g.length==1?"0"+g:g),(m===3||m===5||m===7||m===9)&&u.push("-")}const f=l-16,p=new Uint8Array(f);for(let m=0;m<f;m++)p[m]=i[h++];a.push({payloadType:r,pts:t,uuid:u.join(""),userData:Ut(p),userDataBytes:p})}}}function Sf(s){const e=s.byteLength,t=[];let a=1;for(;a<e-2;)s[a]===0&&s[a+1]===0&&s[a+2]===3?(t.push(a+2),a+=2):a++;if(t.length===0)return s;const i=e-t.length,o=new Uint8Array(i);let r=0;for(a=0;a<i;r++,a++)r===t[0]&&(r++,t.shift()),o[a]=s[r];return o}function H6(s){const e=s[0];let t="",a="",i=0,o=0,r=0,l=0,d=0,c=0;if(e===0){for(;Ke(s.subarray(c,c+1))!=="\0";)t+=Ke(s.subarray(c,c+1)),c+=1;for(t+=Ke(s.subarray(c,c+1)),c+=1;Ke(s.subarray(c,c+1))!=="\0";)a+=Ke(s.subarray(c,c+1)),c+=1;a+=Ke(s.subarray(c,c+1)),c+=1,i=re(s,12),o=re(s,16),l=re(s,20),d=re(s,24),c=28}else if(e===1){c+=4,i=re(s,c),c+=4;const u=re(s,c);c+=4;const f=re(s,c);for(c+=4,r=2**32*u+f,c6(r)||(r=Number.MAX_SAFE_INTEGER,A.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=re(s,c),c+=4,d=re(s,c),c+=4;Ke(s.subarray(c,c+1))!=="\0";)t+=Ke(s.subarray(c,c+1)),c+=1;for(t+=Ke(s.subarray(c,c+1)),c+=1;Ke(s.subarray(c,c+1))!=="\0";)a+=Ke(s.subarray(c,c+1)),c+=1;a+=Ke(s.subarray(c,c+1)),c+=1}const h=s.subarray(c,s.byteLength);return{schemeIdUri:t,value:a,timeScale:i,presentationTime:r,presentationTimeDelta:o,eventDuration:l,id:d,payload:h}}function W6(s,...e){const t=e.length;let a=8,i=t;for(;i--;)a+=e[i].byteLength;const o=new Uint8Array(a);for(o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=a&255,o.set(s,4),i=0,a=8;i<t;i++)o.set(e[i],a),a+=e[i].byteLength;return o}function K6(s,e,t){if(s.byteLength!==16)throw new RangeError("Invalid system id");let a,i;a=0,i=new Uint8Array;let o;a>0?(o=new Uint8Array(4),e.length>0&&new DataView(o.buffer).setUint32(0,e.length,!1)):o=new Uint8Array;const r=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(r.buffer).setUint32(0,t.byteLength,!1),W6([112,115,115,104],new Uint8Array([a,0,0,0]),s,o,i,r,t||new Uint8Array)}function q6(s){const e=[];if(s instanceof ArrayBuffer){const t=s.byteLength;let a=0;for(;a+32<t;){const i=new DataView(s,a),o=Y6(i);e.push(o),a+=o.size}}return e}function Y6(s){const e=s.getUint32(0),t=s.byteOffset,a=s.byteLength;if(a<e)return{offset:t,size:a};if(s.getUint32(4)!==1886614376)return{offset:t,size:e};const o=s.getUint32(8)>>>24;if(o!==0&&o!==1)return{offset:t,size:e};const r=s.buffer,l=zt.hexDump(new Uint8Array(r,t+12,16)),d=s.getUint32(28);let c=null,h=null;if(o===0){if(e-32<d||d<22)return{offset:t,size:e};h=new Uint8Array(r,t+32,d)}else if(o===1){if(!d||a<t+32+d*16+16)return{offset:t,size:e};c=[];for(let u=0;u<d;u++)c.push(new Uint8Array(r,t+32+u*16,16))}return{version:o,systemId:l,kids:c,data:h,offset:t,size:e}}let Gn={};class Ea{static clearKeyUriToKeyIdMap(){Gn={}}constructor(e,t,a,i=[1],o=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=a,this.keyFormatVersions=i,this.iv=o,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ut.FAIRPLAY:case ut.WIDEVINE:case ut.PLAYREADY:case ut.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&A.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const a=J6(e);return new Ea(this.method,this.uri,"identity",this.keyFormatVersions,a)}const t=k6(this.uri);if(t)switch(this.keyFormat){case ut.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case ut.PLAYREADY:{const a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=K6(a,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),o=String.fromCharCode.apply(null,Array.from(i)),r=o.substring(o.indexOf("<"),o.length),c=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(c){const h=c.childNodes[0]?c.childNodes[0].nodeValue:c.getAttribute("VALUE");if(h){const u=Jr(h).subarray(0,16);_6(u),this.keyId=u}}break}default:{let a=t.subarray(0,16);if(a.length!==16){const i=new Uint8Array(16);i.set(a,16-a.length),a=i}this.keyId=a;break}}if(!this.keyId||this.keyId.byteLength!==16){let a=Gn[this.uri];if(!a){const i=Object.keys(Gn).length%Number.MAX_SAFE_INTEGER;a=new Uint8Array(16),new DataView(a.buffer,12,4).setUint32(0,i),Gn[this.uri]=a}this.keyId=a}return this}}function J6(s){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=s>>8*(15-t)&255;return e}const wf=/\{\$([a-zA-Z0-9-_]+)\}/g;function _f(s){return wf.test(s)}function mt(s,e,t){if(s.variableList!==null||s.hasVariableRefs)for(let a=t.length;a--;){const i=t[a],o=e[i];o&&(e[i]=nl(s,o))}}function nl(s,e){if(s.variableList!==null||s.hasVariableRefs){const t=s.variableList;return e.replace(wf,a=>{const i=a.substring(2,a.length-1),o=t==null?void 0:t[i];return o===void 0?(s.playlistParsingError||(s.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),a):o})}return e}function kf(s,e,t){let a=s.variableList;a||(s.variableList=a={});let i,o;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const r=new self.URL(t).searchParams;if(r.has(i))o=r.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${t}"`)}catch(r){s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${r.message}`))}}else i=e.NAME,o=e.VALUE;i in a?s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):a[i]=o||""}function X6(s,e,t){const a=e.IMPORT;if(t&&a in t){let i=s.variableList;i||(s.variableList=i={}),i[a]=t[a]}else s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${a}"`))}function Es(s=!0){return typeof self>"u"?void 0:(s||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Z6(s){return typeof self<"u"&&s===self.ManagedMediaSource}const jn={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Q6(s,e){const t=jn[e];return!!t&&!!t[s.slice(0,4)]}function il(s,e,t=!0){return!s.split(",").some(a=>!Ef(a,e,t))}function Ef(s,e,t=!0){var a;const i=Es(t);return(a=i==null?void 0:i.isTypeSupported(Ta(s,e)))!=null?a:!1}function Ta(s,e){return`${e}/mp4;codecs="${s}"`}function Tf(s){if(s){const e=s.substring(0,4);return jn.video[e]}return 2}function Hn(s){return s.split(",").reduce((e,t)=>{const a=jn.video[t];return a?(a*2+e)/(e?3:2):(jn.audio[t]+e)/(e?2:1)},0)}const ol={};function eB(s,e=!0){if(ol[s])return ol[s];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[s];for(let a=0;a<t.length;a++)if(Ef(t[a],"audio",e))return ol[s]=t[a],t[a];return s}const tB=/flac|opus/i;function Wn(s,e=!0){return s.replace(tB,t=>eB(t.toLowerCase(),e))}function Cf(s,e){return s&&s!=="mp4a"?s:e&&e.split(",")[0]}function sB(s){const e=s.split(",");for(let t=0;t<e.length;t++){const a=e[t].split(".");if(a.length>2){let i=a.shift()+".";i+=parseInt(a.shift()).toString(16),i+=("000"+parseInt(a.shift()).toString(16)).slice(-4),e[t]=i}}return e.join(",")}const xf=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,vf=/#EXT-X-MEDIA:(.*)/g,aB=/^#EXT(?:INF|-X-TARGETDURATION):/m,Af=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),nB=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class jt{static findGroup(e,t){for(let a=0;a<e.length;a++){const i=e[a];if(i.id===t)return i}}static resolve(e,t){return Kr.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return aB.test(e)}static parseMasterPlaylist(e,t){const a=_f(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:a},o=[];xf.lastIndex=0;let r;for(;(r=xf.exec(e))!=null;)if(r[1]){var l;const c=new Oe(r[1]);mt(i,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const h=nl(i,r[2]),u={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:jt.resolve(h,t)},f=c.decimalResolution("RESOLUTION");f&&(u.width=f.width,u.height=f.height),iB(c.CODECS,u),(l=u.unknownCodecs)!=null&&l.length||o.push(u),i.levels.push(u)}else if(r[3]){const c=r[3],h=r[4];switch(c){case"SESSION-DATA":{const u=new Oe(h);mt(i,u,["DATA-ID","LANGUAGE","VALUE","URI"]);const f=u["DATA-ID"];f&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[f]=u);break}case"SESSION-KEY":{const u=Lf(h,t,i);u.encrypted&&u.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(u)):A.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${h}"`);break}case"DEFINE":{{const u=new Oe(h);mt(i,u,["NAME","VALUE","QUERYPARAM"]),kf(i,u,t)}break}case"CONTENT-STEERING":{const u=new Oe(h);mt(i,u,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:jt.resolve(u["SERVER-URI"],t),pathwayId:u["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=If(h);break}}}const d=o.length>0&&o.length<i.levels.length;return i.levels=d?o:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,a){let i;const o={},r=a.levels,l={AUDIO:r.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:r.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let d=0;for(vf.lastIndex=0;(i=vf.exec(e))!==null;){const c=new Oe(i[1]),h=c.TYPE;if(h){const u=l[h],f=o[h]||[];o[h]=f,mt(a,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const p=c.LANGUAGE,m=c["ASSOC-LANGUAGE"],g=c.CHANNELS,y=c.CHARACTERISTICS,b=c["INSTREAM-ID"],S={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||p||"",type:h,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:p,url:c.URI?jt.resolve(c.URI,t):""};if(m&&(S.assocLang=m),g&&(S.channels=g),y&&(S.characteristics=y),b&&(S.instreamId=b),u!=null&&u.length){const _=jt.findGroup(u,S.groupId)||u[0];Rf(S,_,"audioCodec"),Rf(S,_,"textCodec")}f.push(S)}}return o}static parseLevelPlaylist(e,t,a,i,o,r){const l=new S6(t),d=l.fragments;let c=null,h=0,u=0,f=0,p=0,m=null,g=new Yr(i,t),y,b,S,_=-1,C=!1,E=null;for(Af.lastIndex=0,l.m3u8=e,l.hasVariableRefs=_f(e);(y=Af.exec(e))!==null;){C&&(C=!1,g=new Yr(i,t),g.start=f,g.sn=h,g.cc=p,g.level=a,c&&(g.initSegment=c,g.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,E&&(g.setByteRange(E),E=null)));const L=y[1];if(L){g.duration=parseFloat(L);const R=(" "+y[2]).slice(1);g.title=R||null,g.tagList.push(R?["INF",L,R]:["INF",L])}else if(y[3]){if(ne(g.duration)){g.start=f,S&&Df(g,S,l),g.sn=h,g.level=a,g.cc=p,d.push(g);const R=(" "+y[3]).slice(1);g.relurl=nl(l,R),Bf(g,m),m=g,f+=g.duration,h++,u=0,C=!0}}else if(y[4]){const R=(" "+y[4]).slice(1);m?g.setByteRange(R,m):g.setByteRange(R)}else if(y[5])g.rawProgramDateTime=(" "+y[5]).slice(1),g.tagList.push(["PROGRAM-DATE-TIME",g.rawProgramDateTime]),_===-1&&(_=d.length);else{if(y=y[0].match(nB),!y){A.warn("No matches on slow regex match for level playlist!");continue}for(b=1;b<y.length&&!(typeof y[b]<"u");b++);const R=(" "+y[b]).slice(1),$=(" "+y[b+1]).slice(1),K=y[b+2]?(" "+y[b+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":l.type=$.toUpperCase();break;case"MEDIA-SEQUENCE":h=l.startSN=parseInt($);break;case"SKIP":{const z=new Oe($);mt(l,z,["RECENTLY-REMOVED-DATERANGES"]);const ae=z.decimalInteger("SKIPPED-SEGMENTS");if(ne(ae)){l.skippedSegments=ae;for(let ie=ae;ie--;)d.unshift(null);h+=ae}const oe=z.enumeratedString("RECENTLY-REMOVED-DATERANGES");oe&&(l.recentlyRemovedDateranges=oe.split(" "));break}case"TARGETDURATION":l.targetduration=Math.max(parseInt($),1);break;case"VERSION":l.version=parseInt($);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"#":($||K)&&g.tagList.push(K?[$,K]:[$]);break;case"DISCONTINUITY":p++,g.tagList.push(["DIS"]);break;case"GAP":g.gap=!0,g.tagList.push([R]);break;case"BITRATE":g.tagList.push([R,$]);break;case"DATERANGE":{const z=new Oe($);mt(l,z,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),mt(l,z,z.clientAttrs);const ae=new tf(z,l.dateRanges[z.ID]);ae.isValid||l.skippedSegments?l.dateRanges[ae.id]=ae:A.warn(`Ignoring invalid DATERANGE tag: "${$}"`),g.tagList.push(["EXT-X-DATERANGE",$]);break}case"DEFINE":{{const z=new Oe($);mt(l,z,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in z?X6(l,z,r):kf(l,z,t)}break}case"DISCONTINUITY-SEQUENCE":p=parseInt($);break;case"KEY":{const z=Lf($,t,l);if(z.isSupported()){if(z.method==="NONE"){S=void 0;break}S||(S={}),S[z.keyFormat]&&(S=Ge({},S)),S[z.keyFormat]=z}else A.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${$}"`);break}case"START":l.startTimeOffset=If($);break;case"MAP":{const z=new Oe($);if(mt(l,z,["BYTERANGE","URI"]),g.duration){const ae=new Yr(i,t);Nf(ae,z,a,S),c=ae,g.initSegment=c,c.rawProgramDateTime&&!g.rawProgramDateTime&&(g.rawProgramDateTime=c.rawProgramDateTime)}else{const ae=g.byteRangeEndOffset;if(ae){const oe=g.byteRangeStartOffset;E=`${ae-oe}@${oe}`}else E=null;Nf(g,z,a,S),c=g,C=!0}break}case"SERVER-CONTROL":{const z=new Oe($);l.canBlockReload=z.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=z.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&z.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=z.optionalFloat("PART-HOLD-BACK",0),l.holdBack=z.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const z=new Oe($);l.partTarget=z.decimalFloatingPoint("PART-TARGET");break}case"PART":{let z=l.partList;z||(z=l.partList=[]);const ae=u>0?z[z.length-1]:void 0,oe=u++,ie=new Oe($);mt(l,ie,["BYTERANGE","URI"]);const ce=new y6(ie,g,t,oe,ae);z.push(ce),g.duration+=ce.duration;break}case"PRELOAD-HINT":{const z=new Oe($);mt(l,z,["URI"]),l.preloadHint=z;break}case"RENDITION-REPORT":{const z=new Oe($);mt(l,z,["URI"]),l.renditionReports=l.renditionReports||[],l.renditionReports.push(z);break}default:A.warn(`line parsed but not handled: ${y}`);break}}}m&&!m.relurl?(d.pop(),f-=m.duration,l.partList&&(l.fragmentHint=m)):l.partList&&(Bf(g,m),g.cc=p,l.fragmentHint=g,S&&Df(g,S,l));const v=d.length,T=d[0],B=d[v-1];if(f+=l.skippedSegments*l.targetduration,f>0&&v&&B){l.averagetargetduration=f/v;const L=B.sn;l.endSN=L!=="initSegment"?L:0,l.live||(B.endList=!0),T&&(l.startCC=T.cc)}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(f+=l.fragmentHint.duration),l.totalduration=f,l.endCC=p,_>0&&oB(d,_),l}}function Lf(s,e,t){var a,i;const o=new Oe(s);mt(t,o,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const r=(a=o.METHOD)!=null?a:"",l=o.URI,d=o.hexadecimalInteger("IV"),c=o.KEYFORMATVERSIONS,h=(i=o.KEYFORMAT)!=null?i:"identity";l&&o.IV&&!d&&A.error(`Invalid IV: ${o.IV}`);const u=l?jt.resolve(l,e):"",f=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ea(r,u,h,f,d)}function If(s){const t=new Oe(s).decimalFloatingPoint("TIME-OFFSET");return ne(t)?t:null}function iB(s,e){let t=(s||"").split(/[ ,]+/).filter(a=>a);["video","audio","text"].forEach(a=>{const i=t.filter(o=>Q6(o,a));i.length&&(e[`${a}Codec`]=i.join(","),t=t.filter(o=>i.indexOf(o)===-1))}),e.unknownCodecs=t}function Rf(s,e,t){const a=e[t];a&&(s[t]=a)}function oB(s,e){let t=s[e];for(let a=e;a--;){const i=s[a];if(!i)return;i.programDateTime=t.programDateTime-i.duration*1e3,t=i}}function Bf(s,e){s.rawProgramDateTime?s.programDateTime=Date.parse(s.rawProgramDateTime):e!=null&&e.programDateTime&&(s.programDateTime=e.endProgramDateTime),ne(s.programDateTime)||(s.programDateTime=null,s.rawProgramDateTime=null)}function Nf(s,e,t,a){s.relurl=e.URI,e.BYTERANGE&&s.setByteRange(e.BYTERANGE),s.level=t,s.sn="initSegment",a&&(s.levelkeys=a),s.initSegment=null}function Df(s,e,t){s.levelkeys=e;const{encryptedFragments:a}=t;(!a.length||a[a.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&a.push(s)}var xe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},le={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Pf(s){const{type:e}=s;switch(e){case xe.AUDIO_TRACK:return le.AUDIO;case xe.SUBTITLE_TRACK:return le.SUBTITLE;default:return le.MAIN}}function rl(s,e){let t=s.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class rB{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_LOADING,this.onLevelLoading,this),e.on(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_LOADING,this.onLevelLoading,this),e.off(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,a=t.pLoader,i=t.loader,o=a||i,r=new o(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:a}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:xe.MANIFEST,url:a,deliveryDirectives:null})}onLevelLoading(e,t){const{id:a,level:i,pathwayId:o,url:r,deliveryDirectives:l}=t;this.load({id:a,level:i,pathwayId:o,responseType:"text",type:xe.LEVEL,url:r,deliveryDirectives:l})}onAudioTrackLoading(e,t){const{id:a,groupId:i,url:o,deliveryDirectives:r}=t;this.load({id:a,groupId:i,level:null,responseType:"text",type:xe.AUDIO_TRACK,url:o,deliveryDirectives:r})}onSubtitleTrackLoading(e,t){const{id:a,groupId:i,url:o,deliveryDirectives:r}=t;this.load({id:a,groupId:i,level:null,responseType:"text",type:xe.SUBTITLE_TRACK,url:o,deliveryDirectives:r})}load(e){var t;const a=this.hls.config;let i=this.getInternalLoader(e);if(i){const c=i.context;if(c&&c.url===e.url&&c.level===e.level){A.trace("[playlist-loader]: playlist request ongoing");return}A.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let o;if(e.type===xe.MANIFEST?o=a.manifestLoadPolicy.default:o=Ge({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),ne((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===xe.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===xe.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===xe.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const h=c.partTarget,u=c.targetduration;if(h&&u){const f=Math.max(h*3,u*.8)*1e3;o=Ge({},o,{maxTimeToFirstByteMs:Math.min(f,o.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(f,o.maxTimeToFirstByteMs)})}}}const r=o.errorRetry||o.timeoutRetry||{},l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0},d={onSuccess:(c,h,u,f)=>{const p=this.getInternalLoader(u);this.resetInternalLoader(u.type);const m=c.data;if(m.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,u,new Error("no EXTM3U delimiter"),f||null,h);return}h.parsing.start=performance.now(),jt.isMediaPlaylist(m)?this.handleTrackOrLevelPlaylist(c,h,u,f||null,p):this.handleMasterPlaylist(c,h,u,f)},onError:(c,h,u,f)=>{this.handleNetworkError(h,u,!1,c,f)},onTimeout:(c,h,u)=>{this.handleNetworkError(h,u,!0,void 0,c)}};i.load(e,l,d)}handleMasterPlaylist(e,t,a,i){const o=this.hls,r=e.data,l=rl(e,a),d=jt.parseMasterPlaylist(r,l);if(d.playlistParsingError){this.handleManifestParsingError(e,a,d.playlistParsingError,i,t);return}const{contentSteering:c,levels:h,sessionData:u,sessionKeys:f,startTimeOffset:p,variableList:m}=d;this.variableList=m;const{AUDIO:g=[],SUBTITLES:y,"CLOSED-CAPTIONS":b}=jt.parseMasterPlaylistMedia(r,l,d);g.length&&!g.some(_=>!_.url)&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(A.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Oe({}),bitrate:0,url:""})),o.trigger(w.MANIFEST_LOADED,{levels:h,audioTracks:g,subtitles:y,captions:b,contentSteering:c,url:l,stats:t,networkDetails:i,sessionData:u,sessionKeys:f,startTimeOffset:p,variableList:m})}handleTrackOrLevelPlaylist(e,t,a,i,o){const r=this.hls,{id:l,level:d,type:c}=a,h=rl(e,a),u=0,f=ne(d)?d:ne(l)?l:0,p=Pf(a),m=jt.parseLevelPlaylist(e.data,h,f,p,u,this.variableList);if(c===xe.MANIFEST){const g={attrs:new Oe({}),bitrate:0,details:m,name:"",url:h};r.trigger(w.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:h,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),a.levelDetails=m,this.handlePlaylistLoaded(m,e,t,a,i,o)}handleManifestParsingError(e,t,a,i,o){this.hls.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.MANIFEST_PARSING_ERROR,fatal:t.type===xe.MANIFEST,url:e.url,err:a,error:a,reason:a.message,response:e,context:t,networkDetails:i,stats:o})}handleNetworkError(e,t,a=!1,i,o){let r=`A network ${a?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===xe.LEVEL?r+=`: ${e.level} id: ${e.id}`:(e.type===xe.AUDIO_TRACK||e.type===xe.SUBTITLE_TRACK)&&(r+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(r);A.warn(`[playlist-loader]: ${r}`);let d=N.UNKNOWN,c=!1;const h=this.getInternalLoader(e);switch(e.type){case xe.MANIFEST:d=a?N.MANIFEST_LOAD_TIMEOUT:N.MANIFEST_LOAD_ERROR,c=!0;break;case xe.LEVEL:d=a?N.LEVEL_LOAD_TIMEOUT:N.LEVEL_LOAD_ERROR,c=!1;break;case xe.AUDIO_TRACK:d=a?N.AUDIO_TRACK_LOAD_TIMEOUT:N.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case xe.SUBTITLE_TRACK:d=a?N.SUBTITLE_TRACK_LOAD_TIMEOUT:N.SUBTITLE_LOAD_ERROR,c=!1;break}h&&this.resetInternalLoader(e.type);const u={type:fe.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:h,context:e,error:l,networkDetails:t,stats:o};if(i){const f=(t==null?void 0:t.url)||e.url;u.response=Xe({url:f,data:void 0},i)}this.hls.trigger(w.ERROR,u)}handlePlaylistLoaded(e,t,a,i,o,r){const l=this.hls,{type:d,level:c,id:h,groupId:u,deliveryDirectives:f}=i,p=rl(t,i),m=Pf(i),g=typeof i.level=="number"&&m===le.MAIN?c:void 0;if(!e.fragments.length){const b=new Error("No Segments found in Playlist");l.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.LEVEL_EMPTY_ERROR,fatal:!1,url:p,error:b,reason:b.message,response:t,context:i,level:g,parent:m,networkDetails:o,stats:a});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const y=e.playlistParsingError;if(y){l.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.LEVEL_PARSING_ERROR,fatal:!1,url:p,error:y,reason:y.message,response:t,context:i,level:g,parent:m,networkDetails:o,stats:a});return}switch(e.live&&r&&(r.getCacheAge&&(e.ageHeader=r.getCacheAge()||0),(!r.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case xe.MANIFEST:case xe.LEVEL:l.trigger(w.LEVEL_LOADED,{details:e,level:g||0,id:h||0,stats:a,networkDetails:o,deliveryDirectives:f});break;case xe.AUDIO_TRACK:l.trigger(w.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break;case xe.SUBTITLE_TRACK:l.trigger(w.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break}}}function Of(s,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=s,e.dispatchEvent(t)}function Ff(s,e){const t=s.mode;if(t==="disabled"&&(s.mode="hidden"),s.cues&&!s.cues.getCueById(e.id))try{if(s.addCue(e),!s.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(a){A.debug(`[texttrack-utils]: ${a}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,s.addCue(i)}catch(i){A.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}t==="disabled"&&(s.mode=t)}function $s(s){const e=s.mode;if(e==="disabled"&&(s.mode="hidden"),s.cues)for(let t=s.cues.length;t--;)s.removeCue(s.cues[t]);e==="disabled"&&(s.mode=e)}function ll(s,e,t,a){const i=s.mode;if(i==="disabled"&&(s.mode="hidden"),s.cues&&s.cues.length>0){const o=cB(s.cues,e,t);for(let r=0;r<o.length;r++)(!a||a(o[r]))&&s.removeCue(o[r])}i==="disabled"&&(s.mode=i)}function lB(s,e){if(e<s[0].startTime)return 0;const t=s.length-1;if(e>s[t].endTime)return-1;let a=0,i=t;for(;a<=i;){const o=Math.floor((i+a)/2);if(e<s[o].startTime)i=o-1;else if(e>s[o].startTime&&a<t)a=o+1;else return o}return s[a].startTime-e<e-s[i].startTime?a:i}function cB(s,e,t){const a=[],i=lB(s,e);if(i>-1)for(let o=i,r=s.length;o<r;o++){const l=s[o];if(l.startTime>=e&&l.endTime<=t)a.push(l);else if(l.startTime>t)return a}return a}function Kn(s){const e=[];for(let t=0;t<s.length;t++){const a=s[t];(a.kind==="subtitles"||a.kind==="captions")&&a.label&&e.push(s[t])}return e}var Dt={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const dB=.25;function cl(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function Mf(s,e,t,a,i){let o=new s(e,t,"");try{o.value=a,i&&(o.type=i)}catch{o=new s(e,t,JSON.stringify(i?Xe({type:i},a):a))}return o}const qn=(()=>{const s=cl();try{s&&new s(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function dl(s,e){return s.getTime()/1e3-e}function hB(s){return Uint8Array.from(s.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class uB{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&($s(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const a=e[t];if(a.kind==="metadata"&&a.label==="id3")return Of(a,this.media),a}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:i}}}=this;if(!a&&!i)return;const{samples:o}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const r=cl();if(r)for(let l=0;l<o.length;l++){const d=o[l].type;if(d===Dt.emsg&&!a||!i)continue;const c=df(o[l].data);if(c){const h=o[l].pts;let u=h+o[l].duration;u>qn&&(u=qn),u-h<=0&&(u=h+dB);for(let p=0;p<c.length;p++){const m=c[p];if(!cf(m)){this.updateId3CueEnds(h,d);const g=Mf(r,h,u,m,d);g&&this.id3Track.addCue(g)}}}}}updateId3CueEnds(e,t){var a;const i=(a=this.id3Track)==null?void 0:a.cues;if(i)for(let o=i.length;o--;){const r=i[o];r.type===t&&r.startTime<e&&r.endTime===qn&&(r.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:a,type:i}){const{id3Track:o,hls:r}=this;if(!r)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:d}}=r;if(o&&(l||d)){let c;i==="audio"?c=h=>h.type===Dt.audioId3&&d:i==="video"?c=h=>h.type===Dt.emsg&&l:c=h=>h.type===Dt.audioId3&&d||h.type===Dt.emsg&&l,ll(o,t,a,c)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:a,id3Track:i}=this,{dateRanges:o}=t,r=Object.keys(o);if(i){const h=Object.keys(a).filter(u=>!r.includes(u));for(let u=h.length;u--;){const f=h[u];Object.keys(a[f].cues).forEach(p=>{i.removeCue(a[f].cues[p])}),delete a[f]}}const l=t.fragments[t.fragments.length-1];if(r.length===0||!ne(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const d=l.programDateTime/1e3-l.start,c=cl();for(let h=0;h<r.length;h++){const u=r[h],f=o[u],p=dl(f.startDate,d),m=a[u],g=(m==null?void 0:m.cues)||{};let y=(m==null?void 0:m.durationKnown)||!1,b=qn;const S=f.endDate;if(S)b=dl(S,d),y=!0;else if(f.endOnNext&&!y){const C=r.reduce((E,v)=>{if(v!==f.id){const T=o[v];if(T.class===f.class&&T.startDate>f.startDate&&(!E||f.startDate<E.startDate))return T}return E},null);C&&(b=dl(C.startDate,d),y=!0)}const _=Object.keys(f.attr);for(let C=0;C<_.length;C++){const E=_[C];if(!p6(E))continue;const v=g[E];if(v)y&&!m.durationKnown&&(v.endTime=b);else if(c){let T=f.attr[E];g6(E)&&(T=hB(T));const B=Mf(c,p,b,{key:E,data:T},Dt.dateRange);B&&(B.id=u,this.id3Track.addCue(B),g[E]=B)}}a[u]={cues:g,dateRange:f,durationKnown:y}}}}class mB{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:a,targetduration:i}=e,{liveSyncDuration:o,liveSyncDurationCount:r,lowLatencyMode:l}=this.config,d=this.hls.userConfig;let c=l&&a||t;(d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=o!==void 0?o:r*i);const h=i;return c+Math.min(this.stallCount*1,h)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,a=this.levelDetails;if(e===null||t===null||a===null)return null;const i=a.edge,o=e-t-this.edgeStalled,r=i-a.totalduration,l=i-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(r,o),l)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const a=e.buffered.length;return(a?e.buffered.end(a-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(w.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(w.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(w.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(w.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var a;t.details===N.BUFFER_STALLED_ERROR&&(this.stallCount++,(a=this.levelDetails)!=null&&a.live&&A.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const a=this.computeLatency();if(a===null)return;this._latency=a;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:o}=this.config;if(!i||o===1||!t.live)return;const r=this.targetLatency;if(r===null)return;const l=a-r,d=Math.min(this.maxLatency,r+t.targetduration);if(l<d&&l>.05&&this.forwardBufferLength>1){const h=Math.min(2,Math.max(1,o)),u=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;e.playbackRate=Math.min(h,Math.max(1,u))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const hl=["NONE","TYPE-0","TYPE-1",null];function fB(s){return hl.indexOf(s)>-1}const Yn=["SDR","PQ","HLG"];function pB(s){return!!s&&Yn.indexOf(s)>-1}var Jn={No:"",Yes:"YES",v2:"v2"};function $f(s){const{canSkipUntil:e,canSkipDateRanges:t,age:a}=s,i=a<e/2;return e&&i?t?Jn.v2:Jn.Yes:Jn.No}class Vf{constructor(e,t,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=a}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Vs{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Uf(this._audioGroups,e)}hasSubtitleGroup(e){return Uf(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let a=this._audioGroups;a||(a=this._audioGroups=[]),a.indexOf(t)===-1&&a.push(t)}else if(e==="text"){let a=this._subtitleGroups;a||(a=this._subtitleGroups=[]),a.indexOf(t)===-1&&a.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Uf(s,e){return!e||!s?!1:s.indexOf(e)!==-1}function ul(s,e){const t=e.startPTS;if(ne(t)){let a=0,i;e.sn>s.sn?(a=t-s.start,i=s):(a=s.start-t,i=e),i.duration!==a&&(i.duration=a)}else e.sn>s.sn?s.cc===e.cc&&s.minEndPTS?e.start=s.start+(s.minEndPTS-s.start):e.start=s.start+s.duration:e.start=Math.max(s.start-e.duration,0)}function zf(s,e,t,a,i,o){a-t<=0&&(A.warn("Fragment should have a positive duration",e),a=t+e.duration,o=i+e.duration);let l=t,d=a;const c=e.startPTS,h=e.endPTS;if(ne(c)){const y=Math.abs(c-t);ne(e.deltaPTS)?e.deltaPTS=Math.max(y,e.deltaPTS):e.deltaPTS=y,l=Math.max(t,c),t=Math.min(t,c),i=Math.min(i,e.startDTS),d=Math.min(a,h),a=Math.max(a,h),o=Math.max(o,e.endDTS)}const u=t-e.start;e.start!==0&&(e.start=t),e.duration=a-e.start,e.startPTS=t,e.maxStartPTS=l,e.startDTS=i,e.endPTS=a,e.minEndPTS=d,e.endDTS=o;const f=e.sn;if(!s||f<s.startSN||f>s.endSN)return 0;let p;const m=f-s.startSN,g=s.fragments;for(g[m]=e,p=m;p>0;p--)ul(g[p],g[p-1]);for(p=m;p<g.length-1;p++)ul(g[p],g[p+1]);return s.fragmentHint&&ul(g[g.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,u}function gB(s,e){let t=null;const a=s.fragments;for(let d=a.length-1;d>=0;d--){const c=a[d].initSegment;if(c){t=c;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;let i=0,o;if(SB(s,e,(d,c)=>{d.relurl&&(i=d.cc-c.cc),ne(d.startPTS)&&ne(d.endPTS)&&(c.start=c.startPTS=d.startPTS,c.startDTS=d.startDTS,c.maxStartPTS=d.maxStartPTS,c.endPTS=d.endPTS,c.endDTS=d.endDTS,c.minEndPTS=d.minEndPTS,c.duration=d.endPTS-d.startPTS,c.duration&&(o=c),e.PTSKnown=e.alignedSliding=!0),c.elementaryStreams=d.elementaryStreams,c.loader=d.loader,c.stats=d.stats,d.initSegment&&(c.initSegment=d.initSegment,t=d.initSegment)}),t&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(c=>{var h;c&&(!c.initSegment||c.initSegment.relurl===((h=t)==null?void 0:h.relurl))&&(c.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(d=>!d),e.deltaUpdateFailed){A.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let d=e.skippedSegments;d--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=yB(s.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const r=e.fragments;if(i){A.warn("discontinuity sliding from playlist, take drift into account");for(let d=0;d<r.length;d++)r[d].cc+=i}e.skippedSegments&&(e.startCC=e.fragments[0].cc),bB(s.partList,e.partList,(d,c)=>{c.elementaryStreams=d.elementaryStreams,c.stats=d.stats}),o?zf(e,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):Gf(s,e),r.length&&(e.totalduration=e.edge-r[0].start),e.driftStartTime=s.driftStartTime,e.driftStart=s.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const d=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=d),e.driftEndTime=l,e.driftEnd=d}else e.driftEndTime=s.driftEndTime,e.driftEnd=s.driftEnd,e.advancedDateTime=s.advancedDateTime}function yB(s,e,t){const a=Ge({},s);return t&&t.forEach(i=>{delete a[i]}),Object.keys(e).forEach(i=>{const o=new tf(e[i].attr,a[i]);o.isValid?a[i]=o:A.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[i].attr)}"`)}),a}function bB(s,e,t){if(s&&e){let a=0;for(let i=0,o=s.length;i<=o;i++){const r=s[i],l=e[i+a];r&&l&&r.index===l.index&&r.fragment.sn===l.fragment.sn?t(r,l):a--}}}function SB(s,e,t){const a=e.skippedSegments,i=Math.max(s.startSN,e.startSN)-e.startSN,o=(s.fragmentHint?1:0)+(a?e.endSN:Math.min(s.endSN,e.endSN))-e.startSN,r=e.startSN-s.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,d=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;for(let c=i;c<=o;c++){const h=d[r+c];let u=l[c];a&&!u&&c<a&&(u=e.fragments[c]=h),h&&u&&t(h,u)}}function Gf(s,e){const t=e.startSN+e.skippedSegments-s.startSN,a=s.fragments;t<0||t>=a.length||ml(e,a[t].start)}function ml(s,e){if(e){const t=s.fragments;for(let a=s.skippedSegments;a<t.length;a++)t[a].start+=e;s.fragmentHint&&(s.fragmentHint.start+=e)}}function wB(s,e=1/0){let t=1e3*s.targetduration;if(s.updated){const a=s.fragments;if(a.length&&t*4>e){const o=a[a.length-1].duration*1e3;o<t&&(t=o)}}else t/=2;return Math.round(t)}function _B(s,e,t){if(!(s!=null&&s.details))return null;const a=s.details;let i=a.fragments[e-a.startSN];return i||(i=a.fragmentHint,i&&i.sn===e)?i:e<a.startSN&&t&&t.sn===e?t:null}function jf(s,e,t){var a;return s!=null&&s.details?Hf((a=s.details)==null?void 0:a.partList,e,t):null}function Hf(s,e,t){if(s)for(let a=s.length;a--;){const i=s[a];if(i.index===t&&i.fragment.sn===e)return i}return null}function Wf(s){s.forEach((e,t)=>{const{details:a}=e;a!=null&&a.fragments&&a.fragments.forEach(i=>{i.level=t})})}function Xn(s){switch(s.details){case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_TIMEOUT:case N.LEVEL_LOAD_TIMEOUT:case N.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Kf(s,e){const t=Xn(e);return s.default[`${t?"timeout":"error"}Retry`]}function fl(s,e){const t=s.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*s.retryDelayMs,s.maxRetryDelayMs)}function qf(s){return Xe(Xe({},s),{errorRetry:null,timeoutRetry:null})}function Zn(s,e,t,a){if(!s)return!1;const i=a==null?void 0:a.code,o=e<s.maxNumRetry&&(kB(i)||!!t);return s.shouldRetry?s.shouldRetry(s,e,t,a,o):o}function kB(s){return s===0&&navigator.onLine===!1||!!s&&(s<400||s>499)}const Yf={search:function(s,e){let t=0,a=s.length-1,i=null,o=null;for(;t<=a;){i=(t+a)/2|0,o=s[i];const r=e(o);if(r>0)t=i+1;else if(r<0)a=i-1;else return o}return null}};function EB(s,e,t){if(e===null||!Array.isArray(s)||!s.length||!ne(e))return null;const a=s[0].programDateTime;if(e<(a||0))return null;const i=s[s.length-1].endProgramDateTime;if(e>=(i||0))return null;t=t||0;for(let o=0;o<s.length;++o){const r=s[o];if(CB(e,t,r))return r}return null}function Qn(s,e,t=0,a=0,i=.005){let o=null;if(s){o=e[s.sn-e[0].sn+1]||null;const l=s.endDTS-t;l>0&&l<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(o=e[0]);if(o&&((!s||s.level===o.level)&&pl(t,a,o)===0||TB(o,s,Math.min(i,a))))return o;const r=Yf.search(e,pl.bind(null,t,a));return r&&(r!==s||!o)?r:o}function TB(s,e,t){if(e&&e.start===0&&e.level<s.level&&(e.endPTS||0)>0){const a=e.tagList.reduce((i,o)=>(o[0]==="INF"&&(i+=parseFloat(o[1])),i),t);return s.start<=a}return!1}function pl(s=0,e=0,t){if(t.start<=s&&t.start+t.duration>s)return 0;const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-a<=s?1:t.start-a>s&&t.start?-1:0}function CB(s,e,t){const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-a>s}function xB(s,e){return Yf.search(s,t=>t.cc<e?1:t.cc>e?-1:0)}var nt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Pt={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class vB{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=A.log.bind(A,"[info]:"),this.warn=A.warn.bind(A,"[warning]:"),this.error=A.error.bind(A,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(w.ERROR,this.onError,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(w.ERROR,this.onError,this),e.off(w.ERROR,this.onErrorOut,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===le.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var a,i;if(t.fatal)return;const o=this.hls,r=t.context;switch(t.details){case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case N.FRAG_PARSING_ERROR:if((a=t.frag)!=null&&a.gap){t.errorAction={action:nt.DoNothing,flags:Pt.None};return}case N.FRAG_GAP:case N.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=nt.SendAlternateToPenaltyBox;return}case N.LEVEL_EMPTY_ERROR:case N.LEVEL_PARSING_ERROR:{var l,d;const c=t.parent===le.MAIN?t.level:o.loadLevel;t.details===N.LEVEL_EMPTY_ERROR&&((l=t.context)!=null&&(d=l.levelDetails)!=null&&d.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:typeof(r==null?void 0:r.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level));return;case N.AUDIO_TRACK_LOAD_ERROR:case N.AUDIO_TRACK_LOAD_TIMEOUT:case N.SUBTITLE_LOAD_ERROR:case N.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const c=o.levels[o.loadLevel];if(c&&(r.type===xe.AUDIO_TRACK&&c.hasAudioGroup(r.groupId)||r.type===xe.SUBTITLE_TRACK&&c.hasSubtitleGroup(r.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o.loadLevel),t.errorAction.action=nt.SendAlternateToPenaltyBox,t.errorAction.flags=Pt.MoveAllAlternatesMatchingHost;return}}return;case N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=o.levels[o.loadLevel],h=c==null?void 0:c.attrs["HDCP-LEVEL"];h?t.errorAction={action:nt.SendAlternateToPenaltyBox,flags:Pt.MoveAllAlternatesMatchingHDCP,hdcpLevel:h}:this.keySystemError(t)}return;case N.BUFFER_ADD_CODEC_ERROR:case N.REMUX_ALLOC_ERROR:case N.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(i=t.level)!=null?i:o.loadLevel);return;case N.INTERNAL_EXCEPTION:case N.BUFFER_APPENDING_ERROR:case N.BUFFER_FULL_ERROR:case N.LEVEL_SWITCH_ERROR:case N.BUFFER_STALLED_ERROR:case N.BUFFER_SEEK_OVER_HOLE:case N.BUFFER_NUDGE_ON_STALL:t.errorAction={action:nt.DoNothing,flags:Pt.None};return}t.type===fe.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const a=this.hls,i=Kf(a.config.playlistLoadPolicy,e),o=this.playlistError++;if(Zn(i,o,Xn(e),e.response))return{action:nt.RetryRequest,flags:Pt.None,retryConfig:i,retryCount:o};const l=this.getLevelSwitchAction(e,t);return i&&(l.retryConfig=i,l.retryCount=o),l}getFragRetryOrSwitchAction(e){const t=this.hls,a=this.getVariantLevelIndex(e.frag),i=t.levels[a],{fragLoadPolicy:o,keyLoadPolicy:r}=t.config,l=Kf(e.details.startsWith("key")?r:o,e),d=t.levels.reduce((h,u)=>h+u.fragmentError,0);if(i&&(e.details!==N.FRAG_GAP&&i.fragmentError++,Zn(l,d,Xn(e),e.response)))return{action:nt.RetryRequest,flags:Pt.None,retryConfig:l,retryCount:d};const c=this.getLevelSwitchAction(e,a);return l&&(c.retryConfig=l,c.retryCount=d),c}getLevelSwitchAction(e,t){const a=this.hls;t==null&&(t=a.loadLevel);const i=this.hls.levels[t];if(i){var o,r;const c=e.details;i.loadError++,c===N.BUFFER_APPEND_ERROR&&i.fragmentError++;let h=-1;const{levels:u,loadLevel:f,minAutoLevel:p,maxAutoLevel:m}=a;a.autoLevelEnabled||(a.loadLevel=-1);const g=(o=e.frag)==null?void 0:o.type,b=(g===le.AUDIO&&c===N.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===N.BUFFER_ADD_CODEC_ERROR||c===N.BUFFER_APPEND_ERROR))&&u.some(({audioCodec:v})=>i.audioCodec!==v),_=e.sourceBufferName==="video"&&(c===N.BUFFER_ADD_CODEC_ERROR||c===N.BUFFER_APPEND_ERROR)&&u.some(({codecSet:v,audioCodec:T})=>i.codecSet!==v&&i.audioCodec===T),{type:C,groupId:E}=(r=e.context)!=null?r:{};for(let v=u.length;v--;){const T=(v+f)%u.length;if(T!==f&&T>=p&&T<=m&&u[T].loadError===0){var l,d;const B=u[T];if(c===N.FRAG_GAP&&g===le.MAIN&&e.frag){const L=u[T].details;if(L){const R=Qn(e.frag,L.fragments,e.frag.start);if(R!=null&&R.gap)continue}}else{if(C===xe.AUDIO_TRACK&&B.hasAudioGroup(E)||C===xe.SUBTITLE_TRACK&&B.hasSubtitleGroup(E))continue;if(g===le.AUDIO&&(l=i.audioGroups)!=null&&l.some(L=>B.hasAudioGroup(L))||g===le.SUBTITLE&&(d=i.subtitleGroups)!=null&&d.some(L=>B.hasSubtitleGroup(L))||b&&i.audioCodec===B.audioCodec||!b&&i.audioCodec!==B.audioCodec||_&&i.codecSet===B.codecSet)continue}h=T;break}}if(h>-1&&a.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:nt.SendAlternateToPenaltyBox,flags:Pt.None,nextAutoLevel:h}}return{action:nt.SendAlternateToPenaltyBox,flags:Pt.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var a;switch((a=t.errorAction)==null?void 0:a.action){case nt.DoNothing:break;case nt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==N.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,a=e.errorAction;if(!a)return;const{flags:i,hdcpLevel:o,nextAutoLevel:r}=a;switch(i){case Pt.None:this.switchLevel(e,r);break;case Pt.MoveAllAlternatesMatchingHDCP:o&&(t.maxHdcpLevel=hl[hl.indexOf(o)-1],a.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}a.resolved||this.switchLevel(e,r)}switchLevel(e,t){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class gl{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=A.log.bind(A,`${t}:`),this.warn=A.warn.bind(A,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,a){const i=t==null?void 0:t.renditionReports;if(i){let o=-1;for(let r=0;r<i.length;r++){const l=i[r];let d;try{d=new self.URL(l.URI,t.url).href}catch(c){A.warn(`Could not construct new URL for Rendition Report: ${c}`),d=l.URI||""}if(d===e){o=r;break}else d===e.substring(0,d.length)&&(o=r)}if(o!==-1){const r=i[o],l=parseInt(r["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let d=parseInt(r["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const h=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&h>t.partTarget&&(d+=1)}const c=a&&$f(a);return new Vf(l,d>=0?d:void 0,c)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,a){const{details:i,stats:o}=t,r=self.performance.now(),l=o.loading.first?Math.max(0,r-o.loading.first):0;if(i.advancedDateTime=Date.now()-l,i.live||a!=null&&a.live){if(i.reloaded(a),a&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),a&&i.fragments.length>0&&gB(a,i),!this.canLoad||!i.live)return;let d,c,h;if(i.canBlockReload&&i.endSN&&i.advanced){const y=this.hls.config.lowLatencyMode,b=i.lastPartSn,S=i.endSN,_=i.lastPartIndex,C=_!==-1,E=b===S,v=y?0:_;C?(c=E?S+1:b,h=E?v:_+1):c=S+1;const T=i.age,B=T+i.ageHeader;let L=Math.min(B-i.partTarget,i.targetduration*1.5);if(L>0){if(a&&L>a.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${a.tuneInGoal} to: ${L} with playlist age: ${i.age}`),L=0;else{const R=Math.floor(L/i.targetduration);if(c+=R,h!==void 0){const $=Math.round(L%i.targetduration/i.partTarget);h+=$}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${T.toFixed(2)}s goal: ${L} skip sn ${R} to part ${h}`)}i.tuneInGoal=L}if(d=this.getDeliveryDirectives(i,t.deliveryDirectives,c,h),y||!E){this.loadPlaylist(d);return}}else(i.canBlockReload||i.canSkipUntil)&&(d=this.getDeliveryDirectives(i,t.deliveryDirectives,c,h));const u=this.hls.mainForwardBufferInfo,f=u?u.end-u.len:0,p=(i.edge-f)*1e3,m=wB(i,p);i.updated&&r>this.requestScheduled+m&&(this.requestScheduled=o.loading.start),c!==void 0&&i.canBlockReload?this.requestScheduled=o.loading.first+m-(i.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+m<r?this.requestScheduled=r:this.requestScheduled-r<=0&&(this.requestScheduled+=m);let g=this.requestScheduled-r;g=Math.max(0,g),this.log(`reload live playlist ${e} in ${Math.round(g)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(d),g)}else this.clearTimer()}getDeliveryDirectives(e,t,a,i){let o=$f(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(a=t.msn,i=t.part,o=Jn.No),new Vf(a,i,o)}checkRetry(e){const t=e.details,a=Xn(e),i=e.errorAction,{action:o,retryCount:r=0,retryConfig:l}=i||{},d=!!i&&!!l&&(o===nt.RetryRequest||!i.resolved&&o===nt.SendAlternateToPenaltyBox);if(d){var c;if(this.requestScheduled=-1,r>=l.maxNumRetry)return!1;if(a&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const h=fl(l,r);this.timer=self.setTimeout(()=>this.loadPlaylist(),h),this.warn(`Retrying playlist loading ${r+1}/${l.maxNumRetry} after "${t}" in ${h}ms`)}e.levelRetry=!0,i.resolved=!0}return d}}class Us{constructor(e,t=0,a=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=a}sample(e,t){const a=Math.pow(this.alpha_,e);this.estimate_=t*(1-a)+a*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class AB{constructor(e,t,a,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Us(e),this.fast_=new Us(t),this.defaultTTFB_=i,this.ttfb_=new Us(e)}update(e,t){const{slow_:a,fast_:i,ttfb_:o}=this;a.halfLife!==e&&(this.slow_=new Us(e,a.getEstimate(),a.getTotalWeight())),i.halfLife!==t&&(this.fast_=new Us(t,i.getEstimate(),i.getTotalWeight())),o.halfLife!==e&&(this.ttfb_=new Us(e,o.getEstimate(),o.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const a=8*t,i=e/1e3,o=a/i;this.fast_.sample(i,o),this.slow_.sample(i,o)}sampleTTFB(e){const t=e/1e3,a=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(a,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Jf={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Xf={};function LB(s,e,t,a,i,o){const r=s.audioCodec?s.audioGroups:null,l=o==null?void 0:o.audioCodec,d=o==null?void 0:o.channels,c=d?parseInt(d):l?1/0:2;let h=null;if(r!=null&&r.length)try{r.length===1&&r[0]?h=e.groups[r[0]].channels:h=r.reduce((u,f)=>{if(f){const p=e.groups[f];if(!p)throw new Error(`Audio track group ${f} not found`);Object.keys(p.channels).forEach(m=>{u[m]=(u[m]||0)+p.channels[m]})}return u},{2:0})}catch{return!0}return s.videoCodec!==void 0&&(s.width>1920&&s.height>1088||s.height>1920&&s.width>1088||s.frameRate>Math.max(a,30)||s.videoRange!=="SDR"&&s.videoRange!==t||s.bitrate>Math.max(i,8e6))||!!h&&ne(c)&&Object.keys(h).some(u=>parseInt(u)>c)}function IB(s,e,t){const a=s.videoCodec,i=s.audioCodec;if(!a||!i||!t)return Promise.resolve(Jf);const o={width:s.width,height:s.height,bitrate:Math.ceil(Math.max(s.bitrate*.9,s.averageBitrate)),framerate:s.frameRate||30},r=s.videoRange;r!=="SDR"&&(o.transferFunction=r.toLowerCase());const l=a.split(",").map(d=>({type:"media-source",video:Xe(Xe({},o),{},{contentType:Ta(d,"video")})}));return i&&s.audioGroups&&s.audioGroups.forEach(d=>{var c;d&&((c=e.groups[d])==null||c.tracks.forEach(h=>{if(h.groupId===d){const u=h.channels||"",f=parseFloat(u);ne(f)&&f>2&&l.push.apply(l,i.split(",").map(p=>({type:"media-source",audio:{contentType:Ta(p,"audio"),channels:""+f}})))}}))}),Promise.all(l.map(d=>{const c=RB(d);return Xf[c]||(Xf[c]=t.decodingInfo(d))})).then(d=>({supported:!d.some(c=>!c.supported),configurations:l,decodingInfoResults:d})).catch(d=>({supported:!1,configurations:l,decodingInfoResults:[],error:d}))}function RB(s){const{audio:e,video:t}=s,a=t||e;if(a){const i=a.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${i}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${i}`}return""}function BB(){if(typeof matchMedia=="function"){const s=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(s.media!==e.media)return s.matches===!0}return!1}function NB(s,e){let t=!1,a=[];return s&&(t=s!=="SDR",a=[s]),e&&(a=e.allowedVideoRanges||Yn.slice(0),t=e.preferHDR!==void 0?e.preferHDR:BB(),t?a=a.filter(i=>i!=="SDR"):a=["SDR"]),{preferHDR:t,allowedVideoRanges:a}}function DB(s,e,t,a,i){const o=Object.keys(s),r=a==null?void 0:a.channels,l=a==null?void 0:a.audioCodec,d=r&&parseInt(r)===2;let c=!0,h=!1,u=1/0,f=1/0,p=1/0,m=0,g=[];const{preferHDR:y,allowedVideoRanges:b}=NB(e,i);for(let E=o.length;E--;){const v=s[o[E]];c=v.channels[2]>0,u=Math.min(u,v.minHeight),f=Math.min(f,v.minFramerate),p=Math.min(p,v.minBitrate);const T=b.filter(B=>v.videoRanges[B]>0);T.length>0&&(h=!0,g=T)}u=ne(u)?u:0,f=ne(f)?f:0;const S=Math.max(1080,u),_=Math.max(30,f);return p=ne(p)?p:t,t=Math.max(p,t),h||(e=void 0,g=[]),{codecSet:o.reduce((E,v)=>{const T=s[v];if(v===E)return E;if(T.minBitrate>t)return Xt(v,`min bitrate of ${T.minBitrate} > current estimate of ${t}`),E;if(!T.hasDefaultAudio)return Xt(v,"no renditions with default or auto-select sound found"),E;if(l&&v.indexOf(l.substring(0,4))%5!==0)return Xt(v,`audio codec preference "${l}" not found`),E;if(r&&!d){if(!T.channels[r])return Xt(v,`no renditions with ${r} channel sound found (channels options: ${Object.keys(T.channels)})`),E}else if((!l||d)&&c&&T.channels[2]===0)return Xt(v,"no renditions with stereo sound found"),E;return T.minHeight>S?(Xt(v,`min resolution of ${T.minHeight} > maximum of ${S}`),E):T.minFramerate>_?(Xt(v,`min framerate of ${T.minFramerate} > maximum of ${_}`),E):g.some(B=>T.videoRanges[B]>0)?T.maxScore<m?(Xt(v,`max score of ${T.maxScore} < selected max of ${m}`),E):E&&(Hn(v)>=Hn(E)||T.fragmentError>s[E].fragmentError)?E:(m=T.maxScore,v):(Xt(v,`no variants with VIDEO-RANGE of ${JSON.stringify(g)} found`),E)},void 0),videoRanges:g,preferHDR:y,minFramerate:f,minBitrate:p}}function Xt(s,e){A.log(`[abr] start candidates with "${s}" ignored because ${e}`)}function PB(s){return s.reduce((e,t)=>{let a=e.groups[t.groupId];a||(a=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),a.tracks.push(t);const i=t.channels||"2";return a.channels[i]=(a.channels[i]||0)+1,a.hasDefault=a.hasDefault||t.default,a.hasAutoSelect=a.hasAutoSelect||t.autoselect,a.hasDefault&&(e.hasDefaultAudio=!0),a.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function OB(s,e,t,a){return s.slice(t,a+1).reduce((i,o)=>{if(!o.codecSet)return i;const r=o.audioGroups;let l=i[o.codecSet];l||(i[o.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!r,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,o.bitrate);const d=Math.min(o.height,o.width);return l.minHeight=Math.min(l.minHeight,d),l.minFramerate=Math.min(l.minFramerate,o.frameRate),l.maxScore=Math.max(l.maxScore,o.score),l.fragmentError+=o.fragmentError,l.videoRanges[o.videoRange]=(l.videoRanges[o.videoRange]||0)+1,r&&r.forEach(c=>{if(!c)return;const h=e.groups[c];h&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?h.hasDefault:h.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(h.channels).forEach(u=>{l.channels[u]=(l.channels[u]||0)+h.channels[u]}))}),i},{})}function Ht(s,e,t){if("attrs"in s){const a=e.indexOf(s);if(a!==-1)return a}for(let a=0;a<e.length;a++){const i=e[a];if(zs(s,i,t))return a}return-1}function zs(s,e,t){const{groupId:a,name:i,lang:o,assocLang:r,characteristics:l,default:d}=s,c=s.forced;return(a===void 0||e.groupId===a)&&(i===void 0||e.name===i)&&(o===void 0||e.lang===o)&&(o===void 0||e.assocLang===r)&&(d===void 0||e.default===d)&&(c===void 0||e.forced===c)&&(l===void 0||FB(l,e.characteristics))&&(t===void 0||t(s,e))}function FB(s,e=""){const t=s.split(","),a=e.split(",");return t.length===a.length&&!t.some(i=>a.indexOf(i)===-1)}function Gs(s,e){const{audioCodec:t,channels:a}=s;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(a===void 0||a===(e.channels||"2"))}function MB(s,e,t,a,i){const o=e[a],l=e.reduce((f,p,m)=>{const g=p.uri;return(f[g]||(f[g]=[])).push(m),f},{})[o.uri];l.length>1&&(a=Math.max.apply(Math,l));const d=o.videoRange,c=o.frameRate,h=o.codecSet.substring(0,4),u=Zf(e,a,f=>{if(f.videoRange!==d||f.frameRate!==c||f.codecSet.substring(0,4)!==h)return!1;const p=f.audioGroups,m=t.filter(g=>!p||p.indexOf(g.groupId)!==-1);return Ht(s,m,i)>-1});return u>-1?u:Zf(e,a,f=>{const p=f.audioGroups,m=t.filter(g=>!p||p.indexOf(g.groupId)!==-1);return Ht(s,m,i)>-1})}function Zf(s,e,t){for(let a=e;a;a--)if(t(s[a]))return a;for(let a=e+1;a<s.length;a++)if(t(s[a]))return a;return-1}class $B{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:a,hls:i}=this,{autoLevelEnabled:o,media:r}=i;if(!t||!r)return;const l=performance.now(),d=a?a.stats:t.stats,c=a?a.duration:t.duration,h=l-d.loading.start,u=i.minAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||t.level<=u){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o||r.paused||!r.playbackRate||!r.readyState)return;const f=i.mainForwardBufferInfo;if(f===null)return;const p=this.bwEstimator.getEstimateTTFB(),m=Math.abs(r.playbackRate);if(h<=Math.max(p,1e3*(c/(m*2))))return;const g=f.len/m,y=d.loading.first?d.loading.first-d.loading.start:-1,b=d.loaded&&y>-1,S=this.getBwEstimate(),_=i.levels,C=_[t.level],E=d.total||Math.max(d.loaded,Math.round(c*C.averageBitrate/8));let v=b?h-y:h;v<1&&b&&(v=Math.min(h,d.loaded*8/S));const T=b?d.loaded*1e3/v:0,B=T?(E-d.loaded)/T:E*8/S+p/1e3;if(B<=g)return;const L=T?T*8:S;let R=Number.POSITIVE_INFINITY,$;for($=t.level-1;$>u;$--){const z=_[$].maxBitrate;if(R=this.getTimeToLoadFrag(p/1e3,L,c*z,!_[$].details),R<g)break}if(R>=B||R>c*10)return;i.nextLoadLevel=i.nextAutoLevel=$,b?this.bwEstimator.sample(h-Math.min(p,y),d.loaded):this.bwEstimator.sampleTTFB(h);const K=_[$].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>K&&this.resetEstimator(K),this.clearTimer(),A.warn(`[abr] Fragment ${t.sn}${a?" part "+a.index:""} of level ${t.level} is loading too slowly;
42
+ `+o):a.stack=o}catch{}}throw a}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ws(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Dr.assertOptions(a,{silentJSONParsing:os.transitional(os.boolean),forcedJSONParsing:os.transitional(os.boolean),clarifyTimeoutError:os.transitional(os.boolean)},!1),i!=null&&(P.isFunction(i)?t.paramsSerializer={serialize:i}:Dr.assertOptions(i,{encode:os.function,serialize:os.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&P.merge(o.common,o[t.method]);o&&P.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=Nt.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(d=d&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let h,u=0,f;if(!d){const m=[km.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,c),f=m.length,h=Promise.resolve(t);u<f;)h=h.then(m[u++],m[u++]);return h}f=l.length;let p=t;for(u=0;u<f;){const m=l[u++],g=l[u++];try{p=m(p)}catch(y){g.call(this,y);break}}try{h=km.call(this,p)}catch(m){return Promise.reject(m)}for(u=0,f=c.length;u<f;)h=h.then(c[u++],c[u++]);return h}getUri(e){e=ws(this.defaults,e);const t=mm(e.baseURL,e.url);return nm(t,e.params,e.paramsSerializer)}}P.forEach(["delete","get","head","options"],function(s){Rn.prototype[s]=function(e,t){return this.request(ws(t||{},{method:s,url:e,data:(t||{}).data}))}}),P.forEach(["post","put","patch"],function(s){function e(t){return function(a,i,o){return this.request(ws(o||{},{method:s,headers:t?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Rn.prototype[s]=e(),Rn.prototype[s+"Form"]=e(!0)});const Bn=Rn;class Pr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(l=>{a.subscribe(l),o=l}).then(i);return r.cancel=function(){a.unsubscribe(o)},r},e(function(i,o,r){a.reason||(a.reason=new Fs(i,o,r),t(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pr(function(t){e=t}),cancel:e}}}const NR=Pr;function DR(s){return function(e){return s.apply(null,e)}}function PR(s){return P.isObject(s)&&s.isAxiosError===!0}const Or={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(Or).forEach(([s,e])=>{Or[e]=s});const OR=Or;function Cm(s){const e=new Bn(s),t=zu(Bn.prototype.request,e);return P.extend(t,Bn.prototype,e,{allOwnKeys:!0}),P.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Cm(ws(s,a))},t}const ze=Cm(xr);ze.Axios=Bn,ze.CanceledError=Fs,ze.CancelToken=NR,ze.isCancel=cm,ze.VERSION=Em,ze.toFormData=Cn,ze.AxiosError=_e,ze.Cancel=ze.CanceledError,ze.all=function(s){return Promise.all(s)},ze.spread=DR,ze.isAxiosError=PR,ze.mergeConfig=ws,ze.AxiosHeaders=Nt,ze.formToJSON=s=>rm(P.isHTMLForm(s)?new FormData(s):s),ze.getAdapter=_m.getAdapter,ze.HttpStatusCode=OR,ze.default=ze;const xm=ze,FR=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Fr={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},vm=()=>{n.useCssVars(s=>({"26acffa8":s.backgroundColor,"3d95bef4":s.height,"86ba1cc0":s.arrowsPosition,"140b6ada":s.arrowsPadding+"px","7df46be5":s.arrowsBackground,"33f99798":s.arrowsHeight*2+"px","1c8a858d":s.arrowsWidth*2+"px","4a7876c9":s.arrowsRadius,"2ff67e63":s.arrowsBorder,"59c5dd08":s.arrowsMargin+"px","6658215d":s.arrowsContainerBgL,66582163:s.arrowsContainerBgR,e5900a2e:s.scrollColor}))},Am=Fr.setup;Fr.setup=Am?(s,e)=>(vm(),Am(s,e)):vm;const MR={ref:"gscScrollableContainer",class:"scrollable-container"},$R={class:"scrollable-arrows"},VR=["width","height","viewBox"],UR=["stroke"],zR={class:"scrollable-wrapper"},GR={class:"scrollable-arrows"},jR=["width","height","viewBox"],HR=["stroke"];function WR(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",MR,[t.arrows?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["arrows-container",o.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...r)=>o.scrollLeft&&o.scrollLeft(...r))},[n.createElementVNode("div",$R,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,UR)],8,VR))])],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...r)=>o.getScroll&&o.getScroll(...r))},[n.createElementVNode("div",zR,[n.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(n.openBlock(),n.createElementBlock("div",{key:1,id:"arrows-container-right",class:n.normalizeClass(["arrows-container",o.hideShowRightArrow]),onClick:e[2]||(e[2]=(...r)=>o.scrollRight&&o.scrollRight(...r))},[n.createElementVNode("div",GR,[(n.openBlock(),n.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:o.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,HR)],8,jR))])],2)):n.createCommentVNode("",!0)],512)}const KR=FR(Fr,[["render",WR],["__scopeId","data-v-7d0811ac"]]),rs=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t};let Lm=null;const Mr={components:{},props:{titleCategory:{type:String,default:"RESUMEN"},dateGame:{type:String,default:""},showVideos:{type:Boolean,default:!0},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},matchday:{type:String,default:""},seasonName:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""}},data(){return{gamesContainerGHWidth:0}},computed:{date(){const s=this.gamesContainerGHWidth;return s<=400?"date400":s<=540?"date540":s<=650?"date650":"date"},seasoncontainer(){const s=this.gamesContainerGHWidth;return s<=400?"season-container400":s<=540?"season-container540":s<=650?"season-container650":"season-container"},matchcontainer(){const s=this.gamesContainerGHWidth;return s<=400?"match-container400":s<=540?"match-container540":s<=650?"match-container650":"match-container"},containerinfogame(){const s=this.gamesContainerGHWidth;return s<=400?"container-info-game400":s<=540?"container-info-game540":s<=650?"container-info-game650":"container-info-game"},playbutton(){const s=this.gamesContainerGHWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},baselogo(){const s=this.gamesContainerGHWidth;return s<=400?"base-logo400":s<=540?"base-logo540":s<=650?"base-logo650":"base-logo"},baselogoright(){const s=this.gamesContainerGHWidth;return s<=400?"base-logo-right400":s<=540?"base-logo-right540":s<=650?"base-logo-right650":"base-logo-right"},thumbnailhighlights(){const s=this.gamesContainerGHWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},teamlogo(){const s=this.gamesContainerGHWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},logoright(){const s=this.gamesContainerGHWidth;return s<=400?"logo-right400":s<=540?"logo-right540":s<=650?"logo-right650":"logo-right"},secondline(){const s=this.gamesContainerGHWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},titlename(){const s=this.gamesContainerGHWidth;return s<=400?"title-name400":s<=540?"title-name540":s<=650?"title-name650":"title-name"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Lm=new ResizeObserver(()=>{this.gamesContainerGHWidth=this.$refs.gamesContainerGH?this.$refs.gamesContainerGH.clientWidth:0,this.movil=this.gamesContainerGHWidth<740}),Lm.observe(this.$refs.gamesContainerGH);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Im=()=>{n.useCssVars(s=>({a281566c:s.colorBackgroundHome+"45","692c47db":s.colorBackgroundAway+"45","229d672a":s.colorBackgroundHome,"229a5539":s.colorBackgroundAway}))},Rm=Mr.setup;Mr.setup=Rm?(s,e)=>(Im(),Rm(s,e)):Im;const Nn=s=>(n.pushScopeId("data-v-dd4b2ba3"),s=s(),n.popScopeId(),s),qR=Nn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),YR=[qR],JR=Nn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),XR=["src"],ZR=Nn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),QR=Nn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),e4=["src"],t4=["src"],s4={class:"text-container"};function a4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerGH",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},YR,2)):n.createCommentVNode("",!0),t.dateGame!=""?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.date)},n.toDisplayString(t.dateGame),3)):n.createCommentVNode("",!0),t.matchday!=""&&t.seasonName!=""?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(o.containerinfogame)},[t.matchday!=""?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.matchcontainer)},n.toDisplayString(t.matchday),3)):n.createCommentVNode("",!0),t.seasonName!=""?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.seasoncontainer)},n.toDisplayString(t.seasonName),3)):n.createCommentVNode("",!0)],2)):n.createCommentVNode("",!0),JR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,XR),n.createElementVNode("div",{class:n.normalizeClass([o.baselogo,"position-image"])},null,2),n.createElementVNode("div",{class:n.normalizeClass(o.baselogoright)},null,2),ZR,QR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,e4),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.logoright)},null,10,t4),n.createElementVNode("div",s4,[n.createElementVNode("span",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.score),3),n.createElementVNode("div",{class:n.normalizeClass(o.titlename)},n.toDisplayString(t.titleCategory),3)])],2)}const n4=rs(Mr,[["render",a4],["__scopeId","data-v-dd4b2ba3"]]);let Bm=null;const $r={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerCWidth:0}},computed:{playbutton(){const s=this.gamesContainerCWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},teamlogo(){const s=this.gamesContainerCWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},firstline(){const s=this.gamesContainerCWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},secondline(){const s=this.gamesContainerCWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},playerimage(){const s=this.gamesContainerCWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerCWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Bm=new ResizeObserver(()=>{this.gamesContainerCWidth=this.$refs.gamesContainerC?this.$refs.gamesContainerC.clientWidth:0,this.movil=this.gamesContainerCWidth<740}),Bm.observe(this.$refs.gamesContainerC);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Nm=()=>{n.useCssVars(s=>({"9cae8720":s.colorBackgroundHome,"58cca122":s.colorBackgroundHome+"36"}))},Dm=$r.setup;$r.setup=Dm?(s,e)=>(Nm(),Dm(s,e)):Nm;const Sa=s=>(n.pushScopeId("data-v-ef4021c1"),s=s(),n.popScopeId(),s),i4=Sa(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),o4=[i4],r4=Sa(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),l4=["src"],c4=Sa(()=>n.createElementVNode("div",{class:"base-logo"},null,-1)),d4=["src"],h4=Sa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),u4={class:"text-container"},m4={class:"player-image position-image"},f4=["src"],p4=["src"],g4=["src"],y4=Sa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function b4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerC",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},o4,2),r4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,l4),c4,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,d4),h4,n.createElementVNode("div",u4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},n.toDisplayString(t.namePlayer),3),n.createElementVNode("span",{class:n.normalizeClass(o.secondline),style:n.normalizeStyle(t.nameCategory=="Balones recuperados en disputa "?"font-size: 25px":"")},n.toDisplayString(t.nameCategory),7)]),n.createElementVNode("div",m4,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,f4)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,p4)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,g4)):n.createCommentVNode("",!0)]),y4],2)}const S4=rs($r,[["render",b4],["__scopeId","data-v-ef4021c1"]]);let Pm=null;const Vr={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},showVideos:{type:Boolean,default:!0},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerCTWidth:0}},computed:{playbutton(){const s=this.gamesContainerCTWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerCTWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerCTWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerCTWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerCTWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Pm=new ResizeObserver(()=>{this.gamesContainerCTWidth=this.$refs.gamesContainerCT?this.$refs.gamesContainerCT.clientWidth:0,this.gamesContainerCTWidth<740?this.movil=!0:this.movil=!1}),Pm.observe(this.$refs.gamesContainerCT);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Om=()=>{n.useCssVars(s=>({"3ce1ca00":s.colorBackgroundHome,"916c7edc":s.colorBackgroundHome+"36"}))},Fm=Vr.setup;Vr.setup=Fm?(s,e)=>(Om(),Fm(s,e)):Om;const Dn=s=>(n.pushScopeId("data-v-191985e2"),s=s(),n.popScopeId(),s),w4=Dn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),_4=[w4],k4=Dn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),E4=["src"],T4={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo"},C4=["fill"],x4=["id"],v4=["stop-color"],A4=["stop-color"],L4=["src"],I4=Dn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),R4={class:"text-container"},B4=Dn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function N4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerCT",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},_4,2)):n.createCommentVNode("",!0),k4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,E4),(n.openBlock(),n.createElementBlock("svg",T4,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,C4),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_7_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundHome},null,8,v4),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundHome},null,8,A4)],8,x4)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,L4),I4,n.createElementVNode("div",R4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Local"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),B4],2)}const D4=rs(Vr,[["render",N4],["__scopeId","data-v-191985e2"]]);let Mm=null;const Ur={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerTAWidth:0}},computed:{playbutton(){const s=this.gamesContainerTAWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerTAWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerTAWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerTAWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerTAWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Mm=new ResizeObserver(()=>{this.gamesContainerTAWidth=this.$refs.gamesContainerTA?this.$refs.gamesContainerTA.clientWidth:0,this.movil=this.gamesContainerTAWidth<740}),Mm.observe(this.$refs.gamesContainerTA);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},$m=()=>{n.useCssVars(s=>({"1e0230d2":s.colorBackgroundHome,"1ae427ca":s.colorBackgroundHome+"36"}))},Vm=Ur.setup;Ur.setup=Vm?(s,e)=>($m(),Vm(s,e)):$m;const Pn=s=>(n.pushScopeId("data-v-61a93c22"),s=s(),n.popScopeId(),s),P4=Pn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),O4=[P4],F4=Pn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),M4=["src"],$4={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away"},V4=["fill"],U4=["id"],z4=["stop-color"],G4=["stop-color"],j4=["src"],H4=Pn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),W4={class:"text-container"},K4=Pn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function q4(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerTA",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},O4,2),F4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,M4),(n.openBlock(),n.createElementBlock("svg",$4,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,V4),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_7_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundAway},null,8,z4),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,G4)],8,U4)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,j4),H4,n.createElementVNode("div",W4,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Away"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),K4],2)}const Y4=rs(Ur,[["render",q4],["__scopeId","data-v-61a93c22"]]);let Um=null;const zr={components:{},props:{colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},logoHome:{type:String,default:""},logoAway:{type:String,default:""},score:{type:String,default:""},background:{type:String,default:""},nameTeam:{type:String,default:""},nameCategory:{type:String,default:""}},data(){return{gamesContainerTALWidth:0}},computed:{playbutton(){const s=this.gamesContainerTALWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},thumbnailhighlights(){const s=this.gamesContainerTALWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"},secondline(){const s=this.gamesContainerTALWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},firstline(){const s=this.gamesContainerTALWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},teamlogo(){const s=this.gamesContainerTALWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Um=new ResizeObserver(()=>{this.gamesContainerTALWidth=this.$refs.gamesContainerTAL?this.$refs.gamesContainerTAL.clientWidth:0,this.movil=this.gamesContainerTALWidth<740}),Um.observe(this.$refs.gamesContainerTAL);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},zm=()=>{n.useCssVars(s=>({"41af18a7":s.colorBackgroundHome,"1387690b":s.colorBackgroundHome+"36"}))},Gm=zr.setup;zr.setup=Gm?(s,e)=>(zm(),Gm(s,e)):zm;const On=s=>(n.pushScopeId("data-v-19ce95f3"),s=s(),n.popScopeId(),s),J4=On(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),X4=[J4],Z4=On(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),Q4=["src"],e3={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away-live"},t3=["fill"],s3=["id"],a3=["stop-color"],n3=["stop-color"],i3=["src"],o3=On(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),r3={class:"text-container"},l3=On(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function c3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerTAL",class:n.normalizeClass(o.thumbnailhighlights)},[n.createElementVNode("div",{class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},X4,2),Z4,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,Q4),(n.openBlock(),n.createElementBlock("svg",e3,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_10_"+t.nameTeam.replaceAll(" ","")+")"},null,8,t3),n.createElementVNode("defs",null,[n.createElementVNode("linearGradient",{id:"paint0_linear_10_"+t.nameTeam.replaceAll(" ",""),x1:"58.6578",y1:"15.5938",x2:"58.6578",y2:"124.094",gradientUnits:"userSpaceOnUse"},[n.createElementVNode("stop",{"stop-color":t.colorBackgroundAway},null,8,a3),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,n3)],8,s3)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,i3),o3,n.createElementVNode("div",r3,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},[t.nameTeam!="Away"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(t.nameTeam),1)],64)):n.createCommentVNode("",!0)],2),n.createElementVNode("div",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3)]),l3],2)}const d3=rs(zr,[["render",c3],["__scopeId","data-v-19ce95f3"]]);let jm=null;const Gr={components:{},props:{colorFontHome:{type:String,default:"#000000"},colorFontAway:{type:String,default:"#000000"},type:{type:Number,default:0},showVideos:{type:Boolean,default:!0},playStatus:{type:Number,default:2},matchday:{type:String,default:""},seasonName:{type:String,default:""},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},showimg:{type:Boolean,default:!0},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},date:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerGPWidth:0}},computed:{seasoncontainer(){const s=this.gamesContainerGPWidth;return s<=400?"season-container400":s<=540?"season-container540":s<=650?"season-container650":"season-container"},matchcontainer(){const s=this.gamesContainerGPWidth;return s<=400?"match-container400":s<=540?"match-container540":s<=650?"match-container650":"match-container"},seasonnameContainer(){const s=this.gamesContainerGPWidth;return s<=400?"seasonname400":s<=540?"seasonname540":s<=650?"seasonname650":"seasonname"},matchboxContainer(){const s=this.gamesContainerGPWidth;return s<=400?"matchbox400":s<=540?"matchbox540":s<=650?"matchbox650":"matchbox"},containerinfogame(){const s=this.gamesContainerGPWidth;return s<=400?"container-info-game400":s<=540?"container-info-game540":s<=650?"container-info-game650":"container-info-game"},playbutton(){const s=this.gamesContainerGPWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},points(){const s=this.gamesContainerGPWidth;return s<=400?"points400":s<=540?"points540":s<=650?"points650":"points"},teamname(){const s=this.gamesContainerGPWidth;return s<=400?"team-name400":s<=540?"team-name540":s<=650?"team-name650":"team-name"},teamscore(){const s=this.gamesContainerGPWidth;return s<=400?"team-score400":s<=540?"team-score540":s<=650?"team-score650":"team-score"},teamlogo(){const s=this.gamesContainerGPWidth;return s<=400?"team-logo400":s<=540?"team-logo540":s<=650?"team-logo650":"team-logo"},hometeam(){const s=this.gamesContainerGPWidth;return s<=400?"home-team400":s<=540?"home-team540":s<=650?"home-team650":"home-team"},awayteam(){const s=this.gamesContainerGPWidth;return s<=400?"away-team400":s<=540?"away-team540":s<=650?"away-team650":"away-team"},texttitle(){const s=this.gamesContainerGPWidth;return s<=400?"text-title400":s<=540?"text-title540":s<=650?"text-title650":"text-title"},texttitle2(){const s=this.gamesContainerGPWidth;return s<=400?"text-title2400":s<=540?"text-title2540":s<=650?"text-title2650":"text-title2"},playerimage(){const s=this.gamesContainerGPWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerGPWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)jm=new ResizeObserver(()=>{this.gamesContainerGPWidth=this.$refs.gamesContainerGP?this.$refs.gamesContainerGP.clientWidth:0,this.gamesContainerGPWidth<740?this.movil=!0:this.movil=!1}),jm.observe(this.$refs.gamesContainerGP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Hm=()=>{n.useCssVars(s=>({"14532c00":s.colorBackgroundHome,"14594fe2":s.colorBackgroundAway,"672ee12c":s.colorBackgroundAway+"62","11fb9192":s.colorBackgroundHome+"36"}))},Wm=Gr.setup;Gr.setup=Wm?(s,e)=>(Hm(),Wm(s,e)):Hm;const Fn=s=>(n.pushScopeId("data-v-77384f47"),s=s(),n.popScopeId(),s),h3=["width","src"],u3=Fn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),m3=Fn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),f3=[m3],p3={class:"player-container"},g3=["src"],y3=["src"],b3=["src"],S3={class:"container-score"},w3=["src"],_3=["src"],k3=["src"],E3=Fn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),T3=Fn(()=>n.createElementVNode("div",{class:"gradient-color"},null,-1));function C3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerGP",class:n.normalizeClass(o.thumbnailhighlights)},[t.playStatus!=2?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass((t.playStatus==1,"icon-thumb"))},[n.createElementVNode("img",{width:t.playStatus==1?60:40,src:t.playStatus==1?"http://golstatsimages.blob.core.windows.net/images-library/icn-live@2x.png":"http://golstatsimages.blob.core.windows.net/images-library/icn-info@2x.png"},null,8,h3)],2)):n.createCommentVNode("",!0),u3,t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},f3,2)):n.createCommentVNode("",!0),n.createElementVNode("div",p3,[n.createElementVNode("div",{class:n.normalizeClass(o.containerinfogame)},[n.createElementVNode("div",{class:n.normalizeClass(o.matchcontainer)},[t.matchday?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.matchboxContainer)},n.toDisplayString(t.matchday),3)):n.createCommentVNode("",!0),t.seasonName?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(o.seasonnameContainer)},n.toDisplayString(t.seasonName),3)):n.createCommentVNode("",!0)],2),t.date?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.seasoncontainer)},n.toDisplayString(t.date),3)):n.createCommentVNode("",!0)],2),t.type==0?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(o.texttitle)},n.toDisplayString(t.nameCategory),3)):(n.openBlock(),n.createElementBlock("span",{key:1,class:n.normalizeClass(o.texttitle2)},n.toDisplayString(t.nameCategory),3)),t.showimg?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,g3)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,y3)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,b3)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),n.createElementVNode("div",S3,[n.createElementVNode("div",{class:n.normalizeClass(o.hometeam)},[n.createElementVNode("span",{class:n.normalizeClass(o.teamname),style:n.normalizeStyle({color:t.colorFontAway})},n.toDisplayString(t.nameHomeTeam),7),n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,w3),n.createElementVNode("span",{class:n.normalizeClass(o.teamscore)},n.toDisplayString(t.scoreHome),3)],2),n.createElementVNode("span",{class:n.normalizeClass(o.points)},":",2),n.createElementVNode("div",{class:n.normalizeClass(o.awayteam)},[n.createElementVNode("span",{class:n.normalizeClass(o.teamscore)},n.toDisplayString(t.scoreAway),3),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,_3),n.createElementVNode("span",{class:n.normalizeClass(o.teamname),style:n.normalizeStyle({color:t.colorFontAway})},n.toDisplayString(t.nameAwayTeam),7)],2)])]),n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,k3),E3,T3],2)}const x3=rs(Gr,[["render",C3],["__scopeId","data-v-77384f47"]]);let Km=null;const jr={components:{},props:{colorFont:{type:String,default:"#000000"},showVideos:{type:Boolean,default:!0},colorBackgroundHome:{type:String,default:"#000000"},colorBackgroundAway:{type:String,default:"#FFFFFF"},nameCategory:{type:String,default:""},photoProfile:{type:String,default:""},logoHome:{type:String,default:""},logoAway:{type:String,default:""},scoreHome:{type:[String,Number],default:""},scoreAway:{type:[String,Number],default:""},background:{type:String,default:""},typeImg:{type:Number,default:0},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},namePlayer:{type:String,default:""}},data(){return{gamesContainerSPWidth:0}},computed:{playbutton(){const s=this.gamesContainerSPWidth;return s<=400?"play-button400":s<=540?"play-button540":s<=650?"play-button650":"play-button"},firstline(){const s=this.gamesContainerSPWidth;return s<=400?"first-line400":s<=540?"first-line540":s<=650?"first-line650":"first-line"},secondline(){const s=this.gamesContainerSPWidth;return s<=400?"second-line400":s<=540?"second-line540":s<=650?"second-line650":"second-line"},playername(){const s=this.gamesContainerSPWidth;return s<=400?"player-name400":s<=540?"player-name540":s<=650?"player-name650":"player-name"},playerimage(){const s=this.gamesContainerSPWidth;return s<=400?"player-image400":s<=540?"player-image540":s<=650?"player-image650":"player-image"},thumbnailhighlights(){const s=this.gamesContainerSPWidth;return s<=400?"thumbnail-highlights400":s<=540?"thumbnail-highlights540":s<=650?"thumbnail-highlights650":"thumbnail-highlights"}},methods:{onclickPlayVideos(){this.$emit("onclickPlayVideos")},setUpResizeObserver(){if(window.ResizeObserver)Km=new ResizeObserver(()=>{this.gamesContainerSPWidth=this.$refs.gamesContainerSP?this.$refs.gamesContainerSP.clientWidth:0,this.movil=this.gamesContainerSPWidth<740}),Km.observe(this.$refs.gamesContainerSP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},qm=()=>{n.useCssVars(s=>({"17845cea":s.colorBackgroundHome+"30","3e8f3cad":s.colorBackgroundHome}))},Ym=jr.setup;jr.setup=Ym?(s,e)=>(qm(),Ym(s,e)):qm;const Mn=s=>(n.pushScopeId("data-v-df5486d2"),s=s(),n.popScopeId(),s),v3=Mn(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[n.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})],-1)),A3=[v3],L3={class:"player-image position-image"},I3=["src"],R3=["src"],B3=["src"],N3=["src"],D3=Mn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),P3=["src"],O3=Mn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),F3={class:"text-container"},M3=Mn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),$3={class:"base-logo",width:"91",height:"216",viewBox:"0 0 91 216",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V3=["fill"];function U3(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",{ref:"gamesContainerSP",class:n.normalizeClass(o.thumbnailhighlights)},[t.showVideos?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.playbutton),onClick:e[0]||(e[0]=(...r)=>o.onclickPlayVideos&&o.onclickPlayVideos(...r))},A3,2)):n.createCommentVNode("",!0),n.createElementVNode("div",L3,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,I3)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,R3)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,B3)):n.createCommentVNode("",!0)]),n.createElementVNode("img",{src:t.logoHome,alt:"",class:"team-logo"},null,8,N3),D3,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,P3),O3,n.createElementVNode("div",F3,[n.createElementVNode("span",{class:n.normalizeClass(o.firstline)},"MEJORES JUGADAS",2),n.createElementVNode("span",{class:n.normalizeClass(o.secondline)},n.toDisplayString(t.nameCategory),3),n.createElementVNode("div",{class:n.normalizeClass(o.playername),style:n.normalizeStyle({color:t.colorFont})},n.toDisplayString(t.namePlayer),7)]),M3,(n.openBlock(),n.createElementBlock("svg",$3,[n.createElementVNode("path",{d:"M91.5 216L0 -0.5H91.5V216Z",fill:t.colorBackgroundHome},null,8,V3)]))],2)}const z3=rs(jr,[["render",U3],["__scopeId","data-v-df5486d2"]]);function G3(s){const e=n.ref({width:0,height:0});function t(){const a=s.value.getBoundingClientRect();e.value.width=a.width,e.value.height=a.height}return n.onMounted(()=>{t(),window.addEventListener("resize",t)}),n.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const j3="_ptg_1shb4_2",H3="_ptgtitle_1shb4_7",W3="_ptgtitle450_1shb4_23",K3="_pgtcontainercard_1shb4_39",q3="_pgtcontainercard350_1shb4_44",Y3={ptg:j3,ptgtitle:H3,ptgtitle450:W3,pgtcontainercard:K3,pgtcontainercard350:q3},Hr={components:{GSCSlider:KR,GSCThumbnailCategory:S4,GSCThumbnailCategoryTeam:D4,GSCThumbnailCategoryTeamAway:Y4,GSCThumbnailHighlightGamePlayer:x3,GSCThumbnailCategoryTeamAwayLive:d3,GSCThumbnailSummaryPlayer:z3,GSCThumbnailHighlightGameHistoric:n4},setup(){const s=n.ref("ptgDiv"),{elementSize:e}=G3(s);return{ptgDiv:s,elementSize:e}},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},receiveData:{type:Boolean,default:!1},information:{type:Array,default:()=>[]},title:{type:String,default:"100% de sus participaciones en cada partido:"},type:{type:Number,default:0},showVideos:{type:Boolean,default:!0},viewType:{type:Number,default:2},local:{type:Boolean,default:!0},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0D1D29"},backgroundFooter:{type:String,default:"#192733"},matchdayView:{type:Number,default:1},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsScrollHide:{type:Boolean,default:!1},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},awaitForSpecificsPlaysBySeason:{type:Boolean,default:!1},awaitForBestPlaysBySeasonAndTeam:{type:Boolean,default:!1},awaitForBestPlaysBySeasonAndGame:{type:Boolean,default:!1},awaitForTeamsInfo:{type:Boolean,default:!1},specificsPlaysBySeasonResponse:{type:Object,default:null},bestPlaysBySeasonAndTeamResponse:{type:Object,default:null},bestPlaysBySeasonAndGameResponse:{type:Object,default:null},teamsInfoResponse:{type:Object,default:null}},data(){return{token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",printData:[],teamsInfo:[],playerPhoto:!0,homeTeam:0,flagGames:[],lastseason:0,arrayMatchdays:[],awayTeam:0,goalCategories:[12,55,"35_r","54_r"],resumeCategories:[607,608,12,55,54,35,14,52,15,53,466,477],lastType:0,lastUrl:"",teamsInfoLastUrl:""}},watch:{data:{immediate:!0,handler(s){this.type!==14&&(this.receiveData||this.getTeamsInfo(s)),this.getStats(s)}},teamsInfoResponse(s){s&&(this.receiveData||this.getTeamsInfo(this.data))},bestPlaysBySeasonAndTeamResponse(s){s&&this.getStats(this.data)},bestPlaysBySeasonAndGameResponse(s){s&&this.getStats(this.data)},specificsPlaysBySeasonResponse(s){s&&this.getStats(this.data)}},computed:{ptgtitleClass(){return this.elementSize.width<=450?this.$style.ptgtitle450:this.$style.ptgtitle},pgtcontainercardClass(){return this.elementSize.width<=350?this.$style.pgtcontainercard350:this.$style.pgtcontainercard}},methods:{getBestPlaysUrl({season:s,player:e,team:t,game:a,category:i}){let o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/best-plays/seasons/";return s&&(o+=`${s}`),e&&(o+=`/players/${e}`),t&&(o+=`/teams/${t}`),a&&(o+=`/games/${a}`),i&&(o+=`/categories/${i}`),this.videoPrivilegesPlayingAs.has(1)&&!this.videoPrivilegesPlayingAs.has(2)?o+="?isLocal=1":this.videoPrivilegesPlayingAs.has(2)&&!this.videoPrivilegesPlayingAs.has(1)&&(o+="?isVisitor=1"),this.isWidget&&this.teamWidget!=0&&[3,4,5].includes(this.type)&&(o+=`?t=${this.teamWidget}`),o},getIsSameScenario(s,e){const t=this.lastType===s&&this.lastUrl===e;return t||(this.lastType=s,this.lastUrl=e),t},onclickPlayVideos(s){let e=[],t=s.data.game_id?[s.data.game_id]:null;s.type==2?s.data.position_id==1?s.data.category==0?e=s.isAllPlays?[14,52,15,53,300,301,308,309,310,311,304,305,306,307,260,261,312,265,266,267,268,313,314,43,324,323,478,479,480,481,474,475,476,477,40,26,325,16,51,462,463,151,154,156,591,592,159,162,163,429,165,593,594,168,171,172,430,174,595,596,177,180,181,431,467,358,361,363,366,369,370,469,372,376,378,379,470,381,385,387,388,471,607,608,262,263]:[42,55,324,323,608,39,774,802,52,53,40,54]:e=s.data.category:s.data.category==0?e=s.isAllPlays?[56,57,59,60,326,213,214,215,216,583,584,122,123,124,125,585,586,128,129,130,131,133,327,587,588,136,137,138,139,589,590,142,143,144,145,146,147,485,486,487,488,489,490,491,492,10,27,597,598,538,539,599,600,541,542,601,602,545,546,603,604,548,549,561,562,100,563,564,103,104,105,106,107,108,565,566,111,567,568,114,115,116,117,118,119,4,88,5,34,402,459,460,461,233,403,456,457,458,236,404,453,454,455,240,405,450,451,452,243,408,447,448,449,283,409,444,445,446,285,410,441,442,443,290,411,438,439,440,292,412,435,436,437,297,414,415,416,417,244,418,419,420,421,401,581,582,331,506,530,579,580,334,507,531,577,578,344,508,532,575,576,424,509,533,573,574,341,529,534,571,572,340,528,535,569,570,427,527,536,348,349,350,465,352,353,354,466,14,52,15,53,218,219,220,221,496,497,498,499,500,501,502,503,217,504,505,521,522,543,33,209,208,517,206,207,26,325,16,51,463,151,154,156,591,592,159,162,163,429,165,593,594,168,171,172,430,174,595,596,177,180,181,431,467,358,361,363,366,369,370,469,372,376,378,379,470,381,385,387,388,471,607,608,210,212]:[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:e=s.data.category:s.type==3?s.data.category==0?e=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:e=s.data.category:s.data.category!=0?e=s.data.category:e=[607,608,12,55,54,35,14,52,15,53,466,477],this.data.isPrematch===1&&(t=null);const a=[1,2,3];let i={type:s.data.has_mxm?1:0,seasonId:s.data.season_id,mainSectionType:1,playListType:s.type,categoryIds:s.categories&&s.categories.length?s.categories:e,gameIds:t,playerIds:s.data.player_id?[s.data.player_id]:[],goalkeeperIds:s.data.position_id==1?s.data.player_id?[s.data.player_id]:[]:[],teamId:s.data.team_id?s.data.team_id:0,matchResult:s.data.matchResult?[s.matchResult]:a,playData:{},advancedFilter:{playListTitle:""}};s.data.category!==0&&(i.advancedFilter.mainCategoryId=s.data.category),this.$emit("openmedia",i)},onClickVideos(s){this.$emit("onClickVideos",s)},onClickCard(s){this.$emit("onClickCard",s)},async getTeamsInfo(s){if(this.awaitForTeamsInfo&&!this.teamsInfoResponse)return;const e="https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/"+s.season;if(e===this.teamsInfoLastUrl)return;this.teamsInfoLastUrl=e;const t=xm.create({headers:{Authorization:`${this.token}`}}),a=this.awaitForTeamsInfo?this.teamsInfoResponse:await t.get(e);for(let i=0;i<a.data.teams.length;i++)this.teamsInfo[a.data.teams[i].team_id]=a.data.teams[i]},async getStats(s){if(!this.receiveData){const i=xm.create({headers:{Authorization:`${this.token}`}});var e=[],t={},a={};if(this.type===0){if(a=await i.get("https://uof4tt5l46.execute-api.us-west-2.amazonaws.com/prod/v3/playerInfo/"+s.season+"/"+s.player),this.videoPrivilegesPlayingAs)if(a.data.seasons[s.season]){const o=a.data.team_id;a.data.seasons[s.season].games_played=a.data.seasons[s.season].games_played.filter(r=>(r.playingAs=r.home_team===o?1:2,this.videoPrivilegesPlayingAs.has(r.playingAs)))}else{const o=a.data.team_id;a.data.national_seasons[s.season].games_played=a.data.national_seasons[s.season].games_played.filter(r=>(r.playingAs=r.home_team===o?1:2,this.videoPrivilegesPlayingAs.has(r.playingAs)))}if(a.data.seasons[s.season])for(let o=0;o<a.data.seasons[s.season].games_played.length;o++)t={player_id:s.player,color:a.data.info_thumbnails.colors.background_color,colorfont:a.data.info_thumbnails.colors.font_color,photo_profile:a.data.info_thumbnails.images.player_in_action[0]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.player_in_action[0]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].home_team+".png",player_name:a.data.seasons[s.season].games_played[o].home_team_acronym+" "+a.data.seasons[s.season].games_played[o].home_team_score+" : "+a.data.seasons[s.season].games_played[o].visiting_team_score+" "+a.data.seasons[s.season].games_played[o].visiting_team_acronym,team_id_b:a.data.seasons[s.season].games_played[o].home_team,season_id:a.data.seasons[s.season].games_played[o].season_id,name:"",date:this.obtenerNombreCompletoFecha(a.data.seasons[s.season].games_played[o].date),category:0,team_id:a.data.team_id,game_id:a.data.seasons[s.season].games_played[o].game_id,has_mxm:a.data.seasons[s.season].games_played[o].has_mxm,position_id:a.data.position_id,scorehome:a.data.seasons[s.season].games_played[o].home_team_score,scoreaway:a.data.seasons[s.season].games_played[o].visiting_team_score,hometeamacronym:a.data.seasons[s.season].games_played[o].home_team_acronym,visitingteamacronym:a.data.seasons[s.season].games_played[o].visiting_team_acronym,seasonname:a.data.seasons[s.season].name,seasonname2:a.data.seasons[s.season].name.replace("Clausura","CL ").replace("Apertura","AP "),match:a.data.seasons[s.season].games_played[o].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),score:a.data.seasons[s.season].games_played[o].home_team_score+" : "+a.data.seasons[s.season].games_played[o].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:a.data.seasons[s.season].games_played[o].info_thumbnails.home_colors.background_color,backgroundaway:a.data.seasons[s.season].games_played[o].info_thumbnails.away_colors.background_color,colorfont_home:a.data.seasons[s.season].games_played[o].info_thumbnails.home_colors.font_color,colorfont_away:a.data.seasons[s.season].games_played[o].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.seasons[s.season].games_played[o].visiting_team+".png",total:a.data.seasons[s.season].games_played[o].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.seasons[s.season].games_played[o].home_team+"_"+a.data.seasons[s.season].games_played[o].season_id+"_r1.jpg"},e.push(t);else for(let o=0;o<a.data.national_seasons[s.season].games_played.length;o++)t={player_id:s.player,color:a.data.info_thumbnails.colors.background_color,colorfont:a.data.info_thumbnails.colors.font_color,photo_profile:a.data.info_thumbnails.images.player_in_action[0]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.player_in_action[0]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].home_team+".png",player_name:a.data.national_seasons[s.season].games_played[o].home_team_acronym+" "+a.data.national_seasons[s.season].games_played[o].home_team_score+" : "+a.data.national_seasons[s.season].games_played[o].visiting_team_score+" "+a.data.national_seasons[s.season].games_played[o].visiting_team_acronym,team_id_b:a.data.national_seasons[s.season].games_played[o].home_team,season_id:a.data.national_seasons[s.season].games_played[o].season_id,name:"",date:this.obtenerNombreCompletoFecha(a.data.national_seasons[s.season].games_played[o].date),category:0,team_id:a.data.team_id,game_id:a.data.national_seasons[s.season].games_played[o].game_id,position_id:a.data.position_id,scorehome:a.data.national_seasons[s.season].games_played[o].home_team_score,scoreaway:a.data.national_seasons[s.season].games_played[o].visiting_team_score,hometeamacronym:a.data.national_seasons[s.season].games_played[o].home_team_acronym,visitingteamacronym:a.data.national_seasons[s.season].games_played[o].visiting_team_acronym,seasonname:a.data.national_seasons[s.season].name,seasonname2:a.data.national_seasons[s.season].name.replace("Clausura","CL ").replace("Apertura","AP "),match:a.data.national_seasons[s.season].games_played[o].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),score:a.data.national_seasons[s.season].games_played[o].home_team_score+" : "+a.data.national_seasons[s.season].games_played[o].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:a.data.national_seasons[s.season].games_played[o].info_thumbnails.home_colors.background_color,backgroundaway:a.data.national_seasons[s.season].games_played[o].info_thumbnails.away_colors.background_color,colorfont_home:a.data.national_seasons[s.season].games_played[o].info_thumbnails.home_colors.font_color,colorfont_away:a.data.national_seasons[s.season].games_played[o].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.national_seasons[s.season].games_played[o].visiting_team+".png",total:a.data.national_seasons[s.season].games_played[o].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.national_seasons[s.season].games_played[o].home_team+"_"+a.data.national_seasons[s.season].games_played[o].season_id+"_r1.jpg"},e.push(t)}if(this.type===1){if(this.awaitForBestPlaysBySeasonAndTeam&&!this.bestPlaysBySeasonAndTeamResponse)return;const o=this.getBestPlaysUrl({season:s.season,team:s.team});if(this.getIsSameScenario(1,o))return;a=this.awaitForBestPlaysBySeasonAndTeam?this.bestPlaysBySeasonAndTeamResponse:await i.get(o);for(let r=0;r<a.data.categories.length;r++){this.playerPhoto=!1;const l=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_categories.length),d=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_teams.length);t={player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_categories[l],background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_teams[d],color:a.data.categories[r].info_thumbnails.colors.background_color,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+a.data.categories[r].info_thumbnails.team_logo,player_name:a.data.categories[r].category_name,team_name:this.teamsInfo[a.data.team_id].colloquial_name,team_id:a.data.team_id,colorfont:a.data.categories[r].info_thumbnails.colors.font_color,team_id_b:a.data.team_id,category:a.data.categories[r].categories,season_id:a.data.season_id,total:a.data.categories[r].total,background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===2){const o=this.getBestPlaysUrl({season:s.season,game:s.game});if(this.getIsSameScenario(2,o))return;a=await i.get(o);for(let r=0;r<a.data.categories.length;r++){this.playerPhoto=!1;const l=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.player_in_action.length),d=Math.floor(Math.random()*a.data.categories[r].info_thumbnails.images.background_default_categories.length);t={player_action:a.data.categories[r].info_thumbnails.images.player_in_action[l]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.player_in_action[l]:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png",background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.categories[r].info_thumbnails.images.background_default_categories[d],color:a.data.categories[r].info_thumbnails.colors.background_color,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+a.data.categories[r].info_thumbnails.team_logo,player_name:a.data.categories[r].category_name,season_id:s.season,colorfont:a.data.categories[r].info_thumbnails.colors.font_color,player_id:s.player,team_id:a.data.categories[r].info_thumbnails.colors.team_id,category:a.data.categories[r].categories,total:a.data.categories[r].total,background_card:"https://az755631.vo.msecnd.net/players-profile/"+s.player+".png"},e.push(t)}}if(this.type===3){if(this.playerPhoto=!1,this.awaitForBestPlaysBySeasonAndGame&&!this.bestPlaysBySeasonAndGameResponse)return;const o=this.getBestPlaysUrl({season:s.season,game:s.game});if(this.getIsSameScenario(3,o))return;a=this.awaitForBestPlaysBySeasonAndGame?this.bestPlaysBySeasonAndGameResponse:await i.get(o),this.playVideosPrivileges&&(this.playVideosPrivileges.canPrivilegesTeamPlayVideos?a.data.games[0].players=a.data.games[0].players.filter(r=>r.team_id==this.playVideosPrivileges.seasonAndPrivileges.teamId):a.data.games[0].players=[]);for(let r=0;r<a.data.games[0].players.length;r++){const l=Math.floor(Math.random()*a.data.games[0].players[r].info_thumbnails.images.background_player_in_action.length),d=Math.floor(Math.random()*a.data.games[0].players[r].info_thumbnails.images.player_in_action.length);t={colorbackgroundhome:a.data.games[0].players[r].info_thumbnails.colors.background_color,colorbackgroundaway:"",nameplayer:a.data.games[0].players[r].player_name,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.games[0].players[r].info_thumbnails.images.background_player_in_action[l],namecategory:"RESUMEN",namehometeam:"",nameawayteam:"",category:0,colorfont:a.data.games[0].players[r].info_thumbnails.colors.font_color,team_id:a.data.games[0].players[r].team_id,player_id:a.data.games[0].players[r].player_id,game_id:a.data.games[0].game_id,has_mxm:a.data.games[0].has_mxm,season_id:a.data.season_id,logohome:a.data.games[0].players[r].team_logo,photoprofile:a.data.games[0].players[r].info_thumbnails.images.player_in_action[d]?"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.games[0].players[r].info_thumbnails.images.player_in_action[d]:"https://az755631.vo.msecnd.net/players-profile/"+a.data.games[0].players[r].player_id+".png",logoaway:"",scoreaway:"",scorehome:""},e.push(t)}}if(this.type===4){if(this.awaitForSpecificsPlaysBySeason&&!this.specificsPlaysBySeasonResponse)return;this.playerPhoto=!1;const o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/specifics-plays/seasons/"+s.season+"/games/"+s.game;if(this.getIsSameScenario(4,o))return;a=this.awaitForSpecificsPlaysBySeason?this.specificsPlaysBySeasonResponse:await i.get(o);for(let r=0;r<a.data.home_team.categories.length;r++){const l=Math.floor(Math.random()*a.data.home_team.categories[r].info_thumbnails.images.background_default_teams.length);t={game_id:a.data.game_id,has_mxm:a.data.has_mxm,season_id:a.data.season_id,team_id:a.data.home_team.team_id,category:a.data.home_team.categories[r].categories.concat(a.data.home_team.categories[r].rival_categories),background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.home_team.categories[r].info_thumbnails.images.background_default_categories[l],player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.home_team.categories[r].info_thumbnails.images.background_default_categories[l],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.home_team.team_id+".png",color:a.data.home_team.categories[r].info_thumbnails.colors.background_color,colorfont:a.data.home_team.categories[r].info_thumbnails.colors.font_color,player_name:a.data.home_team.categories[r].category_name,total:a.data.home_team.categories[r].total,team_name:"Local",background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.home_team.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===5){if(this.awaitForSpecificsPlaysBySeason&&!this.specificsPlaysBySeasonResponse)return;this.playerPhoto=!1;const o="https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/specifics-plays/seasons/"+s.season+"/games/"+s.game;if(this.getIsSameScenario(5,o))return;a=this.awaitForSpecificsPlaysBySeason?this.specificsPlaysBySeasonResponse:await i.get(o);for(let r=0;r<a.data.visiting_team.categories.length;r++){const l=Math.floor(Math.random()*a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories.length);t={game_id:a.data.game_id,has_mxm:a.data.has_mxm,season_id:a.data.season_id,team_id:a.data.visiting_team.team_id,category:a.data.visiting_team.categories[r].categories.concat(a.data.visiting_team.categories[r].rival_categories),background_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories[l],player_action:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.visiting_team.categories[r].info_thumbnails.images.background_default_categories[l],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+a.data.visiting_team.team_id+".png",team_name:"Away",color:a.data.visiting_team.categories[r].info_thumbnails.colors.background_color,colorfont:a.data.visiting_team.categories[r].info_thumbnails.colors.font_color,player_name:a.data.visiting_team.categories[r].category_name,total:a.data.visiting_team.categories[r].total,background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+a.data.visiting_team.team_id+"_"+a.data.season_id+"_r1.jpg"},e.push(t)}}if(this.type===6){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(6,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===7){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(7,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===8){const o=this.getBestPlaysUrl({season:s.season,player:s.player,category:s.category});if(this.getIsSameScenario(8,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,player_id:a.data.player_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+a.data.best_plays[r].info_thumbnails.player_logo,hometeamacronym:a.data.best_plays[r].home_team_acronym,visitingteamacronym:a.data.best_plays[r].away_team_acronym,seasonname:"",score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===9){const o=this.getBestPlaysUrl({season:s.season,player:s.player,category:s.category});if(this.getIsSameScenario(9,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,player_id:a.data.player_id,game_id:a.data.best_plays[r].game_id,has_mxm:a.data.best_plays[r].has_mxm,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:"",scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+a.data.best_plays[r].info_thumbnails.player_logo,score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)}if(this.type===10){const o="https://ws8d8ye2ii.execute-api.us-west-2.amazonaws.com/prod/v4/seasonsByTeam/"+s.team;if(this.getIsSameScenario(10,o))return;const r=await i.get(o);for(let l=0;l<r.data.seasons[s.season].games.length;l++){const d=Math.floor(Math.random()*r.data.seasons[s.season].games[l].info_thumbnails.images.background_default_games.length);t={photo_profile:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].visiting_team+".png",team_logo:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].home_team+".png",player_name:r.data.seasons[s.season].games[l].home_team_acronym+" "+r.data.seasons[s.season].games[l].home_team_score+" : "+r.data.seasons[s.season].games[l].visiting_team_score+" "+r.data.seasons[s.season].games[l].visiting_team_acronym,team_id:r.data.seasons[s.season].games[l].game_id,team_id_b:r.data.seasons[s.season].games[l].home_team,season_id:r.data.seasons[s.season].games[l].season_id,name:"",category:0,game_id:r.data.seasons[s.season].games[l].game_id,has_mxm:r.data.seasons[s.season].games[l].has_mxm,seasonname:r.data.seasons[s.season].name,match:r.data.seasons[s.season].games[l].matchday_name.replace("Matchday","Jor"),score:r.data.seasons[s.season].games[l].home_team_score+" : "+r.data.seasons[s.season].games[l].visiting_team_score,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.seasons[s.season].games[l].info_thumbnails.images.background_default_games[d],backgroundhome:r.data.seasons[s.season].games[l].info_thumbnails.home_colors.background_color,backgroundaway:r.data.seasons[s.season].games[l].info_thumbnails.away_colors.background_color,colorfont_home:r.data.best_plays[l].info_thumbnails.home_colors.font_color,colorfont_away:r.data.best_plays[l].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games[l].visiting_team+".png",total:r.data.seasons[s.season].games[l].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+r.data.seasons[s.season].games[l].home_team+"_"+r.data.seasons[s.season].games[l].season_id+"_r1.jpg"},e.push(t)}}if(this.type===11){const o="https://uof4tt5l46.execute-api.us-west-2.amazonaws.com/prod/v3/playerInfo/"+s.season+"/"+s.player;if(this.getIsSameScenario(11,o))return;const r=await i.get(o);for(let l=0;l<r.data.seasons[s.season].games_played.length;l++)t={has_mxm:r.data.seasons[s.season].games_played[l].has_mxm,category:0,player_id:s.player,team_id:r.data.team_id,game_id:r.data.seasons[s.season].games_played[l].game_id,position_id:r.data.position_id,color:r.data.info_thumbnails.colors.background_color,photo_profile:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.info_thumbnails.images.player_in_action[0],team_logo:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].home_team+".png",player_name:r.data.seasons[s.season].games_played[l].home_team_acronym+" "+r.data.seasons[s.season].games_played[l].home_team_score+" : "+r.data.seasons[s.season].games_played[l].visiting_team_score+" "+r.data.seasons[s.season].games_played[l].visiting_team_acronym,team_id_b:r.data.seasons[s.season].games_played[l].home_team,season_id:r.data.seasons[s.season].games_played[l].season_id,name:r.data.seasons[s.season].games_played[l].player_name,seasonname:r.data.seasons[s.season].name,match:r.data.seasons[s.season].games_played[l].matchday_name.replace("Matchday","Jor"),scorehome:r.data.seasons[s.season].games_played[l].home_team_score,scoreaway:r.data.seasons[s.season].games_played[l].visiting_team_score,hometeamacronym:r.data.seasons[s.season].games_played[l].home_team_acronym,visitingteamacronym:r.data.seasons[s.season].games_played[l].visiting_team_acronym,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data.info_thumbnails.images.background_player_in_action[0],backgroundhome:r.data.seasons[s.season].games_played[l].info_thumbnails.home_colors.background_color,backgroundaway:r.data.seasons[s.season].games_played[l].info_thumbnails.away_colors.background_color,colorfont_home:r.data.seasons[s.season].games_played[l].info_thumbnails.home_colors.font_color,colorfont_away:r.data.seasons[s.season].games_played[l].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].home_team+".png",logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data.seasons[s.season].games_played[l].visiting_team+".png",total:r.data.seasons[s.season].games_played[l].matchday_abbreviation.replace("M","Jor "),background_card:"https://az755631.vo.msecnd.net/golstats2-teams/"+r.data.seasons[s.season].games_played[l].home_team+"_"+r.data.seasons[s.season].games_played[l].season_id+"_r1.jpg"},e.push(t)}if(this.type===12){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(12,o))return;const r=await i.get(o);for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1]},e.push(t)}if(this.type===13){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(13,o))return;const r=await i.get(o);for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1]},e.push(t)}if(this.type===14&&(e=[],s.season)){if(this.lastseason!==s.season){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(14,o))return;const r=await i.get(o);this.flagGames=[],this.arrayMatchdays=[];for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)r.data[l].best_plays[d].score[0]==0&&r.data[l].best_plays[d].score[1]==0||(t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,plays_status:r.data[l].best_plays[d].plays_status,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,date_time:new Date(r.data[l].best_plays[d].date_time_utc).valueOf(),colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1],matchday_id:r.data[l].best_plays[d].matchday_id},this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]?this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id)):(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]=[],this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id))));e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((l,d)=>d.date_time-l.date_time):[]}else e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((o,r)=>r.date_time-o.date_time):[];this.lastseason=s.season}if(this.type===15&&(e=[],s.season)){if(this.lastseason!==s.season){const o=this.getBestPlaysUrl({season:s.season,category:s.category});if(this.getIsSameScenario(15,o))return;const r=await i.get(o);this.flagGames=[],this.arrayMatchdays=[];for(let l=0;l<r.data.length;l++)for(let d=0;d<r.data[l].best_plays.length;d++)r.data[l].best_plays[d].score[0]==0&&r.data[l].best_plays[d].score[1]==0||r.data[l].best_plays[d].home_team!=s.team&&r.data[l].best_plays[d].visiting_team!=s.team||(t={has_mxm:r.data[l].best_plays[d].has_mxm,category:r.data[l].best_plays[d].categories,game_id:r.data[l].best_plays[d].game_id,plays_status:r.data[l].best_plays[d].plays_status,season_id:r.data[l].season_id,backgroundhome:r.data[l].best_plays[d].info_thumbnails.home_colors.background_color,backgroundaway:r.data[l].best_plays[d].info_thumbnails.away_colors.background_color,colorfont_home:r.data[l].best_plays[d].info_thumbnails.home_colors.font_color,date_time:new Date(r.data[l].best_plays[d].date_time_utc).valueOf(),colorfont_away:r.data[l].best_plays[d].info_thumbnails.away_colors.font_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+r.data[l].best_plays[d].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+r.data[l].best_plays[d].info_thumbnails.images.background_default_categories[0],match:"",scorehome:r.data[l].best_plays[d].score[0],scoreaway:r.data[l].best_plays[d].score[1],seasonname:"",photo_profile:"https://az755631.vo.msecnd.net/players-profile/"+r.data[l].best_plays[d].info_thumbnails.player_logo,score:r.data[l].best_plays[d].score[0]+" : "+r.data[l].best_plays[d].score[1],matchday_id:r.data[l].best_plays[d].matchday_id},this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]?this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id)):(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id]=[],this.flagGames.includes(t.game_id)||(this.arrayMatchdays[r.data[l].best_plays[d].matchday_id].push(t),this.flagGames.push(t.game_id))));e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((l,d)=>d.date_time-l.date_time):[]}else e=this.arrayMatchdays[this.matchdayView]?this.arrayMatchdays[this.matchdayView].sort((o,r)=>r.date_time-o.date_time):[];this.lastseason=s.season}if(this.type===16){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(16,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)this.viewType==2&&a.data.best_plays[r].home_team==s.team&&(t={has_mxm:a.data.best_plays[r].has_mxm,category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==1&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==3&&a.data.best_plays[r].visiting_team==s.team&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t))}if(this.type===17){const o=this.getBestPlaysUrl({season:s.season,team:s.team,category:s.category});if(this.getIsSameScenario(17,o))return;a=await i.get(o);for(let r=0;r<a.data.best_plays.length;r++)this.viewType==2&&a.data.best_plays[r].home_team==s.team&&(t={has_mxm:a.data.best_plays[r].has_mxm,category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==1&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t)),this.viewType==3&&a.data.best_plays[r].visiting_team==s.team&&(t={category:a.data.best_plays[r].categories,team_id:a.data.team_id,game_id:a.data.best_plays[r].game_id,season_id:a.data.season_id,scorehome:a.data.best_plays[r].score[0],scoreaway:a.data.best_plays[r].score[1],backgroundhome:a.data.best_plays[r].info_thumbnails.home_colors.background_color,colorfont_home:a.data.best_plays[r].info_thumbnails.home_colors.font_color,colorfont_away:a.data.best_plays[r].info_thumbnails.away_colors.font_color,backgroundaway:a.data.best_plays[r].info_thumbnails.away_colors.background_color,logohome:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.home_team_logo,logoaway:"https://az755631.vo.msecnd.net/teams-150/"+a.data.best_plays[r].info_thumbnails.away_team_logo,background:"https://golstatsimages.blob.core.windows.net/images-library/"+a.data.best_plays[r].info_thumbnails.images.background_default_categories[0],match:a.data.best_plays[r].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV"),seasonname:a.data.best_plays[r].season_name.replace("Clausura","CL ").replace("Apertura","AP "),score:a.data.best_plays[r].score[0]+" : "+a.data.best_plays[r].score[1]},e.push(t))}this.printData=e}},obtenerNombreCompletoFecha(s){if(s){const e=new Date(s),t=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"][e.getUTCDay()],a=e.getUTCDate(),i=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][e.getUTCMonth()];return`${t} ${a} de ${i}`}else return""}},async created(){}},Jm=()=>{n.useCssVars(s=>({"4f699db7":s.backgroundColor}))},Xm=Hr.setup;Hr.setup=Xm?(s,e)=>(Jm(),Xm(s,e)):Jm;function J3(s,e,t,a,i,o){const r=n.resolveComponent("GSCThumbnailSummaryPlayer"),l=n.resolveComponent("GSCThumbnailCategoryTeam"),d=n.resolveComponent("GSCThumbnailCategoryTeamAwayLive"),c=n.resolveComponent("GSCSlider"),h=n.resolveComponent("GSCThumbnailCategory"),u=n.resolveComponent("GSCThumbnailCategoryTeamAway"),f=n.resolveComponent("GSCThumbnailHighlightGamePlayer"),p=n.resolveComponent("GSCThumbnailHighlightGameHistoric");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(s.$style.ptg),ref:"ptgDiv"},[n.createElementVNode("div",{class:n.normalizeClass(o.ptgtitleClass)},n.toDisplayString(t.title),3),t.receiveData?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t.information.length>0?(n.openBlock(),n.createBlock(c,{key:0,backgroundColor:t.backgroundColor,pxScroll:t.pxScroll,arrows:t.arrows,arrowsScrollHide:t.arrowsScrollHide,arrowsHideOnNoScroll:t.arrowsHideOnNoScroll,arrowsColor:t.arrowsColor,arrowsHeight:t.arrowsWidth,arrowsWidth:t.arrowsWidth,arrowsPadding:t.arrowsPadding,arrowsMargin:t.arrowsMargin,arrowsRadius:t.arrowsRadius,arrowsBorder:t.arrowsBorder,arrowsBackground:t.arrowsBackground,arrowsContainerBgL:t.arrowsContainerBgL,arrowsContainerBgR:t.arrowsContainerBgR,scrollColor:t.scrollColor,arrowsPosition:t.arrowsPosition,height:t.height},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.information,(m,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(g==0?"margin-left: 0px !important; color: white;":"")},[t.type==3e3?(n.openBlock(),n.createBlock(r,{key:0,type:"player","color-background-home":m.colorbackgroundhome,"color-background-away":m.colorbackgroundaway,"name-player":m.nameplayer,"type-img":0,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.namehometeam,"name-away-team":m.nameawayteam,"name-category":"RESUMEN","logo-away":m.logoaway,"logo-home":m.logohome,"color-font":m.colorfont,"score-home":m.scorehome,"photo-profile":m.photoprofile,"score-away":m.logoaway,"type-style":"summary"},null,8,["color-background-home","color-background-away","name-player","onOnclickPlayVideos","background","name-home-team","name-away-team","logo-away","logo-home","color-font","score-home","photo-profile","score-away"])):n.createCommentVNode("",!0),t.type==4e3?(n.openBlock(),n.createBlock(l,{key:1,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0),t.type==5e3?(n.openBlock(),n.createBlock(d,{key:2,type:"team","name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-away":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["name-team","color-background-away","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0)],6))),128))]),_:1},8,["backgroundColor","pxScroll","arrows","arrowsScrollHide","arrowsHideOnNoScroll","arrowsColor","arrowsHeight","arrowsWidth","arrowsPadding","arrowsMargin","arrowsRadius","arrowsBorder","arrowsBackground","arrowsContainerBgL","arrowsContainerBgR","scrollColor","arrowsPosition","height"])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[i.printData.length>0?(n.openBlock(),n.createBlock(c,{key:0,backgroundColor:t.backgroundColor,pxScroll:t.pxScroll,arrows:t.arrows,arrowsScrollHide:t.arrowsScrollHide,arrowsHideOnNoScroll:t.arrowsHideOnNoScroll,arrowsColor:t.arrowsColor,arrowsHeight:t.arrowsWidth,arrowsWidth:t.arrowsWidth,arrowsPadding:t.arrowsPadding,arrowsMargin:t.arrowsMargin,arrowsRadius:t.arrowsRadius,arrowsBorder:t.arrowsBorder,arrowsBackground:t.arrowsBackground,arrowsContainerBgL:t.arrowsContainerBgL,arrowsContainerBgR:t.arrowsContainerBgR,scrollColor:t.scrollColor,arrowsPosition:t.arrowsPosition,height:t.height},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.printData,(m,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(g==0?"margin-left: 0px !important; color: white;":"")},[t.type==2?(n.openBlock(),n.createBlock(h,{key:0,"color-background-home":m.color,"name-player":t.data.player_name,"type-img":"0",background:m.background_action,"name-category":m.player_name,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"photo-profile":m.player_action},null,8,["color-background-home","name-player","background","name-category","logo-home","onOnclickPlayVideos","photo-profile"])):t.type==1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[m.total>0?(n.openBlock(),n.createBlock(l,{key:0,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):n.createCommentVNode("",!0)],64)):t.type==4?(n.openBlock(),n.createBlock(l,{key:2,type:"team","show-videos":t.showVideos,"name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-home":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["show-videos","name-team","color-background-home","logo-home","onOnclickPlayVideos","background","name-category"])):t.type==5?(n.openBlock(),n.createBlock(u,{key:3,type:"team","name-team":m.team_name!=null?m.team_name:"","type-style":"category","color-background-away":m.color,"logo-home":m.team_logo,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3}),background:m.player_action,"name-category":m.player_name},null,8,["name-team","color-background-away","logo-home","onOnclickPlayVideos","background","name-category"])):t.type==0?(n.openBlock(),n.createBlock(f,{key:4,items:m,type:2,"name-category":"TODAS SUS JUGADAS","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2,isAllPlays:!0}),background:m.background,date:m.date,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname2},null,8,["items","color-background-home","color-background-away","color-font-home","color-font-away","logo-home","logo-away","onOnclickPlayVideos","background","date","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==6?(n.openBlock(),n.createBlock(p,{key:5,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"title-category":"GOLES","show-videos":t.showVideos,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3,categories:i.goalCategories}),matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","show-videos","onOnclickPlayVideos","matchday","season-name","score"])):t.type==7||t.type==16?(n.openBlock(),n.createBlock(p,{key:6,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"show-videos":t.showVideos,"title-category":"RESUMEN",onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:3,categories:i.resumeCategories}),matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","show-videos","onOnclickPlayVideos","matchday","season-name","score"])):t.type==8?(n.openBlock(),n.createBlock(f,{key:7,items:m,type:2,"name-category":"RESUMEN","color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-font-home","color-font-away","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==9?(n.openBlock(),n.createBlock(f,{key:8,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"logo-away":m.logoaway,background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","onOnclickPlayVideos","logo-away","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==10?(n.openBlock(),n.createBlock(p,{key:9,items:m,"color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1}),background:m.background,"title-category":"RESUMEN",matchday:m.match,"season-name":m.seasonname,score:m.score},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","matchday","season-name","score"])):t.type==11?(n.openBlock(),n.createBlock(f,{key:10,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","background","name-home-team","name-away-team","matchday","color-font-home","color-font-away","onOnclickPlayVideos","score-home","photo-profile","score-away","season-name"])):t.type==12?(n.openBlock(),n.createBlock(f,{key:11,items:m,type:2,"name-category":"RESUMEN","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,"color-font-home":m.colorfont_home,"color-font-away":m.colorfont_away,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","color-font-home","color-font-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==13?(n.openBlock(),n.createBlock(f,{key:12,items:m,type:2,"name-category":"GOLES","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1,categories:i.goalCategories}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):t.type==14||t.type==15||t.type==17?(n.openBlock(),n.createBlock(f,{key:13,items:m,type:2,"show-videos":t.showVideos,"play-status":m.plays_status?m.plays_status:0,"name-category":"GOLES","color-background-home":m.backgroundhome,"color-background-away":m.backgroundaway,"logo-home":m.logohome,"logo-away":m.logoaway,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:1,categories:i.goalCategories}),background:m.background,"name-home-team":m.hometeamacronym,"name-away-team":m.visitingteamacronym,matchday:m.match,"score-home":m.scorehome,showimg:!1,"photo-profile":m.photo_profile,"score-away":m.scoreaway,"season-name":m.seasonname},null,8,["items","show-videos","play-status","color-background-home","color-background-away","logo-home","logo-away","onOnclickPlayVideos","background","name-home-team","name-away-team","matchday","score-home","photo-profile","score-away","season-name"])):(n.openBlock(),n.createBlock(r,{key:14,type:"player","color-background-home":m.colorbackgroundhome,"color-background-away":m.colorbackgroundaway,"name-player":m.nameplayer,"type-img":0,onOnclickPlayVideos:y=>o.onclickPlayVideos({data:m,type:2}),background:m.background,"name-home-team":m.namehometeam,"name-away-team":m.nameawayteam,"name-category":"RESUMEN","logo-away":m.logoaway,"logo-home":m.logohome,"color-font":m.colorfont,"score-home":m.scorehome,"photo-profile":m.photoprofile,"score-away":m.logoaway,"type-style":"summary"},null,8,["color-background-home","color-background-away","name-player","onOnclickPlayVideos","background","name-home-team","name-away-team","logo-away","logo-home","color-font","score-home","photo-profile","score-away"]))],6))),128))]),_:1},8,["backgroundColor","pxScroll","arrows","arrowsScrollHide","arrowsHideOnNoScroll","arrowsColor","arrowsHeight","arrowsWidth","arrowsPadding","arrowsMargin","arrowsRadius","arrowsBorder","arrowsBackground","arrowsContainerBgL","arrowsContainerBgR","scrollColor","arrowsPosition","height"])):n.createCommentVNode("",!0)],64))],2)}const X3={name:"DiscoverVideos",components:{GscSwitchComponent:go,GSCPlayerTeamGame:rs(Hr,[["render",J3],["__cssModules",{$style:Y3}],["__scopeId","data-v-762f089f"]]),MatchDayPicker:Gh},props:{componentWidth:{type:Number,default:768},myTournament:{type:Number,default:1},videoType:{type:Number,default:1},isplayer:{type:Boolean,default:!1},team:{type:Number,default:0},player:{type:Number,default:0},user:{type:Object,default:()=>{}},nextRivalTeam:{type:Object,default:()=>{}},tournamentSelected:{type:Object,default:()=>({id:0})},defaultMatchDayKey:{type:String,default:""},isLeagueSelected:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},tournamentScheduleKeys:{type:Array,default:()=>[]},seasonSelected:{type:Object,default:()=>{}},defaultMediaPlayerSeason:{type:Number,default:0}},watch:{seasonSelected:{immediate:!0,deep:!1,async handler(){this.getDataGoals()}},tournamentSelected:{immediate:!0,deep:!1,async handler(s){this.myTournament!==s.id?this.currentTabMoreVideos="Goles":this.currentTabMoreVideos="Goles"}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},activeDropGoals:{handler(s){s&&(this.matchDayPickerKey+=1)},immediate:!0}},data(){return{token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://wlduw4woy3.execute-api.us-east-2.amazonaws.com/prod/best-plays/seasons/",showVideos:!0,currentTabMoreVideos:"Resumen",currentMobileTab:"Descubre videos",mobileClass:!1,activeDropGoals:!1,matchdayActive:{},resumeCategory:1000001,goalsCategory:1255e3,resumeType:1,goalsType:2,matchDayPickerKey:0}},mounted(){this.mobileClass=window.innerWidth<768,window.addEventListener("resize",this.handleResize)},methods:{async getDataGoals(){try{this.seasonSelected&&this.seasonSelected.id&&(await ve.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id+"/categories/"+this.goalsCategory),this.showVideos=!0)}catch{this.showVideos=!1}},onChangeMatchDay(s){this.matchdayActive=s,this.$emit("change-match-day",s)},handleResize(){this.mobileClass=window.innerWidth<768},onOpenMedia(s,e){e&&(s.type=0),this.$emit("openmedia",s)},onClickOpenMedia(){let t=1,a=[],i=[],o=0,r=this.defaultMediaPlayerSeason||this.user.season,l=[],d=[12,55,"35_r","54_r"],c=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257],h=[55,324,323,608,39,774,802,52,53,40,54];!this.user.is_generic&&this.tournamentSelected.id===this.user.tournament?(r=this.seasonSelected.id,this.user.is_goalkeeper?(a=[this.user.player],l=h,t=2):this.user.is_player?(i=[this.user.player],l=c,t=2):(o=this.user.team,l=d,t=3)):(l=d,t=1);const u={type:0,seasonId:r,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:t,gameIds:null,playerIds:i,goalkeeperIds:a,categoryIds:l,teamId:o,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};this.$emit("openmedia",u)}}},Z3={key:0,class:"discover-videos",ref:"discoverVideosRef"},Q3={class:"title-and-button"},e6={class:"calendar-container"};function t6(s,e,t,a,i,o){const r=n.resolveComponent("GscSwitchComponent"),l=n.resolveComponent("MatchDayPicker"),d=n.resolveComponent("GSCPlayerTeamGame");return i.showVideos?(n.openBlock(),n.createElementBlock("div",Z3,[n.createElementVNode("div",Q3,[n.createElementVNode("div",{class:n.normalizeClass(t.componentWidth>900?"menu-container":"menu-container-movil")},[n.createElementVNode("div",{class:n.normalizeClass(t.componentWidth>768?"title-value":t.componentWidth>600?"title-value-tablet":t.componentWidth>400?"title-value-mobile":"title-value-mobilesm")}," Videos ",2)],2),!t.user.is_generic&&t.myTournament===t.tournamentSelected.id?(n.openBlock(),n.createBlock(r,{key:0,buttons:["Goles","Resumen","Proximo rival"],onInput:e[0]||(e[0]=c=>i.currentTabMoreVideos=c),background:"trasparent",height:"24px",width:t.componentWidth>768?"140px":t.componentWidth>600?"120px":t.componentWidth>400?"100px":"81px","font-size":t.componentWidth>768?"14px":t.componentWidth>600||t.componentWidth>400?"12px":"9.1px","font-family":"Poppins-Light",backgroundOptionActive:"transparent",borderWidth:"2px",type:2,arrow:!1,selectedOption:i.currentTabMoreVideos,onOpenmedia:o.onOpenMedia},null,8,["width","font-size","selectedOption","onOpenmedia"])):n.createCommentVNode("",!0)]),i.currentTabMoreVideos=="Goles"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",e6,[n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(l,{height:"48px","margin-top":"5px","disable-matchdays":!0,"match-days":t.tournamentScheduleKeys,"is-landing-mode":!1,"items-to-show":t.componentWidth>600?17:t.componentWidth>400?13:9,"items-to-scroll":t.componentWidth>600?8:t.componentWidth>400?12:9,"default-match-day-key":t.defaultMatchDayKey,key:i.matchDayPickerKey,onChangeMatchDay:o.onChangeMatchDay},null,8,["match-days","items-to-show","items-to-scroll","default-match-day-key","onChangeMatchDay"]))]),n.createVNode(d,{style:{"margin-top":"-30px"},type:14,data:{season:t.seasonSelected.id,category:i.goalsCategory},width:"100%","matchday-view":Object.keys(i.matchdayActive).length>0?i.matchdayActive.matchDayId:1,backgroundColor:"transparent",title:"",onOpenmedia:o.onOpenMedia},null,8,["data","matchday-view","onOpenmedia"])],64)):n.createCommentVNode("",!0),i.currentTabMoreVideos=="Resumen"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.isplayer?(n.openBlock(),n.createBlock(d,{key:1,type:8,title:"",style:{"margin-top":"-30px"},backgroundColor:"transparent",data:{season:t.seasonSelected.id,player:t.player,category:1000001},width:"100%",onOpenmedia:e[3]||(e[3]=c=>o.onOpenMedia(c,!0))},null,8,["data"])):(n.openBlock(),n.createBlock(d,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"transparent",data:{season:t.seasonSelected.id,team:t.team,category:i.resumeCategory},width:"100%",onOpenmedia:e[2]||(e[2]=c=>o.onOpenMedia(c,!0))},null,8,["data"]))],64)):n.createCommentVNode("",!0),i.currentTabMoreVideos=="Proximo rival"?(n.openBlock(),n.createBlock(d,{key:2,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"transparent",data:{season:t.seasonSelected.id,team:t.nextRivalTeam.id,category:i.resumeCategory},width:"100%",onOpenmedia:e[4]||(e[4]=c=>o.onOpenMedia(c,!0))},null,8,["data"])):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0)}const s6=qe(X3,[["render",t6],["__scopeId","data-v-b485c3f6"]]),a6=["playId","league","season","gameId","playerName","refereeName","stadiumName","finalScore","scoreAtMomentOfPlay","gameDate","homeTeamName","homeTeamLogo","awayTeamName","awayTeamLogo","categoryId","categoryName","startTime","endTime","minuteOfPlay","momentOfPlay","videoUrl"];let Wr=null;function n6(){return Wr||(Wr=a6.reduce((s,e,t)=>(s[e]=t,s),{})),Wr}function i6(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Zm={exports:{}};(function(s,e){(function(t){var a=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(d,c,h){if(h=h||{},d=d.trim(),c=c.trim(),!c){if(!h.alwaysNormalize)return d;var u=l.parseURL(d);if(!u)throw new Error("Error trying to parse base URL.");return u.path=l.normalizePath(u.path),l.buildURLFromParts(u)}var f=l.parseURL(c);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return h.alwaysNormalize?(f.path=l.normalizePath(f.path),l.buildURLFromParts(f)):c;var p=l.parseURL(d);if(!p)throw new Error("Error trying to parse base URL.");if(!p.netLoc&&p.path&&p.path[0]!=="/"){var m=i.exec(p.path);p.netLoc=m[1],p.path=m[2]}p.netLoc&&!p.path&&(p.path="/");var g={scheme:p.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(g.netLoc=p.netLoc,f.path[0]!=="/"))if(!f.path)g.path=p.path,f.params||(g.params=p.params,f.query||(g.query=p.query));else{var y=p.path,b=y.substring(0,y.lastIndexOf("/")+1)+f.path;g.path=l.normalizePath(b)}return g.path===null&&(g.path=h.alwaysNormalize?l.normalizePath(f.path):f.path),l.buildURLFromParts(g)},parseURL:function(d){var c=a.exec(d);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(o,"");d.length!==(d=d.replace(r,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};s.exports=l})()})(Zm);var Kr=Zm.exports;function Qm(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,a)}return t}function Xe(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Qm(Object(t),!0).forEach(function(a){l6(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Qm(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}function o6(s,e){if(typeof s!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var a=t.call(s,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function r6(s){var e=o6(s,"string");return typeof e=="symbol"?e:String(e)}function l6(s,e,t){return e=r6(e),e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Ge(){return Ge=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(s[a]=t[a])}return s},Ge.apply(this,arguments)}const ne=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},c6=Number.isSafeInteger||function(s){return typeof s=="number"&&Math.abs(s)<=d6},d6=Number.MAX_SAFE_INTEGER||9007199254740991;let w=function(s){return s.MEDIA_ATTACHING="hlsMediaAttaching",s.MEDIA_ATTACHED="hlsMediaAttached",s.MEDIA_DETACHING="hlsMediaDetaching",s.MEDIA_DETACHED="hlsMediaDetached",s.BUFFER_RESET="hlsBufferReset",s.BUFFER_CODECS="hlsBufferCodecs",s.BUFFER_CREATED="hlsBufferCreated",s.BUFFER_APPENDING="hlsBufferAppending",s.BUFFER_APPENDED="hlsBufferAppended",s.BUFFER_EOS="hlsBufferEos",s.BUFFER_FLUSHING="hlsBufferFlushing",s.BUFFER_FLUSHED="hlsBufferFlushed",s.MANIFEST_LOADING="hlsManifestLoading",s.MANIFEST_LOADED="hlsManifestLoaded",s.MANIFEST_PARSED="hlsManifestParsed",s.LEVEL_SWITCHING="hlsLevelSwitching",s.LEVEL_SWITCHED="hlsLevelSwitched",s.LEVEL_LOADING="hlsLevelLoading",s.LEVEL_LOADED="hlsLevelLoaded",s.LEVEL_UPDATED="hlsLevelUpdated",s.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",s.LEVELS_UPDATED="hlsLevelsUpdated",s.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",s.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",s.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",s.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",s.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",s.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",s.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",s.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",s.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",s.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",s.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",s.CUES_PARSED="hlsCuesParsed",s.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",s.INIT_PTS_FOUND="hlsInitPtsFound",s.FRAG_LOADING="hlsFragLoading",s.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",s.FRAG_LOADED="hlsFragLoaded",s.FRAG_DECRYPTED="hlsFragDecrypted",s.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",s.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",s.FRAG_PARSING_METADATA="hlsFragParsingMetadata",s.FRAG_PARSED="hlsFragParsed",s.FRAG_BUFFERED="hlsFragBuffered",s.FRAG_CHANGED="hlsFragChanged",s.FPS_DROP="hlsFpsDrop",s.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",s.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",s.ERROR="hlsError",s.DESTROYING="hlsDestroying",s.KEY_LOADING="hlsKeyLoading",s.KEY_LOADED="hlsKeyLoaded",s.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",s.BACK_BUFFER_REACHED="hlsBackBufferReached",s.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",s}({}),fe=function(s){return s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError",s}({}),N=function(s){return s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",s.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",s.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",s.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",s.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_PARSING_ERROR="levelParsingError",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.FRAG_GAP="fragGap",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown",s}({});const _s=function(){},qr={trace:_s,debug:_s,log:_s,warn:_s,info:_s,error:_s};let wa=qr;function h6(s){const e=self.console[s];return e?e.bind(self.console,`[${s}] >`):_s}function u6(s,...e){e.forEach(function(t){wa[t]=s[t]?s[t].bind(s):h6(t)})}function m6(s,e){if(typeof console=="object"&&s===!0||typeof s=="object"){u6(s,"debug","log","info","warn","error");try{wa.log(`Debug logs enabled for "${e}" in hls.js version 1.5.15`)}catch{wa=qr}}else wa=qr}const A=wa,f6=/^(\d+)x(\d+)$/,ef=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Oe{constructor(e){typeof e=="string"&&(e=Oe.parseAttrList(e)),Ge(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const a=new Uint8Array(t.length/2);for(let i=0;i<t.length/2;i++)a[i]=parseInt(t.slice(i*2,i*2+2),16);return a}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const a=this[e];return a?parseFloat(a):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=f6.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const a={},i='"';for(ef.lastIndex=0;(t=ef.exec(e))!==null;){let o=t[2];o.indexOf(i)===0&&o.lastIndexOf(i)===o.length-1&&(o=o.slice(1,-1));const r=t[1].trim();a[r]=o}return a}}function p6(s){return s!=="ID"&&s!=="CLASS"&&s!=="START-DATE"&&s!=="DURATION"&&s!=="END-DATE"&&s!=="END-ON-NEXT"}function g6(s){return s==="SCTE35-OUT"||s==="SCTE35-IN"}class tf{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const a=t.attr;for(const i in a)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==a[i]){A.warn(`DATERANGE tag attribute: "${i}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=i;break}e=Ge(new Oe({}),a,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const a=new Date(this.attr["END-DATE"]);ne(a.getTime())&&(this._endDate=a)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(ne(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&ne(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class $n{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Re={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class sf{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Re.AUDIO]:null,[Re.VIDEO]:null,[Re.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const a=e.split("@",2);let i;a.length===1?i=(t==null?void 0:t.byteRangeEndOffset)||0:i=parseInt(a[1]),this._byteRange=[i,parseInt(a[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Kr.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Yr extends sf{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new $n,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const a=Object.keys(this.levelkeys);if(a.length===1)return this._decryptdata=this.levelkeys[a[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!ne(this.programDateTime))return null;const e=ne(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),a=t.length;if(a>1||a===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,a,i,o,r=!1){const{elementaryStreams:l}=this,d=l[e];if(!d){l[e]={startPTS:t,endPTS:a,startDTS:i,endDTS:o,partial:r};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,a),d.startDTS=Math.min(d.startDTS,i),d.endDTS=Math.max(d.endDTS,o)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Re.AUDIO]=null,e[Re.VIDEO]=null,e[Re.AUDIOVIDEO]=null}}class y6 extends sf{constructor(e,t,a,i,o){super(a),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new $n,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;const r=e.enumeratedString("BYTERANGE");r&&this.setByteRange(r,o),o&&(this.fragOffset=o.fragOffset+o.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const b6=10;class S6{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,a=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!a||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?ne(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||b6}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Jr(s){return Uint8Array.from(atob(s),e=>e.charCodeAt(0))}function w6(s){const e=Xr(s).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function _6(s){const e=function(a,i,o){const r=a[i];a[i]=a[o],a[o]=r};e(s,0,3),e(s,1,2),e(s,4,5),e(s,6,7)}function k6(s){const e=s.split(":");let t=null;if(e[0]==="data"&&e.length===2){const a=e[1].split(";"),i=a[a.length-1].split(",");if(i.length===2){const o=i[0]==="base64",r=i[1];o?(a.splice(-1,1),t=Jr(r)):t=w6(r)}}return t}function Xr(s){return Uint8Array.from(unescape(encodeURIComponent(s)),e=>e.charCodeAt(0))}const Ms=typeof self<"u"?self:void 0;var Ne={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ut={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function af(s){switch(s){case ut.FAIRPLAY:return Ne.FAIRPLAY;case ut.PLAYREADY:return Ne.PLAYREADY;case ut.WIDEVINE:return Ne.WIDEVINE;case ut.CLEARKEY:return Ne.CLEARKEY}}var _a={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function nf(s){if(s===_a.WIDEVINE)return Ne.WIDEVINE;if(s===_a.PLAYREADY)return Ne.PLAYREADY;if(s===_a.CENC||s===_a.CLEARKEY)return Ne.CLEARKEY}function of(s){switch(s){case Ne.FAIRPLAY:return ut.FAIRPLAY;case Ne.PLAYREADY:return ut.PLAYREADY;case Ne.WIDEVINE:return ut.WIDEVINE;case Ne.CLEARKEY:return ut.CLEARKEY}}function Zr(s){const{drmSystems:e,widevineLicenseUrl:t}=s,a=e?[Ne.FAIRPLAY,Ne.WIDEVINE,Ne.PLAYREADY,Ne.CLEARKEY].filter(i=>!!e[i]):[];return!a[Ne.WIDEVINE]&&t&&a.push(Ne.WIDEVINE),a}const rf=function(s){return Ms!=null&&(s=Ms.navigator)!=null&&s.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function E6(s,e,t,a){let i;switch(s){case Ne.FAIRPLAY:i=["cenc","sinf"];break;case Ne.WIDEVINE:case Ne.PLAYREADY:i=["cenc"];break;case Ne.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${s}`)}return T6(i,e,t,a)}function T6(s,e,t,a){return[{initDataTypes:s,persistentState:a.persistentState||"optional",distinctiveIdentifier:a.distinctiveIdentifier||"optional",sessionTypes:a.sessionTypes||[a.sessionType||"temporary"],audioCapabilities:e.map(o=>({contentType:`audio/mp4; codecs="${o}"`,robustness:a.audioRobustness||"",encryptionScheme:a.audioEncryptionScheme||null})),videoCapabilities:t.map(o=>({contentType:`video/mp4; codecs="${o}"`,robustness:a.videoRobustness||"",encryptionScheme:a.videoEncryptionScheme||null}))}]}function ks(s,e,t){return Uint8Array.prototype.slice?s.slice(e,t):new Uint8Array(Array.prototype.slice.call(s,e,t))}const Qr=(s,e)=>e+10<=s.length&&s[e]===73&&s[e+1]===68&&s[e+2]===51&&s[e+3]<255&&s[e+4]<255&&s[e+6]<128&&s[e+7]<128&&s[e+8]<128&&s[e+9]<128,lf=(s,e)=>e+10<=s.length&&s[e]===51&&s[e+1]===68&&s[e+2]===73&&s[e+3]<255&&s[e+4]<255&&s[e+6]<128&&s[e+7]<128&&s[e+8]<128&&s[e+9]<128,ka=(s,e)=>{const t=e;let a=0;for(;Qr(s,e);){a+=10;const i=Vn(s,e+6);a+=i,lf(s,e+10)&&(a+=10),e+=a}if(a>0)return s.subarray(t,t+a)},Vn=(s,e)=>{let t=0;return t=(s[e]&127)<<21,t|=(s[e+1]&127)<<14,t|=(s[e+2]&127)<<7,t|=s[e+3]&127,t},C6=(s,e)=>Qr(s,e)&&Vn(s,e+6)+10<=s.length-e,el=s=>{const e=df(s);for(let t=0;t<e.length;t++){const a=e[t];if(cf(a))return R6(a)}},cf=s=>s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp",x6=s=>{const e=String.fromCharCode(s[0],s[1],s[2],s[3]),t=Vn(s,4),a=10;return{type:e,size:t,data:s.subarray(a,a+t)}},df=s=>{let e=0;const t=[];for(;Qr(s,e);){const a=Vn(s,e+6);e+=10;const i=e+a;for(;e+8<i;){const o=x6(s.subarray(e)),r=v6(o);r&&t.push(r),e+=o.size+10}lf(s,e)&&(e+=10)}return t},v6=s=>s.type==="PRIV"?A6(s):s.type[0]==="W"?I6(s):L6(s),A6=s=>{if(s.size<2)return;const e=Ut(s.data,!0),t=new Uint8Array(s.data.subarray(e.length+1));return{key:s.type,info:e,data:t.buffer}},L6=s=>{if(s.size<2)return;if(s.type==="TXXX"){let t=1;const a=Ut(s.data.subarray(t),!0);t+=a.length+1;const i=Ut(s.data.subarray(t));return{key:s.type,info:a,data:i}}const e=Ut(s.data.subarray(1));return{key:s.type,data:e}},I6=s=>{if(s.type==="WXXX"){if(s.size<2)return;let t=1;const a=Ut(s.data.subarray(t),!0);t+=a.length+1;const i=Ut(s.data.subarray(t));return{key:s.type,info:a,data:i}}const e=Ut(s.data);return{key:s.type,data:e}},R6=s=>{if(s.data.byteLength===8){const e=new Uint8Array(s.data),t=e[3]&1;let a=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return a/=45,t&&(a+=4772185884e-2),Math.round(a)}},Ut=(s,e=!1)=>{const t=B6();if(t){const c=t.decode(s);if(e){const h=c.indexOf("\0");return h!==-1?c.substring(0,h):c}return c.replace(/\0/g,"")}const a=s.length;let i,o,r,l="",d=0;for(;d<a;){if(i=s[d++],i===0&&e)return l;if(i===0||i===3)continue;switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(i);break;case 12:case 13:o=s[d++],l+=String.fromCharCode((i&31)<<6|o&63);break;case 14:o=s[d++],r=s[d++],l+=String.fromCharCode((i&15)<<12|(o&63)<<6|(r&63)<<0);break}}return l};let tl;function B6(){if(!navigator.userAgent.includes("PlayStation 4"))return!tl&&typeof self.TextDecoder<"u"&&(tl=new self.TextDecoder("utf-8")),tl}const zt={hexDump:function(s){let e="";for(let t=0;t<s.length;t++){let a=s[t].toString(16);a.length<2&&(a="0"+a),e+=a}return e}},Un=Math.pow(2,32)-1,N6=[].push,hf={video:1,audio:2,id3:3,text:4};function Ke(s){return String.fromCharCode.apply(null,s)}function uf(s,e){const t=s[e]<<8|s[e+1];return t<0?65536+t:t}function re(s,e){const t=ff(s,e);return t<0?4294967296+t:t}function mf(s,e){let t=re(s,e);return t*=Math.pow(2,32),t+=re(s,e+4),t}function ff(s,e){return s[e]<<24|s[e+1]<<16|s[e+2]<<8|s[e+3]}function sl(s,e,t){s[e]=t>>24,s[e+1]=t>>16&255,s[e+2]=t>>8&255,s[e+3]=t&255}function D6(s){const e=s.byteLength;for(let t=0;t<e;){const a=re(s,t);if(a>8&&s[t+4]===109&&s[t+5]===111&&s[t+6]===111&&s[t+7]===102)return!0;t=a>1?t+a:e}return!1}function ye(s,e){const t=[];if(!e.length)return t;const a=s.byteLength;for(let i=0;i<a;){const o=re(s,i),r=Ke(s.subarray(i+4,i+8)),l=o>1?i+o:a;if(r===e[0])if(e.length===1)t.push(s.subarray(i+8,l));else{const d=ye(s.subarray(i+8,l),e.slice(1));d.length&&N6.apply(t,d)}i=l}return t}function P6(s){const e=[],t=s[0];let a=8;const i=re(s,a);a+=4;let o=0,r=0;t===0?(o=re(s,a),r=re(s,a+4),a+=8):(o=mf(s,a),r=mf(s,a+8),a+=16),a+=2;let l=s.length+r;const d=uf(s,a);a+=2;for(let c=0;c<d;c++){let h=a;const u=re(s,h);h+=4;const f=u&2147483647;if((u&2147483648)>>>31===1)return A.warn("SIDX has hierarchical references (not supported)"),null;const m=re(s,h);h+=4,e.push({referenceSize:f,subsegmentDuration:m,info:{duration:m/i,start:l,end:l+f-1}}),l+=f,h+=4,a=h}return{earliestPresentationTime:o,timescale:i,version:t,referencesCount:d,references:e}}function pf(s){const e=[],t=ye(s,["moov","trak"]);for(let i=0;i<t.length;i++){const o=t[i],r=ye(o,["tkhd"])[0];if(r){let l=r[0];const d=re(r,l===0?12:20),c=ye(o,["mdia","mdhd"])[0];if(c){l=c[0];const h=re(c,l===0?12:20),u=ye(o,["mdia","hdlr"])[0];if(u){const f=Ke(u.subarray(8,12)),p={soun:Re.AUDIO,vide:Re.VIDEO}[f];if(p){const m=ye(o,["mdia","minf","stbl","stsd"])[0],g=O6(m);e[d]={timescale:h,type:p},e[p]=Xe({timescale:h,id:d},g)}}}}}return ye(s,["moov","mvex","trex"]).forEach(i=>{const o=re(i,4),r=e[o];r&&(r.default={duration:re(i,12),flags:re(i,20)})}),e}function O6(s){const e=s.subarray(8),t=e.subarray(86),a=Ke(e.subarray(4,8));let i=a;const o=a==="enca"||a==="encv";if(o){const l=ye(e,[a])[0].subarray(a==="enca"?28:78);ye(l,["sinf"]).forEach(c=>{const h=ye(c,["schm"])[0];if(h){const u=Ke(h.subarray(4,8));if(u==="cbcs"||u==="cenc"){const f=ye(c,["frma"])[0];f&&(i=Ke(f))}}})}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const r=ye(t,["avcC"])[0];i+="."+zn(r[1])+zn(r[2])+zn(r[3]);break}case"mp4a":{const r=ye(e,[a])[0],l=ye(r.subarray(28),["esds"])[0];if(l&&l.length>12){let d=4;if(l[d++]!==3)break;d=al(l,d),d+=2;const c=l[d++];if(c&128&&(d+=2),c&64&&(d+=l[d++]),l[d++]!==4)break;d=al(l,d);const h=l[d++];if(h===64)i+="."+zn(h);else break;if(d+=12,l[d++]!==5)break;d=al(l,d);const u=l[d++];let f=(u&248)>>3;f===31&&(f+=1+((u&7)<<3)+((l[d]&224)>>5)),i+="."+f}break}case"hvc1":case"hev1":{const r=ye(t,["hvcC"])[0],l=r[1],d=["","A","B","C"][l>>6],c=l&31,h=re(r,2),u=(l&32)>>5?"H":"L",f=r[12],p=r.subarray(6,12);i+="."+d+c,i+="."+h.toString(16).toUpperCase(),i+="."+u+f;let m="";for(let g=p.length;g--;){const y=p[g];(y||m)&&(m="."+y.toString(16).toUpperCase()+m)}i+=m;break}case"dvh1":case"dvhe":{const r=ye(t,["dvcC"])[0],l=r[2]>>1&127,d=r[2]<<5&32|r[3]>>3&31;i+="."+Gt(l)+"."+Gt(d);break}case"vp09":{const r=ye(t,["vpcC"])[0],l=r[4],d=r[5],c=r[6]>>4&15;i+="."+Gt(l)+"."+Gt(d)+"."+Gt(c);break}case"av01":{const r=ye(t,["av1C"])[0],l=r[1]>>>5,d=r[1]&31,c=r[2]>>>7?"H":"M",h=(r[2]&64)>>6,u=(r[2]&32)>>5,f=l===2&&h?u?12:10:h?10:8,p=(r[2]&16)>>4,m=(r[2]&8)>>3,g=(r[2]&4)>>2,y=r[2]&3;i+="."+l+"."+Gt(d)+c+"."+Gt(f)+"."+p+"."+m+g+y+"."+Gt(1)+"."+Gt(1)+"."+Gt(1)+"."+0;break}}return{codec:i,encrypted:o}}function al(s,e){const t=e+5;for(;s[e++]&128&&e<t;);return e}function zn(s){return("0"+s.toString(16).toUpperCase()).slice(-2)}function Gt(s){return(s<10?"0":"")+s}function F6(s,e){if(!s||!e)return s;const t=e.keyId;return t&&e.isCommonEncryption&&ye(s,["moov","trak"]).forEach(i=>{const r=ye(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=ye(r,["enca"]);const d=l.length>0;d||(l=ye(r,["encv"])),l.forEach(c=>{const h=d?c.subarray(28):c.subarray(78);ye(h,["sinf"]).forEach(f=>{const p=gf(f);if(p){const m=p.subarray(8,24);m.some(g=>g!==0)||(A.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${zt.hexDump(m)} -> ${zt.hexDump(t)}`),p.set(t,8))}})})}),s}function gf(s){const e=ye(s,["schm"])[0];if(e){const t=Ke(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ye(s,["schi","tenc"])[0]}return null}function M6(s,e){return ye(e,["moof","traf"]).reduce((t,a)=>{const i=ye(a,["tfdt"])[0],o=i[0],r=ye(a,["tfhd"]).reduce((l,d)=>{const c=re(d,4),h=s[c];if(h){let u=re(i,4);if(o===1){if(u===Un)return A.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;u*=Un+1,u+=re(i,8)}const f=h.timescale||9e4,p=u/f;if(ne(p)&&(l===null||p<l))return p}return l},null);return r!==null&&ne(r)&&(t===null||r<t)?r:t},null)}function $6(s,e){let t=0,a=0,i=0;const o=ye(s,["moof","traf"]);for(let r=0;r<o.length;r++){const l=o[r],d=ye(l,["tfhd"])[0],c=re(d,4),h=e[c];if(!h)continue;const u=h.default,f=re(d,0)|(u==null?void 0:u.flags);let p=u==null?void 0:u.duration;f&8&&(f&2?p=re(d,12):p=re(d,8));const m=h.timescale||9e4,g=ye(l,["trun"]);for(let y=0;y<g.length;y++){if(t=V6(g[y]),!t&&p){const b=re(g[y],4);t=p*b}h.type===Re.VIDEO?a+=t/m:h.type===Re.AUDIO&&(i+=t/m)}}if(a===0&&i===0){let r=1/0,l=0,d=0;const c=ye(s,["sidx"]);for(let h=0;h<c.length;h++){const u=P6(c[h]);if(u!=null&&u.references){r=Math.min(r,u.earliestPresentationTime/u.timescale);const f=u.references.reduce((p,m)=>p+m.info.duration||0,0);l=Math.max(l,f+u.earliestPresentationTime/u.timescale),d=l-r}}if(d&&ne(d))return d}return a||i}function V6(s){const e=re(s,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let a=0;const i=re(s,4);for(let o=0;o<i;o++){if(e&256){const r=re(s,t);a+=r,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return a}function U6(s,e,t){ye(e,["moof","traf"]).forEach(a=>{ye(a,["tfhd"]).forEach(i=>{const o=re(i,4),r=s[o];if(!r)return;const l=r.timescale||9e4;ye(a,["tfdt"]).forEach(d=>{const c=d[0],h=t*l;if(h){let u=re(d,4);if(c===0)u-=h,u=Math.max(u,0),sl(d,4,u);else{u*=Math.pow(2,32),u+=re(d,8),u-=h,u=Math.max(u,0);const f=Math.floor(u/(Un+1)),p=Math.floor(u%(Un+1));sl(d,4,f),sl(d,8,p)}}})})})}function z6(s){const e={valid:null,remainder:null},t=ye(s,["moof"]);if(t.length<2)return e.remainder=s,e;const a=t[t.length-1];return e.valid=ks(s,0,a.byteOffset-8),e.remainder=ks(s,a.byteOffset-8),e}function St(s,e){const t=new Uint8Array(s.length+e.length);return t.set(s),t.set(e,s.length),t}function yf(s,e){const t=[],a=e.samples,i=e.timescale,o=e.id;let r=!1;return ye(a,["moof"]).map(d=>{const c=d.byteOffset-8;ye(d,["traf"]).map(u=>{const f=ye(u,["tfdt"]).map(p=>{const m=p[0];let g=re(p,4);return m===1&&(g*=Math.pow(2,32),g+=re(p,8)),g/i})[0];return f!==void 0&&(s=f),ye(u,["tfhd"]).map(p=>{const m=re(p,4),g=re(p,0)&16777215,y=(g&1)!==0,b=(g&2)!==0,S=(g&8)!==0;let _=0;const C=(g&16)!==0;let E=0;const v=(g&32)!==0;let T=8;m===o&&(y&&(T+=8),b&&(T+=4),S&&(_=re(p,T),T+=4),C&&(E=re(p,T),T+=4),v&&(T+=4),e.type==="video"&&(r=G6(e.codec)),ye(u,["trun"]).map(B=>{const L=B[0],R=re(B,0)&16777215,$=(R&1)!==0;let K=0;const z=(R&4)!==0,ae=(R&256)!==0;let oe=0;const ie=(R&512)!==0;let ce=0;const de=(R&1024)!==0,Q=(R&2048)!==0;let q=0;const he=re(B,4);let J=8;$&&(K=re(B,J),J+=4),z&&(J+=4);let Z=K+c;for(let ue=0;ue<he;ue++){if(ae?(oe=re(B,J),J+=4):oe=_,ie?(ce=re(B,J),J+=4):ce=E,de&&(J+=4),Q&&(L===0?q=re(B,J):q=ff(B,J),J+=4),e.type===Re.VIDEO){let ge=0;for(;ge<ce;){const Ce=re(a,Z);if(Z+=4,j6(r,a[Z])){const se=a.subarray(Z,Z+Ce);bf(se,r?2:1,s+q/i,t)}Z+=Ce,ge+=Ce+4}}s+=oe/i}}))})})}),t}function G6(s){if(!s)return!1;const e=s.indexOf("."),t=e<0?s:s.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function j6(s,e){if(s){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function bf(s,e,t,a){const i=Sf(s);let o=0;o+=e;let r=0,l=0,d=0;for(;o<i.length;){r=0;do{if(o>=i.length)break;d=i[o++],r+=d}while(d===255);l=0;do{if(o>=i.length)break;d=i[o++],l+=d}while(d===255);const c=i.length-o;let h=o;if(l<c)o+=l;else if(l>c){A.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(r===4){if(i[h++]===181){const f=uf(i,h);if(h+=2,f===49){const p=re(i,h);if(h+=4,p===1195456820){const m=i[h++];if(m===3){const g=i[h++],y=31&g,b=64&g,S=b?2+y*3:0,_=new Uint8Array(S);if(b){_[0]=g;for(let C=1;C<S;C++)_[C]=i[h++]}a.push({type:m,payloadType:r,pts:t,bytes:_})}}}}}else if(r===5&&l>16){const u=[];for(let m=0;m<16;m++){const g=i[h++].toString(16);u.push(g.length==1?"0"+g:g),(m===3||m===5||m===7||m===9)&&u.push("-")}const f=l-16,p=new Uint8Array(f);for(let m=0;m<f;m++)p[m]=i[h++];a.push({payloadType:r,pts:t,uuid:u.join(""),userData:Ut(p),userDataBytes:p})}}}function Sf(s){const e=s.byteLength,t=[];let a=1;for(;a<e-2;)s[a]===0&&s[a+1]===0&&s[a+2]===3?(t.push(a+2),a+=2):a++;if(t.length===0)return s;const i=e-t.length,o=new Uint8Array(i);let r=0;for(a=0;a<i;r++,a++)r===t[0]&&(r++,t.shift()),o[a]=s[r];return o}function H6(s){const e=s[0];let t="",a="",i=0,o=0,r=0,l=0,d=0,c=0;if(e===0){for(;Ke(s.subarray(c,c+1))!=="\0";)t+=Ke(s.subarray(c,c+1)),c+=1;for(t+=Ke(s.subarray(c,c+1)),c+=1;Ke(s.subarray(c,c+1))!=="\0";)a+=Ke(s.subarray(c,c+1)),c+=1;a+=Ke(s.subarray(c,c+1)),c+=1,i=re(s,12),o=re(s,16),l=re(s,20),d=re(s,24),c=28}else if(e===1){c+=4,i=re(s,c),c+=4;const u=re(s,c);c+=4;const f=re(s,c);for(c+=4,r=2**32*u+f,c6(r)||(r=Number.MAX_SAFE_INTEGER,A.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=re(s,c),c+=4,d=re(s,c),c+=4;Ke(s.subarray(c,c+1))!=="\0";)t+=Ke(s.subarray(c,c+1)),c+=1;for(t+=Ke(s.subarray(c,c+1)),c+=1;Ke(s.subarray(c,c+1))!=="\0";)a+=Ke(s.subarray(c,c+1)),c+=1;a+=Ke(s.subarray(c,c+1)),c+=1}const h=s.subarray(c,s.byteLength);return{schemeIdUri:t,value:a,timeScale:i,presentationTime:r,presentationTimeDelta:o,eventDuration:l,id:d,payload:h}}function W6(s,...e){const t=e.length;let a=8,i=t;for(;i--;)a+=e[i].byteLength;const o=new Uint8Array(a);for(o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=a&255,o.set(s,4),i=0,a=8;i<t;i++)o.set(e[i],a),a+=e[i].byteLength;return o}function K6(s,e,t){if(s.byteLength!==16)throw new RangeError("Invalid system id");let a,i;a=0,i=new Uint8Array;let o;a>0?(o=new Uint8Array(4),e.length>0&&new DataView(o.buffer).setUint32(0,e.length,!1)):o=new Uint8Array;const r=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(r.buffer).setUint32(0,t.byteLength,!1),W6([112,115,115,104],new Uint8Array([a,0,0,0]),s,o,i,r,t||new Uint8Array)}function q6(s){const e=[];if(s instanceof ArrayBuffer){const t=s.byteLength;let a=0;for(;a+32<t;){const i=new DataView(s,a),o=Y6(i);e.push(o),a+=o.size}}return e}function Y6(s){const e=s.getUint32(0),t=s.byteOffset,a=s.byteLength;if(a<e)return{offset:t,size:a};if(s.getUint32(4)!==1886614376)return{offset:t,size:e};const o=s.getUint32(8)>>>24;if(o!==0&&o!==1)return{offset:t,size:e};const r=s.buffer,l=zt.hexDump(new Uint8Array(r,t+12,16)),d=s.getUint32(28);let c=null,h=null;if(o===0){if(e-32<d||d<22)return{offset:t,size:e};h=new Uint8Array(r,t+32,d)}else if(o===1){if(!d||a<t+32+d*16+16)return{offset:t,size:e};c=[];for(let u=0;u<d;u++)c.push(new Uint8Array(r,t+32+u*16,16))}return{version:o,systemId:l,kids:c,data:h,offset:t,size:e}}let Gn={};class Ea{static clearKeyUriToKeyIdMap(){Gn={}}constructor(e,t,a,i=[1],o=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=a,this.keyFormatVersions=i,this.iv=o,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ut.FAIRPLAY:case ut.WIDEVINE:case ut.PLAYREADY:case ut.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&A.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const a=J6(e);return new Ea(this.method,this.uri,"identity",this.keyFormatVersions,a)}const t=k6(this.uri);if(t)switch(this.keyFormat){case ut.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case ut.PLAYREADY:{const a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=K6(a,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),o=String.fromCharCode.apply(null,Array.from(i)),r=o.substring(o.indexOf("<"),o.length),c=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(c){const h=c.childNodes[0]?c.childNodes[0].nodeValue:c.getAttribute("VALUE");if(h){const u=Jr(h).subarray(0,16);_6(u),this.keyId=u}}break}default:{let a=t.subarray(0,16);if(a.length!==16){const i=new Uint8Array(16);i.set(a,16-a.length),a=i}this.keyId=a;break}}if(!this.keyId||this.keyId.byteLength!==16){let a=Gn[this.uri];if(!a){const i=Object.keys(Gn).length%Number.MAX_SAFE_INTEGER;a=new Uint8Array(16),new DataView(a.buffer,12,4).setUint32(0,i),Gn[this.uri]=a}this.keyId=a}return this}}function J6(s){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=s>>8*(15-t)&255;return e}const wf=/\{\$([a-zA-Z0-9-_]+)\}/g;function _f(s){return wf.test(s)}function mt(s,e,t){if(s.variableList!==null||s.hasVariableRefs)for(let a=t.length;a--;){const i=t[a],o=e[i];o&&(e[i]=nl(s,o))}}function nl(s,e){if(s.variableList!==null||s.hasVariableRefs){const t=s.variableList;return e.replace(wf,a=>{const i=a.substring(2,a.length-1),o=t==null?void 0:t[i];return o===void 0?(s.playlistParsingError||(s.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),a):o})}return e}function kf(s,e,t){let a=s.variableList;a||(s.variableList=a={});let i,o;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const r=new self.URL(t).searchParams;if(r.has(i))o=r.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${t}"`)}catch(r){s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${r.message}`))}}else i=e.NAME,o=e.VALUE;i in a?s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):a[i]=o||""}function X6(s,e,t){const a=e.IMPORT;if(t&&a in t){let i=s.variableList;i||(s.variableList=i={}),i[a]=t[a]}else s.playlistParsingError||(s.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${a}"`))}function Es(s=!0){return typeof self>"u"?void 0:(s||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Z6(s){return typeof self<"u"&&s===self.ManagedMediaSource}const jn={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Q6(s,e){const t=jn[e];return!!t&&!!t[s.slice(0,4)]}function il(s,e,t=!0){return!s.split(",").some(a=>!Ef(a,e,t))}function Ef(s,e,t=!0){var a;const i=Es(t);return(a=i==null?void 0:i.isTypeSupported(Ta(s,e)))!=null?a:!1}function Ta(s,e){return`${e}/mp4;codecs="${s}"`}function Tf(s){if(s){const e=s.substring(0,4);return jn.video[e]}return 2}function Hn(s){return s.split(",").reduce((e,t)=>{const a=jn.video[t];return a?(a*2+e)/(e?3:2):(jn.audio[t]+e)/(e?2:1)},0)}const ol={};function eB(s,e=!0){if(ol[s])return ol[s];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[s];for(let a=0;a<t.length;a++)if(Ef(t[a],"audio",e))return ol[s]=t[a],t[a];return s}const tB=/flac|opus/i;function Wn(s,e=!0){return s.replace(tB,t=>eB(t.toLowerCase(),e))}function Cf(s,e){return s&&s!=="mp4a"?s:e&&e.split(",")[0]}function sB(s){const e=s.split(",");for(let t=0;t<e.length;t++){const a=e[t].split(".");if(a.length>2){let i=a.shift()+".";i+=parseInt(a.shift()).toString(16),i+=("000"+parseInt(a.shift()).toString(16)).slice(-4),e[t]=i}}return e.join(",")}const xf=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,vf=/#EXT-X-MEDIA:(.*)/g,aB=/^#EXT(?:INF|-X-TARGETDURATION):/m,Af=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),nB=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class jt{static findGroup(e,t){for(let a=0;a<e.length;a++){const i=e[a];if(i.id===t)return i}}static resolve(e,t){return Kr.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return aB.test(e)}static parseMasterPlaylist(e,t){const a=_f(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:a},o=[];xf.lastIndex=0;let r;for(;(r=xf.exec(e))!=null;)if(r[1]){var l;const c=new Oe(r[1]);mt(i,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const h=nl(i,r[2]),u={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:jt.resolve(h,t)},f=c.decimalResolution("RESOLUTION");f&&(u.width=f.width,u.height=f.height),iB(c.CODECS,u),(l=u.unknownCodecs)!=null&&l.length||o.push(u),i.levels.push(u)}else if(r[3]){const c=r[3],h=r[4];switch(c){case"SESSION-DATA":{const u=new Oe(h);mt(i,u,["DATA-ID","LANGUAGE","VALUE","URI"]);const f=u["DATA-ID"];f&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[f]=u);break}case"SESSION-KEY":{const u=Lf(h,t,i);u.encrypted&&u.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(u)):A.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${h}"`);break}case"DEFINE":{{const u=new Oe(h);mt(i,u,["NAME","VALUE","QUERYPARAM"]),kf(i,u,t)}break}case"CONTENT-STEERING":{const u=new Oe(h);mt(i,u,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:jt.resolve(u["SERVER-URI"],t),pathwayId:u["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=If(h);break}}}const d=o.length>0&&o.length<i.levels.length;return i.levels=d?o:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,a){let i;const o={},r=a.levels,l={AUDIO:r.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:r.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let d=0;for(vf.lastIndex=0;(i=vf.exec(e))!==null;){const c=new Oe(i[1]),h=c.TYPE;if(h){const u=l[h],f=o[h]||[];o[h]=f,mt(a,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const p=c.LANGUAGE,m=c["ASSOC-LANGUAGE"],g=c.CHANNELS,y=c.CHARACTERISTICS,b=c["INSTREAM-ID"],S={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||p||"",type:h,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:p,url:c.URI?jt.resolve(c.URI,t):""};if(m&&(S.assocLang=m),g&&(S.channels=g),y&&(S.characteristics=y),b&&(S.instreamId=b),u!=null&&u.length){const _=jt.findGroup(u,S.groupId)||u[0];Rf(S,_,"audioCodec"),Rf(S,_,"textCodec")}f.push(S)}}return o}static parseLevelPlaylist(e,t,a,i,o,r){const l=new S6(t),d=l.fragments;let c=null,h=0,u=0,f=0,p=0,m=null,g=new Yr(i,t),y,b,S,_=-1,C=!1,E=null;for(Af.lastIndex=0,l.m3u8=e,l.hasVariableRefs=_f(e);(y=Af.exec(e))!==null;){C&&(C=!1,g=new Yr(i,t),g.start=f,g.sn=h,g.cc=p,g.level=a,c&&(g.initSegment=c,g.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,E&&(g.setByteRange(E),E=null)));const L=y[1];if(L){g.duration=parseFloat(L);const R=(" "+y[2]).slice(1);g.title=R||null,g.tagList.push(R?["INF",L,R]:["INF",L])}else if(y[3]){if(ne(g.duration)){g.start=f,S&&Df(g,S,l),g.sn=h,g.level=a,g.cc=p,d.push(g);const R=(" "+y[3]).slice(1);g.relurl=nl(l,R),Bf(g,m),m=g,f+=g.duration,h++,u=0,C=!0}}else if(y[4]){const R=(" "+y[4]).slice(1);m?g.setByteRange(R,m):g.setByteRange(R)}else if(y[5])g.rawProgramDateTime=(" "+y[5]).slice(1),g.tagList.push(["PROGRAM-DATE-TIME",g.rawProgramDateTime]),_===-1&&(_=d.length);else{if(y=y[0].match(nB),!y){A.warn("No matches on slow regex match for level playlist!");continue}for(b=1;b<y.length&&!(typeof y[b]<"u");b++);const R=(" "+y[b]).slice(1),$=(" "+y[b+1]).slice(1),K=y[b+2]?(" "+y[b+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":l.type=$.toUpperCase();break;case"MEDIA-SEQUENCE":h=l.startSN=parseInt($);break;case"SKIP":{const z=new Oe($);mt(l,z,["RECENTLY-REMOVED-DATERANGES"]);const ae=z.decimalInteger("SKIPPED-SEGMENTS");if(ne(ae)){l.skippedSegments=ae;for(let ie=ae;ie--;)d.unshift(null);h+=ae}const oe=z.enumeratedString("RECENTLY-REMOVED-DATERANGES");oe&&(l.recentlyRemovedDateranges=oe.split(" "));break}case"TARGETDURATION":l.targetduration=Math.max(parseInt($),1);break;case"VERSION":l.version=parseInt($);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"#":($||K)&&g.tagList.push(K?[$,K]:[$]);break;case"DISCONTINUITY":p++,g.tagList.push(["DIS"]);break;case"GAP":g.gap=!0,g.tagList.push([R]);break;case"BITRATE":g.tagList.push([R,$]);break;case"DATERANGE":{const z=new Oe($);mt(l,z,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),mt(l,z,z.clientAttrs);const ae=new tf(z,l.dateRanges[z.ID]);ae.isValid||l.skippedSegments?l.dateRanges[ae.id]=ae:A.warn(`Ignoring invalid DATERANGE tag: "${$}"`),g.tagList.push(["EXT-X-DATERANGE",$]);break}case"DEFINE":{{const z=new Oe($);mt(l,z,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in z?X6(l,z,r):kf(l,z,t)}break}case"DISCONTINUITY-SEQUENCE":p=parseInt($);break;case"KEY":{const z=Lf($,t,l);if(z.isSupported()){if(z.method==="NONE"){S=void 0;break}S||(S={}),S[z.keyFormat]&&(S=Ge({},S)),S[z.keyFormat]=z}else A.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${$}"`);break}case"START":l.startTimeOffset=If($);break;case"MAP":{const z=new Oe($);if(mt(l,z,["BYTERANGE","URI"]),g.duration){const ae=new Yr(i,t);Nf(ae,z,a,S),c=ae,g.initSegment=c,c.rawProgramDateTime&&!g.rawProgramDateTime&&(g.rawProgramDateTime=c.rawProgramDateTime)}else{const ae=g.byteRangeEndOffset;if(ae){const oe=g.byteRangeStartOffset;E=`${ae-oe}@${oe}`}else E=null;Nf(g,z,a,S),c=g,C=!0}break}case"SERVER-CONTROL":{const z=new Oe($);l.canBlockReload=z.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=z.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&z.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=z.optionalFloat("PART-HOLD-BACK",0),l.holdBack=z.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const z=new Oe($);l.partTarget=z.decimalFloatingPoint("PART-TARGET");break}case"PART":{let z=l.partList;z||(z=l.partList=[]);const ae=u>0?z[z.length-1]:void 0,oe=u++,ie=new Oe($);mt(l,ie,["BYTERANGE","URI"]);const ce=new y6(ie,g,t,oe,ae);z.push(ce),g.duration+=ce.duration;break}case"PRELOAD-HINT":{const z=new Oe($);mt(l,z,["URI"]),l.preloadHint=z;break}case"RENDITION-REPORT":{const z=new Oe($);mt(l,z,["URI"]),l.renditionReports=l.renditionReports||[],l.renditionReports.push(z);break}default:A.warn(`line parsed but not handled: ${y}`);break}}}m&&!m.relurl?(d.pop(),f-=m.duration,l.partList&&(l.fragmentHint=m)):l.partList&&(Bf(g,m),g.cc=p,l.fragmentHint=g,S&&Df(g,S,l));const v=d.length,T=d[0],B=d[v-1];if(f+=l.skippedSegments*l.targetduration,f>0&&v&&B){l.averagetargetduration=f/v;const L=B.sn;l.endSN=L!=="initSegment"?L:0,l.live||(B.endList=!0),T&&(l.startCC=T.cc)}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(f+=l.fragmentHint.duration),l.totalduration=f,l.endCC=p,_>0&&oB(d,_),l}}function Lf(s,e,t){var a,i;const o=new Oe(s);mt(t,o,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const r=(a=o.METHOD)!=null?a:"",l=o.URI,d=o.hexadecimalInteger("IV"),c=o.KEYFORMATVERSIONS,h=(i=o.KEYFORMAT)!=null?i:"identity";l&&o.IV&&!d&&A.error(`Invalid IV: ${o.IV}`);const u=l?jt.resolve(l,e):"",f=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ea(r,u,h,f,d)}function If(s){const t=new Oe(s).decimalFloatingPoint("TIME-OFFSET");return ne(t)?t:null}function iB(s,e){let t=(s||"").split(/[ ,]+/).filter(a=>a);["video","audio","text"].forEach(a=>{const i=t.filter(o=>Q6(o,a));i.length&&(e[`${a}Codec`]=i.join(","),t=t.filter(o=>i.indexOf(o)===-1))}),e.unknownCodecs=t}function Rf(s,e,t){const a=e[t];a&&(s[t]=a)}function oB(s,e){let t=s[e];for(let a=e;a--;){const i=s[a];if(!i)return;i.programDateTime=t.programDateTime-i.duration*1e3,t=i}}function Bf(s,e){s.rawProgramDateTime?s.programDateTime=Date.parse(s.rawProgramDateTime):e!=null&&e.programDateTime&&(s.programDateTime=e.endProgramDateTime),ne(s.programDateTime)||(s.programDateTime=null,s.rawProgramDateTime=null)}function Nf(s,e,t,a){s.relurl=e.URI,e.BYTERANGE&&s.setByteRange(e.BYTERANGE),s.level=t,s.sn="initSegment",a&&(s.levelkeys=a),s.initSegment=null}function Df(s,e,t){s.levelkeys=e;const{encryptedFragments:a}=t;(!a.length||a[a.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&a.push(s)}var xe={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},le={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Pf(s){const{type:e}=s;switch(e){case xe.AUDIO_TRACK:return le.AUDIO;case xe.SUBTITLE_TRACK:return le.SUBTITLE;default:return le.MAIN}}function rl(s,e){let t=s.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class rB{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_LOADING,this.onLevelLoading,this),e.on(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_LOADING,this.onLevelLoading,this),e.off(w.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(w.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,a=t.pLoader,i=t.loader,o=a||i,r=new o(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:a}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:xe.MANIFEST,url:a,deliveryDirectives:null})}onLevelLoading(e,t){const{id:a,level:i,pathwayId:o,url:r,deliveryDirectives:l}=t;this.load({id:a,level:i,pathwayId:o,responseType:"text",type:xe.LEVEL,url:r,deliveryDirectives:l})}onAudioTrackLoading(e,t){const{id:a,groupId:i,url:o,deliveryDirectives:r}=t;this.load({id:a,groupId:i,level:null,responseType:"text",type:xe.AUDIO_TRACK,url:o,deliveryDirectives:r})}onSubtitleTrackLoading(e,t){const{id:a,groupId:i,url:o,deliveryDirectives:r}=t;this.load({id:a,groupId:i,level:null,responseType:"text",type:xe.SUBTITLE_TRACK,url:o,deliveryDirectives:r})}load(e){var t;const a=this.hls.config;let i=this.getInternalLoader(e);if(i){const c=i.context;if(c&&c.url===e.url&&c.level===e.level){A.trace("[playlist-loader]: playlist request ongoing");return}A.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let o;if(e.type===xe.MANIFEST?o=a.manifestLoadPolicy.default:o=Ge({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),ne((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===xe.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===xe.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===xe.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const h=c.partTarget,u=c.targetduration;if(h&&u){const f=Math.max(h*3,u*.8)*1e3;o=Ge({},o,{maxTimeToFirstByteMs:Math.min(f,o.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(f,o.maxTimeToFirstByteMs)})}}}const r=o.errorRetry||o.timeoutRetry||{},l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:r.maxNumRetry||0,retryDelay:r.retryDelayMs||0,maxRetryDelay:r.maxRetryDelayMs||0},d={onSuccess:(c,h,u,f)=>{const p=this.getInternalLoader(u);this.resetInternalLoader(u.type);const m=c.data;if(m.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,u,new Error("no EXTM3U delimiter"),f||null,h);return}h.parsing.start=performance.now(),jt.isMediaPlaylist(m)?this.handleTrackOrLevelPlaylist(c,h,u,f||null,p):this.handleMasterPlaylist(c,h,u,f)},onError:(c,h,u,f)=>{this.handleNetworkError(h,u,!1,c,f)},onTimeout:(c,h,u)=>{this.handleNetworkError(h,u,!0,void 0,c)}};i.load(e,l,d)}handleMasterPlaylist(e,t,a,i){const o=this.hls,r=e.data,l=rl(e,a),d=jt.parseMasterPlaylist(r,l);if(d.playlistParsingError){this.handleManifestParsingError(e,a,d.playlistParsingError,i,t);return}const{contentSteering:c,levels:h,sessionData:u,sessionKeys:f,startTimeOffset:p,variableList:m}=d;this.variableList=m;const{AUDIO:g=[],SUBTITLES:y,"CLOSED-CAPTIONS":b}=jt.parseMasterPlaylistMedia(r,l,d);g.length&&!g.some(_=>!_.url)&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(A.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Oe({}),bitrate:0,url:""})),o.trigger(w.MANIFEST_LOADED,{levels:h,audioTracks:g,subtitles:y,captions:b,contentSteering:c,url:l,stats:t,networkDetails:i,sessionData:u,sessionKeys:f,startTimeOffset:p,variableList:m})}handleTrackOrLevelPlaylist(e,t,a,i,o){const r=this.hls,{id:l,level:d,type:c}=a,h=rl(e,a),u=0,f=ne(d)?d:ne(l)?l:0,p=Pf(a),m=jt.parseLevelPlaylist(e.data,h,f,p,u,this.variableList);if(c===xe.MANIFEST){const g={attrs:new Oe({}),bitrate:0,details:m,name:"",url:h};r.trigger(w.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:h,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),a.levelDetails=m,this.handlePlaylistLoaded(m,e,t,a,i,o)}handleManifestParsingError(e,t,a,i,o){this.hls.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.MANIFEST_PARSING_ERROR,fatal:t.type===xe.MANIFEST,url:e.url,err:a,error:a,reason:a.message,response:e,context:t,networkDetails:i,stats:o})}handleNetworkError(e,t,a=!1,i,o){let r=`A network ${a?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===xe.LEVEL?r+=`: ${e.level} id: ${e.id}`:(e.type===xe.AUDIO_TRACK||e.type===xe.SUBTITLE_TRACK)&&(r+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(r);A.warn(`[playlist-loader]: ${r}`);let d=N.UNKNOWN,c=!1;const h=this.getInternalLoader(e);switch(e.type){case xe.MANIFEST:d=a?N.MANIFEST_LOAD_TIMEOUT:N.MANIFEST_LOAD_ERROR,c=!0;break;case xe.LEVEL:d=a?N.LEVEL_LOAD_TIMEOUT:N.LEVEL_LOAD_ERROR,c=!1;break;case xe.AUDIO_TRACK:d=a?N.AUDIO_TRACK_LOAD_TIMEOUT:N.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case xe.SUBTITLE_TRACK:d=a?N.SUBTITLE_TRACK_LOAD_TIMEOUT:N.SUBTITLE_LOAD_ERROR,c=!1;break}h&&this.resetInternalLoader(e.type);const u={type:fe.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:h,context:e,error:l,networkDetails:t,stats:o};if(i){const f=(t==null?void 0:t.url)||e.url;u.response=Xe({url:f,data:void 0},i)}this.hls.trigger(w.ERROR,u)}handlePlaylistLoaded(e,t,a,i,o,r){const l=this.hls,{type:d,level:c,id:h,groupId:u,deliveryDirectives:f}=i,p=rl(t,i),m=Pf(i),g=typeof i.level=="number"&&m===le.MAIN?c:void 0;if(!e.fragments.length){const b=new Error("No Segments found in Playlist");l.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.LEVEL_EMPTY_ERROR,fatal:!1,url:p,error:b,reason:b.message,response:t,context:i,level:g,parent:m,networkDetails:o,stats:a});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const y=e.playlistParsingError;if(y){l.trigger(w.ERROR,{type:fe.NETWORK_ERROR,details:N.LEVEL_PARSING_ERROR,fatal:!1,url:p,error:y,reason:y.message,response:t,context:i,level:g,parent:m,networkDetails:o,stats:a});return}switch(e.live&&r&&(r.getCacheAge&&(e.ageHeader=r.getCacheAge()||0),(!r.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case xe.MANIFEST:case xe.LEVEL:l.trigger(w.LEVEL_LOADED,{details:e,level:g||0,id:h||0,stats:a,networkDetails:o,deliveryDirectives:f});break;case xe.AUDIO_TRACK:l.trigger(w.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break;case xe.SUBTITLE_TRACK:l.trigger(w.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break}}}function Of(s,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=s,e.dispatchEvent(t)}function Ff(s,e){const t=s.mode;if(t==="disabled"&&(s.mode="hidden"),s.cues&&!s.cues.getCueById(e.id))try{if(s.addCue(e),!s.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(a){A.debug(`[texttrack-utils]: ${a}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,s.addCue(i)}catch(i){A.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}t==="disabled"&&(s.mode=t)}function $s(s){const e=s.mode;if(e==="disabled"&&(s.mode="hidden"),s.cues)for(let t=s.cues.length;t--;)s.removeCue(s.cues[t]);e==="disabled"&&(s.mode=e)}function ll(s,e,t,a){const i=s.mode;if(i==="disabled"&&(s.mode="hidden"),s.cues&&s.cues.length>0){const o=cB(s.cues,e,t);for(let r=0;r<o.length;r++)(!a||a(o[r]))&&s.removeCue(o[r])}i==="disabled"&&(s.mode=i)}function lB(s,e){if(e<s[0].startTime)return 0;const t=s.length-1;if(e>s[t].endTime)return-1;let a=0,i=t;for(;a<=i;){const o=Math.floor((i+a)/2);if(e<s[o].startTime)i=o-1;else if(e>s[o].startTime&&a<t)a=o+1;else return o}return s[a].startTime-e<e-s[i].startTime?a:i}function cB(s,e,t){const a=[],i=lB(s,e);if(i>-1)for(let o=i,r=s.length;o<r;o++){const l=s[o];if(l.startTime>=e&&l.endTime<=t)a.push(l);else if(l.startTime>t)return a}return a}function Kn(s){const e=[];for(let t=0;t<s.length;t++){const a=s[t];(a.kind==="subtitles"||a.kind==="captions")&&a.label&&e.push(s[t])}return e}var Dt={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const dB=.25;function cl(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function Mf(s,e,t,a,i){let o=new s(e,t,"");try{o.value=a,i&&(o.type=i)}catch{o=new s(e,t,JSON.stringify(i?Xe({type:i},a):a))}return o}const qn=(()=>{const s=cl();try{s&&new s(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function dl(s,e){return s.getTime()/1e3-e}function hB(s){return Uint8Array.from(s.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class uB{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(w.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&($s(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const a=e[t];if(a.kind==="metadata"&&a.label==="id3")return Of(a,this.media),a}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:i}}}=this;if(!a&&!i)return;const{samples:o}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const r=cl();if(r)for(let l=0;l<o.length;l++){const d=o[l].type;if(d===Dt.emsg&&!a||!i)continue;const c=df(o[l].data);if(c){const h=o[l].pts;let u=h+o[l].duration;u>qn&&(u=qn),u-h<=0&&(u=h+dB);for(let p=0;p<c.length;p++){const m=c[p];if(!cf(m)){this.updateId3CueEnds(h,d);const g=Mf(r,h,u,m,d);g&&this.id3Track.addCue(g)}}}}}updateId3CueEnds(e,t){var a;const i=(a=this.id3Track)==null?void 0:a.cues;if(i)for(let o=i.length;o--;){const r=i[o];r.type===t&&r.startTime<e&&r.endTime===qn&&(r.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:a,type:i}){const{id3Track:o,hls:r}=this;if(!r)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:d}}=r;if(o&&(l||d)){let c;i==="audio"?c=h=>h.type===Dt.audioId3&&d:i==="video"?c=h=>h.type===Dt.emsg&&l:c=h=>h.type===Dt.audioId3&&d||h.type===Dt.emsg&&l,ll(o,t,a,c)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:a,id3Track:i}=this,{dateRanges:o}=t,r=Object.keys(o);if(i){const h=Object.keys(a).filter(u=>!r.includes(u));for(let u=h.length;u--;){const f=h[u];Object.keys(a[f].cues).forEach(p=>{i.removeCue(a[f].cues[p])}),delete a[f]}}const l=t.fragments[t.fragments.length-1];if(r.length===0||!ne(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const d=l.programDateTime/1e3-l.start,c=cl();for(let h=0;h<r.length;h++){const u=r[h],f=o[u],p=dl(f.startDate,d),m=a[u],g=(m==null?void 0:m.cues)||{};let y=(m==null?void 0:m.durationKnown)||!1,b=qn;const S=f.endDate;if(S)b=dl(S,d),y=!0;else if(f.endOnNext&&!y){const C=r.reduce((E,v)=>{if(v!==f.id){const T=o[v];if(T.class===f.class&&T.startDate>f.startDate&&(!E||f.startDate<E.startDate))return T}return E},null);C&&(b=dl(C.startDate,d),y=!0)}const _=Object.keys(f.attr);for(let C=0;C<_.length;C++){const E=_[C];if(!p6(E))continue;const v=g[E];if(v)y&&!m.durationKnown&&(v.endTime=b);else if(c){let T=f.attr[E];g6(E)&&(T=hB(T));const B=Mf(c,p,b,{key:E,data:T},Dt.dateRange);B&&(B.id=u,this.id3Track.addCue(B),g[E]=B)}}a[u]={cues:g,dateRange:f,durationKnown:y}}}}class mB{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:a,targetduration:i}=e,{liveSyncDuration:o,liveSyncDurationCount:r,lowLatencyMode:l}=this.config,d=this.hls.userConfig;let c=l&&a||t;(d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=o!==void 0?o:r*i);const h=i;return c+Math.min(this.stallCount*1,h)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,a=this.levelDetails;if(e===null||t===null||a===null)return null;const i=a.edge,o=e-t-this.edgeStalled,r=i-a.totalduration,l=i-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(r,o),l)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const a=e.buffered.length;return(a?e.buffered.end(a-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(w.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(w.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(w.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(w.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var a;t.details===N.BUFFER_STALLED_ERROR&&(this.stallCount++,(a=this.levelDetails)!=null&&a.live&&A.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const a=this.computeLatency();if(a===null)return;this._latency=a;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:o}=this.config;if(!i||o===1||!t.live)return;const r=this.targetLatency;if(r===null)return;const l=a-r,d=Math.min(this.maxLatency,r+t.targetduration);if(l<d&&l>.05&&this.forwardBufferLength>1){const h=Math.min(2,Math.max(1,o)),u=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;e.playbackRate=Math.min(h,Math.max(1,u))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const hl=["NONE","TYPE-0","TYPE-1",null];function fB(s){return hl.indexOf(s)>-1}const Yn=["SDR","PQ","HLG"];function pB(s){return!!s&&Yn.indexOf(s)>-1}var Jn={No:"",Yes:"YES",v2:"v2"};function $f(s){const{canSkipUntil:e,canSkipDateRanges:t,age:a}=s,i=a<e/2;return e&&i?t?Jn.v2:Jn.Yes:Jn.No}class Vf{constructor(e,t,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=a}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Vs{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Uf(this._audioGroups,e)}hasSubtitleGroup(e){return Uf(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let a=this._audioGroups;a||(a=this._audioGroups=[]),a.indexOf(t)===-1&&a.push(t)}else if(e==="text"){let a=this._subtitleGroups;a||(a=this._subtitleGroups=[]),a.indexOf(t)===-1&&a.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Uf(s,e){return!e||!s?!1:s.indexOf(e)!==-1}function ul(s,e){const t=e.startPTS;if(ne(t)){let a=0,i;e.sn>s.sn?(a=t-s.start,i=s):(a=s.start-t,i=e),i.duration!==a&&(i.duration=a)}else e.sn>s.sn?s.cc===e.cc&&s.minEndPTS?e.start=s.start+(s.minEndPTS-s.start):e.start=s.start+s.duration:e.start=Math.max(s.start-e.duration,0)}function zf(s,e,t,a,i,o){a-t<=0&&(A.warn("Fragment should have a positive duration",e),a=t+e.duration,o=i+e.duration);let l=t,d=a;const c=e.startPTS,h=e.endPTS;if(ne(c)){const y=Math.abs(c-t);ne(e.deltaPTS)?e.deltaPTS=Math.max(y,e.deltaPTS):e.deltaPTS=y,l=Math.max(t,c),t=Math.min(t,c),i=Math.min(i,e.startDTS),d=Math.min(a,h),a=Math.max(a,h),o=Math.max(o,e.endDTS)}const u=t-e.start;e.start!==0&&(e.start=t),e.duration=a-e.start,e.startPTS=t,e.maxStartPTS=l,e.startDTS=i,e.endPTS=a,e.minEndPTS=d,e.endDTS=o;const f=e.sn;if(!s||f<s.startSN||f>s.endSN)return 0;let p;const m=f-s.startSN,g=s.fragments;for(g[m]=e,p=m;p>0;p--)ul(g[p],g[p-1]);for(p=m;p<g.length-1;p++)ul(g[p],g[p+1]);return s.fragmentHint&&ul(g[g.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,u}function gB(s,e){let t=null;const a=s.fragments;for(let d=a.length-1;d>=0;d--){const c=a[d].initSegment;if(c){t=c;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;let i=0,o;if(SB(s,e,(d,c)=>{d.relurl&&(i=d.cc-c.cc),ne(d.startPTS)&&ne(d.endPTS)&&(c.start=c.startPTS=d.startPTS,c.startDTS=d.startDTS,c.maxStartPTS=d.maxStartPTS,c.endPTS=d.endPTS,c.endDTS=d.endDTS,c.minEndPTS=d.minEndPTS,c.duration=d.endPTS-d.startPTS,c.duration&&(o=c),e.PTSKnown=e.alignedSliding=!0),c.elementaryStreams=d.elementaryStreams,c.loader=d.loader,c.stats=d.stats,d.initSegment&&(c.initSegment=d.initSegment,t=d.initSegment)}),t&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(c=>{var h;c&&(!c.initSegment||c.initSegment.relurl===((h=t)==null?void 0:h.relurl))&&(c.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(d=>!d),e.deltaUpdateFailed){A.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let d=e.skippedSegments;d--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=yB(s.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const r=e.fragments;if(i){A.warn("discontinuity sliding from playlist, take drift into account");for(let d=0;d<r.length;d++)r[d].cc+=i}e.skippedSegments&&(e.startCC=e.fragments[0].cc),bB(s.partList,e.partList,(d,c)=>{c.elementaryStreams=d.elementaryStreams,c.stats=d.stats}),o?zf(e,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):Gf(s,e),r.length&&(e.totalduration=e.edge-r[0].start),e.driftStartTime=s.driftStartTime,e.driftStart=s.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const d=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=d),e.driftEndTime=l,e.driftEnd=d}else e.driftEndTime=s.driftEndTime,e.driftEnd=s.driftEnd,e.advancedDateTime=s.advancedDateTime}function yB(s,e,t){const a=Ge({},s);return t&&t.forEach(i=>{delete a[i]}),Object.keys(e).forEach(i=>{const o=new tf(e[i].attr,a[i]);o.isValid?a[i]=o:A.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[i].attr)}"`)}),a}function bB(s,e,t){if(s&&e){let a=0;for(let i=0,o=s.length;i<=o;i++){const r=s[i],l=e[i+a];r&&l&&r.index===l.index&&r.fragment.sn===l.fragment.sn?t(r,l):a--}}}function SB(s,e,t){const a=e.skippedSegments,i=Math.max(s.startSN,e.startSN)-e.startSN,o=(s.fragmentHint?1:0)+(a?e.endSN:Math.min(s.endSN,e.endSN))-e.startSN,r=e.startSN-s.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,d=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;for(let c=i;c<=o;c++){const h=d[r+c];let u=l[c];a&&!u&&c<a&&(u=e.fragments[c]=h),h&&u&&t(h,u)}}function Gf(s,e){const t=e.startSN+e.skippedSegments-s.startSN,a=s.fragments;t<0||t>=a.length||ml(e,a[t].start)}function ml(s,e){if(e){const t=s.fragments;for(let a=s.skippedSegments;a<t.length;a++)t[a].start+=e;s.fragmentHint&&(s.fragmentHint.start+=e)}}function wB(s,e=1/0){let t=1e3*s.targetduration;if(s.updated){const a=s.fragments;if(a.length&&t*4>e){const o=a[a.length-1].duration*1e3;o<t&&(t=o)}}else t/=2;return Math.round(t)}function _B(s,e,t){if(!(s!=null&&s.details))return null;const a=s.details;let i=a.fragments[e-a.startSN];return i||(i=a.fragmentHint,i&&i.sn===e)?i:e<a.startSN&&t&&t.sn===e?t:null}function jf(s,e,t){var a;return s!=null&&s.details?Hf((a=s.details)==null?void 0:a.partList,e,t):null}function Hf(s,e,t){if(s)for(let a=s.length;a--;){const i=s[a];if(i.index===t&&i.fragment.sn===e)return i}return null}function Wf(s){s.forEach((e,t)=>{const{details:a}=e;a!=null&&a.fragments&&a.fragments.forEach(i=>{i.level=t})})}function Xn(s){switch(s.details){case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_TIMEOUT:case N.LEVEL_LOAD_TIMEOUT:case N.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Kf(s,e){const t=Xn(e);return s.default[`${t?"timeout":"error"}Retry`]}function fl(s,e){const t=s.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*s.retryDelayMs,s.maxRetryDelayMs)}function qf(s){return Xe(Xe({},s),{errorRetry:null,timeoutRetry:null})}function Zn(s,e,t,a){if(!s)return!1;const i=a==null?void 0:a.code,o=e<s.maxNumRetry&&(kB(i)||!!t);return s.shouldRetry?s.shouldRetry(s,e,t,a,o):o}function kB(s){return s===0&&navigator.onLine===!1||!!s&&(s<400||s>499)}const Yf={search:function(s,e){let t=0,a=s.length-1,i=null,o=null;for(;t<=a;){i=(t+a)/2|0,o=s[i];const r=e(o);if(r>0)t=i+1;else if(r<0)a=i-1;else return o}return null}};function EB(s,e,t){if(e===null||!Array.isArray(s)||!s.length||!ne(e))return null;const a=s[0].programDateTime;if(e<(a||0))return null;const i=s[s.length-1].endProgramDateTime;if(e>=(i||0))return null;t=t||0;for(let o=0;o<s.length;++o){const r=s[o];if(CB(e,t,r))return r}return null}function Qn(s,e,t=0,a=0,i=.005){let o=null;if(s){o=e[s.sn-e[0].sn+1]||null;const l=s.endDTS-t;l>0&&l<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(o=e[0]);if(o&&((!s||s.level===o.level)&&pl(t,a,o)===0||TB(o,s,Math.min(i,a))))return o;const r=Yf.search(e,pl.bind(null,t,a));return r&&(r!==s||!o)?r:o}function TB(s,e,t){if(e&&e.start===0&&e.level<s.level&&(e.endPTS||0)>0){const a=e.tagList.reduce((i,o)=>(o[0]==="INF"&&(i+=parseFloat(o[1])),i),t);return s.start<=a}return!1}function pl(s=0,e=0,t){if(t.start<=s&&t.start+t.duration>s)return 0;const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-a<=s?1:t.start-a>s&&t.start?-1:0}function CB(s,e,t){const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-a>s}function xB(s,e){return Yf.search(s,t=>t.cc<e?1:t.cc>e?-1:0)}var nt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Pt={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class vB{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=A.log.bind(A,"[info]:"),this.warn=A.warn.bind(A,"[warning]:"),this.error=A.error.bind(A,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(w.ERROR,this.onError,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(w.ERROR,this.onError,this),e.off(w.ERROR,this.onErrorOut,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===le.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var a,i;if(t.fatal)return;const o=this.hls,r=t.context;switch(t.details){case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case N.FRAG_PARSING_ERROR:if((a=t.frag)!=null&&a.gap){t.errorAction={action:nt.DoNothing,flags:Pt.None};return}case N.FRAG_GAP:case N.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=nt.SendAlternateToPenaltyBox;return}case N.LEVEL_EMPTY_ERROR:case N.LEVEL_PARSING_ERROR:{var l,d;const c=t.parent===le.MAIN?t.level:o.loadLevel;t.details===N.LEVEL_EMPTY_ERROR&&((l=t.context)!=null&&(d=l.levelDetails)!=null&&d.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:typeof(r==null?void 0:r.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.level));return;case N.AUDIO_TRACK_LOAD_ERROR:case N.AUDIO_TRACK_LOAD_TIMEOUT:case N.SUBTITLE_LOAD_ERROR:case N.SUBTITLE_TRACK_LOAD_TIMEOUT:if(r){const c=o.levels[o.loadLevel];if(c&&(r.type===xe.AUDIO_TRACK&&c.hasAudioGroup(r.groupId)||r.type===xe.SUBTITLE_TRACK&&c.hasSubtitleGroup(r.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o.loadLevel),t.errorAction.action=nt.SendAlternateToPenaltyBox,t.errorAction.flags=Pt.MoveAllAlternatesMatchingHost;return}}return;case N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=o.levels[o.loadLevel],h=c==null?void 0:c.attrs["HDCP-LEVEL"];h?t.errorAction={action:nt.SendAlternateToPenaltyBox,flags:Pt.MoveAllAlternatesMatchingHDCP,hdcpLevel:h}:this.keySystemError(t)}return;case N.BUFFER_ADD_CODEC_ERROR:case N.REMUX_ALLOC_ERROR:case N.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(i=t.level)!=null?i:o.loadLevel);return;case N.INTERNAL_EXCEPTION:case N.BUFFER_APPENDING_ERROR:case N.BUFFER_FULL_ERROR:case N.LEVEL_SWITCH_ERROR:case N.BUFFER_STALLED_ERROR:case N.BUFFER_SEEK_OVER_HOLE:case N.BUFFER_NUDGE_ON_STALL:t.errorAction={action:nt.DoNothing,flags:Pt.None};return}t.type===fe.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const a=this.hls,i=Kf(a.config.playlistLoadPolicy,e),o=this.playlistError++;if(Zn(i,o,Xn(e),e.response))return{action:nt.RetryRequest,flags:Pt.None,retryConfig:i,retryCount:o};const l=this.getLevelSwitchAction(e,t);return i&&(l.retryConfig=i,l.retryCount=o),l}getFragRetryOrSwitchAction(e){const t=this.hls,a=this.getVariantLevelIndex(e.frag),i=t.levels[a],{fragLoadPolicy:o,keyLoadPolicy:r}=t.config,l=Kf(e.details.startsWith("key")?r:o,e),d=t.levels.reduce((h,u)=>h+u.fragmentError,0);if(i&&(e.details!==N.FRAG_GAP&&i.fragmentError++,Zn(l,d,Xn(e),e.response)))return{action:nt.RetryRequest,flags:Pt.None,retryConfig:l,retryCount:d};const c=this.getLevelSwitchAction(e,a);return l&&(c.retryConfig=l,c.retryCount=d),c}getLevelSwitchAction(e,t){const a=this.hls;t==null&&(t=a.loadLevel);const i=this.hls.levels[t];if(i){var o,r;const c=e.details;i.loadError++,c===N.BUFFER_APPEND_ERROR&&i.fragmentError++;let h=-1;const{levels:u,loadLevel:f,minAutoLevel:p,maxAutoLevel:m}=a;a.autoLevelEnabled||(a.loadLevel=-1);const g=(o=e.frag)==null?void 0:o.type,b=(g===le.AUDIO&&c===N.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===N.BUFFER_ADD_CODEC_ERROR||c===N.BUFFER_APPEND_ERROR))&&u.some(({audioCodec:v})=>i.audioCodec!==v),_=e.sourceBufferName==="video"&&(c===N.BUFFER_ADD_CODEC_ERROR||c===N.BUFFER_APPEND_ERROR)&&u.some(({codecSet:v,audioCodec:T})=>i.codecSet!==v&&i.audioCodec===T),{type:C,groupId:E}=(r=e.context)!=null?r:{};for(let v=u.length;v--;){const T=(v+f)%u.length;if(T!==f&&T>=p&&T<=m&&u[T].loadError===0){var l,d;const B=u[T];if(c===N.FRAG_GAP&&g===le.MAIN&&e.frag){const L=u[T].details;if(L){const R=Qn(e.frag,L.fragments,e.frag.start);if(R!=null&&R.gap)continue}}else{if(C===xe.AUDIO_TRACK&&B.hasAudioGroup(E)||C===xe.SUBTITLE_TRACK&&B.hasSubtitleGroup(E))continue;if(g===le.AUDIO&&(l=i.audioGroups)!=null&&l.some(L=>B.hasAudioGroup(L))||g===le.SUBTITLE&&(d=i.subtitleGroups)!=null&&d.some(L=>B.hasSubtitleGroup(L))||b&&i.audioCodec===B.audioCodec||!b&&i.audioCodec!==B.audioCodec||_&&i.codecSet===B.codecSet)continue}h=T;break}}if(h>-1&&a.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:nt.SendAlternateToPenaltyBox,flags:Pt.None,nextAutoLevel:h}}return{action:nt.SendAlternateToPenaltyBox,flags:Pt.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var a;switch((a=t.errorAction)==null?void 0:a.action){case nt.DoNothing:break;case nt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==N.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,a=e.errorAction;if(!a)return;const{flags:i,hdcpLevel:o,nextAutoLevel:r}=a;switch(i){case Pt.None:this.switchLevel(e,r);break;case Pt.MoveAllAlternatesMatchingHDCP:o&&(t.maxHdcpLevel=hl[hl.indexOf(o)-1],a.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}a.resolved||this.switchLevel(e,r)}switchLevel(e,t){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class gl{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=A.log.bind(A,`${t}:`),this.warn=A.warn.bind(A,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,a){const i=t==null?void 0:t.renditionReports;if(i){let o=-1;for(let r=0;r<i.length;r++){const l=i[r];let d;try{d=new self.URL(l.URI,t.url).href}catch(c){A.warn(`Could not construct new URL for Rendition Report: ${c}`),d=l.URI||""}if(d===e){o=r;break}else d===e.substring(0,d.length)&&(o=r)}if(o!==-1){const r=i[o],l=parseInt(r["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let d=parseInt(r["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const h=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&h>t.partTarget&&(d+=1)}const c=a&&$f(a);return new Vf(l,d>=0?d:void 0,c)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,a){const{details:i,stats:o}=t,r=self.performance.now(),l=o.loading.first?Math.max(0,r-o.loading.first):0;if(i.advancedDateTime=Date.now()-l,i.live||a!=null&&a.live){if(i.reloaded(a),a&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),a&&i.fragments.length>0&&gB(a,i),!this.canLoad||!i.live)return;let d,c,h;if(i.canBlockReload&&i.endSN&&i.advanced){const y=this.hls.config.lowLatencyMode,b=i.lastPartSn,S=i.endSN,_=i.lastPartIndex,C=_!==-1,E=b===S,v=y?0:_;C?(c=E?S+1:b,h=E?v:_+1):c=S+1;const T=i.age,B=T+i.ageHeader;let L=Math.min(B-i.partTarget,i.targetduration*1.5);if(L>0){if(a&&L>a.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${a.tuneInGoal} to: ${L} with playlist age: ${i.age}`),L=0;else{const R=Math.floor(L/i.targetduration);if(c+=R,h!==void 0){const $=Math.round(L%i.targetduration/i.partTarget);h+=$}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${T.toFixed(2)}s goal: ${L} skip sn ${R} to part ${h}`)}i.tuneInGoal=L}if(d=this.getDeliveryDirectives(i,t.deliveryDirectives,c,h),y||!E){this.loadPlaylist(d);return}}else(i.canBlockReload||i.canSkipUntil)&&(d=this.getDeliveryDirectives(i,t.deliveryDirectives,c,h));const u=this.hls.mainForwardBufferInfo,f=u?u.end-u.len:0,p=(i.edge-f)*1e3,m=wB(i,p);i.updated&&r>this.requestScheduled+m&&(this.requestScheduled=o.loading.start),c!==void 0&&i.canBlockReload?this.requestScheduled=o.loading.first+m-(i.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+m<r?this.requestScheduled=r:this.requestScheduled-r<=0&&(this.requestScheduled+=m);let g=this.requestScheduled-r;g=Math.max(0,g),this.log(`reload live playlist ${e} in ${Math.round(g)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(d),g)}else this.clearTimer()}getDeliveryDirectives(e,t,a,i){let o=$f(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(a=t.msn,i=t.part,o=Jn.No),new Vf(a,i,o)}checkRetry(e){const t=e.details,a=Xn(e),i=e.errorAction,{action:o,retryCount:r=0,retryConfig:l}=i||{},d=!!i&&!!l&&(o===nt.RetryRequest||!i.resolved&&o===nt.SendAlternateToPenaltyBox);if(d){var c;if(this.requestScheduled=-1,r>=l.maxNumRetry)return!1;if(a&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${r+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const h=fl(l,r);this.timer=self.setTimeout(()=>this.loadPlaylist(),h),this.warn(`Retrying playlist loading ${r+1}/${l.maxNumRetry} after "${t}" in ${h}ms`)}e.levelRetry=!0,i.resolved=!0}return d}}class Us{constructor(e,t=0,a=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=a}sample(e,t){const a=Math.pow(this.alpha_,e);this.estimate_=t*(1-a)+a*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class AB{constructor(e,t,a,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Us(e),this.fast_=new Us(t),this.defaultTTFB_=i,this.ttfb_=new Us(e)}update(e,t){const{slow_:a,fast_:i,ttfb_:o}=this;a.halfLife!==e&&(this.slow_=new Us(e,a.getEstimate(),a.getTotalWeight())),i.halfLife!==t&&(this.fast_=new Us(t,i.getEstimate(),i.getTotalWeight())),o.halfLife!==e&&(this.ttfb_=new Us(e,o.getEstimate(),o.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const a=8*t,i=e/1e3,o=a/i;this.fast_.sample(i,o),this.slow_.sample(i,o)}sampleTTFB(e){const t=e/1e3,a=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(a,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Jf={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Xf={};function LB(s,e,t,a,i,o){const r=s.audioCodec?s.audioGroups:null,l=o==null?void 0:o.audioCodec,d=o==null?void 0:o.channels,c=d?parseInt(d):l?1/0:2;let h=null;if(r!=null&&r.length)try{r.length===1&&r[0]?h=e.groups[r[0]].channels:h=r.reduce((u,f)=>{if(f){const p=e.groups[f];if(!p)throw new Error(`Audio track group ${f} not found`);Object.keys(p.channels).forEach(m=>{u[m]=(u[m]||0)+p.channels[m]})}return u},{2:0})}catch{return!0}return s.videoCodec!==void 0&&(s.width>1920&&s.height>1088||s.height>1920&&s.width>1088||s.frameRate>Math.max(a,30)||s.videoRange!=="SDR"&&s.videoRange!==t||s.bitrate>Math.max(i,8e6))||!!h&&ne(c)&&Object.keys(h).some(u=>parseInt(u)>c)}function IB(s,e,t){const a=s.videoCodec,i=s.audioCodec;if(!a||!i||!t)return Promise.resolve(Jf);const o={width:s.width,height:s.height,bitrate:Math.ceil(Math.max(s.bitrate*.9,s.averageBitrate)),framerate:s.frameRate||30},r=s.videoRange;r!=="SDR"&&(o.transferFunction=r.toLowerCase());const l=a.split(",").map(d=>({type:"media-source",video:Xe(Xe({},o),{},{contentType:Ta(d,"video")})}));return i&&s.audioGroups&&s.audioGroups.forEach(d=>{var c;d&&((c=e.groups[d])==null||c.tracks.forEach(h=>{if(h.groupId===d){const u=h.channels||"",f=parseFloat(u);ne(f)&&f>2&&l.push.apply(l,i.split(",").map(p=>({type:"media-source",audio:{contentType:Ta(p,"audio"),channels:""+f}})))}}))}),Promise.all(l.map(d=>{const c=RB(d);return Xf[c]||(Xf[c]=t.decodingInfo(d))})).then(d=>({supported:!d.some(c=>!c.supported),configurations:l,decodingInfoResults:d})).catch(d=>({supported:!1,configurations:l,decodingInfoResults:[],error:d}))}function RB(s){const{audio:e,video:t}=s,a=t||e;if(a){const i=a.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${i}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${i}`}return""}function BB(){if(typeof matchMedia=="function"){const s=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(s.media!==e.media)return s.matches===!0}return!1}function NB(s,e){let t=!1,a=[];return s&&(t=s!=="SDR",a=[s]),e&&(a=e.allowedVideoRanges||Yn.slice(0),t=e.preferHDR!==void 0?e.preferHDR:BB(),t?a=a.filter(i=>i!=="SDR"):a=["SDR"]),{preferHDR:t,allowedVideoRanges:a}}function DB(s,e,t,a,i){const o=Object.keys(s),r=a==null?void 0:a.channels,l=a==null?void 0:a.audioCodec,d=r&&parseInt(r)===2;let c=!0,h=!1,u=1/0,f=1/0,p=1/0,m=0,g=[];const{preferHDR:y,allowedVideoRanges:b}=NB(e,i);for(let E=o.length;E--;){const v=s[o[E]];c=v.channels[2]>0,u=Math.min(u,v.minHeight),f=Math.min(f,v.minFramerate),p=Math.min(p,v.minBitrate);const T=b.filter(B=>v.videoRanges[B]>0);T.length>0&&(h=!0,g=T)}u=ne(u)?u:0,f=ne(f)?f:0;const S=Math.max(1080,u),_=Math.max(30,f);return p=ne(p)?p:t,t=Math.max(p,t),h||(e=void 0,g=[]),{codecSet:o.reduce((E,v)=>{const T=s[v];if(v===E)return E;if(T.minBitrate>t)return Xt(v,`min bitrate of ${T.minBitrate} > current estimate of ${t}`),E;if(!T.hasDefaultAudio)return Xt(v,"no renditions with default or auto-select sound found"),E;if(l&&v.indexOf(l.substring(0,4))%5!==0)return Xt(v,`audio codec preference "${l}" not found`),E;if(r&&!d){if(!T.channels[r])return Xt(v,`no renditions with ${r} channel sound found (channels options: ${Object.keys(T.channels)})`),E}else if((!l||d)&&c&&T.channels[2]===0)return Xt(v,"no renditions with stereo sound found"),E;return T.minHeight>S?(Xt(v,`min resolution of ${T.minHeight} > maximum of ${S}`),E):T.minFramerate>_?(Xt(v,`min framerate of ${T.minFramerate} > maximum of ${_}`),E):g.some(B=>T.videoRanges[B]>0)?T.maxScore<m?(Xt(v,`max score of ${T.maxScore} < selected max of ${m}`),E):E&&(Hn(v)>=Hn(E)||T.fragmentError>s[E].fragmentError)?E:(m=T.maxScore,v):(Xt(v,`no variants with VIDEO-RANGE of ${JSON.stringify(g)} found`),E)},void 0),videoRanges:g,preferHDR:y,minFramerate:f,minBitrate:p}}function Xt(s,e){A.log(`[abr] start candidates with "${s}" ignored because ${e}`)}function PB(s){return s.reduce((e,t)=>{let a=e.groups[t.groupId];a||(a=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),a.tracks.push(t);const i=t.channels||"2";return a.channels[i]=(a.channels[i]||0)+1,a.hasDefault=a.hasDefault||t.default,a.hasAutoSelect=a.hasAutoSelect||t.autoselect,a.hasDefault&&(e.hasDefaultAudio=!0),a.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function OB(s,e,t,a){return s.slice(t,a+1).reduce((i,o)=>{if(!o.codecSet)return i;const r=o.audioGroups;let l=i[o.codecSet];l||(i[o.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!r,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,o.bitrate);const d=Math.min(o.height,o.width);return l.minHeight=Math.min(l.minHeight,d),l.minFramerate=Math.min(l.minFramerate,o.frameRate),l.maxScore=Math.max(l.maxScore,o.score),l.fragmentError+=o.fragmentError,l.videoRanges[o.videoRange]=(l.videoRanges[o.videoRange]||0)+1,r&&r.forEach(c=>{if(!c)return;const h=e.groups[c];h&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?h.hasDefault:h.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(h.channels).forEach(u=>{l.channels[u]=(l.channels[u]||0)+h.channels[u]}))}),i},{})}function Ht(s,e,t){if("attrs"in s){const a=e.indexOf(s);if(a!==-1)return a}for(let a=0;a<e.length;a++){const i=e[a];if(zs(s,i,t))return a}return-1}function zs(s,e,t){const{groupId:a,name:i,lang:o,assocLang:r,characteristics:l,default:d}=s,c=s.forced;return(a===void 0||e.groupId===a)&&(i===void 0||e.name===i)&&(o===void 0||e.lang===o)&&(o===void 0||e.assocLang===r)&&(d===void 0||e.default===d)&&(c===void 0||e.forced===c)&&(l===void 0||FB(l,e.characteristics))&&(t===void 0||t(s,e))}function FB(s,e=""){const t=s.split(","),a=e.split(",");return t.length===a.length&&!t.some(i=>a.indexOf(i)===-1)}function Gs(s,e){const{audioCodec:t,channels:a}=s;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(a===void 0||a===(e.channels||"2"))}function MB(s,e,t,a,i){const o=e[a],l=e.reduce((f,p,m)=>{const g=p.uri;return(f[g]||(f[g]=[])).push(m),f},{})[o.uri];l.length>1&&(a=Math.max.apply(Math,l));const d=o.videoRange,c=o.frameRate,h=o.codecSet.substring(0,4),u=Zf(e,a,f=>{if(f.videoRange!==d||f.frameRate!==c||f.codecSet.substring(0,4)!==h)return!1;const p=f.audioGroups,m=t.filter(g=>!p||p.indexOf(g.groupId)!==-1);return Ht(s,m,i)>-1});return u>-1?u:Zf(e,a,f=>{const p=f.audioGroups,m=t.filter(g=>!p||p.indexOf(g.groupId)!==-1);return Ht(s,m,i)>-1})}function Zf(s,e,t){for(let a=e;a;a--)if(t(s[a]))return a;for(let a=e+1;a<s.length;a++)if(t(s[a]))return a;return-1}class $B{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:a,hls:i}=this,{autoLevelEnabled:o,media:r}=i;if(!t||!r)return;const l=performance.now(),d=a?a.stats:t.stats,c=a?a.duration:t.duration,h=l-d.loading.start,u=i.minAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||t.level<=u){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o||r.paused||!r.playbackRate||!r.readyState)return;const f=i.mainForwardBufferInfo;if(f===null)return;const p=this.bwEstimator.getEstimateTTFB(),m=Math.abs(r.playbackRate);if(h<=Math.max(p,1e3*(c/(m*2))))return;const g=f.len/m,y=d.loading.first?d.loading.first-d.loading.start:-1,b=d.loaded&&y>-1,S=this.getBwEstimate(),_=i.levels,C=_[t.level],E=d.total||Math.max(d.loaded,Math.round(c*C.averageBitrate/8));let v=b?h-y:h;v<1&&b&&(v=Math.min(h,d.loaded*8/S));const T=b?d.loaded*1e3/v:0,B=T?(E-d.loaded)/T:E*8/S+p/1e3;if(B<=g)return;const L=T?T*8:S;let R=Number.POSITIVE_INFINITY,$;for($=t.level-1;$>u;$--){const z=_[$].maxBitrate;if(R=this.getTimeToLoadFrag(p/1e3,L,c*z,!_[$].details),R<g)break}if(R>=B||R>c*10)return;i.nextLoadLevel=i.nextAutoLevel=$,b?this.bwEstimator.sample(h-Math.min(p,y),d.loaded):this.bwEstimator.sampleTTFB(h);const K=_[$].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>K&&this.resetEstimator(K),this.clearTimer(),A.warn(`[abr] Fragment ${t.sn}${a?" part "+a.index:""} of level ${t.level} is loading too slowly;
43
43
  Time to underbuffer: ${g.toFixed(3)} s
44
44
  Estimated load time for current fragment: ${B.toFixed(3)} s
45
45
  Estimated load time for down switch fragment: ${R.toFixed(3)} s
@@ -64,4 +64,4 @@
64
64
  `),c=[],h=e?xN(e.baseTime,e.timescale):0;let u="00:00.000",f=0,p=0,m,g=!0;l.oncue=function(y){const b=t[a];let S=t.ccOffset;const _=(f-h)/9e4;if(b!=null&&b.new&&(p!==void 0?S=t.ccOffset=b.start:lD(t,a,_)),_){if(!e){m=new Error("Missing initPTS for VTT MPEGTS");return}S=_-t.presentationOffset}const C=y.endTime-y.startTime,E=wt((y.startTime+S-p)*9e4,i*9e4)/9e4;y.startTime=Math.max(E,0),y.endTime=Math.max(E+C,0);const v=y.text.trim();y.text=decodeURIComponent(encodeURIComponent(v)),y.id||(y.id=Pl(y.startTime,y.endTime,v)),y.endTime>0&&c.push(y)},l.onparsingerror=function(y){m=y},l.onflush=function(){if(m){r(m);return}o(c)},d.forEach(y=>{if(g)if(Nl(y,"X-TIMESTAMP-MAP=")){g=!1,y.slice(16).split(",").forEach(b=>{Nl(b,"LOCAL:")?u=b.slice(6):Nl(b,"MPEGTS:")&&(f=parseInt(b.slice(7)))});try{p=rD(u)/1e3}catch(b){m=b}return}else y===""&&(g=!1);l.parse(y+`
65
65
  `)}),l.flush()}const Ol="stpp.ttml.im1t",$p=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Vp=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,dD={left:"start",center:"center",right:"end",start:"start",end:"end"};function Up(s,e,t,a){const i=ye(new Uint8Array(s),["mdat"]);if(i.length===0){a(new Error("Could not parse IMSC1 mdat"));return}const o=i.map(l=>Ut(l)),r=CN(e.baseTime,1,e.timescale);try{o.forEach(l=>t(hD(l,r)))}catch(l){a(l)}}function hD(s,e){const i=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const o={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},r=Object.keys(o).reduce((u,f)=>(u[f]=i.getAttribute(`ttp:${f}`)||o[f],u),{}),l=i.getAttribute("xml:space")!=="preserve",d=zp(Fl(i,"styling","style")),c=zp(Fl(i,"layout","region")),h=Fl(i,"body","[begin]");return[].map.call(h,u=>{const f=Gp(u,l);if(!f||!u.hasAttribute("begin"))return null;const p=$l(u.getAttribute("begin"),r),m=$l(u.getAttribute("dur"),r);let g=$l(u.getAttribute("end"),r);if(p===null)throw jp(u);if(g===null){if(m===null)throw jp(u);g=p+m}const y=new Rl(p-e,g-e,f);y.id=Pl(y.startTime,y.endTime,y.text);const b=c[u.getAttribute("region")],S=d[u.getAttribute("style")],_=uD(b,S,d),{textAlign:C}=_;if(C){const E=dD[C];E&&(y.lineAlign=E),y.align=C}return Ge(y,_),y}).filter(u=>u!==null)}function Fl(s,e,t){const a=s.getElementsByTagName(e)[0];return a?[].slice.call(a.querySelectorAll(t)):[]}function zp(s){return s.reduce((e,t)=>{const a=t.getAttribute("xml:id");return a&&(e[a]=t),e},{})}function Gp(s,e){return[].slice.call(s.childNodes).reduce((t,a,i)=>{var o;return a.nodeName==="br"&&i?t+`
66
66
  `:(o=a.childNodes)!=null&&o.length?Gp(a,e):e?t+a.textContent.trim().replace(/\s+/g," "):t+a.textContent},"")}function uD(s,e,t){const a="http://www.w3.org/ns/ttml#styling";let i=null;const o=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],r=s!=null&&s.hasAttribute("style")?s.getAttribute("style"):null;return r&&t.hasOwnProperty(r)&&(i=t[r]),o.reduce((l,d)=>{const c=Ml(e,a,d)||Ml(s,a,d)||Ml(i,a,d);return c&&(l[d]=c),l},{})}function Ml(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function jp(s){return new Error(`Could not parse ttml timestamp ${s}`)}function $l(s,e){if(!s)return null;let t=Op(s);return t===null&&($p.test(s)?t=mD(s,e):Vp.test(s)&&(t=fD(s,e))),t}function mD(s,e){const t=$p.exec(s),a=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+a/e.frameRate}function fD(s,e){const t=Vp.exec(s),a=Number(t[1]);switch(t[2]){case"h":return a*3600;case"m":return a*60;case"ms":return a*1e3;case"f":return a/e.frameRate;case"t":return a/e.tickRate}return a}class pD{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Kp(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(w.FRAG_LOADING,this.onFragLoading,this),e.on(w.FRAG_LOADED,this.onFragLoaded,this),e.on(w.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(w.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(w.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(w.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(w.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(w.FRAG_LOADING,this.onFragLoading,this),e.off(w.FRAG_LOADED,this.onFragLoaded,this),e.off(w.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(w.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(w.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(w.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(w.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new hi(this,"textTrack1"),t=new hi(this,"textTrack2"),a=new hi(this,"textTrack3"),i=new hi(this,"textTrack4");this.cea608Parser1=new Pp(1,e,t),this.cea608Parser2=new Pp(3,a,i)}}addCues(e,t,a,i,o){let r=!1;for(let l=o.length;l--;){const d=o[l],c=gD(d[0],d[1],t,a);if(c>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],a),r=!0,c/(a-t)>.5))return}if(r||o.push([t,a]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,a,i)}else{const l=this.Cues.newCue(null,t,a,i);this.hls.trigger(w.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:a,initPTS:i,timescale:o}){const{unparsedVttFrags:r}=this;a==="main"&&(this.initPTS[t.cc]={baseTime:i,timescale:o}),r.length&&(this.unparsedVttFrags=[],r.forEach(l=>{this.onFragLoaded(w.FRAG_LOADED,l)}))}getExistingTrack(e,t){const{media:a}=this;if(a)for(let i=0;i<a.textTracks.length;i++){const o=a.textTracks[i];if(Wp(o,{name:e,lang:t,attrs:{}}))return o}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:a,media:i}=this,{label:o,languageCode:r}=t[e],l=this.getExistingTrack(o,r);if(l)a[e]=l,$s(a[e]),Of(a[e],i);else{const d=this.createTextTrack("captions",o,r);d&&(d[e]=!0,a[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const a=t.label,i={_id:e,label:a,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(w.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,a){const i=this.media;if(i)return i.addTextTrack(e,t,a)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{$s(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Kp(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let a=0;a<t.length;a++)$s(t[a])}onSubtitleTracksUpdated(e,t){const a=t.subtitleTracks||[],i=a.some(o=>o.textCodec===Ol);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(vp(this.tracks,a)){this.tracks=a;return}if(this.textTracks=[],this.tracks=a,this.config.renderTextTracksNatively){const r=this.media,l=r?Kn(r.textTracks):null;if(this.tracks.forEach((d,c)=>{let h;if(l){let u=null;for(let f=0;f<l.length;f++)if(l[f]&&Wp(l[f],d)){u=l[f],l[f]=null;break}u&&(h=u)}if(h)$s(h);else{const u=Hp(d);h=this.createTextTrack(u,d.name,d.lang),h&&(h.mode="disabled")}h&&this.textTracks.push(h)}),l!=null&&l.length){const d=l.filter(c=>c!==null).map(c=>c.label);d.length&&A.warn(`Media element contains unused subtitle tracks: ${d.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const r=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(w.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(a=>{const i=/(?:CC|SERVICE)([1-4])/.exec(a.instreamId);if(!i)return;const o=`textTrack${i[1]}`,r=this.captionsProperties[o];r&&(r.label=a.name,a.lang&&(r.languageCode=a.lang),r.media=a)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===le.MAIN){var a,i;const{cea608Parser1:o,cea608Parser2:r,lastSn:l}=this,{cc:d,sn:c}=t.frag,h=(a=(i=t.part)==null?void 0:i.index)!=null?a:-1;o&&r&&(c!==l+1||c===l&&h!==this.lastPartIndex+1||d!==this.lastCc)&&(o.reset(),r.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:a,payload:i}=t;if(a.type===le.SUBTITLE)if(i.byteLength){const o=a.decryptdata,r="stats"in t;if(o==null||!o.encrypted||r){const l=this.tracks[a.level],d=this.vttCCs;d[a.cc]||(d[a.cc]={start:a.start,prevCC:this.prevCC,new:!0},this.prevCC=a.cc),l&&l.textCodec===Ol?this._parseIMSC1(a,i):this._parseVTTs(t)}}else this.hls.trigger(w.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const a=this.hls;Up(t,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),a.trigger(w.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{A.log(`Failed to parse IMSC1: ${i}`),a.trigger(w.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var t;const{frag:a,payload:i}=e,{initPTS:o,unparsedVttFrags:r}=this,l=o.length-1;if(!o[a.cc]&&l===-1){r.push(e);return}const d=this.hls,c=(t=a.initSegment)!=null&&t.data?St(a.initSegment.data,new Uint8Array(i)):i;cD(c,this.initPTS[a.cc],this.vttCCs,a.cc,a.start,h=>{this._appendCues(h,a.level),d.trigger(w.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},h=>{const u=h.message==="Missing initPTS for VTT MPEGTS";u?r.push(e):this._fallbackToIMSC1(a,i),A.log(`Failed to parse VTT cue: ${h}`),!(u&&l>a.cc)&&d.trigger(w.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:h})})}_fallbackToIMSC1(e,t){const a=this.tracks[e.level];a.textCodec||Up(t,this.initPTS[e.cc],()=>{a.textCodec=Ol,this._parseIMSC1(e,t)},()=>{a.textCodec="wvtt"})}_appendCues(e,t){const a=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||i.mode==="disabled")return;e.forEach(o=>Ff(i,o))}else{const i=this.tracks[t];if(!i)return;const o=i.default?"default":"subtitles"+t;a.trigger(w.CUES_PARSED,{type:"subtitles",cues:e,track:o})}}onFragDecrypted(e,t){const{frag:a}=t;a.type===le.SUBTITLE&&this.onFragLoaded(w.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:a,cea608Parser2:i}=this;if(!this.enabled||!a||!i)return;const{frag:o,samples:r}=t;if(!(o.type===le.MAIN&&this.closedCaptionsForLevel(o)==="NONE"))for(let l=0;l<r.length;l++){const d=r[l].bytes;if(d){const c=this.extractCea608Data(d);a.addData(r[l].pts,c[0]),i.addData(r[l].pts,c[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:a,endOffsetSubtitles:i,type:o}){const{media:r}=this;if(!(!r||r.currentTime<a)){if(!o||o==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(d=>ll(l[d],t,a))}if(this.config.renderTextTracksNatively&&t===0&&i!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>ll(l[d],t,i))}}}extractCea608Data(e){const t=[[],[]],a=e[0]&31;let i=2;for(let o=0;o<a;o++){const r=e[i++],l=127&e[i++],d=127&e[i++];if(l===0&&d===0)continue;if((4&r)!==0){const h=3&r;(h===0||h===1)&&(t[h].push(l),t[h].push(d))}}return t}}function Hp(s){return s.characteristics&&/transcribes-spoken-dialog/gi.test(s.characteristics)&&/describes-music-and-sound/gi.test(s.characteristics)?"captions":"subtitles"}function Wp(s,e){return!!s&&s.kind===Hp(e)&&Ll(e,s)}function gD(s,e,t,a){return Math.min(e,a)-Math.max(s,t)}function Kp(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class Vl{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(w.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.BUFFER_CODECS,this.onBufferCodecs,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(w.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.BUFFER_CODECS,this.onBufferCodecs,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const a=this.hls.levels[t.droppedLevel];this.isLevelAllowed(a)&&this.restrictedLevels.push({bitrate:a.bitrate,height:a.height,width:a.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const a=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,a.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&ne(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,a=this.getMaxLevel(e.length-1);a!==this.autoLevelCapping&&A.log(`Setting autoLevelCapping to ${a}: ${e[a].height}p@${e[a].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=a,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const a=t.filter((i,o)=>this.isLevelAllowed(i)&&o<=e);return this.clientRect=null,Vl.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const a=e.getBoundingClientRect();t.width=a.width,t.height=a.height,!t.width&&!t.height&&(t.width=a.right-a.left||e.width||0,t.height=a.bottom-a.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return e}isLevelAllowed(e){return!this.restrictedLevels.some(a=>e.bitrate===a.bitrate&&e.width===a.width&&e.height===a.height)}static getMaxLevelByMediaSize(e,t,a){if(!(e!=null&&e.length))return-1;const i=(l,d)=>d?l.width!==d.width||l.height!==d.height:!0;let o=e.length-1;const r=Math.max(t,a);for(let l=0;l<e.length;l+=1){const d=e[l];if((d.width>=r||d.height>=r)&&i(d,e[l+1])){o=l;break}}return o}}class yD{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(w.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(w.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const a=this.hls.config;if(a.capLevelOnFPSDrop){const i=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),a.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,a){const i=performance.now();if(t){if(this.lastTime){const o=i-this.lastTime,r=a-this.lastDroppedFrames,l=t-this.lastDecodedFrames,d=1e3*r/o,c=this.hls;if(c.trigger(w.FPS_DROP,{currentDropped:r,currentDecoded:l,totalDroppedFrames:a}),d>0&&r>c.config.fpsDroppedMonitoringThreshold*l){let h=c.currentLevel;A.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=h)&&(h=h-1,c.trigger(w.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:c.currentLevel}),c.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=a,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const mi="[eme]";class qs{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=qs.CDMCleanupPromise?[qs.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=A.debug.bind(A,mi),this.log=A.log.bind(A,mi),this.warn=A.warn.bind(A,mi),this.error=A.error.bind(A,mi),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(w.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(w.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(w.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(w.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(w.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:a}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===Ne.WIDEVINE&&a)return a;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,a=t[e];if(a)return a.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,a=(r,l,d)=>!!r&&d.indexOf(r)===l,i=t.map(r=>r.audioCodec).filter(a),o=t.map(r=>r.videoCodec).filter(a);return i.length+o.length===0&&o.push("avc1.42e01e"),new Promise((r,l)=>{const d=c=>{const h=c.shift();this.getMediaKeysPromise(h,i,o).then(u=>r({keySystem:h,mediaKeys:u})).catch(u=>{c.length?d(c):u instanceof _t?l(u):l(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_ACCESS,error:u,fatal:!0},u.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:a}=this.config;if(typeof a!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${a}`;return rf===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return a(e,t)}getMediaKeysPromise(e,t,a){const i=E6(e,t,a,this.config.drmSystemOptions),o=this.keySystemAccessPromises[e];let r=o==null?void 0:o.keySystemAccess;if(!r){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),r=this.requestMediaKeySystemAccess(e,i);const l=this.keySystemAccessPromises[e]={keySystemAccess:r};return r.catch(d=>{this.log(`Failed to obtain access to key-system "${e}": ${d}`)}),r.then(d=>{this.log(`Access for key-system "${d.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=d.createMediaKeys().then(h=>(this.log(`Media-keys created for "${e}"`),c.then(u=>u?this.setMediaKeysServerCertificate(h,e,u):h))),l.mediaKeys.catch(h=>{this.error(`Failed to create media-keys for "${e}"}: ${h}`)}),l.mediaKeys})}return r.then(()=>o.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:a}){this.log(`Creating key-system session "${t}" keyId: ${zt.hexDump(e.keyId||[])}`);const i=a.createSession(),o={decryptdata:e,keySystem:t,mediaKeys:a,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(o),o}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const a=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),o="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(a,o,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return zt.hexDump(e.keyId)}updateKeySession(e,t){var a;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${zt.hexDump(((a=e.decryptdata)==null?void 0:a.keyId)||[])}
67
- } (data length: ${t&&t.byteLength})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,a)=>{const i=Zr(this.config),o=e.map(af).filter(r=>!!r&&i.indexOf(r)!==-1);return this.getKeySystemSelectionPromise(o).then(({keySystem:r})=>{const l=of(r);l?t(l):a(new Error(`Unable to find format for key-system "${r}"`))}).catch(a)})}loadKey(e){const t=e.keyInfo.decryptdata,a=this.getKeyIdString(t),i=`(keyId: ${a} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let o=this.keyIdToKeySessionPromise[a];return o||(o=this.keyIdToKeySessionPromise[a]=this.getKeySystemForKeyPromise(t).then(({keySystem:r,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(r,l).then(()=>{this.throwIfDestroyed();const d=this.createMediaKeySessionContext({keySystem:r,mediaKeys:l,decryptdata:t});return this.generateRequestWithPreferredKeySession(d,"cenc",t.pssh,"playlist-key")}))),o.catch(r=>this.handleError(r))),o}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof _t?this.hls.trigger(w.ERROR,e.data):this.hls.trigger(w.ERROR,{type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),a=this.keyIdToKeySessionPromise[t];if(!a){const i=af(e.keyFormat),o=i?[i]:Zr(this.config);return this.attemptKeySystemAccess(o)}return a}getKeySystemSelectionPromise(e){if(e.length||(e=Zr(this.config)),e.length===0)throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:a}=e,i=`"${e.type}" event: init data type: "${t}"`;if(this.debug(i),a===null)return;let o,r;if(t==="sinf"&&this.config.drmSystems[Ne.FAIRPLAY]){const u=Ke(new Uint8Array(a));try{const f=Jr(JSON.parse(u).sinf),p=gf(new Uint8Array(f));if(!p)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");o=p.subarray(8,24),r=Ne.FAIRPLAY}catch(f){this.warn(`${i} Failed to parse sinf: ${f}`);return}}else{const u=q6(a),f=u.filter(p=>p.systemId===_a.WIDEVINE)[0];if(!f){u.length===0||u.some(p=>!p.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${u.map(p=>nf(p.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(r=nf(f.systemId),f.version===0&&f.data){const p=f.data.length-22;o=f.data.subarray(p,p+16)}}if(!r||!o)return;const l=zt.hexDump(o),{keyIdToKeySessionPromise:d,mediaKeySessions:c}=this;let h=d[l];for(let u=0;u<c.length;u++){const f=c[u],p=f.decryptdata;if(!p.keyId)continue;const m=zt.hexDump(p.keyId);if(l===m||p.uri.replace(/-/g,"").indexOf(l)!==-1){if(h=d[m],p.pssh)break;delete d[m],p.pssh=new Uint8Array(a),p.keyId=o,h=d[l]=h.then(()=>this.generateRequestWithPreferredKeySession(f,t,a,"encrypted-event-key-match"));break}}h||(h=d[l]=this.getKeySystemSelectionPromise([r]).then(({keySystem:u,mediaKeys:f})=>{var p;this.throwIfDestroyed();const m=new Ea("ISO-23001-7",l,(p=of(u))!=null?p:"");return m.pssh=new Uint8Array(a),m.keyId=o,this.attemptSetMediaKeys(u,f).then(()=>{this.throwIfDestroyed();const g=this.createMediaKeySessionContext({decryptdata:m,keySystem:u,mediaKeys:f});return this.generateRequestWithPreferredKeySession(g,t,a,"encrypted-event-no-match")})})),h.catch(u=>this.handleError(u))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const a=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(a).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),a.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(o=>a.indexOf(o)===-1)})}generateRequestWithPreferredKeySession(e,t,a,i){var o,r;const l=(o=this.config.drmSystems)==null||(r=o[e.keySystem])==null?void 0:r.generateRequest;if(l)try{const m=l.call(this.hls,t,a,e);if(!m)throw new Error("Invalid response from configured generateRequest filter");t=m.initDataType,a=e.decryptdata.pssh=m.initData?new Uint8Array(m.initData):null}catch(m){var d;if(this.warn(m.message),(d=this.hls)!=null&&d.config.debug)throw m}if(a===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${t} length: ${a?a.byteLength:null})`);const h=new Al,u=e._onmessage=m=>{const g=e.mediaKeysSession;if(!g){h.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=m;this.log(`"${y}" message event for session "${g.sessionId}" message size: ${b.byteLength}`),y==="license-request"||y==="license-renewal"?this.renewLicense(e,b).catch(S=>{this.handleError(S),h.emit("error",S)}):y==="license-release"?e.keySystem===Ne.FAIRPLAY&&(this.updateKeySession(e,Xr("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${y}"`)},f=e._onkeystatuseschange=m=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const y=e.keyStatus;h.emit("keyStatus",y),y==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",u),e.mediaKeysSession.addEventListener("keystatuseschange",f);const p=new Promise((m,g)=>{h.on("error",g),h.on("keyStatus",y=>{y.startsWith("usable")?m():y==="output-restricted"?g(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?g(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?g(new Error("key expired while generating request")):this.warn(`unhandled key status change "${y}"`)})});return e.mediaKeysSession.generateRequest(t,a).then(()=>{var m;this.log(`Request generated for key-session "${(m=e.mediaKeysSession)==null?void 0:m.sessionId}" keyId: ${c}`)}).catch(m=>{throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:m,fatal:!1},`Error generating key-session request: ${m}`)}).then(()=>p).catch(m=>{throw h.removeAllListeners(),this.removeSession(e),m}).then(()=>(h.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,a)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${zt.hexDump("buffer"in a?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a))} session keyId: ${zt.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,a=t.loader,i=new a(t),o=this.getServerCertificateUrl(e);return o?(this.log(`Fetching server certificate for "${e}"`),new Promise((r,l)=>{const d={responseType:"arraybuffer",url:o},c=t.certLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(f,p,m,g)=>{r(f.data)},onError:(f,p,m,g)=>{l(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:Xe({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${o}). Status: ${f.code} (${f.text})`))},onTimeout:(f,p,m)=>{l(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${o})`))},onAbort:(f,p,m)=>{l(new Error("aborted"))}};i.load(d,h,u)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,a){return new Promise((i,o)=>{e.setServerCertificate(a).then(r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${a==null?void 0:a.byteLength}) on "${t}"`),i(e)}).catch(r=>{o(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:r,fatal:!0},r.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(a=>this.updateKeySession(e,new Uint8Array(a)).catch(i=>{throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const a=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!a.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(a,"application/xml"),o=i.querySelectorAll("HttpHeader");if(o.length>0){let h;for(let u=0,f=o.length;u<f;u++){var r,l;h=o[u];const p=(r=h.querySelector("name"))==null?void 0:r.textContent,m=(l=h.querySelector("value"))==null?void 0:l.textContent;p&&m&&e.setRequestHeader(p,m)}}const d=i.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Xr(atob(c))}setupLicenseXHR(e,t,a,i){const o=this.config.licenseXhrSetup;return o?Promise.resolve().then(()=>{if(!a.decryptdata)throw new Error("Key removed");return o.call(this.hls,e,t,a,i)}).catch(r=>{if(!a.decryptdata)throw r;return e.open("POST",t,!0),o.call(this.hls,e,t,a,i)}).then(r=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:r||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const a=this.config.keyLoadPolicy.default;return new Promise((i,o)=>{const r=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${r}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return o(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,r,e)}catch(h){this.error(h)}i(d)}else{const d=a.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)o(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:r,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${r}). Status: ${l.status} (${l.statusText})`));else{const h=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${h} attempts left`),this.requestLicense(e,t).then(i,o)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,r,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==Ne.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const a=t.media;this.media=a,a.addEventListener("encrypted",this.onMediaEncrypted),a.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ea.clearKeyUriToKeyIdMap();const a=t.length;qs.CDMCleanupPromise=Promise.all(t.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}`)}))).then(()=>{a&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const a=t.reduce((i,o)=>(i.indexOf(o.keyFormat)===-1&&i.push(o.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${a.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(a)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:a}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),a&&a.readyState!==XMLHttpRequest.DONE&&a.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(o=>{this.log(`Could not remove session: ${o}`)}).then(()=>t.close()).catch(o=>{this.log(`Could not close session: ${o}`)})}}}qs.CDMCleanupPromise=void 0;class _t extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var lt;(function(s){s.MANIFEST="m",s.AUDIO="a",s.VIDEO="v",s.MUXED="av",s.INIT="i",s.CAPTION="c",s.TIMED_TEXT="tt",s.KEY="k",s.OTHER="o"})(lt||(lt={}));var Ul;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(Ul||(Ul={}));var Cs;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Cs||(Cs={}));const bD={[Cs.OBJECT]:["br","d","ot","tb"],[Cs.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Cs.SESSION]:["cid","pr","sf","sid","st","v"],[Cs.STATUS]:["bs","rtp"]};class Ys{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(a=>a instanceof Ys?a:new Ys(a))),this.value=e,this.params=t}}class qp{constructor(e){this.description=void 0,this.description=e}}const SD="Dict";function wD(s){return Array.isArray(s)?JSON.stringify(s):s instanceof Map?"Map{}":s instanceof Set?"Set{}":typeof s=="object"?JSON.stringify(s):String(s)}function _D(s,e,t,a){return new Error(`failed to ${s} "${wD(e)}" as ${t}`,{cause:a})}const Yp="Bare Item",kD="Boolean",ED="Byte Sequence",TD="Decimal",CD="Integer";function xD(s){return s<-999999999999999||999999999999999<s}const vD=/[\x00-\x1f\x7f]+/,AD="Token",LD="Key";function Kt(s,e,t){return _D("serialize",s,e,t)}function ID(s){if(typeof s!="boolean")throw Kt(s,kD);return s?"?1":"?0"}function RD(s){return btoa(String.fromCharCode(...s))}function BD(s){if(ArrayBuffer.isView(s)===!1)throw Kt(s,ED);return`:${RD(s)}:`}function Jp(s){if(xD(s))throw Kt(s,CD);return s.toString()}function ND(s){return`@${Jp(s.getTime()/1e3)}`}function Xp(s,e){if(s<0)return-Xp(-s,e);const t=Math.pow(10,e);if(Math.abs(s*t%1-.5)<Number.EPSILON){const i=Math.floor(s*t);return(i%2===0?i:i+1)/t}else return Math.round(s*t)/t}function DD(s){const e=Xp(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Kt(s,TD);const t=e.toString();return t.includes(".")?t:`${t}.0`}const PD="String";function OD(s){if(vD.test(s))throw Kt(s,PD);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function FD(s){return s.description||s.toString().slice(7,-1)}function Zp(s){const e=FD(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Kt(e,AD);return e}function zl(s){switch(typeof s){case"number":if(!ne(s))throw Kt(s,Yp);return Number.isInteger(s)?Jp(s):DD(s);case"string":return OD(s);case"symbol":return Zp(s);case"boolean":return ID(s);case"object":if(s instanceof Date)return ND(s);if(s instanceof Uint8Array)return BD(s);if(s instanceof qp)return Zp(s);default:throw Kt(s,Yp)}}function Gl(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw Kt(s,LD);return s}function jl(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${Gl(e)}`:`;${Gl(e)}=${zl(t)}`).join("")}function Qp(s){return s instanceof Ys?`${zl(s.value)}${jl(s.params)}`:zl(s)}function MD(s){return`(${s.value.map(Qp).join(" ")})${jl(s.params)}`}function $D(s,e={whitespace:!0}){if(typeof s!="object")throw Kt(s,SD);const t=s instanceof Map?s.entries():Object.entries(s),a=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,o])=>{o instanceof Ys||(o=new Ys(o));let r=Gl(i);return o.value===!0?r+=jl(o.params):(r+="=",Array.isArray(o.value)?r+=MD(o):r+=Qp(o)),r}).join(`,${a}`)}function VD(s,e){return $D(s,e)}const UD=s=>s==="ot"||s==="sf"||s==="st",zD=s=>typeof s=="number"?ne(s):s!=null&&s!==""&&s!==!1;function GD(s,e){const t=new URL(s),a=new URL(e);if(t.origin!==a.origin)return s;const i=t.pathname.split("/").slice(1),o=a.pathname.split("/").slice(1,-1);for(;i[0]===o[0];)i.shift(),o.shift();for(;o.length;)o.shift(),i.unshift("..");return i.join("/")}function jD(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const o=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?o:o&3|8).toString(16)})}}}const fi=s=>Math.round(s),HD=(s,e)=>(e!=null&&e.baseUrl&&(s=GD(s,e.baseUrl)),encodeURIComponent(s)),pi=s=>fi(s/100)*100,WD={br:fi,d:fi,bl:pi,dl:pi,mtp:pi,nor:HD,rtp:pi,tb:fi};function KD(s,e){const t={};if(s==null||typeof s!="object")return t;const a=Object.keys(s).sort(),i=Ge({},WD,e==null?void 0:e.formatters),o=e==null?void 0:e.filter;return a.forEach(r=>{if(o!=null&&o(r))return;let l=s[r];const d=i[r];d&&(l=d(l,e)),!(r==="v"&&l===1)&&(r=="pr"&&l===1||zD(l)&&(UD(r)&&typeof l=="string"&&(l=new qp(l)),t[r]=l))}),t}function eg(s,e={}){return s?VD(KD(s,e),Ge({whitespace:!1},e)):""}function qD(s,e={}){if(!s)return{};const t=Object.entries(s),a=Object.entries(bD).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=t.reduce((o,r)=>{var l,d;const[c,h]=r,u=((l=a.find(f=>f[1].includes(c)))==null?void 0:l[0])||Cs.REQUEST;return(d=o[u])!=null||(o[u]={}),o[u][c]=h,o},{});return Object.entries(i).reduce((o,[r,l])=>(o[r]=eg(l,e),o),{})}function YD(s,e,t){return Ge(s,qD(e,t))}const JD="CMCD";function XD(s,e={}){if(!s)return"";const t=eg(s,e);return`${JD}=${encodeURIComponent(t)}`}const tg=/CMCD=[^&#]+/;function ZD(s,e,t){const a=XD(e,t);if(!a)return s;if(tg.test(s))return s.replace(tg,a);const i=s.includes("?")?"&":"?";return`${s}${i}${a}`}class QD{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:lt.MANIFEST,su:!this.initialized})}catch(o){A.warn("Could not generate manifest CMCD data.",o)}},this.applyFragmentData=i=>{try{const o=i.frag,r=this.hls.levels[o.level],l=this.getObjectType(o),d={d:o.duration*1e3,ot:l};(l===lt.VIDEO||l===lt.AUDIO||l==lt.MUXED)&&(d.br=r.bitrate/1e3,d.tb=this.getTopBandwidth(l)/1e3,d.bl=this.getBufferLength(l)),this.apply(i,d)}catch(o){A.warn("Could not generate segment CMCD data.",o)}},this.hls=e;const t=this.config=e.config,{cmcd:a}=t;a!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||jD(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.includeKeys=a.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHED,this.onMediaDetached,this),e.on(w.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHED,this.onMediaDetached,this),e.off(w.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var a,i;this.audioBuffer=(a=t.tracks.audio)==null?void 0:a.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:Ul.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Ge(t,this.createData());const a=t.ot===lt.INIT||t.ot===lt.VIDEO||t.ot===lt.MUXED;this.starved&&a&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((o,r)=>(i.includes(r)&&(o[r]=t[r]),o),{})),this.useHeaders?(e.headers||(e.headers={}),YD(e.headers,t)):e.url=ZD(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return lt.TIMED_TEXT;if(e.sn==="initSegment")return lt.INIT;if(t==="audio")return lt.AUDIO;if(t==="main")return this.hls.audioTracks.length?lt.VIDEO:lt.MUXED}getTopBandwidth(e){let t=0,a;const i=this.hls;if(e===lt.AUDIO)a=i.audioTracks;else{const o=i.maxAutoLevel,r=o>-1?o+1:i.levels.length;a=i.levels.slice(0,r)}for(const o of a)o.bitrate>t&&(t=o.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,a=e===lt.AUDIO?this.audioBuffer:this.videoBuffer;return!a||!t?NaN:De.bufferInfo(a,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,a=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new a(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,r,l){t(o),this.loader.load(o,r,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,a=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new a(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,r,l){t(o),this.loader.load(o,r,l)}}}}const eP=3e5;class tP{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=A.log.bind(A,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(a=>a!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:a}=t;a!==null&&(this.pathwayId=a.pathwayId,this.uri=a.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:a}=t;if((a==null?void 0:a.action)===nt.SendAlternateToPenaltyBox&&a.flags===Pt.MoveAllAlternatesMatchingHost){const i=this.levels;let o=this.pathwayPriority,r=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&i?r=this.getPathwayForGroupId(l,c,r):d&&(r=d)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!o&&i&&(o=i.reduce((l,d)=>(l.indexOf(d.pathwayId)===-1&&l.push(d.pathwayId),l),[])),o&&o.length>1&&(this.updatePathwayPriority(o),a.resolved=this.pathwayId!==r),a.resolved||A.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${r} levels: ${i&&i.length} priorities: ${JSON.stringify(o)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const a=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${a}"`),t=this.getLevelsForPathway(a),this.pathwayId=a}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const a=this.penalizedPathways,i=performance.now();Object.keys(a).forEach(o=>{i-a[o]>eP&&delete a[o]});for(let o=0;o<e.length;o++){const r=e[o];if(r in a)continue;if(r===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,Wf(t),this.hls.trigger(w.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,a){const i=this.getLevelsForPathway(a).concat(this.levels||[]);for(let o=0;o<i.length;o++)if(t===xe.AUDIO_TRACK&&i[o].hasAudioGroup(e)||t===xe.SUBTITLE_TRACK&&i[o].hasSubtitleGroup(e))return i[o].pathwayId;return a}clonePathways(e){const t=this.levels;if(!t)return;const a={},i={};e.forEach(o=>{const{ID:r,"BASE-ID":l,"URI-REPLACEMENT":d}=o;if(t.some(h=>h.pathwayId===r))return;const c=this.getLevelsForPathway(l).map(h=>{const u=new Oe(h.attrs);u["PATHWAY-ID"]=r;const f=u.AUDIO&&`${u.AUDIO}_clone_${r}`,p=u.SUBTITLES&&`${u.SUBTITLES}_clone_${r}`;f&&(a[u.AUDIO]=f,u.AUDIO=f),p&&(i[u.SUBTITLES]=p,u.SUBTITLES=p);const m=ag(h.uri,u["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),g=new Vs({attrs:u,audioCodec:h.audioCodec,bitrate:h.bitrate,height:h.height,name:h.name,url:m,videoCodec:h.videoCodec,width:h.width});if(h.audioGroups)for(let y=1;y<h.audioGroups.length;y++)g.addGroupId("audio",`${h.audioGroups[y]}_clone_${r}`);if(h.subtitleGroups)for(let y=1;y<h.subtitleGroups.length;y++)g.addGroupId("text",`${h.subtitleGroups[y]}_clone_${r}`);return g});t.push(...c),sg(this.audioTracks,a,d,r),sg(this.subtitleTracks,i,d,r)})}loadSteeringManifest(e){const t=this.hls.config,a=t.loader;this.loader&&this.loader.destroy(),this.loader=new a(t);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const h=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+h)}const o={responseType:"json",url:i.href},r=t.steeringManifestLoadPolicy.default,l=r.errorRetry||r.timeoutRetry||{},d={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(h,u,f,p)=>{this.log(`Loaded steering manifest: "${i}"`);const m=h.data;if(m.VERSION!==1){this.log(`Steering VERSION ${m.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=m.TTL;const{"RELOAD-URI":g,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=m;if(g)try{this.uri=new self.URL(g,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const S={steeringManifest:m,url:i.toString()};this.hls.trigger(w.STEERING_MANIFEST_LOADED,S),b&&this.updatePathwayPriority(b)},onError:(h,u,f,p)=>{if(this.log(`Error loading steering manifest: ${h.code} ${h.text} (${u.url})`),this.stopLoad(),h.code===410){this.enabled=!1,this.log(`Steering manifest ${u.url} no longer available`);return}let m=this.timeToLoad*1e3;if(h.code===429){const g=this.loader;if(typeof(g==null?void 0:g.getResponseHeader)=="function"){const y=g.getResponseHeader("Retry-After");y&&(m=parseFloat(y)*1e3)}this.log(`Steering manifest ${u.url} rate limited`);return}this.scheduleRefresh(this.uri||u.url,m)},onTimeout:(h,u,f)=>{this.log(`Timeout loading steering manifest (${u.url})`),this.scheduleRefresh(this.uri||u.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(o,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var a;const i=(a=this.hls)==null?void 0:a.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function sg(s,e,t,a){s&&Object.keys(e).forEach(i=>{const o=s.filter(r=>r.groupId===i).map(r=>{const l=Ge({},r);return l.details=void 0,l.attrs=new Oe(l.attrs),l.url=l.attrs.URI=ag(r.url,r.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[i],l.attrs["PATHWAY-ID"]=a,l});s.push(...o)})}function ag(s,e,t,a){const{HOST:i,PARAMS:o,[t]:r}=a;let l;e&&(l=r==null?void 0:r[e],l&&(s=l));const d=new self.URL(s);return i&&!l&&(d.host=i),o&&Object.keys(o).sort().forEach(c=>{c&&d.searchParams.set(c,o[c])}),d.href}const sP=/^age:\s*[\d.]+\s*$/im;class ng{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new $n,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=a,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const a=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const o=this.xhrSetup;o?Promise.resolve().then(()=>{if(!(this.loader!==a||this.stats.aborted))return o(a,t.url)}).catch(r=>{if(!(this.loader!==a||this.stats.aborted))return a.open("GET",t.url,!0),o(a,t.url)}).then(()=>{this.loader!==a||this.stats.aborted||this.openAndSendXhr(a,t,e)}).catch(r=>{this.callbacks.onError({code:a.status,text:r.message},t,a,i)}):this.openAndSendXhr(a,t,e)}openAndSendXhr(e,t,a){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:o,maxLoadTimeMs:r}=a.loadPolicy;if(i)for(const l in i)e.setRequestHeader(l,i[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),a.timeout=o&&ne(o)?o:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:a}=this;if(!e||!t)return;const i=t.readyState,o=this.config;if(!a.aborted&&i>=2&&(a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start),o.timeout!==o.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),o.timeout=o.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.loadPolicy.maxLoadTimeMs-(a.loading.first-a.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const r=t.status,l=t.responseType!=="text";if(r>=200&&r<300&&(l&&t.response||t.responseText!==null)){a.loading.end=Math.max(self.performance.now(),a.loading.first);const d=l?t.response:t.responseText,c=t.responseType==="arraybuffer"?d.byteLength:d.length;if(a.loaded=a.total=c,a.bwEstimate=a.total*8e3/(a.loading.end-a.loading.first),!this.callbacks)return;const h=this.callbacks.onProgress;if(h&&h(a,e,d,t),!this.callbacks)return;const u={url:t.responseURL,data:d,code:r};this.callbacks.onSuccess(u,a,e,t)}else{const d=o.loadPolicy.errorRetry,c=a.retry,h={url:e.url,data:void 0,code:r};Zn(d,c,!1,h)?this.retry(d):(A.error(`${r} while loading ${e.url}`),this.callbacks.onError({code:r,text:t.statusText},e,t,a))}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Zn(e,t,!0))this.retry(e);else{var a;A.warn(`timeout while loading ${(a=this.context)==null?void 0:a.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:a}=this;this.retryDelay=fl(e,a.retry),a.retry++,A.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${a.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&sP.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function aP(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const nP=/(\d+)-(\d+)\/(\d+)/;class ig{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||lP,this.controller=new self.AbortController,this.stats=new $n}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,a){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const o=iP(e,this.controller.signal),r=a.onProgress,l=e.responseType==="arraybuffer",d=l?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:h}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=a,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),t.timeout=c&&ne(c)?c:h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),a.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(u=>{this.response=this.loader=u;const f=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),a.onTimeout(i,e,this.response)},h-(f-i.loading.start)),!u.ok){const{status:p,statusText:m}=u;throw new cP(m||"fetch, bad network response",p,u)}return i.loading.first=f,i.total=rP(u.headers)||i.total,r&&ne(t.highWaterMark)?this.loadProgressively(u,i,e,t.highWaterMark,r):l?u.arrayBuffer():e.responseType==="json"?u.json():u.text()}).then(u=>{const f=this.response;if(!f)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const p=u[d];p&&(i.loaded=i.total=p);const m={url:f.url,data:u,code:f.status};r&&!ne(t.highWaterMark)&&r(i,e,u,f),a.onSuccess(m,i,e,f)}).catch(u=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const f=u&&u.code||0,p=u?u.message:null;a.onError({code:f,text:p},e,u?u.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,a,i=0,o){const r=new np,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return r.dataLength&&o(t,a,r.flush(),e),Promise.resolve(new ArrayBuffer(0));const h=c.value,u=h.length;return t.loaded+=u,u<i||r.dataLength?(r.push(h),r.dataLength>=i&&o(t,a,r.flush(),e)):o(t,a,h,e),d()}).catch(()=>Promise.reject());return d()}}function iP(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(Ge({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function oP(s){const e=nP.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function rP(s){const e=s.get("Content-Range");if(e){const a=oP(e);if(ne(a))return a}const t=s.get("Content-Length");if(t)return parseInt(t)}function lP(s,e){return new self.Request(s.url,e)}class cP extends Error{constructor(e,t,a){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=a}}const dP=/\s/,hP={newCue(s,e,t,a){const i=[];let o,r,l,d,c;const h=self.VTTCue||self.TextTrackCue;for(let f=0;f<a.rows.length;f++)if(o=a.rows[f],l=!0,d=0,c="",!o.isEmpty()){var u;for(let g=0;g<o.chars.length;g++)dP.test(o.chars[g].uchar)&&l?d++:(c+=o.chars[g].uchar,l=!1);o.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const p=Mp(c.trim()),m=Pl(e,t,p);s!=null&&(u=s.cues)!=null&&u.getCueById(m)||(r=new h(e,t,p),r.id=m,r.line=f+1,r.align="left",r.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(r))}return s&&i.length&&(i.sort((f,p)=>f.line==="auto"||p.line==="auto"?0:f.line>8&&p.line>8?p.line-f.line:f.line-p.line),i.forEach(f=>Ff(s,f))),i}},uP={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},og=Xe(Xe({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ng,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:$B,bufferController:GN,capLevelController:Vl,errorController:vB,fpsController:yD,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:rf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:uP},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},mP()),{},{subtitleStreamController:$N,subtitleTrackController:UN,timelineController:pD,audioStreamController:FN,audioTrackController:MN,emeController:qs,cmcdController:QD,contentSteeringController:tP});function mP(){return{cueHandler:hP,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function fP(s,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=Hl(s),a=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return a.forEach(o=>{const r=`${o==="level"?"playlist":o}LoadPolicy`,l=e[r]===void 0,d=[];i.forEach(c=>{const h=`${o}Loading${c}`,u=e[h];if(u!==void 0&&l){d.push(h);const f=t[r].default;switch(e[r]={default:f},c){case"TimeOut":f.maxLoadTimeMs=u,f.maxTimeToFirstByteMs=u;break;case"MaxRetry":f.errorRetry.maxNumRetry=u,f.timeoutRetry.maxNumRetry=u;break;case"RetryDelay":f.errorRetry.retryDelayMs=u,f.timeoutRetry.retryDelayMs=u;break;case"MaxRetryTimeout":f.errorRetry.maxRetryDelayMs=u,f.timeoutRetry.maxRetryDelayMs=u;break}}}),d.length&&A.warn(`hls.js config: "${d.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(e[r])}`)}),Xe(Xe({},t),e)}function Hl(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(Hl):Object.keys(s).reduce((e,t)=>(e[t]=Hl(s[t]),e),{}):s}function pP(s){const e=s.loader;e!==ig&&e!==ng?(A.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):aP()&&(s.loader=ig,s.progressive=!0,s.enableSoftwareAES=!0,A.log("[config]: Progressive streaming enabled, using FetchLoader"))}let Wl;class gP extends gl{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this),e.on(w.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this),e.off(w.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const a=this.hls.config.preferManagedMediaSource,i=[],o={},r={};let l=!1,d=!1,c=!1;t.levels.forEach(h=>{var u,f;const p=h.attrs;let{audioCodec:m,videoCodec:g}=h;((u=m)==null?void 0:u.indexOf("mp4a.40.34"))!==-1&&(Wl||(Wl=/chrome|firefox/i.test(navigator.userAgent)),Wl&&(h.audioCodec=m=void 0)),m&&(h.audioCodec=m=Wn(m,a)),((f=g)==null?void 0:f.indexOf("avc1"))===0&&(g=h.videoCodec=sB(g));const{width:y,height:b,unknownCodecs:S}=h;if(l||(l=!!(y&&b)),d||(d=!!g),c||(c=!!m),S!=null&&S.length||m&&!il(m,"audio",a)||g&&!il(g,"video",a))return;const{CODECS:_,"FRAME-RATE":C,"HDCP-LEVEL":E,"PATHWAY-ID":v,RESOLUTION:T,"VIDEO-RANGE":B}=p,R=`${`${v||"."}-`}${h.bitrate}-${T}-${C}-${_}-${B}-${E}`;if(o[R])if(o[R].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const $=r[R]+=1;h.attrs["PATHWAY-ID"]=new Array($+1).join(".");const K=new Vs(h);o[R]=K,i.push(K)}else o[R].addGroupId("audio",p.AUDIO),o[R].addGroupId("text",p.SUBTITLES);else{const $=new Vs(h);o[R]=$,r[R]=1,i.push($)}}),this.filterAndSortMediaOptions(i,t,l,d,c)}filterAndSortMediaOptions(e,t,a,i,o){let r=[],l=[],d=e;if((a||i)&&o&&(d=d.filter(({videoCodec:m,videoRange:g,width:y,height:b})=>(!!m||!!(y&&b))&&pB(g))),d.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const m=new Error("no level with compatible codecs found in manifest");this.hls.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:m,reason:m.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:m}=this.hls.config;r=t.audioTracks.filter(g=>!g.audioCodec||il(g.audioCodec,"audio",m)),rg(r)}t.subtitles&&(l=t.subtitles,rg(l));const c=d.slice(0);d.sort((m,g)=>{if(m.attrs["HDCP-LEVEL"]!==g.attrs["HDCP-LEVEL"])return(m.attrs["HDCP-LEVEL"]||"")>(g.attrs["HDCP-LEVEL"]||"")?1:-1;if(a&&m.height!==g.height)return m.height-g.height;if(m.frameRate!==g.frameRate)return m.frameRate-g.frameRate;if(m.videoRange!==g.videoRange)return Yn.indexOf(m.videoRange)-Yn.indexOf(g.videoRange);if(m.videoCodec!==g.videoCodec){const y=Tf(m.videoCodec),b=Tf(g.videoCodec);if(y!==b)return b-y}if(m.uri===g.uri&&m.codecSet!==g.codecSet){const y=Hn(m.codecSet),b=Hn(g.codecSet);if(y!==b)return b-y}return m.averageBitrate!==g.averageBitrate?m.averageBitrate-g.averageBitrate:0});let h=c[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==c.length)){for(let m=0;m<c.length;m++)if(c[m].pathwayId===d[0].pathwayId){h=c[m];break}}this._levels=d;for(let m=0;m<d.length;m++)if(d[m]===h){var u;this._firstLevel=m;const g=h.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${g}`),((u=this.hls.userConfig)==null?void 0:u.abrEwmaDefaultEstimate)===void 0){const b=Math.min(g,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===og.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=o&&!i,p={levels:d,audioTracks:r,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:o,video:i,altAudio:!f&&r.some(m=>!!m.url)};this.hls.trigger(w.MANIFEST_PARSED,p),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const h=new Error("invalid level idx"),u=e<0;if(this.hls.trigger(w.ERROR,{type:fe.OTHER_ERROR,details:N.LEVEL_SWITCH_ERROR,level:e,fatal:u,error:h,reason:h.message}),u)return;e=Math.min(e,t.length-1)}const a=this.currentLevelIndex,i=this.currentLevel,o=i?i.attrs["PATHWAY-ID"]:void 0,r=t[e],l=r.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=r,a===e&&r.details&&i&&o===l)return;this.log(`Switching to level ${e} (${r.height?r.height+"p ":""}${r.videoRange?r.videoRange+" ":""}${r.codecSet?r.codecSet+" ":""}@${r.bitrate})${l?" with Pathway "+l:""} from level ${a}${o?" with Pathway "+o:""}`);const d={level:e,attrs:r.attrs,details:r.details,bitrate:r.bitrate,averageBitrate:r.averageBitrate,maxBitrate:r.maxBitrate,realBitrate:r.realBitrate,width:r.width,height:r.height,codecSet:r.codecSet,audioCodec:r.audioCodec,videoCodec:r.videoCodec,audioGroups:r.audioGroups,subtitleGroups:r.subtitleGroups,loaded:r.loaded,loadError:r.loadError,fragmentError:r.fragmentError,name:r.name,id:r.id,uri:r.uri,url:r.url,urlId:0,audioGroupIds:r.audioGroupIds,textGroupIds:r.textGroupIds};this.hls.trigger(w.LEVEL_SWITCHING,d);const c=r.details;if(!c||c.live){const h=this.switchParams(r.uri,i==null?void 0:i.details,c);this.loadPlaylist(h)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===xe.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.MAIN){const a=t.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var a;const{level:i,details:o}=t,r=this._levels[i];if(!r){var l;this.warn(`Invalid level index ${i}`),(l=t.deliveryDirectives)!=null&&l.skip&&(o.deltaUpdateFailed=!0);return}i===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0),this.playlistLoaded(i,t,r.details)):(a=t.deliveryDirectives)!=null&&a.skip&&(o.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,a=this.currentLevel;if(a&&this.shouldLoadPlaylist(a)){let i=a.uri;if(e)try{i=e.addDirectives(i)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}const o=a.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${o?" Pathway "+o:""} ${i}`),this.clearTimer(),this.hls.trigger(w.LEVEL_LOADING,{url:i,level:t,pathwayId:a.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const a=this._levels.filter((i,o)=>o!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(r=>r.level=-1)),!1));Wf(a),this._levels=a,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(w.LEVELS_UPDATED,{levels:a})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:a}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(w.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:a}))}}function rg(s){const e={};s.forEach(t=>{const a=t.groupId||"";t.id=e[a]=e[a]||0,e[a]++})}class yP{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const a in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[a].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=N.KEY_LOAD_ERROR,a,i,o){return new Zt({type:fe.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:o,error:a,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:a,cc:i}=e;for(let o=0;o<t.length;o++){const r=t[o];if(i<=r.cc&&(a==="initSegment"||r.sn==="initSegment"||a<r.sn)){this.emeController.selectKeySystemFormat(r).then(l=>{r.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var a,i;t&&e.setKeyFormat(t);const o=e.decryptdata;if(!o){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,c))}const r=o.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${r}"`)));let l=this.keyUriToKeyInfo[r];if((a=l)!=null&&a.decryptdata.key)return o.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((i=l)!=null&&i.keyLoadPromise){var d;switch((d=l.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(o.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[r]={decryptdata:o,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},o.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return o.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${o.method}"`)))}}loadKeyEME(e,t){const a={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(a);if(i)return(e.keyLoadPromise=i.then(o=>(e.mediaKeySessionContext=o,a))).catch(o=>{throw e.keyLoadPromise=null,o})}return Promise.resolve(a)}loadKeyHTTP(e,t){const a=this.config,i=a.loader,o=new i(a);return t.keyLoader=e.loader=o,e.keyLoadPromise=new Promise((r,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=a.keyLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(f,p,m,g)=>{const{frag:y,keyInfo:b,url:S}=m;if(!y.decryptdata||b!==this.keyUriToKeyInfo[S])return l(this.createKeyLoadError(y,N.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),g));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,r({frag:y,keyInfo:b})},onError:(f,p,m,g)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),m,Xe({url:d.url,data:void 0},f)))},onTimeout:(f,p,m)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),m))},onAbort:(f,p,m)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.INTERNAL_ABORTED,new Error("key loading aborted"),m))}};o.load(d,h,u)})}resetLoader(e){const{frag:t,keyInfo:a,url:i}=e,o=a.loader;t.keyLoader===o&&(t.keyLoader=null,a.loader=null),delete this.keyUriToKeyInfo[i],o&&o.destroy()}}function lg(){return self.SourceBuffer||self.WebKitSourceBuffer}function cg(){if(!Es())return!1;const e=lg();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function bP(){if(!cg())return!1;const s=Es();return typeof(s==null?void 0:s.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>s.isTypeSupported(Ta(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(Ta(e,"audio"))))}function SP(){var s;const e=lg();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const wP=250,gi=2,_P=.1,kP=.05;class EP{constructor(e,t,a,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=a,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:a,media:i,stalled:o}=this;if(i===null)return;const{currentTime:r,seeking:l}=i,d=this.seeking&&!l,c=!this.seeking&&l;if(this.seeking=l,r!==e){if(this.moved=!0,l||(this.nudgeRetry=0),o!==null){if(this.stallReported){const y=self.performance.now()-o;A.warn(`playback not stuck anymore @${r}, after ${Math.round(y)}ms`),this.stallReported=!1}this.stalled=null}return}if(c||d){this.stalled=null;return}if(i.paused&&!l||i.ended||i.playbackRate===0||!De.getBuffered(i).length){this.nudgeRetry=0;return}const h=De.bufferInfo(i,r,0),u=h.nextStart||0;if(l){const y=h.len>gi,b=!u||t&&t.start<=r||u-r>gi&&!this.fragmentTracker.getPartialFragment(r);if(y||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;if(!(h.len>0)&&!u)return;const b=Math.max(u,h.start||0)-r,S=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,C=(S==null||(f=S.details)==null?void 0:f.live)?S.details.targetduration*2:gi,E=this.fragmentTracker.getPartialFragment(r);if(b>0&&(b<=C||E)){i.paused||this._trySkipBufferHole(E);return}}const p=self.performance.now();if(o===null){this.stalled=p;return}const m=p-o;if(!l&&m>=wP&&(this._reportStall(h),!this.media))return;const g=De.bufferInfo(i,r,a.maxBufferHole);this._tryFixBufferStall(g,m)}_tryFixBufferStall(e,t){const{config:a,fragmentTracker:i,media:o}=this;if(o===null)return;const r=o.currentTime,l=i.getPartialFragment(r);l&&(this._trySkipBufferHole(l)||!this.media)||(e.len>a.maxBufferHole||e.nextStart&&e.nextStart-r<a.maxBufferHole)&&t>a.highBufferWatchdogPeriod*1e3&&(A.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:a,stallReported:i}=this;if(!i&&a){this.stallReported=!0;const o=new Error(`Playback stalling at @${a.currentTime} due to low buffer (${JSON.stringify(e)})`);A.warn(o.message),t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,fatal:!1,error:o,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:a,media:i}=this;if(i===null)return 0;const o=i.currentTime,r=De.bufferInfo(i,o,0),l=o<r.start?r.start:r.nextStart;if(l){const d=r.len<=t.maxBufferHole,c=r.len>0&&r.len<1&&i.readyState<3,h=l-o;if(h>0&&(d||c)){if(h>t.maxBufferHole){const{fragmentTracker:f}=this;let p=!1;if(o===0){const m=f.getAppendedFrag(0,le.MAIN);m&&l<m.end&&(p=!0)}if(!p){const m=e||f.getAppendedFrag(o,le.MAIN);if(m){let g=!1,y=m.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{g=!0;break}}if(g)return 0}}}const u=Math.max(l+kP,o+_P);if(A.warn(`skipping hole, adjusting currentTime from ${o} to ${u}`),this.moved=!0,this.stalled=null,i.currentTime=u,e&&!e.gap){const f=new Error(`fragment loaded with buffer holes, seeking from ${o} to ${u}`);a.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:f,reason:f.message,frag:e})}return u}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:a,nudgeRetry:i}=this;if(a===null)return;const o=a.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const r=o+(i+1)*e.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${o} to ${r}`);A.warn(l.message),a.currentTime=r,t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1})}else{const r=new Error(`Playhead still not moving while enough data buffered @${o} after ${e.nudgeMaxRetry} nudges`);A.error(r.message),t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:r,fatal:!0})}}}const TP=100;class CP extends Sl{constructor(e,t,a){super(e,t,a,"[stream-controller]",le.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.LEVEL_LOADING,this.onLevelLoading,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this),e.on(w.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(w.ERROR,this.onError,this),e.on(w.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(w.BUFFER_CREATED,this.onBufferCreated,this),e.on(w.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this),e.off(w.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(w.ERROR,this.onError,this),e.off(w.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(w.BUFFER_CREATED,this.onBufferCreated,this),e.off(w.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:a}=this;if(this.stopLoad(),this.setInterval(TP),this.level=-1,!this.startFragRequested){let i=a.startLevel;i===-1&&(a.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=a.firstAutoLevel),a.nextLoadLevel=i,this.level=a.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=V.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case V.WAITING_LEVEL:{const{levels:t,level:a}=this,i=t==null?void 0:t[a],o=i==null?void 0:i.details;if(o&&(!o.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(o))break;this.state=V.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=V.IDLE;break}break}case V.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),a=this.retryDate;if(!a||t>=a||(e=this.media)!=null&&e.seeking){const{levels:i,level:o}=this,r=i==null?void 0:i[o];this.resetStartWhenNotLoaded(r||null),this.state=V.IDLE}}break}this.state===V.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:a,media:i}=this;if(t===null||!i&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const o=e.nextLoadLevel;if(!(a!=null&&a[o]))return;const r=a[o],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(w.BUFFER_EOS,g),this.state=V.ENDED;return}e.loadLevel!==o&&e.manualLevel===-1&&this.log(`Adapting to level ${o} from level ${this.level}`),this.level=e.nextLoadLevel=o;const c=r.details;if(!c||this.state===V.WAITING_LEVEL||c.live&&this.levelLastLoaded!==r){this.level=o,this.state=V.WAITING_LEVEL;return}const h=l.len,u=this.getMaxBufferLength(r.maxBitrate);if(h>=u)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==Ze.OK){var m;const y=((m=this.backtrackFragment)!=null?m:p).sn-c.startSN,b=c.fragments[y-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const y=this.audioOnly&&!this.altAudio?Re.AUDIO:Re.VIDEO,b=(y===Re.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,le.MAIN)}p=this.getNextFragmentLoopLoading(p,c,l,le.MAIN,u)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,r,f))}loadFragment(e,t,a){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===Ze.NOT_LOADED||i===Ze.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,a)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,le.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let a;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const o=this.getLevelDetails();if(o!=null&&o.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<o.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?a=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:a=0}else a=0;const r=this.getBufferedFrag(t.currentTime+a);if(r){const l=this.followingBufferedFrag(r);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,h=Math.max(r.end,d+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case V.KEY_LOADING:case V.FRAG_LOADING:case V.FRAG_LOADING_WAITING_RETRY:case V.PARSING:case V.PARSED:this.state=V.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const a=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),a.addEventListener("playing",this.onvplaying),a.addEventListener("seeked",this.onvseeked),this.gapController=new EP(this.config,a,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;ne(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const a=this.getMainFwdBufferInfo();if(a===null||a.len===0){this.warn(`Main forward buffer length on "seeked" event ${a?a.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let a=!1,i=!1;t.levels.forEach(o=>{const r=o.audioCodec;r&&(a=a||r.indexOf("mp4a.40.2")!==-1,i=i||r.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=a&&i&&!SP(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:a}=this;if(!a||this.state!==V.IDLE)return;const i=a[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=V.WAITING_LEVEL)}onLevelLoaded(e,t){var a;const{levels:i}=this,o=t.level,r=t.details,l=r.totalduration;if(!i){this.warn(`Levels were reset while loading level ${o}`);return}this.log(`Level ${o} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""}, cc [${r.startCC}, ${r.endCC}] duration:${l}`);const d=i[o],c=this.fragCurrent;c&&(this.state===V.FRAG_LOADING||this.state===V.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let h=0;if(r.live||(a=d.details)!=null&&a.live){var u;if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;h=this.alignPlaylists(r,d.details,(u=this.levelLastLoaded)==null?void 0:u.details)}if(d.details=r,this.levelLastLoaded=d,this.hls.trigger(w.LEVEL_UPDATED,{details:r,level:o}),this.state===V.WAITING_LEVEL){if(this.waitForCdnTuneIn(r))return;this.state=V.IDLE}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,h),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:a,part:i,payload:o}=e,{levels:r}=this;if(!r){this.warn(`Levels were reset while fragment load was in progress. Fragment ${a.sn} of level ${a.level} will not be buffered`);return}const l=r[a.level],d=l.details;if(!d){this.warn(`Dropping fragment ${a.sn} of level ${a.level} after level details were reset`),this.fragmentTracker.removeFragment(a);return}const c=l.videoCodec,h=d.PTSKnown||!d.live,u=(t=a.initSegment)==null?void 0:t.data,f=this._getAudioCodec(l),p=this.transmuxer=this.transmuxer||new xp(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,g=m!==-1,y=new yl(a.level,a.sn,a.stats.chunkCount,o.byteLength,m,g),b=this.initPTS[a.cc];p.push(o,u,f,c,a,i,d.totalduration,h,y,b)}onAudioTrackSwitching(e,t){const a=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const r=this.fragCurrent;r&&(this.log("Switching to main audio track, cancel main fragment load"),r.abortRequests(),this.fragmentTracker.removeFragment(r)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const o=this.hls;a&&(o.trigger(w.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),o.trigger(w.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const a=t.id,i=!!this.hls.audioTracks[a].url;if(i){const o=this.videoBuffer;o&&this.mediaBuffer!==o&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=o)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const a=t.tracks;let i,o,r=!1;for(const l in a){const d=a[l];if(d.id==="main"){if(o=l,i=d,l==="video"){const c=a[l];c&&(this.videoBuffer=c.buffer)}}else r=!0}r&&i?(this.log(`Alternate track found, use ${o}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:a,part:i}=t;if(a&&a.type!==le.MAIN)return;if(this.fragContextChanged(a)){this.warn(`Fragment ${a.sn}${i?" p: "+i.index:""} of level ${a.level} finished buffering, but was aborted. state: ${this.state}`),this.state===V.PARSED&&(this.state=V.IDLE);return}const o=i?i.stats:a.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),a.sn!=="initSegment"&&(this.fragPrevious=a),this.fragBufferedComplete(a,i)}onError(e,t){var a;if(t.fatal){this.state=V.ERROR;return}switch(t.details){case N.FRAG_GAP:case N.FRAG_PARSING_ERROR:case N.FRAG_DECRYPT_ERROR:case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===V.WAITING_LEVEL&&((a=t.context)==null?void 0:a.type)===xe.LEVEL&&(this.state=V.IDLE);break;case N.BUFFER_APPEND_ERROR:case N.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===N.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case N.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!De.getBuffered(e).length){const a=this.state!==V.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,a)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=V.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Re.AUDIO||this.audioOnly&&!this.altAudio){const a=(t===Re.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(a,t,le.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let a=this.startPosition;if(a>=0&&t<a){if(e.seeking){this.log(`could not seek to ${a}, already seeking at ${t}`);return}const i=De.getBuffered(e),r=(i.length?i.start(0):0)-a;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),a+=r,this.startPosition=a),this.log(`seek to target start position ${a} from current time ${t}`),e.currentTime=a}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(a=>{const{hls:i}=this;if(!a||this.fragContextChanged(e))return;t.fragmentError=0,this.state=V.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const o=e.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),i.trigger(w.FRAG_LOADED,a),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const a="main",{hls:i}=this,{remuxResult:o,chunkMeta:r}=e,l=this.getCurrentContext(r);if(!l){this.resetWhenMissingContext(r);return}const{frag:d,part:c,level:h}=l,{video:u,text:f,id3:p,initSegment:m}=o,{details:g}=h,y=this.altAudio?void 0:o.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=V.PARSING,m){if(m!=null&&m.tracks){const _=d.initSegment||d;this._bufferInitSegment(h,m.tracks,_,r),i.trigger(w.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:a,tracks:m.tracks})}const b=m.initPTS,S=m.timescale;ne(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:S},i.trigger(w.INIT_PTS_FOUND,{frag:d,id:a,initPTS:b,timescale:S}))}if(u&&g&&d.sn!=="initSegment"){const b=g.fragments[d.sn-1-g.startSN],S=d.sn===g.startSN,_=!b||d.cc>b.cc;if(o.independent!==!1){const{startPTS:C,endPTS:E,startDTS:v,endDTS:T}=u;if(c)c.elementaryStreams[u.type]={startPTS:C,endPTS:E,startDTS:v,endDTS:T};else if(u.firstKeyFrame&&u.independent&&r.id===1&&!_&&(this.couldBacktrack=!0),u.dropped&&u.independent){const B=this.getMainFwdBufferInfo(),L=(B?B.end:this.getLoadPosition())+this.config.maxBufferHole,R=u.firstKeyFramePTS?u.firstKeyFramePTS:C;if(!S&&L<R-this.config.maxBufferHole&&!_){this.backtrack(d);return}else _&&(d.gap=!0);d.setElementaryStreamInfo(u.type,d.start,E,d.start,T,!0)}else S&&C>gi&&(d.gap=!0);d.setElementaryStreamInfo(u.type,C,E,v,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(u,d,c,r,S||_)}else if(S||_)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:S,startDTS:_,endDTS:C}=y;c&&(c.elementaryStreams[Re.AUDIO]={startPTS:b,endPTS:S,startDTS:_,endDTS:C}),d.setElementaryStreamInfo(Re.AUDIO,b,S,_,C),this.bufferFragmentData(y,d,c,r)}if(g&&p!=null&&(t=p.samples)!=null&&t.length){const b={id:a,frag:d,details:g,samples:p.samples};i.trigger(w.FRAG_PARSING_METADATA,b)}if(g&&f){const b={id:a,frag:d,details:g,samples:f.samples};i.trigger(w.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,a,i){if(this.state!==V.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:o,video:r,audiovideo:l}=t;if(o){let d=e.audioCodec;const c=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const h=o.metadata;h&&"channelCount"in h&&(h.channelCount||1)!==1&&c.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&c.indexOf("android")!==-1&&o.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),e.audioCodec&&e.audioCodec!==d&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${d}"`),o.levelCodec=d,o.id="main",this.log(`Init audio buffer, container:${o.container}, codecs[selected/level/parsed]=[${d||""}/${e.audioCodec||""}/${o.codec}]`)}r&&(r.levelCodec=e.videoCodec,r.id="main",this.log(`Init video buffer, container:${r.container}, codecs[level/parsed]=[${e.videoCodec||""}/${r.codec}]`)),l&&this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),this.hls.trigger(w.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const h=t[d].initSegment;h!=null&&h.byteLength&&this.hls.trigger(w.BUFFER_APPENDING,{type:d,data:h,frag:a,part:null,chunkMeta:i,parent:a.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,le.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=V.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const a=e.currentTime;if(De.isBuffered(e,a)?t=this.getAppendedFrag(a):De.isBuffered(e,a+.1)&&(t=this.getAppendedFrag(a+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,o=t.level;(!i||t.sn!==i.sn||i.level!==o)&&(this.fragPlaying=t,this.hls.trigger(w.FRAG_CHANGED,{frag:t}),(!i||i.level!==o)&&this.hls.trigger(w.LEVEL_SWITCHED,{level:o}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,a=this.currentFrag;if(a&&ne(t)&&ne(a.programDateTime)){const i=a.programDateTime+(t-a.start)*1e3;return new Date(i)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class ds{static get version(){return"1.5.15"}static isMSESupported(){return cg()}static isSupported(){return bP()}static getMediaSource(){return Es()}static get Events(){return w}static get ErrorTypes(){return fe}static get ErrorDetails(){return N}static get DefaultConfig(){return ds.defaultConfig?ds.defaultConfig:og}static set DefaultConfig(e){ds.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new Al,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,m6(e.debug||!1,"Hls instance");const t=this.config=fP(ds.DefaultConfig,e);this.userConfig=e,t.progressive&&pP(t);const{abrController:a,bufferController:i,capLevelController:o,errorController:r,fpsController:l}=t,d=new r(this),c=this.abrController=new a(this),h=this.bufferController=new i(this),u=this.capLevelController=new o(this),f=new l(this),p=new rB(this),m=new uB(this),g=t.contentSteeringController,y=g?new g(this):null,b=this.levelController=new gP(this,y),S=new UB(this),_=new yP(this.config),C=this.streamController=new CP(this,S,_);u.setStreamController(C),f.setStreamController(C);const E=[p,b,C];y&&E.splice(1,0,y),this.networkControllers=E;const v=[c,h,u,f,m,S];this.audioTrackController=this.createController(t.audioTrackController,E);const T=t.audioStreamController;T&&E.push(new T(this,S,_)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const B=t.subtitleStreamController;B&&E.push(new B(this,S,_)),this.createController(t.timelineController,v),_.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(mB,v),this.coreComponents=v,E.push(d);const L=d.onErrorOut;typeof L=="function"&&this.on(w.ERROR,L,d)}createController(e,t){if(e){const a=new e(this);return t&&t.push(a),a}return null}on(e,t,a=this){this._emitter.on(e,t,a)}once(e,t,a=this){this._emitter.once(e,t,a)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,a=this,i){this._emitter.off(e,t,a,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,a){return this._emitter.emit(e,t,a)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(a){if(A.error("An internal error happened while handling event "+e+'. Error message: "'+a.message+'". Here is a stacktrace:',a),!this.triggeringException){this.triggeringException=!0;const i=e===w.ERROR;this.trigger(w.ERROR,{type:fe.OTHER_ERROR,details:N.INTERNAL_EXCEPTION,fatal:i,event:e,error:a}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){A.log("destroy"),this.trigger(w.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){A.log("attachMedia"),this._media=e,this.trigger(w.MEDIA_ATTACHING,{media:e})}detachMedia(){A.log("detachMedia"),this.trigger(w.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,a=this.url,i=this.url=Kr.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,A.log(`loadSource:${i}`),t&&a&&(a!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(w.MANIFEST_LOADING,{url:e})}startLoad(e=-1){A.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){A.log("stopLoad"),this.started=!1,this.networkControllers.forEach(e=>{e.stopLoad()})}resumeBuffering(){this.started&&this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.startLoad(-1)})}pauseBuffering(){this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.stopLoad()})}swapAudioCodec(){A.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){A.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){A.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){A.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){A.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){A.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){A.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(A.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){fB(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const a=e.length;for(let i=0;i<a;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:a}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,a)for(let o=i;o--;){const r=e[o].attrs["HDCP-LEVEL"];if(r&&r<=a)return o}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ds.defaultConfig=void 0;const xP=[(s=>(n.pushScopeId("data-v-bf69d301"),s=s(),n.popScopeId(),s))(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[n.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),n.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],vP={class:"stories__content"},AP={class:"story-container-game"},LP={class:"story-circle"},IP={class:"story-result"},RP={class:"stories__content__stories-bar"},BP={class:"stories__content__video"},NP={class:"stories__content__video__info__date"},DP={class:"stories__content__video__info__data"},PP=qe({__name:"GameStories",props:{stories:{type:Array,default:()=>[]},startStoryIndex:{type:Number,default:0},isFirstGameStories:{type:Boolean,default:!1},isLastGameStories:{type:Boolean,default:!1}},emits:["close","last-story-index","swipe","video-play","video-next-back"],setup(s,{emit:e}){const t=s;n.useCssVars(se=>({f47bb864:y.value,"875f549a":b.value,"3a0e3be2":v.value}));const a=Ho(),o=[{ids:[607,608],name:"Oportunidad de Gol"},{ids:[12,55],name:"Gol"},{ids:[54,35],name:"Autogol"},{ids:[14,52],name:"Tarjeta Amarilla"},{ids:[15,53],name:"Tarjeta Roja"},{ids:[466,477],name:"Penal Recibido"}].reduce((se,Ee)=>(Ee.ids.forEach(Te=>{se.set(Te,Ee.name)}),se),new Map),r=n.ref(null),l=n.ref(null),d=n.ref([]),c=n.ref(0),h=n.ref(null),u=n.ref(0),f=n.ref(0),p=n.ref(0),m=n.ref(!1),g=n.ref(0),y=n.ref("auto"),b=n.ref("100%"),S=n.ref(null),_=n.ref(0),C=n.ref(null),E=n.ref(null),v=n.computed(()=>Z()?"7vw":"16px"),T=n.computed(()=>d.value[c.value]),B=n.computed(()=>({"--icon-play":`url(${a}/icnplay1.svg)`}));function L(){l.value.muted=!1,l.value.play()}const R=n.computed(()=>!T.value.isHls&&["ios"].includes(Wo()));n.watch(()=>T.value,se=>{se&&K()}),n.watch(()=>t.stories,se=>{if(se.length){c.value=0,p.value=0;const Ee=se.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${Qh[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${o.get(Te.categoryId)} ${Mx(Te.player.player_name)}`})).sort((Te,Fe)=>Te.startTime-Fe.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ee.length-1&&(Ee.forEach((Te,Fe)=>{Fe<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,p.value=c.value),d.value=[...Ee]}},{immediate:!0}),n.watch(()=>r.value,se=>{se&&$()},{flush:"post"}),n.watch(()=>h.value,se=>{se&&(Fx()?(se.addEventListener("touchstart",he),se.addEventListener("touchend",J)):(se.addEventListener("mousedown",he),se.addEventListener("mouseup",J)))},{flush:"post"});function $(){l.value=new Ps("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",ae(l.value)),l.value.on("timeupdate",oe()),K(T.value),l.value.isDestroyed=!1}function K(){T.value.isHls?z(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function z(se){if(r.value)if(ds.isSupported()){r.value.src=null;let Ee=new ds;Ee.loadSource(se.url),Ee.attachMedia(r.value)}else l.value.source={type:"video",sources:[{src:se.url,type:"video/mp4"}]}}function ae(){const se=document.querySelector(".plyr__video-wrapper");return se&&(_.value=se.getBoundingClientRect()),()=>{l.value.duration>0&&(l.value.currentTime=T.value.startTime||0,l.value.muted=!1,l.value.play(),e("video-play",T.value))}}function oe(){return Ce(),()=>{T.value.currentTime=l.value.currentTime,T.value.progress=(l.value.currentTime-T.value.startTime)/T.value.duration*100,(l.value.currentTime-T.value.startTime)/T.value.duration*100===0?Z()&&(m.value=!0):Z()&&(m.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!Z()&&(E.value.style="display: none",b.value="100%"):E.value&&!Z()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ie())}}function ie(se=1){const Ee=c.value+se;Ee<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):de("right",T.value):Ee===d.value.length?t.isLastGameStories?q():de("left",T.value):(c.value=Ee,se===1&&(p.value=c.value))}function ce(){u.value>f.value?de("left",T.value):u.value<f.value?de("right",T.value):Q()}function de(se,Ee){e("last-story-index",p.value),e("swipe",{direction:se,currentPlay:Ee})}function Q(){const se=window.innerWidth/2,Ee=u.value<se,Te=T.value.progress;T.value.progress=Ee?0:100,l.value.pause(),e("video-next-back",{eventName:Ee?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ie(Ee?-1:1)}function q(){l.value.pause(),l.value.muted=!0,e("last-story-index",p.value),e("close",T.value)}function he(se){u.value=se.changedTouches?se.changedTouches[0].clientX:se.clientX}function J(se){f.value=se.changedTouches?se.changedTouches[0].clientX:se.clientX,ce()}function Z(){return/iPhone|iPad/i.test(navigator.userAgent)}function ue(){window.scrollTo(0,100)}function ge(){if(window.scrollTo(0,100),Wo()=="android"){const se=document.querySelector("#stories");se.requestFullscreen(se)}}function Ce(){if(window.ResizeObserver)S.value=new window.ResizeObserver(()=>{C.value&&_.value.height>0&&(C.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",C.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),S.value.observe(C.value);else throw new Error("Resize observer not supported!")}return n.onMounted(()=>{g.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),Z()?(window.addEventListener("resize",ue),ue()):(window.addEventListener("orientationchange",ge),ge()),setTimeout(()=>{Ce()},500)}),n.onBeforeUnmount(()=>{window.scrollTo(0,g.value),Z()?window.removeEventListener("resize",ue):(Wo()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ge)),S.value&&(S.value.disconnect(),S.value=null)}),(se,Ee)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stories",Z()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:C,style:n.normalizeStyle(B.value)},[n.createElementVNode("div",{class:n.normalizeClass(["stories__close",Z()?"stories-safe-areas-iphone":""]),onClick:q},xP,2),n.createElementVNode("div",vP,[n.createElementVNode("div",AP,[n.createElementVNode("div",LP,[n.createElementVNode("div",{class:"circle-item-home",style:n.normalizeStyle(`background-image: url(${T.value.thumbnail.logoHomeTeam})`)},null,4),n.createElementVNode("div",{class:"circle-item-away",style:n.normalizeStyle(`background-image: url(${T.value.thumbnail.logoAwayTeam})`)},null,4)]),n.createElementVNode("div",IP,n.toDisplayString(T.value.header.label),1)]),n.createElementVNode("div",{ref_key:"overlay",ref:h,class:"stories__content__overlay"},null,512),n.createElementVNode("div",RP,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(Te,Fe)=>(n.openBlock(),n.createElementBlock("div",{key:Fe,class:"stories__content__stories-bar__item"},[n.createElementVNode("div",{class:"stories__content__stories-bar__item__progress",style:n.normalizeStyle({width:`${Te.progress}%`})},null,4)]))),128))]),n.createElementVNode("div",BP,[n.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[n.createElementVNode("div",NP,n.toDisplayString(T.value.date),1),n.createElementVNode("div",DP,n.toDisplayString(T.value.data),1)],512),n.createElementVNode("video",{ref_key:"player",ref:r,id:"video-plyr",controls:"",preload:"auto","data-setup":"{}",playsinline:""},null,512)])]),R.value?(n.openBlock(),n.createElementBlock("button",{key:0,id:"btn_play_ios",style:n.normalizeStyle(m.value?"display:block":"display:none"),onClick:L},null,4)):n.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-bf69d301"]]),OP={playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00-PI-0",last_played_index:0,group_id:"1",total_plays:55,playlist_type:"1",group_playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00",user_id:"goltesting",created_at:"2023-03-30T15:42:36.402+00:00",playlist:[[136731235,"Liga MX","Apertura 2022",69929,"Aldrete Rodriguez, Adrian","Quintero Huitron, Daniel","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-17T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",1259,1278,20,1266,"https://golstatsbets.blob.core.windows.net/video-player/69929_1.mp4"],[139820484,"Liga MX","Apertura 2022",70042,"Davila Zavala, Victor","Mejia, Oscar ","Estadio Nuevo Monumental, Rafaela.","3 - 1","1 - 0","2022-09-18T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",12,"Goals",1501,1524,24,1512,"https://golstatsbets.blob.core.windows.net/video-player/70042_1.mp4"],[139566427,"Liga MX","Apertura 2022",69989,"Zaldivar Caviedes, Angel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","1 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png",12,"Goals",6569,6588,108,6576,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[139441913,"Liga MX","Apertura 2022",70031,"Vega Rojas, Alexis","Quintero Huitron, Daniel","Estadio Akron, Zapopan.","1 - 0","1 - 0","2022-09-10T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png",12,"Goals",6207,6237,103,6225,"https://golstatsbets.blob.core.windows.net/video-player/70031_1.mp4"],[139566063,"Liga MX","Apertura 2022",69989,"Guzman Palomeque, Nahuel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","0 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png",39,"Saves",2554,2573,41,2561,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[138276096,"Liga MX","Apertura 2022",69983,"Cortizo de la Piedra, Jordi","Guerrero Ramirez, Fernando","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-08-16T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",5020,5046,83,5034,"https://golstatsbets.blob.core.windows.net/video-player/69983_1.mp4"],[139285589,"Liga MX","Apertura 2022",70021,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-09-07T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png",12,"Goals",1123,1152,18,1140,"https://golstatsbets.blob.core.windows.net/video-player/70021_1.mp4"],[139294964,"Liga MX","Apertura 2022",70022,"Cordova Reyes, Francisco","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","1 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",2564,2583,41,2571,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137782451,"Liga MX","Apertura 2022",69968,"Orrantia Trevino, Carlos","Macias Romo, Oscar","Estadio TSM Corona, Torre&oacute;n.","4 - 0","1 - 0","2022-08-06T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",4662,4693,77,4681,"https://golstatsbets.blob.core.windows.net/video-player/69968_1.mp4"],[136551560,"Liga MX","Apertura 2022",69924,"Sanchez Guerrero, Richard","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-13T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",7032,7064,116,7052,"https://golstatsbets.blob.core.windows.net/video-player/69924_1.mp4"],[136391881,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","1 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",12,"Goals",4903,4937,81,4925,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[138158049,"Liga MX","Apertura 2022",69979,"Volpi, Tiago Luis","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",39,"Saves",7207,7226,119,7214,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[138124884,"Liga MX","Apertura 2022",69978,"Vargas Gil, Camilo","Ortiz Nava, Marco Antonio","Default","1 - 1","0 - 0","2022-08-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",39,"Saves",6080,6099,100,6087,"https://golstatsbets.blob.core.windows.net/video-player/69978_1.mp4"],[139635463,"Liga MX","Apertura 2022",69950,"Fidalgo Fernandez, Alvaro","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",10,"Assists",7096,7123,118,7111,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139769221,"Liga MX","Apertura 2022",70039,"Ochoa Magana, Guillermo","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-17T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png",39,"Saves",4567,4586,76,4574,"https://golstatsbets.blob.core.windows.net/video-player/70039_1.mp4"],[139405626,"Liga MX","Apertura 2022",70028,"Acevedo Lopez, Carlos","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 2","2022-09-10T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",55,"Goals",7452,7471,124,7459,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139410464,"Liga MX","Apertura 2022",70030,"Gonzalez Vela Alvizu, Julio","Hernandez Gomez, Fernando","Estadio Nemesio Diez, Toluca.","2 - 2","0 - 1","2022-09-10T05:00:00.000Z","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png",55,"Goals",7467,7486,124,7474,"https://golstatsbets.blob.core.windows.net/video-player/70030_1.mp4"],[139902797,"Liga MX","Apertura 2022",70038,"Quinones Quinones, Julian","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",702,"Con enfrentamiento",2334,2353,38,2341,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[139771860,"Liga MX","Apertura 2022",70038,"Andrada, Esteban ","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",39,"Saves",6859,6878,113,6866,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[136392028,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","0 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",607,"Oportunidad de gol",335,374,5,342,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[136467302,"Liga MX","Apertura 2022",69909,"Jurado Roca, Sebastian","Mejia, Oscar ","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 3","0 - 0","2022-07-02T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",39,"Saves",879,898,14,886,"https://golstatsbets.blob.core.windows.net/video-player/69909_1.mp4"],[138402354,"Liga MX","Apertura 2022",69990,"Beltran Cruz, Fernando","Mejia, Oscar ","Estadio Victoria, Aguascalientes.","0 - 4","0 - 1","2022-08-19T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png",12,"Goals",4517,4551,75,4539,"https://golstatsbets.blob.core.windows.net/video-player/69990_1.mp4"],[138157481,"Liga MX","Apertura 2022",69979,"Meneses Villarroel, Jean","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",1900,1925,31,1913,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[140106188,"Liga MX","Apertura 2022",69964,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 1","1 - 0","2022-09-23T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png",12,"Goals",461,484,7,472,"https://golstatsbets.blob.core.windows.net/video-player/69964_1.mp4"],[139839994,"Liga MX","Apertura 2022",70043,"Garcia Carpizo, Brian","Montano Robles, Diego","Estadio Caliente, Tijuana.","1 - 1","0 - 1","2022-09-18T05:00:00.000Z","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",2112,2133,34,2121,"https://golstatsbets.blob.core.windows.net/video-player/70043_1.mp4"],[139403868,"Liga MX","Apertura 2022",70028,"Suarez, Leonardo Gabriel","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 1","2022-09-10T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",4296,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139371616,"Liga MX","Apertura 2022",70027,"Gallardo Vasconcelos, Jesus","Montano Robles, Diego","Estadio Olimpico Benito Juarez, Ciudad Juarez.","0 - 1","0 - 1","2022-09-09T05:00:00.000Z","FC Juarez","https://az755631.vo.msecnd.net/teams-80/3014.png","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png",12,"Goals",5724,5750,94,5738,"https://golstatsbets.blob.core.windows.net/video-player/70027_1.mp4"],[139294028,"Liga MX","Apertura 2022",70022,"Thauvin, Florian","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","2 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",6011,6030,99,6018,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137023432,"Liga MX","Apertura 2022",69939,"Gignac, Andre Pierre","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 0","1 - 0","2022-07-23T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",12,"Goals",2829,2854,47,2842,"https://golstatsbets.blob.core.windows.net/video-player/69939_1.mp4"],[139303531,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",702,"Con enfrentamiento",262,293,3,278,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139303334,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",10,"Assists",5256,5283,87,5271,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139633795,"Liga MX","Apertura 2022",69950,"Valdes Contreras, Diego","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",607,"Oportunidad de gol",675,701,10,689,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139242728,"Liga MX","Apertura 2022",70020,"Valdes Contreras, Diego","Caceres Hernandez, Victor Alfonso","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 0","0 - 0","2022-09-06T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",10,"Assists",2841,2861,46,2849,"https://golstatsbets.blob.core.windows.net/video-player/70020_1.mp4"],[138747150,"Liga MX","Apertura 2022",7e4,"Valdes Contreras, Diego","Miranda Galindo, Erick Yair","Default","1 - 3","0 - 1","2022-08-26T05:00:00.000Z","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",2425,2448,39,2436,"https://golstatsbets.blob.core.windows.net/video-player/70000_1.mp4"],[138462163,"Liga MX","Apertura 2022",69995,"Valdes Contreras, Diego","Santander, Luis Enrique","Estadio Azteca, Ciudad de M&eacute;xico.","7 - 0","1 - 0","2022-08-20T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",3424,3443,56,3431,"https://golstatsbets.blob.core.windows.net/video-player/69995_1.mp4"],[138832474,"Liga MX","Apertura 2022",70005,"Sambueza, Rubens Oscar","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 1","2022-08-28T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",12,"Goals",6830,6859,113,6847,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"],[137178428,"Liga MX","Apertura 2022",69942,"Ibarra Mina, Alex Renato","Montano Robles, Diego","Estadio Jalisco, Guadalajara.","1 - 2","0 - 1","2022-07-26T05:00:00.000Z","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png",12,"Goals",2786,2811,45,2799,"https://golstatsbets.blob.core.windows.net/video-player/69942_1.mp4"],[138339473,"Liga MX","Apertura 2022",69985,"Canelo, Pedro Alexis","Referee 1","Azteca","1 - 2","0 - 0","2022-08-17T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png",10,"Assists",5133,5159,85,5147,"https://golstatsbets.blob.core.windows.net/video-player/69985_1.mp4"],[136701989,"Liga MX","Apertura 2022",69927,"Gimenez, Santiago Tomas","Macias Romo, Oscar","Estadio Jalisco, Guadalajara.","3 - 2","0 - 1","2022-07-16T05:00:00.000Z","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",1374,1397,22,1385,"https://golstatsbets.blob.core.windows.net/video-player/69927_1.mp4"],[139678329,"Liga MX","Apertura 2022",70049,"Antuna Romero, Carlos","Ortiz Nava, Marco Antonio","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-15T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",10,"Assists",6728,6752,111,6740,"https://golstatsbets.blob.core.windows.net/video-player/70049_1.mp4"],[139054131,"Liga MX","Apertura 2022",70010,"Davila Zavala, Victor","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 1","2022-09-02T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",6636,6661,110,6649,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137503273,"Liga MX","Apertura 2022",69962,"Davila Zavala, Victor","Macias Romo, Oscar","Estadio Nou Camp, Le&ocuate;n.","3 - 2","1 - 0","2022-07-31T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",1940,1965,31,1953,"https://golstatsbets.blob.core.windows.net/video-player/69962_1.mp4"],[139308851,"Liga MX","Apertura 2022",70025,"Benedetti Roa, Nicolas","Hernandez Gomez, Fernando","Default","1 - 0","1 - 0","2022-09-07T05:00:00.000Z","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",12,"Goals",1867,1891,31,1879,"https://golstatsbets.blob.core.windows.net/video-player/70025_1.mp4"],[138116335,"Liga MX","Apertura 2022",69976,"Benedetti Roa, Nicolas","Galvan Basulto, Eduardo","Estadio Nou Camp, Le&ocuate;n.","0 - 3","0 - 1","2022-08-13T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png",12,"Goals",591,629,9,617,"https://golstatsbets.blob.core.windows.net/video-player/69976_1.mp4"],[136791022,"Liga MX","Apertura 2022",69932,"Benedetti Roa, Nicolas","Camacho Peregrina, Jorge","Estadio Hidalgo, Pachuca.","1 - 1","0 - 1","2022-07-18T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png",12,"Goals",4284,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/69932_1.mp4"],[139414938,"Liga MX","Apertura 2022",70026,"Batista Ochoa, Facundo","Guerrero Ramirez, Fernando","Estadio Victoria, Aguascalientes.","1 - 2","1 - 0","2022-09-10T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",461,490,7,478,"https://golstatsbets.blob.core.windows.net/video-player/70026_1.mp4"],[139051051,"Liga MX","Apertura 2022",70010,"Batista Ochoa, Facundo","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 0","2022-09-02T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",2731,2750,45,2738,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137828273,"Liga MX","Apertura 2022",69970,"Batista Ochoa, Facundo","Galvan Basulto, Eduardo","Estadio Alfonso Lastras Ram&iacute;rez, San Luis Potos&iacute;.","1 - 2","0 - 1","2022-08-07T05:00:00.000Z","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",849,870,13,858,"https://golstatsbets.blob.core.windows.net/video-player/69970_1.mp4"],[139025773,"Liga MX","Apertura 2022",70009,"Nahuelpan Osten, Ariel","Lopez Penuelas, Ismael","Estadio La Corregidora, Quer&eacute;taro.","1 - 1","1 - 0","2022-09-01T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png",12,"Goals",1454,1481,24,1472,"https://golstatsbets.blob.core.windows.net/video-player/70009_1.mp4"],[138063913,"Liga MX","Apertura 2022",69973,"Gonzalez Gonzalez, Arturo","Pacheco Larios, Guillermo","Estadio Victoria, Aguascalientes.","1 - 2","0 - 1","2022-08-12T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png",12,"Goals",6119,6138,101,6126,"https://golstatsbets.blob.core.windows.net/video-player/69973_1.mp4"],[137780455,"Liga MX","Apertura 2022",69966,"Gonzalez Gonzalez, Arturo","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","5 - 1","1 - 0","2022-08-06T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",2292,2321,38,2309,"https://golstatsbets.blob.core.windows.net/video-player/69966_1.mp4"],[140090831,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",585,612,9,600,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[140090832,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",1175,1197,18,1182,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139227464,"Liga MX","Apertura 2022",70018,"Suarez, Leonardo Gabriel","Quintero Huitron, Daniel","Estadio TSM Corona, Torre&oacute;n.","3 - 1","1 - 0","2022-09-06T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",7011,7034,116,7022,"https://golstatsbets.blob.core.windows.net/video-player/70018_1.mp4"],[138830649,"Liga MX","Apertura 2022",70005,"Suarez, Leonardo Gabriel","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 0","2022-08-28T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",12,"Goals",4297,4380,71,4304,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"]]},FP=new Map([[1,45],[2,90],[3,105],[4,120]]),MP=[{id:12,name:"Gol"},{id:55,name:"Gol"},{id:39,name:"Atajada"},{id:10,name:"Asistencia"},{id:702,name:"1vs1 exitoso ofensivo"},{id:607,name:"Oportunidad de gol"}].reduce((s,e)=>(s.set(e.id,e.name),s),new Map);let xa=null,yi=null,bi="";const Ft=n6(),$P={components:{GSCSeasonSelect:iI,GSCTournamentSelect:OL,GSCGames:yv,GSCSlider:ea,GSCGridTeamsMatches:uy,GSCPlayersLanding:ly,GSCTops:gA,GSCTableCalendar:AC,DiscoverVideos:s6,CarouselFullScreen:lL,Stories:PP},setup(){const s=n.ref("landingref"),{elementSize:e}=H0(s);return{landingref:s,elementSize:e}},props:{currentSeasonId:{type:Number,default:0},isFemale:{type:Boolean,default:!1},showStories:{type:Boolean,default:!0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},privileges:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},tournamentsApiUrl:{type:String,default:""},defaultMediaPlayerSeason:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2}},data(){return{isPreviousDataLoaded:!1,imagesUrl:Ho(),roundAbbreviationByGameId:new Map,isCarouselFullScreenVisible:!1,isPlaySeeker:!1,keyupdate:0,carouselPlayerQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",defaultGameId:0,lastSeasonsIds:[],arrayGamesAdd:[],gamesPages:new Map,show_stories:!0,selectedRoundKeyIndex:0,currentStoriesLastIndex:0,selectedRoundKeyIndexVideo:0,selectedRound:"0",selectedRoundVideos:"0",isLeagueSelected:!1,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysGoals:[],currentTournamentGames:null,currentTournamentTeams:null,gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/",gamesUrl2:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",seasonSelected:{},seasonSelectedDropDowns:{},seasonsSelected:[],gamesAllStories:[],fullTournamentSchedule:{},tournamentSelected:{id:0},tournamentType:0,tournamentSelectedDropDowns:{seasons:[]},playersLength:0,nextRivalId:0,updateTableCalendar:0,loadDiscover:!1,hasNextRival:!1,resumeType:1,goalsType:2,is_public:!1,seasonsGamesMap:new Map,gamesOfTheDayPreMatchIds:new Set,seasonsForLiveGames:[],allLiveGames:[],storiesItems:[],currentStories:[],currentStoryIndex:null,isStoriesVisible:!1,seasonPlayersMap:new Map,currentTournaments:[]}},computed:{teamSelected(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament?0:this.user.team},isGenericLike(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament},isPlaySeekerAvailable(){return[34230,34178,34201].includes(this.user.id)},games(){if(!this.isGenericLike&&!this.isLeagueSelected)return this.fullTournamentSchedule;{const s=this.gamesPages.get(this.selectedRound);return s&&s[0]?s[0].sort((e,t)=>{let a=e.dateTimeMillis,i=t.dateTimeMillis;return e.is_live&&(a-=1e9),t.is_live&&(i-=1e9),a-i}):[]}},latestRound(){return this.userTeamGames&&this.userTeamGames.length&&this.fullTournamentScheduleFullGoals&&this.fullTournamentScheduleFullGoals.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals)},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},closestRoundVideos(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals,!0):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals,!0)},containerGridCalendarTable(){return this.elementSize.width<=1e3?"container-grid-calendar-table-mobile":"container-grid-calendar-table"},containerbackground(){return this.elementSize.width<=680?"container-background-movil":"container-background"},containerdata(){return this.elementSize.width<=680?"container-data-movil":"container-data"}},watch:{games:{immediate:!0,deep:!0,async handler(s){if(s&&s.length>0){if(!this.seasonsSelected.length)return;for(let t=0;t<s.length;t++){const a=this.gamesAllStories.findIndex(i=>i.game_id===s[t].game_id);a!==-1&&(this.gamesAllStories[a].is_live=s[t].is_live,this.gamesAllStories[a].game_status=s[t].game_status)}const e=s.filter(t=>t.is_live);for(let t=0;t<e.length;t++){const a=this.gamesAllStories.findIndex(i=>i.game_id===e[t].game_id);if(a!==-1)this.gamesAllStories[a].score=e[t].score;else{this.gamesAllStories.push(e[t]),this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let i=[];for(let o=0;o<this.gamesAllStories.length;o++)this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)===-1?i.push({game_id:this.gamesAllStories[o].game_id,last_index:0,status:1}):i.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].status});this.arrayGamesAdd=i,await ve.post(bi,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let o=0;o<this.arrayGamesAdd.length;o++)this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)].index=this.arrayGamesAdd[o].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)].status_storie=this.arrayGamesAdd[o].status)}}}}},"allLiveGames.length":{handler(s){s.length===0&&this.resetGamesLiveInterval()}},privileges:{immediate:!0,deep:!0,async handler(s){this.is_public=s!==null}},team:{immediate:!0,deep:!0,async handler(s){s&&this.seasonsSelected.length&&setTimeout(()=>{this.fetchGames(s,this.seasonsSelected)},1e3)}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},latestRound(s){this.selectedRoundKeyIndexVideo=this.tournamentScheduleKeysGoals.findIndex(e=>e===s),this.selectedRoundVideos=s},isCarouselFullScreenVisible:{handler(s){document.getElementsByTagName("html")[0].style.overflow=s?"hidden":"auto"},immediate:!0}},methods:{getOnlyGamesWithGoals(s){return Object.entries(s).reduce((e,[t,a])=>{const i=a.reduce((o,r)=>{const l=r.games.filter(d=>(d.is_live||d.game_status!==4)&&d.score[0]+d.score[1]>0);return l.length&&o.push({...r,games:l}),o},[]);return i.length&&(e[t]=i),e},{})},async onClickPlaySeeker(){try{const e=await(await fetch("https://rhev2kbe0a.execute-api.us-east-2.amazonaws.com/qa/demo/playseeker")).json();this.formatPlaySeekerPlays(e.data||OP)}catch(s){console.error(s)}},formatPlaySeekerPlays(s){let e=[];s&&s.playlist&&s.playlist.length&&(e=s.playlist.reduce((a,i,o)=>{const l={...Object.entries(Ft).reduce((f,[p,m])=>(f[p]=i[m],f),{}),isPlaySeeker:!0,startSeconds:i[Ft.startTime],endSeconds:i[Ft.endTime],totalSeconds:Math.floor(i[Ft.endTime]-i[Ft.startTime]),payloadData:{play_id:i[Ft.playId],total_plays:s.total_plays,play_number:o+1,group_playlist_id:s.group_playlist_id,playlist_id:s.playlist_id,group_id:s.group_id,moment_of_play:i[Ft.momentOfPlay],play_type:i[Ft.categoryId],viewer_second_start:Math.floor(i[Ft.startTime]),intended_second_start:Math.floor(i[Ft.startTime]),intended_second_end:Math.floor(i[Ft.endTime]),latitude_of_user:null,longitude_of_user:null}},[d,c]=l.playerName.split(","),h=d.split(" ");let u="";for(const f of h)if(u+=` ${f}`,f.length>3)break;if(l.playerShortName=c&&d?`${c.trim().charAt(0)}.${u}`:"",!l.mainCategoryName){const[f,p]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(p)]}return l.categoryName=MP.get(l.categoryId),a.push(l),a},[]));let t=[];t=e,this.carouselPlayerQueue=t,this.isPlaySeeker=!0,this.isCarouselFullScreenVisible=!0},formatUsername(s){const e=s.split(",");let t="",a="";return e[1]?(a=e[1].trim().split(" "),a[0]?t=a[0]:t=e[1]):e[0]&&(a=e[0].trim().split(" "),a[0]?t=a[0]:t=e[0]),t.trim()},async fetchGameEvents(s){try{return(await ve.get(`${this.gameEventsUrl}${s}`,{headers:{Authorization:`${this.token}`}})).data}catch(e){throw new Error(e)}},async fetchLiveGames(){try{if(this.seasonsForLiveGames.length===0)return[];const s=this.seasonsForLiveGames.reduce((a,i)=>`${a}seasons=${i}&`,""),e=ve.create({headers:{Authorization:`${this.token}`}}),{data:t}=await e.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${s}`);return t}catch(s){throw new Error(s)}},async onClickOpenCarouselVideos(s){try{this.isPlaySeeker=!1;const t=(await this.fetchGameEvents(s)).plays;this.carouselPlayerQueue=t.filter(a=>a.event_type_id===1&&a.video_link!=="-"),this.isCarouselFullScreenVisible=!0}catch(e){throw new Error(e)}},onChangeMatchDayGames(s){this.selectedRound!==s.key&&(this.selectedRound=s.key)},onClickStory({item:s,index:e}){this.openStory(e),this.onClickStories(s)},onClickLive(){const s=this.allLiveGames[0];if(s){const e=this.seasonsGamesMap.get(s.game_id);e&&(this.selectedRound=e.roundAbbreviationV2)}},onClickCloseCarousel(){this.carouselPlayerQueue=[],this.isPlaySeeker=!1,this.isCarouselFullScreenVisible=!1},onChangeIsLeagueSelected(s){this.isLeagueSelected=s},onAction(s){this.$emit("action",s)},onOpenMedia(s){s.type===1&&s.gameIds&&s.gameIds.length>0?this.onClickOpenCarouselVideos(s.gameIds[0]):this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)},onClickMatch(s){this.$emit("openGame",s)},onClickCalendar(){const s={type:this.isGenericLike||this.isLeagueSelected?0:1,team:this.team,season:this.seasonSelected.id};this.$emit("onClickMyCalendar",s)},moreTops(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openTops",s)},clickProfileBtn(s){this.$emit("openProfile",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},clickCard(s){const e={data:s,isPlayer:this.isplayer};this.$emit("clickOnMainCards",e)},async fetchGames(s,e){const t=e.map(i=>`seasons=${i.id}`).join("&"),a=ve.create({headers:{Authorization:`${this.token}`}});this.fullTournamentSchedule=await a.get(this.gamesUrl+s+"?"+t),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch&&(this.fullTournamentSchedule.data.prematch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.prematch.game_id)),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.postmatch&&(this.fullTournamentSchedule.data.postmatch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.postmatch.game_id)),this.nextRivalId=Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,this.loadDiscover=!0},generateSeasons(s){const e=[{id:s.id,type:s.type}];return s.related_seasons&&s.related_seasons.length&&e.push(...s.related_seasons.map(t=>({id:t.id,type:t.type}))),e},async onInputTournament(s){this.tournamentSelected=s,this.tournamentType=s.tournament_type,this.tournamentSelected.id&&this.tournamentSelected.id!==s.id&&(this.updateTableCalendar+=1),this.tournamentSelectedDropDowns.id!==s.id&&(this.tournamentSelectedDropDowns=s)},getSeasonDependentPromises({season:s,seasons:e}){const t={headers:{Authorization:`${this.token}`}},a=[ve.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${s.id}`,t)];a.push(this.fetchSeasonsGamesAndTeams(e.map(o=>o.id),3)),a.push(this.fetchStoriesPlays(s));const i=`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${s.id}/stories`;return i!==bi&&(bi=i,a.push(ve.get(bi,t))),a},async onInputSeason(s){try{if(this.seasonSelected.id!==s.id){this.isPreviousDataLoaded=!1,this.seasonSelected=s,this.seasonsSelected=this.generateSeasons(s);const e=this.getSeasonDependentPromises({season:s,seasons:this.seasonsSelected,retries:3,createdUrl:""}),[t,a,i,o]=await Promise.all(e);this.seasonPlayersMap=new Map,t.data&&t.data.players&&t.data.players.forEach(r=>{this.seasonPlayersMap.set(r.player_id,r)}),o&&o.data?this.arrayGamesAdd=o.data.stories.stories:this.arrayGamesAdd=[],this.resetGamesLiveInterval(),this.seasonSelected=s,this.show_stories=!!s.show_stories,this.seasonsForLiveGames=[s.id,...s.related_seasons.map(r=>r.id)],this.$emit("change-season-id",s.id),this.fillStoriesData(i,a.seasonsAndGames),await this.createFullTournamentScheme({seasons:this.seasonsSelected,seasonsAndGames:a.seasonsAndGames,seasonsAndTeams:a.seasonsAndTeams,applySeasonsValidation:!1}),this.team&&await this.fetchGames(this.team,this.seasonsSelected),this.keyupdate+=1}}catch(e){throw new Error(e)}},ordenarYFiltrarPartidos(s){const e=s.filter(t=>t.game_status===1||t.is_live==1||t.game_status==0);return e.sort((t,a)=>new Date(a.date_time_utc)-new Date(t.date_time_utc)),e.slice(0,18)},async fetchSeasonsGamesAndTeams(s,e,t=""){let a=t;try{const i=ve.create({headers:{Authorization:`${this.token}`}});a||(a=this.gamesUrl2,s.forEach((l,d)=>{a+=`${d===0?"":"&"}seasons=${l}`}));const{data:{data:o,teams:r}}=await i.get(a);return{seasonsAndGames:o,seasonsAndTeams:r}}catch(i){if(e>0)return this.fetchSeasonsGamesAndTeams(s,e-1,a);throw new Error(i)}},async fetchStoriesPlays(s){try{return await ve.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/"+s.id+"?categories=607&categories=608&categories=12&categories=55&categories=54&categories=35&categories=15&categories=53&type=1")}catch(e){throw new Error(e)}},fillStoriesData(s,e){let t=s.data?s.data.plays:[];this.gamesAllStories=[];for(let i=0;i<e.length;i++)this.gamesAllStories=this.gamesAllStories.concat(e[i].games);this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let a=[];for(let i=0;i<this.gamesAllStories.length;i++)this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)===-1?a.push({game_id:this.gamesAllStories[i].game_id,last_index:0,status:1}):a.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].status});this.arrayGamesAdd=a;for(let i=0;i<this.arrayGamesAdd.length;i++)this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)].index=this.arrayGamesAdd[i].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)].status_storie=this.arrayGamesAdd[i].status);this.storiesItems=this.getStoriesStructureVideos(t),setTimeout(()=>{this.sendStoriesData()},1e3)},sendStoriesData(){ve.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}})},getTimeSeconds(s){const[e,t]=s.split(":"),[a,i]=t.split(".");return parseInt(e)*60+parseInt(a)+parseInt(i)/1e3},getPlayTime(s,e){let t="",a=0;switch(s[7]){case 1:t=s[11];break;case 2:t=s[13],a=45;break;case 3:t=s[15],a=90;break;case 4:t=s[17],a=105;break;case 5:t=s[19],a=120;break}return(!t||t==="0")&&(t="00:00"),this.getTimeToSeconds(t)+(this.getTimeToSeconds(s[e])-a*60)},abrirNuevaVentana(){window.open("https://goltipster.com/view-all#golTipster","_blank")},getTimeToSeconds(s){const t=s.indexOf(".")>-1?s.substring(0,s.indexOf(".")):s,[a,i,o]=t.split(":").reverse();return(o?Number(o)*60*60:0)+Number(i)*60+Number(a)},getStoriesStructureVideos(s){let e=[];for(let t=0;t<this.gamesAllStories.length;t++){let a=s.filter(r=>r[3]===this.gamesAllStories[t].game_id).map(r=>({playId:r[29],gameId:r[3],player:this.seasonPlayersMap.get(r[1]),categoryId:r[0],date:new Date(r[4]),url:r[35]==2?"https://daijvvc13prpy.cloudfront.net/golstats-videos/"+this.gamesAllStories[t].game_id+"_1/"+this.gamesAllStories[t].game_id+"_1.m3u8":"https://golstatsbets.blob.core.windows.net/video-player/"+this.gamesAllStories[t].game_id+"_1.mp4",type:"video",thumbnail:{logoHomeTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[t].home_team+".png",logoAwayTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[t].visiting_team+".png"},header:{label:this.gamesAllStories[t].home_team_acronym+" "+this.gamesAllStories[t].score[0]+":"+this.gamesAllStories[t].score[1]+" "+this.gamesAllStories[t].visiting_team_acronym+" "+this.gamesAllStories[t].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(r,9),endTime:this.getPlayTime(r,10),duration:Math.floor(this.getTimeSeconds(r[10])-this.getTimeSeconds(r[9]))}));const i={},o=a.filter(r=>i[r.playId]?!1:(i[r.playId]=!0,!0));e.push({game_id:this.gamesAllStories[t].game_id,stories:o})}return e},areSeasonsDifferent(s){for(const e of s)if(!this.lastSeasonsIds.includes(e.season_id))return!0;return!1},async createFullTournamentScheme({seasons:s,seasonsAndGames:e,seasonsAndTeams:t,applySeasonsValidation:a}){try{this.seasonsGamesMap=new Map,this.userTeamGames=[],this.userTeamGamesForVideos=[],this.gamesOfTheDayPreMatchIds.clear();let i=0;if(a&&this.areSeasonsDifferent(e))return;e.forEach(l=>{const d=s.find(c=>c.id===l.season_id);d&&(l.type=d.type,l.games.forEach(c=>{c.season_id=l.season_id}),d.type===0&&(i=l.season_id))});const o={seasonsGames:e},r=t.find(l=>l.season_id===i);if(r){const l=r.teams,d=[...o.seasonsGames],c=o&&o.seasonsGames?o.seasonsGames.map(u=>{const f=u.games.reduce((p,m)=>{const g={...m},y=new Date,[b,S,_]=g.date.split("-"),[C,E,v]=g.schedule.split(":"),T=new Date(Number(b),Number(S)-1,Number(_),Number(C),Number(E),Number(v));return g.dateTimeMillis=T.valueOf(),g.home_team=l.find(B=>B.team_id===m.home_team),g.visiting_team=l.find(B=>B.team_id===m.visiting_team),g.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(g.game_id),this.seasonsGamesMap.set(g.game_id,g),p[m.matchday_abbreviation]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(g):p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[g]:p[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[g]},this.gsData&&this.gsData.teamId&&g.game_status===4&&(g.home_team.team_id===this.gsData.teamId||g.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(g),g.score&&g.score[0]+g.score[1]>0&&this.userTeamGamesForVideos.push(g)),p},{});this.userTeamGames.sort((p,m)=>p.dateTimeMillis-m.dateTimeMillis);for(let[p,m]of Object.entries(f))f[p]=Object.entries(m).map(([g,y])=>({date:g,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:u.type,weight:u.type===0?0:u.type===2?1:2,schedule:f}}):[],h=o&&o.seasonsGames?d.map(u=>{const f=u.games.reduce((p,m)=>{const g={...m};return g.dateTimeMillis=new Date(g.date_time_utc).valueOf(),g.home_team=l.find(y=>y.team_id===m.home_team),g.visiting_team=l.find(y=>y.team_id===m.visiting_team),p[m.matchday_abbreviation]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(g):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[g]):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[g]}),p},{});this.userTeamGames.sort((p,m)=>p.dateTimeMillis-m.dateTimeMillis);for(let[p,m]of Object.entries(f))f[p]=Object.entries(m).map(([g,y])=>({date:g,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:u.type,weight:u.type===0?0:u.type===2?1:2,schedule:f}}):[];c.sort((u,f)=>u.weight-f.weight),this.fullTournamentScheduleFull=c.reduce((u,f)=>{for(const[p,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Fu.get(this.tournamentType);if(g){const y=g.get(p);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?u[Ou[g]||y]=m:u[Pu[p]||y]=m}else u[Number(p.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(p)?u[p]=m:u[`R${Number(p.replace("PO",""))}`]=m:f.type===1&&(u[Du[p]]=m);return u},{}),this.fullTournamentScheduleFullGoals=h.reduce((u,f)=>{for(const[p,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Fu.get(this.tournamentType);if(g){const y=g.get(p);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?u[Ou[g]||y]=m:u[Pu[p]||y]=[]}else u[Number(p.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(p)?u[p]=m:u[`R${Number(p.replace("PO",""))}`]=m:f.type===1&&(u[Du[p]]=m);return u},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((u,[f,p])=>{const m=Number(f);let g="";Number.isNaN(m)?g=f:g=m<10?`0${m}`:f;let y=!1,b=null;const S=p.reduce((C,E)=>(!b&&E&&E.games&&E.games.length&&(b=E.games[0].matchday_id),E.games.forEach(v=>{this.roundAbbreviationByGameId.set(v.game_id,f),v.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`,v.roundAbbreviationV2=f}),C=C.concat(E.games),C),[]);for(let C=0;C<S.length;C++)(S[C].game_status!=4||S[C].is_live)&&(S[C].score[0]!=0||S[C].score[1]!=0)&&(y=!0);u.set(f,{key:f,value:m,valueText:g,avaible:y,matchDayId:b});const _=this.getPages(S);return this.gamesPages.set(f,_),u},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((u,[f,p])=>{const m=Number(f);let g="";Number.isNaN(m)?g=f:g=m<10?`0${m}`:f;let y=!1;const b=p.reduce((S,_)=>(_.games.forEach(C=>{C.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`}),S=S.concat(_.games),S),[]);for(let S=0;S<b.length;S++)(b[S].game_status!=4||b[S].is_live&&(b[S].score[0]!=0||b[S].score[1]!=0))&&(y=!0);return u.set(f,{key:f,value:m,valueText:g,avaible:y}),u},new Map).values())}setTimeout(()=>{this.isPreviousDataLoaded=!0,this.checkLiveGames(),this.gamesOfTheDayPreMatchIds.size&&this.createGameOfTheDayTimeouts()},500)}catch(i){throw new Error(i)}finally{this.loadingFlag=!1}},createGameOfTheDayTimeouts(){this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.forEach(s=>{const e=this.seasonsGamesMap.get(s);if(e){const t=new Date().valueOf();if(60*1e3*30+e.dateTimeMillis-t>0){const i=e.dateTimeMillis-t-3e5;setTimeout(()=>{this.createCheckLiveGamesInterval()},i>0?i:0)}}})},resetCheckGamesLiveInterval(){clearInterval(yi),yi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),yi||(yi=setInterval(()=>{this.checkLiveGames()},this.checkLiveGamesIntervalMinutes*60*1e3))},async checkLiveGames(){try{const s=await this.fetchLiveGames(),e=new Set;if(this.allLiveGames=s.data.reduce((t,a)=>(a.games.forEach(i=>{e.add(i.game_id),t.push(i)}),t),[]),this.allLiveGames.length){xa||await this.fillGameEvents();const t=[];this.gamesOfTheDayPreMatchIds.forEach(a=>{const i=this.seasonsGamesMap.get(a);i&&new Date().valueOf()>i.dateTimeMillis&&t.push(a)}),t.length&&t.every(i=>this.seasonsGamesMap.get(i).isLiveTracked)&&this.resetCheckGamesLiveInterval()}}catch(s){throw new Error(s)}},createGamesEventsInterval(){this.resetGamesLiveInterval(),xa=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(xa),xa=null},removeGameIfFinished(s,e,t=!1){for(const a of e)if(a.category_id===0&&a.game_status_id===13)if(t)this.fetchGames(this.team,this.seasonsSelected);else{const i=this.seasonsGamesMap.get(a.game_id);this.allLiveGames=this.allLiveGames.filter(o=>o.game_id!==s.game_id),i.is_live=0,i.game_status=0}},async fillGameEvents(){try{const s=[];let e=null;for(const a of this.allLiveGames){a.isLiveTracked=!0,this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.delete(a.game_id);const i=this.seasonsGamesMap.get(a.game_id);i&&(i.is_live=1,i.game_status=4),e=this.fullTournamentSchedule&&this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch?this.fullTournamentSchedule.data.prematch:null,e&&e.game_id===a.game_id&&(e.is_live=1,e.game_status=4),s.push(this.fetchGameEvents(a.game_id))}const t=await Promise.all(s);for(const a of t){const i=this.seasonsGamesMap.get(a.game_id);if(i){const o=FP.get(a.recent_lapse);i.currentTimeLive=o&&o<a.minute?`${o}' + ${a.minute-o}'`:`${a.minute}'`;const r=[Number(a.score[i.home_team.team_id.toString()])+Number(a.score[`own_${i.visiting_team.team_id.toString()}`]),Number(a.score[i.visiting_team.team_id.toString()])+Number(a.score[`own_${i.home_team.team_id.toString()}`])],l=r[0],d=r[1];i.score=[Number.isNaN(l)?0:l,Number.isNaN(d)?0:d],this.removeGameIfFinished(i,a.plays),e&&e.game_id===i.game_id&&(e.currentTimeLive=i.currentTimeLive,e.score=i.score,this.removeGameIfFinished(e,a.plays,!0))}}xa||this.createGamesEventsInterval()}catch(s){throw new Error(s)}},getPages(s){const e=[];if(this.gamesPerMatchDay>0){let t=[];s.forEach((a,i)=>{t.push(a),(i+1)%this.gamesPerMatchDay===0&&(e.push([...t]),t=[])}),t.length&&e.push([...t])}else e.push(s);return e},getNormalClosestRound(s,e=!1){const a=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(a).reduce((l,[d,c])=>(l[d]=[],c.forEach(h=>{h.games.forEach(u=>{const f=new Date(u.date_time_utc).getTime()+66e5;l[d].push(f)})}),l),{}));if(!i.length)return"1";const o=new Date().getTime(),r=i.reduce((l,[d,c])=>{let h=null;return c.forEach(u=>{const f=e?o-u:u-o;f>=0&&(h===null||f<h)&&(h=f)}),h&&(l.shortestTime===null||h<l.shortestTime)&&(l.round=d,l.shortestTime=h),l},{round:"",shortestTime:null});return r.shortestTime!==null?r.round:i[i.length-1][0]},getUserTeamClosestRound(s,e=!1){let t=1;const a=e?this.userTeamGamesForVideos:this.userTeamGames;if(a.length){const i=a[0];for(const[o,r]of Object.entries(s))for(const l of r)if(l.games.find(c=>c.game_id===i.game_id))return o}return t},async changeIndexStory(s){if(this.arrayGamesAdd.length>0){let e=-1,t=-1,a=-1;this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(e=this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(t=this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(a=this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)),e!=-1&&(this.gamesAllStories[t].is_live===1?this.storiesItems[a].stories.length-1==s&&this.storiesItems[a].stories.length>1?this.arrayGamesAdd[e].last_index=s-1:this.arrayGamesAdd[e].last_index=s:this.arrayGamesAdd[e].last_index=s),a!=-1&&this.arrayGamesAdd[e].status>0&&(this.arrayGamesAdd[e].status=s>=this.storiesItems[a].stories.length-1?0:1)}else{this.arrayGamesAdd=[];for(let e=0;e<this.storiesItems.length;e++)this.arrayGamesAdd.push({game_id:this.storiesItems[e].game_id,last_index:this.currentStories[0].gameId==this.storiesItems[e].game_id?s:0,status:this.currentStories[0].gameId==this.storiesItems[e].game_id&&s>=this.storiesItems[e].stories.length-1?0:1})}await ve.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let e=0;e<this.arrayGamesAdd.length;e++)this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)!=-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].index=this.arrayGamesAdd[e].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].status_storie=this.arrayGamesAdd[e].status)},async getLiveGamePlays(s){var a=(await ve.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/live/videos/plays/seasons/"+this.gamesAllStories[s].season_id+"/games/"+this.gamesAllStories[s].game_id)).data.plays.filter(l=>l[0]===607||l[0]===608||l[0]===12||l[0]===55||l[0]===54||l[0]===35||l[0]===15||l[0]===53);let i=a.map(l=>({playId:l[29],gameId:l[3],player:this.seasonPlayersMap.get(l[1]),categoryId:l[0],date:new Date(l[4]),url:"https://falconvideolive.blob.core.windows.net/video-hls-live/"+this.gamesAllStories[s].game_id+"/"+this.gamesAllStories[s].game_id+".m3u8",type:"video",thumbnail:{logoHomeTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[s].home_team+".png",logoAwayTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[s].visiting_team+".png"},header:{label:this.gamesAllStories[s].home_team_acronym+" "+this.gamesAllStories[s].score[0]+":"+this.gamesAllStories[s].score[1]+" "+this.gamesAllStories[s].visiting_team_acronym+" "+this.gamesAllStories[s].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(l,9),endTime:this.getPlayTime(l,10),duration:Math.floor(this.getTimeSeconds(l[10])-this.getTimeSeconds(l[9]))}));const o={},r=i.filter(l=>o[l.playId]?!1:(o[l.playId]=!0,!0));this.storiesItems[s]={game_id:this.gamesAllStories[s].game_id,stories:r}},async openStory(s){const e={headers:{Authorization:`${this.token}`}},[t]=await Promise.all([ve.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/games/${this.gamesAllStories[s].game_id}`,e)]);t.data&&t.data.players.forEach(a=>{this.seasonPlayersMap.set(a.player_id,{dob:a.dob,first_name:a.first_name,jersey:a.jersey,last_name:a.last_name,name:a.name,player_name:a.name,nationality:a.nationality,nationality_id:a.nationality_id,nationality_photo:a.nationality_photo,photo:a.photo,player_id:a.player_id,position_id:a.position_id,short_name:a.short_name,team_id:a.team_id})}),this.gamesAllStories[s].is_live==1||this.gamesAllStories[s].game_status==0?(await this.getLiveGamePlays(s),setTimeout(()=>{this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index},100)):(this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index),setTimeout(()=>{this.isStoriesVisible=!0},150)},onCloseStories(s){this.currentStoriesLastIndex=0,this.isStoriesVisible=!1,this.$emit("event-posthog-stories",{event:"stories_cerrar",properties:{play_id:s?s.playId:null,game_id:s?s.gameId:null,category_id:s?s.categoryId:null,start_time:s?s.startTime:null,end_time:s?parseInt(s.currentTime):null,percentage_viewed:s?parseInt(s.progress):null}})},closeStories(){this.currentStoriesLastIndex=0,this.currentStoryIndex=null,this.currentStories=[]},onSwipeStories({direction:s,currentPlay:e}){s==="right"?(this.$emit("event-posthog-stories",{event:"stories_video_siguiente_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex>0&&this.openStory(this.currentStoryIndex-1)):(this.$emit("event-posthog-stories",{event:"stories_video_anterior_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex<this.storiesItems.length-1&&this.openStory(this.currentStoryIndex+1))},onClickNextBackVideo({eventName:s,currentPlay:e}){this.$emit("event-posthog-stories",{event:s,properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}})},onChangeTournaments(s){this.currentTournaments=s},onClickStories(s){this.$emit("event-posthog-stories",{event:"stories_ver_play",properties:{game_id:s.game_id}})},onVideoPlay(s){this.$emit("event-posthog-stories",{event:"stories_play",properties:{play_id:s.playId,game_id:s.gameId,category_id:s.categoryId,start_time:s.startTime,end_time:s.endTime,percentage_viewed:0}})}},async created(){},beforeUnmount(){this.resetGamesLiveInterval()}},Si=s=>(n.pushScopeId("data-v-52a5adb2"),s=s(),n.popScopeId(),s),VP={class:"gsclanding",ref:"landingref"},UP={key:2,class:"play-seeker-image"},zP={class:"play-seeker-image__info"},GP=Si(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),jP={class:"play-seeker-image__info__legends-and-button"},HP=Si(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),WP={class:"play-icon"},KP=["src"],qP=Si(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),YP={class:"play-seeker-image__players"},JP=["src"],XP={key:3,class:"container-selectors-mobile"},ZP={class:"container-selectors-mobile-tournament"},QP={class:"container-selectors-mobile-season"},eO={key:0,class:"home-item-movil"},tO=Si(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),sO={class:"name-user-movil"},aO={key:1,class:"home-item"},nO={key:2,class:"bar-settings"},iO={class:"name-user"},oO={class:"container-selectors"},rO={class:"selector-tournament"},lO={class:"selector-seasons"},cO={key:3,class:"stories-circle-wrapper"},dO=["onClick"],hO={class:"story-result"},uO={key:0,class:"font-bold"},mO={key:1,class:"font-bold"},fO={class:"story-match"},pO={key:4,class:"container-games"},gO={key:6,class:"container-players"},yO={class:"container-tops"};function bO(s,e,t,a,i,o){const r=n.resolveComponent("Stories"),l=n.resolveComponent("CarouselFullScreen"),d=n.resolveComponent("GSCTournamentSelect"),c=n.resolveComponent("GSCSeasonSelect"),h=n.resolveComponent("GSCSlider"),u=n.resolveComponent("GSCGames");n.resolveComponent("DiscoverVideos");const f=n.resolveComponent("GSCGridTeamsMatches"),p=n.resolveComponent("GSCTableCalendar"),m=n.resolveComponent("GSCPlayersLanding"),g=n.resolveComponent("GSCTops");return n.openBlock(),n.createElementBlock("div",VP,[i.isStoriesVisible&&t.showStories?(n.openBlock(),n.createBlock(r,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:o.changeIndexStory,onClose:o.onCloseStories,onSwipe:o.onSwipeStories,onVideoNextBack:o.onClickNextBackVideo,onVideoPlay:o.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):n.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(n.openBlock(),n.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:o.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):n.createCommentVNode("",!0),o.isPlaySeekerAvailable?(n.openBlock(),n.createElementBlock("div",UP,[n.createElementVNode("div",zP,[GP,n.createElementVNode("div",jP,[HP,n.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[0]||(e[0]=(...y)=>o.onClickPlaySeeker&&o.onClickPlaySeeker(...y))},[n.createElementVNode("div",WP,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,KP)]),qP])])]),n.createElementVNode("div",YP,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,JP)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",XP,[n.createElementVNode("div",ZP,[n.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:o.onInputTournament,onChangeTournaments:o.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),n.createElementVNode("div",QP,[n.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:o.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerbackground)},[n.createElementVNode("div",{class:n.normalizeClass(o.containerdata)},[a.elementSize.width<=680?(n.openBlock(),n.createElementBlock("div",eO,[tO,n.createElementVNode("div",sO,[t.isFemale?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Bienvenida")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Bienvenido ")],64)),i.is_public?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createTextVNode("a GolStats ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createTextVNode(n.toDisplayString(o.formatUsername(t.user.name)),1)],64))])])):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",aO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",nO,[n.createElementVNode("div",iO,[t.isFemale?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Bienvenida")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Bienvenido ")],64)),i.is_public?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createTextVNode("a GolStats ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createTextVNode(n.toDisplayString(o.formatUsername(t.user.name)),1)],64))]),n.createElementVNode("div",oO,[n.createElementVNode("div",rO,[n.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:o.onInputTournament,onChangeTournaments:o.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),n.createElementVNode("div",lO,[n.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:o.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):n.createCommentVNode("",!0),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",cO,[(n.openBlock(),n.createBlock(h,{key:i.keyupdate,height:"130px",pxScroll:86,scrollColor:"none",arrowsPosition:"absolute","background-color":"none",arrowsScrollHide:!0,arrowsHideOnNoScroll:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,42,0.1) 0%, rgba(13,29,42,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,42,0.1) 0%, rgba(13,29,42,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.gamesAllStories,(y,b)=>(n.openBlock(),n.createElementBlock("div",{key:b,class:"story-container-game",onClick:S=>o.onClickStory({item:y,index:b})},[n.createElementVNode("div",{class:"story-circle",style:n.normalizeStyle(y.is_live==1?(y.status_storie==1,"border: 2px solid #cbee6b !important;"):y.status_storie==1?"border: 2px solid #2248a2 !important;":"border: 2px solid #41485B !important;")},[n.createElementVNode("div",{class:"circle-item-home",style:n.normalizeStyle("background-image: url(https://az755631.vo.msecnd.net/teams-80/"+y.home_team+".png)")},null,4),n.createElementVNode("div",{class:"circle-item-away",style:n.normalizeStyle("background-image: url(https://az755631.vo.msecnd.net/teams-80/"+y.visiting_team+".png)")},null,4)],4),n.createElementVNode("div",hO,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+"  ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",uO,n.toDisplayString(isNaN(y.score[0])?0:y.score[0]),1)):n.createCommentVNode("",!0),n.createTextVNode(":"),y.score.length>0?(n.openBlock(),n.createElementBlock("span",mO,n.toDisplayString(isNaN(y.score[1])?0:y.score[1]),1)):n.createCommentVNode("",!0),n.createTextVNode("  "+n.toDisplayString(y.visiting_team_acronym),1)]),n.createElementVNode("div",fO,n.toDisplayString(y.matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")),1)],8,dO))),128))]),_:1}))])):n.createCommentVNode("",!0),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",pO,[n.createVNode(u,{"component-width":a.elementSize.width,isplayer:t.isplayer,"is-full":o.isGenericLike,data:o.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:o.onClickCalendar,onClickMatch:o.onClickMatch,onChangeMatchDay:o.onChangeMatchDayGames,onChangeIsLeagueSelected:o.onChangeIsLeagueSelected,onClickLive:o.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0),n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle(a.elementSize.width<748?"width: 100%":"")},[n.createVNode(f,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://az755631.vo.msecnd.net/teams-150/"+t.user.team+".png","player-img":"https://az755631.vo.msecnd.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://az755631.vo.msecnd.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://az755631.vo.msecnd.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!o.isGenericLike,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["isPlayer","player-id","team-id","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(p,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,key:i.updateTableCalendar,"team-id":o.teamSelected,componentWidth:a.elementSize&&a.elementSize.width?a.elementSize.width:0,tournaments:i.currentTournaments,onAction:o.onAction,onOnOpenProfile:o.onOpenProfile,onOpenmedia:o.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4)],2),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",gO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:o.clickProfileBtn,onViewAll:o.viewAll,onTotalPlayers:o.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):n.createCommentVNode("",!0)],512)),[[n.vShow,i.playersLength>0]]),n.createElementVNode("div",yO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{key:0,"tournament-selected":i.tournamentSelected,onMore:o.moreTops,"show-switch":!o.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:o.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):n.createCommentVNode("",!0)]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[1]||(e[1]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],512)}const SO=qe($P,[["render",bO],["__scopeId","data-v-52a5adb2"]]);hs.GSCLanding=SO,Object.defineProperty(hs,Symbol.toStringTag,{value:"Module"})});
67
+ } (data length: ${t&&t.byteLength})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,a)=>{const i=Zr(this.config),o=e.map(af).filter(r=>!!r&&i.indexOf(r)!==-1);return this.getKeySystemSelectionPromise(o).then(({keySystem:r})=>{const l=of(r);l?t(l):a(new Error(`Unable to find format for key-system "${r}"`))}).catch(a)})}loadKey(e){const t=e.keyInfo.decryptdata,a=this.getKeyIdString(t),i=`(keyId: ${a} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let o=this.keyIdToKeySessionPromise[a];return o||(o=this.keyIdToKeySessionPromise[a]=this.getKeySystemForKeyPromise(t).then(({keySystem:r,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(r,l).then(()=>{this.throwIfDestroyed();const d=this.createMediaKeySessionContext({keySystem:r,mediaKeys:l,decryptdata:t});return this.generateRequestWithPreferredKeySession(d,"cenc",t.pssh,"playlist-key")}))),o.catch(r=>this.handleError(r))),o}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof _t?this.hls.trigger(w.ERROR,e.data):this.hls.trigger(w.ERROR,{type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),a=this.keyIdToKeySessionPromise[t];if(!a){const i=af(e.keyFormat),o=i?[i]:Zr(this.config);return this.attemptKeySystemAccess(o)}return a}getKeySystemSelectionPromise(e){if(e.length||(e=Zr(this.config)),e.length===0)throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:a}=e,i=`"${e.type}" event: init data type: "${t}"`;if(this.debug(i),a===null)return;let o,r;if(t==="sinf"&&this.config.drmSystems[Ne.FAIRPLAY]){const u=Ke(new Uint8Array(a));try{const f=Jr(JSON.parse(u).sinf),p=gf(new Uint8Array(f));if(!p)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");o=p.subarray(8,24),r=Ne.FAIRPLAY}catch(f){this.warn(`${i} Failed to parse sinf: ${f}`);return}}else{const u=q6(a),f=u.filter(p=>p.systemId===_a.WIDEVINE)[0];if(!f){u.length===0||u.some(p=>!p.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${u.map(p=>nf(p.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(r=nf(f.systemId),f.version===0&&f.data){const p=f.data.length-22;o=f.data.subarray(p,p+16)}}if(!r||!o)return;const l=zt.hexDump(o),{keyIdToKeySessionPromise:d,mediaKeySessions:c}=this;let h=d[l];for(let u=0;u<c.length;u++){const f=c[u],p=f.decryptdata;if(!p.keyId)continue;const m=zt.hexDump(p.keyId);if(l===m||p.uri.replace(/-/g,"").indexOf(l)!==-1){if(h=d[m],p.pssh)break;delete d[m],p.pssh=new Uint8Array(a),p.keyId=o,h=d[l]=h.then(()=>this.generateRequestWithPreferredKeySession(f,t,a,"encrypted-event-key-match"));break}}h||(h=d[l]=this.getKeySystemSelectionPromise([r]).then(({keySystem:u,mediaKeys:f})=>{var p;this.throwIfDestroyed();const m=new Ea("ISO-23001-7",l,(p=of(u))!=null?p:"");return m.pssh=new Uint8Array(a),m.keyId=o,this.attemptSetMediaKeys(u,f).then(()=>{this.throwIfDestroyed();const g=this.createMediaKeySessionContext({decryptdata:m,keySystem:u,mediaKeys:f});return this.generateRequestWithPreferredKeySession(g,t,a,"encrypted-event-no-match")})})),h.catch(u=>this.handleError(u))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const a=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(a).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),a.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(o=>a.indexOf(o)===-1)})}generateRequestWithPreferredKeySession(e,t,a,i){var o,r;const l=(o=this.config.drmSystems)==null||(r=o[e.keySystem])==null?void 0:r.generateRequest;if(l)try{const m=l.call(this.hls,t,a,e);if(!m)throw new Error("Invalid response from configured generateRequest filter");t=m.initDataType,a=e.decryptdata.pssh=m.initData?new Uint8Array(m.initData):null}catch(m){var d;if(this.warn(m.message),(d=this.hls)!=null&&d.config.debug)throw m}if(a===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${t} length: ${a?a.byteLength:null})`);const h=new Al,u=e._onmessage=m=>{const g=e.mediaKeysSession;if(!g){h.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=m;this.log(`"${y}" message event for session "${g.sessionId}" message size: ${b.byteLength}`),y==="license-request"||y==="license-renewal"?this.renewLicense(e,b).catch(S=>{this.handleError(S),h.emit("error",S)}):y==="license-release"?e.keySystem===Ne.FAIRPLAY&&(this.updateKeySession(e,Xr("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${y}"`)},f=e._onkeystatuseschange=m=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const y=e.keyStatus;h.emit("keyStatus",y),y==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",u),e.mediaKeysSession.addEventListener("keystatuseschange",f);const p=new Promise((m,g)=>{h.on("error",g),h.on("keyStatus",y=>{y.startsWith("usable")?m():y==="output-restricted"?g(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?g(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?g(new Error("key expired while generating request")):this.warn(`unhandled key status change "${y}"`)})});return e.mediaKeysSession.generateRequest(t,a).then(()=>{var m;this.log(`Request generated for key-session "${(m=e.mediaKeysSession)==null?void 0:m.sessionId}" keyId: ${c}`)}).catch(m=>{throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:m,fatal:!1},`Error generating key-session request: ${m}`)}).then(()=>p).catch(m=>{throw h.removeAllListeners(),this.removeSession(e),m}).then(()=>(h.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,a)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${zt.hexDump("buffer"in a?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a))} session keyId: ${zt.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,a=t.loader,i=new a(t),o=this.getServerCertificateUrl(e);return o?(this.log(`Fetching server certificate for "${e}"`),new Promise((r,l)=>{const d={responseType:"arraybuffer",url:o},c=t.certLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(f,p,m,g)=>{r(f.data)},onError:(f,p,m,g)=>{l(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:Xe({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${o}). Status: ${f.code} (${f.text})`))},onTimeout:(f,p,m)=>{l(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${o})`))},onAbort:(f,p,m)=>{l(new Error("aborted"))}};i.load(d,h,u)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,a){return new Promise((i,o)=>{e.setServerCertificate(a).then(r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${a==null?void 0:a.byteLength}) on "${t}"`),i(e)}).catch(r=>{o(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:r,fatal:!0},r.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(a=>this.updateKeySession(e,new Uint8Array(a)).catch(i=>{throw new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const a=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!a.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(a,"application/xml"),o=i.querySelectorAll("HttpHeader");if(o.length>0){let h;for(let u=0,f=o.length;u<f;u++){var r,l;h=o[u];const p=(r=h.querySelector("name"))==null?void 0:r.textContent,m=(l=h.querySelector("value"))==null?void 0:l.textContent;p&&m&&e.setRequestHeader(p,m)}}const d=i.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Xr(atob(c))}setupLicenseXHR(e,t,a,i){const o=this.config.licenseXhrSetup;return o?Promise.resolve().then(()=>{if(!a.decryptdata)throw new Error("Key removed");return o.call(this.hls,e,t,a,i)}).catch(r=>{if(!a.decryptdata)throw r;return e.open("POST",t,!0),o.call(this.hls,e,t,a,i)}).then(r=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:r||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const a=this.config.keyLoadPolicy.default;return new Promise((i,o)=>{const r=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${r}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return o(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,r,e)}catch(h){this.error(h)}i(d)}else{const d=a.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)o(new _t({type:fe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:r,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${r}). Status: ${l.status} (${l.statusText})`));else{const h=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${h} attempts left`),this.requestLicense(e,t).then(i,o)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,r,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==Ne.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const a=t.media;this.media=a,a.addEventListener("encrypted",this.onMediaEncrypted),a.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ea.clearKeyUriToKeyIdMap();const a=t.length;qs.CDMCleanupPromise=Promise.all(t.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}`)}))).then(()=>{a&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const a=t.reduce((i,o)=>(i.indexOf(o.keyFormat)===-1&&i.push(o.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${a.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(a)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:a}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),a&&a.readyState!==XMLHttpRequest.DONE&&a.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(o=>{this.log(`Could not remove session: ${o}`)}).then(()=>t.close()).catch(o=>{this.log(`Could not close session: ${o}`)})}}}qs.CDMCleanupPromise=void 0;class _t extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var lt;(function(s){s.MANIFEST="m",s.AUDIO="a",s.VIDEO="v",s.MUXED="av",s.INIT="i",s.CAPTION="c",s.TIMED_TEXT="tt",s.KEY="k",s.OTHER="o"})(lt||(lt={}));var Ul;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(Ul||(Ul={}));var Cs;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Cs||(Cs={}));const bD={[Cs.OBJECT]:["br","d","ot","tb"],[Cs.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Cs.SESSION]:["cid","pr","sf","sid","st","v"],[Cs.STATUS]:["bs","rtp"]};class Ys{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(a=>a instanceof Ys?a:new Ys(a))),this.value=e,this.params=t}}class qp{constructor(e){this.description=void 0,this.description=e}}const SD="Dict";function wD(s){return Array.isArray(s)?JSON.stringify(s):s instanceof Map?"Map{}":s instanceof Set?"Set{}":typeof s=="object"?JSON.stringify(s):String(s)}function _D(s,e,t,a){return new Error(`failed to ${s} "${wD(e)}" as ${t}`,{cause:a})}const Yp="Bare Item",kD="Boolean",ED="Byte Sequence",TD="Decimal",CD="Integer";function xD(s){return s<-999999999999999||999999999999999<s}const vD=/[\x00-\x1f\x7f]+/,AD="Token",LD="Key";function Kt(s,e,t){return _D("serialize",s,e,t)}function ID(s){if(typeof s!="boolean")throw Kt(s,kD);return s?"?1":"?0"}function RD(s){return btoa(String.fromCharCode(...s))}function BD(s){if(ArrayBuffer.isView(s)===!1)throw Kt(s,ED);return`:${RD(s)}:`}function Jp(s){if(xD(s))throw Kt(s,CD);return s.toString()}function ND(s){return`@${Jp(s.getTime()/1e3)}`}function Xp(s,e){if(s<0)return-Xp(-s,e);const t=Math.pow(10,e);if(Math.abs(s*t%1-.5)<Number.EPSILON){const i=Math.floor(s*t);return(i%2===0?i:i+1)/t}else return Math.round(s*t)/t}function DD(s){const e=Xp(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Kt(s,TD);const t=e.toString();return t.includes(".")?t:`${t}.0`}const PD="String";function OD(s){if(vD.test(s))throw Kt(s,PD);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function FD(s){return s.description||s.toString().slice(7,-1)}function Zp(s){const e=FD(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Kt(e,AD);return e}function zl(s){switch(typeof s){case"number":if(!ne(s))throw Kt(s,Yp);return Number.isInteger(s)?Jp(s):DD(s);case"string":return OD(s);case"symbol":return Zp(s);case"boolean":return ID(s);case"object":if(s instanceof Date)return ND(s);if(s instanceof Uint8Array)return BD(s);if(s instanceof qp)return Zp(s);default:throw Kt(s,Yp)}}function Gl(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw Kt(s,LD);return s}function jl(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${Gl(e)}`:`;${Gl(e)}=${zl(t)}`).join("")}function Qp(s){return s instanceof Ys?`${zl(s.value)}${jl(s.params)}`:zl(s)}function MD(s){return`(${s.value.map(Qp).join(" ")})${jl(s.params)}`}function $D(s,e={whitespace:!0}){if(typeof s!="object")throw Kt(s,SD);const t=s instanceof Map?s.entries():Object.entries(s),a=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,o])=>{o instanceof Ys||(o=new Ys(o));let r=Gl(i);return o.value===!0?r+=jl(o.params):(r+="=",Array.isArray(o.value)?r+=MD(o):r+=Qp(o)),r}).join(`,${a}`)}function VD(s,e){return $D(s,e)}const UD=s=>s==="ot"||s==="sf"||s==="st",zD=s=>typeof s=="number"?ne(s):s!=null&&s!==""&&s!==!1;function GD(s,e){const t=new URL(s),a=new URL(e);if(t.origin!==a.origin)return s;const i=t.pathname.split("/").slice(1),o=a.pathname.split("/").slice(1,-1);for(;i[0]===o[0];)i.shift(),o.shift();for(;o.length;)o.shift(),i.unshift("..");return i.join("/")}function jD(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const o=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?o:o&3|8).toString(16)})}}}const fi=s=>Math.round(s),HD=(s,e)=>(e!=null&&e.baseUrl&&(s=GD(s,e.baseUrl)),encodeURIComponent(s)),pi=s=>fi(s/100)*100,WD={br:fi,d:fi,bl:pi,dl:pi,mtp:pi,nor:HD,rtp:pi,tb:fi};function KD(s,e){const t={};if(s==null||typeof s!="object")return t;const a=Object.keys(s).sort(),i=Ge({},WD,e==null?void 0:e.formatters),o=e==null?void 0:e.filter;return a.forEach(r=>{if(o!=null&&o(r))return;let l=s[r];const d=i[r];d&&(l=d(l,e)),!(r==="v"&&l===1)&&(r=="pr"&&l===1||zD(l)&&(UD(r)&&typeof l=="string"&&(l=new qp(l)),t[r]=l))}),t}function eg(s,e={}){return s?VD(KD(s,e),Ge({whitespace:!1},e)):""}function qD(s,e={}){if(!s)return{};const t=Object.entries(s),a=Object.entries(bD).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=t.reduce((o,r)=>{var l,d;const[c,h]=r,u=((l=a.find(f=>f[1].includes(c)))==null?void 0:l[0])||Cs.REQUEST;return(d=o[u])!=null||(o[u]={}),o[u][c]=h,o},{});return Object.entries(i).reduce((o,[r,l])=>(o[r]=eg(l,e),o),{})}function YD(s,e,t){return Ge(s,qD(e,t))}const JD="CMCD";function XD(s,e={}){if(!s)return"";const t=eg(s,e);return`${JD}=${encodeURIComponent(t)}`}const tg=/CMCD=[^&#]+/;function ZD(s,e,t){const a=XD(e,t);if(!a)return s;if(tg.test(s))return s.replace(tg,a);const i=s.includes("?")?"&":"?";return`${s}${i}${a}`}class QD{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:lt.MANIFEST,su:!this.initialized})}catch(o){A.warn("Could not generate manifest CMCD data.",o)}},this.applyFragmentData=i=>{try{const o=i.frag,r=this.hls.levels[o.level],l=this.getObjectType(o),d={d:o.duration*1e3,ot:l};(l===lt.VIDEO||l===lt.AUDIO||l==lt.MUXED)&&(d.br=r.bitrate/1e3,d.tb=this.getTopBandwidth(l)/1e3,d.bl=this.getBufferLength(l)),this.apply(i,d)}catch(o){A.warn("Could not generate segment CMCD data.",o)}},this.hls=e;const t=this.config=e.config,{cmcd:a}=t;a!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||jD(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.includeKeys=a.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHED,this.onMediaDetached,this),e.on(w.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHED,this.onMediaDetached,this),e.off(w.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var a,i;this.audioBuffer=(a=t.tracks.audio)==null?void 0:a.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:Ul.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Ge(t,this.createData());const a=t.ot===lt.INIT||t.ot===lt.VIDEO||t.ot===lt.MUXED;this.starved&&a&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((o,r)=>(i.includes(r)&&(o[r]=t[r]),o),{})),this.useHeaders?(e.headers||(e.headers={}),YD(e.headers,t)):e.url=ZD(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return lt.TIMED_TEXT;if(e.sn==="initSegment")return lt.INIT;if(t==="audio")return lt.AUDIO;if(t==="main")return this.hls.audioTracks.length?lt.VIDEO:lt.MUXED}getTopBandwidth(e){let t=0,a;const i=this.hls;if(e===lt.AUDIO)a=i.audioTracks;else{const o=i.maxAutoLevel,r=o>-1?o+1:i.levels.length;a=i.levels.slice(0,r)}for(const o of a)o.bitrate>t&&(t=o.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,a=e===lt.AUDIO?this.audioBuffer:this.videoBuffer;return!a||!t?NaN:De.bufferInfo(a,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,a=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new a(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,r,l){t(o),this.loader.load(o,r,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,a=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new a(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,r,l){t(o),this.loader.load(o,r,l)}}}}const eP=3e5;class tP{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=A.log.bind(A,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(a=>a!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:a}=t;a!==null&&(this.pathwayId=a.pathwayId,this.uri=a.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:a}=t;if((a==null?void 0:a.action)===nt.SendAlternateToPenaltyBox&&a.flags===Pt.MoveAllAlternatesMatchingHost){const i=this.levels;let o=this.pathwayPriority,r=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&i?r=this.getPathwayForGroupId(l,c,r):d&&(r=d)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!o&&i&&(o=i.reduce((l,d)=>(l.indexOf(d.pathwayId)===-1&&l.push(d.pathwayId),l),[])),o&&o.length>1&&(this.updatePathwayPriority(o),a.resolved=this.pathwayId!==r),a.resolved||A.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${r} levels: ${i&&i.length} priorities: ${JSON.stringify(o)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const a=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${a}"`),t=this.getLevelsForPathway(a),this.pathwayId=a}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const a=this.penalizedPathways,i=performance.now();Object.keys(a).forEach(o=>{i-a[o]>eP&&delete a[o]});for(let o=0;o<e.length;o++){const r=e[o];if(r in a)continue;if(r===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,Wf(t),this.hls.trigger(w.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,a){const i=this.getLevelsForPathway(a).concat(this.levels||[]);for(let o=0;o<i.length;o++)if(t===xe.AUDIO_TRACK&&i[o].hasAudioGroup(e)||t===xe.SUBTITLE_TRACK&&i[o].hasSubtitleGroup(e))return i[o].pathwayId;return a}clonePathways(e){const t=this.levels;if(!t)return;const a={},i={};e.forEach(o=>{const{ID:r,"BASE-ID":l,"URI-REPLACEMENT":d}=o;if(t.some(h=>h.pathwayId===r))return;const c=this.getLevelsForPathway(l).map(h=>{const u=new Oe(h.attrs);u["PATHWAY-ID"]=r;const f=u.AUDIO&&`${u.AUDIO}_clone_${r}`,p=u.SUBTITLES&&`${u.SUBTITLES}_clone_${r}`;f&&(a[u.AUDIO]=f,u.AUDIO=f),p&&(i[u.SUBTITLES]=p,u.SUBTITLES=p);const m=ag(h.uri,u["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),g=new Vs({attrs:u,audioCodec:h.audioCodec,bitrate:h.bitrate,height:h.height,name:h.name,url:m,videoCodec:h.videoCodec,width:h.width});if(h.audioGroups)for(let y=1;y<h.audioGroups.length;y++)g.addGroupId("audio",`${h.audioGroups[y]}_clone_${r}`);if(h.subtitleGroups)for(let y=1;y<h.subtitleGroups.length;y++)g.addGroupId("text",`${h.subtitleGroups[y]}_clone_${r}`);return g});t.push(...c),sg(this.audioTracks,a,d,r),sg(this.subtitleTracks,i,d,r)})}loadSteeringManifest(e){const t=this.hls.config,a=t.loader;this.loader&&this.loader.destroy(),this.loader=new a(t);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const h=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+h)}const o={responseType:"json",url:i.href},r=t.steeringManifestLoadPolicy.default,l=r.errorRetry||r.timeoutRetry||{},d={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(h,u,f,p)=>{this.log(`Loaded steering manifest: "${i}"`);const m=h.data;if(m.VERSION!==1){this.log(`Steering VERSION ${m.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=m.TTL;const{"RELOAD-URI":g,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=m;if(g)try{this.uri=new self.URL(g,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const S={steeringManifest:m,url:i.toString()};this.hls.trigger(w.STEERING_MANIFEST_LOADED,S),b&&this.updatePathwayPriority(b)},onError:(h,u,f,p)=>{if(this.log(`Error loading steering manifest: ${h.code} ${h.text} (${u.url})`),this.stopLoad(),h.code===410){this.enabled=!1,this.log(`Steering manifest ${u.url} no longer available`);return}let m=this.timeToLoad*1e3;if(h.code===429){const g=this.loader;if(typeof(g==null?void 0:g.getResponseHeader)=="function"){const y=g.getResponseHeader("Retry-After");y&&(m=parseFloat(y)*1e3)}this.log(`Steering manifest ${u.url} rate limited`);return}this.scheduleRefresh(this.uri||u.url,m)},onTimeout:(h,u,f)=>{this.log(`Timeout loading steering manifest (${u.url})`),this.scheduleRefresh(this.uri||u.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(o,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var a;const i=(a=this.hls)==null?void 0:a.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function sg(s,e,t,a){s&&Object.keys(e).forEach(i=>{const o=s.filter(r=>r.groupId===i).map(r=>{const l=Ge({},r);return l.details=void 0,l.attrs=new Oe(l.attrs),l.url=l.attrs.URI=ag(r.url,r.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[i],l.attrs["PATHWAY-ID"]=a,l});s.push(...o)})}function ag(s,e,t,a){const{HOST:i,PARAMS:o,[t]:r}=a;let l;e&&(l=r==null?void 0:r[e],l&&(s=l));const d=new self.URL(s);return i&&!l&&(d.host=i),o&&Object.keys(o).sort().forEach(c=>{c&&d.searchParams.set(c,o[c])}),d.href}const sP=/^age:\s*[\d.]+\s*$/im;class ng{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new $n,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=a,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const a=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const o=this.xhrSetup;o?Promise.resolve().then(()=>{if(!(this.loader!==a||this.stats.aborted))return o(a,t.url)}).catch(r=>{if(!(this.loader!==a||this.stats.aborted))return a.open("GET",t.url,!0),o(a,t.url)}).then(()=>{this.loader!==a||this.stats.aborted||this.openAndSendXhr(a,t,e)}).catch(r=>{this.callbacks.onError({code:a.status,text:r.message},t,a,i)}):this.openAndSendXhr(a,t,e)}openAndSendXhr(e,t,a){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:o,maxLoadTimeMs:r}=a.loadPolicy;if(i)for(const l in i)e.setRequestHeader(l,i[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),a.timeout=o&&ne(o)?o:r,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:a}=this;if(!e||!t)return;const i=t.readyState,o=this.config;if(!a.aborted&&i>=2&&(a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start),o.timeout!==o.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),o.timeout=o.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.loadPolicy.maxLoadTimeMs-(a.loading.first-a.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const r=t.status,l=t.responseType!=="text";if(r>=200&&r<300&&(l&&t.response||t.responseText!==null)){a.loading.end=Math.max(self.performance.now(),a.loading.first);const d=l?t.response:t.responseText,c=t.responseType==="arraybuffer"?d.byteLength:d.length;if(a.loaded=a.total=c,a.bwEstimate=a.total*8e3/(a.loading.end-a.loading.first),!this.callbacks)return;const h=this.callbacks.onProgress;if(h&&h(a,e,d,t),!this.callbacks)return;const u={url:t.responseURL,data:d,code:r};this.callbacks.onSuccess(u,a,e,t)}else{const d=o.loadPolicy.errorRetry,c=a.retry,h={url:e.url,data:void 0,code:r};Zn(d,c,!1,h)?this.retry(d):(A.error(`${r} while loading ${e.url}`),this.callbacks.onError({code:r,text:t.statusText},e,t,a))}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Zn(e,t,!0))this.retry(e);else{var a;A.warn(`timeout while loading ${(a=this.context)==null?void 0:a.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:a}=this;this.retryDelay=fl(e,a.retry),a.retry++,A.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${a.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&sP.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function aP(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const nP=/(\d+)-(\d+)\/(\d+)/;class ig{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||lP,this.controller=new self.AbortController,this.stats=new $n}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,a){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const o=iP(e,this.controller.signal),r=a.onProgress,l=e.responseType==="arraybuffer",d=l?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:h}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=a,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),t.timeout=c&&ne(c)?c:h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),a.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(u=>{this.response=this.loader=u;const f=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),a.onTimeout(i,e,this.response)},h-(f-i.loading.start)),!u.ok){const{status:p,statusText:m}=u;throw new cP(m||"fetch, bad network response",p,u)}return i.loading.first=f,i.total=rP(u.headers)||i.total,r&&ne(t.highWaterMark)?this.loadProgressively(u,i,e,t.highWaterMark,r):l?u.arrayBuffer():e.responseType==="json"?u.json():u.text()}).then(u=>{const f=this.response;if(!f)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const p=u[d];p&&(i.loaded=i.total=p);const m={url:f.url,data:u,code:f.status};r&&!ne(t.highWaterMark)&&r(i,e,u,f),a.onSuccess(m,i,e,f)}).catch(u=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const f=u&&u.code||0,p=u?u.message:null;a.onError({code:f,text:p},e,u?u.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,a,i=0,o){const r=new np,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return r.dataLength&&o(t,a,r.flush(),e),Promise.resolve(new ArrayBuffer(0));const h=c.value,u=h.length;return t.loaded+=u,u<i||r.dataLength?(r.push(h),r.dataLength>=i&&o(t,a,r.flush(),e)):o(t,a,h,e),d()}).catch(()=>Promise.reject());return d()}}function iP(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(Ge({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function oP(s){const e=nP.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function rP(s){const e=s.get("Content-Range");if(e){const a=oP(e);if(ne(a))return a}const t=s.get("Content-Length");if(t)return parseInt(t)}function lP(s,e){return new self.Request(s.url,e)}class cP extends Error{constructor(e,t,a){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=a}}const dP=/\s/,hP={newCue(s,e,t,a){const i=[];let o,r,l,d,c;const h=self.VTTCue||self.TextTrackCue;for(let f=0;f<a.rows.length;f++)if(o=a.rows[f],l=!0,d=0,c="",!o.isEmpty()){var u;for(let g=0;g<o.chars.length;g++)dP.test(o.chars[g].uchar)&&l?d++:(c+=o.chars[g].uchar,l=!1);o.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const p=Mp(c.trim()),m=Pl(e,t,p);s!=null&&(u=s.cues)!=null&&u.getCueById(m)||(r=new h(e,t,p),r.id=m,r.line=f+1,r.align="left",r.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(r))}return s&&i.length&&(i.sort((f,p)=>f.line==="auto"||p.line==="auto"?0:f.line>8&&p.line>8?p.line-f.line:f.line-p.line),i.forEach(f=>Ff(s,f))),i}},uP={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},og=Xe(Xe({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ng,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:$B,bufferController:GN,capLevelController:Vl,errorController:vB,fpsController:yD,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:rf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:uP},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},mP()),{},{subtitleStreamController:$N,subtitleTrackController:UN,timelineController:pD,audioStreamController:FN,audioTrackController:MN,emeController:qs,cmcdController:QD,contentSteeringController:tP});function mP(){return{cueHandler:hP,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function fP(s,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=Hl(s),a=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return a.forEach(o=>{const r=`${o==="level"?"playlist":o}LoadPolicy`,l=e[r]===void 0,d=[];i.forEach(c=>{const h=`${o}Loading${c}`,u=e[h];if(u!==void 0&&l){d.push(h);const f=t[r].default;switch(e[r]={default:f},c){case"TimeOut":f.maxLoadTimeMs=u,f.maxTimeToFirstByteMs=u;break;case"MaxRetry":f.errorRetry.maxNumRetry=u,f.timeoutRetry.maxNumRetry=u;break;case"RetryDelay":f.errorRetry.retryDelayMs=u,f.timeoutRetry.retryDelayMs=u;break;case"MaxRetryTimeout":f.errorRetry.maxRetryDelayMs=u,f.timeoutRetry.maxRetryDelayMs=u;break}}}),d.length&&A.warn(`hls.js config: "${d.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(e[r])}`)}),Xe(Xe({},t),e)}function Hl(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(Hl):Object.keys(s).reduce((e,t)=>(e[t]=Hl(s[t]),e),{}):s}function pP(s){const e=s.loader;e!==ig&&e!==ng?(A.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):aP()&&(s.loader=ig,s.progressive=!0,s.enableSoftwareAES=!0,A.log("[config]: Progressive streaming enabled, using FetchLoader"))}let Wl;class gP extends gl{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this),e.on(w.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this),e.off(w.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const a=this.hls.config.preferManagedMediaSource,i=[],o={},r={};let l=!1,d=!1,c=!1;t.levels.forEach(h=>{var u,f;const p=h.attrs;let{audioCodec:m,videoCodec:g}=h;((u=m)==null?void 0:u.indexOf("mp4a.40.34"))!==-1&&(Wl||(Wl=/chrome|firefox/i.test(navigator.userAgent)),Wl&&(h.audioCodec=m=void 0)),m&&(h.audioCodec=m=Wn(m,a)),((f=g)==null?void 0:f.indexOf("avc1"))===0&&(g=h.videoCodec=sB(g));const{width:y,height:b,unknownCodecs:S}=h;if(l||(l=!!(y&&b)),d||(d=!!g),c||(c=!!m),S!=null&&S.length||m&&!il(m,"audio",a)||g&&!il(g,"video",a))return;const{CODECS:_,"FRAME-RATE":C,"HDCP-LEVEL":E,"PATHWAY-ID":v,RESOLUTION:T,"VIDEO-RANGE":B}=p,R=`${`${v||"."}-`}${h.bitrate}-${T}-${C}-${_}-${B}-${E}`;if(o[R])if(o[R].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const $=r[R]+=1;h.attrs["PATHWAY-ID"]=new Array($+1).join(".");const K=new Vs(h);o[R]=K,i.push(K)}else o[R].addGroupId("audio",p.AUDIO),o[R].addGroupId("text",p.SUBTITLES);else{const $=new Vs(h);o[R]=$,r[R]=1,i.push($)}}),this.filterAndSortMediaOptions(i,t,l,d,c)}filterAndSortMediaOptions(e,t,a,i,o){let r=[],l=[],d=e;if((a||i)&&o&&(d=d.filter(({videoCodec:m,videoRange:g,width:y,height:b})=>(!!m||!!(y&&b))&&pB(g))),d.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const m=new Error("no level with compatible codecs found in manifest");this.hls.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:m,reason:m.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:m}=this.hls.config;r=t.audioTracks.filter(g=>!g.audioCodec||il(g.audioCodec,"audio",m)),rg(r)}t.subtitles&&(l=t.subtitles,rg(l));const c=d.slice(0);d.sort((m,g)=>{if(m.attrs["HDCP-LEVEL"]!==g.attrs["HDCP-LEVEL"])return(m.attrs["HDCP-LEVEL"]||"")>(g.attrs["HDCP-LEVEL"]||"")?1:-1;if(a&&m.height!==g.height)return m.height-g.height;if(m.frameRate!==g.frameRate)return m.frameRate-g.frameRate;if(m.videoRange!==g.videoRange)return Yn.indexOf(m.videoRange)-Yn.indexOf(g.videoRange);if(m.videoCodec!==g.videoCodec){const y=Tf(m.videoCodec),b=Tf(g.videoCodec);if(y!==b)return b-y}if(m.uri===g.uri&&m.codecSet!==g.codecSet){const y=Hn(m.codecSet),b=Hn(g.codecSet);if(y!==b)return b-y}return m.averageBitrate!==g.averageBitrate?m.averageBitrate-g.averageBitrate:0});let h=c[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==c.length)){for(let m=0;m<c.length;m++)if(c[m].pathwayId===d[0].pathwayId){h=c[m];break}}this._levels=d;for(let m=0;m<d.length;m++)if(d[m]===h){var u;this._firstLevel=m;const g=h.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${g}`),((u=this.hls.userConfig)==null?void 0:u.abrEwmaDefaultEstimate)===void 0){const b=Math.min(g,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===og.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=o&&!i,p={levels:d,audioTracks:r,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:o,video:i,altAudio:!f&&r.some(m=>!!m.url)};this.hls.trigger(w.MANIFEST_PARSED,p),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const h=new Error("invalid level idx"),u=e<0;if(this.hls.trigger(w.ERROR,{type:fe.OTHER_ERROR,details:N.LEVEL_SWITCH_ERROR,level:e,fatal:u,error:h,reason:h.message}),u)return;e=Math.min(e,t.length-1)}const a=this.currentLevelIndex,i=this.currentLevel,o=i?i.attrs["PATHWAY-ID"]:void 0,r=t[e],l=r.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=r,a===e&&r.details&&i&&o===l)return;this.log(`Switching to level ${e} (${r.height?r.height+"p ":""}${r.videoRange?r.videoRange+" ":""}${r.codecSet?r.codecSet+" ":""}@${r.bitrate})${l?" with Pathway "+l:""} from level ${a}${o?" with Pathway "+o:""}`);const d={level:e,attrs:r.attrs,details:r.details,bitrate:r.bitrate,averageBitrate:r.averageBitrate,maxBitrate:r.maxBitrate,realBitrate:r.realBitrate,width:r.width,height:r.height,codecSet:r.codecSet,audioCodec:r.audioCodec,videoCodec:r.videoCodec,audioGroups:r.audioGroups,subtitleGroups:r.subtitleGroups,loaded:r.loaded,loadError:r.loadError,fragmentError:r.fragmentError,name:r.name,id:r.id,uri:r.uri,url:r.url,urlId:0,audioGroupIds:r.audioGroupIds,textGroupIds:r.textGroupIds};this.hls.trigger(w.LEVEL_SWITCHING,d);const c=r.details;if(!c||c.live){const h=this.switchParams(r.uri,i==null?void 0:i.details,c);this.loadPlaylist(h)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===xe.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.MAIN){const a=t.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var a;const{level:i,details:o}=t,r=this._levels[i];if(!r){var l;this.warn(`Invalid level index ${i}`),(l=t.deliveryDirectives)!=null&&l.skip&&(o.deltaUpdateFailed=!0);return}i===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0),this.playlistLoaded(i,t,r.details)):(a=t.deliveryDirectives)!=null&&a.skip&&(o.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,a=this.currentLevel;if(a&&this.shouldLoadPlaylist(a)){let i=a.uri;if(e)try{i=e.addDirectives(i)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}const o=a.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${o?" Pathway "+o:""} ${i}`),this.clearTimer(),this.hls.trigger(w.LEVEL_LOADING,{url:i,level:t,pathwayId:a.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const a=this._levels.filter((i,o)=>o!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(r=>r.level=-1)),!1));Wf(a),this._levels=a,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(w.LEVELS_UPDATED,{levels:a})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:a}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(w.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:a}))}}function rg(s){const e={};s.forEach(t=>{const a=t.groupId||"";t.id=e[a]=e[a]||0,e[a]++})}class yP{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const a in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[a].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=N.KEY_LOAD_ERROR,a,i,o){return new Zt({type:fe.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:o,error:a,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:a,cc:i}=e;for(let o=0;o<t.length;o++){const r=t[o];if(i<=r.cc&&(a==="initSegment"||r.sn==="initSegment"||a<r.sn)){this.emeController.selectKeySystemFormat(r).then(l=>{r.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var a,i;t&&e.setKeyFormat(t);const o=e.decryptdata;if(!o){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,c))}const r=o.uri;if(!r)return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${r}"`)));let l=this.keyUriToKeyInfo[r];if((a=l)!=null&&a.decryptdata.key)return o.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((i=l)!=null&&i.keyLoadPromise){var d;switch((d=l.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(o.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[r]={decryptdata:o,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},o.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return o.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${o.method}"`)))}}loadKeyEME(e,t){const a={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(a);if(i)return(e.keyLoadPromise=i.then(o=>(e.mediaKeySessionContext=o,a))).catch(o=>{throw e.keyLoadPromise=null,o})}return Promise.resolve(a)}loadKeyHTTP(e,t){const a=this.config,i=a.loader,o=new i(a);return t.keyLoader=e.loader=o,e.keyLoadPromise=new Promise((r,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=a.keyLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:(f,p,m,g)=>{const{frag:y,keyInfo:b,url:S}=m;if(!y.decryptdata||b!==this.keyUriToKeyInfo[S])return l(this.createKeyLoadError(y,N.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),g));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,r({frag:y,keyInfo:b})},onError:(f,p,m,g)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),m,Xe({url:d.url,data:void 0},f)))},onTimeout:(f,p,m)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),m))},onAbort:(f,p,m)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.INTERNAL_ABORTED,new Error("key loading aborted"),m))}};o.load(d,h,u)})}resetLoader(e){const{frag:t,keyInfo:a,url:i}=e,o=a.loader;t.keyLoader===o&&(t.keyLoader=null,a.loader=null),delete this.keyUriToKeyInfo[i],o&&o.destroy()}}function lg(){return self.SourceBuffer||self.WebKitSourceBuffer}function cg(){if(!Es())return!1;const e=lg();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function bP(){if(!cg())return!1;const s=Es();return typeof(s==null?void 0:s.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>s.isTypeSupported(Ta(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(Ta(e,"audio"))))}function SP(){var s;const e=lg();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const wP=250,gi=2,_P=.1,kP=.05;class EP{constructor(e,t,a,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=a,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:a,media:i,stalled:o}=this;if(i===null)return;const{currentTime:r,seeking:l}=i,d=this.seeking&&!l,c=!this.seeking&&l;if(this.seeking=l,r!==e){if(this.moved=!0,l||(this.nudgeRetry=0),o!==null){if(this.stallReported){const y=self.performance.now()-o;A.warn(`playback not stuck anymore @${r}, after ${Math.round(y)}ms`),this.stallReported=!1}this.stalled=null}return}if(c||d){this.stalled=null;return}if(i.paused&&!l||i.ended||i.playbackRate===0||!De.getBuffered(i).length){this.nudgeRetry=0;return}const h=De.bufferInfo(i,r,0),u=h.nextStart||0;if(l){const y=h.len>gi,b=!u||t&&t.start<=r||u-r>gi&&!this.fragmentTracker.getPartialFragment(r);if(y||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;if(!(h.len>0)&&!u)return;const b=Math.max(u,h.start||0)-r,S=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,C=(S==null||(f=S.details)==null?void 0:f.live)?S.details.targetduration*2:gi,E=this.fragmentTracker.getPartialFragment(r);if(b>0&&(b<=C||E)){i.paused||this._trySkipBufferHole(E);return}}const p=self.performance.now();if(o===null){this.stalled=p;return}const m=p-o;if(!l&&m>=wP&&(this._reportStall(h),!this.media))return;const g=De.bufferInfo(i,r,a.maxBufferHole);this._tryFixBufferStall(g,m)}_tryFixBufferStall(e,t){const{config:a,fragmentTracker:i,media:o}=this;if(o===null)return;const r=o.currentTime,l=i.getPartialFragment(r);l&&(this._trySkipBufferHole(l)||!this.media)||(e.len>a.maxBufferHole||e.nextStart&&e.nextStart-r<a.maxBufferHole)&&t>a.highBufferWatchdogPeriod*1e3&&(A.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:a,stallReported:i}=this;if(!i&&a){this.stallReported=!0;const o=new Error(`Playback stalling at @${a.currentTime} due to low buffer (${JSON.stringify(e)})`);A.warn(o.message),t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,fatal:!1,error:o,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:a,media:i}=this;if(i===null)return 0;const o=i.currentTime,r=De.bufferInfo(i,o,0),l=o<r.start?r.start:r.nextStart;if(l){const d=r.len<=t.maxBufferHole,c=r.len>0&&r.len<1&&i.readyState<3,h=l-o;if(h>0&&(d||c)){if(h>t.maxBufferHole){const{fragmentTracker:f}=this;let p=!1;if(o===0){const m=f.getAppendedFrag(0,le.MAIN);m&&l<m.end&&(p=!0)}if(!p){const m=e||f.getAppendedFrag(o,le.MAIN);if(m){let g=!1,y=m.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{g=!0;break}}if(g)return 0}}}const u=Math.max(l+kP,o+_P);if(A.warn(`skipping hole, adjusting currentTime from ${o} to ${u}`),this.moved=!0,this.stalled=null,i.currentTime=u,e&&!e.gap){const f=new Error(`fragment loaded with buffer holes, seeking from ${o} to ${u}`);a.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:f,reason:f.message,frag:e})}return u}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:a,nudgeRetry:i}=this;if(a===null)return;const o=a.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const r=o+(i+1)*e.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${o} to ${r}`);A.warn(l.message),a.currentTime=r,t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1})}else{const r=new Error(`Playhead still not moving while enough data buffered @${o} after ${e.nudgeMaxRetry} nudges`);A.error(r.message),t.trigger(w.ERROR,{type:fe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:r,fatal:!0})}}}const TP=100;class CP extends Sl{constructor(e,t,a){super(e,t,a,"[stream-controller]",le.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(w.MANIFEST_LOADING,this.onManifestLoading,this),e.on(w.MANIFEST_PARSED,this.onManifestParsed,this),e.on(w.LEVEL_LOADING,this.onLevelLoading,this),e.on(w.LEVEL_LOADED,this.onLevelLoaded,this),e.on(w.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(w.ERROR,this.onError,this),e.on(w.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(w.BUFFER_CREATED,this.onBufferCreated,this),e.on(w.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(w.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(w.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(w.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(w.MANIFEST_LOADING,this.onManifestLoading,this),e.off(w.MANIFEST_PARSED,this.onManifestParsed,this),e.off(w.LEVEL_LOADED,this.onLevelLoaded,this),e.off(w.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(w.ERROR,this.onError,this),e.off(w.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(w.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(w.BUFFER_CREATED,this.onBufferCreated,this),e.off(w.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(w.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(w.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:a}=this;if(this.stopLoad(),this.setInterval(TP),this.level=-1,!this.startFragRequested){let i=a.startLevel;i===-1&&(a.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=a.firstAutoLevel),a.nextLoadLevel=i,this.level=a.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=V.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case V.WAITING_LEVEL:{const{levels:t,level:a}=this,i=t==null?void 0:t[a],o=i==null?void 0:i.details;if(o&&(!o.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(o))break;this.state=V.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=V.IDLE;break}break}case V.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),a=this.retryDate;if(!a||t>=a||(e=this.media)!=null&&e.seeking){const{levels:i,level:o}=this,r=i==null?void 0:i[o];this.resetStartWhenNotLoaded(r||null),this.state=V.IDLE}}break}this.state===V.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:a,media:i}=this;if(t===null||!i&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const o=e.nextLoadLevel;if(!(a!=null&&a[o]))return;const r=a[o],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(w.BUFFER_EOS,g),this.state=V.ENDED;return}e.loadLevel!==o&&e.manualLevel===-1&&this.log(`Adapting to level ${o} from level ${this.level}`),this.level=e.nextLoadLevel=o;const c=r.details;if(!c||this.state===V.WAITING_LEVEL||c.live&&this.levelLastLoaded!==r){this.level=o,this.state=V.WAITING_LEVEL;return}const h=l.len,u=this.getMaxBufferLength(r.maxBitrate);if(h>=u)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==Ze.OK){var m;const y=((m=this.backtrackFragment)!=null?m:p).sn-c.startSN,b=c.fragments[y-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const y=this.audioOnly&&!this.altAudio?Re.AUDIO:Re.VIDEO,b=(y===Re.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,le.MAIN)}p=this.getNextFragmentLoopLoading(p,c,l,le.MAIN,u)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,r,f))}loadFragment(e,t,a){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===Ze.NOT_LOADED||i===Ze.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,a)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,le.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let a;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const o=this.getLevelDetails();if(o!=null&&o.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<o.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?a=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:a=0}else a=0;const r=this.getBufferedFrag(t.currentTime+a);if(r){const l=this.followingBufferedFrag(r);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,h=Math.max(r.end,d+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case V.KEY_LOADING:case V.FRAG_LOADING:case V.FRAG_LOADING_WAITING_RETRY:case V.PARSING:case V.PARSED:this.state=V.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const a=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),a.addEventListener("playing",this.onvplaying),a.addEventListener("seeked",this.onvseeked),this.gapController=new EP(this.config,a,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;ne(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const a=this.getMainFwdBufferInfo();if(a===null||a.len===0){this.warn(`Main forward buffer length on "seeked" event ${a?a.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let a=!1,i=!1;t.levels.forEach(o=>{const r=o.audioCodec;r&&(a=a||r.indexOf("mp4a.40.2")!==-1,i=i||r.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=a&&i&&!SP(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:a}=this;if(!a||this.state!==V.IDLE)return;const i=a[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=V.WAITING_LEVEL)}onLevelLoaded(e,t){var a;const{levels:i}=this,o=t.level,r=t.details,l=r.totalduration;if(!i){this.warn(`Levels were reset while loading level ${o}`);return}this.log(`Level ${o} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""}, cc [${r.startCC}, ${r.endCC}] duration:${l}`);const d=i[o],c=this.fragCurrent;c&&(this.state===V.FRAG_LOADING||this.state===V.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let h=0;if(r.live||(a=d.details)!=null&&a.live){var u;if(this.checkLiveUpdate(r),r.deltaUpdateFailed)return;h=this.alignPlaylists(r,d.details,(u=this.levelLastLoaded)==null?void 0:u.details)}if(d.details=r,this.levelLastLoaded=d,this.hls.trigger(w.LEVEL_UPDATED,{details:r,level:o}),this.state===V.WAITING_LEVEL){if(this.waitForCdnTuneIn(r))return;this.state=V.IDLE}this.startFragRequested?r.live&&this.synchronizeToLiveEdge(r):this.setStartPosition(r,h),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:a,part:i,payload:o}=e,{levels:r}=this;if(!r){this.warn(`Levels were reset while fragment load was in progress. Fragment ${a.sn} of level ${a.level} will not be buffered`);return}const l=r[a.level],d=l.details;if(!d){this.warn(`Dropping fragment ${a.sn} of level ${a.level} after level details were reset`),this.fragmentTracker.removeFragment(a);return}const c=l.videoCodec,h=d.PTSKnown||!d.live,u=(t=a.initSegment)==null?void 0:t.data,f=this._getAudioCodec(l),p=this.transmuxer=this.transmuxer||new xp(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,g=m!==-1,y=new yl(a.level,a.sn,a.stats.chunkCount,o.byteLength,m,g),b=this.initPTS[a.cc];p.push(o,u,f,c,a,i,d.totalduration,h,y,b)}onAudioTrackSwitching(e,t){const a=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const r=this.fragCurrent;r&&(this.log("Switching to main audio track, cancel main fragment load"),r.abortRequests(),this.fragmentTracker.removeFragment(r)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const o=this.hls;a&&(o.trigger(w.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),o.trigger(w.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const a=t.id,i=!!this.hls.audioTracks[a].url;if(i){const o=this.videoBuffer;o&&this.mediaBuffer!==o&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=o)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const a=t.tracks;let i,o,r=!1;for(const l in a){const d=a[l];if(d.id==="main"){if(o=l,i=d,l==="video"){const c=a[l];c&&(this.videoBuffer=c.buffer)}}else r=!0}r&&i?(this.log(`Alternate track found, use ${o}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:a,part:i}=t;if(a&&a.type!==le.MAIN)return;if(this.fragContextChanged(a)){this.warn(`Fragment ${a.sn}${i?" p: "+i.index:""} of level ${a.level} finished buffering, but was aborted. state: ${this.state}`),this.state===V.PARSED&&(this.state=V.IDLE);return}const o=i?i.stats:a.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),a.sn!=="initSegment"&&(this.fragPrevious=a),this.fragBufferedComplete(a,i)}onError(e,t){var a;if(t.fatal){this.state=V.ERROR;return}switch(t.details){case N.FRAG_GAP:case N.FRAG_PARSING_ERROR:case N.FRAG_DECRYPT_ERROR:case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===V.WAITING_LEVEL&&((a=t.context)==null?void 0:a.type)===xe.LEVEL&&(this.state=V.IDLE);break;case N.BUFFER_APPEND_ERROR:case N.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===N.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case N.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!De.getBuffered(e).length){const a=this.state!==V.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,a)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=V.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Re.AUDIO||this.audioOnly&&!this.altAudio){const a=(t===Re.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(a,t,le.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let a=this.startPosition;if(a>=0&&t<a){if(e.seeking){this.log(`could not seek to ${a}, already seeking at ${t}`);return}const i=De.getBuffered(e),r=(i.length?i.start(0):0)-a;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),a+=r,this.startPosition=a),this.log(`seek to target start position ${a} from current time ${t}`),e.currentTime=a}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(a=>{const{hls:i}=this;if(!a||this.fragContextChanged(e))return;t.fragmentError=0,this.state=V.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const o=e.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),i.trigger(w.FRAG_LOADED,a),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const a="main",{hls:i}=this,{remuxResult:o,chunkMeta:r}=e,l=this.getCurrentContext(r);if(!l){this.resetWhenMissingContext(r);return}const{frag:d,part:c,level:h}=l,{video:u,text:f,id3:p,initSegment:m}=o,{details:g}=h,y=this.altAudio?void 0:o.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=V.PARSING,m){if(m!=null&&m.tracks){const _=d.initSegment||d;this._bufferInitSegment(h,m.tracks,_,r),i.trigger(w.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:a,tracks:m.tracks})}const b=m.initPTS,S=m.timescale;ne(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:S},i.trigger(w.INIT_PTS_FOUND,{frag:d,id:a,initPTS:b,timescale:S}))}if(u&&g&&d.sn!=="initSegment"){const b=g.fragments[d.sn-1-g.startSN],S=d.sn===g.startSN,_=!b||d.cc>b.cc;if(o.independent!==!1){const{startPTS:C,endPTS:E,startDTS:v,endDTS:T}=u;if(c)c.elementaryStreams[u.type]={startPTS:C,endPTS:E,startDTS:v,endDTS:T};else if(u.firstKeyFrame&&u.independent&&r.id===1&&!_&&(this.couldBacktrack=!0),u.dropped&&u.independent){const B=this.getMainFwdBufferInfo(),L=(B?B.end:this.getLoadPosition())+this.config.maxBufferHole,R=u.firstKeyFramePTS?u.firstKeyFramePTS:C;if(!S&&L<R-this.config.maxBufferHole&&!_){this.backtrack(d);return}else _&&(d.gap=!0);d.setElementaryStreamInfo(u.type,d.start,E,d.start,T,!0)}else S&&C>gi&&(d.gap=!0);d.setElementaryStreamInfo(u.type,C,E,v,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(u,d,c,r,S||_)}else if(S||_)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:S,startDTS:_,endDTS:C}=y;c&&(c.elementaryStreams[Re.AUDIO]={startPTS:b,endPTS:S,startDTS:_,endDTS:C}),d.setElementaryStreamInfo(Re.AUDIO,b,S,_,C),this.bufferFragmentData(y,d,c,r)}if(g&&p!=null&&(t=p.samples)!=null&&t.length){const b={id:a,frag:d,details:g,samples:p.samples};i.trigger(w.FRAG_PARSING_METADATA,b)}if(g&&f){const b={id:a,frag:d,details:g,samples:f.samples};i.trigger(w.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,a,i){if(this.state!==V.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:o,video:r,audiovideo:l}=t;if(o){let d=e.audioCodec;const c=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const h=o.metadata;h&&"channelCount"in h&&(h.channelCount||1)!==1&&c.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&c.indexOf("android")!==-1&&o.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),e.audioCodec&&e.audioCodec!==d&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${d}"`),o.levelCodec=d,o.id="main",this.log(`Init audio buffer, container:${o.container}, codecs[selected/level/parsed]=[${d||""}/${e.audioCodec||""}/${o.codec}]`)}r&&(r.levelCodec=e.videoCodec,r.id="main",this.log(`Init video buffer, container:${r.container}, codecs[level/parsed]=[${e.videoCodec||""}/${r.codec}]`)),l&&this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),this.hls.trigger(w.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const h=t[d].initSegment;h!=null&&h.byteLength&&this.hls.trigger(w.BUFFER_APPENDING,{type:d,data:h,frag:a,part:null,chunkMeta:i,parent:a.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,le.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=V.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const a=e.currentTime;if(De.isBuffered(e,a)?t=this.getAppendedFrag(a):De.isBuffered(e,a+.1)&&(t=this.getAppendedFrag(a+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,o=t.level;(!i||t.sn!==i.sn||i.level!==o)&&(this.fragPlaying=t,this.hls.trigger(w.FRAG_CHANGED,{frag:t}),(!i||i.level!==o)&&this.hls.trigger(w.LEVEL_SWITCHED,{level:o}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,a=this.currentFrag;if(a&&ne(t)&&ne(a.programDateTime)){const i=a.programDateTime+(t-a.start)*1e3;return new Date(i)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class ds{static get version(){return"1.5.15"}static isMSESupported(){return cg()}static isSupported(){return bP()}static getMediaSource(){return Es()}static get Events(){return w}static get ErrorTypes(){return fe}static get ErrorDetails(){return N}static get DefaultConfig(){return ds.defaultConfig?ds.defaultConfig:og}static set DefaultConfig(e){ds.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new Al,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,m6(e.debug||!1,"Hls instance");const t=this.config=fP(ds.DefaultConfig,e);this.userConfig=e,t.progressive&&pP(t);const{abrController:a,bufferController:i,capLevelController:o,errorController:r,fpsController:l}=t,d=new r(this),c=this.abrController=new a(this),h=this.bufferController=new i(this),u=this.capLevelController=new o(this),f=new l(this),p=new rB(this),m=new uB(this),g=t.contentSteeringController,y=g?new g(this):null,b=this.levelController=new gP(this,y),S=new UB(this),_=new yP(this.config),C=this.streamController=new CP(this,S,_);u.setStreamController(C),f.setStreamController(C);const E=[p,b,C];y&&E.splice(1,0,y),this.networkControllers=E;const v=[c,h,u,f,m,S];this.audioTrackController=this.createController(t.audioTrackController,E);const T=t.audioStreamController;T&&E.push(new T(this,S,_)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const B=t.subtitleStreamController;B&&E.push(new B(this,S,_)),this.createController(t.timelineController,v),_.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(mB,v),this.coreComponents=v,E.push(d);const L=d.onErrorOut;typeof L=="function"&&this.on(w.ERROR,L,d)}createController(e,t){if(e){const a=new e(this);return t&&t.push(a),a}return null}on(e,t,a=this){this._emitter.on(e,t,a)}once(e,t,a=this){this._emitter.once(e,t,a)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,a=this,i){this._emitter.off(e,t,a,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,a){return this._emitter.emit(e,t,a)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(a){if(A.error("An internal error happened while handling event "+e+'. Error message: "'+a.message+'". Here is a stacktrace:',a),!this.triggeringException){this.triggeringException=!0;const i=e===w.ERROR;this.trigger(w.ERROR,{type:fe.OTHER_ERROR,details:N.INTERNAL_EXCEPTION,fatal:i,event:e,error:a}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){A.log("destroy"),this.trigger(w.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){A.log("attachMedia"),this._media=e,this.trigger(w.MEDIA_ATTACHING,{media:e})}detachMedia(){A.log("detachMedia"),this.trigger(w.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,a=this.url,i=this.url=Kr.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,A.log(`loadSource:${i}`),t&&a&&(a!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(w.MANIFEST_LOADING,{url:e})}startLoad(e=-1){A.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){A.log("stopLoad"),this.started=!1,this.networkControllers.forEach(e=>{e.stopLoad()})}resumeBuffering(){this.started&&this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.startLoad(-1)})}pauseBuffering(){this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.stopLoad()})}swapAudioCodec(){A.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){A.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){A.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){A.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){A.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){A.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){A.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(A.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){fB(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const a=e.length;for(let i=0;i<a;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:a}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,a)for(let o=i;o--;){const r=e[o].attrs["HDCP-LEVEL"];if(r&&r<=a)return o}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ds.defaultConfig=void 0;const xP=[(s=>(n.pushScopeId("data-v-d3c9a398"),s=s(),n.popScopeId(),s))(()=>n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[n.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),n.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],vP={class:"stories__content"},AP={class:"story-container-game"},LP={class:"story-circle"},IP={class:"story-result"},RP={class:"stories__content__stories-bar"},BP={class:"stories__content__video"},NP={class:"stories__content__video__info__date"},DP={class:"stories__content__video__info__data"},PP=qe({__name:"GameStories",props:{stories:{type:Array,default:()=>[]},startStoryIndex:{type:Number,default:0},isFirstGameStories:{type:Boolean,default:!1},isLastGameStories:{type:Boolean,default:!1}},emits:["close","last-story-index","swipe","video-play","video-next-back"],setup(s,{emit:e}){const t=s;n.useCssVars(se=>({"559904cd":y.value,"57a9d8d4":b.value,"57d750a1":v.value}));const a=Ho(),o=[{ids:[607,608],name:"Oportunidad de Gol"},{ids:[12,55],name:"Gol"},{ids:[54,35],name:"Autogol"},{ids:[14,52],name:"Tarjeta Amarilla"},{ids:[15,53],name:"Tarjeta Roja"},{ids:[466,477],name:"Penal Recibido"}].reduce((se,Ee)=>(Ee.ids.forEach(Te=>{se.set(Te,Ee.name)}),se),new Map),r=n.ref(null),l=n.ref(null),d=n.ref([]),c=n.ref(0),h=n.ref(null),u=n.ref(0),f=n.ref(0),p=n.ref(0),m=n.ref(!1),g=n.ref(0),y=n.ref("auto"),b=n.ref("100%"),S=n.ref(null),_=n.ref(0),C=n.ref(null),E=n.ref(null),v=n.computed(()=>Z()?"7vw":"16px"),T=n.computed(()=>d.value[c.value]),B=n.computed(()=>({"--icon-play":`url(${a}/icnplay1.svg)`}));function L(){l.value.muted=!1,l.value.play()}const R=n.computed(()=>!T.value.isHls&&["ios"].includes(Wo()));n.watch(()=>T.value,se=>{se&&K()}),n.watch(()=>t.stories,se=>{if(se.length){c.value=0,p.value=0;const Ee=se.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${Qh[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${o.get(Te.categoryId)} ${Mx(Te.player.player_name)}`})).sort((Te,Fe)=>Te.startTime-Fe.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ee.length-1&&(Ee.forEach((Te,Fe)=>{Fe<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,p.value=c.value),d.value=[...Ee]}},{immediate:!0}),n.watch(()=>r.value,se=>{se&&$()},{flush:"post"}),n.watch(()=>h.value,se=>{se&&(Fx()?(se.addEventListener("touchstart",he),se.addEventListener("touchend",J)):(se.addEventListener("mousedown",he),se.addEventListener("mouseup",J)))},{flush:"post"});function $(){l.value=new Ps("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",ae(l.value)),l.value.on("timeupdate",oe()),K(T.value),l.value.isDestroyed=!1}function K(){T.value.isHls?z(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function z(se){if(r.value)if(ds.isSupported()){r.value.src=null;let Ee=new ds;Ee.loadSource(se.url),Ee.attachMedia(r.value)}else l.value.source={type:"video",sources:[{src:se.url,type:"video/mp4"}]}}function ae(){const se=document.querySelector(".plyr__video-wrapper");return se&&(_.value=se.getBoundingClientRect()),()=>{l.value.duration>0&&(l.value.currentTime=T.value.startTime||0,l.value.muted=!1,l.value.play(),e("video-play",T.value))}}function oe(){return Ce(),()=>{T.value.currentTime=l.value.currentTime,T.value.progress=(l.value.currentTime-T.value.startTime)/T.value.duration*100,(l.value.currentTime-T.value.startTime)/T.value.duration*100===0?Z()&&(m.value=!0):Z()&&(m.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!Z()&&(E.value.style="display: none",b.value="100%"):E.value&&!Z()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ie())}}function ie(se=1){const Ee=c.value+se;Ee<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):de("right",T.value):Ee===d.value.length?t.isLastGameStories?q():de("left",T.value):(c.value=Ee,se===1&&(p.value=c.value))}function ce(){u.value>f.value?de("left",T.value):u.value<f.value?de("right",T.value):Q()}function de(se,Ee){e("last-story-index",p.value),e("swipe",{direction:se,currentPlay:Ee})}function Q(){const se=window.innerWidth/2,Ee=u.value<se,Te=T.value.progress;T.value.progress=Ee?0:100,l.value.pause(),e("video-next-back",{eventName:Ee?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ie(Ee?-1:1)}function q(){l.value.pause(),l.value.muted=!0,e("last-story-index",p.value),e("close",T.value)}function he(se){u.value=se.changedTouches?se.changedTouches[0].clientX:se.clientX}function J(se){f.value=se.changedTouches?se.changedTouches[0].clientX:se.clientX,ce()}function Z(){return/iPhone|iPad/i.test(navigator.userAgent)}function ue(){window.scrollTo(0,100)}function ge(){if(window.scrollTo(0,100),Wo()=="android"){const se=document.querySelector("#stories");se.requestFullscreen(se)}}function Ce(){if(window.ResizeObserver)S.value=new window.ResizeObserver(()=>{C.value&&_.value.height>0&&(C.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",C.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),S.value.observe(C.value);else throw new Error("Resize observer not supported!")}return n.onMounted(()=>{g.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),Z()?(window.addEventListener("resize",ue),ue()):(window.addEventListener("orientationchange",ge),ge()),setTimeout(()=>{Ce()},500)}),n.onBeforeUnmount(()=>{window.scrollTo(0,g.value),Z()?window.removeEventListener("resize",ue):(Wo()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ge)),S.value&&(S.value.disconnect(),S.value=null)}),(se,Ee)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stories",Z()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:C,style:n.normalizeStyle(B.value)},[n.createElementVNode("div",{class:n.normalizeClass(["stories__close",Z()?"stories-safe-areas-iphone":""]),onClick:q},xP,2),n.createElementVNode("div",vP,[n.createElementVNode("div",AP,[n.createElementVNode("div",LP,[n.createElementVNode("div",{class:"circle-item-home",style:n.normalizeStyle(`background-image: url(${T.value.thumbnail.logoHomeTeam})`)},null,4),n.createElementVNode("div",{class:"circle-item-away",style:n.normalizeStyle(`background-image: url(${T.value.thumbnail.logoAwayTeam})`)},null,4)]),n.createElementVNode("div",IP,n.toDisplayString(T.value.header.label),1)]),n.createElementVNode("div",{ref_key:"overlay",ref:h,class:"stories__content__overlay"},null,512),n.createElementVNode("div",RP,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(Te,Fe)=>(n.openBlock(),n.createElementBlock("div",{key:Fe,class:"stories__content__stories-bar__item"},[n.createElementVNode("div",{class:"stories__content__stories-bar__item__progress",style:n.normalizeStyle({width:`${Te.progress}%`})},null,4)]))),128))]),n.createElementVNode("div",BP,[n.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[n.createElementVNode("div",NP,n.toDisplayString(T.value.date),1),n.createElementVNode("div",DP,n.toDisplayString(T.value.data),1)],512),n.createElementVNode("video",{ref_key:"player",ref:r,id:"video-plyr",controls:"",preload:"auto","data-setup":"{}",playsinline:""},null,512)])]),R.value?(n.openBlock(),n.createElementBlock("button",{key:0,id:"btn_play_ios",style:n.normalizeStyle(m.value?"display:block":"display:none"),onClick:L},null,4)):n.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-d3c9a398"]]),OP={playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00-PI-0",last_played_index:0,group_id:"1",total_plays:55,playlist_type:"1",group_playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00",user_id:"goltesting",created_at:"2023-03-30T15:42:36.402+00:00",playlist:[[136731235,"Liga MX","Apertura 2022",69929,"Aldrete Rodriguez, Adrian","Quintero Huitron, Daniel","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-17T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",1259,1278,20,1266,"https://golstatsbets.blob.core.windows.net/video-player/69929_1.mp4"],[139820484,"Liga MX","Apertura 2022",70042,"Davila Zavala, Victor","Mejia, Oscar ","Estadio Nuevo Monumental, Rafaela.","3 - 1","1 - 0","2022-09-18T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",12,"Goals",1501,1524,24,1512,"https://golstatsbets.blob.core.windows.net/video-player/70042_1.mp4"],[139566427,"Liga MX","Apertura 2022",69989,"Zaldivar Caviedes, Angel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","1 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png",12,"Goals",6569,6588,108,6576,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[139441913,"Liga MX","Apertura 2022",70031,"Vega Rojas, Alexis","Quintero Huitron, Daniel","Estadio Akron, Zapopan.","1 - 0","1 - 0","2022-09-10T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png",12,"Goals",6207,6237,103,6225,"https://golstatsbets.blob.core.windows.net/video-player/70031_1.mp4"],[139566063,"Liga MX","Apertura 2022",69989,"Guzman Palomeque, Nahuel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","0 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png",39,"Saves",2554,2573,41,2561,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[138276096,"Liga MX","Apertura 2022",69983,"Cortizo de la Piedra, Jordi","Guerrero Ramirez, Fernando","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-08-16T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",5020,5046,83,5034,"https://golstatsbets.blob.core.windows.net/video-player/69983_1.mp4"],[139285589,"Liga MX","Apertura 2022",70021,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-09-07T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png",12,"Goals",1123,1152,18,1140,"https://golstatsbets.blob.core.windows.net/video-player/70021_1.mp4"],[139294964,"Liga MX","Apertura 2022",70022,"Cordova Reyes, Francisco","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","1 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",2564,2583,41,2571,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137782451,"Liga MX","Apertura 2022",69968,"Orrantia Trevino, Carlos","Macias Romo, Oscar","Estadio TSM Corona, Torre&oacute;n.","4 - 0","1 - 0","2022-08-06T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",4662,4693,77,4681,"https://golstatsbets.blob.core.windows.net/video-player/69968_1.mp4"],[136551560,"Liga MX","Apertura 2022",69924,"Sanchez Guerrero, Richard","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-13T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",7032,7064,116,7052,"https://golstatsbets.blob.core.windows.net/video-player/69924_1.mp4"],[136391881,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","1 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",12,"Goals",4903,4937,81,4925,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[138158049,"Liga MX","Apertura 2022",69979,"Volpi, Tiago Luis","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",39,"Saves",7207,7226,119,7214,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[138124884,"Liga MX","Apertura 2022",69978,"Vargas Gil, Camilo","Ortiz Nava, Marco Antonio","Default","1 - 1","0 - 0","2022-08-13T05:00:00.000Z","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",39,"Saves",6080,6099,100,6087,"https://golstatsbets.blob.core.windows.net/video-player/69978_1.mp4"],[139635463,"Liga MX","Apertura 2022",69950,"Fidalgo Fernandez, Alvaro","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",10,"Assists",7096,7123,118,7111,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139769221,"Liga MX","Apertura 2022",70039,"Ochoa Magana, Guillermo","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-17T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png",39,"Saves",4567,4586,76,4574,"https://golstatsbets.blob.core.windows.net/video-player/70039_1.mp4"],[139405626,"Liga MX","Apertura 2022",70028,"Acevedo Lopez, Carlos","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 2","2022-09-10T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",55,"Goals",7452,7471,124,7459,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139410464,"Liga MX","Apertura 2022",70030,"Gonzalez Vela Alvizu, Julio","Hernandez Gomez, Fernando","Estadio Nemesio Diez, Toluca.","2 - 2","0 - 1","2022-09-10T05:00:00.000Z","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png",55,"Goals",7467,7486,124,7474,"https://golstatsbets.blob.core.windows.net/video-player/70030_1.mp4"],[139902797,"Liga MX","Apertura 2022",70038,"Quinones Quinones, Julian","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",702,"Con enfrentamiento",2334,2353,38,2341,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[139771860,"Liga MX","Apertura 2022",70038,"Andrada, Esteban ","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",39,"Saves",6859,6878,113,6866,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[136392028,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","0 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",607,"Oportunidad de gol",335,374,5,342,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[136467302,"Liga MX","Apertura 2022",69909,"Jurado Roca, Sebastian","Mejia, Oscar ","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 3","0 - 0","2022-07-02T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",39,"Saves",879,898,14,886,"https://golstatsbets.blob.core.windows.net/video-player/69909_1.mp4"],[138402354,"Liga MX","Apertura 2022",69990,"Beltran Cruz, Fernando","Mejia, Oscar ","Estadio Victoria, Aguascalientes.","0 - 4","0 - 1","2022-08-19T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Guadalajara","https://az755631.vo.msecnd.net/teams-80/1.png",12,"Goals",4517,4551,75,4539,"https://golstatsbets.blob.core.windows.net/video-player/69990_1.mp4"],[138157481,"Liga MX","Apertura 2022",69979,"Meneses Villarroel, Jean","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",1900,1925,31,1913,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[140106188,"Liga MX","Apertura 2022",69964,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 1","1 - 0","2022-09-23T05:00:00.000Z","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png",12,"Goals",461,484,7,472,"https://golstatsbets.blob.core.windows.net/video-player/69964_1.mp4"],[139839994,"Liga MX","Apertura 2022",70043,"Garcia Carpizo, Brian","Montano Robles, Diego","Estadio Caliente, Tijuana.","1 - 1","0 - 1","2022-09-18T05:00:00.000Z","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",2112,2133,34,2121,"https://golstatsbets.blob.core.windows.net/video-player/70043_1.mp4"],[139403868,"Liga MX","Apertura 2022",70028,"Suarez, Leonardo Gabriel","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 1","2022-09-10T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",4296,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139371616,"Liga MX","Apertura 2022",70027,"Gallardo Vasconcelos, Jesus","Montano Robles, Diego","Estadio Olimpico Benito Juarez, Ciudad Juarez.","0 - 1","0 - 1","2022-09-09T05:00:00.000Z","FC Juarez","https://az755631.vo.msecnd.net/teams-80/3014.png","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png",12,"Goals",5724,5750,94,5738,"https://golstatsbets.blob.core.windows.net/video-player/70027_1.mp4"],[139294028,"Liga MX","Apertura 2022",70022,"Thauvin, Florian","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","2 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Toluca","https://az755631.vo.msecnd.net/teams-80/18.png",12,"Goals",6011,6030,99,6018,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137023432,"Liga MX","Apertura 2022",69939,"Gignac, Andre Pierre","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 0","1 - 0","2022-07-23T05:00:00.000Z","Tigres de la UANL","https://az755631.vo.msecnd.net/teams-80/16.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",12,"Goals",2829,2854,47,2842,"https://golstatsbets.blob.core.windows.net/video-player/69939_1.mp4"],[139303531,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",702,"Con enfrentamiento",262,293,3,278,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139303334,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://az755631.vo.msecnd.net/teams-80/11.png","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png",10,"Assists",5256,5283,87,5271,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139633795,"Liga MX","Apertura 2022",69950,"Valdes Contreras, Diego","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",607,"Oportunidad de gol",675,701,10,689,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139242728,"Liga MX","Apertura 2022",70020,"Valdes Contreras, Diego","Caceres Hernandez, Victor Alfonso","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 0","0 - 0","2022-09-06T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",10,"Assists",2841,2861,46,2849,"https://golstatsbets.blob.core.windows.net/video-player/70020_1.mp4"],[138747150,"Liga MX","Apertura 2022",7e4,"Valdes Contreras, Diego","Miranda Galindo, Erick Yair","Default","1 - 3","0 - 1","2022-08-26T05:00:00.000Z","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",2425,2448,39,2436,"https://golstatsbets.blob.core.windows.net/video-player/70000_1.mp4"],[138462163,"Liga MX","Apertura 2022",69995,"Valdes Contreras, Diego","Santander, Luis Enrique","Estadio Azteca, Ciudad de M&eacute;xico.","7 - 0","1 - 0","2022-08-20T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",3424,3443,56,3431,"https://golstatsbets.blob.core.windows.net/video-player/69995_1.mp4"],[138832474,"Liga MX","Apertura 2022",70005,"Sambueza, Rubens Oscar","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 1","2022-08-28T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",12,"Goals",6830,6859,113,6847,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"],[137178428,"Liga MX","Apertura 2022",69942,"Ibarra Mina, Alex Renato","Montano Robles, Diego","Estadio Jalisco, Guadalajara.","1 - 2","0 - 1","2022-07-26T05:00:00.000Z","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png",12,"Goals",2786,2811,45,2799,"https://golstatsbets.blob.core.windows.net/video-player/69942_1.mp4"],[138339473,"Liga MX","Apertura 2022",69985,"Canelo, Pedro Alexis","Referee 1","Azteca","1 - 2","0 - 0","2022-08-17T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Club Tijuana","https://az755631.vo.msecnd.net/teams-80/17.png",10,"Assists",5133,5159,85,5147,"https://golstatsbets.blob.core.windows.net/video-player/69985_1.mp4"],[136701989,"Liga MX","Apertura 2022",69927,"Gimenez, Santiago Tomas","Macias Romo, Oscar","Estadio Jalisco, Guadalajara.","3 - 2","0 - 1","2022-07-16T05:00:00.000Z","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png",12,"Goals",1374,1397,22,1385,"https://golstatsbets.blob.core.windows.net/video-player/69927_1.mp4"],[139678329,"Liga MX","Apertura 2022",70049,"Antuna Romero, Carlos","Ortiz Nava, Marco Antonio","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-15T05:00:00.000Z","Cruz Azul","https://az755631.vo.msecnd.net/teams-80/5.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",10,"Assists",6728,6752,111,6740,"https://golstatsbets.blob.core.windows.net/video-player/70049_1.mp4"],[139054131,"Liga MX","Apertura 2022",70010,"Davila Zavala, Victor","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 1","2022-09-02T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",6636,6661,110,6649,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137503273,"Liga MX","Apertura 2022",69962,"Davila Zavala, Victor","Macias Romo, Oscar","Estadio Nou Camp, Le&ocuate;n.","3 - 2","1 - 0","2022-07-31T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",1940,1965,31,1953,"https://golstatsbets.blob.core.windows.net/video-player/69962_1.mp4"],[139308851,"Liga MX","Apertura 2022",70025,"Benedetti Roa, Nicolas","Hernandez Gomez, Fernando","Default","1 - 0","1 - 0","2022-09-07T05:00:00.000Z","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png","Atlas","https://az755631.vo.msecnd.net/teams-80/4.png",12,"Goals",1867,1891,31,1879,"https://golstatsbets.blob.core.windows.net/video-player/70025_1.mp4"],[138116335,"Liga MX","Apertura 2022",69976,"Benedetti Roa, Nicolas","Galvan Basulto, Eduardo","Estadio Nou Camp, Le&ocuate;n.","0 - 3","0 - 1","2022-08-13T05:00:00.000Z","Leon","https://az755631.vo.msecnd.net/teams-80/173.png","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png",12,"Goals",591,629,9,617,"https://golstatsbets.blob.core.windows.net/video-player/69976_1.mp4"],[136791022,"Liga MX","Apertura 2022",69932,"Benedetti Roa, Nicolas","Camacho Peregrina, Jorge","Estadio Hidalgo, Pachuca.","1 - 1","0 - 1","2022-07-18T05:00:00.000Z","Pachuca","https://az755631.vo.msecnd.net/teams-80/9.png","Mazatlan FC","https://az755631.vo.msecnd.net/teams-80/8.png",12,"Goals",4284,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/69932_1.mp4"],[139414938,"Liga MX","Apertura 2022",70026,"Batista Ochoa, Facundo","Guerrero Ramirez, Fernando","Estadio Victoria, Aguascalientes.","1 - 2","1 - 0","2022-09-10T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","America","https://az755631.vo.msecnd.net/teams-80/2.png",12,"Goals",461,490,7,478,"https://golstatsbets.blob.core.windows.net/video-player/70026_1.mp4"],[139051051,"Liga MX","Apertura 2022",70010,"Batista Ochoa, Facundo","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 0","2022-09-02T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",2731,2750,45,2738,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137828273,"Liga MX","Apertura 2022",69970,"Batista Ochoa, Facundo","Galvan Basulto, Eduardo","Estadio Alfonso Lastras Ram&iacute;rez, San Luis Potos&iacute;.","1 - 2","0 - 1","2022-08-07T05:00:00.000Z","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",849,870,13,858,"https://golstatsbets.blob.core.windows.net/video-player/69970_1.mp4"],[139025773,"Liga MX","Apertura 2022",70009,"Nahuelpan Osten, Ariel","Lopez Penuelas, Ismael","Estadio La Corregidora, Quer&eacute;taro.","1 - 1","1 - 0","2022-09-01T05:00:00.000Z","Queretaro","https://az755631.vo.msecnd.net/teams-80/12.png","Puebla FC","https://az755631.vo.msecnd.net/teams-80/10.png",12,"Goals",1454,1481,24,1472,"https://golstatsbets.blob.core.windows.net/video-player/70009_1.mp4"],[138063913,"Liga MX","Apertura 2022",69973,"Gonzalez Gonzalez, Arturo","Pacheco Larios, Guillermo","Estadio Victoria, Aguascalientes.","1 - 2","0 - 1","2022-08-12T05:00:00.000Z","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png",12,"Goals",6119,6138,101,6126,"https://golstatsbets.blob.core.windows.net/video-player/69973_1.mp4"],[137780455,"Liga MX","Apertura 2022",69966,"Gonzalez Gonzalez, Arturo","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","5 - 1","1 - 0","2022-08-06T05:00:00.000Z","Rayados de Monterrey","https://az755631.vo.msecnd.net/teams-80/7.png","Leon","https://az755631.vo.msecnd.net/teams-80/173.png",12,"Goals",2292,2321,38,2309,"https://golstatsbets.blob.core.windows.net/video-player/69966_1.mp4"],[140090831,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",585,612,9,600,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[140090832,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://az755631.vo.msecnd.net/teams-80/2.png","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png",12,"Goals",1175,1197,18,1182,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139227464,"Liga MX","Apertura 2022",70018,"Suarez, Leonardo Gabriel","Quintero Huitron, Daniel","Estadio TSM Corona, Torre&oacute;n.","3 - 1","1 - 0","2022-09-06T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","Necaxa","https://az755631.vo.msecnd.net/teams-80/205.png",12,"Goals",7011,7034,116,7022,"https://golstatsbets.blob.core.windows.net/video-player/70018_1.mp4"],[138830649,"Liga MX","Apertura 2022",70005,"Suarez, Leonardo Gabriel","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 0","2022-08-28T05:00:00.000Z","Santos Laguna","https://az755631.vo.msecnd.net/teams-80/14.png","CA San Luis","https://az755631.vo.msecnd.net/teams-80/13.png",12,"Goals",4297,4380,71,4304,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"]]},FP=new Map([[1,45],[2,90],[3,105],[4,120]]),MP=[{id:12,name:"Gol"},{id:55,name:"Gol"},{id:39,name:"Atajada"},{id:10,name:"Asistencia"},{id:702,name:"1vs1 exitoso ofensivo"},{id:607,name:"Oportunidad de gol"}].reduce((s,e)=>(s.set(e.id,e.name),s),new Map);let xa=null,yi=null,bi="";const Ft=n6(),$P={components:{GSCSeasonSelect:iI,GSCTournamentSelect:OL,GSCGames:yv,GSCSlider:ea,GSCGridTeamsMatches:uy,GSCPlayersLanding:ly,GSCTops:gA,GSCTableCalendar:AC,DiscoverVideos:s6,CarouselFullScreen:lL,Stories:PP},setup(){const s=n.ref("landingref"),{elementSize:e}=H0(s);return{landingref:s,elementSize:e}},props:{currentSeasonId:{type:Number,default:0},isFemale:{type:Boolean,default:!1},showStories:{type:Boolean,default:!0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},privileges:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},tournamentsApiUrl:{type:String,default:""},defaultMediaPlayerSeason:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2}},data(){return{isPreviousDataLoaded:!1,imagesUrl:Ho(),roundAbbreviationByGameId:new Map,isCarouselFullScreenVisible:!1,isPlaySeeker:!1,keyupdate:0,carouselPlayerQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",defaultGameId:0,lastSeasonsIds:[],arrayGamesAdd:[],gamesPages:new Map,show_stories:!0,selectedRoundKeyIndex:0,currentStoriesLastIndex:0,selectedRoundKeyIndexVideo:0,selectedRound:"0",selectedRoundVideos:"0",isLeagueSelected:!1,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysGoals:[],currentTournamentGames:null,currentTournamentTeams:null,gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/",gamesUrl2:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",seasonSelected:{},seasonSelectedDropDowns:{},seasonsSelected:[],gamesAllStories:[],fullTournamentSchedule:{},tournamentSelected:{id:0},tournamentType:0,tournamentSelectedDropDowns:{seasons:[]},playersLength:0,nextRivalId:0,updateTableCalendar:0,loadDiscover:!1,hasNextRival:!1,resumeType:1,goalsType:2,is_public:!1,seasonsGamesMap:new Map,gamesOfTheDayPreMatchIds:new Set,seasonsForLiveGames:[],allLiveGames:[],storiesItems:[],currentStories:[],currentStoryIndex:null,isStoriesVisible:!1,seasonPlayersMap:new Map,currentTournaments:[]}},computed:{teamSelected(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament?0:this.user.team},isGenericLike(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament},isPlaySeekerAvailable(){return[34230,34178,34201].includes(this.user.id)},games(){if(!this.isGenericLike&&!this.isLeagueSelected)return this.fullTournamentSchedule;{const s=this.gamesPages.get(this.selectedRound);return s&&s[0]?s[0].sort((e,t)=>{let a=e.dateTimeMillis,i=t.dateTimeMillis;return e.is_live&&(a-=1e9),t.is_live&&(i-=1e9),a-i}):[]}},latestRound(){return this.userTeamGames&&this.userTeamGames.length&&this.fullTournamentScheduleFullGoals&&this.fullTournamentScheduleFullGoals.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals)},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},closestRoundVideos(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals,!0):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals,!0)},containerGridCalendarTable(){return this.elementSize.width<=1e3?"container-grid-calendar-table-mobile":"container-grid-calendar-table"},containerbackground(){return this.elementSize.width<=680?"container-background-movil":"container-background"},containerdata(){return this.elementSize.width<=680?"container-data-movil":"container-data"}},watch:{games:{immediate:!0,deep:!0,async handler(s){if(s&&s.length>0){if(!this.seasonsSelected.length)return;for(let t=0;t<s.length;t++){const a=this.gamesAllStories.findIndex(i=>i.game_id===s[t].game_id);a!==-1&&(this.gamesAllStories[a].is_live=s[t].is_live,this.gamesAllStories[a].game_status=s[t].game_status)}const e=s.filter(t=>t.is_live);for(let t=0;t<e.length;t++){const a=this.gamesAllStories.findIndex(i=>i.game_id===e[t].game_id);if(a!==-1)this.gamesAllStories[a].score=e[t].score;else{this.gamesAllStories.push(e[t]),this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let i=[];for(let o=0;o<this.gamesAllStories.length;o++)this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)===-1?i.push({game_id:this.gamesAllStories[o].game_id,last_index:0,status:1}):i.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[o].game_id)].status});this.arrayGamesAdd=i,await ve.post(bi,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let o=0;o<this.arrayGamesAdd.length;o++)this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)].index=this.arrayGamesAdd[o].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[o].game_id)].status_storie=this.arrayGamesAdd[o].status)}}}}},"allLiveGames.length":{handler(s){s.length===0&&this.resetGamesLiveInterval()}},privileges:{immediate:!0,deep:!0,async handler(s){this.is_public=s!==null}},team:{immediate:!0,deep:!0,async handler(s){s&&this.seasonsSelected.length&&setTimeout(()=>{this.fetchGames(s,this.seasonsSelected)},1e3)}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},latestRound(s){this.selectedRoundKeyIndexVideo=this.tournamentScheduleKeysGoals.findIndex(e=>e===s),this.selectedRoundVideos=s},isCarouselFullScreenVisible:{handler(s){document.getElementsByTagName("html")[0].style.overflow=s?"hidden":"auto"},immediate:!0}},methods:{getOnlyGamesWithGoals(s){return Object.entries(s).reduce((e,[t,a])=>{const i=a.reduce((o,r)=>{const l=r.games.filter(d=>(d.is_live||d.game_status!==4)&&d.score[0]+d.score[1]>0);return l.length&&o.push({...r,games:l}),o},[]);return i.length&&(e[t]=i),e},{})},async onClickPlaySeeker(){try{const e=await(await fetch("https://rhev2kbe0a.execute-api.us-east-2.amazonaws.com/qa/demo/playseeker")).json();this.formatPlaySeekerPlays(e.data||OP)}catch(s){console.error(s)}},formatPlaySeekerPlays(s){let e=[];s&&s.playlist&&s.playlist.length&&(e=s.playlist.reduce((a,i,o)=>{const l={...Object.entries(Ft).reduce((f,[p,m])=>(f[p]=i[m],f),{}),isPlaySeeker:!0,startSeconds:i[Ft.startTime],endSeconds:i[Ft.endTime],totalSeconds:Math.floor(i[Ft.endTime]-i[Ft.startTime]),payloadData:{play_id:i[Ft.playId],total_plays:s.total_plays,play_number:o+1,group_playlist_id:s.group_playlist_id,playlist_id:s.playlist_id,group_id:s.group_id,moment_of_play:i[Ft.momentOfPlay],play_type:i[Ft.categoryId],viewer_second_start:Math.floor(i[Ft.startTime]),intended_second_start:Math.floor(i[Ft.startTime]),intended_second_end:Math.floor(i[Ft.endTime]),latitude_of_user:null,longitude_of_user:null}},[d,c]=l.playerName.split(","),h=d.split(" ");let u="";for(const f of h)if(u+=` ${f}`,f.length>3)break;if(l.playerShortName=c&&d?`${c.trim().charAt(0)}.${u}`:"",!l.mainCategoryName){const[f,p]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(p)]}return l.categoryName=MP.get(l.categoryId),a.push(l),a},[]));let t=[];t=e,this.carouselPlayerQueue=t,this.isPlaySeeker=!0,this.isCarouselFullScreenVisible=!0},formatUsername(s){const e=s.split(",");let t="",a="";return e[1]?(a=e[1].trim().split(" "),a[0]?t=a[0]:t=e[1]):e[0]&&(a=e[0].trim().split(" "),a[0]?t=a[0]:t=e[0]),t.trim()},async fetchGameEvents(s){try{return(await ve.get(`${this.gameEventsUrl}${s}`,{headers:{Authorization:`${this.token}`}})).data}catch(e){throw new Error(e)}},async fetchLiveGames(){try{if(this.seasonsForLiveGames.length===0)return[];const s=this.seasonsForLiveGames.reduce((a,i)=>`${a}seasons=${i}&`,""),e=ve.create({headers:{Authorization:`${this.token}`}}),{data:t}=await e.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${s}`);return t}catch(s){throw new Error(s)}},async onClickOpenCarouselVideos(s){try{this.isPlaySeeker=!1;const t=(await this.fetchGameEvents(s)).plays;this.carouselPlayerQueue=t.filter(a=>a.event_type_id===1&&a.video_link!=="-"),this.isCarouselFullScreenVisible=!0}catch(e){throw new Error(e)}},onChangeMatchDayGames(s){this.selectedRound!==s.key&&(this.selectedRound=s.key)},onClickStory({item:s,index:e}){this.openStory(e),this.onClickStories(s)},onClickLive(){const s=this.allLiveGames[0];if(s){const e=this.seasonsGamesMap.get(s.game_id);e&&(this.selectedRound=e.roundAbbreviationV2)}},onClickCloseCarousel(){this.carouselPlayerQueue=[],this.isPlaySeeker=!1,this.isCarouselFullScreenVisible=!1},onChangeIsLeagueSelected(s){this.isLeagueSelected=s},onAction(s){this.$emit("action",s)},onOpenMedia(s){s.type===1&&s.gameIds&&s.gameIds.length>0?this.onClickOpenCarouselVideos(s.gameIds[0]):this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)},onClickMatch(s){this.$emit("openGame",s)},onClickCalendar(){const s={type:this.isGenericLike||this.isLeagueSelected?0:1,team:this.team,season:this.seasonSelected.id};this.$emit("onClickMyCalendar",s)},moreTops(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openTops",s)},clickProfileBtn(s){this.$emit("openProfile",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},clickCard(s){const e={data:s,isPlayer:this.isplayer};this.$emit("clickOnMainCards",e)},async fetchGames(s,e){const t=e.map(i=>`seasons=${i.id}`).join("&"),a=ve.create({headers:{Authorization:`${this.token}`}});this.fullTournamentSchedule=await a.get(this.gamesUrl+s+"?"+t),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch&&(this.fullTournamentSchedule.data.prematch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.prematch.game_id)),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.postmatch&&(this.fullTournamentSchedule.data.postmatch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.postmatch.game_id)),this.nextRivalId=Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,this.loadDiscover=!0},generateSeasons(s){const e=[{id:s.id,type:s.type}];return s.related_seasons&&s.related_seasons.length&&e.push(...s.related_seasons.map(t=>({id:t.id,type:t.type}))),e},async onInputTournament(s){this.tournamentSelected=s,this.tournamentType=s.tournament_type,this.tournamentSelected.id&&this.tournamentSelected.id!==s.id&&(this.updateTableCalendar+=1),this.tournamentSelectedDropDowns.id!==s.id&&(this.tournamentSelectedDropDowns=s)},getSeasonDependentPromises({season:s,seasons:e}){const t={headers:{Authorization:`${this.token}`}},a=[ve.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${s.id}`,t)];a.push(this.fetchSeasonsGamesAndTeams(e.map(o=>o.id),3)),a.push(this.fetchStoriesPlays(s));const i=`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${s.id}/stories`;return i!==bi&&(bi=i,a.push(ve.get(bi,t))),a},async onInputSeason(s){try{if(this.seasonSelected.id!==s.id){this.isPreviousDataLoaded=!1,this.seasonSelected=s,this.seasonsSelected=this.generateSeasons(s);const e=this.getSeasonDependentPromises({season:s,seasons:this.seasonsSelected,retries:3,createdUrl:""}),[t,a,i,o]=await Promise.all(e);this.seasonPlayersMap=new Map,t.data&&t.data.players&&t.data.players.forEach(r=>{this.seasonPlayersMap.set(r.player_id,r)}),o&&o.data?this.arrayGamesAdd=o.data.stories.stories:this.arrayGamesAdd=[],this.resetGamesLiveInterval(),this.seasonSelected=s,this.show_stories=!!s.show_stories,this.seasonsForLiveGames=[s.id,...s.related_seasons.map(r=>r.id)],this.$emit("change-season-id",s.id),this.fillStoriesData(i,a.seasonsAndGames),await this.createFullTournamentScheme({seasons:this.seasonsSelected,seasonsAndGames:a.seasonsAndGames,seasonsAndTeams:a.seasonsAndTeams,applySeasonsValidation:!1}),this.team&&await this.fetchGames(this.team,this.seasonsSelected),this.keyupdate+=1}}catch(e){throw new Error(e)}},ordenarYFiltrarPartidos(s){const e=s.filter(t=>t.game_status===1||t.is_live==1||t.game_status==0);return e.sort((t,a)=>new Date(a.date_time_utc)-new Date(t.date_time_utc)),e.slice(0,18)},async fetchSeasonsGamesAndTeams(s,e,t=""){let a=t;try{const i=ve.create({headers:{Authorization:`${this.token}`}});a||(a=this.gamesUrl2,s.forEach((l,d)=>{a+=`${d===0?"":"&"}seasons=${l}`}));const{data:{data:o,teams:r}}=await i.get(a);return{seasonsAndGames:o,seasonsAndTeams:r}}catch(i){if(e>0)return this.fetchSeasonsGamesAndTeams(s,e-1,a);throw new Error(i)}},async fetchStoriesPlays(s){try{return await ve.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/"+s.id+"?categories=607&categories=608&categories=12&categories=55&categories=54&categories=35&categories=15&categories=53&type=1")}catch(e){throw new Error(e)}},fillStoriesData(s,e){let t=s.data?s.data.plays:[];this.gamesAllStories=[];for(let i=0;i<e.length;i++)this.gamesAllStories=this.gamesAllStories.concat(e[i].games);this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let a=[];for(let i=0;i<this.gamesAllStories.length;i++)this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)===-1?a.push({game_id:this.gamesAllStories[i].game_id,last_index:0,status:1}):a.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[i].game_id)].status});this.arrayGamesAdd=a;for(let i=0;i<this.arrayGamesAdd.length;i++)this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)].index=this.arrayGamesAdd[i].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[i].game_id)].status_storie=this.arrayGamesAdd[i].status);this.storiesItems=this.getStoriesStructureVideos(t),setTimeout(()=>{this.sendStoriesData()},1e3)},sendStoriesData(){ve.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}})},getTimeSeconds(s){const[e,t]=s.split(":"),[a,i]=t.split(".");return parseInt(e)*60+parseInt(a)+parseInt(i)/1e3},getPlayTime(s,e){let t="",a=0;switch(s[7]){case 1:t=s[11];break;case 2:t=s[13],a=45;break;case 3:t=s[15],a=90;break;case 4:t=s[17],a=105;break;case 5:t=s[19],a=120;break}return(!t||t==="0")&&(t="00:00"),this.getTimeToSeconds(t)+(this.getTimeToSeconds(s[e])-a*60)},abrirNuevaVentana(){window.open("https://goltipster.com/view-all#golTipster","_blank")},getTimeToSeconds(s){const t=s.indexOf(".")>-1?s.substring(0,s.indexOf(".")):s,[a,i,o]=t.split(":").reverse();return(o?Number(o)*60*60:0)+Number(i)*60+Number(a)},getStoriesStructureVideos(s){let e=[];for(let t=0;t<this.gamesAllStories.length;t++){let a=s.filter(r=>r[3]===this.gamesAllStories[t].game_id).map(r=>({playId:r[29],gameId:r[3],player:this.seasonPlayersMap.get(r[1]),categoryId:r[0],date:new Date(r[4]),url:r[35]==2?"https://daijvvc13prpy.cloudfront.net/golstats-videos/"+this.gamesAllStories[t].game_id+"_1/"+this.gamesAllStories[t].game_id+"_1.m3u8":"https://golstatsbets.blob.core.windows.net/video-player/"+this.gamesAllStories[t].game_id+"_1.mp4",type:"video",thumbnail:{logoHomeTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[t].home_team+".png",logoAwayTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[t].visiting_team+".png"},header:{label:this.gamesAllStories[t].home_team_acronym+" "+this.gamesAllStories[t].score[0]+":"+this.gamesAllStories[t].score[1]+" "+this.gamesAllStories[t].visiting_team_acronym+" "+this.gamesAllStories[t].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(r,9),endTime:this.getPlayTime(r,10),duration:Math.floor(this.getTimeSeconds(r[10])-this.getTimeSeconds(r[9]))}));const i={},o=a.filter(r=>i[r.playId]?!1:(i[r.playId]=!0,!0));e.push({game_id:this.gamesAllStories[t].game_id,stories:o})}return e},areSeasonsDifferent(s){for(const e of s)if(!this.lastSeasonsIds.includes(e.season_id))return!0;return!1},async createFullTournamentScheme({seasons:s,seasonsAndGames:e,seasonsAndTeams:t,applySeasonsValidation:a}){try{this.seasonsGamesMap=new Map,this.userTeamGames=[],this.userTeamGamesForVideos=[],this.gamesOfTheDayPreMatchIds.clear();let i=0;if(a&&this.areSeasonsDifferent(e))return;e.forEach(l=>{const d=s.find(c=>c.id===l.season_id);d&&(l.type=d.type,l.games.forEach(c=>{c.season_id=l.season_id}),d.type===0&&(i=l.season_id))});const o={seasonsGames:e},r=t.find(l=>l.season_id===i);if(r){const l=r.teams,d=[...o.seasonsGames],c=o&&o.seasonsGames?o.seasonsGames.map(u=>{const f=u.games.reduce((p,m)=>{const g={...m},y=new Date,[b,S,_]=g.date.split("-"),[C,E,v]=g.schedule.split(":"),T=new Date(Number(b),Number(S)-1,Number(_),Number(C),Number(E),Number(v));return g.dateTimeMillis=T.valueOf(),g.home_team=l.find(B=>B.team_id===m.home_team),g.visiting_team=l.find(B=>B.team_id===m.visiting_team),g.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(g.game_id),this.seasonsGamesMap.set(g.game_id,g),p[m.matchday_abbreviation]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(g):p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[g]:p[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[g]},this.gsData&&this.gsData.teamId&&g.game_status===4&&(g.home_team.team_id===this.gsData.teamId||g.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(g),g.score&&g.score[0]+g.score[1]>0&&this.userTeamGamesForVideos.push(g)),p},{});this.userTeamGames.sort((p,m)=>p.dateTimeMillis-m.dateTimeMillis);for(let[p,m]of Object.entries(f))f[p]=Object.entries(m).map(([g,y])=>({date:g,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:u.type,weight:u.type===0?0:u.type===2?1:2,schedule:f}}):[],h=o&&o.seasonsGames?d.map(u=>{const f=u.games.reduce((p,m)=>{const g={...m};return g.dateTimeMillis=new Date(g.date_time_utc).valueOf(),g.home_team=l.find(y=>y.team_id===m.home_team),g.visiting_team=l.find(y=>y.team_id===m.visiting_team),p[m.matchday_abbreviation]?p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(g):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[g]):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[g]}),p},{});this.userTeamGames.sort((p,m)=>p.dateTimeMillis-m.dateTimeMillis);for(let[p,m]of Object.entries(f))f[p]=Object.entries(m).map(([g,y])=>({date:g,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:u.type,weight:u.type===0?0:u.type===2?1:2,schedule:f}}):[];c.sort((u,f)=>u.weight-f.weight),this.fullTournamentScheduleFull=c.reduce((u,f)=>{for(const[p,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Fu.get(this.tournamentType);if(g){const y=g.get(p);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?u[Ou[g]||y]=m:u[Pu[p]||y]=m}else u[Number(p.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(p)?u[p]=m:u[`R${Number(p.replace("PO",""))}`]=m:f.type===1&&(u[Du[p]]=m);return u},{}),this.fullTournamentScheduleFullGoals=h.reduce((u,f)=>{for(const[p,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Fu.get(this.tournamentType);if(g){const y=g.get(p);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?u[Ou[g]||y]=m:u[Pu[p]||y]=[]}else u[Number(p.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(p)?u[p]=m:u[`R${Number(p.replace("PO",""))}`]=m:f.type===1&&(u[Du[p]]=m);return u},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((u,[f,p])=>{const m=Number(f);let g="";Number.isNaN(m)?g=f:g=m<10?`0${m}`:f;let y=!1,b=null;const S=p.reduce((C,E)=>(!b&&E&&E.games&&E.games.length&&(b=E.games[0].matchday_id),E.games.forEach(v=>{this.roundAbbreviationByGameId.set(v.game_id,f),v.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`,v.roundAbbreviationV2=f}),C=C.concat(E.games),C),[]);for(let C=0;C<S.length;C++)(S[C].game_status!=4||S[C].is_live)&&(S[C].score[0]!=0||S[C].score[1]!=0)&&(y=!0);u.set(f,{key:f,value:m,valueText:g,avaible:y,matchDayId:b});const _=this.getPages(S);return this.gamesPages.set(f,_),u},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((u,[f,p])=>{const m=Number(f);let g="";Number.isNaN(m)?g=f:g=m<10?`0${m}`:f;let y=!1;const b=p.reduce((S,_)=>(_.games.forEach(C=>{C.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`}),S=S.concat(_.games),S),[]);for(let S=0;S<b.length;S++)(b[S].game_status!=4||b[S].is_live&&(b[S].score[0]!=0||b[S].score[1]!=0))&&(y=!0);return u.set(f,{key:f,value:m,valueText:g,avaible:y}),u},new Map).values())}setTimeout(()=>{this.isPreviousDataLoaded=!0,this.checkLiveGames(),this.gamesOfTheDayPreMatchIds.size&&this.createGameOfTheDayTimeouts()},500)}catch(i){throw new Error(i)}finally{this.loadingFlag=!1}},createGameOfTheDayTimeouts(){this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.forEach(s=>{const e=this.seasonsGamesMap.get(s);if(e){const t=new Date().valueOf();if(60*1e3*30+e.dateTimeMillis-t>0){const i=e.dateTimeMillis-t-3e5;setTimeout(()=>{this.createCheckLiveGamesInterval()},i>0?i:0)}}})},resetCheckGamesLiveInterval(){clearInterval(yi),yi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),yi||(yi=setInterval(()=>{this.checkLiveGames()},this.checkLiveGamesIntervalMinutes*60*1e3))},async checkLiveGames(){try{const s=await this.fetchLiveGames(),e=new Set;if(this.allLiveGames=s.data.reduce((t,a)=>(a.games.forEach(i=>{e.add(i.game_id),t.push(i)}),t),[]),this.allLiveGames.length){xa||await this.fillGameEvents();const t=[];this.gamesOfTheDayPreMatchIds.forEach(a=>{const i=this.seasonsGamesMap.get(a);i&&new Date().valueOf()>i.dateTimeMillis&&t.push(a)}),t.length&&t.every(i=>this.seasonsGamesMap.get(i).isLiveTracked)&&this.resetCheckGamesLiveInterval()}}catch(s){throw new Error(s)}},createGamesEventsInterval(){this.resetGamesLiveInterval(),xa=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(xa),xa=null},removeGameIfFinished(s,e,t=!1){for(const a of e)if(a.category_id===0&&a.game_status_id===13)if(t)this.fetchGames(this.team,this.seasonsSelected);else{const i=this.seasonsGamesMap.get(a.game_id);this.allLiveGames=this.allLiveGames.filter(o=>o.game_id!==s.game_id),i.is_live=0,i.game_status=0}},async fillGameEvents(){try{const s=[];let e=null;for(const a of this.allLiveGames){a.isLiveTracked=!0,this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.delete(a.game_id);const i=this.seasonsGamesMap.get(a.game_id);i&&(i.is_live=1,i.game_status=4),e=this.fullTournamentSchedule&&this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch?this.fullTournamentSchedule.data.prematch:null,e&&e.game_id===a.game_id&&(e.is_live=1,e.game_status=4),s.push(this.fetchGameEvents(a.game_id))}const t=await Promise.all(s);for(const a of t){const i=this.seasonsGamesMap.get(a.game_id);if(i){const o=FP.get(a.recent_lapse);i.currentTimeLive=o&&o<a.minute?`${o}' + ${a.minute-o}'`:`${a.minute}'`;const r=[Number(a.score[i.home_team.team_id.toString()])+Number(a.score[`own_${i.visiting_team.team_id.toString()}`]),Number(a.score[i.visiting_team.team_id.toString()])+Number(a.score[`own_${i.home_team.team_id.toString()}`])],l=r[0],d=r[1];i.score=[Number.isNaN(l)?0:l,Number.isNaN(d)?0:d],this.removeGameIfFinished(i,a.plays),e&&e.game_id===i.game_id&&(e.currentTimeLive=i.currentTimeLive,e.score=i.score,this.removeGameIfFinished(e,a.plays,!0))}}xa||this.createGamesEventsInterval()}catch(s){throw new Error(s)}},getPages(s){const e=[];if(this.gamesPerMatchDay>0){let t=[];s.forEach((a,i)=>{t.push(a),(i+1)%this.gamesPerMatchDay===0&&(e.push([...t]),t=[])}),t.length&&e.push([...t])}else e.push(s);return e},getNormalClosestRound(s,e=!1){const a=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(a).reduce((l,[d,c])=>(l[d]=[],c.forEach(h=>{h.games.forEach(u=>{const f=new Date(u.date_time_utc).getTime()+66e5;l[d].push(f)})}),l),{}));if(!i.length)return"1";const o=new Date().getTime(),r=i.reduce((l,[d,c])=>{let h=null;return c.forEach(u=>{const f=e?o-u:u-o;f>=0&&(h===null||f<h)&&(h=f)}),h&&(l.shortestTime===null||h<l.shortestTime)&&(l.round=d,l.shortestTime=h),l},{round:"",shortestTime:null});return r.shortestTime!==null?r.round:i[i.length-1][0]},getUserTeamClosestRound(s,e=!1){let t=1;const a=e?this.userTeamGamesForVideos:this.userTeamGames;if(a.length){const i=a[0];for(const[o,r]of Object.entries(s))for(const l of r)if(l.games.find(c=>c.game_id===i.game_id))return o}return t},async changeIndexStory(s){if(this.arrayGamesAdd.length>0){let e=-1,t=-1,a=-1;this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(e=this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(t=this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(a=this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)),e!=-1&&(this.gamesAllStories[t].is_live===1?this.storiesItems[a].stories.length-1==s&&this.storiesItems[a].stories.length>1?this.arrayGamesAdd[e].last_index=s-1:this.arrayGamesAdd[e].last_index=s:this.arrayGamesAdd[e].last_index=s),a!=-1&&this.arrayGamesAdd[e].status>0&&(this.arrayGamesAdd[e].status=s>=this.storiesItems[a].stories.length-1?0:1)}else{this.arrayGamesAdd=[];for(let e=0;e<this.storiesItems.length;e++)this.arrayGamesAdd.push({game_id:this.storiesItems[e].game_id,last_index:this.currentStories[0].gameId==this.storiesItems[e].game_id?s:0,status:this.currentStories[0].gameId==this.storiesItems[e].game_id&&s>=this.storiesItems[e].stories.length-1?0:1})}await ve.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let e=0;e<this.arrayGamesAdd.length;e++)this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)!=-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].index=this.arrayGamesAdd[e].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].status_storie=this.arrayGamesAdd[e].status)},async getLiveGamePlays(s){var a=(await ve.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/live/videos/plays/seasons/"+this.gamesAllStories[s].season_id+"/games/"+this.gamesAllStories[s].game_id)).data.plays.filter(l=>l[0]===607||l[0]===608||l[0]===12||l[0]===55||l[0]===54||l[0]===35||l[0]===15||l[0]===53);let i=a.map(l=>({playId:l[29],gameId:l[3],player:this.seasonPlayersMap.get(l[1]),categoryId:l[0],date:new Date(l[4]),url:"https://falconvideolive.blob.core.windows.net/video-hls-live/"+this.gamesAllStories[s].game_id+"/"+this.gamesAllStories[s].game_id+".m3u8",type:"video",thumbnail:{logoHomeTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[s].home_team+".png",logoAwayTeam:"https://az755631.vo.msecnd.net/teams-80/"+this.gamesAllStories[s].visiting_team+".png"},header:{label:this.gamesAllStories[s].home_team_acronym+" "+this.gamesAllStories[s].score[0]+":"+this.gamesAllStories[s].score[1]+" "+this.gamesAllStories[s].visiting_team_acronym+" "+this.gamesAllStories[s].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(l,9),endTime:this.getPlayTime(l,10),duration:Math.floor(this.getTimeSeconds(l[10])-this.getTimeSeconds(l[9]))}));const o={},r=i.filter(l=>o[l.playId]?!1:(o[l.playId]=!0,!0));this.storiesItems[s]={game_id:this.gamesAllStories[s].game_id,stories:r}},async openStory(s){const e={headers:{Authorization:`${this.token}`}},[t]=await Promise.all([ve.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/games/${this.gamesAllStories[s].game_id}`,e)]);t.data&&t.data.players.forEach(a=>{this.seasonPlayersMap.set(a.player_id,{dob:a.dob,first_name:a.first_name,jersey:a.jersey,last_name:a.last_name,name:a.name,player_name:a.name,nationality:a.nationality,nationality_id:a.nationality_id,nationality_photo:a.nationality_photo,photo:a.photo,player_id:a.player_id,position_id:a.position_id,short_name:a.short_name,team_id:a.team_id})}),this.gamesAllStories[s].is_live==1||this.gamesAllStories[s].game_status==0?(await this.getLiveGamePlays(s),setTimeout(()=>{this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index},100)):(this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index),setTimeout(()=>{this.isStoriesVisible=!0},150)},onCloseStories(s){this.currentStoriesLastIndex=0,this.isStoriesVisible=!1,this.$emit("event-posthog-stories",{event:"stories_cerrar",properties:{play_id:s?s.playId:null,game_id:s?s.gameId:null,category_id:s?s.categoryId:null,start_time:s?s.startTime:null,end_time:s?parseInt(s.currentTime):null,percentage_viewed:s?parseInt(s.progress):null}})},closeStories(){this.currentStoriesLastIndex=0,this.currentStoryIndex=null,this.currentStories=[]},onSwipeStories({direction:s,currentPlay:e}){s==="right"?(this.$emit("event-posthog-stories",{event:"stories_video_siguiente_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex>0&&this.openStory(this.currentStoryIndex-1)):(this.$emit("event-posthog-stories",{event:"stories_video_anterior_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex<this.storiesItems.length-1&&this.openStory(this.currentStoryIndex+1))},onClickNextBackVideo({eventName:s,currentPlay:e}){this.$emit("event-posthog-stories",{event:s,properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}})},onChangeTournaments(s){this.currentTournaments=s},onClickStories(s){this.$emit("event-posthog-stories",{event:"stories_ver_play",properties:{game_id:s.game_id}})},onVideoPlay(s){this.$emit("event-posthog-stories",{event:"stories_play",properties:{play_id:s.playId,game_id:s.gameId,category_id:s.categoryId,start_time:s.startTime,end_time:s.endTime,percentage_viewed:0}})}},async created(){},beforeUnmount(){this.resetGamesLiveInterval()}},Si=s=>(n.pushScopeId("data-v-4d47d079"),s=s(),n.popScopeId(),s),VP={class:"gsclanding",ref:"landingref"},UP={key:2,class:"play-seeker-image"},zP={class:"play-seeker-image__info"},GP=Si(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),jP={class:"play-seeker-image__info__legends-and-button"},HP=Si(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),WP={class:"play-icon"},KP=["src"],qP=Si(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),YP={class:"play-seeker-image__players"},JP=["src"],XP={key:3,class:"container-selectors-mobile"},ZP={class:"container-selectors-mobile-tournament"},QP={class:"container-selectors-mobile-season"},eO={key:0,class:"home-item-movil"},tO=Si(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),sO={class:"name-user-movil"},aO={key:1,class:"home-item"},nO={key:2,class:"bar-settings"},iO={class:"name-user"},oO={class:"container-selectors"},rO={class:"selector-tournament"},lO={class:"selector-seasons"},cO={key:3,class:"stories-circle-wrapper"},dO=["onClick"],hO={class:"story-result"},uO={key:0,class:"font-bold"},mO={key:1,class:"font-bold"},fO={class:"story-match"},pO={key:4,class:"container-games"},gO={key:6,class:"container-players"},yO={class:"container-tops"};function bO(s,e,t,a,i,o){const r=n.resolveComponent("Stories"),l=n.resolveComponent("CarouselFullScreen"),d=n.resolveComponent("GSCTournamentSelect"),c=n.resolveComponent("GSCSeasonSelect"),h=n.resolveComponent("GSCSlider"),u=n.resolveComponent("GSCGames");n.resolveComponent("DiscoverVideos");const f=n.resolveComponent("GSCGridTeamsMatches"),p=n.resolveComponent("GSCTableCalendar"),m=n.resolveComponent("GSCPlayersLanding"),g=n.resolveComponent("GSCTops");return n.openBlock(),n.createElementBlock("div",VP,[i.isStoriesVisible&&t.showStories?(n.openBlock(),n.createBlock(r,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:o.changeIndexStory,onClose:o.onCloseStories,onSwipe:o.onSwipeStories,onVideoNextBack:o.onClickNextBackVideo,onVideoPlay:o.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):n.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(n.openBlock(),n.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:o.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):n.createCommentVNode("",!0),o.isPlaySeekerAvailable?(n.openBlock(),n.createElementBlock("div",UP,[n.createElementVNode("div",zP,[GP,n.createElementVNode("div",jP,[HP,n.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[0]||(e[0]=(...y)=>o.onClickPlaySeeker&&o.onClickPlaySeeker(...y))},[n.createElementVNode("div",WP,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,KP)]),qP])])]),n.createElementVNode("div",YP,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,JP)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",XP,[n.createElementVNode("div",ZP,[n.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:o.onInputTournament,onChangeTournaments:o.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),n.createElementVNode("div",QP,[n.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:o.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerbackground)},[n.createElementVNode("div",{class:n.normalizeClass(o.containerdata)},[a.elementSize.width<=680?(n.openBlock(),n.createElementBlock("div",eO,[tO,n.createElementVNode("div",sO,[t.isFemale?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Bienvenida")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Bienvenido ")],64)),i.is_public?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createTextVNode("a GolStats ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createTextVNode(n.toDisplayString(o.formatUsername(t.user.name)),1)],64))])])):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",aO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",nO,[n.createElementVNode("div",iO,[t.isFemale?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Bienvenida")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Bienvenido ")],64)),i.is_public?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createTextVNode("a GolStats ")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createTextVNode(n.toDisplayString(o.formatUsername(t.user.name)),1)],64))]),n.createElementVNode("div",oO,[n.createElementVNode("div",rO,[n.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:o.onInputTournament,onChangeTournaments:o.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),n.createElementVNode("div",lO,[n.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:o.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):n.createCommentVNode("",!0),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",cO,[(n.openBlock(),n.createBlock(h,{key:i.keyupdate,height:"130px",pxScroll:86,scrollColor:"none",arrowsPosition:"absolute","background-color":"none",arrowsScrollHide:!0,arrowsHideOnNoScroll:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,42,0.1) 0%, rgba(13,29,42,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,42,0.1) 0%, rgba(13,29,42,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:n.withCtx(()=>[n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.gamesAllStories,(y,b)=>(n.openBlock(),n.createElementBlock("div",{key:b,class:"story-container-game",onClick:S=>o.onClickStory({item:y,index:b})},[n.createElementVNode("div",{class:"story-circle",style:n.normalizeStyle(y.is_live==1?(y.status_storie==1,"border: 2px solid #cbee6b !important;"):y.status_storie==1?"border: 2px solid #2248a2 !important;":"border: 2px solid #41485B !important;")},[n.createElementVNode("div",{class:"circle-item-home",style:n.normalizeStyle("background-image: url(https://az755631.vo.msecnd.net/teams-80/"+y.home_team+".png)")},null,4),n.createElementVNode("div",{class:"circle-item-away",style:n.normalizeStyle("background-image: url(https://az755631.vo.msecnd.net/teams-80/"+y.visiting_team+".png)")},null,4)],4),n.createElementVNode("div",hO,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+"  ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",uO,n.toDisplayString(isNaN(y.score[0])?0:y.score[0]),1)):n.createCommentVNode("",!0),n.createTextVNode(":"),y.score.length>0?(n.openBlock(),n.createElementBlock("span",mO,n.toDisplayString(isNaN(y.score[1])?0:y.score[1]),1)):n.createCommentVNode("",!0),n.createTextVNode("  "+n.toDisplayString(y.visiting_team_acronym),1)]),n.createElementVNode("div",fO,n.toDisplayString(y.matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")),1)],8,dO))),128))]),_:1}))])):n.createCommentVNode("",!0),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",pO,[n.createVNode(u,{"component-width":a.elementSize.width,isplayer:t.isplayer,"is-full":o.isGenericLike,data:o.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:o.onClickCalendar,onClickMatch:o.onClickMatch,onChangeMatchDay:o.onChangeMatchDayGames,onChangeIsLeagueSelected:o.onChangeIsLeagueSelected,onClickLive:o.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0),n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle(a.elementSize.width<748?"width: 100%":"")},[n.createVNode(f,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://az755631.vo.msecnd.net/teams-150/"+t.user.team+".png","player-img":"https://az755631.vo.msecnd.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://az755631.vo.msecnd.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://az755631.vo.msecnd.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!o.isGenericLike,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["isPlayer","player-id","team-id","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(p,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,key:i.updateTableCalendar,"team-id":o.teamSelected,componentWidth:a.elementSize&&a.elementSize.width?a.elementSize.width:0,tournaments:i.currentTournaments,onAction:o.onAction,onOnOpenProfile:o.onOpenProfile,onOpenmedia:o.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4)],2),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",gO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:o.clickProfileBtn,onViewAll:o.viewAll,onTotalPlayers:o.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):n.createCommentVNode("",!0)],512)),[[n.vShow,i.playersLength>0]]),n.createElementVNode("div",yO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{key:0,"tournament-selected":i.tournamentSelected,onMore:o.moreTops,"show-switch":!o.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:o.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):n.createCommentVNode("",!0)]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[1]||(e[1]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],512)}const SO=qe($P,[["render",bO],["__scopeId","data-v-4d47d079"]]);hs.GSCLanding=SO,Object.defineProperty(hs,Symbol.toStringTag,{value:"Module"})});