@golstats/gsc-landing 1.0.182 → 1.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/gsc-landing.js +2264 -2253
- package/dist/gsc-landing.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +51 -51
package/dist/gsc-landing.umd.cjs
CHANGED
|
@@ -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[_c]=this[_c]={accessors:{}}).accessors,i=this.prototype;function o(r){const l=oa(r);a[l]||(C0(i,r),a[l]=!0)}return D.isArray(e)?e.forEach(o):o(e),this}}mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),D.reduceDescriptors(mt.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),D.freezeMethods(mt);function Mi(s,e){const t=this||ia,a=e||t,i=mt.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 wc(s){return!!(s&&s.__CANCEL__)}function Ns(s,e,t){_e.call(this,s??"canceled",_e.ERR_CANCELED,e,t),this.name="CanceledError"}D.inherits(Ns,_e,{__CANCEL__:!0});function kc(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 x0(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function v0(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 g=h&&c-h;return g?Math.round(f*1e3/g):void 0}}function A0(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 Ua=(s,e,t=3)=>{let a=0;const i=v0(50,250);return A0(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)},Ec=(s,e)=>{const t=s!=null;return[a=>e[0]({lengthComputable:t,total:s,loaded:a}),e[1]]},Tc=s=>(...e)=>D.asap(()=>s(...e)),L0=ut.hasStandardBrowserEnv?function(){const e=ut.navigator&&/(msie|trident)/i.test(ut.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}}(),I0=ut.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 R0(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function B0(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Cc(s,e){return s&&!R0(e)?B0(s,e):e}const xc=s=>s instanceof mt?{...s}:s;function ps(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(xc(c),xc(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 vc=s=>{const e=ps({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=mt.from(r),e.url=gc(Cc(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(ut.hasStandardBrowserEnv||ut.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(ut.hasStandardBrowserEnv&&(a&&D.isFunction(a)&&(a=a(e)),a||a!==!1&&L0(e.url))){const c=i&&o&&I0.read(o);c&&r.set(i,c)}return e},N0=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(t,a){const i=vc(s);let o=i.data;const r=mt.from(i.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=i,h,u,f,g,m;function p(){g&&g(),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 w=mt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:s,request:y};kc(function(T){t(T),p()},function(T){a(T),p()},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 _e("Request aborted",_e.ECONNABORTED,s,y)),y=null)},y.onerror=function(){a(new _e("Network Error",_e.ERR_NETWORK,s,y)),y=null},y.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||bc;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),a(new _e(x,E.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,s,y)),y=null},o===void 0&&r.setContentType(null),"setRequestHeader"in y&&D.forEach(r.toJSON(),function(x,E){y.setRequestHeader(E,x)}),D.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),c&&([f,m]=Ua(c,!0),y.addEventListener("progress",f)),d&&y.upload&&([u,g]=Ua(d),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(h=w=>{y&&(a(!w||w.type?new Ns(null,s,y):w),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const S=x0(i.url);if(S&&ut.protocols.indexOf(S)===-1){a(new _e("Unsupported protocol "+S+":",_e.ERR_BAD_REQUEST,s));return}y.send(o||null)})},D0=(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 _e?h:new Ns(h instanceof Error?h.message:h))}};let r=e&&setTimeout(()=>{r=null,o(new _e(`timeout ${e} of ms exceeded`,_e.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}},P0=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},O0=async function*(s,e){for await(const t of F0(s))yield*P0(t,e)},F0=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()}},Ac=(s,e,t,a)=>{const i=O0(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})},Ga=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Lc=Ga&&typeof ReadableStream=="function",M0=Ga&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Ic=(s,...e)=>{try{return!!s(...e)}catch{return!1}},V0=Lc&&Ic(()=>{let s=!1;const e=new Request(ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Rc=64*1024,Vi=Lc&&Ic(()=>D.isReadableStream(new Response("").body)),ja={stream:Vi&&(s=>s.body)};Ga&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ja[e]&&(ja[e]=D.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 $0=async s=>{if(s==null)return 0;if(D.isBlob(s))return s.size;if(D.isSpecCompliantForm(s))return(await new Request(ut.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 M0(s)).byteLength},z0=async(s,e)=>{const t=D.toFiniteNumber(s.getContentLength());return t??$0(e)},$i={http:l0,xhr:N0,fetch:Ga&&(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}=vc(s);c=c?(c+"").toLowerCase():"text";let g=D0([i,o&&o.toAbortSignal()],r),m;const p=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(d&&V0&&t!=="get"&&t!=="head"&&(y=await z0(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,R]=Ec(y,Ua(Tc(d)));a=Ac(E.body,Rc,T,R)}}D.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:g,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:b?u:void 0});let S=await fetch(m);const w=Vi&&(c==="stream"||c==="response");if(Vi&&(l||w&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=S[L]});const v=D.toFiniteNumber(S.headers.get("content-length")),[T,R]=l&&Ec(v,Ua(Tc(l),!0))||[];S=new Response(Ac(S.body,Rc,T,()=>{R&&R(),p&&p()}),E)}c=c||"text";let x=await ja[D.findKey(ja,c)||"text"](S,s);return!w&&p&&p(),await new Promise((E,v)=>{kc(E,v,{data:x,headers:mt.from(S.headers),status:S.status,statusText:S.statusText,config:s,request:m})})}catch(b){throw p&&p(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new _e("Network Error",_e.ERR_NETWORK,s,m),{cause:b.cause||b}):_e.from(b,b&&b.code,s,m)}})};D.forEach($i,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Bc=s=>`- ${s}`,U0=s=>D.isFunction(s)||s===null||s===!1,Nc={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,!U0(t)&&(a=$i[(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 :
|
|
4
4
|
`+o.map(Bc).join(`
|
|
5
5
|
`):" "+Bc(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:$i};function zi(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Ns(null,s)}function Dc(s){return zi(s),s.headers=mt.from(s.headers),s.data=Mi.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Nc.getAdapter(s.adapter||ia.adapter)(s).then(function(a){return zi(s),a.data=Mi.call(s,s.transformResponse,a),a.headers=mt.from(a.headers),a},function(a){return wc(a)||(zi(s),a&&a.response&&(a.response.data=Mi.call(s,s.transformResponse,a.response),a.response.headers=mt.from(a.response.headers))),Promise.reject(a)})}const Pc="1.7.7",Ui={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{Ui[s]=function(a){return typeof a===s||"a"+(e<1?"n ":" ")+s}});const Oc={};Ui.transitional=function(e,t,a){function i(o,r){return"[Axios v"+Pc+"] Transitional option '"+o+"'"+r+(a?". "+a:"")}return(o,r,l)=>{if(e===!1)throw new _e(i(r," has been removed"+(t?" in "+t:"")),_e.ERR_DEPRECATED);return t&&!Oc[r]&&(Oc[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 G0(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 Gi={assertOptions:G0,validators:Ui},ts=Gi.validators;class gs{constructor(e){this.defaults=e,this.interceptors={request:new yc,response:new yc}}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=ps(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Gi.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}:Gi.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=mt.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(d=d&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let h,u=0,f;if(!d){const m=[Dc.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 g=t;for(u=0;u<f;){const m=l[u++],p=l[u++];try{g=m(g)}catch(y){p.call(this,y);break}}try{h=Dc.call(this,g)}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=ps(this.defaults,e);const t=Cc(e.baseURL,e.url);return gc(t,e.params,e.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(e){gs.prototype[e]=function(t,a){return this.request(ps(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(ps(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}gs.prototype[e]=t(),gs.prototype[e+"Form"]=t(!0)});class ji{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 Ns(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 ji(function(i){e=i}),cancel:e}}}function j0(s){return function(t){return s.apply(null,t)}}function H0(s){return D.isObject(s)&&s.isAxiosError===!0}const Hi={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(Hi).forEach(([s,e])=>{Hi[e]=s});function Fc(s){const e=new gs(s),t=ec(gs.prototype.request,e);return D.extend(t,gs.prototype,e,{allOwnKeys:!0}),D.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Fc(ps(s,i))},t}const Ae=Fc(ia);Ae.Axios=gs,Ae.CanceledError=Ns,Ae.CancelToken=ji,Ae.isCancel=wc,Ae.VERSION=Pc,Ae.toFormData=$a,Ae.AxiosError=_e,Ae.Cancel=Ae.CanceledError,Ae.all=function(e){return Promise.all(e)},Ae.spread=j0,Ae.isAxiosError=H0,Ae.mergeConfig=ps,Ae.AxiosHeaders=mt,Ae.formToJSON=s=>Sc(D.isHTMLForm(s)?new FormData(s):s),Ae.getAdapter=Nc.getAdapter,Ae.HttpStatusCode=Hi,Ae.default=Ae;const W0=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Wi={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)}}},Mc=()=>{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}))},Vc=Wi.setup;Wi.setup=Vc?(s,e)=>(Mc(),Vc(s,e)):Mc;const K0={ref:"gscScrollableContainer",class:"scrollable-container"},q0={class:"scrollable-arrows"},Y0=["width","height","viewBox"],J0=["stroke"],X0={class:"scrollable-wrapper"},Z0={class:"scrollable-arrows"},Q0=["width","height","viewBox"],ey=["stroke"];function ty(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",K0,[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",q0,[(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,J0)],8,Y0))])],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",X0,[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",Z0,[(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,ey)],8,Q0))])],2)):n.createCommentVNode("",!0)],512)}const ra=W0(Wi,[["render",ty],["__scopeId","data-v-7d0811ac"]]);function sy(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 Ha=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"]]),Xe=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},ay={class:"player-card"},ny={class:"player-card__image"},iy=["src"],oy={class:"player-card__number"},ry={class:"player-card__right-data"},ly={class:"player-card__details"},cy={class:"player-card__name"},dy={class:"player-card__position"},hy=Xe({__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",ay,[n.createElementVNode("div",ny,[n.createElementVNode("img",{class:n.normalizeClass(["player-card__photo",{"full-width":s.isImgFullWidth}]),src:s.photo,alt:"Player Image"},null,10,iy),n.createElementVNode("div",oy,n.toDisplayString(s.jersey),1),n.createElementVNode("div",ry,[n.createElementVNode("button",{class:"player-card__profile-button",onClick:a[0]||(a[0]=i=>e("clickProfileBtn"))}," Ver perfil ")])]),n.createElementVNode("div",ly,[n.createElementVNode("p",cy,n.toDisplayString(s.name),1),n.createElementVNode("p",dy,n.toDisplayString(s.tournamentSelected.is_female==1?n.unref(Ha).get(s.position_id).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):n.unref(Ha).get(s.position_id)),1)])]))}},[["__scopeId","data-v-1dc995c5"]]),uy=s=>(n.pushScopeId("data-v-938dd424"),s=s(),n.popScopeId(),s),my={class:"my-players"},fy={class:"my-players__header"},py={class:"my-players__title"},gy={style:{"text-decoration-line":"underline"}},yy=uy(()=>n.createElementVNode("span",null,"→",-1)),by={class:"my-players__list"},Sy=Xe({__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},isRival:{type:Boolean,default:!1},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()=>{console.log("data: ",t.teamId,t.seasonId);const l=await r(t.teamId,t.seasonId,t.token);o.value=l.length,a.value=l.map(d=>({...d,position:Ha.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:Ha.get(c.position_id)})),e("totalPlayers",o.value),i.value+=1}),(l,d)=>(n.openBlock(),n.createElementBlock("div",my,[n.createElementVNode("div",fy,[n.createElementVNode("h3",py,n.toDisplayString(s.isPlayer?s.tournamentSelected.is_female==1?s.isRival?"Jugadoras próximo rival":"Mis compañeras":s.isRival?"Jugadores próximo rival":"Mis compañeros":s.tournamentSelected.is_female==1?s.isRival?"Jugadoras próximo rival":"Mis jugadoras":s.isRival?"Jugadores próximo rival":"Mis jugadores"),1),n.createElementVNode("button",{class:"my-players__button",onClick:d[0]||(d[0]=c=>e("viewAll"))},[n.createElementVNode("span",gy,[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))]),yy])]),(n.openBlock(),n.createBlock(n.unref(ra),{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",by,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,c=>(n.openBlock(),n.createBlock(hy,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-938dd424"]]),Ki="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",$c="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",la="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",ca="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",_y=["onClick"],wy={class:"grid-section__image"},ky=["src"],Ey={class:"grid-section__label"},Ty={class:"grid-section__image"},Cy=["src"],xy={class:"grid-section__label"},vy=Xe({__name:"GSCGridTeamsMatches",props:{isPlayer:{type:Boolean,default:!1},playerId:{type:Number,default:0},teamId:{type:Number,default:0},seasonSelected:{type:Number,default:0},isFemale:{type:Boolean,default:!1},isPlayerMobile1:{type:Boolean,default:!1},isPlayerMobile2:{type:Boolean,default:!1},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(l){e("action",l)}const i=n.computed(()=>t.componentWidth<1e3),o=n.computed(()=>t.componentWidth<480),r=n.computed(()=>{let l;return t.isPlayer?l=[{type:"player",label:"Analizar mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected},{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected}]:t.hasTeam?l=[{type:"team",label:"Mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Mi próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected},{type:"schedule",label:"Calendario general →",image:Ki,imgType:"svg",team:t.teamId,season:t.seasonSelected},{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:$c,imgType:"svg",season:t.seasonSelected}]:t.isPlayerMobile1?l=[{type:"player",label:"Analizar mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected}]:t.isPlayerMobile2?l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected}]:t.isPublic?l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Ki,imgType:"svg",season:t.seasonSelected}]:l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Ki,imgType:"svg",season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:$c,imgType:"svg",season:t.seasonSelected}],l});return(l,d)=>(n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["grid-section",{mobile:i.value,"very-small":o.value||!s.hasTeam&&!s.isPlayer||s.isPlayer}])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(c,h)=>(n.openBlock(),n.createElementBlock("div",{key:h,class:n.normalizeClass(i.value?"grid-section__card2":"grid-section__card"),onClick:u=>a(c)},[s.isPublic?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[c.type!="scouting"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("figure",wy,[c.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:c.image,alt:"",class:n.normalizeClass(c.imgType)},null,10,ky)):n.createCommentVNode("",!0)]),n.createElementVNode("p",Ey,n.toDisplayString(c.label),1)],64)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("figure",Ty,[c.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:c.image,alt:"",class:n.normalizeClass(c.imgType)},null,10,Cy)):n.createCommentVNode("",!0)]),n.createElementVNode("p",xy,n.toDisplayString(c.label),1)],64))],10,_y))),128))],2))}},[["__scopeId","data-v-939ab3c3"]]);function zc(s,e){return function(){return s.apply(e,arguments)}}const{toString:Ay}=Object.prototype,{getPrototypeOf:qi}=Object,Wa=(s=>e=>{const t=Ay.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),vt=s=>(s=s.toLowerCase(),e=>Wa(e)===s),Ka=s=>e=>typeof e===s,{isArray:Ds}=Array,da=Ka("undefined");function Ly(s){return s!==null&&!da(s)&&s.constructor!==null&&!da(s.constructor)&&_t(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Uc=vt("ArrayBuffer");function Iy(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Uc(s.buffer),e}const Ry=Ka("string"),_t=Ka("function"),Gc=Ka("number"),qa=s=>s!==null&&typeof s=="object",By=s=>s===!0||s===!1,Ya=s=>{if(Wa(s)!=="object")return!1;const e=qi(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Ny=vt("Date"),Dy=vt("File"),Py=vt("Blob"),Oy=vt("FileList"),Fy=s=>qa(s)&&_t(s.pipe),My=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||_t(s.append)&&((e=Wa(s))==="formdata"||e==="object"&&_t(s.toString)&&s.toString()==="[object FormData]"))},Vy=vt("URLSearchParams"),[$y,zy,Uy,Gy]=["ReadableStream","Request","Response","Headers"].map(vt),jy=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ha(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Ds(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 jc(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 ys=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hc=s=>!da(s)&&s!==ys;function Yi(){const{caseless:s}=Hc(this)&&this||{},e={},t=(a,i)=>{const o=s&&jc(e,i)||i;Ya(e[o])&&Ya(a)?e[o]=Yi(e[o],a):Ya(a)?e[o]=Yi({},a):Ds(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&ha(arguments[a],t);return e}const Hy=(s,e,t,{allOwnKeys:a}={})=>(ha(e,(i,o)=>{t&&_t(i)?s[o]=zc(i,t):s[o]=i},{allOwnKeys:a}),s),Wy=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Ky=(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)},qy=(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&&qi(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},Yy=(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},Jy=s=>{if(!s)return null;if(Ds(s))return s;let e=s.length;if(!Gc(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},Xy=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&qi(Uint8Array)),Zy=(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])}},Qy=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},e1=vt("HTMLFormElement"),t1=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Wc=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),s1=vt("RegExp"),Kc=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};ha(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},a1=s=>{Kc(s,(e,t)=>{if(_t(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(_t(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+"'")})}})},n1=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Ds(s)?a(s):a(String(s).split(e)),t},i1=()=>{},o1=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Ji="abcdefghijklmnopqrstuvwxyz",qc="0123456789",Yc={DIGIT:qc,ALPHA:Ji,ALPHA_DIGIT:Ji+Ji.toUpperCase()+qc},r1=(s=16,e=Yc.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function l1(s){return!!(s&&_t(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const c1=s=>{const e=new Array(10),t=(a,i)=>{if(qa(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Ds(a)?[]:{};return ha(a,(r,l)=>{const d=t(r,i+1);!da(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},d1=vt("AsyncFunction"),h1=s=>s&&(qa(s)||_t(s))&&_t(s.then)&&_t(s.catch),Jc=((s,e)=>s?setImmediate:e?((t,a)=>(ys.addEventListener("message",({source:i,data:o})=>{i===ys&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),ys.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",_t(ys.postMessage)),u1=typeof queueMicrotask<"u"?queueMicrotask.bind(ys):typeof process<"u"&&process.nextTick||Jc,P={isArray:Ds,isArrayBuffer:Uc,isBuffer:Ly,isFormData:My,isArrayBufferView:Iy,isString:Ry,isNumber:Gc,isBoolean:By,isObject:qa,isPlainObject:Ya,isReadableStream:$y,isRequest:zy,isResponse:Uy,isHeaders:Gy,isUndefined:da,isDate:Ny,isFile:Dy,isBlob:Py,isRegExp:s1,isFunction:_t,isStream:Fy,isURLSearchParams:Vy,isTypedArray:Xy,isFileList:Oy,forEach:ha,merge:Yi,extend:Hy,trim:jy,stripBOM:Wy,inherits:Ky,toFlatObject:qy,kindOf:Wa,kindOfTest:vt,endsWith:Yy,toArray:Jy,forEachEntry:Zy,matchAll:Qy,isHTMLForm:e1,hasOwnProperty:Wc,hasOwnProp:Wc,reduceDescriptors:Kc,freezeMethods:a1,toObjectSet:n1,toCamelCase:t1,noop:i1,toFiniteNumber:o1,findKey:jc,global:ys,isContextDefined:Hc,ALPHABET:Yc,generateString:r1,isSpecCompliantForm:l1,toJSONObject:c1,isAsyncFn:d1,isThenable:h1,setImmediate:Jc,asap:u1};function we(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(we,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 Xc=we.prototype,Zc={};["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=>{Zc[s]={value:s}}),Object.defineProperties(we,Zc),Object.defineProperty(Xc,"isAxiosError",{value:!0}),we.from=(s,e,t,a,i,o)=>{const r=Object.create(Xc);return P.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),we.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const m1=null;function Xi(s){return P.isPlainObject(s)||P.isArray(s)}function Qc(s){return P.endsWith(s,"[]")?s.slice(0,-2):s}function ed(s,e,t){return s?s.concat(e).map(function(a,i){return a=Qc(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function f1(s){return P.isArray(s)&&!s.some(Xi)}const p1=P.toFlatObject(P,{},null,function(s){return/^is[A-Z]/.test(s)});function Ja(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(g,m){return!P.isUndefined(m[g])});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(g){if(g===null)return"";if(P.isDate(g))return g.toISOString();if(!l&&P.isBlob(g))throw new we("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(g)||P.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(P.endsWith(m,"{}"))m=a?m:m.slice(0,-2),g=JSON.stringify(g);else if(P.isArray(g)&&f1(g)||(P.isFileList(g)||P.endsWith(m,"[]"))&&(y=P.toArray(g)))return m=Qc(m),y.forEach(function(b,S){!(P.isUndefined(b)||b===null)&&e.append(r===!0?ed([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Xi(g)?!0:(e.append(ed(p,m,o),d(g)),!1)}const h=[],u=Object.assign(p1,{defaultVisitor:c,convertValue:d,isVisitable:Xi});function f(g,m){if(!P.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),P.forEach(g,function(p,y){(!(P.isUndefined(p)||p===null)&&i.call(e,p,P.isString(y)?y.trim():y,m,u))===!0&&f(p,m?m.concat(y):[y])}),h.pop()}}if(!P.isObject(s))throw new TypeError("data must be an object");return f(s),e}function td(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Zi(s,e){this._pairs=[],s&&Ja(s,this,e)}const sd=Zi.prototype;sd.append=function(s,e){this._pairs.push([s,e])},sd.toString=function(s){const e=s?function(t){return s.call(this,t,td)}:td;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function g1(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ad(s,e,t){if(!e)return s;const a=t&&t.encode||g1,i=t&&t.serialize;let o;if(i?o=i(e,t):o=P.isURLSearchParams(e)?e.toString():new Zi(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}const nd=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){P.forEach(this.handlers,function(t){t!==null&&e(t)})}},id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},y1=typeof URLSearchParams<"u"?URLSearchParams:Zi,b1=typeof FormData<"u"?FormData:null,S1=typeof Blob<"u"?Blob:null,_1={isBrowser:!0,classes:{URLSearchParams:y1,FormData:b1,Blob:S1},protocols:["http","https","file","blob","url","data"]},Qi=typeof window<"u"&&typeof document<"u",eo=typeof navigator=="object"&&navigator||void 0,w1=Qi&&(!eo||["ReactNative","NativeScript","NS"].indexOf(eo.product)<0),k1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",E1=Qi&&window.location.href||"http://localhost",T1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qi,hasStandardBrowserEnv:w1,hasStandardBrowserWebWorkerEnv:k1,navigator:eo,origin:E1},Symbol.toStringTag,{value:"Module"})),ft={...T1,..._1};function C1(s,e){return Ja(s,new ft.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return ft.isNode&&P.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function x1(s){return P.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function v1(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 od(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]=v1(i[r])),!l)}if(P.isFormData(s)&&P.isFunction(s.entries)){const t={};return P.forEachEntry(s,(a,i)=>{e(x1(a),i,t,0)}),t}return null}function A1(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 to={transitional:id,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(od(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 C1(s,this.formSerializer).toString();if((o=P.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Ja(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),A1(s)):s}],transformResponse:[function(s){const e=this.transitional||to.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"?we.from(o,we.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:ft.classes.FormData,Blob:ft.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=>{to.headers[s]={}});const so=to,L1=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"]),I1=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=ps(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&Gi.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}:Gi.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=mt.concat(r,o);const l=[];let d=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(d=d&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let h,u=0,f;if(!d){const m=[Dc.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 g=t;for(u=0;u<f;){const m=l[u++],p=l[u++];try{g=m(g)}catch(y){p.call(this,y);break}}try{h=Dc.call(this,g)}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=ps(this.defaults,e);const t=Cc(e.baseURL,e.url);return gc(t,e.params,e.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(e){gs.prototype[e]=function(t,a){return this.request(ps(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(ps(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}gs.prototype[e]=t(),gs.prototype[e+"Form"]=t(!0)});class ji{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 Ns(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 ji(function(i){e=i}),cancel:e}}}function j0(s){return function(t){return s.apply(null,t)}}function H0(s){return D.isObject(s)&&s.isAxiosError===!0}const Hi={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(Hi).forEach(([s,e])=>{Hi[e]=s});function Fc(s){const e=new gs(s),t=ec(gs.prototype.request,e);return D.extend(t,gs.prototype,e,{allOwnKeys:!0}),D.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Fc(ps(s,i))},t}const Ae=Fc(ia);Ae.Axios=gs,Ae.CanceledError=Ns,Ae.CancelToken=ji,Ae.isCancel=wc,Ae.VERSION=Pc,Ae.toFormData=$a,Ae.AxiosError=_e,Ae.Cancel=Ae.CanceledError,Ae.all=function(e){return Promise.all(e)},Ae.spread=j0,Ae.isAxiosError=H0,Ae.mergeConfig=ps,Ae.AxiosHeaders=mt,Ae.formToJSON=s=>Sc(D.isHTMLForm(s)?new FormData(s):s),Ae.getAdapter=Nc.getAdapter,Ae.HttpStatusCode=Hi,Ae.default=Ae;const W0=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Wi={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)}}},Mc=()=>{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}))},Vc=Wi.setup;Wi.setup=Vc?(s,e)=>(Mc(),Vc(s,e)):Mc;const K0={ref:"gscScrollableContainer",class:"scrollable-container"},q0={class:"scrollable-arrows"},Y0=["width","height","viewBox"],J0=["stroke"],X0={class:"scrollable-wrapper"},Z0={class:"scrollable-arrows"},Q0=["width","height","viewBox"],ey=["stroke"];function ty(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",K0,[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",q0,[(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,J0)],8,Y0))])],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",X0,[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",Z0,[(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,ey)],8,Q0))])],2)):n.createCommentVNode("",!0)],512)}const ra=W0(Wi,[["render",ty],["__scopeId","data-v-7d0811ac"]]);function sy(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 Ha=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"]]),Xe=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},ay={class:"player-card"},ny={class:"player-card__image"},iy=["src"],oy={class:"player-card__number"},ry={class:"player-card__right-data"},ly={class:"player-card__details"},cy={class:"player-card__name"},dy={class:"player-card__position"},hy=Xe({__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",ay,[n.createElementVNode("div",ny,[n.createElementVNode("img",{class:n.normalizeClass(["player-card__photo",{"full-width":s.isImgFullWidth}]),src:s.photo,alt:"Player Image"},null,10,iy),n.createElementVNode("div",oy,n.toDisplayString(s.jersey),1),n.createElementVNode("div",ry,[n.createElementVNode("button",{class:"player-card__profile-button",onClick:a[0]||(a[0]=i=>e("clickProfileBtn"))}," Ver perfil ")])]),n.createElementVNode("div",ly,[n.createElementVNode("p",cy,n.toDisplayString(s.name),1),n.createElementVNode("p",dy,n.toDisplayString(s.tournamentSelected.is_female==1?n.unref(Ha).get(s.position_id).replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):n.unref(Ha).get(s.position_id)),1)])]))}},[["__scopeId","data-v-013d8511"]]),uy=s=>(n.pushScopeId("data-v-5b3585f2"),s=s(),n.popScopeId(),s),my={class:"my-players"},fy={class:"my-players__header"},py={class:"my-players__title"},gy={style:{"text-decoration-line":"underline"}},yy=uy(()=>n.createElementVNode("span",null,"→",-1)),by={class:"my-players__list"},Sy=Xe({__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},isRival:{type:Boolean,default:!1},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:Ha.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:Ha.get(c.position_id)})),e("totalPlayers",o.value),i.value+=1}),(l,d)=>(n.openBlock(),n.createElementBlock("div",my,[n.createElementVNode("div",fy,[n.createElementVNode("h3",py,n.toDisplayString(s.isPlayer?s.tournamentSelected.is_female==1?s.isRival?"Jugadoras próximo rival":"Mis compañeras":s.isRival?"Jugadores próximo rival":"Mis compañeros":s.tournamentSelected.is_female==1?s.isRival?"Jugadoras próximo rival":"Mis jugadoras":s.isRival?"Jugadores próximo rival":"Mis jugadores"),1),n.createElementVNode("button",{class:"my-players__button",onClick:d[0]||(d[0]=c=>e("viewAll"))},[n.createElementVNode("span",gy,[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))]),yy])]),(n.openBlock(),n.createBlock(n.unref(ra),{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",by,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,c=>(n.openBlock(),n.createBlock(hy,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-5b3585f2"]]),Ki="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",$c="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",la="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",ca="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",_y=["onClick"],wy={class:"grid-section__image"},ky=["src"],Ey={class:"grid-section__label"},Ty={class:"grid-section__image"},Cy=["src"],xy={class:"grid-section__label"},vy=Xe({__name:"GSCGridTeamsMatches",props:{isPlayer:{type:Boolean,default:!1},playerId:{type:Number,default:0},teamId:{type:Number,default:0},seasonSelected:{type:Number,default:0},isFemale:{type:Boolean,default:!1},isPlayerMobile1:{type:Boolean,default:!1},isPlayerMobile2:{type:Boolean,default:!1},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(l){e("action",l)}const i=n.computed(()=>t.componentWidth<1e3),o=n.computed(()=>t.componentWidth<480),r=n.computed(()=>{let l;return t.isPlayer?l=[{type:"player",label:"Analizar mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected},{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected}]:t.hasTeam?l=[{type:"team",label:"Mi equipo →",image:t.teamImg||"",imgType:"team",team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Mi próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected},{type:"schedule",label:"Calendario general →",image:Ki,imgType:"svg",team:t.teamId,season:t.seasonSelected},{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:$c,imgType:"svg",season:t.seasonSelected}]:t.isPlayerMobile1?l=[{type:"player",label:"Analizar mi perfil →",image:t.playerImg||"",imgType:"player",player:t.playerId,team:t.teamId,season:t.seasonSelected},{type:"rival",label:"Próximo rival →",image:t.rivalImg||"",imgType:"team",team:t.nextRivalId,season:t.seasonSelected}]:t.isPlayerMobile2?l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",team:t.teamId,season:t.seasonSelected}]:t.isPublic?l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Ki,imgType:"svg",season:t.seasonSelected}]:l=[{type:"teamOtherLeague",label:"Buscar equipo →",image:ca,imgType:"svg",season:t.seasonSelected},{type:"playerOtherLeague",label:t.isFemale?"Buscar jugadora →":"Buscar jugador →",image:la,imgType:"svg",season:t.seasonSelected},{type:"scheduleOtherLeague",label:"Calendario general →",image:Ki,imgType:"svg",season:t.seasonSelected},{type:"scouting",label:"Scouting cientifico →",image:$c,imgType:"svg",season:t.seasonSelected}],l});return(l,d)=>(n.openBlock(),n.createElementBlock("section",{class:n.normalizeClass(["grid-section",{mobile:i.value,"very-small":o.value||!s.hasTeam&&!s.isPlayer||s.isPlayer}])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(c,h)=>(n.openBlock(),n.createElementBlock("div",{key:h,class:n.normalizeClass(i.value?"grid-section__card2":"grid-section__card"),onClick:u=>a(c)},[s.isPublic?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[c.type!="scouting"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("figure",wy,[c.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:c.image,alt:"",class:n.normalizeClass(c.imgType)},null,10,ky)):n.createCommentVNode("",!0)]),n.createElementVNode("p",Ey,n.toDisplayString(c.label),1)],64)):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("figure",Ty,[c.image!==""?(n.openBlock(),n.createElementBlock("img",{key:0,src:c.image,alt:"",class:n.normalizeClass(c.imgType)},null,10,Cy)):n.createCommentVNode("",!0)]),n.createElementVNode("p",xy,n.toDisplayString(c.label),1)],64))],10,_y))),128))],2))}},[["__scopeId","data-v-eea05226"]]);function zc(s,e){return function(){return s.apply(e,arguments)}}const{toString:Ay}=Object.prototype,{getPrototypeOf:qi}=Object,Wa=(s=>e=>{const t=Ay.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),vt=s=>(s=s.toLowerCase(),e=>Wa(e)===s),Ka=s=>e=>typeof e===s,{isArray:Ds}=Array,da=Ka("undefined");function Ly(s){return s!==null&&!da(s)&&s.constructor!==null&&!da(s.constructor)&&_t(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Uc=vt("ArrayBuffer");function Iy(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Uc(s.buffer),e}const Ry=Ka("string"),_t=Ka("function"),Gc=Ka("number"),qa=s=>s!==null&&typeof s=="object",By=s=>s===!0||s===!1,Ya=s=>{if(Wa(s)!=="object")return!1;const e=qi(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Ny=vt("Date"),Dy=vt("File"),Py=vt("Blob"),Oy=vt("FileList"),Fy=s=>qa(s)&&_t(s.pipe),My=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||_t(s.append)&&((e=Wa(s))==="formdata"||e==="object"&&_t(s.toString)&&s.toString()==="[object FormData]"))},Vy=vt("URLSearchParams"),[$y,zy,Uy,Gy]=["ReadableStream","Request","Response","Headers"].map(vt),jy=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ha(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Ds(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 jc(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 ys=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hc=s=>!da(s)&&s!==ys;function Yi(){const{caseless:s}=Hc(this)&&this||{},e={},t=(a,i)=>{const o=s&&jc(e,i)||i;Ya(e[o])&&Ya(a)?e[o]=Yi(e[o],a):Ya(a)?e[o]=Yi({},a):Ds(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&ha(arguments[a],t);return e}const Hy=(s,e,t,{allOwnKeys:a}={})=>(ha(e,(i,o)=>{t&&_t(i)?s[o]=zc(i,t):s[o]=i},{allOwnKeys:a}),s),Wy=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Ky=(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)},qy=(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&&qi(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},Yy=(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},Jy=s=>{if(!s)return null;if(Ds(s))return s;let e=s.length;if(!Gc(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},Xy=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&qi(Uint8Array)),Zy=(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])}},Qy=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},e1=vt("HTMLFormElement"),t1=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),Wc=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),s1=vt("RegExp"),Kc=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};ha(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},a1=s=>{Kc(s,(e,t)=>{if(_t(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(_t(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+"'")})}})},n1=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Ds(s)?a(s):a(String(s).split(e)),t},i1=()=>{},o1=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Ji="abcdefghijklmnopqrstuvwxyz",qc="0123456789",Yc={DIGIT:qc,ALPHA:Ji,ALPHA_DIGIT:Ji+Ji.toUpperCase()+qc},r1=(s=16,e=Yc.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function l1(s){return!!(s&&_t(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const c1=s=>{const e=new Array(10),t=(a,i)=>{if(qa(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Ds(a)?[]:{};return ha(a,(r,l)=>{const d=t(r,i+1);!da(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},d1=vt("AsyncFunction"),h1=s=>s&&(qa(s)||_t(s))&&_t(s.then)&&_t(s.catch),Jc=((s,e)=>s?setImmediate:e?((t,a)=>(ys.addEventListener("message",({source:i,data:o})=>{i===ys&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),ys.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",_t(ys.postMessage)),u1=typeof queueMicrotask<"u"?queueMicrotask.bind(ys):typeof process<"u"&&process.nextTick||Jc,P={isArray:Ds,isArrayBuffer:Uc,isBuffer:Ly,isFormData:My,isArrayBufferView:Iy,isString:Ry,isNumber:Gc,isBoolean:By,isObject:qa,isPlainObject:Ya,isReadableStream:$y,isRequest:zy,isResponse:Uy,isHeaders:Gy,isUndefined:da,isDate:Ny,isFile:Dy,isBlob:Py,isRegExp:s1,isFunction:_t,isStream:Fy,isURLSearchParams:Vy,isTypedArray:Xy,isFileList:Oy,forEach:ha,merge:Yi,extend:Hy,trim:jy,stripBOM:Wy,inherits:Ky,toFlatObject:qy,kindOf:Wa,kindOfTest:vt,endsWith:Yy,toArray:Jy,forEachEntry:Zy,matchAll:Qy,isHTMLForm:e1,hasOwnProperty:Wc,hasOwnProp:Wc,reduceDescriptors:Kc,freezeMethods:a1,toObjectSet:n1,toCamelCase:t1,noop:i1,toFiniteNumber:o1,findKey:jc,global:ys,isContextDefined:Hc,ALPHABET:Yc,generateString:r1,isSpecCompliantForm:l1,toJSONObject:c1,isAsyncFn:d1,isThenable:h1,setImmediate:Jc,asap:u1};function we(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(we,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 Xc=we.prototype,Zc={};["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=>{Zc[s]={value:s}}),Object.defineProperties(we,Zc),Object.defineProperty(Xc,"isAxiosError",{value:!0}),we.from=(s,e,t,a,i,o)=>{const r=Object.create(Xc);return P.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),we.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const m1=null;function Xi(s){return P.isPlainObject(s)||P.isArray(s)}function Qc(s){return P.endsWith(s,"[]")?s.slice(0,-2):s}function ed(s,e,t){return s?s.concat(e).map(function(a,i){return a=Qc(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function f1(s){return P.isArray(s)&&!s.some(Xi)}const p1=P.toFlatObject(P,{},null,function(s){return/^is[A-Z]/.test(s)});function Ja(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(g,m){return!P.isUndefined(m[g])});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(g){if(g===null)return"";if(P.isDate(g))return g.toISOString();if(!l&&P.isBlob(g))throw new we("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(g)||P.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(P.endsWith(m,"{}"))m=a?m:m.slice(0,-2),g=JSON.stringify(g);else if(P.isArray(g)&&f1(g)||(P.isFileList(g)||P.endsWith(m,"[]"))&&(y=P.toArray(g)))return m=Qc(m),y.forEach(function(b,S){!(P.isUndefined(b)||b===null)&&e.append(r===!0?ed([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Xi(g)?!0:(e.append(ed(p,m,o),d(g)),!1)}const h=[],u=Object.assign(p1,{defaultVisitor:c,convertValue:d,isVisitable:Xi});function f(g,m){if(!P.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),P.forEach(g,function(p,y){(!(P.isUndefined(p)||p===null)&&i.call(e,p,P.isString(y)?y.trim():y,m,u))===!0&&f(p,m?m.concat(y):[y])}),h.pop()}}if(!P.isObject(s))throw new TypeError("data must be an object");return f(s),e}function td(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Zi(s,e){this._pairs=[],s&&Ja(s,this,e)}const sd=Zi.prototype;sd.append=function(s,e){this._pairs.push([s,e])},sd.toString=function(s){const e=s?function(t){return s.call(this,t,td)}:td;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function g1(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ad(s,e,t){if(!e)return s;const a=t&&t.encode||g1,i=t&&t.serialize;let o;if(i?o=i(e,t):o=P.isURLSearchParams(e)?e.toString():new Zi(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}const nd=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){P.forEach(this.handlers,function(t){t!==null&&e(t)})}},id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},y1=typeof URLSearchParams<"u"?URLSearchParams:Zi,b1=typeof FormData<"u"?FormData:null,S1=typeof Blob<"u"?Blob:null,_1={isBrowser:!0,classes:{URLSearchParams:y1,FormData:b1,Blob:S1},protocols:["http","https","file","blob","url","data"]},Qi=typeof window<"u"&&typeof document<"u",eo=typeof navigator=="object"&&navigator||void 0,w1=Qi&&(!eo||["ReactNative","NativeScript","NS"].indexOf(eo.product)<0),k1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",E1=Qi&&window.location.href||"http://localhost",T1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qi,hasStandardBrowserEnv:w1,hasStandardBrowserWebWorkerEnv:k1,navigator:eo,origin:E1},Symbol.toStringTag,{value:"Module"})),ft={...T1,..._1};function C1(s,e){return Ja(s,new ft.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return ft.isNode&&P.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function x1(s){return P.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function v1(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 od(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]=v1(i[r])),!l)}if(P.isFormData(s)&&P.isFunction(s.entries)){const t={};return P.forEachEntry(s,(a,i)=>{e(x1(a),i,t,0)}),t}return null}function A1(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 to={transitional:id,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(od(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 C1(s,this.formSerializer).toString();if((o=P.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Ja(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),A1(s)):s}],transformResponse:[function(s){const e=this.transitional||to.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"?we.from(o,we.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:ft.classes.FormData,Blob:ft.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=>{to.headers[s]={}});const so=to,L1=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"]),I1=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]&&L1[t])&&(t==="set-cookie"?e[t]?e[t].push(a):e[t]=[a]:e[t]=e[t]?e[t]+", "+a:a)}),e},rd=Symbol("internals");function ua(s){return s&&String(s).trim().toLowerCase()}function Xa(s){return s===!1||s==null?s:P.isArray(s)?s.map(Xa):String(s)}function R1(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 B1=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function ao(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 N1(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,a)=>t.toUpperCase()+a)}function D1(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})})}let Za=class{constructor(e){e&&this.set(e)}set(e,t,a){const i=this;function o(l,d,c){const h=ua(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]=Xa(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())&&!B1(e))r(I1(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=ua(e),e){const a=P.findKey(this,e);if(a){const i=this[a];if(!t)return i;if(t===!0)return R1(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=ua(e),e){const a=P.findKey(this,e);return!!(a&&this[a]!==void 0&&(!t||ao(this,this[a],a,t)))}return!1}delete(e,t){const a=this;let i=!1;function o(r){if(r=ua(r),r){const l=P.findKey(a,r);l&&(!t||ao(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||ao(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]=Xa(i),delete t[o];return}const l=e?N1(o):String(o).trim();l!==o&&delete t[o],t[l]=Xa(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(`
|
|
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[rd]=this[rd]={accessors:{}}).accessors,a=this.prototype;function i(o){const r=ua(o);t[r]||(D1(a,o),t[r]=!0)}return P.isArray(e)?e.forEach(i):i(e),this}};Za.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(Za.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),P.freezeMethods(Za);const At=Za;function no(s,e){const t=this||so,a=e||t,i=At.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 ld(s){return!!(s&&s.__CANCEL__)}function Ps(s,e,t){we.call(this,s??"canceled",we.ERR_CANCELED,e,t),this.name="CanceledError"}P.inherits(Ps,we,{__CANCEL__:!0});function cd(s,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?s(t):e(new we("Request failed with status code "+t.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function P1(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function O1(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 F1(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 Qa=(s,e,t=3)=>{let a=0;const i=O1(50,250);return F1(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)},dd=(s,e)=>{const t=s!=null;return[a=>e[0]({lengthComputable:t,total:s,loaded:a}),e[1]]},hd=s=>(...e)=>P.asap(()=>s(...e)),M1=ft.hasStandardBrowserEnv?function(){const s=ft.navigator&&/(msie|trident)/i.test(ft.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}}(),V1=ft.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 $1(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function z1(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function ud(s,e){return s&&!$1(e)?z1(s,e):e}const md=s=>s instanceof At?{...s}:s;function bs(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(md(c),md(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 fd=s=>{const e=bs({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=At.from(r),e.url=ad(ud(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(ft.hasStandardBrowserEnv||ft.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(ft.hasStandardBrowserEnv&&(a&&P.isFunction(a)&&(a=a(e)),a||a!==!1&&M1(e.url))){const c=i&&o&&V1.read(o);c&&r.set(i,c)}return e},U1=typeof XMLHttpRequest<"u",G1=U1&&function(s){return new Promise(function(e,t){const a=fd(s);let i=a.data;const o=At.from(a.headers).normalize();let{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,h,u,f,g;function m(){f&&f(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout;function y(){if(!p)return;const S=At.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),w={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:s,request:p};cd(function(x){e(x),m()},function(x){t(x),m()},w),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(t(new we("Request aborted",we.ECONNABORTED,s,p)),p=null)},p.onerror=function(){t(new we("Network Error",we.ERR_NETWORK,s,p)),p=null},p.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const w=a.transitional||id;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),t(new we(S,w.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,s,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&P.forEach(o.toJSON(),function(S,w){p.setRequestHeader(w,S)}),P.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),r&&r!=="json"&&(p.responseType=a.responseType),d&&([u,g]=Qa(d,!0),p.addEventListener("progress",u)),l&&p.upload&&([h,f]=Qa(l),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",f)),(a.cancelToken||a.signal)&&(c=S=>{p&&(t(!S||S.type?new Ps(null,s,p):S),p.abort(),p=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const b=P1(a.url);if(b&&ft.protocols.indexOf(b)===-1){t(new we("Unsupported protocol "+b+":",we.ERR_BAD_REQUEST,s));return}p.send(i||null)})},j1=(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 we?h:new Ps(h instanceof Error?h.message:h))}};let r=e&&setTimeout(()=>{r=null,o(new we(`timeout ${e} of ms exceeded`,we.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=()=>P.asap(l),d}},H1=j1,W1=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},K1=async function*(s,e){for await(const t of q1(s))yield*W1(t,e)},q1=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()}},pd=(s,e,t,a)=>{const i=K1(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})},en=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gd=en&&typeof ReadableStream=="function",Y1=en&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),yd=(s,...e)=>{try{return!!s(...e)}catch{return!1}},J1=gd&&yd(()=>{let s=!1;const e=new Request(ft.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),bd=64*1024,io=gd&&yd(()=>P.isReadableStream(new Response("").body)),tn={stream:io&&(s=>s.body)};en&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!tn[e]&&(tn[e]=P.isFunction(s[e])?t=>t[e]():(t,a)=>{throw new we(`Response type '${e}' is not supported`,we.ERR_NOT_SUPPORT,a)})})})(new Response);const X1=async s=>{if(s==null)return 0;if(P.isBlob(s))return s.size;if(P.isSpecCompliantForm(s))return(await new Request(ft.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(P.isArrayBufferView(s)||P.isArrayBuffer(s))return s.byteLength;if(P.isURLSearchParams(s)&&(s=s+""),P.isString(s))return(await Y1(s)).byteLength},Z1=async(s,e)=>P.toFiniteNumber(s.getContentLength())??X1(e),Q1=en&&(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}=fd(s);c=c?(c+"").toLowerCase():"text";let g=H1([i,o&&o.toAbortSignal()],r),m;const p=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(d&&J1&&t!=="get"&&t!=="head"&&(y=await Z1(h,a))!==0){let E=new Request(e,{method:"POST",body:a,duplex:"half"}),v;if(P.isFormData(a)&&(v=E.headers.get("content-type"))&&h.setContentType(v),E.body){const[T,R]=dd(y,Qa(hd(d)));a=pd(E.body,bd,T,R)}}P.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:g,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:b?u:void 0});let S=await fetch(m);const w=io&&(c==="stream"||c==="response");if(io&&(l||w&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=S[L]});const v=P.toFiniteNumber(S.headers.get("content-length")),[T,R]=l&&dd(v,Qa(hd(l),!0))||[];S=new Response(pd(S.body,bd,T,()=>{R&&R(),p&&p()}),E)}c=c||"text";let x=await tn[P.findKey(tn,c)||"text"](S,s);return!w&&p&&p(),await new Promise((E,v)=>{cd(E,v,{data:x,headers:At.from(S.headers),status:S.status,statusText:S.statusText,config:s,request:m})})}catch(b){throw p&&p(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,s,m),{cause:b.cause||b}):we.from(b,b&&b.code,s,m)}}),oo={http:m1,xhr:G1,fetch:Q1};P.forEach(oo,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Sd=s=>`- ${s}`,eb=s=>P.isFunction(s)||s===null||s===!1,_d={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,!eb(t)&&(a=oo[(r=String(t)).toLowerCase()],a===void 0))throw new we(`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(Sd).join(`
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
* Vue 3 Carousel 0.3.4
|
|
26
26
|
* (c) 2024
|
|
27
27
|
* @license MIT
|
|
28
|
-
*/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"}},Mh={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 tE({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 sE({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 aE({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 Vh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...Vh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Ho({val:s,max:e,min:t=0}){return s>e?Ho({val:s-(e+1),max:e,min:t}):s<t?Ho({val:s+(e+1),max:e,min:t}):s}function nE(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function iE(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function oE(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var rE=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"},oE(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),lE=n.defineComponent({name:"Carousel",props:Mh,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),g=n.ref(0),m=n.ref(0),p=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",p),n.provide("minSlide",y),n.provide("slideWidth",l);function w(){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 x(){if(!u||!Object.keys(u).length)return;const C=Object.keys(u).map(z=>Number(z)).sort((z,me)=>+me-+z);let H=Object.assign({},h);C.some(z=>{const me=window.matchMedia(`(min-width: ${z}px)`).matches;return me&&(H=Object.assign(Object.assign({},H),u[z])),me}),E(H)}function E(C){Object.entries(C).forEach(([H,z])=>c[H]=z)}const v=iE(()=>{x(),R(),T()},16);function T(){if(!o.value)return;const C=o.value.getBoundingClientRect();l.value=C.width/c.itemsToShow}function R(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=tE({config:c,slidesCount:d.value}),y.value=sE({config:c,slidesCount:d.value}),c.wrapAround||(f.value=jo({val:f.value,max:p.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),x(),K(),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 B={x:0,y:0},M={x:0,y:0},W=n.reactive({x:0,y:0}),j=n.ref(!1),se=n.ref(!1),oe=()=>{j.value=!0},ne=()=>{j.value=!1};function de(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(L=C.type==="touchstart",L||C.preventDefault(),!(!L&&C.button!==0||Y.value)&&(B.x=L?C.touches[0].clientX:C.clientX,B.y=L?C.touches[0].clientY:C.clientY,document.addEventListener(L?"touchmove":"mousemove",he,!0),document.addEventListener(L?"touchend":"mouseup",J,!0)))}const he=nE(C=>{se.value=!0,M.x=L?C.touches[0].clientX:C.clientX,M.y=L?C.touches[0].clientY:C.clientY;const H=M.x-B.x,z=M.y-B.y;W.y=z,W.x=H},c.throttle);function J(){const C=c.dir==="rtl"?-1:1,H=Math.sign(W.x)*.4,z=Math.round(W.x/l.value+H)*C;if(z&&!L){const me=Ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}X(f.value-z),W.x=0,W.y=0,se.value=!1,document.removeEventListener(L?"touchmove":"mousemove",he,!0),document.removeEventListener(L?"touchend":"mouseup",J,!0)}function K(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&j.value||re()},c.autoplay))}function ue(){b&&(clearInterval(b),b=null),K()}const Y=n.ref(!1);function X(C){const H=c.wrapAround?C:jo({val:C,max:p.value,min:y.value});f.value===H||Y.value||(t("slide-start",{slidingToIndex:C,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!0,g.value=f.value,f.value=H,S=setTimeout(()=>{if(c.wrapAround){const z=Ho({val:H,max:p.value,min:0});z!==f.value&&(f.value=z,t("loop",{currentSlideIndex:f.value,slidingToIndex:C}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!1,ue()},c.transition))}function re(){X(f.value+c.itemsToScroll)}function ye(){X(f.value-c.itemsToScroll)}const xe={slideTo:X,next:re,prev:ye};n.provide("nav",xe),n.provide("isSliding",Y);const ee=n.computed(()=>aE({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",ee);const Ce=n.computed(()=>{const C=c.dir==="rtl"?-1:1,H=ee.value*l.value*C;return{transform:`translateX(${W.x-H}px)`,transition:`${Y.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),x(),R(),T(),ue()}Object.keys(Mh).forEach(C=>{["modelValue"].includes(C)||n.watch(()=>s[C],Te)}),n.watch(()=>s.modelValue,C=>{C!==f.value&&X(Number(C))}),n.watch(d,R),t("before-init"),w();const Fe={config:c,slidesCount:d,slideWidth:l,next:re,prev:ye,slideTo:X,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:x,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:w,restartCarousel:Te,slideTo:X,next:re,prev:ye,nav:xe,data:Fe});const at=e.default||e.slides,lt=e.addons,ct=n.reactive(Fe);return()=>{const C=Vh(at==null?void 0:at(ct)),H=(lt==null?void 0:lt(ct))||[];C.forEach((U,q)=>U.props.index=q);let z=C;if(c.wrapAround){const U=C.map((G,V)=>n.cloneVNode(G,{index:-C.length+V,isClone:!0,key:`clone-before-${V}`})),q=C.map((G,V)=>n.cloneVNode(G,{index:C.length+V,isClone:!0,key:`clone-after-${V}`}));z=[...U,...C,...q]}r.value=C,d.value=Math.max(C.length,1);const me=n.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ye=n.h("div",{class:"carousel__viewport"},me);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":Y.value,"is-dragging":se.value,"is-hover":j.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ne},[Ye,H,n.h(rE)])}}}),Wo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Wo||(Wo={}));const cE={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 dE(s){return s in Wo}const Ko=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"||!dE(t))return;const i=cE[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])};Ko.props={name:String,title:String};const hE=(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,g=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(Ko,{name:g?"arrowRight":"arrowLeft"})),p=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(Ko,{name:g?"arrowLeft":"arrowRight"}));return[m,p]};var uE=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 Rt=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},$h=s=>(n.pushScopeId("data-v-15f082dd"),s=s(),n.popScopeId(),s),mE={key:1,class:"match-day__live"},fE=$h(()=>n.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),pE=$h(()=>n.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1)),gE=[fE,pE],yE={__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)&&!s.matchDay.liveGamesIds.size?(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)):s.matchDay.liveGamesIds.size?(n.openBlock(),n.createElementBlock("div",mE,gE)):n.createCommentVNode("",!0)],4))}},bE=Rt(yE,[["__scopeId","data-v-15f082dd"]]),SE={__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=>({"6930a853":o.value,"692f9113":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.openBlock(),n.createBlock(n.unref(lE),n.mergeProps(i.value,{modelValue:l.value.index,ref_key:"matchDayPickerCarousel",ref:a,key:l.value.index}),{addons:n.withCtx(()=>[n.createVNode(n.unref(hE))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,u=>(n.openBlock(),n.createBlock(n.unref(uE),{key:u.key},{default:n.withCtx(()=>[n.createVNode(bE,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,["modelValue"]))],4))}},_E=Rt(SE,[["__scopeId","data-v-7bfcb74c"]]);function Ms(s,e=80){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-"}${e}/${s}.png`}function zh(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 wE(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 kE={class:"game-info__teams"},EE={class:"game-info__teams__team__logo"},TE=["src"],CE={class:"game-info__teams__detail"},xE={key:0,class:"game-info__teams__detail__pre-game"},vE={class:"game-info__teams__team__logo away"},AE=["src"],LE={key:0},IE={key:0},RE={key:1},BE={__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",kE,[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",EE,[n.createElementVNode("img",{src:n.unref(Ms)(s.game.home_team.team_id),alt:""},null,8,TE)])],4),n.createElementVNode("div",CE,[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("div",xE,[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",vE,[n.createElementVNode("img",{src:n.unref(Ms)(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",LE,[s.isTelevisionVisible?(n.openBlock(),n.createElementBlock("span",IE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock("span",RE,n.toDisplayString(n.unref(wE)(s.game)),1))],4)],4))}},Uh=Rt(BE,[["__scopeId","data-v-9460f42e"]]),Gh=s=>(n.pushScopeId("data-v-e2fc9ed0"),s=s(),n.popScopeId(),s),NE={class:"game-status"},DE={key:0,class:"game-status__day__live"},PE=Gh(()=>n.createElementVNode("span",null,"LIVE",-1)),OE=Gh(()=>n.createElementVNode("span",{class:"dot"},null,-1)),FE=[PE,OE],ME={key:0,class:"game-status__round"},VE={__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",NE,[n.createElementVNode("div",{class:n.normalizeClass(["game-status__day",o.value]),style:n.normalizeStyle(i.value)},[s.isLive?(n.openBlock(),n.createElementBlock("div",DE,FE)):(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))]))}},jh=Rt(VE,[["__scopeId","data-v-e2fc9ed0"]]),Bt={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},$E=s=>(n.pushScopeId("data-v-5711c5a6"),s=s(),n.popScopeId(),s),zE={class:"actions"},UE={class:"actions__row"},GE=$E(()=>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)),jE=[GE],HE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},WE=["fill"],KE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qE=["fill"],YE={__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",zE,[n.createElementVNode("div",UE,[n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[0]||(r[0]=l=>i(n.unref(Bt).STATISTICS))},jE,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(Bt).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",HE,[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,WE)]))],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(Bt).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,qE)]))])):n.createCommentVNode("",!0)])]))}},JE=Rt(YE,[["__scopeId","data-v-5711c5a6"]]),qo=s=>(n.pushScopeId("data-v-d64f8667"),s=s(),n.popScopeId(),s),XE={class:"actions"},ZE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QE=["fill"],eT={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tT=["fill"],sT=qo(()=>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)),aT=[sT],nT={key:0,class:"actions__videos"},iT={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oT=["fill"],rT={key:1,class:"actions__videos__thumbnails"},lT=qo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),cT=qo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),dT={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hT=["stroke"],uT={__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(Bt).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",ZE,[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,QE)]))])):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(Bt).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",eT,[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,tT)]))],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(Bt).STATISTICS))},aT,4)],2),o.value?(n.openBlock(),n.createElementBlock("div",nT,[s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[3]||(c[3]=h=>l(n.unref(Bt).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",iT,[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,oT)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",rT,[s.hasGoals?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:c[4]||(c[4]=h=>l(n.unref(Bt).PLAY_GOALS))},[lT,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(Bt).PLAY_RESUME))},[cT,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(Bt).SHOW_GAME_EVENTS))},[(n.openBlock(),n.createElementBlock("svg",dT,[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,hT)]))],2)):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:s.componentWidth<540}])},null,2))]))}},mT=Rt(uT,[["__scopeId","data-v-d64f8667"]]),bn=s=>(n.pushScopeId("data-v-2968a2f6"),s=s(),n.popScopeId(),s),fT={class:"row-landing__game-status"},pT={class:"row-landing__game-actions"},gT={class:"row-full__game-status"},yT={class:"row-full__game-info"},bT={key:0},ST={class:"row-full__game-actions"},_T={class:"game-events-container"},wT=bn(()=>n.createElementVNode("div",{class:"separator"},null,-1)),kT=bn(()=>n.createElementVNode("div",null,null,-1)),ET={class:"game-events__data"},TT={class:"game-events__data__team"},CT=["src"],xT={class:"game-events__data__team__event__text"},vT={class:"game-events__data__team away"},AT={class:"game-events__data__team__event__text"},LT=["src"],IT=bn(()=>n.createElementVNode("div",null,null,-1)),RT=bn(()=>n.createElementVNode("div",null,null,-1)),BT={__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"})),g=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 p(y){y===Bt.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(Uh,{game:s.game,"is-landing-mode":s.isLandingMode},null,8,["game","is-landing-mode"]),n.createElementVNode("div",fT,[n.createVNode(jh,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(zh)(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",pT,[s.game.home_team?(n.openBlock(),n.createBlock(JE,{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:p},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",gT,[n.createVNode(jh,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(zh)(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",yT,[n.createVNode(Uh,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(g.value)},[!o.value&&(s.game.game_status===4||s.game.is_live)?(n.openBlock(),n.createElementBlock("span",bT,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",ST,[s.game.home_team?(n.openBlock(),n.createBlock(mT,{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:p},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",_T,[wT,n.createElementVNode("div",{class:n.normalizeClass(["game-events",u.value.events])},[kT,n.createElementVNode("div",ET,[n.createElementVNode("div",TT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.homeTeam,(S,w)=>(n.openBlock(),n.createElementBlock("div",{key:`h${w}`,class:"game-events__data__team__event"},[n.createElementVNode("img",{src:S.iconUrl},null,8,CT),n.createElementVNode("div",xT,n.toDisplayString(S.text),1)]))),128))]),n.createElementVNode("div",vT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.awayTeam,(S,w)=>(n.openBlock(),n.createElementBlock("div",{key:`a${w}`,class:"game-events__data__team__event"},[n.createElementVNode("div",AT,n.toDisplayString(S.text),1),n.createElementVNode("img",{src:S.iconUrl},null,8,LT)]))),128))])]),IT,RT],2)],512),[[n.vShow,i.value]])]),_:1})],4))}},Hh=Rt(BT,[["__scopeId","data-v-2968a2f6"]]),NT={class:"calendar-table"},DT={__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",NT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.gamesPerPage,(l,d)=>(n.openBlock(),n.createBlock(Hh,{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))]))}},PT=Rt(DT,[["__scopeId","data-v-c7bf1232"]]),OT={class:"calendar-by-team"},FT={class:"playing-as-picker"},MT={class:"calendar-by-team__page"},VT={__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 g=Number(u),m=Number.isNaN(g)?u:`Jornada ${g<10?"0":""}${g}`,p=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 p.length>0&&h.push({roundName:m,games:p}),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",OT,[n.createElementVNode("div",FT,[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(Fh),{"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,g=>(n.openBlock(),n.createBlock(Hh,{key:g.game_id,game:g,"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"])]))}},$T=Rt(VT,[["__scopeId","data-v-6e0e406c"]]),zT="_liveMinutes_1utnm_2",UT="_viewButtomEvent_1utnm_6",GT="_containerEvents_1utnm_20",jT="_sepEvents_1utnm_26",HT="_goalsContainer_1utnm_36",WT="_yellowContainer_1utnm_44",KT="_redContainer_1utnm_52",qT="_containerEventsGameHometeam_1utnm_60",YT="_containerEventsGameAwayteam_1utnm_73",JT="_image62Icon_1utnm_86",XT="_imgChivasIcon_1utnm_95",ZT="_nameDesktop_1utnm_102",QT="_nameMobile_1utnm_115",eC="_homeTeam_1utnm_127",tC="_sbado16De_1utnm_138",sC="_gameDate_1utnm_147",aC="_sab16092023_1utnm_151",nC="_div_1utnm_164",iC="_divscore_1utnm_173",oC="_cst_1utnm_183",rC="_hour_1utnm_192",lC="_score_1utnm_193",cC="_chivasTvCanal_1utnm_204",dC="_gameStatus_1utnm_216",hC="_matchInfo_1utnm_227",uC="_image62Icon1_1utnm_241",mC="_name_1utnm_102",fC="_imgAtlasIcon_1utnm_263",pC="_name1_1utnm_270",gC="_awayTeam_1utnm_282",yC="_matchCard_1utnm_293",bC={liveMinutes:zT,viewButtomEvent:UT,containerEvents:GT,sepEvents:jT,goalsContainer:HT,yellowContainer:WT,redContainer:KT,containerEventsGameHometeam:qT,containerEventsGameAwayteam:YT,image62Icon:JT,imgChivasIcon:XT,nameDesktop:ZT,nameMobile:QT,homeTeam:eC,sbado16De:tC,gameDate:sC,sab16092023:aC,div:nC,divscore:iC,cst:oC,hour:rC,score:lC,chivasTvCanal:cC,gameStatus:dC,matchInfo:hC,image62Icon1:uC,name:mC,imgAtlasIcon:fC,name1:pC,awayTeam:gC,matchCard:yC},SC=["src"],_C=["src"],wC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),kC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),EC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),TC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),CC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),xC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),vC=n.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),AC={key:0},LC=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),RC=["src"],BC=["src"],NC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},DC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},PC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},OC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),FC=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),VC={__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 g=!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&&(g=!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])),g?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 g=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],m=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${g[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(Ms)(r.value.home_team.team_id,150)},null,10,SC),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgChivasIcon),alt:"",src:n.unref(Ms)(r.value.home_team.team_id)},null,10,_C),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)},[wC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_goals_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),g!=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)},[kC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_red_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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)},[EC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_yellow_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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)},[TC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].goals),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),g!=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)},[CC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].red),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),g!=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)},[xC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].yellow),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),g!=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)},[vC,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))},[LC,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(Ms)(r.value.visiting_team.team_id,150)},null,10,RC),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(Ms)(r.value.visiting_team.team_id)},null,10,BC),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",NC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.visiting_goals_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),g!=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",DC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_red_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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",PC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_yellow_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f))+"'",1),g!=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)},[OC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].goals),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),g!=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)},[FC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].red),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),g!=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,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),g!=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))}},$C={$style:bC},zC=Rt(VC,[["__cssModules",$C]]),UC={class:"calendar-by-game__carousel"},GC="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",jC={__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),g=n.ref(null),m=n.ref(null),p=n.ref(null),y=n.ref([]),b=n.ref(new Map),S=n.ref(new Set),w=n.computed(()=>t.isCup),x=n.computed(()=>t.isCupLegacy),E=n.computed(()=>({height:t.height,width:t.width})),v=n.computed(()=>{if(t.games)return Fe(t.games,t.isTeamGamePerPage);{const U=u.value.get(h.value.key);return U&&t.isTeamGamePerPage&&t.onlyGamesTeamId?[U[0].filter(q=>q.home_team.team_id===t.onlyGamesTeamId||q.visiting_team.team_id===t.onlyGamesTeamId)]:U||[]}}),T=n.computed(()=>t.areGamesCarouselType?v.value[0]:v.value),R=n.ref([]),L=n.ref(new Map),B=n.ref([]),M=n.ref(0),W=n.ref(0),j=n.computed(()=>{const U=oe(l.value),q=R.value.find(G=>G.key===U);return q&&f.value&&(se(!1),ct(q)),U});n.watch(()=>t.seasons,U=>{U&&U.length&&(se(!0),r.value=U.map(q=>q.id),he(U,!0))},{immediate:!0,deep:!0}),n.watch(u,U=>{if(t.onlyGamesTeamId&&U.size){const q=Array.from(U.values()).reduce((G,V)=>(V.forEach(te=>{const ie=te.find(be=>be.home_team.team_id===t.onlyGamesTeamId||be.visiting_team.team_id===t.onlyGamesTeamId);ie&&G.push(ie)}),G),[]);e("change-games-by-client-privileges",q)}},{immediate:!0});function se(U){f.value=U}function oe(U){const q=new Date().valueOf(),G=Object.entries(Object.entries(U).reduce((te,[ie,be])=>(te[ie]=null,be.forEach(Oe=>{Oe.games.forEach(Je=>{const sa=[1,0].includes(Je.game_status)||Je.is_live;if(B.value.length&&W.value!==M.value?(Je.home_team.team_id===t.userTeamId||Je.visiting_team.team_id===t.userTeamId)&&sa:sa){const us=q-Je.dateTimeMillis;(te[ie]===null||us<te[ie])&&(te[ie]=us)}})}),te),{}));if(!G.length)return"1";const V=G.reduce((te,[ie,be])=>{if(be!==null){const Oe=L.value.get(ie);(te.shortestMillisToNow===null||be<te.shortestMillisToNow&&Oe.index>=te.scheduleKey.index)&&(te.shortestMillisToNow=be,te.round=ie,te.scheduleKey=Oe)}return te},{round:"",shortestMillisToNow:null,scheduleKey:null});return V.shortestMillisToNow!==null?V.round:G[G.length-1][0]}n.watch(()=>t.teamId,()=>{Te()},{immediate:!0});async function ne(U,q,G=""){let V=G;try{const te={};t.token&&(te.Authorization=t.token),V||(V="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",U.forEach((Oe,Je)=>{V+=`${Je===0?"":"&"}seasons=${Oe}`}));const{data:{data:ie,teams:be}}=await yn.get(V,{headers:te});return{seasonsAndGames:ie,seasonsAndTeams:be}}catch(te){if(q>0)return ne(U,q-1,V);throw new Error(te)}}function de(U){for(const q of U)if(!r.value.includes(q.season_id))return!0;return!1}async function he(U,q){try{l.value={},W.value=0,M.value=0;let G=0;const{seasonsAndGames:V,seasonsAndTeams:te}=await ne(U.map(be=>be.id),3);if(q&&de(V))return;V.forEach(be=>{const{type:Oe}=U.find(Je=>Je.id===be.season_id);be.type=Oe,be.games.forEach(Je=>{W.value++,([1,0].includes(Je.game_status)||Je.is_live)&&M.value++,Je.season_id=be.season_id}),Oe===0&&(G=be.season_id)}),g.value={seasonsGames:V};const{teams:ie}=te.find(be=>be.season_id===G);m.value=ie,e("change-teams",ie),Te(),S.value.size?ue():await J()}catch(G){throw new Error(G)}}async function J(){try{const U=await Ce(),q=new Set;if(y.value=U.data.reduce((G,V)=>(V.games.forEach(te=>{q.add(te.game_id),G.push(te)}),G),[]),y.value.length){i||await K();const G=[];S.value.forEach(V=>{const te=b.value.get(V);te&&new Date().valueOf()>te.dateTimeMillis&&G.push(V)}),G.length&&G.every(V=>b.value.get(V).isLiveTracked)&&re()}}catch(U){throw new Error(U)}}async function K(){try{const U=[];for(const G of y.value){const V=b.value.get(G.game_id);V&&(V.is_live=1,V.game_status=4,V.scheduleKey&&V.scheduleKey.liveGamesIds.add(G.game_id)),V.isLiveTracked=!0,U.push(ee(G.game_id))}const q=await Promise.all(U);for(const G of q){const V=b.value.get(G.game_id);if(V){const te=[Number(G.score[V.home_team.team_id.toString()])+Number(G.score[`own_${V.visiting_team.team_id.toString()}`]),Number(G.score[V.visiting_team.team_id.toString()])+Number(G.score[`own_${V.home_team.team_id.toString()}`])],ie=te[0],be=te[1];V.score=[Number.isNaN(ie)?0:ie,Number.isNaN(be)?0:be],xe(V,G.plays)}}i||X()}catch(U){throw new Error(U)}}function ue(){S.value.size&&S.value.forEach(U=>{const q=b.value.get(U);if(q){const G=new Date().valueOf();if(60*1e3*30+q.dateTimeMillis-G>0){const V=q.dateTimeMillis-G-3e5;setTimeout(()=>{Y()},V>0?V:0)}}})}function Y(){re(),o||(o=setInterval(()=>{J()},t.checkLiveGamesIntervalMinutes*60*1e3))}function X(){ye(),i=setInterval(()=>{K()},t.gamesEventsIntervalMinutes*60*1e3)}function re(){clearInterval(o),o=null}function ye(){clearInterval(i),i=null}function xe(U,q){for(const G of q)if(G.category_id===0&&G.game_status_id===13){const V=b.value.get(G.game_id);y.value=y.value.filter(te=>te.game_id!==U.game_id),V.is_live=0,V.game_status=0,V.scheduleKey&&V.scheduleKey.liveGamesIds.delete(U.game_id)}}async function ee(U){try{return(await yn.get(`${GC}${U}`,{headers:{Authorization:`${t.token}`}})).data}catch(q){throw new Error(q)}}async function Ce(){try{if(t.seasons.length===0)return[];const U=t.seasons.reduce((V,te)=>`${V}seasons=${te.id}&`,""),q=yn.create({headers:{Authorization:`${t.token}`}}),{data:G}=await q.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${U}`);return G}catch(U){throw new Error(U)}}function Te(){if(re(),!m.value)return;b.value.clear(),S.value.clear(),B.value=[];const U=g.value&&g.value.seasonsGames?g.value.seasonsGames.map(q=>{const G=q.games.reduce((V,te)=>{if(t.onlyGamesTeamId&&t.onlyGamesTeamId!==te.home_team&&t.onlyGamesTeamId!==te.visiting_team)return V;const ie={...te},be=new Date,[Oe,Je,sa]=ie.date.split("-"),[us,Ai,Rs]=ie.schedule.split(":"),Li=new Date(Number(Oe),Number(Je)-1,Number(sa),Number(us),Number(Ai),Number(Rs));return ie.dateTimeMillis=Li.valueOf(),ie.home_team=m.value.find(Ql=>Ql.team_id===te.home_team),ie.visiting_team=m.value.find(Ql=>Ql.team_id===te.visiting_team),ie.game_status===4&&be.getFullYear()===Li.getFullYear()&&be.getMonth()===Li.getMonth()&&be.getDate()===Li.getDate()&&S.value.add(ie.game_id),b.value.set(ie.game_id,ie),t.teamId&&ie.home_team.team_id!==t.teamId&&ie.visiting_team.team_id!==t.teamId||(V[te.matchday_abbreviation]?V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date]?V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date].push(ie):V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date]=[ie]:V[te.matchday_abbreviation]={[te.game_status===3?"canceled":te.date]:[ie]},t.userTeamId&&([1,0].includes(ie.game_status)||ie.is_live)&&(ie.home_team.team_id===t.userTeamId||ie.visiting_team.team_id===t.userTeamId)&&B.value.push(ie)),V},{});for(let[V,te]of Object.entries(G))G[V]=Object.entries(te).map(([ie,be])=>({date:ie,games:be.sort((Oe,Je)=>Oe.dateTimeMillis-Je.dateTimeMillis)})),G[V].sort((ie,be)=>ie.date<be.date?-1:ie.date>be.date?1:0);return{type:q.type,weight:q.type===0?0:q.type===2?1:2,schedule:G}}):[];U.sort((q,G)=>q.weight-G.weight),l.value=U.reduce((q,G)=>{for(const[V,te]of Object.entries(G.schedule))if(G.type===0)if([1,2].includes(t.tournamentType)){const ie=eE.get(t.tournamentType);if(ie){const be=ie.get(V);be&&(q[be.matchDayAbbreviation]=te)}}else if(w.value){const ie=V.replace("M",""),be=ie;x.value?q[Qk[ie]||be]=te:q[Zk[V]||be]=te}else q[Number(V.replace("M","")).toString()]=te;else G.type===2?V.charAt(1)=="I"?q[`PI${Number(V.replace("PI",""))}`]=te:q[`R${Number(V.replace("PO",""))}`]=te:G.type===1&&(q[Xk[V]]=te);return q},{}),u.value=new Map,L.value.clear(),R.value=Array.from(Object.entries(l.value).reduce((q,[G,V],te)=>{const ie=Number(G);let be="";Number.isNaN(ie)?be=G:be=ie<10?`0${ie}`:G;const Oe={key:G,value:ie,valueText:be,index:te,liveGamesIds:new Set};L.value.set(G,Oe),q.set(G,Oe);const Je=V.reduce((us,Ai)=>(Ai.games.forEach(Rs=>{Rs.game_id===t.defaultGameId&&(p.value=G),Rs.roundAbbreviation=Number.isNaN(ie)?ie:`J ${ie}`,Rs.scheduleKey=Oe,Rs.is_live&&Oe.liveGamesIds.add(Rs.game_id)}),us=us.concat(Ai.games),us),[]),sa=Fe(Je);return u.value.set(G,sa),q},new Map).values())}function Fe(U,q=!1){const G=[];if(t.gamesPerMatchDay>0){let V=[];U.forEach((te,ie)=>{V.push(te),(ie+1)%t.gamesPerMatchDay===0&&(G.push([...V]),V=[])}),V.length&&G.push([...V])}else G.push(U);return q&&t.isTeamGamePerPage&&t.defaultGameId?G.filter(V=>V.game_id===t.defaultGameId||V.gameId===t.defaultGameId):G}async function at(U){try{const{data:q}=await yn.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return q}catch(q){if(U>0)return at(U-1);throw new Error(q)}}function lt(){if(window.ResizeObserver)a=new ResizeObserver(()=>{d.value=c.value.clientWidth}),a.observe(c.value);else throw new Error("Resize observer not supported!")}function ct(U){h.value.value!==U.value&&(h.value=U,e("change-round",U))}function C(U){t.areGamesCarouselType&&e("change-game-carousel",U.selectedItem)}function H(U){e("action",U),me(U)}function z(U){e("open-modal-event",U)}function me(U){const q="PLAY_RESUME",G="PLAY_GOALS",V=[607,608,12,55,54,35,14,52,15,53,466,477],te=[12,55,"35_r","54_r"],{game_id:ie,season_id:be}=U.game;let Oe={seasonId:be,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[ie],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};U.action===q?(Oe.categoryIds=V,Oe.advancedFilter.playListTitle="Resumen",e("openmedia",Oe)):U.action===G&&(Oe.categoryIds=te,Oe.advancedFilter.playListTitle="Goles",e("openmedia",Oe))}async function Ye(){try{if(!t.awaitForSeasons&&!t.games){const U=(await at(3)).find(V=>V._id===1),q=U.seasons[0],G=[{id:q.id,type:q.type}];U&&U.tournament&&e("tournament-selected",U.tournament),q.related_seasons&&q.related_seasons.length&&G.push(...q.related_seasons.map(V=>({id:V.id,type:V.type}))),await he(G,!1)}}catch(U){throw new Error(U)}}return n.onMounted(()=>{lt()}),Ye(),(U,q)=>(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($T,{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:H},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&&R.value?(n.openBlock(),n.createBlock(_E,{key:0,"match-days":R.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":p.value,"closest-match-day":s.sortCalendar?j.value:"",onChangeMatchDay:ct},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",UC,[v.value?(n.openBlock(),n.createBlock(n.unref(Fh),{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:C},{default:n.withCtx(({item:G})=>[s.areGamesCarouselType?(n.openBlock(),n.createBlock(zC,{key:0,is_captured:s.is_captured,game:G,onOpenModalEvent:z,"plays-live":s.playsLive,"info-live":s.infoLive},null,8,["is_captured","game","plays-live","info-live"])):(n.openBlock(),n.createBlock(PT,{key:1,"team-id":s.teamId,"show-videos":s.showVideos,"games-per-page":G,"is-landing-mode":s.isLandingMode,"row-height":s.rowHeight,"component-width":d.value,"is-round-mode":s.isRoundMode,onAction:H},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))}},HC=Rt(jC,[["__scopeId","data-v-c839e786"]]),WC=["Mi posición","Tabla General","Fases","Play Off"],KC={components:{GscSwitchComponent:To,GSCGeneraltable:ww,GSCCalendarByGame:HC},props:{privileges:{type:Object,default:()=>{}},isPublic:{type:Boolean,default:!0},isPlayer:{type:Boolean,default:!1},isPlayerTournament:{type:Boolean,default:!1},isGeneric:{type:Boolean,default:!1},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 WC.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"}},qC={key:0,class:"gsc-switch-container"},YC={class:"gsc-app-component"},JC={key:0};function XC(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",{key:1,class:n.normalizeClass(["gsc-switch-container",t.isPlayer&&t.isPlayerTournament||!t.isGeneric?"gsc-switch-container-player":""])},[t.isPlayerTournament?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t.isPublic?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Tabla General")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.isGeneric?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Tabla General")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Mi posición")],64))],64))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Tabla General")],64))],2)):(n.openBlock(),n.createElementBlock("div",qC,[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",YC,[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",JC,[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 ZC=Xe(KC,[["render",XC],["__scopeId","data-v-91985b11"]]),Wh=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],Kh=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],qh=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],QC={class:"match"},ex={class:"match__header"},tx={key:0,class:"match__final-tag"},sx={key:1,class:"match__final-tag__no-border"},ax={class:"match__header__match-date"},nx={class:"match__tag"},ix={class:"match__body"},ox={class:"match__data"},rx={class:"match__acronym"},lx=["src"],cx={class:"match__score"},dx=["src"],hx={class:"match__acronym"},ux={class:"match__status"},Sn=Xe({__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`${Wh[a.getDay()]}, ${a.getDate()} de ${Kh[a.getMonth()]}`});return(a,i)=>{var o,r,l;return n.openBlock(),n.createElementBlock("section",QC,[n.createElementVNode("div",ex,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock("div",tx,"FINAL")):(n.openBlock(),n.createElementBlock("div",sx)),n.createElementVNode("div",ax,n.toDisplayString(t.value),1),n.createElementVNode("div",nx,n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`),1)]),n.createElementVNode("div",ix,[n.createElementVNode("div",ox,[n.createElementVNode("div",rx,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,lx),n.createElementVNode("div",cx,[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,dx),n.createElementVNode("div",hx,n.toDisplayString((l=s.data)==null?void 0:l.visiting_team_acronym),1)]),n.createElementVNode("div",ux,[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-12fb8db0"]]),Yh=s=>(n.pushScopeId("data-v-5db14f31"),s=s(),n.popScopeId(),s),mx=["src"],fx=["src"],px={class:"coming-match__body"},gx={class:"coming-match__data"},yx=["src"],bx={key:0,class:"coming-match__live"},Sx={class:"coming-match__live__score"},_x={class:"coming-match__live__time"},wx=Yh(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),kx=Yh(()=>n.createElementVNode("div",{class:"coming-match__live__time__text"},"LIVE",-1)),Ex={class:"coming-match__live__time__time"},Tx={key:1,style:{"margin-top":"16px"}},Cx={class:"coming-match__time"},xx={class:"coming-match__cst"},vx={key:0},Ax=["src"],Vs=Xe({__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`${Wh[i.getDay()]}, ${i.getDate()} de ${e.small?qh[i.getMonth()]:Kh[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,g,m,p,y,b,S,w,x;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,mx),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,fx),n.createElementVNode("div",px,[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",gx,[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,yx),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",bx,[n.createElementVNode("div",Sx,n.toDisplayString((g=s.data)==null?void 0:g.score[0])+" - "+n.toDisplayString((m=s.data)==null?void 0:m.score[1]),1),n.createElementVNode("div",_x,[wx,kx,n.createElementVNode("div",Ex,n.toDisplayString(s.data.currentTimeLive||"0'"),1)])])):(n.openBlock(),n.createElementBlock("div",Tx,[n.createElementVNode("div",Cx,[s.data.game_status!==4?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((p=s.data)==null?void 0:p.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",xx,[s.data.game_status===4?(n.openBlock(),n.createElementBlock("span",vx,"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/"+((w=s.data)==null?void 0:w.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((x=s.data)==null?void 0:x.visiting_team)+".png",alt:"team-img"},null,10,Ax)],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-5db14f31"]]),_n=s=>(n.pushScopeId("data-v-fec8d273"),s=s(),n.popScopeId(),s),Lx={class:"game-item__header"},Ix={class:"game-item__header__info text-type-1"},Rx={key:0,class:"game-item__header__info__live"},Bx=_n(()=>n.createElementVNode("div",{class:"game-item__header__info__live__status text-type-2"},[n.createElementVNode("div",{class:"bullet"}),n.createElementVNode("span",null,"LIVE")],-1)),Nx={class:"text-type-1"},Dx={key:1,class:"game-item__header__info__pre-match text-type-2"},Px=_n(()=>n.createElementVNode("span",{class:"game-item__header__info__pre-match text-type-1"},[n.createTextVNode(" "),n.createElementVNode("small",null,"CST")],-1)),Ox={key:2,class:"game-item__header__info__post-match"},Fx=[_n(()=>n.createElementVNode("span",{class:"text-type-2"},"Finalizado",-1))],Mx={class:"game-item__body"},Vx={class:"game-item__body__team__info"},$x=["src"],zx={class:"game-item__body__team__info__acronym"},Ux={class:"game-item__body__team__score"},Gx=[_n(()=>n.createElementVNode("div",null,"Ver →",-1))],jx=Xe({__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()} ${qh[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",Lx,[n.createElementVNode("div",Ix,n.toDisplayString(a.value),1),s.game.is_live?(n.openBlock(),n.createElementBlock("div",Rx,[Bx,n.createElementVNode("div",Nx,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),Px])):(n.openBlock(),n.createElementBlock("div",Ox,Fx))]),n.createElementVNode("div",Mx,[(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",Vx,[n.createElementVNode("img",{src:c.teamLogo,alt:"team-logo"},null,8,$x),n.createElementVNode("div",zx,n.toDisplayString(c.acronym),1)]),n.createElementVNode("div",Ux,[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},Gx)],2))}},[["__scopeId","data-v-fec8d273"]]),Hx=Xe({__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 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"}},Mh={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 tE({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 sE({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 aE({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 Vh(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...Vh(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Ho({val:s,max:e,min:t=0}){return s>e?Ho({val:s-(e+1),max:e,min:t}):s<t?Ho({val:s+(e+1),max:e,min:t}):s}function nE(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function iE(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function oE(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var rE=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"},oE(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),lE=n.defineComponent({name:"Carousel",props:Mh,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),g=n.ref(0),m=n.ref(0),p=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",p),n.provide("minSlide",y),n.provide("slideWidth",l);function w(){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 x(){if(!u||!Object.keys(u).length)return;const C=Object.keys(u).map(z=>Number(z)).sort((z,me)=>+me-+z);let H=Object.assign({},h);C.some(z=>{const me=window.matchMedia(`(min-width: ${z}px)`).matches;return me&&(H=Object.assign(Object.assign({},H),u[z])),me}),E(H)}function E(C){Object.entries(C).forEach(([H,z])=>c[H]=z)}const v=iE(()=>{x(),R(),T()},16);function T(){if(!o.value)return;const C=o.value.getBoundingClientRect();l.value=C.width/c.itemsToShow}function R(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=tE({config:c,slidesCount:d.value}),y.value=sE({config:c,slidesCount:d.value}),c.wrapAround||(f.value=jo({val:f.value,max:p.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),x(),K(),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 B={x:0,y:0},M={x:0,y:0},W=n.reactive({x:0,y:0}),j=n.ref(!1),se=n.ref(!1),oe=()=>{j.value=!0},ne=()=>{j.value=!1};function de(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(L=C.type==="touchstart",L||C.preventDefault(),!(!L&&C.button!==0||Y.value)&&(B.x=L?C.touches[0].clientX:C.clientX,B.y=L?C.touches[0].clientY:C.clientY,document.addEventListener(L?"touchmove":"mousemove",he,!0),document.addEventListener(L?"touchend":"mouseup",J,!0)))}const he=nE(C=>{se.value=!0,M.x=L?C.touches[0].clientX:C.clientX,M.y=L?C.touches[0].clientY:C.clientY;const H=M.x-B.x,z=M.y-B.y;W.y=z,W.x=H},c.throttle);function J(){const C=c.dir==="rtl"?-1:1,H=Math.sign(W.x)*.4,z=Math.round(W.x/l.value+H)*C;if(z&&!L){const me=Ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}X(f.value-z),W.x=0,W.y=0,se.value=!1,document.removeEventListener(L?"touchmove":"mousemove",he,!0),document.removeEventListener(L?"touchend":"mouseup",J,!0)}function K(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&j.value||re()},c.autoplay))}function ue(){b&&(clearInterval(b),b=null),K()}const Y=n.ref(!1);function X(C){const H=c.wrapAround?C:jo({val:C,max:p.value,min:y.value});f.value===H||Y.value||(t("slide-start",{slidingToIndex:C,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!0,g.value=f.value,f.value=H,S=setTimeout(()=>{if(c.wrapAround){const z=Ho({val:H,max:p.value,min:0});z!==f.value&&(f.value=z,t("loop",{currentSlideIndex:f.value,slidingToIndex:C}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!1,ue()},c.transition))}function re(){X(f.value+c.itemsToScroll)}function ye(){X(f.value-c.itemsToScroll)}const xe={slideTo:X,next:re,prev:ye};n.provide("nav",xe),n.provide("isSliding",Y);const ee=n.computed(()=>aE({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",ee);const Ce=n.computed(()=>{const C=c.dir==="rtl"?-1:1,H=ee.value*l.value*C;return{transform:`translateX(${W.x-H}px)`,transition:`${Y.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),x(),R(),T(),ue()}Object.keys(Mh).forEach(C=>{["modelValue"].includes(C)||n.watch(()=>s[C],Te)}),n.watch(()=>s.modelValue,C=>{C!==f.value&&X(Number(C))}),n.watch(d,R),t("before-init"),w();const Fe={config:c,slidesCount:d,slideWidth:l,next:re,prev:ye,slideTo:X,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:x,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:w,restartCarousel:Te,slideTo:X,next:re,prev:ye,nav:xe,data:Fe});const at=e.default||e.slides,lt=e.addons,ct=n.reactive(Fe);return()=>{const C=Vh(at==null?void 0:at(ct)),H=(lt==null?void 0:lt(ct))||[];C.forEach((U,q)=>U.props.index=q);let z=C;if(c.wrapAround){const U=C.map((G,V)=>n.cloneVNode(G,{index:-C.length+V,isClone:!0,key:`clone-before-${V}`})),q=C.map((G,V)=>n.cloneVNode(G,{index:C.length+V,isClone:!0,key:`clone-after-${V}`}));z=[...U,...C,...q]}r.value=C,d.value=Math.max(C.length,1);const me=n.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ye=n.h("div",{class:"carousel__viewport"},me);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":Y.value,"is-dragging":se.value,"is-hover":j.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ne},[Ye,H,n.h(rE)])}}}),Wo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Wo||(Wo={}));const cE={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 dE(s){return s in Wo}const Ko=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"||!dE(t))return;const i=cE[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])};Ko.props={name:String,title:String};const hE=(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,g=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(Ko,{name:g?"arrowRight":"arrowLeft"})),p=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(Ko,{name:g?"arrowLeft":"arrowRight"}));return[m,p]};var uE=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 Rt=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},$h=s=>(n.pushScopeId("data-v-15f082dd"),s=s(),n.popScopeId(),s),mE={key:1,class:"match-day__live"},fE=$h(()=>n.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),pE=$h(()=>n.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1)),gE=[fE,pE],yE={__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)&&!s.matchDay.liveGamesIds.size?(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)):s.matchDay.liveGamesIds.size?(n.openBlock(),n.createElementBlock("div",mE,gE)):n.createCommentVNode("",!0)],4))}},bE=Rt(yE,[["__scopeId","data-v-15f082dd"]]),SE={__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=>({"6930a853":o.value,"692f9113":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.openBlock(),n.createBlock(n.unref(lE),n.mergeProps(i.value,{modelValue:l.value.index,ref_key:"matchDayPickerCarousel",ref:a,key:l.value.index}),{addons:n.withCtx(()=>[n.createVNode(n.unref(hE))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,u=>(n.openBlock(),n.createBlock(n.unref(uE),{key:u.key},{default:n.withCtx(()=>[n.createVNode(bE,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,["modelValue"]))],4))}},_E=Rt(SE,[["__scopeId","data-v-7bfcb74c"]]);function Ms(s,e=80){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-"}${e}/${s}.png`}function zh(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 wE(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 kE={class:"game-info__teams"},EE={class:"game-info__teams__team__logo"},TE=["src"],CE={class:"game-info__teams__detail"},xE={key:0,class:"game-info__teams__detail__pre-game"},vE={class:"game-info__teams__team__logo away"},AE=["src"],LE={key:0},IE={key:0},RE={key:1},BE={__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",kE,[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",EE,[n.createElementVNode("img",{src:n.unref(Ms)(s.game.home_team.team_id),alt:""},null,8,TE)])],4),n.createElementVNode("div",CE,[s.game.game_status===4&&!s.game.is_live?(n.openBlock(),n.createElementBlock("div",xE,[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",vE,[n.createElementVNode("img",{src:n.unref(Ms)(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",LE,[s.isTelevisionVisible?(n.openBlock(),n.createElementBlock("span",IE,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock("span",RE,n.toDisplayString(n.unref(wE)(s.game)),1))],4)],4))}},Uh=Rt(BE,[["__scopeId","data-v-9460f42e"]]),Gh=s=>(n.pushScopeId("data-v-e2fc9ed0"),s=s(),n.popScopeId(),s),NE={class:"game-status"},DE={key:0,class:"game-status__day__live"},PE=Gh(()=>n.createElementVNode("span",null,"LIVE",-1)),OE=Gh(()=>n.createElementVNode("span",{class:"dot"},null,-1)),FE=[PE,OE],ME={key:0,class:"game-status__round"},VE={__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",NE,[n.createElementVNode("div",{class:n.normalizeClass(["game-status__day",o.value]),style:n.normalizeStyle(i.value)},[s.isLive?(n.openBlock(),n.createElementBlock("div",DE,FE)):(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))]))}},jh=Rt(VE,[["__scopeId","data-v-e2fc9ed0"]]),Bt={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},$E=s=>(n.pushScopeId("data-v-5711c5a6"),s=s(),n.popScopeId(),s),zE={class:"actions"},UE={class:"actions__row"},GE=$E(()=>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)),jE=[GE],HE={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},WE=["fill"],KE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qE=["fill"],YE={__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",zE,[n.createElementVNode("div",UE,[n.createElementVNode("div",{class:"actions__button rounded",style:n.normalizeStyle(a.value),onClick:r[0]||(r[0]=l=>i(n.unref(Bt).STATISTICS))},jE,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(Bt).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",HE,[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,WE)]))],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(Bt).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,qE)]))])):n.createCommentVNode("",!0)])]))}},JE=Rt(YE,[["__scopeId","data-v-5711c5a6"]]),qo=s=>(n.pushScopeId("data-v-d64f8667"),s=s(),n.popScopeId(),s),XE={class:"actions"},ZE={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QE=["fill"],eT={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tT=["fill"],sT=qo(()=>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)),aT=[sT],nT={key:0,class:"actions__videos"},iT={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oT=["fill"],rT={key:1,class:"actions__videos__thumbnails"},lT=qo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),cT=qo(()=>n.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),dT={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hT=["stroke"],uT={__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(Bt).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",ZE,[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,QE)]))])):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(Bt).PLAY_RESUME))},[(n.openBlock(),n.createElementBlock("svg",eT,[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,tT)]))],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(Bt).STATISTICS))},aT,4)],2),o.value?(n.openBlock(),n.createElementBlock("div",nT,[s.gameStatus===4444&&!s.isLive?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__button",onClick:c[3]||(c[3]=h=>l(n.unref(Bt).NOTIFICATION))},[(n.openBlock(),n.createElementBlock("svg",iT,[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,oT)]))])):n.createCommentVNode("",!0),s.showPlayButton&&s.hasVideo?(n.openBlock(),n.createElementBlock("div",rT,[s.hasGoals?(n.openBlock(),n.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:c[4]||(c[4]=h=>l(n.unref(Bt).PLAY_GOALS))},[lT,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(Bt).PLAY_RESUME))},[cT,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(Bt).SHOW_GAME_EVENTS))},[(n.openBlock(),n.createElementBlock("svg",dT,[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,hT)]))],2)):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:s.componentWidth<540}])},null,2))]))}},mT=Rt(uT,[["__scopeId","data-v-d64f8667"]]),bn=s=>(n.pushScopeId("data-v-2968a2f6"),s=s(),n.popScopeId(),s),fT={class:"row-landing__game-status"},pT={class:"row-landing__game-actions"},gT={class:"row-full__game-status"},yT={class:"row-full__game-info"},bT={key:0},ST={class:"row-full__game-actions"},_T={class:"game-events-container"},wT=bn(()=>n.createElementVNode("div",{class:"separator"},null,-1)),kT=bn(()=>n.createElementVNode("div",null,null,-1)),ET={class:"game-events__data"},TT={class:"game-events__data__team"},CT=["src"],xT={class:"game-events__data__team__event__text"},vT={class:"game-events__data__team away"},AT={class:"game-events__data__team__event__text"},LT=["src"],IT=bn(()=>n.createElementVNode("div",null,null,-1)),RT=bn(()=>n.createElementVNode("div",null,null,-1)),BT={__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"})),g=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 p(y){y===Bt.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(Uh,{game:s.game,"is-landing-mode":s.isLandingMode},null,8,["game","is-landing-mode"]),n.createElementVNode("div",fT,[n.createVNode(jh,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(zh)(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",pT,[s.game.home_team?(n.openBlock(),n.createBlock(JE,{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:p},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",gT,[n.createVNode(jh,{status:s.game.game_status,"is-live":!!s.game.is_live,"date-time-millis":s.game.dateTimeMillis,"round-abbreviation":n.unref(zh)(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",yT,[n.createVNode(Uh,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(g.value)},[!o.value&&(s.game.game_status===4||s.game.is_live)?(n.openBlock(),n.createElementBlock("span",bT,n.toDisplayString(s.game.tv_stations.join(", ")),1)):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",ST,[s.game.home_team?(n.openBlock(),n.createBlock(mT,{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:p},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",_T,[wT,n.createElementVNode("div",{class:n.normalizeClass(["game-events",u.value.events])},[kT,n.createElementVNode("div",ET,[n.createElementVNode("div",TT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.homeTeam,(S,w)=>(n.openBlock(),n.createElementBlock("div",{key:`h${w}`,class:"game-events__data__team__event"},[n.createElementVNode("img",{src:S.iconUrl},null,8,CT),n.createElementVNode("div",xT,n.toDisplayString(S.text),1)]))),128))]),n.createElementVNode("div",vT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.awayTeam,(S,w)=>(n.openBlock(),n.createElementBlock("div",{key:`a${w}`,class:"game-events__data__team__event"},[n.createElementVNode("div",AT,n.toDisplayString(S.text),1),n.createElementVNode("img",{src:S.iconUrl},null,8,LT)]))),128))])]),IT,RT],2)],512),[[n.vShow,i.value]])]),_:1})],4))}},Hh=Rt(BT,[["__scopeId","data-v-2968a2f6"]]),NT={class:"calendar-table"},DT={__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",NT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.gamesPerPage,(l,d)=>(n.openBlock(),n.createBlock(Hh,{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))]))}},PT=Rt(DT,[["__scopeId","data-v-c7bf1232"]]),OT={class:"calendar-by-team"},FT={class:"playing-as-picker"},MT={class:"calendar-by-team__page"},VT={__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 g=Number(u),m=Number.isNaN(g)?u:`Jornada ${g<10?"0":""}${g}`,p=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 p.length>0&&h.push({roundName:m,games:p}),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",OT,[n.createElementVNode("div",FT,[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(Fh),{"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,g=>(n.openBlock(),n.createBlock(Hh,{key:g.game_id,game:g,"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"])]))}},$T=Rt(VT,[["__scopeId","data-v-6e0e406c"]]),zT="_liveMinutes_1utnm_2",UT="_viewButtomEvent_1utnm_6",GT="_containerEvents_1utnm_20",jT="_sepEvents_1utnm_26",HT="_goalsContainer_1utnm_36",WT="_yellowContainer_1utnm_44",KT="_redContainer_1utnm_52",qT="_containerEventsGameHometeam_1utnm_60",YT="_containerEventsGameAwayteam_1utnm_73",JT="_image62Icon_1utnm_86",XT="_imgChivasIcon_1utnm_95",ZT="_nameDesktop_1utnm_102",QT="_nameMobile_1utnm_115",eC="_homeTeam_1utnm_127",tC="_sbado16De_1utnm_138",sC="_gameDate_1utnm_147",aC="_sab16092023_1utnm_151",nC="_div_1utnm_164",iC="_divscore_1utnm_173",oC="_cst_1utnm_183",rC="_hour_1utnm_192",lC="_score_1utnm_193",cC="_chivasTvCanal_1utnm_204",dC="_gameStatus_1utnm_216",hC="_matchInfo_1utnm_227",uC="_image62Icon1_1utnm_241",mC="_name_1utnm_102",fC="_imgAtlasIcon_1utnm_263",pC="_name1_1utnm_270",gC="_awayTeam_1utnm_282",yC="_matchCard_1utnm_293",bC={liveMinutes:zT,viewButtomEvent:UT,containerEvents:GT,sepEvents:jT,goalsContainer:HT,yellowContainer:WT,redContainer:KT,containerEventsGameHometeam:qT,containerEventsGameAwayteam:YT,image62Icon:JT,imgChivasIcon:XT,nameDesktop:ZT,nameMobile:QT,homeTeam:eC,sbado16De:tC,gameDate:sC,sab16092023:aC,div:nC,divscore:iC,cst:oC,hour:rC,score:lC,chivasTvCanal:cC,gameStatus:dC,matchInfo:hC,image62Icon1:uC,name:mC,imgAtlasIcon:fC,name1:pC,awayTeam:gC,matchCard:yC},SC=["src"],_C=["src"],wC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),kC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),EC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),TC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),CC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},null,-1),xC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},null,-1),vC=n.createElementVNode("img",{src:"http://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),AC={key:0},LC=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),RC=["src"],BC=["src"],NC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},DC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/red_card.png"},PC={key:0,width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/yellow_card.png"},OC=n.createElementVNode("img",{width:"10",src:"https://az755631.vo.msecnd.net/todoelfut/players-goals-con-goles.png"},null,-1),FC=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),VC={__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 g=!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&&(g=!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])),g?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 g=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],m=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${g[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(Ms)(r.value.home_team.team_id,150)},null,10,SC),n.createElementVNode("img",{class:n.normalizeClass(h.$style.imgChivasIcon),alt:"",src:n.unref(Ms)(r.value.home_team.team_id)},null,10,_C),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)},[wC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_goals_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),g!=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)},[kC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_red_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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)},[EC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.home_yellow_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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)},[TC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].goals),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),g!=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)},[CC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].red),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),g!=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)},[xC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.home_team.team_id].yellow),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.home_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),g!=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)},[vC,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))},[LC,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(Ms)(r.value.visiting_team.team_id,150)},null,10,RC),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(Ms)(r.value.visiting_team.team_id)},null,10,BC),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",NC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.visiting_goals_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f).replace("(AG)","")),1),g!=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",DC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_red_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f)),1),g!=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",PC)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value.minutes.away_yellow_cards_minutes,(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(l(f))+"'",1),g!=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)},[OC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].goals),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].goals[f].event.map(m=>`${m}'`).join(", ").replace("(AG)","")),1),g!=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)},[FC,(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(s.playsLive[s.game.visiting_team.team_id].red),(f,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].red[f].event.map(m=>`${m}'`).join(", ")),1),g!=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,g)=>(n.openBlock(),n.createElementBlock("div",{key:g},[n.createTextVNode(n.toDisplayString(s.playsLive[s.game.visiting_team.team_id].yellow[f].event.map(m=>`${m}'`).join(", ")),1),g!=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))}},$C={$style:bC},zC=Rt(VC,[["__cssModules",$C]]),UC={class:"calendar-by-game__carousel"},GC="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",jC={__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),g=n.ref(null),m=n.ref(null),p=n.ref(null),y=n.ref([]),b=n.ref(new Map),S=n.ref(new Set),w=n.computed(()=>t.isCup),x=n.computed(()=>t.isCupLegacy),E=n.computed(()=>({height:t.height,width:t.width})),v=n.computed(()=>{if(t.games)return Fe(t.games,t.isTeamGamePerPage);{const U=u.value.get(h.value.key);return U&&t.isTeamGamePerPage&&t.onlyGamesTeamId?[U[0].filter(q=>q.home_team.team_id===t.onlyGamesTeamId||q.visiting_team.team_id===t.onlyGamesTeamId)]:U||[]}}),T=n.computed(()=>t.areGamesCarouselType?v.value[0]:v.value),R=n.ref([]),L=n.ref(new Map),B=n.ref([]),M=n.ref(0),W=n.ref(0),j=n.computed(()=>{const U=oe(l.value),q=R.value.find(G=>G.key===U);return q&&f.value&&(se(!1),ct(q)),U});n.watch(()=>t.seasons,U=>{U&&U.length&&(se(!0),r.value=U.map(q=>q.id),he(U,!0))},{immediate:!0,deep:!0}),n.watch(u,U=>{if(t.onlyGamesTeamId&&U.size){const q=Array.from(U.values()).reduce((G,V)=>(V.forEach(te=>{const ie=te.find(be=>be.home_team.team_id===t.onlyGamesTeamId||be.visiting_team.team_id===t.onlyGamesTeamId);ie&&G.push(ie)}),G),[]);e("change-games-by-client-privileges",q)}},{immediate:!0});function se(U){f.value=U}function oe(U){const q=new Date().valueOf(),G=Object.entries(Object.entries(U).reduce((te,[ie,be])=>(te[ie]=null,be.forEach(Oe=>{Oe.games.forEach(Je=>{const sa=[1,0].includes(Je.game_status)||Je.is_live;if(B.value.length&&W.value!==M.value?(Je.home_team.team_id===t.userTeamId||Je.visiting_team.team_id===t.userTeamId)&&sa:sa){const us=q-Je.dateTimeMillis;(te[ie]===null||us<te[ie])&&(te[ie]=us)}})}),te),{}));if(!G.length)return"1";const V=G.reduce((te,[ie,be])=>{if(be!==null){const Oe=L.value.get(ie);(te.shortestMillisToNow===null||be<te.shortestMillisToNow&&Oe.index>=te.scheduleKey.index)&&(te.shortestMillisToNow=be,te.round=ie,te.scheduleKey=Oe)}return te},{round:"",shortestMillisToNow:null,scheduleKey:null});return V.shortestMillisToNow!==null?V.round:G[G.length-1][0]}n.watch(()=>t.teamId,()=>{Te()},{immediate:!0});async function ne(U,q,G=""){let V=G;try{const te={};t.token&&(te.Authorization=t.token),V||(V="https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",U.forEach((Oe,Je)=>{V+=`${Je===0?"":"&"}seasons=${Oe}`}));const{data:{data:ie,teams:be}}=await yn.get(V,{headers:te});return{seasonsAndGames:ie,seasonsAndTeams:be}}catch(te){if(q>0)return ne(U,q-1,V);throw new Error(te)}}function de(U){for(const q of U)if(!r.value.includes(q.season_id))return!0;return!1}async function he(U,q){try{l.value={},W.value=0,M.value=0;let G=0;const{seasonsAndGames:V,seasonsAndTeams:te}=await ne(U.map(be=>be.id),3);if(q&&de(V))return;V.forEach(be=>{const{type:Oe}=U.find(Je=>Je.id===be.season_id);be.type=Oe,be.games.forEach(Je=>{W.value++,([1,0].includes(Je.game_status)||Je.is_live)&&M.value++,Je.season_id=be.season_id}),Oe===0&&(G=be.season_id)}),g.value={seasonsGames:V};const{teams:ie}=te.find(be=>be.season_id===G);m.value=ie,e("change-teams",ie),Te(),S.value.size?ue():await J()}catch(G){throw new Error(G)}}async function J(){try{const U=await Ce(),q=new Set;if(y.value=U.data.reduce((G,V)=>(V.games.forEach(te=>{q.add(te.game_id),G.push(te)}),G),[]),y.value.length){i||await K();const G=[];S.value.forEach(V=>{const te=b.value.get(V);te&&new Date().valueOf()>te.dateTimeMillis&&G.push(V)}),G.length&&G.every(V=>b.value.get(V).isLiveTracked)&&re()}}catch(U){throw new Error(U)}}async function K(){try{const U=[];for(const G of y.value){const V=b.value.get(G.game_id);V&&(V.is_live=1,V.game_status=4,V.scheduleKey&&V.scheduleKey.liveGamesIds.add(G.game_id)),V.isLiveTracked=!0,U.push(ee(G.game_id))}const q=await Promise.all(U);for(const G of q){const V=b.value.get(G.game_id);if(V){const te=[Number(G.score[V.home_team.team_id.toString()])+Number(G.score[`own_${V.visiting_team.team_id.toString()}`]),Number(G.score[V.visiting_team.team_id.toString()])+Number(G.score[`own_${V.home_team.team_id.toString()}`])],ie=te[0],be=te[1];V.score=[Number.isNaN(ie)?0:ie,Number.isNaN(be)?0:be],xe(V,G.plays)}}i||X()}catch(U){throw new Error(U)}}function ue(){S.value.size&&S.value.forEach(U=>{const q=b.value.get(U);if(q){const G=new Date().valueOf();if(60*1e3*30+q.dateTimeMillis-G>0){const V=q.dateTimeMillis-G-3e5;setTimeout(()=>{Y()},V>0?V:0)}}})}function Y(){re(),o||(o=setInterval(()=>{J()},t.checkLiveGamesIntervalMinutes*60*1e3))}function X(){ye(),i=setInterval(()=>{K()},t.gamesEventsIntervalMinutes*60*1e3)}function re(){clearInterval(o),o=null}function ye(){clearInterval(i),i=null}function xe(U,q){for(const G of q)if(G.category_id===0&&G.game_status_id===13){const V=b.value.get(G.game_id);y.value=y.value.filter(te=>te.game_id!==U.game_id),V.is_live=0,V.game_status=0,V.scheduleKey&&V.scheduleKey.liveGamesIds.delete(U.game_id)}}async function ee(U){try{return(await yn.get(`${GC}${U}`,{headers:{Authorization:`${t.token}`}})).data}catch(q){throw new Error(q)}}async function Ce(){try{if(t.seasons.length===0)return[];const U=t.seasons.reduce((V,te)=>`${V}seasons=${te.id}&`,""),q=yn.create({headers:{Authorization:`${t.token}`}}),{data:G}=await q.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${U}`);return G}catch(U){throw new Error(U)}}function Te(){if(re(),!m.value)return;b.value.clear(),S.value.clear(),B.value=[];const U=g.value&&g.value.seasonsGames?g.value.seasonsGames.map(q=>{const G=q.games.reduce((V,te)=>{if(t.onlyGamesTeamId&&t.onlyGamesTeamId!==te.home_team&&t.onlyGamesTeamId!==te.visiting_team)return V;const ie={...te},be=new Date,[Oe,Je,sa]=ie.date.split("-"),[us,Ai,Rs]=ie.schedule.split(":"),Li=new Date(Number(Oe),Number(Je)-1,Number(sa),Number(us),Number(Ai),Number(Rs));return ie.dateTimeMillis=Li.valueOf(),ie.home_team=m.value.find(Ql=>Ql.team_id===te.home_team),ie.visiting_team=m.value.find(Ql=>Ql.team_id===te.visiting_team),ie.game_status===4&&be.getFullYear()===Li.getFullYear()&&be.getMonth()===Li.getMonth()&&be.getDate()===Li.getDate()&&S.value.add(ie.game_id),b.value.set(ie.game_id,ie),t.teamId&&ie.home_team.team_id!==t.teamId&&ie.visiting_team.team_id!==t.teamId||(V[te.matchday_abbreviation]?V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date]?V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date].push(ie):V[te.matchday_abbreviation][te.game_status===3?"canceled":te.date]=[ie]:V[te.matchday_abbreviation]={[te.game_status===3?"canceled":te.date]:[ie]},t.userTeamId&&([1,0].includes(ie.game_status)||ie.is_live)&&(ie.home_team.team_id===t.userTeamId||ie.visiting_team.team_id===t.userTeamId)&&B.value.push(ie)),V},{});for(let[V,te]of Object.entries(G))G[V]=Object.entries(te).map(([ie,be])=>({date:ie,games:be.sort((Oe,Je)=>Oe.dateTimeMillis-Je.dateTimeMillis)})),G[V].sort((ie,be)=>ie.date<be.date?-1:ie.date>be.date?1:0);return{type:q.type,weight:q.type===0?0:q.type===2?1:2,schedule:G}}):[];U.sort((q,G)=>q.weight-G.weight),l.value=U.reduce((q,G)=>{for(const[V,te]of Object.entries(G.schedule))if(G.type===0)if([1,2].includes(t.tournamentType)){const ie=eE.get(t.tournamentType);if(ie){const be=ie.get(V);be&&(q[be.matchDayAbbreviation]=te)}}else if(w.value){const ie=V.replace("M",""),be=ie;x.value?q[Qk[ie]||be]=te:q[Zk[V]||be]=te}else q[Number(V.replace("M","")).toString()]=te;else G.type===2?V.charAt(1)=="I"?q[`PI${Number(V.replace("PI",""))}`]=te:q[`R${Number(V.replace("PO",""))}`]=te:G.type===1&&(q[Xk[V]]=te);return q},{}),u.value=new Map,L.value.clear(),R.value=Array.from(Object.entries(l.value).reduce((q,[G,V],te)=>{const ie=Number(G);let be="";Number.isNaN(ie)?be=G:be=ie<10?`0${ie}`:G;const Oe={key:G,value:ie,valueText:be,index:te,liveGamesIds:new Set};L.value.set(G,Oe),q.set(G,Oe);const Je=V.reduce((us,Ai)=>(Ai.games.forEach(Rs=>{Rs.game_id===t.defaultGameId&&(p.value=G),Rs.roundAbbreviation=Number.isNaN(ie)?ie:`J ${ie}`,Rs.scheduleKey=Oe,Rs.is_live&&Oe.liveGamesIds.add(Rs.game_id)}),us=us.concat(Ai.games),us),[]),sa=Fe(Je);return u.value.set(G,sa),q},new Map).values())}function Fe(U,q=!1){const G=[];if(t.gamesPerMatchDay>0){let V=[];U.forEach((te,ie)=>{V.push(te),(ie+1)%t.gamesPerMatchDay===0&&(G.push([...V]),V=[])}),V.length&&G.push([...V])}else G.push(U);return q&&t.isTeamGamePerPage&&t.defaultGameId?G.filter(V=>V.game_id===t.defaultGameId||V.gameId===t.defaultGameId):G}async function at(U){try{const{data:q}=await yn.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return q}catch(q){if(U>0)return at(U-1);throw new Error(q)}}function lt(){if(window.ResizeObserver)a=new ResizeObserver(()=>{d.value=c.value.clientWidth}),a.observe(c.value);else throw new Error("Resize observer not supported!")}function ct(U){h.value.value!==U.value&&(h.value=U,e("change-round",U))}function C(U){t.areGamesCarouselType&&e("change-game-carousel",U.selectedItem)}function H(U){e("action",U),me(U)}function z(U){e("open-modal-event",U)}function me(U){const q="PLAY_RESUME",G="PLAY_GOALS",V=[607,608,12,55,54,35,14,52,15,53,466,477],te=[12,55,"35_r","54_r"],{game_id:ie,season_id:be}=U.game;let Oe={seasonId:be,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[ie],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};U.action===q?(Oe.categoryIds=V,Oe.advancedFilter.playListTitle="Resumen",e("openmedia",Oe)):U.action===G&&(Oe.categoryIds=te,Oe.advancedFilter.playListTitle="Goles",e("openmedia",Oe))}async function Ye(){try{if(!t.awaitForSeasons&&!t.games){const U=(await at(3)).find(V=>V._id===1),q=U.seasons[0],G=[{id:q.id,type:q.type}];U&&U.tournament&&e("tournament-selected",U.tournament),q.related_seasons&&q.related_seasons.length&&G.push(...q.related_seasons.map(V=>({id:V.id,type:V.type}))),await he(G,!1)}}catch(U){throw new Error(U)}}return n.onMounted(()=>{lt()}),Ye(),(U,q)=>(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($T,{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:H},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&&R.value?(n.openBlock(),n.createBlock(_E,{key:0,"match-days":R.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":p.value,"closest-match-day":s.sortCalendar?j.value:"",onChangeMatchDay:ct},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",UC,[v.value?(n.openBlock(),n.createBlock(n.unref(Fh),{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:C},{default:n.withCtx(({item:G})=>[s.areGamesCarouselType?(n.openBlock(),n.createBlock(zC,{key:0,is_captured:s.is_captured,game:G,onOpenModalEvent:z,"plays-live":s.playsLive,"info-live":s.infoLive},null,8,["is_captured","game","plays-live","info-live"])):(n.openBlock(),n.createBlock(PT,{key:1,"team-id":s.teamId,"show-videos":s.showVideos,"games-per-page":G,"is-landing-mode":s.isLandingMode,"row-height":s.rowHeight,"component-width":d.value,"is-round-mode":s.isRoundMode,onAction:H},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))}},HC=Rt(jC,[["__scopeId","data-v-c839e786"]]),WC=["Mi posición","Tabla General","Fases","Play Off"],KC={components:{GscSwitchComponent:To,GSCGeneraltable:ww,GSCCalendarByGame:HC},props:{privileges:{type:Object,default:()=>{}},isPublic:{type:Boolean,default:!0},isPlayer:{type:Boolean,default:!1},isPlayerTournament:{type:Boolean,default:!1},isGeneric:{type:Boolean,default:!1},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 WC.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"}},qC={key:0,class:"gsc-switch-container"},YC={class:"gsc-app-component"},JC={key:0};function XC(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",{key:1,class:n.normalizeClass(["gsc-switch-container",t.isPlayer&&t.isPlayerTournament||!t.isGeneric?"gsc-switch-container-player":""])},[t.isPlayerTournament?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t.isPublic?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Tabla General")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t.isGeneric?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode("Tabla General")],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Mi posición")],64))],64))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode("Tabla General")],64))],2)):(n.openBlock(),n.createElementBlock("div",qC,[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",YC,[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",JC,[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 ZC=Xe(KC,[["render",XC],["__scopeId","data-v-3ab04a5e"]]),Wh=["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],Kh=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],qh=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],QC={class:"match"},ex={class:"match__header"},tx={key:0,class:"match__final-tag"},sx={key:1,class:"match__final-tag__no-border"},ax={class:"match__header__match-date"},nx={class:"match__tag"},ix={class:"match__body"},ox={class:"match__data"},rx={class:"match__acronym"},lx=["src"],cx={class:"match__score"},dx=["src"],hx={class:"match__acronym"},ux={class:"match__status"},Sn=Xe({__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`${Wh[a.getDay()]}, ${a.getDate()} de ${Kh[a.getMonth()]}`});return(a,i)=>{var o,r,l;return n.openBlock(),n.createElementBlock("section",QC,[n.createElementVNode("div",ex,[s.infoType=="postmatch"?(n.openBlock(),n.createElementBlock("div",tx,"FINAL")):(n.openBlock(),n.createElementBlock("div",sx)),n.createElementVNode("div",ax,n.toDisplayString(t.value),1),n.createElementVNode("div",nx,n.toDisplayString(`${Number.isNaN(Number(s.data.roundAbbreviationV2))?"":"J"}${s.data.roundAbbreviationV2}`),1)]),n.createElementVNode("div",ix,[n.createElementVNode("div",ox,[n.createElementVNode("div",rx,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,lx),n.createElementVNode("div",cx,[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,dx),n.createElementVNode("div",hx,n.toDisplayString((l=s.data)==null?void 0:l.visiting_team_acronym),1)]),n.createElementVNode("div",ux,[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"]]),Yh=s=>(n.pushScopeId("data-v-540e357c"),s=s(),n.popScopeId(),s),mx=["src"],fx=["src"],px={class:"coming-match__body"},gx={class:"coming-match__data"},yx=["src"],bx={key:0,class:"coming-match__live"},Sx={class:"coming-match__live__score"},_x={class:"coming-match__live__time"},wx=Yh(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),kx=Yh(()=>n.createElementVNode("div",{class:"coming-match__live__time__text"},"LIVE",-1)),Ex={class:"coming-match__live__time__time"},Tx={key:1,style:{"margin-top":"16px"}},Cx={class:"coming-match__time"},xx={class:"coming-match__cst"},vx={key:0},Ax=["src"],Vs=Xe({__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`${Wh[i.getDay()]}, ${i.getDate()} de ${e.small?qh[i.getMonth()]:Kh[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,g,m,p,y,b,S,w,x;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,mx),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,fx),n.createElementVNode("div",px,[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",gx,[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,yx),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",bx,[n.createElementVNode("div",Sx,n.toDisplayString((g=s.data)==null?void 0:g.score[0])+" - "+n.toDisplayString((m=s.data)==null?void 0:m.score[1]),1),n.createElementVNode("div",_x,[wx,kx,n.createElementVNode("div",Ex,n.toDisplayString(s.data.currentTimeLive||"0'"),1)])])):(n.openBlock(),n.createElementBlock("div",Tx,[n.createElementVNode("div",Cx,[s.data.game_status!==4?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((p=s.data)==null?void 0:p.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",xx,[s.data.game_status===4?(n.openBlock(),n.createElementBlock("span",vx,"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/"+((w=s.data)==null?void 0:w.visiting_team.team_id)+".png":"https://az755631.vo.msecnd.net/teams-80/"+((x=s.data)==null?void 0:x.visiting_team)+".png",alt:"team-img"},null,10,Ax)],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"]]),_n=s=>(n.pushScopeId("data-v-29e46fdd"),s=s(),n.popScopeId(),s),Lx={class:"game-item__header"},Ix={class:"game-item__header__info text-type-1"},Rx={key:0,class:"game-item__header__info__live text-live"},Bx=_n(()=>n.createElementVNode("div",{class:"game-item__header__info__live__status"},[n.createElementVNode("div",{class:"bullet"}),n.createElementVNode("span",null,"LIVE")],-1)),Nx={class:"current-time"},Dx={key:1,class:"game-item__header__info__pre-match text-type-2"},Px=_n(()=>n.createElementVNode("span",{class:"game-item__header__info__pre-match text-type-1"},[n.createTextVNode(" "),n.createElementVNode("small",null,"CST")],-1)),Ox={key:2,class:"game-item__header__info__post-match"},Fx=[_n(()=>n.createElementVNode("span",{class:"text-type-2"},"Finalizado",-1))],Mx={class:"game-item__body"},Vx={class:"game-item__body__team__info"},$x=["src"],zx={class:"game-item__body__team__info__acronym"},Ux={class:"game-item__body__team__score"},Gx=_n(()=>n.createElementVNode("div",{class:"game-item__footer"},[n.createElementVNode("div",null,"Ver →")],-1)),jx=Xe({__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()} ${qh[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}]),onClick:r},[n.createElementVNode("div",Lx,[n.createElementVNode("div",Ix,n.toDisplayString(a.value),1),s.game.is_live?(n.openBlock(),n.createElementBlock("div",Rx,[Bx,n.createElementVNode("div",Nx,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),Px])):(n.openBlock(),n.createElementBlock("div",Ox,Fx))]),n.createElementVNode("div",Mx,[(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",Vx,[n.createElementVNode("img",{src:c.teamLogo,alt:"team-logo"},null,8,$x),n.createElementVNode("div",zx,n.toDisplayString(c.acronym),1)]),n.createElementVNode("div",Ux,[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))]),Gx],2))}},[["__scopeId","data-v-29e46fdd"]]),Hx=Xe({__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 We={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:We.itemsToShow,type:Number},itemsToScroll:{default:We.itemsToScroll,type:Number},wrapAround:{default:We.wrapAround,type:Boolean},throttle:{default:We.throttle,type:Number},snapAlign:{default:We.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:We.transition,type:Number},breakpoints:{default:We.breakpoints,type:Object},autoplay:{default:We.autoplay,type:Number},pauseAutoplayOnHover:{default:We.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:We.mouseDrag,type:Boolean},touchDrag:{default:We.touchDrag,type:Boolean},dir:{default:We.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:We.i18n,type:Object},settings:{default(){return{}},type:Object}};function Wx({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 Kx({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 Yo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function qx({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:Yo({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 Jo({val:s,max:e,min:t=0}){return s>e?Jo({val:s-(e+1),max:e,min:t}):s<t?Jo({val:s+(e+1),max:e,min:t}):s}function Yx(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function Jx(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function Xx(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Zx=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},We))),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"},Xx(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Qx=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({},We));let h=Object.assign({},We),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),g=n.ref(0),m=n.ref(0),p=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",p),n.provide("minSlide",y),n.provide("slideWidth",l);function w(){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 x(){if(!u||!Object.keys(u).length)return;const C=Object.keys(u).map(z=>Number(z)).sort((z,me)=>+me-+z);let H=Object.assign({},h);C.some(z=>{const me=window.matchMedia(`(min-width: ${z}px)`).matches;return me&&(H=Object.assign(Object.assign({},H),u[z])),me}),E(H)}function E(C){Object.entries(C).forEach(([H,z])=>c[H]=z)}const v=Jx(()=>{x(),R(),T()},16);function T(){if(!o.value)return;const C=o.value.getBoundingClientRect();l.value=C.width/c.itemsToShow}function R(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=Wx({config:c,slidesCount:d.value}),y.value=Kx({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Yo({val:f.value,max:p.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),x(),K(),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 B={x:0,y:0},M={x:0,y:0},W=n.reactive({x:0,y:0}),j=n.ref(!1),se=n.ref(!1),oe=()=>{j.value=!0},ne=()=>{j.value=!1};function de(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(L=C.type==="touchstart",L||C.preventDefault(),!(!L&&C.button!==0||Y.value)&&(B.x=L?C.touches[0].clientX:C.clientX,B.y=L?C.touches[0].clientY:C.clientY,document.addEventListener(L?"touchmove":"mousemove",he,!0),document.addEventListener(L?"touchend":"mouseup",J,!0)))}const he=Yx(C=>{se.value=!0,M.x=L?C.touches[0].clientX:C.clientX,M.y=L?C.touches[0].clientY:C.clientY;const H=M.x-B.x,z=M.y-B.y;W.y=z,W.x=H},c.throttle);function J(){const C=c.dir==="rtl"?-1:1,H=Math.sign(W.x)*.4,z=Math.round(W.x/l.value+H)*C;if(z&&!L){const me=Ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}X(f.value-z),W.x=0,W.y=0,se.value=!1,document.removeEventListener(L?"touchmove":"mousemove",he,!0),document.removeEventListener(L?"touchend":"mouseup",J,!0)}function K(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&j.value||re()},c.autoplay))}function ue(){b&&(clearInterval(b),b=null),K()}const Y=n.ref(!1);function X(C){const H=c.wrapAround?C:Yo({val:C,max:p.value,min:y.value});f.value===H||Y.value||(t("slide-start",{slidingToIndex:C,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!0,g.value=f.value,f.value=H,S=setTimeout(()=>{if(c.wrapAround){const z=Jo({val:H,max:p.value,min:0});z!==f.value&&(f.value=z,t("loop",{currentSlideIndex:f.value,slidingToIndex:C}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!1,ue()},c.transition))}function re(){X(f.value+c.itemsToScroll)}function ye(){X(f.value-c.itemsToScroll)}const xe={slideTo:X,next:re,prev:ye};n.provide("nav",xe),n.provide("isSliding",Y);const ee=n.computed(()=>qx({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",ee);const Ce=n.computed(()=>{const C=c.dir==="rtl"?-1:1,H=ee.value*l.value*C;return{transform:`translateX(${W.x-H}px)`,transition:`${Y.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),x(),R(),T(),ue()}Object.keys(Jh).forEach(C=>{["modelValue"].includes(C)||n.watch(()=>s[C],Te)}),n.watch(()=>s.modelValue,C=>{C!==f.value&&X(Number(C))}),n.watch(d,R),t("before-init"),w();const Fe={config:c,slidesCount:d,slideWidth:l,next:re,prev:ye,slideTo:X,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:x,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:w,restartCarousel:Te,slideTo:X,next:re,prev:ye,nav:xe,data:Fe});const at=e.default||e.slides,lt=e.addons,ct=n.reactive(Fe);return()=>{const C=Xh(at==null?void 0:at(ct)),H=(lt==null?void 0:lt(ct))||[];C.forEach((U,q)=>U.props.index=q);let z=C;if(c.wrapAround){const U=C.map((G,V)=>n.cloneVNode(G,{index:-C.length+V,isClone:!0,key:`clone-before-${V}`})),q=C.map((G,V)=>n.cloneVNode(G,{index:C.length+V,isClone:!0,key:`clone-after-${V}`}));z=[...U,...C,...q]}r.value=C,d.value=Math.max(C.length,1);const me=n.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ye=n.h("div",{class:"carousel__viewport"},me);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":Y.value,"is-dragging":se.value,"is-hover":j.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ne},[Ye,H,n.h(Zx)])}}}),Xo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Xo||(Xo={}));const ev={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 tv(s){return s in Xo}const Zo=s=>{const e=n.inject("config",n.reactive(Object.assign({},We))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!tv(t))return;const i=ev[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])};Zo.props={name:String,title:String};const sv=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},We))),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,g=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(Zo,{name:g?"arrowRight":"arrowLeft"})),p=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(Zo,{name:g?"arrowLeft":"arrowRight"}));return[m,p]};var av=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({},We))),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 Zh=s=>(n.pushScopeId("data-v-b3e14252"),s=s(),n.popScopeId(),s),nv={key:1,class:"match-day__live"},iv=[Zh(()=>n.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),Zh(()=>n.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],ov=Xe({__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)&&!s.matchDay.liveGamesIds.size?(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)):s.matchDay.liveGamesIds.size?(n.openBlock(),n.createElementBlock("div",nv,iv)):n.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-b3e14252"]]),Qh=Xe({__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((g,m)=>g.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(Qx),n.mergeProps(o.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:a,key:i.value}),{addons:n.withCtx(()=>[n.createVNode(n.unref(sv))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,f=>(n.openBlock(),n.createBlock(n.unref(av),{key:f.key},{default:n.withCtx(()=>[n.createVNode(ov,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"]]),rv=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function eu(){return"https://az755631.vo.msecnd.net/golstats-app/"}function lv(s){return rv[s]}function cv(){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 Qo(){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 dv(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 ws=s=>(n.pushScopeId("data-v-6ae93ec8"),s=s(),n.popScopeId(),s),hv={class:"quadrant-matches"},uv={class:"quadrant-matches__header"},mv={class:"quadrant-matches__header__pc"},fv={class:"title-and-switch"},pv={class:"quadrant-matches__title"},gv={key:0,class:"quadrant-matches__header__games-type"},yv=ws(()=>n.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),bv={class:"quadrant-matches__header__games-type__logo"},Sv=["src"],_v={class:"quadrant-matches__header__games-type__switch"},wv={class:"quadrant-matches__header__games-type__logo"},kv=["src"],Ev={key:0,class:"quadrant-matches__header__my-team"},Tv=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],Cv={key:1,class:"quadrant-matches__header__my-team"},xv=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],vv={class:"quadrant-matches__header__mobile"},Av=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],Lv={key:0,class:"quadrant-matches__body"},Iv={class:"quadrant-matches__body",style:{"column-gap":"16px"}},Rv={class:"quadrant-matches__body matches"},Bv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},Nv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},Dv=Xe({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},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=n.ref(!0),i=n.toRef(t,"componentWidth"),o=n.computed(()=>i.value<768);n.watch(a,c=>{e("change-is-league-selected",c)}),n.watch(()=>t.currentSeason,c=>{c&&(a.value=!0)}),n.watch(()=>t.currentTournament,c=>{c&&(a.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{a.value=!0,console.log("Emitt0 change-is-league-selected",!0),e("change-is-league-selected",!0)},300))});function r(c){e("change-match-day",c)}function l(c){a.value=c}function d(){a.value=!0,setTimeout(()=>{e("click-live")},500)}return n.onMounted(()=>{console.log("props.currentTournament.id === props.user.tournament",t.currentTournament.id,t.user.tournament)}),(c,h)=>(n.openBlock(),n.createElementBlock("section",hv,[n.createElementVNode("div",uv,[n.createElementVNode("div",mv,[n.createElementVNode("div",fv,[n.createElementVNode("h2",pv,n.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",Cv,[n.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},xv)])):n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",gv,[yv,n.createElementVNode("div",bv,[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,Sv)):n.createCommentVNode("",!0)]),n.createElementVNode("div",_v,[n.createVNode(Hx,{"model-value":a.value,"onUpdate:modelValue":l},null,8,["model-value"])]),n.createElementVNode("div",wv,[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,kv)):n.createCommentVNode("",!0)]),s.currentTournament?(n.openBlock(),n.createElementBlock("div",Ev,[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:d},Tv)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]))]),n.createElementVNode("div",vv,[s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},Av)):n.createCommentVNode("",!0)])]),(s.isFull||a.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(n.openBlock(),n.createBlock(Qh,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!o.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:r},null,8,["match-days","is-landing-mode","default-match-day-key"])):n.createCommentVNode("",!0),!s.isFull&&!a.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[o.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createBlock(n.unref(ra),{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",Iv,[n.createVNode(Vs,{small:"",data:s.data.data.prematch,onClickMatch:h[3]||(h[3]=u=>c.$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(Sn,{key:0,data:s.data.data.postmatch,onClickMatch:h[4]||(h[4]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(Sn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:h[5]||(h[5]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",Lv,[n.createVNode(Vs,{data:s.data.data.prematch,onClickMatch:h[0]||(h[0]=u=>c.$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(Sn,{key:0,data:s.data.data.postmatch,onClickMatch:h[1]||(h[1]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(Sn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:h[2]||(h[2]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):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(ra),{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",Rv,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(u,f)=>(n.openBlock(),n.createBlock(jx,{key:f,game:u,onClickMatch:g=>c.$emit("clickMatch",u)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[o.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",Nv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Vs,{key:0,data:s.data[0],small:"",onClickMatch:h[8]||(h[8]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Vs,{key:1,data:s.data[0],small:"",onClickMatch:h[9]||(h[9]=u=>c.$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",Bv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Vs,{key:0,data:s.data[0],small:"",onClickMatch:h[6]||(h[6]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Vs,{key:1,data:s.data[0],small:"",onClickMatch:h[7]||(h[7]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64))],64))],64)):n.createCommentVNode("",!0)]))}},[["__scopeId","data-v-6ae93ec8"]]),Pv={__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:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(n.openBlock(),n.createElementBlock("main",null,[n.createVNode(Dv,{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-season":s.currentSeason,"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-season","current-tournament","is-live-button-visible"])]))}},Ov="_toniKroos_ov00i_18",Fv="_centralMidfielder_ov00i_28",Mv="_icnPlayIcon_ov00i_38",Vv="_verVideos_ov00i_45",$v="_btnVideosOptions_ov00i_55",zv="_btnVideosOptionsTeams_ov00i_70",Uv="_info_ov00i_90",Gv="_goalUnlock_ov00i_102",jv="_teamsAmerica_ov00i_115",Hv="_imageIcon_ov00i_125",Wv="_imageIconTeam_ov00i_136",Kv="_playerTops_ov00i_148",qv={toniKroos:Ov,centralMidfielder:Fv,icnPlayIcon:Mv,verVideos:Vv,btnVideosOptions:$v,btnVideosOptionsTeams:zv,info:Uv,goalUnlock:Gv,teamsAmerica:jv,imageIcon:Hv,imageIconTeam:Wv,playerTops:Kv},Yv=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Jv={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))}}},Xv=["src"],Zv=["src"],Qv=["src"];function eA(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,Xv)):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,Zv)):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,Qv)],6)}const tA={$style:qv},sA=Yv(Jv,[["render",eA],["__cssModules",tA]]),aA=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},er={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))}}},tu=()=>{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}))},su=er.setup;er.setup=su?(s,e)=>(tu(),su(s,e)):tu;const nA=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),iA=["src"],oA={key:1,class:"text"},rA=["src"],lA={class:"stats"},cA=nA(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),dA={class:"numstats"},hA={class:"leyend"};function uA(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,iA)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",oA,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,rA)):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",lA,[cA,n.createElementVNode("div",dA,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",hA,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const mA=aA(er,[["render",uA],["__scopeId","data-v-fb269a1e"]]);function fA(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 tr={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)}}},au=()=>{n.useCssVars(s=>({"2bf57034":s.backgroundColor,b8f32872:s.widthCircle,23023166:s.heightCircle}))},nu=tr.setup;tr.setup=nu?(s,e)=>(au(),nu(s,e)):au;const pA={key:0,class:"text-left"},gA=["width","src"],yA=["checked"],bA=["width","src"],SA={key:3,class:"text-right"};function _A(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",pA,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,gA)):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,yA),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,bA)):n.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",SA,n.toDisplayString(t.textOptionRight),1)):n.createCommentVNode("",!0)],4)}const sr={components:{GSCSlider:ra,GSCMosaicthebest:sA,GscSwitchComponent:To,GSCButton:mA,GSCRadioToggle:Xe(tr,[["render",_A],["__scopeId","data-v-c2ae0cf9"]])},setup(){const s=n.ref("myDivRef"),{elementSize:e}=fA(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=Ae.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=[],g=[];for(const m in h)f.push(h[m]);for(const m in u)g.push(u[m]);f.sort((m,p)=>m.total<p.total?1:-1),g=g.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=g,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)}}}},iu=()=>{n.useCssVars(s=>({adfeba70:s.backgroundColor,"2e79f680":s.fontFamily,"0f73305d":s.fontSize,"43d82af2":s.fontColor,"675d9676":s.marginMosaic}))},ou=sr.setup;sr.setup=ou?(s,e)=>(iu(),ou(s,e)):iu;const wA={key:0,class:"gsc-best",ref:"myDivRef"},kA={class:"gsc-best__line-bar-tools"},EA={key:0,class:"gsc-best__line-bar-tools__title"},TA={key:1,class:"gsc-best__line-bar-tools__titlefull"},CA={class:"unit-items"},xA={key:2,class:"gsc-best__line-bar-tools__tools"},vA={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},AA={key:1,class:"gsc-best__line-bar-tools__tools__btn"},LA={key:0,class:"gsc-best__line-bar-tools-movil"},IA={class:"gsc-best__line-bar-tools-movil__tabs"},RA={class:"gsc-best__categories"},BA={class:"gsc-best__players"};function NA(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",wA,[n.createElementVNode("div",kA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",EA,[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",TA,[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",CA,[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",xA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",vA,[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",AA,[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",LA,[n.createElementVNode("div",IA,[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",RA,[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",BA,[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 DA=Xe(sr,[["render",NA],["__scopeId","data-v-51e267e2"]]);/**
|
|
32
|
+
*/const We={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:We.itemsToShow,type:Number},itemsToScroll:{default:We.itemsToScroll,type:Number},wrapAround:{default:We.wrapAround,type:Boolean},throttle:{default:We.throttle,type:Number},snapAlign:{default:We.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:We.transition,type:Number},breakpoints:{default:We.breakpoints,type:Object},autoplay:{default:We.autoplay,type:Number},pauseAutoplayOnHover:{default:We.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:We.mouseDrag,type:Boolean},touchDrag:{default:We.touchDrag,type:Boolean},dir:{default:We.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:We.i18n,type:Object},settings:{default(){return{}},type:Object}};function Wx({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 Kx({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 Yo({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function qx({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:Yo({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 Jo({val:s,max:e,min:t=0}){return s>e?Jo({val:s-(e+1),max:e,min:t}):s<t?Jo({val:s+(e+1),max:e,min:t}):s}function Yx(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function Jx(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function Xx(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var Zx=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},We))),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"},Xx(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),Qx=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({},We));let h=Object.assign({},We),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),g=n.ref(0),m=n.ref(0),p=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",p),n.provide("minSlide",y),n.provide("slideWidth",l);function w(){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 x(){if(!u||!Object.keys(u).length)return;const C=Object.keys(u).map(z=>Number(z)).sort((z,me)=>+me-+z);let H=Object.assign({},h);C.some(z=>{const me=window.matchMedia(`(min-width: ${z}px)`).matches;return me&&(H=Object.assign(Object.assign({},H),u[z])),me}),E(H)}function E(C){Object.entries(C).forEach(([H,z])=>c[H]=z)}const v=Jx(()=>{x(),R(),T()},16);function T(){if(!o.value)return;const C=o.value.getBoundingClientRect();l.value=C.width/c.itemsToShow}function R(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=Wx({config:c,slidesCount:d.value}),y.value=Kx({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Yo({val:f.value,max:p.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),x(),K(),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 B={x:0,y:0},M={x:0,y:0},W=n.reactive({x:0,y:0}),j=n.ref(!1),se=n.ref(!1),oe=()=>{j.value=!0},ne=()=>{j.value=!1};function de(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(L=C.type==="touchstart",L||C.preventDefault(),!(!L&&C.button!==0||Y.value)&&(B.x=L?C.touches[0].clientX:C.clientX,B.y=L?C.touches[0].clientY:C.clientY,document.addEventListener(L?"touchmove":"mousemove",he,!0),document.addEventListener(L?"touchend":"mouseup",J,!0)))}const he=Yx(C=>{se.value=!0,M.x=L?C.touches[0].clientX:C.clientX,M.y=L?C.touches[0].clientY:C.clientY;const H=M.x-B.x,z=M.y-B.y;W.y=z,W.x=H},c.throttle);function J(){const C=c.dir==="rtl"?-1:1,H=Math.sign(W.x)*.4,z=Math.round(W.x/l.value+H)*C;if(z&&!L){const me=Ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}X(f.value-z),W.x=0,W.y=0,se.value=!1,document.removeEventListener(L?"touchmove":"mousemove",he,!0),document.removeEventListener(L?"touchend":"mouseup",J,!0)}function K(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&j.value||re()},c.autoplay))}function ue(){b&&(clearInterval(b),b=null),K()}const Y=n.ref(!1);function X(C){const H=c.wrapAround?C:Yo({val:C,max:p.value,min:y.value});f.value===H||Y.value||(t("slide-start",{slidingToIndex:C,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!0,g.value=f.value,f.value=H,S=setTimeout(()=>{if(c.wrapAround){const z=Jo({val:H,max:p.value,min:0});z!==f.value&&(f.value=z,t("loop",{currentSlideIndex:f.value,slidingToIndex:C}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!1,ue()},c.transition))}function re(){X(f.value+c.itemsToScroll)}function ye(){X(f.value-c.itemsToScroll)}const xe={slideTo:X,next:re,prev:ye};n.provide("nav",xe),n.provide("isSliding",Y);const ee=n.computed(()=>qx({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",ee);const Ce=n.computed(()=>{const C=c.dir==="rtl"?-1:1,H=ee.value*l.value*C;return{transform:`translateX(${W.x-H}px)`,transition:`${Y.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),x(),R(),T(),ue()}Object.keys(Jh).forEach(C=>{["modelValue"].includes(C)||n.watch(()=>s[C],Te)}),n.watch(()=>s.modelValue,C=>{C!==f.value&&X(Number(C))}),n.watch(d,R),t("before-init"),w();const Fe={config:c,slidesCount:d,slideWidth:l,next:re,prev:ye,slideTo:X,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:x,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:w,restartCarousel:Te,slideTo:X,next:re,prev:ye,nav:xe,data:Fe});const at=e.default||e.slides,lt=e.addons,ct=n.reactive(Fe);return()=>{const C=Xh(at==null?void 0:at(ct)),H=(lt==null?void 0:lt(ct))||[];C.forEach((U,q)=>U.props.index=q);let z=C;if(c.wrapAround){const U=C.map((G,V)=>n.cloneVNode(G,{index:-C.length+V,isClone:!0,key:`clone-before-${V}`})),q=C.map((G,V)=>n.cloneVNode(G,{index:C.length+V,isClone:!0,key:`clone-after-${V}`}));z=[...U,...C,...q]}r.value=C,d.value=Math.max(C.length,1);const me=n.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ye=n.h("div",{class:"carousel__viewport"},me);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":Y.value,"is-dragging":se.value,"is-hover":j.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ne},[Ye,H,n.h(Zx)])}}}),Xo;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Xo||(Xo={}));const ev={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 tv(s){return s in Xo}const Zo=s=>{const e=n.inject("config",n.reactive(Object.assign({},We))),t=String(s.name),a=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!tv(t))return;const i=ev[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])};Zo.props={name:String,title:String};const sv=(s,{slots:e,attrs:t})=>{const{next:a,prev:i}=e||{},o=n.inject("config",n.reactive(Object.assign({},We))),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,g=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(Zo,{name:g?"arrowRight":"arrowLeft"})),p=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(Zo,{name:g?"arrowLeft":"arrowRight"}));return[m,p]};var av=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({},We))),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 Zh=s=>(n.pushScopeId("data-v-f97685f3"),s=s(),n.popScopeId(),s),nv={key:1,class:"match-day__live"},iv=[Zh(()=>n.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),Zh(()=>n.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],ov=Xe({__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)&&!s.matchDay.liveGamesIds.size?(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)):s.matchDay.liveGamesIds.size?(n.openBlock(),n.createElementBlock("div",nv,iv)):n.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-f97685f3"]]),Qh=Xe({__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((g,m)=>g.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(Qx),n.mergeProps(o.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:a,key:i.value}),{addons:n.withCtx(()=>[n.createVNode(n.unref(sv))]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.matchDays,f=>(n.openBlock(),n.createBlock(n.unref(av),{key:f.key},{default:n.withCtx(()=>[n.createVNode(ov,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"]]),rv=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function eu(){return"https://az755631.vo.msecnd.net/golstats-app/"}function lv(s){return rv[s]}function cv(){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 Qo(){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 dv(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 ws=s=>(n.pushScopeId("data-v-aa62e22c"),s=s(),n.popScopeId(),s),hv={class:"quadrant-matches"},uv={class:"quadrant-matches__header"},mv={class:"quadrant-matches__header__pc"},fv={class:"title-and-switch"},pv={class:"quadrant-matches__title"},gv={key:0,class:"quadrant-matches__header__games-type"},yv=ws(()=>n.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),bv={class:"quadrant-matches__header__games-type__logo"},Sv=["src"],_v={class:"quadrant-matches__header__games-type__switch"},wv={class:"quadrant-matches__header__games-type__logo"},kv=["src"],Ev={key:0,class:"quadrant-matches__header__my-team"},Tv=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],Cv={key:1,class:"quadrant-matches__header__my-team"},xv=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],vv={class:"quadrant-matches__header__mobile"},Av=[ws(()=>n.createElementVNode("div",{class:"bullet"},null,-1)),ws(()=>n.createElementVNode("span",null,"LIVE",-1))],Lv={key:0,class:"quadrant-matches__body"},Iv={class:"quadrant-matches__body",style:{"column-gap":"16px"}},Rv={class:"quadrant-matches__body matches"},Bv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},Nv={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},Dv=Xe({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},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=n.ref(!0),i=n.toRef(t,"componentWidth"),o=n.computed(()=>i.value<768);n.watch(a,c=>{e("change-is-league-selected",c)}),n.watch(()=>t.currentSeason,c=>{c&&(a.value=!0)}),n.watch(()=>t.currentTournament,c=>{c&&(a.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{a.value=!0,e("change-is-league-selected",!0)},300))});function r(c){e("change-match-day",c)}function l(c){a.value=c}function d(){a.value=!0,setTimeout(()=>{e("click-live")},500)}return(c,h)=>(n.openBlock(),n.createElementBlock("section",hv,[n.createElementVNode("div",uv,[n.createElementVNode("div",mv,[n.createElementVNode("div",fv,[n.createElementVNode("h2",pv,n.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",Cv,[n.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},xv)])):n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",gv,[yv,n.createElementVNode("div",bv,[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,Sv)):n.createCommentVNode("",!0)]),n.createElementVNode("div",_v,[n.createVNode(Hx,{"model-value":a.value,"onUpdate:modelValue":l},null,8,["model-value"])]),n.createElementVNode("div",wv,[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,kv)):n.createCommentVNode("",!0)]),s.currentTournament?(n.openBlock(),n.createElementBlock("div",Ev,[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:d},Tv)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]))]),n.createElementVNode("div",vv,[s.isLiveButtonVisible?(n.openBlock(),n.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},Av)):n.createCommentVNode("",!0)])]),(s.isFull||a.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(n.openBlock(),n.createBlock(Qh,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!o.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:r},null,8,["match-days","is-landing-mode","default-match-day-key"])):n.createCommentVNode("",!0),!s.isFull&&!a.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[o.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createBlock(n.unref(ra),{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",Iv,[n.createVNode(Vs,{small:"",data:s.data.data.prematch,onClickMatch:h[3]||(h[3]=u=>c.$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(Sn,{key:0,data:s.data.data.postmatch,onClickMatch:h[4]||(h[4]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(Sn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:h[5]||(h[5]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",Lv,[n.createVNode(Vs,{data:s.data.data.prematch,onClickMatch:h[0]||(h[0]=u=>c.$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(Sn,{key:0,data:s.data.data.postmatch,onClickMatch:h[1]||(h[1]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(n.openBlock(),n.createBlock(Sn,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:h[2]||(h[2]=u=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):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(ra),{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",Rv,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(u,f)=>(n.openBlock(),n.createBlock(jx,{key:f,game:u,onClickMatch:g=>c.$emit("clickMatch",u)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[o.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Object.keys(s.data).length>0?(n.openBlock(),n.createElementBlock("div",Nv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Vs,{key:0,data:s.data[0],small:"",onClickMatch:h[8]||(h[8]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Vs,{key:1,data:s.data[0],small:"",onClickMatch:h[9]||(h[9]=u=>c.$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",Bv,[s.data[0].game_status==4?(n.openBlock(),n.createBlock(Vs,{key:0,data:s.data[0],small:"",onClickMatch:h[6]||(h[6]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0),s.data[0].game_status!=4?(n.openBlock(),n.createBlock(Vs,{key:1,data:s.data[0],small:"",onClickMatch:h[7]||(h[7]=u=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],64))],64))],64)):n.createCommentVNode("",!0)]))}},[["__scopeId","data-v-aa62e22c"]]),Pv={__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:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(n.openBlock(),n.createElementBlock("main",null,[n.createVNode(Dv,{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-season":s.currentSeason,"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-season","current-tournament","is-live-button-visible"])]))}},Ov="_toniKroos_ov00i_18",Fv="_centralMidfielder_ov00i_28",Mv="_icnPlayIcon_ov00i_38",Vv="_verVideos_ov00i_45",$v="_btnVideosOptions_ov00i_55",zv="_btnVideosOptionsTeams_ov00i_70",Uv="_info_ov00i_90",Gv="_goalUnlock_ov00i_102",jv="_teamsAmerica_ov00i_115",Hv="_imageIcon_ov00i_125",Wv="_imageIconTeam_ov00i_136",Kv="_playerTops_ov00i_148",qv={toniKroos:Ov,centralMidfielder:Fv,icnPlayIcon:Mv,verVideos:Vv,btnVideosOptions:$v,btnVideosOptionsTeams:zv,info:Uv,goalUnlock:Gv,teamsAmerica:jv,imageIcon:Hv,imageIconTeam:Wv,playerTops:Kv},Yv=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Jv={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))}}},Xv=["src"],Zv=["src"],Qv=["src"];function eA(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,Xv)):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,Zv)):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,Qv)],6)}const tA={$style:qv},sA=Yv(Jv,[["render",eA],["__cssModules",tA]]),aA=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},er={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))}}},tu=()=>{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}))},su=er.setup;er.setup=su?(s,e)=>(tu(),su(s,e)):tu;const nA=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),iA=["src"],oA={key:1,class:"text"},rA=["src"],lA={class:"stats"},cA=nA(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),dA={class:"numstats"},hA={class:"leyend"};function uA(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,iA)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",oA,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,rA)):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",lA,[cA,n.createElementVNode("div",dA,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",hA,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const mA=aA(er,[["render",uA],["__scopeId","data-v-fb269a1e"]]);function fA(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 tr={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)}}},au=()=>{n.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},nu=tr.setup;tr.setup=nu?(s,e)=>(au(),nu(s,e)):au;const pA={key:0,class:"text-left"},gA=["width","src"],yA=["checked"],bA=["width","src"],SA={key:3,class:"text-right"};function _A(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",pA,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,gA)):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,yA),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,bA)):n.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(n.openBlock(),n.createElementBlock("span",SA,n.toDisplayString(t.textOptionRight),1)):n.createCommentVNode("",!0)],4)}const sr={components:{GSCSlider:ra,GSCMosaicthebest:sA,GscSwitchComponent:To,GSCButton:mA,GSCRadioToggle:Xe(tr,[["render",_A],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=n.ref("myDivRef"),{elementSize:e}=fA(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=Ae.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=[],g=[];for(const m in h)f.push(h[m]);for(const m in u)g.push(u[m]);f.sort((m,p)=>m.total<p.total?1:-1),g=g.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=g,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)}}}},iu=()=>{n.useCssVars(s=>({bf4b4102:s.backgroundColor,b4141cae:s.fontFamily,"0b1e4386":s.fontSize,"57cb3c7e":s.fontColor,"087c8b6e":s.marginMosaic}))},ou=sr.setup;sr.setup=ou?(s,e)=>(iu(),ou(s,e)):iu;const wA={key:0,class:"gsc-best",ref:"myDivRef"},kA={class:"gsc-best__line-bar-tools"},EA={key:0,class:"gsc-best__line-bar-tools__title"},TA={key:1,class:"gsc-best__line-bar-tools__titlefull"},CA={class:"unit-items"},xA={key:2,class:"gsc-best__line-bar-tools__tools"},vA={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},AA={key:1,class:"gsc-best__line-bar-tools__tools__btn"},LA={key:0,class:"gsc-best__line-bar-tools-movil"},IA={class:"gsc-best__line-bar-tools-movil__tabs"},RA={class:"gsc-best__categories"},BA={class:"gsc-best__players"};function NA(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",wA,[n.createElementVNode("div",kA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",EA,[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",TA,[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",CA,[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",xA,[a.elementSize.width>900?(n.openBlock(),n.createElementBlock("div",vA,[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",AA,[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",LA,[n.createElementVNode("div",IA,[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",RA,[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",BA,[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 DA=Xe(sr,[["render",NA],["__scopeId","data-v-8c67a665"]]);/**
|
|
33
33
|
* Vue 3 Carousel 0.3.1
|
|
34
34
|
* (c) 2023
|
|
35
35
|
* @license MIT
|
|
36
36
|
*/const ot={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"}},ru={itemsToShow:{default:ot.itemsToShow,type:Number},itemsToScroll:{default:ot.itemsToScroll,type:Number},wrapAround:{default:ot.wrapAround,type:Boolean},throttle:{default:ot.throttle,type:Number},snapAlign:{default:ot.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:ot.transition,type:Number},breakpoints:{default:ot.breakpoints,type:Object},autoplay:{default:ot.autoplay,type:Number},pauseAutoplayOnHover:{default:ot.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:ot.mouseDrag,type:Boolean},touchDrag:{default:ot.touchDrag,type:Boolean},dir:{default:ot.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:ot.i18n,type:Object},settings:{default(){return{}},type:Object}};function PA({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 OA({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 ar({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function FA({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:ar({val:r,max:t-o,min:0})}function lu(s){return s?s.reduce((e,t)=>{var a;return t.type===n.Fragment?[...e,...lu(t.children)]:((a=t.type)===null||a===void 0?void 0:a.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function nr({val:s,max:e,min:t=0}){return s>e?nr({val:s-(e+1),max:e,min:t}):s<t?nr({val:s+(e+1),max:e,min:t}):s}function MA(s,e){let t;return e?function(...a){const i=this;t||(s.apply(i,a),t=!0,setTimeout(()=>t=!1,e))}:s}function VA(s,e){let t;return function(...a){t&&clearTimeout(t),t=setTimeout(()=>{s(...a),t=null},e)}}function $A(s="",e={}){return Object.entries(e).reduce((t,[a,i])=>t.replace(`{${a}}`,String(i)),s)}var zA=n.defineComponent({name:"ARIA",setup(){const s=n.inject("config",n.reactive(Object.assign({},ot))),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"},$A(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),UA=n.defineComponent({name:"Carousel",props:ru,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({},ot));let h=Object.assign({},ot),u;const f=n.ref((i=s.modelValue)!==null&&i!==void 0?i:0),g=n.ref(0),m=n.ref(0),p=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",p),n.provide("minSlide",y),n.provide("slideWidth",l);function w(){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 x(){if(!u||!Object.keys(u).length)return;const C=Object.keys(u).map(z=>Number(z)).sort((z,me)=>+me-+z);let H=Object.assign({},h);C.some(z=>{const me=window.matchMedia(`(min-width: ${z}px)`).matches;return me&&(H=Object.assign(Object.assign({},H),u[z])),me}),E(H)}function E(C){Object.entries(C).forEach(([H,z])=>c[H]=z)}const v=VA(()=>{x(),T()},16);function T(){if(!o.value)return;const C=o.value.getBoundingClientRect();l.value=C.width/c.itemsToShow}function R(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=PA({config:c,slidesCount:d.value}),y.value=OA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=ar({val:f.value,max:p.value,min:y.value})))}n.onMounted(()=>{n.nextTick(()=>T()),setTimeout(()=>T(),1e3),x(),K(),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 B={x:0,y:0},M={x:0,y:0},W=n.reactive({x:0,y:0}),j=n.ref(!1),se=n.ref(!1),oe=()=>{j.value=!0},ne=()=>{j.value=!1};function de(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(L=C.type==="touchstart",L||C.preventDefault(),!(!L&&C.button!==0||Y.value)&&(B.x=L?C.touches[0].clientX:C.clientX,B.y=L?C.touches[0].clientY:C.clientY,document.addEventListener(L?"touchmove":"mousemove",he,!0),document.addEventListener(L?"touchend":"mouseup",J,!0)))}const he=MA(C=>{se.value=!0,M.x=L?C.touches[0].clientX:C.clientX,M.y=L?C.touches[0].clientY:C.clientY;const H=M.x-B.x,z=M.y-B.y;W.y=z,W.x=H},c.throttle);function J(){const C=c.dir==="rtl"?-1:1,H=Math.sign(W.x)*.4,z=Math.round(W.x/l.value+H)*C;if(z&&!L){const me=Ye=>{Ye.stopPropagation(),window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}X(f.value-z),W.x=0,W.y=0,se.value=!1,document.removeEventListener(L?"touchmove":"mousemove",he,!0),document.removeEventListener(L?"touchend":"mouseup",J,!0)}function K(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&j.value||re()},c.autoplay))}function ue(){b&&(clearInterval(b),b=null),K()}const Y=n.ref(!1);function X(C){const H=c.wrapAround?C:ar({val:C,max:p.value,min:y.value});f.value===H||Y.value||(t("slide-start",{slidingToIndex:C,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!0,g.value=f.value,f.value=H,S=setTimeout(()=>{if(c.wrapAround){const z=nr({val:H,max:p.value,min:0});z!==f.value&&(f.value=z,t("loop",{currentSlideIndex:f.value,slidingToIndex:C}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),Y.value=!1,ue()},c.transition))}function re(){X(f.value+c.itemsToScroll)}function ye(){X(f.value-c.itemsToScroll)}const xe={slideTo:X,next:re,prev:ye};n.provide("nav",xe),n.provide("isSliding",Y);const ee=n.computed(()=>FA({config:c,currentSlide:f.value,slidesCount:d.value}));n.provide("slidesToScroll",ee);const Ce=n.computed(()=>{const C=c.dir==="rtl"?-1:1,H=ee.value*l.value*C;return{transform:`translateX(${W.x-H}px)`,transition:`${Y.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),x(),R(),T(),ue()}Object.keys(ru).forEach(C=>{["modelValue"].includes(C)||n.watch(()=>s[C],Te)}),n.watch(()=>s.modelValue,C=>{C!==f.value&&X(Number(C))}),n.watch(d,R),t("before-init"),w();const Fe={config:c,slidesCount:d,slideWidth:l,next:re,prev:ye,slideTo:X,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};a({updateBreakpointsConfigs:x,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:w,restartCarousel:Te,slideTo:X,next:re,prev:ye,nav:xe,data:Fe});const at=e.default||e.slides,lt=e.addons,ct=n.reactive(Fe);return()=>{const C=lu(at==null?void 0:at(ct)),H=(lt==null?void 0:lt(ct))||[];C.forEach((U,q)=>U.props.index=q);let z=C;if(c.wrapAround){const U=C.map((G,V)=>n.cloneVNode(G,{index:-C.length+V,isClone:!0,key:`clone-before-${V}`})),q=C.map((G,V)=>n.cloneVNode(G,{index:C.length+V,isClone:!0,key:`clone-after-${V}`}));z=[...U,...C,...q]}r.value=C,d.value=Math.max(C.length,1);const me=n.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ye=n.h("div",{class:"carousel__viewport"},me);return n.h("section",{ref:o,class:{carousel:!0,"is-sliding":Y.value,"is-dragging":se.value,"is-hover":j.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:oe,onMouseleave:ne},[Ye,H,n.h(zA)])}}}),cu;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(cu||(cu={}));var GA=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({},ot))),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 jA=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},HA=s=>(n.pushScopeId("data-v-54620d25"),s=s(),n.popScopeId(),s),WA={class:"gsc-carousel"},KA={key:0},qA=HA(()=>n.createElementVNode("div",null,"no hay",-1)),YA=[qA],JA={class:"gsc-carousel__2d__slides"},XA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ZA=["fill"],QA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e5=["fill"],t5={class:"gsc-carousel__2d__navigation"},s5={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a5=["stroke"],n5={key:1,class:"gsc-carousel__2d__navigation__pagination"},i5=["onClick"],o5={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r5=["stroke"],l5={__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(p=>({"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,p=>{p&&l.value?(l.value=!1,d(a.items)):p&&p.slideTo&&p.slideTo(r.value)},{deep:!0}),n.watch(()=>a.currentItemIndex,p=>{r.value!==p&&f(p)}),n.watch(()=>a.defaultItemByIndex,p=>{r.value!==p&&f(p)}),n.watch(()=>a.items,p=>{i.value?d(p):l.value=!0},{immediate:!0});function d(p){p&&p.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=p[y]):(r.value=0,o.value=p[0])}else r.value=a.defaultItemByIndex,o.value=p[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(p){i.value&&i.value.slideTo(p)}function g(p){i.value.slideTo(p)}function m(p){const y=p.slidingToIndex<0?a.items.length-1:p.slidingToIndex===a.items.length?0:p.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}),(p,y)=>(n.openBlock(),n.createElementBlock("div",WA,[a.is3d?(n.openBlock(),n.createElementBlock("div",KA,YA)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[n.createElementVNode("div",JA,[n.createVNode(n.unref(UA),{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(GA),{key:S},{default:n.withCtx(()=>[n.renderSlot(p.$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",XA,[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,ZA)]))],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",QA,[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,e5)]))],2)],4)):n.createCommentVNode("",!0),n.createElementVNode("div",t5,[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",s5,[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,a5)]))])):n.createCommentVNode("",!0),s.isPaginationVisible?(n.openBlock(),n.createElementBlock("div",n5,[(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:w=>g(S)},null,12,i5))),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",o5,[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,r5)]))])):n.createCommentVNode("",!0)])],2))]))}},c5=jA(l5,[["__scopeId","data-v-54620d25"]]),du=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Q(s,e,t){return(e=h5(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function d5(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 h5(s){var e=d5(s,"string");return typeof e=="symbol"?e:String(e)}function u5(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function hu(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 m5(s,e,t){return e&&hu(s.prototype,e),t&&hu(s,t),s}function f5(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function uu(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 mu(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uu(Object(t),!0).forEach(function(a){f5(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):uu(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}var fu={addCSS:!0,thumbWidth:15,watch:!0};function p5(s,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function g5(s,e){if(s&&e){var t=new Event(e,{bubbles:!0});s.dispatchEvent(t)}}var ga=function(s){return s!=null?s.constructor:null},ir=function(s,e){return!!(s&&e&&s instanceof e)},pu=function(s){return s==null},gu=function(s){return ga(s)===Object},y5=function(s){return ga(s)===Number&&!Number.isNaN(s)},yu=function(s){return ga(s)===String},b5=function(s){return ga(s)===Boolean},S5=function(s){return ga(s)===Function},bu=function(s){return Array.isArray(s)},Su=function(s){return ir(s,NodeList)},_5=function(s){return ir(s,Element)},w5=function(s){return ir(s,Event)},k5=function(s){return pu(s)||(yu(s)||bu(s)||Su(s))&&!s.length||gu(s)&&!Object.keys(s).length},dt={nullOrUndefined:pu,object:gu,number:y5,string:yu,boolean:b5,function:S5,array:bu,nodeList:Su,element:_5,event:w5,empty:k5};function E5(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 T5(s,e){if(1>e){var t=E5(e);return parseFloat(s.toFixed(t))}return Math.round(s/e)*e}var C5=function(){function s(e,t){u5(this,s),dt.element(e)?this.element=e:dt.string(e)&&(this.element=document.querySelector(e)),dt.element(this.element)&&dt.empty(this.element.rangeTouch)&&(this.config=mu({},fu,{},t),this.init())}return m5(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||!dt.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+T5(t/100*(r-o),l)}},{key:"set",value:function(e){s.enabled&&dt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),g5(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(dt.empty(e)||dt.string(e)?a=Array.from(document.querySelectorAll(dt.string(e)?e:'input[type="range"]')):dt.element(e)?a=[e]:dt.nodeList(e)?a=Array.from(e):dt.array(e)&&(a=e.filter(dt.element)),dt.empty(a))return null;var i=mu({},fu,{},t);if(dt.string(e)&&i.watch){var o=new MutationObserver(function(r){Array.from(r).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){dt.element(d)&&p5(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 ya=s=>s!=null?s.constructor:null,Yt=(s,e)=>!!(s&&e&&s instanceof e),or=s=>s==null,_u=s=>ya(s)===Object,x5=s=>ya(s)===Number&&!Number.isNaN(s),wn=s=>ya(s)===String,v5=s=>ya(s)===Boolean,wu=s=>typeof s=="function",ku=s=>Array.isArray(s),A5=s=>Yt(s,WeakMap),Eu=s=>Yt(s,NodeList),L5=s=>ya(s)===Text,I5=s=>Yt(s,Event),R5=s=>Yt(s,KeyboardEvent),B5=s=>Yt(s,window.TextTrackCue)||Yt(s,window.VTTCue),N5=s=>Yt(s,TextTrack)||!or(s)&&wn(s.kind),D5=s=>Yt(s,Promise)&&wu(s.then),P5=s=>s!==null&&typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object",Tu=s=>or(s)||(wn(s)||ku(s)||Eu(s))&&!s.length||_u(s)&&!Object.keys(s).length;var k={nullOrUndefined:or,object:_u,number:x5,string:wn,boolean:v5,function:wu,array:ku,weakMap:A5,nodeList:Eu,element:P5,textNode:L5,event:I5,keyboardEvent:R5,cue:B5,track:N5,promise:D5,url:s=>{if(Yt(s,window.URL))return!0;if(!wn(s))return!1;let e=s;s.startsWith("http://")&&s.startsWith("https://")||(e=`http://${s}`);try{return!Tu(new URL(e).hostname)}catch{return!1}},empty:Tu};const rr=(()=>{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 Cu(s,e){setTimeout(()=>{try{s.hidden=!0,s.offsetHeight,s.hidden=!1}catch{}},e)}const O5=!!window.document.documentMode,F5=/Edge/g.test(navigator.userAgent),M5="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),V5=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,$5=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,z5=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Ze={isIE:O5,isEdge:F5,isWebKit:M5,isIPhone:V5,isIPadOS:$5,isIos:z5};function U5(s){return JSON.parse(JSON.stringify(s))}function xu(s,e){return e.split(".").reduce((t,a)=>t&&t[a],s)}function Ve(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]:{}}),Ve(s[a],t[a])):Object.assign(s,{[a]:t[a]})}),Ve(s,...e)):s}function vu(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 lr(s,e){k.element(s)&&!k.empty(e)&&Object.entries(e).filter(([,t])=>!k.nullOrUndefined(t)).forEach(([t,a])=>s.setAttribute(t,a))}function fe(s,e,t){const a=document.createElement(s);return k.object(e)&&lr(a,e),k.string(t)&&(a.innerText=t),a}function G5(s,e){k.element(s)&&k.element(e)&&e.parentNode.insertBefore(s,e.nextSibling)}function Au(s,e,t,a){k.element(e)&&e.appendChild(fe(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 kn(s){if(!k.element(s))return;let{length:e}=s.childNodes;for(;e>0;)s.removeChild(s.lastChild),e-=1}function En(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=Ve({},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}}),Ve(a,t)}function ks(s,e){if(!k.element(s))return;let t=e;k.boolean(t)||(t=!s.hidden),s.hidden=t}function Re(s,e,t){if(k.nodeList(s))return Array.from(s).map(a=>Re(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 Tn(s,e){return k.element(s)&&s.classList.contains(e)}function Es(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 j5(s,e){const{prototype:t}=Element;return(t.closest||function(){let a=this;do{if(Es.matches(a,e))return a;a=a.parentElement||a.parentNode}while(a!==null&&a.nodeType===1);return null}).call(s,e)}function ba(s){return this.elements.container.querySelectorAll(s)}function Ke(s){return this.elements.container.querySelector(s)}function cr(s=null,e=!1){k.element(s)&&s.focus({preventScroll:!0,focusVisible:e})}const Lu={"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:!(Ze.isIPhone||!k.function(fe("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||fe("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(Lu).includes(t)&&(t+=`; codecs="${Lu[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:rr!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},H5=(()=>{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 Sa(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;H5&&(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 Le(s,e="",t,a=!0,i=!1){Sa.call(this,s,e,t,!0,a,i)}function Cn(s,e="",t,a=!0,i=!1){Sa.call(this,s,e,t,!1,a,i)}function dr(s,e="",t,a=!0,i=!1){const o=(...r)=>{Cn(s,e,o,a,i),t.apply(this,r)};Sa.call(this,s,e,o,!0,a,i)}function ge(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 W5(){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 K5(){return new Promise(s=>this.ready?setTimeout(s,0):Le.call(this,this.elements.container,"ready",s)).then(()=>{})}function zt(s){k.promise(s)&&s.then(null,()=>{})}function hr(s){return k.array(s)?s.filter((e,t)=>s.indexOf(e)===t):s}function Iu(s,e){return k.array(s)&&s.length?s.reduce((t,a)=>Math.abs(a-e)<Math.abs(t-e)?a:t):null}function Ru(s){return!(!window||!window.CSS)&&window.CSS.supports(s)}const Bu=[[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 Nu(s){return k.array(s)||k.string(s)&&s.includes(":")?(k.array(s)?s:s.split(":")).map(Number).every(k.number):!1}function xn(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 ur(s){const e=a=>Nu(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 xn(t)}function $s(s){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=ur.call(this,s);if(!k.array(t))return{};const[a,i]=xn(t),o=100/a*i;if(Ru(`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 Du(s,e,t=.05){const a=s/e,i=Iu(Object.keys(Bu),a);return Math.abs(i-a)<=t?Bu[i]:[s,e]}function q5(){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)||$s.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||zt(s.play())}),s.media.load())}ge.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 Y5(s){return`${s}-${Math.floor(1e4*Math.random())}`}function mr(s,...e){return k.empty(s)?s:s.toString().replace(/{(\d+)}/g,(t,a)=>e[a].toString())}function J5(s,e){return s===0||e===0||Number.isNaN(s)||Number.isNaN(e)?0:(s/e*100).toFixed(2)}const _a=(s="",e="",t="")=>s.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Pu=(s="")=>s.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function X5(s=""){let e=s.toString();return e=_a(e,"-"," "),e=_a(e,"_"," "),e=Pu(e),_a(e," ","")}function Z5(s=""){let e=s.toString();return e=X5(e),e.charAt(0).toLowerCase()+e.slice(1)}function Q5(s){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=s,e.firstChild.innerText}function eL(s){const e=document.createElement("div");return e.appendChild(s),e.innerHTML}const Ou={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Qe={get(s="",e={}){if(k.empty(s)||k.empty(e))return"";let t=xu(e.i18n,s);if(k.empty(t))return Object.keys(Ou).includes(s)?Ou[s]:"";const a={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(a).forEach(([i,o])=>{t=_a(t,i,o)}),t}};class wa{constructor(e){Q(this,"get",t=>{if(!wa.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}),Q(this,"set",t=>{if(!wa.supported||!this.enabled||!k.object(t))return;let a=this.get();k.empty(a)&&(a={}),Ve(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 ka(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 Fu(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=wa.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)}}ka(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 Mu=s=>Math.trunc(s/60/60%60,10),tL=s=>Math.trunc(s/60%60,10),sL=s=>Math.trunc(s%60,10);function vn(s=0,e=!1,t=!1){if(!k.number(s))return vn(void 0,e,t);const a=l=>`0${l}`.slice(-2);let i=Mu(s);const o=tL(s),r=sL(s);return i=e||i>0?`${i}:`:"",`${t&&s>0?"-":""}${i}${a(o)}:${a(r)}`}const Z={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||Ze.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=Ke.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ba.call(this,this.config.selectors.buttons.play),pause:Ke.call(this,this.config.selectors.buttons.pause),restart:Ke.call(this,this.config.selectors.buttons.restart),rewind:Ke.call(this,this.config.selectors.buttons.rewind),fastForward:Ke.call(this,this.config.selectors.buttons.fastForward),mute:Ke.call(this,this.config.selectors.buttons.mute),pip:Ke.call(this,this.config.selectors.buttons.pip),airplay:Ke.call(this,this.config.selectors.buttons.airplay),settings:Ke.call(this,this.config.selectors.buttons.settings),captions:Ke.call(this,this.config.selectors.buttons.captions),fullscreen:Ke.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Ke.call(this,this.config.selectors.progress),this.elements.inputs={seek:Ke.call(this,this.config.selectors.inputs.seek),volume:Ke.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Ke.call(this,this.config.selectors.display.buffer),currentTime:Ke.call(this,this.config.selectors.display.currentTime),duration:Ke.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=Z.getIconUrl.call(this),i=`${a.cors?"":a.url}#${this.config.iconPrefix}`,o=document.createElementNS(t,"svg");lr(o,Ve(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=Qe.get(s,this.config);return fe("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(s){if(k.empty(s))return null;const e=fe("span",{class:this.config.classNames.menu.value});return e.appendChild(fe("span",{class:this.config.classNames.menu.badge},s)),e},createButton(s,e){const t=Ve({},e);let a=Z5(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)||Ve(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=fe(i.element);return i.toggle?(o.appendChild(Z.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),o.appendChild(Z.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),o.appendChild(Z.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),o.appendChild(Z.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(o.appendChild(Z.createIcon.call(this,i.icon)),o.appendChild(Z.createLabel.call(this,i.label))),Ve(t,$t(this.config.selectors.buttons[a],t)),lr(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=fe("input",Ve($t(this.config.selectors.inputs[s]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Qe.get(s,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[s]=t,Z.updateRangeFill.call(this,t),C5.setup(t),t},createProgress(s,e){const t=fe("progress",Ve($t(this.config.selectors.display[s]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(s!=="volume"){t.appendChild(fe("span",null,"0"));const a={played:"played",buffer:"buffered"}[s],i=a?Qe.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=fe("div",Ve(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Qe.get(s,this.config),role:"timer"}),"00:00");return this.elements.display[s]=a,a},bindMenuItemShortcuts(s,e){Le.call(this,s,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const a=Es(s,'[role="menuitemradio"]');if(!a&&[" ","ArrowRight"].includes(t.key))Z.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)),cr.call(this,i,!0))}},!1),Le.call(this,s,"keyup",t=>{t.key==="Return"&&Z.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=fe("button",Ve(r,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${r.class?r.class:""}`.trim(),"aria-checked":o,value:s})),d=fe("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=>Es(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)}Z.showMenuPanel.call(this,"home",k.keyboardEvent(c))}},t,!1),Z.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(s=0,e=!1){return k.number(s)?vn(s,Mu(this.duration)>0,e):s},updateTimeDisplay(s=null,e=0,t=!1){k.element(s)&&k.number(e)&&(s.innerText=Z.formatTime(e,t))},updateVolume(){this.supported.ui&&(k.element(this.elements.inputs.volume)&&Z.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,Z.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=J5(this.currentTime,this.duration),s.type==="timeupdate"&&Z.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(Es(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=Z.formatTime(this.currentTime),a=Z.formatTime(this.duration),i=Qe.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",a))}else if(Es(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);(Ze.isWebKit||Ze.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=>Re(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(!Tn(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=Z.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;Z.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),s&&s.type==="timeupdate"&&this.media.seeking||Z.updateProgress.call(this,s)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ks(this.elements.display.currentTime,!0),void ks(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&&Z.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),s&&Z.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Z.setMarkers.call(this),Z.updateSeekTooltip.call(this)},toggleMenuButton(s,e){ks(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=Z.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?Qe.get("normal",this.config):`${e}×`;case"quality":if(k.number(e)){const t=Qe.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return Pu(e);case"captions":return Ie.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=hr(s).filter(o=>this.config.quality.options.includes(o)));const a=!k.empty(this.options.quality)&&this.options.quality.length>1;if(Z.toggleMenuButton.call(this,e,a),kn(t),Z.checkMenu.call(this),!a)return;const i=o=>{const r=Qe.get(`qualityBadge.${o}`,this.config);return r.length?Z.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=>{Z.createMenuItem.call(this,{value:o,list:t,type:e,title:Z.getLabel.call(this,"quality",o),badge:i(o)})}),Z.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=Ie.getTracks.call(this),a=!!t.length;if(Z.toggleMenuButton.call(this,s,a),kn(e),Z.checkMenu.call(this),!a)return;const i=t.map((o,r)=>({value:r,checked:this.captions.toggled&&this.currentTrack===r,title:Ie.getLabel.call(this,o),badge:o.language&&Z.createBadge.call(this,o.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:Qe.get("disabled",this.config),list:e,type:"language"}),i.forEach(Z.createMenuItem.bind(this)),Z.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;Z.toggleMenuButton.call(this,s,t),kn(e),Z.checkMenu.call(this),t&&(this.options.speed.forEach(a=>{Z.createMenuItem.call(this,{value:a,list:e,type:s,title:Z.getLabel.call(this,"speed",a)})}),Z.updateSetting.call(this,s,e))},checkMenu(){const{buttons:s}=this.elements.settings,e=!k.empty(s)&&Object.values(s).some(t=>!t.hidden);ks(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"]');cr.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),ks(e,!i),Re(this.elements.container,this.config.classNames.menu.open,i),i&&k.keyboardEvent(s)?Z.focusFirstMenuItem.call(this,null,!0):i||a||cr.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=Z.getMenuSize.call(this,t),r=l=>{l.target===a&&["width","height"].includes(l.propertyName)&&(a.style.width="",a.style.height="",Cn.call(this,a,rr,r))};Le.call(this,a,rr,r),a.style.width=`${o.width}px`,a.style.height=`${o.height}px`}ks(i,!0),ks(t,!1),Z.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}=Z;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=fe("div",$t(this.config.selectors.controls.wrapper));this.elements.controls=c;const h={class:"plyr__controls__item"};return hr(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=fe("div",{class:`${h.class} plyr__progress__container`}),g=fe("div",$t(this.config.selectors.progress));if(g.appendChild(i.call(this,"seek",{id:`plyr-seek-${s.id}`})),g.appendChild(a.call(this,"buffer")),this.config.tooltips.seek){const m=fe("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(m),this.elements.display.seekTooltip=m}this.elements.progress=g,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=fe("div",Ve({},h,{class:`${h.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),u==="mute"&&f.appendChild(t.call(this,"mute")),u==="volume"&&!Ze.isIos&&!Ze.isIPadOS){const g={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",Ve(g,{id:`plyr-volume-${s.id}`})))}}if(u==="captions"&&c.appendChild(t.call(this,"captions",h)),u==="settings"&&!k.empty(this.config.settings)){const f=fe("div",Ve({},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 g=fe("div",{class:"plyr__menu__container",id:`plyr-settings-${s.id}`,hidden:""}),m=fe("div"),p=fe("div",{id:`plyr-settings-${s.id}-home`}),y=fe("div",{role:"menu"});p.appendChild(y),m.appendChild(p),this.elements.settings.panels.home=p,this.config.settings.forEach(b=>{const S=fe("button",Ve($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),Le.call(this,S,"click",()=>{d.call(this,b,!1)});const w=fe("span",null,Qe.get(b,this.config)),x=fe("span",{class:this.config.classNames.menu.value});x.innerHTML=s[b],w.appendChild(x),S.appendChild(w),y.appendChild(S);const E=fe("div",{id:`plyr-settings-${s.id}-${b}`,hidden:""}),v=fe("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});v.appendChild(fe("span",{"aria-hidden":!0},Qe.get(b,this.config))),v.appendChild(fe("span",{class:this.config.classNames.hidden},Qe.get("menuBack",this.config))),Le.call(this,E,"keydown",T=>{T.key==="ArrowLeft"&&(T.preventDefault(),T.stopPropagation(),d.call(this,"home",!0))},!1),Le.call(this,v,"click",()=>{d.call(this,"home",!1)}),E.appendChild(v),E.appendChild(fe("div",{role:"menu"})),m.appendChild(E),this.elements.settings.buttons[b]=S,this.elements.settings.panels[b]=E}),g.appendChild(m),f.appendChild(g),c.appendChild(f),this.elements.settings.popup=g,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=Ve({},h,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:g}=this.config.urls;!k.url(g)&&this.isEmbed&&Ve(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=Z.getIconUrl.call(this);i.cors&&Fu(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=Z.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ie.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=_a(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)||Z.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:()=>Tn(o,r),set(l=!1){Re(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(Ze.isEdge&&Cu(a),this.config.tooltips.controls){const{classNames:i,selectors:o}=this.config,r=`${o.controls.wrapper} ${o.labels} .${i.hidden}`,l=ba.call(this,r);Array.from(l).forEach(d=>{Re(d,this.config.classNames.hidden,!1),Re(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=>Re(o,r,d);t.forEach(d=>{const c=fe("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=fe("span",{class:this.config.classNames.tooltip},""),a.appendChild(o)),this.elements.markers={points:i,tip:o},this.elements.progress.appendChild(a)}};function Vu(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 $u(s){const e=new URLSearchParams;return k.object(s)&&Object.entries(s).forEach(([t,a])=>{e.set(t,a)}),e}const Ie={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")&&Z.setCaptionsMenu.call(this));if(k.element(this.elements.captions)||(this.elements.captions=fe("div",$t(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),G5(this.elements.captions,this.elements.wrapper)),Ze.isIE&&window.URL){const a=this.media.querySelectorAll("track");Array.from(a).forEach(i=>{const o=i.getAttribute("src"),r=Vu(o);r!==null&&r.hostname!==window.location.href.hostname&&["http:","https:"].includes(r.protocol)&&ka(o,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{Jt(i)})})}const s=hr((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";Le.call(this,this.media.textTracks,a,Ie.update.bind(this))}setTimeout(Ie.update.bind(this),0)},update(){const s=Ie.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"),Le.call(this,r,"cuechange",()=>Ie.updateCues.call(this))}),(o&&this.language!==t||!s.includes(i))&&(Ie.setLanguage.call(this,t),Ie.toggle.call(this,e&&o)),this.elements&&Re(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")&&Z.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=Ie.getTracks.call(this),r=Ie.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=r.language,void Ie.set.call(this,o.indexOf(r))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Re(this.elements.container,a,i),this.captions.toggled=i,Z.updateSetting.call(this,"captions"),ge.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(s,e=!0){const t=Ie.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,Z.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),ge.call(this,this.media,"languagechange")}Ie.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Ie.updateCues.call(this)}else this.debug.warn("Track not found",s);else this.debug.warn("Invalid caption argument",s);else Ie.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=Ie.getTracks.call(this),i=Ie.findTrack.call(this,[t]);Ie.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=Ie.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 Ie.getTracks.call(this)[this.currentTrack]},getLabel(s){let e=s;return!k.track(e)&&$e.textTracks&&this.captions.toggled&&(e=Ie.getCurrentTrack.call(this)),k.track(e)?k.empty(e.label)?k.empty(e.language)?Qe.get("enabled",this.config):s.language.toUpperCase():e.label:Qe.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=Ie.getCurrentTrack.call(this);e=Array.from((a||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(eL)}const t=e.map(a=>a.trim()).join(`
|
|
37
|
-
`);if(t!==this.elements.captions.innerHTML){kn(this.elements.captions);const a=fe("span",$t(this.config.selectors.caption));a.innerHTML=t,this.elements.captions.appendChild(a),ge.call(this,this.media,"cuechange")}}},zu={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:[]}},fr={active:"picture-in-picture",inactive:"inline"},is={html5:"html5",youtube:"youtube",vimeo:"vimeo"},pr={audio:"audio",video:"video"};function aL(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 gr=()=>{};class nL{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):gr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):gr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):gr}}class Nt{constructor(e){Q(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;ge.call(this.player,a,this.active?"enterfullscreen":"exitfullscreen",!0)}),Q(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":"",Re(this.target,this.player.config.classNames.fullscreen.fallback,t),Ze.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()}),Q(this,"trapFocus",t=>{if(Ze.isIos||Ze.isIPadOS||!this.active||t.key!=="Tab")return;const a=document.activeElement,i=ba.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())}),Q(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Nt.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Re(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Q(this,"enter",()=>{this.supported&&(Ze.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Nt.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Q(this,"exit",()=>{if(this.supported)if(Ze.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),zt(this.player.play());else if(!Nt.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)}),Q(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Nt.prefix,this.property=Nt.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&j5(this.player.elements.container,e.config.fullscreen.container),Le.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Le.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")}),Le.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 Nt.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,Nt.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Nt.nativeSupported||!Ze.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Nt.nativeSupported||this.forceFallback)return Tn(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 Ze.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function An(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 Ne={addStyleHook(){Re(this.elements.container,this.config.selectors.container.replace(".",""),!0),Re(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 Ne.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(Z.inject.call(this),this.listeners.controls()),Ne.toggleNativeControls.call(this),this.isHTML5&&Ie.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Z.updateVolume.call(this),Z.timeUpdate.call(this),Z.durationUpdate.call(this),Ne.checkPlaying.call(this),Re(this.elements.container,this.config.classNames.pip.supported,$e.pip&&this.isHTML5&&this.isVideo),Re(this.elements.container,this.config.classNames.airplay.supported,$e.airplay&&this.isHTML5),Re(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{ge.call(this,this.media,"ready")},0),Ne.setTitle.call(this),this.poster&&Ne.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&Z.durationUpdate.call(this),this.config.mediaMetadata&&Z.setMediaMetadata.call(this)},setTitle(){let s=Qe.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=Ke.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,a=Qe.get("frameTitle",this.config);e.setAttribute("title",a.replace("{title}",t))}},togglePoster(s){Re(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"),K5.call(this).then(()=>An(s)).catch(t=>{throw s===this.poster&&Ne.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:""}),Ne.togglePoster.call(this,!0),s)))},checkPlaying(s){Re(this.elements.container,this.config.classNames.playing,this.playing),Re(this.elements.container,this.config.classNames.paused,this.paused),Re(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",Qe.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Ne.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Re(this.elements.container,this.config.classNames.loading,this.loading),Ne.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 iL{constructor(e){Q(this,"firstTouch",()=>{const{player:t}=this,{elements:a}=t;t.touch=!0,Re(a.container,t.config.classNames.isTouch,!0)}),Q(this,"global",(t=!0)=>{const{player:a}=this;a.config.keyboard.global&&Sa.call(a,window,"keydown keyup",this.handleKey,t,!1),Sa.call(a,document.body,"click",this.toggleMenu,t),dr.call(a,document.body,"touchstart",this.firstTouch)}),Q(this,"container",()=>{const{player:t}=this,{config:a,elements:i,timers:o}=t;!a.keyboard.global&&a.keyboard.focused&&Le.call(t,i.container,"keydown keyup",this.handleKey,!1),Le.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)&&(Ne.toggleControls.call(t,!0),h=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>Ne.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]=ur.call(t),f=Ru(`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[g,m]=q5(),p=g/m>h/u;f?(d.style.width=p?"auto":"100%",d.style.height=p?"100%":"auto"):(d.style.maxWidth=p?m/u*h+"px":null,d.style.margin=p?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Le.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"?Le:Cn).call(t,window,"resize",l)))})}),Q(this,"media",()=>{const{player:t}=this,{elements:a}=t;if(Le.call(t,t.media,"timeupdate seeking seeked",o=>Z.timeUpdate.call(t,o)),Le.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>Z.durationUpdate.call(t,o)),Le.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Le.call(t,t.media,"progress playing seeking seeked",o=>Z.updateProgress.call(t,o)),Le.call(t,t.media,"volumechange",o=>Z.updateVolume.call(t,o)),Le.call(t,t.media,"playing play pause ended emptied timeupdate",o=>Ne.checkPlaying.call(t,o)),Le.call(t,t.media,"waiting canplay seeked playing",o=>Ne.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=Ke.call(t,`.${t.config.classNames.video}`);if(!k.element(o))return;Le.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,()=>{zt(t.play())},"play")):this.proxy(r,()=>{zt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Le.call(t,a.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Le.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Le.call(t,t.media,"ratechange",()=>{Z.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Le.call(t,t.media,"qualitychange",o=>{Z.updateSetting.call(t,"quality",null,o.detail.quality)}),Le.call(t,t.media,"ready qualitychange",()=>{Z.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Le.call(t,t.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=t.media.error),ge.call(t,a.container,o.type,!0,r)})}),Q(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)}),Q(this,"bind",(t,a,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=k.function(d);Le.call(l,t,a,h=>this.proxy(h,i,o),r&&!c)}),Q(this,"controls",()=>{const{player:t}=this,{elements:a}=t,i=Ze.isIE?"change":"input";if(a.buttons.play&&Array.from(a.buttons.play).forEach(o=>{this.bind(o,"click",()=>{zt(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",()=>{ge.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(),Z.toggleMenu.call(t,o)},null,!1),this.bind(a.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),Z.toggleMenu.call(t,o)):Z.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(a.settings.menu,"keydown",o=>{o.key==="Escape"&&Z.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),zt(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Ze.isIos){const o=ba.call(t,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>Cu(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=>Z.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)}),Ze.isWebKit&&Array.from(ba.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>Z.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,Z.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;Re(a.controls,o.classNames.noTransition,!0),Ne.toggleControls.call(t,!0),setTimeout(()=>{Re(a.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>Ne.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 g=document.activeElement;if(k.element(g)){const{editable:m}=t.config.selectors,{seek:p}=a.inputs;if(g!==p&&Es(g,m)||e.key===" "&&Es(g,'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||zt(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){Z.toggleMenu.call(this.player,e)}}function oL(s,e){return s(e={exports:{}},e.exports),e.exports}var rL=oL(function(s,e){s.exports=function(){var t=function(){},a={},i={},o={};function r(f,g){f=f.push?f:[f];var m,p,y,b=[],S=f.length,w=S;for(m=function(x,E){E.length&&b.push(x),--w||g(b)};S--;)p=f[S],(y=i[p])?m(p,y):(o[p]=o[p]||[]).push(m)}function l(f,g){if(f){var m=o[f];if(i[f]=g,m)for(;m.length;)m[0](f,g),m.splice(0,1)}}function d(f,g){f.call&&(f={success:f}),g.length?(f.error||t)(g):(f.success||t)(f)}function c(f,g,m,p){var y,b,S=document,w=m.async,x=(m.numRetries||0)+1,E=m.before||t,v=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");p=p||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=w===void 0||w),b.onload=b.onerror=b.onbeforeload=function(R){var L=R.type[0];if(y)try{b.sheet.cssText.length||(L="e")}catch(B){B.code!=18&&(L="e")}if(L=="e"){if((p+=1)<x)return c(f,g,m,p)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";g(f,L,R.defaultPrevented)},E(f,b)!==!1&&S.head.appendChild(b)}function h(f,g,m){var p,y,b=(f=f.push?f:[f]).length,S=b,w=[];for(p=function(x,E,v){if(E=="e"&&w.push(x),E=="b"){if(!v)return;w.push(x)}--b||g(w)},y=0;y<S;y++)c(f[y],p,m)}function u(f,g,m){var p,y;if(g&&g.trim&&(p=g),y=(p?m:g)||{},p){if(p in a)throw"LoadJS";a[p]=!0}function b(S,w){h(f,function(x){d(y,x),S&&d({success:S,error:w},x),l(p,x)},y)}if(y.returnPromise)return new Promise(b);b()}return u.ready=function(f,g){return r(f,function(m){d(g,m)}),u},u.done=function(f){l(f,[])},u.reset=function(){a={},i={},o={}},u.isDefined=function(f){return f in a},u}()});function yr(s){return new Promise((e,t)=>{rL(s,{success:e,error:t})})}function lL(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function cL(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function Ea(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,ge.call(this,this.media,s?"play":"pause"))}const br={setup(){const s=this;Re(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,$s.call(s),k.object(window.Vimeo)?br.ready.call(s):yr(s.config.urls.vimeo.sdk).then(()=>{br.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=cL(o);const l=r?{h:r}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=$u({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=lL(o),h=fe("iframe"),u=mr(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=En(h,s.media);else{const S=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});S.appendChild(h),s.media=En(S,s.media)}e.customControls||ka(mr(s.config.urls.vimeo.api,u)).then(S=>{!k.empty(S)&&S.thumbnail_url&&Ne.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=()=>(Ea.call(s,!0),s.embed.play()),s.media.pause=()=>(Ea.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:w,media:x,paused:E,volume:v}=s,T=E&&!w.hasPlayed;x.seeking=!0,ge.call(s,x,"seeking"),Promise.resolve(T&&w.setVolume(0)).then(()=>w.setCurrentTime(S)).then(()=>T&&w.pause()).then(()=>T&&w.setVolume(v)).catch(()=>{})}});let g=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>g,set(S){s.embed.setPlaybackRate(S).then(()=>{g=S,ge.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,ge.call(s,s.media,"volumechange")})}});let{muted:p}=s.config;Object.defineProperty(s.media,"muted",{get:()=>p,set(S){const w=!!k.boolean(S)&&S;s.embed.setMuted(!!w||s.config.muted).then(()=>{p=w,ge.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(S){const w=k.boolean(S)?S:s.config.loop.active;s.embed.setLoop(w).then(()=>{b=w})}}),s.embed.getVideoUrl().then(S=>{y=S,Z.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[w,x]=S;s.embed.ratio=Du(w,x),$s.call(this)}),s.embed.setAutopause(s.config.autopause).then(S=>{s.config.autopause=S}),s.embed.getVideoTitle().then(S=>{s.config.title=S,Ne.setTitle.call(this)}),s.embed.getCurrentTime().then(S=>{f=S,ge.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(S=>{s.media.duration=S,ge.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(S=>{s.media.textTracks=S,Ie.setup.call(s)}),s.embed.on("cuechange",({cues:S=[]})=>{const w=S.map(x=>Q5(x.text));Ie.updateCues.call(s,w)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(S=>{Ea.call(s,!S),S||ge.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{ge.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{ge.call(s,s.media,"playing")}),s.embed.on("play",()=>{Ea.call(s,!0),ge.call(s,s.media,"playing")}),s.embed.on("pause",()=>{Ea.call(s,!1)}),s.embed.on("timeupdate",S=>{s.media.seeking=!1,f=S.seconds,ge.call(s,s.media,"timeupdate")}),s.embed.on("progress",S=>{s.media.buffered=S.percent,ge.call(s,s.media,"progress"),parseInt(S.percent,10)===1&&ge.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(w=>{w!==s.media.duration&&(s.media.duration=w,ge.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,ge.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,ge.call(s,s.media,"ended")}),s.embed.on("error",S=>{s.media.error=S,ge.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Ne.build.call(s),0)}};function dL(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ta(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,ge.call(this,this.media,s?"play":"pause"))}function hL(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ln={setup(){if(Re(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ln.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ln.ready.call(this)},yr(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){ka(mr(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:a,width:i}=e;this.config.title=t,Ne.setTitle.call(this),this.embed.ratio=Du(i,a)}$s.call(this)}).catch(()=>{$s.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=dL(a),o=fe("div",{id:Y5(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=En(o,s.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;An(r("maxres"),121).catch(()=>An(r("sd"),121)).catch(()=>An(r("hq"))).then(l=>Ne.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:hL(e),playerVars:Ve({},{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},ge.call(s,s.media,"error")}},onPlaybackRateChange(r){const l=r.target;s.media.playbackRate=l.getPlaybackRate(),ge.call(s,s.media,"ratechange")},onReady(r){if(k.function(s.media.play))return;const l=r.target;Ln.getTitle.call(s,i),s.media.play=()=>{Ta.call(s,!0),l.playVideo()},s.media.pause=()=>{Ta.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,ge.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),ge.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),ge.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),ge.call(s,s.media,"timeupdate"),ge.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)&&ge.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),ge.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Ne.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,ge.call(s,s.media,"seeked")),r.data){case-1:ge.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),ge.call(s,s.media,"progress");break;case 0:Ta.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):ge.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ta.call(s,!0),ge.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{ge.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),ge.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ta.call(s,!1);break;case 3:ge.call(s,s.media,"waiting")}ge.call(s,s.elements.container,"statechange",!1,{code:r.data})}}})}},Uu={setup(){this.media?(Re(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Re(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Re(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vu(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ns.setup.call(this):this.isYouTube?Ln.setup.call(this):this.isVimeo&&br.setup.call(this)):this.debug.warn("No media element found!")}};class uL{constructor(e){Q(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():yr(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Q(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()}),Q(this,"setupIMA",()=>{this.elements.container=fe("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()}),Q(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)}}),Q(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const a=vn(Math.max(this.manager.getRemainingTime(),0)),i=`${Qe.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Q(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")}),Q(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=fe("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,a.appendChild(o)}}})}),Q(this,"onAdEvent",t=>{const{container:a}=this.player.elements,i=t.getAd(),o=t.getAdData();switch((r=>{ge.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()}`)}}),Q(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Q(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)})}),Q(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(()=>{})}),Q(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,zt(this.player.media.play())}),Q(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Q(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Q(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(()=>{})}),Q(this,"trigger",(t,...a)=>{const i=this.events[t];k.array(i)&&i.forEach(o=>{k.function(o)&&o.apply(this,a)})}),Q(this,"on",(t,a)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(a),this)),Q(this,"startSafetyTimer",(t,a)=>{this.player.debug.log(`Safety timer invoked from: ${a}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Q(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/?${$u({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 Gu(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const mL=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},ju=(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 Sr{constructor(e){Q(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)})}),Q(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)}})),Q(this,"getThumbnail",t=>new Promise(a=>{ka(t).then(i=>{const o={frames:mL(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})})),Q(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=vn(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()}}),Q(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Q(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()))}),Q(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):dr.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Q(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})}),Q(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("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=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Q(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Q(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)))}),Q(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)}}),Q(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))}),Q(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)}})}),Q(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)})),Q(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)}}),Q(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)}),Q(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)}),Q(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Q(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()}),Q(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=Gu(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Q(this,"setScrubbingContainerSize",()=>{const{width:t,height:a}=ju(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`}),Q(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}=ju(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 _r={insertElements(s,e){k.string(e)?Au(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Au(s,this.media,t)})},change(s){xu(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:fe(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","")),Ne.addStyleHook.call(this),this.isHTML5&&_r.insertElements.call(this,"source",e),this.config.title=s.title,Uu.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&_r.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ne.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 Sr(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class zs{constructor(e,t){if(Q(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>zt(this.media.play())),this.media.play()):null),Q(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Q(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Q(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Q(this,"restart",()=>{this.currentTime=0}),Q(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Q(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Q(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Q(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Q(this,"airplay",()=>{$e.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Q(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Tn(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,h=Re(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)&&Z.toggleMenu.call(this,!1),h!==d){const u=h?"controlshidden":"controlsshown";ge.call(this,this.media,u)}return!h}return!1}),Q(this,"on",(l,d)=>{Le.call(this,this.elements.container,l,d)}),Q(this,"once",(l,d)=>{dr.call(this,this.elements.container,l,d)}),Q(this,"off",(l,d)=>{Cn(this.elements.container,l,d)}),Q(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()):(W5.call(this),ns.cancelRequests.call(this),En(this.elements.original,this.elements.container),ge.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?(Ne.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))}),Q(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=Ve({},zu,zs.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 nL(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=Vu(o.getAttribute("src")),this.provider=aL(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=pr.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 iL(this),this.storage=new wa(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vu(this.media,this.elements.container)),Ne.migrateStyles.call(this),Ne.addStyleHook.call(this),Uu.setup.call(this),this.config.debug&&Le.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Nt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ne.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new uL(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>zt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Sr(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===pr.video}get isAudio(){return this.type===pr.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=Gu(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=Iu(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){_r.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,Z.setDownloadUrl.call(this))}set poster(e){this.isVideo?Ne.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=xn(ur.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Nu(e)?(this.config.ratio=xn(e),$s.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){Ie.toggle.call(this,e,!1)}set currentTrack(e){Ie.set.call(this,e,!1),Ie.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Ie.setLanguage.call(this,e,!1)}get language(){return(Ie.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?fr.active:fr.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===fr.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 Sr(this))}static supported(e,t){return $e.check(e,t)}static loadSprite(e,t){return Fu(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 zs(i,t))}}zs.defaults=U5(zu);const fL={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},pL={class:"carousel-video-player__play-info-portrait__date"},gL={class:"carousel-video-player__play-info-portrait__game"},yL={key:2,class:"carousel-video-player__play-info__data"},bL={class:"video-container"},SL=["id"],_L=Xe({__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 g=new Date(t.play.gameDate);return`${g.getDate()}, ${lv(g.getMonth())} ${g.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${du[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 zs(`#${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,g)=>(n.openBlock(),n.createElementBlock("div",{class:"carousel-video-player",onMouseenter:g[0]||(g[0]=m=>i.value=!0),onMouseleave:g[1]||(g[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",fL,[n.createElementVNode("div",pL,[n.createTextVNode(n.toDisplayString(r.value)+" - ",1),n.createElementVNode("div",gL,n.toDisplayString(d.value),1)]),n.createTextVNode(" "+n.toDisplayString(c.value),1)])):(n.openBlock(),n.createElementBlock("div",yL,n.toDisplayString(l.value),1))],2),[[n.vShow,i.value]]),n.createElementVNode("div",bL,[n.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,SL)])],32))}},[["__scopeId","data-v-7f6d1b57"]]),wr=s=>(n.pushScopeId("data-v-e0039d6a"),s=s(),n.popScopeId(),s),wL=[wr(()=>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))],kL={class:"carousel-full-screen__carousel"},EL={key:0,class:"icon-mobil-scrren"},TL=[wr(()=>n.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),wr(()=>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))],CL={class:"carousel-full-screen__carousel__video-player"},kr=2,xL=Xe({__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,w)=>(S.index=w,{...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 w=i.get(a+S*-1),x=i.get(a);if(w&&w.videoPlayer&&(w.videoPlayer.pause(),w.videoPlayer.currentTime=0),x&&x.videoPlayer&&x.videoPlayer.play(),S>0){const E=i.get(a+kr),v=i.get(a+1),T=i.get(a-kr);E&&(l.value.find(R=>R.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+kr);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 g=n.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=n.computed(()=>g.portrait);function p(){var b=window.matchMedia("(orientation: portrait)");b.matches?g.portrait=!0:g.portrait=!1}function y(){window.screen.orientation.angle!=90?g.portrait=!0:g.portrait=!1}return n.onMounted(()=>{c()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,w)=>{S.id=`plyrFS${w+1}`})},100)}),n.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",p):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},wL,4),n.createElementVNode("div",kL,[m.value&&d()?(n.openBlock(),n.createElementBlock("div",EL,TL)):n.createCommentVNode("",!0),n.createVNode(n.unref(c5),n.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:h}),{default:n.withCtx(({item:w})=>[n.createElementVNode("div",CL,[n.createVNode(_L,{play:w,"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"]]),vL=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"}]]),AL=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"}]]),Hu={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Wu={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ku={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},qu=new Map([[1,vL],[2,AL]]),LL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Er={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))}}},Yu=()=>{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}))},Ju=Er.setup;Er.setup=Ju?(s,e)=>(Yu(),Ju(s,e)):Yu;const IL=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),RL=["src"],BL={key:1,class:"text"},NL=["src"],DL={class:"stats"},PL=IL(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),OL={class:"numstats"},FL={class:"leyend"};function ML(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,RL)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",BL,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,NL)):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",DL,[PL,n.createElementVNode("div",OL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",FL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const VL=LL(Er,[["render",ML],["__scopeId","data-v-fb269a1e"]]),$L={class:"gsc-dropdown__main-container__item-selected"},zL=["height","width"],UL=["stroke"],GL={class:"gsc-dropdown__items-container"},jL=["onClick"],HL={key:0,class:"gsc-dropdown__items-footer"},WL={__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,(g,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&g&&g.length){if(t.defaultItemByProp){const p=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(o.value=p,a.value=g[p]):(o.value=0,a.value=g[0])}else a.value=g[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,g=>{if(g){const m=t.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);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(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function u(g,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=g,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)}),(g,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",$L,[n.renderSlot(g.$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,UL)],8,zL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",GL,[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,(p,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(p,y)},[n.renderSlot(g.$slots,"availableItem",{item:p})],10,jL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",HL,[n.createVNode(n.unref(VL),{"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))}},KL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},qL={class:"tournament-select__selected-tournament"},YL={class:"tournament-select__selected-tournament__logo"},JL=["src"],XL={class:"tournament-select__selected-tournament__name"},ZL="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",QL={__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 g={};return t.fontFamily&&(g["font-family"]=`${t.fontFamily}`),g}),o=n.computed(()=>t.tournamentsIdsToInclude.size?d(a.value):a.value),r=n.computed(()=>o.value.find(g=>g.seasonsIds.has(t.currentSeasonId))||o.value[0]);async function l(){try{if(t.items&&t.items.length)a.value=[...t.items];else{const g=await h();e("change-tournaments",g),a.value=g.map(m=>({...m.tournament,seasons:m.seasons,seasonsIds:m.seasons.reduce((p,y)=>(p.add(y.id),p),new Set)})).sort((m,p)=>m.order-p.order)}}catch(g){throw new Error(g)}}function d(g){return g.filter(m=>t.tournamentsIdsToInclude.has(m.id))}function c(g){const m=new XMLHttpRequest,p=`${t.logosUrl}${g}.${t.logoFileType}`;return m.open("HEAD",p,!1),m.send(),m.status!==404}async function h(){try{return(await fetch(t.apiUrl||ZL)).json()}catch(g){return Promise.reject(g)}}function u(g){e("input",g)}function f(g){e("input",g)}return n.onMounted(()=>{l()}),(g,m)=>(n.openBlock(),n.createElementBlock("div",{class:"tournament-select",style:n.normalizeStyle(i.value)},[n.createVNode(n.unref(WL),n.mergeProps(t,{"model-value":r.value,items:o.value,onInput:u,"onUpdate:modelValue":f}),{default:n.withCtx(({selectedItem:p})=>[n.createElementVNode("div",qL,[n.createElementVNode("div",YL,[c(p.id)?(n.openBlock(),n.createElementBlock("img",{key:0,src:`${t.logosUrl}${p.id}.${t.logoFileType}`,alt:""},null,8,JL)):n.createCommentVNode("",!0)]),n.createElementVNode("div",XL,n.toDisplayString(p.name),1)])]),availableItem:n.withCtx(({item:p})=>[n.createElementVNode("div",null,n.toDisplayString(p.name),1)]),_:1},16,["model-value","items"])],4))}},eI=KL(QL,[["__scopeId","data-v-60385f70"]]),tI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Tr={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))}}},Xu=()=>{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}))},Zu=Tr.setup;Tr.setup=Zu?(s,e)=>(Xu(),Zu(s,e)):Xu;const sI=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),aI=["src"],nI={key:1,class:"text"},iI=["src"],oI={class:"stats"},rI=sI(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),lI={class:"numstats"},cI={class:"leyend"};function dI(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,aI)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",nI,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,iI)):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",oI,[rI,n.createElementVNode("div",lI,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",cI,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const hI=tI(Tr,[["render",dI],["__scopeId","data-v-fb269a1e"]]),uI={class:"gsc-dropdown__main-container__item-selected"},mI=["height","width"],fI=["stroke"],pI={class:"gsc-dropdown__items-container"},gI=["onClick"],yI={key:0,class:"gsc-dropdown__items-footer"},bI={__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,(g,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&g&&g.length){if(t.defaultItemByProp){const p=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(o.value=p,a.value=g[p]):(o.value=0,a.value=g[0])}else a.value=g[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,g=>{if(g){const m=t.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);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(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function u(g,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=g,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)}),(g,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",uI,[n.renderSlot(g.$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,fI)],8,mI))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",pI,[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,(p,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(p,y)},[n.renderSlot(g.$slots,"availableItem",{item:p})],10,gI))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",yI,[n.createVNode(n.unref(hI),{"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))}},SI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},_I={class:"season-name"},wI={class:"items-list-season"},kI={__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(bI),{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",_I,[n.createElementVNode("span",null,n.toDisplayString(d.name),1)])]),availableItem:n.withCtx(({item:d})=>[n.createElementVNode("span",wI,n.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},EI=SI(kI,[["__scopeId","data-v-81bba1d4"]]);function Qu(s,e){return function(){return s.apply(e,arguments)}}const{toString:TI}=Object.prototype,{getPrototypeOf:Cr}=Object,In=(s=>e=>{const t=TI.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=s=>(s=s.toLowerCase(),e=>In(e)===s),Rn=s=>e=>typeof e===s,{isArray:Us}=Array,Ca=Rn("undefined");function CI(s){return s!==null&&!Ca(s)&&s.constructor!==null&&!Ca(s.constructor)&&kt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const em=Dt("ArrayBuffer");function xI(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&em(s.buffer),e}const vI=Rn("string"),kt=Rn("function"),tm=Rn("number"),Bn=s=>s!==null&&typeof s=="object",AI=s=>s===!0||s===!1,Nn=s=>{if(In(s)!=="object")return!1;const e=Cr(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},LI=Dt("Date"),II=Dt("File"),RI=Dt("Blob"),BI=Dt("FileList"),NI=s=>Bn(s)&&kt(s.pipe),DI=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||kt(s.append)&&((e=In(s))==="formdata"||e==="object"&&kt(s.toString)&&s.toString()==="[object FormData]"))},PI=Dt("URLSearchParams"),[OI,FI,MI,VI]=["ReadableStream","Request","Response","Headers"].map(Dt),$I=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xa(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Us(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 sm(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 Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,am=s=>!Ca(s)&&s!==Ts;function xr(){const{caseless:s}=am(this)&&this||{},e={},t=(a,i)=>{const o=s&&sm(e,i)||i;Nn(e[o])&&Nn(a)?e[o]=xr(e[o],a):Nn(a)?e[o]=xr({},a):Us(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&xa(arguments[a],t);return e}const zI=(s,e,t,{allOwnKeys:a}={})=>(xa(e,(i,o)=>{t&&kt(i)?s[o]=Qu(i,t):s[o]=i},{allOwnKeys:a}),s),UI=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),GI=(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)},jI=(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&&Cr(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},HI=(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},WI=s=>{if(!s)return null;if(Us(s))return s;let e=s.length;if(!tm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},KI=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Cr(Uint8Array)),qI=(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])}},YI=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},JI=Dt("HTMLFormElement"),XI=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),nm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),ZI=Dt("RegExp"),im=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};xa(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},QI=s=>{im(s,(e,t)=>{if(kt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(kt(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+"'")})}})},e4=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Us(s)?a(s):a(String(s).split(e)),t},t4=()=>{},s4=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,vr="abcdefghijklmnopqrstuvwxyz",om="0123456789",rm={DIGIT:om,ALPHA:vr,ALPHA_DIGIT:vr+vr.toUpperCase()+om},a4=(s=16,e=rm.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function n4(s){return!!(s&&kt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const i4=s=>{const e=new Array(10),t=(a,i)=>{if(Bn(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Us(a)?[]:{};return xa(a,(r,l)=>{const d=t(r,i+1);!Ca(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},o4=Dt("AsyncFunction"),r4=s=>s&&(Bn(s)||kt(s))&&kt(s.then)&&kt(s.catch),lm=((s,e)=>s?setImmediate:e?((t,a)=>(Ts.addEventListener("message",({source:i,data:o})=>{i===Ts&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),Ts.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",kt(Ts.postMessage)),l4=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||lm,F={isArray:Us,isArrayBuffer:em,isBuffer:CI,isFormData:DI,isArrayBufferView:xI,isString:vI,isNumber:tm,isBoolean:AI,isObject:Bn,isPlainObject:Nn,isReadableStream:OI,isRequest:FI,isResponse:MI,isHeaders:VI,isUndefined:Ca,isDate:LI,isFile:II,isBlob:RI,isRegExp:ZI,isFunction:kt,isStream:NI,isURLSearchParams:PI,isTypedArray:KI,isFileList:BI,forEach:xa,merge:xr,extend:zI,trim:$I,stripBOM:UI,inherits:GI,toFlatObject:jI,kindOf:In,kindOfTest:Dt,endsWith:HI,toArray:WI,forEachEntry:qI,matchAll:YI,isHTMLForm:JI,hasOwnProperty:nm,hasOwnProp:nm,reduceDescriptors:im,freezeMethods:QI,toObjectSet:e4,toCamelCase:XI,noop:t4,toFiniteNumber:s4,findKey:sm,global:Ts,isContextDefined:am,ALPHABET:rm,generateString:a4,isSpecCompliantForm:n4,toJSONObject:i4,isAsyncFn:o4,isThenable:r4,setImmediate:lm,asap:l4};function Ee(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)}F.inherits(Ee,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:F.toJSONObject(this.config),code:this.code,status:this.status}}});const cm=Ee.prototype,dm={};["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=>{dm[s]={value:s}}),Object.defineProperties(Ee,dm),Object.defineProperty(cm,"isAxiosError",{value:!0}),Ee.from=(s,e,t,a,i,o)=>{const r=Object.create(cm);return F.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Ee.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const c4=null;function Ar(s){return F.isPlainObject(s)||F.isArray(s)}function hm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function um(s,e,t){return s?s.concat(e).map(function(a,i){return a=hm(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function d4(s){return F.isArray(s)&&!s.some(Ar)}const h4=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Dn(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!F.isUndefined(m[g])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(F.isDate(g))return g.toISOString();if(!l&&F.isBlob(g))throw new Ee("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(g)||F.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(F.endsWith(m,"{}"))m=a?m:m.slice(0,-2),g=JSON.stringify(g);else if(F.isArray(g)&&d4(g)||(F.isFileList(g)||F.endsWith(m,"[]"))&&(y=F.toArray(g)))return m=hm(m),y.forEach(function(b,S){!(F.isUndefined(b)||b===null)&&e.append(r===!0?um([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Ar(g)?!0:(e.append(um(p,m,o),d(g)),!1)}const h=[],u=Object.assign(h4,{defaultVisitor:c,convertValue:d,isVisitable:Ar});function f(g,m){if(!F.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),F.forEach(g,function(p,y){(!(F.isUndefined(p)||p===null)&&i.call(e,p,F.isString(y)?y.trim():y,m,u))===!0&&f(p,m?m.concat(y):[y])}),h.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function mm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Lr(s,e){this._pairs=[],s&&Dn(s,this,e)}const fm=Lr.prototype;fm.append=function(s,e){this._pairs.push([s,e])},fm.toString=function(s){const e=s?function(t){return s.call(this,t,mm)}:mm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function u4(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pm(s,e,t){if(!e)return s;const a=t&&t.encode||u4,i=t&&t.serialize;let o;if(i?o=i(e,t):o=F.isURLSearchParams(e)?e.toString():new Lr(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}class m4{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){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const gm=m4,ym={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f4=typeof URLSearchParams<"u"?URLSearchParams:Lr,p4=typeof FormData<"u"?FormData:null,g4=typeof Blob<"u"?Blob:null,y4={isBrowser:!0,classes:{URLSearchParams:f4,FormData:p4,Blob:g4},protocols:["http","https","file","blob","url","data"]},Ir=typeof window<"u"&&typeof document<"u",Rr=typeof navigator=="object"&&navigator||void 0,b4=Ir&&(!Rr||["ReactNative","NativeScript","NS"].indexOf(Rr.product)<0),S4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_4=Ir&&window.location.href||"http://localhost",w4=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ir,hasStandardBrowserEnv:b4,hasStandardBrowserWebWorkerEnv:S4,navigator:Rr,origin:_4},Symbol.toStringTag,{value:"Module"})),gt={...w4,...y4};function k4(s,e){return Dn(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return gt.isNode&&F.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function E4(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function T4(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 bm(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&&F.isArray(i)?i.length:r,d?(F.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!F.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&F.isArray(i[r])&&(i[r]=T4(i[r])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(a,i)=>{e(E4(a),i,t,0)}),t}return null}function C4(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Br={transitional:ym,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return a?JSON.stringify(bm(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.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 k4(s,this.formSerializer).toString();if((o=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Dn(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),C4(s)):s}],transformResponse:[function(s){const e=this.transitional||Br.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.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"?Ee.from(o,Ee.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}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Br.headers[s]={}});const Nr=Br,x4=F.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"]),v4=s=>{const e={};let t,a,i;return s&&s.split(`
|
|
37
|
+
`);if(t!==this.elements.captions.innerHTML){kn(this.elements.captions);const a=fe("span",$t(this.config.selectors.caption));a.innerHTML=t,this.elements.captions.appendChild(a),ge.call(this,this.media,"cuechange")}}},zu={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:[]}},fr={active:"picture-in-picture",inactive:"inline"},is={html5:"html5",youtube:"youtube",vimeo:"vimeo"},pr={audio:"audio",video:"video"};function aL(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 gr=()=>{};class nL{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):gr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):gr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):gr}}class Nt{constructor(e){Q(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;ge.call(this.player,a,this.active?"enterfullscreen":"exitfullscreen",!0)}),Q(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":"",Re(this.target,this.player.config.classNames.fullscreen.fallback,t),Ze.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()}),Q(this,"trapFocus",t=>{if(Ze.isIos||Ze.isIPadOS||!this.active||t.key!=="Tab")return;const a=document.activeElement,i=ba.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())}),Q(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Nt.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Re(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Q(this,"enter",()=>{this.supported&&(Ze.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Nt.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Q(this,"exit",()=>{if(this.supported)if(Ze.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),zt(this.player.play());else if(!Nt.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)}),Q(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Nt.prefix,this.property=Nt.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&j5(this.player.elements.container,e.config.fullscreen.container),Le.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Le.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")}),Le.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 Nt.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,Nt.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Nt.nativeSupported||!Ze.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Nt.nativeSupported||this.forceFallback)return Tn(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 Ze.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function An(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 Ne={addStyleHook(){Re(this.elements.container,this.config.selectors.container.replace(".",""),!0),Re(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 Ne.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(Z.inject.call(this),this.listeners.controls()),Ne.toggleNativeControls.call(this),this.isHTML5&&Ie.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Z.updateVolume.call(this),Z.timeUpdate.call(this),Z.durationUpdate.call(this),Ne.checkPlaying.call(this),Re(this.elements.container,this.config.classNames.pip.supported,$e.pip&&this.isHTML5&&this.isVideo),Re(this.elements.container,this.config.classNames.airplay.supported,$e.airplay&&this.isHTML5),Re(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{ge.call(this,this.media,"ready")},0),Ne.setTitle.call(this),this.poster&&Ne.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&Z.durationUpdate.call(this),this.config.mediaMetadata&&Z.setMediaMetadata.call(this)},setTitle(){let s=Qe.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=Ke.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,a=Qe.get("frameTitle",this.config);e.setAttribute("title",a.replace("{title}",t))}},togglePoster(s){Re(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"),K5.call(this).then(()=>An(s)).catch(t=>{throw s===this.poster&&Ne.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:""}),Ne.togglePoster.call(this,!0),s)))},checkPlaying(s){Re(this.elements.container,this.config.classNames.playing,this.playing),Re(this.elements.container,this.config.classNames.paused,this.paused),Re(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",Qe.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Ne.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Re(this.elements.container,this.config.classNames.loading,this.loading),Ne.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 iL{constructor(e){Q(this,"firstTouch",()=>{const{player:t}=this,{elements:a}=t;t.touch=!0,Re(a.container,t.config.classNames.isTouch,!0)}),Q(this,"global",(t=!0)=>{const{player:a}=this;a.config.keyboard.global&&Sa.call(a,window,"keydown keyup",this.handleKey,t,!1),Sa.call(a,document.body,"click",this.toggleMenu,t),dr.call(a,document.body,"touchstart",this.firstTouch)}),Q(this,"container",()=>{const{player:t}=this,{config:a,elements:i,timers:o}=t;!a.keyboard.global&&a.keyboard.focused&&Le.call(t,i.container,"keydown keyup",this.handleKey,!1),Le.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)&&(Ne.toggleControls.call(t,!0),h=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>Ne.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]=ur.call(t),f=Ru(`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[g,m]=q5(),p=g/m>h/u;f?(d.style.width=p?"auto":"100%",d.style.height=p?"100%":"auto"):(d.style.maxWidth=p?m/u*h+"px":null,d.style.margin=p?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Le.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"?Le:Cn).call(t,window,"resize",l)))})}),Q(this,"media",()=>{const{player:t}=this,{elements:a}=t;if(Le.call(t,t.media,"timeupdate seeking seeked",o=>Z.timeUpdate.call(t,o)),Le.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>Z.durationUpdate.call(t,o)),Le.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Le.call(t,t.media,"progress playing seeking seeked",o=>Z.updateProgress.call(t,o)),Le.call(t,t.media,"volumechange",o=>Z.updateVolume.call(t,o)),Le.call(t,t.media,"playing play pause ended emptied timeupdate",o=>Ne.checkPlaying.call(t,o)),Le.call(t,t.media,"waiting canplay seeked playing",o=>Ne.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=Ke.call(t,`.${t.config.classNames.video}`);if(!k.element(o))return;Le.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,()=>{zt(t.play())},"play")):this.proxy(r,()=>{zt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Le.call(t,a.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Le.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Le.call(t,t.media,"ratechange",()=>{Z.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Le.call(t,t.media,"qualitychange",o=>{Z.updateSetting.call(t,"quality",null,o.detail.quality)}),Le.call(t,t.media,"ready qualitychange",()=>{Z.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Le.call(t,t.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=t.media.error),ge.call(t,a.container,o.type,!0,r)})}),Q(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)}),Q(this,"bind",(t,a,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=k.function(d);Le.call(l,t,a,h=>this.proxy(h,i,o),r&&!c)}),Q(this,"controls",()=>{const{player:t}=this,{elements:a}=t,i=Ze.isIE?"change":"input";if(a.buttons.play&&Array.from(a.buttons.play).forEach(o=>{this.bind(o,"click",()=>{zt(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",()=>{ge.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(),Z.toggleMenu.call(t,o)},null,!1),this.bind(a.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),Z.toggleMenu.call(t,o)):Z.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(a.settings.menu,"keydown",o=>{o.key==="Escape"&&Z.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),zt(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Ze.isIos){const o=ba.call(t,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>Cu(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=>Z.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)}),Ze.isWebKit&&Array.from(ba.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>Z.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,Z.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;Re(a.controls,o.classNames.noTransition,!0),Ne.toggleControls.call(t,!0),setTimeout(()=>{Re(a.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>Ne.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 g=document.activeElement;if(k.element(g)){const{editable:m}=t.config.selectors,{seek:p}=a.inputs;if(g!==p&&Es(g,m)||e.key===" "&&Es(g,'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||zt(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){Z.toggleMenu.call(this.player,e)}}function oL(s,e){return s(e={exports:{}},e.exports),e.exports}var rL=oL(function(s,e){s.exports=function(){var t=function(){},a={},i={},o={};function r(f,g){f=f.push?f:[f];var m,p,y,b=[],S=f.length,w=S;for(m=function(x,E){E.length&&b.push(x),--w||g(b)};S--;)p=f[S],(y=i[p])?m(p,y):(o[p]=o[p]||[]).push(m)}function l(f,g){if(f){var m=o[f];if(i[f]=g,m)for(;m.length;)m[0](f,g),m.splice(0,1)}}function d(f,g){f.call&&(f={success:f}),g.length?(f.error||t)(g):(f.success||t)(f)}function c(f,g,m,p){var y,b,S=document,w=m.async,x=(m.numRetries||0)+1,E=m.before||t,v=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");p=p||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=w===void 0||w),b.onload=b.onerror=b.onbeforeload=function(R){var L=R.type[0];if(y)try{b.sheet.cssText.length||(L="e")}catch(B){B.code!=18&&(L="e")}if(L=="e"){if((p+=1)<x)return c(f,g,m,p)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";g(f,L,R.defaultPrevented)},E(f,b)!==!1&&S.head.appendChild(b)}function h(f,g,m){var p,y,b=(f=f.push?f:[f]).length,S=b,w=[];for(p=function(x,E,v){if(E=="e"&&w.push(x),E=="b"){if(!v)return;w.push(x)}--b||g(w)},y=0;y<S;y++)c(f[y],p,m)}function u(f,g,m){var p,y;if(g&&g.trim&&(p=g),y=(p?m:g)||{},p){if(p in a)throw"LoadJS";a[p]=!0}function b(S,w){h(f,function(x){d(y,x),S&&d({success:S,error:w},x),l(p,x)},y)}if(y.returnPromise)return new Promise(b);b()}return u.ready=function(f,g){return r(f,function(m){d(g,m)}),u},u.done=function(f){l(f,[])},u.reset=function(){a={},i={},o={}},u.isDefined=function(f){return f in a},u}()});function yr(s){return new Promise((e,t)=>{rL(s,{success:e,error:t})})}function lL(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function cL(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function Ea(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,ge.call(this,this.media,s?"play":"pause"))}const br={setup(){const s=this;Re(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,$s.call(s),k.object(window.Vimeo)?br.ready.call(s):yr(s.config.urls.vimeo.sdk).then(()=>{br.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=cL(o);const l=r?{h:r}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=$u({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=lL(o),h=fe("iframe"),u=mr(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=En(h,s.media);else{const S=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});S.appendChild(h),s.media=En(S,s.media)}e.customControls||ka(mr(s.config.urls.vimeo.api,u)).then(S=>{!k.empty(S)&&S.thumbnail_url&&Ne.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=()=>(Ea.call(s,!0),s.embed.play()),s.media.pause=()=>(Ea.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:w,media:x,paused:E,volume:v}=s,T=E&&!w.hasPlayed;x.seeking=!0,ge.call(s,x,"seeking"),Promise.resolve(T&&w.setVolume(0)).then(()=>w.setCurrentTime(S)).then(()=>T&&w.pause()).then(()=>T&&w.setVolume(v)).catch(()=>{})}});let g=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>g,set(S){s.embed.setPlaybackRate(S).then(()=>{g=S,ge.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,ge.call(s,s.media,"volumechange")})}});let{muted:p}=s.config;Object.defineProperty(s.media,"muted",{get:()=>p,set(S){const w=!!k.boolean(S)&&S;s.embed.setMuted(!!w||s.config.muted).then(()=>{p=w,ge.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(S){const w=k.boolean(S)?S:s.config.loop.active;s.embed.setLoop(w).then(()=>{b=w})}}),s.embed.getVideoUrl().then(S=>{y=S,Z.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[w,x]=S;s.embed.ratio=Du(w,x),$s.call(this)}),s.embed.setAutopause(s.config.autopause).then(S=>{s.config.autopause=S}),s.embed.getVideoTitle().then(S=>{s.config.title=S,Ne.setTitle.call(this)}),s.embed.getCurrentTime().then(S=>{f=S,ge.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(S=>{s.media.duration=S,ge.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(S=>{s.media.textTracks=S,Ie.setup.call(s)}),s.embed.on("cuechange",({cues:S=[]})=>{const w=S.map(x=>Q5(x.text));Ie.updateCues.call(s,w)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(S=>{Ea.call(s,!S),S||ge.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{ge.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{ge.call(s,s.media,"playing")}),s.embed.on("play",()=>{Ea.call(s,!0),ge.call(s,s.media,"playing")}),s.embed.on("pause",()=>{Ea.call(s,!1)}),s.embed.on("timeupdate",S=>{s.media.seeking=!1,f=S.seconds,ge.call(s,s.media,"timeupdate")}),s.embed.on("progress",S=>{s.media.buffered=S.percent,ge.call(s,s.media,"progress"),parseInt(S.percent,10)===1&&ge.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(w=>{w!==s.media.duration&&(s.media.duration=w,ge.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,ge.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,ge.call(s,s.media,"ended")}),s.embed.on("error",S=>{s.media.error=S,ge.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Ne.build.call(s),0)}};function dL(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ta(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,ge.call(this,this.media,s?"play":"pause"))}function hL(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ln={setup(){if(Re(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ln.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ln.ready.call(this)},yr(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){ka(mr(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:a,width:i}=e;this.config.title=t,Ne.setTitle.call(this),this.embed.ratio=Du(i,a)}$s.call(this)}).catch(()=>{$s.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=dL(a),o=fe("div",{id:Y5(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=En(o,s.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;An(r("maxres"),121).catch(()=>An(r("sd"),121)).catch(()=>An(r("hq"))).then(l=>Ne.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:hL(e),playerVars:Ve({},{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},ge.call(s,s.media,"error")}},onPlaybackRateChange(r){const l=r.target;s.media.playbackRate=l.getPlaybackRate(),ge.call(s,s.media,"ratechange")},onReady(r){if(k.function(s.media.play))return;const l=r.target;Ln.getTitle.call(s,i),s.media.play=()=>{Ta.call(s,!0),l.playVideo()},s.media.pause=()=>{Ta.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,ge.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),ge.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),ge.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),ge.call(s,s.media,"timeupdate"),ge.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)&&ge.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),ge.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Ne.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,ge.call(s,s.media,"seeked")),r.data){case-1:ge.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),ge.call(s,s.media,"progress");break;case 0:Ta.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):ge.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ta.call(s,!0),ge.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{ge.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),ge.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ta.call(s,!1);break;case 3:ge.call(s,s.media,"waiting")}ge.call(s,s.elements.container,"statechange",!1,{code:r.data})}}})}},Uu={setup(){this.media?(Re(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Re(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Re(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vu(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ns.setup.call(this):this.isYouTube?Ln.setup.call(this):this.isVimeo&&br.setup.call(this)):this.debug.warn("No media element found!")}};class uL{constructor(e){Q(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():yr(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Q(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()}),Q(this,"setupIMA",()=>{this.elements.container=fe("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()}),Q(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)}}),Q(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const a=vn(Math.max(this.manager.getRemainingTime(),0)),i=`${Qe.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Q(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")}),Q(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=fe("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,a.appendChild(o)}}})}),Q(this,"onAdEvent",t=>{const{container:a}=this.player.elements,i=t.getAd(),o=t.getAdData();switch((r=>{ge.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()}`)}}),Q(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Q(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)})}),Q(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(()=>{})}),Q(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,zt(this.player.media.play())}),Q(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Q(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Q(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(()=>{})}),Q(this,"trigger",(t,...a)=>{const i=this.events[t];k.array(i)&&i.forEach(o=>{k.function(o)&&o.apply(this,a)})}),Q(this,"on",(t,a)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(a),this)),Q(this,"startSafetyTimer",(t,a)=>{this.player.debug.log(`Safety timer invoked from: ${a}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Q(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/?${$u({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 Gu(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const mL=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},ju=(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 Sr{constructor(e){Q(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)})}),Q(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)}})),Q(this,"getThumbnail",t=>new Promise(a=>{ka(t).then(i=>{const o={frames:mL(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})})),Q(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=vn(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()}}),Q(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Q(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()))}),Q(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):dr.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Q(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})}),Q(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("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=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Q(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Q(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)))}),Q(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)}}),Q(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))}),Q(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)}})}),Q(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)})),Q(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)}}),Q(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)}),Q(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)}),Q(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Q(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()}),Q(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=Gu(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Q(this,"setScrubbingContainerSize",()=>{const{width:t,height:a}=ju(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`}),Q(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}=ju(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 _r={insertElements(s,e){k.string(e)?Au(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Au(s,this.media,t)})},change(s){xu(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:fe(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","")),Ne.addStyleHook.call(this),this.isHTML5&&_r.insertElements.call(this,"source",e),this.config.title=s.title,Uu.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&_r.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ne.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 Sr(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class zs{constructor(e,t){if(Q(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>zt(this.media.play())),this.media.play()):null),Q(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Q(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Q(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Q(this,"restart",()=>{this.currentTime=0}),Q(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Q(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Q(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Q(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Q(this,"airplay",()=>{$e.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Q(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Tn(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,h=Re(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)&&Z.toggleMenu.call(this,!1),h!==d){const u=h?"controlshidden":"controlsshown";ge.call(this,this.media,u)}return!h}return!1}),Q(this,"on",(l,d)=>{Le.call(this,this.elements.container,l,d)}),Q(this,"once",(l,d)=>{dr.call(this,this.elements.container,l,d)}),Q(this,"off",(l,d)=>{Cn(this.elements.container,l,d)}),Q(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()):(W5.call(this),ns.cancelRequests.call(this),En(this.elements.original,this.elements.container),ge.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?(Ne.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))}),Q(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=Ve({},zu,zs.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 nL(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=Vu(o.getAttribute("src")),this.provider=aL(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=pr.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 iL(this),this.storage=new wa(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vu(this.media,this.elements.container)),Ne.migrateStyles.call(this),Ne.addStyleHook.call(this),Uu.setup.call(this),this.config.debug&&Le.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Nt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Ne.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new uL(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>zt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Sr(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===pr.video}get isAudio(){return this.type===pr.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=Gu(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=Iu(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){_r.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,Z.setDownloadUrl.call(this))}set poster(e){this.isVideo?Ne.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=xn(ur.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Nu(e)?(this.config.ratio=xn(e),$s.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){Ie.toggle.call(this,e,!1)}set currentTrack(e){Ie.set.call(this,e,!1),Ie.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Ie.setLanguage.call(this,e,!1)}get language(){return(Ie.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?fr.active:fr.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===fr.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 Sr(this))}static supported(e,t){return $e.check(e,t)}static loadSprite(e,t){return Fu(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 zs(i,t))}}zs.defaults=U5(zu);const fL={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},pL={class:"carousel-video-player__play-info-portrait__date"},gL={class:"carousel-video-player__play-info-portrait__game"},yL={key:2,class:"carousel-video-player__play-info__data"},bL={class:"video-container"},SL=["id"],_L=Xe({__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 g=new Date(t.play.gameDate);return`${g.getDate()}, ${lv(g.getMonth())} ${g.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${du[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 zs(`#${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,g)=>(n.openBlock(),n.createElementBlock("div",{class:"carousel-video-player",onMouseenter:g[0]||(g[0]=m=>i.value=!0),onMouseleave:g[1]||(g[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",fL,[n.createElementVNode("div",pL,[n.createTextVNode(n.toDisplayString(r.value)+" - ",1),n.createElementVNode("div",gL,n.toDisplayString(d.value),1)]),n.createTextVNode(" "+n.toDisplayString(c.value),1)])):(n.openBlock(),n.createElementBlock("div",yL,n.toDisplayString(l.value),1))],2),[[n.vShow,i.value]]),n.createElementVNode("div",bL,[n.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,SL)])],32))}},[["__scopeId","data-v-96776f5d"]]),wr=s=>(n.pushScopeId("data-v-64d330ca"),s=s(),n.popScopeId(),s),wL=[wr(()=>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))],kL={class:"carousel-full-screen__carousel"},EL={key:0,class:"icon-mobil-scrren"},TL=[wr(()=>n.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),wr(()=>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))],CL={class:"carousel-full-screen__carousel__video-player"},kr=2,xL=Xe({__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,w)=>(S.index=w,{...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 w=i.get(a+S*-1),x=i.get(a);if(w&&w.videoPlayer&&(w.videoPlayer.pause(),w.videoPlayer.currentTime=0),x&&x.videoPlayer&&x.videoPlayer.play(),S>0){const E=i.get(a+kr),v=i.get(a+1),T=i.get(a-kr);E&&(l.value.find(R=>R.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+kr);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 g=n.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=n.computed(()=>g.portrait);function p(){var b=window.matchMedia("(orientation: portrait)");b.matches?g.portrait=!0:g.portrait=!1}function y(){window.screen.orientation.angle!=90?g.portrait=!0:g.portrait=!1}return n.onMounted(()=>{c()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,w)=>{S.id=`plyrFS${w+1}`})},100)}),n.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",p):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},wL,4),n.createElementVNode("div",kL,[m.value&&d()?(n.openBlock(),n.createElementBlock("div",EL,TL)):n.createCommentVNode("",!0),n.createVNode(n.unref(c5),n.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:h}),{default:n.withCtx(({item:w})=>[n.createElementVNode("div",CL,[n.createVNode(_L,{play:w,"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"]]),vL=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"}]]),AL=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"}]]),Hu={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Wu={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ku={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},qu=new Map([[1,vL],[2,AL]]),LL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Er={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))}}},Yu=()=>{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}))},Ju=Er.setup;Er.setup=Ju?(s,e)=>(Yu(),Ju(s,e)):Yu;const IL=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),RL=["src"],BL={key:1,class:"text"},NL=["src"],DL={class:"stats"},PL=IL(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),OL={class:"numstats"},FL={class:"leyend"};function ML(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,RL)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",BL,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,NL)):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",DL,[PL,n.createElementVNode("div",OL,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",FL,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const VL=LL(Er,[["render",ML],["__scopeId","data-v-fb269a1e"]]),$L={class:"gsc-dropdown__main-container__item-selected"},zL=["height","width"],UL=["stroke"],GL={class:"gsc-dropdown__items-container"},jL=["onClick"],HL={key:0,class:"gsc-dropdown__items-footer"},WL={__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,(g,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&g&&g.length){if(t.defaultItemByProp){const p=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(o.value=p,a.value=g[p]):(o.value=0,a.value=g[0])}else a.value=g[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,g=>{if(g){const m=t.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);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(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function u(g,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=g,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)}),(g,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",$L,[n.renderSlot(g.$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,UL)],8,zL))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",GL,[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,(p,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(p,y)},[n.renderSlot(g.$slots,"availableItem",{item:p})],10,jL))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",HL,[n.createVNode(n.unref(VL),{"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))}},KL=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},qL={class:"tournament-select__selected-tournament"},YL={class:"tournament-select__selected-tournament__logo"},JL=["src"],XL={class:"tournament-select__selected-tournament__name"},ZL="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",QL={__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 g={};return t.fontFamily&&(g["font-family"]=`${t.fontFamily}`),g}),o=n.computed(()=>t.tournamentsIdsToInclude.size?d(a.value):a.value),r=n.computed(()=>o.value.find(g=>g.seasonsIds.has(t.currentSeasonId))||o.value[0]);async function l(){try{if(t.items&&t.items.length)a.value=[...t.items];else{const g=await h();e("change-tournaments",g),a.value=g.map(m=>({...m.tournament,seasons:m.seasons,seasonsIds:m.seasons.reduce((p,y)=>(p.add(y.id),p),new Set)})).sort((m,p)=>m.order-p.order)}}catch(g){throw new Error(g)}}function d(g){return g.filter(m=>t.tournamentsIdsToInclude.has(m.id))}function c(g){const m=new XMLHttpRequest,p=`${t.logosUrl}${g}.${t.logoFileType}`;return m.open("HEAD",p,!1),m.send(),m.status!==404}async function h(){try{return(await fetch(t.apiUrl||ZL)).json()}catch(g){return Promise.reject(g)}}function u(g){e("input",g)}function f(g){e("input",g)}return n.onMounted(()=>{l()}),(g,m)=>(n.openBlock(),n.createElementBlock("div",{class:"tournament-select",style:n.normalizeStyle(i.value)},[n.createVNode(n.unref(WL),n.mergeProps(t,{"model-value":r.value,items:o.value,onInput:u,"onUpdate:modelValue":f}),{default:n.withCtx(({selectedItem:p})=>[n.createElementVNode("div",qL,[n.createElementVNode("div",YL,[c(p.id)?(n.openBlock(),n.createElementBlock("img",{key:0,src:`${t.logosUrl}${p.id}.${t.logoFileType}`,alt:""},null,8,JL)):n.createCommentVNode("",!0)]),n.createElementVNode("div",XL,n.toDisplayString(p.name),1)])]),availableItem:n.withCtx(({item:p})=>[n.createElementVNode("div",null,n.toDisplayString(p.name),1)]),_:1},16,["model-value","items"])],4))}},eI=KL(QL,[["__scopeId","data-v-60385f70"]]),tI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Tr={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))}}},Xu=()=>{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}))},Zu=Tr.setup;Tr.setup=Zu?(s,e)=>(Xu(),Zu(s,e)):Xu;const sI=s=>(n.pushScopeId("data-v-fb269a1e"),s=s(),n.popScopeId(),s),aI=["src"],nI={key:1,class:"text"},iI=["src"],oI={class:"stats"},rI=sI(()=>n.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),lI={class:"numstats"},cI={class:"leyend"};function dI(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,aI)):n.createCommentVNode("",!0),t.textValue?(n.openBlock(),n.createElementBlock("div",nI,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,iI)):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",oI,[rI,n.createElementVNode("div",lI,n.toDisplayString(t.textStat),1)]),n.createElementVNode("div",cI,n.toDisplayString(t.textCategory),1)])):n.createCommentVNode("",!0)])}const hI=tI(Tr,[["render",dI],["__scopeId","data-v-fb269a1e"]]),uI={class:"gsc-dropdown__main-container__item-selected"},mI=["height","width"],fI=["stroke"],pI={class:"gsc-dropdown__items-container"},gI=["onClick"],yI={key:0,class:"gsc-dropdown__items-footer"},bI={__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,(g,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&g&&g.length){if(t.defaultItemByProp){const p=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(o.value=p,a.value=g[p]):(o.value=0,a.value=g[0])}else a.value=g[t.defaultItemByIndex];e("input",a.value)}},{immediate:!0}),n.watch(()=>t.modelValue,g=>{if(g){const m=t.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);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(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function u(g,m){t.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),a.value=g,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)}),(g,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",uI,[n.renderSlot(g.$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,fI)],8,mI))],6)],4),n.createVNode(n.Transition,null,{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",pI,[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,(p,y)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>u(p,y)},[n.renderSlot(g.$slots,"availableItem",{item:p})],10,gI))),128))],4),s.isFooterVisible?(n.openBlock(),n.createElementBlock("div",yI,[n.createVNode(n.unref(hI),{"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))}},SI=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},_I={class:"season-name"},wI={class:"items-list-season"},kI={__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(bI),{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",_I,[n.createElementVNode("span",null,n.toDisplayString(d.name),1)])]),availableItem:n.withCtx(({item:d})=>[n.createElementVNode("span",wI,n.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},EI=SI(kI,[["__scopeId","data-v-81bba1d4"]]);function Qu(s,e){return function(){return s.apply(e,arguments)}}const{toString:TI}=Object.prototype,{getPrototypeOf:Cr}=Object,In=(s=>e=>{const t=TI.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=s=>(s=s.toLowerCase(),e=>In(e)===s),Rn=s=>e=>typeof e===s,{isArray:Us}=Array,Ca=Rn("undefined");function CI(s){return s!==null&&!Ca(s)&&s.constructor!==null&&!Ca(s.constructor)&&kt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const em=Dt("ArrayBuffer");function xI(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&em(s.buffer),e}const vI=Rn("string"),kt=Rn("function"),tm=Rn("number"),Bn=s=>s!==null&&typeof s=="object",AI=s=>s===!0||s===!1,Nn=s=>{if(In(s)!=="object")return!1;const e=Cr(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},LI=Dt("Date"),II=Dt("File"),RI=Dt("Blob"),BI=Dt("FileList"),NI=s=>Bn(s)&&kt(s.pipe),DI=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||kt(s.append)&&((e=In(s))==="formdata"||e==="object"&&kt(s.toString)&&s.toString()==="[object FormData]"))},PI=Dt("URLSearchParams"),[OI,FI,MI,VI]=["ReadableStream","Request","Response","Headers"].map(Dt),$I=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xa(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let a,i;if(typeof s!="object"&&(s=[s]),Us(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 sm(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 Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,am=s=>!Ca(s)&&s!==Ts;function xr(){const{caseless:s}=am(this)&&this||{},e={},t=(a,i)=>{const o=s&&sm(e,i)||i;Nn(e[o])&&Nn(a)?e[o]=xr(e[o],a):Nn(a)?e[o]=xr({},a):Us(a)?e[o]=a.slice():e[o]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&xa(arguments[a],t);return e}const zI=(s,e,t,{allOwnKeys:a}={})=>(xa(e,(i,o)=>{t&&kt(i)?s[o]=Qu(i,t):s[o]=i},{allOwnKeys:a}),s),UI=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),GI=(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)},jI=(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&&Cr(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},HI=(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},WI=s=>{if(!s)return null;if(Us(s))return s;let e=s.length;if(!tm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},KI=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Cr(Uint8Array)),qI=(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])}},YI=(s,e)=>{let t;const a=[];for(;(t=s.exec(e))!==null;)a.push(t);return a},JI=Dt("HTMLFormElement"),XI=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,a){return t.toUpperCase()+a}),nm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),ZI=Dt("RegExp"),im=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),a={};xa(t,(i,o)=>{let r;(r=e(i,o,s))!==!1&&(a[o]=r||i)}),Object.defineProperties(s,a)},QI=s=>{im(s,(e,t)=>{if(kt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const a=s[t];if(kt(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+"'")})}})},e4=(s,e)=>{const t={},a=i=>{i.forEach(o=>{t[o]=!0})};return Us(s)?a(s):a(String(s).split(e)),t},t4=()=>{},s4=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,vr="abcdefghijklmnopqrstuvwxyz",om="0123456789",rm={DIGIT:om,ALPHA:vr,ALPHA_DIGIT:vr+vr.toUpperCase()+om},a4=(s=16,e=rm.ALPHA_DIGIT)=>{let t="";const{length:a}=e;for(;s--;)t+=e[Math.random()*a|0];return t};function n4(s){return!!(s&&kt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const i4=s=>{const e=new Array(10),t=(a,i)=>{if(Bn(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const o=Us(a)?[]:{};return xa(a,(r,l)=>{const d=t(r,i+1);!Ca(d)&&(o[l]=d)}),e[i]=void 0,o}}return a};return t(s,0)},o4=Dt("AsyncFunction"),r4=s=>s&&(Bn(s)||kt(s))&&kt(s.then)&&kt(s.catch),lm=((s,e)=>s?setImmediate:e?((t,a)=>(Ts.addEventListener("message",({source:i,data:o})=>{i===Ts&&o===t&&a.length&&a.shift()()},!1),i=>{a.push(i),Ts.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",kt(Ts.postMessage)),l4=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||lm,F={isArray:Us,isArrayBuffer:em,isBuffer:CI,isFormData:DI,isArrayBufferView:xI,isString:vI,isNumber:tm,isBoolean:AI,isObject:Bn,isPlainObject:Nn,isReadableStream:OI,isRequest:FI,isResponse:MI,isHeaders:VI,isUndefined:Ca,isDate:LI,isFile:II,isBlob:RI,isRegExp:ZI,isFunction:kt,isStream:NI,isURLSearchParams:PI,isTypedArray:KI,isFileList:BI,forEach:xa,merge:xr,extend:zI,trim:$I,stripBOM:UI,inherits:GI,toFlatObject:jI,kindOf:In,kindOfTest:Dt,endsWith:HI,toArray:WI,forEachEntry:qI,matchAll:YI,isHTMLForm:JI,hasOwnProperty:nm,hasOwnProp:nm,reduceDescriptors:im,freezeMethods:QI,toObjectSet:e4,toCamelCase:XI,noop:t4,toFiniteNumber:s4,findKey:sm,global:Ts,isContextDefined:am,ALPHABET:rm,generateString:a4,isSpecCompliantForm:n4,toJSONObject:i4,isAsyncFn:o4,isThenable:r4,setImmediate:lm,asap:l4};function Ee(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)}F.inherits(Ee,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:F.toJSONObject(this.config),code:this.code,status:this.status}}});const cm=Ee.prototype,dm={};["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=>{dm[s]={value:s}}),Object.defineProperties(Ee,dm),Object.defineProperty(cm,"isAxiosError",{value:!0}),Ee.from=(s,e,t,a,i,o)=>{const r=Object.create(cm);return F.toFlatObject(s,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Ee.call(r,s.message,e,t,a,i),r.cause=s,r.name=s.name,o&&Object.assign(r,o),r};const c4=null;function Ar(s){return F.isPlainObject(s)||F.isArray(s)}function hm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function um(s,e,t){return s?s.concat(e).map(function(a,i){return a=hm(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function d4(s){return F.isArray(s)&&!s.some(Ar)}const h4=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Dn(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!F.isUndefined(m[g])});const a=t.metaTokens,i=t.visitor||c,o=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(F.isDate(g))return g.toISOString();if(!l&&F.isBlob(g))throw new Ee("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(g)||F.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(F.endsWith(m,"{}"))m=a?m:m.slice(0,-2),g=JSON.stringify(g);else if(F.isArray(g)&&d4(g)||(F.isFileList(g)||F.endsWith(m,"[]"))&&(y=F.toArray(g)))return m=hm(m),y.forEach(function(b,S){!(F.isUndefined(b)||b===null)&&e.append(r===!0?um([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Ar(g)?!0:(e.append(um(p,m,o),d(g)),!1)}const h=[],u=Object.assign(h4,{defaultVisitor:c,convertValue:d,isVisitable:Ar});function f(g,m){if(!F.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),F.forEach(g,function(p,y){(!(F.isUndefined(p)||p===null)&&i.call(e,p,F.isString(y)?y.trim():y,m,u))===!0&&f(p,m?m.concat(y):[y])}),h.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function mm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Lr(s,e){this._pairs=[],s&&Dn(s,this,e)}const fm=Lr.prototype;fm.append=function(s,e){this._pairs.push([s,e])},fm.toString=function(s){const e=s?function(t){return s.call(this,t,mm)}:mm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function u4(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pm(s,e,t){if(!e)return s;const a=t&&t.encode||u4,i=t&&t.serialize;let o;if(i?o=i(e,t):o=F.isURLSearchParams(e)?e.toString():new Lr(e,t).toString(a),o){const r=s.indexOf("#");r!==-1&&(s=s.slice(0,r)),s+=(s.indexOf("?")===-1?"?":"&")+o}return s}class m4{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){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const gm=m4,ym={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f4=typeof URLSearchParams<"u"?URLSearchParams:Lr,p4=typeof FormData<"u"?FormData:null,g4=typeof Blob<"u"?Blob:null,y4={isBrowser:!0,classes:{URLSearchParams:f4,FormData:p4,Blob:g4},protocols:["http","https","file","blob","url","data"]},Ir=typeof window<"u"&&typeof document<"u",Rr=typeof navigator=="object"&&navigator||void 0,b4=Ir&&(!Rr||["ReactNative","NativeScript","NS"].indexOf(Rr.product)<0),S4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_4=Ir&&window.location.href||"http://localhost",w4=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ir,hasStandardBrowserEnv:b4,hasStandardBrowserWebWorkerEnv:S4,navigator:Rr,origin:_4},Symbol.toStringTag,{value:"Module"})),gt={...w4,...y4};function k4(s,e){return Dn(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,a,i,o){return gt.isNode&&F.isBuffer(t)?(this.append(a,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function E4(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function T4(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 bm(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&&F.isArray(i)?i.length:r,d?(F.hasOwnProp(i,r)?i[r]=[i[r],a]:i[r]=a,!l):((!i[r]||!F.isObject(i[r]))&&(i[r]=[]),e(t,a,i[r],o)&&F.isArray(i[r])&&(i[r]=T4(i[r])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(a,i)=>{e(E4(a),i,t,0)}),t}return null}function C4(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(s)}const Br={transitional:ym,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",a=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return a?JSON.stringify(bm(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.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 k4(s,this.formSerializer).toString();if((o=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Dn(o?{"files[]":s}:s,r&&new r,this.formSerializer)}}return i||a?(e.setContentType("application/json",!1),C4(s)):s}],transformResponse:[function(s){const e=this.transitional||Br.transitional,t=e&&e.forcedJSONParsing,a=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.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"?Ee.from(o,Ee.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}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Br.headers[s]={}});const Nr=Br,x4=F.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"]),v4=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]&&x4[t])&&(t==="set-cookie"?e[t]?e[t].push(a):e[t]=[a]:e[t]=e[t]?e[t]+", "+a:a)}),e},Sm=Symbol("internals");function va(s){return s&&String(s).trim().toLowerCase()}function Pn(s){return s===!1||s==null?s:F.isArray(s)?s.map(Pn):String(s)}function A4(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 L4=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Dr(s,e,t,a,i){if(F.isFunction(a))return a.call(this,e,t);if(i&&(e=t),!!F.isString(e)){if(F.isString(a))return e.indexOf(a)!==-1;if(F.isRegExp(a))return a.test(e)}}function I4(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,a)=>t.toUpperCase()+a)}function R4(s,e){const t=F.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 On{constructor(e){e&&this.set(e)}set(e,t,a){const i=this;function o(l,d,c){const h=va(d);if(!h)throw new Error("header name must be a non-empty string");const u=F.findKey(i,h);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||d]=Pn(l))}const r=(l,d)=>F.forEach(l,(c,h)=>o(c,h,d));if(F.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(F.isString(e)&&(e=e.trim())&&!L4(e))r(v4(e),t);else if(F.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=va(e),e){const a=F.findKey(this,e);if(a){const i=this[a];if(!t)return i;if(t===!0)return A4(i);if(F.isFunction(t))return t.call(this,i,a);if(F.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=va(e),e){const a=F.findKey(this,e);return!!(a&&this[a]!==void 0&&(!t||Dr(this,this[a],a,t)))}return!1}delete(e,t){const a=this;let i=!1;function o(r){if(r=va(r),r){const l=F.findKey(a,r);l&&(!t||Dr(a,a[l],l,t))&&(delete a[l],i=!0)}}return F.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||Dr(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,a={};return F.forEach(this,(i,o)=>{const r=F.findKey(a,o);if(r){t[r]=Pn(i),delete t[o];return}const l=e?I4(o):String(o).trim();l!==o&&delete t[o],t[l]=Pn(i),a[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,(a,i)=>{a!=null&&a!==!1&&(t[i]=e&&F.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[Sm]=this[Sm]={accessors:{}}).accessors,a=this.prototype;function i(o){const r=va(o);t[r]||(R4(a,o),t[r]=!0)}return F.isArray(e)?e.forEach(i):i(e),this}}On.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(On.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(a){this[t]=a}}}),F.freezeMethods(On);const Pt=On;function Pr(s,e){const t=this||Nr,a=e||t,i=Pt.from(a.headers);let o=a.data;return F.forEach(s,function(r){o=r.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function _m(s){return!!(s&&s.__CANCEL__)}function Gs(s,e,t){Ee.call(this,s??"canceled",Ee.ERR_CANCELED,e,t),this.name="CanceledError"}F.inherits(Gs,Ee,{__CANCEL__:!0});function wm(s,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?s(t):e(new Ee("Request failed with status code "+t.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function B4(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function N4(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 D4(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 Fn=(s,e,t=3)=>{let a=0;const i=N4(50,250);return D4(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)},km=(s,e)=>{const t=s!=null;return[a=>e[0]({lengthComputable:t,total:s,loaded:a}),e[1]]},Em=s=>(...e)=>F.asap(()=>s(...e)),P4=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=F.isString(i)?a(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}(),O4=gt.hasStandardBrowserEnv?{write(s,e,t,a,i,o){const r=[s+"="+encodeURIComponent(e)];F.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),F.isString(a)&&r.push("path="+a),F.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 F4(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function M4(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Tm(s,e){return s&&!F4(e)?M4(s,e):e}const Cm=s=>s instanceof Pt?{...s}:s;function Cs(s,e){e=e||{};const t={};function a(c,h,u){return F.isPlainObject(c)&&F.isPlainObject(h)?F.merge.call({caseless:u},c,h):F.isPlainObject(h)?F.merge({},h):F.isArray(h)?h.slice():h}function i(c,h,u){if(F.isUndefined(h)){if(!F.isUndefined(c))return a(void 0,c,u)}else return a(c,h,u)}function o(c,h){if(!F.isUndefined(h))return a(void 0,h)}function r(c,h){if(F.isUndefined(h)){if(!F.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(Cm(c),Cm(h),!0)};return F.forEach(Object.keys(Object.assign({},s,e)),function(c){const h=d[c]||i,u=h(s[c],e[c],c);F.isUndefined(u)&&h!==l||(t[c]=u)}),t}const xm=s=>{const e=Cs({},s);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=Pt.from(r),e.url=pm(Tm(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(F.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&&F.isFunction(a)&&(a=a(e)),a||a!==!1&&P4(e.url))){const c=i&&o&&O4.read(o);c&&r.set(i,c)}return e},V4=typeof XMLHttpRequest<"u",$4=V4&&function(s){return new Promise(function(e,t){const a=xm(s);let i=a.data;const o=Pt.from(a.headers).normalize();let{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,h,u,f,g;function m(){f&&f(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout;function y(){if(!p)return;const S=Pt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),w={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:s,request:p};wm(function(x){e(x),m()},function(x){t(x),m()},w),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(t(new Ee("Request aborted",Ee.ECONNABORTED,s,p)),p=null)},p.onerror=function(){t(new Ee("Network Error",Ee.ERR_NETWORK,s,p)),p=null},p.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const w=a.transitional||ym;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),t(new Ee(S,w.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,s,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&F.forEach(o.toJSON(),function(S,w){p.setRequestHeader(w,S)}),F.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),r&&r!=="json"&&(p.responseType=a.responseType),d&&([u,g]=Fn(d,!0),p.addEventListener("progress",u)),l&&p.upload&&([h,f]=Fn(l),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",f)),(a.cancelToken||a.signal)&&(c=S=>{p&&(t(!S||S.type?new Gs(null,s,p):S),p.abort(),p=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const b=B4(a.url);if(b&>.protocols.indexOf(b)===-1){t(new Ee("Unsupported protocol "+b+":",Ee.ERR_BAD_REQUEST,s));return}p.send(i||null)})},z4=(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 Ee?h:new Gs(h instanceof Error?h.message:h))}};let r=e&&setTimeout(()=>{r=null,o(new Ee(`timeout ${e} of ms exceeded`,Ee.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=()=>F.asap(l),d}},U4=z4,G4=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},j4=async function*(s,e){for await(const t of H4(s))yield*G4(t,e)},H4=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()}},vm=(s,e,t,a)=>{const i=j4(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})},Mn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Am=Mn&&typeof ReadableStream=="function",W4=Mn&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Lm=(s,...e)=>{try{return!!s(...e)}catch{return!1}},K4=Am&&Lm(()=>{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}),Im=64*1024,Or=Am&&Lm(()=>F.isReadableStream(new Response("").body)),Vn={stream:Or&&(s=>s.body)};Mn&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Vn[e]&&(Vn[e]=F.isFunction(s[e])?t=>t[e]():(t,a)=>{throw new Ee(`Response type '${e}' is not supported`,Ee.ERR_NOT_SUPPORT,a)})})})(new Response);const q4=async s=>{if(s==null)return 0;if(F.isBlob(s))return s.size;if(F.isSpecCompliantForm(s))return(await new Request(gt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(F.isArrayBufferView(s)||F.isArrayBuffer(s))return s.byteLength;if(F.isURLSearchParams(s)&&(s=s+""),F.isString(s))return(await W4(s)).byteLength},Y4=async(s,e)=>F.toFiniteNumber(s.getContentLength())??q4(e),J4=Mn&&(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}=xm(s);c=c?(c+"").toLowerCase():"text";let g=U4([i,o&&o.toAbortSignal()],r),m;const p=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(d&&K4&&t!=="get"&&t!=="head"&&(y=await Y4(h,a))!==0){let E=new Request(e,{method:"POST",body:a,duplex:"half"}),v;if(F.isFormData(a)&&(v=E.headers.get("content-type"))&&h.setContentType(v),E.body){const[T,R]=km(y,Fn(Em(d)));a=vm(E.body,Im,T,R)}}F.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:g,method:t.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:b?u:void 0});let S=await fetch(m);const w=Or&&(c==="stream"||c==="response");if(Or&&(l||w&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=S[L]});const v=F.toFiniteNumber(S.headers.get("content-length")),[T,R]=l&&km(v,Fn(Em(l),!0))||[];S=new Response(vm(S.body,Im,T,()=>{R&&R(),p&&p()}),E)}c=c||"text";let x=await Vn[F.findKey(Vn,c)||"text"](S,s);return!w&&p&&p(),await new Promise((E,v)=>{wm(E,v,{data:x,headers:Pt.from(S.headers),status:S.status,statusText:S.statusText,config:s,request:m})})}catch(b){throw p&&p(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,s,m),{cause:b.cause||b}):Ee.from(b,b&&b.code,s,m)}}),Fr={http:c4,xhr:$4,fetch:J4};F.forEach(Fr,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Rm=s=>`- ${s}`,X4=s=>F.isFunction(s)||s===null||s===!1,Bm={getAdapter:s=>{s=F.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,!X4(t)&&(a=Fr[(r=String(t)).toLowerCase()],a===void 0))throw new Ee(`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(Rm).join(`
|
|
41
41
|
`):" "+Rm(o[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a},adapters:Fr};function Mr(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Gs(null,s)}function Nm(s){return Mr(s),s.headers=Pt.from(s.headers),s.data=Pr.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Bm.getAdapter(s.adapter||Nr.adapter)(s).then(function(e){return Mr(s),e.data=Pr.call(s,s.transformResponse,e),e.headers=Pt.from(e.headers),e},function(e){return _m(e)||(Mr(s),e&&e.response&&(e.response.data=Pr.call(s,s.transformResponse,e.response),e.response.headers=Pt.from(e.response.headers))),Promise.reject(e)})}const Dm="1.7.7",Vr={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{Vr[s]=function(t){return typeof t===s||"a"+(e<1?"n ":" ")+s}});const Pm={};Vr.transitional=function(s,e,t){function a(i,o){return"[Axios v"+Dm+"] Transitional option '"+i+"'"+o+(t?". "+t:"")}return(i,o,r)=>{if(s===!1)throw new Ee(a(o," has been removed"+(e?" in "+e:"")),Ee.ERR_DEPRECATED);return e&&!Pm[o]&&(Pm[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 Z4(s,e,t){if(typeof s!="object")throw new Ee("options must be an object",Ee.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 Ee("option "+o+" must be "+d,Ee.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ee("Unknown option "+o,Ee.ERR_BAD_OPTION)}}const $r={assertOptions:Z4,validators:Vr},os=$r.validators;class $n{constructor(e){this.defaults=e,this.interceptors={request:new gm,response:new gm}}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=Cs(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&$r.assertOptions(a,{silentJSONParsing:os.transitional(os.boolean),forcedJSONParsing:os.transitional(os.boolean),clarifyTimeoutError:os.transitional(os.boolean)},!1),i!=null&&(F.isFunction(i)?t.paramsSerializer={serialize:i}:$r.assertOptions(i,{encode:os.function,serialize:os.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&F.merge(o.common,o[t.method]);o&&F.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=Pt.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=[Nm.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 g=t;for(u=0;u<f;){const m=l[u++],p=l[u++];try{g=m(g)}catch(y){p.call(this,y);break}}try{h=Nm.call(this,g)}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=Cs(this.defaults,e);const t=Tm(e.baseURL,e.url);return pm(t,e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],function(s){$n.prototype[s]=function(e,t){return this.request(Cs(t||{},{method:s,url:e,data:(t||{}).data}))}}),F.forEach(["post","put","patch"],function(s){function e(t){return function(a,i,o){return this.request(Cs(o||{},{method:s,headers:t?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}$n.prototype[s]=e(),$n.prototype[s+"Form"]=e(!0)});const zn=$n;class zr{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 Gs(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)}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 zr(function(t){e=t}),cancel:e}}}const Q4=zr;function eR(s){return function(e){return s.apply(null,e)}}function tR(s){return F.isObject(s)&&s.isAxiosError===!0}const Ur={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(Ur).forEach(([s,e])=>{Ur[e]=s});const sR=Ur;function Om(s){const e=new zn(s),t=Qu(zn.prototype.request,e);return F.extend(t,zn.prototype,e,{allOwnKeys:!0}),F.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Om(Cs(s,a))},t}const Ge=Om(Nr);Ge.Axios=zn,Ge.CanceledError=Gs,Ge.CancelToken=Q4,Ge.isCancel=_m,Ge.VERSION=Dm,Ge.toFormData=Dn,Ge.AxiosError=Ee,Ge.Cancel=Ge.CanceledError,Ge.all=function(s){return Promise.all(s)},Ge.spread=eR,Ge.isAxiosError=tR,Ge.mergeConfig=Cs,Ge.AxiosHeaders=Pt,Ge.formToJSON=s=>bm(F.isHTMLForm(s)?new FormData(s):s),Ge.getAdapter=Bm.getAdapter,Ge.HttpStatusCode=sR,Ge.default=Ge;const Fm=Ge,aR=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Gr={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)}}},Mm=()=>{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}))},Vm=Gr.setup;Gr.setup=Vm?(s,e)=>(Mm(),Vm(s,e)):Mm;const nR={ref:"gscScrollableContainer",class:"scrollable-container"},iR={class:"scrollable-arrows"},oR=["width","height","viewBox"],rR=["stroke"],lR={class:"scrollable-wrapper"},cR={class:"scrollable-arrows"},dR=["width","height","viewBox"],hR=["stroke"];function uR(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",nR,[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",iR,[(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,rR)],8,oR))])],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",lR,[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",cR,[(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,dR))])],2)):n.createCommentVNode("",!0)],512)}const mR=aR(Gr,[["render",uR],["__scopeId","data-v-7d0811ac"]]),rs=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t};let $m=null;const jr={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)$m=new ResizeObserver(()=>{this.gamesContainerGHWidth=this.$refs.gamesContainerGH?this.$refs.gamesContainerGH.clientWidth:0,this.movil=this.gamesContainerGHWidth<740}),$m.observe(this.$refs.gamesContainerGH);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},zm=()=>{n.useCssVars(s=>({"27c867b8":s.colorBackgroundHome+"45","3b954a6e":s.colorBackgroundAway+"45","328fa3fc":s.colorBackgroundHome,"328c920b":s.colorBackgroundAway}))},Um=jr.setup;jr.setup=Um?(s,e)=>(zm(),Um(s,e)):zm;const Un=s=>(n.pushScopeId("data-v-20a067d4"),s=s(),n.popScopeId(),s),fR=Un(()=>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)),pR=[fR],gR=Un(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),yR=["src"],bR=Un(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),SR=Un(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),_R=["src"],wR=["src"],kR={class:"text-container"};function ER(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))},pR,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),gR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,yR),n.createElementVNode("div",{class:n.normalizeClass([o.baselogo,"position-image"])},null,2),n.createElementVNode("div",{class:n.normalizeClass(o.baselogoright)},null,2),bR,SR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,_R),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.logoright)},null,10,wR),n.createElementVNode("div",kR,[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 TR=rs(jr,[["render",ER],["__scopeId","data-v-20a067d4"]]);let Gm=null;const Hr={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)Gm=new ResizeObserver(()=>{this.gamesContainerCWidth=this.$refs.gamesContainerC?this.$refs.gamesContainerC.clientWidth:0,this.movil=this.gamesContainerCWidth<740}),Gm.observe(this.$refs.gamesContainerC);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},jm=()=>{n.useCssVars(s=>({a2cfb232:s.colorBackgroundHome,"473dd2cb":s.colorBackgroundHome+"36"}))},Hm=Hr.setup;Hr.setup=Hm?(s,e)=>(jm(),Hm(s,e)):jm;const Aa=s=>(n.pushScopeId("data-v-f686a88f"),s=s(),n.popScopeId(),s),CR=Aa(()=>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)),xR=[CR],vR=Aa(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),AR=["src"],LR=Aa(()=>n.createElementVNode("div",{class:"base-logo"},null,-1)),IR=["src"],RR=Aa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),BR={class:"text-container"},NR={class:"player-image position-image"},DR=["src"],PR=["src"],OR=["src"],FR=Aa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function MR(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))},xR,2),vR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,AR),LR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,IR),RR,n.createElementVNode("div",BR,[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",NR,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,DR)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,PR)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,OR)):n.createCommentVNode("",!0)]),FR],2)}const VR=rs(Hr,[["render",MR],["__scopeId","data-v-f686a88f"]]);let Wm=null;const Wr={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)Wm=new ResizeObserver(()=>{this.gamesContainerCTWidth=this.$refs.gamesContainerCT?this.$refs.gamesContainerCT.clientWidth:0,this.gamesContainerCTWidth<740?this.movil=!0:this.movil=!1}),Wm.observe(this.$refs.gamesContainerCT);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Km=()=>{n.useCssVars(s=>({"642414f3":s.colorBackgroundHome,f4cf8182:s.colorBackgroundHome+"36"}))},qm=Wr.setup;Wr.setup=qm?(s,e)=>(Km(),qm(s,e)):Km;const Gn=s=>(n.pushScopeId("data-v-dd798805"),s=s(),n.popScopeId(),s),$R=Gn(()=>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)),zR=[$R],UR=Gn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),GR=["src"],jR={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo"},HR=["fill"],WR=["id"],KR=["stop-color"],qR=["stop-color"],YR=["src"],JR=Gn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),XR={class:"text-container"},ZR=Gn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function QR(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))},zR,2)):n.createCommentVNode("",!0),UR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,GR),(n.openBlock(),n.createElementBlock("svg",jR,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,HR),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,KR),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundHome},null,8,qR)],8,WR)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,YR),JR,n.createElementVNode("div",XR,[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)]),ZR],2)}const eB=rs(Wr,[["render",QR],["__scopeId","data-v-dd798805"]]);let Ym=null;const Kr={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)Ym=new ResizeObserver(()=>{this.gamesContainerTAWidth=this.$refs.gamesContainerTA?this.$refs.gamesContainerTA.clientWidth:0,this.movil=this.gamesContainerTAWidth<740}),Ym.observe(this.$refs.gamesContainerTA);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Jm=()=>{n.useCssVars(s=>({"771ea921":s.colorBackgroundHome,"4475895e":s.colorBackgroundHome+"36"}))},Xm=Kr.setup;Kr.setup=Xm?(s,e)=>(Jm(),Xm(s,e)):Jm;const jn=s=>(n.pushScopeId("data-v-8a4cd99e"),s=s(),n.popScopeId(),s),tB=jn(()=>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)),sB=[tB],aB=jn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),nB=["src"],iB={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away"},oB=["fill"],rB=["id"],lB=["stop-color"],cB=["stop-color"],dB=["src"],hB=jn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),uB={class:"text-container"},mB=jn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function fB(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))},sB,2),aB,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,nB),(n.openBlock(),n.createElementBlock("svg",iB,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,oB),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,lB),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,cB)],8,rB)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,dB),hB,n.createElementVNode("div",uB,[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)]),mB],2)}const pB=rs(Kr,[["render",fB],["__scopeId","data-v-8a4cd99e"]]);let Zm=null;const qr={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)Zm=new ResizeObserver(()=>{this.gamesContainerTALWidth=this.$refs.gamesContainerTAL?this.$refs.gamesContainerTAL.clientWidth:0,this.movil=this.gamesContainerTALWidth<740}),Zm.observe(this.$refs.gamesContainerTAL);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Qm=()=>{n.useCssVars(s=>({b1c828a8:s.colorBackgroundHome,c805d334:s.colorBackgroundHome+"36"}))},ef=qr.setup;qr.setup=ef?(s,e)=>(Qm(),ef(s,e)):Qm;const Hn=s=>(n.pushScopeId("data-v-6d391a8b"),s=s(),n.popScopeId(),s),gB=Hn(()=>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)),yB=[gB],bB=Hn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),SB=["src"],_B={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away-live"},wB=["fill"],kB=["id"],EB=["stop-color"],TB=["stop-color"],CB=["src"],xB=Hn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),vB={class:"text-container"},AB=Hn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function LB(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))},yB,2),bB,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,SB),(n.openBlock(),n.createElementBlock("svg",_B,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_10_"+t.nameTeam.replaceAll(" ","")+")"},null,8,wB),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,EB),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,TB)],8,kB)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,CB),xB,n.createElementVNode("div",vB,[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)]),AB],2)}const IB=rs(qr,[["render",LB],["__scopeId","data-v-6d391a8b"]]);let tf=null;const Yr={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)tf=new ResizeObserver(()=>{this.gamesContainerGPWidth=this.$refs.gamesContainerGP?this.$refs.gamesContainerGP.clientWidth:0,this.gamesContainerGPWidth<740?this.movil=!0:this.movil=!1}),tf.observe(this.$refs.gamesContainerGP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},sf=()=>{n.useCssVars(s=>({"30dfde48":s.colorBackgroundHome,"30dccc57":s.colorBackgroundAway,"04e93a22":s.colorBackgroundAway+"62","4a7c3c4a":s.colorBackgroundHome+"36"}))},af=Yr.setup;Yr.setup=af?(s,e)=>(sf(),af(s,e)):sf;const Wn=s=>(n.pushScopeId("data-v-122a1564"),s=s(),n.popScopeId(),s),RB=["width","src"],BB=Wn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),NB=Wn(()=>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)),DB=[NB],PB={class:"player-container"},OB=["src"],FB=["src"],MB=["src"],VB={class:"container-score"},$B=["src"],zB=["src"],UB=["src"],GB=Wn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),jB=Wn(()=>n.createElementVNode("div",{class:"gradient-color"},null,-1));function HB(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,RB)],2)):n.createCommentVNode("",!0),BB,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))},DB,2)):n.createCommentVNode("",!0),n.createElementVNode("div",PB,[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,OB)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,FB)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,MB)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),n.createElementVNode("div",VB,[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,$B),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,zB),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,UB),GB,jB],2)}const WB=rs(Yr,[["render",HB],["__scopeId","data-v-122a1564"]]);let nf=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)nf=new ResizeObserver(()=>{this.gamesContainerSPWidth=this.$refs.gamesContainerSP?this.$refs.gamesContainerSP.clientWidth:0,this.movil=this.gamesContainerSPWidth<740}),nf.observe(this.$refs.gamesContainerSP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},of=()=>{n.useCssVars(s=>({"7f5f505f":s.colorBackgroundHome+"30","9d4bf74e":s.colorBackgroundHome}))},rf=Jr.setup;Jr.setup=rf?(s,e)=>(of(),rf(s,e)):of;const Kn=s=>(n.pushScopeId("data-v-4c6456c6"),s=s(),n.popScopeId(),s),KB=Kn(()=>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)),qB=[KB],YB={class:"player-image position-image"},JB=["src"],XB=["src"],ZB=["src"],QB=["src"],e3=Kn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),t3=["src"],s3=Kn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),a3={class:"text-container"},n3=Kn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),i3={class:"base-logo",width:"91",height:"216",viewBox:"0 0 91 216",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o3=["fill"];function r3(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))},qB,2)):n.createCommentVNode("",!0),n.createElementVNode("div",YB,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,JB)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,XB)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,ZB)):n.createCommentVNode("",!0)]),n.createElementVNode("img",{src:t.logoHome,alt:"",class:"team-logo"},null,8,QB),e3,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,t3),s3,n.createElementVNode("div",a3,[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)]),n3,(n.openBlock(),n.createElementBlock("svg",i3,[n.createElementVNode("path",{d:"M91.5 216L0 -0.5H91.5V216Z",fill:t.colorBackgroundHome},null,8,o3)]))],2)}const l3=rs(Jr,[["render",r3],["__scopeId","data-v-4c6456c6"]]);function c3(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 d3="_ptg_qztct_3",h3="_ptgtitle_qztct_13",u3="_ptgtitle450_qztct_45",m3="_pgtcontainercard_qztct_77",f3="_pgtcontainercard350_qztct_87",p3={ptg:d3,ptgtitle:h3,ptgtitle450:u3,pgtcontainercard:m3,pgtcontainercard350:f3},Xr={components:{GSCSlider:mR,GSCThumbnailCategory:VR,GSCThumbnailCategoryTeam:eB,GSCThumbnailCategoryTeamAway:pB,GSCThumbnailHighlightGamePlayer:WB,GSCThumbnailCategoryTeamAwayLive:IB,GSCThumbnailSummaryPlayer:l3,GSCThumbnailHighlightGameHistoric:TR},setup(){const s=n.ref("ptgDiv"),{elementSize:e}=c3(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)),console.log("val: ",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&&(console.log("Hola"),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=Fm.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=Fm.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))}if(this.type===18){const o=this.getBestPlaysUrl({season:s.season,player:s.player});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)}}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(){}},lf=()=>{n.useCssVars(s=>({f990a6e0:s.backgroundColor}))},cf=Xr.setup;Xr.setup=cf?(s,e)=>(lf(),cf(s,e)):lf;function g3(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"),g=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,p)=>(n.openBlock(),n.createElementBlock("div",{key:p,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(p==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,p)=>(n.openBlock(),n.createElementBlock("div",{key:p,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(p==0?"margin-left: 0px !important; color: white;":"")},[t.type==2||t.type==18?(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(g,{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(g,{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(g,{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 y3={name:"DiscoverVideos",components:{GscSwitchComponent:To,GSCPlayerTeamGame:rs(Xr,[["render",g3],["__cssModules",{$style:p3}],["__scopeId","data-v-4b432cd5"]]),MatchDayPicker:Qh},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 Ae.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)}}},b3={key:0,class:"discover-videos",ref:"discoverVideosRef"},S3={class:"title-and-button"},_3={class:"calendar-container"};function w3(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",b3,[n.createElementVNode("div",S3,[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",_3,[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 k3=Xe(y3,[["render",w3],["__scopeId","data-v-4af47259"]]),E3=["playId","league","season","gameId","playerName","refereeName","stadiumName","finalScore","scoreAtMomentOfPlay","gameDate","homeTeamName","homeTeamLogo","awayTeamName","awayTeamLogo","categoryId","categoryName","startTime","endTime","minuteOfPlay","momentOfPlay","videoUrl"];let Zr=null;function T3(){return Zr||(Zr=E3.reduce((s,e,t)=>(s[e]=t,s),{})),Zr}function C3(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var df={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 g=l.parseURL(d);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var m=i.exec(g.path);g.netLoc=m[1],g.path=m[2]}g.netLoc&&!g.path&&(g.path="/");var p={scheme:g.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(p.netLoc=g.netLoc,f.path[0]!=="/"))if(!f.path)p.path=g.path,f.params||(p.params=g.params,f.query||(p.query=g.query));else{var y=g.path,b=y.substring(0,y.lastIndexOf("/")+1)+f.path;p.path=l.normalizePath(b)}return p.path===null&&(p.path=h.alwaysNormalize?l.normalizePath(f.path):f.path),l.buildURLFromParts(p)},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})()})(df);var Qr=df.exports;function hf(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 et(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hf(Object(t),!0).forEach(function(a){A3(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):hf(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}function x3(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 v3(s){var e=x3(s,"string");return typeof e=="symbol"?e:String(e)}function A3(s,e,t){return e=v3(e),e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function je(){return je=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},je.apply(this,arguments)}const ae=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},L3=Number.isSafeInteger||function(s){return typeof s=="number"&&Math.abs(s)<=I3},I3=Number.MAX_SAFE_INTEGER||9007199254740991;let _=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}({}),pe=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 xs=function(){},el={trace:xs,debug:xs,log:xs,warn:xs,info:xs,error:xs};let La=el;function R3(s){const e=self.console[s];return e?e.bind(self.console,`[${s}] >`):xs}function B3(s,...e){e.forEach(function(t){La[t]=s[t]?s[t].bind(s):R3(t)})}function N3(s,e){if(typeof console=="object"&&s===!0||typeof s=="object"){B3(s,"debug","log","info","warn","error");try{La.log(`Debug logs enabled for "${e}" in hls.js version 1.5.17`)}catch{La=el}}else La=el}const A=La,D3=/^(\d+)x(\d+)$/,uf=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Me{constructor(e){typeof e=="string"&&(e=Me.parseAttrList(e)),je(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=D3.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(uf.lastIndex=0;(t=uf.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 P3(s){return s!=="ID"&&s!=="CLASS"&&s!=="START-DATE"&&s!=="DURATION"&&s!=="END-DATE"&&s!=="END-ON-NEXT"}function O3(s){return s==="SCTE35-OUT"||s==="SCTE35-IN"}class mf{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=je(new Me({}),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"]);ae(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(ae(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&&ae(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class qn{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 Be={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ff{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Be.AUDIO]:null,[Be.VIDEO]:null,[Be.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=Qr.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class tl extends ff{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 qn,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||!ae(this.programDateTime))return null;const e=ae(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[Be.AUDIO]=null,e[Be.VIDEO]=null,e[Be.AUDIOVIDEO]=null}}class F3 extends ff{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 qn,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 M3=10;class V3{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?ae(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||M3}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 sl(s){return Uint8Array.from(atob(s),e=>e.charCodeAt(0))}function $3(s){const e=al(s).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function z3(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 U3(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=sl(r)):t=$3(r)}}return t}function al(s){return Uint8Array.from(unescape(encodeURIComponent(s)),e=>e.charCodeAt(0))}const js=typeof self<"u"?self:void 0;var De={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},yt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function pf(s){switch(s){case yt.FAIRPLAY:return De.FAIRPLAY;case yt.PLAYREADY:return De.PLAYREADY;case yt.WIDEVINE:return De.WIDEVINE;case yt.CLEARKEY:return De.CLEARKEY}}var Ia={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function gf(s){if(s===Ia.WIDEVINE)return De.WIDEVINE;if(s===Ia.PLAYREADY)return De.PLAYREADY;if(s===Ia.CENC||s===Ia.CLEARKEY)return De.CLEARKEY}function yf(s){switch(s){case De.FAIRPLAY:return yt.FAIRPLAY;case De.PLAYREADY:return yt.PLAYREADY;case De.WIDEVINE:return yt.WIDEVINE;case De.CLEARKEY:return yt.CLEARKEY}}function nl(s){const{drmSystems:e,widevineLicenseUrl:t}=s,a=e?[De.FAIRPLAY,De.WIDEVINE,De.PLAYREADY,De.CLEARKEY].filter(i=>!!e[i]):[];return!a[De.WIDEVINE]&&t&&a.push(De.WIDEVINE),a}const bf=function(s){return js!=null&&(s=js.navigator)!=null&&s.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function G3(s,e,t,a){let i;switch(s){case De.FAIRPLAY:i=["cenc","sinf"];break;case De.WIDEVINE:case De.PLAYREADY:i=["cenc"];break;case De.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${s}`)}return j3(i,e,t,a)}function j3(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 vs(s,e,t){return Uint8Array.prototype.slice?s.slice(e,t):new Uint8Array(Array.prototype.slice.call(s,e,t))}const il=(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,Sf=(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,Ra=(s,e)=>{const t=e;let a=0;for(;il(s,e);){a+=10;const i=Yn(s,e+6);a+=i,Sf(s,e+10)&&(a+=10),e+=a}if(a>0)return s.subarray(t,t+a)},Yn=(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},H3=(s,e)=>il(s,e)&&Yn(s,e+6)+10<=s.length-e,ol=s=>{const e=wf(s);for(let t=0;t<e.length;t++){const a=e[t];if(_f(a))return X3(a)}},_f=s=>s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp",W3=s=>{const e=String.fromCharCode(s[0],s[1],s[2],s[3]),t=Yn(s,4),a=10;return{type:e,size:t,data:s.subarray(a,a+t)}},wf=s=>{let e=0;const t=[];for(;il(s,e);){const a=Yn(s,e+6);e+=10;const i=e+a;for(;e+8<i;){const o=W3(s.subarray(e)),r=K3(o);r&&t.push(r),e+=o.size+10}Sf(s,e)&&(e+=10)}return t},K3=s=>s.type==="PRIV"?q3(s):s.type[0]==="W"?J3(s):Y3(s),q3=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}},Y3=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}},J3=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}},X3=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=Z3();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 rl;function Z3(){if(!navigator.userAgent.includes("PlayStation 4"))return!rl&&typeof self.TextDecoder<"u"&&(rl=new self.TextDecoder("utf-8")),rl}const Gt={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}},Jn=Math.pow(2,32)-1,Q3=[].push,kf={video:1,audio:2,id3:3,text:4};function qe(s){return String.fromCharCode.apply(null,s)}function Ef(s,e){const t=s[e]<<8|s[e+1];return t<0?65536+t:t}function le(s,e){const t=Cf(s,e);return t<0?4294967296+t:t}function Tf(s,e){let t=le(s,e);return t*=Math.pow(2,32),t+=le(s,e+4),t}function Cf(s,e){return s[e]<<24|s[e+1]<<16|s[e+2]<<8|s[e+3]}function ll(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 e6(s){const e=s.byteLength;for(let t=0;t<e;){const a=le(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 Se(s,e){const t=[];if(!e.length)return t;const a=s.byteLength;for(let i=0;i<a;){const o=le(s,i),r=qe(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=Se(s.subarray(i+8,l),e.slice(1));d.length&&Q3.apply(t,d)}i=l}return t}function t6(s){const e=[],t=s[0];let a=8;const i=le(s,a);a+=4;let o=0,r=0;t===0?(o=le(s,a),r=le(s,a+4),a+=8):(o=Tf(s,a),r=Tf(s,a+8),a+=16),a+=2;let l=s.length+r;const d=Ef(s,a);a+=2;for(let c=0;c<d;c++){let h=a;const u=le(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=le(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 xf(s){const e=[],t=Se(s,["moov","trak"]);for(let i=0;i<t.length;i++){const o=t[i],r=Se(o,["tkhd"])[0];if(r){let l=r[0];const d=le(r,l===0?12:20),c=Se(o,["mdia","mdhd"])[0];if(c){l=c[0];const h=le(c,l===0?12:20),u=Se(o,["mdia","hdlr"])[0];if(u){const f=qe(u.subarray(8,12)),g={soun:Be.AUDIO,vide:Be.VIDEO}[f];if(g){const m=Se(o,["mdia","minf","stbl","stsd"])[0],p=s6(m);e[d]={timescale:h,type:g},e[g]=et({timescale:h,id:d},p)}}}}}return Se(s,["moov","mvex","trex"]).forEach(i=>{const o=le(i,4),r=e[o];r&&(r.default={duration:le(i,12),flags:le(i,20)})}),e}function s6(s){const e=s.subarray(8),t=e.subarray(86),a=qe(e.subarray(4,8));let i=a;const o=a==="enca"||a==="encv";if(o){const l=Se(e,[a])[0].subarray(a==="enca"?28:78);Se(l,["sinf"]).forEach(c=>{const h=Se(c,["schm"])[0];if(h){const u=qe(h.subarray(4,8));if(u==="cbcs"||u==="cenc"){const f=Se(c,["frma"])[0];f&&(i=qe(f))}}})}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const r=Se(t,["avcC"])[0];i+="."+Xn(r[1])+Xn(r[2])+Xn(r[3]);break}case"mp4a":{const r=Se(e,[a])[0],l=Se(r.subarray(28),["esds"])[0];if(l&&l.length>12){let d=4;if(l[d++]!==3)break;d=cl(l,d),d+=2;const c=l[d++];if(c&128&&(d+=2),c&64&&(d+=l[d++]),l[d++]!==4)break;d=cl(l,d);const h=l[d++];if(h===64)i+="."+Xn(h);else break;if(d+=12,l[d++]!==5)break;d=cl(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=Se(t,["hvcC"])[0],l=r[1],d=["","A","B","C"][l>>6],c=l&31,h=le(r,2),u=(l&32)>>5?"H":"L",f=r[12],g=r.subarray(6,12);i+="."+d+c,i+="."+h.toString(16).toUpperCase(),i+="."+u+f;let m="";for(let p=g.length;p--;){const y=g[p];(y||m)&&(m="."+y.toString(16).toUpperCase()+m)}i+=m;break}case"dvh1":case"dvhe":{const r=Se(t,["dvcC"])[0],l=r[2]>>1&127,d=r[2]<<5&32|r[3]>>3&31;i+="."+jt(l)+"."+jt(d);break}case"vp09":{const r=Se(t,["vpcC"])[0],l=r[4],d=r[5],c=r[6]>>4&15;i+="."+jt(l)+"."+jt(d)+"."+jt(c);break}case"av01":{const r=Se(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,g=(r[2]&16)>>4,m=(r[2]&8)>>3,p=(r[2]&4)>>2,y=r[2]&3;i+="."+l+"."+jt(d)+c+"."+jt(f)+"."+g+"."+m+p+y+"."+jt(1)+"."+jt(1)+"."+jt(1)+"."+0;break}}return{codec:i,encrypted:o}}function cl(s,e){const t=e+5;for(;s[e++]&128&&e<t;);return e}function Xn(s){return("0"+s.toString(16).toUpperCase()).slice(-2)}function jt(s){return(s<10?"0":"")+s}function a6(s,e){if(!s||!e)return s;const t=e.keyId;return t&&e.isCommonEncryption&&Se(s,["moov","trak"]).forEach(i=>{const r=Se(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=Se(r,["enca"]);const d=l.length>0;d||(l=Se(r,["encv"])),l.forEach(c=>{const h=d?c.subarray(28):c.subarray(78);Se(h,["sinf"]).forEach(f=>{const g=vf(f);if(g){const m=g.subarray(8,24);m.some(p=>p!==0)||(A.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${Gt.hexDump(m)} -> ${Gt.hexDump(t)}`),g.set(t,8))}})})}),s}function vf(s){const e=Se(s,["schm"])[0];if(e){const t=qe(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Se(s,["schi","tenc"])[0]}return null}function n6(s,e){return Se(e,["moof","traf"]).reduce((t,a)=>{const i=Se(a,["tfdt"])[0],o=i[0],r=Se(a,["tfhd"]).reduce((l,d)=>{const c=le(d,4),h=s[c];if(h){let u=le(i,4);if(o===1){if(u===Jn)return A.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;u*=Jn+1,u+=le(i,8)}const f=h.timescale||9e4,g=u/f;if(ae(g)&&(l===null||g<l))return g}return l},null);return r!==null&&ae(r)&&(t===null||r<t)?r:t},null)}function i6(s,e){let t=0,a=0,i=0;const o=Se(s,["moof","traf"]);for(let r=0;r<o.length;r++){const l=o[r],d=Se(l,["tfhd"])[0],c=le(d,4),h=e[c];if(!h)continue;const u=h.default,f=le(d,0)|(u==null?void 0:u.flags);let g=u==null?void 0:u.duration;f&8&&(f&2?g=le(d,12):g=le(d,8));const m=h.timescale||9e4,p=Se(l,["trun"]);for(let y=0;y<p.length;y++){if(t=o6(p[y]),!t&&g){const b=le(p[y],4);t=g*b}h.type===Be.VIDEO?a+=t/m:h.type===Be.AUDIO&&(i+=t/m)}}if(a===0&&i===0){let r=1/0,l=0,d=0;const c=Se(s,["sidx"]);for(let h=0;h<c.length;h++){const u=t6(c[h]);if(u!=null&&u.references){r=Math.min(r,u.earliestPresentationTime/u.timescale);const f=u.references.reduce((g,m)=>g+m.info.duration||0,0);l=Math.max(l,f+u.earliestPresentationTime/u.timescale),d=l-r}}if(d&&ae(d))return d}return a||i}function o6(s){const e=le(s,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let a=0;const i=le(s,4);for(let o=0;o<i;o++){if(e&256){const r=le(s,t);a+=r,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return a}function r6(s,e,t){Se(e,["moof","traf"]).forEach(a=>{Se(a,["tfhd"]).forEach(i=>{const o=le(i,4),r=s[o];if(!r)return;const l=r.timescale||9e4;Se(a,["tfdt"]).forEach(d=>{const c=d[0],h=t*l;if(h){let u=le(d,4);if(c===0)u-=h,u=Math.max(u,0),ll(d,4,u);else{u*=Math.pow(2,32),u+=le(d,8),u-=h,u=Math.max(u,0);const f=Math.floor(u/(Jn+1)),g=Math.floor(u%(Jn+1));ll(d,4,f),ll(d,8,g)}}})})})}function l6(s){const e={valid:null,remainder:null},t=Se(s,["moof"]);if(t.length<2)return e.remainder=s,e;const a=t[t.length-1];return e.valid=vs(s,0,a.byteOffset-8),e.remainder=vs(s,a.byteOffset-8),e}function Et(s,e){const t=new Uint8Array(s.length+e.length);return t.set(s),t.set(e,s.length),t}function Af(s,e){const t=[],a=e.samples,i=e.timescale,o=e.id;let r=!1;return Se(a,["moof"]).map(d=>{const c=d.byteOffset-8;Se(d,["traf"]).map(u=>{const f=Se(u,["tfdt"]).map(g=>{const m=g[0];let p=le(g,4);return m===1&&(p*=Math.pow(2,32),p+=le(g,8)),p/i})[0];return f!==void 0&&(s=f),Se(u,["tfhd"]).map(g=>{const m=le(g,4),p=le(g,0)&16777215,y=(p&1)!==0,b=(p&2)!==0,S=(p&8)!==0;let w=0;const x=(p&16)!==0;let E=0;const v=(p&32)!==0;let T=8;m===o&&(y&&(T+=8),b&&(T+=4),S&&(w=le(g,T),T+=4),x&&(E=le(g,T),T+=4),v&&(T+=4),e.type==="video"&&(r=c6(e.codec)),Se(u,["trun"]).map(R=>{const L=R[0],B=le(R,0)&16777215,M=(B&1)!==0;let W=0;const j=(B&4)!==0,se=(B&256)!==0;let oe=0;const ne=(B&512)!==0;let de=0;const he=(B&1024)!==0,J=(B&2048)!==0;let K=0;const ue=le(R,4);let Y=8;M&&(W=le(R,Y),Y+=4),j&&(Y+=4);let X=W+c;for(let re=0;re<ue;re++){if(se?(oe=le(R,Y),Y+=4):oe=w,ne?(de=le(R,Y),Y+=4):de=E,he&&(Y+=4),J&&(L===0?K=le(R,Y):K=Cf(R,Y),Y+=4),e.type===Be.VIDEO){let ye=0;for(;ye<de;){const xe=le(a,X);if(X+=4,d6(r,a[X])){const ee=a.subarray(X,X+xe);Lf(ee,r?2:1,s+K/i,t)}X+=xe,ye+=xe+4}}s+=oe/i}}))})})}),t}function c6(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 d6(s,e){if(s){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Lf(s,e,t,a){const i=If(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=Ef(i,h);if(h+=2,f===49){const g=le(i,h);if(h+=4,g===1195456820){const m=i[h++];if(m===3){const p=i[h++],y=31&p,b=64&p,S=b?2+y*3:0,w=new Uint8Array(S);if(b){w[0]=p;for(let x=1;x<S;x++)w[x]=i[h++]}a.push({type:m,payloadType:r,pts:t,bytes:w})}}}}}else if(r===5&&l>16){const u=[];for(let m=0;m<16;m++){const p=i[h++].toString(16);u.push(p.length==1?"0"+p:p),(m===3||m===5||m===7||m===9)&&u.push("-")}const f=l-16,g=new Uint8Array(f);for(let m=0;m<f;m++)g[m]=i[h++];a.push({payloadType:r,pts:t,uuid:u.join(""),userData:Ut(g),userDataBytes:g})}}}function If(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(;qe(s.subarray(c,c+1))!=="\0";)t+=qe(s.subarray(c,c+1)),c+=1;for(t+=qe(s.subarray(c,c+1)),c+=1;qe(s.subarray(c,c+1))!=="\0";)a+=qe(s.subarray(c,c+1)),c+=1;a+=qe(s.subarray(c,c+1)),c+=1,i=le(s,12),o=le(s,16),l=le(s,20),d=le(s,24),c=28}else if(e===1){c+=4,i=le(s,c),c+=4;const u=le(s,c);c+=4;const f=le(s,c);for(c+=4,r=2**32*u+f,L3(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=le(s,c),c+=4,d=le(s,c),c+=4;qe(s.subarray(c,c+1))!=="\0";)t+=qe(s.subarray(c,c+1)),c+=1;for(t+=qe(s.subarray(c,c+1)),c+=1;qe(s.subarray(c,c+1))!=="\0";)a+=qe(s.subarray(c,c+1)),c+=1;a+=qe(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 u6(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 m6(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),u6([112,115,115,104],new Uint8Array([a,0,0,0]),s,o,i,r,t||new Uint8Array)}function f6(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=p6(i);e.push(o),a+=o.size}}return e}function p6(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=Gt.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 Zn={};class Ba{static clearKeyUriToKeyIdMap(){Zn={}}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 yt.FAIRPLAY:case yt.WIDEVINE:case yt.PLAYREADY:case yt.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=g6(e);return new Ba(this.method,this.uri,"identity",this.keyFormatVersions,a)}const t=U3(this.uri);if(t)switch(this.keyFormat){case yt.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case yt.PLAYREADY:{const a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=m6(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=sl(h).subarray(0,16);z3(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=Zn[this.uri];if(!a){const i=Object.keys(Zn).length%Number.MAX_SAFE_INTEGER;a=new Uint8Array(16),new DataView(a.buffer,12,4).setUint32(0,i),Zn[this.uri]=a}this.keyId=a}return this}}function g6(s){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=s>>8*(15-t)&255;return e}const Rf=/\{\$([a-zA-Z0-9-_]+)\}/g;function Bf(s){return Rf.test(s)}function bt(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]=dl(s,o))}}function dl(s,e){if(s.variableList!==null||s.hasVariableRefs){const t=s.variableList;return e.replace(Rf,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 Nf(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 y6(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 As(s=!0){return typeof self>"u"?void 0:(s||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function b6(s){return typeof self<"u"&&s===self.ManagedMediaSource}const Qn={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 S6(s,e){const t=Qn[e];return!!t&&!!t[s.slice(0,4)]}function hl(s,e,t=!0){return!s.split(",").some(a=>!Df(a,e,t))}function Df(s,e,t=!0){var a;const i=As(t);return(a=i==null?void 0:i.isTypeSupported(Na(s,e)))!=null?a:!1}function Na(s,e){return`${e}/mp4;codecs="${s}"`}function Pf(s){if(s){const e=s.substring(0,4);return Qn.video[e]}return 2}function ei(s){return s.split(",").reduce((e,t)=>{const a=Qn.video[t];return a?(a*2+e)/(e?3:2):(Qn.audio[t]+e)/(e?2:1)},0)}const ul={};function _6(s,e=!0){if(ul[s])return ul[s];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[s];for(let a=0;a<t.length;a++)if(Df(t[a],"audio",e))return ul[s]=t[a],t[a];return s}const w6=/flac|opus/i;function ti(s,e=!0){return s.replace(w6,t=>_6(t.toLowerCase(),e))}function Of(s,e){return s&&s!=="mp4a"?s:e&&e.split(",")[0]}function k6(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 Ff=/#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,Mf=/#EXT-X-MEDIA:(.*)/g,E6=/^#EXT(?:INF|-X-TARGETDURATION):/m,Vf=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"),T6=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 Ht{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 Qr.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return E6.test(e)}static parseMasterPlaylist(e,t){const a=Bf(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:a},o=[];Ff.lastIndex=0;let r;for(;(r=Ff.exec(e))!=null;)if(r[1]){var l;const c=new Me(r[1]);bt(i,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const h=dl(i,r[2]),u={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ht.resolve(h,t)},f=c.decimalResolution("RESOLUTION");f&&(u.width=f.width,u.height=f.height),C6(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 Me(h);bt(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=$f(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 Me(h);bt(i,u,["NAME","VALUE","QUERYPARAM"]),Nf(i,u,t)}break}case"CONTENT-STEERING":{const u=new Me(h);bt(i,u,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:Ht.resolve(u["SERVER-URI"],t),pathwayId:u["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=zf(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(Mf.lastIndex=0;(i=Mf.exec(e))!==null;){const c=new Me(i[1]),h=c.TYPE;if(h){const u=l[h],f=o[h]||[];o[h]=f,bt(a,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const g=c.LANGUAGE,m=c["ASSOC-LANGUAGE"],p=c.CHANNELS,y=c.CHARACTERISTICS,b=c["INSTREAM-ID"],S={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||g||"",type:h,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:g,url:c.URI?Ht.resolve(c.URI,t):""};if(m&&(S.assocLang=m),p&&(S.channels=p),y&&(S.characteristics=y),b&&(S.instreamId=b),u!=null&&u.length){const w=Ht.findGroup(u,S.groupId)||u[0];Uf(S,w,"audioCodec"),Uf(S,w,"textCodec")}f.push(S)}}return o}static parseLevelPlaylist(e,t,a,i,o,r){const l=new V3(t),d=l.fragments;let c=null,h=0,u=0,f=0,g=0,m=null,p=new tl(i,t),y,b,S,w=-1,x=!1,E=null;for(Vf.lastIndex=0,l.m3u8=e,l.hasVariableRefs=Bf(e);(y=Vf.exec(e))!==null;){x&&(x=!1,p=new tl(i,t),p.start=f,p.sn=h,p.cc=g,p.level=a,c&&(p.initSegment=c,p.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,E&&(p.setByteRange(E),E=null)));const L=y[1];if(L){p.duration=parseFloat(L);const B=(" "+y[2]).slice(1);p.title=B||null,p.tagList.push(B?["INF",L,B]:["INF",L])}else if(y[3]){if(ae(p.duration)){p.start=f,S&&Hf(p,S,l),p.sn=h,p.level=a,p.cc=g,d.push(p);const B=(" "+y[3]).slice(1);p.relurl=dl(l,B),Gf(p,m),m=p,f+=p.duration,h++,u=0,x=!0}}else if(y[4]){const B=(" "+y[4]).slice(1);m?p.setByteRange(B,m):p.setByteRange(B)}else if(y[5])p.rawProgramDateTime=(" "+y[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),w===-1&&(w=d.length);else{if(y=y[0].match(T6),!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 B=(" "+y[b]).slice(1),M=(" "+y[b+1]).slice(1),W=y[b+2]?(" "+y[b+2]).slice(1):"";switch(B){case"PLAYLIST-TYPE":l.type=M.toUpperCase();break;case"MEDIA-SEQUENCE":h=l.startSN=parseInt(M);break;case"SKIP":{const j=new Me(M);bt(l,j,["RECENTLY-REMOVED-DATERANGES"]);const se=j.decimalInteger("SKIPPED-SEGMENTS");if(ae(se)){l.skippedSegments=se;for(let ne=se;ne--;)d.unshift(null);h+=se}const oe=j.enumeratedString("RECENTLY-REMOVED-DATERANGES");oe&&(l.recentlyRemovedDateranges=oe.split(" "));break}case"TARGETDURATION":l.targetduration=Math.max(parseInt(M),1);break;case"VERSION":l.version=parseInt(M);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"#":(M||W)&&p.tagList.push(W?[M,W]:[M]);break;case"DISCONTINUITY":g++,p.tagList.push(["DIS"]);break;case"GAP":p.gap=!0,p.tagList.push([B]);break;case"BITRATE":p.tagList.push([B,M]);break;case"DATERANGE":{const j=new Me(M);bt(l,j,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),bt(l,j,j.clientAttrs);const se=new mf(j,l.dateRanges[j.ID]);se.isValid||l.skippedSegments?l.dateRanges[se.id]=se:A.warn(`Ignoring invalid DATERANGE tag: "${M}"`),p.tagList.push(["EXT-X-DATERANGE",M]);break}case"DEFINE":{{const j=new Me(M);bt(l,j,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in j?y6(l,j,r):Nf(l,j,t)}break}case"DISCONTINUITY-SEQUENCE":g=parseInt(M);break;case"KEY":{const j=$f(M,t,l);if(j.isSupported()){if(j.method==="NONE"){S=void 0;break}S||(S={}),S[j.keyFormat]&&(S=je({},S)),S[j.keyFormat]=j}else A.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${M}"`);break}case"START":l.startTimeOffset=zf(M);break;case"MAP":{const j=new Me(M);if(bt(l,j,["BYTERANGE","URI"]),p.duration){const se=new tl(i,t);jf(se,j,a,S),c=se,p.initSegment=c,c.rawProgramDateTime&&!p.rawProgramDateTime&&(p.rawProgramDateTime=c.rawProgramDateTime)}else{const se=p.byteRangeEndOffset;if(se){const oe=p.byteRangeStartOffset;E=`${se-oe}@${oe}`}else E=null;jf(p,j,a,S),c=p,x=!0}break}case"SERVER-CONTROL":{const j=new Me(M);l.canBlockReload=j.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=j.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&j.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=j.optionalFloat("PART-HOLD-BACK",0),l.holdBack=j.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const j=new Me(M);l.partTarget=j.decimalFloatingPoint("PART-TARGET");break}case"PART":{let j=l.partList;j||(j=l.partList=[]);const se=u>0?j[j.length-1]:void 0,oe=u++,ne=new Me(M);bt(l,ne,["BYTERANGE","URI"]);const de=new F3(ne,p,t,oe,se);j.push(de),p.duration+=de.duration;break}case"PRELOAD-HINT":{const j=new Me(M);bt(l,j,["URI"]),l.preloadHint=j;break}case"RENDITION-REPORT":{const j=new Me(M);bt(l,j,["URI"]),l.renditionReports=l.renditionReports||[],l.renditionReports.push(j);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&&(Gf(p,m),p.cc=g,l.fragmentHint=p,S&&Hf(p,S,l));const v=d.length,T=d[0],R=d[v-1];if(f+=l.skippedSegments*l.targetduration,f>0&&v&&R){l.averagetargetduration=f/v;const L=R.sn;l.endSN=L!=="initSegment"?L:0,l.live||(R.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=g,w>0&&x6(d,w),l}}function $f(s,e,t){var a,i;const o=new Me(s);bt(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?Ht.resolve(l,e):"",f=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ba(r,u,h,f,d)}function zf(s){const t=new Me(s).decimalFloatingPoint("TIME-OFFSET");return ae(t)?t:null}function C6(s,e){let t=(s||"").split(/[ ,]+/).filter(a=>a);["video","audio","text"].forEach(a=>{const i=t.filter(o=>S6(o,a));i.length&&(e[`${a}Codec`]=i.join(","),t=t.filter(o=>i.indexOf(o)===-1))}),e.unknownCodecs=t}function Uf(s,e,t){const a=e[t];a&&(s[t]=a)}function x6(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 Gf(s,e){s.rawProgramDateTime?s.programDateTime=Date.parse(s.rawProgramDateTime):e!=null&&e.programDateTime&&(s.programDateTime=e.endProgramDateTime),ae(s.programDateTime)||(s.programDateTime=null,s.rawProgramDateTime=null)}function jf(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 Hf(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 ve={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ce={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Wf(s){const{type:e}=s;switch(e){case ve.AUDIO_TRACK:return ce.AUDIO;case ve.SUBTITLE_TRACK:return ce.SUBTITLE;default:return ce.MAIN}}function ml(s,e){let t=s.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class v6{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(_.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:ve.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:ve.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:ve.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:ve.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===ve.MANIFEST?o=a.manifestLoadPolicy.default:o=je({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),ae((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ve.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ve.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ve.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=je({},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 g=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(),Ht.isMediaPlaylist(m)?this.handleTrackOrLevelPlaylist(c,h,u,f||null,g):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=ml(e,a),d=Ht.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:g,variableList:m}=d;this.variableList=m;const{AUDIO:p=[],SUBTITLES:y,"CLOSED-CAPTIONS":b}=Ht.parseMasterPlaylistMedia(r,l,d);p.length&&!p.some(w=>!w.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"),p.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Me({}),bitrate:0,url:""})),o.trigger(_.MANIFEST_LOADED,{levels:h,audioTracks:p,subtitles:y,captions:b,contentSteering:c,url:l,stats:t,networkDetails:i,sessionData:u,sessionKeys:f,startTimeOffset:g,variableList:m})}handleTrackOrLevelPlaylist(e,t,a,i,o){const r=this.hls,{id:l,level:d,type:c}=a,h=ml(e,a),u=0,f=ae(d)?d:ae(l)?l:0,g=Wf(a),m=Ht.parseLevelPlaylist(e.data,h,f,g,u,this.variableList);if(c===ve.MANIFEST){const p={attrs:new Me({}),bitrate:0,details:m,name:"",url:h};r.trigger(_.MANIFEST_LOADED,{levels:[p],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(_.ERROR,{type:pe.NETWORK_ERROR,details:N.MANIFEST_PARSING_ERROR,fatal:t.type===ve.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===ve.LEVEL?r+=`: ${e.level} id: ${e.id}`:(e.type===ve.AUDIO_TRACK||e.type===ve.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 ve.MANIFEST:d=a?N.MANIFEST_LOAD_TIMEOUT:N.MANIFEST_LOAD_ERROR,c=!0;break;case ve.LEVEL:d=a?N.LEVEL_LOAD_TIMEOUT:N.LEVEL_LOAD_ERROR,c=!1;break;case ve.AUDIO_TRACK:d=a?N.AUDIO_TRACK_LOAD_TIMEOUT:N.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ve.SUBTITLE_TRACK:d=a?N.SUBTITLE_TRACK_LOAD_TIMEOUT:N.SUBTITLE_LOAD_ERROR,c=!1;break}h&&this.resetInternalLoader(e.type);const u={type:pe.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=et({url:f,data:void 0},i)}this.hls.trigger(_.ERROR,u)}handlePlaylistLoaded(e,t,a,i,o,r){const l=this.hls,{type:d,level:c,id:h,groupId:u,deliveryDirectives:f}=i,g=ml(t,i),m=Wf(i),p=typeof i.level=="number"&&m===ce.MAIN?c:void 0;if(!e.fragments.length){const b=new Error("No Segments found in Playlist");l.trigger(_.ERROR,{type:pe.NETWORK_ERROR,details:N.LEVEL_EMPTY_ERROR,fatal:!1,url:g,error:b,reason:b.message,response:t,context:i,level:p,parent:m,networkDetails:o,stats:a});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const y=e.playlistParsingError;if(y){l.trigger(_.ERROR,{type:pe.NETWORK_ERROR,details:N.LEVEL_PARSING_ERROR,fatal:!1,url:g,error:y,reason:y.message,response:t,context:i,level:p,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 ve.MANIFEST:case ve.LEVEL:l.trigger(_.LEVEL_LOADED,{details:e,level:p||0,id:h||0,stats:a,networkDetails:o,deliveryDirectives:f});break;case ve.AUDIO_TRACK:l.trigger(_.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break;case ve.SUBTITLE_TRACK:l.trigger(_.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break}}}function Kf(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 qf(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 Hs(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 fl(s,e,t,a){const i=s.mode;if(i==="disabled"&&(s.mode="hidden"),s.cues&&s.cues.length>0){const o=L6(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 A6(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 L6(s,e,t){const a=[],i=A6(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 si(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 Ot={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const I6=.25;function pl(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function Yf(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?et({type:i},a):a))}return o}const ai=(()=>{const s=pl();try{s&&new s(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function gl(s,e){return s.getTime()/1e3-e}function R6(s){return Uint8Array.from(s.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class B6{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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Hs(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 Kf(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=pl();if(r)for(let l=0;l<o.length;l++){const d=o[l].type;if(d===Ot.emsg&&!a||!i)continue;const c=wf(o[l].data);if(c){const h=o[l].pts;let u=h+o[l].duration;u>ai&&(u=ai),u-h<=0&&(u=h+I6);for(let g=0;g<c.length;g++){const m=c[g];if(!_f(m)){this.updateId3CueEnds(h,d);const p=Yf(r,h,u,m,d);p&&this.id3Track.addCue(p)}}}}}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===ai&&(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===Ot.audioId3&&d:i==="video"?c=h=>h.type===Ot.emsg&&l:c=h=>h.type===Ot.audioId3&&d||h.type===Ot.emsg&&l,fl(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(g=>{i.removeCue(a[f].cues[g])}),delete a[f]}}const l=t.fragments[t.fragments.length-1];if(r.length===0||!ae(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const d=l.programDateTime/1e3-l.start,c=pl();for(let h=0;h<r.length;h++){const u=r[h],f=o[u],g=gl(f.startDate,d),m=a[u],p=(m==null?void 0:m.cues)||{};let y=(m==null?void 0:m.durationKnown)||!1,b=ai;const S=f.endDate;if(S)b=gl(S,d),y=!0;else if(f.endOnNext&&!y){const x=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);x&&(b=gl(x.startDate,d),y=!0)}const w=Object.keys(f.attr);for(let x=0;x<w.length;x++){const E=w[x];if(!P3(E))continue;const v=p[E];if(v)y&&!m.durationKnown&&(v.endTime=b);else if(c){let T=f.attr[E];O3(E)&&(T=R6(T));const R=Yf(c,g,b,{key:E,data:T},Ot.dateRange);R&&(R.id=u,this.id3Track.addCue(R),p[E]=R)}}a[u]={cues:p,dateRange:f,durationKnown:y}}}}class N6{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(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(_.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(_.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 yl=["NONE","TYPE-0","TYPE-1",null];function D6(s){return yl.indexOf(s)>-1}const ni=["SDR","PQ","HLG"];function P6(s){return!!s&&ni.indexOf(s)>-1}var ii={No:"",Yes:"YES",v2:"v2"};function Jf(s){const{canSkipUntil:e,canSkipDateRanges:t,age:a}=s,i=a<e/2;return e&&i?t?ii.v2:ii.Yes:ii.No}class Xf{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 Ws{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 Zf(this._audioGroups,e)}hasSubtitleGroup(e){return Zf(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 Zf(s,e){return!e||!s?!1:s.indexOf(e)!==-1}function bl(s,e){const t=e.startPTS;if(ae(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 Qf(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(ae(c)){const y=Math.abs(c-t);ae(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 g;const m=f-s.startSN,p=s.fragments;for(p[m]=e,g=m;g>0;g--)bl(p[g],p[g-1]);for(g=m;g<p.length-1;g++)bl(p[g],p[g+1]);return s.fragmentHint&&bl(p[p.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,u}function O6(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(V6(s,e,(d,c)=>{d.relurl&&(i=d.cc-c.cc),ae(d.startPTS)&&ae(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=F6(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),M6(s.partList,e.partList,(d,c)=>{c.elementaryStreams=d.elementaryStreams,c.stats=d.stats}),o?Qf(e,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):ep(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 F6(s,e,t){const a=je({},s);return t&&t.forEach(i=>{delete a[i]}),Object.keys(e).forEach(i=>{const o=new mf(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 M6(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 V6(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 ep(s,e){const t=e.startSN+e.skippedSegments-s.startSN,a=s.fragments;t<0||t>=a.length||Sl(e,a[t].start)}function Sl(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 $6(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 z6(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 tp(s,e,t){var a;return s!=null&&s.details?sp((a=s.details)==null?void 0:a.partList,e,t):null}function sp(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 ap(s){s.forEach((e,t)=>{const{details:a}=e;a!=null&&a.fragments&&a.fragments.forEach(i=>{i.level=t})})}function oi(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 np(s,e){const t=oi(e);return s.default[`${t?"timeout":"error"}Retry`]}function _l(s,e){const t=s.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*s.retryDelayMs,s.maxRetryDelayMs)}function ip(s){return et(et({},s),{errorRetry:null,timeoutRetry:null})}function ri(s,e,t,a){if(!s)return!1;const i=a==null?void 0:a.code,o=e<s.maxNumRetry&&(U6(i)||!!t);return s.shouldRetry?s.shouldRetry(s,e,t,a,o):o}function U6(s){return s===0&&navigator.onLine===!1||!!s&&(s<400||s>499)}const op={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 G6(s,e,t){if(e===null||!Array.isArray(s)||!s.length||!ae(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(H6(e,t,r))return r}return null}function li(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)&&wl(t,a,o)===0||j6(o,s,Math.min(i,a))))return o;const r=op.search(e,wl.bind(null,t,a));return r&&(r!==s||!o)?r:o}function j6(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 wl(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 H6(s,e,t){const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-a>s}function W6(s,e){return op.search(s,t=>t.cc<e?1:t.cc>e?-1:0)}var rt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ft={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class K6{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(_.ERROR,this.onError,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.ERROR,this.onError,this),e.off(_.ERROR,this.onErrorOut,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.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)===ce.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:rt.DoNothing,flags:Ft.None};return}case N.FRAG_GAP:case N.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=rt.SendAlternateToPenaltyBox;return}case N.LEVEL_EMPTY_ERROR:case N.LEVEL_PARSING_ERROR:{var l,d;const c=t.parent===ce.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===ve.AUDIO_TRACK&&c.hasAudioGroup(r.groupId)||r.type===ve.SUBTITLE_TRACK&&c.hasSubtitleGroup(r.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o.loadLevel),t.errorAction.action=rt.SendAlternateToPenaltyBox,t.errorAction.flags=Ft.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:rt.SendAlternateToPenaltyBox,flags:Ft.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:rt.DoNothing,flags:Ft.None};return}t.type===pe.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=np(a.config.playlistLoadPolicy,e),o=this.playlistError++;if(ri(i,o,oi(e),e.response))return{action:rt.RetryRequest,flags:Ft.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=np(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++,ri(l,d,oi(e),e.response)))return{action:rt.RetryRequest,flags:Ft.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:g,maxAutoLevel:m}=a;a.autoLevelEnabled||(a.loadLevel=-1);const p=(o=e.frag)==null?void 0:o.type,b=(p===ce.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),w=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:x,groupId:E}=(r=e.context)!=null?r:{};for(let v=u.length;v--;){const T=(v+f)%u.length;if(T!==f&&T>=g&&T<=m&&u[T].loadError===0){var l,d;const R=u[T];if(c===N.FRAG_GAP&&p===ce.MAIN&&e.frag){const L=u[T].details;if(L){const B=li(e.frag,L.fragments,e.frag.start);if(B!=null&&B.gap)continue}}else{if(x===ve.AUDIO_TRACK&&R.hasAudioGroup(E)||x===ve.SUBTITLE_TRACK&&R.hasSubtitleGroup(E))continue;if(p===ce.AUDIO&&(l=i.audioGroups)!=null&&l.some(L=>R.hasAudioGroup(L))||p===ce.SUBTITLE&&(d=i.subtitleGroups)!=null&&d.some(L=>R.hasSubtitleGroup(L))||b&&i.audioCodec===R.audioCodec||!b&&i.audioCodec!==R.audioCodec||w&&i.codecSet===R.codecSet)continue}h=T;break}}if(h>-1&&a.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:rt.SendAlternateToPenaltyBox,flags:Ft.None,nextAutoLevel:h}}return{action:rt.SendAlternateToPenaltyBox,flags:Ft.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var a;switch((a=t.errorAction)==null?void 0:a.action){case rt.DoNothing:break;case rt.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 Ft.None:this.switchLevel(e,r);break;case Ft.MoveAllAlternatesMatchingHDCP:o&&(t.maxHdcpLevel=yl[yl.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 kl{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&&Jf(a);return new Xf(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&&O6(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,w=i.lastPartIndex,x=w!==-1,E=b===S,v=y?0:w;x?(c=E?S+1:b,h=E?v:w+1):c=S+1;const T=i.age,R=T+i.ageHeader;let L=Math.min(R-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 B=Math.floor(L/i.targetduration);if(c+=B,h!==void 0){const M=Math.round(L%i.targetduration/i.partTarget);h+=M}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${T.toFixed(2)}s goal: ${L} skip sn ${B} 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,g=(i.edge-f)*1e3,m=$6(i,g);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 p=this.requestScheduled-r;p=Math.max(0,p),this.log(`reload live playlist ${e} in ${Math.round(p)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(d),p)}else this.clearTimer()}getDeliveryDirectives(e,t,a,i){let o=Jf(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(a=t.msn,i=t.part,o=ii.No),new Xf(a,i,o)}checkRetry(e){const t=e.details,a=oi(e),i=e.errorAction,{action:o,retryCount:r=0,retryConfig:l}=i||{},d=!!i&&!!l&&(o===rt.RetryRequest||!i.resolved&&o===rt.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=_l(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 Ks{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 q6{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 Ks(e),this.fast_=new Ks(t),this.defaultTTFB_=i,this.ttfb_=new Ks(e)}update(e,t){const{slow_:a,fast_:i,ttfb_:o}=this;a.halfLife!==e&&(this.slow_=new Ks(e,a.getEstimate(),a.getTotalWeight())),i.halfLife!==t&&(this.fast_=new Ks(t,i.getEstimate(),i.getTotalWeight())),o.halfLife!==e&&(this.ttfb_=new Ks(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 rp={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},lp={};function Y6(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 g=e.groups[f];if(!g)throw new Error(`Audio track group ${f} not found`);Object.keys(g.channels).forEach(m=>{u[m]=(u[m]||0)+g.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&&ae(c)&&Object.keys(h).some(u=>parseInt(u)>c)}function J6(s,e,t){const a=s.videoCodec,i=s.audioCodec;if(!a||!i||!t)return Promise.resolve(rp);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:et(et({},o),{},{contentType:Na(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);ae(f)&&f>2&&l.push.apply(l,i.split(",").map(g=>({type:"media-source",audio:{contentType:Na(g,"audio"),channels:""+f}})))}}))}),Promise.all(l.map(d=>{const c=X6(d);return lp[c]||(lp[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 X6(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 Z6(){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 Q6(s,e){let t=!1,a=[];return s&&(t=s!=="SDR",a=[s]),e&&(a=e.allowedVideoRanges||ni.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Z6(),t?a=a.filter(i=>i!=="SDR"):a=["SDR"]),{preferHDR:t,allowedVideoRanges:a}}function eN(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,g=1/0,m=0,p=[];const{preferHDR:y,allowedVideoRanges:b}=Q6(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),g=Math.min(g,v.minBitrate);const T=b.filter(R=>v.videoRanges[R]>0);T.length>0&&(h=!0,p=T)}u=ae(u)?u:0,f=ae(f)?f:0;const S=Math.max(1080,u),w=Math.max(30,f);return g=ae(g)?g:t,t=Math.max(g,t),h||(e=void 0,p=[]),{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>w?(Xt(v,`min framerate of ${T.minFramerate} > maximum of ${w}`),E):p.some(R=>T.videoRanges[R]>0)?T.maxScore<m?(Xt(v,`max score of ${T.maxScore} < selected max of ${m}`),E):E&&(ei(v)>=ei(E)||T.fragmentError>s[E].fragmentError)?E:(m=T.maxScore,v):(Xt(v,`no variants with VIDEO-RANGE of ${JSON.stringify(p)} found`),E)},void 0),videoRanges:p,preferHDR:y,minFramerate:f,minBitrate:g}}function Xt(s,e){A.log(`[abr] start candidates with "${s}" ignored because ${e}`)}function tN(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 sN(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 Wt(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(qs(s,i,t))return a}return-1}function qs(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||aN(l,e.characteristics))&&(t===void 0||t(s,e))}function aN(s,e=""){const t=s.split(","),a=e.split(",");return t.length===a.length&&!t.some(i=>a.indexOf(i)===-1)}function Ys(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 nN(s,e,t,a,i){const o=e[a],l=e.reduce((f,g,m)=>{const p=g.uri;return(f[p]||(f[p]=[])).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=cp(e,a,f=>{if(f.videoRange!==d||f.frameRate!==c||f.codecSet.substring(0,4)!==h)return!1;const g=f.audioGroups,m=t.filter(p=>!g||g.indexOf(p.groupId)!==-1);return Wt(s,m,i)>-1});return u>-1?u:cp(e,a,f=>{const g=f.audioGroups,m=t.filter(p=>!g||g.indexOf(p.groupId)!==-1);return Wt(s,m,i)>-1})}function cp(s,e,t){for(let a=e;a>-1;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 iN{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 g=this.bwEstimator.getEstimateTTFB(),m=Math.abs(r.playbackRate);if(h<=Math.max(g,1e3*(c/(m*2))))return;const p=f.len/m,y=d.loading.first?d.loading.first-d.loading.start:-1,b=d.loaded&&y>-1,S=this.getBwEstimate(),w=i.levels,x=w[t.level],E=d.total||Math.max(d.loaded,Math.round(c*x.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,R=T?(E-d.loaded)/T:E*8/S+g/1e3;if(R<=p)return;const L=T?T*8:S;let B=Number.POSITIVE_INFINITY,M;for(M=t.level-1;M>u;M--){const j=w[M].maxBitrate;if(B=this.getTimeToLoadFrag(g/1e3,L,c*j,!w[M].details),B<p)break}if(B>=R||B>c*10)return;i.nextLoadLevel=i.nextAutoLevel=M,b?this.bwEstimator.sample(h-Math.min(g,y),d.loaded):this.bwEstimator.sampleTTFB(h);const W=w[M].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>W&&this.resetEstimator(W),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=Cs(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&$r.assertOptions(a,{silentJSONParsing:os.transitional(os.boolean),forcedJSONParsing:os.transitional(os.boolean),clarifyTimeoutError:os.transitional(os.boolean)},!1),i!=null&&(F.isFunction(i)?t.paramsSerializer={serialize:i}:$r.assertOptions(i,{encode:os.function,serialize:os.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&F.merge(o.common,o[t.method]);o&&F.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=Pt.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=[Nm.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 g=t;for(u=0;u<f;){const m=l[u++],p=l[u++];try{g=m(g)}catch(y){p.call(this,y);break}}try{h=Nm.call(this,g)}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=Cs(this.defaults,e);const t=Tm(e.baseURL,e.url);return pm(t,e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],function(s){$n.prototype[s]=function(e,t){return this.request(Cs(t||{},{method:s,url:e,data:(t||{}).data}))}}),F.forEach(["post","put","patch"],function(s){function e(t){return function(a,i,o){return this.request(Cs(o||{},{method:s,headers:t?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}$n.prototype[s]=e(),$n.prototype[s+"Form"]=e(!0)});const zn=$n;class zr{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 Gs(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)}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 zr(function(t){e=t}),cancel:e}}}const Q4=zr;function eR(s){return function(e){return s.apply(null,e)}}function tR(s){return F.isObject(s)&&s.isAxiosError===!0}const Ur={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(Ur).forEach(([s,e])=>{Ur[e]=s});const sR=Ur;function Om(s){const e=new zn(s),t=Qu(zn.prototype.request,e);return F.extend(t,zn.prototype,e,{allOwnKeys:!0}),F.extend(t,e,null,{allOwnKeys:!0}),t.create=function(a){return Om(Cs(s,a))},t}const Ge=Om(Nr);Ge.Axios=zn,Ge.CanceledError=Gs,Ge.CancelToken=Q4,Ge.isCancel=_m,Ge.VERSION=Dm,Ge.toFormData=Dn,Ge.AxiosError=Ee,Ge.Cancel=Ge.CanceledError,Ge.all=function(s){return Promise.all(s)},Ge.spread=eR,Ge.isAxiosError=tR,Ge.mergeConfig=Cs,Ge.AxiosHeaders=Pt,Ge.formToJSON=s=>bm(F.isHTMLForm(s)?new FormData(s):s),Ge.getAdapter=Bm.getAdapter,Ge.HttpStatusCode=sR,Ge.default=Ge;const Fm=Ge,aR=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t},Gr={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)}}},Mm=()=>{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}))},Vm=Gr.setup;Gr.setup=Vm?(s,e)=>(Mm(),Vm(s,e)):Mm;const nR={ref:"gscScrollableContainer",class:"scrollable-container"},iR={class:"scrollable-arrows"},oR=["width","height","viewBox"],rR=["stroke"],lR={class:"scrollable-wrapper"},cR={class:"scrollable-arrows"},dR=["width","height","viewBox"],hR=["stroke"];function uR(s,e,t,a,i,o){return n.openBlock(),n.createElementBlock("div",nR,[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",iR,[(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,rR)],8,oR))])],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",lR,[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",cR,[(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,dR))])],2)):n.createCommentVNode("",!0)],512)}const mR=aR(Gr,[["render",uR],["__scopeId","data-v-7d0811ac"]]),rs=(s,e)=>{const t=s.__vccOpts||s;for(const[a,i]of e)t[a]=i;return t};let $m=null;const jr={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)$m=new ResizeObserver(()=>{this.gamesContainerGHWidth=this.$refs.gamesContainerGH?this.$refs.gamesContainerGH.clientWidth:0,this.movil=this.gamesContainerGHWidth<740}),$m.observe(this.$refs.gamesContainerGH);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},zm=()=>{n.useCssVars(s=>({"27c867b8":s.colorBackgroundHome+"45","3b954a6e":s.colorBackgroundAway+"45","328fa3fc":s.colorBackgroundHome,"328c920b":s.colorBackgroundAway}))},Um=jr.setup;jr.setup=Um?(s,e)=>(zm(),Um(s,e)):zm;const Un=s=>(n.pushScopeId("data-v-20a067d4"),s=s(),n.popScopeId(),s),fR=Un(()=>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)),pR=[fR],gR=Un(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),yR=["src"],bR=Un(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),SR=Un(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),_R=["src"],wR=["src"],kR={class:"text-container"};function ER(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))},pR,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),gR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,yR),n.createElementVNode("div",{class:n.normalizeClass([o.baselogo,"position-image"])},null,2),n.createElementVNode("div",{class:n.normalizeClass(o.baselogoright)},null,2),bR,SR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,_R),n.createElementVNode("img",{src:t.logoAway,alt:"",class:n.normalizeClass(o.logoright)},null,10,wR),n.createElementVNode("div",kR,[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 TR=rs(jr,[["render",ER],["__scopeId","data-v-20a067d4"]]);let Gm=null;const Hr={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)Gm=new ResizeObserver(()=>{this.gamesContainerCWidth=this.$refs.gamesContainerC?this.$refs.gamesContainerC.clientWidth:0,this.movil=this.gamesContainerCWidth<740}),Gm.observe(this.$refs.gamesContainerC);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},jm=()=>{n.useCssVars(s=>({a2cfb232:s.colorBackgroundHome,"473dd2cb":s.colorBackgroundHome+"36"}))},Hm=Hr.setup;Hr.setup=Hm?(s,e)=>(jm(),Hm(s,e)):jm;const Aa=s=>(n.pushScopeId("data-v-f686a88f"),s=s(),n.popScopeId(),s),CR=Aa(()=>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)),xR=[CR],vR=Aa(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),AR=["src"],LR=Aa(()=>n.createElementVNode("div",{class:"base-logo"},null,-1)),IR=["src"],RR=Aa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),BR={class:"text-container"},NR={class:"player-image position-image"},DR=["src"],PR=["src"],OR=["src"],FR=Aa(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function MR(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))},xR,2),vR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,AR),LR,n.createElementVNode("img",{src:t.logoHome,alt:"",class:n.normalizeClass(o.teamlogo)},null,10,IR),RR,n.createElementVNode("div",BR,[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",NR,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,DR)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,PR)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,OR)):n.createCommentVNode("",!0)]),FR],2)}const VR=rs(Hr,[["render",MR],["__scopeId","data-v-f686a88f"]]);let Wm=null;const Wr={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)Wm=new ResizeObserver(()=>{this.gamesContainerCTWidth=this.$refs.gamesContainerCT?this.$refs.gamesContainerCT.clientWidth:0,this.gamesContainerCTWidth<740?this.movil=!0:this.movil=!1}),Wm.observe(this.$refs.gamesContainerCT);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Km=()=>{n.useCssVars(s=>({"642414f3":s.colorBackgroundHome,f4cf8182:s.colorBackgroundHome+"36"}))},qm=Wr.setup;Wr.setup=qm?(s,e)=>(Km(),qm(s,e)):Km;const Gn=s=>(n.pushScopeId("data-v-dd798805"),s=s(),n.popScopeId(),s),$R=Gn(()=>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)),zR=[$R],UR=Gn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),GR=["src"],jR={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo"},HR=["fill"],WR=["id"],KR=["stop-color"],qR=["stop-color"],YR=["src"],JR=Gn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),XR={class:"text-container"},ZR=Gn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function QR(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))},zR,2)):n.createCommentVNode("",!0),UR,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,GR),(n.openBlock(),n.createElementBlock("svg",jR,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,HR),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,KR),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundHome},null,8,qR)],8,WR)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,YR),JR,n.createElementVNode("div",XR,[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)]),ZR],2)}const eB=rs(Wr,[["render",QR],["__scopeId","data-v-dd798805"]]);let Ym=null;const Kr={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)Ym=new ResizeObserver(()=>{this.gamesContainerTAWidth=this.$refs.gamesContainerTA?this.$refs.gamesContainerTA.clientWidth:0,this.movil=this.gamesContainerTAWidth<740}),Ym.observe(this.$refs.gamesContainerTA);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Jm=()=>{n.useCssVars(s=>({"771ea921":s.colorBackgroundHome,"4475895e":s.colorBackgroundHome+"36"}))},Xm=Kr.setup;Kr.setup=Xm?(s,e)=>(Jm(),Xm(s,e)):Jm;const jn=s=>(n.pushScopeId("data-v-8a4cd99e"),s=s(),n.popScopeId(),s),tB=jn(()=>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)),sB=[tB],aB=jn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),nB=["src"],iB={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away"},oB=["fill"],rB=["id"],lB=["stop-color"],cB=["stop-color"],dB=["src"],hB=jn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),uB={class:"text-container"},mB=jn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function fB(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))},sB,2),aB,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,nB),(n.openBlock(),n.createElementBlock("svg",iB,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_7_"+t.nameTeam.replaceAll(" ","")+")"},null,8,oB),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,lB),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,cB)],8,rB)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,dB),hB,n.createElementVNode("div",uB,[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)]),mB],2)}const pB=rs(Kr,[["render",fB],["__scopeId","data-v-8a4cd99e"]]);let Zm=null;const qr={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)Zm=new ResizeObserver(()=>{this.gamesContainerTALWidth=this.$refs.gamesContainerTAL?this.$refs.gamesContainerTAL.clientWidth:0,this.movil=this.gamesContainerTALWidth<740}),Zm.observe(this.$refs.gamesContainerTAL);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},Qm=()=>{n.useCssVars(s=>({b1c828a8:s.colorBackgroundHome,c805d334:s.colorBackgroundHome+"36"}))},ef=qr.setup;qr.setup=ef?(s,e)=>(Qm(),ef(s,e)):Qm;const Hn=s=>(n.pushScopeId("data-v-6d391a8b"),s=s(),n.popScopeId(),s),gB=Hn(()=>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)),yB=[gB],bB=Hn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),SB=["src"],_B={width:"275",height:"125",viewBox:"0 0 275 125",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"base-logo-away-live"},wB=["fill"],kB=["id"],EB=["stop-color"],TB=["stop-color"],CB=["src"],xB=Hn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),vB={class:"text-container"},AB=Hn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1));function LB(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))},yB,2),bB,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,SB),(n.openBlock(),n.createElementBlock("svg",_B,[n.createElementVNode("path",{d:"M274.641 124.094L0 0.675049V124.094H274.641Z",fill:"url(#paint0_linear_10_"+t.nameTeam.replaceAll(" ","")+")"},null,8,wB),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,EB),n.createElementVNode("stop",{offset:"1","stop-color":t.colorBackgroundAway},null,8,TB)],8,kB)])])),n.createElementVNode("img",{class:n.normalizeClass(o.teamlogo),src:t.logoHome,alt:""},null,10,CB),xB,n.createElementVNode("div",vB,[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)]),AB],2)}const IB=rs(qr,[["render",LB],["__scopeId","data-v-6d391a8b"]]);let tf=null;const Yr={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)tf=new ResizeObserver(()=>{this.gamesContainerGPWidth=this.$refs.gamesContainerGP?this.$refs.gamesContainerGP.clientWidth:0,this.gamesContainerGPWidth<740?this.movil=!0:this.movil=!1}),tf.observe(this.$refs.gamesContainerGP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},sf=()=>{n.useCssVars(s=>({"30dfde48":s.colorBackgroundHome,"30dccc57":s.colorBackgroundAway,"04e93a22":s.colorBackgroundAway+"62","4a7c3c4a":s.colorBackgroundHome+"36"}))},af=Yr.setup;Yr.setup=af?(s,e)=>(sf(),af(s,e)):sf;const Wn=s=>(n.pushScopeId("data-v-122a1564"),s=s(),n.popScopeId(),s),RB=["width","src"],BB=Wn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),NB=Wn(()=>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)),DB=[NB],PB={class:"player-container"},OB=["src"],FB=["src"],MB=["src"],VB={class:"container-score"},$B=["src"],zB=["src"],UB=["src"],GB=Wn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),jB=Wn(()=>n.createElementVNode("div",{class:"gradient-color"},null,-1));function HB(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,RB)],2)):n.createCommentVNode("",!0),BB,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))},DB,2)):n.createCommentVNode("",!0),n.createElementVNode("div",PB,[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,OB)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,FB)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,MB)):n.createCommentVNode("",!0)],64)):n.createCommentVNode("",!0),n.createElementVNode("div",VB,[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,$B),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,zB),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,UB),GB,jB],2)}const WB=rs(Yr,[["render",HB],["__scopeId","data-v-122a1564"]]);let nf=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)nf=new ResizeObserver(()=>{this.gamesContainerSPWidth=this.$refs.gamesContainerSP?this.$refs.gamesContainerSP.clientWidth:0,this.movil=this.gamesContainerSPWidth<740}),nf.observe(this.$refs.gamesContainerSP);else throw new Error("Resize observer not supported!")}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},of=()=>{n.useCssVars(s=>({"7f5f505f":s.colorBackgroundHome+"30","9d4bf74e":s.colorBackgroundHome}))},rf=Jr.setup;Jr.setup=rf?(s,e)=>(of(),rf(s,e)):of;const Kn=s=>(n.pushScopeId("data-v-4c6456c6"),s=s(),n.popScopeId(),s),KB=Kn(()=>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)),qB=[KB],YB={class:"player-image position-image"},JB=["src"],XB=["src"],ZB=["src"],QB=["src"],e3=Kn(()=>n.createElementVNode("div",{class:"gradient-back position-image"},null,-1)),t3=["src"],s3=Kn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/paper-texture.png",alt:"",class:"paper-texture position-image"},null,-1)),a3={class:"text-container"},n3=Kn(()=>n.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/halftone-texture.png",alt:"",class:"halftone-texture position-image"},null,-1)),i3={class:"base-logo",width:"91",height:"216",viewBox:"0 0 91 216",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o3=["fill"];function r3(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))},qB,2)):n.createCommentVNode("",!0),n.createElementVNode("div",YB,[t.typeImg==0?(n.openBlock(),n.createElementBlock("img",{key:0,src:t.photoProfile,class:n.normalizeClass(o.playerimage)},null,10,JB)):n.createCommentVNode("",!0),t.typeImg==1?(n.openBlock(),n.createElementBlock("img",{key:1,src:t.photoProfile,alt:""},null,8,XB)):n.createCommentVNode("",!0),t.typeImg==2?(n.openBlock(),n.createElementBlock("img",{key:2,src:t.photoProfile,class:"img-number"},null,8,ZB)):n.createCommentVNode("",!0)]),n.createElementVNode("img",{src:t.logoHome,alt:"",class:"team-logo"},null,8,QB),e3,n.createElementVNode("img",{src:t.background,alt:"",class:"bkg-blackwhite position-image"},null,8,t3),s3,n.createElementVNode("div",a3,[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)]),n3,(n.openBlock(),n.createElementBlock("svg",i3,[n.createElementVNode("path",{d:"M91.5 216L0 -0.5H91.5V216Z",fill:t.colorBackgroundHome},null,8,o3)]))],2)}const l3=rs(Jr,[["render",r3],["__scopeId","data-v-4c6456c6"]]);function c3(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 d3="_ptg_qztct_3",h3="_ptgtitle_qztct_13",u3="_ptgtitle450_qztct_45",m3="_pgtcontainercard_qztct_77",f3="_pgtcontainercard350_qztct_87",p3={ptg:d3,ptgtitle:h3,ptgtitle450:u3,pgtcontainercard:m3,pgtcontainercard350:f3},Xr={components:{GSCSlider:mR,GSCThumbnailCategory:VR,GSCThumbnailCategoryTeam:eB,GSCThumbnailCategoryTeamAway:pB,GSCThumbnailHighlightGamePlayer:WB,GSCThumbnailCategoryTeamAwayLive:IB,GSCThumbnailSummaryPlayer:l3,GSCThumbnailHighlightGameHistoric:TR},setup(){const s=n.ref("ptgDiv"),{elementSize:e}=c3(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)),console.log("val: ",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&&(console.log("Hola"),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=Fm.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=Fm.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))}if(this.type===18){const o=this.getBestPlaysUrl({season:s.season,player:s.player});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)}}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(){}},lf=()=>{n.useCssVars(s=>({f990a6e0:s.backgroundColor}))},cf=Xr.setup;Xr.setup=cf?(s,e)=>(lf(),cf(s,e)):lf;function g3(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"),g=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,p)=>(n.openBlock(),n.createElementBlock("div",{key:p,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(p==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,p)=>(n.openBlock(),n.createElementBlock("div",{key:p,class:n.normalizeClass(o.pgtcontainercardClass),style:n.normalizeStyle(p==0?"margin-left: 0px !important; color: white;":"")},[t.type==2||t.type==18?(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(g,{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(g,{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(g,{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 y3={name:"DiscoverVideos",components:{GscSwitchComponent:To,GSCPlayerTeamGame:rs(Xr,[["render",g3],["__cssModules",{$style:p3}],["__scopeId","data-v-4b432cd5"]]),MatchDayPicker:Qh},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 Ae.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)}}},b3={key:0,class:"discover-videos",ref:"discoverVideosRef"},S3={class:"title-and-button"},_3={class:"calendar-container"};function w3(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",b3,[n.createElementVNode("div",S3,[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",_3,[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 k3=Xe(y3,[["render",w3],["__scopeId","data-v-b485c3f6"]]),E3=["playId","league","season","gameId","playerName","refereeName","stadiumName","finalScore","scoreAtMomentOfPlay","gameDate","homeTeamName","homeTeamLogo","awayTeamName","awayTeamLogo","categoryId","categoryName","startTime","endTime","minuteOfPlay","momentOfPlay","videoUrl"];let Zr=null;function T3(){return Zr||(Zr=E3.reduce((s,e,t)=>(s[e]=t,s),{})),Zr}function C3(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var df={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 g=l.parseURL(d);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var m=i.exec(g.path);g.netLoc=m[1],g.path=m[2]}g.netLoc&&!g.path&&(g.path="/");var p={scheme:g.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(p.netLoc=g.netLoc,f.path[0]!=="/"))if(!f.path)p.path=g.path,f.params||(p.params=g.params,f.query||(p.query=g.query));else{var y=g.path,b=y.substring(0,y.lastIndexOf("/")+1)+f.path;p.path=l.normalizePath(b)}return p.path===null&&(p.path=h.alwaysNormalize?l.normalizePath(f.path):f.path),l.buildURLFromParts(p)},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})()})(df);var Qr=df.exports;function hf(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 et(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?hf(Object(t),!0).forEach(function(a){A3(s,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):hf(Object(t)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(t,a))})}return s}function x3(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 v3(s){var e=x3(s,"string");return typeof e=="symbol"?e:String(e)}function A3(s,e,t){return e=v3(e),e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function je(){return je=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},je.apply(this,arguments)}const ae=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},L3=Number.isSafeInteger||function(s){return typeof s=="number"&&Math.abs(s)<=I3},I3=Number.MAX_SAFE_INTEGER||9007199254740991;let _=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}({}),pe=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 xs=function(){},el={trace:xs,debug:xs,log:xs,warn:xs,info:xs,error:xs};let La=el;function R3(s){const e=self.console[s];return e?e.bind(self.console,`[${s}] >`):xs}function B3(s,...e){e.forEach(function(t){La[t]=s[t]?s[t].bind(s):R3(t)})}function N3(s,e){if(typeof console=="object"&&s===!0||typeof s=="object"){B3(s,"debug","log","info","warn","error");try{La.log(`Debug logs enabled for "${e}" in hls.js version 1.5.17`)}catch{La=el}}else La=el}const A=La,D3=/^(\d+)x(\d+)$/,uf=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Me{constructor(e){typeof e=="string"&&(e=Me.parseAttrList(e)),je(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=D3.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(uf.lastIndex=0;(t=uf.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 P3(s){return s!=="ID"&&s!=="CLASS"&&s!=="START-DATE"&&s!=="DURATION"&&s!=="END-DATE"&&s!=="END-ON-NEXT"}function O3(s){return s==="SCTE35-OUT"||s==="SCTE35-IN"}class mf{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=je(new Me({}),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"]);ae(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(ae(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&&ae(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class qn{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 Be={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ff{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Be.AUDIO]:null,[Be.VIDEO]:null,[Be.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=Qr.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class tl extends ff{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 qn,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||!ae(this.programDateTime))return null;const e=ae(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[Be.AUDIO]=null,e[Be.VIDEO]=null,e[Be.AUDIOVIDEO]=null}}class F3 extends ff{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 qn,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 M3=10;class V3{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?ae(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||M3}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 sl(s){return Uint8Array.from(atob(s),e=>e.charCodeAt(0))}function $3(s){const e=al(s).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function z3(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 U3(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=sl(r)):t=$3(r)}}return t}function al(s){return Uint8Array.from(unescape(encodeURIComponent(s)),e=>e.charCodeAt(0))}const js=typeof self<"u"?self:void 0;var De={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},yt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function pf(s){switch(s){case yt.FAIRPLAY:return De.FAIRPLAY;case yt.PLAYREADY:return De.PLAYREADY;case yt.WIDEVINE:return De.WIDEVINE;case yt.CLEARKEY:return De.CLEARKEY}}var Ia={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function gf(s){if(s===Ia.WIDEVINE)return De.WIDEVINE;if(s===Ia.PLAYREADY)return De.PLAYREADY;if(s===Ia.CENC||s===Ia.CLEARKEY)return De.CLEARKEY}function yf(s){switch(s){case De.FAIRPLAY:return yt.FAIRPLAY;case De.PLAYREADY:return yt.PLAYREADY;case De.WIDEVINE:return yt.WIDEVINE;case De.CLEARKEY:return yt.CLEARKEY}}function nl(s){const{drmSystems:e,widevineLicenseUrl:t}=s,a=e?[De.FAIRPLAY,De.WIDEVINE,De.PLAYREADY,De.CLEARKEY].filter(i=>!!e[i]):[];return!a[De.WIDEVINE]&&t&&a.push(De.WIDEVINE),a}const bf=function(s){return js!=null&&(s=js.navigator)!=null&&s.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function G3(s,e,t,a){let i;switch(s){case De.FAIRPLAY:i=["cenc","sinf"];break;case De.WIDEVINE:case De.PLAYREADY:i=["cenc"];break;case De.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${s}`)}return j3(i,e,t,a)}function j3(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 vs(s,e,t){return Uint8Array.prototype.slice?s.slice(e,t):new Uint8Array(Array.prototype.slice.call(s,e,t))}const il=(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,Sf=(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,Ra=(s,e)=>{const t=e;let a=0;for(;il(s,e);){a+=10;const i=Yn(s,e+6);a+=i,Sf(s,e+10)&&(a+=10),e+=a}if(a>0)return s.subarray(t,t+a)},Yn=(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},H3=(s,e)=>il(s,e)&&Yn(s,e+6)+10<=s.length-e,ol=s=>{const e=wf(s);for(let t=0;t<e.length;t++){const a=e[t];if(_f(a))return X3(a)}},_f=s=>s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp",W3=s=>{const e=String.fromCharCode(s[0],s[1],s[2],s[3]),t=Yn(s,4),a=10;return{type:e,size:t,data:s.subarray(a,a+t)}},wf=s=>{let e=0;const t=[];for(;il(s,e);){const a=Yn(s,e+6);e+=10;const i=e+a;for(;e+8<i;){const o=W3(s.subarray(e)),r=K3(o);r&&t.push(r),e+=o.size+10}Sf(s,e)&&(e+=10)}return t},K3=s=>s.type==="PRIV"?q3(s):s.type[0]==="W"?J3(s):Y3(s),q3=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}},Y3=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}},J3=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}},X3=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=Z3();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 rl;function Z3(){if(!navigator.userAgent.includes("PlayStation 4"))return!rl&&typeof self.TextDecoder<"u"&&(rl=new self.TextDecoder("utf-8")),rl}const Gt={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}},Jn=Math.pow(2,32)-1,Q3=[].push,kf={video:1,audio:2,id3:3,text:4};function qe(s){return String.fromCharCode.apply(null,s)}function Ef(s,e){const t=s[e]<<8|s[e+1];return t<0?65536+t:t}function le(s,e){const t=Cf(s,e);return t<0?4294967296+t:t}function Tf(s,e){let t=le(s,e);return t*=Math.pow(2,32),t+=le(s,e+4),t}function Cf(s,e){return s[e]<<24|s[e+1]<<16|s[e+2]<<8|s[e+3]}function ll(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 e6(s){const e=s.byteLength;for(let t=0;t<e;){const a=le(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 Se(s,e){const t=[];if(!e.length)return t;const a=s.byteLength;for(let i=0;i<a;){const o=le(s,i),r=qe(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=Se(s.subarray(i+8,l),e.slice(1));d.length&&Q3.apply(t,d)}i=l}return t}function t6(s){const e=[],t=s[0];let a=8;const i=le(s,a);a+=4;let o=0,r=0;t===0?(o=le(s,a),r=le(s,a+4),a+=8):(o=Tf(s,a),r=Tf(s,a+8),a+=16),a+=2;let l=s.length+r;const d=Ef(s,a);a+=2;for(let c=0;c<d;c++){let h=a;const u=le(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=le(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 xf(s){const e=[],t=Se(s,["moov","trak"]);for(let i=0;i<t.length;i++){const o=t[i],r=Se(o,["tkhd"])[0];if(r){let l=r[0];const d=le(r,l===0?12:20),c=Se(o,["mdia","mdhd"])[0];if(c){l=c[0];const h=le(c,l===0?12:20),u=Se(o,["mdia","hdlr"])[0];if(u){const f=qe(u.subarray(8,12)),g={soun:Be.AUDIO,vide:Be.VIDEO}[f];if(g){const m=Se(o,["mdia","minf","stbl","stsd"])[0],p=s6(m);e[d]={timescale:h,type:g},e[g]=et({timescale:h,id:d},p)}}}}}return Se(s,["moov","mvex","trex"]).forEach(i=>{const o=le(i,4),r=e[o];r&&(r.default={duration:le(i,12),flags:le(i,20)})}),e}function s6(s){const e=s.subarray(8),t=e.subarray(86),a=qe(e.subarray(4,8));let i=a;const o=a==="enca"||a==="encv";if(o){const l=Se(e,[a])[0].subarray(a==="enca"?28:78);Se(l,["sinf"]).forEach(c=>{const h=Se(c,["schm"])[0];if(h){const u=qe(h.subarray(4,8));if(u==="cbcs"||u==="cenc"){const f=Se(c,["frma"])[0];f&&(i=qe(f))}}})}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const r=Se(t,["avcC"])[0];i+="."+Xn(r[1])+Xn(r[2])+Xn(r[3]);break}case"mp4a":{const r=Se(e,[a])[0],l=Se(r.subarray(28),["esds"])[0];if(l&&l.length>12){let d=4;if(l[d++]!==3)break;d=cl(l,d),d+=2;const c=l[d++];if(c&128&&(d+=2),c&64&&(d+=l[d++]),l[d++]!==4)break;d=cl(l,d);const h=l[d++];if(h===64)i+="."+Xn(h);else break;if(d+=12,l[d++]!==5)break;d=cl(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=Se(t,["hvcC"])[0],l=r[1],d=["","A","B","C"][l>>6],c=l&31,h=le(r,2),u=(l&32)>>5?"H":"L",f=r[12],g=r.subarray(6,12);i+="."+d+c,i+="."+h.toString(16).toUpperCase(),i+="."+u+f;let m="";for(let p=g.length;p--;){const y=g[p];(y||m)&&(m="."+y.toString(16).toUpperCase()+m)}i+=m;break}case"dvh1":case"dvhe":{const r=Se(t,["dvcC"])[0],l=r[2]>>1&127,d=r[2]<<5&32|r[3]>>3&31;i+="."+jt(l)+"."+jt(d);break}case"vp09":{const r=Se(t,["vpcC"])[0],l=r[4],d=r[5],c=r[6]>>4&15;i+="."+jt(l)+"."+jt(d)+"."+jt(c);break}case"av01":{const r=Se(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,g=(r[2]&16)>>4,m=(r[2]&8)>>3,p=(r[2]&4)>>2,y=r[2]&3;i+="."+l+"."+jt(d)+c+"."+jt(f)+"."+g+"."+m+p+y+"."+jt(1)+"."+jt(1)+"."+jt(1)+"."+0;break}}return{codec:i,encrypted:o}}function cl(s,e){const t=e+5;for(;s[e++]&128&&e<t;);return e}function Xn(s){return("0"+s.toString(16).toUpperCase()).slice(-2)}function jt(s){return(s<10?"0":"")+s}function a6(s,e){if(!s||!e)return s;const t=e.keyId;return t&&e.isCommonEncryption&&Se(s,["moov","trak"]).forEach(i=>{const r=Se(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=Se(r,["enca"]);const d=l.length>0;d||(l=Se(r,["encv"])),l.forEach(c=>{const h=d?c.subarray(28):c.subarray(78);Se(h,["sinf"]).forEach(f=>{const g=vf(f);if(g){const m=g.subarray(8,24);m.some(p=>p!==0)||(A.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${Gt.hexDump(m)} -> ${Gt.hexDump(t)}`),g.set(t,8))}})})}),s}function vf(s){const e=Se(s,["schm"])[0];if(e){const t=qe(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Se(s,["schi","tenc"])[0]}return null}function n6(s,e){return Se(e,["moof","traf"]).reduce((t,a)=>{const i=Se(a,["tfdt"])[0],o=i[0],r=Se(a,["tfhd"]).reduce((l,d)=>{const c=le(d,4),h=s[c];if(h){let u=le(i,4);if(o===1){if(u===Jn)return A.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;u*=Jn+1,u+=le(i,8)}const f=h.timescale||9e4,g=u/f;if(ae(g)&&(l===null||g<l))return g}return l},null);return r!==null&&ae(r)&&(t===null||r<t)?r:t},null)}function i6(s,e){let t=0,a=0,i=0;const o=Se(s,["moof","traf"]);for(let r=0;r<o.length;r++){const l=o[r],d=Se(l,["tfhd"])[0],c=le(d,4),h=e[c];if(!h)continue;const u=h.default,f=le(d,0)|(u==null?void 0:u.flags);let g=u==null?void 0:u.duration;f&8&&(f&2?g=le(d,12):g=le(d,8));const m=h.timescale||9e4,p=Se(l,["trun"]);for(let y=0;y<p.length;y++){if(t=o6(p[y]),!t&&g){const b=le(p[y],4);t=g*b}h.type===Be.VIDEO?a+=t/m:h.type===Be.AUDIO&&(i+=t/m)}}if(a===0&&i===0){let r=1/0,l=0,d=0;const c=Se(s,["sidx"]);for(let h=0;h<c.length;h++){const u=t6(c[h]);if(u!=null&&u.references){r=Math.min(r,u.earliestPresentationTime/u.timescale);const f=u.references.reduce((g,m)=>g+m.info.duration||0,0);l=Math.max(l,f+u.earliestPresentationTime/u.timescale),d=l-r}}if(d&&ae(d))return d}return a||i}function o6(s){const e=le(s,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let a=0;const i=le(s,4);for(let o=0;o<i;o++){if(e&256){const r=le(s,t);a+=r,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return a}function r6(s,e,t){Se(e,["moof","traf"]).forEach(a=>{Se(a,["tfhd"]).forEach(i=>{const o=le(i,4),r=s[o];if(!r)return;const l=r.timescale||9e4;Se(a,["tfdt"]).forEach(d=>{const c=d[0],h=t*l;if(h){let u=le(d,4);if(c===0)u-=h,u=Math.max(u,0),ll(d,4,u);else{u*=Math.pow(2,32),u+=le(d,8),u-=h,u=Math.max(u,0);const f=Math.floor(u/(Jn+1)),g=Math.floor(u%(Jn+1));ll(d,4,f),ll(d,8,g)}}})})})}function l6(s){const e={valid:null,remainder:null},t=Se(s,["moof"]);if(t.length<2)return e.remainder=s,e;const a=t[t.length-1];return e.valid=vs(s,0,a.byteOffset-8),e.remainder=vs(s,a.byteOffset-8),e}function Et(s,e){const t=new Uint8Array(s.length+e.length);return t.set(s),t.set(e,s.length),t}function Af(s,e){const t=[],a=e.samples,i=e.timescale,o=e.id;let r=!1;return Se(a,["moof"]).map(d=>{const c=d.byteOffset-8;Se(d,["traf"]).map(u=>{const f=Se(u,["tfdt"]).map(g=>{const m=g[0];let p=le(g,4);return m===1&&(p*=Math.pow(2,32),p+=le(g,8)),p/i})[0];return f!==void 0&&(s=f),Se(u,["tfhd"]).map(g=>{const m=le(g,4),p=le(g,0)&16777215,y=(p&1)!==0,b=(p&2)!==0,S=(p&8)!==0;let w=0;const x=(p&16)!==0;let E=0;const v=(p&32)!==0;let T=8;m===o&&(y&&(T+=8),b&&(T+=4),S&&(w=le(g,T),T+=4),x&&(E=le(g,T),T+=4),v&&(T+=4),e.type==="video"&&(r=c6(e.codec)),Se(u,["trun"]).map(R=>{const L=R[0],B=le(R,0)&16777215,M=(B&1)!==0;let W=0;const j=(B&4)!==0,se=(B&256)!==0;let oe=0;const ne=(B&512)!==0;let de=0;const he=(B&1024)!==0,J=(B&2048)!==0;let K=0;const ue=le(R,4);let Y=8;M&&(W=le(R,Y),Y+=4),j&&(Y+=4);let X=W+c;for(let re=0;re<ue;re++){if(se?(oe=le(R,Y),Y+=4):oe=w,ne?(de=le(R,Y),Y+=4):de=E,he&&(Y+=4),J&&(L===0?K=le(R,Y):K=Cf(R,Y),Y+=4),e.type===Be.VIDEO){let ye=0;for(;ye<de;){const xe=le(a,X);if(X+=4,d6(r,a[X])){const ee=a.subarray(X,X+xe);Lf(ee,r?2:1,s+K/i,t)}X+=xe,ye+=xe+4}}s+=oe/i}}))})})}),t}function c6(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 d6(s,e){if(s){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Lf(s,e,t,a){const i=If(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=Ef(i,h);if(h+=2,f===49){const g=le(i,h);if(h+=4,g===1195456820){const m=i[h++];if(m===3){const p=i[h++],y=31&p,b=64&p,S=b?2+y*3:0,w=new Uint8Array(S);if(b){w[0]=p;for(let x=1;x<S;x++)w[x]=i[h++]}a.push({type:m,payloadType:r,pts:t,bytes:w})}}}}}else if(r===5&&l>16){const u=[];for(let m=0;m<16;m++){const p=i[h++].toString(16);u.push(p.length==1?"0"+p:p),(m===3||m===5||m===7||m===9)&&u.push("-")}const f=l-16,g=new Uint8Array(f);for(let m=0;m<f;m++)g[m]=i[h++];a.push({payloadType:r,pts:t,uuid:u.join(""),userData:Ut(g),userDataBytes:g})}}}function If(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(;qe(s.subarray(c,c+1))!=="\0";)t+=qe(s.subarray(c,c+1)),c+=1;for(t+=qe(s.subarray(c,c+1)),c+=1;qe(s.subarray(c,c+1))!=="\0";)a+=qe(s.subarray(c,c+1)),c+=1;a+=qe(s.subarray(c,c+1)),c+=1,i=le(s,12),o=le(s,16),l=le(s,20),d=le(s,24),c=28}else if(e===1){c+=4,i=le(s,c),c+=4;const u=le(s,c);c+=4;const f=le(s,c);for(c+=4,r=2**32*u+f,L3(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=le(s,c),c+=4,d=le(s,c),c+=4;qe(s.subarray(c,c+1))!=="\0";)t+=qe(s.subarray(c,c+1)),c+=1;for(t+=qe(s.subarray(c,c+1)),c+=1;qe(s.subarray(c,c+1))!=="\0";)a+=qe(s.subarray(c,c+1)),c+=1;a+=qe(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 u6(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 m6(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),u6([112,115,115,104],new Uint8Array([a,0,0,0]),s,o,i,r,t||new Uint8Array)}function f6(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=p6(i);e.push(o),a+=o.size}}return e}function p6(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=Gt.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 Zn={};class Ba{static clearKeyUriToKeyIdMap(){Zn={}}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 yt.FAIRPLAY:case yt.WIDEVINE:case yt.PLAYREADY:case yt.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=g6(e);return new Ba(this.method,this.uri,"identity",this.keyFormatVersions,a)}const t=U3(this.uri);if(t)switch(this.keyFormat){case yt.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case yt.PLAYREADY:{const a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=m6(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=sl(h).subarray(0,16);z3(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=Zn[this.uri];if(!a){const i=Object.keys(Zn).length%Number.MAX_SAFE_INTEGER;a=new Uint8Array(16),new DataView(a.buffer,12,4).setUint32(0,i),Zn[this.uri]=a}this.keyId=a}return this}}function g6(s){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=s>>8*(15-t)&255;return e}const Rf=/\{\$([a-zA-Z0-9-_]+)\}/g;function Bf(s){return Rf.test(s)}function bt(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]=dl(s,o))}}function dl(s,e){if(s.variableList!==null||s.hasVariableRefs){const t=s.variableList;return e.replace(Rf,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 Nf(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 y6(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 As(s=!0){return typeof self>"u"?void 0:(s||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function b6(s){return typeof self<"u"&&s===self.ManagedMediaSource}const Qn={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 S6(s,e){const t=Qn[e];return!!t&&!!t[s.slice(0,4)]}function hl(s,e,t=!0){return!s.split(",").some(a=>!Df(a,e,t))}function Df(s,e,t=!0){var a;const i=As(t);return(a=i==null?void 0:i.isTypeSupported(Na(s,e)))!=null?a:!1}function Na(s,e){return`${e}/mp4;codecs="${s}"`}function Pf(s){if(s){const e=s.substring(0,4);return Qn.video[e]}return 2}function ei(s){return s.split(",").reduce((e,t)=>{const a=Qn.video[t];return a?(a*2+e)/(e?3:2):(Qn.audio[t]+e)/(e?2:1)},0)}const ul={};function _6(s,e=!0){if(ul[s])return ul[s];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[s];for(let a=0;a<t.length;a++)if(Df(t[a],"audio",e))return ul[s]=t[a],t[a];return s}const w6=/flac|opus/i;function ti(s,e=!0){return s.replace(w6,t=>_6(t.toLowerCase(),e))}function Of(s,e){return s&&s!=="mp4a"?s:e&&e.split(",")[0]}function k6(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 Ff=/#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,Mf=/#EXT-X-MEDIA:(.*)/g,E6=/^#EXT(?:INF|-X-TARGETDURATION):/m,Vf=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"),T6=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 Ht{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 Qr.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return E6.test(e)}static parseMasterPlaylist(e,t){const a=Bf(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:a},o=[];Ff.lastIndex=0;let r;for(;(r=Ff.exec(e))!=null;)if(r[1]){var l;const c=new Me(r[1]);bt(i,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const h=dl(i,r[2]),u={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ht.resolve(h,t)},f=c.decimalResolution("RESOLUTION");f&&(u.width=f.width,u.height=f.height),C6(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 Me(h);bt(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=$f(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 Me(h);bt(i,u,["NAME","VALUE","QUERYPARAM"]),Nf(i,u,t)}break}case"CONTENT-STEERING":{const u=new Me(h);bt(i,u,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:Ht.resolve(u["SERVER-URI"],t),pathwayId:u["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=zf(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(Mf.lastIndex=0;(i=Mf.exec(e))!==null;){const c=new Me(i[1]),h=c.TYPE;if(h){const u=l[h],f=o[h]||[];o[h]=f,bt(a,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const g=c.LANGUAGE,m=c["ASSOC-LANGUAGE"],p=c.CHANNELS,y=c.CHARACTERISTICS,b=c["INSTREAM-ID"],S={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||g||"",type:h,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:g,url:c.URI?Ht.resolve(c.URI,t):""};if(m&&(S.assocLang=m),p&&(S.channels=p),y&&(S.characteristics=y),b&&(S.instreamId=b),u!=null&&u.length){const w=Ht.findGroup(u,S.groupId)||u[0];Uf(S,w,"audioCodec"),Uf(S,w,"textCodec")}f.push(S)}}return o}static parseLevelPlaylist(e,t,a,i,o,r){const l=new V3(t),d=l.fragments;let c=null,h=0,u=0,f=0,g=0,m=null,p=new tl(i,t),y,b,S,w=-1,x=!1,E=null;for(Vf.lastIndex=0,l.m3u8=e,l.hasVariableRefs=Bf(e);(y=Vf.exec(e))!==null;){x&&(x=!1,p=new tl(i,t),p.start=f,p.sn=h,p.cc=g,p.level=a,c&&(p.initSegment=c,p.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,E&&(p.setByteRange(E),E=null)));const L=y[1];if(L){p.duration=parseFloat(L);const B=(" "+y[2]).slice(1);p.title=B||null,p.tagList.push(B?["INF",L,B]:["INF",L])}else if(y[3]){if(ae(p.duration)){p.start=f,S&&Hf(p,S,l),p.sn=h,p.level=a,p.cc=g,d.push(p);const B=(" "+y[3]).slice(1);p.relurl=dl(l,B),Gf(p,m),m=p,f+=p.duration,h++,u=0,x=!0}}else if(y[4]){const B=(" "+y[4]).slice(1);m?p.setByteRange(B,m):p.setByteRange(B)}else if(y[5])p.rawProgramDateTime=(" "+y[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),w===-1&&(w=d.length);else{if(y=y[0].match(T6),!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 B=(" "+y[b]).slice(1),M=(" "+y[b+1]).slice(1),W=y[b+2]?(" "+y[b+2]).slice(1):"";switch(B){case"PLAYLIST-TYPE":l.type=M.toUpperCase();break;case"MEDIA-SEQUENCE":h=l.startSN=parseInt(M);break;case"SKIP":{const j=new Me(M);bt(l,j,["RECENTLY-REMOVED-DATERANGES"]);const se=j.decimalInteger("SKIPPED-SEGMENTS");if(ae(se)){l.skippedSegments=se;for(let ne=se;ne--;)d.unshift(null);h+=se}const oe=j.enumeratedString("RECENTLY-REMOVED-DATERANGES");oe&&(l.recentlyRemovedDateranges=oe.split(" "));break}case"TARGETDURATION":l.targetduration=Math.max(parseInt(M),1);break;case"VERSION":l.version=parseInt(M);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":l.live=!1;break;case"#":(M||W)&&p.tagList.push(W?[M,W]:[M]);break;case"DISCONTINUITY":g++,p.tagList.push(["DIS"]);break;case"GAP":p.gap=!0,p.tagList.push([B]);break;case"BITRATE":p.tagList.push([B,M]);break;case"DATERANGE":{const j=new Me(M);bt(l,j,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),bt(l,j,j.clientAttrs);const se=new mf(j,l.dateRanges[j.ID]);se.isValid||l.skippedSegments?l.dateRanges[se.id]=se:A.warn(`Ignoring invalid DATERANGE tag: "${M}"`),p.tagList.push(["EXT-X-DATERANGE",M]);break}case"DEFINE":{{const j=new Me(M);bt(l,j,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in j?y6(l,j,r):Nf(l,j,t)}break}case"DISCONTINUITY-SEQUENCE":g=parseInt(M);break;case"KEY":{const j=$f(M,t,l);if(j.isSupported()){if(j.method==="NONE"){S=void 0;break}S||(S={}),S[j.keyFormat]&&(S=je({},S)),S[j.keyFormat]=j}else A.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${M}"`);break}case"START":l.startTimeOffset=zf(M);break;case"MAP":{const j=new Me(M);if(bt(l,j,["BYTERANGE","URI"]),p.duration){const se=new tl(i,t);jf(se,j,a,S),c=se,p.initSegment=c,c.rawProgramDateTime&&!p.rawProgramDateTime&&(p.rawProgramDateTime=c.rawProgramDateTime)}else{const se=p.byteRangeEndOffset;if(se){const oe=p.byteRangeStartOffset;E=`${se-oe}@${oe}`}else E=null;jf(p,j,a,S),c=p,x=!0}break}case"SERVER-CONTROL":{const j=new Me(M);l.canBlockReload=j.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=j.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&j.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=j.optionalFloat("PART-HOLD-BACK",0),l.holdBack=j.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const j=new Me(M);l.partTarget=j.decimalFloatingPoint("PART-TARGET");break}case"PART":{let j=l.partList;j||(j=l.partList=[]);const se=u>0?j[j.length-1]:void 0,oe=u++,ne=new Me(M);bt(l,ne,["BYTERANGE","URI"]);const de=new F3(ne,p,t,oe,se);j.push(de),p.duration+=de.duration;break}case"PRELOAD-HINT":{const j=new Me(M);bt(l,j,["URI"]),l.preloadHint=j;break}case"RENDITION-REPORT":{const j=new Me(M);bt(l,j,["URI"]),l.renditionReports=l.renditionReports||[],l.renditionReports.push(j);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&&(Gf(p,m),p.cc=g,l.fragmentHint=p,S&&Hf(p,S,l));const v=d.length,T=d[0],R=d[v-1];if(f+=l.skippedSegments*l.targetduration,f>0&&v&&R){l.averagetargetduration=f/v;const L=R.sn;l.endSN=L!=="initSegment"?L:0,l.live||(R.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=g,w>0&&x6(d,w),l}}function $f(s,e,t){var a,i;const o=new Me(s);bt(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?Ht.resolve(l,e):"",f=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ba(r,u,h,f,d)}function zf(s){const t=new Me(s).decimalFloatingPoint("TIME-OFFSET");return ae(t)?t:null}function C6(s,e){let t=(s||"").split(/[ ,]+/).filter(a=>a);["video","audio","text"].forEach(a=>{const i=t.filter(o=>S6(o,a));i.length&&(e[`${a}Codec`]=i.join(","),t=t.filter(o=>i.indexOf(o)===-1))}),e.unknownCodecs=t}function Uf(s,e,t){const a=e[t];a&&(s[t]=a)}function x6(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 Gf(s,e){s.rawProgramDateTime?s.programDateTime=Date.parse(s.rawProgramDateTime):e!=null&&e.programDateTime&&(s.programDateTime=e.endProgramDateTime),ae(s.programDateTime)||(s.programDateTime=null,s.rawProgramDateTime=null)}function jf(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 Hf(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 ve={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ce={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Wf(s){const{type:e}=s;switch(e){case ve.AUDIO_TRACK:return ce.AUDIO;case ve.SUBTITLE_TRACK:return ce.SUBTITLE;default:return ce.MAIN}}function ml(s,e){let t=s.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class v6{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(_.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:ve.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:ve.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:ve.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:ve.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===ve.MANIFEST?o=a.manifestLoadPolicy.default:o=je({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),ae((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ve.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ve.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ve.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=je({},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 g=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(),Ht.isMediaPlaylist(m)?this.handleTrackOrLevelPlaylist(c,h,u,f||null,g):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=ml(e,a),d=Ht.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:g,variableList:m}=d;this.variableList=m;const{AUDIO:p=[],SUBTITLES:y,"CLOSED-CAPTIONS":b}=Ht.parseMasterPlaylistMedia(r,l,d);p.length&&!p.some(w=>!w.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"),p.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Me({}),bitrate:0,url:""})),o.trigger(_.MANIFEST_LOADED,{levels:h,audioTracks:p,subtitles:y,captions:b,contentSteering:c,url:l,stats:t,networkDetails:i,sessionData:u,sessionKeys:f,startTimeOffset:g,variableList:m})}handleTrackOrLevelPlaylist(e,t,a,i,o){const r=this.hls,{id:l,level:d,type:c}=a,h=ml(e,a),u=0,f=ae(d)?d:ae(l)?l:0,g=Wf(a),m=Ht.parseLevelPlaylist(e.data,h,f,g,u,this.variableList);if(c===ve.MANIFEST){const p={attrs:new Me({}),bitrate:0,details:m,name:"",url:h};r.trigger(_.MANIFEST_LOADED,{levels:[p],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(_.ERROR,{type:pe.NETWORK_ERROR,details:N.MANIFEST_PARSING_ERROR,fatal:t.type===ve.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===ve.LEVEL?r+=`: ${e.level} id: ${e.id}`:(e.type===ve.AUDIO_TRACK||e.type===ve.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 ve.MANIFEST:d=a?N.MANIFEST_LOAD_TIMEOUT:N.MANIFEST_LOAD_ERROR,c=!0;break;case ve.LEVEL:d=a?N.LEVEL_LOAD_TIMEOUT:N.LEVEL_LOAD_ERROR,c=!1;break;case ve.AUDIO_TRACK:d=a?N.AUDIO_TRACK_LOAD_TIMEOUT:N.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ve.SUBTITLE_TRACK:d=a?N.SUBTITLE_TRACK_LOAD_TIMEOUT:N.SUBTITLE_LOAD_ERROR,c=!1;break}h&&this.resetInternalLoader(e.type);const u={type:pe.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=et({url:f,data:void 0},i)}this.hls.trigger(_.ERROR,u)}handlePlaylistLoaded(e,t,a,i,o,r){const l=this.hls,{type:d,level:c,id:h,groupId:u,deliveryDirectives:f}=i,g=ml(t,i),m=Wf(i),p=typeof i.level=="number"&&m===ce.MAIN?c:void 0;if(!e.fragments.length){const b=new Error("No Segments found in Playlist");l.trigger(_.ERROR,{type:pe.NETWORK_ERROR,details:N.LEVEL_EMPTY_ERROR,fatal:!1,url:g,error:b,reason:b.message,response:t,context:i,level:p,parent:m,networkDetails:o,stats:a});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const y=e.playlistParsingError;if(y){l.trigger(_.ERROR,{type:pe.NETWORK_ERROR,details:N.LEVEL_PARSING_ERROR,fatal:!1,url:g,error:y,reason:y.message,response:t,context:i,level:p,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 ve.MANIFEST:case ve.LEVEL:l.trigger(_.LEVEL_LOADED,{details:e,level:p||0,id:h||0,stats:a,networkDetails:o,deliveryDirectives:f});break;case ve.AUDIO_TRACK:l.trigger(_.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break;case ve.SUBTITLE_TRACK:l.trigger(_.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:u||"",stats:a,networkDetails:o,deliveryDirectives:f});break}}}function Kf(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 qf(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 Hs(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 fl(s,e,t,a){const i=s.mode;if(i==="disabled"&&(s.mode="hidden"),s.cues&&s.cues.length>0){const o=L6(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 A6(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 L6(s,e,t){const a=[],i=A6(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 si(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 Ot={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const I6=.25;function pl(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function Yf(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?et({type:i},a):a))}return o}const ai=(()=>{const s=pl();try{s&&new s(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function gl(s,e){return s.getTime()/1e3-e}function R6(s){return Uint8Array.from(s.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class B6{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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Hs(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 Kf(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=pl();if(r)for(let l=0;l<o.length;l++){const d=o[l].type;if(d===Ot.emsg&&!a||!i)continue;const c=wf(o[l].data);if(c){const h=o[l].pts;let u=h+o[l].duration;u>ai&&(u=ai),u-h<=0&&(u=h+I6);for(let g=0;g<c.length;g++){const m=c[g];if(!_f(m)){this.updateId3CueEnds(h,d);const p=Yf(r,h,u,m,d);p&&this.id3Track.addCue(p)}}}}}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===ai&&(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===Ot.audioId3&&d:i==="video"?c=h=>h.type===Ot.emsg&&l:c=h=>h.type===Ot.audioId3&&d||h.type===Ot.emsg&&l,fl(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(g=>{i.removeCue(a[f].cues[g])}),delete a[f]}}const l=t.fragments[t.fragments.length-1];if(r.length===0||!ae(l==null?void 0:l.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const d=l.programDateTime/1e3-l.start,c=pl();for(let h=0;h<r.length;h++){const u=r[h],f=o[u],g=gl(f.startDate,d),m=a[u],p=(m==null?void 0:m.cues)||{};let y=(m==null?void 0:m.durationKnown)||!1,b=ai;const S=f.endDate;if(S)b=gl(S,d),y=!0;else if(f.endOnNext&&!y){const x=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);x&&(b=gl(x.startDate,d),y=!0)}const w=Object.keys(f.attr);for(let x=0;x<w.length;x++){const E=w[x];if(!P3(E))continue;const v=p[E];if(v)y&&!m.durationKnown&&(v.endTime=b);else if(c){let T=f.attr[E];O3(E)&&(T=R6(T));const R=Yf(c,g,b,{key:E,data:T},Ot.dateRange);R&&(R.id=u,this.id3Track.addCue(R),p[E]=R)}}a[u]={cues:p,dateRange:f,durationKnown:y}}}}class N6{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(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(_.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(_.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 yl=["NONE","TYPE-0","TYPE-1",null];function D6(s){return yl.indexOf(s)>-1}const ni=["SDR","PQ","HLG"];function P6(s){return!!s&&ni.indexOf(s)>-1}var ii={No:"",Yes:"YES",v2:"v2"};function Jf(s){const{canSkipUntil:e,canSkipDateRanges:t,age:a}=s,i=a<e/2;return e&&i?t?ii.v2:ii.Yes:ii.No}class Xf{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 Ws{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 Zf(this._audioGroups,e)}hasSubtitleGroup(e){return Zf(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 Zf(s,e){return!e||!s?!1:s.indexOf(e)!==-1}function bl(s,e){const t=e.startPTS;if(ae(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 Qf(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(ae(c)){const y=Math.abs(c-t);ae(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 g;const m=f-s.startSN,p=s.fragments;for(p[m]=e,g=m;g>0;g--)bl(p[g],p[g-1]);for(g=m;g<p.length-1;g++)bl(p[g],p[g+1]);return s.fragmentHint&&bl(p[p.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,u}function O6(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(V6(s,e,(d,c)=>{d.relurl&&(i=d.cc-c.cc),ae(d.startPTS)&&ae(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=F6(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),M6(s.partList,e.partList,(d,c)=>{c.elementaryStreams=d.elementaryStreams,c.stats=d.stats}),o?Qf(e,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):ep(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 F6(s,e,t){const a=je({},s);return t&&t.forEach(i=>{delete a[i]}),Object.keys(e).forEach(i=>{const o=new mf(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 M6(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 V6(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 ep(s,e){const t=e.startSN+e.skippedSegments-s.startSN,a=s.fragments;t<0||t>=a.length||Sl(e,a[t].start)}function Sl(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 $6(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 z6(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 tp(s,e,t){var a;return s!=null&&s.details?sp((a=s.details)==null?void 0:a.partList,e,t):null}function sp(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 ap(s){s.forEach((e,t)=>{const{details:a}=e;a!=null&&a.fragments&&a.fragments.forEach(i=>{i.level=t})})}function oi(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 np(s,e){const t=oi(e);return s.default[`${t?"timeout":"error"}Retry`]}function _l(s,e){const t=s.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*s.retryDelayMs,s.maxRetryDelayMs)}function ip(s){return et(et({},s),{errorRetry:null,timeoutRetry:null})}function ri(s,e,t,a){if(!s)return!1;const i=a==null?void 0:a.code,o=e<s.maxNumRetry&&(U6(i)||!!t);return s.shouldRetry?s.shouldRetry(s,e,t,a,o):o}function U6(s){return s===0&&navigator.onLine===!1||!!s&&(s<400||s>499)}const op={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 G6(s,e,t){if(e===null||!Array.isArray(s)||!s.length||!ae(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(H6(e,t,r))return r}return null}function li(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)&&wl(t,a,o)===0||j6(o,s,Math.min(i,a))))return o;const r=op.search(e,wl.bind(null,t,a));return r&&(r!==s||!o)?r:o}function j6(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 wl(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 H6(s,e,t){const a=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-a>s}function W6(s,e){return op.search(s,t=>t.cc<e?1:t.cc>e?-1:0)}var rt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ft={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class K6{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(_.ERROR,this.onError,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.ERROR,this.onError,this),e.off(_.ERROR,this.onErrorOut,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.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)===ce.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:rt.DoNothing,flags:Ft.None};return}case N.FRAG_GAP:case N.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=rt.SendAlternateToPenaltyBox;return}case N.LEVEL_EMPTY_ERROR:case N.LEVEL_PARSING_ERROR:{var l,d;const c=t.parent===ce.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===ve.AUDIO_TRACK&&c.hasAudioGroup(r.groupId)||r.type===ve.SUBTITLE_TRACK&&c.hasSubtitleGroup(r.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o.loadLevel),t.errorAction.action=rt.SendAlternateToPenaltyBox,t.errorAction.flags=Ft.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:rt.SendAlternateToPenaltyBox,flags:Ft.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:rt.DoNothing,flags:Ft.None};return}t.type===pe.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=np(a.config.playlistLoadPolicy,e),o=this.playlistError++;if(ri(i,o,oi(e),e.response))return{action:rt.RetryRequest,flags:Ft.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=np(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++,ri(l,d,oi(e),e.response)))return{action:rt.RetryRequest,flags:Ft.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:g,maxAutoLevel:m}=a;a.autoLevelEnabled||(a.loadLevel=-1);const p=(o=e.frag)==null?void 0:o.type,b=(p===ce.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),w=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:x,groupId:E}=(r=e.context)!=null?r:{};for(let v=u.length;v--;){const T=(v+f)%u.length;if(T!==f&&T>=g&&T<=m&&u[T].loadError===0){var l,d;const R=u[T];if(c===N.FRAG_GAP&&p===ce.MAIN&&e.frag){const L=u[T].details;if(L){const B=li(e.frag,L.fragments,e.frag.start);if(B!=null&&B.gap)continue}}else{if(x===ve.AUDIO_TRACK&&R.hasAudioGroup(E)||x===ve.SUBTITLE_TRACK&&R.hasSubtitleGroup(E))continue;if(p===ce.AUDIO&&(l=i.audioGroups)!=null&&l.some(L=>R.hasAudioGroup(L))||p===ce.SUBTITLE&&(d=i.subtitleGroups)!=null&&d.some(L=>R.hasSubtitleGroup(L))||b&&i.audioCodec===R.audioCodec||!b&&i.audioCodec!==R.audioCodec||w&&i.codecSet===R.codecSet)continue}h=T;break}}if(h>-1&&a.loadLevel!==h)return e.levelRetry=!0,this.playlistError=0,{action:rt.SendAlternateToPenaltyBox,flags:Ft.None,nextAutoLevel:h}}return{action:rt.SendAlternateToPenaltyBox,flags:Ft.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var a;switch((a=t.errorAction)==null?void 0:a.action){case rt.DoNothing:break;case rt.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 Ft.None:this.switchLevel(e,r);break;case Ft.MoveAllAlternatesMatchingHDCP:o&&(t.maxHdcpLevel=yl[yl.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 kl{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&&Jf(a);return new Xf(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&&O6(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,w=i.lastPartIndex,x=w!==-1,E=b===S,v=y?0:w;x?(c=E?S+1:b,h=E?v:w+1):c=S+1;const T=i.age,R=T+i.ageHeader;let L=Math.min(R-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 B=Math.floor(L/i.targetduration);if(c+=B,h!==void 0){const M=Math.round(L%i.targetduration/i.partTarget);h+=M}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${T.toFixed(2)}s goal: ${L} skip sn ${B} 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,g=(i.edge-f)*1e3,m=$6(i,g);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 p=this.requestScheduled-r;p=Math.max(0,p),this.log(`reload live playlist ${e} in ${Math.round(p)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(d),p)}else this.clearTimer()}getDeliveryDirectives(e,t,a,i){let o=Jf(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(a=t.msn,i=t.part,o=ii.No),new Xf(a,i,o)}checkRetry(e){const t=e.details,a=oi(e),i=e.errorAction,{action:o,retryCount:r=0,retryConfig:l}=i||{},d=!!i&&!!l&&(o===rt.RetryRequest||!i.resolved&&o===rt.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=_l(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 Ks{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 q6{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 Ks(e),this.fast_=new Ks(t),this.defaultTTFB_=i,this.ttfb_=new Ks(e)}update(e,t){const{slow_:a,fast_:i,ttfb_:o}=this;a.halfLife!==e&&(this.slow_=new Ks(e,a.getEstimate(),a.getTotalWeight())),i.halfLife!==t&&(this.fast_=new Ks(t,i.getEstimate(),i.getTotalWeight())),o.halfLife!==e&&(this.ttfb_=new Ks(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 rp={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},lp={};function Y6(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 g=e.groups[f];if(!g)throw new Error(`Audio track group ${f} not found`);Object.keys(g.channels).forEach(m=>{u[m]=(u[m]||0)+g.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&&ae(c)&&Object.keys(h).some(u=>parseInt(u)>c)}function J6(s,e,t){const a=s.videoCodec,i=s.audioCodec;if(!a||!i||!t)return Promise.resolve(rp);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:et(et({},o),{},{contentType:Na(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);ae(f)&&f>2&&l.push.apply(l,i.split(",").map(g=>({type:"media-source",audio:{contentType:Na(g,"audio"),channels:""+f}})))}}))}),Promise.all(l.map(d=>{const c=X6(d);return lp[c]||(lp[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 X6(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 Z6(){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 Q6(s,e){let t=!1,a=[];return s&&(t=s!=="SDR",a=[s]),e&&(a=e.allowedVideoRanges||ni.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Z6(),t?a=a.filter(i=>i!=="SDR"):a=["SDR"]),{preferHDR:t,allowedVideoRanges:a}}function eN(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,g=1/0,m=0,p=[];const{preferHDR:y,allowedVideoRanges:b}=Q6(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),g=Math.min(g,v.minBitrate);const T=b.filter(R=>v.videoRanges[R]>0);T.length>0&&(h=!0,p=T)}u=ae(u)?u:0,f=ae(f)?f:0;const S=Math.max(1080,u),w=Math.max(30,f);return g=ae(g)?g:t,t=Math.max(g,t),h||(e=void 0,p=[]),{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>w?(Xt(v,`min framerate of ${T.minFramerate} > maximum of ${w}`),E):p.some(R=>T.videoRanges[R]>0)?T.maxScore<m?(Xt(v,`max score of ${T.maxScore} < selected max of ${m}`),E):E&&(ei(v)>=ei(E)||T.fragmentError>s[E].fragmentError)?E:(m=T.maxScore,v):(Xt(v,`no variants with VIDEO-RANGE of ${JSON.stringify(p)} found`),E)},void 0),videoRanges:p,preferHDR:y,minFramerate:f,minBitrate:g}}function Xt(s,e){A.log(`[abr] start candidates with "${s}" ignored because ${e}`)}function tN(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 sN(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 Wt(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(qs(s,i,t))return a}return-1}function qs(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||aN(l,e.characteristics))&&(t===void 0||t(s,e))}function aN(s,e=""){const t=s.split(","),a=e.split(",");return t.length===a.length&&!t.some(i=>a.indexOf(i)===-1)}function Ys(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 nN(s,e,t,a,i){const o=e[a],l=e.reduce((f,g,m)=>{const p=g.uri;return(f[p]||(f[p]=[])).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=cp(e,a,f=>{if(f.videoRange!==d||f.frameRate!==c||f.codecSet.substring(0,4)!==h)return!1;const g=f.audioGroups,m=t.filter(p=>!g||g.indexOf(p.groupId)!==-1);return Wt(s,m,i)>-1});return u>-1?u:cp(e,a,f=>{const g=f.audioGroups,m=t.filter(p=>!g||g.indexOf(p.groupId)!==-1);return Wt(s,m,i)>-1})}function cp(s,e,t){for(let a=e;a>-1;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 iN{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 g=this.bwEstimator.getEstimateTTFB(),m=Math.abs(r.playbackRate);if(h<=Math.max(g,1e3*(c/(m*2))))return;const p=f.len/m,y=d.loading.first?d.loading.first-d.loading.start:-1,b=d.loaded&&y>-1,S=this.getBwEstimate(),w=i.levels,x=w[t.level],E=d.total||Math.max(d.loaded,Math.round(c*x.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,R=T?(E-d.loaded)/T:E*8/S+g/1e3;if(R<=p)return;const L=T?T*8:S;let B=Number.POSITIVE_INFINITY,M;for(M=t.level-1;M>u;M--){const j=w[M].maxBitrate;if(B=this.getTimeToLoadFrag(g/1e3,L,c*j,!w[M].details),B<p)break}if(B>=R||B>c*10)return;i.nextLoadLevel=i.nextAutoLevel=M,b?this.bwEstimator.sample(h-Math.min(g,y),d.loaded):this.bwEstimator.sampleTTFB(h);const W=w[M].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>W&&this.resetEstimator(W),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: ${p.toFixed(3)} s
|
|
44
44
|
Estimated load time for current fragment: ${R.toFixed(3)} s
|
|
45
45
|
Estimated load time for down switch fragment: ${B.toFixed(3)} s
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
`),c=[],h=e?WN(e.baseTime,e.timescale):0;let u="00:00.000",f=0,g=0,m,p=!0;l.oncue=function(y){const b=t[a];let S=t.ccOffset;const w=(f-h)/9e4;if(b!=null&&b.new&&(g!==void 0?S=t.ccOffset=b.start:AD(t,a,w)),w){if(!e){m=new Error("Missing initPTS for VTT MPEGTS");return}S=w-t.presentationOffset}const x=y.endTime-y.startTime,E=Tt((y.startTime+S-g)*9e4,i*9e4)/9e4;y.startTime=Math.max(E,0),y.endTime=Math.max(E+x,0);const v=y.text.trim();y.text=decodeURIComponent(encodeURIComponent(v)),y.id||(y.id=zl(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(p)if(Vl(y,"X-TIMESTAMP-MAP=")){p=!1,y.slice(16).split(",").forEach(b=>{Vl(b,"LOCAL:")?u=b.slice(6):Vl(b,"MPEGTS:")&&(f=parseInt(b.slice(7)))});try{g=vD(u)/1e3}catch(b){m=b}return}else y===""&&(p=!1);l.parse(y+`
|
|
65
65
|
`)}),l.flush()}const Ul="stpp.ttml.im1t",Jp=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xp=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ID={left:"start",center:"center",right:"end",start:"start",end:"end"};function Zp(s,e,t,a){const i=Se(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=HN(e.baseTime,1,e.timescale);try{o.forEach(l=>t(RD(l,r)))}catch(l){a(l)}}function RD(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=Qp(Gl(i,"styling","style")),c=Qp(Gl(i,"layout","region")),h=Gl(i,"body","[begin]");return[].map.call(h,u=>{const f=eg(u,l);if(!f||!u.hasAttribute("begin"))return null;const g=Hl(u.getAttribute("begin"),r),m=Hl(u.getAttribute("dur"),r);let p=Hl(u.getAttribute("end"),r);if(g===null)throw tg(u);if(p===null){if(m===null)throw tg(u);p=g+m}const y=new Fl(g-e,p-e,f);y.id=zl(y.startTime,y.endTime,y.text);const b=c[u.getAttribute("region")],S=d[u.getAttribute("style")],w=BD(b,S,d),{textAlign:x}=w;if(x){const E=ID[x];E&&(y.lineAlign=E),y.align=x}return je(y,w),y}).filter(u=>u!==null)}function Gl(s,e,t){const a=s.getElementsByTagName(e)[0];return a?[].slice.call(a.querySelectorAll(t)):[]}function Qp(s){return s.reduce((e,t)=>{const a=t.getAttribute("xml:id");return a&&(e[a]=t),e},{})}function eg(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?eg(a,e):e?t+a.textContent.trim().replace(/\s+/g," "):t+a.textContent},"")}function BD(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=jl(e,a,d)||jl(s,a,d)||jl(i,a,d);return c&&(l[d]=c),l},{})}function jl(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function tg(s){return new Error(`Could not parse ttml timestamp ${s}`)}function Hl(s,e){if(!s)return null;let t=Kp(s);return t===null&&(Jp.test(s)?t=ND(s,e):Xp.test(s)&&(t=DD(s,e))),t}function ND(s,e){const t=Jp.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 DD(s,e){const t=Xp.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=ng(),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(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(_.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 _i(this,"textTrack1"),t=new _i(this,"textTrack2"),a=new _i(this,"textTrack3"),i=new _i(this,"textTrack4");this.cea608Parser1=new Wp(1,e,t),this.cea608Parser2=new Wp(3,a,i)}}addCues(e,t,a,i,o){let r=!1;for(let l=o.length;l--;){const d=o[l],c=OD(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(_.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(_.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(ag(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,Hs(a[e]),Kf(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(_.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=>{Hs(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=ng(),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++)Hs(t[a])}onSubtitleTracksUpdated(e,t){const a=t.subtitleTracks||[],i=a.some(o=>o.textCodec===Ul);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(Mp(this.tracks,a)){this.tracks=a;return}if(this.textTracks=[],this.tracks=a,this.config.renderTextTracksNatively){const r=this.media,l=r?si(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]&&ag(l[f],d)){u=l[f],l[f]=null;break}u&&(h=u)}if(h)Hs(h);else{const u=sg(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(_.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===ce.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===ce.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===Ul?this._parseIMSC1(a,i):this._parseVTTs(t)}}else this.hls.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const a=this.hls;Zp(t,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),a.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{A.log(`Failed to parse IMSC1: ${i}`),a.trigger(_.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?Et(a.initSegment.data,new Uint8Array(i)):i;LD(c,this.initPTS[a.cc],this.vttCCs,a.cc,a.start,h=>{this._appendCues(h,a.level),d.trigger(_.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(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:h})})}_fallbackToIMSC1(e,t){const a=this.tracks[e.level];a.textCodec||Zp(t,this.initPTS[e.cc],()=>{a.textCodec=Ul,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=>qf(i,o))}else{const i=this.tracks[t];if(!i)return;const o=i.default?"default":"subtitles"+t;a.trigger(_.CUES_PARSED,{type:"subtitles",cues:e,track:o})}}onFragDecrypted(e,t){const{frag:a}=t;a.type===ce.SUBTITLE&&this.onFragLoaded(_.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===ce.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=>fl(l[d],t,a))}if(this.config.renderTextTracksNatively&&t===0&&i!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>fl(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 sg(s){return s.characteristics&&/transcribes-spoken-dialog/gi.test(s.characteristics)&&/describes-music-and-sound/gi.test(s.characteristics)?"captions":"subtitles"}function ag(s,e){return!!s&&s.kind===sg(e)&&Pl(e,s)}function OD(s,e,t,a){return Math.min(e,a)-Math.max(s,t)}function ng(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class Wl{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(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.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&&ae(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,Wl.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 FD{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(_.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(_.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(_.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(_.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 ki="[eme]";class ea{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=ea.CDMCleanupPromise?[ea.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=A.debug.bind(A,ki),this.log=A.log.bind(A,ki),this.warn=A.warn.bind(A,ki),this.error=A.error.bind(A,ki),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(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:a}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===De.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 Ct?l(u):l(new Ct({type:pe.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 bf===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=G3(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: ${Gt.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 Gt.hexDump(e.keyId)}updateKeySession(e,t){var a;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Gt.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=nl(this.config),o=e.map(pf).filter(r=>!!r&&i.indexOf(r)!==-1);return this.getKeySystemSelectionPromise(o).then(({keySystem:r})=>{const l=yf(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 Ct?this.hls.trigger(_.ERROR,e.data):this.hls.trigger(_.ERROR,{type:pe.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=pf(e.keyFormat),o=i?[i]:nl(this.config);return this.attemptKeySystemAccess(o)}return a}getKeySystemSelectionPromise(e){if(e.length||(e=nl(this.config)),e.length===0)throw new Ct({type:pe.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[De.FAIRPLAY]){const u=qe(new Uint8Array(a));try{const f=sl(JSON.parse(u).sinf),g=vf(new Uint8Array(f));if(!g)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");o=g.subarray(8,24),r=De.FAIRPLAY}catch(f){this.warn(`${i} Failed to parse sinf: ${f}`);return}}else{const u=f6(a),f=u.filter(g=>g.systemId===Ia.WIDEVINE)[0];if(!f){u.length===0||u.some(g=>!g.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${u.map(g=>gf(g.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(r=gf(f.systemId),f.version===0&&f.data){const g=f.data.length-22;o=f.data.subarray(g,g+16)}}if(!r||!o)return;const l=Gt.hexDump(o),{keyIdToKeySessionPromise:d,mediaKeySessions:c}=this;let h=d[l];for(let u=0;u<c.length;u++){const f=c[u],g=f.decryptdata;if(!g.keyId)continue;const m=Gt.hexDump(g.keyId);if(l===m||g.uri.replace(/-/g,"").indexOf(l)!==-1){if(h=d[m],g.pssh)break;delete d[m],g.pssh=new Uint8Array(a),g.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 g;this.throwIfDestroyed();const m=new Ba("ISO-23001-7",l,(g=yf(u))!=null?g:"");return m.pssh=new Uint8Array(a),m.keyId=o,this.attemptSetMediaKeys(u,f).then(()=>{this.throwIfDestroyed();const p=this.createMediaKeySessionContext({decryptdata:m,keySystem:u,mediaKeys:f});return this.generateRequestWithPreferredKeySession(p,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 Dl,u=e._onmessage=m=>{const p=e.mediaKeysSession;if(!p){h.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=m;this.log(`"${y}" message event for session "${p.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===De.FAIRPLAY&&(this.updateKeySession(e,al("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 g=new Promise((m,p)=>{h.on("error",p),h.on("keyStatus",y=>{y.startsWith("usable")?m():y==="output-restricted"?p(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?p(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?p(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 Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:m,fatal:!1},`Error generating key-session request: ${m}`)}).then(()=>g).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: ${Gt.hexDump("buffer"in a?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a))} session keyId: ${Gt.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,g,m,p)=>{r(f.data)},onError:(f,g,m,p)=>{l(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:et({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${o}). Status: ${f.code} (${f.text})`))},onTimeout:(f,g,m)=>{l(new Ct({type:pe.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,g,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 Ct({type:pe.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 Ct({type:pe.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 g=(r=h.querySelector("name"))==null?void 0:r.textContent,m=(l=h.querySelector("value"))==null?void 0:l.textContent;g&&m&&e.setRequestHeader(g,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 al(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 Ct({type:pe.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==De.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={},Ba.clearKeyUriToKeyIdMap();const a=t.length;ea.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}`)})}}}ea.CDMCleanupPromise=void 0;class Ct 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 ht;(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"})(ht||(ht={}));var Kl;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(Kl||(Kl={}));var Is;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Is||(Is={}));const MD={[Is.OBJECT]:["br","d","ot","tb"],[Is.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Is.SESSION]:["cid","pr","sf","sid","st","v"],[Is.STATUS]:["bs","rtp"]};class ta{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(a=>a instanceof ta?a:new ta(a))),this.value=e,this.params=t}}class ig{constructor(e){this.description=void 0,this.description=e}}const VD="Dict";function $D(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 zD(s,e,t,a){return new Error(`failed to ${s} "${$D(e)}" as ${t}`,{cause:a})}const og="Bare Item",UD="Boolean",GD="Byte Sequence",jD="Decimal",HD="Integer";function WD(s){return s<-999999999999999||999999999999999<s}const KD=/[\x00-\x1f\x7f]+/,qD="Token",YD="Key";function qt(s,e,t){return zD("serialize",s,e,t)}function JD(s){if(typeof s!="boolean")throw qt(s,UD);return s?"?1":"?0"}function XD(s){return btoa(String.fromCharCode(...s))}function ZD(s){if(ArrayBuffer.isView(s)===!1)throw qt(s,GD);return`:${XD(s)}:`}function rg(s){if(WD(s))throw qt(s,HD);return s.toString()}function QD(s){return`@${rg(s.getTime()/1e3)}`}function lg(s,e){if(s<0)return-lg(-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 eP(s){const e=lg(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw qt(s,jD);const t=e.toString();return t.includes(".")?t:`${t}.0`}const tP="String";function sP(s){if(KD.test(s))throw qt(s,tP);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function aP(s){return s.description||s.toString().slice(7,-1)}function cg(s){const e=aP(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw qt(e,qD);return e}function ql(s){switch(typeof s){case"number":if(!ae(s))throw qt(s,og);return Number.isInteger(s)?rg(s):eP(s);case"string":return sP(s);case"symbol":return cg(s);case"boolean":return JD(s);case"object":if(s instanceof Date)return QD(s);if(s instanceof Uint8Array)return ZD(s);if(s instanceof ig)return cg(s);default:throw qt(s,og)}}function Yl(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw qt(s,YD);return s}function Jl(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${Yl(e)}`:`;${Yl(e)}=${ql(t)}`).join("")}function dg(s){return s instanceof ta?`${ql(s.value)}${Jl(s.params)}`:ql(s)}function nP(s){return`(${s.value.map(dg).join(" ")})${Jl(s.params)}`}function iP(s,e={whitespace:!0}){if(typeof s!="object")throw qt(s,VD);const t=s instanceof Map?s.entries():Object.entries(s),a=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,o])=>{o instanceof ta||(o=new ta(o));let r=Yl(i);return o.value===!0?r+=Jl(o.params):(r+="=",Array.isArray(o.value)?r+=nP(o):r+=dg(o)),r}).join(`,${a}`)}function oP(s,e){return iP(s,e)}const rP=s=>s==="ot"||s==="sf"||s==="st",lP=s=>typeof s=="number"?ae(s):s!=null&&s!==""&&s!==!1;function cP(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 dP(){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 Ei=s=>Math.round(s),hP=(s,e)=>(e!=null&&e.baseUrl&&(s=cP(s,e.baseUrl)),encodeURIComponent(s)),Ti=s=>Ei(s/100)*100,uP={br:Ei,d:Ei,bl:Ti,dl:Ti,mtp:Ti,nor:hP,rtp:Ti,tb:Ei};function mP(s,e){const t={};if(s==null||typeof s!="object")return t;const a=Object.keys(s).sort(),i=je({},uP,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||lP(l)&&(rP(r)&&typeof l=="string"&&(l=new ig(l)),t[r]=l))}),t}function hg(s,e={}){return s?oP(mP(s,e),je({whitespace:!1},e)):""}function fP(s,e={}){if(!s)return{};const t=Object.entries(s),a=Object.entries(MD).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])||Is.REQUEST;return(d=o[u])!=null||(o[u]={}),o[u][c]=h,o},{});return Object.entries(i).reduce((o,[r,l])=>(o[r]=hg(l,e),o),{})}function pP(s,e,t){return je(s,fP(e,t))}const gP="CMCD";function yP(s,e={}){if(!s)return"";const t=hg(s,e);return`${gP}=${encodeURIComponent(t)}`}const ug=/CMCD=[^&#]+/;function bP(s,e,t){const a=yP(e,t);if(!a)return s;if(ug.test(s))return s.replace(ug,a);const i=s.includes("?")?"&":"?";return`${s}${i}${a}`}class SP{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:ht.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===ht.VIDEO||l===ht.AUDIO||l==ht.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||dP(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.includeKeys=a.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHED,this.onMediaDetached,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHED,this.onMediaDetached,this),e.off(_.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:Kl.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){je(t,this.createData());const a=t.ot===ht.INIT||t.ot===ht.VIDEO||t.ot===ht.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={}),pP(e.headers,t)):e.url=bP(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return ht.TIMED_TEXT;if(e.sn==="initSegment")return ht.INIT;if(t==="audio")return ht.AUDIO;if(t==="main")return this.hls.audioTracks.length?ht.VIDEO:ht.MUXED}getTopBandwidth(e){let t=0,a;const i=this.hls;if(e===ht.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===ht.AUDIO?this.audioBuffer:this.videoBuffer;return!a||!t?NaN:Pe.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 _P=3e5;class wP{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.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)===rt.SendAlternateToPenaltyBox&&a.flags===Ft.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}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]>_P&&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,ap(t),this.hls.trigger(_.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===ve.AUDIO_TRACK&&i[o].hasAudioGroup(e)||t===ve.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 Me(h.attrs);u["PATHWAY-ID"]=r;const f=u.AUDIO&&`${u.AUDIO}_clone_${r}`,g=u.SUBTITLES&&`${u.SUBTITLES}_clone_${r}`;f&&(a[u.AUDIO]=f,u.AUDIO=f),g&&(i[u.SUBTITLES]=g,u.SUBTITLES=g);const m=fg(h.uri,u["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),p=new Ws({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++)p.addGroupId("audio",`${h.audioGroups[y]}_clone_${r}`);if(h.subtitleGroups)for(let y=1;y<h.subtitleGroups.length;y++)p.addGroupId("text",`${h.subtitleGroups[y]}_clone_${r}`);return p});t.push(...c),mg(this.audioTracks,a,d,r),mg(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,g)=>{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":p,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=m;if(p)try{this.uri=new self.URL(p,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${p}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const S={steeringManifest:m,url:i.toString()};this.hls.trigger(_.STEERING_MANIFEST_LOADED,S),b&&this.updatePathwayPriority(b)},onError:(h,u,f,g)=>{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 p=this.loader;if(typeof(p==null?void 0:p.getResponseHeader)=="function"){const y=p.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 mg(s,e,t,a){s&&Object.keys(e).forEach(i=>{const o=s.filter(r=>r.groupId===i).map(r=>{const l=je({},r);return l.details=void 0,l.attrs=new Me(l.attrs),l.url=l.attrs.URI=fg(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 fg(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 kP=/^age:\s*[\d.]+\s*$/im;class pg{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 qn,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&&ae(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};ri(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(ri(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=_l(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&&kP.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 EP(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const TP=/(\d+)-(\d+)\/(\d+)/;class gg{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||AP,this.controller=new self.AbortController,this.stats=new qn}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=CP(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&&ae(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:g,statusText:m}=u;throw new LP(m||"fetch, bad network response",g,u)}return i.loading.first=f,i.total=vP(u.headers)||i.total,r&&ae(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 g=u[d];g&&(i.loaded=i.total=g);const m={url:f.url,data:u,code:f.status};r&&!ae(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,g=u?u.message:null;a.onError({code:f,text:g},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 pp,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 CP(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(je({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function xP(s){const e=TP.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function vP(s){const e=s.get("Content-Range");if(e){const a=xP(e);if(ae(a))return a}const t=s.get("Content-Length");if(t)return parseInt(t)}function AP(s,e){return new self.Request(s.url,e)}class LP extends Error{constructor(e,t,a){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=a}}const IP=/\s/,RP={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 p=0;p<o.chars.length;p++)IP.test(o.chars[p].uchar)&&l?d++:(c+=o.chars[p].uchar,l=!1);o.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const g=Yp(c.trim()),m=zl(e,t,g);s!=null&&(u=s.cues)!=null&&u.getCueById(m)||(r=new h(e,t,g),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,g)=>f.line==="auto"||g.line==="auto"?0:f.line>8&&g.line>8?g.line-f.line:f.line-g.line),i.forEach(f=>qf(s,f))),i}},BP={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},yg=et(et({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:pg,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:iN,bufferController:cD,capLevelController:Wl,errorController:K6,fpsController:FD,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:bf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:BP},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},NP()),{},{subtitleStreamController:iD,subtitleTrackController:rD,timelineController:PD,audioStreamController:aD,audioTrackController:nD,emeController:ea,cmcdController:SP,contentSteeringController:wP});function NP(){return{cueHandler:RP,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 DP(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=Xl(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])}`)}),et(et({},t),e)}function Xl(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(Xl):Object.keys(s).reduce((e,t)=>(e[t]=Xl(s[t]),e),{}):s}function PP(s){const e=s.loader;e!==gg&&e!==pg?(A.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):EP()&&(s.loader=gg,s.progressive=!0,s.enableSoftwareAES=!0,A.log("[config]: Progressive streaming enabled, using FetchLoader"))}let Zl;class OP extends kl{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.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 g=h.attrs;let{audioCodec:m,videoCodec:p}=h;((u=m)==null?void 0:u.indexOf("mp4a.40.34"))!==-1&&(Zl||(Zl=/chrome|firefox/i.test(navigator.userAgent)),Zl&&(h.audioCodec=m=void 0)),m&&(h.audioCodec=m=ti(m,a)),((f=p)==null?void 0:f.indexOf("avc1"))===0&&(p=h.videoCodec=k6(p));const{width:y,height:b,unknownCodecs:S}=h;if(l||(l=!!(y&&b)),d||(d=!!p),c||(c=!!m),S!=null&&S.length||m&&!hl(m,"audio",a)||p&&!hl(p,"video",a))return;const{CODECS:w,"FRAME-RATE":x,"HDCP-LEVEL":E,"PATHWAY-ID":v,RESOLUTION:T,"VIDEO-RANGE":R}=g,B=`${`${v||"."}-`}${h.bitrate}-${T}-${x}-${w}-${R}-${E}`;if(o[B])if(o[B].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const M=r[B]+=1;h.attrs["PATHWAY-ID"]=new Array(M+1).join(".");const W=new Ws(h);o[B]=W,i.push(W)}else o[B].addGroupId("audio",g.AUDIO),o[B].addGroupId("text",g.SUBTITLES);else{const M=new Ws(h);o[B]=M,r[B]=1,i.push(M)}}),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:p,width:y,height:b})=>(!!m||!!(y&&b))&&P6(p))),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(_.ERROR,{type:pe.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(p=>!p.audioCodec||hl(p.audioCodec,"audio",m)),bg(r)}t.subtitles&&(l=t.subtitles,bg(l));const c=d.slice(0);d.sort((m,p)=>{if(m.attrs["HDCP-LEVEL"]!==p.attrs["HDCP-LEVEL"])return(m.attrs["HDCP-LEVEL"]||"")>(p.attrs["HDCP-LEVEL"]||"")?1:-1;if(a&&m.height!==p.height)return m.height-p.height;if(m.frameRate!==p.frameRate)return m.frameRate-p.frameRate;if(m.videoRange!==p.videoRange)return ni.indexOf(m.videoRange)-ni.indexOf(p.videoRange);if(m.videoCodec!==p.videoCodec){const y=Pf(m.videoCodec),b=Pf(p.videoCodec);if(y!==b)return b-y}if(m.uri===p.uri&&m.codecSet!==p.codecSet){const y=ei(m.codecSet),b=ei(p.codecSet);if(y!==b)return b-y}return m.averageBitrate!==p.averageBitrate?m.averageBitrate-p.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 p=h.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${p}`),((u=this.hls.userConfig)==null?void 0:u.abrEwmaDefaultEstimate)===void 0){const b=Math.min(p,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===yg.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=o&&!i,g={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(_.MANIFEST_PARSED,g),(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(_.ERROR,{type:pe.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(_.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===ve.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ce.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(_.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));ap(a),this._levels=a,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(_.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(_.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:a}))}}function bg(s){const e={};s.forEach(t=>{const a=t.groupId||"";t.id=e[a]=e[a]||0,e[a]++})}class FP{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:pe.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,g,m,p)=>{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"),p));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,r({frag:y,keyInfo:b})},onError:(f,g,m,p)=>{this.resetLoader(g),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),m,et({url:d.url,data:void 0},f)))},onTimeout:(f,g,m)=>{this.resetLoader(g),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),m))},onAbort:(f,g,m)=>{this.resetLoader(g),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 Sg(){return self.SourceBuffer||self.WebKitSourceBuffer}function _g(){if(!As())return!1;const e=Sg();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function MP(){if(!_g())return!1;const s=As();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(Na(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(Na(e,"audio"))))}function VP(){var s;const e=Sg();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const $P=250,Ci=2,zP=.1,UP=.05;class GP{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||!Pe.getBuffered(i).length){this.nudgeRetry=0;return}const h=Pe.bufferInfo(i,r,0),u=h.nextStart||0;if(l){const y=h.len>Ci,b=!u||t&&t.start<=r||u-r>Ci&&!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,x=(S==null||(f=S.details)==null?void 0:f.live)?S.details.targetduration*2:Ci,E=this.fragmentTracker.getPartialFragment(r);if(b>0&&(b<=x||E)){i.paused||this._trySkipBufferHole(E);return}}const g=self.performance.now();if(o===null){this.stalled=g;return}const m=g-o;if(!l&&m>=$P&&(this._reportStall(h),!this.media))return;const p=Pe.bufferInfo(i,r,a.maxBufferHole);this._tryFixBufferStall(p,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(_.ERROR,{type:pe.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=Pe.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 g=!1;if(o===0){const m=f.getAppendedFrag(0,ce.MAIN);m&&l<m.end&&(g=!0)}if(!g){const m=e||f.getAppendedFrag(o,ce.MAIN);if(m){let p=!1,y=m.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{p=!0;break}}if(p)return 0}}}const u=Math.max(l+UP,o+zP);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(_.ERROR,{type:pe.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(_.ERROR,{type:pe.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(_.ERROR,{type:pe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:r,fatal:!0})}}}const jP=100;class HP extends Cl{constructor(e,t,a){super(e,t,a,"[stream-controller]",ce.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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(_.ERROR,this.onError,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(_.ERROR,this.onError,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.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(jP),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=$.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=$.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case $.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=$.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=$.IDLE;break}break}case $.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=$.IDLE}}break}this.state===$.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 p={};this.altAudio&&(p.type="video"),this.hls.trigger(_.BUFFER_EOS,p),this.state=$.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===$.WAITING_LEVEL||c.live&&this.levelLastLoaded!==r){this.level=o,this.state=$.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 g=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&g&&g.sn!=="initSegment"&&this.fragmentTracker.getState(g)!==tt.OK){var m;const y=((m=this.backtrackFragment)!=null?m:g).sn-c.startSN,b=c.fragments[y-1];b&&g.cc===b.cc&&(g=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(g&&this.isLoopLoading(g,f)){if(!g.gap){const y=this.audioOnly&&!this.altAudio?Be.AUDIO:Be.VIDEO,b=(y===Be.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,ce.MAIN)}g=this.getNextFragmentLoopLoading(g,c,l,ce.MAIN,u)}g&&(g.initSegment&&!g.initSegment.data&&!this.bitrateTest&&(g=g.initSegment),this.loadFragment(g,r,f))}loadFragment(e,t,a){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===tt.NOT_LOADED||i===tt.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,ce.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 $.KEY_LOADING:case $.FRAG_LOADING:case $.FRAG_LOADING_WAITING_RETRY:case $.PARSING:case $.PARSED:this.state=$.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 GP(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;ae(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(_.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&&!VP(),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!==$.IDLE)return;const i=a[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=$.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===$.FRAG_LOADING||this.state===$.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(_.LEVEL_UPDATED,{details:r,level:o}),this.state===$.WAITING_LEVEL){if(this.waitForCdnTuneIn(r))return;this.state=$.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),g=this.transmuxer=this.transmuxer||new Fp(this.hls,ce.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,p=m!==-1,y=new El(a.level,a.sn,a.stats.chunkCount,o.byteLength,m,p),b=this.initPTS[a.cc];g.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(_.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),o.trigger(_.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!==ce.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===$.PARSED&&(this.state=$.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=$.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(ce.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===$.WAITING_LEVEL&&((a=t.context)==null?void 0:a.type)===ve.LEVEL&&(this.state=$.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||!Pe.getBuffered(e).length){const a=this.state!==$.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,a)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=$.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Be.AUDIO||this.audioOnly&&!this.altAudio){const a=(t===Be.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(a,t,ce.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=Pe.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=$.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(_.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:g,initSegment:m}=o,{details:p}=h,y=this.altAudio?void 0:o.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=$.PARSING,m){if(m!=null&&m.tracks){const w=d.initSegment||d;this._bufferInitSegment(h,m.tracks,w,r),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:w,id:a,tracks:m.tracks})}const b=m.initPTS,S=m.timescale;ae(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:S},i.trigger(_.INIT_PTS_FOUND,{frag:d,id:a,initPTS:b,timescale:S}))}if(u&&p&&d.sn!=="initSegment"){const b=p.fragments[d.sn-1-p.startSN],S=d.sn===p.startSN,w=!b||d.cc>b.cc;if(o.independent!==!1){const{startPTS:x,endPTS:E,startDTS:v,endDTS:T}=u;if(c)c.elementaryStreams[u.type]={startPTS:x,endPTS:E,startDTS:v,endDTS:T};else if(u.firstKeyFrame&&u.independent&&r.id===1&&!w&&(this.couldBacktrack=!0),u.dropped&&u.independent){const R=this.getMainFwdBufferInfo(),L=(R?R.end:this.getLoadPosition())+this.config.maxBufferHole,B=u.firstKeyFramePTS?u.firstKeyFramePTS:x;if(!S&&L<B-this.config.maxBufferHole&&!w){this.backtrack(d);return}else w&&(d.gap=!0);d.setElementaryStreamInfo(u.type,d.start,E,d.start,T,!0)}else S&&x>Ci&&(d.gap=!0);d.setElementaryStreamInfo(u.type,x,E,v,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(u,d,c,r,S||w)}else if(S||w)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:S,startDTS:w,endDTS:x}=y;c&&(c.elementaryStreams[Be.AUDIO]={startPTS:b,endPTS:S,startDTS:w,endDTS:x}),d.setElementaryStreamInfo(Be.AUDIO,b,S,w,x),this.bufferFragmentData(y,d,c,r)}if(p&&g!=null&&(t=g.samples)!=null&&t.length){const b={id:a,frag:d,details:p,samples:g.samples};i.trigger(_.FRAG_PARSING_METADATA,b)}if(p&&f){const b={id:a,frag:d,details:p,samples:f.samples};i.trigger(_.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,a,i){if(this.state!==$.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(_.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const h=t[d].initSegment;h!=null&&h.byteLength&&this.hls.trigger(_.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,ce.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=$.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const a=e.currentTime;if(Pe.isBuffered(e,a)?t=this.getAppendedFrag(a):Pe.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(_.FRAG_CHANGED,{frag:t}),(!i||i.level!==o)&&this.hls.trigger(_.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&&ae(t)&&ae(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.17"}static isMSESupported(){return _g()}static isSupported(){return MP()}static getMediaSource(){return As()}static get Events(){return _}static get ErrorTypes(){return pe}static get ErrorDetails(){return N}static get DefaultConfig(){return ds.defaultConfig?ds.defaultConfig:yg}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 Dl,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,N3(e.debug||!1,"Hls instance");const t=this.config=DP(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),g=new v6(this),m=new B6(this),p=t.contentSteeringController,y=p?new p(this):null,b=this.levelController=new OP(this,y),S=new rN(this),w=new FP(this.config),x=this.streamController=new HP(this,S,w);u.setStreamController(x),f.setStreamController(x);const E=[g,b,x];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,w)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const R=t.subtitleStreamController;R&&E.push(new R(this,S,w)),this.createController(t.timelineController,v),w.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(N6,v),this.coreComponents=v,E.push(d);const L=d.onErrorOut;typeof L=="function"&&this.on(_.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===_.ERROR;this.trigger(_.ERROR,{type:pe.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(_.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(_.MEDIA_ATTACHING,{media:e})}detachMedia(){A.log("detachMedia"),this.trigger(_.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,a=this.url,i=this.url=Qr.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(_.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){D6(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 WP=[(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))],KP={class:"stories__content"},qP={class:"story-container-game"},YP={class:"story-circle"},JP={class:"story-result"},XP={class:"stories__content__stories-bar"},ZP={class:"stories__content__video"},QP={class:"stories__content__video__info__date"},eO={class:"stories__content__video__info__data"},tO=Xe({__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(ee=>({f47bb864:y.value,"875f549a":b.value,"3a0e3be2":v.value}));const a=eu(),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((ee,Ce)=>(Ce.ids.forEach(Te=>{ee.set(Te,Ce.name)}),ee),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),g=n.ref(0),m=n.ref(!1),p=n.ref(0),y=n.ref("auto"),b=n.ref("100%"),S=n.ref(null),w=n.ref(0),x=n.ref(null),E=n.ref(null),v=n.computed(()=>X()?"7vw":"16px"),T=n.computed(()=>d.value[c.value]),R=n.computed(()=>({"--icon-play":`url(${a}/icnplay1.svg)`}));function L(){l.value.muted=!1,l.value.play()}const B=n.computed(()=>!T.value.isHls&&["ios"].includes(Qo()));n.watch(()=>T.value,ee=>{ee&&W()}),n.watch(()=>t.stories,ee=>{if(ee.length){c.value=0,g.value=0;const Ce=ee.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${du[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${o.get(Te.categoryId)} ${dv(Te.player.player_name)}`})).sort((Te,Fe)=>Te.startTime-Fe.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ce.length-1&&(Ce.forEach((Te,Fe)=>{Fe<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,g.value=c.value),d.value=[...Ce]}},{immediate:!0}),n.watch(()=>r.value,ee=>{ee&&M()},{flush:"post"}),n.watch(()=>h.value,ee=>{ee&&(cv()?(ee.addEventListener("touchstart",ue),ee.addEventListener("touchend",Y)):(ee.addEventListener("mousedown",ue),ee.addEventListener("mouseup",Y)))},{flush:"post"});function M(){l.value=new zs("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",se(l.value)),l.value.on("timeupdate",oe()),W(T.value),l.value.isDestroyed=!1}function W(){T.value.isHls?j(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function j(ee){if(r.value)if(ds.isSupported()){r.value.src=null;let Ce=new ds;Ce.loadSource(ee.url),Ce.attachMedia(r.value)}else l.value.source={type:"video",sources:[{src:ee.url,type:"video/mp4"}]}}function se(){const ee=document.querySelector(".plyr__video-wrapper");return ee&&(w.value=ee.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 xe(),()=>{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?X()&&(m.value=!0):X()&&(m.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!X()&&(E.value.style="display: none",b.value="100%"):E.value&&!X()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ne())}}function ne(ee=1){const Ce=c.value+ee;Ce<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):he("right",T.value):Ce===d.value.length?t.isLastGameStories?K():he("left",T.value):(c.value=Ce,ee===1&&(g.value=c.value))}function de(){u.value>f.value?he("left",T.value):u.value<f.value?he("right",T.value):J()}function he(ee,Ce){e("last-story-index",g.value),e("swipe",{direction:ee,currentPlay:Ce})}function J(){const ee=window.innerWidth/2,Ce=u.value<ee,Te=T.value.progress;T.value.progress=Ce?0:100,l.value.pause(),e("video-next-back",{eventName:Ce?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ne(Ce?-1:1)}function K(){l.value.pause(),l.value.muted=!0,e("last-story-index",g.value),e("close",T.value)}function ue(ee){u.value=ee.changedTouches?ee.changedTouches[0].clientX:ee.clientX}function Y(ee){f.value=ee.changedTouches?ee.changedTouches[0].clientX:ee.clientX,de()}function X(){return/iPhone|iPad/i.test(navigator.userAgent)}function re(){window.scrollTo(0,100)}function ye(){if(window.scrollTo(0,100),Qo()=="android"){const ee=document.querySelector("#stories");ee.requestFullscreen(ee)}}function xe(){if(window.ResizeObserver)S.value=new window.ResizeObserver(()=>{x.value&&w.value.height>0&&(x.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",x.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),S.value.observe(x.value);else throw new Error("Resize observer not supported!")}return n.onMounted(()=>{p.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),X()?(window.addEventListener("resize",re),re()):(window.addEventListener("orientationchange",ye),ye()),setTimeout(()=>{xe()},500)}),n.onBeforeUnmount(()=>{window.scrollTo(0,p.value),X()?window.removeEventListener("resize",re):(Qo()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ye)),S.value&&(S.value.disconnect(),S.value=null)}),(ee,Ce)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stories",X()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:x,style:n.normalizeStyle(R.value)},[n.createElementVNode("div",{class:n.normalizeClass(["stories__close",X()?"stories-safe-areas-iphone":""]),onClick:K},WP,2),n.createElementVNode("div",KP,[n.createElementVNode("div",qP,[n.createElementVNode("div",YP,[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",JP,n.toDisplayString(T.value.header.label),1)]),n.createElementVNode("div",{ref_key:"overlay",ref:h,class:"stories__content__overlay"},null,512),n.createElementVNode("div",XP,[(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",ZP,[n.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[n.createElementVNode("div",QP,n.toDisplayString(T.value.date),1),n.createElementVNode("div",eO,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)])]),B.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"]]),sO={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ímpico Universitario, Ciudad de Mé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á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ó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é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é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é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é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é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á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é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é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á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á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ímpico Universitario, Ciudad de Mé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ímpico Universitario, Ciudad de Mé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é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é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é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ó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é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írez, San Luis Potosí.","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é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é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é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ó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ó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"]]},aO=new Map([[1,45],[2,90],[3,105],[4,120]]),nO=[{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 Pa=null,xi=null,vi="";const Vt=T3(),iO={components:{GSCSeasonSelect:EI,GSCTournamentSelect:eI,GSCGames:Pv,GSCSlider:ra,GSCGridTeamsMatches:vy,GSCPlayersLanding:Sy,GSCTops:DA,GSCTableCalendar:ZC,DiscoverVideos:k3,CarouselFullScreen:xL,Stories:tO},setup(){const s=n.ref("landingref"),{elementSize:e}=sy(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:eu(),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:!0,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysByKey:new Map,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,playersLengthRival: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},teamRival(){return 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},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 Ae.post(vi,{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||sO)}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(Vt).reduce((f,[g,m])=>(f[g]=i[m],f),{}),isPlaySeeker:!0,startSeconds:i[Vt.startTime],endSeconds:i[Vt.endTime],totalSeconds:Math.floor(i[Vt.endTime]-i[Vt.startTime]),payloadData:{play_id:i[Vt.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[Vt.momentOfPlay],play_type:i[Vt.categoryId],viewer_second_start:Math.floor(i[Vt.startTime]),intended_second_start:Math.floor(i[Vt.startTime]),intended_second_end:Math.floor(i[Vt.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,g]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(g)]}return l.categoryName=nO.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 Ae.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=Ae.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){console.log("holala isLeagueSelected",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)},viewAllRival(){const s={team: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,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},getTotalPlayersRival(s){this.playersLengthRival=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=Ae.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=[Ae.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!==vi&&(vi=i,a.push(Ae.get(vi,t))),a},async onInputSeason(s){this.isLeagueSelected=!0;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=Ae.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 Ae.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(){Ae.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]+"T"+r[5]),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((g,m)=>{const p={...m},y=new Date,[b,S,w]=p.date.split("-"),[x,E,v]=p.schedule.split(":"),T=new Date(Number(b),Number(S)-1,Number(w),Number(x),Number(E),Number(v));return p.dateTimeMillis=T.valueOf(),p.home_team=l.find(R=>R.team_id===m.home_team),p.visiting_team=l.find(R=>R.team_id===m.visiting_team),p.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(p.game_id),this.seasonsGamesMap.set(p.game_id,p),g[m.matchday_abbreviation]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(p):g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[p]:g[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[p]},this.gsData&&this.gsData.teamId&&p.game_status===4&&(p.home_team.team_id===this.gsData.teamId||p.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(p),p.score&&p.score[0]+p.score[1]>0&&this.userTeamGamesForVideos.push(p)),g},{});this.userTeamGames.sort((g,m)=>g.dateTimeMillis-m.dateTimeMillis);for(let[g,m]of Object.entries(f))f[g]=Object.entries(m).map(([p,y])=>({date:p,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[g].sort((p,y)=>p.date<y.date?-1:p.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((g,m)=>{const p={...m};return p.dateTimeMillis=new Date(p.date_time_utc).valueOf(),p.home_team=l.find(y=>y.team_id===m.home_team),p.visiting_team=l.find(y=>y.team_id===m.visiting_team),g[m.matchday_abbreviation]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(p):(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&(g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[p]):(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&(g[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[p]}),g},{});this.userTeamGames.sort((g,m)=>g.dateTimeMillis-m.dateTimeMillis);for(let[g,m]of Object.entries(f))f[g]=Object.entries(m).map(([p,y])=>({date:p,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[g].sort((p,y)=>p.date<y.date?-1:p.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[g,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const p=qu.get(this.tournamentType);if(p){const y=p.get(g);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const p=g.replace("M",""),y=`Jornada ${p}`;this.isCupLegacy?u[Ku[p]||y]=m:u[Wu[g]||y]=m}else u[Number(g.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(g)?u[g]=m:u[`R${Number(g.replace("PO",""))}`]=m:f.type===1&&(u[Hu[g]]=m);return u},{}),this.fullTournamentScheduleFullGoals=h.reduce((u,f)=>{for(const[g,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const p=qu.get(this.tournamentType);if(p){const y=p.get(g);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const p=g.replace("M",""),y=`Jornada ${p}`;this.isCupLegacy?u[Ku[p]||y]=m:u[Wu[g]||y]=[]}else u[Number(g.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(g)?u[g]=m:u[`R${Number(g.replace("PO",""))}`]=m:f.type===1&&(u[Hu[g]]=m);return u},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeysByKey.clear(),this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((u,[f,g],m)=>{const p=Number(f);let y="";Number.isNaN(p)?y=f:y=p<10?`0${p}`:f;let b=!1,S=null;const w={key:f,value:p,valueText:y,avaible:b,matchDayId:S,index:m,liveGamesIds:new Set};this.tournamentScheduleKeysByKey.set(f,w);const x=g.reduce((v,T)=>(!S&&T&&T.games&&T.games.length&&(w.matchDayId=T.games[0].matchday_id),T.games.forEach(R=>{this.roundAbbreviationByGameId.set(R.game_id,f),R.roundAbbreviation=Number.isNaN(p)?p:`J ${p}`,R.roundAbbreviationV2=f,R.scheduleKey=w}),v=v.concat(T.games),v),[]);for(const v of x)(v.game_status!==4||v.is_live)&&(v.score[0]!==0||v.score[1]!==0)&&(w.avaible=!0);u.set(f,w);const E=this.getPages(x);return this.gamesPages.set(f,E),u},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((u,[f,g])=>{const m=Number(f);let p="";Number.isNaN(m)?p=f:p=m<10?`0${m}`:f;let y=!1;const b=g.reduce((S,w)=>(w.games.forEach(x=>{x.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`}),S=S.concat(w.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:p,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(xi),xi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),xi||(xi=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){Pa||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(),Pa=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(Pa),Pa=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,i.scheduleKey&&i.scheduleKey.liveGamesIds.delete(s.game_id)}},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,i.scheduleKey&&i.scheduleKey.liveGamesIds.add(a.game_id)),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=aO.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))}}Pa||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 t=new Date().valueOf(),a=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(a).reduce((r,[l,d])=>(r[l]=null,d.forEach(c=>{c.games.forEach(h=>{if([1,0].includes(h.game_status)||h.is_live){const u=t-h.dateTimeMillis;(r[l]===null||u<r[l])&&(r[l]=u)}})}),r),{}));if(!i.length)return"1";const o=i.reduce((r,[l,d])=>{if(d!==null){const c=this.tournamentScheduleKeysByKey.get(l);(r.shortestMillisToNow===null||d<r.shortestMillisToNow&&c.index>=r.scheduleKey.index)&&(r.shortestMillisToNow=d,r.round=l,r.scheduleKey=c)}return r},{round:"",shortestMillisToNow:null,scheduleKey:null});return o.shortestMillisToNow!==null?o.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 Ae.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 Ae.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]+"T"+l[5]),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([Ae.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()}},hs=s=>(n.pushScopeId("data-v-10136421"),s=s(),n.popScopeId(),s),oO={class:"gsclanding",ref:"landingref"},rO={key:2,class:"play-seeker-image"},lO={class:"play-seeker-image__info"},cO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),dO={class:"play-seeker-image__info__legends-and-button"},hO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),uO={class:"play-icon"},mO=["src"],fO=hs(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),pO={class:"play-seeker-image__players"},gO=["src"],yO={key:3,class:"container-selectors-mobile"},bO={class:"container-selectors-mobile-tournament"},SO={class:"container-selectors-mobile-season"},_O={key:0,class:"home-item-movil"},wO=hs(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),kO={class:"name-user-movil"},EO={key:1,class:"home-item"},TO={key:2,class:"bar-settings"},CO={class:"name-user"},xO={class:"container-selectors"},vO={class:"selector-tournament"},AO={class:"selector-seasons"},LO={key:0,class:"container-games"},IO={key:0,class:"container-games"},RO={key:7,class:"container-players-myteam"},BO=["onClick"],NO={class:"story-result"},DO={key:0,class:"font-bold"},PO={key:1,class:"font-bold"},OO={class:"story-match"},FO={key:2,class:"play-seeker-image"},MO={class:"play-seeker-image__info"},VO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),$O={class:"play-seeker-image__info__legends-and-button"},zO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),UO={class:"play-icon"},GO=["src"],jO=hs(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),HO={class:"play-seeker-image__players"},WO=["src"],KO={key:3,class:"container-selectors-mobile"},qO={class:"container-selectors-mobile-tournament"},YO={class:"container-selectors-mobile-season"},JO={key:0,class:"home-item-movil"},XO=hs(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),ZO={class:"name-user-movil"},QO={key:1,class:"home-item"},e8={key:2,class:"bar-settings"},t8={class:"name-user"},s8={class:"container-selectors"},a8={class:"selector-tournament"},n8={class:"selector-seasons"},i8={key:3,class:"container-games"},o8={key:5,class:"container-players"},r8={key:6,class:"stories-circle-wrapper"},l8=["onClick"],c8={class:"story-result"},d8={key:0,class:"font-bold"},h8={key:1,class:"font-bold"},u8={class:"story-match"};function m8(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("GSCGridTeamsMatches"),u=n.resolveComponent("GSCTableCalendar"),f=n.resolveComponent("GSCGames");n.resolveComponent("DiscoverVideos");const g=n.resolveComponent("GSCPlayersLanding"),m=n.resolveComponent("GSCTops"),p=n.resolveComponent("GSCSlider");return n.openBlock(),n.createElementBlock("div",oO,[t.isplayer?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[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",rO,[n.createElementVNode("div",lO,[cO,n.createElementVNode("div",dO,[hO,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",uO,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,mO)]),fO])])]),n.createElementVNode("div",pO,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,gO)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",yO,[n.createElementVNode("div",bO,[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",SO,[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",_O,[wO,n.createElementVNode("div",kO,[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",EO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",TO,[n.createElementVNode("div",CO,[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",xO,[n.createElementVNode("div",vO,[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",AO,[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),t.user.tournament===i.tournamentSelected.id?(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.elementSize.width>1e3?(n.openBlock(),n.createBlock(h,{key:0,isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"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","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])):(n.openBlock(),n.createBlock(h,{key:1,isPlayer:!1,"player-id":t.user.player,"is-female":i.tournamentSelected.is_female==1,"team-id":t.user.team,"is-player-mobile1":t.isplayer&&!o.isGenericLike,"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":!1,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["player-id","is-female","team-id","is-player-mobile1","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"]))],4),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",LO,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:4},[Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",IO,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.createVNode(h,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"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","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.withDirectives(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(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2)],64)),n.createCommentVNode("",!0),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:o.teamRival,class:"container-players"},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{key:o.teamRival,"tournament-selected":i.tournamentSelected,onClickProfileBtn:o.clickProfileBtn,onViewAll:o.viewAllRival,"is-rival":!0,onTotalPlayers:o.getTotalPlayersRival,"team-id":o.teamRival,"season-id":i.seasonSelected.id,"is-player":!0},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id"])):n.createCommentVNode("",!0)])),[[n.vShow,i.playersLengthRival>0&&o.teamRival>0]]),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",RO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{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]]),a.elementSize.width<1e3&&t.isplayer&&!o.isGenericLike?(n.openBlock(),n.createElementBlock("div",{key:8,class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 65px !important;"])},[a.elementSize.width<1e3?(n.openBlock(),n.createBlock(h,{key:0,isPlayer:!1,"player-id":t.user.player,"team-id":t.user.team,"is-player-mobile2":t.isplayer&&!o.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"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":!1,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["player-id","team-id","is-player-mobile2","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"])):n.createCommentVNode("",!0)],4)],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id?"tops-player":""]),style:n.normalizeStyle(t.isplayer&&!o.isGenericLike&&a.elementSize.width<1e3?"margin-top: 35px !important;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{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)],6),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",{key:9,class:n.normalizeClass(["stories-circle-wrapper",t.user.tournament===i.tournamentSelected.id?"":"marginsep"])},[(n.openBlock(),n.createBlock(p,{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",NO,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+" ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",DO,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",PO,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",OO,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,BO))),128))]),_:1}))],2)):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width<1e3]]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:10,class:"b2c-image",onClick:e[1]||(e[1]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[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",FO,[n.createElementVNode("div",MO,[VO,n.createElementVNode("div",$O,[zO,n.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[2]||(e[2]=(...y)=>o.onClickPlaySeeker&&o.onClickPlaySeeker(...y))},[n.createElementVNode("div",UO,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,GO)]),jO])])]),n.createElementVNode("div",HO,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,WO)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",KO,[n.createElementVNode("div",qO,[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",YO,[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",JO,[XO,n.createElementVNode("div",ZO,[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",QO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",e8,[n.createElementVNode("div",t8,[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",s8,[n.createElementVNode("div",a8,[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",n8,[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),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",i8,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","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<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.createVNode(h,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"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","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.withDirectives(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(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",o8,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{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",{class:n.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id&&!i.is_public&&!o.isGenericLike?"tops-team":""]),style:n.normalizeStyle(!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike&&a.elementSize.width<=1e3?"margin-top: 25px !important;":"hola")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{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)],6),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",r8,[(n.openBlock(),n.createBlock(p,{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",c8,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+" ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",d8,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",h8,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",u8,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,l8))),128))]),_:1}))])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<=1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width<1e3]]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[3]||(e[3]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],64))],512)}const f8=Xe(iO,[["render",m8],["__scopeId","data-v-10136421"]]);ms.GSCLanding=f8,Object.defineProperty(ms,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=nl(this.config),o=e.map(pf).filter(r=>!!r&&i.indexOf(r)!==-1);return this.getKeySystemSelectionPromise(o).then(({keySystem:r})=>{const l=yf(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 Ct?this.hls.trigger(_.ERROR,e.data):this.hls.trigger(_.ERROR,{type:pe.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=pf(e.keyFormat),o=i?[i]:nl(this.config);return this.attemptKeySystemAccess(o)}return a}getKeySystemSelectionPromise(e){if(e.length||(e=nl(this.config)),e.length===0)throw new Ct({type:pe.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[De.FAIRPLAY]){const u=qe(new Uint8Array(a));try{const f=sl(JSON.parse(u).sinf),g=vf(new Uint8Array(f));if(!g)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");o=g.subarray(8,24),r=De.FAIRPLAY}catch(f){this.warn(`${i} Failed to parse sinf: ${f}`);return}}else{const u=f6(a),f=u.filter(g=>g.systemId===Ia.WIDEVINE)[0];if(!f){u.length===0||u.some(g=>!g.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${u.map(g=>gf(g.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(r=gf(f.systemId),f.version===0&&f.data){const g=f.data.length-22;o=f.data.subarray(g,g+16)}}if(!r||!o)return;const l=Gt.hexDump(o),{keyIdToKeySessionPromise:d,mediaKeySessions:c}=this;let h=d[l];for(let u=0;u<c.length;u++){const f=c[u],g=f.decryptdata;if(!g.keyId)continue;const m=Gt.hexDump(g.keyId);if(l===m||g.uri.replace(/-/g,"").indexOf(l)!==-1){if(h=d[m],g.pssh)break;delete d[m],g.pssh=new Uint8Array(a),g.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 g;this.throwIfDestroyed();const m=new Ba("ISO-23001-7",l,(g=yf(u))!=null?g:"");return m.pssh=new Uint8Array(a),m.keyId=o,this.attemptSetMediaKeys(u,f).then(()=>{this.throwIfDestroyed();const p=this.createMediaKeySessionContext({decryptdata:m,keySystem:u,mediaKeys:f});return this.generateRequestWithPreferredKeySession(p,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 Dl,u=e._onmessage=m=>{const p=e.mediaKeysSession;if(!p){h.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=m;this.log(`"${y}" message event for session "${p.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===De.FAIRPLAY&&(this.updateKeySession(e,al("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 g=new Promise((m,p)=>{h.on("error",p),h.on("keyStatus",y=>{y.startsWith("usable")?m():y==="output-restricted"?p(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?p(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?p(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 Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:m,fatal:!1},`Error generating key-session request: ${m}`)}).then(()=>g).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: ${Gt.hexDump("buffer"in a?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a))} session keyId: ${Gt.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,g,m,p)=>{r(f.data)},onError:(f,g,m,p)=>{l(new Ct({type:pe.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:m,response:et({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${o}). Status: ${f.code} (${f.text})`))},onTimeout:(f,g,m)=>{l(new Ct({type:pe.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,g,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 Ct({type:pe.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 Ct({type:pe.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 g=(r=h.querySelector("name"))==null?void 0:r.textContent,m=(l=h.querySelector("value"))==null?void 0:l.textContent;g&&m&&e.setRequestHeader(g,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 al(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 Ct({type:pe.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==De.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={},Ba.clearKeyUriToKeyIdMap();const a=t.length;ea.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}`)})}}}ea.CDMCleanupPromise=void 0;class Ct 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 ht;(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"})(ht||(ht={}));var Kl;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(Kl||(Kl={}));var Is;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Is||(Is={}));const MD={[Is.OBJECT]:["br","d","ot","tb"],[Is.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Is.SESSION]:["cid","pr","sf","sid","st","v"],[Is.STATUS]:["bs","rtp"]};class ta{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(a=>a instanceof ta?a:new ta(a))),this.value=e,this.params=t}}class ig{constructor(e){this.description=void 0,this.description=e}}const VD="Dict";function $D(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 zD(s,e,t,a){return new Error(`failed to ${s} "${$D(e)}" as ${t}`,{cause:a})}const og="Bare Item",UD="Boolean",GD="Byte Sequence",jD="Decimal",HD="Integer";function WD(s){return s<-999999999999999||999999999999999<s}const KD=/[\x00-\x1f\x7f]+/,qD="Token",YD="Key";function qt(s,e,t){return zD("serialize",s,e,t)}function JD(s){if(typeof s!="boolean")throw qt(s,UD);return s?"?1":"?0"}function XD(s){return btoa(String.fromCharCode(...s))}function ZD(s){if(ArrayBuffer.isView(s)===!1)throw qt(s,GD);return`:${XD(s)}:`}function rg(s){if(WD(s))throw qt(s,HD);return s.toString()}function QD(s){return`@${rg(s.getTime()/1e3)}`}function lg(s,e){if(s<0)return-lg(-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 eP(s){const e=lg(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw qt(s,jD);const t=e.toString();return t.includes(".")?t:`${t}.0`}const tP="String";function sP(s){if(KD.test(s))throw qt(s,tP);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function aP(s){return s.description||s.toString().slice(7,-1)}function cg(s){const e=aP(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw qt(e,qD);return e}function ql(s){switch(typeof s){case"number":if(!ae(s))throw qt(s,og);return Number.isInteger(s)?rg(s):eP(s);case"string":return sP(s);case"symbol":return cg(s);case"boolean":return JD(s);case"object":if(s instanceof Date)return QD(s);if(s instanceof Uint8Array)return ZD(s);if(s instanceof ig)return cg(s);default:throw qt(s,og)}}function Yl(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw qt(s,YD);return s}function Jl(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${Yl(e)}`:`;${Yl(e)}=${ql(t)}`).join("")}function dg(s){return s instanceof ta?`${ql(s.value)}${Jl(s.params)}`:ql(s)}function nP(s){return`(${s.value.map(dg).join(" ")})${Jl(s.params)}`}function iP(s,e={whitespace:!0}){if(typeof s!="object")throw qt(s,VD);const t=s instanceof Map?s.entries():Object.entries(s),a=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,o])=>{o instanceof ta||(o=new ta(o));let r=Yl(i);return o.value===!0?r+=Jl(o.params):(r+="=",Array.isArray(o.value)?r+=nP(o):r+=dg(o)),r}).join(`,${a}`)}function oP(s,e){return iP(s,e)}const rP=s=>s==="ot"||s==="sf"||s==="st",lP=s=>typeof s=="number"?ae(s):s!=null&&s!==""&&s!==!1;function cP(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 dP(){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 Ei=s=>Math.round(s),hP=(s,e)=>(e!=null&&e.baseUrl&&(s=cP(s,e.baseUrl)),encodeURIComponent(s)),Ti=s=>Ei(s/100)*100,uP={br:Ei,d:Ei,bl:Ti,dl:Ti,mtp:Ti,nor:hP,rtp:Ti,tb:Ei};function mP(s,e){const t={};if(s==null||typeof s!="object")return t;const a=Object.keys(s).sort(),i=je({},uP,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||lP(l)&&(rP(r)&&typeof l=="string"&&(l=new ig(l)),t[r]=l))}),t}function hg(s,e={}){return s?oP(mP(s,e),je({whitespace:!1},e)):""}function fP(s,e={}){if(!s)return{};const t=Object.entries(s),a=Object.entries(MD).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])||Is.REQUEST;return(d=o[u])!=null||(o[u]={}),o[u][c]=h,o},{});return Object.entries(i).reduce((o,[r,l])=>(o[r]=hg(l,e),o),{})}function pP(s,e,t){return je(s,fP(e,t))}const gP="CMCD";function yP(s,e={}){if(!s)return"";const t=hg(s,e);return`${gP}=${encodeURIComponent(t)}`}const ug=/CMCD=[^&#]+/;function bP(s,e,t){const a=yP(e,t);if(!a)return s;if(ug.test(s))return s.replace(ug,a);const i=s.includes("?")?"&":"?";return`${s}${i}${a}`}class SP{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:ht.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===ht.VIDEO||l===ht.AUDIO||l==ht.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||dP(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.includeKeys=a.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHED,this.onMediaDetached,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHED,this.onMediaDetached,this),e.off(_.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:Kl.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){je(t,this.createData());const a=t.ot===ht.INIT||t.ot===ht.VIDEO||t.ot===ht.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={}),pP(e.headers,t)):e.url=bP(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return ht.TIMED_TEXT;if(e.sn==="initSegment")return ht.INIT;if(t==="audio")return ht.AUDIO;if(t==="main")return this.hls.audioTracks.length?ht.VIDEO:ht.MUXED}getTopBandwidth(e){let t=0,a;const i=this.hls;if(e===ht.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===ht.AUDIO?this.audioBuffer:this.videoBuffer;return!a||!t?NaN:Pe.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 _P=3e5;class wP{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.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)===rt.SendAlternateToPenaltyBox&&a.flags===Ft.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}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]>_P&&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,ap(t),this.hls.trigger(_.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===ve.AUDIO_TRACK&&i[o].hasAudioGroup(e)||t===ve.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 Me(h.attrs);u["PATHWAY-ID"]=r;const f=u.AUDIO&&`${u.AUDIO}_clone_${r}`,g=u.SUBTITLES&&`${u.SUBTITLES}_clone_${r}`;f&&(a[u.AUDIO]=f,u.AUDIO=f),g&&(i[u.SUBTITLES]=g,u.SUBTITLES=g);const m=fg(h.uri,u["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),p=new Ws({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++)p.addGroupId("audio",`${h.audioGroups[y]}_clone_${r}`);if(h.subtitleGroups)for(let y=1;y<h.subtitleGroups.length;y++)p.addGroupId("text",`${h.subtitleGroups[y]}_clone_${r}`);return p});t.push(...c),mg(this.audioTracks,a,d,r),mg(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,g)=>{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":p,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=m;if(p)try{this.uri=new self.URL(p,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${p}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const S={steeringManifest:m,url:i.toString()};this.hls.trigger(_.STEERING_MANIFEST_LOADED,S),b&&this.updatePathwayPriority(b)},onError:(h,u,f,g)=>{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 p=this.loader;if(typeof(p==null?void 0:p.getResponseHeader)=="function"){const y=p.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 mg(s,e,t,a){s&&Object.keys(e).forEach(i=>{const o=s.filter(r=>r.groupId===i).map(r=>{const l=je({},r);return l.details=void 0,l.attrs=new Me(l.attrs),l.url=l.attrs.URI=fg(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 fg(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 kP=/^age:\s*[\d.]+\s*$/im;class pg{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 qn,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&&ae(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};ri(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(ri(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=_l(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&&kP.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 EP(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const TP=/(\d+)-(\d+)\/(\d+)/;class gg{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||AP,this.controller=new self.AbortController,this.stats=new qn}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=CP(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&&ae(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:g,statusText:m}=u;throw new LP(m||"fetch, bad network response",g,u)}return i.loading.first=f,i.total=vP(u.headers)||i.total,r&&ae(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 g=u[d];g&&(i.loaded=i.total=g);const m={url:f.url,data:u,code:f.status};r&&!ae(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,g=u?u.message:null;a.onError({code:f,text:g},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 pp,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 CP(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(je({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function xP(s){const e=TP.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function vP(s){const e=s.get("Content-Range");if(e){const a=xP(e);if(ae(a))return a}const t=s.get("Content-Length");if(t)return parseInt(t)}function AP(s,e){return new self.Request(s.url,e)}class LP extends Error{constructor(e,t,a){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=a}}const IP=/\s/,RP={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 p=0;p<o.chars.length;p++)IP.test(o.chars[p].uchar)&&l?d++:(c+=o.chars[p].uchar,l=!1);o.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const g=Yp(c.trim()),m=zl(e,t,g);s!=null&&(u=s.cues)!=null&&u.getCueById(m)||(r=new h(e,t,g),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,g)=>f.line==="auto"||g.line==="auto"?0:f.line>8&&g.line>8?g.line-f.line:f.line-g.line),i.forEach(f=>qf(s,f))),i}},BP={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},yg=et(et({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:pg,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:iN,bufferController:cD,capLevelController:Wl,errorController:K6,fpsController:FD,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:bf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:BP},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},NP()),{},{subtitleStreamController:iD,subtitleTrackController:rD,timelineController:PD,audioStreamController:aD,audioTrackController:nD,emeController:ea,cmcdController:SP,contentSteeringController:wP});function NP(){return{cueHandler:RP,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 DP(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=Xl(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])}`)}),et(et({},t),e)}function Xl(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(Xl):Object.keys(s).reduce((e,t)=>(e[t]=Xl(s[t]),e),{}):s}function PP(s){const e=s.loader;e!==gg&&e!==pg?(A.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):EP()&&(s.loader=gg,s.progressive=!0,s.enableSoftwareAES=!0,A.log("[config]: Progressive streaming enabled, using FetchLoader"))}let Zl;class OP extends kl{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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.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 g=h.attrs;let{audioCodec:m,videoCodec:p}=h;((u=m)==null?void 0:u.indexOf("mp4a.40.34"))!==-1&&(Zl||(Zl=/chrome|firefox/i.test(navigator.userAgent)),Zl&&(h.audioCodec=m=void 0)),m&&(h.audioCodec=m=ti(m,a)),((f=p)==null?void 0:f.indexOf("avc1"))===0&&(p=h.videoCodec=k6(p));const{width:y,height:b,unknownCodecs:S}=h;if(l||(l=!!(y&&b)),d||(d=!!p),c||(c=!!m),S!=null&&S.length||m&&!hl(m,"audio",a)||p&&!hl(p,"video",a))return;const{CODECS:w,"FRAME-RATE":x,"HDCP-LEVEL":E,"PATHWAY-ID":v,RESOLUTION:T,"VIDEO-RANGE":R}=g,B=`${`${v||"."}-`}${h.bitrate}-${T}-${x}-${w}-${R}-${E}`;if(o[B])if(o[B].uri!==h.url&&!h.attrs["PATHWAY-ID"]){const M=r[B]+=1;h.attrs["PATHWAY-ID"]=new Array(M+1).join(".");const W=new Ws(h);o[B]=W,i.push(W)}else o[B].addGroupId("audio",g.AUDIO),o[B].addGroupId("text",g.SUBTITLES);else{const M=new Ws(h);o[B]=M,r[B]=1,i.push(M)}}),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:p,width:y,height:b})=>(!!m||!!(y&&b))&&P6(p))),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(_.ERROR,{type:pe.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(p=>!p.audioCodec||hl(p.audioCodec,"audio",m)),bg(r)}t.subtitles&&(l=t.subtitles,bg(l));const c=d.slice(0);d.sort((m,p)=>{if(m.attrs["HDCP-LEVEL"]!==p.attrs["HDCP-LEVEL"])return(m.attrs["HDCP-LEVEL"]||"")>(p.attrs["HDCP-LEVEL"]||"")?1:-1;if(a&&m.height!==p.height)return m.height-p.height;if(m.frameRate!==p.frameRate)return m.frameRate-p.frameRate;if(m.videoRange!==p.videoRange)return ni.indexOf(m.videoRange)-ni.indexOf(p.videoRange);if(m.videoCodec!==p.videoCodec){const y=Pf(m.videoCodec),b=Pf(p.videoCodec);if(y!==b)return b-y}if(m.uri===p.uri&&m.codecSet!==p.codecSet){const y=ei(m.codecSet),b=ei(p.codecSet);if(y!==b)return b-y}return m.averageBitrate!==p.averageBitrate?m.averageBitrate-p.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 p=h.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${p}`),((u=this.hls.userConfig)==null?void 0:u.abrEwmaDefaultEstimate)===void 0){const b=Math.min(p,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===yg.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=o&&!i,g={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(_.MANIFEST_PARSED,g),(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(_.ERROR,{type:pe.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(_.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===ve.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ce.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(_.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));ap(a),this._levels=a,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(_.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(_.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:a}))}}function bg(s){const e={};s.forEach(t=>{const a=t.groupId||"";t.id=e[a]=e[a]||0,e[a]++})}class FP{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:pe.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,g,m,p)=>{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"),p));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,r({frag:y,keyInfo:b})},onError:(f,g,m,p)=>{this.resetLoader(g),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),m,et({url:d.url,data:void 0},f)))},onTimeout:(f,g,m)=>{this.resetLoader(g),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),m))},onAbort:(f,g,m)=>{this.resetLoader(g),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 Sg(){return self.SourceBuffer||self.WebKitSourceBuffer}function _g(){if(!As())return!1;const e=Sg();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function MP(){if(!_g())return!1;const s=As();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(Na(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(Na(e,"audio"))))}function VP(){var s;const e=Sg();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const $P=250,Ci=2,zP=.1,UP=.05;class GP{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||!Pe.getBuffered(i).length){this.nudgeRetry=0;return}const h=Pe.bufferInfo(i,r,0),u=h.nextStart||0;if(l){const y=h.len>Ci,b=!u||t&&t.start<=r||u-r>Ci&&!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,x=(S==null||(f=S.details)==null?void 0:f.live)?S.details.targetduration*2:Ci,E=this.fragmentTracker.getPartialFragment(r);if(b>0&&(b<=x||E)){i.paused||this._trySkipBufferHole(E);return}}const g=self.performance.now();if(o===null){this.stalled=g;return}const m=g-o;if(!l&&m>=$P&&(this._reportStall(h),!this.media))return;const p=Pe.bufferInfo(i,r,a.maxBufferHole);this._tryFixBufferStall(p,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(_.ERROR,{type:pe.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=Pe.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 g=!1;if(o===0){const m=f.getAppendedFrag(0,ce.MAIN);m&&l<m.end&&(g=!0)}if(!g){const m=e||f.getAppendedFrag(o,ce.MAIN);if(m){let p=!1,y=m.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{p=!0;break}}if(p)return 0}}}const u=Math.max(l+UP,o+zP);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(_.ERROR,{type:pe.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(_.ERROR,{type:pe.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(_.ERROR,{type:pe.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:r,fatal:!0})}}}const jP=100;class HP extends Cl{constructor(e,t,a){super(e,t,a,"[stream-controller]",ce.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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(_.ERROR,this.onError,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(_.ERROR,this.onError,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.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(jP),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=$.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=$.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case $.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=$.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=$.IDLE;break}break}case $.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=$.IDLE}}break}this.state===$.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 p={};this.altAudio&&(p.type="video"),this.hls.trigger(_.BUFFER_EOS,p),this.state=$.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===$.WAITING_LEVEL||c.live&&this.levelLastLoaded!==r){this.level=o,this.state=$.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 g=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&g&&g.sn!=="initSegment"&&this.fragmentTracker.getState(g)!==tt.OK){var m;const y=((m=this.backtrackFragment)!=null?m:g).sn-c.startSN,b=c.fragments[y-1];b&&g.cc===b.cc&&(g=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(g&&this.isLoopLoading(g,f)){if(!g.gap){const y=this.audioOnly&&!this.altAudio?Be.AUDIO:Be.VIDEO,b=(y===Be.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,ce.MAIN)}g=this.getNextFragmentLoopLoading(g,c,l,ce.MAIN,u)}g&&(g.initSegment&&!g.initSegment.data&&!this.bitrateTest&&(g=g.initSegment),this.loadFragment(g,r,f))}loadFragment(e,t,a){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===tt.NOT_LOADED||i===tt.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,ce.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 $.KEY_LOADING:case $.FRAG_LOADING:case $.FRAG_LOADING_WAITING_RETRY:case $.PARSING:case $.PARSED:this.state=$.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 GP(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;ae(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(_.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&&!VP(),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!==$.IDLE)return;const i=a[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=$.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===$.FRAG_LOADING||this.state===$.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(_.LEVEL_UPDATED,{details:r,level:o}),this.state===$.WAITING_LEVEL){if(this.waitForCdnTuneIn(r))return;this.state=$.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),g=this.transmuxer=this.transmuxer||new Fp(this.hls,ce.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,p=m!==-1,y=new El(a.level,a.sn,a.stats.chunkCount,o.byteLength,m,p),b=this.initPTS[a.cc];g.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(_.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),o.trigger(_.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!==ce.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===$.PARSED&&(this.state=$.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=$.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(ce.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===$.WAITING_LEVEL&&((a=t.context)==null?void 0:a.type)===ve.LEVEL&&(this.state=$.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||!Pe.getBuffered(e).length){const a=this.state!==$.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,a)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=$.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Be.AUDIO||this.audioOnly&&!this.altAudio){const a=(t===Be.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(a,t,ce.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=Pe.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=$.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(_.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:g,initSegment:m}=o,{details:p}=h,y=this.altAudio?void 0:o.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=$.PARSING,m){if(m!=null&&m.tracks){const w=d.initSegment||d;this._bufferInitSegment(h,m.tracks,w,r),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:w,id:a,tracks:m.tracks})}const b=m.initPTS,S=m.timescale;ae(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:S},i.trigger(_.INIT_PTS_FOUND,{frag:d,id:a,initPTS:b,timescale:S}))}if(u&&p&&d.sn!=="initSegment"){const b=p.fragments[d.sn-1-p.startSN],S=d.sn===p.startSN,w=!b||d.cc>b.cc;if(o.independent!==!1){const{startPTS:x,endPTS:E,startDTS:v,endDTS:T}=u;if(c)c.elementaryStreams[u.type]={startPTS:x,endPTS:E,startDTS:v,endDTS:T};else if(u.firstKeyFrame&&u.independent&&r.id===1&&!w&&(this.couldBacktrack=!0),u.dropped&&u.independent){const R=this.getMainFwdBufferInfo(),L=(R?R.end:this.getLoadPosition())+this.config.maxBufferHole,B=u.firstKeyFramePTS?u.firstKeyFramePTS:x;if(!S&&L<B-this.config.maxBufferHole&&!w){this.backtrack(d);return}else w&&(d.gap=!0);d.setElementaryStreamInfo(u.type,d.start,E,d.start,T,!0)}else S&&x>Ci&&(d.gap=!0);d.setElementaryStreamInfo(u.type,x,E,v,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(u,d,c,r,S||w)}else if(S||w)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:S,startDTS:w,endDTS:x}=y;c&&(c.elementaryStreams[Be.AUDIO]={startPTS:b,endPTS:S,startDTS:w,endDTS:x}),d.setElementaryStreamInfo(Be.AUDIO,b,S,w,x),this.bufferFragmentData(y,d,c,r)}if(p&&g!=null&&(t=g.samples)!=null&&t.length){const b={id:a,frag:d,details:p,samples:g.samples};i.trigger(_.FRAG_PARSING_METADATA,b)}if(p&&f){const b={id:a,frag:d,details:p,samples:f.samples};i.trigger(_.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,a,i){if(this.state!==$.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(_.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const h=t[d].initSegment;h!=null&&h.byteLength&&this.hls.trigger(_.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,ce.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=$.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const a=e.currentTime;if(Pe.isBuffered(e,a)?t=this.getAppendedFrag(a):Pe.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(_.FRAG_CHANGED,{frag:t}),(!i||i.level!==o)&&this.hls.trigger(_.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&&ae(t)&&ae(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.17"}static isMSESupported(){return _g()}static isSupported(){return MP()}static getMediaSource(){return As()}static get Events(){return _}static get ErrorTypes(){return pe}static get ErrorDetails(){return N}static get DefaultConfig(){return ds.defaultConfig?ds.defaultConfig:yg}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 Dl,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,N3(e.debug||!1,"Hls instance");const t=this.config=DP(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),g=new v6(this),m=new B6(this),p=t.contentSteeringController,y=p?new p(this):null,b=this.levelController=new OP(this,y),S=new rN(this),w=new FP(this.config),x=this.streamController=new HP(this,S,w);u.setStreamController(x),f.setStreamController(x);const E=[g,b,x];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,w)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const R=t.subtitleStreamController;R&&E.push(new R(this,S,w)),this.createController(t.timelineController,v),w.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(N6,v),this.coreComponents=v,E.push(d);const L=d.onErrorOut;typeof L=="function"&&this.on(_.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===_.ERROR;this.trigger(_.ERROR,{type:pe.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(_.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(_.MEDIA_ATTACHING,{media:e})}detachMedia(){A.log("detachMedia"),this.trigger(_.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,a=this.url,i=this.url=Qr.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(_.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){D6(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 WP=[(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))],KP={class:"stories__content"},qP={class:"story-container-game"},YP={class:"story-circle"},JP={class:"story-result"},XP={class:"stories__content__stories-bar"},ZP={class:"stories__content__video"},QP={class:"stories__content__video__info__date"},eO={class:"stories__content__video__info__data"},tO=Xe({__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(ee=>({"559904cd":y.value,"57a9d8d4":b.value,"57d750a1":v.value}));const a=eu(),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((ee,Ce)=>(Ce.ids.forEach(Te=>{ee.set(Te,Ce.name)}),ee),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),g=n.ref(0),m=n.ref(!1),p=n.ref(0),y=n.ref("auto"),b=n.ref("100%"),S=n.ref(null),w=n.ref(0),x=n.ref(null),E=n.ref(null),v=n.computed(()=>X()?"7vw":"16px"),T=n.computed(()=>d.value[c.value]),R=n.computed(()=>({"--icon-play":`url(${a}/icnplay1.svg)`}));function L(){l.value.muted=!1,l.value.play()}const B=n.computed(()=>!T.value.isHls&&["ios"].includes(Qo()));n.watch(()=>T.value,ee=>{ee&&W()}),n.watch(()=>t.stories,ee=>{if(ee.length){c.value=0,g.value=0;const Ce=ee.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${du[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${o.get(Te.categoryId)} ${dv(Te.player.player_name)}`})).sort((Te,Fe)=>Te.startTime-Fe.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ce.length-1&&(Ce.forEach((Te,Fe)=>{Fe<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,g.value=c.value),d.value=[...Ce]}},{immediate:!0}),n.watch(()=>r.value,ee=>{ee&&M()},{flush:"post"}),n.watch(()=>h.value,ee=>{ee&&(cv()?(ee.addEventListener("touchstart",ue),ee.addEventListener("touchend",Y)):(ee.addEventListener("mousedown",ue),ee.addEventListener("mouseup",Y)))},{flush:"post"});function M(){l.value=new zs("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",se(l.value)),l.value.on("timeupdate",oe()),W(T.value),l.value.isDestroyed=!1}function W(){T.value.isHls?j(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function j(ee){if(r.value)if(ds.isSupported()){r.value.src=null;let Ce=new ds;Ce.loadSource(ee.url),Ce.attachMedia(r.value)}else l.value.source={type:"video",sources:[{src:ee.url,type:"video/mp4"}]}}function se(){const ee=document.querySelector(".plyr__video-wrapper");return ee&&(w.value=ee.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 xe(),()=>{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?X()&&(m.value=!0):X()&&(m.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!X()&&(E.value.style="display: none",b.value="100%"):E.value&&!X()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ne())}}function ne(ee=1){const Ce=c.value+ee;Ce<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):he("right",T.value):Ce===d.value.length?t.isLastGameStories?K():he("left",T.value):(c.value=Ce,ee===1&&(g.value=c.value))}function de(){u.value>f.value?he("left",T.value):u.value<f.value?he("right",T.value):J()}function he(ee,Ce){e("last-story-index",g.value),e("swipe",{direction:ee,currentPlay:Ce})}function J(){const ee=window.innerWidth/2,Ce=u.value<ee,Te=T.value.progress;T.value.progress=Ce?0:100,l.value.pause(),e("video-next-back",{eventName:Ce?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ne(Ce?-1:1)}function K(){l.value.pause(),l.value.muted=!0,e("last-story-index",g.value),e("close",T.value)}function ue(ee){u.value=ee.changedTouches?ee.changedTouches[0].clientX:ee.clientX}function Y(ee){f.value=ee.changedTouches?ee.changedTouches[0].clientX:ee.clientX,de()}function X(){return/iPhone|iPad/i.test(navigator.userAgent)}function re(){window.scrollTo(0,100)}function ye(){if(window.scrollTo(0,100),Qo()=="android"){const ee=document.querySelector("#stories");ee.requestFullscreen(ee)}}function xe(){if(window.ResizeObserver)S.value=new window.ResizeObserver(()=>{x.value&&w.value.height>0&&(x.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",x.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),S.value.observe(x.value);else throw new Error("Resize observer not supported!")}return n.onMounted(()=>{p.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),X()?(window.addEventListener("resize",re),re()):(window.addEventListener("orientationchange",ye),ye()),setTimeout(()=>{xe()},500)}),n.onBeforeUnmount(()=>{window.scrollTo(0,p.value),X()?window.removeEventListener("resize",re):(Qo()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ye)),S.value&&(S.value.disconnect(),S.value=null)}),(ee,Ce)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stories",X()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:x,style:n.normalizeStyle(R.value)},[n.createElementVNode("div",{class:n.normalizeClass(["stories__close",X()?"stories-safe-areas-iphone":""]),onClick:K},WP,2),n.createElementVNode("div",KP,[n.createElementVNode("div",qP,[n.createElementVNode("div",YP,[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",JP,n.toDisplayString(T.value.header.label),1)]),n.createElementVNode("div",{ref_key:"overlay",ref:h,class:"stories__content__overlay"},null,512),n.createElementVNode("div",XP,[(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",ZP,[n.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[n.createElementVNode("div",QP,n.toDisplayString(T.value.date),1),n.createElementVNode("div",eO,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)])]),B.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"]]),sO={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ímpico Universitario, Ciudad de Mé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á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ó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é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é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é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é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é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á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é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é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á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á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ímpico Universitario, Ciudad de Mé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ímpico Universitario, Ciudad de Mé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é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é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é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ó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é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írez, San Luis Potosí.","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é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é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é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ó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ó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"]]},aO=new Map([[1,45],[2,90],[3,105],[4,120]]),nO=[{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 Pa=null,xi=null,vi="";const Vt=T3(),iO={components:{GSCSeasonSelect:EI,GSCTournamentSelect:eI,GSCGames:Pv,GSCSlider:ra,GSCGridTeamsMatches:vy,GSCPlayersLanding:Sy,GSCTops:DA,GSCTableCalendar:ZC,DiscoverVideos:k3,CarouselFullScreen:xL,Stories:tO},setup(){const s=n.ref("landingref"),{elementSize:e}=sy(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:eu(),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:!0,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysByKey:new Map,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,playersLengthRival: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},teamRival(){return 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},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 Ae.post(vi,{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||sO)}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(Vt).reduce((f,[g,m])=>(f[g]=i[m],f),{}),isPlaySeeker:!0,startSeconds:i[Vt.startTime],endSeconds:i[Vt.endTime],totalSeconds:Math.floor(i[Vt.endTime]-i[Vt.startTime]),payloadData:{play_id:i[Vt.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[Vt.momentOfPlay],play_type:i[Vt.categoryId],viewer_second_start:Math.floor(i[Vt.startTime]),intended_second_start:Math.floor(i[Vt.startTime]),intended_second_end:Math.floor(i[Vt.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,g]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(g)]}return l.categoryName=nO.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 Ae.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=Ae.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)},viewAllRival(){const s={team: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,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},getTotalPlayersRival(s){this.playersLengthRival=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=Ae.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=[Ae.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!==vi&&(vi=i,a.push(Ae.get(vi,t))),a},async onInputSeason(s){this.isLeagueSelected=!0;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=Ae.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 Ae.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(){Ae.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]+"T"+r[5]),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((g,m)=>{const p={...m},y=new Date,[b,S,w]=p.date.split("-"),[x,E,v]=p.schedule.split(":"),T=new Date(Number(b),Number(S)-1,Number(w),Number(x),Number(E),Number(v));return p.dateTimeMillis=T.valueOf(),p.home_team=l.find(R=>R.team_id===m.home_team),p.visiting_team=l.find(R=>R.team_id===m.visiting_team),p.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(p.game_id),this.seasonsGamesMap.set(p.game_id,p),g[m.matchday_abbreviation]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(p):g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[p]:g[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[p]},this.gsData&&this.gsData.teamId&&p.game_status===4&&(p.home_team.team_id===this.gsData.teamId||p.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(p),p.score&&p.score[0]+p.score[1]>0&&this.userTeamGamesForVideos.push(p)),g},{});this.userTeamGames.sort((g,m)=>g.dateTimeMillis-m.dateTimeMillis);for(let[g,m]of Object.entries(f))f[g]=Object.entries(m).map(([p,y])=>({date:p,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[g].sort((p,y)=>p.date<y.date?-1:p.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((g,m)=>{const p={...m};return p.dateTimeMillis=new Date(p.date_time_utc).valueOf(),p.home_team=l.find(y=>y.team_id===m.home_team),p.visiting_team=l.find(y=>y.team_id===m.visiting_team),g[m.matchday_abbreviation]?g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]?(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date].push(p):(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&(g[m.matchday_abbreviation][m.game_status===3?"canceled":m.date]=[p]):(p.game_status!=4||p.is_live==1)&&(p.score[0]!=0||p.score[1]!=0)&&(g[m.matchday_abbreviation]={[m.game_status===3?"canceled":m.date]:[p]}),g},{});this.userTeamGames.sort((g,m)=>g.dateTimeMillis-m.dateTimeMillis);for(let[g,m]of Object.entries(f))f[g]=Object.entries(m).map(([p,y])=>({date:p,games:y.sort((b,S)=>b.dateTimeMillis-S.dateTimeMillis)})),f[g].sort((p,y)=>p.date<y.date?-1:p.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[g,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const p=qu.get(this.tournamentType);if(p){const y=p.get(g);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const p=g.replace("M",""),y=`Jornada ${p}`;this.isCupLegacy?u[Ku[p]||y]=m:u[Wu[g]||y]=m}else u[Number(g.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(g)?u[g]=m:u[`R${Number(g.replace("PO",""))}`]=m:f.type===1&&(u[Hu[g]]=m);return u},{}),this.fullTournamentScheduleFullGoals=h.reduce((u,f)=>{for(const[g,m]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const p=qu.get(this.tournamentType);if(p){const y=p.get(g);y&&(u[y.matchDayAbbreviation]=m)}}else if(this.isCup){const p=g.replace("M",""),y=`Jornada ${p}`;this.isCupLegacy?u[Ku[p]||y]=m:u[Wu[g]||y]=[]}else u[Number(g.replace("M","")).toString()]=m;else f.type===2?["PI1","PI2"].includes(g)?u[g]=m:u[`R${Number(g.replace("PO",""))}`]=m:f.type===1&&(u[Hu[g]]=m);return u},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeysByKey.clear(),this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((u,[f,g],m)=>{const p=Number(f);let y="";Number.isNaN(p)?y=f:y=p<10?`0${p}`:f;let b=!1,S=null;const w={key:f,value:p,valueText:y,avaible:b,matchDayId:S,index:m,liveGamesIds:new Set};this.tournamentScheduleKeysByKey.set(f,w);const x=g.reduce((v,T)=>(!S&&T&&T.games&&T.games.length&&(w.matchDayId=T.games[0].matchday_id),T.games.forEach(R=>{this.roundAbbreviationByGameId.set(R.game_id,f),R.roundAbbreviation=Number.isNaN(p)?p:`J ${p}`,R.roundAbbreviationV2=f,R.scheduleKey=w}),v=v.concat(T.games),v),[]);for(const v of x)(v.game_status!==4||v.is_live)&&(v.score[0]!==0||v.score[1]!==0)&&(w.avaible=!0);u.set(f,w);const E=this.getPages(x);return this.gamesPages.set(f,E),u},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((u,[f,g])=>{const m=Number(f);let p="";Number.isNaN(m)?p=f:p=m<10?`0${m}`:f;let y=!1;const b=g.reduce((S,w)=>(w.games.forEach(x=>{x.roundAbbreviation=Number.isNaN(m)?m:`J ${m}`}),S=S.concat(w.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:p,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(xi),xi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),xi||(xi=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){Pa||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(),Pa=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(Pa),Pa=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,i.scheduleKey&&i.scheduleKey.liveGamesIds.delete(s.game_id)}},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,i.scheduleKey&&i.scheduleKey.liveGamesIds.add(a.game_id)),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=aO.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))}}Pa||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 t=new Date().valueOf(),a=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(a).reduce((r,[l,d])=>(r[l]=null,d.forEach(c=>{c.games.forEach(h=>{if([1,0].includes(h.game_status)||h.is_live){const u=t-h.dateTimeMillis;(r[l]===null||u<r[l])&&(r[l]=u)}})}),r),{}));if(!i.length)return"1";const o=i.reduce((r,[l,d])=>{if(d!==null){const c=this.tournamentScheduleKeysByKey.get(l);(r.shortestMillisToNow===null||d<r.shortestMillisToNow&&c.index>=r.scheduleKey.index)&&(r.shortestMillisToNow=d,r.round=l,r.scheduleKey=c)}return r},{round:"",shortestMillisToNow:null,scheduleKey:null});return o.shortestMillisToNow!==null?o.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 Ae.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 Ae.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]+"T"+l[5]),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([Ae.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()}},hs=s=>(n.pushScopeId("data-v-a906a8c2"),s=s(),n.popScopeId(),s),oO={class:"gsclanding",ref:"landingref"},rO={key:2,class:"play-seeker-image"},lO={class:"play-seeker-image__info"},cO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),dO={class:"play-seeker-image__info__legends-and-button"},hO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),uO={class:"play-icon"},mO=["src"],fO=hs(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),pO={class:"play-seeker-image__players"},gO=["src"],yO={key:3,class:"container-selectors-mobile"},bO={class:"container-selectors-mobile-tournament"},SO={class:"container-selectors-mobile-season"},_O={key:0,class:"home-item-movil"},wO=hs(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),kO={class:"name-user-movil"},EO={key:1,class:"home-item"},TO={key:2,class:"bar-settings"},CO={class:"name-user"},xO={class:"container-selectors"},vO={class:"selector-tournament"},AO={class:"selector-seasons"},LO={key:0,class:"container-games"},IO={key:0,class:"container-games"},RO={key:7,class:"container-players-myteam"},BO=["onClick"],NO={class:"story-result"},DO={key:0,class:"font-bold"},PO={key:1,class:"font-bold"},OO={class:"story-match"},FO={key:2,class:"play-seeker-image"},MO={class:"play-seeker-image__info"},VO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),$O={class:"play-seeker-image__info__legends-and-button"},zO=hs(()=>n.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),UO={class:"play-icon"},GO=["src"],jO=hs(()=>n.createElementVNode("div",{class:"text"},"Explora videos",-1)),HO={class:"play-seeker-image__players"},WO=["src"],KO={key:3,class:"container-selectors-mobile"},qO={class:"container-selectors-mobile-tournament"},YO={class:"container-selectors-mobile-season"},JO={key:0,class:"home-item-movil"},XO=hs(()=>n.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),ZO={class:"name-user-movil"},QO={key:1,class:"home-item"},e8={key:2,class:"bar-settings"},t8={class:"name-user"},s8={class:"container-selectors"},a8={class:"selector-tournament"},n8={class:"selector-seasons"},i8={key:3,class:"container-games"},o8={key:5,class:"container-players"},r8={key:6,class:"stories-circle-wrapper"},l8=["onClick"],c8={class:"story-result"},d8={key:0,class:"font-bold"},h8={key:1,class:"font-bold"},u8={class:"story-match"};function m8(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("GSCGridTeamsMatches"),u=n.resolveComponent("GSCTableCalendar"),f=n.resolveComponent("GSCGames");n.resolveComponent("DiscoverVideos");const g=n.resolveComponent("GSCPlayersLanding"),m=n.resolveComponent("GSCTops"),p=n.resolveComponent("GSCSlider");return n.openBlock(),n.createElementBlock("div",oO,[t.isplayer?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[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",rO,[n.createElementVNode("div",lO,[cO,n.createElementVNode("div",dO,[hO,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",uO,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,mO)]),fO])])]),n.createElementVNode("div",pO,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,gO)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",yO,[n.createElementVNode("div",bO,[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",SO,[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",_O,[wO,n.createElementVNode("div",kO,[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",EO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",TO,[n.createElementVNode("div",CO,[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",xO,[n.createElementVNode("div",vO,[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",AO,[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),t.user.tournament===i.tournamentSelected.id?(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.elementSize.width>1e3?(n.openBlock(),n.createBlock(h,{key:0,isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"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","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])):(n.openBlock(),n.createBlock(h,{key:1,isPlayer:!1,"player-id":t.user.player,"is-female":i.tournamentSelected.is_female==1,"team-id":t.user.team,"is-player-mobile1":t.isplayer&&!o.isGenericLike,"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":!1,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["player-id","is-female","team-id","is-player-mobile1","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"]))],4),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",LO,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:4},[Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",IO,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.createVNode(h,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"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","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.withDirectives(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(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2)],64)),n.createCommentVNode("",!0),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:o.teamRival,class:"container-players"},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{key:o.teamRival,"tournament-selected":i.tournamentSelected,onClickProfileBtn:o.clickProfileBtn,onViewAll:o.viewAllRival,"is-rival":!0,onTotalPlayers:o.getTotalPlayersRival,"team-id":o.teamRival,"season-id":i.seasonSelected.id,"is-player":!0},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id"])):n.createCommentVNode("",!0)])),[[n.vShow,i.playersLengthRival>0&&o.teamRival>0]]),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",RO,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{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]]),a.elementSize.width<1e3&&t.isplayer&&!o.isGenericLike?(n.openBlock(),n.createElementBlock("div",{key:8,class:n.normalizeClass(o.containerGridCalendarTable)},[n.createElementVNode("div",{class:"container-grid",style:n.normalizeStyle([a.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 65px !important;"])},[a.elementSize.width<1e3?(n.openBlock(),n.createBlock(h,{key:0,isPlayer:!1,"player-id":t.user.player,"team-id":t.user.team,"is-player-mobile2":t.isplayer&&!o.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"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":!1,"component-width":a.elementSize.width,onAction:o.clickCard},null,8,["player-id","team-id","is-player-mobile2","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"])):n.createCommentVNode("",!0)],4)],2)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id?"tops-player":""]),style:n.normalizeStyle(t.isplayer&&!o.isGenericLike&&a.elementSize.width<1e3?"margin-top: 35px !important;":i.playersLengthRival==0&&i.playersLength==0&&a.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{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)],6),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",{key:9,class:n.normalizeClass(["stories-circle-wrapper",t.user.tournament===i.tournamentSelected.id?"":"marginsep"])},[(n.openBlock(),n.createBlock(p,{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",NO,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+" ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",DO,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",PO,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",OO,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,BO))),128))]),_:1}))],2)):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width<1e3]]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:10,class:"b2c-image",onClick:e[1]||(e[1]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[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",FO,[n.createElementVNode("div",MO,[VO,n.createElementVNode("div",$O,[zO,n.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[2]||(e[2]=(...y)=>o.onClickPlaySeeker&&o.onClickPlaySeeker(...y))},[n.createElementVNode("div",UO,[n.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,GO)]),jO])])]),n.createElementVNode("div",HO,[n.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,WO)])])):n.createCommentVNode("",!0),a.elementSize.width<=680&&a.elementSize.width>0?(n.openBlock(),n.createElementBlock("div",KO,[n.createElementVNode("div",qO,[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",YO,[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",JO,[XO,n.createElementVNode("div",ZO,[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",QO,"Inicio")):n.createCommentVNode("",!0),a.elementSize.width>680?(n.openBlock(),n.createElementBlock("div",e8,[n.createElementVNode("div",t8,[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",s8,[n.createElementVNode("div",a8,[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",n8,[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),Object.keys(i.tournamentSelected).length>0?(n.openBlock(),n.createElementBlock("div",i8,[n.createVNode(f,{"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,"current-season":i.seasonSelected.id,"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","current-season","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<=1e3?"width: 100%; ":"",!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.createVNode(h,{isPlayer:t.isplayer&&!o.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"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","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),n.withDirectives(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(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width>1e3]])],2),o.isGenericLike?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("div",o8,[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(g,{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",{class:n.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id&&!i.is_public&&!o.isGenericLike?"tops-team":""]),style:n.normalizeStyle(!(t.isplayer&&!o.isGenericLike)&&o.isGenericLike&&a.elementSize.width<=1e3||i.playersLengthRival==0&&i.playersLength==0&&a.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(m,{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)],6),i.gamesAllStories.length>0&&!i.is_public&&i.show_stories&&t.showStories?(n.openBlock(),n.createElementBlock("div",r8,[(n.openBlock(),n.createBlock(p,{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",c8,[n.createTextVNode(n.toDisplayString(y.home_team_acronym)+" ",1),y.score.length>0?(n.openBlock(),n.createElementBlock("span",d8,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",h8,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",u8,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,l8))),128))]),_:1}))])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",{class:"container-calendar-table",style:n.normalizeStyle(a.elementSize.width<=1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(n.openBlock(),n.createBlock(u,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":o.isGenericLike,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","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):n.createCommentVNode("",!0)],4),[[n.vShow,a.elementSize.width<1e3]]),i.is_public?(n.openBlock(),n.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[3]||(e[3]=(...y)=>o.abrirNuevaVentana&&o.abrirNuevaVentana(...y))})):n.createCommentVNode("",!0)],2)],2)],64))],512)}const f8=Xe(iO,[["render",m8],["__scopeId","data-v-a906a8c2"]]);ms.GSCLanding=f8,Object.defineProperty(ms,Symbol.toStringTag,{value:"Module"})});
|